1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,156548,e=>{"use strict";let t=new Set,r="checking";function n(e){if(r!==e)for(let n of(r=e,t))n()}let i=new Set,s="checking";function a(e){for(let t of(s=e,i))t()}let o=new Set,l=null,c=null,d=null;function u(e){for(let t of(l=e,o))t()}function f(e,t){for(let r of(c=e,d=t,o))r()}e.s(["comlink",()=>l,"comlinkDataset",()=>d,"comlinkListeners",()=>o,"comlinkProjectId",()=>c,"environment",()=>s,"environmentListeners",()=>i,"perspective",()=>r,"perspectiveListeners",()=>t,"setComlink",()=>u,"setComlinkClientConfig",()=>f,"setEnvironment",()=>a,"setPerspective",()=>n])},782219,(e,t,r)=>{t.exports=e.r(351078)},919167,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={callServer:function(){return s.callServer},createServerReference:function(){return o.createServerReference},findSourceMapURL:function(){return a.findSourceMapURL}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=e.r(418731),a=e.r(189794),o=e.r(453290)},667437,e=>{"use strict";var t=e.i(572957);let r={"handshake/syn":t.MSG_HANDSHAKE_SYN,"handshake/syn-ack":t.MSG_HANDSHAKE_SYN_ACK,"handshake/ack":t.MSG_HANDSHAKE_ACK,"channel/response":t.MSG_RESPONSE,"channel/heartbeat":t.MSG_HEARTBEAT,"channel/disconnect":t.MSG_DISCONNECT,"overlay/focus":"visual-editing/focus","overlay/navigate":"visual-editing/navigate","overlay/toggle":"visual-editing/toggle","presentation/toggleOverlay":"presentation/toggle-overlay"},n={[t.MSG_HANDSHAKE_SYN]:"handshake/syn",[t.MSG_HANDSHAKE_SYN_ACK]:"handshake/syn-ack",[t.MSG_HANDSHAKE_ACK]:"handshake/ack",[t.MSG_RESPONSE]:"channel/response",[t.MSG_HEARTBEAT]:"channel/heartbeat",[t.MSG_DISCONNECT]:"channel/disconnect","visual-editing/focus":"overlay/focus","visual-editing/navigate":"overlay/navigate","visual-editing/toggle":"overlay/toggle","presentation/toggle-overlay":"presentation/toggleOverlay"},i=e=>{let{data:n}=e;return n&&"object"==typeof n&&"domain"in n&&"type"in n&&"from"in n&&"to"in n&&("sanity/channels"===n.domain&&(n.domain=t.DOMAIN),"overlays"===n.to&&(n.to="visual-editing"),"overlays"===n.from&&(n.from="visual-editing"),n.channelId=n.connectionId,delete n.connectionId,n.type=r[n.type]??n.type),e},s=({context:e},r)=>{let{sources:i,targetOrigin:s}=e,a=(e=>{let{channelId:r,...i}=e,s={...i,connectionId:r};return s.domain===t.DOMAIN&&(s.domain="sanity/channels"),"visual-editing"===s.to&&(s.to="overlays"),"visual-editing"===s.from&&(s.from="overlays"),s.type=n[s.type]??s.type,"channel/response"===s.type&&s.responseTo&&!s.data&&(s.data={responseTo:s.responseTo}),("handshake/syn"===s.type||"handshake/syn-ack"===s.type||"handshake/ack"===s.type)&&(s.data={id:s.connectionId}),s})(r.message);i.forEach(e=>{e.postMessage(a,{targetOrigin:s})})},a=()=>({listen:(0,t.createListenLogic)(i),requestMachine:(0,t.createRequestMachine)().provide({actions:{"send message":s}})});function o(){return window.self!==window.top}function l(){return!!window.opener}function c(){return o()||l()}e.s(["createCompatibilityActors",()=>a,"isMaybePresentation",()=>c,"isMaybePreviewIframe",()=>o,"isMaybePreviewWindow",()=>l])},966693,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return i}});let n=e.r(412954);function i({reason:e,children:t}){if("undefined"==typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},846291,(e,t,r)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return n}})},702798,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return o}});let n=e.r(842276),i=e.r(495525),s=e.r(206402),a=e.r(846291);function o({moduleIds:e}){if("undefined"!=typeof window)return null;let t=s.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;
1r.push(...e)}}return 0===r.length?null:(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,a.encodeURIPath)(e)}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,i.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},566183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return c}});let n=e.r(842276),i=e.r(338678),s=e.r(966693),a=e.r(702798);function o(e){return{default:e&&"default"in e?e.default:e}}let l={loader:()=>Promise.resolve(o(()=>null)),loading:null,ssr:!0},c=function(e){let t={...l,...e},r=(0,i.lazy)(()=>t.loader().then(o)),c=t.loading;function d(e){let o=c?(0,n.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,d=l?i.Suspense:i.Fragment,u=t.ssr?(0,n.jsxs)(n.Fragment,{children:["undefined"==typeof window?(0,n.jsx)(a.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(s.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(d,{...l?{fallback:o}:{},children:u})}return d.displayName="LoadableComponent",d}},787154,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return i}});let n=e.r(481258)._(e.r(566183));function i(e,t){let r={};"function"==typeof e&&(r.loader=e);let i={...r,...t};return(0,n.default)({...i,modules:i.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},10810,e=>{"use strict";e.i(48260);var t=e.i(842276),r=e.i(958515),n=e.i(919167),i=(0,n.createServerReference)("7f4d6ae675f0fabccd347878989716c0f1a98b3ad3",n.callServer,void 0,n.findSourceMapURL,"revalidateSyncTags"),s=e.i(667437),a=e.i(787154),o=e.i(782219),l=e.i(338678),c=e.i(925265),d=e.i(156548);let u=(0,a.default)(()=>e.A(605156),{ssr:!1}),f=(0,a.default)(()=>e.A(554230),{ssr:!1}),m=(0,a.default)(()=>e.A(952779),{ssr:!1}),p=(0,a.default)(()=>e.A(831551),{ssr:!1});function h(e){e instanceof r.CorsOriginError?console.warn(`Sanity Live is unable to connect to the Sanity API as the current origin - ${window.origin} - is not in the list of allowed CORS origins for this Sanity Project.`,e.addOriginUrl&&"Add it here:",e.addOriginUrl?.toString()):console.error(e)}function g(e,t){t?console.warn("Sanity Live connection closed, switching to long polling set to a interval of",t/1e3,"seconds and the server gave this reason:",e.reason):console.error("Sanity Live connection closed, automatic revalidation is disabled, the server gave this reason:",e.reason)}function y(e){let{projectId:n,dataset:a,apiHost:y,apiVersion:v,useProjectHostname:x,token:b,requestTagPrefix:j,draftModeEnabled:S,draftModePerspective:w,refreshOnMount:N=!1,refreshOnFocus:k=!S&&(typeof window>"u"||window.self===window.top),refreshOnReconnect:_=!0,intervalOnGoAway:E=3e4,requestTag:Z="next-loader.live",onError:P=h,onGoAway:A=g,revalidateSyncTags:M=i}=e,T=(0,l.useMemo)(()=>(0,r.createClient)({projectId:n,dataset:a,apiHost:y,apiVersion:v,useProjectHostname:x,ignoreBrowserTokenWarning:!0,token:b,useCdn:!1,requestTagPrefix:j}),[y,v,a,n,j,b,x]),[$,I]=(0,l.useState)(!1),O=(0,o.useRouter)(),C=(0,c.useEffectEvent)(e=>{"message"===e.type?M(e.tags):"restart"===e.type||"reconnect"===e.type?O.refresh():"goaway"===e.type&&(A(e,E),I(E))});(0,l.useEffect)(()=>{let e=T.live.events({includeDrafts:!!b,tag:Z}).subscribe({next:C,error:e=>{P(e)}});return()=>e.unsubscribe()},[T.live,P,Z,b]),(0,l.useEffect)(()=>{S&&w?(0,d.setPerspective)(w):(0,d.setPerspective)("unknown")},[S,w]);let[R,L]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(!(0,s.isMaybePresentation)()){if(S&&b)return void(0,d.setEnvironment)("live");if(S)return void(0,d.setEnvironment)("static");(0,d.setEnvironment)("unknown")}},[S,b]),(0,l.useEffect)(()=>{if(!(0,s.isMaybePresentation)())return;let e=new AbortController,t=setTimeout(()=>(0,d.setEnvironment)("live"),3e3);return window.addEventListener("message",({data:r})=>{r&&"object"==typeof r&&"domain"in r&&"sanity/channels"===r.domain&&"from"in r&&"presentation"===r.from&&(clearTimeout(t),(0,d.setEnvironment)((0,s.isMaybePreviewWindow)()?"presentation-window":"presentation-iframe"),L(!0),e.abort())},{signal:e.signal}),()=>{clearTimeout(t),e.abort()}},[]);let D=(0,l.useRef)(void 0);return(0,l.useEffect)(()=>
1{if(S)return clearTimeout(D.current),()=>{D.current=setTimeout(()=>{console.warn("Sanity Live: Draft mode was enabled, but is now being disabled")})}},[S]),(0,l.useEffect)(()=>{if(!$)return;let e=setInterval(()=>O.refresh(),$);return()=>clearInterval(e)},[$,O]),(0,t.jsxs)(t.Fragment,{children:[S&&R&&(0,t.jsx)(u,{projectId:n,dataset:a,draftModeEnabled:S,draftModePerspective:w}),!S&&N&&(0,t.jsx)(f,{}),!S&&k&&(0,t.jsx)(m,{}),!S&&_&&(0,t.jsx)(p,{})]})}y.displayName="SanityLive",e.s(["default",()=>y],10810)},103583,e=>{"use strict";var t=e.i(842276);let r=(0,e.i(787154).default)(()=>e.A(869194),{ssr:!1});function n(e){return(0,t.jsx)(r,{...e})}e.s(["default",()=>n])},679741,e=>{"use strict";let t=(0,e.i(163179).default)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",()=>t])},341596,e=>{"use strict";var t=e.i(676893);e.s(["useSearchModal",0,()=>{let[e,r]=(0,t.useQueryState)("search",t.parseAsBoolean.withDefault(!1).withOptions({clearOnDefault:!0}));return{open:()=>{r(!0)},close:()=>{r(!1)},isOpen:e,setIsOpen:r}}])},799644,e=>{"use strict";var t=e.i(842276),r=e.i(782219),n=e.i(580103),n=n,i=e.i(341596);e.i(404121);var s=e.i(167881);function a(){let{open:e}=(0,i.useSearchModal)();return(0,r.useRouter)(),(0,t.jsxs)(s.Button,{size:"icon",variant:"ghost",className:"py-2",onClick:e,children:[(0,t.jsx)(n.default,{className:"size-7"}),(0,t.jsx)("span",{className:"sr-only",children:"Søk"})]})}e.s(["SearchButton",()=>a],799644)},76714,e=>{"use strict";var t=e.i(842276),r=e.i(894978),n=e.i(782219);e.s(["Breadcrumbs",0,()=>{let e=(0,n.usePathname)().split("/");return(0,t.jsxs)("ul",{className:"flex gap-2",children:[(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{href:"/",children:"Hjem"})}),e.map((e,r)=>(0,t.jsx)("li",{children:e},e))]})}])},137228,e=>{"use strict";var t=e.i(842276);let r=(0,e.i(163179).default)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var n=e.i(338678);e.s(["default",0,()=>{let[e,i]=(0,n.useState)(!1),s=()=>{window.scrollY>800?i(!0):i(!1)};return(0,n.useEffect)(()=>(window.addEventListener("scroll",s),()=>window.removeEventListener("scroll",s)),[]),e&&(0,t.jsxs)("button",{onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},className:"fixed flex items-center gap-2 bottom-10 right-6 p-4 text-white bg-black text-sm z-10 ","aria-label":"Scroll to top",children:[(0,t.jsx)(r,{className:"size-4 fill-white"}),(0,t.jsx)("span",{children:"Tilbake til toppen"})]})}],137228)},63151,e=>{"use strict";let t=e.i(48260).default.env.NEXT_PUBLIC_SANITY_API_VERSION||"2024-10-02",r=i("production","Missing environment variable: NEXT_PUBLIC_SANITY_DATASET"),n=i("6rtzah9z","Missing environment variable: NEXT_PUBLIC_SANITY_PROJECT_ID");function i(e,t){if(void 0===e)throw Error(t);return e}e.s(["apiVersion",0,t,"dataset",0,r,"projectId",0,n])},635341,e=>{"use strict";let t=(0,e.i(163179).default)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],635341)},368185,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return d},getImageProps:function(){return c}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=e.r(481258),a=e.r(122471),o=e.r(145659),l=s._(e.r(336858));function c(e){let{props:t}=(0,a.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let d=o.Image},745229,(e,t,r)=>{t.exports=e.r(368185)},201935,e=>{"use strict";var t=e.i(477846),r=e.i(63151);let n=(0,t.default)({projectId:r.projectId,dataset:r.dataset});e.s(["hasImageAsset",0,e=>{let t=e?.asset;return!!(t?._ref||t?._id)},"urlFor",0,e=>n.image(e)])},291044,189259,e=>{"use strict";var t=e.i(842276),r=e.i(894978),n=e.i(635341);e.i(404121);var i=e.i(671428),s=e.i(745229),a=e.i(767813),o=e.i(201935),l=e.i(22659),c=e.i(647163);let d="w-full",u="uppercase tracking-wider md:text-center",f="flex flex-col flex-wrap pl-12 mb-4",m=({children:e})=>
1(0,t.jsx)("h2",{className:(0,c.cn)(d,u,"mb-4 mt-12 text-2xl"),children:e}),p=({children:e})=>(0,t.jsx)("h3",{className:(0,c.cn)(d,u,"mt-8 text-lg"),children:e}),h=({children:e})=>(0,t.jsx)("h4",{className:(0,c.cn)(d,u,"text-md mt-4"),children:e}),g=({children:e})=>(0,t.jsx)("p",{className:(0,c.cn)(d,"my-4 empty:py-4 print:break-inside-avoid"),children:e}),y=({children:e})=>(0,t.jsx)("pre",{className:(0,c.cn)(d,"my-1 empty:py-4 text-[16px] px-10 font-serif text-inherit whitespace-break-spaces"),children:e}),v=({children:e})=>(0,t.jsx)("blockquote",{className:(0,c.cn)(d,"my-8 md:my-12"),children:e}),x=()=>(0,t.jsx)("p",{"aria-hidden":"true",className:"text-2xl text-center",children:"*"}),b=({children:e})=>(0,t.jsx)("ul",{className:(0,c.cn)(d,f,"list-disc"),children:e}),j=({children:e})=>(0,t.jsx)("ol",{className:(0,c.cn)(d,f,"list-decimal"),children:e});function S({blocks:e,className:r,footnotes:n}){return(0,t.jsx)("div",{id:"article-content","data-testid":"BlockContent text-xl",className:r,children:(0,t.jsx)(a.PortableText,{value:e??[],components:{block:{h2:m,h3:p,h4:h,normal:g,blockquote:v,small:y,lineBreak:x},list:{bullet:b,number:j},marks:{center:({children:e})=>(0,t.jsx)("span",{className:"block text-center",children:e}),right:({children:e})=>(0,t.jsx)("span",{className:"block text-right",children:e}),"indent-1":({children:e})=>(0,t.jsx)("span",{className:"block",style:{marginLeft:"2rem"},children:e}),"indent-2":({children:e})=>(0,t.jsx)("span",{className:"block",style:{marginLeft:"4rem"},children:e}),"indent-3":({children:e})=>(0,t.jsx)("span",{className:"block",style:{marginLeft:"6rem"},children:e}),footnote:({value:e,children:r})=>{if(!n)return r;let i=n?.findIndex(t=>t?._key===e._key)+1;return(0,t.jsxs)(t.Fragment,{children:[r,(0,t.jsx)(l.ActionTooltip,{label:`${i}.`,labelFontSize:"base",enableAsterisk:!0,side:"right",align:"center",contentClassName:"w-full md:w-[300px] shadow-md ",content:(0,t.jsx)("div",{className:"max-h-56 min-h-20 w-56 overflow-hidden overflow-y-scroll md:max-w-[280px]",children:(0,t.jsx)(S,{blocks:e.text,className:"[&>p]:mt-2"})}),children:(0,t.jsx)("sup",{id:`fotnote-${i}`,tabIndex:i,className:"mr-0.5 cursor-pointer text-xs font-semibold hover:underline",children:i})})]})},link:({value:e,children:r})=>{let n=e.isInternal,i=n?(({type:e,category:t,slug:r})=>{if(r){if("post"===e&&t)return`/${t}/${r}`;if("newsletter"===e)return`/nyhetsbrev/${r}`;if("magazine"===e)return`/papirutgave/${r}`;if("author"===e)return`/bidragsytere/${r}`;if("category"===e)return`/${r}`}})({type:e.type,category:e.category,slug:e.slug}):e.href;return(0,t.jsx)("a",{className:"underline",href:i,rel:n?"":"external noopener",target:n?"":"_blank",children:r})}},types:{image:({value:e})=>
1{if(!(0,o.hasImageAsset)(e))return null;let r=(0,o.urlFor)(e).width(1200).quality(100).url(),n=e?.asset?.metadata?.lqip||void 0;return(0,t.jsxs)("figure",{className:"relative my-8 grid size-full w-full gap-2",children:[(0,t.jsx)(s.default,{src:r,alt:e.alt||"Image",className:"size-full object-contain",placeholder:n?"blur":void 0,blurDataURL:n,width:900,height:700}),e.alt&&(0,t.jsx)("figcaption",{className:"mt-0 px-6 text-center text-sm md:px-0",children:e.alt})]})}}}})})}function w({author:{name:e,slug:i,bio:s,posts:a=[],totalPosts:o}}){let l=o-3;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"grid grid-cols-subgrid md:hidden px-4 col-span-2",children:[(0,t.jsxs)(r.default,{href:`/bidragsytere/${i}`,"aria-label":"Les mer om bidragsyteren",className:"flex gap-2 items-center",children:[(0,t.jsx)(n.ChevronRight,{className:"size-4 fill-black"}),(0,t.jsx)("h2",{children:e})]}),o&&(0,t.jsx)("div",{className:"col-start-2",children:`${o} bidrag`})]}),(0,t.jsxs)("div",{"data-testid":"AuthorListItem",className:"hidden md:grid grid-cols-subgrid col-span-3 md:col-span-4 p-4 items-start lg:px-32 mx-auto",children:[(0,t.jsx)("div",{className:"flex items-center gap-2 col-start-1",children:(0,t.jsx)("h2",{children:e})}),(0,t.jsx)("div",{className:"col-start-2 [&_p]:my-0",children:s&&(0,t.jsx)(S,{blocks:s})}),(0,t.jsxs)("div",{className:"col-start-3",children:[(0,t.jsx)("ul",{className:"list-none flex-col gap-2",children:a&&a?.map((e,n)=>e.categories&&e.categories.length>0&&(0,t.jsx)("li",{className:o>1?o>3?"after:content-[',']":"after:content-[','] last:after:content-none":"",children:(0,t.jsx)(r.default,{href:`/${e.categories[0].slug}/${e?.slug}`,className:"underline",children:e.title})},`ali-${e?.slug}`))}),l>0&&(0,t.jsxs)("div",{className:"col-start-2",children:["og ",`${l} ${1===l?"annet":"andre"} bidrag`]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2 col-start-4 px-2 justify-end",children:(0,t.jsxs)(r.default,{href:`/bidragsytere/${i}`,"aria-label":"Les mer om bidragsyteren",className:"flex gap-2 items-center",children:[(0,t.jsx)("span",{children:"Se mer"}),(0,t.jsx)(n.ChevronRight,{className:"size-4 fill-black"})]})})]})]})}function N(e){return 0===e.length?"":1===e.length?e[0]:2===e.length?e.join(" og "):e.slice(0,-1).join(", ")+", og "+e[e.length-1]}w.Skeleton=function(){return(0,t.jsx)("div",{className:"flex h-20 w-full items-center border-t border-black",children:(0,t.jsx)("div",{className:"max-w-7xl px-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.ChevronRight,{className:"size-4 fill-black"}),(0,t.jsx)(i.Skeleton,{className:"h-4 w-36"})]})})})},e.s(["formatNameList",()=>N],189259),e.s([],291044)},498938,e=>{"use strict";var t=e.i(676893);function r(){let[e,r]=(0,t.useQueryState)("q",t.parseAsString.withDefault("").withOptions({history:"replace",clearOnDefault:!0,throttleMs:500}));return{searchQuery:e,setSearchQuery:r}}e.s(["useSearchQuery",()=>r])},875406,832356,757889,e=>{"use strict";var t=e.i(580103);e.s(["Search",()=>t.default],875406),e.s([],180703),e.i(180703);var r=e.i(725827),n=e.i(906464);e.s(["defaultErrorMap",()=>n.default,"getErrorMap",()=>r.getErrorMap,"setErrorMap",()=>r.setErrorMap],279407),e.i(279407);var i=e.i(696555);e.s([],924326),e.i(924326);var s=e.i(458728),a=e.i(480),o=e.i(559413);e.s(["BRAND",()=>a.BRAND,"DIRTY",()=>i.DIRTY,"EMPTY_PATH",()=>i.EMPTY_PATH,"INVALID",()=>i.INVALID,"NEVER",()=>a.NEVER,"OK",()=>i.OK,"ParseStatus",()=>i.ParseStatus,"Schema",()=>a.Schema,"ZodAny",()=>a.ZodAny,"ZodArray",()=>a.ZodArray,"ZodBigInt",()=>a.ZodBigInt,"ZodBoolean",()=>a.ZodBoolean,"ZodBranded",()=>a.ZodBranded,"ZodCatch",()=>a.ZodCatch,"ZodDate",()=>a.ZodDate,"ZodDefault",()=>a.ZodDefault,"ZodDiscriminatedUnion",()=>a.ZodDiscriminatedUnion,"ZodEffects",()=>a.ZodEffects,"ZodEnum",()=>a.ZodEnum,"ZodError",()=>o.ZodError,"ZodFirstPartyTypeKind",()=>a.ZodFirstPartyTypeKind,"ZodFunction",()=>a.ZodFunction,"ZodIntersection",()=>a.ZodIntersection,"ZodIssueCode",()=>o.ZodIssueCode,"ZodLazy",()=>a.ZodLazy,"ZodLiteral",()=>a.ZodLiteral,"ZodMap",()=>a.ZodMap,"ZodNaN",()=>a.ZodNaN,"ZodNativeEnum",()=>
1a.ZodNativeEnum,"ZodNever",()=>a.ZodNever,"ZodNull",()=>a.ZodNull,"ZodNullable",()=>a.ZodNullable,"ZodNumber",()=>a.ZodNumber,"ZodObject",()=>a.ZodObject,"ZodOptional",()=>a.ZodOptional,"ZodParsedType",()=>s.ZodParsedType,"ZodPipeline",()=>a.ZodPipeline,"ZodPromise",()=>a.ZodPromise,"ZodReadonly",()=>a.ZodReadonly,"ZodRecord",()=>a.ZodRecord,"ZodSchema",()=>a.ZodSchema,"ZodSet",()=>a.ZodSet,"ZodString",()=>a.ZodString,"ZodSymbol",()=>a.ZodSymbol,"ZodTransformer",()=>a.ZodTransformer,"ZodTuple",()=>a.ZodTuple,"ZodType",()=>a.ZodType,"ZodUndefined",()=>a.ZodUndefined,"ZodUnion",()=>a.ZodUnion,"ZodUnknown",()=>a.ZodUnknown,"ZodVoid",()=>a.ZodVoid,"addIssueToContext",()=>i.addIssueToContext,"any",()=>a.any,"array",()=>a.array,"bigint",()=>a.bigint,"boolean",()=>a.boolean,"coerce",()=>a.coerce,"custom",()=>a.custom,"date",()=>a.date,"datetimeRegex",()=>a.datetimeRegex,"defaultErrorMap",()=>n.default,"discriminatedUnion",()=>a.discriminatedUnion,"effect",()=>a.effect,"enum",()=>a.enum,"function",()=>a.function,"getErrorMap",()=>r.getErrorMap,"getParsedType",()=>s.getParsedType,"instanceof",()=>a.instanceof,"intersection",()=>a.intersection,"isAborted",()=>i.isAborted,"isAsync",()=>i.isAsync,"isDirty",()=>i.isDirty,"isValid",()=>i.isValid,"late",()=>a.late,"lazy",()=>a.lazy,"literal",()=>a.literal,"makeIssue",()=>i.makeIssue,"map",()=>a.map,"nan",()=>a.nan,"nativeEnum",()=>a.nativeEnum,"never",()=>a.never,"null",()=>a.null,"nullable",()=>a.nullable,"number",()=>a.number,"object",()=>a.object,"objectUtil",()=>s.objectUtil,"oboolean",()=>a.oboolean,"onumber",()=>a.onumber,"optional",()=>a.optional,"ostring",()=>a.ostring,"pipeline",()=>a.pipeline,"preprocess",()=>a.preprocess,"promise",()=>a.promise,"quotelessJson",()=>o.quotelessJson,"record",()=>a.record,"set",()=>a.set,"setErrorMap",()=>r.setErrorMap,"strictObject",()=>
1a.strictObject,"string",()=>a.string,"symbol",()=>a.symbol,"transformer",()=>a.transformer,"tuple",()=>a.tuple,"undefined",()=>a.undefined,"union",()=>a.union,"unknown",()=>a.unknown,"util",()=>s.util,"void",()=>a.void],966951);var l=e.i(966951);e.s(["z",0,l],832356);var c=e.i(919167),d=(0,c.createServerReference)("40704cf1a35306decba0649d79fbe883f24fce0486",c.callServer,void 0,c.findSourceMapURL,"searchPosts");e.s(["searchPosts",()=>d],757889)},879831,e=>{"use strict";var t=e.i(842276),r=e.i(338678),n=e.i(782673),i=e.i(875406),s=e.i(868345),a=e.i(832356),o=e.i(757889),l=e.i(647163),c=e.i(498938),d=e.i(874946);e.i(404121);var u=e.i(23750),f=e.i(679741),f=f,m=e.i(894978),p=e.i(230902);e.i(291044);var h=e.i(189259),g=e.i(671428);function y({post:{title:e,publishedAt:r,categories:n,authors:i,slug:s}}){return(0,t.jsx)(m.default,{href:`/${n.slug.current}/${s.current}`,children:(0,t.jsxs)("div",{className:"mx-auto grid max-w-6xl grid-cols-1 gap-0 p-2 py-4 md:grid-cols-[100px_1fr_1fr_100px] md:gap-5",children:[(0,t.jsx)("span",{className:"text-[20px] md:text-base",children:r?(0,p.format)(new Date(r),"dd.MM.yyyy"):"Mangler dato"}),(0,t.jsx)("span",{children:i&&(0,h.formatNameList)(i.map(e=>e.name))}),(0,t.jsx)("span",{className:"line-clamp-1",children:e}),(0,t.jsx)("span",{className:"hidden md:block",children:n.title})]})})}function v({posts:e}){return(0,t.jsxs)("div",{className:"grid w-full",children:[(0,t.jsxs)("h4",{className:"my-10 text-center text-2xl uppercase md:my-4",children:[e.length," resultater"]}),(0,t.jsx)("ul",{children:e.map(e=>(0,t.jsx)("li",{className:"w-full border-t border-white transition-colors hover:bg-zinc-800",children:(0,t.jsx)(y,{post:e})},e._id))})]})}y.Skeleton=function(){return(0,t.jsxs)("div",{className:"grid h-24 grid-cols-1 gap-0 border-t border-white p-2 md:grid-cols-[100px_1fr_1fr_100px] md:gap-5",children:[(0,t.jsx)(g.Skeleton,{className:"h-3 w-20 bg-zinc-400"}),(0,t.jsx)(g.Skeleton,{className:"h-3 w-20 bg-zinc-400"}),(0,t.jsx)(g.Skeleton,{className:"h-3 w-56 bg-zinc-400"}),(0,t.jsx)(g.Skeleton,{className:"h-3 w-20 bg-zinc-400"})]})},v.Skeleton=function(){return(0,t.jsx)("div",{className:"flex flex-col items-center justify-center",children:(0,t.jsx)(f.default,{className:"size-4 animate-spin"})})};let x=a.z.object({term:a.z.string().min(2,{message:"Søkeord må være minst 2 tegn"})});function b({className:e}){let[a,f]=(0,r.useState)(null),[m,p]=(0,r.useState)(!1),{searchQuery:h,setSearchQuery:g}=(0,c.useSearchQuery)(),y=(0,s.useForm)({resolver:(0,n.zodResolver)(x),defaultValues:{term:h}});async function b(e){try{p(!0),g(e.term);let t=await (0,o.searchPosts)(e.term);f(t)}catch(e){console.log(e)}finally{p(!1)}}return(0,r.useEffect)(()=>{h&&b({term:h})},[]),(0,r.useEffect)(()=>{y.getValues("term")!==h&&y.reset({term:h})},[h,y]),(0,t.jsxs)("div",{className:(0,l.cn)("flex w-full flex-col items-center justify-center gap-10",e),children:[(0,t.jsx)("h1",{className:"text-whit text-3xl font-semibold",children:"Søk i Vinduets artikler"}),(0,t.jsx)(d.Form,{...y,children:(0,t.jsxs)("form",{onSubmit:y.handleSubmit(b),className:"mb-10 w-full",children:[(0,t.jsx)(d.FormField,{control:y.control,name:"term",render:({field:e})=>(0,t.jsxs)(d.FormItem,{children:[(0,t.jsx)(d.FormLabel,{className:"sr-only",children:"Søk"}),(0,t.jsx)(d.FormControl,{children:(0,t.jsxs)("div",{className:"relative mx-auto w-full md:w-96",children:[(0,t.jsx)(u.Input,{placeholder:"Søk...",className:"rounded-none border-x-0 border-b border-t-0 border-white px-0 text-base placeholder:text-white focus-visible:ring-transparent",...e}),(0,t.jsx)(i.Search,{className:"absolute right-2 top-1.5 size-5"})]})}),(0,t.jsx)(d.FormMessage,{className:"text-center text-lg text-red-400"})]})}),(0,t.jsx)("button",{className:"hidden",type:"submit",children:"Submit"})]})}),a&&!m&&(0,t.jsx)(v,{posts:a}),!a&&m&&(0,t.jsx)(v.Skeleton,{})]})}e.s(["SearchForm",()=>b],879831)},925856,e=>{"use strict";var t=e.i(364990);let r=/_key\s*==\s*['"](.*)['"]/;function n(e){if(!Array.isArray(e))throw Error("Path is not an array");return e.reduce((e,t,n)=>{let i=typeof t;if("number"===i)return`${e}[${t}]`;if("string"===i)return`${e}${0===n?"":"."}${t}`;if(("string"==typeof t?r.test(t.trim()):"object"==typeof t&&"_key"in t)&&t._key)return`${e}[_key=="${t._key}"]`;if(Array.isArray(t)){let[r,n]=t;return`${e}[${r}:${n}]`}throw Error(`Unsupported path segment \`${JSON.stringify(t)}\``)},"")}let i={"\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","'":"\\'","\\":"\\\\"},s={"\\f":"\f","\\n":` 2`,"\\r":"\r","\\t":" ","\\'":"'","\\\\":"\\"};function a(e){let t,r=[],n=/\['(.*?)'\]|\[(\d+)\]|\[\?\(@\._key=='(.*?)'\)\]/g;for(;null!==(t=n.exec(e));){if(void 0!==t[1]){let e=t[1].replace(/\\(\\|f|n|r|t|')/g,e=>s[e]);r.push(e);continue}if(void 0!==t[2]){r.push(parseInt(t[2],10));continue}if(void 0!==t[3]){let e=t[3].replace(/\\(\\')/g,e=>s[e]);r.push({_key:e,_index:-1});continue}}return r}function o(e){return e.map(e=>{if("string"==typeof e||"number"==typeof e)return e;if(""!==e._key)return{_key:e._key};if(-1!==e._index)return e._index;throw Error(`invalid segment:${JSON.stringify(e)}`)})}function l(e){return e.map(e=>{if("string"==typeof e||"number"==typeof e)return e;if(-1!==e._index)return e._index;throw Error(`invalid segment:${JSON.stringify(e)}`)})}function c(e,r,n){return function e(r,n,i=[]){if(null!==r&&Array.isArray(r))return r.map((r,s)=>{if((0,t.isRecord)(r)){let t=r._key;if("string"==typeof t)return e(r,n,i.concat({_key:t,_index:s}))}return e(r,n,i.concat(s))});if((0,t.isRecord)(r)){if("block"===r._type||"span"===r._type){let t={...r};return"block"===r._type?t.children=e(r.children,n,i.concat("children")):"span"===r._type&&(t.text=e(r.text,n,i.concat("text"))),t}return Object.fromEntries(Object.entries(r).map(([t,r])=>[t,e(r,n,i.concat(t))]))}return n(r,i)}(e,(e,t)=>{if("string"!=typeof e)return e;let s=function(e,t){var r;if(!t?.mappings)return;let n=(r=l(e),`$${r.map(e=>"string"==typeof e?`['${e.replace(/[\f\n\r\t'\\]/g,e=>i[e])}']`:"number"==typeof e?`[${e}
2]`:""!==e._key?`[?(@._key=='${e._key.replace(/['\\]/g,e=>i[e])}')]`:`[${e._index}]`).join("")}`);if(void 0!==t.mappings[n])return{mapping:t.mappings[n],matchedPath:n,pathSuffix:""};let s=l(e).map(e=>"string"==typeof e?`['${e.replace(/[\f\n\r\t'\\]/g,e=>i[e])}']`:"number"==typeof e?`[${e}]`:""!==e._key?`[?(@._key=='${e._key.replace(/['\\]/g,e=>i[e])}')]`:`[${e._index}]`);for(let e=s.length-1;e>=0;e--){let r=`$${s.slice(0,e).join("")}`,i=t.mappings[r];if(i){let e=n.substring(r.length);return{mapping:i,matchedPath:r,pathSuffix:e}}}}(t,r);if(!s)return e;let{mapping:o,matchedPath:c}=s;if("value"!==o.type||"documentValue"!==o.source.type)return e;let d=r.documents[o.source.document],u=r.paths[o.source.path],f=a(c);return n({sourcePath:a(u).concat(t.slice(f.length)),sourceDocument:d,resultPath:t,value:e})})}let d="drafts.";function u(e){return e.startsWith(d)}function f(e){return e.startsWith("versions.")}let m=({sourcePath:e,resultPath:t,value:r})=>{var n;if(n=r,/^\d{4}-\d{2}-\d{2}/.test(n)&&Date.parse(n)||function(e){try{let{protocol:t}=new URL(e,e.startsWith("/")?"https://acme.com":void 0);return h.has(t)||t.startsWith("web+")}catch{return!1}}(r))return!1;let i=e.at(-1);return!("slug"===e.at(-2)&&"current"===i||"string"==typeof i&&(i.startsWith("_")||i.endsWith("Id"))||e.some(e=>"meta"===e||"metadata"===e||"openGraph"===e||"seo"===e)||g(e)||g(t)||"string"==typeof i&&p.has(i))},p=new Set(["color","colour","currency","email","format","gid","hex","href","hsl","hsla","icon","id","index","key","language","layout","link","linkAction","locale","lqip","page","path","ref","rgb","rgba","route","secret","slug","status","tag","template","theme","type","textTheme","unit","url","username","variant","website"]),h=new Set(["app:","data:","discord:","file:","ftp:","ftps:","geo:","http:","https:","imap:","javascript:","magnet:","mailto:","maps:","ms-excel:","ms-powerpoint:","ms-word:","slack:","sms:","spotify:","steam:","teams:","tel:","vscode:","zoom:"]);function g(e){return e.some(e=>"string"==typeof e&&null!==e.match(/type/i))}let y=[8203,8204,8205,65279],v=y.map(e=>String.fromCharCode(e)),x=[8203,8204,8205,8290,8291,8288,65279,8289,119155,119156,119157,119158,119159,119160,119161,119162];Object.fromEntries(y.map((e,t)=>[e,t])),Object.fromEntries(x.map((e,t)=>[e,t.toString(16)]));let b=String.fromCodePoint(y[0]).repeat(4);function j(e,t,i){let{filter:s,logger:a,enabled:l}=i;if(!l){let r="config.enabled must be true, don't call this function otherwise";throw a?.error?.(`[@sanity/client]: ${r}`,{result:e,resultSourceMap:t,config:i}),TypeError(r)}if(!t)return a?.error?.("[@sanity/client]: Missing Content Source Map from response body",{result:e,resultSourceMap:t,config:i}),e;if(!i.studioUrl){let r="config.studioUrl must be defined";throw a?.error?.(`[@sanity/client]: ${r}`,{result:e,resultSourceMap:t,config:i}),TypeError(r)}let p=[],h=[],g=c(e,t,({sourcePath:e,sourceDocument:t,resultPath:r,value:l})=>{var c;let g;if(("function"==typeof s?s({sourcePath:e,resultPath:r,filterDefault:m,sourceDocument:t,value:l}):m({sourcePath:e,resultPath:r,value:l}))===!1)return a&&h.push({path:n(o(e)),value:`${l.slice(0,20)}${l.length>20?"...":""}`,length:l.length}),l;a&&p.push({path:n(o(e)),value:`${l.slice(0,20)}${l.length>20?"...":""}`,length:l.length});let{baseUrl:y,workspace:x,tool:j}=("/"!==(g="string"==typeof(c="function"==typeof i.studioUrl?i.studioUrl(t):i.studioUrl)?c:c.baseUrl)&&(g=g.replace(/\/$/,"")),"string"==typeof c?{baseUrl:g}:{...c,baseUrl:g});if(!y)return l;let{_id:S,_type:w,_projectId:N,_dataset:k}=t;return function(e,t,r="auto"){var n;return!0!==r&&("auto"!==r||(n=e)&&"string"==typeof n&&Date.parse(n)||function(e){try{return new URL(e,e.startsWith("/")?"https://example.com":void 0),!0}catch{return!1}}(e))?e:`${e}${function(e){if(void 0===e)return"";let t="string"==typeof e?e:JSON.stringify(e),r=new TextEncoder().encode(t),n="";for(let e=0;e<r.length;e++){let t=r[e];n+=v[t>>6&3]+v[t>>4&3]+v[t>>2&3]+v[3&t]}return b+n}(t)}`}(l,{origin:"sanity.io",href:function(e){let{baseUrl:t,workspace:r="default",tool:i="default",id:s,type:a,path:l,projectId:c,dataset:m}=e;if(!t)throw Error("baseUrl is required");if(!l)throw Error("path is required");if(!s)throw Error("id is required");if("/"!==t&&t.endsWith("/"))throw Error("baseUrl must not end with a slash");let p="default"===r?void 0:r,h="default"===i?void 0:i,g=f(s)?s.split(".").slice(2).join("."):u(s)?s.slice(d.length):s,y=Array.isArray(l)?n(o(l)):l,v=new URLSearchParams({baseUrl:t,id:g,type:a,path:y});if(p&&v.set("workspace",p),h&&v.set("tool",h),c&&v.set("projectId",c),m&&v.set("dataset",m),u(s)||f(s)){if(f(s)){let e=function(e){if(!f(e))return;let[t,r,...n]=e.split(".");return r}(s);v.set("perspective",e)}}else v.set("perspective","published");let x=["/"===t?"":t];p&&x.push(p);let b=["mode=presentation",`id=${g}`,`type=${a}`,`path=${encodeURIComponent(y)}`];return h&&b.push(`tool=${h}`),x.push("intent","edit",`${b.join(";")}?${v}`),x.join("/")}({baseUrl:y,workspace:x,tool:j,id:S,type:w,path:e,...!i.omitCrossDatasetReferenceData&&{dataset:k,projectId:N}})},!0)});if(a){let e=h.length,t=p.length;if((e||t)&&((a?.groupCollapsed||a.log)?.("[@sanity/client]: Encoding source map into result"),a.log?.(`[@sanity/client]: Paths encoded: ${p.length}, skipped: ${h.length}`)),p.length>0&&(a?.log?.("[@sanity/client]: Table of encoded paths"),(a?.table||a.log)?.(p)),h.length>0){let e=new Set;for(let{path:t}of h)e.add(t.replace(r,"0").replace(/\[\d+\]/g,"[]"));a?.log?.("[@sanity/client]: List of skipped paths",[...e.values()])}(e||t)&&a?.groupEnd?.()}return g}[...y,...x].map(e=>`\\u{${e.toString(16)}}`).join("");var S=Object.freeze({__proto__:null,stegaEncodeSourceMap:j});e.s(["encodeIntoResult",()=>c,"stegaEncodeSourceMap",()=>j,"stegaEncodeSourceMap$1",()=>S])},359394,e=>{"use strict";var t=Object.prototype.hasOwnProperty;e.s(["dequal",()=>function e(r,n){var i,s;if(r===n)return!0;
2if(r&&n&&(i=r.constructor)===n.constructor){if(i===Date)return r.getTime()===n.getTime();if(i===RegExp)return r.toString()===n.toString();if(i===Array){if((s=r.length)===n.length)for(;s--&&e(r[s],n[s]););return -1===s}if(!i||"object"==typeof r){for(i in s=0,r)if(t.call(r,i)&&++s&&!t.call(n,i)||!(i in n)||!e(r[i],n[i]))return!1;return Object.keys(n).length===s}}return r!=r&&n!=n}])},787996,e=>{e.v(t=>Promise.all(["static/chunks/8e96bf38b6d98b5e.js","static/chunks/ddb6e668efba3eaa.js","static/chunks/ea531c504c286da7.js","static/chunks/e1308bd5767accba.js","static/chunks/536266a9859796da.js"].map(t=>e.l(t))).then(()=>t(172788)))},457793,e=>{e.v(e=>Promise.resolve().then(()=>e(925856)))},440574,e=>{e.v(t=>Promise.all(["static/chunks/e276dad05e32eb4c.js"].map(t=>e.l(t))).then(()=>t(33857)))},605156,e=>{e.v(t=>Promise.all(["static/chunks/7c0ea077d54e5730.js"].map(t=>e.l(t))).then(()=>t(816408)))},554230,e=>{e.v(t=>Promise.all(["static/chunks/44eaf5f594b8e2a3.js"].map(t=>e.l(t))).then(()=>t(212439)))},952779,e=>{e.v(t=>Promise.all(["static/chunks/25f22e5fbf5a6899.js"].map(t=>e.l(t))).then(()=>t(214932)))},831551,e=>{e.v(t=>Promise.all(["static/chunks/eaf82e2372f32879.js"].map(t=>e.l(t))).then(()=>t(249398)))},869194,e=>{e.v(t=>Promise.all(["static/chunks/f39aeb2c2d643ad6.js"].map(t=>e.l(t))).then(()=>t(627119)))}]);
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.