1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2758,8143],{8143:(e,n,t)=>{t.r(n),t.d(n,{FlexRow:()=>d,Row:()=>u});var i=t(15933),r=t(13613),a=t(50881);function o(){let e=(0,i._)(["margin-left: -","rem; margin-right: -","rem;"]);return o=function(){return e},e}function l(){let e=(0,i._)(["\n margin-right: -","rem;\n margin-left: -","rem;\n\n ",";\n\n &:after {\n display: table;\n content: '';\n width: 100%;\n }\n"]);return l=function(){return e},e}function s(){let e=(0,i._)(["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n"]);return s=function(){return e},e}let u=r.default.div.withConfig({displayName:"Row",componentId:"sc-f6847bf9-0"})(l(),a.bB/2,a.bB/2,a.Rn.lg.min&&a.Rn.lg.min(o(),a.bB,a.bB)),d=r.default.div.withConfig({displayName:"Row__FlexRow",componentId:"sc-f6847bf9-1"})(s())},16657:(e,n,t)=>{t.r(n),t.d(n,{Entity:()=>a,default:()=>l});var i=t(95155),r=t(25076);function a(){return e=>function(n){let{entity:t,data:a,domain:l,...s}=n,u=()=>{let{entity:e,mode:n,config:t}=s;return!e||Array.isArray(e)?null:o(t,["displays",e.entity_type,e.bundle,n||"default"],["displays",e.entity_type,e.bundle,"default"])},d=e=>{let{entity:n,config:t}=s;return!n||Array.isArray(n)?null:o(t,["instances",n.entity_type,n.bundle,e],null)},c=e=>{let{entity:n,config:t}=s;return!n||Array.isArray(n)?null:o(t,["storages",n.entity_type,e],null)},m=(e,n)=>{var t,a;let{entity:o,data:l}=s;if(!o||Array.isArray(o))return null;let m=u();if(!m)return null;let f=n||m[e],p=d(e),b=c(e),y=["field"];b&&y.push("field--".concat(b.type)),y.push("field--".concat(e)),y.push("field--".concat(o.entity_type,"--").concat(e)),y.push("field--".concat(o.entity_type,"--").concat(o.bundle,"--").concat(e));let g=r.A.get("field",y);if(!g)return console.warn("[Entity] renderField: No component found for field:",e),null;let h=(null==(t=o.attributes)?void 0:t[e])||(null==(a=o.relationships)?void 0:a[e])&&o.relationships[e].data||null;return(0,i.jsx)(g,{key:e,items:h,entity:o,data:l,format:f,instance:p,storage:b,fieldName:e})},f=e=>{let{field:n,content:i,dataOverride:r}=e,o=i||t,l=r||a,s=[];if(!o)return console.warn("[Entity] getRelation: Entity is null or undefined"),null;if(Array.isArray(o))return console.warn("[Entity] getRelation: Entity is an array, cannot process relation"),null;if(Array.isArray(n)&&(n=(s=[...n]).shift()),!n||!o.relationships||!o.relationships[n])return console.warn("[Entity] getRelation: No relationship found for field:",n),null;let u=o.relationships[n].data;if(!u)return null;if(Array.isArray(u)){let e=[];return u.forEach((n,t)=>{if(n&&l&&l[n.type]&&l[n.type][n.id]){let t=l[n.type][n.id];s.length&&(t=f({field:s,content:t,dataOverride:l})),t&&e.push(t)}else console.warn("[Entity] getRelation: Could not find item for relation ".concat(t))}),e.length?e:null}if(!l||!l[u.type]||!l[u.type][u.id])return console.warn("[Entity] getRelation: Could not find item for relation:",u),null;let d=l[u.type][u.id];return d&&s.length&&(d=f({field:s,content:d,dataOverride:l})),d};return(0,i.jsx)(e,{...s,entity:t,data:a,domain:l,renderField:m,renderFields:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=u();if(n)return Object.keys(n).sort((e,t)=>n[e].weight-n[t].weight).map(t=>n[t].type&&-1===e.indexOf(t)?m(t,n[t]):null)},getRelation:f,getMediaImageStyle:e=>{let{style:n,field:i,content:r}=e,a=r||t;if(!a)return console.warn("[Entity] getMediaImageStyle: Media entity is null or undefined"),null;if(Array.isArray(a))return console.warn("[Entity] getMediaImageStyle: Media entity is an array"),null;if(!a.relationships||!a.relationships[i]||!a.relationships[i].data)return console.warn("[Entity] getMediaImageStyle: No relationship data found for field:",i),null;let o=a.relationships[i].data;if(Array.isArray(o))return console.warn("[Entity] getMediaImageStyle: Relation is an array, expected single value"),null;if(!o.meta||!o.meta.derivatives||!n||!o.meta.derivatives[n]){var l;return console.warn("[Entity] getMediaImageStyle: Style not found:",{style:n,availableStyles:(null==(l=o.meta)?void 0:l.derivatives)?Object.keys(o.meta.derivatives):"none"}),null}let s=o.meta.derivatives,u=o.meta.url_prefix;return u?u.replace("{style}",n)+s[n].url:(console.warn("[Entity] getMediaImageStyle: URL prefix is missing"),null)},getMediaImage:e=>{let{style:n,field:i,content:r,placeholder_style:a}=e,o=r||t;if(!o)return console.warn("[Entity] getMediaImage: Media entity is null or undefined"),null;if(Array.isArray(o))return console.warn("[Entity] getMediaImage: Media entity is an array"),null;if(!o.relationships||!o.relationships[i]||!o.relationships[i].data)return console.warn("[Entity] getMediaImage: No relationship data found for field:",i),null;let l=o.relationships[i].data;if(Array.isArray(l))return console.warn("[Entity] getMediaImage: Relation is an array, expected single value"),null;
1let{derivatives:s,url_prefix:u,alt:d,title:c}=l.meta||{};if(!s||!u)return console.warn("[Entity] getMediaImage: Missing styles or URL prefix"),null;let m=n&&n in s,f=a&&a in s;return n&&!m&&console.warn("[Entity] getMediaImage: Requested style not found:",n),a&&!f&&console.warn("[Entity] getMediaImage: Requested placeholder style not found:",a),{src:m?u.replace("{style}",n)+s[n].url:void 0,placeholder:f?u.replace("{style}",a)+s[a].url:void 0,width:m?s[n].w:void 0,height:m?s[n].h:void 0,alt:d,title:c}}})}}function o(e,n,t){if(!e)return console.warn("[Entity] _get: Object is null or undefined",{path:n}),t;let i=Array.isArray(n)?n:n.split("."),r=e;for(let e=0;e<i.length;e++){if(null==r)return console.warn('[Entity] _get: Path segment "'.concat(i[e],'" not found'),{path:n,segment:e}),t;r=r[i[e]]}return void 0!==r?r:t}t(12115);let l=a},87697:(e,n,t)=>{t.d(n,{_9:()=>m});var i=t(15933),r=t(13613),a=t(50881),o=t(38205);function l(){let e=(0,i._)(["\n background-color: ",";\n display: table;\n width: 100%;\n min-height: 100px;\n margin-bottom: 10px;\n transition: background-color 0.3s ease;\n\n > * {\n display: table-cell;\n vertical-align: middle;\n min-height: 100px;\n }\n\n .article-top-title {\n transition: color 0.3s ease;\n }\n\n &:hover {\n background-color: ",";\n\n .article-top-title {\n color: ",";\n }\n }\n\n @media (min-width: ","em) {\n margin-bottom: 20px;\n }\n"]);return l=function(){return e},e}function s(){let e=(0,i._)([""]);return s=function(){return e},e}function u(){let e=(0,i._)(["\n width: 60px;\n text-align: center;\n color: ",";\n font-size: 24px;\n font-weight: bold;\n\n @media (min-width: ","em) {\n width: 95px;\n font-size: 40px;\n }\n"]);return u=function(){return e},e}function d(){let e=(0,i._)(["\n padding: 0;\n"]);return d=function(){return e},e}function c(){let e=(0,i._)(["\n margin-left: auto;\n margin-right: auto;\n margin-bottom: 30px;\n max-width: 1140px;\n\n @media (min-width: ","em) {\n margin-bottom: 60px;\n }\n"]);return c=function(){return e},e}r.default.div.withConfig({displayName:"common__HorizontalCard",componentId:"sc-e65ca5e5-0"})(l(),o.Tj.grey,o.Tj.greyDark,o.Tj.globalLight,a.ge.md.min),r.default.div.withConfig({displayName:"common__HorizontalCardCell",componentId:"sc-e65ca5e5-1"})(s()),r.default.div.withConfig({displayName:"common__HorizontalCardCellNumber",componentId:"sc-e65ca5e5-2"})(u(),o.Tj.red,a.ge.md.min),r.default.div.withConfig({displayName:"common__HorizontalCardCellImage",componentId:"sc-e65ca5e5-3"})(d());let m=r.default.div.withConfig({displayName:"common__MarginContainer",componentId:"sc-e65ca5e5-4"})(c(),a.ge.md.min)},92758:(e,n,t)=>{t.r(n),t.d(n,{default:()=>v});var i=t(15933),r=t(95155),a=t(12115),o=t(44943),l=t(33202),s=t(13613),u=t(84727),d=t(16657),c=t(87697),m=t(38205),f=t(71164),p=t(32486),b=t(8143);function y(){let e=(0,i._)([""]);return y=function(){return e},e}function g(){let e=(0,i._)(["\n color: ",";\n font-size: 13px;\n margin: 10px;\n position: absolute;\n right: 0;\n"]);return g=function(){return e},e}function h(){let e=(0,i._)(["\n color: ",";\n display: block;\n margin-bottom: 5px;\n font-size: 13px;\n font-weight: 600;\n"]);return h=function(){return e},e}function w(){let e=(0,i._)(["\n padding: 15px;\n\n p:first-child {\n margin-top: 0;\n }\n p:last-child {\n margin-bottom: 0;\n }\n"]);return w=function(){return e},e}function _(){let e=(0,i._)(["\n margin-top: 15px;\n\n a {\n text-decoration: none;\n\n &:hover {\n a {\n color: ",";\n }\n }\n }\n"]);return _=function(){return e},e}let v=(0,d.Entity)()(e=>{let{getRelation:n}=e,[t,i]=(0,a.useState)({entityType:"paragraph",bundle:"webform_submissions",submissions:{},next:null,webform_id:""}),[s,d]=(0,a.useState)({}),m=(0,a.useRef)(new Date),y=(0,a.useRef)(null),g=(0,a.useCallback)(async e=>{let n=Math.random().toString(10).substring(2);try{var r,a;let o=e.replace(/^http:\/\/[^/]+\//,"/"),l=await fetch("".concat(f.$.apiBaseUrl).concat(o)),s=await l.json();if(null==s?void 0:s.webform_submissions){let e=s.webform_submissions,r=(0,p.A)(e,{camelizeKeys:!1,camelizeTypeValues:!1});if(r["webform_submission--kommentarer"]){let e=r["webform_submission--kommentarer"]?Object.assign(t.submissions&&Object.keys(t.submissions).length?t.submissions:{},r["webform_submission--kommentarer"]):t.submissions?t.submissions:{};i(t=>({...t,submissions:e,random:n}))}}(null==s||null==(a=s.webform_submissions)||null==(r=a.links)?void 0:r.next)?i(e
1=>({...e,next:s.webform_submissions.links.next.href})):i(e=>({...e,next:""}))}catch(e){console.error("Error fetching next webform submissions:",e)}},[t]),h=(0,a.useCallback)(e=>{d(n=>({...n,["loading-"+e]:!1}))},[]),w=(0,a.useCallback)(()=>{y.current=setInterval(()=>{let e=m.current,n=e.toUTCString(),r=Math.floor(e.getTime()/1e3);m.current=new Date,(async(e,n)=>{let{webform_id:r}=t,a=Math.random().toString(10).substring(2),o=[];o.push("filter[date][condition][path]=changed"),o.push("filter[date][condition][operator]=%3E%3D"),o.push("filter[date][condition][value]=".concat(n)),o.push(a);try{let e=await fetch("/api/wrapper/api/webform_submission/".concat(r,"?").concat(o.join("&"))),n=await e.json();if(null==n?void 0:n.webform_submissions){let e=n.webform_submissions,r=(0,p.A)(e,{camelizeKeys:!1,camelizeTypeValues:!1});if(r["webform_submission--kommentarer"]){let e=r["webform_submission--kommentarer"]?Object.assign(t.submissions&&Object.keys(t.submissions).length?t.submissions:{},r["webform_submission--kommentarer"]):t.submissions?t.submissions:{},n={...s};Object.keys(r["webform_submission--kommentarer"]).forEach(e=>{n["loading-"+e]=!0}),i(n=>({...n,submissions:e,random:a})),d(n)}}}catch(e){console.error("Error fetching webform submissions:",e)}})(0,r)},1e4)},[t,s]);if((0,a.useEffect)(()=>{if(n)return(async()=>{var e,t,r,a;let o=n({field:"field_webform"}),l=(null==o||null==(e=o.attributes)?void 0:e.drupal_internal__id)||"";i(e=>({...e,webform_id:l}));let s=Math.random().toString(10).substring(2),u=[];u.push("sort[sort-created][path]=changed"),u.push("sort[sort-created][direction]=DESC"),u.push(s);try{let e=await fetch("/api/wrapper/api/webform_submission/".concat(l,"?").concat(u.join("&"))),n=await e.json();if(null==n?void 0:n.webform_submissions){let e=n.webform_submissions,o=(0,p.A)(e,{camelizeKeys:!1,camelizeTypeValues:!1});if(o["webform_submission--kommentarer"]&&Object.keys(o["webform_submission--kommentarer"]).length){let n=Object.keys(o["webform_submission--kommentarer"])[0],l=null==(r=o["webform_submission--kommentarer"][n])||null==(t=r.attributes)?void 0:t.changed,s=null;(null==(a=e.links)?void 0:a.next)&&(s=e.links.next.href+"&filter[date][condition][path]=changed&filter[date][condition][operator]=%3C%3D&filter[date][condition][value]="+l),i(e=>({...e,submissions:o["webform_submission--kommentarer"],next:s}))}}}catch(e){console.error("Error fetching initial webform submissions:",e)}})(),w(),()=>{y.current&&clearInterval(y.current)}},[n,w]),!n)return null;let{submissions:_,next:v}=t;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(x,{children:(0,r.jsxs)(c._9,{className:"paragraph-wrap",children:[_&&(0,r.jsx)(o.A,{children:Object.keys(_).sort((e,n)=>_[e].attributes.changed>_[n].attributes.changed?-1:+(_[e].attributes.changed<_[n].attributes.changed)).map(e=>{let n=_[e].attributes.values,t=_[e].attributes.created;return s["loading-"+e]?(0,r.jsx)(l.A,{in:s["loading-"+e],timeout:9e3,classNames:"inserted",onEntered:()=>{h(e)},children:(0,r.jsxs)(b.Row,{className:(s["loading-"+e],""),children:[(0,r.jsx)(j,{children:t}),Object.keys(n).map(t=>{let i=n[t].value.split(/\n+/),a=t+":"+e;return(0,r.jsxs)(E,{children:[(0,r.jsx)(k,{htmlFor:a,children:n[t].label}),(0,r.jsx)("div",{id:a,children:Object.keys(i).map((e,n)=>(0,r.jsx)("p",{children:i[Number(e)]},n))})]},a)})]})},e):(0,r.jsxs)(b.Row,{className:(s["loading-"+e],""),children:[(0,r.jsx)(j,{children:t}),Object.keys(n).map(t=>{let i=n[t].value.split(/\n+/),a=t+":"+e;return(0,r.jsxs)(E,{children:[(0,r.jsx)(k,{htmlFor:a,children:n[t].label}),(0,r.jsx)("div",{id:a,children:Object.keys(i).map((e,n)=>(0,r.jsx)("p",{children:i[Number(e)]},n))})]},a)})]},e)})}),v&&(0,r.jsx)(A,{children:(0,r.jsx)(u.A,{href:"#",onClick:e=>{e.preventDefault(),g(v)},children:"Hent flere"})})]})})})}),x=s.default.div.withConfig({displayName:"WebformSubmissions__InnerWrapper",componentId:"sc-b008b301-0"})(y()),j=s.default.div.withConfig({displayName:"WebformSubmissions__DisplayDate",componentId:"sc-b008b301-1"})(g(),m.Tj.coolGrey),k=s.default.label.withConfig({displayName:"WebformSubmissions__Label",componentId:"sc-b008b301-2"})(h(),m.Tj.blue),E=s.default.div.withConfig({displayName:"WebformSubmissions__Value",componentId:"sc-b008b301-3"})(w()),A=s.default.div.withConfig({displayName:"WebformSubmissions__LinkWrap",componentId:"sc-b008b301-4"})(_(),m.Tj.blue)}}]);
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.