PageSourceSearch

https://skat.dk/_next/static/chunks/5479.7b6418dbb4a4b8c6.js

js skat.dk collected 2026-09-24 08:32:26 UTC 4,390 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5479],{15479:function(e,s,r){"use strict";r.r(s),r.d(s,{QuizScoreFeature:function(){return z}});var t=r(85893),o=r(94184),n=r.n(o),i=r(94894),u=r(67294),_=r(16485),a=r.n(_);let l=e=>{let{step:s,steps:r}=e,o=e=>e+1===r&&s>r?a().ProgressBar_end:e+1===s?a().ProgressBar_active:e+1<s?a().ProgressBar_done:a().ProgressBar_step,n=e=>e+1===r?"":e>=s-1?a().ProgressBar_dottedLine:a().ProgressBar_line;return(0,t.jsx)("ol",{className:a().ProgressBar,children:Array.from({length:r},(e,s)=>(0,t.jsx)("li",{className:o(s),children:(0,t.jsx)("div",{className:n(s)})},s))})};var c=r(26680),d=r(95027),g=r.n(d);let x=e=>{let{backButton:s,nextQuestionHandler:r,noButton:o,question:n,prevQuestionHandler:u,score:_,stepIndex:a,yesButton:l}=e;return(0,t.jsxs)("div",{className:g().Question,children:[(0,t.jsx)(i.X,{headingLevel:"h3",style:"md",children:n}),(0,t.jsxs)("div",{className:g().Question_buttonsWrapper,children:[(0,t.jsx)("div",{children:a>0&&(0,t.jsx)(c._N,{icon:"ArrowLeft",label:s,onClick:()=>{u()},type:"button"})}),(0,t.jsxs)("div",{className:g().Question_buttons,children:[(0,t.jsx)(c.zx,{buttonSize:"medium",className:g().Question_button,onClick:()=>{r(0)},children:o}),(0,t.jsx)(c.zx,{buttonSize:"medium",className:g().Question_button,onClick:()=>{r(_)},children:l})]})]})]})};var Q=r(99626),p=r.n(Q),B=r(94594),h=r(82436),P=r.n(h);let S=e=>{let{headline:s,resetButton:r,resetHandler:o,score:n,text:u}=e;return(0,t.jsxs)("div",{className:P().Result,children:[(0,t.jsx)(i.X,{headingLevel:"h3",style:"md",children:s}),(0,t.jsx)(B.H,{content:null==u?void 0:u.markup}),(0,t.jsx)(c.zx,{buttonSize:"medium",className:P().Result_button,onClick:o,children:r})]})},b=e=>{let{backgroundColor:s,dataTrackingHandler:r,properties:o}=e,{backButton:_,headline:a,noButton:c,questions:d,resetButton:g,results:Q,text:B,yesButton:h}=null!=o?o:{},P=null==d?void 0:d.items.length,[b,m]=(0,u.useState)(0),[v,z]=(0,u.useState)(),[j,N]=(0,u.useState)(),[f,R]=(0,u.useState)([]);return(0,u.useEffect)(()=>{b<P&&z(d.items[b].content.properties)},[b]),(0,u.useEffect)(()=>{if(b===P){let e=f.reduce((e,s)=>e+s,0),s=Q.items.filter(s=>e>=s.content.properties.score).reduce((e,s)=>s.content.properties.score>e.content.properties.score?s:e).content.properties;r("Quiz Score - total score: ".concat(e)),N(s)}},[b]),(0,t.jsxs)("div",{className:n()(p().QuizScore,"u-bg-color--".concat(s)),children:[(0,t.jsx)(i.X,{className:p().QuizScore_headline,headingLevel:"h2",style:"lg",children:a}),(0,t.jsx)("div",{className:p().QuizScore_introText,children:B}),(0,t.jsxs)("div",{className:n()(p().QuizScore_container,"u-bg-color--white"),children:[(0,t.jsx)(l,{step:b+1,steps:P}),b<P&&(0,t.jsx)(x,{...v,backButton:_,nextQuestionHandler:e=>{f[b]=e,R(f),m(b+1)},noButton:c,prevQuestionHandler:()=>{m(b-1)},stepIndex:b,yesButton:h}),b===P&&(0,t.jsx)(S,{...j,resetButton:g,resetHandler:()=>{m(0)}})]})]})};var m=r(75237),v=r(84739);let z=e=>{var s;let{content:r,settings:o}=e,{backgroundColor:n,moduleMarginBottom:i,noTopMargin:u}=null!==(s=null==o?void 0:o.properties)&&void 0!==s?s:{};return(0,t.jsx)(m.E,{moduleMarginBottom:i,noTopMargin:u,children:(0,t.jsx)(b,{...r,backgroundColor:null==n?void 0:n.toLocaleLowerCase(),dataTrackingHandler:e=>{(0,v.d)("pageView",e)}})})}},16485:function(e){e.exports={ProgressBar:"ProgressBar_ProgressBar__0v6j0",ProgressBar_line:"ProgressBar_ProgressBar_line__QAJoC",ProgressBar_dottedLine:"ProgressBar_ProgressBar_dottedLine__I0dUO",ProgressBar_done:"ProgressBar_ProgressBar_done__ZOO6z",ProgressBar_active:"ProgressBar_ProgressBar_active__XqF07",ProgressBar_step:"ProgressBar_ProgressBar_step__i_LRS",ProgressBar_end:"ProgressBar_ProgressBar_end__MNOzs"}},95027:function(e){e.exports={Question:"Question_Question__0S_Fu",Question_buttonsWrapper:"Question_Question_buttonsWrapper__qfhzw",Question_buttons:"Question_Question_buttons__457os",Question_button:"Question_Question_button__nScGl"}},99626:function(e){e.exports={QuizScore:"QuizScore_QuizScore__r9XNB",QuizScore_headline:"QuizScore_QuizScore_headline__dB_NR",QuizScore_introText:"QuizScore_QuizScore_introText__POxsi",QuizScore_container:"QuizScore_QuizScore_container__E10l9"}},82436:function(e){e.exports={Result:"Result_Result__laTqR",Result_buttons:"Result_Result_buttons__wZrHb",Result_button:"Result_Result_button__xPJwL"}}}]);
2//# sourceMappingURL=5479.7b6418dbb4a4b8c6.js.map

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.