1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9739],{54941:function(e,t,n){"use strict";n.r(t),n.d(t,{QuizFeature:function(){return x}});var l=n(85893),i=n(16740),r=n(75237),o=n(94894),s=n(94594),a=n(86633),u=n(13705),c=n(66906),v=n(67294);function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)({}).hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e}).apply(null,arguments)}var g=function(e){return v.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:32,height:32},e),v.createElement("circle",{cx:16,cy:16,r:16,style:{fill:"#ff010e"}}),v.createElement("path",{d:"M14.6 20.5c0-.4.1-.8.4-1s.6-.3 1-.3.8.1 1 .3.4.6.4 1-.1.7-.4 1c-.2.2-.6.4-1 .4s-.8-.1-1-.3c-.2-.4-.4-.7-.4-1.1m2.4-2.7h-1.9l-.4-7.6h2.7z",style:{fill:"#fff"}}))},p=n(35926),_=n.n(p);let h=e=>{let{actions:t,answers:n,description:i,explainer:r,texts:d,title:p,progress:h,question:x,requestChange:m}=e,[w,f]=(0,v.useState)(null),[N,Q]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{f(null)},[h]),(0,l.jsx)("div",{className:_().Quiz,children:(0,l.jsxs)("div",{className:_().Quiz_wrapper,children:[h&&(0,l.jsx)("div",{className:_().Quiz_progress,children:h}),(0,l.jsx)(o.X,{className:_().Quiz_title,headingLevel:"h2",style:"md",children:p}),i&&(0,l.jsx)(s.H,{content:i}),x&&n&&!N&&(0,l.jsx)(u.xO,{name:x.replaceAll(" ",""),choosenOption:e=>{f(null==e?void 0:e.dependency)},question:x,options:n,style:"blocked"}),null!=w&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:_().Quiz_reveal,children:w?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.Z,{}),(0,l.jsx)("p",{children:d.answerIsCorrect})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(g,{}),(0,l.jsx)("p",{children:d.answerIsIncorrect})]})}),(0,l.jsx)(s.H,{content:r})]}),(0,l.jsx)(a.N,{actions:t,emitAction:e=>{Q(!0),m(e,w),setTimeout(()=>{Q(!1)},1)},disableNext:(null==n?void 0:n.length)>0&&null===w})]})})},x=e=>{var t,n,o,s,a,u,c,d,g,p,_;let{content:x,settings:m}=e,{introDescription:w,introTitle:f,quizSteps:N,resultDescription:Q,resultTitle:j}=null!==(p=null==x?void 0:x.properties)&&void 0!==p?p:{},{hideFrontpage:z}=null!==(_=null==m?void 0:m.properties)&&void 0!==_?_:{},b=(0,i.S)(),[F,y]=(0,v.useState)(0),[k,E]=(0,v.useState)(null),[C,A]=(0,v.useState)(null==N?void 0:null===(t=N.items)||void 0===t?void 0:t.map(()=>!1)),O=F-1,S=0===F,I=O===(null==N?void 0:null===(n=N.items)||void 0===n?void 0:n.length),M={actions:{start:S?b.getAction("Start"):null,next:F>0&&O<(null==N?void 0:null===(o=N.items)||void 0===o?void 0:o.length)?b.getAction("Next"):null,back:1===F&&z?null:F>0?b.getAction("Back"):null,restart:O===(null==N?void 0:null===(s=N.items)||void 0===s?void 0:s.length)?b.getAction("Restart"):null},texts:{answerIsCorrect:b.getQuiz("CorrectAnswer"),answerIsIncorrect:b.getQuiz("WrongAnswer")}},T="\n <p>\n ".concat(b.getQuiz("NumberOfQuestions"),": ").concat(null==N?void 0:null===(a=N.items)||void 0===a?void 0:a.length,"\n </p>"),L="\n <p>\n ".concat(b.getQuiz("YouHaveCompletedQuizAndReceived")," \n ").concat(null==C?void 0:null===(u=C.filter(e=>!0===e))||void 0===u?void 0:u.length,"/").concat(null==N?void 0:null===(c=N.items)||void 0===c?void 0:c.length,"\n ").concat(b.getQuiz("CorrectAnswers").toLowerCase(),".\n </p>");(0,v.useEffect)(()=>{var e,t,n,l,i;if(S&&z)return y(1);if(S)return E(null);let{question:r,answers:o,explainer:s,description:a}=null!==(i=null==N?void 0:null===(n=N.items)||void 0===n?void 0:null===(t=n[O])||void 0===t?void 0:null===(e=t.content)||void 0===e?void 0:e.properties)&&void 0!==i?i:{};E({question:r,description:I?L.concat(null==Q?void 0:Q.markup):null==a?void 0:a.markup,answers:null==o?void 0:null===(l=o.items)||void 0===l?void 0:l.map(e=>{var t,n;let{label:l,answerIsCorrect:i}=null!==(n=null==e?void 0:null===(t=e.content)||void 0===t?void 0:t.properties)&&void 0!==n?n:{};return{label:l,dependency:i,value:l}}),explainer:null==s?void 0:s.markup})},[F,z,S,N,I,L,Q,O]);let H=e=>{let t=[...C];t[O]=e,A(t)};return(0,l.jsx)(r.E,{...m,children:(0,l.jsx)(h,{progress:S||I?null:"".concat(b.getLabel("Question")," ").concat(F,"/").concat(null==N?void 0:null===(d=N.items)||void 0===d?void 0:d.length),title:S&&f||I&&j,description:S&&(null==w?void 0:null===(g=w.markup)||void 0===g?void 0:g.concat(T))||(null==k?void 0:k.description),...M,...k,requestChange:(e,t)=>
1(S||I||H(t),"next"===e||"start"===e)?y(F+1):"back"===e?y(O):"restart"===e?y(0):void 0})})}},9133:function(e,t,n){"use strict";n.d(t,{B:function(){return a}});var l=n(85893),i=n(94184),r=n.n(i),o=n(56815),s=n.n(o);let a=e=>{let{className:t,id:n,children:i}=e;return(0,l.jsx)("div",{id:n,className:r()(s().ErrorMessage,t),children:i})}},86633:function(e,t,n){"use strict";n.d(t,{N:function(){return c}});var l=n(85893),i=n(26680),r=n(67294);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)({}).hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e}).apply(null,arguments)}var s=function(e){return r.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:37.8,height:37.8},e),r.createElement("circle",{cx:18.9,cy:18.9,r:18.9,style:{fill:"#14143c"}}),r.createElement("path",{d:"M18.9 10c-3.2 0-6 1.7-7.6 4.2v-3.5H9.9v5.9h5.9v-1.4h-3.4c1.3-2.3 3.8-3.8 6.5-3.8 4.2 0 7.6 3.4 7.6 7.6s-3.4 7.6-7.6 7.6c-3.4 0-6.3-2.3-7.2-5.4h-1.5c1 3.9 4.5 6.8 8.7 6.8 5 0 9-4 9-9s-4-9-9-9",style:{fill:"#fff"}}))},a=n(25417),u=n.n(a);let c=e=>{let{actions:t,disableNext:n=!1,emitAction:r,typeSubmit:o=!1}=e,{start:a,next:c,back:v,restart:d}=null!=t?t:{};return(0,l.jsxs)("div",{className:u().FlowNavigation,children:[(null!=a?a:c)&&(0,l.jsx)(i.zx,{className:u().FlowNavigation_next,onClick:()=>r(a?"start":"next"),disabled:n,type:o?"submit":"button",children:a||c}),v&&(0,l.jsx)(i._N,{icon:"ArrowLeft",label:v,onClick:()=>r("back"),type:"button"}),d&&(0,l.jsxs)("button",{className:u().FlowNavigation_restart,onClick:()=>r("restart"),type:"button",children:[(0,l.jsx)(s,{})," ",(0,l.jsx)("span",{className:u().FlowNavigation_restartText,children:d})]})]})}},56815:function(e){e.exports={ErrorMessage:"ErrorMessage_ErrorMessage__6cnos"}},25417:function(e){e.exports={FlowNavigation:"FlowNavigation_FlowNavigation__GX6Ct",FlowNavigation_next:"FlowNavigation_FlowNavigation_next__8lYOX",FlowNavigation_restart:"FlowNavigation_FlowNavigation_restart__sECZA",FlowNavigation_restartText:"FlowNavigation_FlowNavigation_restartText__Dj5QN"}},35926:function(e){e.exports={Quiz:"Quiz_Quiz__LU90T",Quiz_wrapper:"Quiz_Quiz_wrapper__KxTzh",Quiz_progress:"Quiz_Quiz_progress__FgvOV",Quiz_title:"Quiz_Quiz_title__6NQnv",Quiz_reveal:"Quiz_Quiz_reveal__RVKgo"}}}]);
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.