{"version":3,"file":"point-of-sale-map-w8ifjFgB.js","sources":["../../../Scripts/components/point-of-sale-map.html?vue-htmltemplate","../../../Scripts/components/point-of-sale-map.ts"],"sourcesContent":["
\n","import { Vue, Component, Prop, Watch } from \"@wagich/vue-facing-decorator-metadata\";\n\nimport mapboxgl from \"mapbox-gl\";\nimport \"mapbox-gl/dist/mapbox-gl.css\";\nmapboxgl.accessToken = \"pk.eyJ1Ijoid2FnbmVyZ3JhcGhpY3MiLCJhIjoiY2puMGRlc2Y5MTlmbzNrcW9sZzd0enJ4MCJ9.9UzDSDeYnTP2Qwzsi8Q9_g\";\n\nconst glacenheitMarkerData = \"data:image/svg+xml;base64,PHN2ZyBpZD0iRWJlbmVfMSIgZGF0YS1uYW1lPSJFYmVuZSAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMTAuMTUgMTEwLjE1Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2M1MDA3Mjt9LmNscy0ye2ZpbGw6IzQ5MDIwMDt9LmNscy0ze2ZpbGw6I2ZiZjVlNzt9PC9zdHlsZT48L2RlZnM+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJNMjIuOTQsODUuMjFhNDQsNDQsMCwwLDAsNS40Niw0LjkyLDI1LjM2LDI1LjM2LDAsMCwwLDYuMzQtMy45NWM0LjE4LTMuNiwxMy4xNS0xNS42NywxMy4xNS0xNS42N0E0NSw0NSwwLDAsMCwzMSw3Ny43YTMyLjc4LDMyLjc4LDAsMCwwLTguMDYsNy41MU05OS4xNyw1NS4wOEE0NC4xLDQ0LjEsMCwxLDAsMjIuMTEsODQuMjljMS43OS0yLjQzLDQuOTMtNS4xMSw5LjE2LTcuNzdhNTAuMzcsNTAuMzcsMCwwLDEsMTcuMTctNi44NWw1LjE3LTcuNDdhMTUuMiwxNS4yLDAsMCwxLTUuMzMsMS4wN2MtNC42OCwwLTcuMzItMi41OC03LjMyLTYuOTFzMi4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4zLDAsMCwwLTMuNjMuMjhzLTIuOTEsMy44Ny0zLjc0LDQuODJhMTA5LjM0LDEwOS4zNCwwLDAsMS05LjUyLDEwLDM0LjgyLDM0LjgyLDAsMCwxLTksNi4xQTQ0LDQ0LDAsMCwwLDk5LjE3LDU1LjA4TTc3LjkzLDI3LjE3Yy02LjYsMC0xOC4zNyw3LTI1LjA5LDE0LjQ5YTE2Ljc3LDE2Ljc3LDAsMCwwLDcuNTQsMS40QTMyLjExLDMyLjExLDAsMCwwLDczLjIsNDAuNDJjNi4yMi0yLjU4LDEwLTYuMjksMTAtOS42NiwwLTIuMy0yLTMuNTktNS4yMy0zLjU5Ii8+PHBhdGggY2xhc3M9ImNscy0yIiBkPSJNNTUuMDgsMTA0LjhBNDkuNzMsNDkuNzMsMCwxLDEsMTA0LjgsNTUuMDgsNDkuNzksNDkuNzksMCwwLDEsNTUuMDgsMTA0LjhtMC05OC4zNGE0OC42Miw0OC42MiwwLDEsMCw0OC42MSw0OC42MkE0OC42Nyw0OC42NywwLDAsMCw1NS4wOCw2LjQ2Ii8+PHBhdGggY2xhc3M9ImNscy0zIiBkPSJNNTUuMDgsMTEwLjE1YTU1LjA4LDU1LjA4LDAsMSwxLDU1LjA3LTU1LjA3LDU1LjE0LDU1LjE0LDAsMCwxLTU1LjA3LDU1LjA3bTAtMTA1LjcxYTUwLjY0LDUwLjY0LDAsMSwwLDUwLjYzLDUwLjY0QTUwLjcsNTAuNywwLDAsMCw1NS4wOCw0LjQ0Ii8+PC9zdmc+\";\n\nimport { render } from \"./point-of-sale-map.html\";\nimport \"./point-of-sale-map.scss\";\n\n\n@Component({\n\trender\n})\nexport class PointOfSaleMap extends Vue {\n\tprivate map: mapboxgl.Map;\n\tprivate featureCollection: GeoJSON.FeatureCollection;\n\tprivate markerImage: string;\n\n\t@Prop() datasourceId: string;\n\n\tcreated() {\n\t\tif (this.datasourceId != null) {\n\t\t\tlet dataElement = document.getElementById(this.datasourceId);\n\t\t\tif (dataElement != null) {\n\t\t\t\tthis.featureCollection = JSON.parse(dataElement.innerHTML);\n\t\t\t}\n\t\t}\n\t}\n\n\tasync mounted() {\n\t\tvar featureBounds = new mapboxgl.LngLatBounds();\n\t\tthis.featureCollection.features.forEach(function (feature) {\n\t\t\tfeatureBounds.extend((feature.geometry as GeoJSON.Point).coordinates as [number, number]);\n\t\t});\n\n\t\tthis.map = new mapboxgl.Map({\n\t\t\tcontainer: (this.$refs as any).map,\n\t\t\tstyle: \"mapbox://styles/wagnergraphics/ckrxdia0p9mh917p45kkc3339\",\n\t\t\tbounds: featureBounds,\n\t\t\tfitBoundsOptions: {\n\t\t\t\tpadding: 50\n\t\t\t}\n\t\t});\n\t\tthis.map.addControl(new mapboxgl.NavigationControl());\n\n\t\tawait new Promise