@geotrekce/geotrek-rando-widget 0.35.2 → 0.35.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.
- package/dist/cjs/grw-common-button_23.cjs.entry.js +6 -5
- package/dist/cjs/grw-common-button_23.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-common-button_23.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-common-button_23.cjs.entry.js.map +1 -1
- package/dist/collection/components/grw-map/grw-map.js +6 -5
- package/dist/collection/components/grw-map/grw-map.js.br +0 -0
- package/dist/collection/components/grw-map/grw-map.js.gz +0 -0
- package/dist/collection/components/grw-map/grw-map.js.map +1 -1
- package/dist/esm/grw-common-button_23.entry.js +6 -5
- package/dist/esm/grw-common-button_23.entry.js.br +0 -0
- package/dist/esm/grw-common-button_23.entry.js.gz +0 -0
- package/dist/esm/grw-common-button_23.entry.js.map +1 -1
- package/dist/esm-es5/grw-common-button_23.entry.js +1 -1
- package/dist/esm-es5/grw-common-button_23.entry.js.br +0 -0
- package/dist/esm-es5/grw-common-button_23.entry.js.gz +0 -0
- package/dist/esm-es5/grw-common-button_23.entry.js.map +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.br +0 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-4c329d4c.system.entry.js +4 -0
- package/dist/geotrek-rando-widget/p-4c329d4c.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-4c329d4c.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-4c329d4c.system.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/p-SrqKQbd3.system.js +1 -1
- package/dist/geotrek-rando-widget/p-SrqKQbd3.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-SrqKQbd3.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-cb681dae.entry.js +4 -0
- package/dist/geotrek-rando-widget/p-cb681dae.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-cb681dae.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-cb681dae.entry.js.map +1 -0
- package/package.json +1 -1
- package/dist/geotrek-rando-widget/p-03eb939f.entry.js +0 -4
- package/dist/geotrek-rando-widget/p-03eb939f.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-03eb939f.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-03eb939f.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-acb4209f.system.entry.js +0 -4
- package/dist/geotrek-rando-widget/p-acb4209f.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-acb4209f.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-acb4209f.system.entry.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["grwCommonButtonCss","GrwCommonButton","constructor","hostRef","this","fontFamily","render","h","Host","key","style","part","class","onClick","action","innerHTML","icon","RefreshIcon","FilterListIcon","name","grwFiltersCss","GrwFilters","selectedSegment","handleEraseTreksFilters","treksFilters","forEach","filter","state","property","currentFilter","selected","selectedActivitiesFilters","selectedThemesFilters","selectedLocationFilters","currentTreks","handleTreksFiltersAndSearch","resetFilter","emit","handleOkTreksFilters","handleFilters","handleSelectedSegment","handleSegment","segment","mode","some","length","touristicContentsFilters","touristicEventsFilters","outdoorSitesFilters","handleEraseTouristicContentsFilters","currentTouristicContents","handleTouristicContentsFiltersAndSearch","handleOkTouristicContentsFilters","handleEraseTouristicEventsFilters","currentTouristicEvents","handleTouristicEventsFiltersAndSearch","handleOkTouristicEventsFilters","handleEraseOutdoorSitesFilters","currentOutdoorSites","handleOutdoorSitesFiltersAndSearch","handleOkOutdoorSitesFilters","treksWithinBounds","translate","language","treks","trek","erase","ok","home","themes","location","exportparts","filterName","practice","filterType","filterNameProperty","filterPlaceholder","placeholderPractices","difficulty","placeholderDifficulties","duration","placeholderDurations","placeholderLengths","elevation","placeholderElevations","routes","placeholderRoutes","accessibility","placeholderAccessibilities","activities","placeholderActivities","placeholderThemes","districts","placeholderDistricts","crossedCities","placeholderCrossedCities","touristicContentsWithinBounds","touristicContents","touristicContent","services","category","placeholderCategories","touristicEventsWithinBounds","touristicEvents","touristicEvent","type","placeholderType","outdoorSitesWithinBounds","outdoorSites","outdoorSite","grwLoaderCss","GrwLoader","colorPrimaryContainer","colorOnPrimaryContainer","factory","window","module","exports","require$$0","L","locales","locale","registerLocale","code","Util","extend","setLocale","i18n","_","string","data","template","err","t","e","a","i","n","Math","floor","r","o","s","round","toString","padStart","m","href","target","download","document","body","appendChild","click","removeChild","Promise","resolve","createElement","addEventListener","once","src","head","classed","beginPath","moveTo","Path2D","attr","strokeStyle","fillStyle","lineWidth","globalCompositeOperation","globalAlpha","stroke","fill","closePath","l","split","every","DomUtil","addClass","c","removeClass","call","d","u","getStyle","setProperty","p","create","v","f","g","insertAdjacentElement","setAttribute","y","querySelector","x","DomEvent","on","b","off","k","hasClass","w","random","substr","M","C","Object","freeze","__proto__","formatTime","saveFile","lazyLoader","drawCanvas","clamp","toggleClass","replaceClass","toggleStyle","toggleEvent","append","insert","setAttributes","select","randomId","each","A","lightblue","area","alpha","magenta","yellow","purple","steelblue","red","lime","line","S","height","xAttr","yAttr","scaleX","scaleY","interpolation","d3","curve","xDiagCoord","y0","y1","z","color","strokeColor","strokeOpacity","fillOpacity","D","tickSize","tickPadding","position","width","axis","scale","ticks","tickFormat","label","labelX","labelY","onAxisMount","replace","toUpperCase","join","text","F","E","theme","xCoord","yCoord","labels","item","node","isNaN","keys","sort","order","size","value","selectAll","T","margins","path","toLowerCase","ownerSVGElement","dispatch","detail","legend","enabled","bottom","I","getBBox","max","Browser","webkit","O","symbolTriangle","angle","exit","remove","enter","merge","symbol","N","point","datum","pos","y2","top","x2","left","right","P","min","forceBounds","extent","B","G","range","scaleLinear","domain","H","grid","brush","tooltip","ruler","getContext","brushX","mask","canvas","context","svg","panes","utils","_resize","concat","test","navigator","platform","userAgent","_width","_height","pane","get","X","Colors","Area","Path","Axis","Grid","PositionMarker","LegendItem","Tooltip","Ruler","CheckPoint","Domain","Range","Scale","Bisect","bisector","invert","Chart","U","Class","includes","Evented","prototype","Mixin","Events","initialize","options","control","_data","_props","scales","paths","areas","grids","axes","legendItems","tooltipItems","_scales","_domains","_ranges","_paths","_brushEnabled","dragging","_zoomEnabled","zooming","_chart","_container","_grid","_area","_point","_axis","_legend","_tooltip","_ruler","_initScale","_mask","_context","_brush","_zoom","zoom","_drag","drag","_initInteractions","_maskGaps","push","index","update","_updateScale","_updateArea","_updateAxis","_updateLegend","_updateClipper","clear","_resetDrag","_hideDiagramIndicator","clearRect","_drawPath","preferCanvas","_hasActiveLayers","_initBrush","sourceEvent","pointers","_findIndexForXCoord","fire","shiftKey","button","selection","dragstart","dragend","bind","_initClipper","scaleExtent","translateExtent","buttons","transform","distance","_x","rescaleX","time","_initRuler","_initLegend","format","_y","imperial","coords","_findCoordsForY","_registerAxisScale","xAxisMin","xAxisMax","yAxisMin","yAxisMax","altitude","_registerAreaPath","_registerAxisGrid","forceAxisBounds","xTicks","yTicks","_registerCheckPoint","latlng","_findIndexForLatLng","dist","_registerTooltip","substring","indexOf","nodes","Array","map","sign","slice","reverse","reduce","distanceTo","_resetZoom","zoomIdentity","_showDiagramIndicator","j","Symbol","iterator","R","J","marker","_marker","markerIcon","zIndexOffset","interactive","_labels","addTo","_map","getPane","_latlng","latLngToLayerPoint","_rotate","rotatedPointToMapPanePoint","maxElevation","getElement","setLatLng","getLatLng","Y","summary","reset","track_info","_registerSummary","V","autofitBounds","autohide","mobile","autohideMarker","almostover","collapsed","detached","distanceMarkers","lazy","direction","decimalsX","decimalsY","downloadLink","elevationDiv","followMarker","lazyLoadJS","divIcon","className","html","iconSize","iconAnchor","polyline","opacity","weight","lineCap","polylineSegments","reverseCoords","skipNullZCoords","slope","slopeDeltaMax","slopeRange","speed","speedDeltaMax","speedRange","timeFactor","timeFormat","timestamps","waypoints","wptIcons","wptLabels","xLabel","yLabel","zFollow","Mobile","W","Control","Elevation","__mileFactor","__footFactor","__D3","__TOGEOJSON","__LGEOMUTIL","__LALMOSTOVER","__LDISTANCEM","addData","lazyLoad","then","_addData","_addLayer","_fireEvt","layer","_initElevationDiv","isConnected","getContainer","onAdd","_clearChart","_layers","_clearLayers","_markers","_clearMarkers","_updateChart","_events","elechart_updated","fn","ctx","eachLayer","clearLayers","disableBrush","enableBrush","disableZoom","enableZoom","fitBounds","getBounds","isValid","latLngBounds","getZFollow","hide","featureGroup","_markedSegments","_chartEnabled","handlers","setOptions","_setMapView","throttle","setStyle","colors","_fixCanvasPaths","_fixTooltipSize","arguments","toGeoJSON","GeometryUtil","Handler","AlmostOver","DistanceMarkers","load","_parseFromString","_loadLayer","_loadFile","_initButton","_initChart","_initSummary","_initMarker","_initLayer","_hideMarker","_resetView","_resizeChart","_rotateMarker","_keydownHandler","_updateSummary","onRemove","redraw","setZFollow","show","geometry","_addGeoJSONData","coordinates","console","warn","features","_latlngs","feature","properties","meta","ele","hr","cad","atemp","coordinateProperties","props","id","_addPoint","lat","lng","alt","latLng","addLayer","Polyline","_addMarker","_initAlmostOverHandler","almostOver","addHandler","_mousemoveLayerHandler","_mouseoutHandler","_initDistanceMarkers","eleDiv","_initMapIntegrations","_collapse","_expand","Canvas","_fillStroke","include","hasLayer","outline","_updateMarker","_findItemForLatLng","_findItemForX","_xTicks","_yTicks","offsetWidth","offsetHeight","clientWidth","_maxWidth","maxWidth","_mouseenterHandler","_dragendHandler","_mousemoveHandler","_rulerFilterHandler","_toggleChartHandler","_pane","createPane","zIndex","pointerEvents","_renderer","disableClickPropagation","disableScrollPropagation","_button","title","stop","_toggle","_summary","fetch","_downloadURL","catch","geoJson","pointToLayer","desc","sym","hasOwnProperty","decodeURI","bindPopup","keepInView","openPopup","bindTooltip","sticky","openTooltip","element","onEachFeature","_parseFromGeoJSONString","JSON","parse","_parseFromXMLString","trim","_prepareMultiLineStrings","_prepareAdditionalProperties","DOMParser","parseFromString","documentElement","tagName","getElementsByTagName","from","find","parentElement","textContent","pop","_registerDataAttribute","init","skipNull","splice","chart","_isFullscreen","_updateMapSegments","getZoom","setView","animate","contains","elevation_max","setLatLngs","onclick","preventDefault","confirm","CustomEvent","dispatchEvent","__xTicks","__yTicks","addInitHook","distanceFactor","totlen","toFixed","timeLabel","_timeAVGSpeed","timeAVGSpeed","speedFactor","Date","toLocaleTimeString","toLocaleDateString","toLocaleString","replaceAll","xTimeFormat","coordTimes","times","getTime","now","getTimezoneOffset","abs","tottime","altitudeFactor","heightFactor","elevation_min","elevation_avg","altitudeDeltaMax","altitudeRange","visbile","maxele","minele","avgele","slopeLabel","ascent","descent","slope_max","slope_min","slope_avg","slop","formatNum","minslope","maxslope","avgslope","acceleration","speedLabel","speed_max","speed_min","speed_avg","minspeed","maxspeed","avgspeed","accelerationLabel","accelerationFactor","acceleration_max","acceleration_min","acceleration_avg","accelerationDeltaMax","accelerationRange","minacceleration","maxacceleration","avgacceleration","Utils","Components","enableDragging","disableDragging","loadChart","loadData","loadGPX","loadGeoJSON","loadXML","loadFile","_addGPXData","_registerFocusLabel","MarkerClusterGroup","FeatureGroup","maxClusterRadius","iconCreateFunction","clusterPane","Marker","spiderfyOnEveryZoom","spiderfyOnMaxZoom","showCoverageOnHover","zoomToBoundsOnClick","singleMarkerMode","disableClusteringAtZoom","removeOutsideVisibleBounds","animateAddingMarkers","spiderfyShapePositions","spiderfyDistanceMultiplier","spiderLegPolylineOptions","chunkedLoading","chunkInterval","chunkDelay","chunkProgress","polygonOptions","_defaultIconCreateFunction","_featureGroup","addEventParent","_nonPointGroup","_inZoomAnimation","_needsClustering","_needsRemoving","_currentShownBounds","_queue","_childMarkerEventHandlers","_childMarkerDragStart","move","_childMarkerMoved","_childMarkerDragEnd","TRANSITION","_withAnimation","_noAnimation","_markerCluster","MarkerCluster","MarkerClusterNonAnimated","LayerGroup","addLayers","_unspiderfy","_maxZoom","_topClusterLevel","_recalculateBounds","_refreshClustersIcons","__parent","_animationAddLayer","_animationAddLayerNonAnimated","removeLayer","removeLayers","_unspiderfyLayer","_removeLayer","clusterShow","_arraySplice","isArray","_extractNonGroupLayers","getChildCount","getAllChildMarkers","_recursivelyAddChildrenToMap","setTimeout","_gridClusters","_gridUnclustered","_noanimationUnspiderfy","_generateInitialClusters","LatLngBounds","_bounds","getLayers","getLayer","parseInt","stamp","_group","zoomToShowLayer","_icon","spiderfy","panTo","zoomToBounds","isFinite","getMaxZoom","_maxLat","crs","projection","MAX_LATITUDE","newlatlng","_getExpandedVisibleBounds","_zoomEnd","_moveEnd","_spiderfierOnAdd","_bindEvents","_unbindEvents","_mapPane","_spiderfierOnRemove","_hideCoverage","getVisibleParent","_removeFromGridUnclustered","getMinZoom","removeObject","project","__dragStart","_ignoreMove","_popup","isOpen","_moveChild","oldLatLng","_childCount","_boundsNeedUpdate","_cLatLng","addObject","_childClusters","_iconNeedsUpdate","_isOrIsParent","parentNode","originalEvent","relatedTarget","listens","DivIcon","Point","_zoomOrSpiderfy","_showCoverage","keyCode","focus","_shownPolygon","_spiderfied","Polygon","getConvexHull","_mergeSplitClusters","_recursivelyRemoveChildrenFromMap","ceil","DistanceGrid","_overrideMarkerIcon","getNearObject","_addChild","_updateIcon","_enqueue","_queueTimeout","_processQueue","clearTimeout","intersects","_animationStart","_animationZoomIn","_animationZoomOut","_checkBoundsMaxLat","pad","_mapBoundsInfinite","getNorth","_northEast","getSouth","_southWest","_addToMap","LatLng","_recursively","_isSingleParent","clusterHide","_forceLayout","_recursivelyBecomeVisible","_recursivelyRestoreChildPositions","_animationEnd","_animationZoomOutSingle","_setPos","_recursivelyAnimateChildrenInAndAddSelfToMap","falseFn","markerClusterGroup","Icon","getBoundsZoom","setIcon","createIcon","_iconObj","createShadow","_setClusterCenter","_resetBounds","_wLatLng","_backupLatlng","_recursivelyAnimateChildrenIn","_restorePosition","setOpacity","_cellSize","_sqCellSize","_objectPoint","_getCoord","updateObject","eachObject","_sqDist","QuickHull","getDistant","findMostDistantPointFromBaseLine","maxPoint","newPoints","buildConvexHull","_2PI","PI","_circleFootSeparation","_circleStartAngle","_spiralFootSeparation","_spiralLengthStart","_spiralLengthFactor","_circleSpiralSwitchover","_generatePointsSpiral","_generatePointsCircle","_animationSpiderfy","unspiderfy","_animationUnspiderfy","cos","sin","_round","_preSpiderfyLatlng","setZIndexOffset","_spiderLeg","cluster","markers","layerPointToLatLng","SVG","_path","getTotalLength","strokeDasharray","strokeDashoffset","_latLngToNewLayerPoint","center","closePopup","apply","_unspiderfyWrapper","zoomAnimation","_unspiderfyZoomStart","touch","getRenderer","_unspiderfyZoomAnim","refreshClusters","_flagParentsIconsNeedUpdate","_refreshSingleMarkerModeMarkers","refreshIconOptions","defineProperty","define","amd","require","SimpleLocate","ariaLabel","minAngleChange","clickTimeoutDelay","setViewAfterClick","zoomLevel","drawCircle","afterClick","afterMarkerAdd","afterDeviceMove","htmlInit","htmlSpinner","htmlGeolocation","htmlOrientation","iconGeolocation","iconOrientation","_circle","_clicked","_geolocation","_orientation","_clickTimeout","_latitude","_longitude","_accuracy","_angle","stopPropagation","_onClick","getAccuracy","getAngle","setZoomLevel","level","async","_unwatchGeolocation","_unwatchOrientation","_updateButton","_onLayerAdd","_setView","_checkGeolocation","event","_onLocationFound","_watchGeolocation","_checkClickResult","_checkOrientation","_watchOrientation","geolocation","orientation","getCurrentPosition","watchPosition","reject","maximumAge","enableHighAccuracy","DeviceOrientationEvent","requestPermission","permission","locate","watch","_onZoomStart","_onZoomEnd","stopLocate","_onOrientation","latitude","longitude","accuracy","webkitCompassHeading","screen","html_name","icon_name","setRadius","circle","radius","simpleLocate","earthRadius","factors","centimeters","centimetres","degrees","feet","inches","kilometers","kilometres","meters","metres","miles","millimeters","millimetres","nauticalmiles","radians","yards","geom","feat","bbox","Error","isNumber","featureCollection","fc","radiansToLength","units","factor","degreesToRadians","num","coordEach","geojson","callback","excludeWrapCoord","stopG","geometryMaybeCollection","wrapShrink","coordIndex","isGeometryCollection","isFeatureCollection","isFeature","featureIndex","geometries","geomIndex","multiFeatureIndex","geometryIndex","geomType","featureEach","explode","points","coord","result","Infinity","ext","clone","cloneFeature","cloneFeatureCollection","cloneGeometry","cloned","cloneProperties","deepSlice","getCoord","getGeom","to","coordinates1","coordinates2","dLat","dLon","lat1","lat2","pow","atan2","sqrt","nearestPoint","targetPoint","nearest","minDist","bestFeatureIndex","pt","distanceToPoint","booleanPointInPolygon","polygon","polys","inBBox","insidePoly","inRing","ignoreBoundary","inHole","ring","isInside","xi","yi","xj","yj","onBoundary","intersect","pointOnFeature","normalize","cent","centroid","onSurface","x1","onLine","onMultiPoint","pointOnSegment","vertices","ab","ap","pb","__onAdd","__onRemove","__updatePath","_updatePath","__bringToFront","bringToFront","PolylineTextPath","_textRedraw","_textNode","_text","_textOptions","setText","defaults","repeat","fillColor","attributes","below","pattern","createTextNode","alength","getComputedTextLength","textNode","textPath","dy","offset","getAttribute","setAttributeNS","insertBefore","firstChild","textLength","pathLength","rotateAngle","rotatecenterX","rotatecenterY","vml","events","grwMapCss","GrwMap","maxZoom","mapIsReady","customLayersRefreshInterval","colorPrimaryApp","colorOnSurface","colorBackground","colorTrekLine","colorSensitiveArea","colorMarkers","colorClusters","colorOutdoorArea","tilesMaxZoomOffline","grwApp","mainMarkerSize","selectedMainMarkerSize","mainClusterSize","commonMarkerSize","departureArrivalMarkerSize","pointReferenceMarkerSize","elevationHeight","mobileElevationHeight","largeViewSize","elevationDefaultState","isLargeView","fabBackgroundColor","fabColor","arrowRepeat","userLayersState","tileLayer","customLayers","handleTreksWithinBoundsBind","handleTreksWithinBounds","handleTouristicContentsWithinBoundsBind","handleTouristicContentsWithinBounds","handleTouristicEventsWithinBoundsBind","handleTouristicEventsWithinBounds","handleOutdoorSitesWithinBoundsBind","handleOutdoorSitesWithinBounds","addTreksController","addTouristicContentsController","addTouristicEventsController","addOutdoorSitesController","addSelectedCurrentTrekController","showTrekLineController","viewportState","hasScrolled","fitBoundsQueued","componentDidUpdate","invalidateSize","bounds","onCenterOnMap","stepsIsInViewport","steps","currentStepsLayer","layersControl","handleLayerVisibility","descriptionIsInViewport","description","currentReferencePointsLayer","parkingIsInViewport","parking","currentParkingLayer","onInformationPlacesIsInViewport","informationPlaces","currentInformationDesksLayer","sensitiveAreaIsInViewport","sensitiveArea","currentSensitiveAreasLayer","poiIsInViewport","pois","currentPoisLayer","currentPois","touristicContentsIsInViewport","currentToutisticContentsLayer","trekTouristicContents","touristicEventsIsInViewport","currentTouristicEventsLayer","trekTouristicEvents","sitesIsInViewport","currentRelatedOutdoorSitesLayer","coursesIsInViewport","currentRelatedOutdoorCoursesLayer","onDetailScrolled","applyCachedViewportState","onCardTrekMouseOver","parentTrek","selectedTrekId","hideTrekLine","showTrekLine","addSelectedCurrentTrek","stepPopupIsOpen","selectedStepId","addSelectedCurrentStep","onCardTrekMouseLeave","trekPopupIsOpen","removeSelectedCurrentTrek","selectedCurrentStepLayer","removeSelectedCurrentStep","onTouristicContentMouseOver","touristicContentPopupIsOpen","selectedTouristicContentId","addSelectedTouristicContent","onTouristicContentMouseLeave","removeSelectedTouristicContent","onTouristicEventMouseOver","touristicEventPopupIsOpen","selectedTouristicEventId","addSelectedTouristicEvent","onTouristicEventMouseLeave","removeSelectedTouristicEvent","onTrekDownloadedSuccessConfirm","setMaxZoom","onTrekDeleteSuccessConfirm","onOutdoorSiteMouseOver","outdoorSitePopupIsOpen","selectedOutdoorSiteId","addSelectedOutdoorSite","onOutdoorSiteMouseLeave","removeSelectedOutdoorSite","componentWillLoad","languages","componentDidLoad","mapRef","zoomControl","isCustom","values","refreshSingleLayer","nameLayers","nameLayer","urlLayers","urlLayer","url","attributionLayers","attributionLayer","tileLayerOffline","attribution","crossOrigin","layers","tileLayers","assign","zoomInTitle","zoomIn","zoomOutTitle","zoomOut","metric","Contract","contractContainer","contract","backgroundImage","opts","currentTrek","addTrek","addTreks","currentTouristicContent","addTouristicContent","currentTouristicEvent","addTouristicEvent","currentOutdoorSite","addOutdoorSite","currentOutdoorCourse","addOutdoorCourse","addTouristicContents","addTouristicEvents","addOutdoorSites","onChange","removeTreks","removeTouristicContents","removeTouristicEvents","removeOutdoorSites","removeTrek","removeTouristicContent","removeTouristicEvent","setCurrentPois","setCurrentTouristicContents","setCurrentTouristicEvents","updateCustomLayersVisibility","removeOutdoorCourse","removeOutdoorSite","addCustomLayers","refreshIntervalId","setInterval","refreshCustomLayers","disconnectedCallback","clearInterval","customWmsUrl","wmsUrls","wmsLayers","customWmsLayers","wmsNames","customWmsName","wmsAttributions","customWmsAttribution","layerName","displayName","wmsLayer","wms","transparent","version","error","customTileUrl","tileUrls","tileNames","customTileName","tileAttributions","customTileAttribution","_originalUrl","customGeojsonUrl","geojsonUrls","geojsonNames","customGeojsonName","geojsonColors","customGeojsonColor","geojsonWeights","customGeojsonWeight","fallbackColor","fallbackWeight","response","status","geojsonData","json","geojsonLayer","geoJSON","iconProp","nameProp","descProp","isUrl","startsWith","customIcon","iconUrl","bgColor","backgroundColor","borderColor","borderWeight","borderRadius","customDivIcon","circleMarker","popupContent","image","imgUrl","closeButton","_customUrl","TileLayer","WMS","setParams","_t","originalUrl","separator","setUrl","GeoJSON","cache","newData","shouldShow","baseLayers","tl","addOverlay","handleLayersControlEvent","visible","loading","layerDataIsLoading","forceUpdate","hostElement","_leaflet_id","resetBounds","_a","abort","AbortController","signal","treksCurrentDepartureCoordinates","treksFeatureCollection","departure_geom","_b","practices","pictogram","imgSrc","attachments","attachment","thumbnail","treksLayer","currentMapBounds","coordinate","treksIcons","getIcons","aborted","geoJsonPoint","autoPanOnFocus","dataInStore","getIcon","trekDeparturePopup","trekImg","trekName","trekButton","trekCardPress","autoPan","treksMarkerClusterGroup","toBBoxString","trekInStore","getDataInStore","currentTrekFeature","currentTrekLayer","_feature","parking_location","parkingImageSrc","getAssetPath","Build","isDev","currentParking","advised_parking","_geoJsonPoint","parkingTooltip","parkingName","currentSensitiveAreas","currentSensitiveAreasFeatureCollection","sensitiveAreaTooltip","sensitiveAreaName","addCurrentInformationDesks","addCurrentPois","addCurrentSignages","addCurrentTouristicContents","addCurrentTouristicEvents","points_reference","currentReferencePointsFeatureCollection","parentTrekId","stepsFeatureCollection","currentTrekSteps","stepIndex","elevationTranslation","elevations","el","undefined","minMaxElevation","elevationOptions","mapElement","getBoundingClientRect","elevationControl","stringify","display","departureArrival","departureArrivalLayer","handleLayersControl","featuresCollection","icons","Capacitor","isNativePlatform","checkFileInStore","URL","createObjectURL","getFileInStore","Filesystem","getUri","directory","Directory","Data","convertFileSrc","uri","customCoordinates","selectedCurrentTrekLayer","Boolean","findIndex","_layerControlInputs","userLayerState","layerId","overlay","onchange","checked","handleLayersOnRemove","trekLine","getTrekGeometry","touristicContentsFeatureCollection","touristicContentCategories","touristicContentCategory","currentToutisticContentLayer","toutisticContentIcons","touristicContentsCurrentCoordinates","toutisticContentsLayer","touristicContentCoordinatesPopup","touristicContentImg","touristicContentName","touristicContentButton","touristicContentCardPress","touristicContentsMarkerClusterGroup","touristicEventsFeatureCollection","touristicEventType","touristicEventTypes","currentToutisticEventLayer","toutisticEventsIcons","touristicContentFeatureCollection","selectedTouristicContentLayer","touristicContentDeparturePopup","touristicEventsCurrentCoordinates","touristicEventsLayer","touristicEventsIcons","touristicEventCoordinatesPopup","touristicEventImg","touristicEventName","touristicEventButton","touristicEventCardPress","touristicEventsMarkerClusterGroup","outdoorSitesCurrentCoordinates","outdoorSitesFeatureCollection","outdoorPractices","outdoorSitesLayer","outdoorSitesBbox","outdoorSitesIcons","outdoorSiteCoordinatesPopup","outdoorSiteImg","outdoorSiteName","outdoorSiteButton","outdoorSiteCardPress","outdoorSitesMarkerClusterGroup","OutdoorSiteFeatureCollection","outdoorSitePractice","outdoorPractice","currentOutdoorSiteLayer","addCurrentRelatedOutdoorSites","addCurrentRelatedOutdoorCourses","currentRelatedOutdoorSiteFeatureCollection","currentRelatedOutdoorSites","currentRelatedOutdoorSite","currentRelatedOutdoorCourseFeatureCollection","currentRelatedOutdoorCourses","currentRelatedOutdoorCourse","outdoorCourseTypes","outdoorCoursesIcons","touristicEventFeatureCollection","selectedTouristicEventLayer","touristicEventDeparturePopup","OutdoorCourseFeatureCollection","outdoorCourseType","currentOutdoorCourseLayer","_customCoordinates","outdoorSiteFeatureCollection","selectedOutdoorSiteLayer","outdoorSiteDeparturePopup","addSelectedOutdoorCourse","outdoorCourseFeatureCollection","outdoorCourse","removeSelectedOutdoorCourse","selectedOutdoorCourseId","selectedOutdoorCourseLayer","outdoorCourseDeparturePopup","outdoorCourseImg","outdoorCourseName","outdoorCourseButton","outdoorCourseCardPress","outdoorCoursePopupIsOpen","poisData","currentPoisFeatureCollection","type_pictogram","poiTooltip","poiName","currentPoi","poiTypes","poiType","currentSignages","signageImageSrc","currentSignagesFeatureCollection","currentSignage","currentSignagesLayer","signageTooltip","signageName","touristicContentsData","currentTouristicContentsFeatureCollection","category_pictogram","touristicContentTooltip","touristicEventsData","currentTouristicEventsFeatureCollection","touristicEventTooltip","currentData","currentInformationDesks","currentInformationDesksFeatureCollection","currentInformationDesk","information_desks","Number","informationDesksIcons","informationDesksTooltip","informationDesksName","overlays","referencePoints","signages","sites","courses","layerMap","removeControl","onWindowResize","handleView","handleElevation","layersImageSrc","contractImageSrc","ref","showTitle","showElevation","hideTitle","hideElevation","grwOfflineConfirmModalCss","GrwOfflineConfirmModal","showOfflineModal","showConfirmModal","showLoaderModal","showSuccessModal","showErrorModal","showConfirmDeleteModal","showDeletingMessage","showDeleteSuccessMessage","onDownloadConfirm","overflow","onDownloadedSuccessConfirm","downloadedErrorConfirm","onDeleteConfirm","onDeleteSuccessConfirm","deleteErrorConfirm","handleOkDeleteModal","deletePress","handleOkDownloadModal","downloadPress","handleCancelModal","Fragment","offline","downloadRouteQuestion","downloadOutdoorQuestion","cancel","deleteRouteQuestion","deleting","downloading","offlineRouteDeleted","offlineOutdoorDeleted","routeAvailableOffline","outdoorAvailableOffline","deleteRouteError","deleteOutdoorError","downloadRouteError","downloadOutdoorError","Scrollbar","swiper","extendParams","getDocument","isTouched","timeout","dragTimeout","dragStartPos","dragSize","trackSize","divider","scrollbar","draggable","snapOnRelease","lockClass","dragClass","scrollbarDisabledClass","horizontalClass","verticalClass","dragEl","setTranslate","params","rtlTranslate","rtl","progress","loop","progressLoop","newSize","newPos","isHorizontal","transitionDuration","setTransition","updateSize","virtualSize","slidesOffsetBefore","centeredSlides","snapGrid","watchOverflow","classList","isLocked","getPointerPosition","clientX","clientY","setDragPosition","positionRatio","elementOffset","minTranslate","maxTranslate","updateProgress","updateActiveIndex","updateSlidesClasses","onDragStart","wrapperEl","cssMode","onDragMove","returnValue","onDragEnd","nextTick","slideToClosest","method","activeListener","passiveListeners","passive","capture","passiveListener","eventMethod","enableDraggable","disableDraggable","swiperEl","createElementIfNotDefined","originalParams","isElement","shadowRoot","querySelectorAll","uniqueNavElements","add","destroy","disable","_s","enable","grwOutdoorCourseDetailCss","observerOptions","threshold","GrwOutdoorCourseDetail","colorSecondaryContainer","colorOnSecondaryContainer","colorSurfaceContainerLow","weather","displayFullscreen","handleSwipers","swiperImagesRef","swiperImages","Swiper","modules","Navigation","Pagination","Keyboard","FreeMode","Mousewheel","navigation","prevEl","prevElImagesRef","nextEl","nextElImagesRef","pagination","paginationElImagesRef","allowTouchMove","keyboard","onfullscreenchange","swiperTouristicContentsRef","swiperTouristicContents","slidesPerView","spaceBetween","grabCursor","freeMode","mousewheel","forceToAxis","touristicContentsSwiperScrollbar","breakpointsBase","breakpoints","swiperTouristicEventsRef","swiperTouristicEvents","touristicEventsSwiperScrollbar","swiperPoisRef","swiperPois","poisSwiperScrollbar","handleObservers","poiRef","poiObserver","IntersectionObserver","entries","isIntersecting","observe","touristicContentsRef","touristicContentObserver","touristicEventsRef","touristicEventObserver","connectedCallback","handleFullscreen","close","requestFullscreen","exitFullscreen","defaultImageSrc","city","cities","outdoorRatings","outdoorRating","ratings","currentOutdoorCoursesRatingsScales","Set","outdoorRatingsScales","outdoorRatingsScale","outdoorCourseDetailContainerRef","presentationRef","author","CloseIcon","onerror","TimelapseIcon","formatDuration","OpenInFullIcon","formatLength","max_elevation","MovingIcon","formatAscent","rating","downloads","pdf","portalsFromProviders","rel","DownloadIcon","descriptionRef","departure","currentCity","advice","recommendationRef","recommendations","WarningIcon","isInsideHorizontalList","poi","frameborder","GrwOutdoorCourseProvider","controller","getCacheMode","api","handleOutdoorCourse","outdoorCourseInStore","outdoorCourseId","handleOfflineOutdoorCourse","handleOnlineOutdoorCourse","handleOfflineProperty","poisInStore","poiInStore","outdoorCoursePoi","touristicContentsInStore","touristicContentInStore","outdoorCourseTouristicContent","touristicEventsInStore","touristicEventInStore","outdoorCourseTouristicEvent","setFilesFromStore","imagesRegExp","requests","getDistricts","Response","getThemes","portals","getOutdoorCourseTypes","getTouristicContentsNearOutdoorCourse","getTouristicContentCategory","getTouristicEventsNearOutdoorCourse","getTouristicEventType","getPoisNearCourse","getOutdoorCourse","all","responses","networkError","results","citiesToLoad","cityIds","getCities","DOMException","ABORT_ERR","getOutdoorSites","inBbox","structures","outdoorSitesRequest","getAllPaginatedResults","getOutdoorSite","outdoorSiteId","getOutdoorSiteTypes","outdoorSitesTypeRequest","getOutdoorPractices","outdoorPracticesRequest","getPoisNearSite","siteId","outdoorSiteIsAvailableOffline","getOutdoorRatings","getOutdoorRatingsScale","grwOutdoorSiteDetailCss","GrwOutdoorSiteDetail","enableOffline","globalTilesMinZoomOffline","globalTilesMaxZoomOffline","tilesMinZoomOffline","rounded","showTouristicContentDetailsModal","showTouristicEventDetailsModal","modalDetailsId","onCloseDetailsModal","onTouristiceEventCardPress","touristicEventId","onOpenDetailsModal","modal","modalContent","onTouristicContentCardPress","touristicContentId","modalDetails","onDownloadPress","downloadRootOutdoorSite","onDeletePress","deleteOutdoorSite","informationPlacesRef","informationPlacesObserver","informationPlacesIsInViewport","sitesRef","siteObserver","coursesRef","courseObserver","swiperRelatedOutdoorSitesRef","swiperRelatedOutdoorSites","relatedOutdoorSitesSwiperScrollbar","swiperInformationDesksRef","swiperInformationDesks","informationDesksContentsSwiperScrollbar","swiperRelatedOutdoorCoursesRef","swiperRelatedOutdoorCourses","relatedOutdoorCoursesSwiperScrollbar","sources","source","displayDownloadModal","downloadConfirm","displayDeleteModal","deleteConfirm","outdoorSitesList","inBboxFromProviders","citiesFromProviders","districtsFromProviders","structuresFromProviders","themesFromProviders","offlineOutdoorSites","getAllDataInStore","writeOrUpdateDataInStore","downloadGlobalTiles","defaultBackgroundLayerUrl","defaultBackgroundLayerAttribution","downloadOutdoorSiteTiles","writeOrUpdateFilesInStore","outdoorSiteTypes","trekTouristicContent","trekTouristicEvent","downloadOutdoorCourse","children","downloadOutdoorSite","slideTo","downloadedSuccessConfirm","getTouristicContentsNearOutdoorSite","getTouristicEventsNearOutdoorSite","outdoorSitesInStore","outdoorSiteInStore","deleteOfflineOutdoorSiteProperties","deleteSuccessConfirm","offlineLayer","writeOrUpdateTilesInStore","outdoorSiteBbox","currentOutdoorSitesRatingsScales","outdoorSiteDetailContainerRef","ExploreIcon","cardinalPoints","wind","AirIcon","period","EventIcon","parents","DownloadForOfflineIcon","downloadOffline","DeleteIcon","deleteOffline","description_teaser","ambiance","relatedOutdoorSites","relatedOutdoorSite","relatedOutdoorCourses","relatedOutdoorCourse","informationDesk","web_links","learnMore","weblink","website","GrwOutdoorSiteProvider","handleOutdoorSite","handleOfflineOutdoorSite","handleOnlineOutdoorSite","informationDesksInStore","informationDesks","informationDeskInStore","information_desk","outdoorSitePoi","outdoorSiteTouristicContent","outdoorSiteTouristicEvent","relatedOutdoorSiteInStore","outdoorCoursesInStore","getSources","getInformationsDesks","ratingsScale","outdoorSitesRequests","outdoorCourses","outdoorCoursesRequests","grwOutdoorSitesListCss","GrwOutdoorSitesList","outdoorSitesToDisplay","step","shouldAddInfiniteScrollEvent","handleInfiniteScrollBind","handleInfiniteScroll","handleInfiniteScrollEvent","scroll","composedPath","scrollTop","scrollHeight","removeEventListener","GrwOutdoorSitesProvider","handleOutdoorSites","handleOfflineOutdoorSites","handleOnlineOutdoorSites","outdoorSitesWithOfflineValue","citiesResponse","citiesData","grwSearchCss","GrwSearch","onSearchChange","searchValue","SearchIcon","onInput","placeholder","grwSegmentedSegmentCss","GrwSegmentedSegment","outdoor","changeMode","grwSelectLanguageCss","GrwSelectLanguage","handleSelect","TranslateIcon","toLocaleLowerCase","toLocaleUpperCase","grwSwitchCss","GrwSwitch","DoneIcon","grwTouristicContentsListCss","GrwTouristicContentsList","touristicContentsToDisplay","GrwTouristicContentsProvider","handleTouristicContents","touristicContentsRequest","getTouristicContentsList","grwTouristicEventsListCss","touristicEventsToDisplay","GrwTouristicEventsProvider","handleTouristicEvents","touristicEventsRequest","getTouristicEventsList","grwTrekDetailCss","presentation","indicator","GrwTrekDetail","indicatorSelectedTrekOption","translateX","backgroundSize","swiperStepRef","swiperStep","initialSlide","getCurrentStepIndex","stepSwiperScrollbar","presentationObserver","defaultOptions","handleIndicatorSelectedTrekOption","stepsRef","stepsObserver","descriptionObserver","recommendationsObserver","parkingRef","parkingObserver","sensitiveAreaRef","sensitiveAreaObserver","accessibilityRef","accessibilityObserver","setupScrollListener","container","trekDetailContainerRef","onScroll","detailScrolled","handleOptions","difficulties","route","accessibilities","accessibilitiesLevel","accessibilityLevel","accessibility_level","hasStep","disconnect","disabled_infrastructure","accessibility_slope","accessibility_width","accessibility_signage","accessibility_covering","accessibility_exposure","accessibility_advice","emergencyNumber","currentOption","currentOptionIndex","previousVisibleOptions","previousWidthOptions","elementWidth","handleScrollTo","scrollbarFromElement","clientHeight","scrollTo","offsetTop","treksDepartureCoordinates","downloadTrekTiles","downloadTrek","offlineTreks","treksList","getTreksList","routesFromProviders","practicesFromProviders","labelsFromProviders","offlineTrek","districtsList","networks","getPoisNearTrek","getTouristicContentsNearTrek","getTouristicEventsNearTrek","stepRequests","stepsTouristicContentsRequests","stepsTouristicEventsRequests","stepsPoisRequests","stepsSensitiveAreasRequests","stepId","getTrek","getSensitiveAreasNearTrek","trekSteps","stepsTouristicContentsResponses","stepsTouristicEventsResponses","stepsPoisResponses","stepsSensitiveAreasResponses","sensitiveAreas","currentSensitiveArea","signage","deleteTrek","treksInStore","deleteOfflineTrekProperties","currentTrekStep","gpx","kml","arrival","access","public_transport","gear","ratings_description","update_datetime","getDepartureCityCode","departureCity","departure_city","displayPaginationAndNavigation","presentationOptionRef","stepsOptionRef","descriptionOptionRef","poisOptionRef","recommendationsOptionRef","sensitiveAreaOptionRef","environmentalSensitiveAreas","informationPlacesOptionRef","accessibilityOptionRef","touristicContentsOptionRef","touristicEventsOptionRef","visibility","_c","length_2d","formatDescent","_d","_e","_f","networkId","currentNetwork","network","trekRating","rs","parentTrekPress","roadAccessAndParking","recommendedParking","transport","BackpackIcon","sensitiveAreasDescription","CallIcon","accessibilitySlope","accessibilityWidth","accessibilitySignage","accessibilityCovering","accessibilityExposure","accessibilityAdvices","GrwTrekProvider","handleTrek","trekId","handleOfflineTrek","handleOnlineTrek","trekPoi","sensitiveAreasInStore","sensitiveAreaInStore","trekSensitiveArea","signagesInStore","signageInStore","trekSignage","getTrekRatings","getTrekRatingsScale","getSignages","getPoisNearTrekCount","getTrekNetwork","getTouristicContentsNearTrekCount","getTouristicEventsNearTrekCount","count","trekPois","touristicContentsCategory","grwTreksListCss","GrwTreksList","treksToDisplay","displayOnlyOfflineTreks","GrwTreksProvider","handleTreks","handleOfflineTreks","handleOnlineTreks","durations","lengths","sortTreks","localeCompare","numeric","sensitivity","exclude","getTrekAccessibility","getLabel","treksWithOfflineValue","treksWithDeparture","trekIsAvailableOffline"],"sources":["src/components/grw-common-button/grw-common-button.scss?tag=grw-common-button&encapsulation=shadow","src/components/grw-common-button/grw-common-button.tsx","src/components/grw-filters/grw-filters.scss?tag=grw-filters&encapsulation=shadow","src/components/grw-filters/grw-filters.tsx","src/components/grw-loader/grw-loader.scss?tag=grw-loader&encapsulation=shadow","src/components/grw-loader/grw-loader.tsx","node_modules/leaflet-i18n/Leaflet.i18n.js","node_modules/@raruto/leaflet-elevation/dist/leaflet-elevation.min.js","node_modules/leaflet.markercluster/dist/leaflet.markercluster.js","src/utils/leaflet-simple-locate.min.js","node_modules/@turf/helpers/dist/es/index.js","node_modules/@turf/meta/dist/es/index.js","node_modules/@turf/explode/dist/es/index.js","node_modules/@turf/bbox/dist/es/index.js","node_modules/@turf/center/dist/es/index.js","node_modules/@turf/clone/dist/es/index.js","node_modules/@turf/invariant/dist/es/index.js","node_modules/@turf/distance/dist/es/index.js","node_modules/@turf/nearest-point/dist/es/index.js","node_modules/@turf/boolean-point-in-polygon/dist/es/index.js","node_modules/@turf/point-on-feature/dist/es/index.js","node_modules/leaflet-textpath/leaflet.textpath.js","src/components/grw-map/grw-map.scss?tag=grw-map&encapsulation=shadow","src/components/grw-map/grw-map.tsx","src/components/grw-offline-confirm-modal/grw-offline-confirm-modal.scss?tag=grw-offline-confirm-modal&encapsulation=shadow","src/components/grw-offline-confirm-modal/grw-offline-confirm-modal.tsx","node_modules/swiper/modules/scrollbar/scrollbar.js","src/components/grw-outdoor-course-detail/grw-outdoor-course-detail.scss?tag=grw-outdoor-course-detail&encapsulation=shadow","src/components/grw-outdoor-course-detail/grw-outdoor-course-detail.tsx","src/store/grw-outdoor-course-provider.tsx","src/services/outdoor-sites.service.ts","src/components/grw-outdoor-site-detail/grw-outdoor-site-detail.scss?tag=grw-outdoor-site-detail&encapsulation=shadow","src/components/grw-outdoor-site-detail/grw-outdoor-site-detail.tsx","src/store/grw-outdoor-site-provider.tsx","src/components/grw-outdoor-sites-list/grw-outdoor-sites-list.scss?tag=grw-outdoor-sites-list&encapsulation=shadow","src/components/grw-outdoor-sites-list/grw-outdoor-sites-list.tsx","src/store/grw-outdoor-sites-provider.tsx","src/components/grw-search/grw-search.scss?tag=grw-search&encapsulation=shadow","src/components/grw-search/grw-search.tsx","src/components/grw-segmented-segment/grw-segmented-segment.scss?tag=grw-segmented-segment&encapsulation=shadow","src/components/grw-segmented-segment/grw-segmented-segment.tsx","src/components/grw-select-language/grw-select-language.scss?tag=grw-select-language&encapsulation=shadow","src/components/grw-select-language/grw-select-language.tsx","src/components/grw-switch/grw-switch.scss?tag=grw-switch&encapsulation=shadow","src/components/grw-switch/grw-switch.tsx","src/components/grw-touristic-contents-list/grw-touristic-contents-list.scss?tag=grw-touristic-contents-list&encapsulation=shadow","src/components/grw-touristic-contents-list/grw-touristic-contents-list.tsx","src/store/grw-touristic-contents-provider.tsx","src/components/grw-touristic-events-list/grw-touristic-events-list.scss?tag=grw-touristic-events-list&encapsulation=shadow","src/components/grw-touristic-events-list/grw-touristic-events-list.tsx","src/store/grw-touristic-events-provider.tsx","src/components/grw-trek-detail/grw-trek-detail.scss?tag=grw-trek-detail&encapsulation=shadow","src/components/grw-trek-detail/grw-trek-detail.tsx","src/store/grw-trek-provider.tsx","src/components/grw-treks-list/grw-treks-list.scss?tag=grw-treks-list&encapsulation=shadow","src/components/grw-treks-list/grw-treks-list.tsx","src/store/grw-treks-provider.tsx"],"sourcesContent":[".common-button {\n user-select: none;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n border: none;\n color: var(--color-on-primary-container);\n background-color: var(--color-primary-container);\n padding: 12px 24px;\n border-radius: var(--border-radius, 20px);\n box-sizing: border-box;\n position: relative;\n gap: 8px;\n white-space: nowrap;\n line-height: 20px;\n letter-spacing: 0.1px;\n font-family: var(--font-family);\n font-size: 14px;\n font-weight: 500;\n box-shadow: var(--elevation-1);\n transition: box-shadow 0.2s ease-in-out 0s;\n height: 44px;\n .common-button-icon {\n font-size: 18px;\n }\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\nimport RefreshIcon from '../../assets/refresh.svg';\nimport FilterListIcon from '../../assets/filter_list.svg';\n\n@Component({\n tag: 'grw-common-button',\n styleUrl: 'grw-common-button.scss',\n shadow: true,\n})\nexport class GrwCommonButton {\n @Prop() action: Function;\n @Prop() icon: string;\n @Prop() name: string;\n\n @Prop() fontFamily = 'Roboto';\n\n render() {\n return (\n <Host\n style={{\n '--font-family': this.fontFamily,\n }}\n >\n <button part=\"common-button\" class=\"common-button\" onClick={() => this.action()}>\n <span part=\"common-button-icon\" class=\"icon\" innerHTML={this.icon === 'refresh' ? RefreshIcon : FilterListIcon}></span>\n <span part=\"common-button-label\" class=\"label\">\n {this.name}\n </span>\n </button>\n </Host>\n );\n }\n}\n",".options-container {\n height: 100%;\n position: absolute;\n width: 100%;\n z-index: 1100;\n top: 0px;\n}\n\n.filters-container {\n background-color: var(--color-background);\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1100;\n .filters-treks-container,\n .filters-touristic-contents-container,\n .filters-touristic-events-container,\n .filters-outdoor-sites-container {\n height: 100%;\n }\n .segmented-buttons-container {\n display: flex;\n justify-content: center;\n width: calc(100% - 32px);\n height: 40px;\n margin: 16px;\n border: 1px solid var(--color-outline);\n border-radius: var(--border-radius, 20px);\n line-height: 20px;\n .segment {\n cursor: pointer;\n user-select: none;\n font-size: 14px;\n font-weight: 500;\n -webkit-tap-highlight-color: transparent;\n color: var(--color-on-surface-variant);\n background-color: transparent;\n border-radius: 0px;\n min-width: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n font-family: var(--font-family);\n &:first-child {\n border-top-left-radius: var(--border-radius, 20px);\n border-bottom-left-radius: var(--border-radius, 20px);\n }\n &:not(:last-child) {\n border-right: 1px solid var(--color-outline);\n }\n &:last-child {\n border-top-right-radius: var(--border-radius, 20px);\n border-bottom-right-radius: var(--border-radius, 20px);\n }\n }\n .selected-segment {\n color: var(--color-on-primary-container);\n background-color: var(--color-primary-container);\n }\n }\n}\n\n.filters-segment-container {\n overflow-y: visible;\n height: 100%;\n max-height: calc(100% - 64px - 42px - 32px);\n}\n\n.back-filters-container {\n background-color: rgba(0, 0, 0, 0.5);\n width: 100%;\n height: 100%;\n position: absolute;\n z-index: 1099;\n}\n\n.divider {\n margin: 16px;\n border-top: 1px solid var(--color-outline);\n}\n\n.filters-options-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 64px;\n margin: 0px 16px;\n .filters-options-buttons-container {\n display: flex;\n .filter-option-button {\n cursor: pointer;\n user-select: none;\n font-size: 14px;\n font-weight: 500;\n padding: 8px 16px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: var(--elevation-0);\n border: none;\n -webkit-tap-highlight-color: transparent;\n line-height: 20px;\n color: var(--color-primary-app);\n background-color: transparent;\n font-family: var(--font-family);\n }\n }\n}\n\n.segment-container {\n overflow: scroll;\n height: 100%;\n}\n\n.filter-container {\n &:not(:last-child) {\n &::after {\n content: '';\n display: block;\n margin: 16px;\n border-top: 1px solid var(--color-outline);\n }\n }\n &:last-child {\n margin-bottom: 16px;\n }\n}\n\n.current-treks-within-bounds-length {\n color: var(--color-on-surface-variant);\n font-family: var(--font-family);\n}\n","import { Component, Event, EventEmitter, Host, Prop, State, h } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport state from 'store/store';\nimport {\n treksFilters,\n handleTreksFiltersAndSearch,\n touristicContentsFilters,\n handleTouristicContentsFiltersAndSearch,\n handleTouristicEventsFiltersAndSearch,\n touristicEventsFilters,\n outdoorSitesFilters,\n handleOutdoorSitesFiltersAndSearch,\n} from 'utils/utils';\n\n@Component({\n tag: 'grw-filters',\n styleUrl: 'grw-filters.scss',\n shadow: true,\n})\nexport class GrwFilters {\n @Event() resetFilter: EventEmitter;\n\n @State() selectedSegment = 'selectedActivitiesFilters';\n\n @Prop() handleFilters: Function;\n\n @Prop() fontFamily = 'Roboto';\n\n handleEraseTreksFilters() {\n treksFilters.forEach(filter => {\n state[filter.property].forEach(currentFilter => (currentFilter.selected = false));\n });\n state.selectedActivitiesFilters = 0;\n state.selectedThemesFilters = 0;\n state.selectedLocationFilters = 0;\n state.currentTreks = handleTreksFiltersAndSearch();\n this.resetFilter.emit();\n }\n\n handleOkTreksFilters() {\n this.handleFilters();\n }\n\n handleSelectedSegment(selectedSegment) {\n this.selectedSegment = selectedSegment;\n }\n\n handleSegment(segment) {\n if (state.mode === 'treks') {\n return treksFilters.filter(filter => filter.segment === segment).some(filter => state[filter.property] && state[filter.property].length > 0);\n } else if (state.mode === 'touristicContents') {\n return touristicContentsFilters.filter(filter => filter.segment === segment).some(filter => state[filter.property] && state[filter.property].length > 0);\n } else if (state.mode === 'touristicEvents') {\n return touristicEventsFilters.filter(filter => filter.segment === segment).some(filter => state[filter.property] && state[filter.property].length > 0);\n } else if (state.mode === 'outdoor') {\n return outdoorSitesFilters.filter(filter => filter.segment === segment).some(filter => state[filter.property] && state[filter.property].length > 0);\n }\n }\n\n handleEraseTouristicContentsFilters() {\n touristicContentsFilters.forEach(filter => {\n state[filter.property].forEach(currentFilter => (currentFilter.selected = false));\n });\n state.selectedActivitiesFilters = 0;\n state.selectedLocationFilters = 0;\n state.currentTouristicContents = handleTouristicContentsFiltersAndSearch();\n this.resetFilter.emit();\n }\n\n handleOkTouristicContentsFilters() {\n this.handleFilters();\n }\n\n handleEraseTouristicEventsFilters() {\n touristicEventsFilters.forEach(filter => {\n state[filter.property].forEach(currentFilter => (currentFilter.selected = false));\n });\n state.selectedActivitiesFilters = 0;\n state.selectedLocationFilters = 0;\n state.currentTouristicEvents = handleTouristicEventsFiltersAndSearch();\n this.resetFilter.emit();\n }\n\n handleOkTouristicEventsFilters() {\n this.handleFilters();\n }\n\n handleEraseOutdoorSitesFilters() {\n outdoorSitesFilters.forEach(filter => {\n state[filter.property].forEach(currentFilter => (currentFilter.selected = false));\n });\n state.selectedActivitiesFilters = 0;\n state.selectedLocationFilters = 0;\n state.currentOutdoorSites = handleOutdoorSitesFiltersAndSearch();\n this.resetFilter.emit();\n }\n\n handleOkOutdoorSitesFilters() {\n this.handleFilters();\n }\n\n render() {\n return (\n <Host\n style={{\n '--font-family': this.fontFamily,\n }}\n >\n <div part=\"options-container\" class=\"options-container\">\n <div part=\"filters-container\" class=\"filters-container\">\n {state.mode === 'treks' && (\n <div part=\"filters-treks-container\" class=\"filters-treks-container\">\n <div part=\"filters-options-container\" class=\"filters-options-container\">\n {state.treksWithinBounds && (\n <div part=\"current-treks-within-bounds-length\" class=\"current-treks-within-bounds-length\">{`${state.treksWithinBounds.length} ${\n state.treksWithinBounds.length > 1 ? translate[state.language].treks : translate[state.language].trek\n }`}</div>\n )}\n <div part=\"filters-options-buttons-container\" class=\"filters-options-buttons-container\">\n <button part=\"filter-option-button\" class=\"filter-option-button\" onClick={() => this.handleEraseTreksFilters()}>\n {translate[state.language].erase}\n </button>\n <button part=\"filter-option-button\" class=\"filter-option-button\" onClick={() => this.handleOkTreksFilters()}>\n {translate[state.language].ok}\n </button>\n </div>\n </div>\n <div part=\"segmented-buttons-container\" class=\"segmented-buttons-container\">\n {this.handleSegment('selectedActivitiesFilters') && (\n <label\n part=\"segment\"\n class={`segment${this.selectedSegment === 'selectedActivitiesFilters' ? ' selected-segment' : ''}`}\n onClick={() => this.handleSelectedSegment('selectedActivitiesFilters')}\n >\n {translate[state.language].home.segment.treks} {state.selectedActivitiesFilters !== 0 && `(${state.selectedActivitiesFilters})`}\n </label>\n )}\n {this.handleSegment('selectedThemesFilters') && (\n <label\n part=\"segment\"\n class={`segment${this.selectedSegment === 'selectedThemesFilters' ? ' selected-segment' : ''}`}\n onClick={() => this.handleSelectedSegment('selectedThemesFilters')}\n >\n {translate[state.language].themes} {state.selectedThemesFilters !== 0 && `(${state.selectedThemesFilters})`}\n </label>\n )}\n {this.handleSegment('selectedLocationFilters') && (\n <label\n part=\"segment\"\n class={`segment${this.selectedSegment === 'selectedLocationFilters' ? ' selected-segment' : ''}`}\n onClick={() => this.handleSelectedSegment('selectedLocationFilters')}\n >\n {translate[state.language].location} {state.selectedLocationFilters !== 0 && `(${state.selectedLocationFilters})`}\n </label>\n )}\n </div>\n <div part=\"filters-segment-container\" class=\"filters-segment-container\">\n {this.selectedSegment === 'selectedActivitiesFilters' && (\n <div part=\"segment-container\" class=\"segment-container\" key=\"treks-activities-segment-container\">\n {state['practices'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].practice}\n filterType=\"practices\"\n filterNameProperty=\"name\"\n segment=\"selectedActivitiesFilters\"\n filterPlaceholder={translate[state.language].placeholderPractices}\n ></grw-filter>\n </div>\n )}\n {state['difficulties'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].difficulty}\n filterType=\"difficulties\"\n filterNameProperty=\"label\"\n segment=\"selectedActivitiesFilters\"\n filterPlaceholder={translate[state.language].placeholderDifficulties}\n ></grw-filter>\n </div>\n )}\n {state['durations'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].duration}\n filterType=\"durations\"\n filterNameProperty=\"name\"\n segment=\"selectedActivitiesFilters\"\n filterPlaceholder={translate[state.language].placeholderDurations}\n ></grw-filter>\n </div>\n )}\n {state['lengths'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].length}\n filterType=\"lengths\"\n filterNameProperty=\"name\"\n segment=\"selectedActivitiesFilters\"\n filterPlaceholder={translate[state.language].placeholderLengths}\n ></grw-filter>\n </div>\n )}\n {state['elevations'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].elevation}\n filterType=\"elevations\"\n filterNameProperty=\"name\"\n segment=\"selectedActivitiesFilters\"\n filterPlaceholder={translate[state.language].placeholderElevations}\n ></grw-filter>\n </div>\n )}\n {state['routes'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].routes}\n filterType=\"routes\"\n filterNameProperty=\"route\"\n segment=\"selectedActivitiesFilters\"\n filterPlaceholder={translate[state.language].placeholderRoutes}\n ></grw-filter>\n </div>\n )}\n {state['accessibilities'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].accessibility}\n filterType=\"accessibilities\"\n filterNameProperty=\"name\"\n segment=\"selectedActivitiesFilters\"\n filterPlaceholder={translate[state.language].placeholderAccessibilities}\n ></grw-filter>\n </div>\n )}\n {state['labels'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].activities}\n filterType=\"labels\"\n filterNameProperty=\"name\"\n segment=\"selectedActivitiesFilters\"\n filterPlaceholder={translate[state.language].placeholderActivities}\n ></grw-filter>\n </div>\n )}\n </div>\n )}\n {this.selectedSegment === 'selectedThemesFilters' && (\n <div part=\"filter-container\" class=\"segment-container\" key=\"treks-themes-segment-container\">\n {state['themes'].length > 0 && (\n <div part=\"\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].themes}\n filterPlaceholder={translate[state.language].placeholderThemes}\n filterType=\"themes\"\n filterNameProperty=\"label\"\n segment=\"selectedThemesFilters\"\n ></grw-filter>\n </div>\n )}\n </div>\n )}\n {this.selectedSegment === 'selectedLocationFilters' && (\n <div part=\"segment-container\" class=\"segment-container\" key=\"treks-location-segment-container\">\n {state['districts'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].districts}\n filterType=\"districts\"\n filterNameProperty=\"name\"\n segment=\"selectedLocationFilters\"\n filterPlaceholder={translate[state.language].placeholderDistricts}\n ></grw-filter>\n </div>\n )}\n {state['cities'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].crossedCities}\n filterPlaceholder={translate[state.language].placeholderCrossedCities}\n filterType=\"cities\"\n filterNameProperty=\"name\"\n segment=\"selectedLocationFilters\"\n ></grw-filter>\n </div>\n )}\n </div>\n )}\n </div>\n </div>\n )}\n {state.mode === 'touristicContents' && (\n <div part=\"filters-touristic-contents-container\" class=\"filters-touristic-contents-container\">\n <div part=\"filters-options-container\" class=\"filters-options-container\">\n {state.touristicContentsWithinBounds && (\n <div part=\"current-treks-within-bounds-length\" class=\"current-treks-within-bounds-length\">{`${state.touristicContentsWithinBounds.length} ${\n state.touristicContentsWithinBounds.length > 1 ? translate[state.language].home.touristicContents : translate[state.language].home.touristicContent\n }`}</div>\n )}\n <div part=\"filters-options-buttons-container\" class=\"filters-options-buttons-container\">\n <button part=\"filter-option-button\" class=\"filter-option-button\" onClick={() => this.handleEraseTouristicContentsFilters()}>\n {translate[state.language].erase}\n </button>\n <button part=\"filter-option-button\" class=\"filter-option-button\" onClick={() => this.handleOkTouristicContentsFilters()}>\n {translate[state.language].ok}\n </button>\n </div>\n </div>\n <div part=\"segmented-buttons-container\" class=\"segmented-buttons-container\">\n {this.handleSegment('selectedActivitiesFilters') && (\n <label\n part=\"segment\"\n class={`segment${this.selectedSegment === 'selectedActivitiesFilters' ? ' selected-segment' : ''}`}\n onClick={() => this.handleSelectedSegment('selectedActivitiesFilters')}\n >\n {translate[state.language].services} {state.selectedActivitiesFilters !== 0 && `(${state.selectedActivitiesFilters})`}\n </label>\n )}\n {this.handleSegment('selectedLocationFilters') && (\n <label\n part=\"segment\"\n class={`segment${this.selectedSegment === 'selectedLocationFilters' ? ' selected-segment' : ''}`}\n onClick={() => this.handleSelectedSegment('selectedLocationFilters')}\n >\n {translate[state.language].location} {state.selectedLocationFilters !== 0 && `(${state.selectedLocationFilters})`}\n </label>\n )}\n </div>\n <div part=\"filters-segment-container\" class=\"filters-segment-container\">\n {this.selectedSegment === 'selectedActivitiesFilters' && (\n <div part=\"segment-container\" class=\"segment-container\" key=\"touristic-contents-activities-segment-container\">\n {state['touristicContentCategories'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].category}\n filterType=\"touristicContentCategories\"\n filterNameProperty=\"label\"\n segment=\"selectedActivitiesFilters\"\n filterPlaceholder={translate[state.language].placeholderCategories}\n ></grw-filter>\n </div>\n )}\n </div>\n )}\n {this.selectedSegment === 'selectedLocationFilters' && (\n <div part=\"segment-container\" class=\"segment-container\" key=\"touristic-contents-location-segment-container\">\n {state['districts'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].districts}\n filterType=\"districts\"\n filterNameProperty=\"name\"\n segment=\"selectedLocationFilters\"\n filterPlaceholder={translate[state.language].placeholderDistricts}\n ></grw-filter>\n </div>\n )}\n {state['cities'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].crossedCities}\n filterPlaceholder={translate[state.language].placeholderCrossedCities}\n filterType=\"cities\"\n filterNameProperty=\"name\"\n segment=\"selectedLocationFilters\"\n ></grw-filter>\n </div>\n )}\n </div>\n )}\n </div>\n </div>\n )}\n {state.mode === 'touristicEvents' && (\n <div part=\"filters-touristic-events-container\" class=\"filters-touristic-events-container\">\n <div part=\"filters-options-container\" class=\"filters-options-container\">\n {state.touristicEventsWithinBounds && (\n <div part=\"current-treks-within-bounds-length\" class=\"current-treks-within-bounds-length\">{`${state.touristicEventsWithinBounds.length} ${\n state.touristicEventsWithinBounds.length > 1 ? translate[state.language].home.touristicEvents : translate[state.language].home.touristicEvent\n }`}</div>\n )}\n <div part=\"filters-options-buttons-container\" class=\"filters-options-buttons-container\">\n <button part=\"filter-option-button\" class=\"filter-option-button\" onClick={() => this.handleEraseTouristicEventsFilters()}>\n {translate[state.language].erase}\n </button>\n <button part=\"filter-option-button\" class=\"filter-option-button\" onClick={() => this.handleOkTouristicEventsFilters()}>\n {translate[state.language].ok}\n </button>\n </div>\n </div>\n <div part=\"segmented-buttons-container\" class=\"segmented-buttons-container\">\n {this.handleSegment('selectedActivitiesFilters') && (\n <label\n part=\"segment\"\n class={`segment${this.selectedSegment === 'selectedActivitiesFilters' ? ' selected-segment' : ''}`}\n onClick={() => this.handleSelectedSegment('selectedActivitiesFilters')}\n >\n {translate[state.language].services} {state.selectedActivitiesFilters !== 0 && `(${state.selectedActivitiesFilters})`}\n </label>\n )}\n {this.handleSegment('selectedLocationFilters') && (\n <label\n part=\"segment\"\n class={`segment${this.selectedSegment === 'selectedLocationFilters' ? ' selected-segment' : ''}`}\n onClick={() => this.handleSelectedSegment('selectedLocationFilters')}\n >\n {translate[state.language].location} {state.selectedLocationFilters !== 0 && `(${state.selectedLocationFilters})`}\n </label>\n )}\n </div>\n <div part=\"filters-segment-container\" class=\"filters-segment-container\">\n {this.selectedSegment === 'selectedActivitiesFilters' && (\n <div part=\"segment-container\" class=\"segment-container\" key=\"touristic-contents-activities-segment-container\">\n {state['touristicEventTypes'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].type}\n filterPlaceholder={translate[state.language].placeholderType}\n filterType=\"touristicEventTypes\"\n filterNameProperty=\"type\"\n segment=\"selectedActivitiesFilters\"\n ></grw-filter>\n </div>\n )}\n </div>\n )}\n {this.selectedSegment === 'selectedLocationFilters' && (\n <div part=\"segment-container\" class=\"segment-container\" key=\"touristic-events-location-segment-container\">\n {state['districts'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].districts}\n filterType=\"districts\"\n filterNameProperty=\"name\"\n segment=\"selectedLocationFilters\"\n filterPlaceholder={translate[state.language].placeholderDistricts}\n ></grw-filter>\n </div>\n )}\n {state['cities'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].crossedCities}\n filterPlaceholder={translate[state.language].placeholderCrossedCities}\n filterType=\"cities\"\n filterNameProperty=\"name\"\n segment=\"selectedLocationFilters\"\n ></grw-filter>\n </div>\n )}\n </div>\n )}\n </div>\n </div>\n )}\n {state.mode === 'outdoor' && (\n <div part=\"filters-outdoor-sites-container\" class=\"filters-outdoor-sites-container\">\n <div part=\"filters-options-container\" class=\"filters-options-container\">\n {state.outdoorSitesWithinBounds && (\n <div part=\"current-treks-within-bounds-length\" class=\"current-outdoor-sites-within-bounds-length\">{`${state.outdoorSitesWithinBounds.length} ${\n state.outdoorSitesWithinBounds.length > 1 ? translate[state.language].home.outdoorSites : translate[state.language].home.outdoorSite\n }`}</div>\n )}\n <div part=\"filters-options-buttons-container\" class=\"filters-options-buttons-container\">\n <button part=\"filter-option-button\" class=\"filter-option-button\" onClick={() => this.handleEraseOutdoorSitesFilters()}>\n {translate[state.language].erase}\n </button>\n <button part=\"filter-option-button\" class=\"filter-option-button\" onClick={() => this.handleOkOutdoorSitesFilters()}>\n {translate[state.language].ok}\n </button>\n </div>\n </div>\n <div part=\"segmented-buttons-container\" class=\"segmented-buttons-container\">\n {this.handleSegment('selectedActivitiesFilters') && (\n <label\n part=\"segment\"\n class={`segment${this.selectedSegment === 'selectedActivitiesFilters' ? ' selected-segment' : ''}`}\n onClick={() => this.handleSelectedSegment('selectedActivitiesFilters')}\n >\n {translate[state.language].home.segment.outdoorSites} {state.selectedActivitiesFilters !== 0 && `(${state.selectedActivitiesFilters})`}\n </label>\n )}\n {this.handleSegment('selectedThemesFilters') && (\n <label\n part=\"segment\"\n class={`segment${this.selectedSegment === 'selectedThemesFilters' ? ' selected-segment' : ''}`}\n onClick={() => this.handleSelectedSegment('selectedThemesFilters')}\n >\n {translate[state.language].themes} {state.selectedThemesFilters !== 0 && `(${state.selectedThemesFilters})`}\n </label>\n )}\n {this.handleSegment('selectedLocationFilters') && (\n <label\n part=\"segment\"\n class={`segment${this.selectedSegment === 'selectedLocationFilters' ? ' selected-segment' : ''}`}\n onClick={() => this.handleSelectedSegment('selectedLocationFilters')}\n >\n {translate[state.language].location} {state.selectedLocationFilters !== 0 && `(${state.selectedLocationFilters})`}\n </label>\n )}\n </div>\n <div part=\"filters-segment-container\" class=\"filters-segment-container\">\n {this.selectedSegment === 'selectedActivitiesFilters' && (\n <div part=\"segment-container\" class=\"segment-container\" key=\"touristic-contents-activities-segment-container\">\n {state['outdoorPractices'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].practice}\n filterPlaceholder={translate[state.language].placeholderPractices}\n filterType=\"outdoorPractices\"\n filterNameProperty=\"name\"\n segment=\"selectedActivitiesFilters\"\n ></grw-filter>\n </div>\n )}\n {state['outdoorSiteTypes'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].activities}\n filterType=\"outdoorSiteTypes\"\n filterNameProperty=\"name\"\n segment=\"selectedActivitiesFilters\"\n filterPlaceholder={translate[state.language].placeholderActivities}\n ></grw-filter>\n </div>\n )}\n </div>\n )}\n {this.selectedSegment === 'selectedThemesFilters' && (\n <div part=\"filter-container\" class=\"segment-container\" key=\"treks-themes-segment-container\">\n {state['themes'].length > 0 && (\n <div part=\"\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].themes}\n filterPlaceholder={translate[state.language].placeholderThemes}\n filterType=\"themes\"\n filterNameProperty=\"label\"\n segment=\"selectedThemesFilters\"\n ></grw-filter>\n </div>\n )}\n </div>\n )}\n {this.selectedSegment === 'selectedLocationFilters' && (\n <div part=\"segment-container\" class=\"segment-container\" key=\"outdoor-sites-location-segment-container\">\n {state['districts'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].districts}\n filterType=\"districts\"\n filterNameProperty=\"name\"\n segment=\"selectedLocationFilters\"\n filterPlaceholder={translate[state.language].placeholderDistricts}\n ></grw-filter>\n </div>\n )}\n {state['cities'].length > 0 && (\n <div part=\"filter-container\" class=\"filter-container\">\n <grw-filter\n exportparts=\"filter-name,filter-button-container,filter-select,filter-button,elected-filter-icon,filter-label\"\n fontFamily={this.fontFamily}\n filterName={translate[state.language].crossedCities}\n filterPlaceholder={translate[state.language].placeholderCrossedCities}\n filterType=\"cities\"\n filterNameProperty=\"name\"\n segment=\"selectedLocationFilters\"\n ></grw-filter>\n </div>\n )}\n </div>\n )}\n </div>\n </div>\n )}\n </div>\n <div part=\"back-filters-container\" class=\"back-filters-container\" onClick={() => this.handleFilters()}></div>\n </div>\n </Host>\n );\n }\n}\n",".loader {\n width: 48px;\n height: 48px;\n border: 5px solid var(--color-primary-container);\n border-bottom-color: var(--color-on-primary-container);\n border-radius: 50%;\n display: inline-block;\n box-sizing: border-box;\n animation: rotation 1s linear infinite;\n}\n\n@keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'grw-loader',\n styleUrl: 'grw-loader.scss',\n shadow: true,\n})\nexport class GrwLoader {\n @Prop() colorPrimaryContainer = '#eaddff';\n @Prop() colorOnPrimaryContainer = '#21005e';\n\n render() {\n return (\n <Host style={{ '--color-primary-container': this.colorPrimaryContainer, '--color-on-primary-container': this.colorOnPrimaryContainer }}>\n <span part=\"loader\" class=\"loader\"></span>\n </Host>\n );\n }\n}\n","// Following https://github.com/Leaflet/Leaflet/blob/master/PLUGIN-GUIDE.md\n(function (factory, window) {\n\n // define an AMD module that relies on 'leaflet'\n if (typeof define === 'function' && define.amd) {\n define(['leaflet'], factory);\n\n // define a Common JS module that relies on 'leaflet'\n } else if (typeof exports === 'object') {\n module.exports = factory(require('leaflet'));\n }\n\n // attach your plugin to the global 'L' variable\n if (typeof window !== 'undefined' && window.L) {\n factory(window.L);\n\n }\n}(function (L) {\n L.locales = {};\n L.locale = null;\n L.registerLocale = function registerLocale(code, locale) {\n L.locales[code] = L.Util.extend({}, L.locales[code], locale);\n };\n L.setLocale = function setLocale(code) {\n L.locale = code;\n };\n return L.i18n = L._ = function translate(string, data) {\n if (L.locale && L.locales[L.locale] && typeof L.locales[L.locale][string] !== \"undefined\") {\n string = L.locales[L.locale][string];\n }\n try {\n // Do not fail if some data is missing\n // a bad translation should not break the app\n string = L.Util.template(string, data);\n }\n catch (err) {/*pass*/\n }\n\n return string;\n };\n}, window));\n","!function(t){\"function\"==typeof define&&define.amd?define(t):t()}((function(){\"use strict\";!function(t,e){\"function\"==typeof define&&define.amd?define([\"leaflet\"],t):\"object\"==typeof exports&&(module.exports=t(require(\"leaflet\"))),void 0!==e&&e.L&&t(e.L)}((function(t){return t.locales={},t.locale=null,t.registerLocale=function(e,a){t.locales[e]=t.Util.extend({},t.locales[e],a)},t.setLocale=function(e){t.locale=e},t.i18n=t._=function(e,a){t.locale&&t.locales[t.locale]&&t.locales[t.locale][e]&&(e=t.locales[t.locale][e]);try{e=t.Util.template(e,a)}catch(t){}return e}}),window);var t=6e4,e=60*t,a=24*e;function i(i){var n=Math.floor(i/a),r=Math.floor((i-n*a)/e),o=Math.floor((i-n*a-r*e)/t),s=Math.round((i-n*a-r*e-o*t)/1e3);return 60===s&&(o++,s=0),60===o&&(r++,o=0),24===r&&(n++,r=0),(n?n+\"d \":\"\")+r.toString().padStart(2,0)+\":\"+o.toString().padStart(2,0)+\"'\"+s.toString().padStart(2,0)+'\"'}function n(t,e){var a=m(\"a\",\"\",{href:t,target:\"_new\",download:e||\"\",style:\"display:none;\"}),i=document.body;i.appendChild(a),a.click(),i.removeChild(a)}function r(t,e,a){return!1===e?Promise.resolve():a instanceof Promise?a:new Promise((function(e,a){var i=document.createElement(\"script\");i.addEventListener(\"load\",e,{once:!0}),i.src=t,document.head.appendChild(i)}))}function o(t,e){e.classed(\"canvas-path\",!0),t.beginPath(),t.moveTo(0,0);var a=new Path2D(e.attr(\"d\"));t.strokeStyle=e.attr(\"stroke\"),t.fillStyle=e.attr(\"fill\"),t.lineWidth=1.25,t.globalCompositeOperation=\"source-over\",t.globalAlpha=e.attr(\"stroke-opacity\")||.3,t.stroke(a),t.globalAlpha=e.attr(\"fill-opacity\")||.45,t.fill(a),t.globalAlpha=1,t.closePath()}function s(t,e){return e?t<e[0]?e[0]:t>e[1]?e[1]:t:t}function l(t,e){t&&e.split(\" \").every((function(e){return e&&L.DomUtil.addClass(t,e)}))}function c(t,e){t&&e.split(\" \").every((function(e){return e&&L.DomUtil.removeClass(t,e)}))}function h(t,e,a){return(a?l:c).call(null,t,e)}function d(t,e,a){e&&c(t,e),a&&l(t,a)}function u(t,e,a){return void 0===a?L.DomUtil.getStyle(t,e):t.style.setProperty(e,a)}function _(t,e,a,i){return u(t,e,i?a:\"\")}function p(t,e,a,i){return t[i?\"on\":\"off\"](e,a)}function m(t,e,a,i){var n=L.DomUtil.create(t,e||\"\");return a&&v(n,a),i&&f(i,n),n}function f(t,e){return t.appendChild(e)}function g(t,e,a){return t.insertAdjacentElement(a,e)}function v(t,e){for(var a in e)t.setAttribute(a,e[a])}function y(t,e){return(e||document).querySelector(t)}var x=L.DomEvent.on,b=L.DomEvent.off,k=L.DomUtil.hasClass;function w(){return Math.random().toString(36).substr(2,9)}function M(t,e){for(var a in t)e(t[a],a)}var C=Object.freeze({__proto__:null,formatTime:i,saveFile:n,lazyLoader:r,drawCanvas:o,clamp:s,addClass:l,removeClass:c,toggleClass:h,replaceClass:d,style:u,toggleStyle:_,toggleEvent:p,create:m,append:f,insert:g,setAttributes:v,select:y,on:x,off:b,hasClass:k,randomId:w,each:M}),A={lightblue:{area:\"#3366CC\",alpha:.45,stroke:\"#3366CC\"},magenta:{area:\"#FF005E\"},yellow:{area:\"#FF0\"},purple:{area:\"#732C7B\"},steelblue:{area:\"#4682B4\"},red:{area:\"#F00\"},lime:{area:\"#9CC222\",line:\"#566B13\"}},S=function(t){t.width;var e=t.height,a=t.xAttr,i=t.yAttr,n=t.scaleX,r=t.scaleY,o=t.interpolation,s=void 0===o?\"curveLinear\":o;return d3.area().curve(\"string\"==typeof s?d3[s]:s).x((function(t){return t.xDiagCoord=n(t[a])})).y0(e).y1((function(t){return r(t[i])}))},z=function(t){var e=t.name,a=t.color,i=t.strokeColor,n=t.strokeOpacity,r=t.fillOpacity,o=d3.create(\"svg:path\");return e&&o.classed(e,!0),o.style(\"pointer-events\",\"none\"),o.attr(\"fill\",a||\"#3366CC\").attr(\"stroke\",i||\"#000\").attr(\"stroke-opacity\",n||\"1\").attr(\"fill-opacity\",r||\"0.8\"),o},D=function(t){var e=t.type,a=void 0===e?\"axis\":e,i=t.tickSize,n=void 0===i?6:i,r=t.tickPadding,o=void 0===r?3:r,s=t.position,l=t.height,c=t.width,h=t.axis,d=t.scale,u=t.ticks,_=t.tickFormat,p=t.label,m=t.labelX,f=t.labelY,g=t.name,v=void 0===g?\"\":g,y=t.onAxisMount;return function(t){var e=0,i=0;\"bottom\"==s&&(i=l),\"right\"==s&&(e=c),\"x\"==h&&\"grid\"==a?n=-l:\"y\"==h&&\"grid\"==a&&(n=-c);var r=d3[\"axis\"+s.replace(/\\b\\w/g,(function(t){return t.toUpperCase()}))]().scale(d).ticks(u).tickPadding(o).tickSize(n).tickFormat(_),g=t.append(\"g\").attr(\"class\",[h,a,s,v].join(\" \")).attr(\"transform\",\"translate(\"+e+\",\"+i+\")\").call(r);return p&&g.append(\"svg:text\").attr(\"x\",m).attr(\"y\",f).text(p),y&&g.call(y),g}},F=function(t){return t.type=\"grid\",D(t)},E=function(t){var e=t.theme,a=t.xCoord,i=void 0===a?0:a,n=t.yCoord,r=void 0===n?0:n,o=t.labels,s=void 0===o?{}:o,l=t.item,c=void 0===l?{}:l,h=t.length,d=void 0===h?0:h;return function(t){t.attr(\"class\",\"height-focus-group\");var a,n=t.select(\".height-focus.line\"),o=t.select(\".height-focus.circle-lower\"),l=t.select(\".height-focus-label\");return n.node()||(n=t.append(\"svg:line\")),o.node()||(o=t.append(\"svg:circle\")),l.node()||(l=t.append(\"svg:text\")),isNaN(i)||isNaN(r)||(o.attr(\"class\",e+\" height-focus circle-lower\").attr(\"transform\",\"translate(\"+i+\",\"+r+\")\").attr(\"r\",6).attr(\"cx\",0).attr(\"cy\",0),n.attr(\"class\",e+\" height-focus line\").attr(\"x1\",i).attr(\"x2\",i).attr(\"y1\",r).attr(\"y2\",d),l.attr(\"class\",e+\" height-focus-label\").style(\"pointer-events\",\"none\").attr(\"x\",i+5).attr(\"y\",d),Object.keys(s).sort((function(t,e){return s[t].order-s[e].order})).forEach((function(t){(a=l.select(\".height-focus-\"+s[t].name)).size()||(a=l.append(\"svg:tspan\").attr(\"class\",\"height-focus-\"+s[t].name).attr(\"dy\",\"1.5em\")),a.text(\"function\"!=typeof s[t].value?s[t].value:s[t].value(c))})),l.select(\"tspan\").attr(\"dy\",l.selectAll(\"tspan\").size()>1?\"-1.5em\":\"0em\"),l.selectAll(\"tspan\").attr(\"x\",i+5)),t}},T=function(t){var e=t.name,a=t.label,i=t.width,n=t.height,r=t.margins,o=void 0===r?{}:r,s=t.color,l=t.path;return function(t){return t.attr(\"class\",\"legend-item legend-\"+e.toLowerCase()).attr(\"data-name\",e),t.on(\"click.legend\",(function(){return d3.select(t.node().ownerSVGElement||t).dispatch(\"legend_clicked\",{detail:{path:l.node(),name:e,legend:t.node(),enabled:!l.classed(\"leaflet-hidden\")}})})),t.append(\"svg:rect\").attr(\"x\",i/2-50).attr(\"y\",n+o.bottom/2).attr(\"width\",50).attr(\"height\",10).attr(\"fill\",s).attr(\"stroke\",\"#000\").attr(\"stroke-opacity\",\"0.5\").attr(\"fill-opacity\",\"0.25\"),t.append(\"svg:text\").text(L._(a||e)).attr(\"x\",i/2+5).attr(\"font-size\",10).style(\"text-decoration-thickness\",\"2px\").style(\"font-weight\",\"700\").attr(\"y\",n+o.bottom/2).attr(\"dy\",\"0.75em\"),t}},I=function(t){var e=t.xCoord,a=t.yCoord,i=t.width,n=t.height,r=t.labels,o=void 0===r?{}:r,s=t.item,l=void 0===s?{}:s;return function(t){var r=t.select(\".mouse-focus-line\"),s=t.select(\".mouse-focus-label\");r.node()||(r=t.append(\"svg:line\")),s.node()||(s=t.append(\"g\"));var c=s.select(\".mouse-focus-label-rect\"),h=s.select(\".mouse-focus-label-text\");c.node()||(c=s.append(\"svg:rect\")),h.node()||(h=s.append(\"svg:text\"));var d,u=0,_=0,p={width:0,height:0};try{p=h.node().getBBox()}catch(e){return t}return e&&(u=e+(e<i/2?10:-p.width-10)),a&&(_=Math.max(a-p.height,L.Browser.webkit?0:-1/0)),r.attr(\"class\",\"mouse-focus-line\").attr(\"x2\",e).attr(\"y2\",0).attr(\"x1\",e).attr(\"y1\",n),s.attr(\"class\",\"mouse-focus-label\"),c.attr(\"class\",\"mouse-focus-label-rect\").attr(\"x\",u-5).attr(\"y\",_-5).attr(\"width\",p.width+10).attr(\"height\",p.height+10).attr(\"rx\",3).attr(\"ry\",3),h.attr(\"class\",\"mouse-focus-label-text\").style(\"font-weight\",\"700\").attr(\"y\",_),Object.keys(o).sort((function(t,e){return o[t].order-o[e].order})).forEach((function(t){(d=h.select(\".mouse-focus-label-\"+o[t].name)).size()||(d=h.append(\"svg:tspan\",\".mouse-focus-label-x\").attr(\"class\",\"mouse-focus-label-\"+o[t].name).attr(\"dy\",\"1.5em\")),d.text(\"function\"!=typeof o[t].value?o[t].value:o[t].value(l))})),h.select(\"tspan\").attr(\"dy\",\"1em\"),h.selectAll(\"tspan\").attr(\"x\",u),t}},O=function(t){var e=t.height,a=t.width;return function(t){t.data([{x:0,y:e}]).attr(\"transform\",(function(t){return\"translate(\"+t.x+\",\"+t.y+\")\"}));var i=t.selectAll(\".horizontal-drag-rect\").data([{w:a}]),n=t.selectAll(\".horizontal-drag-line\").data([{w:a}]),r=t.selectAll(\".horizontal-drag-label\").data([{w:a-8}]),o=t.selectAll(\".horizontal-drag-symbol\").data([{type:d3.symbolTriangle,x:a+7,y:0,angle:-90,size:50}]);return i.exit().remove(),n.exit().remove(),r.exit().remove(),o.exit().remove(),i.enter().append(\"svg:rect\").attr(\"class\",\"horizontal-drag-rect\").attr(\"x\",0).attr(\"y\",-8).attr(\"height\",8).attr(\"fill\",\"none\").attr(\"pointer-events\",\"all\").merge(i).attr(\"width\",(function(t){return t.w})),n.enter().append(\"svg:line\").attr(\"class\",\"horizontal-drag-line\").attr(\"x1\",0).merge(n).attr(\"x2\",(function(t){return t.w})),r.enter().append(\"svg:text\").attr(\"class\",\"horizontal-drag-label\").attr(\"text-anchor\",\"end\").attr(\"y\",-8).merge(r).attr(\"x\",(function(t){return t.w})),o.enter().append(\"svg:path\").attr(\"class\",\"horizontal-drag-symbol\").merge(o).attr(\"d\",d3.symbol().type((function(t){return t.type})).size((function(t){return t.size}))).attr(\"transform\",(function(t){return\"translate(\"+t.x+\",\"+t.y+\") rotate(\"+t.angle+\")\"})),t}},N=function(t){var e=t.point,a=t.height,i=t.width,n=t.x,r=t.y;return function(t){return isNaN(n)||isNaN(r)||(e.item&&e.item.property(\"isConnected\")||(e.position=e.position||\"bottom\",e.item=t.append(\"g\"),e.item.append(\"svg:line\").attr(\"y1\",0).attr(\"x1\",0).attr(\"style\",\"stroke: rgb(51, 51, 51); stroke-width: 0.5; stroke-dasharray: 2, 2;\"),e.item.append(\"svg:circle\").attr(\"class\",\" height-focus circle-lower\").attr(\"r\",3),e.label&&e.item.append(\"svg:text\").attr(\"dx\",\"4px\").attr(\"dy\",\"-4px\")),e.item.datum({pos:e.position,x:n,y:r}).attr(\"class\",(function(t){return\"point \"+t.pos})).attr(\"transform\",(function(t){return\"translate(\"+t.x+\",\"+t.y+\")\"})),e.item.select(\"line\").datum({y2:{top:-r,bottom:a-r}[e.position],x2:{left:-n,right:i-n}[e.position]||0}).attr(\"y2\",(function(t){return t.y2})).attr(\"x2\",(function(t){return t.x2})),e.label&&e.item.select(\"text\").text(e.label)),t}},P=function(t){var e=t.min,a=t.max,i=t.attr,n=t.name,r=t.forceBounds,o=t.scale;return function(t){i=i||n,o&&o.attr&&(i=o.attr);var s=t&&t.length?d3.extent(t,(function(t){return t[i]})):[0,1];return void 0!==e&&(e<s[0]||r)&&(s[0]=e),void 0!==a&&(a>s[1]||r)&&(s[1]=a),s}},B=function(t){var e=t.axis;return function(t,a){return\"x\"==e?[0,t]:\"y\"==e?[a,0]:void 0}},G=function(t){var e=t.data,a=t.attr,i=t.min,n=t.max,r=t.forceBounds,o=t.range;return d3.scaleLinear().range(o).domain(P({min:i,max:n,attr:a,forceBounds:r})(e))},H=function(t){var e=t.width,a=t.height,i=t.margins,n=void 0===i?{}:i,r=(t.ruler,e-n.left-n.right),o=a-n.top-n.bottom,s=d3.create(\"svg:svg\").attr(\"class\",\"background\"),l=s.append(\"g\"),c={grid:l.append(\"g\").attr(\"class\",\"grid\"),area:l.append(\"g\").attr(\"class\",\"area\"),axis:l.append(\"g\").attr(\"class\",\"axis\"),point:l.append(\"g\").attr(\"class\",\"point\"),brush:l.append(\"g\").attr(\"class\",\"brush\"),tooltip:l.append(\"g\").attr(\"class\",\"tooltip\").attr(\"display\",\"none\"),ruler:l.append(\"g\").attr(\"class\",\"ruler\"),legend:l.append(\"g\").attr(\"class\",\"legend\")},h=c.area.append(\"svg:mask\").attr(\"id\",\"elevation-clipper\").attr(\"fill-opacity\",1),d=h.append(\"svg:rect\").attr(\"class\",\"zoom\").attr(\"fill\",\"white\"),u=c.area.append(\"svg:foreignObject\").attr(\"mask\",\"url(#\"+h.attr(\"id\")+\")\"),_=u.append(\"xhtml:canvas\").attr(\"class\",\"canvas-plot\"),p=_.node().getContext(\"2d\");c.tooltip.call(I({xCoord:0,yCoord:0,height:o,width:r,labels:{}}));var m=d3.brushX().on(\"start.cursor end.cursor brush.cursor\",(function(){return c.brush.select(\".overlay\").attr(\"cursor\",null)})),f={mask:h,canvas:_,context:p,brush:m},g={svg:s,g:l,panes:c,utils:f,scale:function(t){return{x:G(t.x),y:G(t.y)}},_resize:function(t){var e=t.width,a=t.height,i=t.margins,n=void 0===i?{}:i,r=t.ruler,o=e-n.left-n.right,h=a-n.top-n.bottom;s.attr(\"viewBox\",\"0 0 \".concat(e,\" \").concat(a)).attr(\"width\",e).attr(\"height\",a),l.attr(\"transform\",\"translate(\"+n.left+\",\"+n.top+\")\"),/Mac|iPod|iPhone|iPad/.test(navigator.platform)&&/AppleWebkit/i.test(navigator.userAgent)&&_.style(\"transform\",\"translate(\"+n.left+\"px,\"+n.top+\"px)\"),d.attr(\"x\",0).attr(\"y\",0).attr(\"width\",o).attr(\"height\",h),u.attr(\"width\",o).attr(\"height\",h),_.attr(\"width\",o).attr(\"height\",h),r&&c.ruler.call(O({height:h,width:o})),c.brush.call(m.extent([[0,0],[o,h]])),c.brush.select(\".overlay\").attr(\"cursor\",null),g._width=o,g._height=h,g.svg.dispatch(\"resize\",{detail:{width:o,height:h}})},pane:function(t){return c[t]||(c[t]=l.append(\"g\").attr(\"class\",t)),c[t]},get:function(t){return f[t]}};return g._resize({width:e,height:a,margins:n}),g},X=Object.freeze({__proto__:null,Colors:A,Area:S,Path:z,Axis:D,Grid:F,PositionMarker:E,LegendItem:T,Tooltip:I,Ruler:O,CheckPoint:N,Domain:P,Range:B,Scale:G,Bisect:function(t){var e=t.data,a=void 0===e?[0,1]:e,i=t.scale,n=t.x,r=t.attr;return d3.bisector((function(t){return t[r]})).left(a,i.invert(n))},Chart:H}),U=L.Class.extend({includes:L.Evented?L.Evented.prototype:L.Mixin.Events,initialize:function(t,e){var a=this;this.options=t,this.control=e,this._data=[],this._props={scales:{},paths:{},areas:{},grids:{},axes:{},legendItems:{},tooltipItems:{}},this._scales={},this._domains={},this._ranges={},this._paths={},this._brushEnabled=t.dragging,this._zoomEnabled=t.zooming;var i=this._chart=H(t);this._container=i.svg;this._grid=i.pane(\"grid\"),this._area=i.pane(\"area\"),this._point=i.pane(\"point\"),this._axis=i.pane(\"axis\"),this._legend=i.pane(\"legend\"),this._tooltip=i.pane(\"tooltip\"),this._ruler=i.pane(\"ruler\"),this._initScale(),this._mask=i.get(\"mask\"),this._context=i.get(\"context\"),this._brush=i.get(\"brush\"),this._zoom=d3.zoom(),this._drag=d3.drag(),this._initInteractions(),this._maskGaps=[],e.on(\"eletrack_added\",(function(t){a._maskGaps.push(t.index),e.once(\"eledata_updated\",(function(t){return a._maskGaps.push(t.index)}))}))},update:function(t){return t&&(t.data&&(this._data=t.data),t.options&&(this.options=t.options)),this._updateScale(),this._updateArea(),this._updateAxis(),this._updateLegend(),this._updateClipper(),this},render:function(){var t=this;return function(e){return e.append((function(){return t._container.node()}))}},clear:function(){this._resetDrag(),this._hideDiagramIndicator(),this._area.selectAll(\"path\").attr(\"d\",\"M0 0\"),this._context.clearRect(0,0,this._width(),this._height()),this._maskGaps=[],this._mask.selectAll(\".gap\").remove()},_drawPath:function(t){var e=this._paths[t],a=this._props.areas[t];e.datum(this._data).attr(\"d\",S(L.extend({},a,{width:this._width(),height:this._height(),scaleX:this._scales[a.scaleX],scaleY:this._scales[a.scaleY]}))),e.classed(\"leaflet-hidden\")||(this.options.preferCanvas?o(this._context,e):this._area.append((function(){return e.node()})))},_hasActiveLayers:function(){var t=this._paths;for(var e in t)if(!t[e].classed(\"leaflet-hidden\"))return!0;return!1},_initBrush:function(t){var e=this,a=function(t){if(e._data.length&&(\"brush\"!=t.type||t.sourceEvent)){var a=e._chart.panes.brush.select(\".overlay\").node(),i=d3.pointers(t,a)[0][0],n=e._data[e._findIndexForXCoord(i)];e.fire(\"mouse_move\",{item:n,xCoord:i})}};this._brush.filter((function(t){return e._brushEnabled&&!t.shiftKey&&!t.button})).on(\"end.update\",(function(t){if(e._data.length){var a=t.selection;if(a){var i=e._findIndexForXCoord(a[0]),n=e._findIndexForXCoord(a[1]);e.fire(\"dragged\",{dragstart:e._data[i],dragend:e._data[n]})}}})).on(\"brush.update\",a),this._chart.panes.brush.on(\"mouseenter.focus touchstart.focus\",this.fire.bind(this,\"mouse_enter\")).on(\"mouseout.focus touchend.focus\",this.fire.bind(this,\"mouse_out\")).on(\"mousemove.focus touchmove.focus\",a)},_initClipper:function(){var t=this,e=this._container,a=this.options.margins,i=this._zoom;i.scaleExtent([1,10]).extent([[a.left,0],[this._width()-a.right,this._height()]]).translateExtent([[a.left,-1/0],[this._width()-a.right,1/0]]).filter((function(e){return t._zoomEnabled&&(e.shiftKey||4==e.buttons)})).on(\"start\",(function(a){a.sourceEvent&&\"mousedown\"==a.sourceEvent.type&&e.style(\"cursor\",\"grabbing\"),1==a.transform.k&&0==a.transform.x&&(t._container.classed(\"zoomed\",!0),t._mask&&t._point.attr(\"mask\",\"url(#\"+t._mask.attr(\"id\")+\")\")),t.zooming=!0})).on(\"end\",(function(a){1==a.transform.k&&0==a.transform.x&&(t._container.classed(\"zoomed\",!1),t._mask&&t._point.attr(\"mask\",null)),t.zooming=!1,e.style(\"cursor\",\"\")})).on(\"zoom\",(function(e){t.zooming=!1,t._updateScale(),t.zooming=!0,t._scales.distance=t._x=e.transform.rescaleX(t._x),t._scales.time&&(t._scales.time=e.transform.rescaleX(t._scales.time)),t._resetDrag(),e.sourceEvent&&\"mousemove\"==e.sourceEvent.type&&t._hideDiagramIndicator(),t.fire(\"zoom\")})),e.call(i)},_initInteractions:function(){this._initBrush(),this._initRuler(),this._initClipper(),this._initLegend()},_initLegend:function(){var t=this;this._container.on(\"legend_clicked\",(function(e){var a=e.detail,i=a.path,n=a.legend,r=a.name,o=a.enabled;if(i){var s=y(\"text\",n),l=y(\"rect\",n);_(s,\"text-decoration-line\",\"line-through\",o),_(l,\"fill-opacity\",\"0\",o),h(i,\"leaflet-hidden\",o),t._updateArea(),t.fire(\"elepath_toggle\",{path:i,name:r,legend:n,enabled:o})}}))},_initRuler:function(){var t=this;if(this.options.ruler){var e=d3.format(\".0f\"),a=this._drag;a.on(\"start end\",(function(e,a){var i=t._height(),n=t._ruler.data()[0].y;(n>=i||n<=0)&&t._ruler.select(\".horizontal-drag-label\").text(\"\"),t._hideDiagramIndicator()})).on(\"drag\",(function(a,i){var n=t._height(),r=d3.pointers(a,t._area.node())[0][1],o=r>0?r<n?r:n:0,s=t._y.invert(o),l=L.extend(t._ruler.data()[0],{y:o});t._ruler.data([l]).attr(\"transform\",(function(t){return\"translate(\"+t.x+\",\"+t.y+\")\"})).classed(\"active\",o<n),t._container.select(\".horizontal-drag-label\").text(e(s)+\" \"+(t.options.imperial?\"ft\":\"m\")),t.fire(\"ruler_filter\",{coords:r<n&&r>0?t._findCoordsForY(r):[]})})),this._ruler.call(a)}},_initScale:function(){var t=this.options;this._registerAxisScale({axis:\"x\",position:\"bottom\",attr:t.xAttr,min:t.xAxisMin,max:t.xAxisMax,name:\"distance\"}),this._registerAxisScale({axis:\"y\",position:\"left\",attr:t.yAttr,min:t.yAxisMin,max:t.yAxisMax,name:\"altitude\"}),this._x=this._scales.distance,this._y=this._scales.altitude},_registerAreaPath:function(t){\"y\"==t.scale?t.scale=this._y:\"x\"==t.scale&&(t.scale=this._x);var e=this.options;t.xAttr||(t.xAttr=e.xAttr),t.yAttr||(t.yAttr=e.yAttr),void 0===t.preferCanvas&&(t.preferCanvas=e.preferCanvas);var a=z(t);this._paths[t.name]=a,this._props.areas[t.name]=t,e.legend&&(this._props.legendItems[t.name]={name:t.name,label:t.label,color:t.color,path:a})},_registerAxisGrid:function(t){\"y\"==t.scale?t.scale=this._y:\"x\"==t.scale&&(t.scale=this._x),this._props.grids[t.name||t.axis]=t},_registerAxisScale:function(t){\"y\"==t.scale?t.scale=this._y:\"x\"==t.scale&&(t.scale=this._x);var e=this.options,a=t.scale;if(\"function\"==typeof this._scales[t.name])t.scale=this._scales[t.name];else if(\"function\"!=typeof a){(a=L.extend({data:this._data,forceBounds:e.forceAxisBounds},a)).attr=a.attr||t.name;var i=this._domains[t.name]=P(t),n=this._ranges[t.name]=B(t);a.range=a.range||n(this._width(),this._height()),a.domain=a.domain||i(this._data),this._props.scales[t.name]=a,t.scale=this._scales[t.name]=G(a)}return t.ticks||(\"x\"==t.axis?t.ticks=e.xTicks:\"y\"==t.axis&&(t.ticks=e.yTicks)),this._props.axes[t.name]=t,a},_registerCheckPoint:function(t){var e,a,i;this._data.length&&(t.latlng?(e=this._data[this._findIndexForLatLng(t.latlng)],a=this._x(e.dist),i=this._y(e.z)):isNaN(t.dist)||(a=this._x(t.dist),e=this._data[this._findIndexForXCoord(a)],i=this._y(e.z)),this._point.call(N({point:t,width:this._width(),height:this._height(),x:a,y:i})))},_registerTooltip:function(t){var e;t.order=null!==(e=t.order)&&void 0!==e?e:100,this._props.tooltipItems[t.name]=t},_updateArea:function(){var t=this._paths;for(var e in this._context.clearRect(0,0,this._width(),this._height()),t)t[e].classed(\"leaflet-hidden\")||this._drawPath(e)},_updateAxis:function(){var t=this.options;this._grid.selectAll(\"g\").remove(),this._axis.selectAll(\"g\").remove();var e,a,i,n=this._props.grids,r=this._props.axes,o={width:this._width(),height:this._height(),tickFormat:\"\"},s={width:this._width(),height:this._height()};for(var l in n)e=L.extend({},o,n[l]),i=F(e),this._grid.call(i);for(var c in r)!1!==t[c]&&\"summary\"!==t[c]&&(e=L.extend({},s,r[c]),a=D(e),this._axis.call(a));this._axis.selectAll(\".y.axis.right\").each((function(t,e,a){var i=d3.select(a[e]),n=i.attr(\"transform\"),r=n.substring(n.indexOf(\"(\")+1,n.indexOf(\")\")).split(\",\");i.attr(\"transform\",\"translate(\"+(+r[0]+40*e)+\",\"+r[1]+\")\"),e>0&&(i.select(\":scope > path\").attr(\"opacity\",.25),i.selectAll(\":scope > .tick line\").attr(\"opacity\",.75))}))},_updateClipper:function(){var t=this,e=this.options.margins;this._zoom.scaleExtent([1,10]).extent([[e.left,0],[this._width()-e.right,this._height()]]).translateExtent([[e.left,-1/0],[this._width()-e.right,1/0]]),this._mask.selectAll(\".gap\").remove(),this._maskGaps.forEach((function(e,a){if(!(a>=t._maskGaps.length-2)){var i=t._data[t._maskGaps[a]],n=t._data[t._maskGaps[a+1]],r=t._x(t._data[t._findIndexForLatLng(i.latlng)].dist),o=t._x(t._data[t._findIndexForLatLng(n.latlng)].dist);t._mask.append(\"rect\").attr(\"x\",r).attr(\"y\",0).attr(\"width\",o-r).attr(\"height\",t._height()).attr(\"class\",\"gap\").attr(\"fill-opacity\",\"0.8\").attr(\"fill\",\"black\")}}))},_updateLegend:function(){var t=this;if(!1!==this.options.legend){var e,a=this._props.legendItems;for(var i in this._legend.selectAll(\"g\").remove(),a)e=T(L.extend({width:this._width(),height:this._height(),margins:this.options.margins},a[i])),this._legend.append(\"g\").call(e);var n=this._legend.selectAll(\".legend-item\"),r=n.nodes().length,o=Array(Math.floor(r/2)).fill(null).map((function(t,e){return 2*(e+1)-(1-Math.sign(r%2))})),s=o.slice().reverse().map((function(t){return-t}));r%2!=0&&s.push(0),o=s.concat(o);var l=this._axis.selectAll(\".x.axis.bottom\").nodes().length,c=30+2*l,h=30*r;r&&this.options.margins.right<h&&(this.options.margins.right=h,this.fire(\"margins_updated\")),l&&this.options.margins.bottom<c&&(this.options.margins.bottom=c,this.fire(\"margins_updated\")),n.each((function(e,a,i){var n=d3.select(i[a]),r=(n.select(\"rect\"),n.attr(\"data-name\")),s=t._paths[r],c=55*o[a],h=2*l;n.attr(\"transform\",\"translate(\"+c+\", \"+h+\")\"),r in t.options&&\"disabled\"==t.options[r]&&(s.classed(\"leaflet-hidden\",!0),n.select(\"text\").style(\"text-decoration-line\",\"line-through\"),n.select(\"rect\").style(\"fill-opacity\",\"0\")),t._mask&&s.attr(\"mask\",\"url(#\"+t._mask.attr(\"id\")+\")\")}))}},_updateScale:function(){if(this.zooming)return{x:this._x,y:this._y};for(var t in this._scales)this._scales[t].domain(this._domains[t](this._data)).range(this._ranges[t](this._width(),this._height()));return{x:this._x,y:this._y}},_width:function(){return this._chart._width},_height:function(){return this._chart._height},_findCoordsForY:function(t){var e,a=this._data,i=this._y.invert(t),n=a.reduce((function(t,e,a){return e.z>=i&&t.push(a),t}),[]),r=0;return n.reduce((function(t,i,o){return n[e=o+1]===n[o]+1&&e!==n.length||(t.push(n.slice(r,e).map((function(t){return a[t].latlng}))),r=e),t}),[])},_findIndexForXCoord:function(t){var e=this;return d3.bisector((function(t){return t[e.options.xAttr]})).left(this._data||[0,1],this._x.invert(t))},_findIndexForLatLng:function(t){var e=null,a=1/0;return this._data.forEach((function(i,n){var r=t.distanceTo(i.latlng);r<a&&(a=r,e=n)})),e},_resetDrag:function(){this._chart.panes.brush.select(\".selection\").attr(\"width\")&&(this._chart.panes.brush.call(this._brush.clear),this._hideDiagramIndicator(),this.fire(\"reset_drag\"))},_resetZoom:function(){this._zoom&&this._zoom.transform(this._chart.svg,d3.zoomIdentity)},_showDiagramIndicator:function(t,e){this._tooltip.attr(\"display\",null).call(I({xCoord:e,yCoord:this._y(t[this.options.yAttr]),height:this._height(),width:this._width(),labels:this._props.tooltipItems,item:t}))},_hideDiagramIndicator:function(){this._tooltip.attr(\"display\",\"none\")}});function j(t){return(j=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}var R,J=L.Class.extend({initialize:function(t){switch(this.options=t,this.options.marker){case\"elevation-line\":break;case\"position-marker\":this._marker=L.marker([0,0],{icon:this.options.markerIcon,zIndexOffset:1e6,interactive:!1})}return this._labels={},this},addTo:function(t){switch(this._map=t,this.options.marker){case\"elevation-line\":this._container=d3.select(t.getPane(\"elevationPane\")).select(\"svg > g\").call(E({}));break;case\"position-marker\":this._marker.addTo(t,{pane:\"overlayPane\"})}return this},update:function(t){if(t?this._props=t:t=this._props,t)switch(t.options&&(this.options=t.options),this._map||this.addTo(t.map),this._latlng=t.item.latlng,this.options.marker){case\"elevation-line\":if(this._container){var e=this._map.latLngToLayerPoint(this._latlng);e=L.extend({},t.item,this._map._rotate?this._map.rotatedPointToMapPanePoint(e):e),this._container.classed(\"leaflet-hidden\",!1),this._container.call(E({theme:this.options.theme,xCoord:e.x,yCoord:e.y,length:e.y-this._height()/t.maxElevation*e.z,labels:this._labels,item:e}))}break;case\"position-marker\":c(this._marker.getElement(),\"leaflet-hidden\"),this._marker.setLatLng(this._latlng)}},remove:function(){switch(this._props=null,this.options.marker){case\"elevation-line\":this._container&&this._container.classed(\"leaflet-hidden\",!0);break;case\"position-marker\":l(this._marker.getElement(),\"leaflet-hidden\")}},getLatLng:function(){return this._latlng},_height:function(){var t=this.options;return t.height-t.margins.top-t.margins.bottom},_registerTooltip:function(t){this._labels[t.name]=t}}),Y=L.Class.extend({initialize:function(t,e){this.options=t,this.control=e,this.labels={},u(this._container=m(\"div\",\"elevation-summary \"+(t.summary?t.summary+\"-summary\":\"\")),\"max-width\",t.width?t.width+\"px\":\"\")},render:function(){var t=this;return function(e){return e.append((function(){return t._container}))}},reset:function(){this._container.innerHTML=\"\"},append:function(t,e,a){return this._container.innerHTML+='<span class=\"'.concat(t,'\"><span class=\"summarylabel\">').concat(e,'</span><span class=\"summaryvalue\">').concat(a,\"</span></span>\"),this},update:function(){var t=this;Object.keys(this.labels).sort((function(e,a){return t.labels[e].order-t.labels[a].order})).forEach((function(e){t.append(e,L._(t.labels[e].label),\"function\"!=typeof t.labels[e].value?t.labels[e].value:t.labels[e].value(t.control.track_info))}))},_registerSummary:function(t){for(var e in t){var a;t[e].order=null!==(a=t[e].order)&&void 0!==a?a:100,this.labels[e]=t[e]}}}),V={autofitBounds:!0,autohide:!L.Browser.mobile,autohideMarker:!0,almostover:!0,altitude:!0,collapsed:!1,detached:!0,distance:!0,distanceMarkers:{lazy:!0,distance:!0,direction:!0},decimalsX:2,decimalsY:0,dragging:!L.Browser.mobile,downloadLink:\"link\",elevationDiv:\"#elevation-div\",followMarker:!0,forceAxisBounds:!1,height:200,imperial:!1,interpolation:\"curveLinear\",lazyLoadJS:!0,legend:!0,margins:{top:30,right:30,bottom:30,left:40},marker:\"elevation-line\",markerIcon:L.divIcon({className:\"elevation-position-marker\",html:'<i class=\"elevation-position-icon\"></i>',iconSize:[32,32],iconAnchor:[16,16]}),position:\"topright\",polyline:{className:\"elevation-polyline\",color:\"#000\",opacity:.75,weight:5,lineCap:\"round\"},polylineSegments:{className:\"elevation-polyline-segments\",color:\"#F00\",interactive:!1},preferCanvas:!1,reverseCoords:!1,ruler:!0,skipNullZCoords:!1,theme:\"lightblue-theme\",summary:\"inline\",slope:!1,slopeDeltaMax:void 0,slopeRange:void 0,speed:!1,speedDeltaMax:void 0,speedRange:void 0,time:!1,timeFactor:3600,timeFormat:!1,timestamps:!1,width:600,waypoints:!0,wptIcons:{\"\":L.divIcon({className:\"elevation-waypoint-marker\",html:'<i class=\"elevation-waypoint-icon default\"></i>',iconSize:[30,30],iconAnchor:[8,30]})},wptLabels:!0,xAttr:\"dist\",xLabel:\"km\",xTicks:void 0,yAttr:\"z\",yAxisMax:void 0,yAxisMin:void 0,yLabel:\"m\",yTicks:void 0,zFollow:!1,zooming:!L.Browser.Mobile},W=L.Control.Elevation=L.Control.extend({includes:L.Evented?L.Evented.prototype:L.Mixin.Events,options:V,__mileFactor:.621371,__footFactor:3.28084,__D3:\"https://unpkg.com/d3@6.5.0/dist/d3.min.js\",__TOGEOJSON:\"https://unpkg.com/@tmcw/togeojson@4.5.0/dist/togeojson.umd.js\",__LGEOMUTIL:\"https://unpkg.com/leaflet-geometryutil@0.9.3/src/leaflet.geometryutil.js\",__LALMOSTOVER:\"https://unpkg.com/leaflet-almostover@1.0.1/src/leaflet.almostover.js\",__LDISTANCEM:\"https://unpkg.com/@raruto/leaflet-elevation@1.9.6/libs/leaflet-distance-marker.min.js\",addData:function(t,e){var a=this;this.lazyLoad(this.__D3).then((function(){void 0===e&&t.on&&(e=t),a._addData(t),a._addLayer(e),a._fireEvt(\"eledata_added\",{data:t,layer:e,track_info:a.track_info})}))},addTo:function(t){if(this.options.detached){var e=this._initElevationDiv();e.isConnected||g(t.getContainer(),e,\"afterend\"),f(e,this.onAdd(t))}else L.Control.prototype.addTo.call(this,t);return this},clear:function(){this._marker&&this._marker.remove(),this._chart&&this._clearChart(),this._layers&&this._clearLayers(),this._markers&&this._clearMarkers(),this._data=[],this.track_info={},this._fireEvt(\"eledata_clear\"),this._updateChart()},_clearChart:function(){var t=this;this._events&&this._events.elechart_updated&&this._events.elechart_updated.forEach((function(e){return t.off(\"elechart_updated\",e.fn,e.ctx)})),this._chart&&this._chart._container&&(this._chart._container.selectAll(\"g.point .point\").remove(),this._chart.clear())},_clearLayers:function(){this._layers&&this._layers.eachLayer&&(this._layers.eachLayer((function(t){return t.remove()})),this._layers.clearLayers())},_clearMarkers:function(){this._markers&&this._markers.eachLayer&&(this._markers.eachLayer((function(t){return t.remove()})),this._markers.clearLayers())},disableBrush:function(){this._chart._brushEnabled=!1,this._resetDrag()},enableBrush:function(){this._chart._brushEnabled=!0},disableZoom:function(){this._chart._zoomEnabled=!1,this._chart._resetZoom()},enableZoom:function(){this._chart._zoomEnabled=!0},fitBounds:function(t){t=t||this.getBounds(),this._map&&t.isValid()&&this._map.fitBounds(t)},getBounds:function(t){return t=t||this._data,L.latLngBounds(t.map((function(t){return t.latlng})))},getZFollow:function(){return this.options.zFollow},hide:function(){u(this._container,\"display\",\"none\")},initialize:function(t){this._data=[],this._layers=L.featureGroup(),this._markers=L.featureGroup(),this._markedSegments=L.polyline([]),this._chartEnabled=!0,this.track_info={},this.handlers=[],L.setOptions(this,t),this.options.followMarker&&(this._setMapView=L.Util.throttle(this._setMapView,300,this)),this.options.legend&&(this.options.margins.bottom+=30),this.options.theme&&(this.options.polylineSegments.className+=\" \"+this.options.theme),!0===this.options.wptIcons&&(this.options.wptIcons=V.wptIcons),!0===this.options.distanceMarkers&&(this.options.distanceMarkers=V.distanceMarkers),this._markedSegments.setStyle(this.options.polylineSegments),L.extend(A,this.options.colors||{}),this._fixCanvasPaths(),this._fixTooltipSize()},lazyLoad:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:\"\";if(!this.options.lazyLoadJS)return Promise.resolve();switch(t){case this.__D3:a=\"_d3LazyLoader\",e=\"object\"!==(\"undefined\"==typeof d3?\"undefined\":j(d3));break;case this.__TOGEOJSON:a=\"_togeojsonLazyLoader\",e=\"object\"!==(\"undefined\"==typeof toGeoJSON?\"undefined\":j(toGeoJSON));break;case this.__LGEOMUTIL:a=\"_geomutilLazyLoader\",e=\"object\"!==j(L.GeometryUtil);break;case this.__LALMOSTOVER:a=\"_almostoverLazyLoader\",e=\"function\"!=typeof L.Handler.AlmostOver;break;case this.__LDISTANCEM:a=\"_distanceMarkersLazyLoader\",e=\"function\"!=typeof L.DistanceMarkers}return L.Control.Elevation[a]=r(t,e,L.Control.Elevation[a])},load:function(t){var e=this;this._parseFromString(t).then((function(a){return a?e._loadLayer(a):e._loadFile(t)}))},onAdd:function(t){var e=this;this._map=t;var a=this._container=m(\"div\",\"elevation-control elevation \"+this.options.theme+\" \"+(this.options.detached?\"\":\"leaflet-control\"));return this.lazyLoad(this.__D3).then((function(){e._initButton(a),e._initChart(a),e._initSummary(a),e._initMarker(t),e._initLayer(t),t.on(\"zoom viewreset zoomanim\",e._hideMarker,e).on(\"resize\",e._resetView,e).on(\"resize\",e._resizeChart,e).on(\"rotate\",e._rotateMarker,e).on(\"mousedown\",e._resetDrag,e),x(t.getContainer(),\"mousewheel\",e._resetDrag,e),x(t.getContainer(),\"touchstart\",e._resetDrag,e),x(document,\"keydown\",e._keydownHandler,e),e.on(\"eledata_added eledata_loaded\",e._updateChart,e).on(\"eledata_added eledata_loaded\",e._updateSummary,e),e._updateChart(),e._updateSummary()})),a},onRemove:function(t){this._container=null,t.off(\"zoom viewreset zoomanim\",this._hideMarker,this).off(\"resize\",this._resetView,this).off(\"resize\",this._resizeChart,this).off(\"mousedown\",this._resetDrag,this),b(t.getContainer(),\"mousewheel\",this._resetDrag,this),b(t.getContainer(),\"touchstart\",this._resetDrag,this),b(document,\"keydown\",this._keydownHandler,this),this.off(\"eledata_added eledata_loaded\",this._updateChart,this).off(\"eledata_added eledata_loaded\",this._updateSummary,this)},redraw:function(){this._resizeChart()},setZFollow:function(t){this.options.zFollow=t},show:function(){u(this._container,\"display\",\"block\")},_addData:function(t){var e=this;if(t){var a=t.geometry;if(a)switch(a.type){case\"LineString\":this._addGeoJSONData(a.coordinates);break;case\"MultiLineString\":M(a.coordinates,(function(t){return e._addGeoJSONData(t)}));break;default:console.warn(\"Unsopperted GeoJSON feature geometry type:\"+a.type)}\"FeatureCollection\"===t.type&&M(t.features,(function(t){return e._addData(t)})),t._latlngs&&this._addGeoJSONData(t._latlngs,t.feature&&t.feature.properties)}},_addGeoJSONData:function(t,e){var a=this;t.forEach((function(t,i){var n,r,o,s,l;t.meta=null!==(n=t.meta)&&void 0!==n?n:{time:null,ele:null,hr:null,cad:null,atemp:null};var c=e&&e.coordinateProperties||e;a.fire(\"elepoint_init\",{point:t,props:c,id:i}),a._addPoint(null!==(r=t.lat)&&void 0!==r?r:t[1],null!==(o=t.lng)&&void 0!==o?o:t[0],null!==(s=null!==(l=t.alt)&&void 0!==l?l:t.meta.ele)&&void 0!==s?s:t[2]),a.fire(\"elepoint_added\",{point:t,index:a._data.length-1})})),this.fire(\"eletrack_added\",{coords:t,index:this._data.length-1})},_addPoint:function(t,e,a){if(this.options.reverseCoords){var i=[e,t];t=i[0],e=i[1]}this._data.push({x:t,y:e,z:a,latlng:L.latLng(t,e,a)}),this.fire(\"eledata_updated\",{index:this._data.length-1})},_addLayer:function(t){t&&this._layers.addLayer(t),t&&this.options.distanceMarkers&&this.options.distanceMarkers.lazy&&t.on(\"add remove\",(function(t){return L.DistanceMarkers&&t.target instanceof L.Polyline&&t.target[t.type+\"DistanceMarkers\"]()}))},_addMarker:function(t){t&&this._markers.addLayer(t)},_initAlmostOverHandler:function(t,e){var a=this;t&&this.options.almostOver&&this.lazyLoad(this.__LGEOMUTIL).then((function(){return a.lazyLoad(a.__LALMOSTOVER)})).then((function(){t.addHandler(\"almostOver\",L.Handler.AlmostOver),L.GeometryUtil&&t.almostOver&&t.almostOver.enabled()&&(t.almostOver.addLayer(e),t.on(\"almost:move\",(function(t){return a._mousemoveLayerHandler(t)})).on(\"almost:out\",(function(t){return a._mouseoutHandler(t)})))}))},_initDistanceMarkers:function(t,e){var a=this;t&&(this.options.distanceMarkers?this.lazyLoad(this.__LGEOMUTIL).then((function(){return a.lazyLoad(a.__LDISTANCEM)})).then((function(){return a.options.polyline&&e.addTo(t)})):this.options.polyline&&e.addTo(t))},_initElevationDiv:function(){var t=y(this.options.elevationDiv);return t||(this.options.elevationDiv=\"#elevation-div_\"+w(),t=m(\"div\",\"leaflet-control elevation elevation-div\",{id:this.options.elevationDiv.substr(1)})),this.options.detached&&d(t,\"leaflet-control\",\"elevation-detached\"),this.eleDiv=t},_initMapIntegrations:function(t,e){var a=t._map;t._map?(a.once(\"layeradd\",(function(a){return t.options.autofitBounds&&t.fitBounds(e.getBounds())})),L.Browser.mobile?t.options.polyline&&e.addTo(a):(t._initAlmostOverHandler(a,e),t._initDistanceMarkers(a,e))):console.warn(\"Undefined elevation map object\")},_collapse:function(){d(this._container,\"elevation-expanded\",\"elevation-collapsed\")},_expand:function(){d(this._container,\"elevation-collapsed\",\"elevation-expanded\")},_fixCanvasPaths:function(){var t=L.Canvas.prototype._fillStroke,e=this;L.Canvas.include({_fillStroke:function(a,i){if(e._layers.hasLayer(i)){var n=e.options.theme.replace(\"-theme\",\"\"),r=A[n]||{},o=i.options;if(o.color=r.line||r.area||n,o.stroke=!!o.color,t.call(this,a,i),o.stroke&&0!==o.weight){var s=a.globalCompositeOperation||\"source-over\";a.globalCompositeOperation=\"destination-over\",a.strokeStyle=r.outline||\"#FFF\",a.lineWidth=1.75*o.weight,a.stroke(),a.globalCompositeOperation=s}}else t.call(this,a,i)}})},_fixTooltipSize:function(){var t=this;this.on(\"elechart_init\",(function(){return t.once(\"elechart_change elechart_hover\",(function(e){t._chartEnabled&&(t._chart._showDiagramIndicator(e.data,e.xCoord),t._chart._showDiagramIndicator(e.data,e.xCoord)),t._updateMarker(e.data)}))}))},_findItemForLatLng:function(t){return this._data[this._chart._findIndexForLatLng(t)]},_findItemForX:function(t){return this._data[this._chart._findIndexForXCoord(t)]},_fireEvt:function(t,e,a){this.fire&&this.fire(t,e,a),this._map&&this._map.fire(t,e,a)},_height:function(){if(this._chart)return this._chart._height();var t=this.options;return t.height-t.margins.top-t.margins.bottom},_hideMarker:function(){this.options.autohideMarker&&this._marker.remove()},_initChart:function(t){var e=this.options;if(e.xTicks=this._xTicks(),e.yTicks=this._yTicks(),e.detached){var a=this.eleDiv,i=a.offsetWidth,n=a.offsetHeight;i>0&&(e.width=i),n>20&&(e.height=n-20)}else{var r=this._map.getContainer().clientWidth;e._maxWidth=e._maxWidth>e.width?e._maxWidth:e.width,this._container.style.maxWidth=e._maxWidth+\"px\",e._maxWidth>r&&(e.width=r-30)}var o=this._chart=new U(e,this);this._x=this._chart._x,this._y=this._chart._y,d3.select(t).call(o.render()),o.on(\"reset_drag\",this._hideMarker,this).on(\"mouse_enter\",this._mouseenterHandler,this).on(\"dragged\",this._dragendHandler,this).on(\"mouse_move\",this._mousemoveHandler,this).on(\"mouse_out\",this._mouseoutHandler,this).on(\"ruler_filter\",this._rulerFilterHandler,this).on(\"zoom\",this._updateChart,this).on(\"elepath_toggle\",this._toggleChartHandler,this).on(\"margins_updated\",this._resizeChart,this),this.fire(\"elechart_axis\"),this.options.legend&&this.fire(\"elechart_legend\"),this.fire(\"elechart_init\")},_initLayer:function(){var t=this;this._layers.on(\"layeradd layerremove\",(function(e){var a=e.layer;h(a.getElement&&a.getElement(),t.options.polyline.className+\" \"+t.options.theme,\"layeradd\"==e.type),p(a,\"mousemove\",t._mousemoveLayerHandler.bind(t),\"layeradd\"==e.type),p(a,\"mouseout\",t._mouseoutHandler.bind(t),\"layeradd\"==e.type)}))},_initMarker:function(t){var e=t.getPane(\"elevationPane\");e||((e=this._pane=t.createPane(\"elevationPane\",t.getPane(\"norotatePane\")||t.getPane(\"mapPane\"))).style.zIndex=625,e.style.pointerEvents=\"none\"),this._renderer&&this._renderer.remove(),this._renderer=L.svg({pane:\"elevationPane\"}).addTo(this._map),this._marker=new J(this.options),this.fire(\"elechart_marker\")},_initButton:function(t){if(!L.Browser.mobile&&this.options.detached||L.DomEvent.disableClickPropagation(t).disableScrollPropagation(t),!this.options.detached){var e=this._button=m(\"a\",\"elevation-toggle elevation-toggle-icon\"+(this.options.autohide?\"\":\" close-button\"),{href:\"#\",title:L._(\"Elevation\")},t);this.options.collapsed&&(this._collapse(),this.options.autohide?(x(t,\"mouseover\",this._expand,this),x(t,\"mouseout\",this._collapse,this)):(x(e,\"click\",L.DomEvent.stop),x(e,\"click\",this._toggle,this)),x(e,\"focus\",this._toggle,this),this._map.on(\"click\",this._collapse,this))}},_initSummary:function(t){this._summary=new Y({summary:this.options.summary},this),d3.select(t).call(this._summary.render())},_keydownHandler:function(t){this.options.detached||\"Escape\"!==t.key||this._collapse()},_loadFile:function(t){var e=this;fetch(t).then((function(t){return t.text()})).then((function(a){e._downloadURL=t,e._parseFromString(a).then((function(t){return t&&e._loadLayer(t)}))})).catch((function(t){return console.warn(t)}))},_loadLayer:function(t){var e=this,a=e.options,i=a.wptIcons,n=a.wptLabels,r=L.geoJson(t,{distanceMarkers:e.options.distanceMarkers,style:function(t){var a=L.extend({},e.options.polyline);return e.options.theme&&(a.className+=\" \"+e.options.theme),a},pointToLayer:function(t,a){var r,o,s;if(e.options.waypoints){var l=t.properties,c=null!==(r=l.desc)&&void 0!==r?r:\"\",h=null!==(o=l.name)&&void 0!==o?o:\"\",d=(null!==(s=l.sym)&&void 0!==s?s:h).replace(\" \",\"-\").replace('\"',\"\").replace(\"'\",\"\").toLowerCase();if([!0,\"dots\"].includes(e.options.waypoints)&&e._registerCheckPoint({latlng:a,label:[!0,\"dots\"].includes(n)?h:\"\"}),[!0,\"markers\"].includes(e.options.waypoints)&&0!=i){i.hasOwnProperty(d)||(i[d]=L.divIcon(L.extend({},i[\"\"].options,{html:'<i class=\"elevation-waypoint-icon '+d+'\"></i>'})));var u=L.marker(a,{icon:i[d]});if([!0,\"markers\"].includes(n)&&(h||c)){var _=decodeURI(\"<b>\"+h+\"</b>\"+(c.length>0?\"<br>\"+c:\"\"));u.bindPopup(_,{className:\"elevation-popup\",keepInView:!0}).openPopup(),u.bindTooltip(_,{className:\"elevation-tooltip\",direction:\"auto\",sticky:!0,opacity:1}).openTooltip()}return e._addMarker(u),e.fire(\"waypoint_added\",{point:u,element:a,properties:l}),u}}},onEachFeature:function(a,i){a.geometry&&\"Point\"!=a.geometry.type&&(e.addData(i),e.track_info=L.extend({},e.track_info,{name:t.name}))}});return e.lazyLoad(e.__D3).then((function(){e._initMapIntegrations(e,r),e._fireEvt(\"eledata_loaded\",{data:t,layer:r,name:e.track_info.name,track_info:e.track_info})})),r},_dragendHandler:function(t){this._hideMarker(),this.fitBounds(L.latLngBounds([t.dragstart.latlng,t.dragend.latlng])),this.fire(\"elechart_dragged\")},_mouseenterHandler:function(t){this.fire(\"elechart_enter\")},_mousemoveHandler:function(t){if(this._data.length&&this._chartEnabled){var e=this._findItemForX(t.xCoord);if(e){var a=t.xCoord;this._chartEnabled&&this._chart._showDiagramIndicator(e,a),this._updateMarker(e),this._setMapView(e),this._map&&l(this._map.getContainer(),\"elechart-hover\"),this.fire(\"elechart_change\",{data:e,xCoord:a}),this.fire(\"elechart_hover\",{data:e,xCoord:a})}}},_mousemoveLayerHandler:function(t){if(this._data.length){var e=this._findItemForLatLng(t.latlng);if(e){var a=e.xDiagCoord;this._chartEnabled&&this._chart._showDiagramIndicator(e,a),this._updateMarker(e),this.fire(\"elechart_change\",{data:e,xCoord:a})}}},_mouseoutHandler:function(){this.options.detached||(this._hideMarker(),this._chart._hideDiagramIndicator()),this._map&&c(this._map.getContainer(),\"elechart-hover\"),this.fire(\"elechart_leave\")},_parseFromGeoJSONString:function(t){try{return JSON.parse(t)}catch(t){}},_parseFromString:function(t){var e=this;return new Promise((function(a){return e.lazyLoad(e.__TOGEOJSON).then((function(){var i;try{i=e._parseFromXMLString(t.trim())}catch(a){i=e._parseFromGeoJSONString(t.toString())}i&&(i=e._prepareMultiLineStrings(i),i=e._prepareAdditionalProperties(i)),a(i)}))}))},_parseFromXMLString:function(t){var e;if(0!=t.indexOf(\"<\"))throw\"Invalid XML\";var a=(new DOMParser).parseFromString(t,\"text/xml\"),i=a.documentElement.tagName.toLowerCase(),n=a.getElementsByTagName(\"name\");if(a.getElementsByTagName(\"parsererror\").length)throw\"Invalid XML\";i in toGeoJSON||(i=\"TrainingCenterDatabase\"==a.documentElement.tagName?\"tcx\":\"gpx\");var r=toGeoJSON[i](a);return r.name=n.length>0?(null!==(e=Array.from(n).find((function(t){return\"trk\"==t.parentElement.tagName})))&&void 0!==e?e:n[0]).textContent:\"\",r},_prepareAdditionalProperties:function(t){return!t.name&&this._downloadURL&&(t.name=this._downloadURL.split(\"/\").pop().split(\"#\")[0].split(\"?\")[0]),t},_prepareMultiLineStrings:function(t){return t.features.forEach((function(e){\"MultiLineString\"==e.geometry.type&&e.geometry.coordinates.forEach((function(a){t.features.push({geometry:{type:\"LineString\",coordinates:a},properties:e.properties,type:\"Feature\"})}))})),t.features.filter((function(t){return\"MultiLineString\"!=t.geometry.type}))},_registerAreaPath:function(t){var e=this;this.on(\"elechart_init\",(function(){return e._chart._registerAreaPath(t)}))},_registerAxisGrid:function(t){var e=this;this.on(\"elechart_axis\",(function(){return e._chart._registerAxisGrid(t)}))},_registerAxisScale:function(t){var e=this;this.on(\"elechart_axis\",(function(){return e._chart._registerAxisScale(t)}))},_registerCheckPoint:function(t){var e=this;this.on(\"elechart_updated\",(function(){return e._chart._registerCheckPoint(t)}))},_registerDataAttribute:function(t){var e=this,a=null;t.init&&this.on(\"elepoint_init\",(function(a){return t.init.call(e,a)})),this.on(\"elepoint_added\",(function(i){if(!1===t.skipNull){var n=e._data[i.index][t.name];if(i.index>0){var r=e._data[i.index-1][t.name];if(isNaN(r)){if(isNaN(a)||isNaN(n)?isNaN(a)?isNaN(n)||(r=n):r=a:r=(a+n)/2,!isNaN(r))return e._data.splice(i.index-1,1);e._data[i.index-1][t.name]=r}}isNaN(n)||(a=n)}e._data[i.index][t.name]=t.fetch.call(e,i.index,i.point),t.update&&(e._data[i.index][t.name]=t.update.call(e,e._data[i.index][t.name],i.index,i.point))}))},_registerTooltip:function(t){var e=this;if(t.chart){var a=L.extend({},t,{value:t.chart});this.on(\"elechart_init\",(function(){return e._chart._registerTooltip(a)}))}if(t.marker){var i=L.extend({},t,{value:t.marker});this.on(\"elechart_marker\",(function(){return e._marker._registerTooltip(i)}))}},_registerSummary:function(t){var e=this;this.on(\"elechart_summary\",(function(){return e._summary._registerSummary(t)}))},_resetDrag:function(){this._chart._resetDrag(),this._hideMarker()},_resetView:function(){this._map&&this._map._isFullscreen||(this._resetDrag(),this._hideMarker(),this.options.autofitBounds&&this.fitBounds())},_resizeChart:function(){if(this._container&&\"none\"!=u(this._container,\"display\")){var t,e=this.options;if(e.detached)t=(this.eleDiv||this._container).offsetWidth;else{var a=this._map.getContainer().clientWidth;t=e._maxWidth>a?a-30:e._maxWidth}if(t){var i=this._chart;e.width=t,i&&i._chart&&(i._chart._resize(e),e.xTicks=this._xTicks(),e.yTicks=this._yTicks(),this._updateChart())}this._updateMapSegments()}},_rulerFilterHandler:function(t){this._updateMapSegments(t.coords)},_toggle:function(){k(this._container,\"elevation-expanded\")?this._collapse():this._expand()},_setMapView:function(t){if(this.options.followMarker&&this._map){var e=this._map.getZoom(),a=this.options.zFollow;\"number\"==typeof a?this._map.setView(t.latlng,e<a?a:e,{animate:!0,duration:.25}):this._map.getBounds().contains(t.latlng)||this._map.setView(t.latlng,e,{animate:!0,duration:.25})}},_toggleChartHandler:function(t){var e=this,a=t.name,i=t.enabled;this._chartEnabled=this._chart._hasActiveLayers(),this._layers.eachLayer((function(t){return h(t.getElement&&t.getElement(),e.options.polyline.className+\" \"+e.options.theme,e._chartEnabled)})),this.options[a]=i||\"disabled\"!=this.options[a]?\"disabled\":\"enabled\",this._chartEnabled||(this._chart._hideDiagramIndicator(),this._marker.remove())},_updateChart:function(){\n/*!this._data.length ||*/\nthis._chart&&this._container&&(this.fire(\"elechart_axis\"),this.fire(\"elechart_area\"),this._chart.update({data:this._data,options:this.options}),this._x=this._chart._x,this._y=this._chart._y,this.fire(\"elechart_updated\"))},_updateMarker:function(t){this._marker&&this._marker.update({map:this._map,item:t,maxElevation:this.track_info.elevation_max||0,options:this.options})},_rotateMarker:function(){this._marker&&this._marker.update()},_updateMapSegments:function(t){this._markedSegments.setLatLngs(t||[]),t&&this._map&&!this._map.hasLayer(this._markedSegments)&&this._markedSegments.addTo(this._map)},_updateSummary:function(){var t=this;this._summary.reset(),this.options.summary&&(this.fire(\"elechart_summary\"),this._summary.update()),this.options.downloadLink&&this._downloadURL&&(this._summary._container.innerHTML+='<span class=\"download\"><a href=\"#\">'+L._(\"Download\")+\"</a></span>\",y(\".download a\",this._summary._container).onclick=function(e){e.preventDefault();var a={downloadLink:t.options.downloadLink,confirm:n.bind(t,t._downloadURL)};\"modal\"==t.options.downloadLink&&\"function\"==typeof CustomEvent?document.dispatchEvent(new CustomEvent(\"eletrack_download\",{detail:a})):\"link\"!=t.options.downloadLink&&!0!==t.options.downloadLink||a.confirm(),t.fire(\"eletrack_download\",a)})},_width:function(){if(this._chart)return this._chart._width();var t=this.options;return t.width-t.margins.left-t.margins.right},_xTicks:function(){return this.__xTicks&&(this.__xTicks=this.options.xTicks),this.__xTicks||Math.round(this._width()/75)},_yTicks:function(){return this.__yTicks&&(this.__yTicks=this.options.yTicks),this.__yTicks||Math.round(this._height()/30)}});W.addInitHook((function(){var t=this,e=this.options,a={};e.imperial?(e.distanceFactor=this.__mileFactor,a.label=\"mi\"):(e.distanceFactor=e.distanceFactor||1,a.label=e.xLabel),this._registerDataAttribute({name:\"dist\",init:function(){},fetch:function(a){var i=t._data[a].latlng.distanceTo(t._data[a>0?a-1:a].latlng)*e.distanceFactor;return Math.round(i/1e3*1e5)/1e5},update:function(e){return t.track_info.distance=t.track_info.distance||0,t.track_info.distance+=e,t.track_info.distance}}),\"summary\"!=this.options.distance&&this._registerAxisScale({axis:\"x\",position:\"bottom\",scale:\"x\",label:a.label,labelY:25,labelX:function(){return t._width()+6},name:\"distance\"}),this._registerAxisGrid({axis:\"x\",position:\"bottom\",scale:\"x\"}),this._registerTooltip({name:\"x\",chart:function(t){return L._(\"x: \")+d3.format(\".\"+e.decimalsX+\"f\")(t[e.xAttr])+\" \"+a.label},order:20}),this._registerSummary({totlen:{label:\"Total Length: \",value:function(t){return(t.distance||0).toFixed(2)+\" \"+a.label},order:10}})})),W.addInitHook((function(){var t=this,e=this.options,a={};a.label=e.timeLabel||\"t\",e.timeFactor=e.timeFactor||3600,this._timeAVGSpeed=(e.timeAVGSpeed||3.6)*(e.speedFactor||1),e.timeFormat?\"time\"==e.timeFormat?e.timeFormat=function(t){return new Date(t).toLocaleTimeString()}:\"date\"==e.timeFormat&&(e.timeFormat=function(t){return new Date(t).toLocaleDateString()}):e.timeFormat=function(t){return new Date(t).toLocaleString().replaceAll(\"/\",\"-\").replaceAll(\",\",\" \")},e.xTimeFormat=e.xTimeFormat||function(t){return i(t).split(\"'\")[0]},this._registerDataAttribute({name:\"time\",init:function(t){var e=t.point,a=t.props,i=t.id;a&&(\"coordTimes\"in a?e.meta.time=new Date(Date.parse(a.coordTimes[i])):\"times\"in a?e.meta.time=new Date(Date.parse(a.times[i])):\"time\"in a&&(e.meta.time=new Date(Date.parse(\"object\"===j(a.time)?a.time[i]:a.time))))},fetch:function(t,e){if(!e.meta||!e.meta.time)if(e.meta=e.meta||{},t>0){var a=this._data[t].dist-this._data[t-1].dist,i=this._data[t-1].time.getTime(),n=a/this._timeAVGSpeed*this.options.timeFactor*1e3;e.meta.time=new Date(i+n)}else e.meta.time=new Date(Date.now());var r=e.meta.time;return r.getTime()-60*r.getTimezoneOffset()*1e3==0&&(r=0),r},update:function(t,e){return this.track_info.time=(this.track_info.time||0)+Math.abs(this._data[e].time-this._data[e>0?e-1:e].time),this._data[e].duration=this.track_info.time,t}}),e.time&&\"summary\"!=e.time&&!L.Browser.mobile&&this._registerAxisScale({axis:\"x\",position:\"top\",scale:{attr:\"duration\",min:0},label:a.label,labelY:-10,labelX:function(){return t._width()},name:\"time\",tickFormat:function(t){return 0==t?\"\":e.xTimeFormat(t)},onAxisMount:function(e){e.select(\".domain\").remove(),e.selectAll(\"text\").attr(\"opacity\",.65).style(\"font-family\",\"Monospace\").style(\"font-size\",\"110%\"),e.selectAll(\".tick line\").attr(\"y2\",t._height()).attr(\"stroke-dasharray\",2).attr(\"opacity\",.75)}}),this.options.timestamps&&this._registerTooltip({name:\"date\",chart:function(e){return L._(\"t: \")+t.options.timeFormat(e.time)},order:20}),this.options.time&&(this._registerTooltip({name:\"time\",chart:function(t){return L._(\"T: \")+i(t.duration||0)},order:20}),this._registerSummary({tottime:{label:\"Total Time: \",value:function(t){return i(t.time||0)},order:20}}))})),W.addInitHook((function(){var t=this,e=this.options,a={},i=e.theme.replace(\"-theme\",\"\"),n=A[i]||{};e.imperial?(e.altitudeFactor=this.__footFactor,a.label=\"ft\"):(e.altitudeFactor=e.heightFactor||e.altitudeFactor||1,a.label=e.yLabel),this._registerDataAttribute({name:\"z\",skipNull:this.options.skipNullZCoords,init:function(t){var e=t.point;\"alt\"in e&&(e.meta.ele=e.alt)},fetch:function(a){return t._data[a].z*e.altitudeFactor},update:function(e,a){t.track_info.elevation_max=t.track_info.elevation_max||-1/0,t.track_info.elevation_min=t.track_info.elevation_max||1/0,t.track_info.elevation_avg=t.track_info.elevation_avg||0;var i=t._data,n=t.track_info;if(t.options.altitudeDeltaMax){var r=e-i[a>0?a-1:a].z,o=t.options.altitudeDeltaMax;Math.abs(r)>o&&(e=i[a-1].z+o*Math.sign(r))}return(e=s(e,t.options.altitudeRange))>n.elevation_max&&(n.elevation_max=e),e<n.elevation_min&&(n.elevation_min=e),n.elevation_avg=(e+n.elevation_avg)/2,e}}),this._registerAxisScale({axis:\"y\",position:\"left\",scale:\"y\",label:a.label,labelX:-3,labelY:-8,name:\"altitude\",visbile:\"summary\"!=this.options.altitude}),this._registerAxisGrid({axis:\"y\",position:\"left\",scale:\"y\"}),this._registerAreaPath({name:\"altitude\",label:\"Altitude\",scaleX:\"distance\",scaleY:\"altitude\",color:n.area||i,strokeColor:e.detached?n.stroke:\"#000\",strokeOpacity:\"1\",fillOpacity:e.detached?n.alpha||\"0.8\":1,preferCanvas:e.preferCanvas,visbile:\"summary\"!=this.options.altitude}),this._registerTooltip({name:\"y\",chart:function(t){return L._(\"y: \")+d3.format(\".\"+e.decimalsY+\"f\")(t[e.yAttr])+\" \"+a.label},marker:function(t){return d3.format(\".\"+e.decimalsY+\"f\")(t[e.yAttr])+\" \"+a.label},order:10}),this._registerSummary({maxele:{label:\"Max Elevation: \",value:function(t){return(t.elevation_max||0).toFixed(2)+\" \"+a.label},order:30},minele:{label:\"Min Elevation: \",value:function(t){return(t.elevation_min||0).toFixed(2)+\" \"+a.label},order:30},avgele:{label:\"Avg Elevation: \",value:function(t){return(t.elevation_avg||0).toFixed(2)+\" \"+a.label},order:30}})})),W.addInitHook((function(){var t=this;if(this.options.slope){var e=this.options,a={};a.label=e.slopeLabel||\"%\",this._registerDataAttribute({name:\"slope\",fetch:function(e){var a=t._data,i=1e3*(a[e].dist-a[e>0?e-1:e].dist),n=a[e].z-a[e>0?e-1:e].z;return isNaN(n)||0===i?0:n/i*100},update:function(e,a){t.track_info.ascent=t.track_info.ascent||0,t.track_info.descent=t.track_info.descent||0,t.track_info.slope_max=t.track_info.slope_max||-1/0,t.track_info.slope_min=t.track_info.slope_min||1/0,t.track_info.slope_avg=t.track_info.slope_avg||0;var i=t.track_info,n=t._data,r=n[a].z-n[a>0?a-1:a].z;if(t.options.slopeDeltaMax){var o=slop-n[a>0?a-1:a].slope,l=t.options.slopeDeltaMax;Math.abs(o)>l&&(e=n[a-1].slope+l*Math.sign(o))}return e=s(e,t.options.slopeRange),r>0?t.track_info.ascent+=r:r<0&&(t.track_info.descent-=r),e>i.slope_max&&(i.slope_max=e),e<i.slope_min&&(i.slope_min=e),i.slope_avg=(e+i.slope_avg)/2,L.Util.formatNum(e,2)}}),this._registerAxisScale({axis:\"y\",position:\"right\",scale:{min:-1,max:1},tickPadding:16,label:a.label,labelX:25,labelY:-8,name:\"slope\",visbile:\"summary\"!=this.options.slope}),this._registerAreaPath({name:\"slope\",label:\"Slope\",yAttr:\"slope\",scaleX:\"distance\",scaleY:\"slope\",color:\"#F00\",strokeColor:\"#000\",strokeOpacity:\"0.5\",fillOpacity:\"0.25\",visbile:\"summary\"!=this.options.slope}),this._registerTooltip({name:\"slope\",chart:function(t){return L._(\"m: \")+t.slope+a.label},marker:function(t){return Math.round(t.slope)+a.label},order:40}),this._registerSummary({ascent:{label:\"Total Ascent: \",value:function(e){return Math.round(e.ascent||0)+\" \"+(t.options.imperial?\"ft\":\"m\")},order:40},descent:{label:\"Total Descent: \",value:function(e){return Math.round(e.descent||0)+\" \"+(t.options.imperial?\"ft\":\"m\")},order:40},minslope:{label:\"Min Slope: \",value:function(t){return Math.round(t.slope_min||0)+\" \"+a.label},order:40},maxslope:{label:\"Max Slope: \",value:function(t){return Math.round(t.slope_max||0)+\" \"+a.label},order:40},avgslope:{label:\"Avg Slope: \",value:function(t){return Math.round(t.slope_avg||0)+\" \"+a.label},order:40}})}})),W.addInitHook((function(){var t=this;if(this.options.speed||this.options.acceleration){var e=this.options,a={};a.label=e.speedLabel||L._(e.imperial?\"mph\":\"km/h\"),e.speedFactor=e.speedFactor||1,this._registerDataAttribute({name:\"speed\",init:function(){},fetch:function(a){var i=t._data,n=1e3*(i[a].dist-i[a>0?a-1:a].dist),r=i[a].time-i[a>0?a-1:a].time;return r>0?Math.abs(n/r*e.timeFactor)*e.speedFactor:0},update:function(e,a){t.track_info.speed_max=t.track_info.speed_max||-1/0,t.track_info.speed_min=t.track_info.speed_min||1/0,t.track_info.speed_avg=t.track_info.speed_avg||0;var i=t._data,n=t.track_info;if(t.options.speedDeltaMax){var r=e-i[a>0?a-1:a].speed,o=t.options.speedDeltaMax;Math.abs(r)>o&&(e=i[a-1].speed+o*Math.sign(r))}return(e=s(e,t.options.speedRange))>n.speed_max&&(n.speed_max=e),e<n.speed_min&&(n.speed_min=e),n.speed_avg=(e+n.speed_avg)/2,L.Util.formatNum(e,2)}}),this.options.speed&&\"summary\"!=this.options.speed&&(this._registerAxisScale({axis:\"y\",position:\"right\",scale:{min:0,max:1},tickPadding:16,label:a.label,labelX:25,labelY:-8,name:\"speed\"}),this._registerAreaPath({name:\"speed\",label:\"Speed\",yAttr:\"speed\",scaleX:\"distance\",scaleY:\"speed\",color:\"#03ffff\",strokeColor:\"#000\",strokeOpacity:\"0.5\",fillOpacity:\"0.25\"})),this.options.speed&&(this._registerTooltip({name:\"speed\",chart:function(t){return L._(\"v: \")+t.speed+\" \"+a.label},marker:function(t){return Math.round(t.speed)+\" \"+a.label},order:50}),this._registerSummary({minspeed:{label:\"Min Speed: \",value:function(t){return Math.round(t.speed_min||0)+\" \"+a.label},order:50},maxspeed:{label:\"Max Speed: \",value:function(t){return Math.round(t.speed_max||0)+\" \"+a.label},order:50},avgspeed:{label:\"Avg Speed: \",value:function(t){return Math.round(t.speed_avg||0)+\" \"+a.label},order:50}}))}})),W.addInitHook((function(){var t=this;if(this.options.acceleration){var e=this.options,a={};a.label=e.accelerationLabel||L._(e.imperial?\"ft/s²\":\"m/s²\"),e.accelerationFactor=e.accelerationFactor||1,this._registerDataAttribute({name:\"acceleration\",init:function(){},fetch:function(a){var i=t._data,n=(i[a].speed-i[a>0?a-1:a].speed)*(1e3/e.timeFactor),r=(i[a].time-i[a>0?a-1:a].time)/1e3;return r>0?Math.abs(n/r)*e.accelerationFactor:0},update:function(e,a){t.track_info.acceleration_max=t.track_info.acceleration_max||-1/0,t.track_info.acceleration_min=t.track_info.acceleration_min||1/0,t.track_info.acceleration_avg=t.track_info.acceleration_avg||0;var i=t._data,n=t.track_info;if(t.options.accelerationDeltaMax){var r=e-i[a>0?a-1:a].acceleration,o=t.options.accelerationDeltaMax;Math.abs(r)>o&&(e=i[a-1].acceleration+o*Math.sign(r))}return(e=s(e,t.options.accelerationRange))>n.acceleration_max&&(n.acceleration_max=e),e<n.acceleration_min&&(n.acceleration_min=e),n.acceleration_avg=(e+n.acceleration_avg)/2,L.Util.formatNum(e,2)}}),\"summary\"!=this.options.acceleration&&(this._registerAxisScale({axis:\"y\",position:\"right\",scale:{min:0,max:1},tickPadding:16,label:a.label,labelX:25,labelY:-8,name:\"acceleration\"}),this._registerAreaPath({name:\"acceleration\",label:\"Acceleration\",yAttr:\"acceleration\",scaleX:\"distance\",scaleY:\"acceleration\",color:\"#050402\",strokeColor:\"#000\",strokeOpacity:\"0.5\",fillOpacity:\"0.25\"})),this._registerTooltip({name:\"acceleration\",chart:function(t){return L._(\"a: \")+t.acceleration+\" \"+a.label},marker:function(t){return Math.round(t.acceleration)+\" \"+a.label},order:60}),this._registerSummary({minacceleration:{label:\"Min Acceleration: \",value:function(t){return Math.round(t.acceleration_min||0)+\" \"+a.label},order:60},maxacceleration:{label:\"Max Acceleration: \",value:function(t){return Math.round(t.acceleration_max||0)+\" \"+a.label},order:60},avgacceleration:{label:\"Avg Acceleration: \",value:function(t){return Math.round(t.acceleration_avg||0)+\" \"+a.label},order:60}})}})),W.Utils=C,W.Components=X,W.Chart=U,R=L.i18n.bind({}),L.i18n=L._=function(t,e){return L.locale&&L.locales[L.locale]&&\"\"==L.locales[L.locale][t]&&(L.locales[L.locale][t]=\"\"),R.call(null,t,e)},W.addInitHook((function(){this.enableDragging=this.enableBrush,this.disableDragging=this.disableBrush,this.loadChart=this.addTo,this.loadData=this.load,this.loadGPX=this.load,this.loadGeoJSON=this.load,this.loadXML=this.load,this.loadFile=this.load,this._addGPXData=this._addGeoJSONData,this._registerFocusLabel=this._registerTooltip})),L.control.elevation=function(t){return new W(t)}}));\n//# sourceMappingURL=leaflet-elevation.min.js.map\n","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?t(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],t):t(((e=e||self).Leaflet=e.Leaflet||{},e.Leaflet.markercluster={}))}(this,function(e){\"use strict\";var t=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:\"#222\",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(e){L.Util.setOptions(this,e),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var t=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,t?this._withAnimation:this._noAnimation),this._markerCluster=t?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(e){if(e instanceof L.LayerGroup)return this.addLayers([e]);if(!e.getLatLng)return this._nonPointGroup.addLayer(e),this.fire(\"layeradd\",{layer:e}),this;if(!this._map)return this._needsClustering.push(e),this.fire(\"layeradd\",{layer:e}),this;if(this.hasLayer(e))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(e,this._maxZoom),this.fire(\"layeradd\",{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var t=e,i=this._zoom;if(e.__parent)for(;t.__parent._zoom>=i;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(e,t):this._animationAddLayerNonAnimated(e,t)),this},removeLayer:function(e){return e instanceof L.LayerGroup?this.removeLayers([e]):(e.getLatLng?this._map?e.__parent&&(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(e)),this._removeLayer(e,!0),this.fire(\"layerremove\",{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),e.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(e)&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow())):(!this._arraySplice(this._needsClustering,e)&&this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire(\"layerremove\",{layer:e})):(this._nonPointGroup.removeLayer(e),this.fire(\"layerremove\",{layer:e})),this)},addLayers:function(n,s){if(!L.Util.isArray(n))return this.addLayer(n);var o,a=this._featureGroup,h=this._nonPointGroup,l=this.options.chunkedLoading,u=this.options.chunkInterval,_=this.options.chunkProgress,d=n.length,p=0,c=!0;if(this._map){var f=(new Date).getTime(),m=L.bind(function(){var e=(new Date).getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();p<d;p++){if(l&&p%200==0){var t=(new Date).getTime()-e;if(u<t)break}if((o=n[p])instanceof L.LayerGroup)c&&(n=n.slice(),c=!1),this._extractNonGroupLayers(o,n),d=n.length;else if(o.getLatLng){if(!this.hasLayer(o)&&(this._addLayer(o,this._maxZoom),s||this.fire(\"layeradd\",{layer:o}),o.__parent&&2===o.__parent.getChildCount())){var i=o.__parent.getAllChildMarkers(),r=i[0]===o?i[1]:i[0];a.removeLayer(r)}}else h.addLayer(o),s||this.fire(\"layeradd\",{layer:o})}_&&_(p,d,(new Date).getTime()-f),p===d?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(m,this.options.chunkDelay)},this);m()}else for(var e=this._needsClustering;p<d;p++)(o=n[p])instanceof L.LayerGroup?(c&&(n=n.slice(),c=!1),this._extractNonGroupLayers(o,n),d=n.length):o.getLatLng?this.hasLayer(o)||e.push(o):h.addLayer(o);return this},removeLayers:function(e){var t,i,r=e.length,n=this._featureGroup,s=this._nonPointGroup,o=!0;if(!this._map){for(t=0;t<r;t++)(i=e[t])instanceof L.LayerGroup?(o&&(e=e.slice(),o=!1),this._extractNonGroupLayers(i,e),r=e.length):(this._arraySplice(this._needsClustering,i),s.removeLayer(i),this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire(\"layerremove\",{layer:i}));return this}if(this._unspiderfy){this._unspiderfy();var a=e.slice(),h=r;for(t=0;t<h;t++)(i=a[t])instanceof L.LayerGroup?(this._extractNonGroupLayers(i,a),h=a.length):this._unspiderfyLayer(i)}for(t=0;t<r;t++)(i=e[t])instanceof L.LayerGroup?(o&&(e=e.slice(),o=!1),this._extractNonGroupLayers(i,e),r=e.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire(\"layerremove\",{layer:i}),n.hasLayer(i)&&(n.removeLayer(i),i.clusterShow&&i.clusterShow())):(s.removeLayer(i),this.fire(\"layerremove\",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(e){e.off(this._childMarkerEventHandlers,this),delete e.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var e=new L.LatLngBounds;this._topClusterLevel&&e.extend(this._topClusterLevel._bounds);for(var t=this._needsClustering.length-1;0<=t;t--)e.extend(this._needsClustering[t].getLatLng());return e.extend(this._nonPointGroup.getBounds()),e},eachLayer:function(e,t){var i,r,n,s=this._needsClustering.slice(),o=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(s),r=s.length-1;0<=r;r--){for(i=!0,n=o.length-1;0<=n;n--)if(o[n].layer===s[r]){i=!1;break}i&&e.call(t,s[r])}this._nonPointGroup.eachLayer(e,t)},getLayers:function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},getLayer:function(t){var i=null;return t=parseInt(t,10),this.eachLayer(function(e){L.stamp(e)===t&&(i=e)}),i},hasLayer:function(e){if(!e)return!1;var t,i=this._needsClustering;for(t=i.length-1;0<=t;t--)if(i[t]===e)return!0;for(t=(i=this._needsRemoving).length-1;0<=t;t--)if(i[t].layer===e)return!1;return!(!e.__parent||e.__parent._group!==this)||this._nonPointGroup.hasLayer(e)},zoomToShowLayer:function(e,t){var i=this._map;\"function\"!=typeof t&&(t=function(){});var r=function(){!i.hasLayer(e)&&!i.hasLayer(e.__parent)||this._inZoomAnimation||(this._map.off(\"moveend\",r,this),this.off(\"animationend\",r,this),i.hasLayer(e)?t():e.__parent._icon&&(this.once(\"spiderfied\",t,this),e.__parent.spiderfy()))};e._icon&&this._map.getBounds().contains(e.getLatLng())?t():e.__parent._zoom<Math.round(this._map._zoom)?(this._map.on(\"moveend\",r,this),this._map.panTo(e.getLatLng())):(this._map.on(\"moveend\",r,this),this.on(\"animationend\",r,this),e.__parent.zoomToBounds())},onAdd:function(e){var t,i,r;if(this._map=e,!isFinite(this._map.getMaxZoom()))throw\"Map has no maxZoom specified\";for(this._featureGroup.addTo(e),this._nonPointGroup.addTo(e),this._gridClusters||this._generateInitialClusters(),this._maxLat=e.options.crs.projection.MAX_LATITUDE,t=0,i=this._needsRemoving.length;t<i;t++)(r=this._needsRemoving[t]).newlatlng=r.layer._latlng,r.layer._latlng=r.latlng;for(t=0,i=this._needsRemoving.length;t<i;t++)r=this._needsRemoving[t],this._removeLayer(r.layer,!0),r.layer._latlng=r.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on(\"zoomend\",this._zoomEnd,this),this._map.on(\"moveend\",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(e){e.off(\"zoomend\",this._zoomEnd,this),e.off(\"moveend\",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(\" leaflet-cluster-anim\",\"\"),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(e){for(var t=e;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:function(e,t){for(var i=e.length-1;0<=i;i--)if(e[i]===t)return e.splice(i,1),!0},_removeFromGridUnclustered:function(e,t){for(var i=this._map,r=this._gridUnclustered,n=Math.floor(this._map.getMinZoom());n<=t&&r[t].removeObject(e,i.project(e.getLatLng(),t));t--);},_childMarkerDragStart:function(e){e.target.__dragStart=e.target._latlng},_childMarkerMoved:function(e){if(!this._ignoreMove&&!e.target.__dragStart){var t=e.target._popup&&e.target._popup.isOpen();this._moveChild(e.target,e.oldLatLng,e.latlng),t&&e.target.openPopup()}},_moveChild:function(e,t,i){e._latlng=t,this.removeLayer(e),e._latlng=i,this.addLayer(e)},_childMarkerDragEnd:function(e){var t=e.target.__dragStart;delete e.target.__dragStart,t&&this._moveChild(e.target,t,e.target._latlng)},_removeLayer:function(e,t,i){var r=this._gridClusters,n=this._gridUnclustered,s=this._featureGroup,o=this._map,a=Math.floor(this._map.getMinZoom());t&&this._removeFromGridUnclustered(e,this._maxZoom);var h,l=e.__parent,u=l._markers;for(this._arraySplice(u,e);l&&(l._childCount--,l._boundsNeedUpdate=!0,!(l._zoom<a));)t&&l._childCount<=1?(h=l._markers[0]===e?l._markers[1]:l._markers[0],r[l._zoom].removeObject(l,o.project(l._cLatLng,l._zoom)),n[l._zoom].addObject(h,o.project(h.getLatLng(),l._zoom)),this._arraySplice(l.__parent._childClusters,l),l.__parent._markers.push(h),h.__parent=l.__parent,l._icon&&(s.removeLayer(l),i||s.addLayer(h))):l._iconNeedsUpdate=!0,l=l.__parent;delete e.__parent},_isOrIsParent:function(e,t){for(;t;){if(e===t)return!0;t=t.parentNode}return!1},fire:function(e,t,i){if(t&&t.layer instanceof L.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.layer._icon,t.originalEvent.relatedTarget))return;e=\"cluster\"+e}L.FeatureGroup.prototype.fire.call(this,e,t,i)},listens:function(e,t){return L.FeatureGroup.prototype.listens.call(this,e,t)||L.FeatureGroup.prototype.listens.call(this,\"cluster\"+e,t)},_defaultIconCreateFunction:function(e){var t=e.getChildCount(),i=\" marker-cluster-\";return i+=t<10?\"small\":t<100?\"medium\":\"large\",new L.DivIcon({html:\"<div><span>\"+t+\"</span></div>\",className:\"marker-cluster\"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var e=this._map,t=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,r=this.options.zoomToBoundsOnClick,n=this.options.spiderfyOnEveryZoom;(t||r||n)&&this.on(\"clusterclick clusterkeypress\",this._zoomOrSpiderfy,this),i&&(this.on(\"clustermouseover\",this._showCoverage,this),this.on(\"clustermouseout\",this._hideCoverage,this),e.on(\"zoomend\",this._hideCoverage,this))},_zoomOrSpiderfy:function(e){var t=e.layer,i=t;if(\"clusterkeypress\"!==e.type||!e.originalEvent||13===e.originalEvent.keyCode){for(;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===t._childCount&&this.options.spiderfyOnMaxZoom?t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),this.options.spiderfyOnEveryZoom&&t.spiderfy(),e.originalEvent&&13===e.originalEvent.keyCode&&this._map._container.focus()}},_showCoverage:function(e){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),2<e.layer.getChildCount()&&e.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(e.layer.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var e=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,r=this.options.spiderfyOnEveryZoom,n=this._map;(e||i||r)&&this.off(\"clusterclick clusterkeypress\",this._zoomOrSpiderfy,this),t&&(this.off(\"clustermouseover\",this._showCoverage,this),this.off(\"clustermouseout\",this._hideCoverage,this),n.off(\"zoomend\",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var e=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),e),this._currentShownBounds=e}},_generateInitialClusters:function(){var e=Math.ceil(this._map.getMaxZoom()),t=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,r=i;\"function\"!=typeof i&&(r=function(){return i}),null!==this.options.disableClusteringAtZoom&&(e=this.options.disableClusteringAtZoom-1),this._maxZoom=e,this._gridClusters={},this._gridUnclustered={};for(var n=e;t<=n;n--)this._gridClusters[n]=new L.DistanceGrid(r(n)),this._gridUnclustered[n]=new L.DistanceGrid(r(n));this._topClusterLevel=new this._markerCluster(this,t-1)},_addLayer:function(e,t){var i,r,n=this._gridClusters,s=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(e),e.on(this._childMarkerEventHandlers,this);o<=t;t--){i=this._map.project(e.getLatLng(),t);var a=n[t].getNearObject(i);if(a)return a._addChild(e),void(e.__parent=a);if(a=s[t].getNearObject(i)){var h=a.__parent;h&&this._removeLayer(a,!1);var l=new this._markerCluster(this,t,a,e);n[t].addObject(l,this._map.project(l._cLatLng,t)),a.__parent=l;var u=e.__parent=l;for(r=t-1;r>h._zoom;r--)u=new this._markerCluster(this,r,u),n[r].addObject(u,this._map.project(a.getLatLng(),r));return h._addChild(u),void this._removeFromGridUnclustered(a,t)}s[t].addObject(e,i)}this._topClusterLevel._addChild(e),e.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(e){e instanceof L.MarkerCluster&&e._iconNeedsUpdate&&e._updateIcon()})},_enqueue:function(e){this._queue.push(e),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var e=0;e<this._queue.length;e++)this._queue[e].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var e=Math.round(this._map._zoom);this._processQueue(),this._zoom<e&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,e)):this._zoom>e?(this._animationStart(),this._animationZoomOut(this._zoom,e)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(e){var t=this._maxLat;return void 0!==t&&(e.getNorth()>=t&&(e._northEast.lat=1/0),e.getSouth()<=-t&&(e._southWest.lat=-1/0)),e},_animationAddLayerNonAnimated:function(e,t){if(t===e)this._featureGroup.addLayer(e);else if(2===t._childCount){t._addToMap();var i=t.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else t._updateIcon()},_extractNonGroupLayers:function(e,t){var i,r=e.getLayers(),n=0;for(t=t||[];n<r.length;n++)(i=r[n])instanceof L.LayerGroup?this._extractNonGroupLayers(i,t):t.push(i);return t},_overrideMarkerIcon:function(e){return e.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[e]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire(\"animationend\")},_animationZoomOut:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire(\"animationend\")},_animationAddLayer:function(e,t){this._animationAddLayerNonAnimated(e,t)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=\" leaflet-cluster-anim\",this._inZoomAnimation++},_animationZoomIn:function(n,s){var o,a=this._getExpandedVisibleBounds(),h=this._featureGroup,e=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(a,n,e,function(e){var t,i=e._latlng,r=e._markers;for(a.contains(i)||(i=null),e._isSingleParent()&&n+1===s?(h.removeLayer(e),e._recursivelyAddChildrenToMap(null,s,a)):(e.clusterHide(),e._recursivelyAddChildrenToMap(i,s,a)),o=r.length-1;0<=o;o--)t=r[o],a.contains(t._latlng)||h.removeLayer(t)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(a,s),h.eachLayer(function(e){e instanceof L.MarkerCluster||!e._icon||e.clusterShow()}),this._topClusterLevel._recursively(a,n,s,function(e){e._recursivelyRestoreChildPositions(s)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(a,n,e,function(e){h.removeLayer(e),e.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(e,t){this._animationZoomOutSingle(this._topClusterLevel,e-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e,this._getExpandedVisibleBounds())},_animationAddLayer:function(e,t){var i=this,r=this._featureGroup;r.addLayer(e),t!==e&&(2<t._childCount?(t._updateIcon(),this._forceLayout(),this._animationStart(),e._setPos(this._map.latLngToLayerPoint(t.getLatLng())),e.clusterHide(),this._enqueue(function(){r.removeLayer(e),e.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(t,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,i,r){var n=this._getExpandedVisibleBounds(),s=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(n,s,i+1,r);var o=this;this._forceLayout(),t._recursivelyBecomeVisible(n,r),this._enqueue(function(){if(1===t._childCount){var e=t._markers[0];this._ignoreMove=!0,e.setLatLng(e.getLatLng()),this._ignoreMove=!1,e.clusterShow&&e.clusterShow()}else t._recursively(n,r,s,function(e){e._recursivelyRemoveChildrenFromMap(n,s,i+1)});o._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(\" leaflet-cluster-anim\",\"\")),this._inZoomAnimation--,this.fire(\"animationend\")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(e){return new L.MarkerClusterGroup(e)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(e,t,i,r){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:e.options.clusterPane}),this._group=e,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),r&&this._addChild(r)},getAllChildMarkers:function(e,t){e=e||[];for(var i=this._childClusters.length-1;0<=i;i--)this._childClusters[i].getAllChildMarkers(e,t);for(var r=this._markers.length-1;0<=r;r--)t&&this._markers[r].__dragStart||e.push(this._markers[r]);return e},getChildCount:function(){return this._childCount},zoomToBounds:function(e){for(var t,i=this._childClusters.slice(),r=this._group._map,n=r.getBoundsZoom(this._bounds),s=this._zoom+1,o=r.getZoom();0<i.length&&s<n;){s++;var a=[];for(t=0;t<i.length;t++)a=a.concat(i[t]._childClusters);i=a}s<n?this._group._map.setView(this._latlng,s):n<=o?this._group._map.setView(this._latlng,o+1):this._group._map.fitBounds(this._bounds,e)},getBounds:function(){var e=new L.LatLngBounds;return e.extend(this._bounds),e},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(e,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(e),e instanceof L.MarkerCluster?(t||(this._childClusters.push(e),e.__parent=this),this._childCount+=e._childCount):(t||this._markers.push(e),this._childCount++),this.__parent&&this.__parent._addChild(e,!0)},_setClusterCenter:function(e){this._cLatLng||(this._cLatLng=e._cLatLng||e._latlng)},_resetBounds:function(){var e=this._bounds;e._southWest&&(e._southWest.lat=1/0,e._southWest.lng=1/0),e._northEast&&(e._northEast.lat=-1/0,e._northEast.lng=-1/0)},_recalculateBounds:function(){var e,t,i,r,n=this._markers,s=this._childClusters,o=0,a=0,h=this._childCount;if(0!==h){for(this._resetBounds(),e=0;e<n.length;e++)i=n[e]._latlng,this._bounds.extend(i),o+=i.lat,a+=i.lng;for(e=0;e<s.length;e++)(t=s[e])._boundsNeedUpdate&&t._recalculateBounds(),this._bounds.extend(t._bounds),i=t._wLatLng,r=t._childCount,o+=i.lat*r,a+=i.lng*r;this._latlng=this._wLatLng=new L.LatLng(o/h,a/h),this._boundsNeedUpdate=!1}},_addToMap:function(e){e&&(this._backupLatlng=this._latlng,this.setLatLng(e)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(e,n,t){this._recursively(e,this._group._map.getMinZoom(),t-1,function(e){var t,i,r=e._markers;for(t=r.length-1;0<=t;t--)(i=r[t])._icon&&(i._setPos(n),i.clusterHide())},function(e){var t,i,r=e._childClusters;for(t=r.length-1;0<=t;t--)(i=r[t])._icon&&(i._setPos(n),i.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,i,r,n){this._recursively(t,n,i,function(e){e._recursivelyAnimateChildrenIn(t,e._group._map.latLngToLayerPoint(e.getLatLng()).round(),r),e._isSingleParent()&&r-1===n?(e.clusterShow(),e._recursivelyRemoveChildrenFromMap(t,i,r)):e.clusterHide(),e._addToMap()})},_recursivelyBecomeVisible:function(e,t){this._recursively(e,this._group._map.getMinZoom(),t,null,function(e){e.clusterShow()})},_recursivelyAddChildrenToMap:function(r,n,s){this._recursively(s,this._group._map.getMinZoom()-1,n,function(e){if(n!==e._zoom)for(var t=e._markers.length-1;0<=t;t--){var i=e._markers[t];s.contains(i._latlng)&&(r&&(i._backupLatlng=i.getLatLng(),i.setLatLng(r),i.clusterHide&&i.clusterHide()),e._group._featureGroup.addLayer(i))}},function(e){e._addToMap(r)})},_recursivelyRestoreChildPositions:function(e){for(var t=this._markers.length-1;0<=t;t--){var i=this._markers[t];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(e-1===this._zoom)for(var r=this._childClusters.length-1;0<=r;r--)this._childClusters[r]._restorePosition();else for(var n=this._childClusters.length-1;0<=n;n--)this._childClusters[n]._recursivelyRestoreChildPositions(e)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(e,t,i,r){var n,s;this._recursively(e,t-1,i-1,function(e){for(s=e._markers.length-1;0<=s;s--)n=e._markers[s],r&&r.contains(n._latlng)||(e._group._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow())},function(e){for(s=e._childClusters.length-1;0<=s;s--)n=e._childClusters[s],r&&r.contains(n._latlng)||(e._group._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow())})},_recursively:function(e,t,i,r,n){var s,o,a=this._childClusters,h=this._zoom;if(t<=h&&(r&&r(this),n&&h===i&&n(this)),h<t||h<i)for(s=a.length-1;0<=s;s--)(o=a[s])._boundsNeedUpdate&&o._recalculateBounds(),e.intersects(o._bounds)&&o._recursively(e,t,i,r,n)},_isSingleParent:function(){return 0<this._childClusters.length&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var e=this.options.opacity;return this.setOpacity(0),this.options.opacity=e,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(e){this._cellSize=e,this._sqCellSize=e*e,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(e,t){var i=this._getCoord(t.x),r=this._getCoord(t.y),n=this._grid,s=n[r]=n[r]||{},o=s[i]=s[i]||[],a=L.Util.stamp(e);this._objectPoint[a]=t,o.push(e)},updateObject:function(e,t){this.removeObject(e),this.addObject(e,t)},removeObject:function(e,t){var i,r,n=this._getCoord(t.x),s=this._getCoord(t.y),o=this._grid,a=o[s]=o[s]||{},h=a[n]=a[n]||[];for(delete this._objectPoint[L.Util.stamp(e)],i=0,r=h.length;i<r;i++)if(h[i]===e)return h.splice(i,1),1===r&&delete a[n],!0},eachObject:function(e,t){var i,r,n,s,o,a,h=this._grid;for(i in h)for(r in o=h[i])for(n=0,s=(a=o[r]).length;n<s;n++)e.call(t,a[n])&&(n--,s--)},getNearObject:function(e){var t,i,r,n,s,o,a,h,l=this._getCoord(e.x),u=this._getCoord(e.y),_=this._objectPoint,d=this._sqCellSize,p=null;for(t=u-1;t<=u+1;t++)if(n=this._grid[t])for(i=l-1;i<=l+1;i++)if(s=n[i])for(r=0,o=s.length;r<o;r++)a=s[r],((h=this._sqDist(_[L.Util.stamp(a)],e))<d||h<=d&&null===p)&&(d=h,p=a);return p},_getCoord:function(e){var t=Math.floor(e/this._cellSize);return isFinite(t)?t:e},_sqDist:function(e,t){var i=t.x-e.x,r=t.y-e.y;return i*i+r*r}},L.QuickHull={getDistant:function(e,t){var i=t[1].lat-t[0].lat;return(t[0].lng-t[1].lng)*(e.lat-t[0].lat)+i*(e.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(e,t){var i,r,n,s=0,o=null,a=[];for(i=t.length-1;0<=i;i--)r=t[i],0<(n=this.getDistant(r,e))&&(a.push(r),s<n&&(s=n,o=r));return{maxPoint:o,newPoints:a}},buildConvexHull:function(e,t){var i=[],r=this.findMostDistantPointFromBaseLine(e,t);return r.maxPoint?i=(i=i.concat(this.buildConvexHull([e[0],r.maxPoint],r.newPoints))).concat(this.buildConvexHull([r.maxPoint,e[1]],r.newPoints)):[e[0]]},getConvexHull:function(e){var t,i=!1,r=!1,n=!1,s=!1,o=null,a=null,h=null,l=null,u=null,_=null;for(t=e.length-1;0<=t;t--){var d=e[t];(!1===i||d.lat>i)&&(i=(o=d).lat),(!1===r||d.lat<r)&&(r=(a=d).lat),(!1===n||d.lng>n)&&(n=(h=d).lng),(!1===s||d.lng<s)&&(s=(l=d).lng)}return u=r!==i?(_=a,o):(_=l,h),[].concat(this.buildConvexHull([_,u],e),this.buildConvexHull([u,_],e))}},L.MarkerCluster.include({getConvexHull:function(){var e,t,i=this.getAllChildMarkers(),r=[];for(t=i.length-1;0<=t;t--)e=i[t].getLatLng(),r.push(e);return L.QuickHull.getConvexHull(r)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var e,t=this.getAllChildMarkers(null,!0),i=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),e=(this._group._spiderfied=this)._group.options.spiderfyShapePositions?this._group.options.spiderfyShapePositions(t.length,i):t.length>=this._circleSpiralSwitchover?this._generatePointsSpiral(t.length,i):(i.y+=10,this._generatePointsCircle(t.length,i)),this._animationSpiderfy(t,e)}},unspiderfy:function(e){this._group._inZoomAnimation||(this._animationUnspiderfy(e),this._group._spiderfied=null)},_generatePointsCircle:function(e,t){var i,r,n=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+e)/this._2PI,s=this._2PI/e,o=[];for(n=Math.max(n,35),o.length=e,i=0;i<e;i++)r=this._circleStartAngle+i*s,o[i]=new L.Point(t.x+n*Math.cos(r),t.y+n*Math.sin(r))._round();return o},_generatePointsSpiral:function(e,t){var i,r=this._group.options.spiderfyDistanceMultiplier,n=r*this._spiralLengthStart,s=r*this._spiralFootSeparation,o=r*this._spiralLengthFactor*this._2PI,a=0,h=[];for(i=h.length=e;0<=i;i--)i<e&&(h[i]=new L.Point(t.x+n*Math.cos(a),t.y+n*Math.sin(a))._round()),n+=o/(a+=s/n+5e-4*i);return h},_noanimationUnspiderfy:function(){var e,t,i=this._group,r=i._map,n=i._featureGroup,s=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),t=s.length-1;0<=t;t--)e=s[t],n.removeLayer(e),e._preSpiderfyLatlng&&(e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng),e.setZIndexOffset&&e.setZIndexOffset(0),e._spiderLeg&&(r.removeLayer(e._spiderLeg),delete e._spiderLeg);i.fire(\"unspiderfied\",{cluster:this,markers:s}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(e,t){var i,r,n,s,o=this._group,a=o._map,h=o._featureGroup,l=this._group.options.spiderLegPolylineOptions;for(o._ignoreMove=!0,i=0;i<e.length;i++)s=a.layerPointToLatLng(t[i]),r=e[i],n=new L.Polyline([this._latlng,s],l),a.addLayer(n),r._spiderLeg=n,r._preSpiderfyLatlng=r._latlng,r.setLatLng(s),r.setZIndexOffset&&r.setZIndexOffset(1e6),h.addLayer(r);this.setOpacity(.3),o._ignoreMove=!1,o.fire(\"spiderfied\",{cluster:this,markers:e})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(e,t){var i,r,n,s,o,a,h=this,l=this._group,u=l._map,_=l._featureGroup,d=this._latlng,p=u.latLngToLayerPoint(d),c=L.Path.SVG,f=L.extend({},this._group.options.spiderLegPolylineOptions),m=f.opacity;for(void 0===m&&(m=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),c?(f.opacity=0,f.className=(f.className||\"\")+\" leaflet-cluster-spider-leg\"):f.opacity=m,l._ignoreMove=!0,i=0;i<e.length;i++)r=e[i],a=u.layerPointToLatLng(t[i]),n=new L.Polyline([d,a],f),u.addLayer(n),r._spiderLeg=n,c&&(o=(s=n._path).getTotalLength()+.1,s.style.strokeDasharray=o,s.style.strokeDashoffset=o),r.setZIndexOffset&&r.setZIndexOffset(1e6),r.clusterHide&&r.clusterHide(),_.addLayer(r),r._setPos&&r._setPos(p);for(l._forceLayout(),l._animationStart(),i=e.length-1;0<=i;i--)a=u.layerPointToLatLng(t[i]),(r=e[i])._preSpiderfyLatlng=r._latlng,r.setLatLng(a),r.clusterShow&&r.clusterShow(),c&&((s=(n=r._spiderLeg)._path).style.strokeDashoffset=0,n.setStyle({opacity:m}));this.setOpacity(.3),l._ignoreMove=!1,setTimeout(function(){l._animationEnd(),l.fire(\"spiderfied\",{cluster:h,markers:e})},200)},_animationUnspiderfy:function(e){var t,i,r,n,s,o,a=this,h=this._group,l=h._map,u=h._featureGroup,_=e?l._latLngToNewLayerPoint(this._latlng,e.zoom,e.center):l.latLngToLayerPoint(this._latlng),d=this.getAllChildMarkers(null,!0),p=L.Path.SVG;for(h._ignoreMove=!0,h._animationStart(),this.setOpacity(1),i=d.length-1;0<=i;i--)(t=d[i])._preSpiderfyLatlng&&(t.closePopup(),t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng,o=!0,t._setPos&&(t._setPos(_),o=!1),t.clusterHide&&(t.clusterHide(),o=!1),o&&u.removeLayer(t),p&&(s=(n=(r=t._spiderLeg)._path).getTotalLength()+.1,n.style.strokeDashoffset=s,r.setStyle({opacity:0})));h._ignoreMove=!1,setTimeout(function(){var e=0;for(i=d.length-1;0<=i;i--)(t=d[i])._spiderLeg&&e++;for(i=d.length-1;0<=i;i--)(t=d[i])._spiderLeg&&(t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),1<e&&u.removeLayer(t),l.removeLayer(t._spiderLeg),delete t._spiderLeg);h._animationEnd(),h.fire(\"unspiderfied\",{cluster:a,markers:d})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on(\"click\",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on(\"zoomstart\",this._unspiderfyZoomStart,this),this._map.on(\"zoomend\",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off(\"click\",this._unspiderfyWrapper,this),this._map.off(\"zoomstart\",this._unspiderfyZoomStart,this),this._map.off(\"zoomanim\",this._unspiderfyZoomAnim,this),this._map.off(\"zoomend\",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on(\"zoomanim\",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(e){L.DomUtil.hasClass(this._map._mapPane,\"leaflet-touching\")||(this._map.off(\"zoomanim\",this._unspiderfyZoomAnim,this),this._unspiderfy(e))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(e){this._spiderfied&&this._spiderfied.unspiderfy(e)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(e){e._spiderLeg&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),this._map.removeLayer(e._spiderLeg),delete e._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(e){return e?e instanceof L.MarkerClusterGroup?e=e._topClusterLevel.getAllChildMarkers():e instanceof L.LayerGroup?e=e._layers:e instanceof L.MarkerCluster?e=e.getAllChildMarkers():e instanceof L.Marker&&(e=[e]):e=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(e),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(e),this},_flagParentsIconsNeedUpdate:function(e){var t,i;for(t in e)for(i=e[t].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(e){var t,i;for(t in e)i=e[t],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(e,t){var i=this.options.icon;return L.setOptions(i,e),this.setIcon(i),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),e.MarkerClusterGroup=t,e.MarkerCluster=i,Object.defineProperty(e,\"__esModule\",{value:!0})});\n//# sourceMappingURL=leaflet.markercluster.js.map","!function(factory){if(\"function\"==typeof define&&define.amd)define([\"leaflet\"],factory);else if(\"object\"==typeof exports)module.exports=factory(require(\"leaflet\"));else if(\"undefined\"!=typeof window){if(void 0===window.L)throw\"Leaflet must be loaded first.\";window.L.Control.SimpleLocate=factory(window.L)}}(function(L){let SimpleLocate=L.Control.extend({options:{className:\"\",title:\"Locate Geolocation and Orientation\",ariaLabel:\"\",minAngleChange:3,clickTimeoutDelay:500,setViewAfterClick:!0,zoomLevel:void 0,drawCircle:!0,afterClick:null,afterMarkerAdd:null,afterDeviceMove:null,htmlInit:`\n<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<path d=\"M 8,1.5 A 6.5,6.5 0 0 0 1.5,8 6.5,6.5 0 0 0 8,14.5 6.5,6.5 0 0 0 14.5,8 6.5,6.5 0 0 0 8,1.5 Z m 0,2 A 4.5,4.5 0 0 1 12.5,8 4.5,4.5 0 0 1 8,12.5 4.5,4.5 0 0 1 3.5,8 4.5,4.5 0 0 1 8,3.5 Z\" />\n\t<rect width=\"1.5\" height=\"4\" x=\"7.25\" y=\"0.5\" rx=\"0.5\" ry=\"0.5\" />\n\t<rect width=\"1.5\" height=\"4\" x=\"7.25\" y=\"11.5\" rx=\"0.5\" ry=\"0.5\" />\n\t<rect width=\"4\" height=\"1.5\" x=\"0.5\" y=\"7.25\" rx=\"0.5\" ry=\"0.5\" />\n\t<rect width=\"4\" height=\"1.5\" x=\"11.5\" y=\"7.25\" ry=\"0.5\" rx=\"0.5\" />\n\t<circle cx=\"8\" cy=\"8\" r=\"1\" />\n</svg>`,htmlSpinner:`\n<svg width=\"16\" height=\"16\" viewBox=\"-8 -8 16 16\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<g>\n\t\t<circle opacity=\".7\" cx=\"0\" cy=\"-6\" r=\".9\" transform=\"rotate(90)\" />\n\t\t<circle opacity=\".9\" cx=\"0\" cy=\"-6\" r=\"1.3\" transform=\"rotate(45)\" />\n\t\t<circle opacity=\"1\" cx=\"0\" cy=\"-6\" r=\"1.5\" />\n\t\t<circle opacity=\".95\" cx=\"0\" cy=\"-6\" r=\"1.42\" transform=\"rotate(-45)\" />\n\t\t<circle opacity=\".85\" cx=\"0\" cy=\"-6\" r=\"1.26\" transform=\"rotate(-90)\" />\n\t\t<circle opacity=\".7\" cx=\"0\" cy=\"-6\" r=\"1.02\" transform=\"rotate(-135)\" />\n\t\t<circle opacity=\".5\" cx=\"0\" cy=\"-6\" r=\".7\" transform=\"rotate(-180)\" />\n\t\t<circle opacity=\".25\" cx=\"0\" cy=\"-6\" r=\".3\" transform=\"rotate(-225)\" />\n\t\t<animateTransform attributeName=\"transform\" type=\"rotate\" values=\"0;0;45;45;90;90;135;135;180;180;225;225;270;270;315;315;360\" keyTimes=\"0;.125;.125;.25;.25;.375;.375;.5;.5;.675;.675;.75;.75;.875;.875;1;1\" dur=\"1.3s\" repeatCount=\"indefinite\" />\n\t</g>\n</svg>`,htmlGeolocation:`\n<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<path d=\"M 13.329384,2.6706085 C 13.133096,2.4743297 12.77601,2.4382611 12.303066,2.6103882 L 6.6307133,4.6742285 1.1816923,6.6577732 C 1.0668479,6.6995703 0.95157337,6.752486 0.83540381,6.8133451 0.27343954,7.1201064 0.41842508,7.4470449 1.2644998,7.5962244 l 6.0688263,1.0701854 1.0714872,6.0698222 c 0.1491847,0.84604 0.4751513,0.990031 0.7816575,0.427825 0.060857,-0.116165 0.1137803,-0.231436 0.1555779,-0.346273 L 11.324426,9.3702482 13.389608,3.6968841 C 13.56174,3.2239596 13.52567,2.8668883 13.329392,2.6706094 Z\" />\n</svg>`,htmlOrientation:`\n<svg class=\"leaflet-simple-locate-orientation\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<path fill=\"#c00000\" d=\"M 8,0 C 7.7058986,0 7.4109021,0.30139625 7.1855469,0.90234375 L 5.3378906,5.8300781 C 5.2559225,6.0486598 5.1908259,6.292468 5.1386719,6.5507812 6.0506884,6.193573 7.0205489,6.0068832 8,6 8.9768002,6.0005071 9.945249,6.1798985 10.857422,6.5292969 10.805917,6.2790667 10.741782,6.0425374 10.662109,5.8300781 L 8.8144531,0.90234375 C 8.5890978,0.30139615 8.2941007,0 8,0 Z\" />\n\t<path d=\"M 8,5.9999998 C 7.0205501,6.006884 6.0506874,6.1935733 5.138672,6.5507817 4.9040515,7.7126196 4.9691485,9.1866095 5.3378906,10.169922 l 1.8476563,4.927734 c 0.4507105,1.201895 1.1781958,1.201894 1.628906,0 L 10.662109,10.169922 C 11.033147,9.1804875 11.097283,7.6944254 10.857422,6.5292967 9.9452497,6.1798989 8.9767993,6.0005076 8,5.9999998 Z m -1e-7,0.7499999 A 1.25,1.258 90 0 1 9.2578124,7.9999996 1.25,1.258 90 0 1 8,9.2500001 a 1.25,1.258 90 0 1 -1.2578124,-1.25 1.25,1.258 90 0 1 1.2578123,-1.2500004 z\" />\n</svg>`,iconGeolocation:L.divIcon({html:`\n<svg width=\"24\" height=\"24\" viewBox=\"-12 -12 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<defs>\n\t\t<filter id=\"gaussian\">\n\t\t\t<feGaussianBlur stdDeviation=\"0.5\" />\n\t\t</filter>\n\t</defs>\n\t<g id=\"leaflet-simple-locate-icon-spot\">\n\t\t<circle fill=\"#000000\" style=\"opacity:0.3;filter:url(#gaussian)\" cx=\"1\" cy=\"1\" r=\"10\" />\n\t\t<circle fill=\"#ffffff\" r=\"10\" />\n\t\t<circle r=\"6\">\n\t\t\t<animate attributeName=\"r\" values=\"6;8;6\" dur=\"2s\" repeatCount=\"indefinite\" />\n\t\t</circle>\n\t</g>\n</svg>`,className:\"leaflet-simple-locate-icon\",iconSize:[24,24],iconAnchor:[12,12]}),iconOrientation:L.divIcon({html:`\n<svg width=\"96\" height=\"96\" viewBox=\"-48 -48 96 96\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<defs>\n\t\t<linearGradient id=\"gradient\" x2=\"0\" y2=\"-48\" gradientUnits=\"userSpaceOnUse\">\n\t\t\t<stop style=\"stop-opacity:1\" offset=\"0\" />\n\t\t\t<stop style=\"stop-opacity:0\" offset=\"1\" />\n\t\t</linearGradient>\n\t\t<filter id=\"gaussian\">\n\t\t\t<feGaussianBlur stdDeviation=\"0.5\" />\n\t\t</filter>\n\t</defs>\n\t<path class=\"orientation\" opacity=\"1\" style=\"fill:url(#gradient)\" d=\"M -24,-48 H 24 L 10,0 H -10 z\">\n\t\t<animate attributeName=\"opacity\" values=\".75;.33;.75\" dur=\"2s\" repeatCount=\"indefinite\" />\n\t</path>\n\t<g id=\"leaflet-simple-locate-icon-spot\">\n\t\t<circle fill=\"#000000\" style=\"opacity:0.3;filter:url(#gaussian)\" cx=\"1\" cy=\"1\" r=\"10\" />\n\t\t<circle fill=\"#ffffff\" r=\"10\" />\n\t\t<circle r=\"6\">\n\t\t\t<animate attributeName=\"r\" values=\"6;9;6\" dur=\"2s\" repeatCount=\"indefinite\" />\n\t\t</circle>\n\t</g>\n</svg>`,className:\"leaflet-simple-locate-icon\",iconSize:[96,96],iconAnchor:[48,48]})},initialize:function(options){L.Util.setOptions(this,options),this._map=void 0,this._button=void 0,this._marker=void 0,this._circle=void 0,this._clicked=void 0,this._geolocation=void 0,this._orientation=void 0,this._clickTimeout=void 0,this._latitude=void 0,this._longitude=void 0,this._accuracy=void 0,this._angle=void 0},onAdd:function(map){return this._map=map,this._button=L.DomUtil.create(\"button\",\"leaflet-simple-locate\"),this.options.className&&L.DomUtil.addClass(this._button,this.options.className),L.DomEvent.disableClickPropagation(this._button),this._button.innerHTML=this.options.htmlInit,this._button.title=this.options.title,this._button.setAttribute(\"aria-label\",this.options.ariaLabel||this.options.title),L.DomEvent.on(this._button,\"click\",L.DomEvent.stopPropagation).on(this._button,\"click\",L.DomEvent.preventDefault).on(this._button,\"click\",this._onClick,this),this._button},getLatLng:function(){return this._latitude&&this._longitude?{lat:this._latitude,lng:this._longitude}:null},getAccuracy:function(){return this._accuracy||null},getAngle:function(){return this._angle||null},setZoomLevel:function(level){this.options.zoomLevel=level},_onClick:async function(){this._clickTimeout?(clearTimeout(this._clickTimeout),this._clickTimeout=void 0,this._clicked&&(this._geolocation&&this._unwatchGeolocation(),this._orientation&&this._unwatchOrientation(),this._clicked=void 0,this._geolocation=void 0,this._orientation=void 0,this._updateButton(),this._map.off(\"layeradd\",this._onLayerAdd,this))):this._clickTimeout=setTimeout(()=>{clearTimeout(this._clickTimeout),this._clickTimeout=void 0,this._map&&(this._clicked&&this.options.setViewAfterClick?this._setView():(this._clicked=!0,this._updateButton(),this._map.on(\"layeradd\",this._onLayerAdd,this),this._checkGeolocation().then(event=>{this._geolocation=!0,this._onLocationFound(event.coords),this.options.setViewAfterClick&&this._setView(),this._watchGeolocation(),this._checkClickResult()}).catch(()=>{this._geolocation=!1,this._checkClickResult()}),this._checkOrientation().then(()=>{this._orientation=!0,this._watchOrientation(),this._checkClickResult()}).catch(()=>{this._orientation=!1,this._checkClickResult()})))},this.options.clickTimeoutDelay)},_checkClickResult:function(){this._updateButton(),this.options.afterClick&&void 0!==this._geolocation&&void 0!==this._orientation&&this.options.afterClick({geolocation:this._geolocation,orientation:this._orientation}),!1===this._geolocation&&!1===this._orientation&&(this._clicked=void 0,this._geolocation=void 0,this._orientation=void 0)},_checkGeolocation:function(){return\"object\"==typeof navigator&&\"geolocation\"in navigator&&\"function\"==typeof navigator.geolocation.getCurrentPosition&&\"function\"==typeof navigator.geolocation.watchPosition?new Promise((resolve,reject)=>{navigator.geolocation.getCurrentPosition(resolve,reject,{maximumAge:0,enableHighAccuracy:!0})}):Promise.reject()},_checkOrientation:function(){return(\"ondeviceorientationabsolute\"in window||\"ondeviceorientation\"in window)&&DeviceOrientationEvent?\"function\"!=typeof DeviceOrientationEvent.requestPermission?Promise.resolve():DeviceOrientationEvent.requestPermission().then(permission=>\"granted\"===permission||Promise.reject()):Promise.reject()},_watchGeolocation:function(){this._map.locate({watch:!0,enableHighAccuracy:!0}),this._map.on(\"locationfound\",this._onLocationFound,this),this._map.on(\"zoomstart\",this._onZoomStart,this),this._map.on(\"zoomend\",this._onZoomEnd,this)},_unwatchGeolocation:function(){this._map.stopLocate(),this._map.off(\"locationfound\",this._onLocationFound,this),this._map.off(\"zoomstart\",this._onZoomStart,this),this._map.off(\"zoomend\",this._onZoomEnd,this),this._circle&&(this._map.removeLayer(this._circle),this._circle=void 0),this._marker&&(this._map.removeLayer(this._marker),this._marker=void 0),this._latitude=void 0,this._longitude=void 0,this._accuracy=void 0},_watchOrientation:function(){L.DomEvent.on(window,\"ondeviceorientationabsolute\"in window?\"deviceorientationabsolute\":\"deviceorientation\",this._onOrientation,this)},_unwatchOrientation:function(){L.DomEvent.off(window,\"ondeviceorientationabsolute\"in window?\"deviceorientationabsolute\":\"deviceorientation\",this._onOrientation,this),document.documentElement.style.setProperty(\"--leaflet-simple-locate-orientation\",\"0deg\"),this._angle=void 0},_onLocationFound:function(event){this._latitude&&event.latitude&&Math.round(1e6*this._latitude)===Math.round(1e6*event.latitude)&&this._longitude&&event.longitude&&Math.round(1e6*this._longitude)===Math.round(1e6*event.longitude)&&this._accuracy&&event.accuracy&&Math.round(100*this._accuracy)===Math.round(100*event.accuracy)||(this._latitude=event.latitude,this._longitude=event.longitude,this._accuracy=event.accuracy,this._updateMarker())},_onOrientation:function(event){let angle;angle=event.webkitCompassHeading||360-event.alpha,this._angle&&Math.abs(angle-this._angle)<this.options.minAngleChange||(this._angle=angle,\"orientation\"in screen&&(this._angle+=screen.orientation.angle),this._angle=(this._angle+360)%360,document.documentElement.style.setProperty(\"--leaflet-simple-locate-orientation\",-this._angle+\"deg\"),this._updateMarker())},_onZoomStart:function(){this._circle&&document.documentElement.style.setProperty(\"--leaflet-simple-locate-circle-display\",\"none\")},_onZoomEnd:function(){this._circle&&document.documentElement.style.setProperty(\"--leaflet-simple-locate-circle-display\",\"inline\")},_onLayerAdd:function(event){this.options.afterMarkerAdd&&event.layer==this._marker&&this.options.afterMarkerAdd()},_setView:function(){this._map&&this._latitude&&this._longitude&&(this.options.zoomLevel?this._map.setView([this._latitude,this._longitude],this.options.zoomLevel):this._map.setView([this._latitude,this._longitude]))},_updateButton:function(){this._clicked?void 0===this._geolocation||void 0===this._orientation?\"spinner\"!==this._button.html_name&&(this._button.innerHTML=this.options.htmlSpinner,this._button.html_name=\"spinner\"):this._orientation&&\"orientation\"!==this._button.html_name?(this._button.innerHTML=this.options.htmlOrientation,this._button.html_name=\"orientation\"):this._geolocation&&\"geolocation\"!==this._button.html_name&&(this._button.innerHTML=this.options.htmlGeolocation,this._button.html_name=\"geolocation\"):\"init\"!==this._button.html_name&&(this._button.innerHTML=this.options.htmlInit,this._button.html_name=\"init\")},_updateMarker:function(){if(this.options.afterDeviceMove&&this.options.afterDeviceMove({lat:this._latitude,lng:this._longitude,accuracy:this._accuracy,angle:this._angle}),this._latitude&&this._longitude&&(!this.options.drawCircle||this._accuracy)){let icon_name;if(this._geolocation&&this._orientation&&this._angle)icon_name=\"iconOrientation\";else{if(!this._geolocation)return;icon_name=\"iconGeolocation\"}this._circle?(this._circle.setLatLng([this._latitude,this._longitude]),this._circle.setRadius(this._accuracy)):this.options.drawCircle&&(this._circle=L.circle([this._latitude,this._longitude],{className:\"leaflet-simple-locate-circle\",radius:this._accuracy}).addTo(this._map)),this._marker&&this._marker.icon_name===icon_name?this._marker.setLatLng([this._latitude,this._longitude]):(this._marker&&this._map.removeLayer(this._marker),this._marker=L.marker([this._latitude,this._longitude],{icon:this.options[icon_name]}),this._marker.icon_name=icon_name,this._marker.addTo(this._map))}}});return L.control.simpleLocate=function(options){return new SimpleLocate(options)},SimpleLocate});","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","import { feature, lineString, isObject, point } from '@turf/helpers';\n\n/**\n * Callback for coordEach\n *\n * @callback coordEachCallback\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()\n *\n * @name coordEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction coordEach(geojson, callback, excludeWrapCoord) {\n // Handles null Geometry -- Skips this GeoJSON\n if (geojson === null) return;\n var j,\n k,\n l,\n geometry,\n stopG,\n coords,\n geometryMaybeCollection,\n wrapShrink = 0,\n coordIndex = 0,\n isGeometryCollection,\n type = geojson.type,\n isFeatureCollection = type === \"FeatureCollection\",\n isFeature = type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (var featureIndex = 0; featureIndex < stop; featureIndex++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[featureIndex].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {\n var multiFeatureIndex = 0;\n var geometryIndex = 0;\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[geomIndex]\n : geometryMaybeCollection;\n\n // Handles null Geometry -- Skips this geometry\n if (geometry === null) continue;\n coords = geometry.coordinates;\n var geomType = geometry.type;\n\n wrapShrink =\n excludeWrapCoord &&\n (geomType === \"Polygon\" || geomType === \"MultiPolygon\")\n ? 1\n : 0;\n\n switch (geomType) {\n case null:\n break;\n case \"Point\":\n if (\n callback(\n coords,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n multiFeatureIndex++;\n break;\n case \"LineString\":\n case \"MultiPoint\":\n for (j = 0; j < coords.length; j++) {\n if (\n callback(\n coords[j],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n if (geomType === \"MultiPoint\") multiFeatureIndex++;\n }\n if (geomType === \"LineString\") multiFeatureIndex++;\n break;\n case \"Polygon\":\n case \"MultiLineString\":\n for (j = 0; j < coords.length; j++) {\n for (k = 0; k < coords[j].length - wrapShrink; k++) {\n if (\n callback(\n coords[j][k],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n if (geomType === \"MultiLineString\") multiFeatureIndex++;\n if (geomType === \"Polygon\") geometryIndex++;\n }\n if (geomType === \"Polygon\") multiFeatureIndex++;\n break;\n case \"MultiPolygon\":\n for (j = 0; j < coords.length; j++) {\n geometryIndex = 0;\n for (k = 0; k < coords[j].length; k++) {\n for (l = 0; l < coords[j][k].length - wrapShrink; l++) {\n if (\n callback(\n coords[j][k][l],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n geometryIndex++;\n }\n multiFeatureIndex++;\n }\n break;\n case \"GeometryCollection\":\n for (j = 0; j < geometry.geometries.length; j++)\n if (\n coordEach(geometry.geometries[j], callback, excludeWrapCoord) ===\n false\n )\n return false;\n break;\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n }\n}\n\n/**\n * Callback for coordReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback coordReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Reduce coordinates in any GeoJSON object, similar to Array.reduce()\n *\n * @name coordReduce\n * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentCoord;\n * });\n */\nfunction coordReduce(geojson, callback, initialValue, excludeWrapCoord) {\n var previousValue = initialValue;\n coordEach(\n geojson,\n function (\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) {\n if (coordIndex === 0 && initialValue === undefined)\n previousValue = currentCoord;\n else\n previousValue = callback(\n previousValue,\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n },\n excludeWrapCoord\n );\n return previousValue;\n}\n\n/**\n * Callback for propEach\n *\n * @callback propEachCallback\n * @param {Object} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over properties in any GeoJSON object, similar to Array.forEach()\n *\n * @name propEach\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentProperties, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propEach(features, function (currentProperties, featureIndex) {\n * //=currentProperties\n * //=featureIndex\n * });\n */\nfunction propEach(geojson, callback) {\n var i;\n switch (geojson.type) {\n case \"FeatureCollection\":\n for (i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i].properties, i) === false) break;\n }\n break;\n case \"Feature\":\n callback(geojson.properties, 0);\n break;\n }\n}\n\n/**\n * Callback for propReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback propReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {*} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce properties in any GeoJSON object into a single value,\n * similar to how Array.reduce works. However, in this case we lazily run\n * the reduction, so an array of all properties is unnecessary.\n *\n * @name propReduce\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {\n * //=previousValue\n * //=currentProperties\n * //=featureIndex\n * return currentProperties\n * });\n */\nfunction propReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n propEach(geojson, function (currentProperties, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentProperties;\n else\n previousValue = callback(previousValue, currentProperties, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Callback for featureEach\n *\n * @callback featureEachCallback\n * @param {Feature<any>} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name featureEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.featureEach(features, function (currentFeature, featureIndex) {\n * //=currentFeature\n * //=featureIndex\n * });\n */\nfunction featureEach(geojson, callback) {\n if (geojson.type === \"Feature\") {\n callback(geojson, 0);\n } else if (geojson.type === \"FeatureCollection\") {\n for (var i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i], i) === false) break;\n }\n }\n}\n\n/**\n * Callback for featureReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback featureReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name featureReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * return currentFeature\n * });\n */\nfunction featureReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n featureEach(geojson, function (currentFeature, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentFeature;\n else previousValue = callback(previousValue, currentFeature, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Get all coordinates from any GeoJSON object.\n *\n * @name coordAll\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @returns {Array<Array<number>>} coordinate position array\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * var coords = turf.coordAll(features);\n * //= [[26, 37], [36, 53]]\n */\nfunction coordAll(geojson) {\n var coords = [];\n coordEach(geojson, function (coord) {\n coords.push(coord);\n });\n return coords;\n}\n\n/**\n * Callback for geomEach\n *\n * @callback geomEachCallback\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()\n *\n * @name geomEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * });\n */\nfunction geomEach(geojson, callback) {\n var i,\n j,\n g,\n geometry,\n stopG,\n geometryMaybeCollection,\n isGeometryCollection,\n featureProperties,\n featureBBox,\n featureId,\n featureIndex = 0,\n isFeatureCollection = geojson.type === \"FeatureCollection\",\n isFeature = geojson.type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (i = 0; i < stop; i++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[i].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n featureProperties = isFeatureCollection\n ? geojson.features[i].properties\n : isFeature\n ? geojson.properties\n : {};\n featureBBox = isFeatureCollection\n ? geojson.features[i].bbox\n : isFeature\n ? geojson.bbox\n : undefined;\n featureId = isFeatureCollection\n ? geojson.features[i].id\n : isFeature\n ? geojson.id\n : undefined;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (g = 0; g < stopG; g++) {\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[g]\n : geometryMaybeCollection;\n\n // Handle null Geometry\n if (geometry === null) {\n if (\n callback(\n null,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n continue;\n }\n switch (geometry.type) {\n case \"Point\":\n case \"LineString\":\n case \"MultiPoint\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\": {\n if (\n callback(\n geometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n break;\n }\n case \"GeometryCollection\": {\n for (j = 0; j < geometry.geometries.length; j++) {\n if (\n callback(\n geometry.geometries[j],\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n }\n break;\n }\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n // Only increase `featureIndex` per each feature\n featureIndex++;\n }\n}\n\n/**\n * Callback for geomReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback geomReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Reduce geometry in any GeoJSON object, similar to Array.reduce().\n *\n * @name geomReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=previousValue\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * return currentGeometry\n * });\n */\nfunction geomReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n geomEach(\n geojson,\n function (\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentGeometry;\n else\n previousValue = callback(\n previousValue,\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for flattenEach\n *\n * @callback flattenEachCallback\n * @param {Feature} currentFeature The current flattened feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Iterate over flattened features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name flattenEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * });\n */\nfunction flattenEach(geojson, callback) {\n geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {\n // Callback for single geometry\n var type = geometry === null ? null : geometry.type;\n switch (type) {\n case null:\n case \"Point\":\n case \"LineString\":\n case \"Polygon\":\n if (\n callback(\n feature(geometry, properties, { bbox: bbox, id: id }),\n featureIndex,\n 0\n ) === false\n )\n return false;\n return;\n }\n\n var geomType;\n\n // Callback for multi-geometry\n switch (type) {\n case \"MultiPoint\":\n geomType = \"Point\";\n break;\n case \"MultiLineString\":\n geomType = \"LineString\";\n break;\n case \"MultiPolygon\":\n geomType = \"Polygon\";\n break;\n }\n\n for (\n var multiFeatureIndex = 0;\n multiFeatureIndex < geometry.coordinates.length;\n multiFeatureIndex++\n ) {\n var coordinate = geometry.coordinates[multiFeatureIndex];\n var geom = {\n type: geomType,\n coordinates: coordinate,\n };\n if (\n callback(feature(geom, properties), featureIndex, multiFeatureIndex) ===\n false\n )\n return false;\n }\n });\n}\n\n/**\n * Callback for flattenReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback flattenReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Reduce flattened features in any GeoJSON object, similar to Array.reduce().\n *\n * @name flattenReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * return currentFeature\n * });\n */\nfunction flattenReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n flattenEach(\n geojson,\n function (currentFeature, featureIndex, multiFeatureIndex) {\n if (\n featureIndex === 0 &&\n multiFeatureIndex === 0 &&\n initialValue === undefined\n )\n previousValue = currentFeature;\n else\n previousValue = callback(\n previousValue,\n currentFeature,\n featureIndex,\n multiFeatureIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for segmentEach\n *\n * @callback segmentEachCallback\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n * @returns {void}\n */\n\n/**\n * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //=currentSegment\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * //=segmentIndex\n * });\n *\n * // Calculate the total number of segments\n * var total = 0;\n * turf.segmentEach(polygon, function () {\n * total++;\n * });\n */\nfunction segmentEach(geojson, callback) {\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n var segmentIndex = 0;\n\n // Exclude null Geometries\n if (!feature.geometry) return;\n // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n var type = feature.geometry.type;\n if (type === \"Point\" || type === \"MultiPoint\") return;\n\n // Generate 2-vertex line segments\n var previousCoords;\n var previousFeatureIndex = 0;\n var previousMultiIndex = 0;\n var prevGeomIndex = 0;\n if (\n coordEach(\n feature,\n function (\n currentCoord,\n coordIndex,\n featureIndexCoord,\n multiPartIndexCoord,\n geometryIndex\n ) {\n // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`\n if (\n previousCoords === undefined ||\n featureIndex > previousFeatureIndex ||\n multiPartIndexCoord > previousMultiIndex ||\n geometryIndex > prevGeomIndex\n ) {\n previousCoords = currentCoord;\n previousFeatureIndex = featureIndex;\n previousMultiIndex = multiPartIndexCoord;\n prevGeomIndex = geometryIndex;\n segmentIndex = 0;\n return;\n }\n var currentSegment = lineString(\n [previousCoords, currentCoord],\n feature.properties\n );\n if (\n callback(\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) === false\n )\n return false;\n segmentIndex++;\n previousCoords = currentCoord;\n }\n ) === false\n )\n return false;\n });\n}\n\n/**\n * Callback for segmentReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback segmentReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n */\n\n/**\n * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //= previousSegment\n * //= currentSegment\n * //= featureIndex\n * //= multiFeatureIndex\n * //= geometryIndex\n * //= segmentIndex\n * return currentSegment\n * });\n *\n * // Calculate the total number of segments\n * var initialValue = 0\n * var total = turf.segmentReduce(polygon, function (previousValue) {\n * previousValue++;\n * return previousValue;\n * }, initialValue);\n */\nfunction segmentReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n var started = false;\n segmentEach(\n geojson,\n function (\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) {\n if (started === false && initialValue === undefined)\n previousValue = currentSegment;\n else\n previousValue = callback(\n previousValue,\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n );\n started = true;\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for lineEach\n *\n * @callback lineEachCallback\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,\n * similar to Array.forEach.\n *\n * @name lineEach\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @example\n * var multiLine = turf.multiLineString([\n * [[26, 37], [35, 45]],\n * [[36, 53], [38, 50], [41, 55]]\n * ]);\n *\n * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction lineEach(geojson, callback) {\n // validation\n if (!geojson) throw new Error(\"geojson is required\");\n\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n if (feature.geometry === null) return;\n var type = feature.geometry.type;\n var coords = feature.geometry.coordinates;\n switch (type) {\n case \"LineString\":\n if (callback(feature, featureIndex, multiFeatureIndex, 0, 0) === false)\n return false;\n break;\n case \"Polygon\":\n for (\n var geometryIndex = 0;\n geometryIndex < coords.length;\n geometryIndex++\n ) {\n if (\n callback(\n lineString(coords[geometryIndex], feature.properties),\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n }\n break;\n }\n });\n}\n\n/**\n * Callback for lineReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback lineReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name lineReduce\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var multiPoly = turf.multiPolygon([\n * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),\n * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])\n * ]);\n *\n * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentLine\n * });\n */\nfunction lineReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n lineEach(\n geojson,\n function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentLine;\n else\n previousValue = callback(\n previousValue,\n currentLine,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n * Point & MultiPoint will always return null.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.segmentIndex=0] Segment Index\n * @param {Object} [options.properties={}] Translate Properties to output LineString\n * @param {BBox} [options.bbox={}] Translate BBox to output LineString\n * @param {number|string} [options.id={}] Translate Id to output LineString\n * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findSegment(multiLine);\n * // => Feature<LineString<[[10, 10], [50, 30]]>>\n *\n * // First Segment of 2nd Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: 1});\n * // => Feature<LineString<[[-10, -10], [-50, -30]]>>\n *\n * // Last Segment of Last Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});\n * // => Feature<LineString<[[-50, -30], [-30, -40]]>>\n */\nfunction findSegment(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var segmentIndex = options.segmentIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find SegmentIndex\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;\n return lineString(\n [coords[segmentIndex], coords[segmentIndex + 1]],\n properties,\n options\n );\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[geometryIndex].length + segmentIndex - 1;\n return lineString(\n [\n coords[geometryIndex][segmentIndex],\n coords[geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;\n return lineString(\n [\n coords[multiFeatureIndex][segmentIndex],\n coords[multiFeatureIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex =\n coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;\n return lineString(\n [\n coords[multiFeatureIndex][geometryIndex][segmentIndex],\n coords[multiFeatureIndex][geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\n/**\n * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.coordIndex=0] Coord Index\n * @param {Object} [options.properties={}] Translate Properties to output Point\n * @param {BBox} [options.bbox={}] Translate BBox to output Point\n * @param {number|string} [options.id={}] Translate Id to output Point\n * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findPoint(multiLine);\n * // => Feature<Point<[10, 10]>>\n *\n * // First Segment of the 2nd Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: 1});\n * // => Feature<Point<[-10, -10]>>\n *\n * // Last Segment of last Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});\n * // => Feature<Point<[-30, -40]>>\n */\nfunction findPoint(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var coordIndex = options.coordIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find Coord Index\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n return point(coords, properties, options);\n case \"MultiPoint\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n return point(coords[multiFeatureIndex], properties, options);\n case \"LineString\":\n if (coordIndex < 0) coordIndex = coords.length + coordIndex;\n return point(coords[coordIndex], properties, options);\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (coordIndex < 0)\n coordIndex = coords[geometryIndex].length + coordIndex;\n return point(coords[geometryIndex][coordIndex], properties, options);\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (coordIndex < 0)\n coordIndex = coords[multiFeatureIndex].length + coordIndex;\n return point(coords[multiFeatureIndex][coordIndex], properties, options);\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (coordIndex < 0)\n coordIndex =\n coords[multiFeatureIndex][geometryIndex].length - coordIndex;\n return point(\n coords[multiFeatureIndex][geometryIndex][coordIndex],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\nexport { coordAll, coordEach, coordReduce, featureEach, featureReduce, findPoint, findSegment, flattenEach, flattenReduce, geomEach, geomReduce, lineEach, lineReduce, propEach, propReduce, segmentEach, segmentReduce };\n","import { featureEach, coordEach } from '@turf/meta';\nimport { point, featureCollection } from '@turf/helpers';\n\n/**\n * Takes a feature or set of features and returns all positions as {@link Point|points}.\n *\n * @name explode\n * @param {GeoJSON} geojson input features\n * @returns {FeatureCollection<point>} points representing the exploded input features\n * @throws {Error} if it encounters an unknown geometry type\n * @example\n * var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n *\n * var explode = turf.explode(polygon);\n *\n * //addToMap\n * var addToMap = [polygon, explode]\n */\nfunction explode(geojson) {\n var points = [];\n if (geojson.type === \"FeatureCollection\") {\n featureEach(geojson, function (feature) {\n coordEach(feature, function (coord) {\n points.push(point(coord, feature.properties));\n });\n });\n } else {\n coordEach(geojson, function (coord) {\n points.push(point(coord, geojson.properties));\n });\n }\n return featureCollection(points);\n}\n\nexport default explode;\n","import { coordEach } from \"@turf/meta\";\n/**\n * Takes a set of features, calculates the bbox of all input features, and returns a bounding box.\n *\n * @name bbox\n * @param {GeoJSON} geojson any GeoJSON object\n * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order\n * @example\n * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);\n * var bbox = turf.bbox(line);\n * var bboxPolygon = turf.bboxPolygon(bbox);\n *\n * //addToMap\n * var addToMap = [line, bboxPolygon]\n */\nfunction bbox(geojson) {\n var result = [Infinity, Infinity, -Infinity, -Infinity];\n coordEach(geojson, function (coord) {\n if (result[0] > coord[0]) {\n result[0] = coord[0];\n }\n if (result[1] > coord[1]) {\n result[1] = coord[1];\n }\n if (result[2] < coord[0]) {\n result[2] = coord[0];\n }\n if (result[3] < coord[1]) {\n result[3] = coord[1];\n }\n });\n return result;\n}\nbbox[\"default\"] = bbox;\nexport default bbox;\n","import bbox from \"@turf/bbox\";\nimport { point, } from \"@turf/helpers\";\n/**\n * Takes a {@link Feature} or {@link FeatureCollection} and returns the absolute center point of all features.\n *\n * @name center\n * @param {GeoJSON} geojson GeoJSON to be centered\n * @param {Object} [options={}] Optional parameters\n * @param {Object} [options.properties={}] Translate GeoJSON Properties to Point\n * @param {Object} [options.bbox={}] Translate GeoJSON BBox to Point\n * @param {Object} [options.id={}] Translate GeoJSON Id to Point\n * @returns {Feature<Point>} a Point feature at the absolute center point of all input features\n * @example\n * var features = turf.points([\n * [-97.522259, 35.4691],\n * [-97.502754, 35.463455],\n * [-97.508269, 35.463245]\n * ]);\n *\n * var center = turf.center(features);\n *\n * //addToMap\n * var addToMap = [features, center]\n * center.properties['marker-size'] = 'large';\n * center.properties['marker-color'] = '#000';\n */\nfunction center(geojson, options) {\n if (options === void 0) { options = {}; }\n var ext = bbox(geojson);\n var x = (ext[0] + ext[2]) / 2;\n var y = (ext[1] + ext[3]) / 2;\n return point([x, y], options.properties, options);\n}\nexport default center;\n","/**\n * Returns a cloned copy of the passed GeoJSON Object, including possible 'Foreign Members'.\n * ~3-5x faster than the common JSON.parse + JSON.stringify combo method.\n *\n * @name clone\n * @param {GeoJSON} geojson GeoJSON Object\n * @returns {GeoJSON} cloned GeoJSON Object\n * @example\n * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]], {color: 'red'});\n *\n * var lineCloned = turf.clone(line);\n */\nfunction clone(geojson) {\n if (!geojson) {\n throw new Error(\"geojson is required\");\n }\n switch (geojson.type) {\n case \"Feature\":\n return cloneFeature(geojson);\n case \"FeatureCollection\":\n return cloneFeatureCollection(geojson);\n case \"Point\":\n case \"LineString\":\n case \"Polygon\":\n case \"MultiPoint\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n case \"GeometryCollection\":\n return cloneGeometry(geojson);\n default:\n throw new Error(\"unknown GeoJSON type\");\n }\n}\n/**\n * Clone Feature\n *\n * @private\n * @param {Feature<any>} geojson GeoJSON Feature\n * @returns {Feature<any>} cloned Feature\n */\nfunction cloneFeature(geojson) {\n var cloned = { type: \"Feature\" };\n // Preserve Foreign Members\n Object.keys(geojson).forEach(function (key) {\n switch (key) {\n case \"type\":\n case \"properties\":\n case \"geometry\":\n return;\n default:\n cloned[key] = geojson[key];\n }\n });\n // Add properties & geometry last\n cloned.properties = cloneProperties(geojson.properties);\n cloned.geometry = cloneGeometry(geojson.geometry);\n return cloned;\n}\n/**\n * Clone Properties\n *\n * @private\n * @param {Object} properties GeoJSON Properties\n * @returns {Object} cloned Properties\n */\nfunction cloneProperties(properties) {\n var cloned = {};\n if (!properties) {\n return cloned;\n }\n Object.keys(properties).forEach(function (key) {\n var value = properties[key];\n if (typeof value === \"object\") {\n if (value === null) {\n // handle null\n cloned[key] = null;\n }\n else if (Array.isArray(value)) {\n // handle Array\n cloned[key] = value.map(function (item) {\n return item;\n });\n }\n else {\n // handle generic Object\n cloned[key] = cloneProperties(value);\n }\n }\n else {\n cloned[key] = value;\n }\n });\n return cloned;\n}\n/**\n * Clone Feature Collection\n *\n * @private\n * @param {FeatureCollection<any>} geojson GeoJSON Feature Collection\n * @returns {FeatureCollection<any>} cloned Feature Collection\n */\nfunction cloneFeatureCollection(geojson) {\n var cloned = { type: \"FeatureCollection\" };\n // Preserve Foreign Members\n Object.keys(geojson).forEach(function (key) {\n switch (key) {\n case \"type\":\n case \"features\":\n return;\n default:\n cloned[key] = geojson[key];\n }\n });\n // Add features\n cloned.features = geojson.features.map(function (feature) {\n return cloneFeature(feature);\n });\n return cloned;\n}\n/**\n * Clone Geometry\n *\n * @private\n * @param {Geometry<any>} geometry GeoJSON Geometry\n * @returns {Geometry<any>} cloned Geometry\n */\nfunction cloneGeometry(geometry) {\n var geom = { type: geometry.type };\n if (geometry.bbox) {\n geom.bbox = geometry.bbox;\n }\n if (geometry.type === \"GeometryCollection\") {\n geom.geometries = geometry.geometries.map(function (g) {\n return cloneGeometry(g);\n });\n return geom;\n }\n geom.coordinates = deepSlice(geometry.coordinates);\n return geom;\n}\n/**\n * Deep Slice coordinates\n *\n * @private\n * @param {Coordinates} coords Coordinates\n * @returns {Coordinates} all coordinates sliced\n */\nfunction deepSlice(coords) {\n var cloned = coords;\n if (typeof cloned[0] !== \"object\") {\n return cloned.slice();\n }\n return cloned.map(function (coord) {\n return deepSlice(coord);\n });\n}\nexport default clone;\n","import { isNumber, } from \"@turf/helpers\";\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nexport function getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n if (Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])) {\n return coord;\n }\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nexport function getCoords(coords) {\n if (Array.isArray(coords)) {\n return coords;\n }\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n }\n else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\n}\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nexport function containsNumber(coordinates) {\n if (coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])) {\n return true;\n }\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function geojsonType(value, type, name) {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n if (!value || value.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type);\n }\n}\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nexport function featureOf(feature, type, name) {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n}\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function collectionOf(featureCollection, type, name) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\n }\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\n var feature = _a[_i];\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n }\n}\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nexport function getGeom(geojson) {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nexport function getType(geojson, _name) {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n","import { getCoord } from \"@turf/invariant\";\nimport { radiansToLength, degreesToRadians, } from \"@turf/helpers\";\n//http://en.wikipedia.org/wiki/Haversine_formula\n//http://www.movable-type.co.uk/scripts/latlong.html\n/**\n * Calculates the distance between two {@link Point|points} in degrees, radians, miles, or kilometers.\n * This uses the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula) to account for global curvature.\n *\n * @name distance\n * @param {Coord | Point} from origin point or coordinate\n * @param {Coord | Point} to destination point or coordinate\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] can be degrees, radians, miles, or kilometers\n * @returns {number} distance between the two points\n * @example\n * var from = turf.point([-75.343, 39.984]);\n * var to = turf.point([-75.534, 39.123]);\n * var options = {units: 'miles'};\n *\n * var distance = turf.distance(from, to, options);\n *\n * //addToMap\n * var addToMap = [from, to];\n * from.properties.distance = distance;\n * to.properties.distance = distance;\n */\nfunction distance(from, to, options) {\n if (options === void 0) { options = {}; }\n var coordinates1 = getCoord(from);\n var coordinates2 = getCoord(to);\n var dLat = degreesToRadians(coordinates2[1] - coordinates1[1]);\n var dLon = degreesToRadians(coordinates2[0] - coordinates1[0]);\n var lat1 = degreesToRadians(coordinates1[1]);\n var lat2 = degreesToRadians(coordinates2[1]);\n var a = Math.pow(Math.sin(dLat / 2), 2) +\n Math.pow(Math.sin(dLon / 2), 2) * Math.cos(lat1) * Math.cos(lat2);\n return radiansToLength(2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)), options.units);\n}\nexport default distance;\n","import clone from \"@turf/clone\";\nimport distance from \"@turf/distance\";\nimport { featureEach } from \"@turf/meta\";\n/**\n * Takes a reference {@link Point|point} and a FeatureCollection of Features\n * with Point geometries and returns the\n * point from the FeatureCollection closest to the reference. This calculation\n * is geodesic.\n *\n * @name nearestPoint\n * @param {Coord} targetPoint the reference point\n * @param {FeatureCollection<Point>} points against input point set\n * @returns {Feature<Point>} the closest point in the set to the reference point\n * @example\n * var targetPoint = turf.point([28.965797, 41.010086], {\"marker-color\": \"#0F0\"});\n * var points = turf.featureCollection([\n * turf.point([28.973865, 41.011122]),\n * turf.point([28.948459, 41.024204]),\n * turf.point([28.938674, 41.013324])\n * ]);\n *\n * var nearest = turf.nearestPoint(targetPoint, points);\n *\n * //addToMap\n * var addToMap = [targetPoint, points, nearest];\n * nearest.properties['marker-color'] = '#F00';\n */\nfunction nearestPoint(targetPoint, points) {\n // Input validation\n if (!targetPoint)\n throw new Error(\"targetPoint is required\");\n if (!points)\n throw new Error(\"points is required\");\n var nearest;\n var minDist = Infinity;\n var bestFeatureIndex = 0;\n featureEach(points, function (pt, featureIndex) {\n var distanceToPoint = distance(targetPoint, pt);\n if (distanceToPoint < minDist) {\n bestFeatureIndex = featureIndex;\n minDist = distanceToPoint;\n }\n });\n nearest = clone(points.features[bestFeatureIndex]);\n nearest.properties.featureIndex = bestFeatureIndex;\n nearest.properties.distanceToPoint = minDist;\n return nearest;\n}\nexport default nearestPoint;\n","import { getCoord, getGeom } from \"@turf/invariant\";\n// http://en.wikipedia.org/wiki/Even%E2%80%93odd_rule\n// modified from: https://github.com/substack/point-in-polygon/blob/master/index.js\n// which was modified from http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html\n/**\n * Takes a {@link Point} and a {@link Polygon} or {@link MultiPolygon} and determines if the point\n * resides inside the polygon. The polygon can be convex or concave. The function accounts for holes.\n *\n * @name booleanPointInPolygon\n * @param {Coord} point input point\n * @param {Feature<Polygon|MultiPolygon>} polygon input polygon or multipolygon\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.ignoreBoundary=false] True if polygon boundary should be ignored when determining if\n * the point is inside the polygon otherwise false.\n * @returns {boolean} `true` if the Point is inside the Polygon; `false` if the Point is not inside the Polygon\n * @example\n * var pt = turf.point([-77, 44]);\n * var poly = turf.polygon([[\n * [-81, 41],\n * [-81, 47],\n * [-72, 47],\n * [-72, 41],\n * [-81, 41]\n * ]]);\n *\n * turf.booleanPointInPolygon(pt, poly);\n * //= true\n */\nexport default function booleanPointInPolygon(point, polygon, options) {\n if (options === void 0) { options = {}; }\n // validation\n if (!point) {\n throw new Error(\"point is required\");\n }\n if (!polygon) {\n throw new Error(\"polygon is required\");\n }\n var pt = getCoord(point);\n var geom = getGeom(polygon);\n var type = geom.type;\n var bbox = polygon.bbox;\n var polys = geom.coordinates;\n // Quick elimination if point is not inside bbox\n if (bbox && inBBox(pt, bbox) === false) {\n return false;\n }\n // normalize to multipolygon\n if (type === \"Polygon\") {\n polys = [polys];\n }\n var insidePoly = false;\n for (var i = 0; i < polys.length && !insidePoly; i++) {\n // check if it is in the outer ring first\n if (inRing(pt, polys[i][0], options.ignoreBoundary)) {\n var inHole = false;\n var k = 1;\n // check for the point in any of the holes\n while (k < polys[i].length && !inHole) {\n if (inRing(pt, polys[i][k], !options.ignoreBoundary)) {\n inHole = true;\n }\n k++;\n }\n if (!inHole) {\n insidePoly = true;\n }\n }\n }\n return insidePoly;\n}\n/**\n * inRing\n *\n * @private\n * @param {Array<number>} pt [x,y]\n * @param {Array<Array<number>>} ring [[x,y], [x,y],..]\n * @param {boolean} ignoreBoundary ignoreBoundary\n * @returns {boolean} inRing\n */\nfunction inRing(pt, ring, ignoreBoundary) {\n var isInside = false;\n if (ring[0][0] === ring[ring.length - 1][0] &&\n ring[0][1] === ring[ring.length - 1][1]) {\n ring = ring.slice(0, ring.length - 1);\n }\n for (var i = 0, j = ring.length - 1; i < ring.length; j = i++) {\n var xi = ring[i][0];\n var yi = ring[i][1];\n var xj = ring[j][0];\n var yj = ring[j][1];\n var onBoundary = pt[1] * (xi - xj) + yi * (xj - pt[0]) + yj * (pt[0] - xi) === 0 &&\n (xi - pt[0]) * (xj - pt[0]) <= 0 &&\n (yi - pt[1]) * (yj - pt[1]) <= 0;\n if (onBoundary) {\n return !ignoreBoundary;\n }\n var intersect = yi > pt[1] !== yj > pt[1] &&\n pt[0] < ((xj - xi) * (pt[1] - yi)) / (yj - yi) + xi;\n if (intersect) {\n isInside = !isInside;\n }\n }\n return isInside;\n}\n/**\n * inBBox\n *\n * @private\n * @param {Position} pt point [x,y]\n * @param {BBox} bbox BBox [west, south, east, north]\n * @returns {boolean} true/false if point is inside BBox\n */\nfunction inBBox(pt, bbox) {\n return (bbox[0] <= pt[0] && bbox[1] <= pt[1] && bbox[2] >= pt[0] && bbox[3] >= pt[1]);\n}\n","import explode from '@turf/explode';\nimport centroid from '@turf/center';\nimport nearestPoint from '@turf/nearest-point';\nimport booleanPointInPolygon from '@turf/boolean-point-in-polygon';\nimport { featureCollection, point, feature } from '@turf/helpers';\n\n/**\n * Takes a Feature or FeatureCollection and returns a {@link Point} guaranteed to be on the surface of the feature.\n *\n * * Given a {@link Polygon}, the point will be in the area of the polygon\n * * Given a {@link LineString}, the point will be along the string\n * * Given a {@link Point}, the point will the same as the input\n *\n * @name pointOnFeature\n * @param {GeoJSON} geojson any Feature or FeatureCollection\n * @returns {Feature<Point>} a point on the surface of `input`\n * @example\n * var polygon = turf.polygon([[\n * [116, -36],\n * [131, -32],\n * [146, -43],\n * [155, -25],\n * [133, -9],\n * [111, -22],\n * [116, -36]\n * ]]);\n *\n * var pointOnPolygon = turf.pointOnFeature(polygon);\n *\n * //addToMap\n * var addToMap = [polygon, pointOnPolygon];\n */\nfunction pointOnFeature(geojson) {\n // normalize\n var fc = normalize(geojson);\n\n // get centroid\n var cent = centroid(fc);\n\n // check to see if centroid is on surface\n var onSurface = false;\n var i = 0;\n while (!onSurface && i < fc.features.length) {\n var geom = fc.features[i].geometry;\n var x, y, x1, y1, x2, y2, k;\n var onLine = false;\n if (geom.type === \"Point\") {\n if (\n cent.geometry.coordinates[0] === geom.coordinates[0] &&\n cent.geometry.coordinates[1] === geom.coordinates[1]\n ) {\n onSurface = true;\n }\n } else if (geom.type === \"MultiPoint\") {\n var onMultiPoint = false;\n k = 0;\n while (!onMultiPoint && k < geom.coordinates.length) {\n if (\n cent.geometry.coordinates[0] === geom.coordinates[k][0] &&\n cent.geometry.coordinates[1] === geom.coordinates[k][1]\n ) {\n onSurface = true;\n onMultiPoint = true;\n }\n k++;\n }\n } else if (geom.type === \"LineString\") {\n k = 0;\n while (!onLine && k < geom.coordinates.length - 1) {\n x = cent.geometry.coordinates[0];\n y = cent.geometry.coordinates[1];\n x1 = geom.coordinates[k][0];\n y1 = geom.coordinates[k][1];\n x2 = geom.coordinates[k + 1][0];\n y2 = geom.coordinates[k + 1][1];\n if (pointOnSegment(x, y, x1, y1, x2, y2)) {\n onLine = true;\n onSurface = true;\n }\n k++;\n }\n } else if (geom.type === \"MultiLineString\") {\n var j = 0;\n while (j < geom.coordinates.length) {\n onLine = false;\n k = 0;\n var line = geom.coordinates[j];\n while (!onLine && k < line.length - 1) {\n x = cent.geometry.coordinates[0];\n y = cent.geometry.coordinates[1];\n x1 = line[k][0];\n y1 = line[k][1];\n x2 = line[k + 1][0];\n y2 = line[k + 1][1];\n if (pointOnSegment(x, y, x1, y1, x2, y2)) {\n onLine = true;\n onSurface = true;\n }\n k++;\n }\n j++;\n }\n } else if (geom.type === \"Polygon\" || geom.type === \"MultiPolygon\") {\n if (booleanPointInPolygon(cent, geom)) {\n onSurface = true;\n }\n }\n i++;\n }\n if (onSurface) {\n return cent;\n } else {\n var vertices = featureCollection([]);\n for (i = 0; i < fc.features.length; i++) {\n vertices.features = vertices.features.concat(\n explode(fc.features[i]).features\n );\n }\n // Remove distanceToPoint properties from nearestPoint()\n return point(nearestPoint(cent, vertices).geometry.coordinates);\n }\n}\n\n/**\n * Normalizes any GeoJSON to a FeatureCollection\n *\n * @private\n * @name normalize\n * @param {GeoJSON} geojson Any GeoJSON\n * @returns {FeatureCollection} FeatureCollection\n */\nfunction normalize(geojson) {\n if (geojson.type !== \"FeatureCollection\") {\n if (geojson.type !== \"Feature\") {\n return featureCollection([feature(geojson)]);\n }\n return featureCollection([geojson]);\n }\n return geojson;\n}\n\nfunction pointOnSegment(x, y, x1, y1, x2, y2) {\n var ab = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n var ap = Math.sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1));\n var pb = Math.sqrt((x2 - x) * (x2 - x) + (y2 - y) * (y2 - y));\n return ab === ap + pb;\n}\n\nexport default pointOnFeature;\n","/*\n * Leaflet.TextPath - Shows text along a polyline\n * Inspired by Tom Mac Wright article :\n * https://web.archive.org/web/20130312131812/http://mapbox.com/osmdev/2012/11/20/getting-serious-about-svg/\n */\n\n(function () {\n\nvar __onAdd = L.Polyline.prototype.onAdd,\n __onRemove = L.Polyline.prototype.onRemove,\n __updatePath = L.Polyline.prototype._updatePath,\n __bringToFront = L.Polyline.prototype.bringToFront;\n\n\nvar PolylineTextPath = {\n\n onAdd: function (map) {\n __onAdd.call(this, map);\n this._textRedraw();\n },\n\n onRemove: function (map) {\n map = map || this._map;\n if (map && this._textNode && this._renderer._container)\n this._renderer._container.removeChild(this._textNode);\n __onRemove.call(this, map);\n },\n\n bringToFront: function () {\n __bringToFront.call(this);\n this._textRedraw();\n },\n\n _updatePath: function () {\n __updatePath.call(this);\n this._textRedraw();\n },\n\n _textRedraw: function () {\n var text = this._text,\n options = this._textOptions;\n if (text) {\n this.setText(null).setText(text, options);\n }\n },\n\n setText: function (text, options) {\n this._text = text;\n this._textOptions = options;\n\n /* If not in SVG mode or Polyline not added to map yet return */\n /* setText will be called by onAdd, using value stored in this._text */\n if (!L.Browser.svg || typeof this._map === 'undefined') {\n return this;\n }\n\n var defaults = {\n repeat: false,\n fillColor: 'black',\n attributes: {},\n below: false,\n };\n options = L.Util.extend(defaults, options);\n\n /* If empty text, hide */\n if (!text) {\n if (this._textNode && this._textNode.parentNode) {\n this._renderer._container.removeChild(this._textNode);\n \n /* delete the node, so it will not be removed a 2nd time if the layer is later removed from the map */\n delete this._textNode;\n }\n return this;\n }\n\n text = text.replace(/ /g, '\\u00A0'); // Non breakable spaces\n var id = 'pathdef-' + L.Util.stamp(this);\n var svg = this._renderer._container;\n this._path.setAttribute('id', id);\n\n if (options.repeat) {\n if (options.repeat!=true && options.repeat>=1) {\n text=text.padStart(options.repeat, '\\u00A0');\n }\n /* Compute single pattern length */\n var pattern = L.SVG.create('text');\n for (var attr in options.attributes)\n pattern.setAttribute(attr, options.attributes[attr]);\n pattern.appendChild(document.createTextNode(text));\n svg.appendChild(pattern);\n var alength = pattern.getComputedTextLength();\n svg.removeChild(pattern);\n\n /* Create string as long as path */\n text = new Array(Math.ceil(isNaN(this._path.getTotalLength() / alength) ? 0 : this._path.getTotalLength() / alength)).join(text);\n }\n\n /* Put it along the path using textPath */\n var textNode = L.SVG.create('text'),\n textPath = L.SVG.create('textPath');\n\n var dy = options.offset || this._path.getAttribute('stroke-width');\n\n textPath.setAttributeNS(\"http://www.w3.org/1999/xlink\", \"xlink:href\", '#'+id);\n textNode.setAttribute('dy', dy);\n for (var attr in options.attributes)\n textNode.setAttribute(attr, options.attributes[attr]);\n textPath.appendChild(document.createTextNode(text));\n textNode.appendChild(textPath);\n this._textNode = textNode;\n\n if (options.below) {\n svg.insertBefore(textNode, svg.firstChild);\n }\n else {\n svg.appendChild(textNode);\n }\n\n /* Center text according to the path's bounding box */\n if (options.center) {\n var textLength = textNode.getComputedTextLength();\n var pathLength = this._path.getTotalLength();\n /* Set the position for the left side of the textNode */\n textNode.setAttribute('dx', ((pathLength / 2) - (textLength / 2)));\n }\n\n /* Change label rotation (if required) */\n if (options.orientation) {\n var rotateAngle = 0;\n switch (options.orientation) {\n case 'flip':\n rotateAngle = 180;\n break;\n case 'perpendicular':\n rotateAngle = 90;\n break;\n default:\n rotateAngle = options.orientation;\n }\n\n var rotatecenterX = (textNode.getBBox().x + textNode.getBBox().width / 2);\n var rotatecenterY = (textNode.getBBox().y + textNode.getBBox().height / 2);\n textNode.setAttribute('transform','rotate(' + rotateAngle + ' ' + rotatecenterX + ' ' + rotatecenterY + ')');\n }\n\n /* Initialize mouse events for the additional nodes */\n if (this.options.interactive) {\n if (L.Browser.svg || !L.Browser.vml) {\n textPath.setAttribute('class', 'leaflet-interactive');\n }\n\n var events = ['click', 'dblclick', 'mousedown', 'mouseover',\n 'mouseout', 'mousemove', 'contextmenu'];\n for (var i = 0; i < events.length; i++) {\n L.DomEvent.on(textNode, events[i], this.fire, this);\n }\n }\n\n return this;\n }\n};\n\nL.Polyline.include(PolylineTextPath);\n\nL.LayerGroup.include({\n setText: function(text, options) {\n for (var layer in this._layers) {\n if (typeof this._layers[layer].setText === 'function') {\n this._layers[layer].setText(text, options);\n }\n }\n return this;\n }\n});\n\n\n\n})();\n","@use '~leaflet/dist/leaflet.css';\n@use '../../utils/leaflet-simple-locate.css';\n@use '~@raruto/leaflet-elevation/dist/leaflet-elevation.min.css';\n@use '~leaflet.markercluster/dist/MarkerCluster.css';\n\n#map {\n position: relative;\n font-family: var(--font-family);\n display: block;\n}\n\n.leaflet-control-layers-toggle,\n.leaflet-retina .leaflet-control-layers-toggle {\n background-image: var(--layers-image-src);\n}\n\n.treks-map {\n height: 100%;\n}\n\n.trek-map {\n height: calc(100%);\n}\n\n.trek-map-and-elevation {\n height: calc(100% - var(--elevation-height));\n}\n\n.common-map {\n height: 100%;\n}\n\n#elevation {\n position: relative;\n background-color: #ffffff;\n}\n\n.elevation-control .background {\n border-radius: 0px;\n}\n\n.custom-theme.elevation-control .axis text {\n fill: var(--color-on-surface);\n}\n\n.custom-theme.elevation-control .axis line,\n.custom-theme.elevation-control .axis path {\n stroke: var(--color-on-surface);\n}\n\n.custom-theme.elevation-control .mouse-focus-label-rect {\n fill: var(--color-primary-container);\n stroke: var(--color-on-primary-container);\n}\n\n.custom-theme.elevation-control .mouse-focus-label-text {\n fill: var(--color-on-primary-container);\n}\n\n.custom-theme.elevation-control .background {\n background-color: var(--color-background);\n}\n\n.custom-theme.elevation-control .mouse-focus-line {\n stroke: var(--color-on-surface);\n}\n\n.use-theme-color.elevation-control .area path.altitude,\n.use-theme-color .legend-altitude rect.area {\n fill: var(--color-primary-app);\n stroke: var(--color-trek-line);\n}\n\n.custom-theme.height-focus.circle-lower {\n fill: #ffffff;\n stroke: var(--color-on-surface);\n}\n\n.custom-theme.elevation-polyline {\n stroke: var(--color-trek-line);\n}\n\n.custom-theme.height-focus.line,\n.custom-theme.height-focus-label {\n display: none;\n}\n\n.custom-theme .elevation-summary {\n margin: -12px 0px 0px 36px;\n font-size: 8px;\n font-family: var(--font-family);\n :nth-child(3)::after {\n display: none;\n }\n .avgele {\n display: none;\n }\n}\n\n.treks-marker-cluster-group-icon,\n.touristic-content-marker-cluster-group-icon,\n.touristic-event-marker-cluster-group-icon,\n.outdoor-site-marker-cluster-group-icon {\n background-color: var(--color-clusters);\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--color-on-primary);\n font-size: 16px;\n height: 100%;\n width: 100%;\n}\n\n.trek-marker,\n.step-marker,\n.touristic-content-marker,\n.touristic-event-marker,\n.outdoor-site-marker,\n.selected-trek-marker,\n.selected-step-marker,\n.selected-touristic-content-marker,\n.selected-touristic-event-marker,\n.selected-outdoor-site-marker,\n.departure-marker,\n.arrival-marker {\n width: 100%;\n height: 100%;\n .trek-marker-container,\n .step-marker-container,\n .touristic-content-marker-container,\n .touristic-event-marker-container,\n .outdoor-site-marker-container {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50% 50% 50% 0;\n border: 2px solid #ffffff;\n width: 100%;\n height: 100%;\n transform: rotate(-44deg);\n img,\n .step-number {\n display: flex;\n justify-content: center;\n align-items: center;\n transform: rotate(44deg);\n position: absolute;\n z-index: 20;\n width: var(--main-marker-icon-width) !important;\n }\n }\n\n .touristic-content-marker-container,\n .touristic-event-marker-container,\n .outdoor-site-marker-container {\n transform: rotate(-42deg);\n }\n\n .trek-marker-container,\n .touristic-content-marker-container,\n .touristic-event-marker-container,\n .outdoor-site-marker-container {\n background-color: var(--color-markers);\n }\n .step-marker-container {\n background-color: var(--color-markers);\n }\n}\n\n.departure-marker {\n background-color: #008000;\n border-radius: 14px;\n width: 100%;\n height: 100%;\n border: 4px #ffffff solid;\n}\n\n.arrival-marker {\n background-color: #ff0000;\n border-radius: 14px;\n width: 100%;\n height: 100%;\n border: 4px #ffffff solid;\n}\n\n.selected-trek-marker,\n.selected-step-marker,\n.selected-touristic-content-marker,\n.selected-touristic-event-marker,\n.selected-outdoor-site-marker {\n height: 100%;\n width: 100%;\n .trek-marker-container,\n .step-marker-container,\n .touristic-content-marker-container,\n .touristic-event-marker-container,\n .outdoor-site-marker-container {\n width: 100%;\n height: 100%;\n .trek-marker,\n .step-number {\n width: 100% !important;\n }\n }\n}\n\n.step-marker,\n.selected-step-marker {\n color: var(--color-on-surface-variant);\n}\n\n.map-loader-container {\n position: absolute;\n z-index: 500;\n width: 100%;\n height: 100%;\n background-color: var(--color-background);\n display: flex;\n justify-content: center;\n align-items: center;\n .loader {\n width: 48px;\n height: 48px;\n border: 5px solid var(--color-primary-container);\n border-bottom-color: var(--color-on-primary-container);\n border-radius: 50%;\n display: inline-block;\n box-sizing: border-box;\n animation: rotation 1s linear infinite;\n }\n\n @keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n}\n\n.trek-departure-popup,\n.touristic-content-coordinates-popup,\n.touristic-event-coordinates-popup,\n.outdoor-site-coordinates-popup {\n position: relative;\n display: flex;\n flex-direction: column;\n img {\n border-top-left-radius: var(--border-radius, 8px);\n border-top-right-radius: var(--border-radius, 8px);\n }\n .trek-name,\n .touristic-content-name,\n .touristic-event-name,\n .outdoor-site-name {\n color: var(--color-primary-app);\n font-weight: 700;\n font-size: 16px;\n line-height: 24px;\n padding: 12px;\n }\n .trek-button,\n .touristic-content-button,\n .touristic-event-button,\n .outdoor-site-button {\n margin: 0px 8px 16px 8px;\n user-select: none;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n border: 1px solid var(--color-on-primary-container);\n background-color: var(--color-background);\n color: var(--color-on-primary-container);\n padding: 12px 24px;\n border-radius: var(--border-radius, 8px);\n box-sizing: border-box;\n position: relative;\n gap: 8px;\n white-space: nowrap;\n line-height: 20px;\n letter-spacing: 0.1000000015px;\n font-size: 14px;\n font-weight: 500;\n transition: box-shadow 0.2s ease-in-out 0s;\n font-family: var(--font-family);\n &:hover {\n background-color: var(--color-primary-container);\n }\n }\n}\n\n.poi-tooltip,\n.information-desks-tooltip,\n.sensitive-area-tooltip,\n.touristic-content-tooltip,\n.touristic-event-tooltip,\n.parking-tooltip,\n.signage-tootltip {\n .poi-name,\n .information-desks-name,\n .sensitive-area-name,\n .touristic-content-name,\n .touristic-event-name,\n .parking-name,\n .signage-name {\n color: var(--color-primary-app);\n font-weight: 400;\n font-size: 16px;\n line-height: 24px;\n }\n}\n\n.sensitiveAreasCheckboxContainer {\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: #ffffff;\n padding: 8px;\n border-radius: var(--border-radius, 8px);\n user-select: none;\n input,\n label {\n cursor: pointer;\n }\n input {\n margin: 0;\n }\n label {\n padding-left: 8px;\n }\n}\n\n.poi-marker,\n.information-desks-marker,\n.touristic-content-marker,\n.touristic-event-marker,\n.outdoor-site-marker,\n.signage-marker {\n background-color: var(--color-markers);\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 100%;\n img {\n width: var(--common-marker-icon-width) !important;\n height: auto;\n }\n}\n\n.signage-marker {\n overflow: hidden;\n border-radius: 0%;\n img {\n width: 30% !important;\n margin-right: 8px;\n }\n .signage-name {\n color: white;\n white-space: nowrap;\n max-width: 50%;\n }\n}\n\n.parking-marker {\n width: 100%;\n height: 100%;\n img {\n width: 100% !important;\n height: auto;\n }\n}\n\n.point-reference-icon {\n color: var(--reference-point-color);\n background-color: var(--reference-point-background-color);\n border: 1px solid #ffffff;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n font-size: 24px;\n}\n\n.leaflet-popup {\n bottom: 40px !important;\n left: -110px !important;\n}\n\n.leaflet-popup-content-wrapper {\n cursor: default;\n padding: 0px;\n background-color: var(--color-background);\n box-shadow: var(--elevation-2);\n}\n\n.leaflet-popup-tip {\n background-color: var(--color-background);\n}\n\n.leaflet-popup-content {\n width: 221px;\n margin: 0;\n}\n\n.leaflet-simple-locate svg {\n --primary-rgb: 00, 00, 00;\n}\n\n.leaflet-simple-locate-icon {\n --primary-rgb: 25, 135, 84;\n}\n\n.leaflet-simple-locate-orientation {\n --primary-rgb: 25, 135, 84 !important;\n}\n\n.leaflet-simple-locate.button-locate {\n --primary-rgb: 25, 135, 84;\n margin: 10px 0px 0px 10px !important;\n position: relative;\n transform: none;\n top: auto;\n left: auto;\n width: 34px;\n height: 34px;\n border-radius: 4px;\n border: 2px solid rgba(0, 0, 0, 0.2) !important;\n box-shadow: none;\n}\n\n.leaflet-interactive {\n cursor: grab;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.grw-elevation-visibility-button-container {\n z-index: 4000;\n position: absolute;\n left: 10px;\n bottom: 36px;\n}\n\n.leaflet-simple-locate-icon {\n fill: #1e90ff;\n}\n\n.layer-loader-container {\n width: 100%;\n height: 100%;\n background-color: rgba(255, 255, 255, 0.8);\n position: absolute;\n z-index: 8000;\n display: flex;\n justify-content: center;\n align-items: center;\n .layer-loader {\n width: 48px;\n height: 48px;\n border: 5px solid var(--color-primary-app);\n border-bottom-color: transparent;\n border-radius: 50%;\n display: inline-block;\n box-sizing: border-box;\n animation: rotation 1s linear infinite;\n }\n\n @keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n}\n","import { Component, Host, h, Prop, State, Event, EventEmitter, getAssetPath, Build, Listen, Element, forceUpdate } from '@stencil/core';\nimport { Feature, FeatureCollection } from 'geojson';\nimport L, { MarkerClusterGroup, TileLayer } from 'leaflet';\nimport 'leaflet-i18n';\nimport '@raruto/leaflet-elevation/dist/leaflet-elevation.min.js';\nimport 'leaflet.markercluster/dist/leaflet.markercluster.js';\nimport '../../utils/leaflet-simple-locate.min.js';\nimport state, { onChange } from 'store/store';\nimport { translate } from 'i18n/i18n';\nimport { getTrekGeometry } from 'services/treks.service';\nimport { tileLayerOffline } from 'leaflet.offline';\nimport { getDataInStore } from 'services/grw-db.service';\nimport { checkFileInStore, getFileInStore } from 'utils/utils';\nimport { Capacitor } from '@capacitor/core';\nimport { Directory, Filesystem } from '@capacitor/filesystem';\nimport { Trek } from 'components';\nimport pointOnFeature from '@turf/point-on-feature';\nimport bbox from '@turf/bbox';\nimport 'leaflet-textpath';\n\n@Component({\n tag: 'grw-map',\n styleUrl: 'grw-map.scss',\n shadow: true,\n})\nexport class GrwMap {\n @Element() mapElement: HTMLElement;\n mapRef: HTMLElement;\n hostElement: HTMLElement;\n @Prop() maxZoom = 19;\n\n @Event() trekCardPress: EventEmitter<number>;\n @Event() touristicContentCardPress: EventEmitter<number>;\n @Event() touristicEventCardPress: EventEmitter<number>;\n @Event() outdoorSiteCardPress: EventEmitter<number>;\n @Event() outdoorCourseCardPress: EventEmitter<number>;\n\n @State() mapIsReady = false;\n @Prop() nameLayer: string;\n @Prop() urlLayer: string;\n @Prop() attributionLayer: string;\n @Prop() customGeojsonUrl: string;\n @Prop() customGeojsonName: string;\n @Prop() customGeojsonColor: string;\n @Prop() customGeojsonWeight: string;\n @Prop() customWmsUrl: string;\n @Prop() customWmsLayers: string;\n @Prop() customWmsName: string;\n @Prop() customWmsAttribution: string;\n @Prop() customTileUrl: string;\n @Prop() customTileName: string;\n @Prop() customTileAttribution: string;\n @Prop() customLayersRefreshInterval = 0;\n\n @Prop() fontFamily = 'Roboto';\n @Prop() colorPrimaryApp = '#6b0030';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorPrimaryContainer = '#eaddff';\n @Prop() colorOnPrimaryContainer = '#21005e';\n @Prop() colorBackground = '#fef7ff';\n\n @Prop() colorTrekLine = '#6b0030';\n @Prop() colorSensitiveArea = '#4974a5';\n @Prop() colorMarkers = null;\n @Prop() colorClusters = null;\n @Prop() colorOutdoorArea = '#ffb700';\n\n @Prop() tilesMaxZoomOffline = 16;\n\n @Prop() grwApp = false;\n\n @Prop() mainMarkerSize = 32;\n @Prop() selectedMainMarkerSize = 48;\n @Prop() mainClusterSize = 48;\n @Prop() commonMarkerSize = 48;\n @Prop() departureArrivalMarkerSize = 14;\n @Prop() pointReferenceMarkerSize = 24;\n\n @Prop() elevationHeight = 280;\n @Prop() mobileElevationHeight = 280;\n @Prop() largeViewSize = 1024;\n @Prop() elevationDefaultState = 'visible';\n @Prop() isLargeView = false;\n @Prop() fabBackgroundColor = '#eaddff';\n @Prop() fabColor = '#21005d';\n\n @Prop() arrowRepeat = 20;\n\n map: L.Map;\n bounds;\n treksLayer: L.GeoJSON<any>;\n toutisticContentsLayer: L.GeoJSON<any>;\n touristicEventsLayer: L.GeoJSON<any>;\n\n treksMarkerClusterGroup: MarkerClusterGroup;\n touristicContentsMarkerClusterGroup: MarkerClusterGroup;\n touristicEventsMarkerClusterGroup: MarkerClusterGroup;\n outdoorSitesMarkerClusterGroup: MarkerClusterGroup;\n outdoorSitesLayer: L.GeoJSON<any>;\n currentTrekLayer: L.GeoJSON<any>;\n currentStepsLayer: L.GeoJSON<any>;\n selectedCurrentTrekLayer: L.GeoJSON<any>;\n selectedCurrentStepLayer: L.GeoJSON<any>;\n selectedTouristicContentLayer: L.GeoJSON<any>;\n selectedTouristicEventLayer: L.GeoJSON<any>;\n selectedOutdoorSiteLayer: L.GeoJSON<any>;\n selectedOutdoorCourseLayer: L.GeoJSON<any>;\n currentReferencePointsLayer: L.GeoJSON<any>;\n currentParkingLayer: L.GeoJSON<any>;\n currentSensitiveAreasLayer: L.GeoJSON<any>;\n currentPoisLayer: L.GeoJSON<any>;\n currentSignagesLayer: L.GeoJSON<any>;\n currentInformationDesksLayer: L.GeoJSON<any>;\n currentToutisticContentsLayer: L.GeoJSON<any>;\n currentTouristicEventsLayer: L.GeoJSON<any>;\n currentToutisticContentLayer: L.GeoJSON<any>;\n currentToutisticEventLayer: L.GeoJSON<any>;\n currentOutdoorSiteLayer: L.GeoJSON<any>;\n currentOutdoorCourseLayer: L.GeoJSON<any>;\n currentRelatedOutdoorSitesLayer: L.GeoJSON<any>;\n currentRelatedOutdoorCoursesLayer: L.GeoJSON<any>;\n elevationControl: L.Control.Layers;\n departureArrivalLayer: L.GeoJSON<any>;\n layersControl: L.Control.Layers;\n userLayersState: {\n [key: number]: boolean;\n } = {};\n tileLayer: { key: string; value: TileLayer }[] = [];\n customLayers: { [name: string]: L.Layer } = {};\n refreshIntervalId: any;\n trekPopupIsOpen: boolean;\n stepPopupIsOpen: boolean;\n touristicContentPopupIsOpen: boolean;\n touristicEventPopupIsOpen: boolean;\n outdoorSitePopupIsOpen: boolean;\n outdoorCoursePopupIsOpen: boolean;\n\n layerDataIsLoading: boolean;\n\n handleTreksWithinBoundsBind: (event: any) => void = this.handleTreksWithinBounds.bind(this);\n handleTouristicContentsWithinBoundsBind: (event: any) => void = this.handleTouristicContentsWithinBounds.bind(this);\n handleTouristicEventsWithinBoundsBind: (event: any) => void = this.handleTouristicEventsWithinBounds.bind(this);\n handleOutdoorSitesWithinBoundsBind: (event: any) => void = this.handleOutdoorSitesWithinBounds.bind(this);\n\n addTreksController: AbortController = null;\n addTouristicContentsController: AbortController = null;\n addTouristicEventsController: AbortController = null;\n addOutdoorSitesController: AbortController = null;\n addSelectedCurrentTrekController: AbortController = null;\n showTrekLineController: AbortController = null;\n\n viewportState: { [key: string]: boolean } = {};\n hasScrolled = false;\n\n fitBoundsQueued = false;\n\n componentDidUpdate() {\n if (this.map) {\n this.map.invalidateSize();\n if (this.fitBoundsQueued && this.bounds) {\n this.map.fitBounds(this.bounds);\n this.fitBoundsQueued = false;\n }\n }\n }\n\n @Listen('centerOnMap', { target: 'window' })\n onCenterOnMap(event: CustomEvent<{ latitude: number; longitude: number }>) {\n this.map.setView(new L.LatLng(event.detail.latitude, event.detail.longitude), 17, { animate: false });\n }\n\n @Listen('stepsIsInViewport', { target: 'window' })\n stepsIsInViewport(event: CustomEvent<boolean>) {\n this.viewportState.steps = event.detail;\n if (this.hasScrolled && this.currentStepsLayer && this.layersControl) {\n this.handleLayerVisibility(event.detail, this.currentStepsLayer);\n }\n }\n\n @Listen('descriptionIsInViewport', { target: 'window' })\n descriptionIsInViewport(event: CustomEvent<boolean>) {\n this.viewportState.description = event.detail;\n if (this.hasScrolled && this.currentReferencePointsLayer && this.layersControl) {\n this.handleLayerVisibility(event.detail, this.currentReferencePointsLayer);\n }\n }\n\n @Listen('parkingIsInViewport', { target: 'window' })\n parkingIsInViewport(event: CustomEvent<boolean>) {\n this.viewportState.parking = event.detail;\n if (this.hasScrolled && this.currentParkingLayer && this.layersControl) {\n this.handleLayerVisibility(event.detail, this.currentParkingLayer);\n }\n }\n\n @Listen('informationPlacesIsInViewport', { target: 'window' })\n onInformationPlacesIsInViewport(event: CustomEvent<boolean>) {\n this.viewportState.informationPlaces = event.detail;\n if (this.hasScrolled && this.currentInformationDesksLayer && this.layersControl) {\n this.handleLayerVisibility(event.detail, this.currentInformationDesksLayer);\n }\n }\n\n @Listen('sensitiveAreaIsInViewport', { target: 'window' })\n sensitiveAreaIsInViewport(event: CustomEvent<boolean>) {\n this.viewportState.sensitiveArea = event.detail;\n if (this.hasScrolled && this.currentSensitiveAreasLayer && this.layersControl) {\n this.handleLayerVisibility(event.detail, this.currentSensitiveAreasLayer);\n }\n }\n\n @Listen('poiIsInViewport', { target: 'window' })\n poiIsInViewport(event: CustomEvent<boolean>) {\n this.viewportState.pois = event.detail;\n if (this.hasScrolled && this.currentPoisLayer && this.layersControl) {\n this.handleLayerVisibility(event.detail, this.currentPoisLayer, !state.currentPois || state.currentPois.length === 0);\n }\n }\n\n @Listen('touristicContentsIsInViewport', { target: 'window' })\n touristicContentsIsInViewport(event: CustomEvent<boolean>) {\n this.viewportState.touristicContents = event.detail;\n if (this.hasScrolled && this.currentToutisticContentsLayer && this.layersControl) {\n this.handleLayerVisibility(event.detail, this.currentToutisticContentsLayer, !state.trekTouristicContents || state.trekTouristicContents.length === 0);\n }\n }\n\n @Listen('touristicEventsIsInViewport', { target: 'window' })\n touristicEventsIsInViewport(event: CustomEvent<boolean>) {\n this.viewportState.touristicEvents = event.detail;\n if (this.hasScrolled && this.currentTouristicEventsLayer && this.layersControl) {\n this.handleLayerVisibility(event.detail, this.currentTouristicEventsLayer, !state.trekTouristicEvents || state.trekTouristicEvents.length === 0);\n }\n }\n\n @Listen('sitesIsInViewport', { target: 'window' })\n sitesIsInViewport(event: CustomEvent<boolean>) {\n if (this.currentRelatedOutdoorSitesLayer && this.layersControl) {\n this.handleLayerVisibility(event.detail, this.currentRelatedOutdoorSitesLayer);\n }\n }\n\n @Listen('coursesIsInViewport', { target: 'window' })\n coursesIsInViewport(event: CustomEvent<boolean>) {\n if (this.currentRelatedOutdoorCoursesLayer && this.layersControl) {\n this.handleLayerVisibility(event.detail, this.currentRelatedOutdoorCoursesLayer);\n }\n }\n\n @Listen('detailScrolled', { target: 'window' })\n onDetailScrolled() {\n if (!this.hasScrolled) {\n this.hasScrolled = true;\n this.applyCachedViewportState();\n }\n }\n\n @Listen('cardTrekMouseOver', { target: 'window' })\n onCardTrekMouseOver(event: CustomEvent<number>) {\n if (!state.parentTrek && (!state.selectedTrekId || state.selectedTrekId !== event.detail)) {\n state.selectedTrekId = event.detail;\n this.hideTrekLine();\n this.showTrekLine(event.detail);\n this.addSelectedCurrentTrek(event.detail);\n } else if (state.parentTrek) {\n this.stepPopupIsOpen = false;\n state.selectedStepId = null;\n this.addSelectedCurrentStep(event.detail);\n }\n }\n\n @Listen('cardTrekMouseLeave', { target: 'window' })\n onCardTrekMouseLeave() {\n if (!this.trekPopupIsOpen && state.selectedTrekId) {\n this.trekPopupIsOpen = false;\n state.selectedTrekId = null;\n this.hideTrekLine();\n this.removeSelectedCurrentTrek();\n } else if (this.selectedCurrentStepLayer) {\n this.removeSelectedCurrentStep();\n }\n }\n\n @Listen('cardTouristicContentMouseOver', { target: 'window' })\n onTouristicContentMouseOver(event: CustomEvent<number>) {\n this.touristicContentPopupIsOpen = false;\n state.selectedTouristicContentId = null;\n this.addSelectedTouristicContent(event.detail);\n }\n\n @Listen('cardTouristicContentMouseLeave', { target: 'window' })\n onTouristicContentMouseLeave() {\n state.selectedTouristicContentId = null;\n this.removeSelectedTouristicContent();\n }\n\n @Listen('cardTouristicEventMouseOver', { target: 'window' })\n onTouristicEventMouseOver(event: CustomEvent<number>) {\n this.touristicEventPopupIsOpen = false;\n state.selectedTouristicEventId = null;\n this.addSelectedTouristicEvent(event.detail);\n }\n\n @Listen('cardTouristicEventMouseLeave', { target: 'window' })\n onTouristicEventMouseLeave() {\n state.selectedTouristicEventId = null;\n this.removeSelectedTouristicEvent();\n }\n\n @Listen('trekDownloadedSuccessConfirm', { target: 'window' })\n onTrekDownloadedSuccessConfirm() {\n this.map.setMaxZoom(this.tilesMaxZoomOffline);\n }\n\n @Listen('trekDeleteSuccessConfirm', { target: 'window' })\n onTrekDeleteSuccessConfirm() {\n this.map.setMaxZoom(this.maxZoom);\n }\n\n @Listen('cardOutdoorSiteMouseOver', { target: 'window' })\n onOutdoorSiteMouseOver(event: CustomEvent<number>) {\n this.outdoorSitePopupIsOpen = false;\n state.selectedOutdoorSiteId = null;\n this.addSelectedOutdoorSite(event.detail);\n }\n\n @Listen('cardOutdoorSiteMouseLeave', { target: 'window' })\n onOutdoorSiteMouseLeave() {\n state.selectedOutdoorSiteId = null;\n this.removeSelectedOutdoorSite();\n }\n\n componentWillLoad() {\n if (!state.language) {\n state.language = 'fr';\n }\n if (!state.languages) {\n state.languages = ['fr'];\n }\n }\n\n componentDidLoad() {\n this.map = L.map(this.mapRef, { zoom: 4, center: [47, 2], zoomControl: false });\n\n this.map.on('overlayadd', (event: any) => {\n const layer = event.layer;\n const isCustom = Object.values(this.customLayers).includes(layer);\n if (isCustom) {\n this.refreshSingleLayer(layer);\n }\n });\n\n const nameLayers = this.nameLayer ? this.nameLayer.split(',') : [];\n\n const urlLayers = this.urlLayer.split(',http').map((url, index) => (index === 0 ? url : 'http' + url));\n\n const attributionLayers = this.attributionLayer ? this.attributionLayer.split(',') : [];\n urlLayers.forEach((urlLayer, index) => {\n this.tileLayer.push({\n key: `${nameLayers[index]}`,\n value: tileLayerOffline(urlLayer, {\n maxZoom: this.maxZoom,\n attribution: `${\n attributionLayers[index] && attributionLayers[index] !== '' ? attributionLayers[index].concat(' | ') : ''\n }Powered by <a target=\"_blank\" href=\"https://geotrek.fr/\">Geotrek</a>`,\n crossOrigin: true,\n }),\n });\n });\n\n this.tileLayer[0].value.addTo(this.map);\n\n if (urlLayers.length > 1) {\n this.layersControl = L.control\n .layers(\n this.tileLayer.reduce((tileLayers, tileLayer) => Object.assign(tileLayers, { [tileLayer.key]: tileLayer.value }), {}),\n {},\n { collapsed: true },\n )\n .addTo(this.map);\n }\n\n L.control.zoom({ zoomInTitle: translate[state.language].zoomIn, zoomOutTitle: translate[state.language].zoomOut }).addTo(this.map);\n\n L.control.scale({ metric: true, imperial: false }).addTo(this.map);\n\n (L.Control as any).Contract = L.Control.extend({\n onAdd: () => {\n const contractContainer = L.DomUtil.create('div');\n contractContainer.className = 'leaflet-bar leaflet-control';\n const contract = contractContainer.appendChild(L.DomUtil.create('a'));\n contract.href = '#';\n contract.style.backgroundImage = `var(--contract-image-src)`;\n contractContainer.onclick = e => {\n this.bounds && this.map.fitBounds(this.bounds);\n e.preventDefault();\n };\n contract.title = translate[state.language].contract;\n\n return contractContainer;\n },\n });\n\n (L.control as any).contract = opts => {\n return new (L.Control as any).Contract(opts);\n };\n\n (L.control as any).contract({ position: 'topleft' }).addTo(this.map);\n\n new (L.Control as any).SimpleLocate({\n position: 'topleft',\n className: 'button-locate',\n title: translate[state.language].locate,\n }).addTo(this.map);\n\n if (state.currentTrek) {\n this.addTrek();\n } else if (state.currentTreks) {\n this.addTreks();\n } else if (state.currentTouristicContent) {\n this.addTouristicContent();\n } else if (state.currentTouristicEvent) {\n this.addTouristicEvent();\n } else if (state.currentOutdoorSite) {\n this.addOutdoorSite();\n } else if (state.currentOutdoorCourse) {\n this.addOutdoorCourse();\n } else if (state.touristicContents) {\n this.addTouristicContents();\n } else if (state.touristicEvents) {\n this.addTouristicEvents();\n } else if (state.outdoorSites) {\n this.addOutdoorSites();\n }\n\n onChange('currentTreks', () => {\n this.hideTrekLine();\n this.removeSelectedCurrentTrek();\n this.removeSelectedTouristicContent();\n this.removeSelectedTouristicEvent();\n if (state.currentTrek) {\n this.removeTreks();\n this.addTrek();\n } else if (state.currentTreks) {\n this.removeTreks();\n this.removeTouristicContents();\n this.removeTouristicEvents();\n this.removeOutdoorSites();\n this.removeTrek();\n this.removeTouristicContent();\n this.removeTouristicEvent();\n this.addTreks(true);\n }\n });\n\n onChange('currentPois', async () => {\n this.setCurrentPois();\n });\n\n onChange('trekTouristicContents', async () => {\n this.setCurrentTouristicContents();\n });\n\n onChange('trekTouristicEvents', async () => {\n this.setCurrentTouristicEvents();\n });\n\n onChange('currentOutdoorSites', () => {\n if (state.currentOutdoorSites) {\n this.removeTreks();\n this.removeTouristicContents();\n this.removeTouristicEvents();\n this.removeOutdoorSites();\n this.addOutdoorSites(true);\n }\n });\n\n onChange('currentTrek', () => {\n if (state.currentTrek) {\n this.removeTreks();\n this.addTrek();\n } else if (state.currentTreks) {\n this.removeTrek();\n this.removeTouristicContent();\n this.removeTouristicEvent();\n this.addTreks();\n }\n this.updateCustomLayersVisibility();\n });\n\n onChange('currentOutdoorSite', () => {\n if (state.currentOutdoorSite) {\n this.removeOutdoorCourse();\n this.removeOutdoorSites();\n this.addOutdoorSite();\n } else if (state.currentOutdoorSites) {\n this.removeOutdoorSite();\n this.addOutdoorSites();\n }\n });\n\n onChange('currentOutdoorSite', () => {\n if (state.currentOutdoorCourse) {\n this.removeOutdoorSite();\n this.addOutdoorCourse();\n }\n });\n\n onChange('currentTouristicContent', () => {\n if (this.grwApp) {\n if (state.currentTouristicContent) {\n this.removeTrek();\n this.removeTouristicContents();\n this.addTouristicContent();\n } else if (state.touristicContents) {\n this.removeTouristicContent();\n this.addTouristicContents();\n } else if (state.currentTrek) {\n this.removeTouristicContent();\n this.addTrek();\n } else if (state.currentTreks) {\n this.removeTouristicContent();\n this.addTreks();\n }\n }\n });\n\n onChange('currentTouristicEvent', () => {\n if (this.grwApp) {\n if (state.currentTouristicEvent) {\n this.removeTrek();\n this.removeTouristicEvents();\n this.addTouristicEvent();\n } else if (state.currentTrek) {\n this.removeTouristicEvent();\n this.addTrek();\n } else if (state.currentTreks) {\n this.removeTouristicEvent();\n this.addTreks();\n }\n }\n });\n\n onChange('currentTouristicContents', () => {\n this.hideTrekLine();\n this.removeSelectedCurrentTrek();\n this.removeSelectedTouristicContent();\n this.removeSelectedTouristicEvent();\n if (state.currentTouristicContent) {\n this.removeTouristicContents();\n this.addTouristicContent();\n } else if (state.currentTouristicContents) {\n this.removeTreks();\n this.removeTouristicEvents();\n this.removeOutdoorSites();\n this.removeTouristicContent();\n this.addTouristicContents(true);\n }\n });\n\n onChange('currentTouristicEvents', () => {\n this.hideTrekLine();\n this.removeSelectedCurrentTrek();\n this.removeSelectedTouristicContent();\n this.removeSelectedTouristicEvent();\n if (state.currentTouristicEvent) {\n this.removeTouristicEvents();\n this.addTouristicEvent();\n } else if (state.currentTouristicEvents) {\n this.removeTreks();\n this.removeTouristicContents();\n this.removeOutdoorSites();\n this.removeTouristicEvent();\n this.addTouristicEvents(true);\n }\n });\n\n onChange('mode', () => {\n this.updateCustomLayersVisibility();\n });\n\n this.addCustomLayers();\n\n if (this.customLayersRefreshInterval > 0) {\n this.refreshIntervalId = window.setInterval(() => {\n this.refreshCustomLayers();\n }, this.customLayersRefreshInterval * 60 * 1000);\n }\n }\n\n disconnectedCallback() {\n if (this.refreshIntervalId) {\n window.clearInterval(this.refreshIntervalId);\n }\n }\n\n async addCustomLayers() {\n // 1. Process custom WMS layers\n if (this.customWmsUrl) {\n const wmsUrls = this.customWmsUrl.split(',');\n const wmsLayers = this.customWmsLayers ? this.customWmsLayers.split(',') : [];\n const wmsNames = this.customWmsName ? this.customWmsName.split(',') : [];\n const wmsAttributions = this.customWmsAttribution ? this.customWmsAttribution.split(',') : [];\n\n wmsUrls.forEach((url, index) => {\n const layerName = wmsLayers[index] || '';\n const displayName = wmsNames[index] || `WMS Layer ${index + 1}`;\n const attribution = wmsAttributions[index] || '';\n try {\n const wmsLayer = L.tileLayer.wms(url.trim(), {\n layers: layerName.trim(),\n format: 'image/png',\n transparent: true,\n maxZoom: this.maxZoom,\n version: '1.3.0',\n attribution: attribution.trim(),\n });\n this.customLayers[displayName.trim()] = wmsLayer;\n } catch (e) {\n console.error('Error adding WMS layer:', e);\n }\n });\n }\n // 1.5. Process custom Tile layers (XYZ / WMTS)\n if (this.customTileUrl) {\n const tileUrls = this.customTileUrl.split(',');\n const tileNames = this.customTileName ? this.customTileName.split(',') : [];\n const tileAttributions = this.customTileAttribution ? this.customTileAttribution.split(',') : [];\n\n tileUrls.forEach((url, index) => {\n const displayName = tileNames[index] || `Tile Layer ${index + 1}`;\n const attribution = tileAttributions[index] || '';\n try {\n const tileLayer = L.tileLayer(url.trim(), {\n maxZoom: this.maxZoom,\n attribution: attribution.trim(),\n });\n (tileLayer as any)._originalUrl = url.trim();\n this.customLayers[displayName.trim()] = tileLayer;\n } catch (e) {\n console.error('Error adding custom tile layer:', e);\n }\n });\n }\n\n // 2. Process custom GeoJSON layers\n if (this.customGeojsonUrl) {\n const geojsonUrls = this.customGeojsonUrl.split(',');\n const geojsonNames = this.customGeojsonName ? this.customGeojsonName.split(',') : [];\n const geojsonColors = this.customGeojsonColor ? this.customGeojsonColor.split(',') : [];\n const geojsonWeights = this.customGeojsonWeight ? this.customGeojsonWeight.split(',') : [];\n\n for (let index = 0; index < geojsonUrls.length; index++) {\n const url = geojsonUrls[index].trim();\n const displayName = geojsonNames[index] || `GeoJSON Layer ${index + 1}`;\n const fallbackColor = geojsonColors[index] || '#3388ff';\n const fallbackWeight = geojsonWeights[index] ? parseInt(geojsonWeights[index], 10) : 3;\n\n try {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n const geojsonData = await response.json();\n\n const geojsonLayer = L.geoJSON(geojsonData, {\n style: (feature) => {\n const props = feature?.properties || {};\n const color = props.stroke || props.color || fallbackColor;\n const weight = props['stroke-width'] || props.weight || fallbackWeight;\n const opacity = props['stroke-opacity'] || props.opacity || 1.0;\n const fillColor = props.fill || props.fillColor || color;\n const fillOpacity = props['fill-opacity'] || props.fillOpacity || 0.2;\n\n return {\n color,\n weight,\n opacity,\n fillColor,\n fillOpacity,\n };\n },\n pointToLayer: (feature, latlng) => {\n const props = feature?.properties || {};\n const iconProp = props.icon || props['marker-symbol'];\n const nameProp = props.name || props.title || '';\n const descProp = props.description || props.desc || '';\n\n let marker;\n if (iconProp) {\n const isUrl = iconProp.startsWith('http') || iconProp.startsWith('/') || iconProp.startsWith('assets/');\n const size = this.commonMarkerSize;\n if (isUrl) {\n const customIcon = L.icon({\n iconUrl: iconProp,\n iconSize: [size, size],\n iconAnchor: [size / 2, size],\n });\n marker = L.marker(latlng, { icon: customIcon });\n } else {\n const bgColor = props['marker-color'] || props.backgroundColor || 'transparent';\n const borderColor = props['marker-stroke'] || props.borderColor || (bgColor !== 'transparent' ? '#ffffff' : 'transparent');\n const borderWeight = props['marker-stroke-width'] || (bgColor !== 'transparent' ? 2 : 0);\n const borderRadius = props['marker-radius'] || '50%';\n const customDivIcon = L.divIcon({\n html: `<div style=\"font-size: ${size * 0.6}px; display: flex; align-items: center; justify-content: center; width: ${size}px; height: ${size}px; background-color: ${bgColor}; border: ${borderWeight}px solid ${borderColor}; border-radius: ${borderRadius}; box-sizing: border-box;\">${iconProp}</div>`,\n className: '',\n iconSize: [size, size],\n iconAnchor: [size / 2, size],\n });\n marker = L.marker(latlng, { icon: customDivIcon });\n }\n } else {\n const color = props.stroke || props.color || fallbackColor;\n marker = L.circleMarker(latlng, {\n radius: 8,\n fillColor: color,\n color: '#fff',\n weight: 2,\n opacity: 1,\n fillOpacity: 0.8,\n });\n }\n\n if (nameProp || descProp) {\n let popupContent = `<div class=\"trek-departure-popup\" style=\"font-family: var(--font-family, sans-serif);\">`;\n if (props.image) {\n const imgUrl = props.image;\n popupContent += `<img src=\"${imgUrl}\" style=\"width: 100%; height: auto; border-top-left-radius: var(--border-radius, 8px); border-top-right-radius: var(--border-radius, 8px); max-height: 120px; object-fit: cover;\" />`;\n }\n if (nameProp) {\n popupContent += `<div class=\"trek-name\" style=\"padding: 12px 12px 4px 12px; margin: 0; color: var(--color-primary-app);\">${nameProp}</div>`;\n }\n if (descProp) {\n popupContent += `<div style=\"font-size: 12px; color: var(--color-on-surface-variant, #49454e); padding: ${nameProp ? '0px 12px 12px 12px' : '12px'}; line-height: 1.4; word-break: break-word;\">${descProp}</div>`;\n }\n popupContent += `</div>`;\n marker.bindPopup(popupContent, { closeButton: false });\n }\n return marker;\n }\n });\n\n (geojsonLayer as any)._customUrl = url;\n this.customLayers[displayName.trim()] = geojsonLayer;\n } catch (e) {\n console.error(`Error loading GeoJSON from ${url}:`, e);\n }\n }\n }\n\n this.updateCustomLayersVisibility();\n }\n\n refreshCustomLayers() {\n Object.keys(this.customLayers).forEach(name => {\n const layer = this.customLayers[name];\n if (this.map.hasLayer(layer)) {\n this.refreshSingleLayer(layer);\n }\n });\n }\n\n async refreshSingleLayer(layer: L.Layer) {\n if (layer instanceof L.TileLayer.WMS) {\n layer.setParams({ _t: Date.now() } as any);\n } else if (layer instanceof L.TileLayer) {\n const originalUrl = (layer as any)._originalUrl;\n if (originalUrl) {\n const separator = originalUrl.includes('?') ? '&' : '?';\n layer.setUrl(`${originalUrl}${separator}_t=${Date.now()}`);\n } else {\n layer.redraw();\n }\n } else if (layer instanceof L.GeoJSON) {\n const url = (layer as any)._customUrl;\n if (url) {\n try {\n const response = await fetch(url, { cache: 'no-store' });\n if (response.ok) {\n const newData = await response.json();\n layer.clearLayers();\n layer.addData(newData);\n }\n } catch (e) {\n console.error(`Error refreshing GeoJSON layer:`, e);\n }\n }\n }\n }\n\n updateCustomLayersVisibility() {\n const shouldShow = !this.grwApp || (state.mode === 'treks' && !!state.currentTrek);\n\n if (shouldShow && Object.keys(this.customLayers).length > 0 && !this.layersControl) {\n const baseLayers = {};\n this.tileLayer.forEach(tl => {\n baseLayers[tl.key] = tl.value;\n });\n this.layersControl = L.control.layers(baseLayers, {}, { collapsed: true }).addTo(this.map);\n }\n\n Object.keys(this.customLayers).forEach(name => {\n const layer = this.customLayers[name];\n if (shouldShow) {\n if (!this.map.hasLayer(layer)) {\n layer.addTo(this.map);\n }\n if (this.layersControl) {\n const hasLayer = (this.layersControl as any)._layers.some(l => l.layer === layer);\n if (!hasLayer) {\n this.layersControl.addOverlay(layer, name);\n }\n }\n } else {\n if (this.map.hasLayer(layer)) {\n this.map.removeLayer(layer);\n }\n if (this.layersControl) {\n this.layersControl.removeLayer(layer);\n }\n }\n });\n\n if (shouldShow && Object.keys(this.customLayers).length > 0) {\n this.handleLayersControlEvent();\n }\n }\n\n handleLayerVisibility(visible: boolean, layer: L.GeoJSON, loading = false) {\n if (visible && !this.map.hasLayer(layer)) {\n layer.addTo(this.map);\n this.layerDataIsLoading = loading;\n forceUpdate(this.hostElement);\n } else if (this.map.hasLayer(layer) && !this.userLayersState[(layer as any)._leaflet_id]) {\n this.map.removeLayer(layer);\n }\n this.handleLayersControlEvent();\n }\n\n async addTreks(resetBounds = false) {\n this.addTreksController?.abort();\n this.addTreksController = new AbortController();\n const { signal } = this.addTreksController;\n state.treksWithinBounds = state.currentTreks;\n\n const treksCurrentDepartureCoordinates = [];\n const treksFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.currentTreks) {\n for (const trek of state.currentTreks) {\n treksCurrentDepartureCoordinates.push(trek.departure_geom);\n treksFeatureCollection.features.push({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: trek.departure_geom },\n properties: {\n id: trek.id,\n name: trek.name,\n practice: state.practices.find(practice => practice.id === trek.practice)?.pictogram,\n imgSrc:\n trek.attachments && trek.attachments.filter(attachment => attachment.type === 'image').length > 0\n ? trek.attachments[0].thumbnail !== ''\n ? trek.attachments[0].thumbnail\n : trek.attachments[0].url\n : null,\n },\n });\n }\n }\n\n if (!this.treksLayer) {\n if ((treksCurrentDepartureCoordinates.length > 0 && !state.currentMapBounds) || resetBounds) {\n this.bounds = L.latLngBounds(treksCurrentDepartureCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));\n } else {\n if (state.currentMapBounds) {\n this.bounds = state.currentMapBounds;\n }\n }\n\n const treksIcons = await this.getIcons(treksFeatureCollection, 'practice');\n\n // Abort if a newer addTreks() call or removeTreks() was made during the await\n if (signal.aborted) {\n return;\n }\n\n this.treksLayer = L.geoJSON(treksFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: treksIcons[geoJsonPoint.properties.practice]\n ? `<div part=\"trek-marker-container\" class=\"trek-marker-container\"><img part=\"trek-marker-icon\" src=${treksIcons[geoJsonPoint.properties.practice]} /></div>`\n : `<div part=\"trek-marker-container\" class=\"trek-marker-container\"></div>`,\n className: 'trek-marker',\n iconSize: this.mainMarkerSize,\n iconAnchor: [this.mainMarkerSize / 2, this.mainMarkerSize],\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('click', async () => {\n const dataInStore = await this.getIcon(geoJsonPoint.properties.imgSrc);\n const imgSrc = dataInStore ? dataInStore : geoJsonPoint.properties.imgSrc ? geoJsonPoint.properties.imgSrc : null;\n const trekDeparturePopup = L.DomUtil.create('div');\n /* @ts-ignore */\n trekDeparturePopup.part = 'trek-departure-popup';\n trekDeparturePopup.className = 'trek-departure-popup';\n if (imgSrc) {\n const trekImg = L.DomUtil.create('img');\n /* @ts-ignore */\n trekImg.part = 'trek-image-popup';\n trekImg.src = imgSrc;\n trekDeparturePopup.appendChild(trekImg);\n }\n const trekName = L.DomUtil.create('div');\n trekName.innerHTML = geoJsonPoint.properties.name;\n /* @ts-ignore */\n trekName.part = 'trek-name';\n trekName.className = 'trek-name';\n trekDeparturePopup.appendChild(trekName);\n\n const trekButton = L.DomUtil.create('button');\n trekButton.innerHTML = 'Afficher le détail';\n /* @ts-ignore */\n trekButton.part = 'trek-button';\n trekButton.className = 'trek-button';\n trekButton.onclick = () => this.trekCardPress.emit(geoJsonPoint.properties.id);\n trekDeparturePopup.appendChild(trekButton);\n\n layer.bindPopup(trekDeparturePopup, { interactive: true, autoPan: false, closeButton: false } as any).openPopup();\n });\n layer.on('mouseover', e => {\n this.hideTrekLine();\n this.showTrekLine(geoJsonPoint.properties.id);\n this.addSelectedCurrentTrek(geoJsonPoint.properties.id, e.latlng);\n });\n },\n });\n\n this.treksMarkerClusterGroup = L.markerClusterGroup({\n showCoverageOnHover: false,\n removeOutsideVisibleBounds: false,\n iconCreateFunction: cluster => {\n return L.divIcon({\n html: '<div part=\"treks-marker-cluster-group-icon\" class=\"treks-marker-cluster-group-icon\">' + cluster.getChildCount() + '</div>',\n className: '',\n iconSize: this.mainClusterSize,\n } as any);\n },\n });\n\n this.treksMarkerClusterGroup.addLayer(this.treksLayer);\n this.map.addLayer(this.treksMarkerClusterGroup);\n } else {\n if (treksCurrentDepartureCoordinates.length > 0) {\n this.bounds = L.latLngBounds(treksCurrentDepartureCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));\n } else {\n this.map.fire('moveend');\n }\n this.treksLayer.clearLayers();\n this.treksLayer.addData(treksFeatureCollection);\n this.treksMarkerClusterGroup.clearLayers();\n this.treksMarkerClusterGroup.addLayer(this.treksLayer);\n }\n this.bounds && this.bounds._northEast && this.bounds._southWest && this.map.fitBounds(this.bounds);\n\n !this.mapIsReady && (this.mapIsReady = !this.mapIsReady);\n this.map.on('moveend', this.handleTreksWithinBoundsBind);\n }\n\n removeTreks() {\n this.addTreksController?.abort();\n if (this.treksLayer) {\n state.currentMapBounds = this.map.getBounds();\n this.map.removeLayer(this.treksMarkerClusterGroup);\n this.treksLayer = null;\n this.treksMarkerClusterGroup = null;\n this.map.off('moveend', this.handleTreksWithinBoundsBind);\n }\n }\n\n handleTreksWithinBounds() {\n if (\n (state.currentTreks && !state.currentMapBounds) ||\n (state.currentTreks && state.currentMapBounds && state.currentMapBounds.toBBoxString() !== this.map.getBounds().toBBoxString())\n ) {\n state.treksWithinBounds = state.currentTreks.filter(trek => this.map.getBounds().contains(L.latLng(trek.departure_geom[1], trek.departure_geom[0])));\n }\n }\n\n handleTouristicContentsWithinBounds() {\n if (\n (state.currentTouristicContents && !state.currentMapBounds) ||\n (state.currentTouristicContents && state.currentMapBounds && state.currentMapBounds.toBBoxString() !== this.map.getBounds().toBBoxString())\n ) {\n state.touristicContentsWithinBounds = state.currentTouristicContents.filter(touristicContent =>\n this.map.getBounds().contains(L.latLng(touristicContent.geometry.coordinates[1], touristicContent.geometry.coordinates[0])),\n );\n }\n }\n\n handleTouristicEventsWithinBounds() {\n if (\n (state.currentTouristicEvents && !state.currentMapBounds) ||\n (state.currentTouristicEvents && state.currentMapBounds && state.currentMapBounds.toBBoxString() !== this.map.getBounds().toBBoxString())\n ) {\n state.touristicEventsWithinBounds = state.currentTouristicEvents.filter(touristicEvent =>\n this.map.getBounds().contains(L.latLng(touristicEvent.geometry.coordinates[1], touristicEvent.geometry.coordinates[0])),\n );\n }\n }\n\n handleOutdoorSitesWithinBounds() {\n if (\n (state.currentOutdoorSites && !state.currentMapBounds) ||\n (state.currentOutdoorSites && state.currentMapBounds && state.currentMapBounds.toBBoxString() !== this.map.getBounds().toBBoxString())\n ) {\n state.outdoorSitesWithinBounds = state.currentOutdoorSites.filter(outdoorSite => {\n const coordinates = pointOnFeature(outdoorSite.geometry as any).geometry.coordinates;\n return this.map.getBounds().contains(L.latLng(coordinates[1], coordinates[0]));\n });\n }\n }\n\n async addTrek() {\n const trekInStore: Trek = await getDataInStore('treks', state.currentTrek.id);\n if (trekInStore) {\n this.map.setMaxZoom(this.tilesMaxZoomOffline);\n } else {\n this.map.setMaxZoom(this.maxZoom);\n }\n this.trekPopupIsOpen = false;\n state.selectedTrekId = null;\n this.hideTrekLine();\n this.removeSelectedCurrentTrek();\n\n const currentTrekFeature: Feature = {\n type: 'Feature',\n geometry: state.currentTrek.geometry,\n properties: {},\n };\n\n this.currentTrekLayer = L.geoJSON(currentTrekFeature, {\n style: () => ({\n color: 'transparent',\n }),\n onEachFeature: (_feature, layer) => {\n (layer as any).setText('>', {\n repeat: this.arrowRepeat,\n center: true,\n attributes: { 'fill': '#000000', 'font-weight': 'bold', 'font-size': '16px' },\n });\n },\n interactive: false,\n }).addTo(this.map);\n\n if (state.currentTrek.parking_location) {\n const parkingImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/parking.svg`);\n const currentParking: Feature = {\n type: 'Feature',\n properties: { name: state.currentTrek.advised_parking },\n geometry: { type: 'Point', coordinates: state.currentTrek.parking_location },\n };\n this.currentParkingLayer = L.geoJSON(currentParking, {\n pointToLayer: (_geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: `<img part=\"parking-marker\" src=${parkingImageSrc} />`,\n className: '',\n iconSize: this.commonMarkerSize,\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('mouseover', () => {\n const parkingTooltip = L.DomUtil.create('div');\n /* @ts-ignore */\n parkingTooltip.part = 'parking-tooltip';\n parkingTooltip.className = 'parking-tooltip';\n const parkingName = L.DomUtil.create('div');\n parkingName.innerHTML = geoJsonPoint.properties.name;\n /* @ts-ignore */\n parkingTooltip.part = 'parking-name';\n parkingName.className = 'parking-name';\n parkingTooltip.appendChild(parkingName);\n layer.bindTooltip(parkingTooltip).openTooltip();\n });\n },\n });\n }\n\n if (state.currentSensitiveAreas && state.currentSensitiveAreas.length > 0) {\n const currentSensitiveAreasFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n for (const sensitiveArea of state.currentSensitiveAreas) {\n currentSensitiveAreasFeatureCollection.features.push({\n type: 'Feature',\n properties: { name: sensitiveArea.name },\n geometry: sensitiveArea.geometry,\n });\n }\n\n this.currentSensitiveAreasLayer = L.geoJSON(currentSensitiveAreasFeatureCollection, {\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('mouseover', () => {\n const sensitiveAreaTooltip = L.DomUtil.create('div');\n /* @ts-ignore */\n sensitiveAreaTooltip.part = 'sensitive-area-tooltip';\n sensitiveAreaTooltip.className = 'sensitive-area-tooltip';\n const sensitiveAreaName = L.DomUtil.create('div');\n sensitiveAreaName.innerHTML = geoJsonPoint.properties.name;\n /* @ts-ignore */\n sensitiveAreaName.part = 'sensitive-area-name';\n sensitiveAreaName.className = 'sensitive-area-name';\n sensitiveAreaTooltip.appendChild(sensitiveAreaName);\n layer.bindTooltip(sensitiveAreaTooltip).openTooltip();\n });\n },\n style: () => ({ color: this.colorSensitiveArea }),\n });\n }\n\n await this.addCurrentInformationDesks(state.currentTrek);\n\n await this.addCurrentPois();\n\n await this.addCurrentSignages();\n\n await this.addCurrentTouristicContents();\n\n await this.addCurrentTouristicEvents();\n\n if (state.currentTrek.points_reference) {\n const currentReferencePointsFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n currentReferencePointsFeatureCollection.features.push({\n type: 'Feature',\n properties: {},\n geometry: state.currentTrek.points_reference,\n });\n\n let index = 0;\n this.currentReferencePointsLayer = L.geoJSON(currentReferencePointsFeatureCollection, {\n pointToLayer: (_geoJsonPoint, latlng) => {\n index += 1;\n return L.marker(latlng, {\n icon: L.divIcon({\n html: `<div part=\"point-reference-icon\" class=\"point-reference-icon\">${index}</div>`,\n className: '',\n iconSize: this.pointReferenceMarkerSize,\n } as any),\n autoPanOnFocus: false,\n interactive: false,\n } as any);\n },\n });\n }\n\n if (!this.currentStepsLayer && state.parentTrekId && state.parentTrek && state.currentTrek.id === state.parentTrekId) {\n const stepsFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.currentTrekSteps) {\n for (const trek of state.currentTrekSteps) {\n stepsFeatureCollection.features.push({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: trek.departure_geom },\n properties: {\n id: trek.id,\n name: trek.name,\n practice: state.practices.find(practice => practice.id === trek.practice)?.pictogram,\n imgSrc:\n trek.attachments && trek.attachments.filter(attachment => attachment.type === 'image').length > 0\n ? trek.attachments[0].thumbnail !== ''\n ? trek.attachments[0].thumbnail\n : trek.attachments[0].url\n : null,\n },\n });\n }\n }\n\n let stepIndex = 0;\n this.currentStepsLayer = L.geoJSON(stepsFeatureCollection, {\n pointToLayer: (_geoJsonPoint, latlng) => {\n stepIndex += 1;\n return L.marker(latlng, {\n zIndexOffset: 4000000,\n icon: L.divIcon({\n html: `<div part=\"step-marker\" class=\"step-marker\"><div part=\"step-marker-container\" class=\"step-marker-container\"><div part=\"step-number\" class=\"step-number\">${stepIndex}</div></div></div>`,\n className: '',\n iconSize: this.mainMarkerSize,\n iconAnchor: [this.mainMarkerSize / 2, this.mainMarkerSize],\n } as any),\n autoPanOnFocus: false,\n } as any);\n },\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('click', async () => {\n const dataInStore = await this.getIcon(geoJsonPoint.properties.imgSrc);\n const imgSrc = dataInStore ? dataInStore : geoJsonPoint.properties.imgSrc ? geoJsonPoint.properties.imgSrc : null;\n const trekDeparturePopup = L.DomUtil.create('div');\n /* @ts-ignore */\n trekDeparturePopup.part = 'trek-departure-popup';\n trekDeparturePopup.className = 'trek-departure-popup';\n if (imgSrc) {\n const trekImg = L.DomUtil.create('img');\n trekImg.src = imgSrc;\n trekDeparturePopup.appendChild(trekImg);\n }\n const trekName = L.DomUtil.create('div');\n trekName.innerHTML = geoJsonPoint.properties.name;\n /* @ts-ignore */\n trekDeparturePopup.part = 'trek-name';\n trekName.className = 'trek-name';\n trekDeparturePopup.appendChild(trekName);\n\n const trekButton = L.DomUtil.create('button');\n trekButton.innerHTML = 'Afficher le détail';\n /* @ts-ignore */\n trekDeparturePopup.part = 'trek-button';\n trekButton.className = 'trek-button';\n trekButton.onclick = () => this.trekCardPress.emit(geoJsonPoint.properties.id);\n trekDeparturePopup.appendChild(trekButton);\n\n layer.bindPopup(trekDeparturePopup, { interactive: true, autoPan: false, closeButton: false } as any).openPopup();\n });\n layer.on('mouseover', e => {\n this.addSelectedCurrentStep(geoJsonPoint.properties.id, e.latlng);\n });\n },\n });\n }\n\n let elevationTranslation = {\n 'y: ': '',\n 'x: ': '',\n 'Total Length: ': 'Longueur totale : ',\n 'Min Elevation: ': 'Altitude min : ',\n 'Max Elevation: ': 'Altitude max : ',\n };\n\n /* @ts-ignore */\n L.registerLocale('fr', elevationTranslation);\n /* @ts-ignore */\n L.setLocale('fr');\n\n const elevations = state.currentTrek.geometry.coordinates.map(coord => coord[2]).filter(el => el !== undefined && el !== null);\n const minMaxElevation = {\n yAxisMin: elevations.length > 0 ? Math.min(...elevations) * 0.75 : 0,\n yAxisMax: elevations.length > 0 ? Math.max(...elevations) * 1.25 : 0,\n };\n\n const elevationOptions = {\n elevationDiv: `#elevation-container`,\n theme: `custom-theme use-theme-color`,\n height: this.mapElement.getBoundingClientRect().width >= this.largeViewSize / 2 ? this.elevationHeight : this.mobileElevationHeight,\n distanceMarkers: { distance: false, direction: false },\n summary: 'inline',\n legend: false,\n downloadLink: false,\n autofitBounds: false,\n ruler: false,\n waypoints: false,\n almostOver: false,\n dragging: false,\n ...minMaxElevation,\n };\n this.elevationControl = (L.control as any).elevation(elevationOptions).addTo(this.map);\n const elevation = JSON.stringify({\n name: `${state.currentTrek.name}`,\n type: 'FeatureCollection',\n features: [{ type: 'Feature', geometry: { type: 'LineString', coordinates: state.currentTrek.geometry.coordinates }, properties: null }],\n });\n (this.elevationControl as any).load(elevation);\n (this.elevationControl as any).eleDiv.style.display = this.elevationDefaultState === 'visible' ? 'block' : 'none';\n forceUpdate(this.hostElement);\n\n const departureArrival: FeatureCollection = {\n type: 'FeatureCollection',\n features: [\n {\n type: 'Feature',\n geometry: { type: 'Point', coordinates: state.currentTrek.geometry.coordinates[0] },\n properties: null,\n },\n {\n type: 'Feature',\n geometry: { type: 'Point', coordinates: state.currentTrek.geometry.coordinates[state.currentTrek.geometry.coordinates.length - 1] },\n properties: null,\n },\n ],\n };\n\n let index = 0;\n this.departureArrivalLayer = L.geoJSON(departureArrival, {\n pointToLayer: (_geoJsonPoint, latlng) => {\n index += 1;\n return L.marker(latlng, {\n icon: L.divIcon({\n html: `<div part=\"${index === 1 ? 'departure-marker' : 'arrival-marker'}\" class=\"${index === 1 ? 'departure-marker' : 'arrival-marker'}\"></div>`,\n className: '',\n iconSize: this.departureArrivalMarkerSize,\n } as any),\n autoPanOnFocus: false,\n } as any);\n },\n });\n this.map.addLayer(this.departureArrivalLayer);\n\n this.handleLayersControl();\n\n this.bounds = L.latLngBounds(state.currentTrek.geometry.coordinates.map(coordinate => [coordinate[1], coordinate[0]]));\n this.map.on('eledata_loaded', () => {\n this.fitBoundsQueued = true;\n !this.mapIsReady && (this.mapIsReady = !this.mapIsReady);\n });\n }\n\n async getIcons(featuresCollection, property) {\n const icons = {};\n for (let index = 0; index < featuresCollection.features.length; index++) {\n if (featuresCollection.features[index].properties[property]) {\n icons[featuresCollection.features[index].properties[property]] = await this.getIcon(featuresCollection.features[index].properties[property]);\n }\n }\n return icons;\n }\n\n async getIcon(pictogram) {\n let icon;\n if (!Capacitor.isNativePlatform()) {\n const dataInStore = await checkFileInStore(pictogram);\n icon = dataInStore ? window.URL.createObjectURL((await getFileInStore(pictogram)).data) : pictogram ? pictogram : null;\n } else {\n const image = await Filesystem.getUri({\n path: pictogram,\n directory: Directory.Data,\n });\n if (image) {\n icon = Capacitor.convertFileSrc(image.uri);\n }\n }\n\n return icon;\n }\n\n async addSelectedCurrentTrek(id, customCoordinates?) {\n const treksFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.currentTreks) {\n const trek = state.currentTreks.find(trek => trek.id === id);\n treksFeatureCollection.features.push({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: customCoordinates ? [customCoordinates.lng, customCoordinates.lat] : trek.departure_geom },\n properties: {\n id: trek.id,\n name: trek.name,\n practice: state.practices.find(practice => practice.id === trek.practice)?.pictogram,\n imgSrc:\n trek.attachments && trek.attachments.filter(attachment => attachment.type === 'image').length > 0\n ? trek.attachments[0].thumbnail !== ''\n ? trek.attachments[0].thumbnail\n : trek.attachments[0].url\n : null,\n },\n });\n }\n\n this.removeSelectedCurrentTrek();\n this.addSelectedCurrentTrekController?.abort();\n this.addSelectedCurrentTrekController = new AbortController();\n const { signal } = this.addSelectedCurrentTrekController;\n state.selectedTrekId = id;\n\n const treksIcons = await this.getIcons(treksFeatureCollection, 'practice');\n\n // Abort if a newer hover or removal occurred during the await\n if (signal.aborted) {\n return;\n }\n\n this.selectedCurrentTrekLayer = L.geoJSON(treksFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n zIndexOffset: 4000000,\n icon: L.divIcon({\n html: treksIcons[geoJsonPoint.properties.practice]\n ? `<div part=\"selected-trek-marker\" class=\"selected-trek-marker\"><div part=\"trek-marker-container\" class=\"trek-marker-container\"><img part=\"trek-marker\" class=\"trek-marker\" src=${\n treksIcons[geoJsonPoint.properties.practice]\n } /></div></div>`\n : `<div part=\"selected-trek-marker\" class=\"selected-trek-marker\"><div part=\"trek-marker-container\" class=\"trek-marker-container\"></div></div>`,\n className: '',\n iconSize: this.selectedMainMarkerSize,\n iconAnchor: [this.selectedMainMarkerSize / 2, this.selectedMainMarkerSize],\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('click', async () => {\n const dataInStore = await this.getIcon(geoJsonPoint.properties.imgSrc);\n const imgSrc = dataInStore ? dataInStore : geoJsonPoint.properties.imgSrc ? geoJsonPoint.properties.imgSrc : null;\n const trekDeparturePopup = L.DomUtil.create('div');\n /* @ts-ignore */\n trekDeparturePopup.part = 'trek-departure-popup';\n trekDeparturePopup.className = 'trek-departure-popup';\n if (imgSrc) {\n const trekImg = L.DomUtil.create('img');\n trekImg.src = imgSrc;\n /* @ts-ignore */\n trekImg.part = 'trek-image';\n trekDeparturePopup.appendChild(trekImg);\n }\n const trekName = L.DomUtil.create('div');\n trekName.innerHTML = geoJsonPoint.properties.name;\n /* @ts-ignore */\n trekName.part = 'trek-name';\n trekName.className = 'trek-name';\n trekDeparturePopup.appendChild(trekName);\n\n const trekButton = L.DomUtil.create('button');\n trekButton.innerHTML = 'Afficher le détail';\n /* @ts-ignore */\n trekButton.part = 'trek-button';\n trekButton.className = 'trek-button';\n trekButton.onclick = () => this.trekCardPress.emit(geoJsonPoint.properties.id);\n trekDeparturePopup.appendChild(trekButton);\n\n layer.bindPopup(trekDeparturePopup, { interactive: true, autoPan: false, closeButton: false } as any).openPopup();\n });\n layer.on('mouseout', () => {\n if (!this.trekPopupIsOpen) {\n state.selectedTrekId = null;\n this.hideTrekLine();\n this.removeSelectedCurrentTrek();\n }\n });\n layer.on('popupopen', () => {\n this.trekPopupIsOpen = Boolean(state.selectedTrekId);\n });\n layer.on('popupclose', () => {\n if (state.selectedTrekId) {\n this.trekPopupIsOpen = false;\n state.selectedTrekId = null;\n this.hideTrekLine();\n this.removeSelectedCurrentTrek();\n }\n });\n },\n }).addTo(this.map);\n }\n\n removeSelectedCurrentTrek() {\n this.addSelectedCurrentTrekController?.abort();\n state.selectedTrekId = null;\n this.selectedCurrentTrekLayer && this.map.removeLayer(this.selectedCurrentTrekLayer);\n this.selectedCurrentTrekLayer = null;\n }\n\n addSelectedCurrentStep(id, customCoordinates?) {\n const stepsFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.currentTrekSteps) {\n const stepIndex = state.currentTrekSteps.findIndex(trek => trek.id === id);\n stepsFeatureCollection.features.push({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: customCoordinates ? [customCoordinates.lng, customCoordinates.lat] : state.currentTrekSteps[stepIndex].departure_geom },\n properties: {\n id: state.currentTrekSteps[stepIndex].id,\n name: state.currentTrekSteps[stepIndex].name,\n practice: state.practices.find(practice => practice.id === state.currentTrekSteps[stepIndex].practice)?.pictogram,\n imgSrc:\n state.currentTrekSteps[stepIndex].attachments && state.currentTrekSteps[stepIndex].attachments.filter(attachment => attachment.type === 'image').length > 0\n ? state.currentTrekSteps[stepIndex].attachments[0].thumbnail !== ''\n ? state.currentTrekSteps[stepIndex].attachments[0].thumbnail\n : state.currentTrekSteps[stepIndex].attachments[0].url\n : null,\n index: stepIndex + 1,\n },\n });\n }\n\n this.removeSelectedCurrentStep();\n state.selectedStepId = id;\n\n this.selectedCurrentStepLayer = L.geoJSON(stepsFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n zIndexOffset: 4000000,\n icon: L.divIcon({\n html: `<div part=\"selected-step-marker\" class=\"selected-step-marker\" ><div part=\"step-marker-container\" class=\"step-marker-container\"><div part=\"step-number\" class=\"step-number\">${geoJsonPoint.properties.index}</div></div></div>`,\n className: '',\n iconSize: this.selectedMainMarkerSize,\n iconAnchor: [this.selectedMainMarkerSize / 2, this.selectedMainMarkerSize],\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('click', async () => {\n const dataInStore = await this.getIcon(geoJsonPoint.properties.imgSrc);\n const imgSrc = dataInStore ? dataInStore : geoJsonPoint.properties.imgSrc ? geoJsonPoint.properties.imgSrc : null;\n const trekDeparturePopup = L.DomUtil.create('div');\n /* @ts-ignore */\n trekDeparturePopup.part = 'trek-departure-popup';\n trekDeparturePopup.className = 'trek-departure-popup';\n if (imgSrc) {\n const trekImg = L.DomUtil.create('img');\n /* @ts-ignore */\n trekImg.part = 'trek-image';\n trekImg.src = imgSrc;\n trekDeparturePopup.appendChild(trekImg);\n }\n const trekName = L.DomUtil.create('div');\n trekName.innerHTML = geoJsonPoint.properties.name;\n /* @ts-ignore */\n trekName.part = 'trek-name';\n trekName.className = 'trek-name';\n trekDeparturePopup.appendChild(trekName);\n\n const trekButton = L.DomUtil.create('button');\n trekButton.innerHTML = 'Afficher le détail';\n /* @ts-ignore */\n trekButton.part = 'trek-name';\n trekButton.className = 'trek-button';\n trekButton.onclick = () => this.trekCardPress.emit(geoJsonPoint.properties.id);\n trekDeparturePopup.appendChild(trekButton);\n\n layer.bindPopup(trekDeparturePopup, { interactive: true, autoPan: false, closeButton: false } as any).openPopup();\n });\n layer.on('mouseout', () => {\n if (!this.stepPopupIsOpen) {\n state.selectedTrekId = null;\n this.removeSelectedCurrentStep();\n }\n });\n layer.on('popupopen', () => {\n this.stepPopupIsOpen = Boolean(state.selectedStepId);\n });\n layer.on('popupclose', () => {\n if (state.selectedStepId) {\n this.stepPopupIsOpen = false;\n state.selectedStepId = null;\n this.removeSelectedCurrentStep();\n }\n });\n },\n }).addTo(this.map);\n }\n\n removeSelectedCurrentStep() {\n if (state.selectedStepId) {\n state.selectedStepId = null;\n this.selectedCurrentStepLayer && this.map.removeLayer(this.selectedCurrentStepLayer);\n this.selectedCurrentStepLayer = null;\n }\n }\n\n handleLayersControlEvent() {\n if (this.layersControl) {\n const userLayersState: HTMLInputElement[] = (this.layersControl as any)._layerControlInputs;\n userLayersState.forEach((userLayerState: any) => {\n if ((this.layersControl as any)._layers.find(layer => layer.layer._leaflet_id === userLayerState.layerId).overlay) {\n userLayerState.onchange = event => {\n this.userLayersState[userLayerState.layerId] = (event.target as any).checked;\n const overlay = (this.layersControl as any)._layers.find(layer => layer.layer._leaflet_id === userLayerState.layerId);\n if (this.userLayersState[userLayerState.layerId] && overlay.layer._layers && Object.keys(overlay.layer._layers).length === 0) {\n this.layerDataIsLoading = true;\n forceUpdate(this.hostElement);\n }\n };\n }\n });\n }\n }\n\n removeTrek() {\n this.handleLayersOnRemove();\n }\n\n async showTrekLine(id) {\n this.removeSelectedCurrentTrek();\n this.showTrekLineController?.abort();\n this.showTrekLineController = new AbortController();\n const { signal } = this.showTrekLineController;\n const trekLine = await getTrekGeometry(id);\n\n // Abort if a newer hover or hideTrekLine occurred during the await\n if (signal.aborted) {\n return;\n }\n\n const currentTrekFeature: Feature = {\n type: 'Feature',\n geometry: trekLine.geometry,\n properties: {},\n };\n\n this.currentTrekLayer = L.geoJSON(currentTrekFeature, {\n style: () => ({\n color: this.colorTrekLine,\n }),\n interactive: false,\n }).addTo(this.map);\n }\n\n hideTrekLine() {\n this.showTrekLineController?.abort();\n if (this.currentTrekLayer) {\n this.map.removeLayer(this.currentTrekLayer);\n this.currentTrekLayer = null;\n }\n }\n\n async addTouristicContent() {\n this.touristicContentPopupIsOpen = false;\n state.selectedTouristicContentId = null;\n this.removeSelectedTouristicContent();\n\n const touristicContentsFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.currentTouristicContent) {\n touristicContentsFeatureCollection.features.push({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: state.currentTouristicContent.geometry.coordinates },\n properties: {\n id: state.currentTouristicContent.id,\n name: state.currentTouristicContent.name,\n practice: state.touristicContentCategories.find(touristicContentCategory => touristicContentCategory.id === state.currentTouristicContent.category).pictogram,\n },\n });\n }\n\n if (!this.currentToutisticContentLayer) {\n const toutisticContentIcons = await this.getIcons(touristicContentsFeatureCollection, 'practice');\n this.currentToutisticContentLayer = L.geoJSON(touristicContentsFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: toutisticContentIcons[geoJsonPoint.properties.practice]\n ? `<div part=\"touristic-content-marker\" class=\"touristic-content-marker\" ><div part=\"touristic-content-marker-container\" class=\"touristic-content-marker-container\"><img part=\"touristic-content-marker-icon\" class=\"touristic-content-marker-icon\" src=${\n toutisticContentIcons[geoJsonPoint.properties.practice]\n } /></div></div>`\n : `<div part=\"touristic-content-marker\" class=\"touristic-content-marker\" ><div part=\"touristic-content-marker-container\" class=\"touristic-content-marker-container\"></div></div>`,\n className: '',\n iconSize: this.commonMarkerSize,\n } as any),\n autoPanOnFocus: false,\n } as any),\n });\n this.map.addLayer(this.currentToutisticContentLayer);\n }\n\n this.map.setView([state.currentTouristicContent.geometry.coordinates[1], state.currentTouristicContent.geometry.coordinates[0]], this.maxZoom);\n !this.mapIsReady && (this.mapIsReady = !this.mapIsReady);\n }\n\n removeTouristicContent() {\n if (this.currentToutisticContentLayer) {\n this.map.removeLayer(this.currentToutisticContentLayer);\n this.currentToutisticContentLayer = null;\n }\n }\n\n async addTouristicContents(resetBounds = false) {\n this.addTouristicContentsController?.abort();\n this.addTouristicContentsController = new AbortController();\n const { signal } = this.addTouristicContentsController;\n state.touristicContentsWithinBounds = state.currentTouristicContents;\n\n const touristicContentsCurrentCoordinates = [];\n\n const touristicContentsFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.currentTouristicContents) {\n for (const currentTouristicContent of state.currentTouristicContents) {\n touristicContentsCurrentCoordinates.push(currentTouristicContent.geometry.coordinates);\n\n touristicContentsFeatureCollection.features.push({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: currentTouristicContent.geometry.coordinates },\n properties: {\n id: currentTouristicContent.id,\n name: currentTouristicContent.name,\n practice: state.touristicContentCategories.find(touristicContentCategory => touristicContentCategory.id === currentTouristicContent.category).pictogram,\n imgSrc:\n currentTouristicContent.attachments && currentTouristicContent.attachments.filter(attachment => attachment.type === 'image').length > 0\n ? currentTouristicContent.attachments[0].thumbnail !== ''\n ? currentTouristicContent.attachments[0].thumbnail\n : currentTouristicContent.attachments[0].url\n : null,\n },\n });\n }\n }\n\n if (!this.toutisticContentsLayer) {\n if ((touristicContentsCurrentCoordinates.length > 0 && !state.currentMapBounds) || resetBounds) {\n this.bounds = L.latLngBounds(touristicContentsCurrentCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));\n } else {\n if (state.currentMapBounds) {\n this.bounds = state.currentMapBounds;\n }\n }\n const toutisticContentIcons = await this.getIcons(touristicContentsFeatureCollection, 'practice');\n\n // Abort if a newer call or removal was made during the await\n if (signal.aborted) {\n return;\n }\n\n this.toutisticContentsLayer = L.geoJSON(touristicContentsFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: toutisticContentIcons[geoJsonPoint.properties.practice]\n ? `<div part=\"touristic-content-marker\" class=\"touristic-content-marker\"><div part=\"touristic-content-marker-container\" class=\"touristic-content-marker-container\"><img part=\"touristic-content-marker-icon\" class=\"touristic-content-marker-icon\" src=${\n toutisticContentIcons[geoJsonPoint.properties.practice]\n } /></div></div>`\n : `<div part=\"touristic-content-marker\" class=\"touristic-content-marker\"><div part=\"touristic-content-marker-container\" class=\"touristic-content-marker-container\"></div></div>`,\n className: '',\n iconSize: this.mainMarkerSize,\n iconAnchor: [this.mainMarkerSize / 2, this.mainMarkerSize],\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('click', () => {\n const touristicContentCoordinatesPopup = L.DomUtil.create('div');\n /* @ts-ignore */\n touristicContentCoordinatesPopup.part = 'touristic-content-coordinates-popup';\n touristicContentCoordinatesPopup.className = 'touristic-content-coordinates-popup';\n if (geoJsonPoint.properties.imgSrc) {\n const touristicContentImg = L.DomUtil.create('img');\n /* @ts-ignore */\n touristicContentImg.part = 'touristic-content-coordinates-image';\n touristicContentImg.src = geoJsonPoint.properties.imgSrc;\n touristicContentCoordinatesPopup.appendChild(touristicContentImg);\n }\n const touristicContentName = L.DomUtil.create('div');\n touristicContentName.innerHTML = geoJsonPoint.properties.name;\n /* @ts-ignore */\n touristicContentCoordinatesPopup.part = 'touristic-content-name';\n touristicContentName.className = 'touristic-content-name';\n touristicContentCoordinatesPopup.appendChild(touristicContentName);\n\n const touristicContentButton = L.DomUtil.create('button');\n touristicContentButton.innerHTML = 'Afficher le détail';\n /* @ts-ignore */\n touristicContentButton.part = 'touristic-content-button';\n touristicContentButton.className = 'touristic-content-button';\n touristicContentButton.onclick = () => this.touristicContentCardPress.emit(geoJsonPoint.properties.id);\n touristicContentCoordinatesPopup.appendChild(touristicContentButton);\n\n layer.bindPopup(touristicContentCoordinatesPopup, { interactive: true, autoPan: false, closeButton: false } as any).openPopup();\n });\n layer.on('mouseover', e => {\n this.addSelectedTouristicContent(geoJsonPoint.properties.id, e.latlng);\n });\n },\n });\n\n this.touristicContentsMarkerClusterGroup = L.markerClusterGroup({\n showCoverageOnHover: false,\n removeOutsideVisibleBounds: false,\n iconCreateFunction: cluster => {\n return L.divIcon({\n html: '<div part=\"touristic-content-marker-cluster-group-icon\" class=\"touristic-content-marker-cluster-group-icon\"><div>' + cluster.getChildCount() + '</div></div>',\n className: '',\n iconSize: this.mainClusterSize,\n } as any);\n },\n });\n\n this.touristicContentsMarkerClusterGroup.addLayer(this.toutisticContentsLayer);\n this.map.addLayer(this.touristicContentsMarkerClusterGroup);\n } else {\n if (touristicContentsCurrentCoordinates.length > 0) {\n this.bounds = L.latLngBounds(touristicContentsCurrentCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));\n } else {\n this.map.fire('moveend');\n }\n this.toutisticContentsLayer.clearLayers();\n this.toutisticContentsLayer.addData(touristicContentsFeatureCollection);\n this.touristicContentsMarkerClusterGroup.clearLayers();\n this.touristicContentsMarkerClusterGroup.addLayer(this.toutisticContentsLayer);\n }\n\n this.map.invalidateSize();\n this.bounds && this.map.fitBounds(this.bounds);\n\n !this.mapIsReady && (this.mapIsReady = !this.mapIsReady);\n\n this.map.on('moveend', this.handleTouristicContentsWithinBoundsBind);\n }\n\n removeTouristicContents() {\n this.addTouristicContentsController?.abort();\n if (this.toutisticContentsLayer) {\n state.currentMapBounds = this.map.getBounds();\n this.map.removeLayer(this.touristicContentsMarkerClusterGroup);\n this.toutisticContentsLayer = null;\n this.touristicContentsMarkerClusterGroup = null;\n this.map.off('moveend', this.handleTouristicContentsWithinBoundsBind);\n }\n }\n\n async addTouristicEvent() {\n const touristicEventsFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.currentTouristicEvent) {\n const touristicEventType = state.touristicEventTypes.find(touristicEventType => touristicEventType.id === state.currentTouristicEvent.type);\n touristicEventsFeatureCollection.features.push({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: state.currentTouristicEvent.geometry.coordinates },\n properties: {\n id: state.currentTouristicEvent.id,\n name: state.currentTouristicEvent.name,\n type: touristicEventType ? touristicEventType.pictogram : null,\n },\n });\n }\n\n if (!this.currentToutisticEventLayer) {\n const toutisticEventsIcons = await this.getIcons(touristicEventsFeatureCollection, 'type');\n this.currentToutisticEventLayer = L.geoJSON(touristicEventsFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: toutisticEventsIcons[geoJsonPoint.properties.type]\n ? `<div part=\"touristic-event-marker\" class=\"touristic-event-marker\"><div part=\"touristic-event-marker-container\" class=\"touristic-event-marker-container\"><img part=\"touristic-event-marker-icon\" src=${\n toutisticEventsIcons[geoJsonPoint.properties.type]\n } /></div></div>`\n : `<div part=\"touristic-event-marker\" class=\"touristic-event-marker\"><div part=\"touristic-event-marker-container\" class=\"touristic-event-marker-container\"></div></div>`,\n className: '',\n iconSize: this.commonMarkerSize,\n } as any),\n autoPanOnFocus: false,\n } as any),\n });\n this.map.addLayer(this.currentToutisticEventLayer);\n }\n\n this.map.setView([state.currentTouristicEvent.geometry.coordinates[1], state.currentTouristicEvent.geometry.coordinates[0]], this.maxZoom);\n !this.mapIsReady && (this.mapIsReady = !this.mapIsReady);\n }\n\n removeTouristicEvent() {\n if (this.currentToutisticEventLayer) {\n this.map.removeLayer(this.currentToutisticEventLayer);\n this.currentToutisticEventLayer = null;\n }\n }\n\n async addSelectedTouristicContent(id, customCoordinates?) {\n const touristicContentFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.touristicContents) {\n const touristicContent = state.touristicContents.find(touristicContent => touristicContent.id === id);\n touristicContentFeatureCollection.features.push({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: customCoordinates ? [customCoordinates.lng, customCoordinates.lat] : touristicContent.geometry.coordinates },\n properties: {\n id: touristicContent.id,\n name: touristicContent.name,\n category: state.touristicContentCategories.find(practice => practice.id === touristicContent.category)?.pictogram,\n imgSrc:\n touristicContent.attachments && touristicContent.attachments.filter(attachment => attachment.type === 'image').length > 0\n ? touristicContent.attachments[0].thumbnail !== ''\n ? touristicContent.attachments[0].thumbnail\n : touristicContent.attachments[0].url\n : null,\n },\n });\n }\n\n this.removeSelectedTouristicContent();\n state.selectedTouristicContentId = id;\n\n const toutisticContentIcons = await this.getIcons(touristicContentFeatureCollection, 'category');\n this.selectedTouristicContentLayer = L.geoJSON(touristicContentFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n zIndexOffset: 4000000,\n icon: L.divIcon({\n html: toutisticContentIcons[geoJsonPoint.properties.category]\n ? `<div part=\"selected-touristic-content-marker\" class=\"selected-touristic-content-marker\"><div part=\"touristic-content-marker-container\" class=\"touristic-content-marker-container\"><img part=\"touristic-content-marker-icon\" src=${\n toutisticContentIcons[geoJsonPoint.properties.category]\n } /></div></div>`\n : `<div part=\"selected-touristic-content-marker\" class=\"selected-touristic-content-marker\"><div part=\"touristic-content-marker-container\" class=\"touristic-content-marker-container\"></div></div>`,\n className: '',\n iconSize: this.selectedMainMarkerSize,\n iconAnchor: [this.selectedMainMarkerSize / 2, this.selectedMainMarkerSize],\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('click', () => {\n const touristicContentDeparturePopup = L.DomUtil.create('div');\n /* @ts-ignore */\n touristicContentDeparturePopup.part = 'touristic-content-coordinates-popup';\n touristicContentDeparturePopup.className = 'touristic-content-coordinates-popup';\n if (geoJsonPoint.properties.imgSrc) {\n const touristicContentImg = L.DomUtil.create('img');\n /* @ts-ignore */\n touristicContentImg.part = 'touristic-content-coordinates-image';\n touristicContentImg.src = geoJsonPoint.properties.imgSrc;\n touristicContentDeparturePopup.appendChild(touristicContentImg);\n }\n\n const touristicContentName = L.DomUtil.create('div');\n touristicContentName.innerHTML = geoJsonPoint.properties.name;\n /* @ts-ignore */\n touristicContentName.part = 'touristic-content-name';\n touristicContentName.className = 'touristic-content-name';\n touristicContentDeparturePopup.appendChild(touristicContentName);\n\n const touristicContentButton = L.DomUtil.create('button');\n touristicContentButton.innerHTML = 'Afficher le détail';\n /* @ts-ignore */\n touristicContentButton.part = 'touristic-content-button';\n touristicContentButton.className = 'touristic-content-button';\n touristicContentButton.onclick = () => this.touristicContentCardPress.emit(geoJsonPoint.properties.id);\n touristicContentDeparturePopup.appendChild(touristicContentButton);\n\n layer.bindPopup(touristicContentDeparturePopup, { interactive: true, autoPan: false, closeButton: false } as any).openPopup();\n });\n layer.on('mouseout', () => {\n if (!this.touristicContentPopupIsOpen) {\n state.selectedTouristicContentId = null;\n this.removeSelectedTouristicContent();\n }\n });\n layer.on('popupopen', () => {\n this.touristicContentPopupIsOpen = Boolean(state.selectedTouristicContentId);\n });\n layer.on('popupclose', () => {\n if (state.selectedTouristicContentId) {\n this.touristicContentPopupIsOpen = false;\n state.selectedTouristicContentId = null;\n this.removeSelectedTouristicContent();\n }\n });\n },\n }).addTo(this.map);\n }\n\n removeSelectedTouristicContent() {\n state.selectedTouristicContentId = null;\n this.selectedTouristicContentLayer && this.map.removeLayer(this.selectedTouristicContentLayer);\n this.selectedTouristicContentLayer = null;\n }\n\n async addTouristicEvents(resetBounds = false) {\n this.addTouristicEventsController?.abort();\n this.addTouristicEventsController = new AbortController();\n const { signal } = this.addTouristicEventsController;\n state.touristicEventsWithinBounds = state.currentTouristicEvents;\n\n const touristicEventsCurrentCoordinates = [];\n\n const touristicEventsFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.currentTouristicEvents) {\n for (const currentTouristicEvent of state.currentTouristicEvents) {\n touristicEventsCurrentCoordinates.push(currentTouristicEvent.geometry.coordinates);\n\n touristicEventsFeatureCollection.features.push({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: currentTouristicEvent.geometry.coordinates },\n properties: {\n id: currentTouristicEvent.id,\n name: currentTouristicEvent.name,\n type: state.touristicEventTypes.find(touristicEventType => touristicEventType.id === currentTouristicEvent.type)?.pictogram,\n imgSrc:\n currentTouristicEvent.attachments && currentTouristicEvent.attachments.filter(attachment => attachment.type === 'image').length > 0\n ? currentTouristicEvent.attachments[0].thumbnail !== ''\n ? currentTouristicEvent.attachments[0].thumbnail\n : currentTouristicEvent.attachments[0].url\n : null,\n },\n });\n }\n }\n\n if (!this.touristicEventsLayer) {\n if ((touristicEventsCurrentCoordinates.length > 0 && !state.currentMapBounds) || resetBounds) {\n this.bounds = L.latLngBounds(touristicEventsCurrentCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));\n } else {\n if (state.currentMapBounds) {\n this.bounds = state.currentMapBounds;\n }\n }\n const touristicEventsIcons = await this.getIcons(touristicEventsFeatureCollection, 'type');\n\n // Abort if a newer call or removal was made during the await\n if (signal.aborted) {\n return;\n }\n\n this.touristicEventsLayer = L.geoJSON(touristicEventsFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: touristicEventsIcons[geoJsonPoint.properties.type]\n ? `<div part=\"touristic-event-marker\" class=\"touristic-event-marker\"><div part=\"touristic-event-marker-container\" class=\"touristic-event-marker-container\"><img part=\"touristic-event-marker-icon\" src=${\n touristicEventsIcons[geoJsonPoint.properties.type]\n } /></div></div>`\n : `<div part=\"touristic-event-marker\" class=\"touristic-event-marker\"><div part=\"touristic-event-marker-container\" class=\"touristic-event-marker-container\"></div></div>`,\n className: '',\n iconSize: this.mainMarkerSize,\n iconAnchor: [this.mainMarkerSize / 2, this.mainMarkerSize],\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('click', () => {\n const touristicEventCoordinatesPopup = L.DomUtil.create('div');\n /* @ts-ignore */\n touristicEventCoordinatesPopup.part = 'touristic-event-coordinates-popup';\n touristicEventCoordinatesPopup.className = 'touristic-event-coordinates-popup';\n if (geoJsonPoint.properties.imgSrc) {\n const touristicEventImg = L.DomUtil.create('img');\n /* @ts-ignore */\n touristicEventImg.part = 'touristic-event-coordinates-image';\n touristicEventImg.src = geoJsonPoint.properties.imgSrc;\n touristicEventCoordinatesPopup.appendChild(touristicEventImg);\n }\n const touristicEventName = L.DomUtil.create('div');\n touristicEventName.innerHTML = geoJsonPoint.properties.name;\n /* @ts-ignore */\n touristicEventName.part = 'touristic-event-name';\n touristicEventName.className = 'touristic-event-name';\n touristicEventCoordinatesPopup.appendChild(touristicEventName);\n\n const touristicEventButton = L.DomUtil.create('button');\n touristicEventButton.innerHTML = 'Afficher le détail';\n /* @ts-ignore */\n touristicEventButton.part = 'touristic-event-button';\n touristicEventButton.className = 'touristic-event-button';\n touristicEventButton.onclick = () => this.touristicEventCardPress.emit(geoJsonPoint.properties.id);\n touristicEventCoordinatesPopup.appendChild(touristicEventButton);\n\n layer.bindPopup(touristicEventCoordinatesPopup, { interactive: true, autoPan: false, closeButton: false } as any).openPopup();\n });\n layer.on('mouseover', e => {\n this.addSelectedTouristicEvent(geoJsonPoint.properties.id, e.latlng);\n });\n },\n });\n\n this.touristicEventsMarkerClusterGroup = L.markerClusterGroup({\n showCoverageOnHover: false,\n removeOutsideVisibleBounds: false,\n iconCreateFunction: cluster => {\n return L.divIcon({\n html: '<div part=\"touristic-event-marker-cluster-group-icon\" class=\"touristic-event-marker-cluster-group-icon\"><div>' + cluster.getChildCount() + '</div></div>',\n className: '',\n iconSize: this.mainClusterSize,\n } as any);\n },\n });\n\n this.touristicEventsMarkerClusterGroup.addLayer(this.touristicEventsLayer);\n this.map.addLayer(this.touristicEventsMarkerClusterGroup);\n } else {\n if (touristicEventsCurrentCoordinates.length > 0) {\n this.bounds = L.latLngBounds(touristicEventsCurrentCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));\n } else {\n this.map.fire('moveend');\n }\n this.touristicEventsLayer.clearLayers();\n this.touristicEventsLayer.addData(touristicEventsFeatureCollection);\n this.touristicEventsMarkerClusterGroup.clearLayers();\n this.touristicEventsMarkerClusterGroup.addLayer(this.touristicEventsLayer);\n }\n\n this.map.invalidateSize();\n this.bounds && this.map.fitBounds(this.bounds);\n\n !this.mapIsReady && (this.mapIsReady = !this.mapIsReady);\n\n this.map.on('moveend', this.handleTouristicEventsWithinBoundsBind);\n }\n\n removeTouristicEvents() {\n this.addTouristicEventsController?.abort();\n if (this.touristicEventsLayer) {\n state.currentMapBounds = this.map.getBounds();\n this.map.removeLayer(this.touristicEventsMarkerClusterGroup);\n this.touristicEventsLayer = null;\n this.touristicEventsMarkerClusterGroup = null;\n this.map.off('moveend', this.handleTouristicEventsWithinBoundsBind);\n }\n }\n\n async addOutdoorSites(resetBounds = false) {\n this.addOutdoorSitesController?.abort();\n this.addOutdoorSitesController = new AbortController();\n const { signal } = this.addOutdoorSitesController;\n state.outdoorSitesWithinBounds = state.currentOutdoorSites;\n\n const outdoorSitesCurrentCoordinates = [];\n\n const outdoorSitesFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.currentOutdoorSites) {\n for (const currentOutdoorSite of state.currentOutdoorSites) {\n outdoorSitesFeatureCollection.features.push({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: pointOnFeature(currentOutdoorSite.geometry as any).geometry.coordinates },\n properties: {\n id: currentOutdoorSite.id,\n name: currentOutdoorSite.name,\n practice: state.outdoorPractices.find(practice => practice.id === currentOutdoorSite.practice)?.pictogram,\n imgSrc:\n currentOutdoorSite.attachments && currentOutdoorSite.attachments.filter(attachment => attachment.type === 'image').length > 0\n ? currentOutdoorSite.attachments[0].thumbnail !== ''\n ? currentOutdoorSite.attachments[0].thumbnail\n : currentOutdoorSite.attachments[0].url\n : null,\n },\n });\n }\n }\n\n if (!this.outdoorSitesLayer) {\n if ((outdoorSitesCurrentCoordinates.length > 0 && !state.currentMapBounds) || resetBounds) {\n const outdoorSitesBbox = bbox(outdoorSitesFeatureCollection);\n this.bounds = L.latLngBounds([outdoorSitesBbox[1], outdoorSitesBbox[0]], [outdoorSitesBbox[3], outdoorSitesBbox[2]]);\n } else {\n if (state.currentMapBounds) {\n this.bounds = state.currentMapBounds;\n }\n }\n const outdoorSitesIcons = await this.getIcons(outdoorSitesFeatureCollection, 'practice');\n\n // Abort if a newer call or removal was made during the await\n if (signal.aborted) {\n return;\n }\n\n this.outdoorSitesLayer = L.geoJSON(outdoorSitesFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: outdoorSitesIcons[geoJsonPoint.properties.practice]\n ? `<div part=\"outdoor-site-marker\" class=\"outdoor-site-marker\"><div part=\"outdoor-site-marker-container\" class=\"outdoor-site-marker-container\"><img part=\"outdoor-site-marker-icon\" src=${\n outdoorSitesIcons[geoJsonPoint.properties.practice]\n } /></div></div>`\n : `<div part=\"outdoor-site-marker\" class=\"outdoor-site-marker\"><div part=\"outdoor-site-marker-container\" class=\"outdoor-site-marker-container\"></div></div>`,\n className: '',\n iconSize: this.mainMarkerSize,\n iconAnchor: [this.mainMarkerSize / 2, this.mainMarkerSize],\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('click', () => {\n const outdoorSiteCoordinatesPopup = L.DomUtil.create('div');\n /* @ts-ignore */\n outdoorSiteCoordinatesPopup.part = 'outdoor-site-coordinates-popup';\n outdoorSiteCoordinatesPopup.className = 'outdoor-site-coordinates-popup';\n if (geoJsonPoint.properties.imgSrc) {\n const outdoorSiteImg = L.DomUtil.create('img');\n /* @ts-ignore */\n outdoorSiteImg.part = 'outdoor-site-coordinates-image';\n outdoorSiteImg.src = geoJsonPoint.properties.imgSrc;\n outdoorSiteCoordinatesPopup.appendChild(outdoorSiteImg);\n }\n const outdoorSiteName = L.DomUtil.create('div');\n outdoorSiteName.innerHTML = geoJsonPoint.properties.name;\n /* @ts-ignore */\n outdoorSiteName.part = 'outdoor-site-name';\n outdoorSiteName.className = 'outdoor-site-name';\n outdoorSiteCoordinatesPopup.appendChild(outdoorSiteName);\n\n const outdoorSiteButton = L.DomUtil.create('button');\n outdoorSiteButton.innerHTML = 'Afficher le détail';\n /* @ts-ignore */\n outdoorSiteButton.part = 'outdoor-site-button';\n outdoorSiteButton.className = 'outdoor-site-button';\n outdoorSiteButton.onclick = () => this.outdoorSiteCardPress.emit(geoJsonPoint.properties.id);\n outdoorSiteCoordinatesPopup.appendChild(outdoorSiteButton);\n\n layer.bindPopup(outdoorSiteCoordinatesPopup, { interactive: true, autoPan: false, closeButton: false } as any).openPopup();\n });\n layer.on('mouseover', e => {\n this.addSelectedOutdoorSite(geoJsonPoint.properties.id, e.latlng);\n });\n },\n });\n\n this.outdoorSitesMarkerClusterGroup = L.markerClusterGroup({\n showCoverageOnHover: false,\n removeOutsideVisibleBounds: false,\n iconCreateFunction: cluster => {\n return L.divIcon({\n html: '<div part=\"outdoor-site-marker-cluster-group-icon\" class=\"outdoor-site-marker-cluster-group-icon\"><div>' + cluster.getChildCount() + '</div></div>',\n className: '',\n iconSize: this.mainClusterSize,\n } as any);\n },\n });\n\n this.outdoorSitesMarkerClusterGroup.addLayer(this.outdoorSitesLayer);\n this.map.addLayer(this.outdoorSitesMarkerClusterGroup);\n } else {\n if (outdoorSitesCurrentCoordinates.length > 0) {\n this.bounds = L.latLngBounds(outdoorSitesCurrentCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));\n } else {\n this.map.fire('moveend');\n }\n this.outdoorSitesLayer.clearLayers();\n this.outdoorSitesLayer.addData(outdoorSitesFeatureCollection);\n this.outdoorSitesMarkerClusterGroup.clearLayers();\n this.outdoorSitesMarkerClusterGroup.addLayer(this.outdoorSitesLayer);\n }\n\n this.map.invalidateSize();\n this.bounds && this.map.fitBounds(this.bounds);\n\n !this.mapIsReady && (this.mapIsReady = !this.mapIsReady);\n\n this.map.on('moveend', this.handleOutdoorSitesWithinBoundsBind);\n }\n\n removeOutdoorSites() {\n this.addOutdoorSitesController?.abort();\n if (this.outdoorSitesLayer) {\n state.currentMapBounds = this.map.getBounds();\n this.map.removeLayer(this.outdoorSitesMarkerClusterGroup);\n this.outdoorSitesLayer = null;\n this.outdoorSitesMarkerClusterGroup = null;\n this.map.off('moveend', this.handleOutdoorSitesWithinBoundsBind);\n }\n }\n\n async addOutdoorSite() {\n const OutdoorSiteFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.currentOutdoorSite) {\n const outdoorSitePractice = state.outdoorPractices.find(outdoorPractice => outdoorPractice.id === state.currentOutdoorSite.practice);\n OutdoorSiteFeatureCollection.features.push({\n type: 'Feature',\n geometry: state.currentOutdoorSite.geometry,\n properties: {\n id: state.currentOutdoorSite.id,\n name: state.currentOutdoorSite.name,\n practice: outdoorSitePractice ? outdoorSitePractice.pictogram : null,\n },\n });\n }\n\n if (!this.currentOutdoorSiteLayer) {\n const outdoorSitesIcons = await this.getIcons(OutdoorSiteFeatureCollection, 'practice');\n\n this.currentOutdoorSiteLayer = L.geoJSON(OutdoorSiteFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) => {\n return L.marker(latlng, {\n icon: L.divIcon({\n html: outdoorSitesIcons[geoJsonPoint.properties.practice]\n ? `<div part=\"outdoor-site-marker\" class=\"outdoor-site-marker\"><div part=\"outdoor-site-marker-container\" class=\"outdoor-site-marker-container\"><img part=\"outdoor-site-marker-icon\" src=${\n outdoorSitesIcons[geoJsonPoint.properties.practice]\n } /></div></div>`\n : `<div part=\"outdoor-site-marker\" class=\"outdoor-site-marker\"><div part=\"outdoor-site-marker-container\" class=\"outdoor-site-marker-container\"></div></div>`,\n className: '',\n iconSize: this.commonMarkerSize,\n } as any),\n autoPanOnFocus: false,\n } as any);\n },\n style: () => ({ color: this.colorOutdoorArea, interactive: false }),\n });\n\n this.map.addLayer(this.currentOutdoorSiteLayer);\n }\n\n await this.addCurrentInformationDesks(state.currentOutdoorSite);\n\n await this.addCurrentPois();\n\n await this.addCurrentTouristicContents();\n\n await this.addCurrentTouristicEvents();\n\n await this.addCurrentRelatedOutdoorSites();\n\n await this.addCurrentRelatedOutdoorCourses();\n\n this.handleLayersControl();\n\n this.map.invalidateSize();\n this.map.fitBounds(this.currentOutdoorSiteLayer.getBounds(), { maxZoom: this.maxZoom });\n !this.mapIsReady && (this.mapIsReady = !this.mapIsReady);\n }\n\n async addCurrentRelatedOutdoorSites() {\n const currentRelatedOutdoorSiteFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.currentRelatedOutdoorSites) {\n for (const currentRelatedOutdoorSite of state.currentRelatedOutdoorSites) {\n currentRelatedOutdoorSiteFeatureCollection.features.push({\n type: 'Feature',\n geometry: currentRelatedOutdoorSite.geometry,\n properties: {\n id: currentRelatedOutdoorSite.id,\n name: currentRelatedOutdoorSite.name,\n practice: state.outdoorPractices.find(practice => practice.id === currentRelatedOutdoorSite.practice)?.pictogram,\n imgSrc:\n currentRelatedOutdoorSite.attachments && currentRelatedOutdoorSite.attachments.filter(attachment => attachment.type === 'image').length > 0\n ? currentRelatedOutdoorSite.attachments[0].thumbnail !== ''\n ? currentRelatedOutdoorSite.attachments[0].thumbnail\n : currentRelatedOutdoorSite.attachments[0].url\n : null,\n },\n });\n }\n }\n\n if (!this.currentRelatedOutdoorSitesLayer && currentRelatedOutdoorSiteFeatureCollection.features.length > 0) {\n const outdoorSitesIcons = await this.getIcons(currentRelatedOutdoorSiteFeatureCollection, 'practice');\n\n this.currentRelatedOutdoorSitesLayer = L.geoJSON(currentRelatedOutdoorSiteFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) => {\n return L.marker(latlng, {\n icon: L.divIcon({\n html: outdoorSitesIcons[geoJsonPoint.properties.practice]\n ? `<div part=\"outdoor-site-marker\" class=\"outdoor-site-marker\"><div part=\"outdoor-site-marker-container\" class=\"outdoor-site-marker-container\"><img part=\"outdoor-site-marker-icon\" src=${\n outdoorSitesIcons[geoJsonPoint.properties.practice]\n } /></div></div>`\n : `<div part=\"outdoor-site-marker\" class=\"outdoor-site-marker\"><div part=\"outdoor-site-marker-container\" class=\"outdoor-site-marker-container\"></div></div>`,\n className: '',\n iconSize: this.commonMarkerSize,\n } as any),\n autoPanOnFocus: false,\n } as any);\n },\n style: () => ({ color: this.colorOutdoorArea, interactive: false }),\n });\n }\n }\n\n async addCurrentRelatedOutdoorCourses() {\n const currentRelatedOutdoorCourseFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.currentRelatedOutdoorCourses) {\n for (const currentRelatedOutdoorCourse of state.currentRelatedOutdoorCourses) {\n currentRelatedOutdoorCourseFeatureCollection.features.push({\n type: 'Feature',\n geometry: currentRelatedOutdoorCourse.geometry,\n properties: {\n id: currentRelatedOutdoorCourse.id,\n name: currentRelatedOutdoorCourse.name,\n type: state.outdoorCourseTypes.find(type => type.id === currentRelatedOutdoorCourse.type)?.pictogram,\n imgSrc:\n currentRelatedOutdoorCourse.attachments && currentRelatedOutdoorCourse.attachments.filter(attachment => attachment.type === 'image').length > 0\n ? currentRelatedOutdoorCourse.attachments[0].thumbnail !== ''\n ? currentRelatedOutdoorCourse.attachments[0].thumbnail\n : currentRelatedOutdoorCourse.attachments[0].url\n : null,\n },\n });\n }\n }\n\n if (!this.currentRelatedOutdoorCoursesLayer && currentRelatedOutdoorCourseFeatureCollection.features.length > 0) {\n const outdoorCoursesIcons = await this.getIcons(currentRelatedOutdoorCourseFeatureCollection, 'type');\n\n this.currentRelatedOutdoorCoursesLayer = L.geoJSON(currentRelatedOutdoorCourseFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) => {\n return L.marker(latlng, {\n icon: L.divIcon({\n html: outdoorCoursesIcons[geoJsonPoint.properties.practice]\n ? `<div part=\"outdoor-courses-marker\" class=\"outdoor-courses-marker\"><div part=\"outdoor-courses-marker-container\" class=\"outdoor-courses-marker-container\"><img part=\"outdoor-courses-marker-icon\" src=${\n outdoorCoursesIcons[geoJsonPoint.properties.practice]\n } /></div></div>`\n : `<div part=\"outdoor-courses-marker\" class=\"outdoor-courses-marker\"><div part=\"outdoor-courses-marker-container\" class=\"outdoor-courses-marker-container\"></div></div>`,\n className: '',\n iconSize: this.commonMarkerSize,\n } as any),\n autoPanOnFocus: false,\n } as any);\n },\n style: () => ({ color: this.colorOutdoorArea, interactive: false }),\n });\n }\n }\n\n removeOutdoorSite() {\n this.handleLayersOnRemove();\n }\n\n async addSelectedTouristicEvent(id, customCoordinates?) {\n const touristicEventFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.touristicEvents) {\n const touristicEvent = state.touristicEvents.find(touristicEvent => touristicEvent.id === id);\n\n touristicEventFeatureCollection.features.push({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: customCoordinates ? [customCoordinates.lng, customCoordinates.lat] : touristicEvent.geometry.coordinates },\n properties: {\n id: touristicEvent.id,\n name: touristicEvent.name,\n category: state.touristicEventTypes.find(type => type.id === touristicEvent.type)?.pictogram,\n imgSrc:\n touristicEvent.attachments && touristicEvent.attachments.filter(attachment => attachment.type === 'image').length > 0\n ? touristicEvent.attachments[0].thumbnail !== ''\n ? touristicEvent.attachments[0].thumbnail\n : touristicEvent.attachments[0].url\n : null,\n },\n });\n }\n\n this.removeSelectedTouristicEvent();\n state.selectedTouristicEventId = id;\n\n const touristicEventsIcons = await this.getIcons(touristicEventFeatureCollection, 'category');\n this.selectedTouristicEventLayer = L.geoJSON(touristicEventFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n zIndexOffset: 4000000,\n icon: L.divIcon({\n html: touristicEventsIcons[geoJsonPoint.properties.category]\n ? `<div part=\"selected-touristic-event-marker\" class=\"selected-touristic-event-marker\"><div part=\"touristic-event-marker-container\" class=\"touristic-event-marker-container\"><img part=\"touristic-event-marker-icon\" src=${\n touristicEventsIcons[geoJsonPoint.properties.category]\n } /></div></div>`\n : `<div part=\"selected-touristic-event-marker\" class=\"selected-touristic-event-marker\"><div part=\"touristic-event-marker-container\" class=\"touristic-event-marker-container\"></div></div>`,\n className: '',\n iconSize: this.selectedMainMarkerSize,\n iconAnchor: [this.selectedMainMarkerSize / 2, this.selectedMainMarkerSize],\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('click', () => {\n const touristicEventDeparturePopup = L.DomUtil.create('div');\n /* @ts-ignore */\n touristicEventDeparturePopup.part = 'touristic-event-coordinates-popup';\n touristicEventDeparturePopup.className = 'touristic-event-coordinates-popup';\n if (geoJsonPoint.properties.imgSrc) {\n const touristicEventImg = L.DomUtil.create('img');\n /* @ts-ignore */\n touristicEventImg.part = 'touristic-event-coordinates-image';\n touristicEventImg.src = geoJsonPoint.properties.imgSrc;\n touristicEventDeparturePopup.appendChild(touristicEventImg);\n }\n\n const touristicEventName = L.DomUtil.create('div');\n touristicEventName.innerHTML = geoJsonPoint.properties.name;\n /* @ts-ignore */\n touristicEventName.part = 'touristic-event-name';\n touristicEventName.className = 'touristic-event-name';\n touristicEventDeparturePopup.appendChild(touristicEventName);\n\n const touristicEventButton = L.DomUtil.create('button');\n touristicEventButton.innerHTML = 'Afficher le détail';\n /* @ts-ignore */\n touristicEventButton.part = 'touristic-event-button';\n touristicEventButton.className = 'touristic-event-button';\n touristicEventButton.onclick = () => this.touristicEventCardPress.emit(geoJsonPoint.properties.id);\n touristicEventDeparturePopup.appendChild(touristicEventButton);\n\n layer.bindPopup(touristicEventDeparturePopup, { interactive: true, autoPan: false, closeButton: false } as any).openPopup();\n });\n layer.on('mouseout', () => {\n if (!this.touristicEventPopupIsOpen) {\n state.selectedTouristicEventId = null;\n this.removeSelectedTouristicEvent();\n }\n });\n layer.on('popupopen', () => {\n this.touristicEventPopupIsOpen = Boolean(state.selectedTouristicEventId);\n });\n layer.on('popupclose', () => {\n if (state.selectedTouristicEventId) {\n this.touristicEventPopupIsOpen = false;\n state.selectedTouristicEventId = null;\n this.removeSelectedTouristicEvent();\n }\n });\n },\n }).addTo(this.map);\n }\n\n removeSelectedTouristicEvent() {\n state.selectedTouristicEventId = null;\n this.selectedTouristicEventLayer && this.map.removeLayer(this.selectedTouristicEventLayer);\n this.selectedTouristicEventLayer = null;\n }\n\n async addOutdoorCourse() {\n const OutdoorCourseFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.currentOutdoorCourse) {\n const outdoorCourseType = state.outdoorCourseTypes.find(outdoorCourseType => outdoorCourseType.id === state.currentOutdoorCourse.type);\n OutdoorCourseFeatureCollection.features.push({\n type: 'Feature',\n geometry: state.currentOutdoorCourse.geometry,\n properties: {\n id: state.currentOutdoorCourse.id,\n name: state.currentOutdoorCourse.name,\n type: outdoorCourseType ? outdoorCourseType.pictogram : null,\n },\n });\n }\n\n if (!this.currentOutdoorCourseLayer) {\n const outdoorCoursesIcons = await this.getIcons(OutdoorCourseFeatureCollection, 'type');\n this.currentOutdoorCourseLayer = L.geoJSON(OutdoorCourseFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) => {\n return L.marker(latlng, {\n icon: L.divIcon({\n html: outdoorCoursesIcons[geoJsonPoint.properties.practice]\n ? `<div part=\"outdoor-course-marker\" class=\"outdoor-course-marker\"><div part=\"outdoor-course-marker-container\" class=\"outdoor-course-marker-container\"><img part=\"outdoor-course-marker-icon\" src=${\n outdoorCoursesIcons[geoJsonPoint.properties.practice]\n } /></div></div>`\n : `<div part=\"outdoor-course-marker\" class=\"outdoor-course-marker\"><div part=\"outdoor-course-marker-container\" class=\"outdoor-course-marker-container\"></div></div>`,\n className: '',\n iconSize: this.commonMarkerSize,\n } as any),\n autoPanOnFocus: false,\n } as any);\n },\n style: () => ({ color: this.colorOutdoorArea, interactive: false }),\n });\n\n this.map.addLayer(this.currentOutdoorCourseLayer);\n }\n\n await this.addCurrentPois();\n\n await this.addCurrentTouristicContents();\n\n await this.addCurrentTouristicEvents();\n\n this.handleLayersControl();\n\n this.map.fitBounds(this.currentOutdoorCourseLayer.getBounds());\n !this.mapIsReady && (this.mapIsReady = !this.mapIsReady);\n }\n\n removeOutdoorCourse() {\n this.handleLayersOnRemove();\n }\n\n async addSelectedOutdoorSite(id, _customCoordinates?) {\n const outdoorSiteFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.currentOutdoorSites) {\n const outdoorSite = state.currentOutdoorSites.find(currentOutdoorSite => currentOutdoorSite.id === id);\n if (outdoorSite && outdoorSite.geometry) {\n outdoorSiteFeatureCollection.features.push({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: pointOnFeature(outdoorSite.geometry as any).geometry.coordinates },\n properties: {\n id: outdoorSite.id,\n name: outdoorSite.name,\n practice: state.outdoorPractices.find(practice => practice.id === outdoorSite.practice)?.pictogram,\n imgSrc:\n outdoorSite.attachments && outdoorSite.attachments.filter(attachment => attachment.type === 'image').length > 0\n ? outdoorSite.attachments[0].thumbnail !== ''\n ? outdoorSite.attachments[0].thumbnail\n : outdoorSite.attachments[0].url\n : null,\n },\n });\n }\n }\n\n this.removeSelectedOutdoorSite();\n state.selectedOutdoorSiteId = id;\n\n const outdoorSitesIcons = await this.getIcons(outdoorSiteFeatureCollection, 'practice');\n this.selectedOutdoorSiteLayer = L.geoJSON(outdoorSiteFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n zIndexOffset: 4000000,\n icon: L.divIcon({\n html: outdoorSitesIcons[geoJsonPoint.properties.practice]\n ? `<div part=\"selected-outdoor-site-marker\" class=\"selected-outdoor-site-marker\"><div part=\"outdoor-site-marker-container\" class=\"outdoor-site-marker-container\"><img part=\"outdoor-site-marker-icon\" src=${\n outdoorSitesIcons[geoJsonPoint.properties.practice]\n } /></div></div>`\n : `<div part=\"selected-outdoor-site-marker\" class=\"selected-outdoor-site-marker\"><div part=\"outdoor-site-marker-container\" class=\"outdoor-site-marker-container\"></div></div>`,\n className: '',\n iconSize: this.selectedMainMarkerSize,\n iconAnchor: [this.selectedMainMarkerSize / 2, this.selectedMainMarkerSize],\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('click', () => {\n const outdoorSiteDeparturePopup = L.DomUtil.create('div');\n /* @ts-ignore */\n outdoorSiteDeparturePopup.part = 'outdoor-site-coordinates-popup';\n outdoorSiteDeparturePopup.className = 'outdoor-site-coordinates-popup';\n if (geoJsonPoint.properties.imgSrc) {\n const outdoorSiteImg = L.DomUtil.create('img');\n /* @ts-ignore */\n outdoorSiteImg.part = 'outdoor-site-coordinates-image';\n outdoorSiteImg.src = geoJsonPoint.properties.imgSrc;\n outdoorSiteDeparturePopup.appendChild(outdoorSiteImg);\n }\n\n const outdoorSiteName = L.DomUtil.create('div');\n outdoorSiteName.innerHTML = geoJsonPoint.properties.name;\n /* @ts-ignore */\n outdoorSiteName.part = 'outdoor-site-name';\n outdoorSiteName.className = 'outdoor-site-name';\n outdoorSiteDeparturePopup.appendChild(outdoorSiteName);\n\n const outdoorSiteButton = L.DomUtil.create('button');\n outdoorSiteButton.innerHTML = 'Afficher le détail';\n /* @ts-ignore */\n outdoorSiteButton.part = 'outdoor-site-button';\n outdoorSiteButton.className = 'outdoor-site-button';\n outdoorSiteButton.onclick = () => this.outdoorSiteCardPress.emit(geoJsonPoint.properties.id);\n outdoorSiteDeparturePopup.appendChild(outdoorSiteButton);\n\n layer.bindPopup(outdoorSiteDeparturePopup, { interactive: true, autoPan: false, closeButton: false } as any).openPopup();\n });\n layer.on('mouseout', () => {\n if (!this.outdoorSitePopupIsOpen) {\n state.selectedOutdoorSiteId = null;\n this.removeSelectedOutdoorSite();\n }\n });\n layer.on('popupopen', () => {\n this.outdoorSitePopupIsOpen = Boolean(state.selectedOutdoorSiteId);\n });\n layer.on('popupclose', () => {\n if (state.selectedOutdoorSiteId) {\n this.outdoorSitePopupIsOpen = false;\n state.selectedOutdoorSiteId = null;\n this.removeSelectedOutdoorSite();\n }\n });\n },\n style: { color: this.colorOutdoorArea, interactive: false },\n }).addTo(this.map);\n }\n\n removeSelectedOutdoorSite() {\n state.selectedOutdoorSiteId = null;\n this.selectedOutdoorSiteLayer && this.map.removeLayer(this.selectedOutdoorSiteLayer);\n this.selectedOutdoorSiteLayer = null;\n }\n\n async addSelectedOutdoorCourse(id, _customCoordinates?) {\n const outdoorCourseFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.currentOutdoorCourse) {\n const outdoorCourse = state.currentOutdoorCourse;\n outdoorCourseFeatureCollection.features.push({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: pointOnFeature(outdoorCourse.geometry as any).geometry.coordinates },\n properties: {\n id: outdoorCourse.id,\n name: outdoorCourse.name,\n type: state.outdoorCourseTypes.find(type => type.id === outdoorCourse.type)?.pictogram,\n imgSrc:\n outdoorCourse.attachments && outdoorCourse.attachments.filter(attachment => attachment.type === 'image').length > 0\n ? outdoorCourse.attachments[0].thumbnail !== ''\n ? outdoorCourse.attachments[0].thumbnail\n : outdoorCourse.attachments[0].url\n : null,\n },\n });\n }\n\n this.removeSelectedOutdoorCourse();\n state.selectedOutdoorCourseId = id;\n\n const outdoorCoursesIcons = await this.getIcons(outdoorCourseFeatureCollection, 'type');\n this.selectedOutdoorCourseLayer = L.geoJSON(outdoorCourseFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n zIndexOffset: 4000000,\n icon: L.divIcon({\n html: outdoorCoursesIcons[geoJsonPoint.properties.type]\n ? `<div part=\"selected-outdoor-course-marker\" class=\"selected-outdoor-course-marker\"><div part=\"outdoor-course-marker-container\" class=\"outdoor-course-marker-container\"><img part=\"outdoor-course-marker-icon\" src=${\n outdoorCoursesIcons[geoJsonPoint.properties.type]\n } /></div></div>`\n : `<div part=\"selected-outdoor-course-marker\" class=\"selected-outdoor-course-marker\"><div part=\"outdoor-course-marker-container\" class=\"outdoor-course-marker-container\"></div></div>`,\n className: '',\n iconSize: this.selectedMainMarkerSize,\n iconAnchor: [this.selectedMainMarkerSize / 2, this.selectedMainMarkerSize],\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('click', () => {\n const outdoorCourseDeparturePopup = L.DomUtil.create('div');\n /* @ts-ignore */\n outdoorCourseDeparturePopup.part = 'outdoor-course-coordinates-popup';\n outdoorCourseDeparturePopup.className = 'outdoor-course-coordinates-popup';\n if (geoJsonPoint.properties.imgSrc) {\n const outdoorCourseImg = L.DomUtil.create('img');\n /* @ts-ignore */\n outdoorCourseImg.part = 'outdoor-course-coordinates-image';\n outdoorCourseImg.src = geoJsonPoint.properties.imgSrc;\n outdoorCourseDeparturePopup.appendChild(outdoorCourseImg);\n }\n\n const outdoorCourseName = L.DomUtil.create('div');\n outdoorCourseName.innerHTML = geoJsonPoint.properties.name;\n /* @ts-ignore */\n outdoorCourseName.part = 'outdoor-course-name';\n outdoorCourseName.className = 'outdoor-course-name';\n outdoorCourseDeparturePopup.appendChild(outdoorCourseName);\n\n const outdoorCourseButton = L.DomUtil.create('button');\n outdoorCourseButton.innerHTML = 'Afficher le détail';\n /* @ts-ignore */\n outdoorCourseButton.part = 'outdoor-course-button';\n outdoorCourseButton.className = 'outdoor-course-button';\n outdoorCourseButton.onclick = () => this.outdoorCourseCardPress.emit(geoJsonPoint.properties.id);\n outdoorCourseDeparturePopup.appendChild(outdoorCourseButton);\n\n layer.bindPopup(outdoorCourseDeparturePopup, { interactive: true, autoPan: false, closeButton: false } as any).openPopup();\n });\n layer.on('mouseout', () => {\n if (!this.outdoorCoursePopupIsOpen) {\n state.selectedOutdoorCourseId = null;\n this.removeSelectedOutdoorCourse();\n }\n });\n layer.on('popupopen', () => {\n this.outdoorCoursePopupIsOpen = Boolean(state.selectedOutdoorCourseId);\n });\n layer.on('popupclose', () => {\n if (state.selectedOutdoorCourseId) {\n this.outdoorCoursePopupIsOpen = false;\n state.selectedOutdoorCourseId = null;\n this.removeSelectedOutdoorCourse();\n }\n });\n },\n }).addTo(this.map);\n }\n\n removeSelectedOutdoorCourse() {\n state.selectedOutdoorCourseId = null;\n this.selectedOutdoorCourseLayer && this.map.removeLayer(this.selectedOutdoorCourseLayer);\n this.selectedOutdoorCourseLayer = null;\n }\n\n async addCurrentPois() {\n if (state.poisData > 0) {\n const currentPoisFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n this.currentPoisLayer = L.geoJSON(currentPoisFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: geoJsonPoint.properties.type_pictogram\n ? `<div part=\"poi-marker\" class=\"poi-marker\"><img src=${geoJsonPoint.properties.type_pictogram} /></div>`\n : `<div part=\"poi-marker\" class=\"poi-marker\"><img /></div>`,\n className: '',\n iconSize: this.commonMarkerSize,\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('mouseover', () => {\n const poiTooltip = L.DomUtil.create('div');\n /* @ts-ignore */\n poiTooltip.part = 'poi-tooltip';\n poiTooltip.className = 'poi-tooltip';\n const poiName = L.DomUtil.create('div');\n poiName.innerHTML = geoJsonPoint.properties.name;\n /* @ts-ignore */\n poiName.part = 'poi-name';\n poiName.className = 'poi-name';\n poiTooltip.appendChild(poiName);\n layer.bindTooltip(poiTooltip).openTooltip();\n });\n },\n });\n if (state.currentPois) {\n this.setCurrentPois();\n }\n }\n }\n\n setCurrentPois() {\n if (this.currentPoisLayer) {\n if (state.currentPois) {\n const currentPoisFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n for (const currentPoi of state.currentPois) {\n currentPoisFeatureCollection.features.push({\n type: 'Feature',\n properties: { name: currentPoi.name, type_pictogram: state.poiTypes.find(poiType => poiType.id === currentPoi.type)?.pictogram },\n geometry: currentPoi.geometry,\n });\n }\n\n this.currentPoisLayer.clearLayers();\n\n this.currentPoisLayer.addData(currentPoisFeatureCollection);\n\n this.layerDataIsLoading = false;\n forceUpdate(this.hostElement);\n }\n }\n }\n\n async addCurrentSignages() {\n if (state.currentSignages && state.currentSignages.length > 0) {\n const signageImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/signage.svg`);\n const currentSignagesFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n for (const currentSignage of state.currentSignages) {\n currentSignagesFeatureCollection.features.push({\n type: 'Feature',\n properties: { name: currentSignage.name },\n geometry: currentSignage.geometry,\n });\n }\n\n this.currentSignagesLayer = L.geoJSON(currentSignagesFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: `<div part=\"signage-marker\" class=\"signage-marker\"><img part=\"signage-img\" src=${signageImageSrc} /><div part=\"signage-name\" class=\"signage-name\">${geoJsonPoint.properties.name}</div></div>`,\n className: '',\n iconSize: [this.commonMarkerSize * 1.2, this.commonMarkerSize * 0.8],\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('mouseover', () => {\n const signageTooltip = L.DomUtil.create('div');\n /* @ts-ignore */\n signageTooltip.part = 'signage-tooltip';\n signageTooltip.className = 'signage-tooltip';\n const signageName = L.DomUtil.create('div');\n signageName.innerHTML = geoJsonPoint.properties.name;\n /* @ts-ignore */\n signageName.part = 'signage-name';\n signageName.className = 'signage-name';\n signageTooltip.appendChild(signageName);\n layer.bindTooltip(signageTooltip).openTooltip();\n });\n },\n });\n }\n }\n\n async addCurrentTouristicContents() {\n if (state.touristicContentsData > 0) {\n const currentTouristicContentsFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n this.currentToutisticContentsLayer = L.geoJSON(currentTouristicContentsFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) => {\n return L.marker(latlng, {\n icon: L.divIcon({\n html: geoJsonPoint.properties.category_pictogram\n ? `<div part=\"touristic-content-marker\" class=\"touristic-content-marker\"><img src=${geoJsonPoint.properties.category_pictogram} /></div>`\n : `<div part=\"touristic-content-marker\" class=\"touristic-content-marker\"><img /></div>`,\n className: this.grwApp ? '' : 'cursor-pointer',\n iconSize: this.commonMarkerSize,\n } as any),\n autoPanOnFocus: false,\n } as any);\n },\n onEachFeature: (geoJsonPoint, layer) => {\n layer.on('click', () => {\n if (!this.grwApp) {\n this.touristicContentCardPress.emit(geoJsonPoint.properties.id);\n }\n });\n layer.on('mouseover', () => {\n const touristicContentTooltip = L.DomUtil.create('div');\n /* @ts-ignore */\n touristicContentTooltip.part = 'touristic-content-tooltip';\n touristicContentTooltip.className = 'touristic-content-tooltip';\n const touristicContentName = L.DomUtil.create('div');\n touristicContentName.innerHTML = geoJsonPoint.properties.name;\n /* @ts-ignore */\n touristicContentName.part = 'touristic-content-name';\n touristicContentName.className = 'touristic-content-name';\n touristicContentTooltip.appendChild(touristicContentName);\n layer.bindTooltip(touristicContentTooltip).openTooltip();\n });\n },\n });\n\n if (state.trekTouristicContents) {\n this.setCurrentTouristicContents();\n }\n }\n }\n\n setCurrentTouristicContents() {\n if (this.currentToutisticContentsLayer) {\n if (state.trekTouristicContents) {\n const currentTouristicContentsFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n for (const touristicContent of state.trekTouristicContents) {\n currentTouristicContentsFeatureCollection.features.push({\n type: 'Feature',\n properties: {\n id: touristicContent.id,\n name: touristicContent.name,\n category_pictogram: state.touristicContentCategories.find(touristicContentCategory => touristicContentCategory.id === touristicContent.category)?.pictogram,\n },\n geometry: touristicContent.geometry,\n });\n }\n\n this.currentToutisticContentsLayer.clearLayers();\n\n this.currentToutisticContentsLayer.addData(currentTouristicContentsFeatureCollection);\n\n this.layerDataIsLoading = false;\n forceUpdate(this.hostElement);\n }\n }\n }\n\n async addCurrentTouristicEvents() {\n if (state.touristicEventsData > 0) {\n const currentTouristicEventsFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n this.currentTouristicEventsLayer = L.geoJSON(currentTouristicEventsFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: geoJsonPoint.properties.type_pictogram\n ? `<div part=\"touristic-event-marker\" class=\"touristic-event-marker\"><img src=${geoJsonPoint.properties.type_pictogram} /></div>`\n : `<div part=\"touristic-event-marker\" class=\"touristic-event-marker\"><img /></div>`,\n className: this.grwApp ? '' : 'cursor-pointer',\n iconSize: this.commonMarkerSize,\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.on('click', () => {\n if (!this.grwApp) {\n this.touristicEventCardPress.emit(geoJsonPoint.properties.id);\n }\n });\n layer.once('mouseover', () => {\n const touristicEventTooltip = L.DomUtil.create('div');\n /* @ts-ignore */\n touristicEventTooltip.part = 'touristic-event-tooltip';\n touristicEventTooltip.className = 'touristic-event-tooltip';\n const touristicEventName = L.DomUtil.create('div');\n /* @ts-ignore */\n touristicEventName.part = 'touristic-event-name';\n touristicEventName.innerHTML = geoJsonPoint.properties.name;\n touristicEventName.className = 'touristic-event-name';\n touristicEventTooltip.appendChild(touristicEventName);\n layer.bindTooltip(touristicEventTooltip).openTooltip();\n });\n },\n });\n\n if (state.trekTouristicEvents) {\n this.setCurrentTouristicEvents();\n }\n }\n }\n\n setCurrentTouristicEvents() {\n if (this.currentTouristicEventsLayer) {\n if (state.trekTouristicEvents) {\n const currentTouristicEventsFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n for (const touristicEvent of state.trekTouristicEvents) {\n currentTouristicEventsFeatureCollection.features.push({\n type: 'Feature',\n properties: {\n id: touristicEvent.id,\n name: touristicEvent.name,\n type_pictogram: state.touristicEventTypes.find(touristicEventType => touristicEventType.id === touristicEvent.type)?.pictogram,\n },\n geometry: touristicEvent.geometry,\n });\n }\n\n this.currentTouristicEventsLayer.clearLayers();\n\n this.currentTouristicEventsLayer.addData(currentTouristicEventsFeatureCollection);\n\n this.layerDataIsLoading = false;\n forceUpdate(this.hostElement);\n }\n }\n }\n\n async addCurrentInformationDesks(currentData) {\n if (state.currentInformationDesks && state.currentInformationDesks.length > 0) {\n const currentInformationDesksFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n for (const currentInformationDesk of state.currentInformationDesks.filter(currentInformationDesks => currentData.information_desks.includes(currentInformationDesks.id))) {\n if (currentInformationDesk.latitude && currentInformationDesk.longitude) {\n currentInformationDesksFeatureCollection.features.push({\n type: 'Feature',\n properties: { name: currentInformationDesk.name, type_pictogram: currentInformationDesk.type.pictogram },\n geometry: { type: 'Point', coordinates: [Number(currentInformationDesk.longitude), Number(currentInformationDesk.latitude)] },\n });\n }\n }\n\n if (currentInformationDesksFeatureCollection.features.length > 0) {\n const informationDesksIcons = await this.getIcons(currentInformationDesksFeatureCollection, 'type_pictogram');\n this.currentInformationDesksLayer = L.geoJSON(currentInformationDesksFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: informationDesksIcons[geoJsonPoint.properties.type_pictogram]\n ? `<div part=\"information-desks-marker\" class=\"information-desks-marker\"><img src=${informationDesksIcons[geoJsonPoint.properties.type_pictogram]} /></div>`\n : `<div part=\"information-desks-marker\" class=\"information-desks-marker\"><img /></div>`,\n className: '',\n iconSize: this.commonMarkerSize,\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('mouseover', () => {\n const informationDesksTooltip = L.DomUtil.create('div');\n /* @ts-ignore */\n informationDesksTooltip.part = 'information-desks-tooltip';\n informationDesksTooltip.className = 'information-desks-tooltip';\n const informationDesksName = L.DomUtil.create('div');\n /* @ts-ignore */\n informationDesksName.part = 'information-desks-name';\n informationDesksName.innerHTML = geoJsonPoint.properties.name;\n informationDesksName.className = 'information-desks-name';\n informationDesksTooltip.appendChild(informationDesksName);\n layer.bindTooltip(informationDesksTooltip).openTooltip();\n });\n },\n });\n }\n }\n }\n\n handleLayersControl() {\n const overlays = {};\n if (this.currentStepsLayer) {\n overlays[translate[state.language].layers.steps] = this.currentStepsLayer;\n }\n if (this.currentReferencePointsLayer) {\n overlays[translate[state.language].layers.referencePoints] = this.currentReferencePointsLayer;\n }\n if (this.currentParkingLayer) {\n overlays[translate[state.language].layers.parking] = this.currentParkingLayer;\n }\n if (this.currentSensitiveAreasLayer) {\n overlays[translate[state.language].layers.sensitiveArea] = this.currentSensitiveAreasLayer;\n }\n if (this.currentInformationDesksLayer) {\n overlays[translate[state.language].layers.informationPlaces] = this.currentInformationDesksLayer;\n }\n if (state.poisData > 0) {\n overlays[translate[state.language].layers.pois] = this.currentPoisLayer;\n }\n if (this.currentSignagesLayer) {\n overlays[translate[state.language].layers.signages] = this.currentSignagesLayer;\n this.currentSignagesLayer.addTo(this.map);\n }\n if (state.touristicContentsData > 0) {\n overlays[translate[state.language].layers.touristicContents] = this.currentToutisticContentsLayer;\n }\n if (state.touristicEventsData > 0) {\n overlays[translate[state.language].layers.touristicEvents] = this.currentTouristicEventsLayer;\n }\n\n if (this.currentRelatedOutdoorSitesLayer) {\n overlays[translate[state.language].layers.sites] = this.currentRelatedOutdoorSitesLayer;\n }\n\n if (this.currentRelatedOutdoorCoursesLayer) {\n overlays[translate[state.language].layers.courses] = this.currentRelatedOutdoorCoursesLayer;\n }\n\n if (this.layersControl) {\n Object.keys(overlays).forEach(key => {\n this.layersControl.addOverlay(overlays[key], key);\n });\n } else if (Object.keys(overlays).length > 0) {\n this.layersControl = L.control.layers({}, overlays, { collapsed: true }).addTo(this.map);\n }\n\n this.handleLayersControlEvent();\n }\n\n applyCachedViewportState() {\n if (!this.layersControl) return;\n\n const layerMap: { key: string; layer: L.GeoJSON; loading?: boolean }[] = [\n { key: 'steps', layer: this.currentStepsLayer },\n { key: 'description', layer: this.currentReferencePointsLayer },\n { key: 'parking', layer: this.currentParkingLayer },\n { key: 'sensitiveArea', layer: this.currentSensitiveAreasLayer },\n { key: 'informationPlaces', layer: this.currentInformationDesksLayer },\n { key: 'pois', layer: this.currentPoisLayer, loading: !state.currentPois || state.currentPois.length === 0 },\n { key: 'touristicContents', layer: this.currentToutisticContentsLayer, loading: !state.trekTouristicContents || state.trekTouristicContents.length === 0 },\n { key: 'touristicEvents', layer: this.currentTouristicEventsLayer, loading: !state.trekTouristicEvents || state.trekTouristicEvents.length === 0 },\n ];\n\n for (const { key, layer, loading } of layerMap) {\n if (layer && this.viewportState[key] !== undefined) {\n this.handleLayerVisibility(this.viewportState[key], layer, loading || false);\n }\n }\n }\n\n handleLayersOnRemove() {\n this.viewportState = {};\n this.hasScrolled = false;\n if (this.layersControl) {\n if (!(this.layersControl as any)._layers.some(layer => !layer.overlay)) {\n this.map.removeControl(this.layersControl);\n this.layersControl = null;\n } else {\n (this.layersControl as any)._layers\n .filter(layer => layer.overlay)\n .forEach(layer => {\n this.layersControl.removeLayer(layer.layer);\n });\n }\n }\n\n if (this.elevationControl) {\n (this.elevationControl as any).clear();\n this.map.removeControl(this.elevationControl);\n this.elevationControl = null;\n }\n\n if (this.departureArrivalLayer) {\n this.map.removeLayer(this.departureArrivalLayer);\n this.departureArrivalLayer = null;\n }\n\n if (this.currentTrekLayer) {\n this.map.removeLayer(this.currentTrekLayer);\n this.currentTrekLayer = null;\n }\n\n if (this.currentParkingLayer) {\n this.map.removeLayer(this.currentParkingLayer);\n this.currentParkingLayer = null;\n }\n\n if (this.currentSensitiveAreasLayer) {\n this.map.removeLayer(this.currentSensitiveAreasLayer);\n this.currentSensitiveAreasLayer = null;\n }\n\n if (this.currentPoisLayer) {\n this.map.removeLayer(this.currentPoisLayer);\n this.currentPoisLayer = null;\n }\n\n if (this.currentSignagesLayer) {\n this.map.removeLayer(this.currentSignagesLayer);\n this.currentSignagesLayer = null;\n }\n\n if (this.currentInformationDesksLayer) {\n this.map.removeLayer(this.currentInformationDesksLayer);\n this.currentInformationDesksLayer = null;\n }\n\n if (this.currentReferencePointsLayer) {\n this.map.removeLayer(this.currentReferencePointsLayer);\n this.currentReferencePointsLayer = null;\n }\n\n if (this.currentStepsLayer) {\n this.map.removeLayer(this.currentStepsLayer);\n this.currentStepsLayer = null;\n }\n\n if (this.currentToutisticContentsLayer) {\n this.map.removeLayer(this.currentToutisticContentsLayer);\n this.currentToutisticContentsLayer = null;\n }\n if (this.currentTouristicEventsLayer) {\n this.map.removeLayer(this.currentTouristicEventsLayer);\n this.currentTouristicEventsLayer = null;\n }\n if (this.currentOutdoorSiteLayer) {\n this.map.removeLayer(this.currentOutdoorSiteLayer);\n this.currentOutdoorSiteLayer = null;\n }\n if (this.currentOutdoorCourseLayer) {\n this.map.removeLayer(this.currentOutdoorCourseLayer);\n this.currentOutdoorCourseLayer = null;\n }\n if (this.currentRelatedOutdoorSitesLayer) {\n this.map.removeLayer(this.currentRelatedOutdoorSitesLayer);\n this.currentRelatedOutdoorSitesLayer = null;\n }\n if (this.currentRelatedOutdoorCoursesLayer) {\n this.map.removeLayer(this.currentRelatedOutdoorCoursesLayer);\n this.currentRelatedOutdoorCoursesLayer = null;\n }\n }\n\n @Listen('resize', { target: 'window' })\n onWindowResize() {\n this.handleView();\n }\n\n handleView() {\n const elevationHeight = this.mapElement.getBoundingClientRect().width >= this.largeViewSize ? this.elevationHeight : this.mobileElevationHeight;\n if (this.elevationControl) {\n (this.elevationControl.options as any).height = elevationHeight;\n (this.elevationControl as any).redraw();\n }\n if (this.map) {\n this.map.invalidateSize();\n }\n forceUpdate(this.hostElement);\n }\n\n handleElevation() {\n (this.elevationControl as any).eleDiv.style.display = (this.elevationControl as any).eleDiv.style.display === 'block' ? 'none' : 'block';\n (this.elevationControl as any).redraw();\n forceUpdate(this.hostElement);\n }\n\n render() {\n const layersImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/layers.svg`);\n const contractImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/contract.svg`);\n\n return (\n <Host\n ref={el => (this.hostElement = el)}\n style={{\n '--font-family': this.fontFamily,\n '--color-primary-app': this.colorPrimaryApp,\n '--color-on-surface': this.colorOnSurface,\n '--color-primary-container': this.colorPrimaryContainer,\n '--color-on-primary-container': this.colorOnPrimaryContainer,\n '--color-background': this.colorBackground,\n '--color-markers': this.colorMarkers ? this.colorMarkers : this.colorPrimaryApp,\n '--color-clusters': this.colorClusters ? this.colorClusters : this.colorPrimaryApp,\n '--color-trek-line': this.colorTrekLine,\n '--layers-image-src': `url(${layersImageSrc})`,\n '--contract-image-src': `url(${contractImageSrc})`,\n '--elevation-height': (this.mapElement.getBoundingClientRect().width >= this.largeViewSize / 2 ? this.elevationHeight : this.mobileElevationHeight)\n .toString()\n .concat('px'),\n }}\n >\n <div\n id=\"map\"\n part=\"map\"\n class={\n (state.currentTouristicContent || state.currentTouristicEvent || state.currentOutdoorSite || state.currentOutdoorCourse) && this.grwApp\n ? 'common-map'\n : state.currentTrek && this.elevationControl && (this.elevationControl as any).eleDiv.style.display === 'block'\n ? 'trek-map-and-elevation'\n : state.currentTrek\n ? 'trek-map'\n : 'treks-map'\n }\n ref={el => (this.mapRef = el)}\n >\n {this.layerDataIsLoading && (\n <div class=\"layer-loader-container\">\n <div class=\"layer-loader\"></div>\n </div>\n )}\n {state.currentTrek && (\n <div class=\"grw-elevation-visibility-button-container\">\n <grw-fab\n exportparts=\"fab-visibility-button,fab-visibility-button-icon,fab-visibility-button-label\"\n font-family={this.fontFamily}\n action={() => this.handleElevation()}\n icon={() => (this.elevationControl && (this.elevationControl as any).eleDiv.style.display === 'block' ? 'show-elevation' : 'hide-elevation')}\n showTitle={translate[state.language].showElevation}\n hideTitle={translate[state.language].hideElevation}\n fab-background-color={this.fabBackgroundColor}\n fab-color={this.fabColor}\n ></grw-fab>\n </div>\n )}\n </div>\n\n {!this.mapIsReady && (\n <div part=\"map-loader-container\" class=\"map-loader-container\">\n <span part=\"loader\" class=\"loader\"></span>\n </div>\n )}\n </Host>\n );\n }\n}\n",":host {\n display: block;\n}\n\n.modal-container {\n z-index: 40000;\n position: fixed;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: var(--font-family);\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.6);\n\n .modal-content-container {\n display: flex;\n justify-content: center;\n flex-direction: column;\n width: 380px;\n height: 120px;\n padding: 16px;\n margin: 0px 16px;\n background-color: var(--color-background);\n border-radius: var(--border-radius, 8px);\n }\n\n .modal-message-container {\n display: flex;\n align-items: center;\n justify-content: center;\n\n .modal-loader {\n width: 16px;\n height: 16px;\n border: 3px solid var(--color-primary-container);\n border-bottom-color: var(--color-on-primary-container);\n border-radius: 50%;\n display: inline-block;\n box-sizing: border-box;\n animation: rotation 1s linear infinite;\n margin-right: 16px;\n }\n\n @keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n }\n\n .modal-buttons-container,\n .modal-button-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-top: 16px;\n .modal-button {\n cursor: pointer;\n user-select: none;\n font-size: 14px;\n font-weight: 500;\n height: 32px;\n box-shadow: var(--elevation-0);\n border: none;\n -webkit-tap-highlight-color: transparent;\n line-height: 20px;\n color: var(--color-primary-app);\n background-color: transparent;\n font-family: var(--font-family);\n }\n }\n .modal-button-container {\n justify-content: flex-end;\n }\n}\n","import { Component, Event, EventEmitter, Fragment, Host, Listen, Prop, State, h } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport state from 'store/store';\nimport { Mode } from 'types/types';\n\n@Component({\n tag: 'grw-offline-confirm-modal',\n styleUrl: 'grw-offline-confirm-modal.scss',\n shadow: true,\n})\nexport class GrwOfflineConfirmModal {\n @State() showOfflineModal = false;\n @State() showConfirmModal = false;\n @State() showLoaderModal = false;\n @State() showSuccessModal = false;\n @State() showErrorModal = false;\n @State() showConfirmDeleteModal = false;\n @State() showDeletingMessage = false;\n @State() showDeleteSuccessMessage = false;\n\n @Event() downloadPress: EventEmitter<number>;\n @Event() deletePress: EventEmitter<number>;\n\n @Prop() mode: Mode;\n\n @Listen('downloadConfirm', { target: 'window' })\n onDownloadConfirm() {\n this.showLoaderModal = false;\n this.showSuccessModal = false;\n this.showDeleteSuccessMessage = false;\n this.showDeletingMessage = false;\n this.showConfirmDeleteModal = false;\n document.body.style.overflow = `hidden`;\n this.showOfflineModal = true;\n this.showConfirmModal = true;\n }\n\n @Listen('downloadedSuccessConfirm', { target: 'window' })\n onDownloadedSuccessConfirm() {\n this.showLoaderModal = false;\n this.showSuccessModal = true;\n }\n\n @Listen('downloadedErrorConfirm', { target: 'window' })\n downloadedErrorConfirm() {\n this.showLoaderModal = false;\n this.showErrorModal = true;\n }\n\n @Listen('deleteConfirm', { target: 'window' })\n onDeleteConfirm() {\n this.showLoaderModal = false;\n this.showSuccessModal = false;\n this.showDeleteSuccessMessage = false;\n document.body.style.overflow = `hidden`;\n this.showOfflineModal = true;\n this.showConfirmModal = true;\n this.showConfirmDeleteModal = true;\n }\n\n @Listen('deleteSuccessConfirm', { target: 'window' })\n onDeleteSuccessConfirm() {\n this.showLoaderModal = false;\n this.showSuccessModal = true;\n this.showDeleteSuccessMessage = true;\n }\n\n @Listen('deleteErrorConfirm', { target: 'window' })\n deleteErrorConfirm() {\n this.showLoaderModal = false;\n this.showSuccessModal = true;\n this.showDeleteSuccessMessage = true;\n }\n\n handleOkDeleteModal() {\n this.showDeletingMessage = true;\n this.showConfirmDeleteModal = false;\n this.showConfirmModal = false;\n this.showLoaderModal = true;\n this.deletePress.emit();\n }\n\n handleOkDownloadModal() {\n this.showConfirmModal = false;\n this.showLoaderModal = true;\n this.downloadPress.emit();\n }\n\n handleCancelModal() {\n document.body.style.overflow = `visible`;\n this.showOfflineModal = false;\n }\n\n render() {\n return (\n <Host>\n {this.showOfflineModal && (\n <div class=\"modal-container\">\n <div class=\"modal-content-container\">\n {this.showConfirmModal && !this.showConfirmDeleteModal && (\n <Fragment>\n <div class=\"modal-message-container\">{`${\n this.mode === 'treks' ? translate[state.language].offline.downloadRouteQuestion : translate[state.language].offline.downloadOutdoorQuestion\n }`}</div>\n <div class=\"modal-buttons-container\">\n <button part=\"modal-button\" class=\"modal-button\" onClick={() => this.handleCancelModal()}>\n {translate[state.language].offline.cancel}\n </button>\n <button part=\"modal-button\" class=\"modal-button\" onClick={() => this.handleOkDownloadModal()}>\n {translate[state.language].offline.ok}\n </button>\n </div>\n </Fragment>\n )}\n {this.showConfirmDeleteModal && (\n <Fragment>\n <div class=\"modal-message-container\">{`${\n this.mode === 'treks' ? translate[state.language].offline.deleteRouteQuestion : translate[state.language].offline.deleteRouteQuestion\n }`}</div>\n <div class=\"modal-buttons-container\">\n <button part=\"modal-button\" class=\"modal-button\" onClick={() => this.handleCancelModal()}>\n {translate[state.language].offline.cancel}\n </button>\n <button part=\"modal-button\" class=\"modal-button\" onClick={() => this.handleOkDeleteModal()}>\n {translate[state.language].offline.ok}\n </button>\n </div>\n </Fragment>\n )}\n {this.showLoaderModal && (\n <Fragment>\n <div class=\"modal-message-container\">\n <div class=\"modal-loader\"></div>\n {this.showDeletingMessage ? translate[state.language].offline.deleting : translate[state.language].offline.downloading}\n </div>\n </Fragment>\n )}\n {this.showSuccessModal && (\n <Fragment>\n <div class=\"modal-message-container\">\n {this.showDeleteSuccessMessage\n ? this.mode === 'treks'\n ? translate[state.language].offline.offlineRouteDeleted\n : translate[state.language].offline.offlineOutdoorDeleted\n : this.mode === 'treks'\n ? translate[state.language].offline.routeAvailableOffline\n : translate[state.language].offline.outdoorAvailableOffline}\n </div>\n <div class=\"modal-button-container\">\n <button part=\"modal-button\" class=\"modal-button\" onClick={() => this.handleCancelModal()}>\n {translate[state.language].offline.ok}\n </button>\n </div>\n </Fragment>\n )}\n\n {this.showErrorModal && (\n <Fragment>\n <div class=\"modal-message-container\">\n {this.showDeleteSuccessMessage\n ? this.mode === 'treks'\n ? translate[state.language].offline.deleteRouteError\n : translate[state.language].offline.deleteOutdoorError\n : this.mode === 'treks'\n ? translate[state.language].offline.downloadRouteError\n : translate[state.language].offline.downloadOutdoorError}\n </div>\n <div class=\"modal-button-container\">\n <button part=\"modal-button\" class=\"modal-button\" onClick={() => this.handleCancelModal()}>\n {translate[state.language].offline.ok}\n </button>\n </div>\n </Fragment>\n )}\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n","import { getDocument } from 'ssr-window';\nimport { createElement, elementOffset, nextTick } from '../../shared/utils.js';\nimport createElementIfNotDefined from '../../shared/create-element-if-not-defined.js';\nexport default function Scrollbar({\n swiper,\n extendParams,\n on,\n emit\n}) {\n const document = getDocument();\n let isTouched = false;\n let timeout = null;\n let dragTimeout = null;\n let dragStartPos;\n let dragSize;\n let trackSize;\n let divider;\n extendParams({\n scrollbar: {\n el: null,\n dragSize: 'auto',\n hide: false,\n draggable: false,\n snapOnRelease: true,\n lockClass: 'swiper-scrollbar-lock',\n dragClass: 'swiper-scrollbar-drag',\n scrollbarDisabledClass: 'swiper-scrollbar-disabled',\n horizontalClass: `swiper-scrollbar-horizontal`,\n verticalClass: `swiper-scrollbar-vertical`\n }\n });\n swiper.scrollbar = {\n el: null,\n dragEl: null\n };\n function setTranslate() {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n const {\n scrollbar,\n rtlTranslate: rtl\n } = swiper;\n const {\n dragEl,\n el\n } = scrollbar;\n const params = swiper.params.scrollbar;\n const progress = swiper.params.loop ? swiper.progressLoop : swiper.progress;\n let newSize = dragSize;\n let newPos = (trackSize - dragSize) * progress;\n if (rtl) {\n newPos = -newPos;\n if (newPos > 0) {\n newSize = dragSize - newPos;\n newPos = 0;\n } else if (-newPos + dragSize > trackSize) {\n newSize = trackSize + newPos;\n }\n } else if (newPos < 0) {\n newSize = dragSize + newPos;\n newPos = 0;\n } else if (newPos + dragSize > trackSize) {\n newSize = trackSize - newPos;\n }\n if (swiper.isHorizontal()) {\n dragEl.style.transform = `translate3d(${newPos}px, 0, 0)`;\n dragEl.style.width = `${newSize}px`;\n } else {\n dragEl.style.transform = `translate3d(0px, ${newPos}px, 0)`;\n dragEl.style.height = `${newSize}px`;\n }\n if (params.hide) {\n clearTimeout(timeout);\n el.style.opacity = 1;\n timeout = setTimeout(() => {\n el.style.opacity = 0;\n el.style.transitionDuration = '400ms';\n }, 1000);\n }\n }\n function setTransition(duration) {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n swiper.scrollbar.dragEl.style.transitionDuration = `${duration}ms`;\n }\n function updateSize() {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n const {\n scrollbar\n } = swiper;\n const {\n dragEl,\n el\n } = scrollbar;\n dragEl.style.width = '';\n dragEl.style.height = '';\n trackSize = swiper.isHorizontal() ? el.offsetWidth : el.offsetHeight;\n divider = swiper.size / (swiper.virtualSize + swiper.params.slidesOffsetBefore - (swiper.params.centeredSlides ? swiper.snapGrid[0] : 0));\n if (swiper.params.scrollbar.dragSize === 'auto') {\n dragSize = trackSize * divider;\n } else {\n dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);\n }\n if (swiper.isHorizontal()) {\n dragEl.style.width = `${dragSize}px`;\n } else {\n dragEl.style.height = `${dragSize}px`;\n }\n if (divider >= 1) {\n el.style.display = 'none';\n } else {\n el.style.display = '';\n }\n if (swiper.params.scrollbar.hide) {\n el.style.opacity = 0;\n }\n if (swiper.params.watchOverflow && swiper.enabled) {\n scrollbar.el.classList[swiper.isLocked ? 'add' : 'remove'](swiper.params.scrollbar.lockClass);\n }\n }\n function getPointerPosition(e) {\n return swiper.isHorizontal() ? e.clientX : e.clientY;\n }\n function setDragPosition(e) {\n const {\n scrollbar,\n rtlTranslate: rtl\n } = swiper;\n const {\n el\n } = scrollbar;\n let positionRatio;\n positionRatio = (getPointerPosition(e) - elementOffset(el)[swiper.isHorizontal() ? 'left' : 'top'] - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize);\n positionRatio = Math.max(Math.min(positionRatio, 1), 0);\n if (rtl) {\n positionRatio = 1 - positionRatio;\n }\n const position = swiper.minTranslate() + (swiper.maxTranslate() - swiper.minTranslate()) * positionRatio;\n swiper.updateProgress(position);\n swiper.setTranslate(position);\n swiper.updateActiveIndex();\n swiper.updateSlidesClasses();\n }\n function onDragStart(e) {\n const params = swiper.params.scrollbar;\n const {\n scrollbar,\n wrapperEl\n } = swiper;\n const {\n el,\n dragEl\n } = scrollbar;\n isTouched = true;\n dragStartPos = e.target === dragEl ? getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null;\n e.preventDefault();\n e.stopPropagation();\n wrapperEl.style.transitionDuration = '100ms';\n dragEl.style.transitionDuration = '100ms';\n setDragPosition(e);\n clearTimeout(dragTimeout);\n el.style.transitionDuration = '0ms';\n if (params.hide) {\n el.style.opacity = 1;\n }\n if (swiper.params.cssMode) {\n swiper.wrapperEl.style['scroll-snap-type'] = 'none';\n }\n emit('scrollbarDragStart', e);\n }\n function onDragMove(e) {\n const {\n scrollbar,\n wrapperEl\n } = swiper;\n const {\n el,\n dragEl\n } = scrollbar;\n if (!isTouched) return;\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n setDragPosition(e);\n wrapperEl.style.transitionDuration = '0ms';\n el.style.transitionDuration = '0ms';\n dragEl.style.transitionDuration = '0ms';\n emit('scrollbarDragMove', e);\n }\n function onDragEnd(e) {\n const params = swiper.params.scrollbar;\n const {\n scrollbar,\n wrapperEl\n } = swiper;\n const {\n el\n } = scrollbar;\n if (!isTouched) return;\n isTouched = false;\n if (swiper.params.cssMode) {\n swiper.wrapperEl.style['scroll-snap-type'] = '';\n wrapperEl.style.transitionDuration = '';\n }\n if (params.hide) {\n clearTimeout(dragTimeout);\n dragTimeout = nextTick(() => {\n el.style.opacity = 0;\n el.style.transitionDuration = '400ms';\n }, 1000);\n }\n emit('scrollbarDragEnd', e);\n if (params.snapOnRelease) {\n swiper.slideToClosest();\n }\n }\n function events(method) {\n const {\n scrollbar,\n params\n } = swiper;\n const el = scrollbar.el;\n if (!el) return;\n const target = el;\n const activeListener = params.passiveListeners ? {\n passive: false,\n capture: false\n } : false;\n const passiveListener = params.passiveListeners ? {\n passive: true,\n capture: false\n } : false;\n if (!target) return;\n const eventMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';\n target[eventMethod]('pointerdown', onDragStart, activeListener);\n document[eventMethod]('pointermove', onDragMove, activeListener);\n document[eventMethod]('pointerup', onDragEnd, passiveListener);\n }\n function enableDraggable() {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n events('on');\n }\n function disableDraggable() {\n if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;\n events('off');\n }\n function init() {\n const {\n scrollbar,\n el: swiperEl\n } = swiper;\n swiper.params.scrollbar = createElementIfNotDefined(swiper, swiper.originalParams.scrollbar, swiper.params.scrollbar, {\n el: 'swiper-scrollbar'\n });\n const params = swiper.params.scrollbar;\n if (!params.el) return;\n let el;\n if (typeof params.el === 'string' && swiper.isElement) {\n el = swiper.el.shadowRoot.querySelector(params.el);\n }\n if (!el && typeof params.el === 'string') {\n el = document.querySelectorAll(params.el);\n } else if (!el) {\n el = params.el;\n }\n if (swiper.params.uniqueNavElements && typeof params.el === 'string' && el.length > 1 && swiperEl.querySelectorAll(params.el).length === 1) {\n el = swiperEl.querySelector(params.el);\n }\n if (el.length > 0) el = el[0];\n el.classList.add(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);\n let dragEl;\n if (el) {\n dragEl = el.querySelector(`.${swiper.params.scrollbar.dragClass}`);\n if (!dragEl) {\n dragEl = createElement('div', swiper.params.scrollbar.dragClass);\n el.append(dragEl);\n }\n }\n Object.assign(scrollbar, {\n el,\n dragEl\n });\n if (params.draggable) {\n enableDraggable();\n }\n if (el) {\n el.classList[swiper.enabled ? 'remove' : 'add'](swiper.params.scrollbar.lockClass);\n }\n }\n function destroy() {\n const params = swiper.params.scrollbar;\n const el = swiper.scrollbar.el;\n if (el) {\n el.classList.remove(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass);\n }\n disableDraggable();\n }\n on('init', () => {\n if (swiper.params.scrollbar.enabled === false) {\n // eslint-disable-next-line\n disable();\n } else {\n init();\n updateSize();\n setTranslate();\n }\n });\n on('update resize observerUpdate lock unlock', () => {\n updateSize();\n });\n on('setTranslate', () => {\n setTranslate();\n });\n on('setTransition', (_s, duration) => {\n setTransition(duration);\n });\n on('enable disable', () => {\n const {\n el\n } = swiper.scrollbar;\n if (el) {\n el.classList[swiper.enabled ? 'remove' : 'add'](swiper.params.scrollbar.lockClass);\n }\n });\n on('destroy', () => {\n destroy();\n });\n const enable = () => {\n swiper.el.classList.remove(swiper.params.scrollbar.scrollbarDisabledClass);\n if (swiper.scrollbar.el) {\n swiper.scrollbar.el.classList.remove(swiper.params.scrollbar.scrollbarDisabledClass);\n }\n init();\n updateSize();\n setTranslate();\n };\n const disable = () => {\n swiper.el.classList.add(swiper.params.scrollbar.scrollbarDisabledClass);\n if (swiper.scrollbar.el) {\n swiper.scrollbar.el.classList.add(swiper.params.scrollbar.scrollbarDisabledClass);\n }\n destroy();\n };\n Object.assign(swiper.scrollbar, {\n enable,\n disable,\n updateSize,\n setTranslate,\n init,\n destroy\n });\n}","@use '~swiper/swiper.scss';\n@use '~swiper/modules/navigation/navigation.scss';\n@use '~swiper/modules/pagination/pagination.scss';\n@use '~swiper/modules/scrollbar/scrollbar.scss';\n\n.swiper {\n z-index: 0;\n}\n\n:host {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n overflow: hidden;\n --swiper-navigation-size: 24px;\n --swiper-navigation-color: var(--color-on-primary-container);\n --swiper-pagination-color: var(--color-primary-container);\n --swiper-pagination-bullet-size: 12px;\n .swiper-button-prev,\n .swiper-button-next {\n background-color: var(--color-primary-container);\n padding: 4px;\n width: 32px;\n height: 32px;\n border-radius: var(--border-radius, 32px);\n box-shadow: var(--elevation-1);\n &:hover {\n box-shadow: var(--elevation-2);\n }\n }\n}\n\ngrw-outdoor-course-detail {\n overflow: hidden;\n}\n\n.outdoor-course-detail-container {\n font-family: var(--font-family);\n color: var(--color-on-surface);\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n .outdoor-course-name {\n color: var(--color-primary-app);\n font-size: 32px;\n line-height: 28px;\n font-weight: 600;\n padding: 0px 24px;\n margin: 16px 0px;\n }\n .outdoor-course-img {\n cursor: pointer;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n .default-outdoor-course-img {\n background-color: var(--color-primary-container);\n object-fit: contain;\n }\n .outdoor-course-image-legend {\n position: absolute;\n top: 16px;\n font-size: 12px;\n color: #ffffff;\n width: 100%;\n text-align: center;\n }\n .outdoor-course-close-fullscreen-button {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n z-index: 40;\n top: 16px;\n right: 16px;\n color: var(--swiper-navigation-color, var(--swiper-theme-color));\n background-color: var(--color-primary-container);\n padding: 4px;\n width: 32px;\n height: 32px;\n border-radius: var(--border-radius, 32px);\n box-shadow: var(--elevation-1);\n cursor: pointer;\n }\n .sub-container {\n padding: 24px 24px 0px 24px;\n .icons-labels-container {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex-wrap: wrap;\n gap: 16px;\n .icon-label {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n .icon {\n display: flex;\n width: 24px;\n height: 24px;\n color: var(--color-primary-app);\n margin-right: 8px;\n }\n .network {\n &:not(:last-child) {\n margin-right: 16px;\n }\n }\n }\n .practice {\n .icon {\n display: flex;\n background-color: var(--color-primary-app);\n }\n }\n .network {\n display: flex;\n align-items: center;\n }\n }\n }\n .row {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n width: 100%;\n .icon {\n margin-right: 8px;\n color: var(--color-primary-app);\n }\n }\n .downloads-container {\n padding: 0px 24px 0px 24px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .download-title {\n color: var(--color-on-surface);\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n }\n .links-container {\n display: flex;\n flex-wrap: wrap;\n a {\n margin-top: 8px;\n background-color: var(--color-primary-container);\n color: var(--color-on-primary-container);\n border-radius: var(--border-radius, 8px);\n padding: 8px 16px;\n box-shadow: var(--elevation-1);\n height: 32px;\n gap: 8px;\n box-sizing: border-box;\n text-align: start;\n vertical-align: middle;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n position: relative;\n text-decoration: none;\n font-family: var(--font-family);\n &:nth-child(2) {\n margin: 8px 12px 0px 12px;\n }\n &:hover {\n box-shadow: var(--elevation-2);\n }\n .icon {\n display: flex;\n }\n }\n }\n }\n\n .description-container,\n .advice-container,\n .weather-container,\n .touristic-content-container,\n .touristic-event-container {\n font-size: 16px;\n line-height: 24px;\n font-weight: 400;\n a {\n color: var(--color-primary-app);\n }\n }\n .description-title,\n .advice-title,\n .touristic-content-title,\n .touristic-event-title {\n color: var(--color-on-surface);\n font-size: 22px;\n line-height: 28px;\n font-weight: 400;\n font-weight: bold;\n overflow-wrap: break-word;\n }\n .description-title,\n .advice-title,\n .touristic-content-title,\n .touristic-event-title {\n margin-bottom: 16px;\n }\n .description-container,\n .advice-container,\n .weather-container,\n .touristic-content-title,\n .touristic-event-title {\n padding: 0px 24px 0px 24px;\n }\n .description-container {\n .description {\n ol {\n position: relative;\n counter-reset: referencePoint;\n &:before {\n content: '';\n position: absolute;\n width: 4px;\n top: 0px;\n bottom: 0px;\n left: 14px;\n background-color: var(--color-primary-app);\n }\n li {\n position: relative;\n list-style-type: none;\n counter-increment: referencePoint;\n p {\n margin: 0;\n }\n &:not(:first-child) {\n margin-top: 12px;\n }\n }\n li:before {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n content: counter(referencePoint);\n width: 24px;\n height: 24px;\n background: #f04141;\n border-radius: 12px;\n font-weight: bold;\n font-size: 0.8em;\n color: white;\n margin-left: -36px;\n top: calc(50% - 12px);\n }\n }\n }\n }\n .current-advice-container {\n display: flex;\n padding: 12px;\n border: 2px solid var(--color-outline);\n border-radius: var(--border-radius, 12px);\n font-size: 16px;\n .icon img {\n width: 26px;\n margin-right: 8px;\n }\n margin-bottom: 12px;\n }\n .advice-container {\n div:last-child {\n margin-bottom: 0px;\n }\n }\n .departure-container,\n .cities-container {\n display: flex;\n align-items: center;\n padding: 0px 24px 24px 24px;\n .departure-title,\n .cities-title {\n color: var(--color-on-surface);\n font-weight: bold;\n white-space: nowrap;\n margin-right: 8px;\n }\n }\n .weather-container {\n iframe {\n width: 100%;\n }\n }\n .divider {\n margin: 16px;\n border-top: 1px solid var(--color-outline);\n }\n\n .detail-bottom-space {\n min-height: var(--detail-bottom-space-height);\n height: var(--detail-bottom-space-height);\n width: 100%;\n background-color: var(--color-background);\n }\n .type {\n .icon {\n display: flex;\n border-radius: 100%;\n padding: 2px;\n max-height: 20px;\n max-width: 20px;\n }\n }\n\n .offline-button {\n cursor: pointer;\n font-size: 14px;\n border: none;\n background-color: var(--color-primary-container);\n color: var(--color-on-primary-container);\n border-radius: var(--border-radius, 8px);\n padding: 8px 16px;\n box-shadow: var(--elevation-1);\n height: 32px;\n gap: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n &:hover {\n box-shadow: var(--elevation-2);\n }\n .icon {\n display: flex;\n }\n }\n\n .departure-container {\n padding-top: 24px;\n }\n\n .advice-container {\n .icon {\n margin-right: 8px;\n }\n }\n}\n\n.swiper-information-desks,\n.swiper-pois,\n.swiper-step,\n.swiper-touristic-content,\n.swiper-touristic-event {\n padding-right: 32px;\n padding-left: 32px;\n padding-bottom: 20px;\n}\n\n.accessibilities-container {\n padding: 0px 24px 0px 24px;\n font-size: 16px;\n line-height: 24px;\n font-weight: 400;\n a {\n color: var(--color-primary-app);\n }\n}\n\n.accessibilities-title {\n color: var(--color-on-surface);\n font-size: 22px;\n line-height: 28px;\n font-weight: 400;\n font-weight: bold;\n margin-bottom: 16px;\n}\n","import { Build, Component, Host, Prop, State, getAssetPath, h, Event, EventEmitter } from '@stencil/core';\nimport { OutdoorCourse } from 'components';\nimport state, { onChange } from 'store/store';\nimport Swiper, { Navigation, Pagination, Keyboard, FreeMode, Mousewheel, Scrollbar } from 'swiper';\nimport CloseIcon from '../../assets/close.svg';\nimport { translate } from 'i18n/i18n';\nimport TimelapseIcon from '../../assets/timelapse.svg';\nimport OpenInFullIcon from '../../assets/open_in_full.svg';\nimport MovingIcon from '../../assets/moving.svg';\nimport DownloadIcon from '../../assets/download.svg';\nimport WarningIcon from '../../assets/warning.svg';\nimport { formatAscent, formatDuration, formatLength } from 'utils/utils';\n\nconst observerOptions = { threshold: 0 };\n\n@Component({\n tag: 'grw-outdoor-course-detail',\n styleUrl: 'grw-outdoor-course-detail.scss',\n shadow: true,\n})\nexport class GrwOutdoorCourseDetail {\n @Prop() fontFamily = 'Roboto';\n @Prop() colorPrimaryApp = '#6b0030';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorPrimaryContainer = '#eaddff';\n @Prop() colorOnPrimaryContainer = '#21005e';\n @Prop() colorSecondaryContainer = '#e8def8';\n @Prop() colorOnSecondaryContainer = '#1d192b';\n @Prop() colorSurfaceContainerLow = '#f7f2fa';\n @Prop() colorBackground = '#fef7ff';\n @Prop() isLargeView = false;\n @Prop() weather = false;\n @Prop() grwApp = false;\n\n @State() displayFullscreen = false;\n @State() currentOutdoorCourse: OutdoorCourse;\n @State() offline = false;\n\n @Event() poiIsInViewport: EventEmitter<boolean>;\n @Event() touristicContentsIsInViewport: EventEmitter<boolean>;\n @Event() touristicEventsIsInViewport: EventEmitter<boolean>;\n\n outdoorCourseDetailContainerRef?: HTMLElement;\n swiperImagesRef?: HTMLDivElement;\n prevElImagesRef?: HTMLDivElement;\n nextElImagesRef?: HTMLDivElement;\n paginationElImagesRef?: HTMLDivElement;\n swiperImages?: Swiper;\n\n presentationRef?: HTMLDivElement;\n descriptionRef?: HTMLDivElement;\n recommendationRef?: HTMLDivElement;\n\n swiperTouristicContents?: Swiper;\n swiperTouristicEvents?: Swiper;\n swiperTouristicContentsRef?: HTMLDivElement;\n swiperTouristicEventsRef?: HTMLDivElement;\n touristicContentsRef?: HTMLDivElement;\n touristicEventsRef?: HTMLDivElement;\n touristicContentsSwiperScrollbar?: HTMLDivElement;\n touristicEventsSwiperScrollbar?: HTMLDivElement;\n swiperPois?: Swiper;\n poiRef?: HTMLDivElement;\n swiperPoisRef?: HTMLDivElement;\n poisOptionRef?: HTMLAnchorElement;\n poisSwiperScrollbar?: HTMLDivElement;\n\n poiObserver: IntersectionObserver;\n touristicContentObserver: IntersectionObserver;\n touristicEventObserver: IntersectionObserver;\n\n handleSwipers() {\n if (this.swiperImagesRef && !this.swiperImages) {\n this.swiperImages = new Swiper(this.swiperImagesRef, {\n modules: [Navigation, Pagination, Keyboard, FreeMode, Mousewheel],\n navigation: {\n prevEl: this.prevElImagesRef,\n nextEl: this.nextElImagesRef,\n },\n pagination: { el: this.paginationElImagesRef },\n allowTouchMove: false,\n keyboard: false,\n loop: true,\n });\n this.swiperImagesRef.onfullscreenchange = () => {\n this.displayFullscreen = !this.displayFullscreen;\n this.displayFullscreen ? this.swiperImages.keyboard.enable() : this.swiperImages.keyboard.disable();\n };\n }\n\n if (this.swiperTouristicContentsRef && !this.swiperTouristicContents) {\n this.swiperTouristicContents = new Swiper(this.swiperTouristicContentsRef, {\n modules: [FreeMode, Mousewheel, Scrollbar],\n slidesPerView: 1.5,\n spaceBetween: 20,\n grabCursor: true,\n freeMode: true,\n mousewheel: { forceToAxis: true },\n scrollbar: {\n draggable: true,\n hide: false,\n el: this.touristicContentsSwiperScrollbar,\n },\n breakpointsBase: 'container',\n breakpoints: {\n '540': {\n slidesPerView: 2.5,\n },\n '1024': {\n slidesPerView: 4,\n },\n },\n loop: false,\n });\n }\n if (this.swiperTouristicEventsRef && !this.swiperTouristicEvents) {\n this.swiperTouristicEvents = new Swiper(this.swiperTouristicEventsRef, {\n modules: [FreeMode, Mousewheel, Scrollbar],\n slidesPerView: 1.5,\n spaceBetween: 20,\n grabCursor: true,\n freeMode: true,\n mousewheel: { forceToAxis: true },\n scrollbar: {\n draggable: true,\n hide: false,\n el: this.touristicEventsSwiperScrollbar,\n },\n breakpointsBase: 'container',\n breakpoints: {\n '540': {\n slidesPerView: 2.5,\n },\n '1024': {\n slidesPerView: 4,\n },\n },\n loop: false,\n });\n }\n if (this.swiperPoisRef && !this.swiperPois) {\n this.swiperPois = new Swiper(this.swiperPoisRef, {\n modules: [FreeMode, Mousewheel, Scrollbar],\n slidesPerView: 1.5,\n spaceBetween: 20,\n grabCursor: true,\n freeMode: true,\n mousewheel: { forceToAxis: true },\n scrollbar: {\n draggable: true,\n hide: false,\n el: this.poisSwiperScrollbar,\n },\n breakpointsBase: 'container',\n breakpoints: {\n '540': {\n slidesPerView: 2.5,\n },\n '1024': {\n slidesPerView: 4,\n },\n },\n loop: false,\n });\n }\n }\n\n handleObservers() {\n if (this.poiRef && !this.poiObserver) {\n this.poiObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.poiIsInViewport.emit(isIntersecting);\n },\n observerOptions,\n );\n this.poiObserver.observe(this.poiRef);\n }\n\n if (this.touristicContentsRef && !this.touristicContentObserver) {\n this.touristicContentObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.touristicContentsIsInViewport.emit(isIntersecting);\n },\n observerOptions,\n );\n this.touristicContentObserver.observe(this.touristicContentsRef);\n }\n if (this.touristicEventsRef && !this.touristicEventObserver) {\n this.touristicEventObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.touristicEventsIsInViewport.emit(isIntersecting);\n },\n observerOptions,\n );\n this.touristicEventObserver.observe(this.touristicEventsRef);\n }\n }\n\n componentDidUpdate() {\n this.handleObservers();\n this.handleSwipers();\n }\n\n componentDidLoad() {\n this.handleObservers();\n this.handleSwipers();\n }\n\n async connectedCallback() {\n if (state.currentOutdoorCourse) {\n this.currentOutdoorCourse = state.currentOutdoorCourse;\n this.offline = this.currentOutdoorCourse.offline;\n }\n\n onChange('currentOutdoorCourse', async () => {\n if (state.currentOutdoorCourse) {\n this.currentOutdoorCourse = state.currentOutdoorCourse;\n this.offline = this.currentOutdoorCourse.offline;\n }\n });\n }\n\n handleFullscreen(close: boolean = false) {\n if (!close) {\n if (this.currentOutdoorCourse.attachments && this.currentOutdoorCourse.attachments[0] && this.currentOutdoorCourse.attachments[0].url) {\n this.swiperImagesRef.requestFullscreen();\n }\n } else {\n (document as any).exitFullscreen();\n }\n }\n\n render() {\n const defaultImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/default-image.svg`);\n const type = state.outdoorCourseTypes && this.currentOutdoorCourse && state.outdoorCourseTypes.find(type => type.id === this.currentOutdoorCourse.type);\n const city = state.cities && state.cities.find(city => city.id === this.currentOutdoorCourse.cities[0]);\n const outdoorRatings =\n state.outdoorRatings && this.currentOutdoorCourse && state.outdoorRatings.filter(outdoorRating => this.currentOutdoorCourse.ratings.includes(outdoorRating.id));\n const currentOutdoorCoursesRatingsScales = outdoorRatings && [...new Set(outdoorRatings.map(outdoorRating => outdoorRating.scale))];\n const outdoorRatingsScales =\n currentOutdoorCoursesRatingsScales && state.outdoorRatingsScale.filter(outdoorRatingsScale => currentOutdoorCoursesRatingsScales.includes(outdoorRatingsScale.id));\n\n return (\n <Host\n style={{\n '--font-family': this.fontFamily,\n '--color-primary-app': this.colorPrimaryApp,\n '--color-on-surface': this.colorOnSurface,\n '--color-primary-container': this.colorPrimaryContainer,\n '--color-on-primary-container': this.colorOnPrimaryContainer,\n '--color-secondary-container': this.colorSecondaryContainer,\n '--color-on-secondary-container': this.colorOnSecondaryContainer,\n '--color-background': this.colorBackground,\n '--detail-bottom-space-height': this.isLargeView\n ? state.languages && state.languages.length > 1\n ? '44px'\n : '12px'\n : state.languages && state.languages.length > 1\n ? '164px'\n : '124px',\n }}\n >\n {this.currentOutdoorCourse && (\n <div part=\"outdoor-course-detail-container\" class=\"outdoor-course-detail-container\" ref={el => (this.outdoorCourseDetailContainerRef = el)}>\n <div part=\"outdoor-course-images-container\" class=\"outdoor-course-images-container\" ref={el => (this.presentationRef = el)}>\n <div part=\"swiper-images\" class=\"swiper swiper-images\" ref={el => (this.swiperImagesRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {this.currentOutdoorCourse.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n this.currentOutdoorCourse.attachments\n .filter(attachment => attachment.type === 'image')\n .map(attachment => {\n const legend = [attachment.legend, attachment.author].filter(Boolean).join(' - ');\n return (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n {this.displayFullscreen && (\n <div part=\"outdoor-course-close-fullscreen-button\" class=\"outdoor-course-close-fullscreen-button\" onClick={() => this.handleFullscreen(true)}>\n <span part=\"outdoor-course-close-fullcreen-icon\" class=\"outdoor-course-close-fullcreen-icon\" innerHTML={CloseIcon}></span>\n </div>\n )}\n <div part=\"outdoor-course-image-legend\" class=\"outdoor-course-image-legend\">\n {legend}\n </div>\n <img\n part=\"outdoor-course-img\"\n class=\"outdoor-course-img\"\n src={this.offline && attachment.thumbnail !== '' ? attachment.thumbnail : attachment.url}\n loading=\"lazy\"\n onClick={() => this.handleFullscreen()}\n /* @ts-ignore */\n onerror={event => {\n event.target.onerror = null;\n event.target.className = 'outdoor-course-img default-outdoor-course-img';\n event.target.src = defaultImageSrc;\n }}\n alt={attachment.legend}\n />\n </div>\n );\n })\n ) : (\n <img part=\"outdoor-course-img\" class=\"outdoor-course-img default-outdoor-course-img\" src={defaultImageSrc} loading=\"lazy\" alt=\"\" />\n )}\n </div>\n <div>\n <div part=\"swiper-pagination\" class=\"swiper-pagination\" ref={el => (this.paginationElImagesRef = el)}></div>\n <div part=\"swiper-button-prev\" class=\"swiper-button-prev\" ref={el => (this.prevElImagesRef = el)}></div>\n <div part=\"swiper-button-next\" class=\"swiper-button-next\" ref={el => (this.nextElImagesRef = el)}></div>\n </div>\n </div>\n </div>\n <div part=\"outdoor-course-name\" class=\"outdoor-course-name\">\n {this.currentOutdoorCourse.name}\n </div>\n <div part=\"sub-container\" class=\"sub-container\">\n <div part=\"icons-labels-container\" class=\"icons-labels-container\">\n {type && (\n <div part=\"icon-label\" class=\"icon-label type\">\n {type.pictogram && <img part=\"icon\" class=\"icon\" src={type.pictogram} alt=\"\" />}\n <span part=\"label\" class=\"label\">\n {type.name}\n </span>\n </div>\n )}\n <div part=\"icon-label\" class=\"icon-label duration\">\n <span part=\"icon\" class=\"icon\" innerHTML={TimelapseIcon}></span>\n <span part=\"label\" class=\"label\">\n {formatDuration(this.currentOutdoorCourse.duration)}\n </span>\n </div>\n <div part=\"icon-label\" class=\"icon-label length\">\n <span part=\"icon\" class=\"icon\" innerHTML={OpenInFullIcon}></span>\n <span part=\"label\" class=\"label\">\n {formatLength(this.currentOutdoorCourse.length)}\n </span>\n </div>\n {this.currentOutdoorCourse.max_elevation && (\n <div part=\"icon-label\" class=\"icon-label ascent\">\n <span part=\"icon\" class=\"icon\" innerHTML={MovingIcon}></span>\n <span part=\"label\" class=\"label\">\n {formatAscent(this.currentOutdoorCourse.max_elevation)}\n </span>\n </div>\n )}\n {outdoorRatings &&\n outdoorRatingsScales.map(outdoorRatingsScale => (\n <div part=\"row\" class=\"row\">\n {`${outdoorRatingsScale.name} : ${outdoorRatings\n .filter(outdoorRating => outdoorRating.scale === outdoorRatingsScale.id)\n .map(rating => rating.name)\n .join(', ')}`}\n </div>\n ))}\n </div>\n </div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"downloads-container\" class=\"downloads-container\">\n <div part=\"download-title\" class=\"download-title\">\n {translate[state.language].downloads}\n </div>\n <div part=\"links-container\" class=\"links-container\">\n <a\n href={`${this.currentOutdoorCourse.pdf}${\n state.portalsFromProviders && state.portalsFromProviders.length === 1 ? '?portal=' + state.portalsFromProviders[0] : ''\n }`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <span part=\"icon\" class=\"icon\" innerHTML={DownloadIcon}></span>\n <span part=\"label\" class=\"label\">\n PDF\n </span>\n </a>\n </div>\n </div>\n <div part=\"divider\" class=\"divider\"></div>\n {this.currentOutdoorCourse.description && (\n <div part=\"description-container\" class=\"description-container\">\n <div part=\"description-title\" class=\"description-title\" ref={el => (this.descriptionRef = el)}>\n {translate[state.language].description}\n </div>\n <div part=\"description\" class=\"description\" innerHTML={this.currentOutdoorCourse.description}></div>\n </div>\n )}\n {this.currentOutdoorCourse && this.currentOutdoorCourse.cities && this.currentOutdoorCourse.cities.length > 0 && (\n <div part=\"departure-container\" class=\"departure-container\">\n <div part=\"departure-title\" class=\"departure-title\">\n {translate[state.language].departure} : \n </div>\n <div part=\"departure\" innerHTML={city.name}></div>\n </div>\n )}\n {this.currentOutdoorCourse.cities && this.currentOutdoorCourse.cities.length > 0 && (\n <div part=\"cities-container\" class=\"cities-container\">\n <div part=\"cities-title\" class=\"cities-title\">\n {translate[state.language].crossedCities} : \n </div>\n <div part=\"cities\" innerHTML={this.currentOutdoorCourse.cities.map(currentCity => state.cities.find(city => city.id === currentCity)?.name).join(', ')}></div>\n </div>\n )}\n {this.currentOutdoorCourse.advice && (\n <div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"advice-container\" class=\"advice-container\">\n <div part=\"advice-title\" class=\"advice-title\" ref={el => (this.recommendationRef = el)}>\n {translate[state.language].recommendations}\n </div>\n {this.currentOutdoorCourse.advice && (\n <div part=\"current-advice-container\" class=\"current-advice-container\">\n <span part=\"icon\" class=\"icon\" innerHTML={WarningIcon}></span>\n <div part=\"advice\" class=\"advice\" innerHTML={this.currentOutdoorCourse.advice}></div>\n </div>\n )}\n </div>\n </div>\n )}\n {this.currentOutdoorCourse.accessibility && (\n <div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"accessibilities-container\" class=\"accessibilities-container\">\n <div part=\"accessibilites-title\" class=\"accessibilities-title\">\n {translate[state.language].accessibility}\n </div>\n <div part=\"accessibilities\" innerHTML={this.currentOutdoorCourse.accessibility}></div>\n </div>\n </div>\n )}\n {state.trekTouristicContents && state.trekTouristicContents.length > 0 && (\n <div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"touristic-content-container\" class=\"touristic-content-container\" ref={el => (this.touristicContentsRef = el)}>\n <div part=\"touristic-content-title\" class=\"touristic-content-title\">\n {translate[state.language].touristicContents(state.trekTouristicContents.length)}\n </div>\n <div part=\"swiper-touristic-content\" class=\"swiper swiper-touristic-content\" ref={el => (this.swiperTouristicContentsRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {state.trekTouristicContents.map(touristicContent => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <grw-touristic-content-card\n exportparts=\"touristic-content-card,touristic-content-img-container,swiper-touristic-content,swiper-wrapper,swiper-slide,touristic-content-img,default-touristic-content-img,swiper-pagination,swiper-button-prev,swiper-button-next,touristic-content-sub-container,touristic-content-category-container,touristic-content-category-img,touristic-content-category-name,touristic-content-name,touristic-content-more-detail-container,more-details-button\"\n fontFamily={this.fontFamily}\n touristicContent={touristicContent}\n isInsideHorizontalList={true}\n ></grw-touristic-content-card>\n </div>\n ))}\n </div>\n <div part=\"swiper-scrollbar\" class=\"swiper-scrollbar\" ref={el => (this.touristicContentsSwiperScrollbar = el)}></div>\n </div>\n </div>\n </div>\n )}\n {state.trekTouristicEvents && state.trekTouristicEvents.length > 0 && (\n <div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"touristic-event-container\" class=\"touristic-event-container\" ref={el => (this.touristicEventsRef = el)}>\n <div part=\"touristic-event-title\" class=\"touristic-event-title\">\n {translate[state.language].touristicEvents(state.trekTouristicEvents.length)}\n </div>\n <div part=\"swiper-touristic-event\" class=\"swiper swiper-touristic-event\" ref={el => (this.swiperTouristicEventsRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {state.trekTouristicEvents.map(touristicEvent => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <grw-touristic-event-card\n exportparts=\"touristic-event-card,touristic-event-img-container,swiper-touristic-event,swiper-wrapper,swiper-slide,touristic-event-img,default-touristic-event-img,swiper-pagination,swiper-button-prev,swiper-button-next,touristic-event-sub-container,touristic-event-sub-container,touristic-event-type-img,touristic-event-type-name,touristic-event-name,touristic-event-date-container,touristic-event-date,touristic-event-more-detail-container,more-details-button\"\n fontFamily={this.fontFamily}\n touristicEvent={touristicEvent}\n isInsideHorizontalList={true}\n ></grw-touristic-event-card>\n </div>\n ))}\n </div>\n <div part=\"swiper-scrollbar\" class=\"swiper-scrollbar\" ref={el => (this.touristicEventsSwiperScrollbar = el)}></div>\n </div>\n </div>\n </div>\n )}\n {state.currentPois && state.currentPois.length > 0 && (\n <div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"pois-container\" class=\"pois-container\" ref={el => (this.poiRef = el)}>\n <div part=\"pois-title\" class=\"pois-title\">\n {translate[state.language].pois(state.currentPois.length)}\n </div>\n <div part=\"swiper-pois\" class=\"swiper swiper-pois\" ref={el => (this.swiperPoisRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {state.currentPois.map(poi => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <grw-poi\n exportparts=\"poi-type-img-container,poi-type,swiper-poi,swiper-wrapper,swiper-slide,poi-img,default-poi-img,swiper-pagination,swiper-button-prev,swiper-button-next,poi-sub-container,poi-name,poi-description,handle-poi-description\"\n poi={poi}\n ></grw-poi>\n </div>\n ))}\n </div>\n <div part=\"swiper-scrollbar\" class=\"swiper-scrollbar\" ref={el => (this.poisSwiperScrollbar = el)}></div>\n </div>\n </div>\n </div>\n )}\n {this.weather && city && !this.offline && (\n <div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"weather-container\" class=\"weather-container\">\n <iframe height=\"150\" frameborder=\"0\" src={`https://meteofrance.com/widget/prevision/${city.id}0#${this.colorPrimaryApp}`}></iframe>\n </div>\n </div>\n )}\n {this.grwApp && <div part=\"detail-bottom-space\" class=\"detail-bottom-space\"></div>}\n </div>\n )}\n </Host>\n );\n }\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { getDataInStore, handleOfflineProperty } from 'services/grw-db.service';\nimport { getOutdoorCourse, getOutdoorCourseTypes, getPoisNearCourse } from 'services/outdoor-courses.service';\nimport { getTouristicContentCategory, getTouristicContentsNearOutdoorCourse } from 'services/touristic-contents.service';\nimport { getTouristicEventsNearOutdoorCourse, getTouristicEventType } from 'services/touristic-events.service';\nimport { getCities, getDistricts, getThemes } from 'services/treks.service';\nimport state from 'store/store';\nimport { OutdoorCourse } from 'types/types';\nimport { getCacheMode, imagesRegExp, setFilesFromStore } from 'utils/utils';\n\n@Component({\n tag: 'grw-outdoor-course-provider',\n shadow: true,\n})\nexport class GrwOutdoorCourseProvider {\n @Prop() languages = 'fr';\n @Prop() api: string;\n @Prop() outdoorCourseId: number;\n @Prop() portals: string;\n\n controller = new AbortController();\n signal = this.controller.signal;\n init: RequestInit = { cache: getCacheMode(), 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.handleOutdoorCourse();\n }\n\n async handleOutdoorCourse() {\n const outdoorCourseInStore: OutdoorCourse = await getDataInStore('outdoorCourses', this.outdoorCourseId);\n if (outdoorCourseInStore && outdoorCourseInStore.offline) {\n this.handleOfflineOutdoorCourse(outdoorCourseInStore);\n } else {\n this.handleOnlineOutdoorCourse();\n }\n }\n\n async handleOfflineOutdoorCourse(outdoorCourse: OutdoorCourse) {\n state.cities = await handleOfflineProperty('cities');\n state.districts = await handleOfflineProperty('districts');\n state.themes = await handleOfflineProperty('themes');\n state.touristicContentCategories = await handleOfflineProperty('touristicContentCategories');\n state.touristicEventTypes = await handleOfflineProperty('touristicEventTypes');\n state.poiTypes = await handleOfflineProperty('poiTypes');\n state.outdoorCourseTypes = await handleOfflineProperty('outdoorCourseTypes');\n\n const poisInStore = await handleOfflineProperty('pois', ['url']);\n const pois = poisInStore.filter(poiInStore => outdoorCourse.pois.some(outdoorCoursePoi => outdoorCoursePoi === poiInStore.id));\n state.currentPois = pois;\n\n const touristicContentsInStore = await handleOfflineProperty('touristicContents', ['url']);\n const touristicContents = touristicContentsInStore.filter(touristicContentInStore =>\n outdoorCourse.touristicContents.some(outdoorCourseTouristicContent => outdoorCourseTouristicContent === touristicContentInStore.id),\n );\n state.trekTouristicContents = touristicContents;\n\n const touristicEventsInStore = await handleOfflineProperty('touristicEvents', ['url']);\n const touristicEvents = touristicEventsInStore.filter(touristicEventInStore =>\n outdoorCourse.touristicEvents.some(outdoorCourseTouristicEvent => outdoorCourseTouristicEvent === touristicEventInStore.id),\n );\n state.trekTouristicEvents = touristicEvents;\n\n await setFilesFromStore(outdoorCourse, imagesRegExp, ['url']);\n state.currentOutdoorCourse = outdoorCourse;\n }\n\n handleOnlineOutdoorCourse() {\n const requests = [];\n requests.push(!state.districts ? getDistricts(state.api, state.language, this.init) : new Response('null'));\n requests.push(!state.themes ? getThemes(state.api, state.language, this.portals, this.init) : new Response('null'));\n requests.push(!state.outdoorCourseTypes ? getOutdoorCourseTypes(state.api, state.language, this.init) : new Response('null'));\n requests.push(getTouristicContentsNearOutdoorCourse(state.api, state.language, this.outdoorCourseId, this.init));\n requests.push(getTouristicContentCategory(state.api, state.language, null, this.init));\n requests.push(getTouristicEventsNearOutdoorCourse(state.api, state.language, this.outdoorCourseId, this.init));\n requests.push(getTouristicEventType(state.api, state.language, null, this.init));\n requests.push(getPoisNearCourse(state.api, state.language, this.outdoorCourseId, this.init));\n requests.push(fetch(`${state.api}poi_type/?language=${state.language}&fields=id,pictogram`, this.init));\n requests.push(getOutdoorCourse(state.api, state.language, this.outdoorCourseId, this.init));\n try {\n Promise.all([...requests])\n .then(responses => Promise.all(responses.map(response => response.json())))\n .then(\n async ([\n districts,\n themes,\n outdoorCourseTypes,\n touristicContent,\n touristicContentCategory,\n touristicEvent,\n touristicEventType,\n pois,\n poiTypes,\n outdoorCourse,\n ]) => {\n state.networkError = false;\n\n if (districts) {\n state.districts = districts.results;\n }\n if (themes) {\n state.themes = themes.results;\n }\n if (outdoorCourseTypes) {\n state.outdoorCourseTypes = outdoorCourseTypes.results;\n }\n if (touristicContent) {\n state.trekTouristicContents = touristicContent.results;\n }\n if (touristicContentCategory) {\n state.touristicContentCategories = touristicContentCategory.results;\n }\n if (touristicEvent) {\n state.trekTouristicEvents = touristicEvent.results;\n }\n if (touristicEventType) {\n state.touristicEventTypes = touristicEventType.results;\n }\n if (pois) {\n state.currentPois = pois.results;\n }\n if (poiTypes) {\n state.poiTypes = poiTypes.results;\n }\n\n state.currentOutdoorCourse = outdoorCourse;\n\n let citiesToLoad = [...outdoorCourse.cities];\n if (state.cities) {\n const cityIds = state.cities.map(city => city.id);\n citiesToLoad = citiesToLoad.filter(city => city && !cityIds.includes(city));\n }\n if (citiesToLoad.length > 0) {\n try {\n const cities = (await getCities(state.api, state.language, this.init, citiesToLoad).then(response => response.json())).results;\n if (cities) {\n state.cities = [...state.cities, ...cities];\n }\n } catch (e) {\n console.error('Failed to load cities', e);\n }\n }\n },\n );\n } catch (error) {\n if (!(error.code === DOMException.ABORT_ERR)) {\n state.networkError = true;\n }\n }\n }\n\n disconnectedCallback() {\n this.controller.abort();\n state.networkError = false;\n }\n\n render() {\n return <Host></Host>;\n }\n}\n","import { getDataInStore } from './grw-db.service';\nimport { getAllPaginatedResults } from '../utils/utils';\n\nexport function getOutdoorSites(api, language, inBbox, cities, districts, structures, themes, portals, init) {\n let outdoorSitesRequest = `${api}outdoor_site/?language=${language}&root_sites_only=true&published=true`;\n inBbox && (outdoorSitesRequest += `&in_bbox=${inBbox}`);\n cities && (outdoorSitesRequest += `&cities=${cities}`);\n districts && (outdoorSitesRequest += `&districts=${districts}`);\n structures && (outdoorSitesRequest += `&structures=${structures}`);\n themes && (outdoorSitesRequest += `&themes=${themes}`);\n portals && (outdoorSitesRequest += `&portals=${portals}`);\n\n outdoorSitesRequest += `&fields=id,name,geometry,accessibility,advice,ambiance,attachments,cities,children,description,description_teaser,districts,information_desks,labels,managers,orientation,pdf,period,parent,portal,practice,provider,ratings,sector,source,structure,themes,view_points,type,courses,web_links,wind`;\n return getAllPaginatedResults(outdoorSitesRequest, init);\n}\n\nexport function getOutdoorSite(api, language, outdoorSiteId, init) {\n let outdoorSitesRequest = `${api}outdoor_site/${outdoorSiteId}/?language=${language}&published=true`;\n outdoorSitesRequest += `&fields=id,name,geometry,accessibility,advice,ambiance,attachments,cities,children,description,description_teaser,districts,information_desks,labels,managers,orientation,pdf,period,parent,portal,practice,provider,ratings,sector,source,structure,themes,view_points,type,courses,web_links,wind,parents`;\n return fetch(outdoorSitesRequest, init);\n}\n\nexport function getOutdoorSiteTypes(api, language, init) {\n let outdoorSitesTypeRequest = `${api}outdoor_sitetype/?language=${language}&published=true`;\n return fetch(outdoorSitesTypeRequest, init);\n}\n\nexport function getOutdoorPractices(api, language, init) {\n let outdoorPracticesRequest = `${api}outdoor_practice/?language=${language}&published=true`;\n return fetch(outdoorPracticesRequest, init);\n}\n\nexport function getPoisNearSite(api, language, siteId, init) {\n return getAllPaginatedResults(`${api}poi/?language=${language}&sites=${siteId}&published=true&fields=id,name,description,attachments,type,geometry`, init);\n}\n\nexport async function outdoorSiteIsAvailableOffline(outdoorSiteId) {\n const outdoorSites = await getDataInStore('outdoorSites', outdoorSiteId);\n return outdoorSites && outdoorSites.offline;\n}\n\nexport function getOutdoorRatings(api: string, language: string, portals: string, init: RequestInit) {\n return getAllPaginatedResults(`${api}outdoor_rating/?language=${language}${portals ? '&portals='.concat(portals) : ''}&fields=id,name,scale`, init);\n}\n\nexport function getOutdoorRatingsScale(api: string, language: string, init: RequestInit) {\n return getAllPaginatedResults(`${api}outdoor_ratingscale/?language=${language}&fields=id,name`, init);\n}\n\n","@use '~swiper/swiper.scss';\n@use '~swiper/modules/navigation/navigation.scss';\n@use '~swiper/modules/pagination/pagination.scss';\n@use '~swiper/modules/scrollbar/scrollbar.scss';\n\n.swiper {\n z-index: 0;\n}\n\n:host {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n overflow: hidden;\n --swiper-navigation-size: 24px;\n --swiper-navigation-color: var(--color-on-primary-container);\n --swiper-pagination-color: var(--color-primary-container);\n --swiper-pagination-bullet-size: 12px;\n .swiper-button-prev,\n .swiper-button-next {\n background-color: var(--color-primary-container);\n padding: 4px;\n width: 32px;\n height: 32px;\n border-radius: var(--border-radius, 32px);\n box-shadow: var(--elevation-1);\n &:hover {\n box-shadow: var(--elevation-2);\n }\n }\n}\n\ngrw-outdoor-site-detail {\n overflow: hidden;\n}\n\n.swiper-related-outdoor-sites,\n.swiper-related-outdoor-courses {\n padding-right: 32px;\n padding-left: 32px;\n padding-bottom: 20px;\n}\n\n.related-outdoor-sites-title,\n.related-outdoor-courses-title {\n padding: 0px 24px 0px 24px;\n color: var(--color-on-surface);\n font-size: 22px;\n line-height: 28px;\n font-weight: 400;\n font-weight: bold;\n padding: 0px 24px 0px 24px;\n margin-bottom: 16px;\n}\n\n.related-outdoor-sites-container,\n.related-outdoor-courses-container {\n font-size: 16px;\n line-height: 24px;\n font-weight: 400;\n a {\n color: var(--color-primary-app);\n }\n}\n\ngrw-outdoor-site-detail {\n overflow: hidden;\n}\n\n.outdoor-site-options {\n flex-shrink: 0;\n display: flex;\n position: relative;\n width: 100%;\n min-height: 32px;\n padding: 8px 0px;\n background-color: var(--color-background);\n overflow-x: auto;\n font-family: var(--font-family);\n &::-webkit-scrollbar {\n height: 5px;\n }\n &::-webkit-scrollbar-thumb {\n background: var(--color-primary-app);\n border-radius: 8px;\n }\n .outdoor-site-option {\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: 16px;\n font-size: 22px;\n line-height: 28px;\n font-weight: 500;\n white-space: nowrap;\n text-decoration: none;\n color: var(--color-on-surface);\n transition-property: color;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 0.3s;\n &:hover {\n color: var(--color-primary-app);\n }\n @media (hover: none) {\n &:not(.selected-outdoor-site-option):hover {\n color: inherit;\n }\n }\n }\n .outdoor-site-option:last-of-type {\n margin-right: 16px;\n }\n .selected-outdoor-site-option {\n color: var(--color-primary-app);\n }\n .outdoor-site-indicator-selected-outdoor-site-option {\n position: absolute;\n bottom: 8px;\n height: 2px;\n background-image: linear-gradient(var(--color-primary-app), var(--color-primary-app));\n background-repeat: no-repeat;\n transition:\n transform 0.5s ease,\n background-size 0.5s ease 0.5s;\n margin-left: 16px;\n background-position: center;\n }\n}\n.outdoor-site-detail-container {\n font-family: var(--font-family);\n color: var(--color-on-surface);\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n .outdoor-site-name {\n color: var(--color-primary-app);\n font-size: 32px;\n line-height: 28px;\n font-weight: 600;\n padding: 0px 24px;\n margin: 16px 0px;\n }\n .outdoor-site-img {\n cursor: pointer;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n .default-outdoor-site-img {\n background-color: var(--color-primary-container);\n object-fit: contain;\n }\n .sub-container {\n padding: 24px 24px 0px 24px;\n .icons-labels-container {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex-wrap: wrap;\n gap: 16px;\n .icon-label {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n .icon {\n display: flex;\n width: 24px;\n height: 24px;\n color: var(--color-primary-app);\n margin-right: 8px;\n }\n .network {\n &:not(:last-child) {\n margin-right: 16px;\n }\n }\n }\n .practice {\n .icon {\n display: flex;\n background-color: var(--color-primary-app);\n }\n }\n .network {\n display: flex;\n align-items: center;\n }\n }\n }\n .row {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n width: 100%;\n .icon {\n margin-right: 8px;\n color: var(--color-primary-app);\n }\n }\n .downloads-container {\n padding: 0px 24px 0px 24px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .download-title {\n color: var(--color-on-surface);\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n }\n .links-container {\n display: flex;\n flex-wrap: wrap;\n a {\n margin-top: 8px;\n background-color: var(--color-primary-container);\n color: var(--color-on-primary-container);\n border-radius: var(--border-radius, 8px);\n padding: 8px 16px;\n box-shadow: var(--elevation-1);\n height: 32px;\n gap: 8px;\n box-sizing: border-box;\n text-align: start;\n vertical-align: middle;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n position: relative;\n text-decoration: none;\n font-family: var(--font-family);\n &:nth-child(2) {\n margin: 8px 12px 0px 12px;\n }\n &:hover {\n box-shadow: var(--elevation-2);\n }\n .icon {\n display: flex;\n }\n }\n }\n }\n .themes-container {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex-wrap: wrap;\n padding: 0px 24px 0px 24px;\n .theme {\n background-color: var(--color-secondary-container);\n color: var(--color-on-secondary-container);\n border-radius: var(--border-radius, 40px);\n padding: 8px 16px;\n margin: 0px 8px 8px 0px;\n box-shadow: var(--elevation-0);\n gap: 8px;\n box-sizing: border-box;\n text-align: start;\n vertical-align: middle;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n position: relative;\n }\n }\n .ambiance,\n .description-teaser,\n .description-container,\n .altimetric-profile-container,\n .access-container,\n .public-transport-container,\n .advice-container,\n .advised-parking-container,\n .sensitive-areas-container,\n .source-container,\n .accessibilities-container,\n .parent-outdoor-site-container,\n .weather-container,\n .weblinks-container {\n padding: 0px 24px 0px 24px;\n }\n .ambiance,\n .description-teaser,\n .description-container,\n .altimetric-profile-container,\n .access-container,\n .public-transport-container,\n .advice-container,\n .advised-parking-container,\n .sensitive-areas-container,\n .information-desks-container,\n .pois-container,\n .source-container,\n .accessibilities-container,\n .weather-container,\n .parent-outdoor-site-container,\n .step-container,\n .touristic-content-container,\n .touristic-event-container,\n .weblinks-container {\n font-size: 16px;\n line-height: 24px;\n font-weight: 400;\n a {\n color: var(--color-primary-app);\n }\n }\n .description-teaser {\n font-weight: 600;\n font-size: 22px;\n margin-bottom: 8px;\n }\n .description-title,\n .altimetric-profile-title,\n .access-title,\n .public-transport-title,\n .advice-title,\n .advised-parking-title,\n .sensitive-areas-title,\n .information-desks-title,\n .pois-title,\n .source-title,\n .accessibilities-title,\n .step-title,\n .parent-outdoor-site-title,\n .touristic-content-title,\n .touristic-event-title,\n .weblinks-title {\n color: var(--color-on-surface);\n font-size: 22px;\n line-height: 28px;\n font-weight: 400;\n font-weight: bold;\n }\n\n .access {\n margin-bottom: 16px;\n }\n\n .advised-parking-title {\n font-size: 16px;\n }\n\n .description-title,\n .altimetric-profile-title,\n .access-title,\n .public-transport-title,\n .advice-title,\n .advised-parking-title,\n .sensitive-areas-title,\n .information-desks-title,\n .pois-title,\n .source-title,\n .accessibilities-title,\n .parent-outdoor-site-title,\n .touristic-content-title,\n .touristic-event-title,\n .weblinks-title {\n margin-bottom: 16px;\n }\n\n .step-title {\n margin-bottom: 12px;\n }\n\n .information-desks-title,\n .pois-title,\n .step-title,\n .touristic-content-title,\n .touristic-event-title {\n padding: 0px 24px 0px 24px;\n }\n\n .parent-outdoor-site-title {\n cursor: pointer;\n user-select: none;\n font-weight: 500;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n box-shadow: var(--elevation-0);\n border: none;\n -webkit-tap-highlight-color: transparent;\n line-height: 20px;\n color: var(--color-primary);\n background-color: transparent;\n div {\n margin-right: 4px;\n }\n }\n\n .accessibility-emergency-number-content {\n a {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: row;\n border-radius: var(--border-radius, 40px);\n background-color: var(--color-primary-container);\n color: var(--color-on-primary-container);\n text-decoration: none;\n font-weight: 600;\n width: fit-content;\n padding: 8px 16px;\n box-shadow: var(--elevation-1);\n height: 32px;\n gap: 8px;\n box-sizing: border-box;\n text-align: start;\n vertical-align: middle;\n position: relative;\n font-family: var(--font-family);\n &:hover {\n box-shadow: var(--elevation-2);\n }\n }\n }\n}\n\n.description-container {\n .description {\n ol {\n position: relative;\n counter-reset: referencePoint;\n &:before {\n content: '';\n position: absolute;\n width: 4px;\n top: 0px;\n bottom: 0px;\n left: 14px;\n background-color: var(--color-primary-app);\n }\n li {\n position: relative;\n list-style-type: none;\n counter-increment: referencePoint;\n p {\n margin: 0;\n }\n &:not(:first-child) {\n margin-top: 12px;\n }\n }\n li:before {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n content: counter(referencePoint);\n width: 24px;\n height: 24px;\n background: #f04141;\n border-radius: 12px;\n font-weight: bold;\n font-size: 0.8em;\n color: white;\n margin-left: -36px;\n top: calc(50% - 12px);\n }\n }\n }\n}\n\n.current-advice-container,\n.gear-container {\n display: flex;\n padding: 12px;\n border: 2px solid var(--color-outline);\n border-radius: var(--border-radius, 12px);\n font-size: 16px;\n .icon img {\n width: 26px;\n margin-right: 8px;\n }\n margin-bottom: 12px;\n}\n\n.label-container {\n padding: 12px;\n border: 2px solid var(--color-outline);\n border-radius: var(--border-radius, 12px);\n margin-bottom: 12px;\n .label-sub-container {\n display: flex;\n align-items: center;\n img {\n width: 26px;\n margin-right: 16px;\n background-color: var(--color-on-surface);\n }\n .label-name {\n color: var(--color-on-surface);\n font-size: 16px;\n line-height: 24px;\n font-weight: 600;\n padding: 12px 0px;\n }\n }\n .label-advice {\n color: var(--color-on-surface);\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n }\n}\n\n.advice-container {\n div:last-child {\n margin-bottom: 0px;\n }\n}\n\n.weblinks-container {\n .weblink-container {\n display: flex;\n align-items: center;\n width: fit-content;\n font-size: 16px;\n line-height: 20px;\n font-weight: 500;\n padding: 12px 0px;\n img {\n width: 26px;\n margin-right: 16px;\n }\n }\n}\n\n.departure-container,\n.arrival-container,\n.cities-container {\n display: flex;\n align-items: center;\n padding: 0px 24px 24px 24px;\n .departure-title,\n .arrival-title,\n .cities-title {\n color: var(--color-on-surface);\n font-weight: bold;\n white-space: nowrap;\n margin-right: 8px;\n }\n}\n.accessibilities-container {\n div:nth-child(2) {\n div:first-child {\n padding: 0px 0px 12px 0px;\n }\n }\n .accessibilities-content-container {\n padding: 12px 0px 0px 0px;\n display: flex;\n .accessibility-content-container {\n display: flex;\n align-items: center;\n margin: 0px 8px 8px 0px;\n img {\n margin-right: 16px;\n width: 26px;\n }\n }\n }\n .accessibility-level-title,\n .accessibility-slope-title,\n .accessibility-width-title,\n .accessibility-signage-title,\n .accessibility-covering-title,\n .accessibility-exposure-title,\n .accessibility-advice-title,\n .accessibility-emergency-number-title {\n color: var(--color-on-surface);\n font-size: 22px;\n line-height: 28px;\n font-weight: 400;\n padding: 12px 0px;\n }\n}\n\n.weather-container {\n iframe {\n width: 100%;\n }\n}\n\n.swiper-information-desks,\n.swiper-pois,\n.swiper-step,\n.swiper-touristic-content,\n.swiper-touristic-event {\n padding-right: 32px;\n padding-left: 32px;\n padding-bottom: 20px;\n}\n\n.swiper-step {\n padding-bottom: 4px;\n .swiper-wrapper {\n .swiper-slide {\n counter-increment: stepPoint;\n padding-top: 36px;\n }\n .swiper-slide:first-child:before {\n border-top-left-radius: var(--border-radius, 8px);\n border-bottom-left-radius: var(--border-radius, 8px);\n }\n .swiper-slide:before {\n content: '';\n position: absolute;\n top: 6px;\n height: 12px;\n width: calc(100% + 20px);\n background-color: var(--color-secondary-container);\n }\n .swiper-slide:last-child:before {\n border-top-right-radius: 8px;\n border-bottom-right-radius: 8px;\n width: 100%;\n }\n .swiper-slide:after {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n content: counter(stepPoint);\n width: 24px;\n height: 24px;\n background: var(--color-primary-app);\n border-radius: var(--border-radius, 12px);\n font-weight: bold;\n font-size: 0.8em;\n color: white;\n margin-left: calc(50% - 12px);\n top: 0px;\n }\n }\n}\n\n.divider {\n margin: 16px;\n border-top: 1px solid var(--color-outline);\n}\n\n.detail-bottom-space {\n min-height: var(--detail-bottom-space-height);\n height: var(--detail-bottom-space-height);\n width: 100%;\n background-color: var(--color-background);\n}\n\n.outdoor-site-images-container {\n display: flex;\n max-width: 100%;\n max-height: 400px;\n}\n\n.descent .icon {\n display: flex;\n transform: rotateX(180deg);\n}\n\n.swiper-horizontal > .swiper-scrollbar,\n.swiper-scrollbar.swiper-scrollbar-horizontal {\n --swiper-scrollbar-sides-offset: 32px;\n}\n\n.swiper-scrollbar-drag {\n background-color: var(--color-primary-app);\n}\n\n.sensitive-areas-description {\n font-size: 16px;\n}\n\n.step-container {\n .swiper-wrapper {\n padding-bottom: 16px;\n }\n}\n\n.outdoor-site-image-legend {\n position: absolute;\n top: 16px;\n font-size: 12px;\n color: #ffffff;\n width: 100%;\n text-align: center;\n}\n\n.outdoor-site-close-fullscreen-button {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n z-index: 40;\n top: 16px;\n right: 16px;\n color: var(--swiper-navigation-color, var(--swiper-theme-color));\n background-color: var(--color-primary-container);\n padding: 4px;\n width: 32px;\n height: 32px;\n border-radius: var(--border-radius, 32px);\n box-shadow: var(--elevation-1);\n cursor: pointer;\n}\n\n.practice {\n .icon {\n display: flex;\n border-radius: 100%;\n padding: 2px;\n max-height: 20px;\n max-width: 20px;\n }\n}\n\n.offline-button {\n cursor: pointer;\n font-size: 14px;\n border: none;\n background-color: var(--color-primary-container);\n color: var(--color-on-primary-container);\n border-radius: var(--border-radius, 8px);\n padding: 8px 16px;\n box-shadow: var(--elevation-1);\n height: 32px;\n gap: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n &:hover {\n box-shadow: var(--elevation-2);\n }\n .icon {\n display: flex;\n }\n}\n\n.departure-container {\n padding-top: 24px;\n}\n\n.advice-container {\n .icon {\n margin-right: 8px;\n }\n}\n\n.source-container {\n .source-sub-container {\n display: flex;\n align-items: center;\n img {\n width: 100px;\n margin-right: 16px;\n }\n .source-name {\n color: var(--color-on-surface);\n font-size: 16px;\n line-height: 20px;\n font-weight: 500;\n padding: 12px 0px;\n }\n }\n}\n","import { Build, Component, Host, Prop, State, getAssetPath, h, Event, EventEmitter, Listen, Fragment } from '@stencil/core';\nimport { OutdoorSite } from 'components';\nimport state, { onChange } from 'store/store';\nimport Swiper, { Navigation, Pagination, Keyboard, FreeMode, Mousewheel, Scrollbar } from 'swiper';\nimport CloseIcon from '../../assets/close.svg';\nimport { translate } from 'i18n/i18n';\nimport DownloadIcon from '../../assets/download.svg';\nimport EventIcon from '../../assets/event.svg';\nimport WarningIcon from '../../assets/warning.svg';\nimport AirIcon from '../../assets/air.svg';\nimport ExploreIcon from '../../assets/explore.svg';\nimport DownloadForOfflineIcon from '../../assets/download_for_offline.svg';\nimport DeleteIcon from '../../assets/delete.svg';\nimport { getAllDataInStore, getDataInStore, writeOrUpdateDataInStore, writeOrUpdateFilesInStore, writeOrUpdateTilesInStore } from 'services/grw-db.service';\nimport { getCacheMode, imagesRegExp } from 'utils/utils';\nimport { getOutdoorSite, getOutdoorSites, getPoisNearSite } from 'services/outdoor-sites.service';\nimport { tileLayerOffline } from 'leaflet.offline';\nimport L from 'leaflet';\nimport bbox from '@turf/bbox';\nimport pointOnFeature from '@turf/point-on-feature';\nimport { OutdoorSites, Sources } from 'types/types';\nimport { getTouristicContentsNearOutdoorCourse, getTouristicContentsNearOutdoorSite } from 'services/touristic-contents.service';\nimport { getTouristicEventsNearOutdoorCourse, getTouristicEventsNearOutdoorSite } from 'services/touristic-events.service';\nimport { getOutdoorCourse, getPoisNearCourse } from 'services/outdoor-courses.service';\n\nconst observerOptions = { threshold: 0 };\n\n@Component({\n tag: 'grw-outdoor-site-detail',\n styleUrl: 'grw-outdoor-site-detail.scss',\n shadow: true,\n})\nexport class GrwOutdoorSiteDetail {\n @Prop() fontFamily = 'Roboto';\n @Prop() colorPrimaryApp = '#6b0030';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorPrimaryContainer = '#eaddff';\n @Prop() colorOnPrimaryContainer = '#21005e';\n @Prop() colorSecondaryContainer = '#e8def8';\n @Prop() colorOnSecondaryContainer = '#1d192b';\n @Prop() colorSurfaceContainerLow = '#f7f2fa';\n @Prop() colorBackground = '#fef7ff';\n @Prop() isLargeView = false;\n @Prop() weather = false;\n @Prop() enableOffline = false;\n @Prop() defaultBackgroundLayerUrl;\n @Prop() defaultBackgroundLayerAttribution;\n @Prop() globalTilesMinZoomOffline = 0;\n @Prop() globalTilesMaxZoomOffline = 11;\n @Prop() tilesMinZoomOffline = 12;\n @Prop() tilesMaxZoomOffline = 16;\n @Prop() grwApp = false;\n @Prop() rounded = true;\n\n @State() offline = false;\n @State() displayFullscreen = false;\n @State() currentOutdoorSite: OutdoorSite;\n @State() sources: Sources;\n\n @Event() informationPlacesIsInViewport: EventEmitter<boolean>;\n @Event() poiIsInViewport: EventEmitter<boolean>;\n @Event() touristicContentsIsInViewport: EventEmitter<boolean>;\n @Event() touristicEventsIsInViewport: EventEmitter<boolean>;\n @Event() sitesIsInViewport: EventEmitter<boolean>;\n @Event() coursesIsInViewport: EventEmitter<boolean>;\n\n outdoorSiteDetailContainerRef?: HTMLElement;\n swiperImagesRef?: HTMLDivElement;\n prevElImagesRef?: HTMLDivElement;\n nextElImagesRef?: HTMLDivElement;\n paginationElImagesRef?: HTMLDivElement;\n swiperImages?: Swiper;\n\n relatedOutdoorSitesRef: HTMLDivElement;\n swiperRelatedOutdoorSitesRef: HTMLDivElement;\n swiperRelatedOutdoorSites: Swiper;\n relatedOutdoorSitesSwiperScrollbar: HTMLDivElement;\n\n relatedOutdoorCoursesRef: HTMLDivElement;\n swiperRelatedOutdoorCoursesRef: HTMLDivElement;\n swiperRelatedOutdoorCourses: Swiper;\n relatedOutdoorCoursesSwiperScrollbar: HTMLDivElement;\n\n informationPlacesRef: HTMLDivElement;\n swiperInformationDesksRef: HTMLDivElement;\n swiperInformationDesks: Swiper;\n informationDesksContentsSwiperScrollbar: HTMLDivElement;\n\n swiperTouristicContents?: Swiper;\n swiperTouristicEvents?: Swiper;\n swiperTouristicContentsRef?: HTMLDivElement;\n swiperTouristicEventsRef?: HTMLDivElement;\n touristicContentsRef?: HTMLDivElement;\n touristicEventsRef?: HTMLDivElement;\n sitesRef?: HTMLDivElement;\n coursesRef?: HTMLDivElement;\n\n touristicContentsSwiperScrollbar?: HTMLDivElement;\n touristicEventsSwiperScrollbar?: HTMLDivElement;\n swiperPois?: Swiper;\n swiperPoisRef?: HTMLDivElement;\n poiRef?: HTMLDivElement;\n poisOptionRef?: HTMLAnchorElement;\n poisSwiperScrollbar?: HTMLDivElement;\n\n presentationRef?: HTMLDivElement;\n descriptionRef?: HTMLDivElement;\n recommendationRef?: HTMLDivElement;\n\n informationPlacesObserver: IntersectionObserver;\n poiObserver: IntersectionObserver;\n touristicContentObserver: IntersectionObserver;\n touristicEventObserver: IntersectionObserver;\n siteObserver: IntersectionObserver;\n courseObserver: IntersectionObserver;\n\n @Event() downloadConfirm: EventEmitter<number>;\n @Event() downloadedSuccessConfirm: EventEmitter<number>;\n @Event() downloadedErrorConfirm: EventEmitter<number>;\n\n @Event() deleteConfirm: EventEmitter<number>;\n @Event() deleteSuccessConfirm: EventEmitter<number>;\n @Event() deleteErrorConfirm: EventEmitter<number>;\n\n @State() showTouristicContentDetailsModal = false;\n @State() showTouristicEventDetailsModal = false;\n @State() modalDetailsId = null;\n\n @Listen('closeDetailsModal', { target: 'window' })\n onCloseDetailsModal() {\n document.body.style.overflow = `visible`;\n state.currentTouristicContent = null;\n state.currentTouristicEvent = null;\n this.modalDetailsId = null;\n if (this.showTouristicContentDetailsModal) {\n this.showTouristicContentDetailsModal = false;\n } else {\n this.showTouristicEventDetailsModal = false;\n }\n document.body.getElementsByTagName('grw-details-modal')[0].remove();\n }\n\n @Listen('touristicEventCardPress', { target: 'window' })\n onTouristiceEventCardPress(touristicEventId) {\n if (!this.grwApp) {\n this.modalDetailsId = touristicEventId.detail;\n this.onOpenDetailsModal('TouristicContent');\n const modal = document.createElement('grw-details-modal');\n modal.setAttribute('font-family', this.fontFamily);\n modal.setAttribute('color-background', this.colorBackground);\n modal.setAttribute('color-primary-container', this.colorPrimaryContainer);\n modal.setAttribute('color-on-primary-container', this.colorOnPrimaryContainer);\n modal.setAttribute('rounded', this.rounded.toString());\n const modalContent = document.createElement('grw-touristic-event-detail');\n modalContent.setAttribute('font-family', this.fontFamily);\n modalContent.setAttribute('color-primary-app', this.colorPrimaryApp);\n modalContent.setAttribute('color-on-surface', this.colorOnSurface);\n modalContent.setAttribute('color-primary-container', this.colorPrimaryContainer);\n modalContent.setAttribute('color-on-primary-container', this.colorOnPrimaryContainer);\n modalContent.setAttribute('color-secondary-container', this.colorSecondaryContainer);\n modalContent.setAttribute('color-on-secondary-container', this.colorOnSecondaryContainer);\n modalContent.setAttribute('color-surface-container-low', this.colorSurfaceContainerLow);\n modalContent.setAttribute('color-background', this.colorBackground);\n modal.append(modalContent);\n document.body.append(modal);\n }\n }\n\n @Listen('touristicContentCardPress', { target: 'window' })\n onTouristicContentCardPress(touristicContentId) {\n if (!this.grwApp) {\n this.modalDetailsId = touristicContentId.detail;\n this.onOpenDetailsModal('touristicContent');\n const modal = document.createElement('grw-details-modal');\n modal.setAttribute('font-family', this.fontFamily);\n modal.setAttribute('color-background', this.colorBackground);\n modal.setAttribute('color-primary-container', this.colorPrimaryContainer);\n modal.setAttribute('color-on-primary-container', this.colorOnPrimaryContainer);\n modal.setAttribute('rounded', this.rounded.toString());\n const modalContent = document.createElement('grw-touristic-content-detail');\n modalContent.setAttribute('font-family', this.fontFamily);\n modalContent.setAttribute('color-primary-app', this.colorPrimaryApp);\n modalContent.setAttribute('color-on-surface', this.colorOnSurface);\n modalContent.setAttribute('color-primary-container', this.colorPrimaryContainer);\n modalContent.setAttribute('color-on-primary-container', this.colorOnPrimaryContainer);\n modalContent.setAttribute('color-secondary-container', this.colorSecondaryContainer);\n modalContent.setAttribute('color-on-secondary-container', this.colorOnSecondaryContainer);\n modalContent.setAttribute('color-surface-container-low', this.colorSurfaceContainerLow);\n modalContent.setAttribute('color-background', this.colorBackground);\n modal.append(modalContent);\n document.body.append(modal);\n }\n }\n\n onOpenDetailsModal(modalDetails: 'touristicContent' | 'TouristicContent') {\n document.body.style.overflow = `hidden`;\n if (modalDetails === 'touristicContent') {\n this.showTouristicContentDetailsModal = true;\n } else {\n this.showTouristicEventDetailsModal = true;\n }\n }\n\n @Listen('downloadPress', { target: 'window' })\n onDownloadPress() {\n this.downloadRootOutdoorSite();\n }\n\n @Listen('deletePress', { target: 'window' })\n onDeletePress() {\n this.deleteOutdoorSite();\n }\n\n handleObservers() {\n if (this.informationPlacesRef && !this.informationPlacesObserver) {\n this.informationPlacesObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.informationPlacesIsInViewport.emit(isIntersecting);\n },\n observerOptions,\n );\n this.informationPlacesObserver.observe(this.informationPlacesRef);\n }\n\n if (this.poiRef && !this.poiObserver) {\n this.poiObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.poiIsInViewport.emit(isIntersecting);\n },\n observerOptions,\n );\n this.poiObserver.observe(this.poiRef);\n }\n\n if (this.touristicContentsRef && !this.touristicContentObserver) {\n this.touristicContentObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.touristicContentsIsInViewport.emit(isIntersecting);\n },\n observerOptions,\n );\n this.touristicContentObserver.observe(this.touristicContentsRef);\n }\n if (this.touristicEventsRef && !this.touristicEventObserver) {\n this.touristicEventObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.touristicEventsIsInViewport.emit(isIntersecting);\n },\n observerOptions,\n );\n this.touristicEventObserver.observe(this.touristicEventsRef);\n }\n if (this.sitesRef && !this.siteObserver) {\n this.siteObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.sitesIsInViewport.emit(isIntersecting);\n },\n observerOptions,\n );\n this.siteObserver.observe(this.sitesRef);\n }\n if (this.coursesRef && !this.courseObserver) {\n this.courseObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.coursesIsInViewport.emit(isIntersecting);\n },\n observerOptions,\n );\n this.courseObserver.observe(this.coursesRef);\n }\n }\n\n handleSwipers() {\n if (this.swiperImagesRef && !this.swiperImages) {\n this.swiperImages = new Swiper(this.swiperImagesRef, {\n modules: [Navigation, Pagination, Keyboard, FreeMode, Mousewheel],\n navigation: {\n prevEl: this.prevElImagesRef,\n nextEl: this.nextElImagesRef,\n },\n pagination: { el: this.paginationElImagesRef },\n allowTouchMove: false,\n keyboard: false,\n loop: true,\n });\n this.swiperImagesRef.onfullscreenchange = () => {\n this.displayFullscreen = !this.displayFullscreen;\n this.displayFullscreen ? this.swiperImages.keyboard.enable() : this.swiperImages.keyboard.disable();\n };\n }\n if (this.swiperRelatedOutdoorSitesRef && !this.swiperRelatedOutdoorSites) {\n this.swiperRelatedOutdoorSites = new Swiper(this.swiperRelatedOutdoorSitesRef, {\n modules: [FreeMode, Mousewheel, Scrollbar],\n slidesPerView: 1.5,\n spaceBetween: 20,\n grabCursor: true,\n freeMode: true,\n mousewheel: { forceToAxis: true },\n scrollbar: {\n draggable: true,\n hide: false,\n el: this.relatedOutdoorSitesSwiperScrollbar,\n },\n breakpointsBase: 'container',\n breakpoints: {\n '540': {\n slidesPerView: 2.5,\n },\n '1024': {\n slidesPerView: 4,\n },\n },\n loop: false,\n });\n }\n if (this.swiperInformationDesksRef && !this.swiperInformationDesks) {\n this.swiperInformationDesks = new Swiper(this.swiperInformationDesksRef, {\n modules: [FreeMode, Mousewheel, Scrollbar],\n slidesPerView: 1.5,\n spaceBetween: 20,\n grabCursor: true,\n freeMode: true,\n mousewheel: { forceToAxis: true },\n scrollbar: {\n draggable: true,\n hide: false,\n el: this.informationDesksContentsSwiperScrollbar,\n },\n breakpointsBase: 'container',\n breakpoints: {\n '540': {\n slidesPerView: 2.5,\n },\n '1024': {\n slidesPerView: 4,\n },\n },\n loop: false,\n });\n }\n if (this.swiperRelatedOutdoorCoursesRef && !this.swiperRelatedOutdoorCourses) {\n this.swiperRelatedOutdoorCourses = new Swiper(this.swiperRelatedOutdoorCoursesRef, {\n modules: [FreeMode, Mousewheel, Scrollbar],\n slidesPerView: 1.5,\n spaceBetween: 20,\n grabCursor: true,\n freeMode: true,\n mousewheel: { forceToAxis: true },\n scrollbar: {\n draggable: true,\n hide: false,\n el: this.relatedOutdoorCoursesSwiperScrollbar,\n },\n breakpointsBase: 'container',\n breakpoints: {\n '540': {\n slidesPerView: 2.5,\n },\n '1024': {\n slidesPerView: 4,\n },\n },\n loop: false,\n });\n }\n if (this.swiperTouristicContentsRef && !this.swiperTouristicContents) {\n this.swiperTouristicContents = new Swiper(this.swiperTouristicContentsRef, {\n modules: [FreeMode, Mousewheel, Scrollbar],\n slidesPerView: 1.5,\n spaceBetween: 20,\n grabCursor: true,\n freeMode: true,\n mousewheel: { forceToAxis: true },\n scrollbar: {\n draggable: true,\n hide: false,\n el: this.touristicContentsSwiperScrollbar,\n },\n breakpointsBase: 'container',\n breakpoints: {\n '540': {\n slidesPerView: 2.5,\n },\n '1024': {\n slidesPerView: 4,\n },\n },\n loop: false,\n });\n }\n if (this.swiperTouristicEventsRef && !this.swiperTouristicEvents) {\n this.swiperTouristicEvents = new Swiper(this.swiperTouristicEventsRef, {\n modules: [FreeMode, Mousewheel, Scrollbar],\n slidesPerView: 1.5,\n spaceBetween: 20,\n grabCursor: true,\n freeMode: true,\n mousewheel: { forceToAxis: true },\n scrollbar: {\n draggable: true,\n hide: false,\n el: this.touristicEventsSwiperScrollbar,\n },\n breakpointsBase: 'container',\n breakpoints: {\n '540': {\n slidesPerView: 2.5,\n },\n '1024': {\n slidesPerView: 4,\n },\n },\n loop: false,\n });\n }\n if (this.swiperPoisRef && !this.swiperPois) {\n this.swiperPois = new Swiper(this.swiperPoisRef, {\n modules: [FreeMode, Mousewheel, Scrollbar],\n slidesPerView: 1.5,\n spaceBetween: 20,\n grabCursor: true,\n freeMode: true,\n mousewheel: { forceToAxis: true },\n scrollbar: {\n draggable: true,\n hide: false,\n el: this.poisSwiperScrollbar,\n },\n breakpointsBase: 'container',\n breakpoints: {\n '540': {\n slidesPerView: 2.5,\n },\n '1024': {\n slidesPerView: 4,\n },\n },\n loop: false,\n });\n }\n }\n\n componentDidUpdate() {\n this.handleObservers();\n this.handleSwipers();\n }\n\n componentDidLoad() {\n this.handleObservers();\n this.handleSwipers();\n }\n\n async connectedCallback() {\n if (state.currentOutdoorSite) {\n this.sources = state.sources.filter(source => state.currentOutdoorSite.source.includes(source.id));\n this.currentOutdoorSite = state.currentOutdoorSite;\n this.offline = this.currentOutdoorSite.offline;\n }\n\n onChange('currentOutdoorSite', async () => {\n if (state.currentOutdoorSite) {\n this.sources = state.sources.filter(source => state.currentOutdoorSite.source.includes(source.id));\n this.currentOutdoorSite = state.currentOutdoorSite;\n this.offline = this.currentOutdoorSite.offline;\n }\n });\n }\n\n handleFullscreen(close: boolean = false) {\n if (!close) {\n if (this.currentOutdoorSite.attachments && this.currentOutdoorSite.attachments[0] && this.currentOutdoorSite.attachments[0].url) {\n this.swiperImagesRef.requestFullscreen();\n }\n } else {\n (document as any).exitFullscreen();\n }\n }\n\n displayDownloadModal() {\n this.downloadConfirm.emit();\n }\n\n displayDeleteModal() {\n this.deleteConfirm.emit();\n }\n\n async downloadRootOutdoorSite() {\n const controller = new AbortController();\n const signal = controller.signal;\n const init: RequestInit = { cache: getCacheMode(), signal: signal };\n\n if (!state.outdoorSites) {\n const outdoorSitesList = await getOutdoorSites(\n state.api,\n state.language,\n state.inBboxFromProviders,\n state.citiesFromProviders,\n state.districtsFromProviders,\n state.structuresFromProviders,\n state.themesFromProviders,\n state.portalsFromProviders,\n init,\n );\n state.outdoorSites = (await outdoorSitesList.json()).results;\n state.currentOutdoorSites = state.outdoorSites;\n }\n\n const offlineOutdoorSites = (await getAllDataInStore('outdoorSites')).filter(outdoorSite => outdoorSite.offline === true);\n let outdoorSites;\n outdoorSites = state.outdoorSites;\n outdoorSites = outdoorSites.filter(outdoorSite => offlineOutdoorSites.findIndex(offlineOutdoorSites => offlineOutdoorSites.id === outdoorSite.id) === -1);\n await writeOrUpdateDataInStore('outdoorSites', outdoorSites);\n\n await this.downloadGlobalTiles(this.defaultBackgroundLayerUrl, this.defaultBackgroundLayerAttribution);\n await this.downloadOutdoorSiteTiles(this.defaultBackgroundLayerUrl, this.defaultBackgroundLayerAttribution, this.currentOutdoorSite.geometry);\n\n await writeOrUpdateFilesInStore(state.themes, imagesRegExp);\n await writeOrUpdateFilesInStore(state.outdoorSiteTypes, imagesRegExp);\n await writeOrUpdateFilesInStore(state.outdoorPractices, imagesRegExp);\n await writeOrUpdateFilesInStore(state.sources, imagesRegExp);\n\n await writeOrUpdateFilesInStore(this.currentOutdoorSite, imagesRegExp, true, ['url']);\n\n await writeOrUpdateDataInStore('cities', state.cities);\n await writeOrUpdateDataInStore('districts', state.districts);\n await writeOrUpdateDataInStore('themes', state.themes);\n await writeOrUpdateDataInStore('outdoorSiteTypes', state.outdoorSiteTypes);\n await writeOrUpdateDataInStore('outdoorPractices', state.outdoorPractices);\n await writeOrUpdateDataInStore('outdoorRatings', state.outdoorRatings);\n await writeOrUpdateDataInStore('outdoorRatingsScale', state.outdoorRatingsScale);\n await writeOrUpdateDataInStore('pois', state.currentPois);\n await writeOrUpdateDataInStore('poiTypes', state.poiTypes);\n await writeOrUpdateDataInStore('informationDesks', state.currentInformationDesks);\n await writeOrUpdateDataInStore('outdoorCourseTypes', state.outdoorCourseTypes);\n await writeOrUpdateDataInStore('touristicEventTypes', state.touristicEventTypes);\n await writeOrUpdateDataInStore('touristicContentCategories', state.touristicContentCategories);\n await writeOrUpdateDataInStore('sources', state.sources);\n\n await writeOrUpdateFilesInStore(state.currentPois, imagesRegExp, true, ['url']);\n await writeOrUpdateFilesInStore(state.currentInformationDesks, imagesRegExp, true);\n await writeOrUpdateFilesInStore(state.outdoorCourseTypes, imagesRegExp, true);\n await writeOrUpdateFilesInStore(state.touristicContentCategories, imagesRegExp, true);\n\n await writeOrUpdateFilesInStore(state.trekTouristicContents, imagesRegExp, true, ['url']);\n state.trekTouristicContents.forEach(trekTouristicContent => {\n trekTouristicContent.offline = true;\n });\n await writeOrUpdateDataInStore('touristicContents', state.trekTouristicContents);\n\n await writeOrUpdateFilesInStore(state.trekTouristicEvents, imagesRegExp, true, ['url']);\n state.trekTouristicEvents.forEach(trekTouristicEvent => {\n trekTouristicEvent.offline = true;\n });\n await writeOrUpdateDataInStore('touristicEvents', state.trekTouristicEvents);\n\n if (state.currentOutdoorSite.courses && state.currentOutdoorSite.courses.length > 0) {\n for (let index = 0; index < state.currentOutdoorSite.courses.length; index++) {\n const outdoorCourseId = state.currentOutdoorSite.courses[index];\n await this.downloadOutdoorCourse(outdoorCourseId);\n }\n }\n\n if (this.currentOutdoorSite.children && this.currentOutdoorSite.children.length > 0) {\n for (let index = 0; index < this.currentOutdoorSite.children.length; index++) {\n const outdoorSiteId = this.currentOutdoorSite.children[index];\n await this.downloadOutdoorSite(outdoorSiteId);\n }\n }\n\n await writeOrUpdateDataInStore('outdoorSites', [\n {\n ...this.currentOutdoorSite,\n offline: true,\n pois: state.currentPois.map(poi => poi.id),\n touristicContents: state.trekTouristicContents.map(trekTouristicContent => trekTouristicContent.id),\n touristicEvents: state.trekTouristicEvents.map(trekTouristicEvent => trekTouristicEvent.id),\n },\n ]);\n\n state.outdoorSites.find(outdoorSite => outdoorSite.id === this.currentOutdoorSite.id).offline = true;\n state.currentOutdoorSites.find(currentOutdoorSite => currentOutdoorSite.id === this.currentOutdoorSite.id).offline = true;\n if (this.swiperImages) {\n this.swiperImages.slideTo(0);\n }\n this.offline = true;\n this.downloadedSuccessConfirm.emit();\n }\n\n async downloadOutdoorSite(outdoorSiteId) {\n try {\n const controller = new AbortController();\n const signal = controller.signal;\n const init: RequestInit = { cache: getCacheMode(), signal: signal };\n\n const outdoorSite: OutdoorSite = await getOutdoorSite(state.api, state.language, outdoorSiteId, init).then(response => response.json());\n await this.downloadOutdoorSiteTiles(this.defaultBackgroundLayerUrl, this.defaultBackgroundLayerAttribution, outdoorSite.geometry);\n await writeOrUpdateFilesInStore(outdoorSite, imagesRegExp, true, ['url']);\n\n const pois = (await getPoisNearSite(state.api, state.language, outdoorSiteId, init).then(response => response.json())).results;\n await writeOrUpdateDataInStore('pois', pois);\n await writeOrUpdateFilesInStore(pois, imagesRegExp, true, ['url']);\n\n const touristicContents = (await getTouristicContentsNearOutdoorSite(state.api, state.language, outdoorSiteId, init).then(response => response.json())).results;\n await writeOrUpdateFilesInStore(touristicContents, imagesRegExp, true, ['url']);\n touristicContents.forEach(touristicContent => {\n touristicContent.offline = true;\n });\n await writeOrUpdateDataInStore('touristicContents', touristicContents);\n const touristicEvents = (await getTouristicEventsNearOutdoorSite(state.api, state.language, outdoorSiteId, init).then(response => response.json())).results;\n await writeOrUpdateFilesInStore(touristicEvents, imagesRegExp, true, ['url']);\n touristicEvents.forEach(touristicEvent => {\n touristicEvent.offline = true;\n });\n await writeOrUpdateDataInStore('touristicEvents', touristicEvents);\n\n await writeOrUpdateDataInStore('outdoorSites', [\n {\n ...outdoorSite,\n offline: true,\n pois: pois.map(poi => poi.id),\n touristicContents: touristicContents.map(trekTouristicContent => trekTouristicContent.id),\n touristicEvents: touristicEvents.map(trekTouristicEvent => trekTouristicEvent.id),\n },\n ]);\n\n if (outdoorSite.courses && outdoorSite.courses.length > 0) {\n for (let index = 0; index < outdoorSite.courses.length; index++) {\n const outdoorCourseId = outdoorSite.courses[index];\n await this.downloadOutdoorCourse(outdoorCourseId);\n }\n }\n\n if (outdoorSite.children && outdoorSite.children.length > 0) {\n for (let index = 0; index < outdoorSite.children.length; index++) {\n const outdoorSiteId = outdoorSite.children[index];\n await this.downloadOutdoorSite(outdoorSiteId);\n }\n }\n } catch (error) {\n this.downloadedSuccessConfirm.emit(this.currentOutdoorSite.id);\n }\n }\n\n async downloadOutdoorCourse(outdoorCourseId) {\n const controller = new AbortController();\n const signal = controller.signal;\n const init: RequestInit = { cache: getCacheMode(), signal: signal };\n const outdoorCourse = await getOutdoorCourse(state.api, state.language, outdoorCourseId, init).then(response => response.json());\n await this.downloadOutdoorSiteTiles(this.defaultBackgroundLayerUrl, this.defaultBackgroundLayerAttribution, outdoorCourse.geometry);\n await writeOrUpdateFilesInStore(outdoorCourse, imagesRegExp, true, ['url']);\n\n const pois = (await getPoisNearCourse(state.api, state.language, outdoorCourseId, init).then(response => response.json())).results;\n await writeOrUpdateDataInStore('pois', pois);\n await writeOrUpdateFilesInStore(pois, imagesRegExp, true, ['url']);\n\n const touristicContents = (await getTouristicContentsNearOutdoorCourse(state.api, state.language, outdoorCourseId, init).then(response => response.json())).results;\n await writeOrUpdateFilesInStore(touristicContents, imagesRegExp, true, ['url']);\n touristicContents.forEach(touristicContent => {\n touristicContent.offline = true;\n });\n await writeOrUpdateDataInStore('touristicContents', touristicContents);\n const touristicEvents = (await getTouristicEventsNearOutdoorCourse(state.api, state.language, outdoorCourseId, init).then(response => response.json())).results;\n await writeOrUpdateFilesInStore(touristicEvents, imagesRegExp, true, ['url']);\n touristicEvents.forEach(touristicEvent => {\n touristicEvent.offline = true;\n });\n await writeOrUpdateDataInStore('touristicEvents', touristicEvents);\n\n await writeOrUpdateDataInStore('outdoorCourses', [\n {\n ...outdoorCourse,\n offline: true,\n pois: pois.map(poi => poi.id),\n touristicContents: touristicContents.map(trekTouristicContent => trekTouristicContent.id),\n touristicEvents: touristicEvents.map(trekTouristicEvent => trekTouristicEvent.id),\n },\n ]);\n }\n\n async deleteOutdoorSite() {\n try {\n const outdoorSitesInStore: OutdoorSites = [];\n const outdoorSiteInStore = await getDataInStore('outdoorSites', this.currentOutdoorSite.id);\n this.deleteOfflineOutdoorSiteProperties(outdoorSiteInStore);\n outdoorSitesInStore.push(outdoorSiteInStore);\n\n await writeOrUpdateDataInStore('outdoorSites', outdoorSitesInStore);\n\n if (state.outdoorSites) {\n delete state.outdoorSites.find(outdoorSite => outdoorSite.id === this.currentOutdoorSite.id).offline;\n\n if (!state.currentOutdoorSites) {\n state.currentOutdoorSites = state.outdoorSites;\n }\n delete state.currentOutdoorSites.find(trek => trek.id === this.currentOutdoorSite.id).offline;\n }\n\n this.offline = false;\n this.deleteSuccessConfirm.emit();\n } catch (error) {\n this.deleteErrorConfirm.emit(this.currentOutdoorSite.id);\n }\n }\n\n async downloadGlobalTiles(url, attribution) {\n const offlineLayer = tileLayerOffline(url, { attribution });\n\n const coordinates = [];\n\n if (state.outdoorSites) {\n for (const outdoorSite of state.outdoorSites) {\n coordinates.push(pointOnFeature(outdoorSite.geometry as any).geometry.coordinates);\n }\n }\n\n const bounds = L.latLngBounds(coordinates.map(coordinate => [coordinate[1], coordinate[0]]));\n\n await writeOrUpdateTilesInStore(offlineLayer, bounds, this.globalTilesMinZoomOffline, this.globalTilesMaxZoomOffline);\n }\n\n async downloadOutdoorSiteTiles(url, attribution, geometry) {\n const offlineLayer = tileLayerOffline(url, { attribution });\n const outdoorSiteBbox = bbox(geometry);\n const bounds = L.latLngBounds([outdoorSiteBbox[1], outdoorSiteBbox[0]], [outdoorSiteBbox[3], outdoorSiteBbox[2]]);\n\n await writeOrUpdateTilesInStore(offlineLayer, bounds, this.tilesMinZoomOffline, this.tilesMaxZoomOffline);\n }\n\n deleteOfflineOutdoorSiteProperties(outdoorSiteInStore) {\n delete outdoorSiteInStore.offline;\n delete outdoorSiteInStore.pois;\n delete outdoorSiteInStore.touristicContents;\n delete outdoorSiteInStore.touristicEvents;\n }\n\n render() {\n const defaultImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/default-image.svg`);\n const practice = state.outdoorPractices && this.currentOutdoorSite && state.outdoorPractices.find(practice => practice.id === this.currentOutdoorSite.practice);\n const city = state.cities && this.currentOutdoorSite && state.cities.find(city => city.id === this.currentOutdoorSite.cities[0]);\n const outdoorRatings =\n state.outdoorRatings && this.currentOutdoorSite && state.outdoorRatings.filter(outdoorRating => this.currentOutdoorSite.ratings.includes(outdoorRating.id));\n const currentOutdoorSitesRatingsScales = outdoorRatings && [...new Set(outdoorRatings.map(outdoorRating => outdoorRating.scale))];\n const outdoorRatingsScales =\n currentOutdoorSitesRatingsScales && state.outdoorRatingsScale.filter(outdoorRatingsScale => currentOutdoorSitesRatingsScales.includes(outdoorRatingsScale.id));\n return (\n <Host\n style={{\n '--font-family': this.fontFamily,\n '--color-primary-app': this.colorPrimaryApp,\n '--color-on-surface': this.colorOnSurface,\n '--color-primary-container': this.colorPrimaryContainer,\n '--color-on-primary-container': this.colorOnPrimaryContainer,\n '--color-secondary-container': this.colorSecondaryContainer,\n '--color-on-secondary-container': this.colorOnSecondaryContainer,\n '--color-background': this.colorBackground,\n '--detail-bottom-space-height': this.isLargeView\n ? state.languages && state.languages.length > 1\n ? '44px'\n : '12px'\n : state.languages && state.languages.length > 1\n ? '164px'\n : '124px',\n }}\n >\n {this.currentOutdoorSite && (\n <div part=\"outdoor-site-detail-container\" class=\"outdoor-site-detail-container\" ref={el => (this.outdoorSiteDetailContainerRef = el)}>\n <div part=\"outdoor-site-images-container\" class=\"outdoor-site-images-container\" ref={el => (this.presentationRef = el)}>\n <div part=\"swiper-images\" class=\"swiper swiper-images\" ref={el => (this.swiperImagesRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {this.currentOutdoorSite.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n this.currentOutdoorSite.attachments\n .filter(attachment => attachment.type === 'image')\n .map(attachment => {\n const legend = [attachment.legend, attachment.author].filter(Boolean).join(' - ');\n return (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n {this.displayFullscreen && (\n <div part=\"outdoor-site-close-fullscreen-button\" class=\"outdoor-site-close-fullscreen-button\" onClick={() => this.handleFullscreen(true)}>\n <span part=\"outdoor-site-close-fullcreen-icon\" class=\"outdoor-site-close-fullcreen-icon\" innerHTML={CloseIcon}></span>\n </div>\n )}\n <div part=\"outdoor-site-image-legend\" class=\"outdoor-site-image-legend\">\n {legend}\n </div>\n <img\n part=\"outdoor-site-img\"\n class=\"outdoor-site-img\"\n src={this.offline && attachment.thumbnail !== '' ? attachment.thumbnail : attachment.url}\n loading=\"lazy\"\n onClick={() => this.handleFullscreen()}\n /* @ts-ignore */\n onerror={event => {\n event.target.onerror = null;\n event.target.className = 'outdoor-site-img default-outdoor-site-img';\n event.target.src = defaultImageSrc;\n }}\n alt={attachment.legend}\n />\n </div>\n );\n })\n ) : (\n <img part=\"outdoor-site-img\" class=\"outdoor-site-img default-outdoor-site-img\" src={defaultImageSrc} loading=\"lazy\" alt=\"\" />\n )}\n </div>\n <div>\n <div part=\"swiper-pagination\" class=\"swiper-pagination\" ref={el => (this.paginationElImagesRef = el)}></div>\n <div part=\"swiper-button-prev\" class=\"swiper-button-prev\" ref={el => (this.prevElImagesRef = el)}></div>\n <div part=\"swiper-button-next\" class=\"swiper-button-next\" ref={el => (this.nextElImagesRef = el)}></div>\n </div>\n </div>\n </div>\n <div part=\"outdoor-site-name\" class=\"outdoor-site-name\">\n {this.currentOutdoorSite.name}\n </div>\n {state.themes && state.themes.filter(theme => this.currentOutdoorSite.themes.includes(theme.id)).length > 0 && (\n <div part=\"themes-container\" class=\"themes-container\">\n {state.themes\n .filter(theme => this.currentOutdoorSite.themes.includes(theme.id))\n .map(theme => (\n <div part=\"theme\" class=\"theme\">\n {theme.label}\n </div>\n ))}\n </div>\n )}\n <div part=\"sub-container\" class=\"sub-container\">\n <div part=\"icons-labels-container\" class=\"icons-labels-container\">\n {practice && (\n <div part=\"icon-label\" class=\"icon-label practice\">\n {practice.pictogram && <img part=\"icon\" class=\"icon\" src={practice.pictogram} alt=\"\" />}\n <span part=\"label\" class=\"label\">\n {practice.name}\n </span>\n </div>\n )}\n {this.currentOutdoorSite.orientation && this.currentOutdoorSite.orientation.length > 0 && (\n <div part=\"row\" class=\"row\">\n <span part=\"icon\" class=\"icon\" innerHTML={ExploreIcon}></span>\n <span part=\"label\" class=\"label\">\n {this.currentOutdoorSite.orientation.map(orientation => translate[state.language].cardinalPoints[orientation.toLowerCase()]).join(', ')}\n </span>\n </div>\n )}\n {this.currentOutdoorSite.wind && this.currentOutdoorSite.wind.length > 0 && (\n <div part=\"row\" class=\"row\">\n <span part=\"icon\" class=\"icon\" innerHTML={AirIcon}></span>\n <span part=\"label\" class=\"label\">\n {this.currentOutdoorSite.wind.map(wind => translate[state.language].cardinalPoints[wind.toLowerCase()]).join(', ')}\n </span>\n </div>\n )}\n {this.currentOutdoorSite.period && (\n <div part=\"row\" class=\"row\">\n <span part=\"icon\" class=\"icon\" innerHTML={EventIcon}></span>\n <span part=\"label\" class=\"label\">\n {this.currentOutdoorSite.period}\n </span>\n </div>\n )}\n {outdoorRatings &&\n outdoorRatingsScales.map(outdoorRatingsScale => (\n <div part=\"row\" class=\"row\">\n {`${outdoorRatingsScale.name} : ${outdoorRatings\n .filter(outdoorRating => outdoorRating.scale === outdoorRatingsScale.id)\n .map(rating => rating.name)\n .join(', ')}`}\n </div>\n ))}\n </div>\n </div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"downloads-container\" class=\"downloads-container\">\n <div part=\"download-title\" class=\"download-title\">\n {translate[state.language].downloads}\n </div>\n {this.enableOffline && !this.offline && (!this.currentOutdoorSite.parents || this.currentOutdoorSite.parents.length === 0) && (\n <button part=\"offline-button\" class=\"offline-button\" onClick={() => this.displayDownloadModal()}>\n <span part=\"icon\" class=\"icon\" innerHTML={DownloadForOfflineIcon}></span>\n <span part=\"label\" class=\"label\">\n {translate[state.language].offline.downloadOffline}\n </span>\n </button>\n )}\n {this.enableOffline && this.offline && (!this.currentOutdoorSite.parents || this.currentOutdoorSite.parents.length === 0) && (\n <button part=\"offline-button\" class=\"offline-button\" onClick={() => this.displayDeleteModal()}>\n <span part=\"icon\" class=\"icon\" innerHTML={DeleteIcon}></span>\n <span part=\"label\" class=\"label\">\n {translate[state.language].offline.deleteOffline}\n </span>\n </button>\n )}\n <div part=\"links-container\" class=\"links-container\">\n <a\n href={`${this.currentOutdoorSite.pdf}${state.portalsFromProviders && state.portalsFromProviders.length === 1 ? '?portal=' + state.portalsFromProviders[0] : ''}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <span part=\"icon\" class=\"icon\" innerHTML={DownloadIcon}></span>\n <span part=\"label\" class=\"label\">\n PDF\n </span>\n </a>\n </div>\n </div>\n <div part=\"divider\" class=\"divider\"></div>\n {this.currentOutdoorSite.description_teaser && <div part=\"description-teaser\" class=\"description-teaser\" innerHTML={this.currentOutdoorSite.description_teaser}></div>}\n {this.currentOutdoorSite.ambiance && <div part=\"ambiance\" class=\"ambiance\" innerHTML={this.currentOutdoorSite.ambiance}></div>}\n <div part=\"divider\" class=\"divider\"></div>\n {this.currentOutdoorSite.description && (\n <div part=\"description-container\" class=\"description-container\">\n <div part=\"description-title\" class=\"description-title\" ref={el => (this.descriptionRef = el)}>\n {translate[state.language].description}\n </div>\n <div part=\"description\" class=\"description\" innerHTML={this.currentOutdoorSite.description}></div>\n </div>\n )}\n {this.currentOutdoorSite.cities && this.currentOutdoorSite.cities.length > 0 && (\n <div part=\"departure-container\" class=\"departure-container\">\n <div part=\"departure-title\" class=\"departure-title\">\n {translate[state.language].departure} : \n </div>\n <div part=\"departure\" innerHTML={city.name}></div>\n </div>\n )}\n {this.currentOutdoorSite.cities && this.currentOutdoorSite.cities.length > 0 && (\n <div part=\"cities-container\" class=\"cities-container\">\n <div part=\"cities-title\" class=\"cities-title\">\n {translate[state.language].crossedCities} : \n </div>\n <div part=\"cities\" innerHTML={this.currentOutdoorSite.cities.map(currentCity => state.cities.find(city => city.id === currentCity)?.name).join(', ')}></div>\n </div>\n )}\n {state.currentPois && state.currentPois.length > 0 && (\n <div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"pois-container\" class=\"pois-container\" ref={el => (this.poiRef = el)}>\n <div part=\"pois-title\" class=\"pois-title\">\n {translate[state.language].pois(state.currentPois.length)}\n </div>\n <div part=\"swiper-pois\" class=\"swiper swiper-pois\" ref={el => (this.swiperPoisRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {state.currentPois.map(poi => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <grw-poi\n exportparts=\"poi-type-img-container,poi-type,swiper-poi,swiper-wrapper,swiper-slide,poi-img,default-poi-img,swiper-pagination,swiper-button-prev,swiper-button-next,poi-sub-container,poi-name,poi-description,handle-poi-description\"\n poi={poi}\n ></grw-poi>\n </div>\n ))}\n </div>\n <div part=\"swiper-scrollbar\" class=\"swiper-scrollbar\" ref={el => (this.poisSwiperScrollbar = el)}></div>\n </div>\n </div>\n </div>\n )}\n {this.currentOutdoorSite.advice && (\n <div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"advice-container\" class=\"advice-container\">\n <div part=\"advice-title\" class=\"advice-title\" ref={el => (this.recommendationRef = el)}>\n {translate[state.language].recommendations}\n </div>\n {this.currentOutdoorSite.advice && (\n <div part=\"current-advice-container\" class=\"current-advice-container\">\n <span part=\"icon\" class=\"icon\" innerHTML={WarningIcon}></span>\n <div part=\"advice\" class=\"advice\" innerHTML={this.currentOutdoorSite.advice}></div>\n </div>\n )}\n </div>\n </div>\n )}\n {this.currentOutdoorSite.accessibility && this.currentOutdoorSite.accessibility !== '' && (\n <div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"accessibilities-container\" class=\"accessibilities-container\">\n <div part=\"accessibilites-title\" class=\"accessibilities-title\">\n {translate[state.language].accessibility}\n </div>\n <div part=\"accessibilities\" innerHTML={this.currentOutdoorSite.accessibility}></div>\n </div>\n </div>\n )}\n {state.currentRelatedOutdoorSites && state.currentRelatedOutdoorSites.length > 0 && (\n <div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"related-outdoor-sites-container\" class=\"related-outdoor-sites-container\" ref={el => (this.sitesRef = el)}>\n <div part=\"related-outdoor-sites-title\" class=\"related-outdoor-sites-title\">\n {translate[state.language].relatedOutdoorSites(state.currentRelatedOutdoorSites.length)}\n </div>\n <div part=\"swiper-related-outdoor-sites\" class=\"swiper swiper-related-outdoor-sites\" ref={el => (this.swiperRelatedOutdoorSitesRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {state.currentRelatedOutdoorSites.map(relatedOutdoorSite => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <grw-outdoor-site-card\n exportparts=\"related-outdoor-sites-card,related-outdoor-sites-img-container,swiper-related-outdoor-sites,swiper-wrapper,swiper-slide,related-outdoor-sites-img,default-related-outdoor-sites-img,swiper-pagination,swiper-button-prev,swiper-button-next,related-outdoor-sites-sub-container,related-outdoor-sites-sub-container,related-outdoor-sites-type-img,related-outdoor-sites-type-name,related-outdoor-sites-name,related-outdoor-sites-date-container,related-outdoor-sites-date,related-outdoor-sites-more-detail-container,more-details-button\"\n fontFamily={this.fontFamily}\n outdoorSite={relatedOutdoorSite}\n isInsideHorizontalList={true}\n ></grw-outdoor-site-card>\n </div>\n ))}\n </div>\n <div part=\"swiper-scrollbar\" class=\"swiper-scrollbar\" ref={el => (this.relatedOutdoorSitesSwiperScrollbar = el)}></div>\n </div>\n </div>\n </div>\n )}\n {state.currentRelatedOutdoorCourses && state.currentRelatedOutdoorCourses.length > 0 && (\n <div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"related-outdoor-courses-container\" class=\"related-outdoor-courses-container\" ref={el => (this.coursesRef = el)}>\n <div part=\"related-outdoor-courses-title\" class=\"related-outdoor-courses-title\">\n {translate[state.language].relatedOutdoorCourses(state.currentRelatedOutdoorCourses.length)}\n </div>\n <div part=\"swiper-related-outdoor-courses\" class=\"swiper swiper-related-outdoor-courses\" ref={el => (this.swiperRelatedOutdoorCoursesRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {state.currentRelatedOutdoorCourses.map(relatedOutdoorCourse => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <grw-outdoor-course-card\n exportparts=\"related-outdoor-courses-card,related-outdoor-courses-img-container,swiper-related-outdoor-courses,swiper-wrapper,swiper-slide,related-outdoor-courses-img,default-related-outdoor-courses-img,swiper-pagination,swiper-button-prev,swiper-button-next,related-outdoor-courses-sub-container,related-outdoor-courses-sub-container,related-outdoor-courses-type-img,related-outdoor-courses-type-name,related-outdoor-courses-name,related-outdoor-courses-date-container,related-outdoor-courses-date,related-outdoor-courses-more-detail-container,more-details-button\"\n fontFamily={this.fontFamily}\n outdoorCourse={relatedOutdoorCourse}\n isInsideHorizontalList={true}\n ></grw-outdoor-course-card>\n </div>\n ))}\n </div>\n <div part=\"swiper-scrollbar\" class=\"swiper-scrollbar\" ref={el => (this.relatedOutdoorCoursesSwiperScrollbar = el)}></div>\n </div>\n </div>\n </div>\n )}\n {state.currentInformationDesks &&\n state.currentInformationDesks.filter(currentInformationDesks => this.currentOutdoorSite.information_desks.includes(currentInformationDesks.id)).length > 0 && (\n <div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"information-desks-container\" class=\"information-desks-container\" ref={el => (this.informationPlacesRef = el)}>\n <div part=\"information-desks-title\" class=\"information-desks-title\">\n {translate[state.language].informationPlaces}\n </div>\n <div part=\"swiper-information-desks\" class=\"swiper swiper-information-desks\" ref={el => (this.swiperInformationDesksRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {state.currentInformationDesks\n .filter(currentInformationDesks => this.currentOutdoorSite.information_desks.includes(currentInformationDesks.id))\n .map(informationDesk => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <grw-information-desk\n exportparts=\"information-desk-img-container,information-desk-img,information-desk-sub-container,information-desk-name,center-on-map-button,icon,label,information-desk-informations,phone-container,mail-container,link-container,information-desk-description-container,information-desk-description,handle-information-desk-description\"\n informationDesk={informationDesk}\n ></grw-information-desk>\n </div>\n ))}\n </div>\n <div part=\"swiper-scrollbar\" class=\"swiper-scrollbar\" ref={el => (this.informationDesksContentsSwiperScrollbar = el)}></div>\n </div>\n </div>\n </div>\n )}\n {state.trekTouristicContents && state.trekTouristicContents.length > 0 && (\n <div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"touristic-content-container\" class=\"touristic-content-container\" ref={el => (this.touristicContentsRef = el)}>\n <div part=\"touristic-content-title\" class=\"touristic-content-title\">\n {translate[state.language].touristicContents(state.trekTouristicContents.length)}\n </div>\n <div part=\"swiper-touristic-content\" class=\"swiper swiper-touristic-content\" ref={el => (this.swiperTouristicContentsRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {state.trekTouristicContents.map(touristicContent => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <grw-touristic-content-card\n exportparts=\"touristic-content-card,touristic-content-img-container,swiper-touristic-content,swiper-wrapper,swiper-slide,touristic-content-img,default-touristic-content-img,swiper-pagination,swiper-button-prev,swiper-button-next,touristic-content-sub-container,touristic-content-category-container,touristic-content-category-img,touristic-content-category-name,touristic-content-name,touristic-content-more-detail-container,more-details-button\"\n fontFamily={this.fontFamily}\n touristicContent={touristicContent}\n isInsideHorizontalList={true}\n colorSurfaceContainerLow={this.colorSurfaceContainerLow}\n ></grw-touristic-content-card>\n </div>\n ))}\n </div>\n <div part=\"swiper-scrollbar\" class=\"swiper-scrollbar\" ref={el => (this.touristicContentsSwiperScrollbar = el)}></div>\n </div>\n </div>\n </div>\n )}\n {state.trekTouristicEvents && state.trekTouristicEvents.length > 0 && (\n <div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"touristic-event-container\" class=\"touristic-event-container\" ref={el => (this.touristicEventsRef = el)}>\n <div part=\"touristic-event-title\" class=\"touristic-event-title\">\n {translate[state.language].touristicEvents(state.trekTouristicEvents.length)}\n </div>\n <div part=\"swiper-touristic-event\" class=\"swiper swiper-touristic-event\" ref={el => (this.swiperTouristicEventsRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {state.trekTouristicEvents.map(touristicEvent => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <grw-touristic-event-card\n exportparts=\"touristic-event-card,touristic-event-img-container,swiper-touristic-event,swiper-wrapper,swiper-slide,touristic-event-img,default-touristic-event-img,swiper-pagination,swiper-button-prev,swiper-button-next,touristic-event-sub-container,touristic-event-sub-container,touristic-event-type-img,touristic-event-type-name,touristic-event-name,touristic-event-date-container,touristic-event-date,touristic-event-more-detail-container,more-details-button\"\n fontFamily={this.fontFamily}\n touristicEvent={touristicEvent}\n isInsideHorizontalList={true}\n colorSurfaceContainerLow={this.colorSurfaceContainerLow}\n ></grw-touristic-event-card>\n </div>\n ))}\n </div>\n <div part=\"swiper-scrollbar\" class=\"swiper-scrollbar\" ref={el => (this.touristicEventsSwiperScrollbar = el)}></div>\n </div>\n </div>\n </div>\n )}\n {this.weather && city && !this.offline && (\n <div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"weather-container\" class=\"weather-container\">\n <iframe height=\"150\" frameborder=\"0\" src={`https://meteofrance.com/widget/prevision/${city.id}0#${this.colorPrimaryApp}`}></iframe>\n </div>\n </div>\n )}\n {this.currentOutdoorSite.web_links && this.currentOutdoorSite.web_links.length > 0 && (\n <div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"weblinks-container\" class=\"weblinks-container\">\n <div part=\"weblinks-title\" class=\"weblinks-title\">\n {translate[state.language].learnMore}\n </div>\n {this.currentOutdoorSite.web_links.map(weblink => (\n <a part=\"weblink-container\" class=\"weblink-container\" href={weblink.url} target=\"_blank\" rel=\"noopener noreferrer\">\n {weblink.category && weblink.category.pictogram && <img src={weblink.category.pictogram} alt={weblink.category.label} />}\n {weblink.name}\n </a>\n ))}\n </div>\n </div>\n )}\n {this.currentOutdoorSite.source && this.currentOutdoorSite.source.length > 0 && (\n <div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"source-container\" class=\"source-container\">\n <div part=\"source-title\" class=\"source-title\">\n {translate[state.language].sources}\n </div>\n {this.sources.map(source => (\n <div part=\"source-sub-container\" class=\"source-sub-container\">\n {source.pictogram && <img src={source.pictogram} alt=\"\" />}\n <div>\n <div part=\"source-name\" class=\"source-name\" innerHTML={source.name}></div>\n <a part=\"source-advice\" class=\"source-advice\" href={source.website} innerHTML={source.website}></a>\n </div>\n </div>\n ))}\n </div>\n </div>\n )}\n {this.grwApp && <div part=\"detail-bottom-space\" class=\"detail-bottom-space\"></div>}\n </div>\n )}\n {this.modalDetailsId && (\n <Fragment>\n {this.showTouristicContentDetailsModal && <grw-touristic-content-provider api={state.api} touristic-content-id={this.modalDetailsId}></grw-touristic-content-provider>}\n {this.showTouristicEventDetailsModal && <grw-touristic-event-provider api={state.api} touristic-event-id={this.modalDetailsId}></grw-touristic-event-provider>}\n </Fragment>\n )}\n </Host>\n );\n }\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { OutdoorSite } from 'components';\nimport { getDataInStore, handleOfflineProperty } from 'services/grw-db.service';\nimport { getOutdoorCourse, getOutdoorCourseTypes } from 'services/outdoor-courses.service';\nimport { getOutdoorPractices, getOutdoorRatings, getOutdoorRatingsScale, getOutdoorSite, getOutdoorSiteTypes, getPoisNearSite } from 'services/outdoor-sites.service';\nimport { getTouristicContentCategory, getTouristicContentsNearOutdoorSite } from 'services/touristic-contents.service';\nimport { getTouristicEventsNearOutdoorSite, getTouristicEventType } from 'services/touristic-events.service';\nimport { getCities, getDistricts, getInformationsDesks, getSources, getThemes } from 'services/treks.service';\nimport state from 'store/store';\nimport { getCacheMode, imagesRegExp, setFilesFromStore } from 'utils/utils';\n\n@Component({\n tag: 'grw-outdoor-site-provider',\n shadow: true,\n})\nexport class GrwOutdoorSiteProvider {\n @Prop() languages = 'fr';\n @Prop() api: string;\n @Prop() outdoorSiteId: number;\n @Prop() portals: string;\n\n controller = new AbortController();\n signal = this.controller.signal;\n init: RequestInit = { cache: getCacheMode(), 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\n state.portalsFromProviders = this.portals;\n\n this.handleOutdoorSite();\n }\n\n async handleOutdoorSite() {\n const outdoorSiteInStore: OutdoorSite = await getDataInStore('outdoorSites', this.outdoorSiteId);\n if (outdoorSiteInStore && outdoorSiteInStore.offline) {\n this.handleOfflineOutdoorSite(outdoorSiteInStore);\n } else {\n this.handleOnlineOutdoorSite();\n }\n }\n\n async handleOfflineOutdoorSite(outdoorSite: OutdoorSite) {\n state.cities = await handleOfflineProperty('cities');\n state.sources = await handleOfflineProperty('sources');\n state.districts = await handleOfflineProperty('districts');\n state.themes = await handleOfflineProperty('themes');\n state.outdoorSiteTypes = await handleOfflineProperty('outdoorSiteTypes');\n state.outdoorPractices = await handleOfflineProperty('outdoorPractices');\n state.outdoorRatings = await handleOfflineProperty('outdoorRatings');\n state.outdoorRatingsScale = await handleOfflineProperty('outdoorRatingsScale');\n state.touristicContentCategories = await handleOfflineProperty('touristicContentCategories');\n state.touristicEventTypes = await handleOfflineProperty('touristicEventTypes');\n state.poiTypes = await handleOfflineProperty('poiTypes');\n state.outdoorCourseTypes = await handleOfflineProperty('outdoorCourseTypes');\n\n const informationDesksInStore = await handleOfflineProperty('informationDesks');\n const informationDesks = informationDesksInStore.filter(informationDeskInStore =>\n outdoorSite.information_desks.some(information_desk => information_desk === informationDeskInStore.id),\n );\n state.currentInformationDesks = informationDesks;\n\n const poisInStore = await handleOfflineProperty('pois', ['url']);\n const pois = poisInStore.filter(poiInStore => outdoorSite.pois.some(outdoorSitePoi => outdoorSitePoi === poiInStore.id));\n state.currentPois = pois;\n\n const touristicContentsInStore = await handleOfflineProperty('touristicContents', ['url']);\n const touristicContents = touristicContentsInStore.filter(touristicContentInStore =>\n outdoorSite.touristicContents.some(outdoorSiteTouristicContent => outdoorSiteTouristicContent === touristicContentInStore.id),\n );\n state.trekTouristicContents = touristicContents;\n\n const touristicEventsInStore = await handleOfflineProperty('touristicEvents', ['url']);\n const touristicEvents = touristicEventsInStore.filter(touristicEventInStore =>\n outdoorSite.touristicEvents.some(outdoorSiteTouristicEvent => outdoorSiteTouristicEvent === touristicEventInStore.id),\n );\n state.trekTouristicEvents = touristicEvents;\n\n const outdoorSitesInStore = await handleOfflineProperty('outdoorSites', ['url']);\n const relatedOutdoorSites = outdoorSitesInStore.filter(relatedOutdoorSiteInStore =>\n outdoorSite.children.some(relatedOutdoorSite => relatedOutdoorSite === relatedOutdoorSiteInStore.id),\n );\n state.currentRelatedOutdoorSites = relatedOutdoorSites;\n\n const outdoorCoursesInStore = await handleOfflineProperty('outdoorCourses', ['url']);\n const relatedOutdoorCourses = outdoorCoursesInStore.filter(outdoorCourseInStore =>\n outdoorSite.courses.some(relatedOutdoorCourse => relatedOutdoorCourse === outdoorCourseInStore.id),\n );\n state.currentRelatedOutdoorCourses = relatedOutdoorCourses;\n\n await setFilesFromStore(outdoorSite, imagesRegExp, ['url']);\n state.currentOutdoorSite = outdoorSite;\n }\n\n handleOnlineOutdoorSite() {\n const requests = [];\n requests.push(!state.sources ? getSources(state.api, state.language, this.init) : new Response('null'));\n requests.push(!state.districts ? getDistricts(state.api, state.language, this.init) : new Response('null'));\n requests.push(!state.themes ? getThemes(state.api, state.language, this.portals, this.init) : new Response('null'));\n requests.push(!state.outdoorSiteTypes ? getOutdoorSiteTypes(state.api, state.language, this.init) : new Response('null'));\n requests.push(!state.outdoorPractices ? getOutdoorPractices(state.api, state.language, this.init) : new Response('null'));\n requests.push(!state.outdoorRatings ? getOutdoorRatings(state.api, state.language, this.portals, this.init) : new Response('null'));\n requests.push(!state.outdoorRatingsScale ? getOutdoorRatingsScale(state.api, state.language, this.init) : new Response('null'));\n requests.push(getInformationsDesks(state.api, state.language, this.init));\n requests.push(getTouristicContentsNearOutdoorSite(state.api, state.language, this.outdoorSiteId, this.init));\n requests.push(getTouristicContentCategory(state.api, state.language, null, this.init));\n requests.push(getTouristicEventsNearOutdoorSite(state.api, state.language, this.outdoorSiteId, this.init));\n requests.push(getTouristicEventType(state.api, state.language, null, this.init));\n requests.push(getPoisNearSite(state.api, state.language, this.outdoorSiteId, this.init));\n requests.push(fetch(`${state.api}poi_type/?language=${state.language}&fields=id,pictogram`, this.init));\n requests.push(!state.outdoorCourseTypes ? getOutdoorCourseTypes(state.api, state.language, this.init) : new Response('null'));\n requests.push(getOutdoorSite(state.api, state.language, this.outdoorSiteId, this.init));\n try {\n Promise.all([...requests])\n .then(responses => Promise.all(responses.map(response => response.json())))\n .then(\n async ([\n sources,\n districts,\n themes,\n outdoorSiteTypes,\n outdoorPractices,\n ratings,\n ratingsScale,\n informationDesks,\n touristicContent,\n touristicContentCategory,\n touristicEvent,\n touristicEventType,\n pois,\n poiTypes,\n outdoorCourseTypes,\n outdoorSite,\n ]) => {\n state.networkError = false;\n\n if (outdoorSite && outdoorSite.children.length > 0) {\n const outdoorSites: number[] = [];\n outdoorSites.push(...outdoorSite.children);\n const outdoorSitesRequests = [];\n outdoorSites.forEach(outdoorSiteId => {\n outdoorSitesRequests.push(getOutdoorSite(state.api, state.language, outdoorSiteId, this.init));\n });\n state.currentRelatedOutdoorSites = await Promise.all([...outdoorSitesRequests]).then(responses => Promise.all(responses.map(response => response.json())));\n }\n\n if (outdoorSite && outdoorSite.courses.length > 0) {\n const outdoorCourses: number[] = [];\n outdoorCourses.push(...outdoorSite.courses);\n const outdoorCoursesRequests = [];\n outdoorCourses.forEach(outdoorCourseId => {\n outdoorCoursesRequests.push(getOutdoorCourse(state.api, state.language, outdoorCourseId, this.init));\n });\n state.currentRelatedOutdoorCourses = await Promise.all([...outdoorCoursesRequests]).then(responses => Promise.all(responses.map(response => response.json())));\n }\n if (sources) {\n state.sources = sources.results;\n }\n if (districts) {\n state.districts = districts.results;\n }\n if (themes) {\n state.themes = themes.results;\n }\n if (outdoorSiteTypes) {\n state.outdoorSiteTypes = outdoorSiteTypes.results;\n }\n if (outdoorPractices) {\n state.outdoorPractices = outdoorPractices.results;\n }\n if (ratings) {\n state.outdoorRatings = ratings.results;\n }\n if (ratingsScale) {\n state.outdoorRatingsScale = ratingsScale.results;\n }\n if (informationDesks) {\n state.currentInformationDesks = informationDesks.results;\n }\n if (touristicContentCategory) {\n state.touristicContentCategories = touristicContentCategory.results;\n }\n if (touristicContent) {\n state.trekTouristicContents = touristicContent.results;\n }\n if (touristicEvent) {\n state.trekTouristicEvents = touristicEvent.results;\n }\n if (touristicEventType) {\n state.touristicEventTypes = touristicEventType.results;\n }\n if (pois) {\n state.currentPois = pois.results;\n }\n if (poiTypes) {\n state.poiTypes = poiTypes.results;\n }\n if (outdoorCourseTypes) {\n state.outdoorCourseTypes = outdoorCourseTypes.results;\n }\n\n state.currentOutdoorSite = outdoorSite;\n\n let citiesToLoad = [...outdoorSite.cities];\n if (state.cities) {\n const cityIds = state.cities.map(city => city.id);\n citiesToLoad = citiesToLoad.filter(city => city && !cityIds.includes(city));\n }\n if (citiesToLoad.length > 0) {\n try {\n const cities = (await getCities(state.api, state.language, this.init, citiesToLoad).then(response => response.json())).results;\n if (cities) {\n state.cities = [...state.cities, ...cities];\n }\n } catch (e) {\n console.error('Failed to load cities', e);\n }\n }\n },\n );\n } catch (error) {\n if (!(error.code === DOMException.ABORT_ERR)) {\n state.networkError = true;\n }\n }\n }\n\n disconnectedCallback() {\n this.controller.abort();\n state.networkError = false;\n }\n\n render() {\n return <Host></Host>;\n }\n}\n",":host {\n width: 100%;\n height: 100%;\n overflow-y: auto;\n}\n\ngrw-outdoor-site-card {\n display: flex;\n justify-content: center;\n margin: 0px 8px 16px 8px;\n flex: 1 1 300px;\n max-width: 350px;\n}\n\n:host(.large-view) grw-outdoor-site-card {\n flex: 1 1 100%;\n max-width: none;\n}\n\n.list-bottom-space {\n height: 104px;\n}\n\n.list-large-view-bottom-space {\n height: 52px;\n}\n\n.current-outdoor-sites-within-bounds-length {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 16px;\n color: var(--color-on-surface-variant);\n font-size: 22px;\n line-height: 28px;\n font-weight: 400;\n font-family: var(--font-family);\n}\n\n.outdoor-sites-list-container {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-around;\n}\n","import { Component, Host, h, Element, State, Prop } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport state, { onChange } from 'store/store';\nimport { OutdoorSites } from 'types/types';\n@Component({\n tag: 'grw-outdoor-sites-list',\n styleUrl: 'grw-outdoor-sites-list.scss',\n shadow: true,\n})\nexport class GrwOutdoorSitesList {\n @Element() element: HTMLElement;\n @State() outdoorSitesToDisplay: OutdoorSites = [];\n\n @Prop() fontFamily = 'Roboto';\n @Prop() colorPrimaryApp = '#6b0030';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorSecondaryContainer = '#e8def8';\n @Prop() colorOnSecondaryContainer = '#1d192b';\n @Prop() colorSurfaceContainerLow = '#f7f2fa';\n @Prop() isLargeView = false;\n\n step = 10;\n shouldAddInfiniteScrollEvent = true;\n\n handleInfiniteScrollBind: (event: any) => void = this.handleInfiniteScroll.bind(this);\n\n connectedCallback() {\n this.handleInfiniteScrollEvent(true);\n if (state.currentOutdoorSites) {\n this.outdoorSitesToDisplay = [...state.currentOutdoorSites.slice(0, this.step)];\n }\n onChange('currentOutdoorSites', () => {\n this.handleInfiniteScrollEvent(true);\n this.element.scroll({ top: 0 });\n if (state.currentOutdoorSites) {\n this.outdoorSitesToDisplay = [...state.currentOutdoorSites.slice(0, this.step)];\n }\n });\n onChange('outdoorSitesWithinBounds', () => {\n this.handleInfiniteScrollEvent(true);\n this.element.scroll({ top: 0 });\n if (state.outdoorSitesWithinBounds) {\n this.outdoorSitesToDisplay = [...state.outdoorSitesWithinBounds.slice(0, this.step)];\n }\n });\n }\n\n handleInfiniteScroll(event: any) {\n if (event.composedPath()[0].scrollTop + event.composedPath()[0].scrollHeight / 2 >= event.composedPath()[0].scrollHeight) {\n if (this.outdoorSitesToDisplay.length < state.outdoorSitesWithinBounds.length) {\n this.outdoorSitesToDisplay = state.outdoorSitesWithinBounds.slice(\n 0,\n this.outdoorSitesToDisplay.length + this.step >= state.outdoorSitesWithinBounds.length\n ? state.outdoorSitesWithinBounds.length\n : this.outdoorSitesToDisplay.length + this.step,\n );\n } else {\n this.handleInfiniteScrollEvent(false);\n }\n }\n }\n\n handleInfiniteScrollEvent(shouldAddInfiniteScrollEvent: boolean) {\n if (shouldAddInfiniteScrollEvent) {\n if (this.shouldAddInfiniteScrollEvent) {\n this.element.addEventListener('scroll', this.handleInfiniteScrollBind);\n this.shouldAddInfiniteScrollEvent = !shouldAddInfiniteScrollEvent;\n }\n } else {\n this.element.removeEventListener('scroll', this.handleInfiniteScrollBind);\n this.shouldAddInfiniteScrollEvent = !shouldAddInfiniteScrollEvent;\n }\n }\n\n disconnectedCallback() {\n this.handleInfiniteScrollEvent(false);\n }\n\n render() {\n return (\n <Host class={{ 'large-view': this.isLargeView }} style={{ '--font-family': this.fontFamily, '--color-primary-app': this.colorPrimaryApp }}>\n {state.outdoorSitesWithinBounds && (\n <div part=\"current-outdoor-sites-within-bounds-length\" class=\"current-outdoor-sites-within-bounds-length\">{`${state.outdoorSitesWithinBounds.length} ${\n state.outdoorSitesWithinBounds.length > 1 ? translate[state.language].outdoorSites : translate[state.language].outdoorSite\n }`}</div>\n )}\n <div part=\"outdoor-sites-list-container\" class=\"outdoor-sites-list-container\">\n {this.outdoorSitesToDisplay.map(outdoorSite => (\n <grw-outdoor-site-card\n outdoorSite={outdoorSite}\n exportparts=\"outdoor-site-card,outdoor-site-img-container,outdoor-site-img,outdoor-site-sub-container,outdoor-site-departure,outdoor-site-name,outdoor-site-themes-container,outdoor-site-theme,outdoor-site-icons-labels-container,outdoor-site-icon-label,outdoor-site-icon,outdoor-site-label\"\n key={`outdoorSite-${outdoorSite.id}`}\n is-large-view={this.isLargeView}\n fontFamily={this.fontFamily}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n ></grw-outdoor-site-card>\n ))}\n </div>\n <div part=\"list-bottom-space\" class={!this.isLargeView ? 'list-bottom-space' : 'list-large-view-bottom-space'}></div>\n </Host>\n );\n }\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { getAllDataInStore, handleOfflineProperty } from 'services/grw-db.service';\nimport { getOutdoorPractices, getOutdoorSites, getOutdoorSiteTypes, outdoorSiteIsAvailableOffline } from 'services/outdoor-sites.service';\nimport { getCities, getDistricts, getThemes } from 'services/treks.service';\nimport state from 'store/store';\nimport { OutdoorSites } from 'types/types';\nimport { getCacheMode } from 'utils/utils';\n\n@Component({\n tag: 'grw-outdoor-sites-provider',\n shadow: true,\n})\nexport class GrwOutdoorSitesProvider {\n @Prop() languages = 'fr';\n @Prop() api: string;\n @Prop() inBbox: string;\n @Prop() cities: string;\n @Prop() districts: string;\n @Prop() structures: string;\n @Prop() themes: string;\n @Prop() portals: string;\n @Prop() offline = false;\n\n controller = new AbortController();\n signal = this.controller.signal;\n init: RequestInit = { cache: getCacheMode(), 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\n state.portalsFromProviders = this.portals;\n state.inBboxFromProviders = this.inBbox;\n state.citiesFromProviders = this.cities;\n state.districtsFromProviders = this.districts;\n state.structuresFromProviders = this.structures;\n state.themesFromProviders = this.themes;\n\n this.handleOutdoorSites();\n }\n\n async handleOutdoorSites() {\n if (this.offline) {\n this.handleOfflineOutdoorSites();\n } else {\n this.handleOnlineOutdoorSites();\n }\n }\n\n async handleOfflineOutdoorSites() {\n let outdoorSitesInStore: OutdoorSites = await getAllDataInStore('outdoorSites');\n outdoorSitesInStore.filter(outdoorSite => outdoorSite.parents && outdoorSite.parents.length === 0);\n if (outdoorSitesInStore && outdoorSitesInStore.length > 0) {\n state.cities = await handleOfflineProperty('cities');\n state.districts = await handleOfflineProperty('districts');\n state.themes = await handleOfflineProperty('themes');\n state.outdoorSiteTypes = await handleOfflineProperty('outdoorSiteTypes');\n state.outdoorPractices = await handleOfflineProperty('outdoorPractices');\n outdoorSitesInStore = await handleOfflineProperty('outdoorSites');\n state.outdoorSites = outdoorSitesInStore;\n state.currentOutdoorSites = outdoorSitesInStore;\n } else {\n state.networkError = true;\n }\n }\n\n handleOnlineOutdoorSites() {\n const requests = [];\n requests.push(!state.districts ? getDistricts(state.api, state.language, this.init) : new Response('null'));\n requests.push(!state.themes ? getThemes(state.api, state.language, this.portals, this.init) : new Response('null'));\n requests.push(!state.outdoorSiteTypes ? getOutdoorSiteTypes(state.api, state.language, this.init) : new Response('null'));\n requests.push(!state.outdoorPractices ? getOutdoorPractices(state.api, state.language, this.init) : new Response('null'));\n requests.push(getOutdoorSites(state.api, state.language, this.inBbox, this.cities, this.districts, this.structures, this.themes, this.portals, this.init));\n Promise.all([...requests])\n .then(responses => Promise.all(responses.map(response => response.json())))\n .then(async ([districts, themes, outdoorSiteTypes, outdoorPractices, outdoorSites]) => {\n state.networkError = false;\n\n if (districts) {\n state.districts = districts.results;\n }\n if (themes) {\n state.themes = themes.results;\n }\n if (outdoorSiteTypes) {\n state.outdoorSiteTypes = outdoorSiteTypes.results;\n }\n if (outdoorPractices) {\n state.outdoorPractices = outdoorPractices.results;\n }\n\n const outdoorSitesWithOfflineValue = [];\n for (let index = 0; index < outdoorSites.results.length; index++) {\n const offline = await outdoorSiteIsAvailableOffline(outdoorSites.results[index].id);\n outdoorSitesWithOfflineValue.push({ ...outdoorSites.results[index], offline });\n }\n state.outdoorSites = outdoorSitesWithOfflineValue;\n state.currentOutdoorSites = outdoorSitesWithOfflineValue;\n\n if (!state.cities || state.cities.length === 0) {\n const cityIds = new Set<number>();\n if (outdoorSites && outdoorSites.results) {\n outdoorSites.results.forEach(item => {\n if (item.cities) {\n item.cities.forEach(c => cityIds.add(c));\n }\n });\n }\n if (cityIds.size > 0) {\n try {\n const citiesResponse = await getCities(state.api, state.language, this.init, Array.from(cityIds));\n const citiesData = await citiesResponse.json();\n state.cities = citiesData.results || [];\n } catch (e) {\n console.error('Failed to load cities', e);\n }\n }\n }\n })\n .catch(async () => {\n await this.handleOfflineOutdoorSites();\n });\n }\n\n disconnectedCallback() {\n this.controller.abort();\n state.networkError = false;\n }\n\n render() {\n return <Host></Host>;\n }\n}\n",":host {\n display: flex;\n justify-content: center;\n align-items: center;\n .icon {\n display: flex;\n color: var(--color-on-primary-container);\n position: absolute;\n left: 32px;\n z-index: 20;\n pointer-events: none;\n }\n}\n\n.search-input {\n width: 100%;\n background-color: var(--color-surface-container-high);\n box-shadow: var(--elevation-2);\n border: none;\n border-radius: var(--border-radius, 40px);\n color: var(--color-on-primary-container);\n font-size: 16px;\n line-height: 24px;\n font-weight: 400;\n font-family: var(--font-family);\n height: 44px;\n padding: 0px 16px 0px 48px;\n outline-color: var(--color-outline);\n &::placeholder {\n color: var(--color-on-primary-container);\n }\n &::-webkit-search-cancel-button {\n -webkit-appearance: none;\n background-color: var(--color-on-primary-container);\n -webkit-mask-image: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23777'><path d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/></svg>\");\n background-size: 20px 20px;\n height: 20px;\n width: 20px;\n }\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\nimport state from 'store/store';\nimport { handleOutdoorSitesFiltersAndSearch, handleTouristicContentsFiltersAndSearch, handleTouristicEventsFiltersAndSearch, handleTreksFiltersAndSearch } from 'utils/utils';\nimport SearchIcon from '../../assets/search.svg';\n\n@Component({\n tag: 'grw-search',\n styleUrl: 'grw-search.scss',\n shadow: true,\n})\nexport class GrwSearch {\n @Prop() fontFamily = 'Roboto';\n\n onSearchChange(event: InputEvent) {\n state.searchValue = (event.target as any).value;\n if (state.mode === 'treks') {\n state.currentTreks = handleTreksFiltersAndSearch();\n } else if (state.mode === 'touristicContents') {\n state.currentTouristicContents = handleTouristicContentsFiltersAndSearch();\n } else if (state.mode === 'touristicEvents') {\n state.currentTouristicEvents = handleTouristicEventsFiltersAndSearch();\n } else if (state.mode === 'outdoor') {\n state.currentOutdoorSites = handleOutdoorSitesFiltersAndSearch();\n }\n }\n\n render() {\n return (\n <Host\n style={{\n '--font-family': this.fontFamily,\n }}\n >\n <span part=\"icon\" class=\"icon\" innerHTML={SearchIcon}></span>\n <input part=\"search-input\" class=\"search-input\" onInput={e => this.onSearchChange(e)} type=\"search\" placeholder=\"Rechercher\" value={state.searchValue}></input>\n </Host>\n );\n }\n}\n",".segmented-buttons-container {\n font-family: var(--font-family);\n display: flex;\n justify-content: center;\n width: calc(100% - 32px);\n height: 40px;\n margin: 16px;\n border: 1px solid var(--color-outline);\n border-radius: var(--border-radius, 20px);\n line-height: 20px;\n .segment {\n cursor: pointer;\n user-select: none;\n font-size: 14px;\n font-weight: 500;\n -webkit-tap-highlight-color: transparent;\n color: var(--color-on-surface);\n background-color: transparent;\n border-radius: 0px;\n min-width: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n &:first-child {\n border-top-left-radius: var(--border-radius, 20px);\n border-bottom-left-radius: var(--border-radius, 20px);\n }\n &:not(:last-child) {\n border-right: 1px solid var(--color-outline);\n }\n &:last-child {\n border-top-right-radius: var(--border-radius, 20px);\n border-bottom-right-radius: var(--border-radius, 20px);\n }\n }\n .selected-segment {\n color: var(--color-on-primary-container);\n background-color: var(--color-primary-container);\n }\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport state from 'store/store';\nimport { Mode } from 'types/types';\n\nimport {\n handleOutdoorSitesFiltersAndSearch,\n handleTouristicContentsFiltersAndSearch,\n handleTouristicEventsFiltersAndSearch,\n handleTreksFiltersAndSearch,\n outdoorSitesFilters,\n touristicContentsFilters,\n touristicEventsFilters,\n treksFilters,\n} from 'utils/utils';\n\n@Component({\n tag: 'grw-segmented-segment',\n styleUrl: 'grw-segmented-segment.scss',\n shadow: true,\n})\nexport class GrwSegmentedSegment {\n @Prop() treks = true;\n @Prop() touristicContents = false;\n @Prop() touristicEvents = false;\n @Prop() outdoor = false;\n\n @Prop() fontFamily = 'Roboto';\n\n changeMode(mode: Mode) {\n state.searchValue = '';\n if (mode === 'treks') {\n treksFilters.forEach(filter => {\n state[filter.property] && state[filter.property].forEach(currentFilter => (currentFilter.selected = false));\n });\n state.selectedActivitiesFilters = 0;\n state.selectedThemesFilters = 0;\n state.selectedLocationFilters = 0;\n if (state.treks) {\n state.currentTreks = [...handleTreksFiltersAndSearch()];\n }\n } else if (mode === 'touristicContents') {\n touristicContentsFilters.forEach(filter => {\n state[filter.property] && state[filter.property].forEach(currentFilter => (currentFilter.selected = false));\n });\n state.selectedActivitiesFilters = 0;\n state.selectedThemesFilters = 0;\n state.selectedLocationFilters = 0;\n if (state.touristicContents) {\n state.currentTouristicContents = [...handleTouristicContentsFiltersAndSearch()];\n }\n } else if (mode === 'touristicEvents') {\n touristicEventsFilters.forEach(filter => {\n state[filter.property] && state[filter.property].forEach(currentFilter => (currentFilter.selected = false));\n });\n state.selectedActivitiesFilters = 0;\n state.selectedThemesFilters = 0;\n state.selectedLocationFilters = 0;\n if (state.touristicEvents) {\n state.currentTouristicEvents = [...handleTouristicEventsFiltersAndSearch()];\n }\n } else if (mode === 'outdoor') {\n outdoorSitesFilters.forEach(filter => {\n state[filter.property] && state[filter.property].forEach(currentFilter => (currentFilter.selected = false));\n });\n state.selectedActivitiesFilters = 0;\n state.selectedThemesFilters = 0;\n state.selectedLocationFilters = 0;\n if (state.outdoorSites) {\n state.currentOutdoorSites = [...handleOutdoorSitesFiltersAndSearch()];\n }\n }\n state.mode = mode;\n }\n\n render() {\n return (\n <Host\n style={{\n '--font-family': this.fontFamily,\n }}\n >\n <div part=\"segmented-buttons-container\" class=\"segmented-buttons-container\">\n {this.treks && (\n <label part=\"segment\" class={`segment${state.mode === 'treks' ? ' selected-segment' : ''}`} onClick={() => this.changeMode('treks')}>\n {translate[state.language].home.segment.treks}\n </label>\n )}\n {this.outdoor && (\n <label part=\"segment\" class={`segment${state.mode === 'outdoor' ? ' selected-segment' : ''}`} onClick={() => this.changeMode('outdoor')}>\n {translate[state.language].home.segment.outdoorSites}\n </label>\n )}\n {this.touristicContents && (\n <label part=\"segment\" class={`segment${state.mode === 'touristicContents' ? ' selected-segment' : ''}`} onClick={() => this.changeMode('touristicContents')}>\n {translate[state.language].home.segment.touristicContents}\n </label>\n )}\n {this.touristicEvents && (\n <label part=\"segment\" class={`segment${state.mode === 'touristicEvents' ? ' selected-segment' : ''}`} onClick={() => this.changeMode('touristicEvents')}>\n {translate[state.language].home.segment.touristicEvents}\n </label>\n )}\n </div>\n </Host>\n );\n }\n}\n",":host {\n display: flex;\n align-items: center;\n .icon {\n display: flex;\n }\n #language-select {\n border: none;\n background-color: var(--color-background);\n &:focus-visible {\n outline: none;\n }\n }\n}\n","import { Component, Host, h } from '@stencil/core';\nimport state from 'store/store';\nimport TranslateIcon from '../../assets/translate.svg';\n\n@Component({\n tag: 'grw-select-language',\n styleUrl: 'grw-select-language.scss',\n shadow: true,\n})\nexport class GrwSelectLanguage {\n handleSelect(event) {\n state.treks = null;\n state.currentTreks = null;\n state.currentTrek = null;\n state.language = event.target.value;\n }\n\n render() {\n return (\n <Host>\n <span part=\"select-language-icon\" class=\"icon\" innerHTML={TranslateIcon}></span>\n <select part=\"select-language-select\" onInput={event => this.handleSelect(event)} name=\"languages\" id=\"language-select\">\n {state.languages.map(language => (\n <option part=\"select-language-option\" selected={language === state.language} value={language.toLocaleLowerCase()}>\n {language.toLocaleUpperCase()}\n </option>\n ))}\n </select>\n </Host>\n );\n }\n}\n",".md3.switch {\n user-select: none;\n position: relative;\n -webkit-tap-highlight-color: transparent;\n margin: 10px;\n font-family: var(--font-family);\n}\n\n.md3.switch input {\n opacity: 0;\n width: 0;\n height: 0;\n margin: 0;\n padding: 0;\n}\n\n.md3.switch span.slider {\n position: absolute;\n cursor: pointer;\n background-color: var(--color-primary-container);\n width: 48px;\n height: 28px;\n border-radius: 28px;\n border: 2px solid var(--color-outline);\n transition: background-color 0.1s ease-in-out, border-color 0.1s ease-in-out;\n}\n\n/* thumb */\n.md3.switch span.slider::before {\n position: absolute;\n content: '';\n height: 16px;\n width: 16px;\n left: 0px;\n margin: 6px;\n background-color: var(--color-outline);\n border-radius: 28px;\n transition: left 175ms cubic-bezier(0, 0.5, 0.5, 1.5), background-color 0.1s ease-in-out, height 50ms ease-in-out, width 50ms ease-in-out, margin 50ms ease-in-out;\n}\n\n.md3.switch span.slider span.icon {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n left: 0px;\n margin: 6px 0px;\n height: 16px;\n width: 16px;\n font-size: 16px;\n text-align: center;\n opacity: 0;\n transition: left 175ms cubic-bezier(0, 0.5, 0.5, 1.5);\n color: var(--color-surface-variant);\n}\n\n.md3.switch input:checked + span.slider {\n background-color: var(--color-primary);\n border-color: transparent;\n}\n\n.md3.switch input:checked + span.slider::before {\n background-color: var(--color-on-primary);\n height: 24px;\n width: 24px;\n left: 20px;\n margin: 2px;\n}\n\n.md3.switch input:not(:disabled):hover + span.slider::before {\n background-color: var(--color-on-surface-variant);\n}\n\n.md3.switch input:not(:disabled):checked:hover + span.slider::before {\n background-color: var(--color-primary-container);\n}\n\n.md3.switch input:not(:disabled):active + span.slider::before {\n height: 28px;\n width: 28px;\n margin: 0px;\n}\n\n.md3.switch input:not(:disabled):checked:active + span.slider::before {\n background-color: var(--color-primary-container);\n}\n\n.md3.switch input:checked + span.slider span.icon {\n left: 26px;\n opacity: 1;\n color: var(--color-on-primary-container);\n}\n\n.md3.switch input:focus-visible + span.slider {\n outline: 2px solid var(--color-primary);\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\nimport DoneIcon from '../../assets/done.svg';\n\n@Component({\n tag: 'grw-switch',\n styleUrl: 'grw-switch.scss',\n shadow: true,\n})\nexport class GrwSwitch {\n @Prop() action: Function;\n\n @Prop() fontFamily = 'Roboto';\n\n @Prop() checked: boolean;\n\n render() {\n return (\n <Host\n style={{\n '--font-family': this.fontFamily,\n }}\n >\n <label class=\"md3 switch\">\n <input checked={this.checked} onChange={() => this.action()} type=\"checkbox\" id=\"darkmode\" name=\"darkmode\" />\n <span class=\"slider\">\n <span part=\"icon\" class=\"icon\" innerHTML={DoneIcon}></span>\n </span>\n </label>\n </Host>\n );\n }\n}\n",":host {\n width: 100%;\n height: 100%;\n overflow-y: auto;\n}\n\ngrw-touristic-content-card {\n display: flex;\n justify-content: center;\n margin: 0px 8px 16px 8px;\n flex: 1 1 300px;\n max-width: 350px;\n}\n\n:host(.large-view) grw-touristic-content-card {\n flex: 1 1 100%;\n max-width: none;\n}\n\n.list-bottom-space {\n height: 104px;\n}\n\n.list-large-view-bottom-space {\n height: 52px;\n}\n\n.current-touristic-contents-within-bounds-length {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 16px;\n color: var(--color-on-surface-variant);\n font-size: 22px;\n line-height: 28px;\n font-weight: 400;\n font-family: var(--font-family);\n}\n\n.touristic-contents-list-container {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-around;\n}\n","import { Component, Host, h, Element, State, Prop } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport state, { onChange } from 'store/store';\nimport { TouristicContents } from 'types/types';\n\n@Component({\n tag: 'grw-touristic-contents-list',\n styleUrl: 'grw-touristic-contents-list.scss',\n shadow: true,\n})\nexport class GrwTouristicContentsList {\n @Element() element: HTMLElement;\n @State() touristicContentsToDisplay: TouristicContents = [];\n\n @Prop() fontFamily = 'Roboto';\n @Prop() colorPrimaryApp = '#6b0030';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorSecondaryContainer = '#e8def8';\n @Prop() colorOnSecondaryContainer = '#1d192b';\n @Prop() colorSurfaceContainerLow = '#f7f2fa';\n\n @Prop() isLargeView = false;\n step = 10;\n shouldAddInfiniteScrollEvent = true;\n\n handleInfiniteScrollBind: (event: any) => void = this.handleInfiniteScroll.bind(this);\n\n connectedCallback() {\n this.handleInfiniteScrollEvent(true);\n if (state.currentTouristicContents) {\n this.touristicContentsToDisplay = [...state.currentTouristicContents.slice(0, this.step)];\n }\n onChange('currentTouristicContents', () => {\n this.handleInfiniteScrollEvent(true);\n this.element.scroll({ top: 0 });\n if (state.currentTouristicContents) {\n this.touristicContentsToDisplay = [...state.currentTouristicContents.slice(0, this.step)];\n }\n });\n onChange('touristicContentsWithinBounds', () => {\n this.handleInfiniteScrollEvent(true);\n this.element.scroll({ top: 0 });\n if (state.touristicContentsWithinBounds) {\n this.touristicContentsToDisplay = [...state.touristicContentsWithinBounds.slice(0, this.step)];\n }\n });\n }\n\n handleInfiniteScroll(event: any) {\n if (event.composedPath()[0].scrollTop + event.composedPath()[0].scrollHeight / 2 >= event.composedPath()[0].scrollHeight) {\n if (this.touristicContentsToDisplay.length < state.touristicContentsWithinBounds.length) {\n this.touristicContentsToDisplay = state.touristicContentsWithinBounds.slice(\n 0,\n this.touristicContentsToDisplay.length + this.step >= state.touristicContentsWithinBounds.length\n ? state.touristicContentsWithinBounds.length\n : this.touristicContentsToDisplay.length + this.step,\n );\n } else {\n this.handleInfiniteScrollEvent(false);\n }\n }\n }\n\n handleInfiniteScrollEvent(shouldAddInfiniteScrollEvent: boolean) {\n if (shouldAddInfiniteScrollEvent) {\n if (this.shouldAddInfiniteScrollEvent) {\n this.element.addEventListener('scroll', this.handleInfiniteScrollBind);\n this.shouldAddInfiniteScrollEvent = !shouldAddInfiniteScrollEvent;\n }\n } else {\n this.element.removeEventListener('scroll', this.handleInfiniteScrollBind);\n this.shouldAddInfiniteScrollEvent = !shouldAddInfiniteScrollEvent;\n }\n }\n\n disconnectedCallback() {\n this.handleInfiniteScrollEvent(false);\n }\n\n render() {\n return (\n <Host class={{ 'large-view': this.isLargeView }} style={{ '--font-family': this.fontFamily, '--color-primary-app': this.colorPrimaryApp }}>\n {state.touristicContentsWithinBounds && (\n <div part=\"current-touristic-contents-within-bounds-length\" class=\"current-touristic-contents-within-bounds-length\">{`${state.touristicContentsWithinBounds.length} ${\n state.touristicContentsWithinBounds.length > 1 ? translate[state.language].home.touristicContents : translate[state.language].home.touristicContent\n }`}</div>\n )}\n <div part=\"touristic-contents-list-container\" class=\"touristic-contents-list-container\">\n {this.touristicContentsToDisplay.map(touristicContent => (\n <grw-touristic-content-card\n exportparts=\"touristic-content-card,touristic-content-img-container,swiper-touristic-content,swiper-wrapper,swiper-slide,touristic-content-img,default-touristic-content-img,swiper-pagination,swiper-button-prev,swiper-button-next,touristic-content-sub-container,touristic-content-category-container,touristic-content-category-img,touristic-content-category-name,touristic-content-name,touristic-content-more-detail-container,more-details-button\"\n fontFamily={this.fontFamily}\n key={`touristic-content-${touristicContent.id}`}\n touristicContent={touristicContent}\n is-large-view={this.isLargeView}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n ></grw-touristic-content-card>\n ))}\n </div>\n <div part=\"list-bottom-space\" class={!this.isLargeView ? 'list-bottom-space' : 'list-large-view-bottom-space'}></div>\n </Host>\n );\n }\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { getTouristicContentCategory, getTouristicContentsList } from 'services/touristic-contents.service';\nimport { getCities, getDistricts } from 'services/treks.service';\nimport state from 'store/store';\nimport { getCacheMode } from 'utils/utils';\n\n@Component({\n tag: 'grw-touristic-contents-provider',\n shadow: true,\n})\nexport class GrwTouristicContentsProvider {\n @Prop() languages = 'fr';\n @Prop() api: string;\n @Prop() inBbox: string;\n @Prop() cities: string;\n @Prop() districts: string;\n @Prop() structures: string;\n @Prop() themes: string;\n @Prop() portals: string;\n\n controller = new AbortController();\n signal = this.controller.signal;\n init: RequestInit = { cache: getCacheMode(), 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.handleTouristicContents();\n }\n\n handleTouristicContents() {\n let touristicContentsRequest = getTouristicContentsList(\n state.api,\n state.language,\n this.inBbox,\n this.cities,\n this.districts,\n this.structures,\n this.themes,\n this.portals,\n this.init,\n );\n\n const requests = [];\n requests.push(!state.districts ? getDistricts(state.api, state.language, this.init) : new Response('null'));\n requests.push(!state.touristicContentCategories ? getTouristicContentCategory(state.api, state.language, this.portals, this.init) : new Response('null'));\n try {\n Promise.all([...requests, touristicContentsRequest])\n .then(responses => Promise.all(responses.map(response => response.json())))\n .then(async ([districts, touristicContentCategory, touristicContents]) => {\n state.networkError = false;\n\n if (districts) {\n state.districts = districts.results;\n }\n if (touristicContentCategory) {\n state.touristicContentCategories = touristicContentCategory.results;\n }\n state.touristicContents = touristicContents.results;\n state.currentTouristicContents = touristicContents.results;\n\n if (!state.cities || state.cities.length === 0) {\n const cityIds = new Set<number>();\n if (touristicContents && touristicContents.results) {\n touristicContents.results.forEach(item => {\n if (item.cities) {\n item.cities.forEach(c => cityIds.add(c));\n }\n });\n }\n if (cityIds.size > 0) {\n try {\n const citiesResponse = await getCities(state.api, state.language, this.init, Array.from(cityIds));\n const citiesData = await citiesResponse.json();\n state.cities = citiesData.results || [];\n } catch (e) {\n console.error('Failed to load cities', e);\n }\n }\n }\n });\n } catch (error) {\n if (!(error.code === DOMException.ABORT_ERR)) {\n state.networkError = true;\n }\n }\n }\n\n disconnectedCallback() {\n this.controller.abort();\n state.networkError = false;\n }\n\n render() {\n return <Host></Host>;\n }\n}\n",":host {\n width: 100%;\n height: 100%;\n overflow-y: auto;\n}\n\ngrw-touristic-event-card {\n display: flex;\n justify-content: center;\n margin: 0px 8px 16px 8px;\n flex: 1 1 300px;\n max-width: 350px;\n}\n\n:host(.large-view) grw-touristic-event-card {\n flex: 1 1 100%;\n max-width: none;\n}\n\n.list-bottom-space {\n height: 104px;\n}\n\n.list-large-view-bottom-space {\n height: 52px;\n}\n\n.current-touristic-events-within-bounds-length {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 16px;\n color: var(--color-on-surface-variant);\n font-size: 22px;\n line-height: 28px;\n font-weight: 400;\n font-family: var(--font-family);\n}\n\n.touristic-events-list-container {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-around;\n}\n","import { Component, Host, h, Element, State, Prop } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport state, { onChange } from 'store/store';\nimport { TouristicEvents } from 'types/types';\n\n@Component({\n tag: 'grw-touristic-events-list',\n styleUrl: 'grw-touristic-events-list.scss',\n shadow: true,\n})\nexport class GrwTouristicContentsList {\n @Element() element: HTMLElement;\n @State() touristicEventsToDisplay: TouristicEvents = [];\n\n @Prop() fontFamily = 'Roboto';\n @Prop() colorPrimaryApp = '#6b0030';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorSecondaryContainer = '#e8def8';\n @Prop() colorOnSecondaryContainer = '#1d192b';\n @Prop() colorSurfaceContainerLow = '#f7f2fa';\n\n @Prop() isLargeView = false;\n step = 10;\n shouldAddInfiniteScrollEvent = true;\n\n handleInfiniteScrollBind: (event: any) => void = this.handleInfiniteScroll.bind(this);\n\n connectedCallback() {\n this.handleInfiniteScrollEvent(true);\n if (state.currentTouristicEvents) {\n this.touristicEventsToDisplay = [...state.currentTouristicEvents.slice(0, this.step)];\n }\n onChange('currentTouristicEvents', () => {\n this.handleInfiniteScrollEvent(true);\n this.element.scroll({ top: 0 });\n if (state.currentTouristicContents) {\n this.touristicEventsToDisplay = [...state.currentTouristicEvents.slice(0, this.step)];\n }\n });\n onChange('touristicEventsWithinBounds', () => {\n this.handleInfiniteScrollEvent(true);\n this.element.scroll({ top: 0 });\n if (state.touristicEventsWithinBounds) {\n this.touristicEventsToDisplay = [...state.touristicEventsWithinBounds.slice(0, this.step)];\n }\n });\n }\n\n handleInfiniteScroll(event: any) {\n if (event.composedPath()[0].scrollTop + event.composedPath()[0].scrollHeight / 2 >= event.composedPath()[0].scrollHeight) {\n if (this.touristicEventsToDisplay.length < state.touristicEventsWithinBounds.length) {\n this.touristicEventsToDisplay = state.touristicEventsWithinBounds.slice(\n 0,\n this.touristicEventsToDisplay.length + this.step >= state.touristicEventsWithinBounds.length\n ? state.touristicEventsWithinBounds.length\n : this.touristicEventsToDisplay.length + this.step,\n );\n } else {\n this.handleInfiniteScrollEvent(false);\n }\n }\n }\n\n handleInfiniteScrollEvent(shouldAddInfiniteScrollEvent: boolean) {\n if (shouldAddInfiniteScrollEvent) {\n if (this.shouldAddInfiniteScrollEvent) {\n this.element.addEventListener('scroll', this.handleInfiniteScrollBind);\n this.shouldAddInfiniteScrollEvent = !shouldAddInfiniteScrollEvent;\n }\n } else {\n this.element.removeEventListener('scroll', this.handleInfiniteScrollBind);\n this.shouldAddInfiniteScrollEvent = !shouldAddInfiniteScrollEvent;\n }\n }\n\n disconnectedCallback() {\n this.handleInfiniteScrollEvent(false);\n }\n\n render() {\n return (\n <Host class={{ 'large-view': this.isLargeView }} style={{ '--font-family': this.fontFamily, '--color-primary-app': this.colorPrimaryApp }}>\n {state.touristicEventsWithinBounds && (\n <div part=\"current-touristic-events-within-bounds-length\" class=\"current-touristic-events-within-bounds-length\">{`${state.touristicEventsWithinBounds.length} ${\n state.touristicEventsWithinBounds.length > 1 ? translate[state.language].home.touristicEvents : translate[state.language].home.touristicEvent\n }`}</div>\n )}\n <div part=\"touristic-events-list-container\" class=\"touristic-events-list-container\">\n {this.touristicEventsToDisplay.map(touristicEvent => (\n <grw-touristic-event-card\n exportparts=\"touristic-event-card,touristic-event-img-container,swiper-touristic-event,swiper-wrapper,swiper-slide,touristic-event-img,default-touristic-event-img,swiper-pagination,swiper-button-prev,swiper-button-next,touristic-event-sub-container,touristic-event-sub-container,touristic-event-type-img,touristic-event-type-name,touristic-event-name,touristic-event-date-container,touristic-event-date,touristic-event-more-detail-container,more-details-button\"\n key={`touristic-event-${touristicEvent.id}`}\n touristicEvent={touristicEvent}\n is-large-view={this.isLargeView}\n fontFamily={this.fontFamily}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n ></grw-touristic-event-card>\n ))}\n </div>\n <div part=\"list-bottom-space\" class={!this.isLargeView ? 'list-bottom-space' : 'list-large-view-bottom-space'}></div>\n </Host>\n );\n }\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { getTouristicEventsList, getTouristicEventType } from 'services/touristic-events.service';\nimport { getCities, getDistricts } from 'services/treks.service';\nimport state from 'store/store';\nimport { getCacheMode } from 'utils/utils';\n\n@Component({\n tag: 'grw-touristic-events-provider',\n shadow: true,\n})\nexport class GrwTouristicEventsProvider {\n @Prop() languages = 'fr';\n @Prop() api: string;\n @Prop() inBbox: string;\n @Prop() cities: string;\n @Prop() districts: string;\n @Prop() structures: string;\n @Prop() themes: string;\n @Prop() portals: string;\n\n controller = new AbortController();\n signal = this.controller.signal;\n init: RequestInit = { cache: getCacheMode(), 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.handleTouristicEvents();\n }\n\n handleTouristicEvents() {\n let touristicEventsRequest = getTouristicEventsList(state.api, state.language, this.inBbox, this.cities, this.districts, this.structures, this.themes, this.portals, this.init);\n\n const requests = [];\n requests.push(!state.districts ? getDistricts(state.api, state.language, this.init) : new Response('null'));\n requests.push(!state.touristicEventTypes ? getTouristicEventType(state.api, state.language, this.portals, this.init) : new Response('null'));\n\n try {\n Promise.all([...requests, touristicEventsRequest])\n .then(responses => Promise.all(responses.map(response => response.json())))\n .then(async ([districts, touristicEventTypes, touristicEvents]) => {\n state.networkError = false;\n\n if (districts) {\n state.districts = districts.results;\n }\n if (touristicEventTypes) {\n state.touristicEventTypes = touristicEventTypes.results;\n }\n state.touristicEvents = touristicEvents.results;\n state.currentTouristicEvents = touristicEvents.results;\n\n if (!state.cities || state.cities.length === 0) {\n const cityIds = new Set<number>();\n if (touristicEvents && touristicEvents.results) {\n touristicEvents.results.forEach(item => {\n if (item.cities) {\n item.cities.forEach(c => cityIds.add(c));\n }\n });\n }\n if (cityIds.size > 0) {\n try {\n const citiesResponse = await getCities(state.api, state.language, this.init, Array.from(cityIds));\n const citiesData = await citiesResponse.json();\n state.cities = citiesData.results || [];\n } catch (e) {\n console.error('Failed to load cities', e);\n }\n }\n }\n });\n } catch (error) {\n if (!(error.code === DOMException.ABORT_ERR)) {\n state.networkError = true;\n }\n }\n }\n\n disconnectedCallback() {\n this.controller.abort();\n state.networkError = false;\n }\n\n render() {\n return <Host></Host>;\n }\n}\n","@use '~swiper/swiper.scss';\n@use '~swiper/modules/navigation/navigation.scss';\n@use '~swiper/modules/pagination/pagination.scss';\n@use '~swiper/modules/scrollbar/scrollbar.scss';\n\n.swiper {\n z-index: 0;\n}\n\n:host {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n overflow: hidden;\n --swiper-navigation-size: 24px;\n --swiper-navigation-color: var(--color-on-primary-container);\n --swiper-pagination-color: var(--color-primary-container);\n --swiper-pagination-bullet-size: 12px;\n .swiper-button-prev,\n .swiper-button-next {\n background-color: var(--color-primary-container);\n padding: 4px;\n width: 32px;\n height: 32px;\n border-radius: var(--border-radius, 32px);\n box-shadow: var(--elevation-1);\n &:hover {\n box-shadow: var(--elevation-2);\n }\n }\n}\n\ngrw-trek-detail {\n overflow: hidden;\n}\n\n.trek-options {\n z-index: 9;\n flex-shrink: 0;\n display: flex;\n position: sticky;\n top: 0px;\n left: 0px;\n width: 100%;\n min-height: 32px;\n padding: 8px 0px;\n background-color: var(--color-background);\n overflow-x: auto;\n font-family: var(--font-family);\n &::-webkit-scrollbar {\n height: 5px;\n }\n &::-webkit-scrollbar-thumb {\n background: var(--color-primary-app);\n border-radius: 8px;\n }\n .trek-option {\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: 16px;\n font-size: 22px;\n line-height: 28px;\n font-weight: 500;\n white-space: nowrap;\n text-decoration: none;\n color: var(--color-on-surface);\n transition-property: color;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 0.3s;\n &:hover {\n color: var(--color-primary-app);\n }\n @media (hover: none) {\n &:not(.selected-trek-option):hover {\n color: inherit;\n }\n }\n }\n .trek-option:last-of-type {\n margin-right: 16px;\n }\n .selected-trek-option {\n color: var(--color-primary-app);\n }\n .trek-indicator-selected-trek-option {\n position: absolute;\n bottom: 8px;\n height: 2px;\n background-image: linear-gradient(var(--color-primary-app), var(--color-primary-app));\n background-repeat: no-repeat;\n transition: transform 0.5s ease, background-size 0.5s ease 0.5s;\n margin-left: 16px;\n background-position: center;\n }\n}\n.trek-detail-container {\n font-family: var(--font-family);\n color: var(--color-on-surface);\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n .trek-name {\n color: var(--color-primary-app);\n font-size: 32px;\n line-height: 28px;\n font-weight: 600;\n padding: 0px 24px;\n margin: 16px 0px;\n }\n .trek-img {\n cursor: pointer;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n .default-trek-img {\n background-color: var(--color-primary-container);\n object-fit: contain;\n }\n .sub-container {\n padding: 24px 24px 0px 24px;\n .icons-labels-container {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex-wrap: wrap;\n gap: 16px;\n .icon-label {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n .icon {\n display: flex;\n width: 24px;\n height: 24px;\n color: var(--color-primary-app);\n margin-right: 8px;\n }\n .network {\n &:not(:last-child) {\n margin-right: 16px;\n }\n }\n }\n .practice {\n .icon {\n display: flex;\n background-color: var(--color-primary-app);\n }\n }\n .network {\n display: flex;\n align-items: center;\n }\n }\n }\n .row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n .downloads-container {\n padding: 0px 24px 0px 24px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .download-title {\n color: var(--color-on-surface);\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n }\n .links-container {\n display: flex;\n flex-wrap: wrap;\n a {\n margin-top: 8px;\n background-color: var(--color-primary-container);\n color: var(--color-on-primary-container);\n border-radius: var(--border-radius, 8px);\n padding: 8px 16px;\n box-shadow: var(--elevation-1);\n height: 32px;\n gap: 8px;\n box-sizing: border-box;\n text-align: start;\n vertical-align: middle;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n position: relative;\n text-decoration: none;\n font-family: var(--font-family);\n &:nth-child(2) {\n margin: 8px 12px 0px 12px;\n }\n &:hover {\n box-shadow: var(--elevation-2);\n }\n .icon {\n display: flex;\n }\n }\n }\n }\n .themes-container {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex-wrap: wrap;\n padding: 0px 24px 0px 24px;\n .theme {\n background-color: var(--color-secondary-container);\n color: var(--color-on-secondary-container);\n border-radius: var(--border-radius, 40px);\n padding: 8px 16px;\n margin: 0px 8px 8px 0px;\n box-shadow: var(--elevation-0);\n height: 32px;\n gap: 8px;\n box-sizing: border-box;\n text-align: start;\n vertical-align: middle;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n position: relative;\n }\n }\n .ambiance,\n .description-teaser,\n .description-container,\n .altimetric-profile-container,\n .access-container,\n .public-transport-container,\n .advice-container,\n .advised-parking-container,\n .sensitive-areas-container,\n .source-container,\n .accessibilities-container,\n .parent-trek-container,\n .weather-container,\n .weblinks-container {\n padding: 0px 24px 0px 24px;\n }\n .ambiance,\n .description-teaser,\n .description-container,\n .altimetric-profile-container,\n .access-container,\n .public-transport-container,\n .advice-container,\n .advised-parking-container,\n .sensitive-areas-container,\n .information-desks-container,\n .pois-container,\n .source-container,\n .accessibilities-container,\n .weather-container,\n .parent-trek-container,\n .step-container,\n .touristic-content-container,\n .touristic-event-container,\n .weblinks-container {\n font-size: 16px;\n line-height: 24px;\n font-weight: 400;\n a {\n color: var(--color-primary-app);\n }\n }\n .description-teaser {\n font-weight: 600;\n font-size: 22px;\n margin-bottom: 8px;\n }\n .description-title,\n .altimetric-profile-title,\n .access-title,\n .public-transport-title,\n .advice-title,\n .advised-parking-title,\n .sensitive-areas-title,\n .information-desks-title,\n .pois-title,\n .source-title,\n .accessibilities-title,\n .step-title,\n .parent-trek-title,\n .touristic-content-title,\n .touristic-event-title,\n .weblinks-title {\n color: var(--color-on-surface);\n font-size: 22px;\n line-height: 28px;\n font-weight: 400;\n font-weight: bold;\n }\n\n .access {\n margin-bottom: 16px;\n }\n\n .advised-parking-title {\n font-size: 16px;\n }\n\n .description-title,\n .altimetric-profile-title,\n .access-title,\n .public-transport-title,\n .advice-title,\n .advised-parking-title,\n .sensitive-areas-title,\n .information-desks-title,\n .pois-title,\n .source-title,\n .accessibilities-title,\n .parent-trek-title,\n .touristic-content-title,\n .touristic-event-title,\n .weblinks-title {\n margin-bottom: 16px;\n }\n\n .step-title {\n margin-bottom: 12px;\n }\n\n .information-desks-title,\n .pois-title,\n .step-title,\n .touristic-content-title,\n .touristic-event-title {\n padding: 0px 24px 0px 24px;\n }\n\n .parent-trek-title {\n cursor: pointer;\n user-select: none;\n font-weight: 500;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n box-shadow: var(--elevation-0);\n border: none;\n -webkit-tap-highlight-color: transparent;\n line-height: 20px;\n color: var(--color-primary);\n background-color: transparent;\n div {\n margin-right: 4px;\n }\n }\n\n .accessibility-emergency-number-content {\n a {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: row;\n border-radius: var(--border-radius, 40px);\n background-color: var(--color-primary-container);\n color: var(--color-on-primary-container);\n text-decoration: none;\n font-weight: 600;\n width: fit-content;\n padding: 8px 16px;\n box-shadow: var(--elevation-1);\n height: 32px;\n gap: 8px;\n box-sizing: border-box;\n text-align: start;\n vertical-align: middle;\n position: relative;\n font-family: var(--font-family);\n &:hover {\n box-shadow: var(--elevation-2);\n }\n }\n }\n}\n\n.description-container {\n .description {\n ol {\n position: relative;\n counter-reset: referencePoint;\n &:before {\n content: '';\n position: absolute;\n width: 4px;\n top: 0px;\n bottom: 0px;\n left: 14px;\n background-color: var(--color-primary-app);\n }\n li {\n position: relative;\n list-style-type: none;\n counter-increment: referencePoint;\n p {\n margin: 0;\n }\n &:not(:first-child) {\n margin-top: 12px;\n }\n }\n li:before {\n color: var(--reference-point-color);\n background: var(--reference-point-background-color);\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n content: counter(referencePoint);\n width: 24px;\n height: 24px;\n border-radius: 12px;\n font-weight: bold;\n font-size: 0.8em;\n margin-left: -36px;\n top: calc(50% - 12px);\n }\n }\n }\n}\n\n.current-advice-container,\n.gear-container {\n display: flex;\n padding: 12px;\n border: 2px solid var(--color-outline);\n border-radius: var(--border-radius, 12px);\n font-size: 16px;\n .icon img {\n width: 26px;\n margin-right: 8px;\n }\n margin-bottom: 12px;\n}\n\n.label-container {\n padding: 12px;\n border: 2px solid var(--color-outline);\n border-radius: var(--border-radius, 12px);\n margin-bottom: 12px;\n .label-sub-container {\n display: flex;\n align-items: center;\n img {\n width: 26px;\n margin-right: 16px;\n background-color: var(--color-on-surface);\n }\n .label-name {\n color: var(--color-on-surface);\n font-size: 16px;\n line-height: 24px;\n font-weight: 600;\n padding: 12px 0px;\n }\n }\n .label-advice {\n color: var(--color-on-surface);\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n }\n}\n\n.advice-container {\n div:last-child {\n margin-bottom: 0px;\n }\n}\n\n.source-container {\n .source-sub-container {\n display: flex;\n align-items: center;\n img {\n width: 100px;\n margin-right: 16px;\n }\n .source-name {\n color: var(--color-on-surface);\n font-size: 16px;\n line-height: 20px;\n font-weight: 500;\n padding: 12px 0px;\n }\n }\n}\n.weblinks-container {\n .weblink-container {\n display: flex;\n align-items: center;\n width: fit-content;\n font-size: 16px;\n line-height: 20px;\n font-weight: 500;\n padding: 12px 0px;\n img {\n width: 26px;\n margin-right: 16px;\n }\n }\n}\n\n.departure-container,\n.arrival-container,\n.cities-container {\n display: flex;\n align-items: center;\n padding: 0px 24px 24px 24px;\n .departure-title,\n .arrival-title,\n .cities-title {\n color: var(--color-on-surface);\n font-weight: bold;\n white-space: nowrap;\n margin-right: 8px;\n }\n}\n.accessibilities-container {\n div:nth-child(2) {\n div:first-child {\n padding: 0px 0px 12px 0px;\n }\n }\n .accessibilities-content-container {\n padding: 12px 0px 0px 0px;\n display: flex;\n .accessibility-content-container {\n display: flex;\n align-items: center;\n margin: 0px 8px 8px 0px;\n img {\n margin-right: 16px;\n width: 26px;\n }\n }\n }\n .accessibility-level-title,\n .accessibility-slope-title,\n .accessibility-width-title,\n .accessibility-signage-title,\n .accessibility-covering-title,\n .accessibility-exposure-title,\n .accessibility-advice-title,\n .accessibility-emergency-number-title {\n color: var(--color-on-surface);\n font-size: 22px;\n line-height: 28px;\n font-weight: 400;\n padding: 12px 0px;\n }\n}\n\n.weather-container {\n iframe {\n width: 100%;\n }\n}\n\n.swiper-information-desks,\n.swiper-pois,\n.swiper-step,\n.swiper-touristic-content,\n.swiper-touristic-event {\n padding-right: 32px;\n padding-left: 32px;\n padding-bottom: 20px;\n}\n\n.swiper-step {\n padding-bottom: 4px;\n .swiper-wrapper {\n .swiper-slide {\n counter-increment: stepPoint;\n padding-top: 36px;\n }\n .swiper-slide:first-child:before {\n border-top-left-radius: var(--border-radius, 8px);\n border-bottom-left-radius: var(--border-radius, 8px);\n }\n .swiper-slide:before {\n content: '';\n position: absolute;\n top: 6px;\n height: 12px;\n width: calc(100% + 20px);\n background-color: var(--color-secondary-container);\n }\n .swiper-slide:last-child:before {\n border-top-right-radius: 8px;\n border-bottom-right-radius: 8px;\n width: 100%;\n }\n .swiper-slide:after {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n content: counter(stepPoint);\n width: 24px;\n height: 24px;\n background: var(--color-primary-app);\n border-radius: var(--border-radius, 12px);\n font-weight: bold;\n font-size: 0.8em;\n color: white;\n margin-left: calc(50% - 12px);\n top: 0px;\n }\n }\n}\n\n.divider {\n margin: 16px;\n border-top: 1px solid var(--color-outline);\n}\n\n.detail-bottom-space {\n min-height: var(--detail-bottom-space-height);\n height: var(--detail-bottom-space-height);\n width: 100%;\n background-color: var(--color-background);\n}\n\n.trek-images-container {\n display: flex;\n max-width: 100%;\n max-height: 400px;\n}\n\n.descent .icon {\n display: flex;\n transform: rotateX(180deg);\n}\n\n.swiper-horizontal > .swiper-scrollbar,\n.swiper-scrollbar.swiper-scrollbar-horizontal {\n --swiper-scrollbar-sides-offset: 32px;\n}\n\n.swiper-scrollbar-drag {\n background-color: var(--color-primary-app);\n}\n\n.sensitive-areas-description {\n font-size: 16px;\n}\n\n.step-container {\n .swiper-wrapper {\n padding-bottom: 16px;\n }\n}\n\n.trek-image-legend {\n position: absolute;\n top: 16px;\n font-size: 12px;\n color: #ffffff;\n width: 100%;\n text-align: center;\n}\n\n.trek-close-fullscreen-button {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n z-index: 40;\n top: 16px;\n right: 16px;\n color: var(--swiper-navigation-color, var(--swiper-theme-color));\n background-color: var(--color-primary-container);\n padding: 4px;\n width: 32px;\n height: 32px;\n border-radius: var(--border-radius, 32px);\n box-shadow: var(--elevation-1);\n cursor: pointer;\n}\n\n.practice {\n .icon {\n display: flex;\n border-radius: 100%;\n padding: 2px;\n max-height: 20px;\n max-width: 20px;\n }\n}\n\n.offline-button {\n cursor: pointer;\n font-size: 14px;\n border: none;\n background-color: var(--color-primary-container);\n color: var(--color-on-primary-container);\n border-radius: var(--border-radius, 8px);\n padding: 8px 16px;\n box-shadow: var(--elevation-1);\n height: 32px;\n gap: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n &:hover {\n box-shadow: var(--elevation-2);\n }\n .icon {\n display: flex;\n }\n}\n\n.loader-container {\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 120px;\n}\n\n.loader {\n width: 48px;\n height: 48px;\n border: 5px solid var(--color-primary-app);\n border-bottom-color: transparent;\n border-radius: 50%;\n display: inline-block;\n box-sizing: border-box;\n animation: rotation 1s linear infinite;\n}\n\n@keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n","import { Component, Host, h, Prop, State, Event, EventEmitter, Build, Listen, getAssetPath, Fragment } from '@stencil/core';\nimport Swiper, { Navigation, Pagination, Keyboard, FreeMode, Mousewheel, Scrollbar } from 'swiper';\nimport { translate } from 'i18n/i18n';\nimport state, { onChange } from 'store/store';\nimport { Accessibilities, AccessibilityLevel, Difficulty, Labels, Practice, Route, Sources, Themes, Trek, Option, Options, Treks } from 'types/types';\nimport { formatDuration, formatLength, formatAscent, formatDescent, getCacheMode, imagesRegExp } from 'utils/utils';\nimport { getAllDataInStore, getDataInStore, writeOrUpdateDataInStore, writeOrUpdateFilesInStore, writeOrUpdateTilesInStore } from 'services/grw-db.service';\nimport { tileLayerOffline } from 'leaflet.offline';\nimport L from 'leaflet';\nimport { getCities, getDistricts, getPoisNearTrek, getSensitiveAreasNearTrek, getTrek, getTreksList } from 'services/treks.service';\nimport { getTouristicContentCategory, getTouristicContentsNearTrek } from 'services/touristic-contents.service';\nimport { getTouristicEventsNearTrek, getTouristicEventType } from 'services/touristic-events.service';\nimport CloseIcon from '../../assets/close.svg';\nimport TimelapseIcon from '../../assets/timelapse.svg';\nimport OpenInFullIcon from '../../assets/open_in_full.svg';\nimport MovingIcon from '../../assets/moving.svg';\nimport DownloadForOfflineIcon from '../../assets/download_for_offline.svg';\nimport DeleteIcon from '../../assets/delete.svg';\nimport DownloadIcon from '../../assets/download.svg';\nimport WarningIcon from '../../assets/warning.svg';\nimport BackpackIcon from '../../assets/backpack.svg';\nimport CallIcon from '../../assets/call.svg';\n\nconst observerOptions = { threshold: 0 };\nconst presentation: Option = {\n visible: true,\n indicator: false,\n ref: 'presentationOptionRef',\n};\nconst steps: Option = {\n visible: false,\n indicator: false,\n ref: 'stepsOptionRef',\n};\nconst description: Option = {\n visible: false,\n indicator: false,\n ref: 'descriptionOptionRef',\n};\nconst pois: Option = {\n visible: false,\n indicator: false,\n ref: 'poisOptionRef',\n};\nconst recommendations: Option = {\n visible: false,\n indicator: false,\n ref: 'recommendationsOptionRef',\n};\nconst sensitiveArea: Option = {\n visible: false,\n indicator: false,\n ref: 'sensitiveAreaOptionRef',\n};\nconst informationPlaces: Option = {\n visible: false,\n indicator: false,\n ref: 'informationPlacesOptionRef',\n};\nconst accessibility: Option = {\n visible: false,\n indicator: false,\n ref: 'accessibilityOptionRef',\n};\nconst touristicContents: Option = {\n visible: false,\n indicator: false,\n ref: 'touristicContentsOptionRef',\n};\nconst touristicEvents: Option = {\n visible: false,\n indicator: false,\n ref: 'touristicEventsOptionRef',\n};\nconst options: Options = {\n presentation,\n steps,\n description,\n pois,\n recommendations,\n sensitiveArea,\n informationPlaces,\n accessibility,\n touristicContents,\n touristicEvents,\n};\n\n@Component({\n tag: 'grw-trek-detail',\n styleUrl: 'grw-trek-detail.scss',\n shadow: true,\n})\nexport class GrwTrekDetail {\n swiperImages?: Swiper;\n swiperStep?: Swiper;\n swiperPois?: Swiper;\n swiperInformationDesks?: Swiper;\n swiperTouristicContents?: Swiper;\n swiperTouristicEvents?: Swiper;\n swiperImagesRef?: HTMLDivElement;\n prevElImagesRef?: HTMLDivElement;\n nextElImagesRef?: HTMLDivElement;\n paginationElImagesRef?: HTMLDivElement;\n swiperStepRef?: HTMLDivElement;\n swiperPoisRef?: HTMLDivElement;\n swiperInformationDesksRef?: HTMLDivElement;\n swiperTouristicContentsRef?: HTMLDivElement;\n swiperTouristicEventsRef?: HTMLDivElement;\n trekDetailContainerRef?: HTMLElement;\n presentationRef?: HTMLDivElement;\n descriptionRef?: HTMLDivElement;\n parkingRef?: HTMLDivElement;\n recommendationRef?: HTMLDivElement;\n sensitiveAreaRef?: HTMLDivElement;\n informationPlacesRef?: HTMLDivElement;\n poiRef?: HTMLDivElement;\n stepsRef?: HTMLDivElement;\n accessibilityRef?: HTMLDivElement;\n touristicContentsRef?: HTMLDivElement;\n touristicEventsRef?: HTMLDivElement;\n presentationOptionRef?: HTMLAnchorElement;\n stepsOptionRef?: HTMLAnchorElement;\n descriptionOptionRef?: HTMLAnchorElement;\n recommendationsOptionRef?: HTMLAnchorElement;\n accessibilityOptionRef?: HTMLAnchorElement;\n sensitiveAreaOptionRef?: HTMLAnchorElement;\n informationPlacesOptionRef?: HTMLAnchorElement;\n poisOptionRef?: HTMLAnchorElement;\n touristicContentsOptionRef?: HTMLAnchorElement;\n touristicEventsOptionRef?: HTMLAnchorElement;\n stepSwiperScrollbar?: HTMLDivElement;\n poisSwiperScrollbar?: HTMLDivElement;\n informationDesksContentsSwiperScrollbar?: HTMLDivElement;\n touristicContentsSwiperScrollbar?: HTMLDivElement;\n touristicEventsSwiperScrollbar?: HTMLDivElement;\n\n presentationObserver: IntersectionObserver;\n stepsObserver: IntersectionObserver;\n descriptionObserver: IntersectionObserver;\n recommendationsObserver: IntersectionObserver;\n parkingObserver: IntersectionObserver;\n sensitiveAreaObserver: IntersectionObserver;\n informationPlacesObserver: IntersectionObserver;\n accessibilityObserve: IntersectionObserver;\n poiObserver: IntersectionObserver;\n accessibilityObserver: IntersectionObserver;\n touristicContentObserver: IntersectionObserver;\n touristicEventObserver: IntersectionObserver;\n\n hasStep?: boolean;\n\n defaultOptions: Options;\n @Event() descriptionIsInViewport: EventEmitter<boolean>;\n @Event() parkingIsInViewport: EventEmitter<boolean>;\n @Event() sensitiveAreaIsInViewport: EventEmitter<boolean>;\n @Event() informationPlacesIsInViewport: EventEmitter<boolean>;\n @Event() poiIsInViewport: EventEmitter<boolean>;\n @Event() stepsIsInViewport: EventEmitter<boolean>;\n @Event() touristicContentsIsInViewport: EventEmitter<boolean>;\n @Event() touristicEventsIsInViewport: EventEmitter<boolean>;\n @Event() detailScrolled: EventEmitter<void>;\n @Event() parentTrekPress: EventEmitter<number>;\n @State() currentTrek: Trek;\n @State() difficulty: Difficulty;\n @State() route: Route;\n @State() practice: Practice;\n @State() themes: Themes;\n @State() labels: Labels;\n @State() sources: Sources;\n @State() accessibilities: Accessibilities;\n @State() accessibilityLevel: AccessibilityLevel;\n @State() displayFullscreen = false;\n @State() cities: string[];\n @State() options: Options;\n @State() offline = false;\n\n @Prop() emergencyNumber: number;\n\n @Prop() fontFamily = 'Roboto';\n @Prop() colorPrimaryApp = '#6b0030';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorPrimaryContainer = '#eaddff';\n @Prop() colorOnPrimaryContainer = '#21005e';\n @Prop() colorSecondaryContainer = '#e8def8';\n @Prop() colorOnSecondaryContainer = '#1d192b';\n @Prop() colorSurfaceContainerLow = '#f7f2fa';\n @Prop() colorBackground = '#fef7ff';\n @Prop() rounded = true;\n\n @Prop() weather = false;\n @Prop() isLargeView = false;\n\n @Prop() defaultBackgroundLayerUrl;\n @Prop() defaultBackgroundLayerAttribution;\n\n @Prop() enableOffline = false;\n @Prop() globalTilesMinZoomOffline = 0;\n @Prop() globalTilesMaxZoomOffline = 11;\n @Prop() tilesMinZoomOffline = 12;\n @Prop() tilesMaxZoomOffline = 16;\n\n @Prop() grwApp = false;\n\n @Event() downloadConfirm: EventEmitter<number>;\n @Event() downloadedSuccessConfirm: EventEmitter<number>;\n @Event() downloadedErrorConfirm: EventEmitter<number>;\n\n @Event() deleteConfirm: EventEmitter<number>;\n @Event() deleteSuccessConfirm: EventEmitter<number>;\n @Event() deleteErrorConfirm: EventEmitter<number>;\n\n indicatorSelectedTrekOption = { translateX: null, width: null, backgroundSize: null, ref: null };\n\n @State() showTouristicContentDetailsModal = false;\n @State() showTouristicEventDetailsModal = false;\n @State() modalDetailsId = null;\n\n @Listen('closeDetailsModal', { target: 'window' })\n onCloseDetailsModal() {\n document.body.style.overflow = `visible`;\n state.currentTouristicContent = null;\n state.currentTouristicEvent = null;\n this.modalDetailsId = null;\n if (this.showTouristicContentDetailsModal) {\n this.showTouristicContentDetailsModal = false;\n } else {\n this.showTouristicEventDetailsModal = false;\n }\n document.body.getElementsByTagName('grw-details-modal')[0].remove();\n }\n\n @Listen('touristicEventCardPress', { target: 'window' })\n onTouristiceEventCardPress(touristicEventId) {\n if (!this.grwApp) {\n this.modalDetailsId = touristicEventId.detail;\n this.onOpenDetailsModal('TouristicContent');\n const modal = document.createElement('grw-details-modal');\n modal.setAttribute('font-family', this.fontFamily);\n modal.setAttribute('color-background', this.colorBackground);\n modal.setAttribute('color-primary-container', this.colorPrimaryContainer);\n modal.setAttribute('color-on-primary-container', this.colorOnPrimaryContainer);\n modal.setAttribute('rounded', this.rounded.toString());\n const modalContent = document.createElement('grw-touristic-event-detail');\n modalContent.setAttribute('font-family', this.fontFamily);\n modalContent.setAttribute('color-primary-app', this.colorPrimaryApp);\n modalContent.setAttribute('color-on-surface', this.colorOnSurface);\n modalContent.setAttribute('color-primary-container', this.colorPrimaryContainer);\n modalContent.setAttribute('color-on-primary-container', this.colorOnPrimaryContainer);\n modalContent.setAttribute('color-secondary-container', this.colorSecondaryContainer);\n modalContent.setAttribute('color-on-secondary-container', this.colorOnSecondaryContainer);\n modalContent.setAttribute('color-surface-container-low', this.colorSurfaceContainerLow);\n modalContent.setAttribute('color-background', this.colorBackground);\n modal.append(modalContent);\n document.body.append(modal);\n }\n }\n\n @Listen('touristicContentCardPress', { target: 'window' })\n onTouristicContentCardPress(touristicContentId) {\n if (!this.grwApp) {\n this.modalDetailsId = touristicContentId.detail;\n this.onOpenDetailsModal('touristicContent');\n const modal = document.createElement('grw-details-modal');\n modal.setAttribute('font-family', this.fontFamily);\n modal.setAttribute('color-background', this.colorBackground);\n modal.setAttribute('color-primary-container', this.colorPrimaryContainer);\n modal.setAttribute('color-on-primary-container', this.colorOnPrimaryContainer);\n modal.setAttribute('rounded', this.rounded.toString());\n const modalContent = document.createElement('grw-touristic-content-detail');\n modalContent.setAttribute('font-family', this.fontFamily);\n modalContent.setAttribute('color-primary-app', this.colorPrimaryApp);\n modalContent.setAttribute('color-on-surface', this.colorOnSurface);\n modalContent.setAttribute('color-primary-container', this.colorPrimaryContainer);\n modalContent.setAttribute('color-on-primary-container', this.colorOnPrimaryContainer);\n modalContent.setAttribute('color-secondary-container', this.colorSecondaryContainer);\n modalContent.setAttribute('color-on-secondary-container', this.colorOnSecondaryContainer);\n modalContent.setAttribute('color-surface-container-low', this.colorSurfaceContainerLow);\n modalContent.setAttribute('color-background', this.colorBackground);\n modal.append(modalContent);\n document.body.append(modal);\n }\n }\n\n onOpenDetailsModal(modalDetails: 'touristicContent' | 'TouristicContent') {\n document.body.style.overflow = `hidden`;\n if (modalDetails === 'touristicContent') {\n this.showTouristicContentDetailsModal = true;\n } else {\n this.showTouristicEventDetailsModal = true;\n }\n }\n\n componentDidUpdate() {\n this.handleObservers();\n this.handleSwipers();\n }\n\n handleSwipers() {\n if (this.swiperImagesRef && !this.swiperImages) {\n this.swiperImages = new Swiper(this.swiperImagesRef, {\n modules: [Navigation, Pagination, Keyboard, FreeMode, Mousewheel],\n navigation: {\n prevEl: this.prevElImagesRef,\n nextEl: this.nextElImagesRef,\n },\n pagination: { el: this.paginationElImagesRef },\n allowTouchMove: false,\n keyboard: false,\n loop: true,\n });\n if (this.swiperImagesRef) {\n this.swiperImagesRef.onfullscreenchange = () => {\n this.displayFullscreen = !this.displayFullscreen;\n this.displayFullscreen && !this.offline ? this.swiperImages.keyboard.enable() : this.swiperImages.keyboard.disable();\n };\n }\n }\n if (this.swiperStepRef && !this.swiperStep) {\n this.swiperStep = new Swiper(this.swiperStepRef, {\n modules: [FreeMode, Mousewheel, Scrollbar],\n initialSlide: this.getCurrentStepIndex(),\n slidesPerView: 1.5,\n spaceBetween: 20,\n grabCursor: true,\n freeMode: true,\n mousewheel: { forceToAxis: true },\n scrollbar: {\n draggable: true,\n hide: false,\n el: this.stepSwiperScrollbar,\n },\n breakpointsBase: 'container',\n breakpoints: {\n '540': {\n slidesPerView: 2.5,\n },\n '1024': {\n slidesPerView: 4,\n },\n },\n loop: false,\n });\n }\n if (this.swiperPoisRef && !this.swiperPois) {\n this.swiperPois = new Swiper(this.swiperPoisRef, {\n modules: [FreeMode, Mousewheel, Scrollbar],\n slidesPerView: 1.5,\n spaceBetween: 20,\n grabCursor: true,\n freeMode: true,\n mousewheel: { forceToAxis: true },\n scrollbar: {\n draggable: true,\n hide: false,\n el: this.poisSwiperScrollbar,\n },\n breakpointsBase: 'container',\n breakpoints: {\n '540': {\n slidesPerView: 2.5,\n },\n '1024': {\n slidesPerView: 4,\n },\n },\n loop: false,\n });\n }\n if (this.swiperInformationDesksRef && !this.swiperInformationDesks) {\n this.swiperInformationDesks = new Swiper(this.swiperInformationDesksRef, {\n modules: [FreeMode, Mousewheel, Scrollbar],\n slidesPerView: 1.5,\n spaceBetween: 20,\n grabCursor: true,\n freeMode: true,\n mousewheel: { forceToAxis: true },\n scrollbar: {\n draggable: true,\n hide: false,\n el: this.informationDesksContentsSwiperScrollbar,\n },\n breakpointsBase: 'container',\n breakpoints: {\n '540': {\n slidesPerView: 2.5,\n },\n '1024': {\n slidesPerView: 4,\n },\n },\n loop: false,\n });\n }\n if (this.swiperTouristicContentsRef && !this.swiperTouristicContents) {\n this.swiperTouristicContents = new Swiper(this.swiperTouristicContentsRef, {\n modules: [FreeMode, Mousewheel, Scrollbar],\n slidesPerView: 1.5,\n spaceBetween: 20,\n grabCursor: true,\n freeMode: true,\n mousewheel: { forceToAxis: true },\n scrollbar: {\n draggable: true,\n hide: false,\n el: this.touristicContentsSwiperScrollbar,\n },\n breakpointsBase: 'container',\n breakpoints: {\n '540': {\n slidesPerView: 2.5,\n },\n '1024': {\n slidesPerView: 4,\n },\n },\n loop: false,\n });\n }\n if (this.swiperTouristicEventsRef && !this.swiperTouristicEvents) {\n this.swiperTouristicEvents = new Swiper(this.swiperTouristicEventsRef, {\n modules: [FreeMode, Mousewheel, Scrollbar],\n slidesPerView: 1.5,\n spaceBetween: 20,\n grabCursor: true,\n freeMode: true,\n mousewheel: { forceToAxis: true },\n scrollbar: {\n draggable: true,\n hide: false,\n el: this.touristicEventsSwiperScrollbar,\n },\n breakpointsBase: 'container',\n breakpoints: {\n '540': {\n slidesPerView: 2.5,\n },\n '1024': {\n slidesPerView: 4,\n },\n },\n loop: false,\n });\n }\n }\n\n handleObservers() {\n if (this.presentationRef && !this.presentationObserver) {\n this.presentationObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.options = { ...this.options, presentation: { ...this.defaultOptions.presentation, indicator: isIntersecting } };\n this.handleIndicatorSelectedTrekOption();\n },\n observerOptions,\n );\n this.presentationObserver.observe(this.presentationRef);\n }\n if (this.stepsRef && !this.stepsObserver) {\n this.stepsObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.stepsIsInViewport.emit(isIntersecting);\n this.options = { ...this.options, steps: { ...this.defaultOptions.steps, indicator: isIntersecting } };\n this.handleIndicatorSelectedTrekOption();\n },\n observerOptions,\n );\n this.stepsObserver.observe(this.stepsRef);\n }\n if (this.descriptionRef && !this.descriptionObserver) {\n this.descriptionObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.descriptionIsInViewport.emit(isIntersecting);\n this.options = { ...this.options, description: { ...this.defaultOptions.description, indicator: isIntersecting } };\n this.handleIndicatorSelectedTrekOption();\n },\n observerOptions,\n );\n this.descriptionObserver.observe(this.descriptionRef);\n }\n if (this.recommendationRef && !this.recommendationsObserver) {\n this.recommendationsObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.options = { ...this.options, recommendations: { ...this.defaultOptions.recommendations, indicator: isIntersecting } };\n this.handleIndicatorSelectedTrekOption();\n },\n observerOptions,\n );\n this.recommendationsObserver.observe(this.recommendationRef);\n }\n if (this.parkingRef && !this.parkingObserver) {\n this.parkingObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.parkingIsInViewport.emit(isIntersecting);\n },\n observerOptions,\n );\n this.parkingObserver.observe(this.parkingRef);\n }\n\n if (this.sensitiveAreaRef && !this.sensitiveAreaObserver) {\n this.sensitiveAreaObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.sensitiveAreaIsInViewport.emit(isIntersecting);\n this.options = { ...this.options, sensitiveArea: { ...this.defaultOptions.sensitiveArea, indicator: isIntersecting } };\n this.handleIndicatorSelectedTrekOption();\n },\n observerOptions,\n );\n this.sensitiveAreaObserver.observe(this.sensitiveAreaRef);\n }\n\n if (this.informationPlacesRef && !this.informationPlacesObserver) {\n this.informationPlacesObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.informationPlacesIsInViewport.emit(isIntersecting);\n this.options = { ...this.options, informationPlaces: { ...this.defaultOptions.informationPlaces, indicator: isIntersecting } };\n this.handleIndicatorSelectedTrekOption();\n },\n observerOptions,\n );\n this.informationPlacesObserver.observe(this.informationPlacesRef);\n }\n\n if (this.accessibilityRef && !this.accessibilityObserver) {\n this.accessibilityObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.options = { ...this.options, accessibility: { ...this.defaultOptions.accessibility, indicator: isIntersecting } };\n this.handleIndicatorSelectedTrekOption();\n },\n observerOptions,\n );\n this.accessibilityObserver.observe(this.accessibilityRef);\n }\n\n if (this.poiRef && !this.poiObserver) {\n this.poiObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.poiIsInViewport.emit(isIntersecting);\n this.options = { ...this.options, pois: { ...this.defaultOptions.pois, indicator: isIntersecting } };\n this.handleIndicatorSelectedTrekOption();\n },\n observerOptions,\n );\n this.poiObserver.observe(this.poiRef);\n }\n\n if (this.touristicContentsRef && !this.touristicContentObserver) {\n this.touristicContentObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.touristicContentsIsInViewport.emit(isIntersecting);\n this.options = { ...this.options, touristicContents: { ...this.defaultOptions.touristicContents, indicator: isIntersecting } };\n this.handleIndicatorSelectedTrekOption();\n },\n observerOptions,\n );\n this.touristicContentObserver.observe(this.touristicContentsRef);\n }\n if (this.touristicEventsRef && !this.touristicEventObserver) {\n this.touristicEventObserver = new IntersectionObserver(\n entries => {\n const isIntersecting = entries[0].isIntersecting;\n this.touristicEventsIsInViewport.emit(isIntersecting);\n this.options = { ...this.options, touristicEvents: { ...this.defaultOptions.touristicEvents, indicator: isIntersecting } };\n this.handleIndicatorSelectedTrekOption();\n },\n observerOptions,\n );\n this.touristicEventObserver.observe(this.touristicEventsRef);\n }\n }\n\n componentDidLoad() {\n this.handleObservers();\n this.handleSwipers();\n this.setupScrollListener();\n }\n\n setupScrollListener() {\n const container = this.trekDetailContainerRef;\n if (container) {\n const onScroll = () => {\n this.detailScrolled.emit();\n container.removeEventListener('scroll', onScroll);\n };\n container.addEventListener('scroll', onScroll);\n } else {\n const onScroll = () => {\n this.detailScrolled.emit();\n window.removeEventListener('scroll', onScroll);\n };\n window.addEventListener('scroll', onScroll);\n }\n }\n\n async connectedCallback() {\n if (state.currentTrek) {\n this.offline = state.currentTrek.offline;\n this.defaultOptions = this.handleOptions();\n this.options = { ...this.defaultOptions, presentation: { ...this.defaultOptions.presentation, indicator: true } };\n this.difficulty = state.difficulties.find(difficulty => difficulty.id === state.currentTrek.difficulty);\n this.route = state.routes.find(route => route.id === state.currentTrek.route);\n this.practice = state.practices.find(practice => practice.id === state.currentTrek.practice);\n this.themes = state.themes.filter(theme => state.currentTrek.themes.includes(theme.id));\n this.labels = state.labels.filter(label => state.currentTrek.labels.includes(label.id));\n this.sources = state.sources.filter(source => state.currentTrek.source.includes(source.id));\n this.accessibilities = state.accessibilities.filter(accessibility => state.currentTrek.accessibilities.includes(accessibility.id));\n if (state.accessibilitiesLevel) {\n this.accessibilityLevel = state.accessibilitiesLevel.find(accessibilityLevel => state.currentTrek.accessibility_level === accessibilityLevel.id);\n }\n if (state.cities) {\n this.cities = state.currentTrek.cities.map(currentCity => state.cities.find(city => city.id === currentCity)?.name);\n }\n this.hasStep = state.currentTrek.children.length > 0;\n this.currentTrek = state.currentTrek;\n }\n\n onChange('currentTrek', async () => {\n if (state.currentTrek) {\n this.offline = state.currentTrek.offline;\n this.defaultOptions = this.handleOptions();\n this.options = { ...this.defaultOptions, presentation: { ...this.defaultOptions.presentation, indicator: true } };\n this.difficulty = state.difficulties.find(difficulty => difficulty.id === state.currentTrek.difficulty);\n this.route = state.routes.find(route => route.id === state.currentTrek.route);\n this.practice = state.practices.find(practice => practice.id === state.currentTrek.practice);\n this.themes = state.themes.filter(theme => state.currentTrek.themes.includes(theme.id));\n this.labels = state.labels.filter(label => state.currentTrek.labels.includes(label.id));\n this.sources = state.sources.filter(source => state.currentTrek.source.includes(source.id));\n this.accessibilities = state.accessibilities.filter(accessibility => state.currentTrek.accessibilities.includes(accessibility.id));\n if (state.accessibilitiesLevel) {\n this.accessibilityLevel = state.accessibilitiesLevel.find(accessibilityLevel => state.currentTrek.accessibility_level === accessibilityLevel.id);\n }\n if (state.cities) {\n this.cities = state.currentTrek.cities.map(currentCity => state.cities.find(city => city.id === currentCity)?.name);\n }\n this.hasStep = state.currentTrek.children.length > 0;\n this.currentTrek = state.currentTrek;\n }\n });\n }\n\n disconnectedCallback() {\n this.presentationObserver && this.presentationObserver.disconnect();\n this.stepsObserver && this.stepsObserver.disconnect();\n this.descriptionObserver && this.descriptionObserver.disconnect();\n this.recommendationsObserver && this.recommendationsObserver.disconnect();\n this.parkingObserver && this.parkingObserver.disconnect();\n this.sensitiveAreaObserver && this.sensitiveAreaObserver.disconnect();\n this.informationPlacesObserver && this.informationPlacesObserver.disconnect();\n this.accessibilityObserver && this.accessibilityObserver.disconnect();\n this.poiObserver && this.poiObserver.disconnect();\n this.accessibilityObserver && this.accessibilityObserver.disconnect();\n this.touristicContentObserver && this.touristicContentObserver.disconnect();\n this.touristicEventObserver && this.touristicEventObserver.disconnect();\n }\n\n handleOptions() {\n return {\n ...options,\n presentation: { ...presentation },\n steps: { ...steps, visible: Boolean(state.parentTrek) },\n description: { ...description, visible: Boolean(state.currentTrek.description) },\n pois: { ...pois, visible: state.poisData > 0 },\n recommendations: { ...recommendations, visible: Boolean(state.currentTrek.advice || (this.labels && this.labels.length > 0)) },\n sensitiveArea: { ...sensitiveArea, visible: Boolean(state.currentSensitiveAreas && state.currentSensitiveAreas.length > 0) },\n informationPlaces: {\n ...informationPlaces,\n visible: Boolean(\n state.currentInformationDesks &&\n state.currentInformationDesks.filter(currentInformationDesks => state.currentTrek.information_desks.includes(currentInformationDesks.id)).length > 0,\n ),\n },\n accessibility: {\n ...accessibility,\n visible: Boolean(\n state.currentTrek.disabled_infrastructure ||\n (this.accessibilities && this.accessibilities.length > 0) ||\n state.currentTrek.accessibility_level ||\n state.currentTrek.accessibility_slope ||\n state.currentTrek.accessibility_width ||\n state.currentTrek.accessibility_signage ||\n state.currentTrek.accessibility_covering ||\n state.currentTrek.accessibility_exposure ||\n state.currentTrek.accessibility_advice ||\n this.emergencyNumber,\n ),\n },\n touristicContents: { ...touristicContents, visible: state.touristicContentsData > 0 },\n touristicEvents: { ...touristicEvents, visible: state.touristicEventsData > 0 },\n };\n }\n\n handleFullscreen(close: boolean = false) {\n if (!close) {\n if (this.currentTrek.attachments && this.currentTrek.attachments[0] && this.currentTrek.attachments[0].url) {\n this.swiperImagesRef.requestFullscreen();\n }\n } else {\n (document as any).exitFullscreen();\n }\n }\n\n handleIndicatorSelectedTrekOption() {\n let currentOption: Option;\n let currentOptionIndex = -1;\n\n const options: Option[] = Object.values(this.options);\n\n for (let i = 0; i < options.length; i++) {\n if (options[i].indicator) {\n currentOption = options[i];\n currentOptionIndex = i;\n break;\n }\n }\n\n if (currentOption && this[currentOption.ref]) {\n let previousVisibleOptions = 0;\n let previousWidthOptions = 0;\n for (let i = 0; i < currentOptionIndex; i++) {\n if (options[i].visible) {\n previousVisibleOptions += 1;\n previousWidthOptions += this[options[i].ref].clientWidth;\n }\n }\n const elementWidth = this[currentOption.ref].clientWidth;\n this.indicatorSelectedTrekOption = {\n translateX: `${previousWidthOptions + 16 * previousVisibleOptions - elementWidth / 2}px`,\n width: `${elementWidth * 2}px`,\n backgroundSize: `${elementWidth}px 100%`,\n ref: currentOption.ref,\n };\n }\n }\n\n handleScrollTo(element: HTMLDivElement) {\n const scrollbarFromElement = this.trekDetailContainerRef.scrollHeight > this.trekDetailContainerRef.clientHeight;\n if (scrollbarFromElement) {\n this.trekDetailContainerRef.scrollTo({ top: element.offsetTop - 64 });\n } else {\n window.scrollTo({ top: element.offsetTop - 64 });\n }\n }\n\n getCurrentStepIndex(): number {\n return state.currentTrekSteps ? state.currentTrekSteps.findIndex(step => step.id === this.currentTrek.id) : 0;\n }\n\n async downloadGlobalTiles(url, attribution) {\n const offlineLayer = tileLayerOffline(url, { attribution });\n\n const treksDepartureCoordinates = [];\n\n if (state.treks) {\n for (const trek of state.treks) {\n treksDepartureCoordinates.push(trek.departure_geom);\n }\n }\n\n const bounds = L.latLngBounds(treksDepartureCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));\n\n await writeOrUpdateTilesInStore(offlineLayer, bounds, this.globalTilesMinZoomOffline, this.globalTilesMaxZoomOffline);\n }\n\n async downloadTrekTiles(url, attribution) {\n const offlineLayer = tileLayerOffline(url, { attribution });\n\n const bounds = L.latLngBounds(this.currentTrek.geometry.coordinates.map(coordinate => [coordinate[1], coordinate[0]]));\n\n await writeOrUpdateTilesInStore(offlineLayer, bounds, this.tilesMinZoomOffline, this.tilesMaxZoomOffline);\n }\n\n async downloadTrek() {\n try {\n // download treks list data\n const controller = new AbortController();\n const signal = controller.signal;\n const init: RequestInit = { cache: getCacheMode(), signal: signal };\n const offlineTreks = (await getAllDataInStore('treks')).filter(trek => trek.offline === true);\n let treks;\n if (!state.treks) {\n const treksList = await getTreksList(\n state.api,\n state.language,\n state.inBboxFromProviders,\n state.citiesFromProviders,\n state.districts,\n state.structuresFromProviders,\n state.themesFromProviders,\n state.portalsFromProviders,\n state.routesFromProviders,\n state.practicesFromProviders,\n state.labelsFromProviders,\n init,\n );\n state.treks = (await treksList.json()).results;\n }\n treks = state.treks;\n treks = treks.filter(trek => offlineTreks.findIndex(offlineTrek => offlineTrek.id === trek.id) === -1);\n\n if (!state.districts) {\n const districtsList = await getDistricts(state.api, state.language, init);\n state.districts = (await districtsList.json()).results;\n }\n\n await writeOrUpdateDataInStore('treks', treks);\n await writeOrUpdateDataInStore('districts', state.districts);\n\n // download global tiles\n await this.downloadGlobalTiles(this.defaultBackgroundLayerUrl, this.defaultBackgroundLayerAttribution);\n\n // download trek tiles\n await this.downloadTrekTiles(this.defaultBackgroundLayerUrl, this.defaultBackgroundLayerAttribution);\n\n // download global medias\n await writeOrUpdateFilesInStore(state.difficulties, imagesRegExp);\n await writeOrUpdateFilesInStore(state.routes, imagesRegExp);\n await writeOrUpdateFilesInStore(state.practices, imagesRegExp);\n await writeOrUpdateFilesInStore(state.themes, imagesRegExp);\n await writeOrUpdateFilesInStore(state.labels, imagesRegExp);\n await writeOrUpdateFilesInStore(state.districts, imagesRegExp);\n await writeOrUpdateFilesInStore(state.sources, imagesRegExp);\n await writeOrUpdateFilesInStore(state.accessibilities, imagesRegExp);\n\n await writeOrUpdateFilesInStore(state.currentInformationDesks, imagesRegExp);\n await writeOrUpdateFilesInStore(state.networks, imagesRegExp);\n\n // download trek images\n await writeOrUpdateFilesInStore(this.currentTrek, imagesRegExp, true, ['url']);\n\n // download trek data\n await writeOrUpdateDataInStore('difficulties', state.difficulties);\n await writeOrUpdateDataInStore('routes', state.routes);\n await writeOrUpdateDataInStore(\n 'practices',\n state.practices.map(practice => ({ ...practice, selected: false })),\n );\n await writeOrUpdateDataInStore('themes', state.themes);\n await writeOrUpdateDataInStore('accessibilities', state.accessibilities);\n await writeOrUpdateDataInStore('ratings', state.ratings);\n await writeOrUpdateDataInStore('ratingsScale', state.ratingsScale);\n await writeOrUpdateDataInStore('sensitiveAreas', state.currentSensitiveAreas);\n await writeOrUpdateDataInStore('labels', state.labels);\n await writeOrUpdateDataInStore('sources', state.sources);\n await writeOrUpdateDataInStore('accessibilitiesLevel', state.accessibilitiesLevel);\n await writeOrUpdateDataInStore('networks', state.networks);\n await writeOrUpdateDataInStore('signages', state.currentSignages);\n await writeOrUpdateDataInStore('informationDesks', state.currentInformationDesks);\n await writeOrUpdateFilesInStore(state.currentInformationDesks, imagesRegExp, true);\n\n const cities = (await getCities(state.api, state.language, init).then(response => response.json())).results;\n await writeOrUpdateDataInStore('cities', cities);\n\n let currentPois = [];\n let trekTouristicContents = [];\n let trekTouristicEvents = [];\n if (state.poisData > 0) {\n currentPois = (await getPoisNearTrek(state.api, state.language, this.currentTrek.id, init).then(response => response.json())).results;\n const poiTypes = (await fetch(`${state.api}poi_type/?language=${state.language}&fields=id,pictogram`, init).then(response => response.json())).results;\n await writeOrUpdateDataInStore('pois', currentPois);\n await writeOrUpdateDataInStore('poiTypes', poiTypes);\n await writeOrUpdateFilesInStore(currentPois, imagesRegExp, true, ['url']);\n await writeOrUpdateFilesInStore(poiTypes, imagesRegExp);\n }\n if (state.touristicContentsData > 0) {\n trekTouristicContents = (await getTouristicContentsNearTrek(state.api, state.language, this.currentTrek.id, init).then(response => response.json())).results;\n const touristicContentCategories = (await getTouristicContentCategory(state.api, state.language, null, init).then(response => response.json())).results;\n trekTouristicContents.forEach(trekTouristicContent => {\n trekTouristicContent.offline = true;\n });\n await writeOrUpdateDataInStore('touristicContents', trekTouristicContents);\n await writeOrUpdateDataInStore('touristicContentCategories', touristicContentCategories);\n await writeOrUpdateFilesInStore(trekTouristicContents, imagesRegExp, true, ['url']);\n await writeOrUpdateFilesInStore(touristicContentCategories, imagesRegExp);\n }\n if (state.touristicEventsData > 0) {\n trekTouristicEvents = (await getTouristicEventsNearTrek(state.api, state.language, this.currentTrek.id, init).then(response => response.json())).results;\n const touristicEventTypes = (await getTouristicEventType(state.api, state.language, null, init).then(response => response.json())).results;\n trekTouristicEvents.forEach(trekTouristicEvent => {\n trekTouristicEvent.offline = true;\n });\n await writeOrUpdateDataInStore('touristicEvents', trekTouristicEvents);\n await writeOrUpdateDataInStore('touristicEventTypes', touristicEventTypes);\n await writeOrUpdateFilesInStore(touristicEventTypes, imagesRegExp);\n await writeOrUpdateFilesInStore(trekTouristicEvents, imagesRegExp, true, ['url']);\n }\n\n // download itinerancy\n if (this.currentTrek.children && this.currentTrek.children.length > 0) {\n // fetch and store children treks\n const steps: number[] = [];\n steps.push(...this.currentTrek.children);\n const stepRequests = [];\n const stepsTouristicContentsRequests = [];\n const stepsTouristicEventsRequests = [];\n const stepsPoisRequests = [];\n const stepsSensitiveAreasRequests = [];\n\n steps.forEach(stepId => {\n stepRequests.push(getTrek(state.api, state.language, stepId, init));\n stepsTouristicContentsRequests.push(getTouristicContentsNearTrek(state.api, state.language, stepId, init));\n stepsTouristicEventsRequests.push(getTouristicEventsNearTrek(state.api, state.language, stepId, init));\n stepsPoisRequests.push(getPoisNearTrek(state.api, state.language, stepId, init));\n stepsSensitiveAreasRequests.push(getSensitiveAreasNearTrek(state.api, state.language, stepId, init));\n });\n\n const trekSteps: Treks = await Promise.all([...stepRequests]).then(responses => Promise.all(responses.map(response => response.json())));\n\n const stepsTouristicContentsResponses = await Promise.all([...stepsTouristicContentsRequests]).then(responses => Promise.all(responses.map(response => response.json())));\n const stepsTouristicEventsResponses = await Promise.all([...stepsTouristicEventsRequests]).then(responses => Promise.all(responses.map(response => response.json())));\n const stepsPoisResponses = await Promise.all([...stepsPoisRequests]).then(responses => Promise.all(responses.map(response => response.json())));\n const stepsSensitiveAreasResponses = await Promise.all([...stepsSensitiveAreasRequests]).then(responses => Promise.all(responses.map(response => response.json())));\n\n for (let index = 0; index < trekSteps.length; index++) {\n trekSteps[index].offline = true;\n trekSteps[index].pois = stepsPoisResponses[index].results.map(poi => poi.id);\n trekSteps[index].touristicContents = stepsTouristicContentsResponses[index].results.map(trekTouristicContent => trekTouristicContent.id);\n trekSteps[index].touristicEvents = stepsTouristicEventsResponses[index].results.map(trekTouristicEvent => trekTouristicEvent.id);\n trekSteps[index].sensitiveAreas = stepsSensitiveAreasResponses[index].results.map(currentSensitiveArea => currentSensitiveArea.id);\n await writeOrUpdateDataInStore('treks', [trekSteps[index]]);\n await writeOrUpdateFilesInStore(trekSteps[index], imagesRegExp, true, ['url']);\n }\n }\n\n await writeOrUpdateDataInStore('treks', [\n {\n ...this.currentTrek,\n offline: true,\n pois: currentPois.map(poi => poi.id),\n signages: state.currentSignages.map(signage => signage.id),\n touristicContents: trekTouristicContents.map(trekTouristicContent => trekTouristicContent.id),\n touristicEvents: trekTouristicEvents.map(trekTouristicEvent => trekTouristicEvent.id),\n sensitiveAreas: state.currentSensitiveAreas ? state.currentSensitiveAreas.map(currentSensitiveArea => currentSensitiveArea.id) : [],\n },\n ]);\n state.treks.find(trek => trek.id === this.currentTrek.id).offline = true;\n if (!state.currentTreks) {\n state.currentTreks = state.treks;\n }\n state.currentTreks.find(trek => trek.id === this.currentTrek.id).offline = true;\n if (this.swiperImages) {\n this.swiperImages.slideTo(0);\n }\n\n this.offline = true;\n this.downloadedSuccessConfirm.emit(this.currentTrek.id);\n } catch (error) {\n this.downloadedErrorConfirm.emit(this.currentTrek.id);\n }\n }\n\n async deleteTrek() {\n try {\n const treksInStore: Treks = [];\n const trekInStore = await getDataInStore('treks', this.currentTrek.id);\n this.deleteOfflineTrekProperties(trekInStore);\n treksInStore.push(trekInStore);\n if (this.currentTrek.children.length > 0) {\n for (let index = 0; index < this.currentTrek.children.length; index++) {\n const trekInStore = await getDataInStore('treks', this.currentTrek.children[index]);\n this.deleteOfflineTrekProperties(trekInStore);\n treksInStore.push(trekInStore);\n }\n }\n await writeOrUpdateDataInStore('treks', treksInStore);\n\n if (state.treks) {\n delete state.treks.find(trek => trek.id === this.currentTrek.id).offline;\n\n if (!state.currentTreks) {\n state.currentTreks = state.treks;\n }\n delete state.currentTreks.find(trek => trek.id === this.currentTrek.id).offline;\n }\n\n if (state.parentTrek) {\n delete state.parentTrek.offline;\n }\n\n if (state.currentTrekSteps) {\n state.currentTrekSteps.forEach(currentTrekStep => {\n delete currentTrekStep.offline;\n });\n }\n\n this.offline = false;\n this.deleteSuccessConfirm.emit(this.currentTrek.id);\n } catch (error) {\n this.deleteErrorConfirm.emit(this.currentTrek.id);\n }\n }\n\n displayDownloadModal() {\n this.downloadConfirm.emit();\n }\n\n displayDeleteModal() {\n this.deleteConfirm.emit();\n }\n\n @Listen('downloadPress', { target: 'window' })\n onDownloadPress() {\n this.downloadTrek();\n }\n\n @Listen('deletePress', { target: 'window' })\n onDeletePress() {\n this.deleteTrek();\n }\n\n deleteOfflineTrekProperties(trekInStore) {\n delete trekInStore.descent;\n delete trekInStore.geometry;\n delete trekInStore.gpx;\n delete trekInStore.kml;\n delete trekInStore.pdf;\n delete trekInStore.parking_location;\n delete trekInStore.arrival;\n delete trekInStore.ambiance;\n delete trekInStore.access;\n delete trekInStore.public_transport;\n delete trekInStore.advice;\n delete trekInStore.advised_parking;\n delete trekInStore.gear;\n delete trekInStore.source;\n delete trekInStore.points_reference;\n delete trekInStore.disabled_infrastructure;\n delete trekInStore.accessibility_level;\n delete trekInStore.accessibility_slope;\n delete trekInStore.accessibility_width;\n delete trekInStore.accessibility_signage;\n delete trekInStore.accessibility_covering;\n delete trekInStore.accessibility_exposure;\n delete trekInStore.accessibility_advice;\n delete trekInStore.ratings;\n delete trekInStore.ratings_description;\n delete trekInStore.children;\n delete trekInStore.networks;\n delete trekInStore.web_links;\n delete trekInStore.update_datetime;\n delete trekInStore.information_desks;\n delete trekInStore.pois;\n delete trekInStore.touristicContents;\n delete trekInStore.touristicEvents;\n delete trekInStore.sensitiveAreas;\n delete trekInStore.offline;\n }\n\n getDepartureCityCode() {\n const departureCity = state.cities.find(currentCity => currentCity.id === state.currentTrek.departure_city);\n return departureCity.code ?? departureCity.id;\n }\n\n render() {\n const defaultImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/default-image.svg`);\n const displayPaginationAndNavigation = (this.currentTrek && this.currentTrek.attachments.filter(attachment => attachment.type === 'image').length > 1) || this.offline;\n\n return (\n <Host\n style={{\n '--font-family': this.fontFamily,\n '--color-primary-app': this.colorPrimaryApp,\n '--color-on-surface': this.colorOnSurface,\n '--color-primary-container': this.colorPrimaryContainer,\n '--color-on-primary-container': this.colorOnPrimaryContainer,\n '--color-secondary-container': this.colorSecondaryContainer,\n '--color-on-secondary-container': this.colorOnSecondaryContainer,\n '--color-background': this.colorBackground,\n '--detail-bottom-space-height': this.isLargeView\n ? state.languages && state.languages.length > 1\n ? '44px'\n : '12px'\n : state.languages && state.languages.length > 1\n ? '164px'\n : '124px',\n }}\n >\n {this.currentTrek && (\n <div part=\"trek-options\" class=\"trek-options\">\n <a\n part=\"trek-option\"\n class={`presentation trek-option${this.indicatorSelectedTrekOption.ref === 'presentationOptionRef' ? ' selected-trek-option' : ''}`}\n ref={el => (this.presentationOptionRef = el)}\n onClick={() => this.handleScrollTo(this.presentationRef)}\n >\n {translate[state.language].options.presentation}\n </a>\n {this.options.steps.visible && (\n <a\n part=\"trek-option\"\n class={`steps trek-option${this.indicatorSelectedTrekOption.ref === 'stepsOptionRef' ? ' selected-trek-option' : ''}`}\n ref={el => (this.stepsOptionRef = el)}\n onClick={() => this.handleScrollTo(this.stepsRef)}\n >\n {translate[state.language].options.steps}\n </a>\n )}\n {this.options.description.visible && (\n <a\n part=\"trek-option\"\n class={`description trek-option${this.indicatorSelectedTrekOption.ref === 'descriptionOptionRef' ? ' selected-trek-option' : ''}`}\n ref={el => (this.descriptionOptionRef = el)}\n onClick={() => this.handleScrollTo(this.descriptionRef)}\n >\n {translate[state.language].options.description}\n </a>\n )}\n {this.options.pois.visible && (\n <a\n part=\"trek-option\"\n class={`pois trek-option${this.indicatorSelectedTrekOption.ref === 'poisOptionRef' ? ' selected-trek-option' : ''}`}\n ref={el => (this.poisOptionRef = el)}\n onClick={() => this.handleScrollTo(this.poiRef)}\n >\n {translate[state.language].options.pois}\n </a>\n )}\n {this.options.recommendations.visible && (\n <a\n part=\"trek-option\"\n class={`recommendations trek-option${this.indicatorSelectedTrekOption.ref === 'recommendationsOptionRef' ? ' selected-trek-option' : ''}`}\n ref={el => (this.recommendationsOptionRef = el)}\n onClick={() => this.handleScrollTo(this.recommendationRef)}\n >\n {translate[state.language].options.recommendations}\n </a>\n )}\n {this.options.sensitiveArea.visible && (\n <a\n part=\"trek-option\"\n class={`sensitive-areas trek-option${this.indicatorSelectedTrekOption.ref === 'sensitiveAreaOptionRef' ? ' selected-trek-option' : ''}`}\n ref={el => (this.sensitiveAreaOptionRef = el)}\n onClick={() => this.handleScrollTo(this.sensitiveAreaRef)}\n >\n {translate[state.language].options.environmentalSensitiveAreas}\n </a>\n )}\n {this.options.informationPlaces.visible && (\n <a\n part=\"trek-option\"\n class={`information-places trek-option${this.indicatorSelectedTrekOption.ref === 'informationPlacesOptionRef' ? ' selected-trek-option' : ''}`}\n ref={el => (this.informationPlacesOptionRef = el)}\n onClick={() => this.handleScrollTo(this.informationPlacesRef)}\n >\n {translate[state.language].options.informationPlaces}\n </a>\n )}\n {this.options.accessibility.visible && (\n <a\n part=\"trek-option\"\n class={`accessibility trek-option${this.indicatorSelectedTrekOption.ref === 'accessibilityOptionRef' ? ' selected-trek-option' : ''}`}\n ref={el => (this.accessibilityOptionRef = el)}\n onClick={() => this.handleScrollTo(this.accessibilityRef)}\n >\n {translate[state.language].options.accessibility}\n </a>\n )}\n {this.options.touristicContents.visible && (\n <a\n part=\"trek-option\"\n class={`touristic-content trek-option${this.indicatorSelectedTrekOption.ref === 'touristicContentsOptionRef' ? ' selected-trek-option' : ''}`}\n ref={el => (this.touristicContentsOptionRef = el)}\n onClick={() => this.handleScrollTo(this.touristicContentsRef)}\n >\n {translate[state.language].options.touristicContents}\n </a>\n )}\n {this.options.touristicEvents.visible && (\n <a\n part=\"trek-option\"\n class={`touristic-event trek-option${this.indicatorSelectedTrekOption.ref === 'touristicEventsOptionRef' ? ' selected-trek-option' : ''}`}\n ref={el => (this.touristicEventsOptionRef = el)}\n onClick={() => this.handleScrollTo(this.touristicEventsRef)}\n >\n {translate[state.language].options.touristicEvents}\n </a>\n )}\n {this.presentationOptionRef && (\n <span\n part=\"trek-indicator-selected-trek-option\"\n class=\"trek-indicator-selected-trek-option\"\n style={{\n transform: `translateX(${this.indicatorSelectedTrekOption.translateX})`,\n width: this.indicatorSelectedTrekOption.width,\n backgroundSize: this.indicatorSelectedTrekOption.backgroundSize,\n }}\n ></span>\n )}\n </div>\n )}\n {this.currentTrek && (\n <div part=\"trek-detail-container\" class=\"trek-detail-container\" ref={el => (this.trekDetailContainerRef = el)}>\n <div part=\"trek-images\" class=\"trek-images-container\" ref={el => (this.presentationRef = el)}>\n <div part=\"swiper-images\" class=\"swiper swiper-images\" ref={el => (this.swiperImagesRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {this.currentTrek.attachments.filter(attachment => attachment.type === 'image').length > 0 ? (\n this.currentTrek.attachments\n .filter(attachment => attachment.type === 'image')\n .map(attachment => {\n const legend = [attachment.legend, attachment.author].filter(Boolean).join(' - ');\n return (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n {this.displayFullscreen && (\n <div part=\"trek-close-fullscreen-button\" class=\"trek-close-fullscreen-button\" onClick={() => this.handleFullscreen(true)}>\n <span part=\"trek-close-fullcreen-icon\" class=\"trek-close-fullcreen-icon\" innerHTML={CloseIcon}></span>\n </div>\n )}\n <div part=\"trek-image-legend\" class=\"trek-image-legend\">\n {legend}\n </div>\n <img\n part=\"trek-img\"\n class=\"trek-img\"\n src={this.offline && attachment.thumbnail !== '' ? attachment.thumbnail : attachment.url}\n loading=\"lazy\"\n onClick={() => this.handleFullscreen()}\n /* @ts-ignore */\n onerror={event => {\n event.target.onerror = null;\n event.target.className = 'trek-img default-trek-img';\n event.target.src = defaultImageSrc;\n }}\n alt={attachment.legend}\n />\n </div>\n );\n })\n ) : (\n <img part=\"trek-img\" class=\"trek-img default-trek-img\" src={defaultImageSrc} loading=\"lazy\" alt=\"\" />\n )}\n </div>\n <div\n style={{ display: 'block', visibility: displayPaginationAndNavigation ? 'visible' : 'hidden' }}\n part=\"swiper-pagination\"\n class=\"swiper-pagination\"\n ref={el => (this.paginationElImagesRef = el)}\n ></div>\n <div\n style={{ display: 'flex', visibility: displayPaginationAndNavigation ? 'visible' : 'hidden' }}\n part=\"swiper-button-prev\"\n class=\"swiper-button-prev\"\n ref={el => (this.prevElImagesRef = el)}\n ></div>\n <div\n style={{ display: 'flex', visibility: displayPaginationAndNavigation ? 'visible' : 'hidden' }}\n part=\"swiper-button-next\"\n class=\"swiper-button-next\"\n ref={el => (this.nextElImagesRef = el)}\n ></div>\n </div>\n </div>\n <div part=\"trek-name\" class=\"trek-name\">\n {this.currentTrek.name}\n </div>\n {this.themes.length > 0 && (\n <div part=\"themes-container\" class=\"themes-container\">\n {this.themes.map(theme => (\n <div part=\"theme\" class=\"theme\">\n {theme.label}\n </div>\n ))}\n </div>\n )}\n <div part=\"sub-container\" class=\"sub-container\">\n <div part=\"icons-labels-container\" class=\"icons-labels-container\">\n {this.difficulty && (\n <div part=\"icon-label\" class=\"icon-label difficulty\">\n {this.difficulty.pictogram && <img part=\"icon\" class=\"icon\" src={this.difficulty.pictogram} alt=\"\" />}\n <span part=\"label\" class=\"label\">\n {this.difficulty.label}\n </span>\n </div>\n )}\n <div part=\"icon-label\" class=\"icon-label duration\">\n <span part=\"icon\" class=\"icon\" innerHTML={TimelapseIcon}></span>\n <span part=\"label\" class=\"label\">\n {formatDuration(this.currentTrek?.duration)}\n </span>\n </div>\n <div part=\"icon-label\" class=\"icon-label route\">\n {this.route?.pictogram && <img part=\"icon\" class=\"icon\" src={this.route.pictogram} alt=\"\" />}\n <span part=\"label\" class=\"label\">\n {this.route?.route}\n </span>\n </div>\n <div part=\"icon-label\" class=\"icon-label length\">\n <span part=\"icon\" class=\"icon\" innerHTML={OpenInFullIcon}></span>\n <span part=\"label\" class=\"label\">\n {formatLength(this.currentTrek.length_2d)}\n </span>\n </div>\n {this.currentTrek.ascent && (\n <div part=\"icon-label\" class=\"icon-label ascent\">\n <span part=\"icon\" class=\"icon\" innerHTML={MovingIcon}></span>\n <span part=\"label\" class=\"label\">\n {formatAscent(this.currentTrek.ascent)}\n </span>\n </div>\n )}\n {this.currentTrek.descent && (\n <div part=\"icon-label\" class=\"icon-label descent\">\n <span part=\"icon\" class=\"icon\" innerHTML={MovingIcon}></span>\n <span part=\"label\" class=\"label\">\n {formatDescent(this.currentTrek.descent)}\n </span>\n </div>\n )}\n <div part=\"icon-label\" class=\"icon-label practice\">\n {this.practice?.pictogram && <img part=\"icon\" class=\"icon\" src={this.practice.pictogram} alt=\"\" />}\n <span part=\"label\" class=\"label\">\n {this.practice?.name}\n </span>\n </div>\n <div part=\"icon-label\" class=\"icon-label networks\">\n {this.currentTrek.networks?.map(networkId => {\n const currentNetwork = state.networks?.find(network => network.id === networkId);\n if (!currentNetwork) return null;\n return (\n <div part=\"network\" class=\"network\">\n <img part=\"icon\" class=\"icon\" src={currentNetwork.pictogram} alt=\"\" />\n <span part=\"label\" class=\"label\">\n {currentNetwork.label}\n </span>\n </div>\n );\n })}\n </div>\n {this.currentTrek.ratings &&\n state.ratings &&\n state.ratingsScale &&\n this.currentTrek.ratings.map(trekRating => {\n const rating = state.ratings.find(r => r.id === trekRating);\n if (!rating) return null;\n const scale = state.ratingsScale.find(rs => rs.id === rating.scale);\n if (!scale) return null;\n return (\n <div part=\"row\" class=\"row\">\n {`${scale.name} : ${rating.name}`}\n </div>\n );\n })}\n {this.currentTrek.ratings_description && this.currentTrek.ratings_description !== '' && (\n <div part=\"row\" class=\"row\" innerHTML={this.currentTrek.ratings_description}></div>\n )}\n </div>\n </div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"downloads-container\" class=\"downloads-container\">\n <div part=\"download-title\" class=\"download-title\">\n {translate[state.language].downloads}\n </div>\n {this.enableOffline && !this.offline && (!this.currentTrek.parents || this.currentTrek.parents.length === 0) && (\n <button part=\"offline-button\" class=\"offline-button\" onClick={() => this.displayDownloadModal()}>\n <span part=\"icon\" class=\"icon\" innerHTML={DownloadForOfflineIcon}></span>\n <span part=\"label\" class=\"label\">\n {translate[state.language].offline.downloadOffline}\n </span>\n </button>\n )}\n {this.enableOffline && this.offline && (!this.currentTrek.parents || this.currentTrek.parents.length === 0) && (\n <button part=\"offline-button\" class=\"offline-button\" onClick={() => this.displayDeleteModal()}>\n <span part=\"icon\" class=\"icon\" innerHTML={DeleteIcon}></span>\n <span part=\"label\" class=\"label\">\n {translate[state.language].offline.deleteOffline}\n </span>\n </button>\n )}\n <div part=\"links-container\" class=\"links-container\">\n <a part=\"download-gpx-button\" href={`${this.currentTrek.gpx}`} target=\"_blank\" rel=\"noopener noreferrer\">\n <span part=\"icon\" class=\" icon\" innerHTML={DownloadIcon}></span>\n <span part=\"label\" class=\"label\">\n GPX\n </span>\n </a>\n <a part=\"download-kml-button\" href={`${this.currentTrek.kml}`} target=\"_blank\" rel=\"noopener noreferrer\">\n <span part=\"icon\" class=\"icon\" innerHTML={DownloadIcon}></span>\n <span part=\"label\" class=\"label\">\n KML\n </span>\n </a>\n <a\n part=\"download-pdf-button\"\n href={`${this.currentTrek.pdf}${state.portalsFromProviders && state.portalsFromProviders.length === 1 ? '?portal=' + state.portalsFromProviders[0] : ''}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <span part=\"icon\" class=\"icon\" innerHTML={DownloadIcon}></span>\n <span part=\"label\" class=\"label\">\n PDF\n </span>\n </a>\n </div>\n </div>\n <div part=\"divider\" class=\"divider\"></div>\n {this.currentTrek.description_teaser && <div part=\"description-teaser\" class=\"description-teaser\" innerHTML={this.currentTrek.description_teaser}></div>}\n {this.currentTrek.ambiance && <div part=\"ambiance\" class=\"ambiance\" innerHTML={this.currentTrek.ambiance}></div>}\n {state.parentTrekId && state.parentTrek && this.currentTrek.id !== state.parentTrekId && (\n <div>\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"parent-trek-container\" class=\"parent-trek-container\">\n <button part=\"parent-trek-title\" class=\"parent-trek-title\" onClick={() => this.parentTrekPress.emit(state.parentTrekId)}>\n <div><</div>\n {state.parentTrek.name}\n </button>\n </div>\n </div>\n )}\n {state.currentTrekSteps && (\n <div part=\"step-container\" class=\"step-container\" ref={el => (this.stepsRef = el)}>\n <div part=\"step-title\" class=\"step-title\">{`${state.currentTrekSteps.length} ${translate[state.language].steps}`}</div>\n <div part=\"swiper-step\" class=\"swiper swiper-step\" ref={el => (this.swiperStepRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {state.currentTrekSteps &&\n state.currentTrekSteps.map(trek => {\n return (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <grw-trek-card\n exportparts=\"trek-card,trek-img-container,trek-img,trek-sub-container,trek-departure,trek-name,trek-themes-container,trek-theme,trek-icons-labels-container,trek-icon-label,trek-icon,trek-label\"\n key={`trek-${trek.id}`}\n trek={trek}\n is-large-view={false}\n is-step={true}\n fontFamily={this.fontFamily}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n grw-app={this.grwApp}\n ></grw-trek-card>\n </div>\n );\n })}\n </div>\n <div part=\"swiper-scrollbar\" class=\"swiper-scrollbar\" ref={el => (this.stepSwiperScrollbar = el)}></div>\n </div>\n </div>\n )}\n <div part=\"divider\" class=\"divider\"></div>\n {this.currentTrek.description && (\n <div part=\"description-container\" class=\"description-container\" ref={el => (this.descriptionRef = el)}>\n <div part=\"description-title\" class=\"description-title\">\n {translate[state.language].description}\n </div>\n <div part=\"description\" class=\"description\" innerHTML={this.currentTrek.description}></div>\n </div>\n )}\n {this.currentTrek.departure && (\n <div part=\"departure-container\" class=\"departure-container\">\n <div part=\"departure-title\" class=\"departure-title\">\n {translate[state.language].departure} : \n </div>\n <div part=\"departure\" innerHTML={this.currentTrek.departure}></div>\n </div>\n )}\n {this.currentTrek.arrival && (\n <div part=\"arrival-container\" class=\"arrival-container\">\n <div part=\"arrival-title\" class=\"arrival-title\">\n {translate[state.language].arrival} : \n </div>\n <div part=\"arrival\" innerHTML={this.currentTrek.arrival}></div>\n </div>\n )}\n {this.cities && this.cities.length > 0 && (\n <div part=\"cities-container\" class=\"cities-container\">\n <div part=\"cities-title\" class=\"cities-title\">\n {translate[state.language].crossedCities} : \n </div>\n <div part=\"cities\" innerHTML={this.cities.join(', ')}></div>\n </div>\n )}\n {this.options.pois.visible && (\n <div part=\"divider-and-pois-container\" class=\"divider-and-pois-container\">\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"pois-container\" class=\"pois-container\" ref={el => (this.poiRef = el)}>\n <div part=\"pois-title\" class=\"pois-title\">\n {translate[state.language].pois(state.poisData)}\n </div>\n {!state.currentPois ? (\n <div class=\"loader-container\">\n <span part=\"loader\" class=\"loader\"></span>\n </div>\n ) : (\n <Fragment>\n <div part=\"swiper-pois\" class=\"swiper swiper-pois\" ref={el => (this.swiperPoisRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {state.currentPois.map(poi => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <grw-poi\n exportparts=\"poi-type-img-container,poi-type,swiper-poi,swiper-wrapper,swiper-slide,poi-img,default-poi-img,swiper-pagination,swiper-button-prev,swiper-button-next,poi-sub-container,poi-name,poi-description,handle-poi-description\"\n poi={poi}\n colorSurfaceContainerLow={this.colorSurfaceContainerLow}\n ></grw-poi>\n </div>\n ))}\n </div>\n <div part=\"swiper-scrollbar\" class=\"swiper-scrollbar\" ref={el => (this.poisSwiperScrollbar = el)}></div>\n </div>\n </Fragment>\n )}\n </div>\n </div>\n )}\n {this.weather && this.currentTrek.departure_city && !this.offline && (\n <div part=\"divider-and-weather-container\" class=\"divider-and-weather-container\">\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"weather-container\" class=\"weather-container\">\n <iframe height=\"150\" frameborder=\"0\" src={`https://meteofrance.com/widget/prevision/${this.getDepartureCityCode()}0#${this.colorPrimaryApp}`}></iframe>\n </div>\n </div>\n )}\n {this.currentTrek.access && (\n <div part=\"divider-and-access-container\" class=\"divider-and-access-container\">\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"access-container\" class=\"access-container\">\n <div part=\"access-title\" class=\"access-title\">\n {translate[state.language].roadAccessAndParking}\n </div>\n <div part=\"access\" class=\"access\" innerHTML={this.currentTrek.access}></div>\n {this.currentTrek.advised_parking && (\n <div>\n <div part=\"advised-parking-title\" class=\"advised-parking-title\" ref={el => (this.parkingRef = el)}>\n {translate[state.language].recommendedParking}\n </div>\n <div part=\"advised-parking\" class=\"advised-parking\" innerHTML={this.currentTrek.advised_parking}></div>\n </div>\n )}\n </div>\n </div>\n )}\n {this.currentTrek.public_transport && (\n <div part=\"divider-and-public-transport-container\" class=\"divider-and-public-transport-container\">\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"public-transport-container\" class=\"public-transport-container\">\n <div part=\"public-transport-title\" class=\"public-transport-title\">\n {translate[state.language].transport}\n </div>\n <div part=\"public-transport\" class=\"public-transport\" innerHTML={this.currentTrek.public_transport}></div>\n </div>\n </div>\n )}\n {(this.currentTrek.advice || this.currentTrek.gear || this.labels.length > 0) && (\n <div part=\"divider-and-advice-container\" class=\"divider-and-advice-container\">\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"advice-container\" class=\"advice-container\" ref={el => (this.recommendationRef = el)}>\n <div part=\"advice-title\" class=\"advice-title\">\n {translate[state.language].recommendations}\n </div>\n {this.currentTrek.advice && (\n <div part=\"current-advice-container\" class=\"current-advice-container\">\n <span part=\"advice-icon\" class=\"icon\" innerHTML={WarningIcon}></span>\n <div part=\"advice\" class=\"advice\" innerHTML={this.currentTrek.advice}></div>\n </div>\n )}\n {this.currentTrek.gear && (\n <div part=\"gear-container\" class=\"gear-container\">\n <span part=\"gear-icon\" class=\"icon\" innerHTML={BackpackIcon}></span>\n <div part=\"gear\" class=\"gear\" innerHTML={this.currentTrek.gear}></div>\n </div>\n )}\n {this.labels.map(label => (\n <div part=\"label-container\" class=\"label-container\">\n <div part=\"label-sub-container\" class=\"label-sub-container\">\n {label.pictogram && <img src={label.pictogram} alt=\"\" />}\n <div part=\"label-name\" class=\"label-name\" innerHTML={label.name}></div>\n </div>\n <div part=\"label-advice\" class=\"label-advice\" innerHTML={label.advice}></div>\n </div>\n ))}\n </div>\n </div>\n )}\n {state.currentSensitiveAreas && state.currentSensitiveAreas.length > 0 && (\n <div part=\"divider-and-sensitive-areas-container\" class=\"divider-and-sensitive-areas-container\">\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"sensitive-areas-container\" class=\"sensitive-areas-container\" ref={el => (this.sensitiveAreaRef = el)}>\n <div part=\"ensitive-areas-title\" class=\"sensitive-areas-title\">\n {translate[state.language].environmentalSensitiveAreas}\n </div>\n <div\n part=\"sensitive-areas-description\"\n class=\"sensitive-areas-description\"\n innerHTML={translate[state.language].sensitiveAreasDescription}\n ></div>\n {state.currentSensitiveAreas.map(sensitiveArea => (\n <grw-sensitive-area-detail\n exportparts=\"sensitive-area-title-container,sensitive-area-color-container,sensitive-area-title,sensitive-area-description,sensitive-area-practice-container,sensitive-area-practice-title,sensitive-area-practices,sensitive-area-practice,sensitive-area-period-container,sensitive-area-period-title,sensitive-area-periods,sensitive-area-period,sensitive-area-contact-container,sensitive-area-contact-title,sensitive-area-contact-value,sensitive-area-rules-container,sensitive-area-rules-title,sensitive-area-rules,sensitive-area-rule,sensitive-area-rule-name,sensitive-area-rule-description\"\n sensitiveArea={sensitiveArea}\n ></grw-sensitive-area-detail>\n ))}\n </div>\n </div>\n )}\n {state.currentInformationDesks &&\n state.currentInformationDesks.filter(currentInformationDesks => this.currentTrek.information_desks.includes(currentInformationDesks.id)).length > 0 && (\n <div part=\"divider-and-information-desks-container\" class=\"divider-and-information-desks-container\">\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"information-desks-container\" class=\"information-desks-container\" ref={el => (this.informationPlacesRef = el)}>\n <div part=\"information-desks-title\" class=\"information-desks-title\">\n {translate[state.language].informationPlaces}\n </div>\n <div part=\"swiper-information-desks\" class=\"swiper swiper-information-desks\" ref={el => (this.swiperInformationDesksRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {state.currentInformationDesks\n .filter(currentInformationDesks => this.currentTrek.information_desks.includes(currentInformationDesks.id))\n .map(informationDesk => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <grw-information-desk\n exportparts=\"information-desk-img-container,information-desk-img,information-desk-sub-container,information-desk-name,center-on-map-button,icon,label,information-desk-informations,phone-container,mail-container,link-container,information-desk-description-container,information-desk-description,handle-information-desk-description\"\n informationDesk={informationDesk}\n colorSurfaceContainerLow={this.colorSurfaceContainerLow}\n ></grw-information-desk>\n </div>\n ))}\n </div>\n <div part=\"swiper-scrollbar\" class=\"swiper-scrollbar\" ref={el => (this.informationDesksContentsSwiperScrollbar = el)}></div>\n </div>\n </div>\n </div>\n )}\n {(this.currentTrek.disabled_infrastructure ||\n (this.accessibilities && this.accessibilities.length > 0) ||\n this.currentTrek.accessibility_level ||\n this.currentTrek.accessibility_slope ||\n this.currentTrek.accessibility_width ||\n this.currentTrek.accessibility_signage ||\n this.currentTrek.accessibility_covering ||\n this.currentTrek.accessibility_exposure ||\n this.currentTrek.accessibility_advice ||\n this.emergencyNumber) && (\n <div part=\"divider-and-accessibilities-container\" class=\"divider-and-accessibilities-container\">\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"accessibilities-container\" class=\"accessibilities-container\" ref={el => (this.accessibilityRef = el)}>\n <div part=\"accessibilities-title\" class=\"accessibilities-title\">\n {translate[state.language].accessibility}\n </div>\n {this.currentTrek.disabled_infrastructure && <div part=\"disabled-infrastructure\" innerHTML={this.currentTrek.disabled_infrastructure}></div>}\n {this.accessibilities && this.accessibilities.length > 0 && (\n <div part=\"accessibilities-content-container\" class=\"accessibilities-content-container\">\n {this.accessibilities.map(accessibility => (\n <div part=\"accessibility-content-container\" class=\"accessibility-content-container\">\n <img src={accessibility.pictogram} alt=\"\"></img>\n <div part=\"accessibility-name\" innerHTML={accessibility.name}></div>\n </div>\n ))}\n </div>\n )}\n {this.emergencyNumber && (\n <div part=\"accessibility-emergency-number-container\" class=\"accessibility-emergency-number-container\">\n <div part=\"accessibility-emergency-number-title\" class=\"accessibility-emergency-number-title\">\n {translate[state.language].emergencyNumber}\n </div>\n <div part=\"accessibility-emergency-number-content\" class=\"accessibility-emergency-number-content\">\n {\n <a href={`tel:${this.emergencyNumber.toString()}`}>\n <span part=\"icon\" class=\"icon\" innerHTML={CallIcon}></span>\n <span part=\"emergency-number\" class=\"emergency-number\">\n {this.emergencyNumber.toString()}\n </span>\n </a>\n }\n </div>\n </div>\n )}\n {this.currentTrek.accessibility_level && (\n <div part=\"accessibility-level-container\" class=\"accessibility-level-container\">\n <div part=\"accessibility-level-title\" class=\"accessibility-level-title\">\n {translate[state.language].accessibilityLevel}\n </div>\n <div part=\"accessibility-level-name\" innerHTML={this.accessibilityLevel.name}></div>\n </div>\n )}\n {this.currentTrek.accessibility_slope && (\n <div part=\"accessibility-slope-container\" class=\"accessibility-slope-container\">\n <div part=\"accessibility-slope-title\" class=\"accessibility-slope-title\">\n {translate[state.language].accessibilitySlope}\n </div>\n <div part=\"accessibility-slope\" innerHTML={this.currentTrek.accessibility_slope}></div>\n </div>\n )}\n {this.currentTrek.accessibility_width && (\n <div part=\"accessibility-width-container\" class=\"accessibility-width-container\">\n <div part=\"accessibility-width-title\" class=\"accessibility-width-title\">\n {translate[state.language].accessibilityWidth}\n </div>\n <div part=\"accessibility-width\" innerHTML={this.currentTrek.accessibility_width}></div>\n </div>\n )}\n {this.currentTrek.accessibility_signage && (\n <div part=\"accessibility-signage-container\" class=\"accessibility-signage-container\">\n <div part=\"accessibility-signage-title\" class=\"accessibility-signage-title\">\n {translate[state.language].accessibilitySignage}\n </div>\n <div part=\"accessibility-signage\" innerHTML={this.currentTrek.accessibility_signage}></div>\n </div>\n )}\n {this.currentTrek.accessibility_covering && (\n <div part=\"accessibility-covering-container\" class=\"accessibility-covering-container\">\n <div part=\"accessibility-covering-title\" class=\"accessibility-covering-title\">\n {translate[state.language].accessibilityCovering}\n </div>\n <div part=\"accessibility-covering\" innerHTML={this.currentTrek.accessibility_covering}></div>\n </div>\n )}\n {this.currentTrek.accessibility_exposure && (\n <div part=\"accessibility-exposure-container\" class=\"accessibility-exposure-container\">\n <div part=\"accessibility-exposure-title\" class=\"accessibility-exposure-title\">\n {translate[state.language].accessibilityExposure}\n </div>\n <div part=\"accessibility-exposure\" innerHTML={this.currentTrek.accessibility_exposure}></div>\n </div>\n )}\n {this.currentTrek.accessibility_advice && (\n <div part=\"accessibility-advice-container\" class=\"accessibility-advice-container\">\n <div part=\"accessibility-advice-title\" class=\"accessibility-advice-title\">\n {translate[state.language].accessibilityAdvices}\n </div>\n <div part=\"accessibility-advice\" innerHTML={this.currentTrek.accessibility_advice}></div>\n </div>\n )}\n </div>\n </div>\n )}\n {this.options.touristicContents.visible && (\n <div part=\"divider-and-touristic-content-container\" class=\"divider-and-touristic-content-container\">\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"touristic-content-container\" class=\"touristic-content-container\" ref={el => (this.touristicContentsRef = el)}>\n <div part=\"touristic-content-title\" class=\"touristic-content-title\">\n {translate[state.language].touristicContents(state.touristicContentsData)}\n </div>\n {!state.trekTouristicContents ? (\n <div class=\"loader-container\">\n <span part=\"loader\" class=\"loader\"></span>\n </div>\n ) : (\n <Fragment>\n <div part=\"swiper-touristic-content\" class=\"swiper swiper-touristic-content\" ref={el => (this.swiperTouristicContentsRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {state.trekTouristicContents.map(touristicContent => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <grw-touristic-content-card\n exportparts=\"touristic-content-card,touristic-content-img-container,swiper-touristic-content,swiper-wrapper,swiper-slide,touristic-content-img,default-touristic-content-img,swiper-pagination,swiper-button-prev,swiper-button-next,touristic-content-sub-container,touristic-content-category-container,touristic-content-category-img,touristic-content-category-name,touristic-content-name,touristic-content-more-detail-container,more-details-button\"\n fontFamily={this.fontFamily}\n touristicContent={touristicContent}\n isInsideHorizontalList={true}\n color-surface-container-low={this.colorSurfaceContainerLow}\n ></grw-touristic-content-card>\n </div>\n ))}\n </div>\n <div part=\"swiper-scrollbar\" class=\"swiper-scrollbar\" ref={el => (this.touristicContentsSwiperScrollbar = el)}></div>\n </div>\n </Fragment>\n )}\n </div>\n </div>\n )}\n {this.options.touristicEvents.visible && (\n <div part=\"divider-and-touristic-event-container\" class=\"divider-and-touristic-event-container\">\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"touristic-event-container\" class=\"touristic-event-container\" ref={el => (this.touristicEventsRef = el)}>\n <div part=\"touristic-event-title\" class=\"touristic-event-title\">\n {translate[state.language].touristicEvents(state.touristicEventsData)}\n </div>\n {!state.trekTouristicEvents ? (\n <div class=\"loader-container\">\n <span part=\"loader\" class=\"loader\"></span>\n </div>\n ) : (\n <Fragment>\n <div part=\"swiper-touristic-event\" class=\"swiper swiper-touristic-event\" ref={el => (this.swiperTouristicEventsRef = el)}>\n <div part=\"swiper-wrapper\" class=\"swiper-wrapper\">\n {state.trekTouristicEvents.map(touristicEvent => (\n <div part=\"swiper-slide\" class=\"swiper-slide\">\n <grw-touristic-event-card\n exportparts=\"touristic-event-card,touristic-event-img-container,swiper-touristic-event,swiper-wrapper,swiper-slide,touristic-event-img,default-touristic-event-img,swiper-pagination,swiper-button-prev,swiper-button-next,touristic-event-sub-container,touristic-event-sub-container,touristic-event-type-img,touristic-event-type-name,touristic-event-name,touristic-event-date-container,touristic-event-date,touristic-event-more-detail-container,more-details-button\"\n fontFamily={this.fontFamily}\n touristicEvent={touristicEvent}\n isInsideHorizontalList={true}\n colorSurfaceContainerLow={this.colorSurfaceContainerLow}\n ></grw-touristic-event-card>\n </div>\n ))}\n </div>\n <div part=\"swiper-scrollbar\" class=\"swiper-scrollbar\" ref={el => (this.touristicEventsSwiperScrollbar = el)}></div>\n </div>\n </Fragment>\n )}\n </div>\n </div>\n )}\n {this.currentTrek.web_links && this.currentTrek.web_links.length > 0 && (\n <div part=\"divider-and-weblinks-container\" class=\"divider-and-weblinks-container\">\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"weblinks-container\" class=\"weblinks-container\">\n <div part=\"weblinks-title\" class=\"weblinks-title\">\n {translate[state.language].learnMore}\n </div>\n {this.currentTrek.web_links.map(weblink => (\n <a part=\"weblink-container\" class=\"weblink-container\" href={weblink.url} target=\"_blank\" rel=\"noopener noreferrer\">\n {weblink.category && weblink.category.pictogram && <img src={weblink.category.pictogram} alt={weblink.category.label} />}\n {weblink.name}\n </a>\n ))}\n </div>\n </div>\n )}\n {this.currentTrek.source && this.currentTrek.source.length > 0 && (\n <div part=\"divider-and-source-container\" class=\"divider-and-source-container\">\n <div part=\"divider\" class=\"divider\"></div>\n <div part=\"source-container\" class=\"source-container\">\n <div part=\"source-title\" class=\"source-title\">\n {translate[state.language].sources}\n </div>\n {this.sources.map(source => (\n <div part=\"source-sub-container\" class=\"source-sub-container\">\n {source.pictogram && <img src={source.pictogram} alt=\"\" />}\n <div>\n <div part=\"source-name\" class=\"source-name\" innerHTML={source.name}></div>\n <a part=\"source-advice\" class=\"source-advice\" href={source.website} innerHTML={source.website}></a>\n </div>\n </div>\n ))}\n </div>\n </div>\n )}\n {this.grwApp && <div part=\"detail-bottom-space\" class=\"detail-bottom-space\"></div>}\n </div>\n )}\n {this.modalDetailsId && (\n <Fragment>\n {this.showTouristicContentDetailsModal && <grw-touristic-content-provider api={state.api} touristic-content-id={this.modalDetailsId}></grw-touristic-content-provider>}\n {this.showTouristicEventDetailsModal && <grw-touristic-event-provider api={state.api} touristic-event-id={this.modalDetailsId}></grw-touristic-event-provider>}\n </Fragment>\n )}\n </Host>\n );\n }\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { handleOfflineProperty, getDataInStore } from 'services/grw-db.service';\nimport { getTouristicContentCategory, getTouristicContentsNearTrek, getTouristicContentsNearTrekCount } from 'services/touristic-contents.service';\nimport { getTouristicEventsNearTrek, getTouristicEventsNearTrekCount, getTouristicEventType } from 'services/touristic-events.service';\nimport {\n getCities,\n getInformationsDesks,\n getPoisNearTrek,\n getPoisNearTrekCount,\n getSensitiveAreasNearTrek,\n getSignages,\n getSources,\n getTrek,\n getTrekNetwork,\n getTrekRatings,\n getTrekRatingsScale,\n} from 'services/treks.service';\nimport state from 'store/store';\nimport { Trek } from 'types/types';\nimport { getCacheMode, imagesRegExp, setFilesFromStore } from 'utils/utils';\n\n@Component({\n tag: 'grw-trek-provider',\n shadow: true,\n})\nexport class GrwTrekProvider {\n @Prop() languages = 'fr';\n @Prop() api: string;\n @Prop() trekId: number;\n\n @Prop() portals: string;\n @Prop() inBbox: string;\n @Prop() cities: string;\n @Prop() districts: string;\n @Prop() structures: string;\n @Prop() themes: string;\n @Prop() routes: string;\n @Prop() practices: string;\n @Prop() labels: string;\n\n @Prop() signages = false;\n\n controller = new AbortController();\n signal = this.controller.signal;\n init: RequestInit = { cache: getCacheMode(), signal: this.signal };\n\n connectedCallback() {\n state.poisData = 0;\n state.touristicContentsData = 0;\n state.touristicEventsData = 0;\n state.currentPois = null;\n state.trekTouristicContents = null;\n state.trekTouristicEvents = null;\n\n if (!state.api) {\n state.api = this.api;\n state.languages = this.languages.split(',');\n state.language = state.languages[0];\n }\n\n state.portalsFromProviders = this.portals;\n state.inBboxFromProviders = this.inBbox;\n state.citiesFromProviders = this.cities;\n state.districtsFromProviders = this.districts;\n state.structuresFromProviders = this.structures;\n state.themesFromProviders = this.themes;\n state.routesFromProviders = this.routes;\n state.practicesFromProviders = this.practices;\n state.labelsFromProviders = this.labels;\n\n this.handleTrek();\n }\n\n disconnectedCallback() {\n state.networkError = false;\n }\n\n async handleTrek() {\n const trekInStore: Trek = await getDataInStore('treks', this.trekId);\n if (trekInStore && trekInStore.offline) {\n this.handleOfflineTrek(trekInStore);\n } else {\n this.handleOnlineTrek();\n }\n }\n\n async handleOfflineTrek(trek: Trek) {\n if ((trek && trek.children.length > 0) || state.parentTrekId) {\n const steps: number[] = [];\n if (trek.children.length > 0) {\n state.parentTrekId = trek.id;\n state.parentTrek = trek;\n steps.push(...trek.children);\n } else {\n const parentTrek = await getDataInStore('treks', state.parentTrekId);\n state.parentTrek = parentTrek;\n steps.push(...parentTrek.children);\n }\n const stepRequests = [];\n steps.forEach(stepId => {\n stepRequests.push(getDataInStore('treks', stepId));\n });\n state.currentTrekSteps = await Promise.all([...stepRequests]).then(responses => responses);\n }\n\n state.difficulties = await handleOfflineProperty('difficulties');\n state.routes = await handleOfflineProperty('routes');\n state.practices = await handleOfflineProperty('practices');\n state.themes = await handleOfflineProperty('themes');\n state.cities = await handleOfflineProperty('cities');\n state.accessibilities = await handleOfflineProperty('accessibilities');\n state.ratings = await handleOfflineProperty('ratings');\n state.ratingsScale = await handleOfflineProperty('ratingsScale');\n state.labels = await handleOfflineProperty('labels');\n state.sources = await handleOfflineProperty('sources');\n state.accessibilitiesLevel = await handleOfflineProperty('accessibilitiesLevel');\n state.touristicContentCategories = await handleOfflineProperty('touristicContentCategories');\n state.touristicEventTypes = await handleOfflineProperty('touristicEventTypes');\n state.networks = await handleOfflineProperty('networks');\n state.poiTypes = await handleOfflineProperty('poiTypes');\n\n const informationDesksInStore = await handleOfflineProperty('informationDesks');\n const informationDesks = informationDesksInStore.filter(informationDeskInStore =>\n trek.information_desks.some(information_desk => information_desk === informationDeskInStore.id),\n );\n state.currentInformationDesks = informationDesks;\n\n const poisInStore = await handleOfflineProperty('pois', ['url']);\n const pois = poisInStore.filter(poiInStore => trek.pois.some(trekPoi => trekPoi === poiInStore.id));\n state.currentPois = pois;\n state.poisData = pois.length;\n\n const touristicContentsInStore = await handleOfflineProperty('touristicContents', ['url']);\n const touristicContents = touristicContentsInStore.filter(touristicContentInStore =>\n trek.touristicContents.some(trekTouristicContent => trekTouristicContent === touristicContentInStore.id),\n );\n state.trekTouristicContents = touristicContents;\n state.touristicContentsData = touristicContents.length;\n\n const touristicEventsInStore = await handleOfflineProperty('touristicEvents', ['url']);\n const touristicEvents = touristicEventsInStore.filter(touristicEventInStore =>\n trek.touristicEvents.some(trekTouristicEvent => trekTouristicEvent === touristicEventInStore.id),\n );\n state.trekTouristicEvents = touristicEvents;\n state.touristicEventsData = touristicEvents.length;\n\n const sensitiveAreasInStore = await handleOfflineProperty('sensitiveAreas');\n const sensitiveAreas = sensitiveAreasInStore.filter(sensitiveAreaInStore => trek.sensitiveAreas.some(trekSensitiveArea => trekSensitiveArea === sensitiveAreaInStore.id));\n state.currentSensitiveAreas = sensitiveAreas;\n\n const signagesInStore = await handleOfflineProperty('signages');\n const signages = signagesInStore.filter(signageInStore => trek.signages.some(trekSignage => trekSignage === signageInStore.id));\n state.currentSignages = signages;\n\n await setFilesFromStore(trek, imagesRegExp, ['url']);\n state.currentTrek = trek;\n }\n\n handleOnlineTrek() {\n const requests = [];\n requests.push(\n !state.difficulties\n ? fetch(`${state.api}trek_difficulty/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,label,pictogram`, this.init)\n : new Response('null'),\n );\n requests.push(\n !state.routes\n ? fetch(`${state.api}trek_route/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,route,pictogram`, this.init)\n : new Response('null'),\n );\n requests.push(\n !state.practices\n ? fetch(`${state.api}trek_practice/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,name,pictogram`, this.init)\n : new Response('null'),\n );\n requests.push(\n !state.themes\n ? fetch(`${state.api}theme/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,label,pictogram`, this.init)\n : new Response('null'),\n );\n requests.push(\n !state.accessibilities\n ? fetch(`${state.api}trek_accessibility/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,name,pictogram`, this.init)\n : new Response('null'),\n );\n requests.push(!state.ratings ? getTrekRatings(state.api, state.language, this.portals, this.init) : new Response('null'));\n requests.push(!state.ratingsScale ? getTrekRatingsScale(state.api, state.language, this.init) : new Response('null'));\n\n requests.push(this.signages ? getSignages(state.api, state.language, this.trekId, this.init) : new Response('null'));\n\n try {\n Promise.all([\n ...requests,\n getSensitiveAreasNearTrek(state.api, state.language, this.trekId, this.init)\n .then(response => {\n if (response.ok) {\n return response;\n } else {\n throw new Error('Sentive area error');\n }\n })\n .catch(() => {\n return new Response('null');\n }),\n fetch(`${state.api}label/?language=${state.language}&fields=id,name,advice,pictogram,filter`, this.init),\n getSources(state.api, state.language, this.init),\n fetch(`${state.api}trek_accessibility_level/?language=${state.language}&fields=id,name`, this.init).catch(() => new Response('null')),\n getPoisNearTrekCount(state.api, state.language, this.trekId, this.init),\n getInformationsDesks(state.api, state.language, this.init),\n getTrekNetwork(state.api, state.language, this.init),\n getTrek(state.api, state.language, this.trekId, this.init),\n getTouristicContentsNearTrekCount(state.api, state.language, this.trekId, this.init),\n getTouristicEventsNearTrekCount(state.api, state.language, this.trekId, this.init),\n ])\n .then(responses => Promise.all(responses.map(response => response.json())))\n .then(\n async ([\n difficulties,\n routes,\n practices,\n themes,\n accessibilities,\n ratings,\n ratingsScale,\n signages,\n sensitiveAreas,\n labels,\n sources,\n accessibilitiesLevel,\n pois,\n informationDesks,\n networks,\n trek,\n touristicContents,\n touristicEvents,\n ]) => {\n state.networkError = false;\n if ((trek && trek.children.length > 0) || state.parentTrekId) {\n const steps: number[] = [];\n if (trek.children.length > 0) {\n state.parentTrekId = trek.id;\n state.parentTrek = trek;\n steps.push(...trek.children);\n } else {\n const parentTrek = await fetch(`${state.api}trek/${state.parentTrekId}/?language=${state.language}&published=true&fields=name,children`, this.init).then(response =>\n response.json(),\n );\n state.parentTrek = parentTrek;\n steps.push(...parentTrek.children);\n }\n const stepRequests = [];\n steps.forEach(stepId => {\n stepRequests.push(getTrek(state.api, state.language, stepId, this.init));\n });\n state.currentTrekSteps = await Promise.all([...stepRequests]).then(responses => Promise.all(responses.map(response => response.json())));\n }\n\n let citiesToLoad = [trek.departure_city, ...trek.cities];\n\n if (state.currentTrekSteps) {\n state.currentTrekSteps.forEach(step => {\n citiesToLoad = [...citiesToLoad, step.departure_city, ...step.cities];\n });\n }\n\n citiesToLoad = [...new Set(citiesToLoad.filter(Boolean))];\n\n if (state.cities) {\n const cityIds = state.cities.map(city => city.id);\n citiesToLoad = citiesToLoad.filter(city => !cityIds.includes(city));\n }\n\n if (citiesToLoad.length > 0) {\n const cities = (await getCities(state.api, state.language, this.init, citiesToLoad).then(response => response.json())).results;\n if (cities) {\n if (state.cities) {\n state.cities = [...state.cities, ...cities];\n } else {\n state.cities = cities;\n }\n }\n }\n\n if (!state.cities) {\n state.cities = [];\n }\n\n if (difficulties) {\n state.difficulties = difficulties.results;\n }\n if (routes) {\n state.routes = routes.results;\n }\n if (practices) {\n state.practices = practices.results.map(practice => ({ ...practice, selected: false }));\n }\n if (themes) {\n state.themes = themes.results;\n }\n\n if (accessibilities) {\n state.accessibilities = accessibilities.results;\n }\n if (ratings) {\n state.ratings = ratings.results;\n }\n if (ratingsScale) {\n state.ratingsScale = ratingsScale.results;\n }\n state.currentSignages = signages ? signages.results : [];\n if (accessibilitiesLevel) {\n state.accessibilitiesLevel = accessibilitiesLevel.results;\n }\n\n if (sensitiveAreas) {\n state.currentSensitiveAreas = sensitiveAreas.results;\n }\n\n if (labels) {\n state.labels = labels.results;\n }\n\n if (sources) {\n state.sources = sources.results;\n }\n\n if (networks) {\n state.networks = networks.results;\n }\n\n if (informationDesks) {\n state.currentInformationDesks = informationDesks.results;\n }\n\n if (pois.count) {\n state.poisData = pois.count;\n }\n\n if (touristicContents.count) {\n state.touristicContentsData = touristicContents.count;\n }\n\n if (touristicEvents.count) {\n state.touristicEventsData = touristicEvents.count;\n }\n if (trek) {\n state.currentTrek = trek;\n }\n if (state.poisData > 0) {\n Promise.all([\n getPoisNearTrek(state.api, state.language, this.trekId, this.init),\n fetch(`${state.api}poi_type/?language=${state.language}&fields=id,pictogram`, this.init),\n ])\n .then(responses => Promise.all(responses.map(response => response.json())))\n .then(([trekPois, poiTypes]) => {\n if (poiTypes) {\n state.poiTypes = poiTypes.results;\n }\n if (trekPois) {\n state.currentPois = trekPois.results;\n }\n })\n .catch(() => {\n state.poisData = 0;\n });\n }\n\n if (state.touristicContentsData > 0) {\n Promise.all([\n getTouristicContentsNearTrek(state.api, state.language, this.trekId, this.init),\n getTouristicContentCategory(state.api, state.language, null, this.init),\n ])\n .then(responses => Promise.all(responses.map(response => response.json())))\n .then(([trekTouristicContents, touristicContentsCategory]) => {\n if (touristicContentsCategory) {\n state.touristicContentCategories = touristicContentsCategory.results;\n }\n if (trekTouristicContents) {\n state.trekTouristicContents = trekTouristicContents.results;\n }\n })\n .catch(() => {\n state.touristicContentsData = 0;\n });\n }\n\n if (state.touristicEventsData > 0) {\n Promise.all([getTouristicEventsNearTrek(state.api, state.language, this.trekId, this.init), getTouristicEventType(state.api, state.language, null, this.init)])\n .then(responses => Promise.all(responses.map(response => response.json())))\n .then(([trekTouristicEvents, touristicEventType]) => {\n if (touristicEventType) {\n state.touristicEventTypes = touristicEventType.results;\n }\n if (trekTouristicEvents) {\n state.trekTouristicEvents = trekTouristicEvents.results;\n }\n })\n .catch(() => {\n state.touristicEventsData = 0;\n });\n }\n },\n );\n } catch (error) {\n if (!(error.code === DOMException.ABORT_ERR)) {\n state.networkError = true;\n }\n }\n }\n\n render() {\n return <Host></Host>;\n }\n}\n",":host {\n width: 100%;\n height: 100%;\n overflow-y: auto;\n}\n\ngrw-trek-card {\n display: flex;\n justify-content: center;\n margin: 0px 8px 16px 8px;\n flex: 1 1 300px;\n max-width: 350px;\n}\n\n:host(.large-view) grw-trek-card {\n flex: 1 1 100%;\n max-width: none;\n}\n\n.list-bottom-space {\n height: 104px;\n}\n\n.list-large-view-bottom-space {\n height: 52px;\n}\n\n.current-treks-within-bounds-length {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 16px;\n color: var(--color-on-surface-variant);\n font-size: 22px;\n line-height: 28px;\n font-weight: 400;\n font-family: var(--font-family);\n}\n\n.treks-list-container {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-around;\n}\n","import { Component, Host, h, Element, State, Prop } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport state, { onChange } from 'store/store';\nimport { Treks } from 'types/types';\n\n@Component({\n tag: 'grw-treks-list',\n styleUrl: 'grw-treks-list.scss',\n shadow: true,\n})\nexport class GrwTreksList {\n @Element() element: HTMLElement;\n @State() treksToDisplay: Treks = [];\n\n @Prop() fontFamily = 'Roboto';\n @Prop() colorPrimaryApp = '#6b0030';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorSecondaryContainer = '#e8def8';\n @Prop() colorOnSecondaryContainer = '#1d192b';\n @Prop() colorSurfaceContainerLow = '#f7f2fa';\n @Prop() displayOnlyOfflineTreks = false;\n @Prop() isLargeView = false;\n @Prop() grwApp = false;\n\n step = 10;\n shouldAddInfiniteScrollEvent = true;\n\n handleInfiniteScrollBind: (event: any) => void = this.handleInfiniteScroll.bind(this);\n\n connectedCallback() {\n this.handleInfiniteScrollEvent(true);\n if (state.currentTreks) {\n this.treksToDisplay = [...state.currentTreks.slice(0, this.step)];\n }\n onChange('currentTreks', () => {\n this.handleInfiniteScrollEvent(true);\n this.element.scroll({ top: 0 });\n if (state.currentTreks) {\n this.treksToDisplay = [...state.currentTreks.slice(0, this.step)];\n }\n });\n onChange('treksWithinBounds', () => {\n this.handleInfiniteScrollEvent(true);\n this.element.scroll({ top: 0 });\n if (state.treksWithinBounds) {\n this.treksToDisplay = [...state.treksWithinBounds.slice(0, this.step)];\n }\n });\n }\n\n handleInfiniteScroll(event: any) {\n if (event.composedPath()[0].scrollTop + event.composedPath()[0].scrollHeight / 2 >= event.composedPath()[0].scrollHeight) {\n if (this.treksToDisplay.length < state.treksWithinBounds.length) {\n this.treksToDisplay = state.treksWithinBounds.slice(\n 0,\n this.treksToDisplay.length + this.step >= state.treksWithinBounds.length ? state.treksWithinBounds.length : this.treksToDisplay.length + this.step,\n );\n } else {\n this.handleInfiniteScrollEvent(false);\n }\n }\n }\n\n handleInfiniteScrollEvent(shouldAddInfiniteScrollEvent: boolean) {\n if (shouldAddInfiniteScrollEvent) {\n if (this.shouldAddInfiniteScrollEvent) {\n this.element.addEventListener('scroll', this.handleInfiniteScrollBind);\n this.shouldAddInfiniteScrollEvent = !shouldAddInfiniteScrollEvent;\n }\n } else {\n this.element.removeEventListener('scroll', this.handleInfiniteScrollBind);\n this.shouldAddInfiniteScrollEvent = !shouldAddInfiniteScrollEvent;\n }\n }\n\n disconnectedCallback() {\n this.handleInfiniteScrollEvent(false);\n }\n\n render() {\n return (\n <Host class={{ 'large-view': this.isLargeView }} style={{ '--font-family': this.fontFamily, '--color-primary-app': this.colorPrimaryApp }}>\n {state.treksWithinBounds && (\n <div part=\"current-treks-within-bounds-length\" class=\"current-treks-within-bounds-length\">{`${state.treksWithinBounds.length} ${\n state.treksWithinBounds.length > 1 ? translate[state.language].treks : translate[state.language].trek\n }`}</div>\n )}\n <div part=\"treks-list-container\" class=\"treks-list-container\">\n {this.treksToDisplay.map(trek => (\n <grw-trek-card\n exportparts=\"trek-card,trek-img-container,trek-img,trek-sub-container,trek-departure,trek-name,trek-themes-container,trek-theme,trek-icons-labels-container,trek-icon-label,trek-icon,trek-label\"\n key={`trek-${trek.id}`}\n trek={trek}\n is-large-view={this.isLargeView}\n fontFamily={this.fontFamily}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n grw-app={this.grwApp}\n ></grw-trek-card>\n ))}\n </div>\n <div part=\"list-bottom-space\" class={!this.isLargeView ? 'list-bottom-space' : 'list-large-view-bottom-space'}></div>\n </Host>\n );\n }\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { getAllDataInStore } from 'services/grw-db.service';\nimport { getCities, getDistricts, getLabel, getTrekAccessibility, getTreksList, trekIsAvailableOffline } from 'services/treks.service';\nimport state from 'store/store';\nimport { Treks } from 'types/types';\nimport { durations, elevations, getCacheMode, imagesRegExp, lengths, setFilesFromStore } from 'utils/utils';\n\n@Component({\n tag: 'grw-treks-provider',\n shadow: true,\n})\nexport class GrwTreksProvider {\n @Prop() languages = 'fr';\n @Prop() api: string;\n @Prop() inBbox: string;\n @Prop() cities: string;\n @Prop() districts: string;\n @Prop() structures: string;\n @Prop() themes: string;\n @Prop() portals: string;\n @Prop() routes: string;\n @Prop() practices: string;\n @Prop() labels: string;\n @Prop() offline = false;\n\n controller = new AbortController();\n signal = this.controller.signal;\n init: RequestInit = { cache: getCacheMode(), 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\n state.portalsFromProviders = this.portals;\n state.inBboxFromProviders = this.inBbox;\n state.citiesFromProviders = this.cities;\n state.districtsFromProviders = this.districts;\n state.structuresFromProviders = this.structures;\n state.themesFromProviders = this.themes;\n state.routesFromProviders = this.routes;\n state.practicesFromProviders = this.practices;\n state.labelsFromProviders = this.labels;\n\n this.handleTreks();\n }\n\n disconnectedCallback() {\n this.controller.abort();\n state.networkError = false;\n }\n\n async handleTreks() {\n if (this.offline) {\n this.handleOfflineTreks();\n } else {\n this.handleOnlineTreks();\n }\n }\n\n async handleOfflineTreks() {\n let treksInStore: Treks = await getAllDataInStore('treks');\n if (treksInStore && treksInStore.length > 0) {\n state.difficulties = await this.handleOfflineProperty('difficulties');\n state.routes = await this.handleOfflineProperty('routes');\n state.practices = await this.handleOfflineProperty('practices');\n state.themes = await this.handleOfflineProperty('themes');\n state.cities = await this.handleOfflineProperty('cities');\n state.accessibilities = await this.handleOfflineProperty('accessibilities');\n state.labels = await this.handleOfflineProperty('labels');\n state.districts = await this.handleOfflineProperty('districts');\n state.durations = durations;\n state.lengths = lengths;\n state.elevations = elevations;\n treksInStore = await this.handleOfflineProperty('treks');\n this.sortTreks(treksInStore);\n if (this.offline) {\n treksInStore = treksInStore.filter(trek => trek.offline);\n }\n state.treks = treksInStore;\n state.currentTreks = treksInStore;\n } else {\n state.networkError = true;\n }\n }\n\n sortTreks(treks) {\n treks.sort((a, b) => {\n return a.name.localeCompare(b.name, undefined, {\n numeric: true,\n sensitivity: 'base',\n });\n });\n }\n\n async handleOfflineProperty(property, exclude: string[] = []) {\n const data = await getAllDataInStore(property);\n await setFilesFromStore(data, imagesRegExp, exclude);\n return data as any;\n }\n\n handleOnlineTreks() {\n Promise.all([\n fetch(`${state.api}trek_difficulty/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,label,pictogram`, this.init),\n fetch(`${state.api}trek_route/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,route,pictogram`, this.init),\n fetch(`${state.api}trek_practice/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,name,pictogram`, this.init),\n fetch(`${state.api}theme/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,label,pictogram`, this.init),\n getTrekAccessibility(state.api, state.language, this.portals, this.init),\n getLabel(state.api, state.language, this.portals, this.init),\n getDistricts(state.api, state.language, this.init),\n getTreksList(\n state.api,\n state.language,\n this.inBbox,\n this.cities,\n this.districts,\n this.structures,\n this.themes,\n this.portals,\n this.routes,\n this.practices,\n this.labels,\n this.init,\n ),\n ])\n .then(responses => {\n responses.forEach(response => {\n if (response.status !== 200) {\n throw new Error('network error');\n }\n });\n return Promise.all(responses.map(response => response.json()));\n })\n .then(async ([difficulties, routes, practices, themes, accessibility, labels, districts, treks]) => {\n state.networkError = false;\n state.difficulties = difficulties.results;\n state.routes = routes.results;\n state.practices = practices.results.map(practice => ({ ...practice, selected: false }));\n state.themes = themes.results;\n state.accessibilities = accessibility.results;\n state.labels = labels.results;\n state.districts = districts.results;\n state.durations = durations;\n state.lengths = lengths;\n state.elevations = elevations;\n\n const cityIds = new Set<number>();\n if (treks && treks.results) {\n treks.results.forEach(trek => {\n if (trek.departure_city) {\n cityIds.add(trek.departure_city);\n }\n if (trek.cities) {\n trek.cities.forEach(c => cityIds.add(c));\n }\n });\n }\n\n let cities = [];\n if (cityIds.size > 0) {\n try {\n const citiesResponse = await getCities(state.api, state.language, this.init, Array.from(cityIds));\n const citiesData = await citiesResponse.json();\n cities = citiesData.results || [];\n } catch (e) {\n console.error('Failed to load cities', e);\n }\n }\n state.cities = cities;\n\n const treksWithOfflineValue = [];\n const treksWithDeparture = treks.results.filter(trek => trek.departure_geom !== null);\n\n for (let index = 0; index < treksWithDeparture.length; index++) {\n const offline = await trekIsAvailableOffline(treksWithDeparture[index].id);\n treksWithOfflineValue.push({ ...treksWithDeparture[index], offline });\n }\n this.sortTreks(treksWithOfflineValue);\n state.treks = treksWithOfflineValue;\n state.currentTreks = treksWithOfflineValue;\n })\n .catch(async () => {\n await this.handleOfflineTreks();\n });\n }\n\n render() {\n return <Host></Host>;\n }\n}\n"],"mappings":"6gDAAA,MAAMA,GAAqB,IAAM,4gC,MCSpBC,GAAe,MAL5B,WAA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