diff --git a/config/key/route-planner.json b/config/key/route-planner.json new file mode 100644 index 0000000..2f66212 --- /dev/null +++ b/config/key/route-planner.json @@ -0,0 +1,10 @@ +{ + "tools": [ + { + "type": "directions", + "routePlannerService": { + "apiKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + } + } + ] +} \ No newline at end of file diff --git a/config/map.json b/config/map.json index 5d62a79..32ec2b7 100644 --- a/config/map.json +++ b/config/map.json @@ -110,8 +110,7 @@ "vehicleType": false }, "routePlannerService": { - "url": "https://router.api.gov.bc.ca/", - "apiKey": "11dd756f680c47b5aef5093d95543738" + "url": "https://router.api.gov.bc.ca/" }, "geocoderService": { "url": "https://geocoder.api.gov.bc.ca/", diff --git a/index.html b/index.html index e51b393..8e268d0 100644 --- a/index.html +++ b/index.html @@ -176,6 +176,7 @@

truckWeight: defaultVehicle.weight, } ] }, + './config/key/route-planner.json', '?' ], } ).then( function () { diff --git a/layers/dangerous-goods-restrictions/config.json b/layers/dangerous-goods-restrictions/config.json index e01364f..44b65ca 100644 --- a/layers/dangerous-goods-restrictions/config.json +++ b/layers/dangerous-goods-restrictions/config.json @@ -13,7 +13,7 @@ }, { "title": "Link", - "format": "asLink( this.feature.properties.Link, 'Link' )" + "format": "asHTML( this.feature.properties.Link )" }, { "name": "Notes", diff --git a/lib/smk.js b/lib/smk.js index d2a2334..e5d47ba 100644 --- a/lib/smk.js +++ b/lib/smk.js @@ -62,7 +62,7 @@ if ( skip ) return; { loader: "group", tags: [ { loader: "template", url: "smk/feature-list/feature-attributes.html", load:"
\n
\n

{{ layer.title }}

\n

{{ feature.title }}

\n
\n\n
{{ layer.title }}
\n\n
0\"\n >\n \n
\n
" }, { loader: "template", url: "smk/feature-list/feature-description.html", load:"
\n\n" }, - { loader: "script", url: "smk/feature-list/feature-list.js", load: function () { console.debug( "[smk/feature-list/feature-list.js]" ); include.module("feature-list",["tool","widgets","sidepanel","feature-list.panel-feature-list-html","feature-list.feature-attributes-html","feature-list.feature-properties-html","feature-list.feature-description-html","feature-list.format-link-html","feature-list.panel-feature-html"],function(inc){"use strict";Vue.component("feature-attribute",{template:'
',props:{title:{type:String},value:{type:String}}}),Vue.component("feature-list-panel",{extends:inc.widgets.toolPanel,template:inc["feature-list.panel-feature-list-html"],props:["layers","highlightId","canRemove","canClear","command","showSwipe"],computed:{featureCount:{get:function(){return this.layers&&0!=this.layers.length?this.layers.reduce(function(e,t){return e+t.features.length},0):0}}}});var featureComponent=SMK.TYPE.VueFeatureComponent=Vue.extend({props:["feature","layer","showHeader","attributes"],methods:{insertWordBreaks:function(e){return e.replace(/[^a-z0-9 ]+/gi,function(e){return""+e})},formatValue:function(e){return/^https?[:][/]{2}[^/]/.test((""+e).trim())?'Open in new window':e},formatAttribute:function(attr){var self=this,m=attr.format.match(/^(.+)[(](.+)[)]$/);if(m)return formatter[m[1]](attr,this.feature,this.layer).apply(this,eval("["+m[2]+"]"));var value=SMK.UTIL.templateReplace(attr.value,function(token){return function(){var e=eval(token);return e}.call(self)});return formatter[attr.format](Object.assign({},attr,{value:value}),this.feature,this.layer)()},formatTitle:function(attr){var self=this,title=SMK.UTIL.templateReplace(attr.title,function(token){return function(){var e=eval(token);return e}.call(self)});return this.insertWordBreaks(title)}}});function FeatureList(e){this.makePropPanel("layers",[]),this.makePropPanel("highlightId",null),this.makePropPanel("command",{}),SMK.TYPE.PanelTool.prototype.constructor.call(this,$.extend({debugView:!1},e))}function makeFormatter(e,t){var n=Vue.extend({template:e}),i=t||function(){};return function(t,a,r){return function(){var e=i.apply(null,arguments);return(new(Vue.extend({extends:n,data:function(){return Object.assign({attribute:t,feature:a,layer:r},e)}}))).$mount().$el.outerHTML}}}Vue.component("feature-attributes",{extends:featureComponent,template:inc["feature-list.feature-attributes-html"]}),Vue.component("feature-properties",{extends:featureComponent,template:inc["feature-list.feature-properties-html"],computed:{sortedProperties:function(){return this.feature&&this.feature.properties?Object.keys(this.feature.properties).sort():[]}}}),Vue.component("feature-description",{extends:featureComponent,template:inc["feature-list.feature-description-html"]}),SMK.TYPE.FeatureList=FeatureList,$.extend(FeatureList.prototype,SMK.TYPE.PanelTool.prototype),FeatureList.prototype.afterInitialize=[],FeatureList.prototype.afterInitialize.push(function(r){var n=this;r.on(this.id,{active:function(e){n.featureSet.pick(e.featureId)},hover:function(e){n.featureSet.highlight(e.features&&e.features.map(function(e){return e.id}))},clear:function(e){n.featureSet.clear()},remove:function(e){n.featureSet.remove([e.featureId])},"swipe-up":function(e){r.$sidepanel.setExpand(2)},"swipe-down":function(e){r.$sidepanel.incrExpand(-1)}}),n.featureSet.addedFeatures(function(e){n.active=!0;var t=r.$viewer.layerId[e.layerId],a=r.$viewer.displayContext.layers.getLayerIndex(e.layerId)||0;n.layers[a]||Vue.set(n.layers,a,{id:t.id,title:t.config.title,features:[]}),Vue.set(n.layers[a],"features",n.layers[a].features.concat(e.features.map(function(e){return n.firstId||(n.firstId=e.id),{id:e.id,title:e.title}})))}),n.featureSet.clearedFeatures(function(e){n.layers=[],n.firstId=null}),n.featureSet.removedFeatures(function(t){r.$viewer.layerId[t.features[0].layerId];var e=r.$viewer.displayContext.layers.getLayerIndex(t.features[0].layerId)||0;n.layers[e].features=n.layers[e].features.filter(function(e){return e.id!=t.features[0].id})})}),Vue.component("feature-panel",{extends:inc.widgets.toolPanel,template:inc["feature-list.panel-feature-html"],props:["feature","layer","attributeComponent","tool","resultPosition","resultCount","instance","command"],data:function(){return{attributeView:"default"}},computed:{attributes:{get:function(){var t=this.feature;return this.layer.attributes?this.layer.attributes.filter(function(e){return!1!==e.visible}).map(function(e){return{id:e.name||e.title,name:e.name,title:e.title,value:e.name?t.properties[e.name]:e.value,format:e.format||"simple"}}):[]}}}});var formatter={simple:makeFormatter('{{ attribute.value }}'),asLocalTimestamp:makeFormatter('{{ ( new Date( attribute.value ) ).toLocaleString() }}'),asLocalDate:makeFormatter('{{ ( new Date( attribute.value ) ).toLocaleDateString() }}'),asLocalTime:makeFormatter('{{ ( new Date( attribute.value ) ).toLocaleTimeString() }}'),asUnit:makeFormatter('{{ attribute.value }} {{ unit }}',function(e){return{unit:e}}),asLink:makeFormatter(inc["feature-list.format-link-html"],function(e,t){return{url:e,label:t}})};function FeaturePanel(e){this.makePropPanel("feature",null),this.makePropPanel("layer",null),this.makePropPanel("attributeComponent",null),this.makePropPanel("tool",{}),this.makePropPanel("resultPosition",null),this.makePropPanel("resultCount",null),this.makePropPanel("instance",null),this.makePropPanel("attributeView","default"),this.makePropPanel("command",{}),this.makePropPanel("attributes",null),SMK.TYPE.Tool.prototype.constructor.call(this,$.extend({},e))}return SMK.TYPE.FeaturePanel=FeaturePanel,$.extend(FeaturePanel.prototype,SMK.TYPE.Tool.prototype),FeaturePanel.prototype.afterInitialize=[],FeaturePanel.prototype.afterInitialize.push(function(t){t.on(this.id,{"swipe-up":function(e){t.$sidepanel.setExpand(2)},"swipe-down":function(e){t.$sidepanel.incrExpand(-1)}})}),FeaturePanel.prototype.setAttributeComponent=function(t,e){if(t.config.popupTemplate){var a;if(t.config.popupTemplate.startsWith("@")?this.attributeComponent=t.config.popupTemplate.substr(1):(this.attributeComponent="feature-template-"+t.config.id,a=t.config.popupTemplate),!Vue.component(this.attributeComponent))if(a)try{Vue.component(this.attributeComponent,{template:a,extends:featureComponent})}catch(e){console.warn("failed compiling template:",this.attributeComponent,e),t.config.popupTemplate=null}else console.warn("component not found:",this.attributeComponent),t.config.popupTemplate=null;if(Vue.component(this.attributeComponent))return}e.properties.description?this.attributeComponent="feature-description":t.config.attributes?this.attributeComponent="feature-attributes":this.attributeComponent="feature-properties"},FeatureList});} }, + { loader: "script", url: "smk/feature-list/feature-list.js", load: function () { console.debug( "[smk/feature-list/feature-list.js]" ); include.module("feature-list",["tool","widgets","sidepanel","feature-list.panel-feature-list-html","feature-list.feature-attributes-html","feature-list.feature-properties-html","feature-list.feature-description-html","feature-list.format-link-html","feature-list.panel-feature-html"],function(inc){"use strict";Vue.component("feature-attribute",{template:'
',props:{title:{type:String},value:{type:String}}}),Vue.component("feature-list-panel",{extends:inc.widgets.toolPanel,template:inc["feature-list.panel-feature-list-html"],props:["layers","highlightId","canRemove","canClear","command","showSwipe"],computed:{featureCount:{get:function(){return this.layers&&0!=this.layers.length?this.layers.reduce(function(e,t){return e+t.features.length},0):0}}}});var featureComponent=SMK.TYPE.VueFeatureComponent=Vue.extend({props:["feature","layer","showHeader","attributes"],methods:{insertWordBreaks:function(e){return e.replace(/[^a-z0-9 ]+/gi,function(e){return""+e})},formatValue:function(e){return/^https?[:][/]{2}[^/]/.test((""+e).trim())?'Open in new window':e},formatAttribute:function(attr){var self=this,m=attr.format.match(/^(.+)[(](.+)[)]$/);if(m)return formatter[m[1]](attr,this.feature,this.layer).apply(this,eval("["+m[2]+"]"));var value=SMK.UTIL.templateReplace(attr.value,function(token){return function(){var e=eval(token);return e}.call(self)});return formatter[attr.format](Object.assign({},attr,{value:value}),this.feature,this.layer)()},formatTitle:function(attr){var self=this,title=SMK.UTIL.templateReplace(attr.title,function(token){return function(){var e=eval(token);return e}.call(self)});return this.insertWordBreaks(title)}}});function FeatureList(e){this.makePropPanel("layers",[]),this.makePropPanel("highlightId",null),this.makePropPanel("command",{}),SMK.TYPE.PanelTool.prototype.constructor.call(this,$.extend({debugView:!1},e))}function makeFormatter(e,t){var n=Vue.extend({template:e}),i=t||function(){};return function(t,a,r){return function(){var e=i.apply(null,arguments);return(new(Vue.extend({extends:n,data:function(){return Object.assign({attribute:t,feature:a,layer:r},e)}}))).$mount().$el.outerHTML}}}Vue.component("feature-attributes",{extends:featureComponent,template:inc["feature-list.feature-attributes-html"]}),Vue.component("feature-properties",{extends:featureComponent,template:inc["feature-list.feature-properties-html"],computed:{sortedProperties:function(){return this.feature&&this.feature.properties?Object.keys(this.feature.properties).sort():[]}}}),Vue.component("feature-description",{extends:featureComponent,template:inc["feature-list.feature-description-html"]}),SMK.TYPE.FeatureList=FeatureList,$.extend(FeatureList.prototype,SMK.TYPE.PanelTool.prototype),FeatureList.prototype.afterInitialize=[],FeatureList.prototype.afterInitialize.push(function(r){var n=this;r.on(this.id,{active:function(e){n.featureSet.pick(e.featureId)},hover:function(e){n.featureSet.highlight(e.features&&e.features.map(function(e){return e.id}))},clear:function(e){n.featureSet.clear()},remove:function(e){n.featureSet.remove([e.featureId])},"swipe-up":function(e){r.$sidepanel.setExpand(2)},"swipe-down":function(e){r.$sidepanel.incrExpand(-1)}}),n.featureSet.addedFeatures(function(e){n.active=!0;var t=r.$viewer.layerId[e.layerId],a=r.$viewer.displayContext.layers.getLayerIndex(e.layerId)||0;n.layers[a]||Vue.set(n.layers,a,{id:t.id,title:t.config.title,features:[]}),Vue.set(n.layers[a],"features",n.layers[a].features.concat(e.features.map(function(e){return n.firstId||(n.firstId=e.id),{id:e.id,title:e.title}})))}),n.featureSet.clearedFeatures(function(e){n.layers=[],n.firstId=null}),n.featureSet.removedFeatures(function(t){r.$viewer.layerId[t.features[0].layerId];var e=r.$viewer.displayContext.layers.getLayerIndex(t.features[0].layerId)||0;n.layers[e].features=n.layers[e].features.filter(function(e){return e.id!=t.features[0].id})})}),Vue.component("feature-panel",{extends:inc.widgets.toolPanel,template:inc["feature-list.panel-feature-html"],props:["feature","layer","attributeComponent","tool","resultPosition","resultCount","instance","command"],data:function(){return{attributeView:"default"}},computed:{attributes:{get:function(){var t=this.feature;return this.layer.attributes?this.layer.attributes.filter(function(e){return!1!==e.visible}).map(function(e){return{id:e.name||e.title,name:e.name,title:e.title,value:e.name?t.properties[e.name]:e.value,format:e.format||"simple"}}):[]}}}});var formatter={simple:makeFormatter('{{ attribute.value }}'),asLocalTimestamp:makeFormatter('{{ ( new Date( attribute.value ) ).toLocaleString() }}'),asLocalDate:makeFormatter('{{ ( new Date( attribute.value ) ).toLocaleDateString() }}'),asLocalTime:makeFormatter('{{ ( new Date( attribute.value ) ).toLocaleTimeString() }}'),asUnit:makeFormatter('{{ attribute.value }} {{ unit }}',function(e){return{unit:e}}),asLink:makeFormatter(inc["feature-list.format-link-html"],function(e,t){return{url:e,label:t}}),asHTML:makeFormatter('',function(e){return{html:e}})};function FeaturePanel(e){this.makePropPanel("feature",null),this.makePropPanel("layer",null),this.makePropPanel("attributeComponent",null),this.makePropPanel("tool",{}),this.makePropPanel("resultPosition",null),this.makePropPanel("resultCount",null),this.makePropPanel("instance",null),this.makePropPanel("attributeView","default"),this.makePropPanel("command",{}),this.makePropPanel("attributes",null),SMK.TYPE.Tool.prototype.constructor.call(this,$.extend({},e))}return SMK.TYPE.FeaturePanel=FeaturePanel,$.extend(FeaturePanel.prototype,SMK.TYPE.Tool.prototype),FeaturePanel.prototype.afterInitialize=[],FeaturePanel.prototype.afterInitialize.push(function(t){t.on(this.id,{"swipe-up":function(e){t.$sidepanel.setExpand(2)},"swipe-down":function(e){t.$sidepanel.incrExpand(-1)}})}),FeaturePanel.prototype.setAttributeComponent=function(t,e){if(t.config.popupTemplate){var a;if(t.config.popupTemplate.startsWith("@")?this.attributeComponent=t.config.popupTemplate.substr(1):(this.attributeComponent="feature-template-"+t.config.id,a=t.config.popupTemplate),!Vue.component(this.attributeComponent))if(a)try{Vue.component(this.attributeComponent,{template:a,extends:featureComponent})}catch(e){console.warn("failed compiling template:",this.attributeComponent,e),t.config.popupTemplate=null}else console.warn("component not found:",this.attributeComponent),t.config.popupTemplate=null;if(Vue.component(this.attributeComponent))return}e.properties.description?this.attributeComponent="feature-description":t.config.attributes?this.attributeComponent="feature-attributes":this.attributeComponent="feature-properties"},FeatureList});} }, { loader: "template", url: "smk/feature-list/feature-properties.html", load:"
\n
\n

{{ layer.title }}

\n

{{ feature.title }}

\n
\n\n
{{ layer.title }}
\n\n
\n
\n \n \n
\n
\n
" }, { loader: "template", url: "smk/feature-list/format-link.html", load:"\n {{ label || attribute.value || url }}open_in_new\n" }, { loader: "style", url: "smk/feature-list/panel-feature-list.css", load: "/* [smk/feature-list/panel-feature-list.css] */\n.smk-feature-list-panel .smk-layer{position:relative;margin-bottom:5px;border-radius:5px}.smk-feature-list-panel .smk-layer h2{display:flex;justify-content:space-between;align-items:flex-end;width:calc(100% - 10px);font-size:13px;font-weight:700;position:sticky;top:0;background-color:#fff;padding:5px;border-bottom:1px solid #a9a9a9;margin:0}.smk-feature-list-panel .smk-layer h2 .smk-count{font-size:10px;vertical-align:bottom}.smk-feature-list-panel .smk-layer .smk-feature{font-size:12px;margin-left:10px;cursor:pointer;display:flex;flex-direction:row;justify-content:space-between;align-items:center}.smk-feature-list-panel .smk-layer .smk-feature span{flex-basis:100%;margin-left:5px;font-size:14px;margin-top:5px;margin-bottom:5px}.smk-feature-list-panel .smk-layer .smk-feature.smk-highlighted{font-weight:700}.smk-feature-list-panel .smk-layer .smk-feature .smk-highlight{opacity:0}.smk-feature-list-panel .smk-layer .smk-feature:hover .smk-highlight{opacity:.3}.smk-feature-list-panel .smk-layer .smk-feature.smk-highlighted .smk-highlight{opacity:1}" }, @@ -75,7 +75,7 @@ if ( skip ) return; ] } ); include.tag( "feature-list-clustering-leaflet", - { loader: "script", url: "smk/viewer-leaflet/feature-list-clustering-leaflet.js", load: function () { console.debug( "[smk/viewer-leaflet/feature-list-clustering-leaflet.js]" ); include.module("feature-list-clustering-leaflet",["leaflet","feature-list-leaflet","turf"],function(e){"use strict";var t=include.option("baseUrl")+"/images/feature-list",i=new L.Icon({iconUrl:t+"/marker-icon-white.png",shadowUrl:t+"/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]});return function(o){var a=this;e["feature-list-leaflet"].call(this,o),this.marker={},this.cluster=L.markerClusterGroup(Object.assign({singleMarkerMode:!0,zoomToBoundsOnClick:!1,spiderfyOnMaxZoom:!1,iconCreateFunction:function(e){var t=e.getChildCount();return new L.DivIcon({html:"
"+(1==t?"":999
",className:"smk-identify-cluster smk-identify-cluster-"+(1==t?"one":"many"),iconSize:null})}},o.viewer.clusterOption)).on({clusterclick:function(e){var t=e.layer.getAllChildMarkers().map(function(e){return e.options.featureId});a.featureSet.pick(t[0],{cluster:!0,position:e.latlng})},click:function(e){a.featureSet.pick(e.layer.options.featureId,{cluster:!0,position:e.latlng})}}),a.changedVisible(function(){a.visible?a.cluster.addTo(o.$viewer.map):a.cluster.remove()}),a.featureSet.addedFeatures(function(e){e.features.forEach(function(e){var t;switch(turf.getType(e)){case"Point":t=L.GeoJSON.coordsToLatLng(e.geometry.coordinates);break;case"MultiPoint":e._identifyPoint&&(t=[e._identifyPoint.latitude,e._identifyPoint.longitude]);break;default:e._identifyPoint&&(t=[e._identifyPoint.latitude,e._identifyPoint.longitude]),a.highlight[e.id]=L.geoJSON(e.geometry,{style:a.styleFeature()})}a.highlight[e.id]||(a.highlight[e.id]=L.marker(t,{title:e.title,icon:i})),t||(t=L.GeoJSON.coordsToLatLng(turf.centerOfMass(e.geometry).geometry.coordinates)),a.marker[e.id]=L.marker(t,{featureId:e.id}),a.cluster.addLayer(a.marker[e.id])})}),a.featureSet.zoomToFeature(function(e){var t;switch(turf.getType(e.feature)){case"Point":var i=L.latLng(e.feature.geometry.coordinates[1],e.feature.geometry.coordinates[0]);t=L.latLngBounds([i,i]);break;default:a.highlight[e.feature.id]&&(t=a.highlight[e.feature.id].getBounds())}if(t){var r=a.featureSet.pick(null),n=o.$viewer.getPanelPadding(!0);o.$viewer.map.once("zoomend moveend",function(){r&&a.featureSet.pick(r)}).fitBounds(t,{paddingTopLeft:n.topLeft,paddingBottomRight:n.bottomRight,maxZoom:15,animate:!0})}}),a.featureSet.clearedFeatures(function(e){a.cluster.clearLayers(),a.marker={}})}});} } + { loader: "script", url: "smk/viewer-leaflet/feature-list-clustering-leaflet.js", load: function () { console.debug( "[smk/viewer-leaflet/feature-list-clustering-leaflet.js]" ); include.module("feature-list-clustering-leaflet",["leaflet","feature-list-leaflet","turf"],function(e){"use strict";var t=include.option("baseUrl")+"images/feature-list",i=new L.Icon({iconUrl:t+"/marker-icon-white.png",shadowUrl:t+"/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]});return function(o){var a=this;e["feature-list-leaflet"].call(this,o),this.marker={},this.cluster=L.markerClusterGroup(Object.assign({singleMarkerMode:!0,zoomToBoundsOnClick:!1,spiderfyOnMaxZoom:!1,iconCreateFunction:function(e){var t=e.getChildCount();return new L.DivIcon({html:"
"+(1==t?"":999
",className:"smk-identify-cluster smk-identify-cluster-"+(1==t?"one":"many"),iconSize:null})}},o.viewer.clusterOption)).on({clusterclick:function(e){var t=e.layer.getAllChildMarkers().map(function(e){return e.options.featureId});a.featureSet.pick(t[0],{cluster:!0,position:e.latlng})},click:function(e){a.featureSet.pick(e.layer.options.featureId,{cluster:!0,position:e.latlng})}}),a.changedVisible(function(){a.visible?a.cluster.addTo(o.$viewer.map):a.cluster.remove()}),a.featureSet.addedFeatures(function(e){e.features.forEach(function(e){var t;switch(turf.getType(e)){case"Point":t=L.GeoJSON.coordsToLatLng(e.geometry.coordinates);break;case"MultiPoint":e._identifyPoint&&(t=[e._identifyPoint.latitude,e._identifyPoint.longitude]);break;default:e._identifyPoint&&(t=[e._identifyPoint.latitude,e._identifyPoint.longitude]),a.highlight[e.id]=L.geoJSON(e.geometry,{style:a.styleFeature()})}a.highlight[e.id]||(a.highlight[e.id]=L.marker(t,{title:e.title,icon:i})),t||(t=L.GeoJSON.coordsToLatLng(turf.centerOfMass(e.geometry).geometry.coordinates)),a.marker[e.id]=L.marker(t,{featureId:e.id}),a.cluster.addLayer(a.marker[e.id])})}),a.featureSet.zoomToFeature(function(e){var t;switch(turf.getType(e.feature)){case"Point":var i=L.latLng(e.feature.geometry.coordinates[1],e.feature.geometry.coordinates[0]);t=L.latLngBounds([i,i]);break;default:a.highlight[e.feature.id]&&(t=a.highlight[e.feature.id].getBounds())}if(t){var r=a.featureSet.pick(null),n=o.$viewer.getPanelPadding(!0);o.$viewer.map.once("zoomend moveend",function(){r&&a.featureSet.pick(r)}).fitBounds(t,{paddingTopLeft:n.topLeft,paddingBottomRight:n.bottomRight,maxZoom:15,animate:!0})}}),a.featureSet.clearedFeatures(function(e){a.cluster.clearLayers(),a.marker={}})}});} } ); include.tag( "feature-list-esri3d", { loader: "script", url: "smk/viewer-esri3d/feature-list-esri3d.js", load: function () { console.debug( "[smk/viewer-esri3d/feature-list-esri3d.js]" ); include.module("feature-list-esri3d",["esri3d","types-esri3d","util-esri3d","feature-list"],function(e){"use strict";var u=SMK.TYPE.Esri3d;return function(t){var r=this;this.featureListLayer=new u.layers.GraphicsLayer({visible:!1,elevationInfo:{mode:"on-the-ground"}}),t.$viewer.map.add(this.featureListLayer),this.highlight={},this.changedActive(function(){r.visible=r.active}),r.changedVisible(function(){r.featureListLayer.visible=r.visible}),this.changedActive(function(){r.active?r.featureListLayer.visible=!0:r.featureListLayer.visible=!1}),r.featureSet.clearedFeatures(function(e){r.featureListLayer.removeAll(),r.highlight={}}),r.featureSet.removedFeatures(function(e){e.features.forEach(function(e){r.featureSet.isPicked(e.id)&&r.featureSet.pick(null),r.featureListLayer.removeMany(r.highlight[e.id]),delete r.highlight[e.id]})});var i=SMK.UTIL.smkStyleToEsriSymbol(r.styleFeature({strokeWidth:4,strokeOpacity:.2,fillOpacity:.3})),a=function(e){return i[e]},s=SMK.UTIL.smkStyleToEsriSymbol(r.styleFeature());r.featureSet.addedFeatures(function(e){e.features.forEach(function(e){r.highlight[e.id]=SMK.UTIL.geoJsonToEsriGeometry(e,a).map(function(e){return new u.Graphic(e)}),r.featureListLayer.addMany(r.highlight[e.id])})}),r.featureSet.pickedFeature(function(e){if(r.picks&&r.featureListLayer.removeMany(r.picks),e.was&&r.featureListLayer.addMany(r.highlight[e.was.id]),e.feature){r.picks=r.highlight[e.feature.id].map(function(e){return e.visible=!1,new u.Graphic({geometry:e.geometry,symbol:(i=e.geometry.type,s[i])});var i}),r.featureListLayer.addMany(r.picks),r.featureListLayer.removeMany(r.highlight[e.feature.id]);var i=r.clickLocation?r.clickLocation.geometry:r.highlight[e.feature.id][0].geometry;t.$viewer.view.goTo(i)}}),r.featureSet.zoomToFeature(function(e){t.$viewer.view.goTo(r.highlight[e.feature.id])})}});} } @@ -116,7 +116,7 @@ if ( skip ) return; { loader: "script", url: "smk/viewer-leaflet/layer/layer-esri-dynamic-leaflet.js", load: function () { console.debug( "[smk/viewer-leaflet/layer/layer-esri-dynamic-leaflet.js]" ); include.module("layer-leaflet.layer-esri-dynamic-leaflet-js",["layer.layer-esri-dynamic-js"],function(){"use strict";function e(){SMK.TYPE.Layer["esri-dynamic"].prototype.constructor.apply(this,arguments)}$.extend(e.prototype,SMK.TYPE.Layer["esri-dynamic"].prototype),SMK.TYPE.Layer["esri-dynamic"].leaflet=e,SMK.TYPE.Layer["esri-dynamic"].leaflet.create=function(a,r){if(1!=a.length)throw new Error("only 1 config allowed");var e,n=a[0].config.serviceUrl;a[0].config.dynamicLayers&&(e=a[0].config.dynamicLayers.map(function(e){return JSON.parse(e)}));var i,o,c,t=a[0].config.opacity;return a[0].config.minScale&&(i=this.getZoomBracketForScale(a[0].config.minScale)[1]),a[0].config.maxScale&&(o=this.getZoomBracketForScale(a[0].config.maxScale)[1]),(c=e?L.esri.dynamicMapLayer({url:n,opacity:t,dynamicLayers:e,maxZoom:o,minZoom:i}):L.esri.featureLayer({url:n,where:a[0].config.where})).on("load",function(e){c._currentImage&&c._currentImage.setZIndex(r),a[0].loading=!1}),c.on("loading",function(e){a[0].loading=!0}),c}});} }, { loader: "script", url: "smk/viewer-leaflet/layer/layer-esri-feature-leaflet.js", load: function () { console.debug( "[smk/viewer-leaflet/layer/layer-esri-feature-leaflet.js]" ); include.module("layer-leaflet.layer-esri-feature-leaflet-js",["layer.layer-esri-feature-js"],function(){"use strict";function e(){SMK.TYPE.Layer["esri-feature"].prototype.constructor.apply(this,arguments)}$.extend(e.prototype,SMK.TYPE.Layer["esri-feature"].prototype),SMK.TYPE.Layer["esri-feature"].leaflet=e,SMK.TYPE.Layer["esri-feature"].leaflet.create=function(n,r){if(1!=n.length)throw new Error("only 1 config allowed");var e={url:n[0].config.serviceUrl};n[0].config.scaleMin&&(e.minZoom=this.getZoomBracketForScale(n[0].config.scaleMin)[1]),n[0].config.scaleMax&&(e.maxZoom=this.getZoomBracketForScale(n[0].config.scaleMax)[1]),n[0].config.where&&(e.where=n[0].config.where),n[0].config.drawingInfo&&(e.drawingInfo=n[0].config.drawingInfo,e.drawingInfo.renderer&&e.drawingInfo.renderer.symbol&&e.drawingInfo.renderer.symbol.url&&(e.drawingInfo.renderer.symbol.url=new URL(e.drawingInfo.renderer.symbol.url,document.location).toString()));var o=L.esri.featureLayer(e);return n[0].legendCacheResolve&&o.legend(function(e,r){n[0].legendCacheResolve(e?null:r.layers[0].legend),n[0].legendCacheResolve=null}),o.on("load",function(e){o._currentImage&&o._currentImage.setZIndex(r),n[0].loading=!1}),o.on("loading",function(e){n[0].loading=!0}),o}});} }, { loader: "script", url: "smk/viewer-leaflet/layer/layer-esri-tiled-leaflet.js", load: function () { console.debug( "[smk/viewer-leaflet/layer/layer-esri-tiled-leaflet.js]" ); include.module("layer-leaflet.layer-esri-tiled-leaflet-js",["layer.layer-esri-tiled-js"],function(){"use strict";function e(){SMK.TYPE.Layer["esri-tiled"].prototype.constructor.apply(this,arguments)}$.extend(e.prototype,SMK.TYPE.Layer["esri-tiled"].prototype),SMK.TYPE.Layer["esri-tiled"].leaflet=e,SMK.TYPE.Layer["esri-tiled"].leaflet.create=function(r,t){if(1!=r.length)throw new Error("only 1 config allowed");var e=r[0].config.serviceUrl;r[0].config.opacity;r[0].config.minScale&&this.getZoomBracketForScale(r[0].config.minScale)[1],r[0].config.maxScale&&this.getZoomBracketForScale(r[0].config.maxScale)[1];var i=L.esri.tiledMapLayer({url:e});return i.on("load",function(e){i._currentImage&&i._currentImage.setZIndex(t),r[0].loading=!1}),i.on("loading",function(e){r[0].loading=!0}),i}});} }, - { loader: "script", url: "smk/viewer-leaflet/layer/layer-vector-leaflet.js", load: function () { console.debug( "[smk/viewer-leaflet/layer/layer-vector-leaflet.js]" ); include.module("layer-leaflet.layer-vector-leaflet-js",["layer.layer-vector-js","turf"],function(){"use strict";function e(){SMK.TYPE.Layer.vector.prototype.constructor.apply(this,arguments)}$.extend(e.prototype,SMK.TYPE.Layer.vector.prototype),(SMK.TYPE.Layer.vector.leaflet=e).prototype.getFeaturesInArea=function(r,e,t){if(t.layer){var o=[];return t.layer.eachLayer(function(e){var t=e.toGeoJSON();switch(t.geometry.type){case"Polygon":turf.intersect(t,r)&&o.push(t);break;case"MultiPolygon":t.geometry.coordinates.reduce(function(e,t){return e||!!turf.intersect(turf.polygon(t),r)},!1)&&o.push(t);break;case"LineString":turf.booleanCrosses(r,t)&&o.push(t);break;case"MultiLineString":turf.segmentReduce(t,function(e,t){return e||turf.booleanCrosses(r,t)},!1)&&o.push(t);break;case"Point":case"MultiPoint":turf.coordReduce(t,function(e,t){return e||turf.booleanPointInPolygon(t,r)},!1)&&o.push(t);break;default:console.warn("skip",t.geometry.type)}}),o}},e.prototype.getFeaturesAtPoint=function(e,t,r){if(r.layer){var o=[],n=[e.map.longitude,e.map.latitude],a=r.tolerance*t.metersPerPixel/1e3;return r.layer.eachLayer(function(e){var t=e.toGeoJSON();switch(t.geometry.type){case"Polygon":case"MultiPolygon":turf.booleanPointInPolygon(n,t)&&o.push(t);break;case"LineString":case"MultiLineString":turf.segmentReduce(t,function(e,t){return e||turf.pointToLineDistance(n,t)=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(r,s){if(!L.Util.isArray(r))return this.addLayer(r);var o,a=this._featureGroup,h=this._nonPointGroup,l=this.options.chunkedLoading,_=this.options.chunkInterval,u=this.options.chunkProgress,d=r.length,c=0,p=!0;if(this._map){var f=(new Date).getTime(),m=L.bind(function(){for(var e=(new Date).getTime();c"+t+"",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var e=this._map,t=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(t||n)&&this.on("clusterclick",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){for(var t=e.layer,i=t;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(),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),2h._zoom;n--)_=new this._markerCluster(this,n,_),r[n].addObject(_,this._map.project(a.getLatLng(),n));return h._addChild(_),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;ee?(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 t!==g&&(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,n=e.getLayers(),r=0;for(t=t||[];ri)&&(i=(o=d).lat),(!1===n||d.latr)&&(r=(h=d).lng),(!1===s||d.lng=this._circleSpiralSwitchover?e=this._generatePointsSpiral(t.length,i):(i.y+=10,e=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,n,r=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+e)/this._2PI,s=this._2PI/e,o=[];for(i=(o.length=e)-1;0<=i;i--)n=this._circleStartAngle+i*s,o[i]=new L.Point(t.x+r*Math.cos(n),t.y+r*Math.sin(n))._round();return o},_generatePointsSpiral:function(e,t){var i,n=this._group.options.spiderfyDistanceMultiplier,r=n*this._spiralLengthStart,s=n*this._spiralFootSeparation,o=n*this._spiralLengthFactor*this._2PI,a=0,h=[];for(i=(h.length=e)-1;0<=i;i--)a+=s/r+5e-4*i,h[i]=new L.Point(t.x+r*Math.cos(a),t.y+r*Math.sin(a))._round(),r+=o/a;return h},_noanimationUnspiderfy:function(){var e,t,i=this._group,n=i._map,r=i._featureGroup,s=this.getAllChildMarkers();for(i._ignoreMove=!0,this.setOpacity(1),t=s.length-1;0<=t;t--)e=s[t],r.removeLayer(e),e._preSpiderfyLatlng&&(e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng),e.setZIndexOffset&&e.setZIndexOffset(0),e._spiderLeg&&(n.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,n,r,s,o=this._group,a=o._map,h=o._featureGroup,l=this._group.options.spiderLegPolylineOptions;for(o._ignoreMove=!0,i=0;i').attr("src",include.option("baseUrl")+"/images/spinner.gif").appendTo(this.$container),i=$('
').appendTo(this.$container);return SMK.UTIL.promiseFinally(SMK.UTIL.resolved().then(function(){return SMK.UTIL.waitAll(s.$option.config.map(function(i){if(!i.url)return SMK.UTIL.resolved(i);var e=i.url.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^[-]|[-]$/g,""),n="config-"+e;try{include.tag(n,{loader:"template",url:i.url})}catch(e){console.warn(e)}return include(n).then(function(e){var t=JSON.parse(e[n]);return t.$sources=i.$sources,t}).catch(function(e){throw console.warn(i.$sources[0]),e.parseSource=i.$sources[0],e})}))}).then(function(e){var t=Object.assign({},SMK.CONFIG);t.$sources=[],console.log("base",JSON.parse(JSON.stringify(t)));for(;0SMK initialization failed


"+e+(e.parseSource?",
while parsing "+e.parseSource:"")),t.remove(),Promise.reject()}),function(){console.groupEnd()})},e.prototype.destroy=function(){this.$viewer&&this.$viewer.destroy()},e.prototype.addToContainer=function(e,t,i){return $(e)[i?"prependTo":"appendTo"](this.$container).attr(t||{}).get(0)},e.prototype.addToOverlay=function(e){return this.$overlay||(this.$overlay=this.addToContainer('
')),$(e).appendTo(this.$overlay).get(0)},e.prototype.addToStatus=function(e){return this.$status||(this.$status=this.addToOverlay('
')),$(e).appendTo(this.$status).get(0)},e.prototype.getSidepanel=function(){var e=this;return this.$sidepanel||(this.$sidepanel=new SMK.TYPE.Sidepanel(this),this.$sidepanel.changedVisible(function(){$(e.$container).toggleClass("smk-sidepanel-active",e.$sidepanel.isPanelVisible())}),this.$sidepanel.changedSize(function(){})),this.$sidepanel},e.prototype.getSidepanelPosition=function(){if(!this.$sidepanel||!this.$sidepanel.isPanelVisible())return{left:0,width:0,top:0,height:0};var e=this.$overlay,t=this.$sidepanel.vm.$el;return{left:e.offsetLeft+t.offsetLeft,top:e.offsetTop+t.offsetTop,width:t.clientWidth,height:t.clientHeight}},e.prototype.setEditFocus=function(e){$(this.$container).toggleClass("smk-edit-focus",e)},e.prototype.debugMessage=function(t){this.debugVm||(this.debugVm=new Vue({el:this.addToOverlay('
{{ k }} : {{ status[ k ] }}
'),data:{status:{}},computed:{keys:{get:function(){return Object.keys(this.status)}}}})),t.ts=(new Date).toLocaleTimeString();var i=this.debugVm.$data;Object.keys(t||{}).forEach(function(e){Vue.set(i.status,e,t[e])})},e.prototype.getVar=function(e){return $(this.$container).css("--"+e)},e.prototype.setVar=function(e,t){return $(this.$container).css("--"+e,t)},e.prototype.emit=function(e,t,i,n){return this.$dispatcher.$emit(e+"."+t,i,n),this},e.prototype.on=function(t,i){var n=this;return Object.keys(i).forEach(function(e){n.$dispatcher.$on(t+"."+e,i[e])}),this},e.prototype.withTool=function(e,t){if(this.$tool[e])return t.call(this.$tool[e])},e.prototype.detectDevice=function(){var e=this.viewer.device;"auto"==e&&(e=$(window).width()>=this.viewer.deviceAutoBreakpoint?"desktop":"mobile");if(e!=this.$device)return this.$device&&$(this.$container).removeClass("smk-device-"+this.$device),this.$device=e,$(this.$container).addClass("smk-device-"+this.$device),this.$device},e.prototype.showFeature=function(e,t,i){this.$viewer.temporaryFeature&&this.$viewer.temporaryFeature(e,t,i)},e.prototype.getToolGroup=function(e){return this.$group[e]},e.prototype.setToolGroup=function(e,t){this.$group[e]=t},e.prototype.getToolRootIds=function(){return Object.keys(this.$group)},e.prototype.getConfig=function(){var i=this,e=["name","viewer","tools"].reduce(function(e,t){return e[t]=JSON.parse(JSON.stringify(i[t])),e},{});return e.layers=this.$viewer.getLayerConfig(),e.viewer.location=SMK.UTIL.projection("center","zoom","extent")(this.$viewer.getView()),e.viewer.location.center=[e.viewer.location.center.longitude,e.viewer.location.center.latitude],e.viewer.displayContext=this.$viewer.getDisplayContextConfig(),e.layers.forEach(function(e){var t=i.$viewer.getDisplayContextItem(e.id);t?(e.isVisible=i.$viewer.isDisplayContextItemVisible(e.id),e.class=t.class):e.isVisible=!1}),e}});} } + { loader: "script", url: "smk/smk-map.js", load: function () { console.debug( "[smk/smk-map.js]" ); include.module("smk-map",["jquery","util","theme-base","sidepanel"],function(){"use strict";function e(e){this.$option=e,this.$dispatcher=new Vue,this.$group={}}function n(e,t,i,n){if(!(t in e))throw new Error(t+" is not in obj");if(!Array.isArray(e[t]))throw new Error(t+" is not an array");e[t].forEach(function(e){if(i in e){var t=n(e[i]);void 0!==t&&(e[i]=t)}})}(SMK.TYPE.SmkMap=e).prototype.initialize=function(){var s=this;console.groupCollapsed("SMK initialize "+this.$option.id),console.log("options:",JSON.parse(JSON.stringify(this.$option)));var e=$(this.$option["container-sel"]);if(1!=e.length)throw new Error('smk-container-sel "'+this.$option["container-sel"]+"\" doesn't match a unique element");this.$container=e.get(0),$(this.$container).addClass("smk-map-frame smk-hidden");var t=$('').attr("src",include.option("baseUrl")+"images/spinner.gif").appendTo(this.$container),i=$('
').appendTo(this.$container);return SMK.UTIL.promiseFinally(SMK.UTIL.resolved().then(function(){return SMK.UTIL.waitAll(s.$option.config.map(function(i){if(!i.url)return SMK.UTIL.resolved(i);var e=i.url.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^[-]|[-]$/g,""),n="config-"+e;try{include.tag(n,{loader:"template",url:i.url})}catch(e){console.warn(e)}return include(n).then(function(e){var t=JSON.parse(e[n]);return t.$sources=i.$sources,t}).catch(function(e){throw console.warn(i.$sources[0]),e.parseSource=i.$sources[0],e})}))}).then(function(e){var t=Object.assign({},SMK.CONFIG);t.$sources=[],console.log("base",JSON.parse(JSON.stringify(t)));for(;0SMK initialization failed
"+e+(e.parseSource?",
while parsing "+e.parseSource:"")),t.remove(),Promise.reject()}),function(){console.groupEnd()})},e.prototype.destroy=function(){this.$viewer&&this.$viewer.destroy()},e.prototype.addToContainer=function(e,t,i){return $(e)[i?"prependTo":"appendTo"](this.$container).attr(t||{}).get(0)},e.prototype.addToOverlay=function(e){return this.$overlay||(this.$overlay=this.addToContainer('
')),$(e).appendTo(this.$overlay).get(0)},e.prototype.addToStatus=function(e){return this.$status||(this.$status=this.addToOverlay('
')),$(e).appendTo(this.$status).get(0)},e.prototype.getSidepanel=function(){var e=this;return this.$sidepanel||(this.$sidepanel=new SMK.TYPE.Sidepanel(this),this.$sidepanel.changedVisible(function(){$(e.$container).toggleClass("smk-sidepanel-active",e.$sidepanel.isPanelVisible())}),this.$sidepanel.changedSize(function(){})),this.$sidepanel},e.prototype.getSidepanelPosition=function(){if(!this.$sidepanel||!this.$sidepanel.isPanelVisible())return{left:0,width:0,top:0,height:0};var e=this.$overlay,t=this.$sidepanel.vm.$el;return{left:e.offsetLeft+t.offsetLeft,top:e.offsetTop+t.offsetTop,width:t.clientWidth,height:t.clientHeight}},e.prototype.setEditFocus=function(e){$(this.$container).toggleClass("smk-edit-focus",e)},e.prototype.debugMessage=function(t){this.debugVm||(this.debugVm=new Vue({el:this.addToOverlay('
{{ k }} : {{ status[ k ] }}
'),data:{status:{}},computed:{keys:{get:function(){return Object.keys(this.status)}}}})),t.ts=(new Date).toLocaleTimeString();var i=this.debugVm.$data;Object.keys(t||{}).forEach(function(e){Vue.set(i.status,e,t[e])})},e.prototype.getVar=function(e){return $(this.$container).css("--"+e)},e.prototype.setVar=function(e,t){return $(this.$container).css("--"+e,t)},e.prototype.emit=function(e,t,i,n){return this.$dispatcher.$emit(e+"."+t,i,n),this},e.prototype.on=function(t,i){var n=this;return Object.keys(i).forEach(function(e){n.$dispatcher.$on(t+"."+e,i[e])}),this},e.prototype.withTool=function(e,t){if(this.$tool[e])return t.call(this.$tool[e])},e.prototype.detectDevice=function(){var e=this.viewer.device;"auto"==e&&(e=$(window).width()>=this.viewer.deviceAutoBreakpoint?"desktop":"mobile");if(e!=this.$device)return this.$device&&$(this.$container).removeClass("smk-device-"+this.$device),this.$device=e,$(this.$container).addClass("smk-device-"+this.$device),this.$device},e.prototype.showFeature=function(e,t,i){this.$viewer.temporaryFeature&&this.$viewer.temporaryFeature(e,t,i)},e.prototype.getToolGroup=function(e){return this.$group[e]},e.prototype.setToolGroup=function(e,t){this.$group[e]=t},e.prototype.getToolRootIds=function(){return Object.keys(this.$group)},e.prototype.getConfig=function(){var i=this,e=["name","viewer","tools"].reduce(function(e,t){return e[t]=JSON.parse(JSON.stringify(i[t])),e},{});return e.layers=this.$viewer.getLayerConfig(),e.viewer.location=SMK.UTIL.projection("center","zoom","extent")(this.$viewer.getView()),e.viewer.location.center=[e.viewer.location.center.longitude,e.viewer.location.center.latitude],e.viewer.displayContext=this.$viewer.getDisplayContextConfig(),e.layers.forEach(function(e){var t=i.$viewer.getDisplayContextItem(e.id);t?(e.isVisible=i.$viewer.isDisplayContextItemVisible(e.id),e.class=t.class):e.isVisible=!1}),e}});} } ); include.tag( "terraformer", { loader: "sequence", tags: [ @@ -256,12 +256,12 @@ this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin { loader: "group", tags: [ { loader: "template", url: "smk/tool/directions/panel-directions.html", load:"\n \n\n \n\n \n
\n \n\n
\n
\n
\n {{ site.civicNumber }}{{ site.civicNumberSuffix || '' }}\n {{ site.streetName }}\n {{ site.streetType }}\n
\n
\n {{ site.localityName || ' ' }}\n \n
\n
\n\n
\n \n \n \n \n \n \n
\n
\n\n \n\n 0 && $$emit( 'remove-waypoint', { index: i } )\"\n icon=\"delete\"\n title=\"Remove this waypoint\"\n >\n
\n
\n\n
" }, { loader: "style", url: "smk/tool/directions/tool-directions.css", load: "/* [smk/tool/directions/tool-directions.css] */\n.smk-directions-panel .smk-commands .smk-route .smk-command{font-size:14px;font-weight:700}.smk-directions-panel .smk-commands .smk-options{flex-grow:1;justify-content:flex-end}.smk-directions-panel .smk-waypoint{display:flex;align-items:center;border-radius:0;border-top:1px solid #999}.smk-directions-panel .smk-description{align-self:center;flex-basis:100%;margin:2px 0;background-color:transparent;margin-right:5px;font-size:11px}.smk-directions-panel .smk-waypoint .smk-zoomto.smk-first .smk-command{color:green}.smk-directions-panel .smk-waypoint .smk-zoomto.smk-middle .smk-command{color:#00f}.smk-directions-panel .smk-waypoint .smk-zoomto.smk-last .smk-command{color:red}.smk-directions-panel .smk-options{width:40px}.smk-directions-panel .smk-address-search{margin:4px;width:calc(100% - 46px)}" }, - { loader: "script", url: "smk/tool/directions/tool-directions.js", load: function () { console.debug( "[smk/tool/directions/tool-directions.js]" ); include.module("tool-directions",["tool","widgets","sidepanel","tool-directions.panel-directions-html","tool-directions-route","tool-directions-options","widget-address-search","api"],function(t){"use strict";var e=include.option("baseUrl")+"/images/tool/directions";function i(t){this.makePropWidget("icon",null),this.makePropPanel("waypoints",[]),this.makePropPanel("hasRoute",!1),this.makePropPanel("optimal",!1),this.makePropPanel("geocoderService",{}),SMK.TYPE.PanelTool.prototype.constructor.call(this,$.extend({widgetComponent:"directions-widget",panelComponent:"directions-panel",segmentLayers:[{id:"@segments",title:"Segments",style:{strokeColor:"blue",strokeWidth:8,strokeOpacity:.8},legend:{line:!0}}],waypointLayers:[{id:"@waypoint-start",title:"Starting Route Location",style:{markerUrl:e+"/marker-icon-green.png",markerSize:[25,41],markerOffset:[12,41],shadowUrl:e+"/marker-shadow.png",shadowSize:[41,41],popupOffset:[1,-34]},legend:{title:"Starting Route Location",point:!0},isDraggable:!0,isQueryable:!1},{id:"@waypoint-end",title:"Ending Route Location",style:{markerUrl:e+"/marker-icon-red.png",markerSize:[25,41],markerOffset:[12,41],shadowUrl:e+"/marker-shadow.png",shadowSize:[41,41],popupOffset:[1,-34]},legend:{title:"Ending Route Location",point:!0},isDraggable:!0,isQueryable:!1},{id:"@waypoint-middle",title:"Waypoint on Route",style:{markerUrl:e+"/marker-icon-blue.png",markerSize:[25,41],markerOffset:[12,41],shadowUrl:e+"/marker-shadow.png",shadowSize:[41,41],popupOffset:[1,-34]},legend:{title:"Waypoint on Route",point:!0},isDraggable:!0,isQueryable:!1}],routePlannerService:{}},t)),this.activating=SMK.UTIL.resolved(),this.directions=[]}return Vue.component("directions-widget",{extends:t.widgets.toolButton}),Vue.component("directions-panel",{extends:t.widgets.toolPanel,template:t["tool-directions.panel-directions-html"],props:["waypoints","hasRoute","optimal","geocoderService"]}),SMK.TYPE.DirectionsTool=i,$.extend(i.prototype,SMK.TYPE.PanelTool.prototype),(i.prototype.afterInitialize=[]).push(function(i){var o=this;this.routePanel=i.$tool["directions-route"],this.routeOptions=i.$tool["directions-options"],this.routePlanner=new SMK.TYPE.RoutePlanner(this.routePlannerService),this.geocoder=new SMK.TYPE.Geocoder(this.geocoderService),this.changedActive(function(){o.active&&(o.optimal=o.routeOptions.optimal)}),this.getCurrentLocation=function(){return o.setMessage("Finding current location...","progress",null),o.busy=!0,SMK.UTIL.promiseFinally(i.$viewer.getCurrentLocation(),function(){o.busy=!1,o.setMessage()})},i.$viewer.handlePick(2,function(t){if(o.active)return o.geocoder.fetchNearestSite(t.map).then(function(t){return o.active=!0,o.activating.then(function(){return o.addWaypoint(t)})}).catch(function(t){console.debug(t)}).then(function(){return!0})}),i.on(this.id,{activate:function(){o.enabled&&(o.active=!o.active)},"current-location":function(t){o.addCurrentLocation().then(function(){o.findRoute()})},reverse:function(t){o.waypoints.reverse(),o.findRoute()},clear:function(t){o.resetWaypoints()},"hover-direction":function(t){o.directionHighlight=t.highlight},"pick-direction":function(t){o.directionPick=t.pick},"changed-waypoints":function(t){o.findRoute()},"remove-waypoint":function(t){o.waypoints.splice(t.index,1),o.hasRoute=1";var n="function"==typeof e&&null!=e.cid?e.options:e._isVue?e.$options||e.constructor.options:e||{},r=n.name||n._componentTag,i=n.__file;if(!r&&i){var o=i.match(/([^/\\]+)\.vue$/);r=o&&o[1]}return(r?"<"+r.replace(pe,function(e){return e.toUpperCase()}).replace(/[-_]/g,"")+">":"")+(i&&!1!==t?" at "+i:"")};ue=function(e){if(e._isVue&&e.$parent){for(var t=[],n=0;e;){if(0>=1;return n}(" ",5+2*t))+(Array.isArray(e)?fe(e[0])+"... ("+e[1]+" recursive calls)":fe(e))}).join("\n")}return"\n\n(found in "+fe(e)+")"};var ve=0,he=function(){this.id=ve++,this.subs=[]};he.prototype.addSub=function(e){this.subs.push(e)},he.prototype.removeSub=function(e){d(this.subs,e)},he.prototype.depend=function(){he.target&&he.target.addDep(this)},he.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;tzt)){ce("You may have an infinite update loop "+(e.user?'in watcher with expression "'+e.expression+'"':"in a component render function."),e.vm);break}var n=Jt.slice(),r=qt.slice();Zt=qt.length=Jt.length=0,Kt={},Yt=Gt=!(Wt={}),function(e){for(var t=0;te.id;)n--;qt.splice(n+1,0,e)}else qt.push(e);Yt||(Yt=!0,ft(Xt))}}(this)},en.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||D(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Ze(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},en.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},en.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},en.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||d(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var tn={enumerable:!0,configurable:!0,get:C,set:C};function nn(e,t,n){tn.get=function(){return this[t][n]},tn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,tn)}function rn(e){e._watchers=[];var t=e.$options;t.props&&function(r,i){var o=r.$options.propsData||{},a=r._props={},s=r.$options._propKeys=[],e=!r.$parent;Ae.shouldConvert=e;var t=function(e){s.push(e);var t=Je(e,i,o,r),n=_(e);(c(n)||H.isReservedAttr(n))&&ce('"'+n+'" is a reserved attribute and cannot be used as component prop.',r),Ee(a,e,t,function(){r.$parent&&!Ut&&ce("Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: \""+e+'"',r)}),e in r||nn(r,"_props",e)};for(var n in i)t(n);Ae.shouldConvert=!0}(e,t.props),t.methods&&function(e,t){var n=e.$options.props;for(var r in t)null==t[r]&&ce('Method "'+r+'" has an undefined value in the component definition. Did you reference the function correctly?',e),n&&g(n,r)&&ce('Method "'+r+'" has already been defined as a prop.',e),r in e&&E(r)&&ce('Method "'+r+'" conflicts with an existing Vue instance method. Avoid defining component methods that start with _ or $.'),e[r]=null==t[r]?C:m(t[r],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;l(t=e._data="function"==typeof t?function(e,t){try{return e.call(t,t)}catch(e){return Ze(e,t,"data()"),{}}}(t,e):t||{})||(t={},ce("data functions should return an object:\nhttps://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function",e));var n=Object.keys(t),r=e.$options.props,i=e.$options.methods,o=n.length;for(;o--;){var a=n[o];i&&g(i,a)&&ce('Method "'+a+'" has already been defined as a data property.',e),r&&g(r,a)?ce('The data property "'+a+'" is already declared as a prop. Use prop default value instead.',e):E(a)||nn(e,"_data",a)}je(t,!0)}(e):je(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=re();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;null==a&&ce('Getter is missing for computed property "'+i+'".',e),r||(n[i]=new en(e,a||C,C,on)),i in e?i in e.$data?ce('The computed property "'+i+'" is already defined in data.',e):e.$options.props&&i in e.$options.props&&ce('The computed property "'+i+'" is already defined as a prop.',e):an(e,i,o)}}(e,t.computed),t.watch&&t.watch!==ee&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;iparseInt(this.max)&&qn(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};Jn=Un,Wn={get:function(){return H},set:function(){ce("Do not replace the Vue.config object, set individual fields instead.")}},Object.defineProperty(Jn,"config",Wn),Jn.util={warn:ce,extend:$,mergeOptions:ze,defineReactive:Ee},Jn.set=Ie,Jn.delete=Me,Jn.nextTick=ft,Jn.options=Object.create(null),T.forEach(function(e){Jn.options[e+"s"]=Object.create(null)}),$((Jn.options._base=Jn).options.components,Gn),Jn.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(-1=a&&l()};setTimeout(function(){c explicit "+t+" duration is not a valid number - got "+JSON.stringify(e)+".",n.context):isNaN(e)&&ce(" explicit "+t+" duration is NaN - the duration expression might be incorrect.",n.context)}function Yi(e){return"number"==typeof e&&!isNaN(e)}function Gi(e){if(L(e))return!1;var t=e.fns;return P(t)?Gi(Array.isArray(t)?t[0]:t):1<(e._length||e.length)}function Zi(e,t){!0!==t.data.show&&Ji(t)}var Xi=function(e){var r,t,g={},n=e.modules,b=e.nodeOps;for(r=0;r<$r.length;++r)for(g[$r[r]]=[],t=0;t - did you register the component correctly? For recursive components, make sure to provide the "name" option.',e.context),e.elm=e.ns?b.createElementNS(e.ns,s):b.createElement(s,e),u(e),w(e,a,t),P(o)&&x(e,t),l(n,e.elm,r),o&&o.pre&&c--):(N(e.isComment)?e.elm=b.createComment(e.text):e.elm=b.createTextNode(e.text),l(n,e.elm,r))}}function y(e,t){P(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,$(e)?(x(e,t),u(e)):(_r(e),t.push(e))}function l(e,t,n){P(e)&&(P(n)?n.parentNode===e&&b.insertBefore(e,t,n):b.appendChild(e,t))}function w(e,t,n){if(Array.isArray(t)){O(t);for(var r=0;r, or missing . Bailing hydration and performing full client-side render.")}a=e,e=new ye(b.tagName(a).toLowerCase(),{},[],void 0,a)}var u=e.elm,f=b.parentNode(u);if(_(t,c,u._leaveCb?null:f,b.nextSibling(u)),P(t.parent))for(var d=t.parent,p=$(t);d;){for(var v=0;v expects an Array value for its binding, but got '+Object.prototype.toString.call(r).slice(8,-1),n)}function no(t,e){return e.every(function(e){return!A(e,t)})}function ro(e){return"_value"in e?e._value:e.value}function io(e){e.target.composing=!0}function oo(e){e.target.composing&&(e.target.composing=!1,ao(e.target,"input"))}function ao(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function so(e){return!e.componentInstance||e.data&&e.data.transition?e:so(e.componentInstance._vnode)}var co={model:Qi,show:{bind:function(e,t,n){var r=t.value,i=(n=so(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,Ji(n,function(){e.style.display=o})):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;r!==t.oldValue&&((n=so(n)).data&&n.data.transition?(n.data.show=!0,r?Ji(n,function(){e.style.display=e.__vOriginalDisplay}):Ki(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},lo={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function uo(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?uo(It(t.children)):e}function fo(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[b(o)]=i[o];return t}function po(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var vo={name:"transition",props:lo,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(function(e){return e.tag||Et(e)})).length){1 can only be used on a single element. Use for lists.",this.$parent);var r=this.mode;r&&"in-out"!==r&&"out-in"!==r&&ce("invalid mode: "+r,this.$parent);var i=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return i;var o=uo(i);if(!o)return i;if(this._leaving)return po(e,i);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:h(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var s,c,l=(o.data||(o.data={})).transition=fo(this),u=this._vnode,f=uo(u);if(o.data.directives&&o.data.directives.some(function(e){return"show"===e.name})&&(o.data.show=!0),f&&f.data&&(s=o,(c=f).key!==s.key||c.tag!==s.tag)&&!Et(f)&&(!f.componentInstance||!f.componentInstance._vnode.isComment)){var d=f.data.transition=$({},l);if("out-in"===r)return this._leaving=!0,At(d,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),po(e,i);if("in-out"===r){if(Et(o))return u;var p,v=function(){p()};At(l,"afterEnter",v),At(l,"enterCancelled",v),At(d,"delayLeave",function(e){p=e})}}return i}}},ho=$({tag:String,moveClass:String},lo);function mo(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function yo(e){e.data.newPos=e.elm.getBoundingClientRect()}function go(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete ho.mode;var bo={Transition:vo,TransitionGroup:{props:ho,render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=fo(this),s=0;s children must be keyed: <"+u+">")}}if(r){for(var f=[],d=[],p=0;p, use
.'),r&&(e.staticClass=JSON.stringify(r));var i=Zr(e,"class",!1);i&&(e.classBinding=i)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var ko,Ao={staticKeys:["staticStyle"],transformNode:function(e,t){var n=t.warn||Jr,r=Xr(e,"style");r&&(xo(r,t.delimiters)&&n('style="'+r+'": Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of
, use
.'),e.staticStyle=JSON.stringify(hi(r)));var i=Zr(e,"style",!1);i&&(e.styleBinding=i)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},Oo=function(e){return(ko=ko||document.createElement("div")).innerHTML=e,ko.textContent},So=s("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),To=s("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),jo=s("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Eo=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Io="[a-zA-Z_][\\w\\-\\.]*",Mo="((?:"+Io+"\\:)?"+Io+")",No=new RegExp("^<"+Mo),Lo=/^\s*(\/?)>/,Po=new RegExp("^<\\/"+Mo+"[^>]*>"),Do=/^]+>/i,Fo=/^/g,"$1").replace(//g,"$1")),Ko(o,t)&&(t=t.slice(1)),p.chars&&p.chars(t),""});a+=i.length-n.length,i=n,A(o,a-r,a)}else{var s=i.indexOf("<");if(0===s){if(Fo.test(i)){var c=i.indexOf("--\x3e");if(0<=c){p.shouldKeepComment&&p.comment(i.substring(4,c)),x(c+3);continue}}if(Ro.test(i)){var l=i.indexOf("]>");if(0<=l){x(l+2);continue}}var u=i.match(Do);if(u){x(u[0].length);continue}var f=i.match(Po);if(f){var d=a;x(f[0].length),A(f[1],d,a);continue}var b=C();if(b){k(b),Ko(v,i)&&x(1);continue}}var _=void 0,w=void 0,$=void 0;if(0<=s){for(w=i.slice(s);!(Po.test(w)||No.test(w)||Fo.test(w)||Ro.test(w)||($=w.indexOf("<",1))<0);)s+=$,w=i.slice(s);_=i.substring(0,s),x(s)}s<0&&(_=i,i=""),p.chars&&_&&p.chars(_)}if(i===e){p.chars&&p.chars(i),!h.length&&p.warn&&p.warn('Mal-formatted tag at end of template: "'+i+'"');break}}function x(e){a+=e,i=i.substring(e)}function C(){var e=i.match(No);if(e){var t,n,r={tagName:e[1],attrs:[],start:a};for(x(e[0].length);!(t=i.match(Lo))&&(n=i.match(Eo));)x(n[0].length),r.attrs.push(n);if(t)return r.unarySlash=t[1],x(t[0].length),r.end=a,r}}function k(e){var t=e.tagName,n=e.unarySlash;m&&("p"===v&&jo(t)&&A(v),g(t)&&v===t&&A(t));for(var r,i,o,a=y(t)||!!n,s=e.attrs.length,c=new Array(s),l=0;l has no matching end tag."),p.end&&p.end(h[o].tag,t,n);h.length=r,v=r&&h[r-1].tag}else"br"===i?p.start&&p.start(e,[],!0,t,n):"p"===i&&(p.start&&p.start(e,[],!1,t,n),p.end&&p.end(e,t,n))}A()}(i,{warn:Wo,expectHTML:v.expectHTML,isUnaryTag:v.isUnaryTag,canBeLeftOpenTag:v.canBeLeftOpenTag,shouldDecodeNewlines:v.shouldDecodeNewlines,shouldDecodeNewlinesForHref:v.shouldDecodeNewlinesForHref,shouldKeepComment:v.comments,start:function(e,t,n){var r=m&&m.ns||ta(e);W&&"svg"===r&&(t=function(e){for(var t=[],n=0;n, as they will not be parsed."));for(var u=0;u as component root element because it may contain multiple nodes."),e.attrsMap.hasOwnProperty("v-for")&&_("Cannot use v-for on stateful component root element because it renders multiple elements.")}if(g||(null!=Xr(o=l,"v-pre")&&(o.pre=!0),l.pre&&(g=!0)),Qo(l.tag)&&(b=!0),g?function(e){var t=e.attrsList.length;if(t)for(var n=e.attrs=new Array(t),r=0;r without corresponding v-if.");else if(l.slotScope){m.plain=!1;var d=l.slotTarget||'"default"';(m.scopedSlots||(m.scopedSlots={}))[d]=l}else m.children.push(l),l.parent=m;n?w(l):(m=l,y.push(l));for(var p=0;p cannot be keyed. Place the key on real elements instead."),n.key=r),e.plain=!e.key&&!e.attrsList.length,(o=Zr(i=e,"ref"))&&(i.ref=o,i.refInFor=function(e){for(var t=e;t;){if(void 0!==t.for)return!0;t=t.parent}return!1}(i)),function(e){if("slot"===e.tag)e.slotName=Zr(e,"name"),e.key&&Wo("`key` does not work on because slots are abstract outlets and can possibly expand into multiple elements. Use the key on a wrapping element instead.");else{var t;"template"===e.tag?((t=Xr(e,"scope"))&&Wo('the "scope" attribute for scoped slots have been deprecated and replaced by "slot-scope" since 2.5. The new "slot-scope" attribute can also be used on plain elements in addition to