1"use strict";(self.webpackChunksvk_designsystem=self.webpackChunksvk_designsystem||[]).push([[228,2801,6316],{30228:function(e){var t=Object.prototype.hasOwnProperty,i="function"!=typeof Object.create&&"~";function n(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function a(){}a.prototype._events=void 0,a.prototype.eventNames=function(){var e,n=this._events,a=[];if(!n)return a;for(e in n)t.call(n,e)&&a.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(n)):a},a.prototype.listeners=function(e,t){var n=i?i+e:e,a=this._events&&this._events[n];if(t)return!!a;if(!a)return[];if(a.fn)return[a.fn];for(var o=0,r=a.length,s=new Array(r);o<r;o++)s[o]=a[o].fn;return s},a.prototype.emit=function(e,t,n,a,o,r){var s=i?i+e:e;if(!this._events||!this._events[s])return!1;var c,l,p=this._events[s],d=arguments.length;if("function"==typeof p.fn){switch(p.once&&this.removeListener(e,p.fn,void 0,!0),d){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,t),!0;case 3:return p.fn.call(p.context,t,n),!0;case 4:return p.fn.call(p.context,t,n,a),!0;case 5:return p.fn.call(p.context,t,n,a,o),!0;case 6:return p.fn.call(p.context,t,n,a,o,r),!0}for(l=1,c=new Array(d-1);l<d;l++)c[l-1]=arguments[l];p.fn.apply(p.context,c)}else{var u,f=p.length;for(l=0;l<f;l++)switch(p[l].once&&this.removeListener(e,p[l].fn,void 0,!0),d){case 1:p[l].fn.call(p[l].context);break;case 2:p[l].fn.call(p[l].context,t);break;case 3:p[l].fn.call(p[l].context,t,n);break;default:if(!c)for(u=1,c=new Array(d-1);u<d;u++)c[u-1]=arguments[u];p[l].fn.apply(p[l].context,c)}}return!0},a.prototype.on=function(e,t,a){var o=new n(t,a||this),r=i?i+e:e;return this._events||(this._events=i?{}:Object.create(null)),this._events[r]?this._events[r].fn?this._events[r]=[this._events[r],o]:this._events[r].push(o):this._events[r]=o,this},a.prototype.once=function(e,t,a){var o=new n(t,a||this,!0),r=i?i+e:e;return this._events||(this._events=i?{}:Object.create(null)),this._events[r]?this._events[r].fn?this._events[r]=[this._events[r],o]:this._events[r].push(o):this._events[r]=o,this},a.prototype.removeListener=function(e,t,n,a){var o=i?i+e:e;if(!this._events||!this._events[o])return this;var r=this._events[o],s=[];if(t)if(r.fn)(r.fn!==t||a&&!r.once||n&&r.context!==n)&&s.push(r);else for(var c=0,l=r.length;c<l;c++)(r[c].fn!==t||a&&!r[c].once||n&&r[c].context!==n)&&s.push(r[c]);return s.length?this._events[o]=1===s.length?s[0]:s:delete this._events[o],this},a.prototype.removeAllListeners=function(e){return this._events?(e?delete this._events[i?i+e:e]:this._events=i?{}:Object.create(null),this):this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prototype.setMaxListeners=function(){return this},a.prefixed=i,e.exports=a},33730:function(e,t,i){function n(e){return encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}function a(e){return"string"!=typeof e?{}:(e=e.trim().replace(/^(\?|#|&)/,""))?e.split("&").reduce(function(e,t){var i=t.replace(/\+/g," ").split("="),n=i.shift(),a=i.length>0?i.join("="):void 0;return n=decodeURIComponent(n),a=void 0===a?null:decodeURIComponent(a),e.hasOwnProperty(n)?Array.isArray(e[n])?e[n].push(a):e[n]=[e[n],a]:e[n]=a,e},{}):{}}function o(e){return e?Object.keys(e).map(function(t){var i=e[t];return void 0===i?"":null===i?t:Array.isArray(i)?i.map(function(e){return n(t)+"="+n(e)}).join("&"):n(t)+"="+n(i)}).filter(function(e){return e.length>0}).join("&"):""}i.d(t,{As:function(){return o},qg:function(){return a}})},41402:function(e,t,i){i.r(t),i.d(t,{changed:function(){return c},get:function(){return p},getFilterItems:function(){return d},init:function(){return u},ready:function(){return s},set:function(){return l}});var n=i(49725);const a=new(i(30228));let o={type:[],location:{},accessibility:[],details:[],q:"",page:1};const r={type:[{type:"type",name:"Kyrkor och kapell",id:"ChurchAndChapel",visible:!0},{type:"category",name:"Sommarkyrka",id:"0cf65df6-f5f1-ea11-8116-005056a33a86",visible:!0,parent:"ChurchAndChapel"},{type:"category",name:"Vägkyrka",id:"29f65df6-f5f1-ea11-8116-005056a33a86",visible:!0,parent:"ChurchAndChapel"},{type:"category",name:"Pilgrimskyrka",id:"9d995319-98c4-41c7-91e1-a142d7f094bb",visible:!0,parent:"ChurchAndChapel"},{type:"type",name:"Församlingshem",id:"ParishHome",visible:!0},{type:"type",name:"Kyrkogård",id:"Cemetery",visible:!0}
1,{type:"type",name:"Extern",id:"External",visible:!1},{type:"category",name:"Ruin",id:"3ad21428-264b-48c2-8623-2ef20133be93",visible:!1}],details:[{name:"Toalett",id:"placedetails_hastoilet",queryId:"1"},{name:"Wi-fi",id:"placedetails_hasWifi",queryId:"2"},{name:"Kafé",id:"placedetails_hasCafe",queryId:"3"},{name:"Parkering",id:"placedetails_hasParking",queryId:"4"},{name:"Laddstation",id:"placedetails_hasChargingStation",queryId:"5"}],accessibility:[{name:"Handikappanpassad toalett",id:"placeDetails_accessibility_toiletAccessible",queryId:"1"},{name:"Hörselslinga",id:"placeDetails_accessibility_hasHearingLoop",queryId:"2"},{name:"Ramp",id:"placeDetails_accessibility_hasRamp",queryId:"3"}]},s=e=>{a.on("ready",()=>{void 0!==e&&e(o)})},c=e=>{a.on("update",()=>{e(o)})},l=e=>{void 0!==e.type?(o[e.type]=e.data,"page"!==e.type&&(o.page=1)):(o={...structuredClone(e.data),...structuredClone(o)},o.page=1);let t=(0,n.stringifyQuery)(o);history.replaceState(t,null,`${window.location.origin}${window.location.pathname}${t}`),a.emit("update")},p=e=>void 0!==e?o[e]:o,d=e=>r[e],u=()=>{let e=(0,n.parseQuery)();o={...o,...e},a.emit("ready")}},49725:function(e,t,i){i.r(t),i.d(t,{parseQuery:function(){return o},stringifyQuery:function(){return r}});var n=i(33730),a=i(41402);function o(){let e={type:[],location:{},accessibility:[],details:[],q:""},t=n.qg(location.search);if(e.location={},void 0!==t.init&&(e.init=t.init),void 0!==t.locationName&&(e.location.name=t.locationName),void 0!==t.locationLongituted&&(e.location.longitude=t.locationLongituted,e.location.latitude=t.locationLatitude),void 0!==t.locationRadius&&(e.location.radius=t.locationRadius),"owner"===t.locationAction&&t.locationOwner&&(e.location.owner=t.locationOwner),t.locationAction&&(e.location.action=t.locationAction),void 0!==t.search&&(e.q=t.search),void 0!==t.type){let i=t.type.split(","),n=(0,a.getFilterItems)("type");i.forEach(t=>{let i=n.find(e=>e.id===t);void 0!==i&&e.type.push(i)})}if(void 0!==t.categories){let i=t.categories.split(","),n=(0,a.getFilterItems)("type");i.forEach(t=>{let i=n.find(e=>e.id===t);void 0!==i&&e.type.push(i)})}if(void 0!==t.details){let i=t.details.split(","),n=(0,a.getFilterItems)("details");i.forEach(t=>{let i=n.find(e=>e.queryId===t);void 0!==i&&e.details.push(i)})}if(void 0!==t.accessibility){let i=t.accessibility.split(","),n=(0,a.getFilterItems)("accessibility");i.forEach(t=>{let i=n.find(e=>e.queryId===t);void 0!==i&&e.accessibility.push(i)})}if(void 0!==t.page&&(e.page=parseInt(t.page,10)),!e.details.length&&!e.accessibility.length&&!e.type.length&&""===e.q&&void 0===e.location.name){let t=(0,a.getFilterItems)("type").find(e=>"ChurchAndChapel"===e.id);void 0!==t&&e.type.push(t)}return e}function r(e){let t={};if(""!==e.page&&1!==e.page&&(t.page=e.page),""!==e.q&&(t.search=e.q),""!==e.location&&(void 0!==e.location.name&&e.location.name.startsWith("Min position")?t.locationName=e.location.name.replace("Min position","Vald position"):t.locationName=e.location.name,t.locationLongituted=e.location.longitude,t.locationLatitude=e.location.latitude,t.locationRadius=e.location.radius),e.type.length){let i=[],n=[];e.type.forEach(e=>{"type"===e.type?i.push(e.id):"category"===e.type&&(n.push(e.id),"3ad21428-264b-48c2-8623-2ef20133be93"===e.id&&i.push("External"))}),i.length&&(t.type=i.join(",")),n.length&&(t.categories=n.join(","))}if(e.details.length){let i=[];e.details.forEach(e=>{let t=(0,a.getFilterItems)("details").find(t=>t.id===e.id);i.push(t.queryId)}),i.length&&(t.details=i.join(","))}if(e.accessibility.length){let i=[];e.accessibility.forEach(e=>{let t=(0,a.getFilterItems)("accessibility").find(t=>t.id===e.id);i.push(t.queryId)}),i.length&&(t.accessibility=i.join(","))}return"?"+n.As(t)}},52801:function(e,t,i){i.r(t);var n=i(33730),a=i(41402),o=i(30228);let r={filter:{},paginationOffset:0,paginationPerPage:12};const s=new o;async function c(e){e.limit=r.paginationPerPage,e.offset=r.paginationOffset,e.orderby="name";return(await fetch(`//api.svenskakyrkan.se/platser/v4/place?${n.As(e)}`)).json()}const l=e=>{let t={};if(r.paginationOffset=0,e.type.length){let i=[],n=[];
1e.type.forEach(e=>{"type"===e.type?i.push(e.id):"category"===e.type&&(n.push(e.id),"3ad21428-264b-48c2-8623-2ef20133be93"===e.id&&i.push("External"))}),i.length?t.is=i.join(","):t.is="ChurchAndChapel,ParishHome,Cemetery",n.length&&(t.categories_id=n.join(","))}else t.is="ChurchAndChapel,ParishHome,Cemetery";e.details.length&&e.details.forEach(e=>{t[e.id]=!0}),e.accessibility.length&&e.accessibility.forEach(e=>{t[e.id]=!0}),""!==e.q&&(t.name=`~${e.q}`),void 0!==e.location.name&&("owner"===e.location.action?t.owner_id=e.location.owner:(t.nearby=`${e.location.longitude},${e.location.latitude}`,t.nearbyRadius=e.location.radius)),r.filter=t};a.changed(e=>{l(e),r.paginationOffset=12*(e.page-1),c({apikey:"09ec36d9-df57-49f6-b9b1-51be61370e62",...r.filter}).then(t=>{t.page=e.page,s.emit("update",t)})}),a.ready(e=>{l(e),r.paginationOffset=0,r.paginationPerPage=12*e.page,c({apikey:"09ec36d9-df57-49f6-b9b1-51be61370e62",...r.filter}).then(t=>{r.paginationPerPage=12,t.page=e.page,s.emit("update",t)})}),i.d(t,["getData",0,e=>{s.on("update",t=>{e(t)})}])}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.