PageSourceSearch

https://www.sibbjans.se/_next/static/chunks/app/%5Blocale%5D/layout-9689e11bbd7cf875.js

js sibbjans.se collected 2026-10-07 01:36:00 UTC 14,548 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[450],{2382:(e,t,r)=>{"use strict";r.d(t,{DevRevalidateButton:()=>n}),r(5155);var l=r(63);r(3027);let n=()=>((0,l.useRouter)(),null)},2685:(e,t,r)=>{"use strict";r.d(t,{ReservationsButton:()=>u});var l=r(5155),n=r(2115),a=r(63),s=r(3027),i=r(6243),o=r(2821),c=r(6849),d=r(2696);let u=e=>{let{locale:t}=e,r=(0,a.usePathname)(),[u,h]=(0,n.useState)(!1),m=(0,c.Qf)({minWidth:"639px"}),p="sv"!==t,{open:f}=(0,i.H)(),b=(0,d._)(r);return(0,n.useEffect)(()=>{h(!0)},[]),(0,l.jsx)("div",{className:(0,o.A)(b?"fixed":"fixed sm:absolute","top-0 right-0 z-20 select-none","p-4",!u&&"opacity-0 invisible"),children:(0,l.jsx)(s.$,{onTap:f,className:"underline underline-offset-2",children:m?p?"Reservations":"Reservationer":p?"Book":"Boka"})})}},2696:(e,t,r)=>{"use strict";r.d(t,{_:()=>n});let l=["latest-news","senaste-nyheterna"],n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.split("/").filter(Boolean),r=t[t.length-1];return l.includes(r)}},3027:(e,t,r)=>{"use strict";r.d(t,{$:()=>s});var l=r(5155);r(63);var n=r(2821),a=r(8125);let s=e=>{let{onTap:t,children:r,className:s,onMouseEnter:i,onMouseLeave:o,dataHash:c,"aria-label":d,...u}=e;return(0,l.jsx)(a.P.button,{onTap:t,className:(0,n.A)("unset whitespace-nowrap",s),"data-hash":c,"aria-label":d,...u,children:r})}},3233:(e,t,r)=>{"use strict";r.d(t,{DraftBanner:()=>i});var l=r(5155),n=r(63),a=r(3027),s=r(2821);let i=e=>{let{isSv:t}=e,r=(0,n.useRouter)(),i=async()=>{(await fetch("/api/disable-draft")).ok&&r.refresh()};return(0,l.jsxs)("nav",{className:"fixed mx-2 px-2 py-2 bg-white border-t inset-x-0 bottom-0 flex justify-center gap-2 text-sm",children:[(0,l.jsx)("p",{children:t?"Det h\xe4r \xe4r ett utkast.":"You are in draft mode."}),(0,l.jsxs)(a.$,{onTap:i,className:(0,s.A)(""),children:["(",t?"Avsluta":"Quit",")"]})]})}},3592:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var l=r(8553);function n(){return(0,l._p)(),null}},6243:(e,t,r)=>{"use strict";r.d(t,{H:()=>i,ReservationsProvider:()=>s});var l=r(5155),n=r(2115);let a=(0,n.createContext)(),s=e=>{let{children:t}=e,[r,s]=(0,n.useState)(!1);return(0,l.jsx)(a.Provider,{value:{isOpen:r,open:()=>s(!0),close:()=>s(!1)},children:t})},i=()=>(0,n.useContext)(a)},6417:(e,t,r)=>{"use strict";r.d(t,{Navigation:()=>p});var l=r(5155),n=r(2115),a=r(63),s=r(2821),i=r(6849),o=r(3027),c=r(8480),d=r(3592),u=r(1408),h=r(8125),m=r(2696);let p=e=>{let{items:t,locale:r}=e,a=(0,i.Qf)({minWidth:"639px"}),[s,o]=(0,n.useState)(!1);return((0,n.useEffect)(()=>{o(!0)},[]),s)?a?(0,l.jsx)(b,{items:t,locale:r}):(0,l.jsx)(f,{items:t}):null},f=e=>{let{items:t,locale:r}=e,[a,i]=(0,n.useState)(!1);v();let m=()=>{setTimeout(()=>{i(!1)},250)},p={initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.25}};return(0,l.jsx)(u.N,{children:a?(0,l.jsxs)(h.P.nav,{className:(0,s.A)("fixed -inset-12 p-16 z-20 bg-white","select-none z-10","overflow-y-scroll"),...p,children:[(0,l.jsx)("div",{className:"fixed top-0 inset-x-0 h-20 bg-gradient-to-b from-white via-white to-transparent"}),(0,l.jsx)("button",{className:(0,s.A)("fixed mb-4 underline underline-offset-2"),onClick:()=>i(!1),children:"Close"}),(0,l.jsx)("ul",{className:(0,s.A)("grid pt-16"),children:t.map(e=>{var t,r;return(null==e?void 0:e.linkTo)&&(0,l.jsx)("li",{className:"p-4 text-center border-t mt-[-1px]",children:(0,l.jsx)(c.c,{href:"hem"===e.linkTo.slug||"home"===e.linkTo.slug?"/":"/".concat(e.linkTo.slug),onClick:m,children:null!=(r=e.label)?r:null==e||null==(t=e.linkTo)?void 0:t.title})},e.id)})}),(0,l.jsx)(d.A,{})]},"small-navigation-open"):(0,l.jsx)(o.$,{className:(0,s.A)("fixed left-0 top-0 p-5","select-none z-10"),onTap:()=>i(!0),...p,children:(0,l.jsxs)("svg",{width:18,height:14,viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M0 1.4V0H18V1.4H0Z",fill:"currentColor"}),(0,l.jsx)("path",{d:"M0 7.69999V6.29999H18V7.69999H0Z",fill:"currentColor"}),(0,l.jsx)("path",{d:"M0 14V12.6H18V14H0Z",fill:"currentColor"})]})},"small-navigation-closed")})},b=e=>{let{items:t,locale:r}=e,n=(0,a.usePathname)(),i=v(),o=(0,m._)(n),d=["en","sv"].includes(i),u=e=>e.some(e=>{var t;return(null==e||null==(t=e.linkTo)?void 0:t.slug)===i||Array.isArray(e.children)&&u(e.children)}),h=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1],(0,l.jsx)("ul",{className:"ml-4 first:ml-0",children:e.map(e=>{var t;if(!(null==e?void 0:e.linkTo))return null;let{slug:n,title:a,__typename:o}=e.linkTo,m=i===n||d&&["hem","home"].includes(n),p=Array.isArray(e.children)&&e.children.length>0,f=m||p&&u(e.children);return(0,l.jsxs)("li",{children:[(0,l.jsx)(c.c,{href:(e=>{if(!(null==e?void 0:e.linkTo))return"/";let{slug:t,__typename:l}=e.linkTo,n=["hem","home"].includes(t)?"/":"/".concat(t);return"Room"===l&&(n="".concat("sv"===r?"/hotell":"/hotel","/").concat(t)),n})(e),className:(0,s.A)(m&&"underline underline-offset-2"),children:null!=(t=e.label)?t:a}),p&&f&&h(e.children,n)]},e.id)})})};return(0,l.jsx)("nav",{className:(0,s.A)("left-0 top-0 p-4 select-none z-10",o?"fixed":"absolute"),children:h(t)})},v=()=>{let e=(0,a.usePathname)();if(!e)return null;let t=e.split("/").filter(Boolean);return t[t.length-1]}},6590:(e,t,r)=>{Promise.resolve().then(r.bind(r,2382)),Promise.resolve().then(r.bind(r,9964)),Promise.resolve().then(r.bind(r,6417)),Promise.resolve().then(r.bind(r,2685)),Promise.resolve().then(r.bind(r,9370)),Promise.resolve().then(r.bind(r,3233))},7443:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var l=r(5155),n=r(3027),a=r(2821),s=r(8480);r(2619);let i=e=>{var t;let{item:r,className:i,children:o,onClick:c,"aria-label":d,...u}=e;if("bokaBordWidget"===r.type)return r.dataHash?(0,l.jsx)(n.$,{className:(0,a.A)(i,"waiteraid-widget"),dataHash:r.dataHash,"aria-label":d,...u,children:o}):o;if("internal"===r.type)return(null==r?void 0:r.linkTo)?(0,l.jsx)(s.c,{href:r.linkTo.slug,className:i,onClick:c,"aria-label":d,...u,children:o}):o;let h=(e=>e?/^(https?:|tel:|mailto:|ftp:|sms:|sip:|whatsapp:)/i.test(e)?e:"https://".concat(e):"#")("external"===r.type||"asset"===r.type?r.href:null==r||null==(t=r.asset)?void 0:t.url);return(0,l.jsx)("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:i,onClick:c,"aria-label":d,...u,children:o})}},8480:(e,t,r)=>{"use strict";r.d(t,{HygraphLink:()=>m,c:()=>h});var l=r(5155),n=r(2619),a=r.n(n),s=r(63),i=r(2115),o=r(6243),c=r(3027),d=r(2821);let u=e=>{let{href:t,locale:r,children:n,className:i,...o}=e,c=(0,s.usePathname)();(0,s.useSearchParams)();let d=r||c.split("/")[1],u="/".concat(d).concat(t.startsWith("/")?t:"/".concat(t));return(0,l.jsx)(a(),{href:u,className:i,...o,children:n})},h=e=>(0,l.jsx)(i.Suspense,{fallback:(0,l.jsx)("span",{children:"Loading..."}),children:(0,l.jsx)(u,{...e})}),m=e=>{let{href:t,locale:r,linkRef:n,ref:i,children:u,label:h,dataHash:m,type:p,file:f,className:b,"aria-label":v,...x}=e,g=(0,s.usePathname)(),{open:w}=(0,o.H)(),j=null!=n?n:i,y=r||(null==g?void 0:g.split("/")[1])||"en";if(!t&&!j&&!f)return(0,l.jsx)("div",{className:b,children:u});if(f)return(0,l.jsx)("a",{href:f.url,target:"_blank",rel:"noopener noreferrer",className:b,"aria-label":v,...x,children:u});if("bokaBordWidget"===p)return m?(0,l.jsx)(c.$,{className:(0,d.A)(b,"waiteraid-widget"),dataHash:m,"aria-label":v,...x,children:u}):null;if("reservationsModal"===p)return(0,l.jsx)(c.$,{className:b,onTap:w,"aria-label":v,...x,children:u});let k=null==t?void 0:t.trim(),N=/^(https?:\/\/|mailto:|tel:)/i.test(null!=k?k:""),A=k&&("external"===p||N),P=null;if(j)switch(j.__typename){case"Page":P="/".concat(y,"/").concat(j.slug);break;case"Room":P="/".concat(y,"/").concat("en"===y?"hotel":"hotell","/").concat(j.slug);break;case"Article":P="/".concat(y,"/").concat("en"===y?"article":"artikel","/").concat(j.slug);break;default:console.warn("Unhandled typename: ".concat(j.__typename))}if(A){let e=/^(mailto:|tel:)/i.test(k)?k:function(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("mailto:")||e.startsWith("tel:")?e:e.startsWith("www.")?"https://".concat(e):e}(k);return(0,l.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:b,"aria-label":v,...x,children:u})}if(P)return(0,l.jsx)(a(),{href:P,className:b,"aria-label":v,...x,children:u});if(k){let e=/^\/(en|sv)(\/|$)/.test(k)?k:"/".concat(y).concat(k.startsWith("/")?k:"/".concat(k));return(0,l.jsx)(a(),{href:e,className:b,"aria-label":v,...x,children:u})}return null}},9370:(e,t,r)=>{"use strict";r.d(t,{ReservationsModal:()=>j});var l=r(5155),n=r(63),a=r(2115),s=r(6243),i=r(6849),o=function(){return(o=Object.assign||function(e){for(var t,r=1,l=arguments.length;r<l;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},c=function(e,t){var r={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&0>t.indexOf(l)&&(r[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,l=Object.getOwnPropertySymbols(e);n<l.length;n++)0>t.indexOf(l[n])&&Object.prototype.propertyIsEnumerable.call(e,l[n])&&(r[l[n]]=e[l[n]]);return r},d=!1;function u(){var e,t,r,l=(0,a.useState)(h),n=l[0],s=l[1],i=(t=(e=(0,a.useState)(!1))[0],r=e[1],(0,a.useEffect)(function(){m()&&r(!0)},[]),t);return(0,a.useEffect)(function(){if(i)return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)};function e(){s(h())}},[i]),i?n:null}function h(){return m()?window.innerHeight:null}function m(){return"undefined"!=typeof window&&"undefined"!=typeof document}
1(0,a.forwardRef)(function(e,t){var r=e.style,l=c(e,["style"]),n=u();!d&&(null==r?void 0:r.height)&&(d=!0,console.warn("<Div100vh /> overrides the height property of the style prop"));var s=o(o({},r),{height:n?n+"px":"100vh"});return a.createElement("div",o({ref:t,style:s},l))}).displayName="Div100vh",r(5239);var p=r(1408),f=r(8125),b=r(3027),v=r(3592);let x=e=>{let{render:t,close:r,children:n}=e;return(0,l.jsx)(p.N,{children:t&&(0,l.jsxs)(f.P.div,{className:"fixed inset-0 bg-black/80 z-20 overflow-scroll sm:py-4 grid items-center justify-center",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25},"data-modal-wrapper":!0,onClick:e=>{e.target.dataset.modalWrapper&&r()},children:[n,(0,l.jsx)(v.A,{})]})})};var g=r(7443),w=r(2821);let j=e=>{let{items:t,locale:r}=e,o=(0,i.Qf)({minWidth:"639px"}),c=u(),d="sv"!==r,h=(0,n.usePathname)(),m=(0,a.useRef)(h),{isOpen:p,close:f}=(0,s.H)();(0,a.useEffect)(()=>{p&&(m.current!==h&&f(),m.current=h)},[h,p,f]),(0,a.useEffect)(()=>{if(!p)return;let e=e=>{"Escape"===e.key&&f()};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[p,f]);let v=t.slice(0,4),j=v.length;return(0,l.jsx)(x,{render:p,close:f,children:(0,l.jsxs)("section",{className:(0,w.A)("bg-peach w-screen min-h-[28em] flex flex-col select-none",1===j?"sm:w-[24em]":j>=2&&j<=4?"sm:w-[calc(100vw-2em)] lg:w-[44em]":""),"aria-label":d?"Reservations Modal":"Bokningsmodal",onClick:e=>e.stopPropagation(),style:{height:o?"auto":c},children:[(0,l.jsxs)("div",{className:(0,w.A)("relative p-4 pb-0 grow grid",2===j?"sm:grid-cols-2":3===j?"sm:grid-cols-2 sm:grid-row-2 gap-x-4":4===j?"sm:grid-cols-2 sm:grid-row-2":""),children:[v.map((e,t)=>(0,l.jsx)(g.A,{item:e,className:(0,w.A)((e=>1===j?"w-full h-full border-t border-b":2===j?(0,w.A)(0===e&&"w-full h-full border-t border-b sm:border-t-0 sm:border-b-0 sm:border-l sm:border-r",1===e&&"w-full h-full border-b sm:border-b-0 sm:border-r"):3===j?(0,w.A)(0===e&&"border-t border-b sm:row-span-2 sm:border-t-0 sm:border-b-0 sm:border-l sm:border-r -mr-2",1===e&&"border-b",2===e&&"border-b sm:border-b-0"):4===j?(0,w.A)(0===e&&"border-t border-b sm:border-t-0 sm:mx-2",1===e&&"border-b sm:mx-2",2===e&&"border-b sm:border-t-0 sm:border-b-0",3===e&&"border-b sm:border-b-0"):"")(t)),"aria-label":"".concat(d?"Book":"Boka"," ").concat(e.label).concat(e.hint?", ".concat(e.hint):""),children:(0,l.jsxs)("div",{className:"h-full grid items-center content-center p-4 text-center",onClick:()=>{var t;let r=h.split("/").filter(Boolean);r[r.length-1]===(null==(t=e.linkTo)?void 0:t.slug)&&f()},children:[(0,l.jsx)("div",{className:"uppercase",children:e.label}),e.hint&&(0,l.jsx)("div",{className:"italic",children:e.hint})]})},e.id)),4===j&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"hidden sm:block absolute top-4 bottom-0 left-4 w-[1px] bg-red"}),(0,l.jsx)("div",{className:"hidden sm:block absolute top-4 bottom-0 left-1/2 w-[1px] bg-red"}),(0,l.jsx)("div",{className:"hidden sm:block absolute top-4 bottom-0 right-4 w-[1px] bg-red"})]})]}),(0,l.jsx)("nav",{children:(0,l.jsx)(b.$,{onTap:f,className:"uppercase p-4 w-full","aria-label":d?"Close reservations modal":"St\xe4ng bokningsmodalen",children:d?"Close":"St\xe4ng"})})]})})}},9964:(e,t,r)=>{"use strict";r.d(t,{Footer:()=>o});var l=r(5155);r(2619);var n=r(2115),a=r(63),s=r(8480),i=r(2821);let o=e=>{let{items:t,locale:r}
1=e,o=(0,a.useRouter)(),c=(0,a.usePathname)(),[d,u]=(0,n.useState)(null),[h,m]=(0,n.useState)(null),p=async e=>{if(d)return;let t=c.split("/").filter(Boolean),l=t[t.length-1];u(e),m(null);try{let t=await fetch("/api/switch-locale",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentSlug:l,currentLocale:r,targetLocale:e})}),n=await t.json();t.ok&&n.newPath?o.push(n.newPath):(m("Failed to switch language. Please try again."),console.error("Error switching locale:",n.error))}catch(e){m("Something went wrong. Try again."),console.error("Error in switchLocale:",e)}finally{u(null)}};return(0,l.jsxs)("nav",{className:"px-4 sm:px-8 select-none pt-24 sm:pt-36 pb-6 flex flex-wrap items-center justify-center gap-x-6 gap-y-1 text-sm sm:text-base",children:[t.map(e=>{var t,r;return(0,l.jsx)(s.c,{href:"/".concat(e.linkTo.slug),className:"whitespace-nowrap",children:null!=(r=e.label)?r:null==e||null==(t=e.linkTo)?void 0:t.title},e.id)}),(0,l.jsx)("div",{className:"-mx-2 whitespace-nowrap [font-variant-caps:small-caps]",children:["sv","en"].map((e,t)=>(0,l.jsxs)(n.Fragment,{children:[(0,l.jsx)("button",{onClick:()=>p(e),className:(0,i.A)("px-2 rounded",r===e?"underline":"",d===e?"opacity-50 cursor-not-allowed":""),disabled:d===e,"aria-label":"en"===e?"Switch to English":"sv"===e?"Byt till svenska":"Switch to ".concat(e.toUpperCase()),children:e.toUpperCase()}),0===t&&(0,l.jsx)("span",{children:"/"})]},t))}),h&&(0,l.jsx)("p",{className:"text-red-500 mt-2",children:h})]})}}},e=>{e.O(0,[356,798,744,441,255,358],()=>e(e.s=6590)),_N_E=e.O()}]);

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.