PageSourceSearch

https://samfunnsbedriftene-web-app.vercel.app/_next/static/chunks/233-e8de143b9309c82c.js

js samfunnsbedriftene-web-app.vercel.app collected 2026-10-03 07:39:46 UTC 19,258 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[233],{7259:function(e,t,n){n.d(t,{N:function(){return NotFoundSection},Z:function(){return NotFoundPage}});var i=n(2729),r=n(6811),a=n(917);n(7294);var c=n(5618),o=n(9213),l=n(7757),u=n(2575),s=n(1163),d=n(7041);function _templateObject(){let e=(0,i._)(["\n        width: 100vw;\n        height: 100vh;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        flex-direction: column;\n        background-color: ",";\n        text-align: center;\n        padding: 0 24px;\n        @media (min-width: ","px) {\n          padding: 0 380px;\n        }\n      "]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,i._)(["\n          margin-bottom: 16px;\n          @media (min-width: ","px) {\n            font-size: 70px;\n            line-height: 90px;\n            margin-bottom: 64px;\n          }\n        "]);return _templateObject1=function(){return e},e}function NotFoundPage(e){let{settings:t}=e;return(0,r.tZ)(d.V,{settings:t,children:(0,r.tZ)(NotFoundSection,{})})}let NotFoundSection=()=>{let e=(0,s.useRouter)();return(0,r.BX)("div",{css:(0,a.iv)(_templateObject(),o.O.brown,c.CR),children:[(0,r.tZ)(u.H,{variant:"H1",color:o.O.orange_primary,css:(0,a.iv)(_templateObject1(),c.CR),children:"Oi, denne siden fant vi ikke ..."}),(0,r.tZ)(l.z,{variant:"secondary",onClick:()=>{e.back()},children:"Tilbake"})]})}},5179:function(e,t,n){n.d(t,{Z:function(){return Article}});var i=n(2729),r=n(6811),a=n(917);n(7294);var c=n(703),o=n(3061),l=n(5618),u=n(9435),s=n(2575),d=n(4334),p=n(9322),m=n(7757),h=n(5173),g=n(3750),f=n(4951),v=n(1664),b=n.n(v);function _templateObject(){let e=(0,i._)(["\n        cursor: pointer;\n      "]);return _templateObject=function(){return e},e}function SocialShareLink(e){let{type:t,children:n,title:i,url:c}=e;return(0,r.tZ)(b(),{href:function(e,t,n){let i=n||window.location.href;switch(e){case"facebook":return"https://www.facebook.com/sharer/sharer.php?u=".concat(encodeURIComponent(i));case"twitter":return"https://twitter.com/intent/tweet?url=".concat(encodeURIComponent(i),"&text=").concat(encodeURIComponent(t));case"linkedin":return"https://www.linkedin.com/shareArticle?url=".concat(encodeURIComponent(i));case"email":return"mailto:?subject=".concat(encodeURIComponent(t),"&body=").concat(encodeURIComponent(i))}}(t,i,c),css:(0,a.iv)(_templateObject()),children:n})}var y=n(8684);function CopyLinkButton_templateObject(){let e=(0,i._)(["\n        cursor: pointer;\n      "]);return CopyLinkButton_templateObject=function(){return e},e}function CopyLinkButton(e){let{children:t,textToCopy:n}=e,linkClicked=()=>{navigator.clipboard.writeText(n)};return(0,r.tZ)("div",{onClick:()=>linkClicked(),css:(0,a.iv)(CopyLinkButton_templateObject()),children:t})}var _=n(4276),calendarFile=(e,t,n,i,r)=>new Promise((a,c)=>{if(!t||!n||""===t||""===n){c("No dates");return}let o=new Date(t),l=new Date(n),u={start:[o.getFullYear(),o.getMonth()+1,o.getDate(),o.getHours(),o.getMinutes()],end:[l.getFullYear(),l.getMonth()+1,l.getDate(),l.getHours(),l.getMinutes()],title:e,description:r,url:i},{error:s,value:d}=(0,_.yM)(u);if(s||!d){c(s);return}a(new File([d],"event.ics",{type:"text/calendar"}))}),O=n(1163);function Article_templateObject(){let e=(0,i._)(["\n        padding: 24px 0;\n        @media (min-width: ","px) {\n          padding: 96px 0;\n        }\n      "]);return Article_templateObject=function(){return e},e}function _templateObject1(){let e=(0,i._)(["\n            padding-top: 8px;\n            @media (min-width: ","px) {\n              padding-top: 40px;\n            }\n          "]);return _templateObject1=function(){return e},e}function _templateObject2(){let e=(0,i._)(["\n              padding-top: 16px;\n              @media (min-width: ","px) {\n                padding-top: 24px;\n              }\n            "]);return _templateObject2=function(){return e},e}function _templateObject3(){let e=(0,i._)(["\n            padding-top: 16px;\n            @media (min-width: ","px) {\n              padding-top: 24px;\n            }\n          "]);
1return _templateObject3=function(){return e},e}function _templateObject4(){let e=(0,i._)(["\n              width: 100%;\n              @media (min-width: ","px) {\n                width: auto;\n                margin-left: auto;\n              }\n            "]);return _templateObject4=function(){return e},e}function _templateObject5(){let e=(0,i._)(["\n                  cursor: pointer;\n                "]);return _templateObject5=function(){return e},e}function _templateObject6(){let e=(0,i._)(["\n                  cursor: pointer;\n                "]);return _templateObject6=function(){return e},e}function _templateObject7(){let e=(0,i._)(["\n                  cursor: pointer;\n                "]);return _templateObject7=function(){return e},e}function _templateObject8(){let e=(0,i._)(["\n                  cursor: pointer;\n                "]);return _templateObject8=function(){return e},e}function _templateObject9(){let e=(0,i._)(["\n                  cursor: pointer;\n                "]);return _templateObject9=function(){return e},e}function _templateObject10(){let e=(0,i._)(["\n                    cursor: pointer;\n                  "]);return _templateObject10=function(){return e},e}function _templateObject11(){let e=(0,i._)(["\n              padding-top: 30px;\n              @media (min-width: ","px) {\n                padding-top: 70px;\n              }\n            "]);return _templateObject11=function(){return e},e}function _templateObject12(){let e=(0,i._)(["\n              display: block;\n              padding-top: 12px;\n              @media (min-width: ","px) {\n                display: none;\n              }\n            "]);return _templateObject12=function(){return e},e}function _templateObject13(){let e=(0,i._)(["\n            display: flex;\n            flex-direction: column;\n            padding-top: 18px;\n            @media (min-width: ","px) {\n              padding-top: 30px;\n              flex-direction: row;\n            }\n          "]);return _templateObject13=function(){return e},e}function _templateObject14(){let e=(0,i._)(["\n              flex-basis: 100%;\n              height: max-content;\n              @media (min-width: ","px) {\n                flex-basis: 66%;\n                padding-right: 70px;\n              }\n            "]);return _templateObject14=function(){return e},e}function _templateObject15(){let e=(0,i._)(["\n                  padding-top: 40px;\n                  padding-bottom: 40px;\n                "]);return _templateObject15=function(){return e},e}function _templateObject16(){let e=(0,i._)(["\n                    padding-bottom: 16px;\n                  "]);return _templateObject16=function(){return e},e}function _templateObject17(){let e=(0,i._)(["\n                      &:not(:last-child) {\n                        margin-bottom: 12px;\n                      }\n                    "]);return _templateObject17=function(){return e},e}function _templateObject18(){let e=(0,i._)(["\n                      &:not(:last-child) {\n                        margin-bottom: 12px;\n                      }\n                    "]);return _templateObject18=function(){return e},e}function _templateObject19(){let e=(0,i._)(["\n              flex-basis: 50%;\n              @media (min-width: ","px) {\n                flex-basis: 33%;\n                padding-left: 70px;\n                padding-top: 90px;\n              }\n            "]);return _templateObject19=function(){return e},e}function _templateObject20(){let e=(0,i._)(["\n                    &:not(:first-of-type) {\n                      margin-top: 64px;\n                    }\n                    &:not(:last-of-type) {\n                      margin-bottom: 64px;\n                    }\n                  "]);return _templateObject20=function(){return e},e}let createDataSanity=e=>e.join(".");function Article(e){let{_id:t,title:n,datePublished:i,author:v,ingress:b,image:_,body:j,rightPane:w,caption:M,theme:x,tags:Z,unitTitle:D,eventStart:S,eventEnd:T,eventUrl:k,signupLink:C,metadata:R,preview:L=!1}=e,B=(0,O.useRouter)(),{isPreview:U}=B,q=(null==v?void 0:v.name)?(0,r.BX)(g.Z,{gap:4,...U&&t&&L?{"data-sanity":createDataSanity(["author"])}:{},children:[(0,r.tZ)(s.H,{variant:"Body3",children:"Skrevet av:"}),v.email?(0,r.tZ)("a",{href:"mailto:".concat(v.email),children:(0,r.tZ)(s.H,{variant:"Body3B",children:v.name})}):(0,r.tZ)(s.H,{variant:"Body3B",children:v.name})]}):"",H=i?(0,r.BX)(g.Z,{gap:4,children:[(0,r.tZ)(s.H,{variant:"Body3",children:"Publisert:"})," ",(0,r.tZ)(s.H,{variant:"Body3B",children:(0,h.p6)(i)})]}):"",downloadICS=async()=>{try{let e=await calendarFile(n,S,T,k,b),t=URL.createObjectURL(e),i=document.createElement("a");i.href=t,i.download="event.ics",document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(t)}catch(e){alert("Kunne ikke lage kalenderevent")}};
1return(0,r.BX)("div",{css:(0,a.iv)(Article_templateObject(),l.CR),children:[(0,r.BX)(d.W,{hasVerticalPadding:!1,children:[D&&(0,r.tZ)(s.H,{variant:"H3",...U&&t&&L?{"data-sanity":createDataSanity(["unitTitle"])}:{},children:D}),n&&(0,r.tZ)(s.H,{variant:"H1Hero",...U&&t&&L?{"data-sanity":createDataSanity(["title"])}:{},children:n})]}),(0,r.tZ)(d.W,{options:{fullWidth:!0},hasVerticalPadding:!1,children:(0,r.tZ)("div",{css:(0,a.iv)(_templateObject1(),l.CR),children:_&&(0,r.tZ)(u.ZP,{image:_,width:2889,height:1658,sizes:"100vw",priority:!0,alt:"",...U&&t&&L?{"data-sanity":createDataSanity(["image"])}:{}})})}),(0,r.BX)(d.W,{hasVerticalPadding:!1,children:[M&&(q||H)&&(0,r.tZ)(s.H,{variant:"Body3",css:(0,a.iv)(_templateObject2(),l.CR),children:M}),(0,r.BX)(g.Z,{justify:"space-between",align:"center",wrap:"wrap",css:(0,a.iv)(_templateObject3(),l.CR),children:[q||H?(0,r.BX)(g.Z,{gap:4,align:"center",children:[q," ",!!q&&"|"," ",H]}):M?(0,r.tZ)(s.H,{variant:"Body3",children:M}):null,(0,r.BX)(g.Z,{gap:8,css:(0,a.iv)(_templateObject4(),l.Mq),children:[(0,r.tZ)(SocialShareLink,{type:"facebook",title:n,url:null==R?void 0:R.url,children:(0,r.tZ)(f.Z,{icon:"Facebook",css:(0,a.iv)(_templateObject5())})}),(0,r.tZ)(SocialShareLink,{type:"twitter",title:n,url:null==R?void 0:R.url,children:(0,r.tZ)(f.Z,{icon:"Twitter",css:(0,a.iv)(_templateObject6())})}),(0,r.tZ)(SocialShareLink,{type:"linkedin",title:n,url:null==R?void 0:R.url,children:(0,r.tZ)(f.Z,{icon:"LinkedIn",css:(0,a.iv)(_templateObject7())})}),(0,r.tZ)(SocialShareLink,{type:"email",title:n,url:null==R?void 0:R.url,children:(0,r.tZ)(f.Z,{icon:"Email",css:(0,a.iv)(_templateObject8())})}),(0,r.tZ)(CopyLinkButton,{textToCopy:(null==R?void 0:R.url)||window.location.href,children:(0,r.tZ)(f.Z,{icon:"Link",css:(0,a.iv)(_templateObject9())})}),S&&T&&k&&(0,r.tZ)("div",{onClick:downloadICS,children:(0,r.tZ)(f.Z,{icon:"Calendar",css:(0,a.iv)(_templateObject10())})})]})]})]}),(0,r.BX)(d.W,{hasVerticalPadding:!1,children:[b&&(0,r.tZ)(s.H,{variant:"H3",css:(0,a.iv)(_templateObject11(),l.CR),...U&&t&&L?{"data-sanity":createDataSanity(["ingress"])}:{},children:b}),C&&(0,r.tZ)("div",{css:(0,a.iv)(_templateObject12(),l.CR),children:(0,r.tZ)(m.z,{href:C,children:"Meld meg p\xe5"})}),(0,r.BX)("div",{css:(0,a.iv)(_templateObject13(),l.CR),children:[(0,r.BX)("div",{css:(0,a.iv)(_templateObject14(),l.CR),children:[j&&(0,r.tZ)("div",{...U&&t&&L?{"data-sanity":createDataSanity(["body"])}:{},children:(0,r.tZ)(o.w,{value:j})}),(x||Z)&&(0,r.BX)("div",{css:(0,a.iv)(_templateObject15()),children:[(0,r.tZ)(s.H,{variant:"H4",css:(0,a.iv)(_templateObject16()),children:"Les mer om"}),x&&(0,r.tZ)("div",{css:(0,a.iv)(_templateObject17()),children:(0,r.tZ)(m.z,{href:(0,p.XF)({type:"theme",theme:x}),children:y.np[x]})}),null==Z?void 0:Z.map((e,n)=>(0,r.tZ)("div",{css:(0,a.iv)(_templateObject18()),...U&&t&&L?{"data-sanity":createDataSanity(["tags",n])}:{},children:(0,r.tZ)(m.z,{href:(0,p.XF)({type:"tag",tag:e}),children:"#"+(null==e?void 0:e.name)})},n))]})]}),(0,r.tZ)("div",{css:(0,a.iv)(_templateObject19(),l.CR),children:w&&w.map((e,n)=>(0,r.tZ)("div",{css:(0,a.iv)(_templateObject20()),...U&&t&&L?{"data-sanity":createDataSanity(["rightPane",n])}:{},children:(0,c.I)(e,n,void 0,"rightPane",U&&L)},n))})]})]})]})}},9925:function(e,t,n){n.d(t,{y:function(){return useLiveQuery}});var i=n(7294),r=n(1163),a=n(9096);let c=new class{initialize(){this.initialized||(console.log("[MutationManager] \uD83D\uDE80 Initializing centralized mutation manager"),window.addEventListener("message",this.handleMessage.bind(this)),this.initialized=!0,this.exposeDebugInfo(),setInterval(()=>{this.performanceMetrics.queryUpdatesTriggered>0&&console.log("[MutationManager] \uD83D\uDCCA Performance metrics (10s window)",{mutationsReceived:this.performanceMetrics.mutationReceived,queryUpdatesTriggered:this.performanceMetrics.queryUpdatesTriggered,averageUpdateTime:Math.round(this.performanceMetrics.averageUpdateTime),totalSubscriptions:this.subscriptions.size,efficiency:Math.round(this.performanceMetrics.mutationReceived/Math.max(this.performanceMetrics.queryUpdatesTriggered,1)*100)/100})},1e4))}handleMessage(e){var t,n;let i=e.data,r=(null==i?void 0:i.type)==="mutation"||(null==i?void 0:i.type)==="visual-editing/refresh"||(null==i?void 0:i.type)==="visual-editing/mutation"||(null==i?void 0:i.type)==="sanity/presentation/navigate";if(!r)return;let a={type:i.type,document:i.document,timestamp:i.timestamp||new Date().toISOString()};console.log("[MutationManager] \uD83D\uDCE5 Mutation received",{type:a.type,documentType:null===(t=a.document)||void 0===t?void 0:t._type,documentId:null===(n=a.document)||void 0===n?void 0:n._id,subscriptions:this.subscriptions.size}),this.performanceMetrics.mutationReceived++,this.queueMutation(a)}queueMutation(e){this.pendingMutations.push(e),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.processPendingMutations()},16)}processPendingMutations(){if(0===this.pendingMutations.length)return;let e=performance.now(),t=[...this.pendingMutations];this.pendingMutations=[],console.log("[MutationManager] ⚡ Processing batched mutations",{count:t.length,types:[...new Set(t.map(e=>{var t;return null===(t=e.document)||void 0===t?void 0:t._type}
1))].filter(Boolean)});let n=new Map;t.forEach(e=>{var t;if(null===(t=e.document)||void 0===t?void 0:t._type){let t=e.document._type;n.has(t)||n.set(t,[]),n.get(t).push(e)}});let i=0;this.subscriptions.forEach(e=>{let r=e.documentTypes.some(e=>n.has(e));if(r){let n=t.filter(t=>{var n;return e.documentTypes.includes((null===(n=t.document)||void 0===n?void 0:n._type)||"")});console.log("[MutationManager] \uD83C\uDFAF Triggering query update",{subscriptionId:e.id,relevantMutations:n.length,documentTypes:[...new Set(n.map(e=>{var t;return null===(t=e.document)||void 0===t?void 0:t._type}))].filter(Boolean)});let r=n[n.length-1];e.callback(r),i++}});let r=performance.now(),a=r-e;this.performanceMetrics.queryUpdatesTriggered+=i,this.performanceMetrics.totalUpdateTime+=a,this.performanceMetrics.averageUpdateTime=this.performanceMetrics.totalUpdateTime/this.performanceMetrics.queryUpdatesTriggered,console.log("[MutationManager] ✅ Batch processing complete",{mutations:t.length,updatesTriggered:i,processingTime:Math.round(a),totalSubscriptions:this.subscriptions.size})}subscribe(e,t,n,i){return this.subscriptions.set(e,{id:e,query:t,documentTypes:n,callback:i}),this.initialize(),()=>{console.log("[MutationManager] \uD83D\uDDD1️ Removing subscription",{id:e}),this.subscriptions.delete(e)}}getMetrics(){return{...this.performanceMetrics,activeSubscriptions:this.subscriptions.size,efficiency:this.performanceMetrics.queryUpdatesTriggered>0?Math.round(this.performanceMetrics.mutationReceived/this.performanceMetrics.queryUpdatesTriggered*100)/100:0,subscriptionDetails:Array.from(this.subscriptions.values()).map(e=>({id:e.id,documentTypes:e.documentTypes,query:e.query.substring(0,50)+"..."}))}}exposeDebugInfo(){window.mutationManagerDebug={getMetrics:()=>this.getMetrics(),getSubscriptions:()=>Array.from(this.subscriptions.entries()),resetMetrics:()=>{this.performanceMetrics={mutationReceived:0,queryUpdatesTriggered:0,averageUpdateTime:0,totalUpdateTime:0}}}}constructor(){this.subscriptions=new Map,this.initialized=!1,this.debounceTimer=null,this.pendingMutations=[],this.performanceMetrics={mutationReceived:0,queryUpdatesTriggered:0,averageUpdateTime:0,totalUpdateTime:0}}};function useLiveQuery(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{initialData:o,enabled:l=!0,documentTypes:u=[]}=n,[s,d]=(0,i.useState)(o),[p,m]=(0,i.useState)(!o),[h,g]=(0,i.useState)(null),f=(0,i.useRef)(o),v=(0,r.useRouter)(),{isPreview:b}=v,y=(0,i.useRef)(t),_=(0,i.useRef)(e),O=window.parent!==window||new URLSearchParams(window.location.search).has("preview"),j=l&&(b||O);(0,i.useEffect)(()=>{if(!l)return;let n=JSON.stringify(t)!==JSON.stringify(y.current),i=e!==_.current;if(!n&&!i&&f.current)return;y.current=t,_.current=e,f.current||console.log("[LiveQuery] Initial fetch",{query:e.substring(0,50)+"...",shouldUseLiveQuery:j}),m(!0),g(null);let r=(0,a.s3)(j);if(!r){console.error("[LiveQuery] No client available"),g(Error("No Sanity client available")),m(!1);return}r.fetch(e,t).then(e=>{e&&(f.current=e),d(e),m(!1)}).catch(e=>{console.error("[LiveQuery] Fetch error",e),g(e),m(!1)})},[e,t,j,b,O,l]);let w=(0,i.useRef)(s),M=(0,i.useRef)(e),x=(0,i.useRef)(t);(0,i.useEffect)(()=>{w.current=s,M.current=e,x.current=t},[s,e,t]);let Z=(0,i.useRef)();return(0,i.useEffect)(()=>{Z.current=e=>{let t=performance.now(),n=(0,a.s3)(!0);if(!n){console.error("[LiveQuery] No client available for live update"),g(Error("No Sanity client available for live update"));return}n.fetch(M.current,x.current).then(n=>{var i;let r=performance.now(),a=r-t,c=w.current;console.log("[LiveQuery] \uD83D\uDD04 Mutation received via manager",{eventType:e.type,documentType:null===(i=e.document)||void 0===i?void 0:i._type,query:M.current.substring(0,50)+"...",currentData:c?"present":"empty",resultData:n?"present":"empty"});let o=JSON.stringify(n)!==JSON.stringify(c);(o||a>100)&&console.log("[LiveQuery] ✅ Live update",{changed:o,updateTime:Math.round(a)}),n&&(f.current=n),o&&d(n),window.postMessage({type:"live-query/updated",query:M.current.substring(0,50)+"...",updateTime:Math.round(a),timestamp:new Date().toISOString()},window.location.origin)}).catch(e=>{console.error("[LiveQuery] ❌ Live update error",e),g(e)})}},[e,t]),(0,i.useEffect)(()=>
1{if(!j)return;let t="query-".concat(Date.now(),"-").concat(Math.random()),n=u.length>0?u:["*"];console.log("[LiveQuery] \uD83D\uDCDD Subscribing to mutation manager (STABLE)",{subscriptionId:t,documentTypes:n,query:e.substring(0,50)+"..."});let i=c.subscribe(t,e,n,e=>{Z.current&&Z.current(e)});return()=>{console.log("[LiveQuery] \uD83D\uDDD1️ Unsubscribing from mutation manager",{subscriptionId:t}),i()}},[j,e,u]),{data:s,stableData:f.current,isLoading:p,error:h,isLive:j,refetch:()=>{let n=(0,a.s3)(j);return n?n.fetch(e,t).then(e=>(e&&(f.current=e),d(e),e)):Promise.reject(Error("No Sanity client available"))}}}}}]);

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.