1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[329],{27327:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/frettir",function(){return t(52930)}])},52930:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return L},default:function(){return A}});var r=t(85893),l=t(67294),s=t(86896),o=t(90147),i=t(9008),a=t.n(i),c=t(11163),u=t(4191),_=t(6574),d=t(36067),h=t(18680),p=t(12723),m=t(1143),w=t(73350),x=t(19845),f=t.n(x),C=t(35307),g=t(72915),v=t(7856),j=t.n(v);let E=f().bind(j()),y=({children:e})=>{let{uiState:n}=(0,l.useContext)(C.Q),[t,s]=(0,l.useState)(!1),[o,i]=(0,l.useState)(1),a=l.Children.toArray(e).filter(Boolean),[c,u]=(0,l.useState)(0),_=l.Children.count(e),d=(0,l.useCallback)(()=>{t||(i(1),u(e=>e+1<=_-1?e+1:0))},[_,t]);return a.length?(0,r.jsxs)("section",{className:j().newsCarousel,tabIndex:n.isNavOpen?-1:0,"aria-label":"News carousel",children:[(0,r.jsx)("div",{className:j().newsCarousel__children,children:a.map((e,n)=>(0,l.cloneElement)(e,{placeholderEl:!0,key:n}))}),(0,r.jsx)("div",{className:j().newsCarousel__inner,children:(0,r.jsx)(w.Z,{component:null,children:a.map((e,n)=>(0,l.cloneElement)(e,{active:n===c,setIsTransitioning:s,key:`${j().newsCarousel}${n}`,direction:o}))})}),a.length>1&&(0,r.jsx)("div",{className:j().newsCarousel__controls,children:(0,r.jsxs)("div",{className:E(j().newsCarousel__controlsInner),children:[(0,r.jsx)(g.b,{direction:"left",onClick:()=>{t||(i(0),c-1<0?u(_-1):u(c-1))},className:j().newsCarousel__controlPrev}),(0,r.jsx)(g.b,{onClick:d})]})})]}):null};var N=t(98885),k=t(26038),b=t(37478),S=t.n(b);let I=f().bind(S()),P=({active:e,children:n,setIsTransitioning:t,placeholderEl:s})=>{let o=(0,l.useRef)(null);return(0,r.jsx)(N.ZP,{nodeRef:o,in:e,timeout:400,onEntering:()=>{t?.(!0),k.p8.set(o.current,{zIndex:2})},onEnter:()=>{t?.(!0),k.p8.set(o.current,{zIndex:2}),k.p8.to(o.current,{autoAlpha:1,duration:.4})},onExit:()=>{k.p8.set(o.current,{zIndex:1,autoAlpha:1})},onExited:()=>{k.p8.set(o.current,{zIndex:0,autoAlpha:0}),t?.(!1)},children:(0,r.jsx)("div",{className:I(S().newsCarouselItem,{placeholderEl:s}),ref:o,"aria-hidden":s,children:(0,l.cloneElement)(n,{isCarouselItem:!0})})})};var z=t(56202),T=t(48907),R=t(82213),V=t(8411),Z=t(42721),F=t(36473),O=t(17587),M=t(72817),q=t(76586),L=!0;function A(e){let n=(0,c.useRouter)(),t=(0,s.Z)(),i=(0,q.F)(n.query.category),[w,x]=(0,l.useState)(i||""),[f,C]=(0,l.useState)("Reverse chronological"),g=e?.page??null,v=e?.articles??[],j=e?.layout??null,E=e?.hasNextPage??!1,N=e?.categories??[];(0,l.useEffect)(()=>{window.scrollTo(0,0)},[]);let k=e=>{x(e),e||delete n.query.category,n.push({query:e?{...n.query,category:e}:{...n.query}},void 0,{shallow:!0})};if(!g)return n.reload(),null;let b=e?.lang,S=N.map(e=>({title:e,action:()=>{e?.toLocaleLowerCase()==="allt"||e?.toLocaleLowerCase()==="all"?k(""):k(e)}})),I=e=>{C(e)},L=[];g.ordering&&g.ordering.length>0&&(L=g.ordering.map(e=>e.ordering_title?{title:(0,R.Sz)(e.ordering_title),action:()=>{I(e.ordering_field??"Reverse chronological")}}:null).filter(Boolean));let A=(0,r.jsxs)(d.x,{children:[(0,r.jsx)(_.w,{controlType:"select",title:t.formatMessage({id:"filters_type"}),options:S,scrollTarget:"#news-scroll-target",initialValue:i}),L.length>0&&(0,r.jsx)(_.w,{controlType:"select",title:t.formatMessage({id:"filters_order_by"}),options:L})]}),G=(0,r.jsxs)(d.x,{children:[(0,r.jsx)(_.w,{title:t.formatMessage({id:"filters_type"}),options:S,scrollTarget:"#news-scroll-target",initialValue:i}),L.length>0&&(0,r.jsx)(_.w,{controlType:"button",title:t.formatMessage({id:"filters_order_by"}),options:L})]});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.e,{data:g,layout:j}),(0,r.jsx)(a(),{children:(0,r.jsx)("link",{rel:"alternate",type:"application/rss+xml",title:"RSS Feed - Landsvirkjun",href:"/api/rss"},"rss")}),(0,r.jsx)(O.X,{page:g}),(0,r.jsx)(z.m,{title:(0,R.Sz)(g?.title)??t.formatMessage({id:"news_section_title"}),children:(0,r.jsx)(u.R,{animated:!1,name:(0,R.Sz)(g?.contact_name),email:(0,R.Sz)(g?.contact_email),meta1:(0,R.Sz)(g?.phone_number),jobTitle:(0,R.Sz)(g?.contact_title),image:(0,r.jsx)(T.I,{image:g?.contact_picture,width:80,height:80})})}),g?.news_list?.length?(0,r.jsx)(Z.$,{children:(0,r.jsx)(y,{children:g?.news_list?.map((e,n)=>r.jsx(P,{children:r.jsx(p.y,{title:R.Sz(e.carousel_news_title),kicker:R.Sz(e.kicker)||void 0,link:M.kG(e.carousel_link),imagePosition:"left",image:e.carousel_news_image?r.jsx(T.I,{width:865,height:800,image:e.carousel_news_image}):void 0,children:R.Sz(e.carousel_news_content)?r.jsx(R.Ho,{children:e.carousel_news_content}):void 0})}
1,n))})}):null,(0,r.jsxs)(h.k,{controls:{mobile:A,desktop:G},children:[(0,r.jsx)("div",{id:"news-scroll-target"}),(0,r.jsx)(F.h,{page:1,perPage:o.L,hasNext:E,news:v,category:w,noResultsText:g?.no_results,lang:b,sorting:f})]}),(0,r.jsx)(V.m,{target:"#main"})]})}},7856:function(e){e.exports={newsCarousel:"NewsCarousel_newsCarousel__vGcmI",newsCarousel__children:"NewsCarousel_newsCarousel__children__NQTVh",newsCarousel__inner:"NewsCarousel_newsCarousel__inner__6G4WJ",newsCarousel__item:"NewsCarousel_newsCarousel__item__nTKej",newsCarousel__controls:"NewsCarousel_newsCarousel__controls__Vz2wF",newsCarousel__controlsInner:"NewsCarousel_newsCarousel__controlsInner__25eEO",newsCarousel__controlPrev:"NewsCarousel_newsCarousel__controlPrev__hjYcE",newsCarousel__indicators:"NewsCarousel_newsCarousel__indicators__h_SRu",newsCarousel__indicatorsInner:"NewsCarousel_newsCarousel__indicatorsInner___TysR",active:"NewsCarousel_active__GIH39",newsCarousel__indicator:"NewsCarousel_newsCarousel__indicator__xrWqc","link-hover":"NewsCarousel_link-hover__akFy8"}},37478:function(e){e.exports={newsCarouselItem:"NewsCarouselItem_newsCarouselItem__Hol9l",placeholderEl:"NewsCarouselItem_placeholderEl__5KPUb","link-hover":"NewsCarouselItem_link-hover__Bq3fU"}},73350:function(e,n,t){"use strict";t.d(n,{Z:function(){return h}});var r=t(63366),l=t(87462),s=t(97326),o=t(75068),i=t(67294),a=t(220);function c(e,n){var t=Object.create(null);return e&&i.Children.map(e,function(e){return e}).forEach(function(e){t[e.key]=n&&(0,i.isValidElement)(e)?n(e):e}),t}function u(e,n,t){return null!=t[n]?t[n]:e.props[n]}var _=Object.values||function(e){return Object.keys(e).map(function(n){return e[n]})},d=function(e){function n(n,t){var r,l=(r=e.call(this,n,t)||this).handleExited.bind((0,s.Z)(r));return r.state={contextValue:{isMounting:!0},handleExited:l,firstRender:!0},r}(0,o.Z)(n,e);var t=n.prototype;return t.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},t.componentWillUnmount=function(){this.mounted=!1},n.getDerivedStateFromProps=function(e,n){var t,r,l=n.children,s=n.handleExited;return{children:n.firstRender?c(e.children,function(n){return(0,i.cloneElement)(n,{onExited:s.bind(null,n),in:!0,appear:u(n,"appear",e),enter:u(n,"enter",e),exit:u(n,"exit",e)})}):(Object.keys(r=function(e,n){function t(t){return t in n?n[t]:e[t]}e=e||{},n=n||{};var r,l=Object.create(null),s=[];for(var o in e)o in n?s.length&&(l[o]=s,s=[]):s.push(o);var i={};for(var a in n){if(l[a])for(r=0;r<l[a].length;r++){var c=l[a][r];i[l[a][r]]=t(c)}i[a]=t(a)}for(r=0;r<s.length;r++)i[s[r]]=t(s[r]);return i}(l,t=c(e.children))).forEach(function(n){var o=r[n];if((0,i.isValidElement)(o)){var a=n in l,c=n in t,_=l[n],d=(0,i.isValidElement)(_)&&!_.props.in;c&&(!a||d)?r[n]=(0,i.cloneElement)(o,{onExited:s.bind(null,o),in:!0,exit:u(o,"exit",e),enter:u(o,"enter",e)}):c||!a||d?c&&a&&(0,i.isValidElement)(_)&&(r[n]=(0,i.cloneElement)(o,{onExited:s.bind(null,o),in:_.props.in,exit:u(o,"exit",e),enter:u(o,"enter",e)})):r[n]=(0,i.cloneElement)(o,{in:!1})}}),r),firstRender:!1}},t.handleExited=function(e,n){var t=c(this.props.children);e.key in t||(e.props.onExited&&e.props.onExited(n),this.mounted&&this.setState(function(n){var t=(0,l.Z)({},n.children);return delete t[e.key],{children:t}}))},t.render=function(){var e=this.props,n=e.component,t=e.childFactory,l=(0,r.Z)(e,["component","childFactory"]),s=this.state.contextValue,o=_(this.state.children).map(t);return(delete l.appear,delete l.enter,delete l.exit,null===n)?i.createElement(a.Z.Provider,{value:s},o):i.createElement(a.Z.Provider,{value:s},i.createElement(n,l,o))},n}(i.Component);d.propTypes={},d.defaultProps={component:"div",childFactory:function(e){return e}};var h=d}},function(e){e.O(0,[9278,4732,716,8764,3812,3966,6773,2888,9774,179],function(){return e(e.s=27327)}),_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.