1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="de6e8467-a185-4e88-a510-2d4d1d736af0",e._sentryDebugIdIdentifier="sentry-dbid-de6e8467-a185-4e88-a510-2d4d1d736af0")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7492],{71:e=>{e.exports={inputRadio:"TemplateSelector_inputRadio__p2seY",label:"TemplateSelector_label__fiF_Q"}},14551:e=>{e.exports={defaultRadio:"ThemeSelector_defaultRadio__nWYCc",radioLabel:"ThemeSelector_radioLabel__orMe8",inputRadio:"ThemeSelector_inputRadio__prbu4",srOnlyInput:"ThemeSelector_srOnlyInput__m_d1v",themeImage:"ThemeSelector_themeImage__LDXWG",controlElement:"ThemeSelector_controlElement__y51oh",inputRadioControl:"ThemeSelector_inputRadioControl__9Xrq4",label:"ThemeSelector_label__9HUda",selected:"ThemeSelector_selected__m2D9H"}},69807:(e,t,a)=>{"use strict";a.d(t,{A:()=>m,r:()=>d});var l=a(37876),s=a(69241),n=a(59232),i=a(14232),r=a(88992),o=a(92814),c=a.n(o);let d=i.createContext({});function m(e){let{name:t,label:a,children:o,error:m,className:u,defaultValue:p,onChange:_,isRequired:g,useColon:h=!0,style:b,enableError:x}=e,{t:v}=(0,n.Bd)("common"),f=e=>e.replace(/[A-Z]/g,e=>"_".concat(e.toLowerCase())),S=a||v("/form/label/".concat(f(t))),y="radiogroup-".concat(t,"-").concat(i.useId()),[D,j]=i.useState(null!=p?p:null),N=i.useCallback(e=>{j(e),null!=e&&(null==_||_(e))},[_]),T=i.useMemo(()=>({name:t,selectedValue:D,setSelectedValue:N}),[t,D,N]),{formState:{errors:k}}=(0,r.xW)(),A=k[t],C=m||v("/form/error/".concat(f(t)));return(0,l.jsxs)(l.Fragment,{children:[a&&(0,l.jsx)("label",{id:y,className:(0,s.A)(c().label,u.label),children:"".concat(S).concat(h?":":"")}),(0,l.jsx)("div",{role:"radiogroup","aria-labelledby":a?y:void 0,"aria-required":g||void 0,className:u.body,style:{...b},children:(0,l.jsx)(d.Provider,{value:T,children:o})}),x&&A&&!!C.length&&(0,l.jsx)("div",{className:(0,s.A)(c().error,u.error),children:C})]})}},69967:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});let l=a(69807).A},82124:e=>{e.exports={designStepWrapper:"DesignStep_designStepWrapper__DBg4m",columns:"DesignStep_columns__vFd18",column:"DesignStep_column__h8_Kv",buttonList:"DesignStep_buttonList__sVvAv",textarea:"DesignStep_textarea__V1_Ex",customPrice:"DesignStep_customPrice__T8wm4",customPriceNotice:"DesignStep_customPriceNotice__ugyRc",portableText:"DesignStep_portableText__yPQEl",message:"DesignStep_message__cwI27",themesWrapper:"DesignStep_themesWrapper__NG1hB",themesAndTemplates:"DesignStep_themesAndTemplates__42Ckw",templates:"DesignStep_templates__zbET4",templatesVisible:"DesignStep_templatesVisible__qKPSV",themesSelection:"DesignStep_themesSelection__wd67o",themeImage:"DesignStep_themeImage__CJkfj",imageSelection:"DesignStep_imageSelection__93i7T"}},92814:e=>{e.exports={root:"RadioGroup_root___VoF2",error:"RadioGroup_error__Nbhfm"}},95441:e=>{e.exports={radioLabel:"PriceRadioButton_radioLabel__LAhay",inputRadio:"PriceRadioButton_inputRadio___i791",controlElement:"PriceRadioButton_controlElement__it4gU",priceSelected:"PriceRadioButton_priceSelected__Da8uE",label:"PriceRadioButton_label__1_Ahf"}},97492:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>k});var l=a(37876),s=a(82124),n=a.n(s),i=a(69241),r=a(4076),o=a(50449),c=a(14232),d=a(69807),m=a(88992),u=a(95441),p=a.n(u);let _=function(e){let{isDefaultValue:t=!1,name:a,value:s,label:n,isCustomPriceProvided:r,resetCustomPrice:o,setDisplayKlarna:u,ariaLabel:_}=e,g=(0,c.useContext)(d.r),{setSelectedValue:h,selectedValue:b}=g,{register:x,setValue:v}=(0,m.xW)(),{onChange:f,...S}=x(a),y=(0,c.useCallback)(e=>{h(s),f(e),o(),v(a,s),u(!1)},[a,f,o,u,h,v,s]);(0,c.useEffect)(()=>{void 0===b&&t&&(h(s),v(a,s)),r&&""!==b&&(h(""),v(a,""))},[t,a,s,v,b,h,r]);let D=b===s;return(0,l.jsxs)("label",{className:(0,i.A)(p().radioLabel,n,D&&p().priceSelected),children:[(0,l.jsx)("input",{type:"radio",...S,name:g.name,"aria-label":_,className:p().inputRadio,value:s,checked:D,onChange:y}),(0,l.jsx)("div",{className:(0,i.A)(p().controlElement),children:(0,l.jsx)("p",{className:p().label,children:n})})]})};var g=a(69967),h=a(34796),b=a(14551),x=a.n(b);let v=function(e){var t;let{className:a,isDefaultValue:s,value:n,image:r,title:o,setDisplayKlarna:m}=e,u=(0,c.useContext)(d.r),{selectedValue:p,setSelectedValue:_}=u;(0,c.useEffect)(()=>{!p&&s&&_(n)},[s,n,u,p,_]);let g=p===n,b=(0,c.useCallback)(()=>{_(n),m(!1)},[m,_,n]);return(0,l.jsxs)("label",{className:(0,i.A)(p?x().radioLabel:x().defaultRadio,null==a?void 0:a.label,g&&x().selected),children:[(0,l.jsx)("input",{type:"radio",name:u.name,disabled:e.isDisabled,checked:g,"aria-label":'Select theme "'.concat(o,'" to proceed with templates'),className:x().srO
1nlyInput,value:n,onChange:b}),(0,l.jsx)(h.A,{src:r,alt:null!=(t=(null==r?void 0:r.alt)||(null==r?void 0:r.caption))?t:"",placeholder:"empty",className:x().themeImage,priority:(null==r?void 0:r.preLoad)||!0}),(0,l.jsx)("p",{children:o})]})};var f=a(71),S=a.n(f);let y=(e,t,a)=>{let l=t.find(t=>{var a;return(null==t||null==(a=t.idEmail)?void 0:a.toString())===(null==e?void 0:e.toString())});return a.message||a.isDeleted?a.message:(null==l?void 0:l.predefinedText)||""},D=function(e){let{alt:t,className:a,value:s,src:n,name:r,isDefaultValue:o,templatesIdsMapping:u=[],customMessage:p,setTemplate:_,setMessage:g,setDisplayKlarna:b}=e,x=(0,c.useContext)(d.r),{selectedValue:v,setSelectedValue:f}=x,{register:D,setValue:j,getValues:N}=(0,m.xW)(),{onChange:T,...k}=D(r),A=(0,c.useCallback)(e=>{T(e),f(s),j(r,s),j("messageText",y(s,u,p)),_(n),g(y(s,u,p)),b(!1)},[p,r,T,b,g,f,_,j,n,u,s]);(0,c.useEffect)(()=>{!v&&o&&(f(s),j(r,s),j("messageText",y(s,u,p)),_(n))},[s,x,v,f,o,j,r,e,u,N,p,_,n]);let C=v===s;return C&&(j("messageText",y(s,u,p)),_(n)),(0,l.jsxs)("label",{className:(0,i.A)(S().label,C&&S().selected),children:[(0,l.jsx)("input",{type:"radio","aria-label":"Select gift cards template",disabled:e.isDisabled,...k,className:S().inputRadio,value:s,checked:C,onChange:A}),(0,l.jsx)(h.A,{src:n,alt:t,className:a,priority:!0,placeholder:"empty",fill:!0})]})};var j=a(59232),N=a(18847);let T=a.n(N)()(()=>Promise.all([a.e(2281),a.e(1652)]).then(a.bind(a,81652)),{loadableGenerated:{webpack:()=>[81652]}});function k(e){var t,a,s,d;let{designStepData:{designStepTitle:m,designStepFormTitle:u,giftPriceOptions:p,designStepDescription:h,customPricePlaceholder:b,customPriceMin:x,customPriceMax:f,messageTextLimit:S,messageTextPlaceholder:y,messageTextTitle:N,themesTitle:k,themeOneTitle:I,themeTwoTitle:R,themeThreeTitle:E,themeOneImage:w,themeTwoImage:L,themeThreeImage:P,themeOneTemplates:M=[],themeTwoTemplates:V=[],themeThreeTemplates:W=[],templatesIdsMapping:B=[]},customPrice:K,resetCustomPrice:G,methods:F,giftCardPreview:U,setDisplayKlarna:q}=e,{t:H}=(0,j.Bd)("giftcards-page"),[O,Q]=(0,c.useState)({message:"",isDeleted:!1}),[X,Y]=(0,c.useState)(""),[z,J]=(0,c.useState)((null==(a=M[0])||null==(t=a.image)?void 0:t.slice(1,-1))||""),[Z,$]=(0,c.useState)("1"),ee=null!=(d=({1:M,2:V,3:W})[Z])?d:[];return(0,l.jsxs)("div",{className:n().designStepWrapper,children:[(0,l.jsx)("h2",{children:m}),!!(null==h?void 0:h.length)&&(0,l.jsx)("div",{className:n().portableText,children:(0,l.jsx)(r.A,{containerWidth:"narrowWidth",value:h})}),(0,l.jsxs)("div",{className:n().columns,children:[(0,l.jsxs)("div",{className:n().column,children:[(0,l.jsx)("h3",{children:u}),(0,l.jsx)(g.A,{name:"priceSelection",className:{body:n().buttonList},children:!!(null==p?void 0:p.length)&&p.sort((e,t)=>e.priceValue>t.priceValue?1:-1).map(e=>e&&(0,l.jsx)(_,{ariaLabel:"".concat(u,": ").concat(e.priceValue.toString()," kr"),name:"cardPrice",value:e.priceValue.toString(),label:e.label,isCustomPriceProvided:K>0,resetCustomPrice:G,setDisplayKlarna:q},e._key))}),(0,l.jsx)(o.A,{label:null!=b?b:"Ange pris mellan ".concat(x," kr och ").concat(f," kr"),name:"customPrice",enableLabel:!1,hideLabel:!0,placeholder:b||"",useColon:!1,maxLength:5,fullWidth:!0,className:{input:n().customPrice},onKeyDown:e=>{["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Home","End","Enter"].includes(e.key)||e.metaKey||e.ctrlKey||/^\d$/.test(e.key)||e.preventDefault()},error:H("/giftcards/page/form/error/custom_price")}),(0,l.jsx)("span",{className:n().customPriceNotice,children:"Ange pris mellan ".concat(x," kr och ").concat(f," kr")}),(0,l.jsxs)("div",{className:n().themesWrapper,children:[(0,l.jsx)("h3",{children:k}),(0,l.jsxs)("div",{className:n().themesAndTemplates,children:[(0,l.jsxs)(g.A,{name:"themes",className:{body:n().themesSelection},defaultValue:"1",onChange:$,children:[(0,l.jsx)(v,{value:"1",title:I,templates:M,image:w,templatesIdsMapping:B,customMessage:O,setTemplate:J,setMessage:Y,setDisplayKlarna:q,isDefaultValue:!0}),(0,l.jsx)(v,{value:"2",title:R,templates:V,image:L,templatesIdsMapping:B,customMessage:O,setTemplate:J,setMessage:Y,setDisplayKlarna:q}),(0,l.jsx)(v,{value:"3",title:E,templates:W,image:P,templatesIdsMapping:B,customMessage:O,setTemplate:J,setMessage:Y,setDisplayKlarna:q})]}),(0,l.jsx)(g.A,{name:"templates",className:{body:(0,i.A)(n().templates,n().templatesVisible)}
1,enableError:!0,children:!!(null==ee?void 0:ee.length)&&ee.map((e,t)=>{var a,s;return e&&(0,l.jsx)(D,{src:(null==e||null==(a=e.image)?void 0:a.slice(1,-1))||"",alt:"template ID ".concat(null!=(s=null==e?void 0:e.templateId)?s:t),name:"templateId",value:e.templateId?null==e?void 0:e.templateId.toString():t.toString(),className:"templateImage",isDefaultValue:0===t&&"1"===Z,templatesIdsMapping:B,customMessage:O,setTemplate:J,setMessage:Y,setDisplayKlarna:q},"".concat(e._key))})},Z)]})]})]}),(0,l.jsxs)("div",{className:n().column,onKeyUp:e=>A(e,Q,F),children:[(0,l.jsxs)("div",{className:n().message,children:[(0,l.jsx)("span",{children:N}),N&&" (max ".concat(S," tecken)")]}),(0,l.jsx)(o.A,{label:null!=N?N:y,name:"messageText",enableLabel:!1,hideLabel:!0,placeholder:y||"",className:{input:n().textarea},onKeyDown:e=>(null==e?void 0:e.key.match(new RegExp(/Enter/)))&&e.preventDefault(),useColon:!1,fullWidth:!0,textarea:!0,maxLength:S,error:H("/giftcards/page/form/error/message_text")})]})]}),(0,l.jsx)(T,{imageSrc:z,methods:F,previewData:U,defaultMessage:C(null==(s=M[0])?void 0:s.templateId,B),templateMessage:X})]})}let A=(e,t,a)=>t("Backspace"!==e.code&&"Delete"!==e.code&&"Backspace"!==e.key&&"Unidentified"!==e.key||a.getValues("messageText").length?{message:a.getValues("messageText"),isDeleted:!1}:{message:"",isDeleted:!0}),C=(e,t)=>{let a=t.find(t=>{var a;return(null==t||null==(a=t.idEmail)?void 0:a.toString())===(null==e?void 0:e.toString())});return(null==a?void 0:a.predefinedText)||""}}}]);
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.