1"use strict";(self.webpackChunkkunstmaan_edition=self.webpackChunkkunstmaan_edition||[]).push([[8964],{6583:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval('{\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n "default": () => (/* binding */ map_locate_controller)\n});\n\n// EXTERNAL MODULE: ./node_modules/@hotwired/stimulus/dist/stimulus.js\nvar stimulus = __webpack_require__(2891);\n// EXTERNAL MODULE: ./node_modules/leaflet/dist/leaflet-src.js\nvar leaflet_src = __webpack_require__(3481);\n;// ./node_modules/leaflet.locatecontrol/dist/L.Control.Locate.esm.js\n\n\n/*!\nCopyright (c) 2016 Dominik Moritz\n\nThis file is part of the leaflet locate control. It is licensed under the MIT license.\nYou can find the project at: https://github.com/domoritz/leaflet-locatecontrol\n*/\nconst addClasses = (el, names) => {\n names.split(" ").forEach((className) => {\n el.classList.add(className);\n });\n};\n\nconst removeClasses = (el, names) => {\n names.split(" ").forEach((className) => {\n el.classList.remove(className);\n });\n};\n\n/**\n * Compatible with Circle but a true marker instead of a path\n */\nconst LocationMarker = leaflet_src.Marker.extend({\n initialize(latlng, options) {\n (0,leaflet_src.setOptions)(this, options);\n this._latlng = latlng;\n this.createIcon();\n },\n\n /**\n * Create a styled circle location marker\n */\n createIcon() {\n const opt = this.options;\n\n const style = [\n ["stroke", opt.color],\n ["stroke-width", opt.weight],\n ["fill", opt.fillColor],\n ["fill-opacity", opt.fillOpacity],\n ["opacity", opt.opacity]\n ]\n .filter(([k,v]) => v !== undefined)\n .map(([k,v]) => `${k}="${v}"`)\n .join(" ");\n\n const icon = this._getIconSVG(opt, style);\n\n this._locationIcon = (0,leaflet_src.divIcon)({\n className: icon.className,\n html: icon.svg,\n iconSize: [icon.w, icon.h]\n });\n\n this.setIcon(this._locationIcon);\n },\n\n /**\n * Return the raw svg for the shape\n *\n * Split so can be easily overridden\n */\n _getIconSVG(options, style) {\n const r = options.radius;\n const w = options.weight;\n const s = r + w;\n const s2 = s * 2;\n const svg =\n `<svg xmlns="http://www.w3.org/2000/svg" width="${s2}" height="${s2}" version="1.1" viewBox="-${s} -${s} ${s2} ${s2}">` +\n `<circle r="${r}" ${style} /></svg>`;\n return {\n className: "leaflet-control-locate-location",\n svg,\n w: s2,\n h: s2\n };\n },\n\n setStyle(style) {\n (0,leaflet_src.setOptions)(this, style);\n this.createIcon();\n }\n});\n\nconst CompassMarker = LocationMarker.extend({\n initialize(latlng, heading, options) {\n (0,leaflet_src.setOptions)(this, options);\n this._latlng = latlng;\n this._heading = heading;\n this.createIcon();\n },\n\n setHeading(heading) {\n this._heading = heading;\n },\n\n /**\n * Create a styled arrow compass marker\n */\n _getIconSVG(options, style) {\n const r = options.radius;\n const w = options.width + options.weight;\n const h = (r + options.depth + options.weight) * 2;\n const path = `M0,0 l${options.width / 2},${options.depth} l-${w},0 z`;\n const svg =\n `<svg xmlns="http://www.w3.org/2000/svg" width="${w}" height="${h}" version="1.1" viewBox="-${w / 2} 0 ${w} ${h}" transform="rotate(${this._heading})">` +\n `<path d="${path}" ${style} /></svg>`;\n return {\n className: "leaflet-control-locate-heading",\n svg,\n w,\n h\n };\n }\n});\n\nconst LocateControl = leaflet_src.Control.extend({\n options: {\n /** Position of the control */\n position: "topleft",\n /** The layer that the user\'s location should be drawn on. By default creates a new layer. */\n layer: undefined,\n /**\n * Automatically sets the map view (zoom and pan) to the user\'s location as it updates.\n * While the map is following the user\'s location, the control is in the `following` state,\n * which changes the style of the control and the circle marker.\n *\n * Possible values:\n * - false: never updates the map view when location changes.\n * - \'once\': set the view when the location is first determined\n * - \'always\': always updates the map view when location changes.\n * The map view follows the user\'s location.\n * - \'untilPan\': like \'always\', except stops updating the\n * view if the user has manually panned the map.\n * The map view follows the user\'s location until she pans.\n * - \'untilPanOrZoom\': (default) like \'always\', except stops updating the\n * view if the user has manually panned the map.\n * The map view follows the user\'s location until she pans.\n */\n setVie
1w: "untilPanOrZoom",\n /** Keep the current map zoom level when setting the view and only pan. */\n keepCurrentZoomLevel: false,\n /** After activating the plugin by clicking on the icon, zoom to the selected zoom level, even when keepCurrentZoomLevel is true. Set to \'false\' to disable this feature. */\n initialZoomLevel: false,\n /**\n * This callback can be used to override the viewport tracking\n * This function should return a LatLngBounds object.\n *\n * For example to extend the viewport to ensure that a particular LatLng is visible:\n *\n * getLocationBounds: function(locationEvent) {\n * return locationEvent.bounds.extend([-33.873085, 151.219273]);\n * },\n */\n getLocationBounds(locationEvent) {\n return locationEvent.bounds;\n },\n /** Smooth pan and zoom to the location of the marker. Only works in Leaflet 1.0+. */\n flyTo: false,\n /**\n * The user location can be inside and outside the current view when the user clicks on the\n * control that is already active. Both cases can be configures separately.\n * Possible values are:\n * - \'setView\': zoom and pan to the current location\n * - \'stop\': stop locating and remove the location marker\n */\n clickBehavior: {\n /** What should happen if the user clicks on the control while the location is within the current view. */\n inView: "stop",\n /** What should happen if the user clicks on the control while the location is outside the current view. */\n outOfView: "setView",\n /**\n * What should happen if the user clicks on the control while the location is within the current view\n * and we could be following but are not. Defaults to a special value which inherits from \'inView\';\n */\n inViewNotFollowing: "inView"\n },\n /**\n * If set, save the map bounds just before centering to the user\'s\n * location. When control is disabled, set the view back to the\n * bounds that were saved.\n */\n returnToPrevBounds: false,\n /**\n * Keep a cache of the location after the user deactivates the control. If set to false, the user has to wait\n * until the locate API returns a new location before they see where they are again.\n */\n cacheLocation: true,\n /** If set, a circle that shows the location accuracy is drawn. */\n drawCircle: true,\n /** If set, the marker at the users\' location is drawn. */\n drawMarker: true,\n /** If set and supported then show the compass heading */\n showCompass: true,\n /** The class to be used to create the marker. For example L.CircleMarker or L.Marker */\n markerClass: LocationMarker,\n /** The class us be used to create the compass bearing arrow */\n compassClass: CompassMarker,\n /** Accuracy circle style properties. NOTE these styles should match the css animations styles */\n circleStyle: {\n className: "leaflet-control-locate-circle",\n color: "#136AEC",\n fillColor: "#136AEC",\n fillOpacity: 0.15,\n weight: 0\n },\n /** Inner marker style properties. Only works if your marker class supports `setStyle`. */\n markerStyle: {\n className: "leaflet-control-locate-marker",\n color: "#fff",\n fillColor: "#2A93EE",\n fillOpacity: 1,\n weight: 3,\n opacity: 1,\n radius: 9\n },\n /** Compass */\n compassStyle: {\n fillColor: "#2A93EE",\n fillOpacity: 1,\n weight: 0,\n color: "#fff",\n opacity: 1,\n radius: 9, // How far is the arrow from the center of the marker\n width: 9, // Width of the arrow\n depth: 6 // Length of the arrow\n },\n /**\n * Changes to accuracy circle and inner marker while following.\n * It is only necessary to provide the properties that should change.\n */\n followCircleStyle: {},\n followMarkerStyle: {\n // color: \'#FFA500\',\n // fillColor: \'#FFB000\'\n },\n followCompassStyle: {},\n /** The CSS class for the icon. For example fa-location-arrow or fa-map-marker */\n icon: "leaflet-control-locate-location-arrow",\n iconLoading: "leaflet-control-locate-spinner",\n /** The element to be created for icons. For example span or i */\n iconElementTag: "span",\n /** The element to be created for the text. For example small or span */\n textElementTag: "small",\n /** Padding around the accuracy circle. */\n circlePadding: [0, 0],\n /** Use metric units. */\n metric: true,\n /**\n * This callback can be used in case you would like to override button creation behavior.\n * This is useful for DOM manipulation frameworks such as angular etc.\n * This function should return an object with HtmlElement for the button (link property) and the icon (icon property).\n */\n createButtonCallback(container, options) {\n const link = leaflet_src.DomUtil.create("a", "leaflet-bar-part leaflet-bar-part-single", container);\n link.title = options.strings.title;\n link.href = "#";\n link.setAttribute("role", "button");\n const icon = leaflet_src.DomUtil.create(options.iconElementTag, options.icon, link);\n\n if (options.strings.text !== undefined) {\n const text = leaflet_src.DomUtil.create(options.textElementTag, "leaflet-locate-text", link);\n text.textContent = options.strings.text;\n link.classList.add("leaflet-locate-text-active");\n link.parentNode.style.display = "flex";\n if (options.icon.length > 0) {\n icon.classList.add("leaflet-locate-icon");\n }\n }\n\n return { link, icon };\n }
1,\n /** This event is called in case of any location error that is not a time out error. */\n onLocationError(err, control) {\n alert(err.message);\n },\n /**\n * This event is called when the user\'s location is outside the bounds set on the map.\n * The event is called repeatedly when the location changes.\n */\n onLocationOutsideMapBounds(control) {\n control.stop();\n alert(control.options.strings.outsideMapBoundsMsg);\n },\n /** Display a pop-up when the user click on the inner marker. */\n showPopup: true,\n strings: {\n title: "Show me where I am",\n metersUnit: "meters",\n feetUnit: "feet",\n popup: "You are within {distance} {unit} from this point",\n outsideMapBoundsMsg: "You seem located outside the boundaries of the map"\n },\n /** The default options passed to leaflets locate method. */\n locateOptions: {\n maxZoom: Infinity,\n watch: true, // if you overwrite this, visualization cannot be updated\n setView: false // have to set this to false because we have to\n // do setView manually\n }\n },\n\n initialize(options) {\n // set default options if nothing is set (merge one step deep)\n for (const i in options) {\n if (typeof this.options[i] === "object") {\n (0,leaflet_src.extend)(this.options[i], options[i]);\n } else {\n this.options[i] = options[i];\n }\n }\n\n // extend the follow marker style and circle from the normal style\n this.options.followMarkerStyle = (0,leaflet_src.extend)({}, this.options.markerStyle, this.options.followMarkerStyle);\n this.options.followCircleStyle = (0,leaflet_src.extend)({}, this.options.circleStyle, this.options.followCircleStyle);\n this.options.followCompassStyle = (0,leaflet_src.extend)({}, this.options.compassStyle, this.options.followCompassStyle);\n },\n\n /**\n * Add control to map. Returns the container for the control.\n */\n onAdd(map) {\n const container = leaflet_src.DomUtil.create("div", "leaflet-control-locate leaflet-bar leaflet-control");\n this._container = container;\n this._map = map;\n this._layer = this.options.layer || new leaflet_src.LayerGroup();\n this._layer.addTo(map);\n this._event = undefined;\n this._compassHeading = null;\n this._prevBounds = null;
1\n\n const linkAndIcon = this.options.createButtonCallback(container, this.options);\n this._link = linkAndIcon.link;\n this._icon = linkAndIcon.icon;\n\n leaflet_src.DomEvent.on(\n this._link,\n "click",\n function (ev) {\n leaflet_src.DomEvent.stopPropagation(ev);\n leaflet_src.DomEvent.preventDefault(ev);\n this._onClick();\n },\n this\n ).on(this._link, "dblclick", leaflet_src.DomEvent.stopPropagation);\n\n this._resetVariables();\n\n this._map.on("unload", this._unload, this);\n\n return container;\n },\n\n /**\n * This method is called when the user clicks on the control.\n */\n _onClick() {\n this._justClicked = true;\n const wasFollowing = this._isFollowing();\n this._userPanned = false;\n this._userZoomed = false;\n\n if (this._active && !this._event) {\n // click while requesting\n this.stop();\n } else if (this._active) {\n const behaviors = this.options.clickBehavior;\n let behavior = behaviors.outOfView;\n if (this._map.getBounds().contains(this._event.latlng)) {\n behavior = wasFollowing ? behaviors.inView : behaviors.inViewNotFollowing;\n }\n\n // Allow inheriting from another behavior\n if (behaviors[behavior]) {\n behavior = behaviors[behavior];\n }\n\n switch (behavior) {\n case "setView":\n this.setView();\n break;\n case "stop":\n this.stop();\n if (this.options.returnToPrevBounds) {\n const f = this.options.flyTo ? this._map.flyToBounds : this._map.fitBounds;\n f.bind(this._map)(this._prevBounds);\n }\n break;\n }\n } else {\n if (this.options.returnToPrevBounds) {\n this._prevBounds = this._map.getBounds();\n }\n this.start();\n }\n\n this._updateContainerStyle();\n },\n\n /**\n * Starts the plugin:\n * - activates the engine\n * - draws the marker (if coordinates available)\n */\n start() {\n this._activate();\n\n if (this._event) {\n this._drawMarker(this._map);\n\n // if we already have a location but the user clicked on the control\n if (this.options.setView) {\n this.setView();\n }\n }\n this._updateContainerStyle();\n },\n\n /**\n * Stops the plugin:\n * - deactivates the engine\n * - reinitializes the button\n * - removes the marker\n */\n stop() {\n this._deactivate();\n\n this._cleanClasses();\n this._resetVariables();\n\n this._removeMarker();\n },\n\n /**\n * Keep the control active but stop following the location\n */\n stopFollowing() {\n this._userPanned = true;\n this._updateContainerStyle();\n this._drawMarker();\n },\n\n /**\n * This method launches the location engine.\n * It is called before the marker is updated,\n * event if it does not mean that the event will be ready.\n *\n * Override it if you want to add more functionalities.\n * It should set the this._active to true and do nothing if\n * this._active is true.\n */\n _activate() {\n if (this._active || !this._map) {\n return;\n }\n\n this._map.locate(this.options.locateOptions);\n this._map.fire("locateactivate", this);\n this._active = true;\n\n // bind event listeners\n this._map.on("locationfound", this._onLocationFound, this);\n this._map.on("locationerror", this._onLocationError, this);\n this._map.on("dragstart", this._onDrag, this);\n this._map.on("zoomstart", this._onZoom, this);\n this._map.on("zoomend", this._onZoomEnd, this);\n if (this.options.showCompass) {\n const oriAbs = "ondeviceorientationabsolute" in window;\n if (oriAbs || "ondeviceorientation" in window) {\n const _this = this;\n const deviceorientation = function () {\n leaflet_src.DomEvent.on(window, oriAbs ? "deviceorientationabsolute" : "deviceorientation", _this._onDeviceOrientation, _this);\n };\n if (DeviceOrientationEvent && typeof DeviceOrientationEvent.requestPermission === "function") {\n DeviceOrientationEvent.requestPermission().then(function (permissionState) {\n if (permissionState === "granted") {\n deviceorientation();\n }\n });\n } else {\n deviceorientation();\n }\n }\n }\n },\n\n /**\n * Called to stop the location engine.\n *\n * Override it to shutdown any functionalities you added on start.\n */\n _deactivate() {\n if (!this._active || !this._map) {\n return;\n }\n\n this._map.stopLocate();\n this._map.fire("locatedeactivate", this);\n this._active = false;\n\n if (!this.options.cacheLocation) {\n this._event = undefined;\n }\n\n // unbind event listeners\n this._map.off("locationfound", this._onLocationFound, this);\n this._map.off("locationerror", this._onLocationError, this);\n this._map.off("dragstart", this._onDrag, this);\n this._map.off("zoomstart", this._onZoom, this);\n this._map.off("zoomend", this._onZoomEnd, this);\n if (this.options.showCompass) {\n this._compassHeading = null;
1\n if ("ondeviceorientationabsolute" in window) {\n leaflet_src.DomEvent.off(window, "deviceorientationabsolute", this._onDeviceOrientation, this);\n } else if ("ondeviceorientation" in window) {\n leaflet_src.DomEvent.off(window, "deviceorientation", this._onDeviceOrientation, this);\n }\n }\n },\n\n /**\n * Zoom (unless we should keep the zoom level) and an to the current view.\n */\n setView() {\n this._drawMarker();\n if (this._isOutsideMapBounds()) {\n this._event = undefined; // clear the current location so we can get back into the bounds\n this.options.onLocationOutsideMapBounds(this);\n } else {\n if (this._justClicked && this.options.initialZoomLevel !== false) {\n let f = this.options.flyTo ? this._map.flyTo : this._map.setView;\n f.bind(this._map)([this._event.latitude, this._event.longitude], this.options.initialZoomLevel);\n } else if (this.options.keepCurrentZoomLevel) {\n let f = this.options.flyTo ? this._map.flyTo : this._map.panTo;\n f.bind(this._map)([this._event.latitude, this._event.longitude]);\n } else {\n let f = this.options.flyTo ? this._map.flyToBounds : this._map.fitBounds;\n // Ignore zoom events while setting the viewport as these would stop following\n this._ignoreEvent = true;\n f.bind(this._map)(this.options.getLocationBounds(this._event), {\n padding: this.options.circlePadding,\n maxZoom: this.options.initialZoomLevel || this.options.locateOptions.maxZoom\n });\n leaflet_src.Util.requestAnimFrame(function () {\n // Wait until after the next animFrame because the flyTo can be async\n this._ignoreEvent = false;\n }, this);\n }\n }\n },\n\n /**\n *\n */\n _drawCompass() {\n if (!this._event) {\n return;\n }\n\n const latlng = this._event.latlng;\n\n if (this.options.showCompass && latlng && this._compassHeading !== null) {\n const cStyle = this._isFollowing() ? this.options.followCompassStyle : this.options.compassStyle;\n if (!this._compass) {\n this._compass = new this.options.compassClass(latlng, this._compassHeading, cStyle).addTo(this._layer);\n } else {\n this._compass.setLatLng(latlng);\n this._compass.setHeading(this._compassHeading);\n // If the compassClass can be updated with setStyle, update it.\n if (this._compass.setStyle) {\n this._compass.setStyle(cStyle);\n }\n }\n //\n }\n if (this._compass && (!this.options.showCompass || this._compassHeading === null)) {\n this._compass.removeFrom(this._layer);\n this._compass = null;\n }\n },\n\n /**\n * Draw the marker and accuracy circle on the map.\n *\n * Uses the event retrieved from onLocationFound from the map.\n */\n _drawMarker() {\n if (this._event.accuracy === undefined) {\n this._event.accuracy = 0;\n }\n\n const radius = this._event.accuracy;\n const latlng = this._event.latlng;\n\n // circle with the radius of the location\'s accuracy\n if (this.options.drawCircle) {\n const style = this._isFollowing() ? this.options.followCircleStyle : this.options.circleStyle;\n\n if (!this._circle) {\n this._circle = (0,leaflet_src.circle)(latlng, radius, style).addTo(this._layer);\n } else {\n this._circle.setLatLng(latlng).setRadius(radius).setStyle(style);\n }\n }\n\n let distance;\n let unit;\n if (this.options.metric) {\n distance = radius.toFixed(0);\n unit = this.options.strings.metersUnit;\n } else {\n distance = (radius * 3.2808399).toFixed(0);\n unit = this.options.strings.feetUnit;\n }\n\n // small inner marker\n if (this.options.drawMarker) {\n const mStyle = this._isFollowing() ? this.options.followMarkerStyle : this.options.markerStyle;\n if (!this._marker) {\n this._marker = new this.options.markerClass(latlng, mStyle).addTo(this._layer);\n } else {\n this._marker.setLatLng(latlng);\n // If the markerClass can be updated with setStyle, update it.\n if (this._marker.setStyle) {\n this._marker.setStyle(mStyle);\n }\n }\n }\n\n this._drawCompass();\n\n const t = this.options.strings.popup;\n function getPopupText() {\n if (typeof t === "string") {\n return leaflet_src.Util.template(t, { distance, unit });\n } else if (typeof t === "function") {\n return t({ distance, unit });\n } else {\n return t;\n }\n }\n if (this.options.showPopup && t && this._marker) {\n this._marker.bindPopup(getPopupText())._popup.setLatLng(latlng);\n }\n if (this.options.showPopup && t && this._compass) {\n this._compass.bindPopup(getPopupText())._popup.setLatLng(latlng);\n }\n },\n\n /**\n * Remove the marker from map.\n */\n _removeMarker() {\n this._layer.clearLayers();\n this._marker = undefined;\n this._circle = undefined;\n },\n\n /**\n * Unload the plugin and all event listeners.\n * Kind of the opposite of onAdd.\n */\n _unload() {\n this.stop();\n // May become undefined during HMR\n if (this._map) {\n this._map.off("unload", this._unload, this);\n }\n },\n\n /**\n * Sets the compass heading\n */\n _setCompassHeading(angle) {\n if (!isNaN(parseFloat(angle)) && isFinite(angle)) {\n angle = Math.round(angle);\n\n this._compassHeading = angle;
1\n leaflet_src.Util.requestAnimFrame(this._drawCompass, this);\n } else {\n this._compassHeading = null;\n }\n },\n\n /**\n * If the compass fails calibration just fail safely and remove the compass\n */\n _onCompassNeedsCalibration() {\n this._setCompassHeading();\n },\n\n /**\n * Process and normalise compass events\n */\n _onDeviceOrientation(e) {\n if (!this._active) {\n return;\n }\n\n if (e.webkitCompassHeading) {\n // iOS\n this._setCompassHeading(e.webkitCompassHeading);\n } else if (e.absolute && e.alpha) {\n // Android\n this._setCompassHeading(360 - e.alpha);\n }\n },\n\n /**\n * Calls deactivate and dispatches an error.\n */\n _onLocationError(err) {\n // ignore time out error if the location is watched\n if (err.code == 3 && this.options.locateOptions.watch) {\n return;\n }\n\n this.stop();\n this.options.onLocationError(err, this);\n },\n\n /**\n * Stores the received event and updates the marker.\n */\n _onLocationFound(e) {\n // no need to do anything if the location has not changed\n if (this._event && this._event.latlng.lat === e.latlng.lat && this._event.latlng.lng === e.latlng.lng && this._event.accuracy === e.accuracy) {\n return;\n }\n\n if (!this._active) {\n // we may have a stray event\n return;\n }\n\n this._event = e;\n\n this._drawMarker();\n this._updateContainerStyle();\n\n switch (this.options.setView) {\n case "once":\n if (this._justClicked) {\n this.setView();\n }\n break;\n case "untilPan":\n if (!this._userPanned) {\n this.setView();\n }\n break;\n case "untilPanOrZoom":\n if (!this._userPanned && !this._userZoomed) {\n this.setView();\n }\n break;\n case "always":\n this.setView();\n break;\n }\n\n this._justClicked = false;\n },\n\n /**\n * When the user drags. Need a separate event so we can bind and unbind event listeners.\n */\n _onDrag() {\n // only react to drags once we have a location\n if (this._event && !this._ignoreEvent) {\n this._userPanned = true;\n this._updateContainerStyle();\n this._drawMarker();\n }\n },\n\n /**\n * When the user zooms. Need a separate event so we can bind and unbind event listeners.\n */\n _onZoom() {\n // only react to drags once we have a location\n if (this._event && !this._ignoreEvent) {\n this._userZoomed = true;\n this._updateContainerStyle();\n this._drawMarker();\n }\n },\n\n /**\n * After a zoom ends update the compass and handle sideways zooms\n */\n _onZoomEnd() {\n if (this._event) {\n this._drawCompass();\n }\n\n if (this._event && !this._ignoreEvent) {\n // If we have zoomed in and out and ended up sideways treat it as a pan\n if (this._marker && !this._map.getBounds().pad(-0.3).contains(this._marker.getLatLng())) {\n this._userPanned = true;\n this._updateContainerStyle();\n this._drawMarker();\n }\n }\n },\n\n /**\n * Compute whether the map is following the user location with pan and zoom.\n */\n _isFollowing() {\n if (!this._active) {\n return false;\n }\n\n if (this.options.setView === "always") {\n return true;\n } else if (this.options.setView === "untilPan") {\n return !this._userPanned;\n } else if (this.options.setView === "untilPanOrZoom") {\n return !this._userPanned && !this._userZoomed;\n }\n },\n\n /**\n * Check if location is in map bounds\n */\n _isOutsideMapBounds() {\n if (this._event === undefined) {\n return false;\n }\n return this._map.options.maxBounds && !this._map.options.maxBounds.contains(this._event.latlng);\n },\n\n /**\n * Toggles button class between following and active.\n */\n _updateContainerStyle() {\n if (!this._container) {\n return;\n }\n\n if (this._active && !this._event) {\n // active but don\'t have a location yet\n this._setClasses("requesting");\n } else if (this._isFollowing()) {\n this._setClasses("following");\n } else if (this._active) {\n this._setClasses("active");\n }
1 else {\n this._cleanClasses();\n }\n },\n\n /**\n * Sets the CSS classes for the state.\n */\n _setClasses(state) {\n if (state == "requesting") {\n removeClasses(this._container, "active following");\n addClasses(this._container, "requesting");\n\n removeClasses(this._icon, this.options.icon);\n addClasses(this._icon, this.options.iconLoading);\n } else if (state == "active") {\n removeClasses(this._container, "requesting following");\n addClasses(this._container, "active");\n\n removeClasses(this._icon, this.options.iconLoading);\n addClasses(this._icon, this.options.icon);\n } else if (state == "following") {\n removeClasses(this._container, "requesting");\n addClasses(this._container, "active following");\n\n removeClasses(this._icon, this.options.iconLoading);\n addClasses(this._icon, this.options.icon);\n }\n },\n\n /**\n * Removes all classes from button.\n */\n _cleanClasses() {\n leaflet_src.DomUtil.removeClass(this._container, "requesting");\n leaflet_src.DomUtil.removeClass(this._container, "active");\n leaflet_src.DomUtil.removeClass(this._container, "following");\n\n removeClasses(this._icon, this.options.iconLoading);\n addClasses(this._icon, this.options.icon);\n },\n\n /**\n * Reinitializes state variables.\n */\n _resetVariables() {\n // whether locate is active or not\n this._active = false;\n\n // true if the control was clicked for the first time\n // we need this so we can pan and zoom once we have the location\n this._justClicked = false;\n\n // true if the user has panned the map after clicking the control\n this._userPanned = false;\n\n // true if the user has zoomed the map after clicking the control\n this._userZoomed = false;\n }\n});\n\nfunction locate(options) {\n return new LocateControl(options);\n}\n\n\n\n;// ./vendor/insiders/kunstmaan-application/kunstmaan-odp-bundle/Resources/ui/frontend/js/controllers/map-locate-controller.js\n\n\n\n\n/* stimulusFetch: \'lazy\' */\n/* harmony default export */ const map_locate_controller = (class extends stimulus/* Controller */.xI {\n connect() {\n this.element.addEventListener(\'ux:map:connect\', this._onConnect);\n }\n disconnect() {\n this.element.removeEventListener(\'ux:map:connect\', this._onConnect);\n }\n _onConnect(event) {\n const {\n map,\n extra\n } = event.detail;\n new LocateControl({\n position: extra.controlPosition || \'topleft\'\n }).addTo(map);\n }\n});\n\n//# sourceURL=webpack://kunstmaan-edition/./vendor/insiders/kunstmaan-application/kunstmaan-odp-bundle/Resources/ui/frontend/js/controllers/map-locate-controller.js_+_1_modules?\n}')}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.