'+a.length+"";return new L.DivIcon({className:"leaflet-marker-photo",html:h,iconSize:[60,60],iconAnchor:[30,30]})}}function o(a,b){var c=KR.Util.hexToRgba(b,.4);return new L.DivIcon({className:"leaflet-marker-circle",html:'
"),e.append(g),e}).value();c.html(o),c.scrollTop(0)}var l=KR.Util.getDatasetTemplate("popup"),m=new a;return c=$(c),b=$(b),d=$(d),{showFeature:j,showFeatures:k,setMap:function(a){m.setMap(a)}}}}(),function(){"use strict";L.Knreise=L.Knreise||{},L.Knreise.Control=L.Knreise.Control||{};var a=function(a,b){function c(c){var d=document.createElement("i");return d.className="layericon fa",a.visible?d.className+=" fa-check-square-o":d.className+=" fa-square-o",c&&(d.className+=" "+c),b.isLoading&&(d.className="layericon fa fa-spinner fa-pulse"),b.enabled?d.style.color=KR.Style.colorForDataset(a,!0,!0):d.style.color="#ddd",d}function d(){var a=c();j.replaceChild(a,k),k=a}function e(){a.visible=!a.visible,d(),a.visible?b.fire("show"):b.fire("hide")}function f(a){m?m.setAttribute("title",m.getAttribute("title")+", "+KR.parseError(a)):(m=L.DomUtil.create("i","error-icon fa fa-exclamation-triangle"),m.setAttribute("title",KR.parseError(a)),j.insertBefore(m,j.childNodes[0]))}function g(){j=document.createElement("label"),_.isUndefined(a.visible)&&(a.visible=!0);var d=document.createElement("span");d.innerHTML=" "+a.name,k=c(),j.appendChild(k),j.appendChild(d),b.error&&f(b.error),b.enabled||(j.className="disabled"),L.DomEvent.on(j,"click",function(){var a=b.enabled&&!b.isLoading;a&&e()})}function h(){b.enabled!==l&&(l=b.enabled,d(),l?j.className=j.className.replace("disabled",""):j.className+="disabled")}function i(){return j}var j,k,l=b.enabled,m=null;return g(),b.on("changeEnabled",h),b.on("dataloadstart",function(){m&&(j.removeChild(m),m=null),d()}),b.on("dataloadend",d),b.on("error",f),{getLabel:i,hasError:function(){return!!b.error}}};L.Control.Datasets=L.Control.extend({initialize:function(a,b){L.setOptions(this,b),this._labels=[],this._handlingClick=!1,this.expanded=!1,this.numLoading=0;var c;for(c in a)a.hasOwnProperty(c)&&this._addLayer(a[c])},_addLayer:function(a){var b,c=a.options.dataset;if(c.datasets)if(c.grouped)this._addDataset(c,a);else for(b=0;b0?this._btnIcon=L.DomUtil.create("i","fa fa-spinner fa-pulse",b):this._btnIcon=L.DomUtil.create("i","fa fa-bars",b),this._container.appendChild(this._closeDiv),this._listContainer=L.DomUtil.create("div",a+" hidden"),this._listContainer.appendChild(this._form),this._container.appendChild(this._listContainer)},_toggle:function(){this.expanded?this._collapse():this._expand()},_expand:function(){L.DomUtil.addClass(this._listContainer,"leaflet-control-layers-expanded"),this.expanded=!0,this._listContainer.className=this._listContainer.className.replace(" hidden","")},_collapse:function(){this._listContainer.className=this._listContainer.className.replace(" leaflet-control-layers-expanded",""),L.DomUtil.addClass(this._listContainer,"hidden"),this.expanded=!1}}),L.control.datasets=function(a,b){return new L.Control.Datasets(a,b)}}(),L.Knreise=L.Knreise||{},L.Knreise.Icon=L.KNreiseMarkers.Icon.extend({options:{icon:null}}),L.Knreise.icon=function(a){return new L.Knreise.Icon(a)};var KR=this.KR||{};KR.DatasetLoader=function(a,b,c,d,e,f){
-"use strict";function g(a){var b=KR.Util.stamp(a);return function(c){return c&&c.features.length?(_.each(c.features,function(c){c.properties.datasetID=b,_.has(a,"circle")&&(c.properties.circle=a.circle),_.has(a,"provider")&&(c.properties.provider=a.provider),_.has(a,"extras")&&(c.properties=_.extend(c.properties,a.extras)),c.properties.feedbackForm=a.feedbackForm,_.has(a,"mappings")&&_.each(a.mappings,function(a,b){c.properties[b]=c.properties[a]}),c.template=KR.Util.getTemplateForFeature(c,a)}),c):c}}function h(a){var b=_.reduce(_.without(_.keys(a),"datasets"),function(b,c){return"style"!==c&&(b[c]=a[c]),b},{});if(a.style){b.extras=b.extras||{};var c=KR.Util.stamp(a);b.extras.groupId=c,KR.Style.groups[c]=a.style}return a.datasets=_.map(a.datasets,function(a){return _.extend({},b,a)}),a}function i(a,b){var c={dataset:b,onEachFeature:function(a,c){A&&A(a,c,b)}};return b.style&&(c.style=b.style),L.Knreise.geoJson(a,c)}function j(a,b){a.clearLayers();var c=_.reduce(b,function(a,b){return a.concat(b.toGeoJSON().features)},[]);a.addData(KR.Util.createFeatureCollection(c)),a.fire("dataAdded")}function k(a,c){a.clearLayers();var d=_.reduce(c,function(a,c){return c.setMap(b),a.concat(c.getLayers())},[]);a.addLayers(d)}function l(a,b){a.on("hide",function(){b(!0)}),a.on("show",function(){b(!0)})}function m(a,b){var c;e?c=i(null,a):a.cluster?(c=new L.Knreise.MarkerClusterGroup({dataset:a,maxClusterRadius:f}).addTo(b),z&&z(c,a)):c=i(null,a).addTo(b);var d=!0;return a.minFeatures&&(d=!1),c.enabled=d,c}function n(a,b){a.enabled!==b&&(a.enabled=b,a.fire("changeEnabled"))}function o(a){if(a.datasets&&!a.grouped){var b=_.filter(a.datasets,function(a){return a.visible}).length;return b>0}return a.visible}function p(a){return a.minZoom&&b.getZoom()b;b++)a[b]={identifier:""+b,topLeftCorner:new L.LatLng(20037508.3428,-20037508.3428)};return a}}),L.tileLayer.wmts=function(a,b){return new L.TileLayer.WMTS(a,b)},function(a){"use strict";function b(a){var b,c=new Array(30);for(b=0;22>b;b++)c[b]={identifier:a+":"+b,topLeftCorner:new L.LatLng(20037508,-20037508.34)};return c}a.SKTokenUrl="http://localhost:8001/html/baat/?type=token",a.getNibLayer=function(c,d){a.Util.sendRequest(KR.SKTokenUrl,null,function(a){var e;if(d)e=L.tileLayer.wms("http://gatekeeper2.geonorge.no/BaatGatekeeper/gk/gk.nibcache",{layers:"NiB",format:"image/jpeg",transparent:!1,attribution:"Kartverket"});else{var f="http://gatekeeper1.geonorge.no/BaatGatekeeper/gk/gk.nibcache_wmts",g="EPSG:900913";e=new L.TileLayer.WMTS(f,{layer:"NiB",style:"normal",tilematrixSet:g,matrixIds:b(g),format:"image/jpeg",attribution:"Kartverket"})}e.setParams({GKT:a}),c(e)})}}(KR);var KR=this.KR||{};KR.Config=KR.Config||{},function(a){"use strict";a.getKulturminneFunctions=function(a){var b=[],c=function(c,d,e){if(e){var f=_.map(e,function(a){return a.properties.id}),g=_.filter(f,function(a){return-1===b.indexOf(a)});if(b=b.concat(g),g.length){var h={api:"kulturminnedataSparql",type:"lokalitetpoly",lokalitet:g};a.getData(h,function(a){d.extraFeatures.addData(a)})}}},d=function(b,c,d){var e=!0;_.has(c,"showEnkeltminner")&&(e=c.showEnkeltminner);var f,g;if(e){_.has(c,"enkeltminner")||(c.enkeltminner={});var h=c.enkeltminner.style||{color:"#fff",weight:1,fillColor:"#B942D0"};f=L.geoJson(null,{onEachFeature:function(a,d){a.properties.provider=c.enkeltminner.provider||"Enkeltminne",a.properties.color=c.enkeltminner.sidebarColor||"#B942D0",d.on("click",function(){b.sidebar&&b.sidebar.showFeature(a,c.enkeltminner.template||KR.Util.getDatasetTemplate("ra_enkeltminne"))})},style:function(a){return h}}).addTo(b),g=function(b){var c={api:"kulturminnedataSparql",type:"enkeltminner",lokalitet:b.properties.lok};a.getData(c,function(a){f.clearLayers(),f.addData(a)})}}c.extraFeatures=L.geoJson(null,{onEachFeature:function(a,b){c.extras&&c.extras.groupId?b.setStyle(KR.Style.getPathStyleForGroup(c.extras.groupId)):(a.properties.datasetId=c.id,b.setStyle(KR.Style.getPathStyle(a,!0))),b.on("click",function(){g&&g(a);var b=_.find(c.geoJSONLayer.getLayers(),function(b){return b.feature.properties.id===a.properties.lok});b&&b.fire("click")})}}).addTo(b),b.on("zoomend",function(){var a=!(b.getZoom()<13);a?b.hasLayer(c.extraFeatures)||b.addLayer(c.extraFeatures):b.hasLayer(c.extraFeatures)&&b.removeLayer(c.extraFeatures)}),d.on("hide",function(){b.removeLayer(c.extraFeatures),f&&b.removeLayer(f)}),d.on("show",function(){b.addLayer(c.extraFeatures),f&&b.addLayer(f)})};return{loadKulturminnePoly:c,initKulturminnePoly:d}},a.getDatasetList=function(b,c,d){var e=a.getKulturminneFunctions(b);c&&3===c.length&&(c="0"+c);var f={difo:{name:"Digitalt fortalt",dataset:{dataset:"difo",api:"norvegiana"},cluster:!0,template:KR.Util.getDatasetTemplate("digitalt_fortalt"),noListThreshold:1/0,description:"Kulturrådets tjeneste for personlige fortellinger fra kulturinstitusjoner og privatpersoner.",allowTopic:!0,feedbackForm:!0,isStatic:!1},verneomr:{id:"verneomraader",dataset:{api:"cartodb",table:"naturvernomrader_utm33_2",columns:["iid","omradenavn","vernef_id","verneform"]},provider:"Naturbase",name:"Verneområder",template:KR.Util.getDatasetTemplate("verneomraader"),getFeatureData:function(a,c){b.getItem({api:"norvegiana",id:"kulturnett_Naturbase_"+a.properties.iid},c)},toPoint:{showAlways:!0,stopPolyClick:!0,minSize:20},minZoom:10,cluster:!1,description:"Nasjonalparker og andre naturvernområder - ca. 2700 i hele landet."},artobs:{name:"Artsobservasjoner",hideFromGenerator:!0,dataset:{api:"norvegiana",dataset:"Artsdatabanken"},cluster:!1,description:"Artsobservasjoner fra Artsdatabanken",template:KR.Util.getDatasetTemplate("popup")},folketelling:{name:"Folketelling 1910",provider:"Folketelling 1910",dataset:{api:"folketelling",dataset:"property"},isStatic:!1,minZoom:14,template:KR.Util.getDatasetTemplate("folketelling"),getFeatureData:function(a,c){b.getData({api:"folketelling",type:"propertyData",propertyId:a.properties.efid},function(b){a.properties=b.properties,a.properties.provider="Folketelling 1910",c(a)})},mappings:{title:"gaardsnavn_gateadr"},noListThreshold:0,description:"Personer og eiendommer fra folketellingen 1910"},ark_hist:{grouped:!0,name:"Arkeologi og historie",datasets:[{name:"MUSIT",provider:"Universitetsmuseene",dataset:{api:"norvegiana",dataset:"MUSIT"},template:KR.Util.getDatasetTemplate("musit")},{name:"DiMu",dataset:{api:"norvegiana",dataset:"DiMu"},template:KR.Util.getDatasetTemplate("digitalt_museum"),isStatic:!1},{id:"riksantikvaren",name:"Riksantikvaren",provider:"Riksantikvaren",dataset:{api:"kulturminnedataSparql",kommune:c,fylke:d},template:KR.Util.getDatasetTemplate("ra_sparql"),bbox:!1,isStatic:!0,init:e.initKulturminnePoly,loadWhenLessThan:{count:5,callback:e.loadKulturminnePoly}}],description:"Data fra Universitetsmuseene, Digitalt museum og Riksantikvaren"},jernbane:{id:"jernbane",dataset:{api:"jernbanemuseet"},provider:"Jernbanemuseet",name:"Jernbanemuseet",hideFromGenerator:!0,template:KR.Util.getDatasetTemplate("jernbanemuseet"),getFeatureData:function(a,c){b.getItem({api:"jernbanemuseet",id:a.properties.id},c)},isStatic:!0,bbox:!1,description:"Jernbanemuseet"},arkeologi:{grouped:!0,name:"Arkeologi",style:{fillcolor:"#436978",circle:!1,thumbnail:!0},datasets:[{name:"MUSIT",provider:"Universitetsmuseene",dataset:{api:"norvegiana",dataset:"MUSIT"},template:KR.Util.getDatasetTemplate("musit")},{id:"riksantikvaren",name:"Riksantikvaren",provider:"Riksantikvaren",dataset:{filter:'FILTER regex(?loccatlabel, "^Arkeologisk", "i") .',api:"kulturminnedataSparql",kommune:c,fylke:d},template:KR.Util.getDatasetTemplate("ra_sparql"),bbox:!1,isStatic:!0,init:e.initKulturminnePoly,loadWhenLessThan:{count:5,callback:e.loadKulturminnePoly}}],description:"Arkeologidata fra Universitetsmuseene og Riksantikvaren"},historie:{grouped:!0,name:"Historie",style:{fillcolor:"#D252B9",circle:!1,thumbnail:!0},datasets:[{id:"riksantikvaren",name:"Riksantikvaren",provider:"Riksantikvaren",dataset:{filter:'FILTER (!regex(?loccatlabel, "^Arkeologisk", "i"))',api:"kulturminnedataSparql",kommune:c,fylke:d},template:KR.Util.getDatasetTemplate("ra_sparql"),bbox:!1,isStatic:!0,init:e.initKulturminnePoly,loadWhenLessThan:{count:5,callback:e.loadKulturminnePoly}},{name:"DiMu",dataset:{api:"norvegiana",dataset:"DiMu",query:"-dc_subject_facet:Kunst"},template:KR.Util.getDatasetTemplate("digitalt_museum"),isStatic:!1,bbox:!0},{dataset:{api:"norvegiana",dataset:"Industrimuseum"},isStatic:!1,bbox:!0},{dataset:{api:"norvegiana",dataset:"Foto-SF"},isStatic:!1,bbox:!1,template:KR.Util.getDatasetTemplate("foto_sf")},{dataset:{api:"norvegiana",dataset:"Kystreise"},isStatic:!0,bbox:!1}],description:"Historie og kulturminner fra Riksantikvaren og Digitalt museum "},kunst:{grouped:!0,name:"Kunst",style:{fillcolor:"#72B026",circle:!1,thumbnail:!0},datasets:[{name:"DiMu",dataset:{api:"norvegiana",dataset:"DiMu",query:"dc_subject_facet:Kunst"},template:KR.Util.getDatasetTemplate("digitalt_museum"),isStatic:!1}],description:"Kunstdata fra Digitalt museum "},wikipedia:{name:"Wikipedia",provider:"Wikipedia",dataset:{api:"wikipedia"},style:{thumbnail:!0},minZoom:13,template:KR.Util.getDatasetTemplate("wikipedia"),description:"Stedfestede artikler fra bokmålswikipedia"},wikipediaNN:{name:"Wikipedia Nynorsk",provider:"Wikipedia Nynorsk",dataset:{api:"wikipediaNN"},style:{thumbnail:!0},minZoom:13,template:KR.Util.getDatasetTemplate("wikipedia"),description:"Stedfestede artikler fra nynorskwikipedia"},lokalwiki:{id:"lokalwiki",name:"Lokalhistoriewiki",hideFromGenerator:!1,provider:"Lokalhistoriewiki",dataset:{api:"lokalhistoriewiki"},style:{thumbnail:!0},minZoom:13,bbox:!0,isStatic:!1,description:"Stedfestede artikler fra lokalhistoriewiki.no"},riksantikvaren:{id:"riksantikvaren",name:"Kulturminnesøk",hideFromGenerator:!1,provider:"Riksantikvaren",dataset:{api:"kulturminnedataSparql",kommune:c,fylke:d},template:KR.Util.getDatasetTemplate("ra_sparql"),bbox:!1,isStatic:!0,init:e.initKulturminnePoly,loadWhenLessThan:{count:10,callback:e.loadKulturminnePoly},description:"Data fra Riksantikvarens kulturminnesøk"},brukerminner:{name:"Kulturminnesøk - brukerregistreringer",hideFromGenerator:!1,provider:"riksantikvaren",dataset:{api:"kulturminnedata",layer:2,getExtraData:!0,extraDataLayer:6,matchId:"KulturminnesokID"},cluster:!0,isStatic:!1,style:{thumbnail:!0},description:"Brukerregistrerte data fra Riksantikvarens kulturminnesøk",template:KR.Util.getDatasetTemplate("brukerminne")},groruddalen:{name:"Byantikvaren Oslo - Groruddalen",hideFromGenerator:!0,provider:"Byantikvaren i Oslo",dataset:{api:"cartodb",table:"byantikvaren_oslo_groruddalen"},bbox:!1,isStatic:!1,style:{thumbnail:!0},template:KR.Util.getDatasetTemplate("byantikvaren_oslo"),description:"Byantikvarens Groruddalsatlas"},norgerundt:{name:"Norge Rundt",hideFromGenerator:!0,provider:"NRK",dataset:{api:"cartodb",table:"nrk_norge_rundt"},bbox:!1,isStatic:!1,style:{thumbnail:!0},description:"Stedfestede innslag fra Norge Rundt"},dimu:{name:"Digitalt Museum",hideFromGenerator:!1,provider:"dimu",dataset:{dataset:"DiMu",api:"norvegiana"},cluster:!0,isStatic:!1,style:{thumbnail:!0},description:"Alle stedfestede data fra Digitalt Museum",allowTopic:!0,feedbackForm:!0},musit:{name:"Universitetsmuseene",hideFromGenerator:!1,provider:"Universitetsmuseene",dataset:{dataset:"MUSIT",api:"norvegiana"},cluster:!0,isStatic:!1,style:{thumbnail:!0},description:"Alle stedfestede data fra Universitetsmuseene",allowTopic:!0,feedbackForm:!0},industrimuseum:{name:"Industrimuseum",hideFromGenerator:!1,provider:"Industrimuseum",dataset:{dataset:"Industrimuseum",api:"norvegiana"},cluster:!0,isStatic:!1,style:{thumbnail:!0},description:"Alle stedfestede data fra Industrimuseum",allowTopic:!0,feedbackForm:!0},kystreise:{name:"Kystreise",hideFromGenerator:!1,provider:"Kystreise",dataset:{dataset:"Kystreise",api:"norvegiana"},cluster:!0,isStatic:!1,style:{thumbnail:!0},description:"Alle stedfestede data fra Kystreise",allowTopic:!0,feedbackForm:!0},dimufoto:{hideFromGenerator:!0,dataset:{api:"norvegiana",dataset:"DiMu",query:"europeana_type_facet:IMAGE"},template:KR.Util.getDatasetTemplate("digitalt_museum"),isStatic:!1,style:{thumbnail:!0},noListThreshold:1/0},kulturminnesok_flickr:{name:"Kulturminnesøk",dataset_name_override:"Kulturminnesøk",provider:"Kulturminnesøk Flickr",hideFromGenerator:!0,dataset:{api:"flickr",group_id:"1426230@N24"},template:KR.Util.getDatasetTemplate("flickr"),isStatic:!0,style:{thumbnail:!0},description:"Bilder fra Kulturminnesøks Flickr-gruppe"},riksarkivet:{name:"Riksarkivet",dataset_name_override:"Riksarkivet",provider:"riksarkivet",hideFromGenerator:!0,dataset:{api:"flickr",user_id:"national_archives_of_norway"},template:KR.Util.getDatasetTemplate("flickr"),isStatic:!1,style:{thumbnail:!0},description:"Bilder fra Riksarkivets Flickr-konto"},nasjonalbiblioteket:{name:"Nasjonalbiblioteket",dataset_name_override:"Nasjonalbiblioteket",provider:"nasjonalbiblioteket",hideFromGenerator:!0,dataset:{api:"flickr",user_id:"national_library_of_norway"},template:KR.Util.getDatasetTemplate("flickr"),isStatic:!1,style:{thumbnail:!0},description:"Bilder fra Nasjonalbibliotekets Flickr-konto"},oslobyarkiv:{name:"Oslo Byarkiv",dataset_name_override:"Oslo Byarkiv",provider:"oslobyarkiv",hideFromGenerator:!0,dataset:{api:"flickr",user_id:"byarkiv"},template:KR.Util.getDatasetTemplate("flickr"),isStatic:!1,style:{thumbnail:!0},description:"Bilder fra Oslo byarkiv sin Flickr-konto"},nasjonalmuseet:{name:"Nasjonalmuseet",dataset_name_override:"Nasjonalmuseet",provider:"nasjonalmuseet",hideFromGenerator:!0,dataset:{api:"flickr",user_id:"nasjonalmuseet"},template:KR.Util.getDatasetTemplate("flickr"),isStatic:!1,style:{thumbnail:!0},description:"Bilder fra Nasjonalmuseet sin Flickr-konto"},nve:{name:"NVE",dataset_name_override:"NVE",provider:"nve",hideFromGenerator:!0,dataset:{api:"flickr",user_id:"nve",accuracy:"6"},template:KR.Util.getDatasetTemplate("flickr"),isStatic:!1,style:{thumbnail:!0},description:"Bilder fra NVE Flickr-konto"},vestfoldmuseene:{name:"Vestfoldmuseene",dataset_name_override:"Vestfoldmuseene",provider:"Vestfoldmuseene",hideFromGenerator:!0,dataset:{api:"flickr",user_id:"vestfoldmuseene",accuracy:"1"},template:KR.Util.getDatasetTemplate("flickr"),isStatic:!1,style:{thumbnail:!0},description:"Bilder fra Vestfoldmuseene sin Flickr-konto"},perspektivet:{name:"Perspektivet Museum",dataset_name_override:"Perspektivet Museum",provider:"Perspektivet Museum",hideFromGenerator:!0,dataset:{api:"flickr",user_id:"perspektivetmuseum",accuracy:"1"},template:KR.Util.getDatasetTemplate("flickr"),isStatic:!1,style:{thumbnail:!0},description:"Bilder fra Perspektivet Museum sin Flickr-konto"}};if(!c&&!d){var g={bbox:!0,minZoom:12,isStatic:!1,bboxFunc:KR.Util.sparqlBbox};_.extend(f.riksantikvaren,g),_.extend(f.ark_hist.datasets[2],g),_.extend(f.arkeologi.datasets[1],g),_.extend(f.historie.datasets[0],g)}return f},a.getDatasets=function(b,c,d,e){var f=a.getDatasetList(c,d,e);return _.chain(b).map(function(a){var b;if(a.indexOf(":")>-1){var c=a.split(":");a=c[0],b=c[1]}if(_.has(f,a)){var d=f[a];return b&&"norvegiana"===d.dataset.api&&(d.dataset.query="dc_subject_text:"+b),d}}).compact().value()}}(KR.Config);var KR=this.KR||{};KR.SplashScreen=function(a,b,c,d,e,f){"use strict";function g(){return window.location.href.replace(window.location.hash,"")}function h(){var a=g(),b="remember_"+a+"=",c=document.cookie.split("; "),d=_.find(c,function(a){return 0===a.indexOf(b)});return d?"true"===d.substring(b.length,d.length):void 0}function i(a){document.cookie="remember_"+g()+"="+a}function j(){this._gray&&this._container.removeChild(this._gray),L.Control.Sidebar.prototype.hide.apply(this,arguments)}function k(){this._gray=L.DomUtil.create("div","gray",this._container),L.Control.Sidebar.prototype.show.apply(this,arguments)}function l(){var g=L.DomUtil.create("div","",document.body);g.id="splashscreen";var h=L.control.sidebar("splashscreen",{position:"center",autoPan:!1});h.hide=_.bind(j,h),h.show=_.bind(k,h),a.addControl(h);var i=_.template($("#splashscreen_template").html()),l=$("
");return KR.Util.isInIframe()&&l.find("a").attr("target","_blank"),h.setContent(l.html()),h}function m(a){function b(){i(c.prop("checked"))}var c=$(a.getContainer()).find("#persist_splash_cb");c.prop("checked",h()),c.on("change",b),b()}function n(b){return L.easyButton(a,b,{position:"topright",icon:"fa-info-circle",title:"Om"})}var o=l();n(function(){o.isVisible()?o.hide():o.show()});var p=h();return p||(_.isUndefined(p)&&i(!0),o.show()),m(o),{finishedLoading:function(){var a=$(o.getContainer()).find("#splash_spinner");a&&a.remove()}}};var KR=this.KR||{};KR.ResponseForm=function(a,b){function c(a,b){var c=_.reduce(a,function(a,b,c){return a[g[c]]=b,a},{});$.ajax({url:h,data:c,type:"POST",dataType:"xml",success:b,error:b})}function d(b){a.find("form").addClass("hidden"),a.find("#form-success").removeClass("hidden").find(".media-body").text("Din melding er sendt til "+b+". De vil ta kontakt hvis de har behov for ytterligere informasjon")}function e(e){e.preventDefault();var f=a.find("#form_email").val(),g=a.find("#form_message").val();if(""===f||""===g)return!1;var h=_.extend({},b,{email:f,message:g});return c(h,function(){d(h.provider)}),!1}function f(){a.find("#form_email").val(""),a.find("#form_message").val(""),a.find("#form-success").addClass("hidden"),a.find("form").addClass("hidden"),a.find(".show-more").removeClass("hidden")}var g={message:"entry.126368279",email:"entry.748218122",id:"entry.2043404140",url:"entry.243673559",provider:"entry.826324496"},h="https://docs.google.com/forms/d/1ah66lattC8it7OTIM6de20NSNkBeiQ0vabpsHSaPU7s/formResponse",i=$("#response_form_template").html();a.append(i),a.find("form").on("submit",e),a.find(".show-more").click(function(){a.find(".show-more").addClass("hidden"),a.find("form").removeClass("hidden")}),a.find(".close ").click(f)};var KR=this.KR||{};!function(a){"use strict";function b(a){return function(b){if(!b||!b.features.length)return b;if(-1===b.features[0].geometry.type.indexOf("Polygon"))return turf.within(b,a);var c=_.filter(b.features,function(b){var c=turf.extent(b),d=turf.bboxPolygon(c);return!!turf.intersect(d,a.features[0])});return KR.Util.createFeatureCollection(c)}}function c(a,b,c,d,e){return c&&(b=KR.Config.getDatasets(b,a,d,e)),b}function d(a,b){var c={stroke:!1,fillColor:"#ddd",fillOpacity:.8},d=_.reduce(b.features,function(a,b){return turf.erase(a,b)},KR.Util.WORLD);L.geoJson(d,c).addTo(a)}function e(a,c,e,f,g,h,i,j){if(a.geomFilter){var k={api:"cartodb"};k[h]=g,c.getData(k,function(c){a.showGeom&&d(a.map,c);var f=L.geoJson(c),g=b(c);i(f.getBounds(),e,g,null,j)})}else f(g,function(a){var b=L.latLngBounds.fromBBoxString(a);i(b,e,null,null,j)})}function f(a,b,d,f,g,h){d=c(b,d,f,a.komm),_.isString(a.komm)&&(a.komm=a.komm.split(",")),e(a,b,d,b.getMunicipalityBounds,a.komm,"municipality",g,h)}function g(a,b,d,f,g,h){d=c(b,d,f,null,a.fylke),_.isString(a.fylke)&&(a.fylke=a.fylke.split(",")),e(a,b,d,b.getCountyBounds,a.fylke,"county",g,h)}function h(a,b,d,e,f,g){d=c(b,d,e);var h=L.latLngBounds.fromBBoxString(a.bbox);f(h,d,null,null,g)}function i(a){var b=[];return _.each(a.features,function(a){"GeometryCollection"===a.geometry.type?_.each(a.geometry.geometries,function(c){b.push(KR.Util.createGeoJSONFeatureFromGeom(c,a.properties))}):b.push(a)}),KR.Util.createFeatureCollection(b)}function j(a){var b=_.map(a.features,function(a){return turf.simplify(a,.01,!1)});return KR.Util.createFeatureCollection(b)}function k(a,d,e,f,g,h,k){var l={};e.linecolor&&(l.color=e.linecolor);var m=L.geoJson(a,l),n=m.getBounds();f=c(d,f,g);var o;if(a&&e.buffer){a=i(a),a.features.length>5&&(a=j(a));var p=turf.buffer(a,e.buffer,"kilometers");o=b(p)}h(n,f,o,m,k)}function l(a,b,c,d,e,f){KR.Util.getLine(b,a.line,function(g){k(g,b,a,c,d,e,f)})}function m(a){var b=KR.UrlFunctions.getHashFeature();if(b){var c=function(a){return decodeURIComponent(a.feature.id)===decodeURIComponent(b)||a.feature.id===decodeURIComponent(b)},d=_.find(_.flatten(a),function(a){return _.find(a.getLayers(),c)});if(d){var e=_.find(d.getLayers(),c);e.fire("click"),d.setLayerSelected(e)}}}function n(a,b){return _.map(a,function(a){return a.isStatic&&(a.fixedBbox=b),a.datasets&&(a.datasets=_.map(a.datasets,function(a){return a.isStatic&&(a.fixedBbox=b),a})),a})}function o(a){return _.map(a,function(a){return a.isStatic=!0,a.datasets&&(a.datasets=_.map(a.datasets,function(a){return a.isStatic=!0,a})),a})}var p={geomFilter:!1,showGeom:!1,loactionHash:!0,featureHash:!0};a.setupMap=function(a,b,c,d){function e(a,b,d,e,f){c.allstatic&&(b=o(b)),b=n(b,a.toBBoxString());var g=L.Knreise.LocateButton(null,null,{bounds:a});g.addTo(i);var h=function(f){f?(i.setView([f.lat,f.lon],f.zoom),a=i.getBounds()):i.fitBounds(a),c.loactionHash&&KR.UrlFunctions.setupLocationUrl(i);var g,h=function(a){m(a),q&&q.finishedLoading()};c.geomFilter&&a&&(g=a.toBBoxString());var j=k.loadDatasets(b,a.toBBoxString(),d,h,g);e&&e.addTo(i),b.length>1&&L.control.datasets(j).addTo(i)};c.initUserPos?(i.addOneTimeEventListener("locationChange",function(){var a={lat:i.userPosition.lat,lon:i.userPosition.lng,zoom:16};h(a)}),i.addOneTimeEventListener("locationError",function(){h(f)}),g.getLocation()):h(f)}c=c||{},c=_.extend({},p,c);var i=KR.Util.createMap("map",c),j=KR.Util.setupSidebar(i,{featureHash:c.featureHash}),k=new KR.DatasetLoader(a,i,j,null,c.cluster,c.clusterRadius);i.sidebar=j;var q;c.title&&(q=KR.SplashScreen(i,c.title,c.description,c.image,null,!1));var r,s=KR.UrlFunctions.getLocationUrl(i);return c.initUserPos||(r=s),c.map=i,c.komm?f(c,a,b,d,e,r):c.fylke?g(c,a,b,d,e,r):c.line?l(c,a,b,d,e,r):c.bbox?h(c,a,b,d,e,r):alert("Missing parameters!"),i},a.setupMapFromUrl=function(b,c,d){a.setupMap(b,c,d,!0)}}(KR);var KR=this.KR||{};KR.setupCollectionMap=function(a,b,c){"use strict";function d(a){var b=KR.Util.createMap("map",{layer:c});KR.SplashScreen(b,a.title,a.description,a.image,a.creator),$("title").append(a.title);var d=L.latLngBounds.fromBBoxArray(turf.extent(a.geo_json));_.each(a.geo_json.features,function(a){a.properties.datasetId=a.properties.provider,_.has(e,a.properties.provider)&&(a.template=e[a.properties.provider])});var f=KR.Util.setupSidebar(b),g=KR.Util.clusterClick(f),h=KR.Util.featureClick(f);L.Knreise.LocateButton(null,null,{bounds:d}).addTo(b),b.fitBounds(d);var i=L.Knreise.geoJson(a.geo_json,{onEachFeature:function(a,b){h(a,b)}}),j=(new L.Knreise.MarkerClusterGroup).addTo(b);j.addLayers(i.getLayers()),g(j)}var e={"Digitalt fortalt":KR.Util.getDatasetTemplate("digitalt_fortalt"),DigitaltMuseum:KR.Util.getDatasetTemplate("digitalt_museum"),Musit:KR.Util.getDatasetTemplate("musit"),Artsdatabanken:KR.Util.getDatasetTemplate("popup")};a.getCollection(b,d)};
\ No newline at end of file
+"use strict";function g(a){var b=KR.Util.stamp(a);return function(c){return c&&c.features.length?(_.each(c.features,function(c){c.properties.datasetID=b,_.has(a,"circle")&&(c.properties.circle=a.circle),_.has(a,"provider")&&(c.properties.provider=a.provider),_.has(a,"extras")&&(c.properties=_.extend(c.properties,a.extras)),c.properties.feedbackForm=a.feedbackForm,_.has(a,"mappings")&&_.each(a.mappings,function(a,b){c.properties[b]=c.properties[a]}),c.template=KR.Util.getTemplateForFeature(c,a)}),c):c}}function h(a){var b=_.reduce(_.without(_.keys(a),"datasets"),function(b,c){return"style"!==c&&(b[c]=a[c]),b},{});if(a.style){b.extras=b.extras||{};var c=KR.Util.stamp(a);b.extras.groupId=c,KR.Style.groups[c]=a.style}return a.datasets=_.map(a.datasets,function(a){return _.extend({},b,a)}),a}function i(a,b){var c={dataset:b,onEachFeature:function(a,c){A&&A(a,c,b)}};return b.style&&(c.style=b.style),L.Knreise.geoJson(a,c)}function j(a,b){a.clearLayers();var c=_.reduce(b,function(a,b){return a.concat(b.toGeoJSON().features)},[]);a.addData(KR.Util.createFeatureCollection(c)),a.fire("dataAdded")}function k(a,c){a.clearLayers();var d=_.reduce(c,function(a,c){return c.setMap(b),a.concat(c.getLayers())},[]);a.addLayers(d)}function l(a,b){a.on("hide",function(){b(!0)}),a.on("show",function(){b(!0)})}function m(a,b){var c;e?c=i(null,a):a.cluster?(c=new L.Knreise.MarkerClusterGroup({dataset:a,maxClusterRadius:f}).addTo(b),z&&z(c,a)):c=i(null,a).addTo(b);var d=!0;return a.minFeatures&&(d=!1),c.enabled=d,c}function n(a,b){a.enabled!==b&&(a.enabled=b,a.fire("changeEnabled"))}function o(a){if(a.datasets&&!a.grouped){var b=_.filter(a.datasets,function(a){return a.visible}).length;return b>0}return a.visible}function p(a){return a.minZoom&&b.getZoom()b;b++)a[b]={identifier:""+b,topLeftCorner:new L.LatLng(20037508.3428,-20037508.3428)};return a}}),L.tileLayer.wmts=function(a,b){return new L.TileLayer.WMTS(a,b)},function(a){"use strict";function b(a){var b,c=new Array(30);for(b=0;22>b;b++)c[b]={identifier:a+":"+b,topLeftCorner:new L.LatLng(20037508,-20037508.34)};return c}a.SKTokenUrl="http://localhost:8001/html/baat/?type=token",a.getNibLayer=function(c,d){a.Util.sendRequest(KR.SKTokenUrl,null,function(a){var e;if(d)e=L.tileLayer.wms("http://gatekeeper2.geonorge.no/BaatGatekeeper/gk/gk.nibcache",{layers:"NiB",format:"image/jpeg",transparent:!1,attribution:"Kartverket"});else{var f="http://gatekeeper1.geonorge.no/BaatGatekeeper/gk/gk.nibcache_wmts",g="EPSG:900913";e=new L.TileLayer.WMTS(f,{layer:"NiB",style:"normal",tilematrixSet:g,matrixIds:b(g),format:"image/jpeg",attribution:"Kartverket"})}e.setParams({GKT:a}),c(e)})}}(KR);var KR=this.KR||{};KR.Config=KR.Config||{},function(a){"use strict";a.getKulturminneFunctions=function(a){var b,c,d,e=[],f=function(a){return L.geoJson(null,{onEachFeature:function(b,c){a.extras&&a.extras.groupId?c.setStyle(KR.Style.getPathStyleForGroup(a.extras.groupId)):(b.properties.datasetId=a.id,c.setStyle(KR.Style.getPathStyle(b,!0)))}}).addTo(c)},g=function(){map.removeLayer(d)},h=function(){map.addLayer(d)},i=function(a,b,c){var d;a.on("zoomstart",function(b){d=a.getZoom()}),a.on("zoomend",function(b){var c=a.getZoom();console.log("end:",d,c)})},j=function(a,e,j){b=j,c=a,j.on("hide",g),j.on("show",h),d=f(e),i(c,13)},k=function(a){d.addData(a);var b=_.chain(a.features).map(function(a){return a.properties.lok}).uniq().value();e=e.concat(b),console.log("new ids",b)},l=function(b,c,d){if(!d)return void console.log("no features to show for");var f=_.chain(d).map(function(a){return a.properties.id}).filter(function(a){return-1===e.indexOf(a)}).value();if(!f.length)return void console.log("no new features to load");var g={api:"kulturminnedataSparql",type:"lokalitetpoly",lokalitet:f};a.getData(g,k)};return{loadKulturminnePoly:l,initKulturminnePoly:j}}}(KR.Config);var KR=this.KR||{};KR.Config=KR.Config||{},function(a){"use strict";a.getDatasetList=function(b,c,d){var e=a.getKulturminneFunctions(b);c&&3===c.length&&(c="0"+c);var f={difo:{name:"Digitalt fortalt",dataset:{dataset:"difo",api:"norvegiana"},cluster:!0,template:KR.Util.getDatasetTemplate("digitalt_fortalt"),noListThreshold:1/0,description:"Kulturrådets tjeneste for personlige fortellinger fra kulturinstitusjoner og privatpersoner.",allowTopic:!0,feedbackForm:!0,isStatic:!1},verneomr:{id:"verneomraader",dataset:{api:"cartodb",table:"naturvernomrader_utm33_2",columns:["iid","omradenavn","vernef_id","verneform"]},provider:"Naturbase",name:"Verneområder",template:KR.Util.getDatasetTemplate("verneomraader"),getFeatureData:function(a,c){b.getItem({api:"norvegiana",id:"kulturnett_Naturbase_"+a.properties.iid},c)},toPoint:{showAlways:!0,stopPolyClick:!0,minSize:20},minZoom:10,cluster:!1,description:"Nasjonalparker og andre naturvernområder - ca. 2700 i hele landet."},artobs:{name:"Artsobservasjoner",hideFromGenerator:!0,dataset:{api:"norvegiana",dataset:"Artsdatabanken"},cluster:!1,description:"Artsobservasjoner fra Artsdatabanken",template:KR.Util.getDatasetTemplate("popup")},folketelling:{name:"Folketelling 1910",provider:"Folketelling 1910",dataset:{api:"folketelling",dataset:"property"},isStatic:!1,minZoom:14,template:KR.Util.getDatasetTemplate("folketelling"),getFeatureData:function(a,c){b.getData({api:"folketelling",type:"propertyData",propertyId:a.properties.efid},function(b){a.properties=b.properties,a.properties.provider="Folketelling 1910",c(a)})},mappings:{title:"gaardsnavn_gateadr"},noListThreshold:0,description:"Personer og eiendommer fra folketellingen 1910"},ark_hist:{grouped:!0,name:"Arkeologi og historie",datasets:[{name:"MUSIT",provider:"Universitetsmuseene",dataset:{api:"norvegiana",dataset:"MUSIT"},template:KR.Util.getDatasetTemplate("musit")},{name:"DiMu",dataset:{api:"norvegiana",dataset:"DiMu"},template:KR.Util.getDatasetTemplate("digitalt_museum"),isStatic:!1},{id:"riksantikvaren",name:"Riksantikvaren",provider:"Riksantikvaren",dataset:{api:"kulturminnedataSparql",kommune:c,fylke:d},template:KR.Util.getDatasetTemplate("ra_sparql"),bbox:!1,isStatic:!0,init:e.initKulturminnePoly,loadWhenLessThan:{count:5,callback:e.loadKulturminnePoly}}],description:"Data fra Universitetsmuseene, Digitalt museum og Riksantikvaren"},jernbane:{id:"jernbane",dataset:{api:"jernbanemuseet"},provider:"Jernbanemuseet",name:"Jernbanemuseet",hideFromGenerator:!0,template:KR.Util.getDatasetTemplate("jernbanemuseet"),getFeatureData:function(a,c){b.getItem({api:"jernbanemuseet",id:a.properties.id},c)},isStatic:!0,bbox:!1,description:"Jernbanemuseet"},arkeologi:{grouped:!0,name:"Arkeologi",style:{fillcolor:"#436978",circle:!1,thumbnail:!0},datasets:[{name:"MUSIT",provider:"Universitetsmuseene",dataset:{api:"norvegiana",dataset:"MUSIT"},template:KR.Util.getDatasetTemplate("musit")},{id:"riksantikvaren",name:"Riksantikvaren",provider:"Riksantikvaren",dataset:{filter:'FILTER regex(?loccatlabel, "^Arkeologisk", "i") .',api:"kulturminnedataSparql",kommune:c,fylke:d},template:KR.Util.getDatasetTemplate("ra_sparql"),bbox:!1,isStatic:!0,init:e.initKulturminnePoly,loadWhenLessThan:{count:5,callback:e.loadKulturminnePoly}}],description:"Arkeologidata fra Universitetsmuseene og Riksantikvaren"},historie:{grouped:!0,name:"Historie",style:{fillcolor:"#D252B9",circle:!1,thumbnail:!0},datasets:[{id:"riksantikvaren",name:"Riksantikvaren",provider:"Riksantikvaren",dataset:{filter:'FILTER (!regex(?loccatlabel, "^Arkeologisk", "i"))',api:"kulturminnedataSparql",kommune:c,fylke:d},template:KR.Util.getDatasetTemplate("ra_sparql"),bbox:!1,isStatic:!0,init:e.initKulturminnePoly,loadWhenLessThan:{count:5,callback:e.loadKulturminnePoly}},{name:"DiMu",dataset:{api:"norvegiana",dataset:"DiMu",query:"-dc_subject_facet:Kunst"},template:KR.Util.getDatasetTemplate("digitalt_museum"),isStatic:!1,bbox:!0},{dataset:{api:"norvegiana",dataset:"Industrimuseum"},isStatic:!1,bbox:!0},{dataset:{api:"norvegiana",dataset:"Foto-SF"},isStatic:!1,bbox:!1,template:KR.Util.getDatasetTemplate("foto_sf")},{dataset:{api:"norvegiana",dataset:"Kystreise"},isStatic:!0,bbox:!1}],description:"Historie og kulturminner fra Riksantikvaren og Digitalt museum "},kunst:{grouped:!0,name:"Kunst",style:{fillcolor:"#72B026",circle:!1,thumbnail:!0},datasets:[{name:"DiMu",dataset:{api:"norvegiana",dataset:"DiMu",query:"dc_subject_facet:Kunst"},template:KR.Util.getDatasetTemplate("digitalt_museum"),isStatic:!1}],description:"Kunstdata fra Digitalt museum "},wikipedia:{name:"Wikipedia",provider:"Wikipedia",dataset:{api:"wikipedia"},style:{thumbnail:!0},minZoom:13,template:KR.Util.getDatasetTemplate("wikipedia"),description:"Stedfestede artikler fra bokmålswikipedia"},wikipediaNN:{name:"Wikipedia Nynorsk",provider:"Wikipedia Nynorsk",dataset:{api:"wikipediaNN"},style:{thumbnail:!0},minZoom:13,template:KR.Util.getDatasetTemplate("wikipedia"),description:"Stedfestede artikler fra nynorskwikipedia"},lokalwiki:{id:"lokalwiki",name:"Lokalhistoriewiki",hideFromGenerator:!1,provider:"Lokalhistoriewiki",dataset:{api:"lokalhistoriewiki"},style:{thumbnail:!0},minZoom:13,bbox:!0,isStatic:!1,description:"Stedfestede artikler fra lokalhistoriewiki.no"},riksantikvaren:{id:"riksantikvaren",name:"Kulturminnesøk",hideFromGenerator:!1,provider:"Riksantikvaren",dataset:{api:"kulturminnedataSparql",kommune:c,fylke:d},template:KR.Util.getDatasetTemplate("ra_sparql"),bbox:!1,isStatic:!0,init:e.initKulturminnePoly,loadWhenLessThan:{count:10,callback:e.loadKulturminnePoly},description:"Data fra Riksantikvarens kulturminnesøk"},brukerminner:{name:"Kulturminnesøk - brukerregistreringer",hideFromGenerator:!1,provider:"riksantikvaren",dataset:{api:"kulturminnedata",layer:2,getExtraData:!0,extraDataLayer:6,matchId:"KulturminnesokID"},cluster:!0,isStatic:!1,style:{thumbnail:!0},description:"Brukerregistrerte data fra Riksantikvarens kulturminnesøk",template:KR.Util.getDatasetTemplate("brukerminne")},groruddalen:{name:"Byantikvaren Oslo - Groruddalen",hideFromGenerator:!0,provider:"Byantikvaren i Oslo",dataset:{api:"cartodb",table:"byantikvaren_oslo_groruddalen"},bbox:!1,isStatic:!1,style:{thumbnail:!0},template:KR.Util.getDatasetTemplate("byantikvaren_oslo"),description:"Byantikvarens Groruddalsatlas"},norgerundt:{name:"Norge Rundt",hideFromGenerator:!0,provider:"NRK",dataset:{api:"cartodb",table:"nrk_norge_rundt"},bbox:!1,isStatic:!1,style:{thumbnail:!0},description:"Stedfestede innslag fra Norge Rundt"},dimu:{name:"Digitalt Museum",hideFromGenerator:!1,provider:"dimu",dataset:{dataset:"DiMu",api:"norvegiana"},cluster:!0,isStatic:!1,style:{thumbnail:!0},description:"Alle stedfestede data fra Digitalt Museum",allowTopic:!0,feedbackForm:!0},musit:{name:"Universitetsmuseene",hideFromGenerator:!1,provider:"Universitetsmuseene",dataset:{dataset:"MUSIT",api:"norvegiana"},cluster:!0,isStatic:!1,style:{thumbnail:!0},description:"Alle stedfestede data fra Universitetsmuseene",allowTopic:!0,feedbackForm:!0},industrimuseum:{name:"Industrimuseum",hideFromGenerator:!1,provider:"Industrimuseum",dataset:{dataset:"Industrimuseum",api:"norvegiana"},cluster:!0,isStatic:!1,style:{thumbnail:!0},description:"Alle stedfestede data fra Industrimuseum",allowTopic:!0,feedbackForm:!0},kystreise:{name:"Kystreise",hideFromGenerator:!1,provider:"Kystreise",dataset:{dataset:"Kystreise",api:"norvegiana"},cluster:!0,isStatic:!1,style:{thumbnail:!0},description:"Alle stedfestede data fra Kystreise",allowTopic:!0,feedbackForm:!0},dimufoto:{hideFromGenerator:!0,dataset:{api:"norvegiana",dataset:"DiMu",query:"europeana_type_facet:IMAGE"},template:KR.Util.getDatasetTemplate("digitalt_museum"),isStatic:!1,style:{thumbnail:!0},noListThreshold:1/0},kulturminnesok_flickr:{name:"Kulturminnesøk",dataset_name_override:"Kulturminnesøk",provider:"Kulturminnesøk Flickr",hideFromGenerator:!0,dataset:{api:"flickr",group_id:"1426230@N24"},template:KR.Util.getDatasetTemplate("flickr"),isStatic:!0,style:{thumbnail:!0},description:"Bilder fra Kulturminnesøks Flickr-gruppe"},riksarkivet:{name:"Riksarkivet",dataset_name_override:"Riksarkivet",provider:"riksarkivet",hideFromGenerator:!0,dataset:{api:"flickr",user_id:"national_archives_of_norway"},template:KR.Util.getDatasetTemplate("flickr"),isStatic:!1,style:{thumbnail:!0},description:"Bilder fra Riksarkivets Flickr-konto"},nasjonalbiblioteket:{name:"Nasjonalbiblioteket",dataset_name_override:"Nasjonalbiblioteket",provider:"nasjonalbiblioteket",hideFromGenerator:!0,dataset:{api:"flickr",user_id:"national_library_of_norway"},template:KR.Util.getDatasetTemplate("flickr"),isStatic:!1,style:{thumbnail:!0},description:"Bilder fra Nasjonalbibliotekets Flickr-konto"},oslobyarkiv:{name:"Oslo Byarkiv",dataset_name_override:"Oslo Byarkiv",provider:"oslobyarkiv",hideFromGenerator:!0,dataset:{api:"flickr",user_id:"byarkiv"},template:KR.Util.getDatasetTemplate("flickr"),isStatic:!1,style:{thumbnail:!0},description:"Bilder fra Oslo byarkiv sin Flickr-konto"},nasjonalmuseet:{name:"Nasjonalmuseet",dataset_name_override:"Nasjonalmuseet",provider:"nasjonalmuseet",hideFromGenerator:!0,dataset:{api:"flickr",user_id:"nasjonalmuseet"},template:KR.Util.getDatasetTemplate("flickr"),isStatic:!1,style:{thumbnail:!0},description:"Bilder fra Nasjonalmuseet sin Flickr-konto"},nve:{name:"NVE",dataset_name_override:"NVE",provider:"nve",hideFromGenerator:!0,dataset:{api:"flickr",user_id:"nve",accuracy:"6"},template:KR.Util.getDatasetTemplate("flickr"),isStatic:!1,style:{thumbnail:!0},description:"Bilder fra NVE Flickr-konto"},vestfoldmuseene:{name:"Vestfoldmuseene",dataset_name_override:"Vestfoldmuseene",provider:"Vestfoldmuseene",hideFromGenerator:!0,dataset:{api:"flickr",user_id:"vestfoldmuseene",accuracy:"1"},template:KR.Util.getDatasetTemplate("flickr"),isStatic:!1,style:{thumbnail:!0},description:"Bilder fra Vestfoldmuseene sin Flickr-konto"},perspektivet:{name:"Perspektivet Museum",dataset_name_override:"Perspektivet Museum",provider:"Perspektivet Museum",hideFromGenerator:!0,dataset:{api:"flickr",user_id:"perspektivetmuseum",accuracy:"1"},template:KR.Util.getDatasetTemplate("flickr"),isStatic:!1,style:{thumbnail:!0},description:"Bilder fra Perspektivet Museum sin Flickr-konto"}};if(!c&&!d){var g={bbox:!0,minZoom:12,isStatic:!1,bboxFunc:KR.Util.sparqlBbox};_.extend(f.riksantikvaren,g),_.extend(f.ark_hist.datasets[2],g),_.extend(f.arkeologi.datasets[1],g),_.extend(f.historie.datasets[0],g)}return f},a.getDatasets=function(b,c,d,e){var f=a.getDatasetList(c,d,e);return _.chain(b).map(function(a){var b;if(a.indexOf(":")>-1){var c=a.split(":");a=c[0],b=c[1]}if(_.has(f,a)){var d=f[a];return b&&"norvegiana"===d.dataset.api&&(d.dataset.query="dc_subject_text:"+b),d}}).compact().value()}}(KR.Config);var KR=this.KR||{};KR.SplashScreen=function(a,b,c,d,e,f){"use strict";function g(){return window.location.href.replace(window.location.hash,"")}function h(){var a=g(),b="remember_"+a+"=",c=document.cookie.split("; "),d=_.find(c,function(a){return 0===a.indexOf(b)});return d?"true"===d.substring(b.length,d.length):void 0}function i(a){document.cookie="remember_"+g()+"="+a}function j(){this._gray&&this._container.removeChild(this._gray),L.Control.Sidebar.prototype.hide.apply(this,arguments)}function k(){this._gray=L.DomUtil.create("div","gray",this._container),L.Control.Sidebar.prototype.show.apply(this,arguments)}function l(){var g=L.DomUtil.create("div","",document.body);g.id="splashscreen";var h=L.control.sidebar("splashscreen",{position:"center",autoPan:!1});h.hide=_.bind(j,h),h.show=_.bind(k,h),a.addControl(h);var i=_.template($("#splashscreen_template").html()),l=$("
'+a.length+"";return new L.DivIcon({className:"leaflet-marker-photo",html:h,iconSize:[60,60],iconAnchor:[30,30]})}}function o(a,b){var c=KR.Util.hexToRgba(b,.4);return new L.DivIcon({className:"leaflet-marker-circle",html:'
'+a.length+"";return new L.DivIcon({className:"leaflet-marker-photo",html:h,iconSize:[60,60],iconAnchor:[30,30]})}}function o(a,b){var c=KR.Util.hexToRgba(b,.4);return new L.DivIcon({className:"leaflet-marker-circle",html:'