1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[804],{54150:(e,l,s)=>{s.d(l,{A:()=>n});var i=s(74848);function n(e){let{className:l=""}=e;return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:l,children:(0,i.jsx)("path",{d:"M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"})})}},84507:(e,l,s)=>{s.d(l,{A:()=>n});var i=s(74848);function n(e){let{className:l="",strokeColor:s="#101010"}=e;return(0,i.jsx)("svg",{viewBox:"0 0 8 8",xmlns:"http://www.w3.org/2000/svg",className:l,children:(0,i.jsx)("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round",children:(0,i.jsx)("g",{transform:"translate(-639.000000, -227.000000)",stroke:s,strokeWidth:"2",children:(0,i.jsx)("g",{transform:"translate(405.000000, 201.000000)",children:(0,i.jsx)("g",{transform:"translate(228.000000, 20.000000)",children:(0,i.jsxs)("g",{transform:"translate(7.000000, 7.000000)",children:[(0,i.jsx)("line",{x1:"0",y1:"6",x2:"6",y2:"0",id:"Path-2"}),(0,i.jsx)("line",{x1:"0",y1:"6",x2:"6",y2:"0",transform:"translate(3.000000, 3.000000) scale(-1, 1) translate(-3.000000, -3.000000) "})]})})})})})})}},55872:(e,l,s)=>{s.d(l,{A:()=>r});var i=s(74848),n=s(54150);function r(e){let{selected:l=!1,className:s=""}=e;return(0,i.jsx)("span",{className:["checkmark-circle inline-flex h-5 w-5 mr-3 rounded-full border border-black-100/25 items-center justify-center group-hover:bg-good-green-100 group-hover:border-good-green-100 flex-shrink-0",l?"bg-good-green-50 text-black border-good-green-50":"",s].join(" "),children:l&&(0,i.jsx)(n.A,{className:"w-2 h-2"})})}},50804:(e,l,s)=>{s.r(l),s.d(l,{default:()=>w});var i=s(74848),n=s(33263),r=s.n(n),t=s(49785),a=s(96540),o=s(3790),d=s(98146);function c(e){let{className:l="",fillColor:s="#101010"}=e;return(0,i.jsx)("svg",{viewBox:"0 0 10 8",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:"".concat(l),children:(0,i.jsx)("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,i.jsx)("g",{transform:"translate(-440.000000, -585.000000)",fill:s,fillRule:"nonzero",children:(0,i.jsx)("g",{transform:"translate(415.000000, 429.000000)",children:(0,i.jsx)("g",{transform:"translate(0.000000, 140.000000)",children:(0,i.jsx)("path",{d:"M33.2592597,16.3282085 C33.6302799,15.9191089 34.262692,15.8882395 34.6717915,16.2592597 C35.0494219,16.6017399 35.1047733,17.1669445 34.819237,17.5736404 L34.7407403,17.6717915 L29.2992255,23.6717915 C28.9306959,24.0781449 28.3113854,24.1071701 27.90703,23.7588672 L27.817745,23.6717915 L25.2592597,20.8507184 C24.8882395,20.4416188 24.9191089,19.8092068 25.3282085,19.4381866 C25.7058388,19.0957064 26.2737473,19.0956647 26.6507008,19.4194526 L26.7407403,19.5071353 L28.558,21.511 L33.2592597,16.3282085 Z"})})})})})})}var u=s(84507);function v(e){let{className:l="",isActive:s}=e;return(0,i.jsxs)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",className:l,xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("rect",{width:"40",height:"40",rx:"20",fill:s?"#000000":"#ECF2CA"}),(0,i.jsx)("path",{d:"M10.5875 10.55C10.175 10.2875 9.6125 10.4 9.35 10.8125C9.05 11.225 9.1625 11.7875 9.575 12.05L11.375 13.25C11.7875 13.55 12.35 13.4375 12.65 13.025C12.9125 12.6125 12.8 12.05 12.3875 11.75L10.5875 10.55ZM30.3875 12.05C30.8 11.7875 30.9125 11.225 30.65 10.8125C30.35 10.4 29.7875 10.2875 29.375 10.55L27.575 11.75C27.1625 12.05 27.05 12.6125 27.35 13.025C27.6125 13.4375 28.175 13.55 28.5875 13.25L30.3875 12.05ZM8.9 16.4C8.375 16.4 8 16.8125 8 17.3C8 17.825 8.375 18.2 8.9 18.2H11.3C11.7875 18.2 12.2 17.825 12.2 17.3C12.2 16.8125 11.7875 16.4 11.3 16.4H8.9ZM28.7 16.4C28.175 16.4 27.8 16.8125 27.8 17.3C27.8 17.825 28.175 18.2 28.7 18.2H31.1C31.5875 18.2 32 17.825 32 17.3C32 16.8125 31.5875 16.4 31.1 16.4H28.7ZM12.3875 22.85C12.8 22.5875 12.9125 22.025 12.65 21.6125C12.35 21.2 11.7875 21.0875 11.375 21.35L9.575 22.55C9.1625 22.85 9.05 23.4125 9.35 23.825C9.6125 24.2375 10.175 24.35 10.5875 24.05L12.3875 22.85ZM28.5875 21.3875C28.175 21.0875 27.6125 21.2 27.35 21.6125C27.05 22.025 27.1625 22.5875 27.575 22.8875L29.375 24.0875C29.7875 24.35 30.35 24.2375 30.65 23.825C30.9125 23.4125 30.8 22.85 30.3875 22.5875L28.5875 21.3875ZM24.8 17C24.8 18.05 24.4625 18.9875 23.9375 19.7375C23.7875 19.9625 23.6375 20.1875 23.45 20.4125C22.9625 21.0875 22.4 21.875 21.95 22.6625C21.575 23.375 21.3875 24.125 21.275 24.8H23.1125C23.1875 24.35 23.3 23.9375 23.525 23.525C23.9 22.85 24.3875 22.2125 24.8375 21.575C25.025 21.3125 25.2125 21.05 25.4 20.7875C26.15 19.7 26.6 18.425 26.6 17C26.6 13.3625 23.6375 10.4 20 10.4C16.325 10.4 13.4
113.3625 13.4 17C13.4 18.425 13.8125 19.7 14.5625 20.7875C14.75 21.05 14.9375 21.3125 15.125 21.575C15.6125 22.2125 16.0625 22.85 16.4375 23.525C16.6625 23.9375 16.775 24.35 16.8875 24.8H18.6875C18.6125 24.125 18.3875 23.375 18.0125 22.6625C17.5625 21.875 17 21.0875 16.5125 20.4125C16.325 20.1875 16.175 19.9625 16.025 19.7375C15.5 18.9875 15.2 18.05 15.2 17C15.2 14.375 17.3375 12.2 20 12.2C22.625 12.2 24.8 14.375 24.8 17ZM18.2 17C18.2 16.025 18.9875 15.2 20 15.2C20.3 15.2 20.6 14.9375 20.6 14.6C20.6 14.3 20.3 14 20 14C18.3125 14 17 15.35 17 17C17 17.3375 17.2625 17.6 17.6 17.6C17.9 17.6 18.2 17.3375 18.2 17ZM23 26.6V26H17V26.6C17 28.2875 18.3125 29.6 20 29.6C21.65 29.6 23 28.2875 23 26.6Z",fill:s?"white":"black"})]})}var h=s(55872),m=s(64331),x=s(46942),C=s.n(x),g=s(65510),f=s.n(g),j=s(95916);function w(e){var l,s,n,r,v,x,g,j,w,N,k,q;let{form:z,field:L,isArticle:M}=e,{register:A,formState:I,watch:y}=(0,t.xW)(),[H,F]=(0,a.useState)([]),{errors:Z}=I,[_,E]=(0,a.useState)(!1),P=(0,m.useMediaPredicate)("(max-width: 1024px)"),R=null!==(N=null==z?void 0:z.showAlphabet)&&void 0!==N&&N;(0,a.useEffect)(()=>(E(!0),()=>{}),[]);let D=y(L.id),S=!!((null==z?void 0:null===(l=z.quiz)||void 0===l?void 0:l.instantFeedback)&&D);0===H.length&&F(L.randomizeChoices?[...(0,d.R3)(L.choices)]:[...L.choices]);let W=e=>{var l;let{correct:s}=e;return(null==z?void 0:null===(l=z.quiz)||void 0===l?void 0:l.customAnswerIndicator)?(0,i.jsx)("span",{className:"inline-block w-4 h-4 mt-1.5 rounded-full bg-black-100/30"}):s?(0,i.jsx)(c,{className:"inline-block w-5 h-5",fillColor:"#00852E"}):(0,i.jsx)(u.A,{className:"inline-block w-4 h-4",strokeColor:"#AF3E3C"})},B=[f().quizWrapper,{"is-section":!M&&(null==z?void 0:null===(s=z.quiz)||void 0===s?void 0:s.multiplePerPage)&&(null==z?void 0:null===(n=z.quiz)||void 0===n?void 0:n.hasImages)}];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:C()(B),children:[(0,i.jsxs)("span",{className:"block text-xs font-medium uppercase mb-4.5",children:["Fr\xe5ga ",L.questionIndex," av ",null==z?void 0:null===(r=z.quiz)||void 0===r?void 0:r.numberOfQuestions]}),(0,i.jsx)(p,{format:null!==(k=null==z?void 0:null===(v=z.quiz)||void 0===v?void 0:v.imageFormat)&&void 0!==k?k:"4:3",field:L,isHidden:!M&&!P,isArticle:M,hasMounted:_}),"hidden"!==L.labelPlacement&&(0,i.jsxs)("h2",{className:"mb-3",children:[L.label,L.isRequired&&(0,i.jsx)("span",{className:"ml-1 text-red-100",children:"*"})]}),(0,i.jsx)("p",{className:"text-base",children:L.description}),(0,i.jsx)("div",{className:C()(["w-full mt-4",S?"pointer-events-none":""]),children:H.map((e,l)=>{var s,n,r;let t=String.fromCharCode(97+l);t=t&&t.toUpperCase();let a=D===e.value;return(0,i.jsxs)("label",{className:C()({selected:a,"is-incorrect":a&&!e.gquizIsCorrect}),children:[(0,i.jsx)("input",{id:"".concat(L.id,"_").concat(l),name:L.id,type:"radio",className:"hidden","aria-invalid":Z[L.id]?"true":"false",value:e.value,...A(L.id,{required:{value:L.isRequired,message:null!==(r=L.errorMessage)&&void 0!==r?r:"Detta f\xe4lt \xe4r obligatoriskt"}})}),(0,i.jsxs)("div",{suppressHydrationWarning:!0,className:"flex items-center text-lg font-bold",children:[(0,i.jsx)(h.A,{selected:a,className:C()({"is-incorrect":a&&!e.gquizIsCorrect})}),R&&(0,i.jsxs)("span",{className:"pr-1 font-bold",children:[t,"."]}),e.text,(null==z?void 0:null===(s=z.quiz)||void 0===s?void 0:s.instantFeedback)&&D===e.value&&(0,i.jsx)("div",{className:C()("answer-icon",{"is-correct":e.gquizIsCorrect}),children:(0,i.jsx)(W,{correct:e.gquizIsCorrect})}),(null==z?void 0:null===(n=z.quiz)||void 0===n?void 0:n.instantFeedback)&&D&&D!==e.value&&e.gquizIsCorrect&&(0,i.jsx)("div",{className:C()("answer-icon",{"is-correct":e.gquizIsCorrect}),children:(0,i.jsx)(W,{correct:e.gquizIsCorrect})})]})]},"".concat(L.id,"_").concat(l))})}),(null==z?void 0:null===(x=z.quiz)||void 0===x?void 0:x.instantFeedback)&&L.showExplanation&&D&&(0,i.jsx)("p",{className:"explanation",dangerouslySetInnerHTML:{__html:L.explanation}}),(0,i.jsx)(b,{hint:null==L?void 0:L.hintData,isNarrow:P}),Z[L.id]&&(0,i.jsx)(o.Kw,{children:Z[L.id].message})]}),(null==z?void 0:null===(g=z.quiz)||void 0===g?void 0:g.hasImages)&&(null==z?void 0:null===(j=z.quiz)||void 0===j?void 0:j.multiplePerPage)&&(0,i.jsx)("div",{className:C()(B),children:(0,i.jsx)(p,{format:null!==(q=null==z?void 0:null===(w=z.quiz)||void 0===w?void 0:w.imageFormat)&&void 0!==q?q:"4
1:3",field:L,isHidden:!M&&P,isArticle:M,hasMounted:_})})]})}let p=e=>{var l,s,n;let{format:t,field:a,isHidden:o,isArticle:d,hasMounted:c}=e;if(!c||o||!(null==a?void 0:null===(l=a.imageData)||void 0===l?void 0:l.url))return null;let u=[f().contentImage,{"not-article":!d,"format-4-3":"4:3"===t,"format-16-9":"16:9"===t,"format-square":"square"===t}];return(0,i.jsxs)("figure",{className:C()(u),children:[(0,i.jsx)("div",{className:"flex items-center justify-center w-full h-full",children:(0,i.jsx)(j.A,{className:"w-8 h-8 opacity-25"})}),(0,i.jsx)(r(),{className:"object-cover object-center w-full h-full",src:null==a?void 0:null===(s=a.imageData)||void 0===s?void 0:s.url,alt:null==a?void 0:null===(n=a.imageData)||void 0===n?void 0:n.alt,sizes:"(max-width: 768px) 100vw, 50vw",layout:"fill"})]},a.imageData)},b=e=>{let{hint:l,isNarrow:s}=e,[n,r]=(0,a.useState)(!1),t=(0,a.useRef)(null);if(!l||0===l.text.length)return null;let o=()=>{clearTimeout(t.current),r(!n)},d=()=>{if(!n||s)return!1;t.current=window.setTimeout(()=>{r(!1)},1e3)};return(0,i.jsxs)("div",{className:"hint-wrapper",onClick:()=>o(),onMouseLeave:()=>d(),children:[(0,i.jsxs)("div",{className:"toggle",children:[(0,i.jsx)(v,{className:"lightbulb",isActive:n}),l.toggle]}),(0,i.jsx)("div",{className:C()("chat-bubble",{"is-active":n}),children:(0,i.jsx)("p",{dangerouslySetInnerHTML:{__html:l.text}})})]})}}}]); 2//# sourceMappingURL=804.4193630cc5b1d23f.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.