1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9934],{1860:e=>{e.exports={input:"InputPhone_input__UroYF","input-inner":"InputPhone_input-inner__2NFPU",field:"InputPhone_field__EGW_q",shadow:"InputPhone_shadow__5HXiA",message:"InputPhone_message__qY8rM","-error":"InputPhone_-error__SbUGn","-success":"InputPhone_-success__cIo0r","-full":"InputPhone_-full__bAWrm","-touched":"InputPhone_-touched__pRDdg","-disabled":"InputPhone_-disabled__jyPEQ","-show-message":"InputPhone_-show-message__78WDt"}},6858:e=>{e.exports={"contact-line":"ContactLine_contact-line___BL7o",body:"ContactLine_body__gl0cm",actions:"ContactLine_actions__qrY6T",double:"ContactLine_double__H85ff","contact-name":"ContactLine_contact-name__sTAxI"}},21533:(e,r,t)=>{"use strict";t.d(r,{s:()=>i,z:()=>a});var n=t(14232),s=t(77100);function a(e){let[r,t]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{t(e())},[]),r}function i(){return a(s.A)}},68955:(e,r,t)=>{"use strict";t.d(r,{A:()=>p});var n=t(37876),s=t(15039),a=t.n(s);t(14232);var i=t(34846),l=t(1860),o=t.n(l);t(53667);var d=t(42264),c=t.n(d);let u=["no","se","dk","pt","fi","is","gb","ie","de","fr","be","nl","lu","pl","lt","lv","ee","cz","es","it","si","at","ch","us","ca","jp","au","nz"],p=({value:e="",name:r,placeholder:t,helpText:s,error:l,success:d,disabled:p,onBlur:h,onFocus:m,manualChange:_,handleSubmit:x,full:g,touched:f,allowAllCountries:j,transparent:b=!1})=>{let{t:v}=(0,i.Bd)(),A=s||l||d,w=a()({[o()["input-inner"]]:!0,[o()["-success"]]:d&&!l,[o()["-full"]]:g,[o()["-touched"]]:f||""!==e,[o()["-show-message"]]:A}),C={width:"100%",borderRadius:"12px",border:"1px solid #A4A4A4",height:"52px",borderColor:"var(--col-text-primary)",padding:"0 16px 0 52px",background:"transparent",...p&&{borderColor:"2px solid #808080",backgroundColor:"#f1f1ef"},...l&&{borderColor:"#e31837",background:"#fde8eb"}},y=j?void 0:u;return(0,n.jsxs)("div",{className:`${w} ${b&&"transparent"}`,children:[(0,n.jsx)(c(),{containerStyle:{fontFamily:"OneDot, sans-serif"},inputStyle:C,disabled:p,regions:j?["america","europe","asia","oceania","africa"]:void 0,onlyCountries:y,preferredCountries:u,placeholder:t,searchPlaceholder:t,specialLabel:t,onEnterKeyPress:e=>x&&x(e),country:"no",value:String(e),onBlur:h,onFocus:m,countryCodeEditable:!1,inputProps:{name:r,required:!0},onChange:(e,t,n)=>{let s=n.target.value?n.target.value.replaceAll(" ","").replaceAll("(","").replaceAll(")","").replaceAll("-",""):"",a=""===s?`+${t?.dialCode}`:s;a.startsWith("+460")&&(a=a.replace("+460","+46")),_([{name:r,value:a},{name:"countryCode",value:t.dialCode||""}])}}),(0,n.jsx)("div",{id:`input-${r}-feedback`,children:A&&(0,n.jsxs)("div",{className:o().message,"aria-live":"polite",children:[(0,n.jsx)("p",{className:"sr",children:(l||d||s)&&`${l&&v("error:error-description",{description:t})}`}),l||d||s]})})]})}},79283:(e,r,t)=>{"use strict";t.d(r,{A:()=>s});var n=t(14232);let s=function({initialValues:e,validation:r={},onSubmit:t,onEmptyField:s}){let[a,i]=(0,n.useState)(Object.assign({},e)),[l,o]=(0,n.useState)({}),[d,c]=(0,n.useState)(!1),[u,p]=(0,n.useState)(!1),[h,m]=(0,n.use
1State)(0),_=(e,t,n)=>{let s=r[e];if(s){let r="string"==typeof s.regex?RegExp(s.regex):s.regex,a=s.allowEmpty&&""===String(t),i=s.additionalValidation&&n&&s.additionalValidation(n);if((a||r.test(String(t)))&&!i)o(r=>{let t={...r,[e]:void 0};return Object.keys(t).forEach(e=>{void 0===t[e]&&delete t[e]}),t});else{let r=Object.assign({},l,{[e]:s.message+(h%2==0?".":"..")});o(e=>({...e,...r})),m(e=>e+1)}}},x=()=>{let e=Object.keys(r).filter(e=>!a[e]&&!r[e].allowEmpty);return e.length?(console.log("Form missing fields error",e),s&&s(e),o(Object.assign({},l,e.reduce((e,t)=>({...e,[t]:r[t].message+(h%2==0?".":"..")}),{}))),m(e=>e+1),p(!0),!1):!Object.keys(l).length||(console.log("Form has error"),p(!0),!1)},g=async e=>{e.preventDefault(),p(!0),x()&&t&&t(a)};return{values:a,errors:u?l:[],handleChange:e=>{let{name:r,value:t}=e.target,n=Object.assign({},a,{[r]:t});_(r,t,n),d||c(!0),i(n)},handleChangeManual:(e,r)=>{let t=Object.assign({},a,{[e]:r});_(e,r,t),d||c(!0),i(t)},handleMultipleChanges:e=>{let r=Object.assign({},a,e.reduce((e,r)=>({...e,[r.name]:r.value}),{}));e.forEach(e=>{_(e.name,e.value,r)}),d||c(!0),i(r)},handleSubmit:g,isTouched:d,validateForm:x}}},79440:(e,r,t)=>{"use strict";t.d(r,{A:()=>u});var n=t(37876);t(14232);var s=t(15039),a=t.n(s),i=t(99826),l=t.n(i),o=t(35478),d=t(58262),c=t(62690);let u=({type:e="text",value:r="",name:t,placeholder:s,helpText:i,error:u,success:p,disabled:h,onChange:m,full:_,touched:x,autocomplete:g="off",toolTipMessage:f="",...j})=>{let{t:b}=(0,o.Bd)(),v=i||u||p,A=a()({[l().input]:!0,[l()["-disabled"]]:h,[l()["-error"]]:u,[l()["-success"]]:p&&!u,[l()["-full"]]:_,[l()["-touched"]]:x||""!==r,[l()["-show-message"]]:v});return(0,n.jsxs)("div",{className:A,children:[(0,n.jsx)("label",{htmlFor:t,className:"",children:s}),(0,n.jsx)(c.A,{children:(0,n.jsx)(d.A,{effect:"solid",place:"top",multiline:!0,className:l().tooltip})}),(0,n.jsx)("input",{className:l().field,type:e,name:t,id:t,value:r,placeholder:s,disabled:h,onChange:m,autoComplete:g,"aria-invalid":!!u,"aria-describedby":`input-${t}-feedback`,"data-tip":f,...j}),(0,n.jsx)("div",{id:`input-${t}-feedback`,children:v&&(0,n.jsxs)("div",{className:l().message,"aria-live":"polite",children:[(0,n.jsx)("p",{className:"sr",children:(u||p||i)&&`${u&&b("error:error-description",{description:s})}`}),u||p||i]})})]})}},79934:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>F});var n=t(37876),s=t(14232),a=t(58070),i=t(79283),l=t(46164),o=t(55022),d=t(92323),c=t(95759),u=t(8577),p=t(44032),h=t(79440),m=t(77364),_=t(62584),x=t(15039),g=t.n(x),f=t(56588),j=t(6858),b=t.n(j);let v=({contact:e,onAdd:r,invitedContacts:t})=>{let s=g()({[b()["contact-line"]]:!0}),a=t.includes(e.id);return(0,n.jsxs)("article",{className:s,children:[(0,n.jsxs)("div",{className:b().actions,children:[(0,n.jsx)("p",{className:e.phoneNumbers?"small":"gray small","aria-hidden":!0,children:e.phoneNumbers?e.phoneNumbers[0].number:"No Phone Number"}),(0,n.jsx)(f.A,{name:`Invitere ${e.name}`,ariaLabel:`Invitere ${e.name}`,checked:a,disabled:a,onChange:t=>{t.target.checked&&r(e.id)}})]}),(0,n.jsx)("div",{className:b().body,children:(0,n.jsx)("div",{className:b()["contact-name"],children:(0,n.jsx)("p",{"aria-hidden":!0,children:e.name})})})]})};var A=t(35478),w=t(92809),C=t(68955),y=t(63848),N=t(70896),S=t(23132),I=t(21533),k=t(77100);let F=()=>{let e=(0,s.useContext)(a.A),[r,t]=(0,s.useState)(!1),{t:x}=(0,A.Bd)(),g=(0,I.z)(()=>!!window.ReactNativeWebView),f=(0,k.A)(),[j,b]=(0,s.useState)(""),[F,P]=(0,s.useState)(!1),[E,$]=(0,s.useState)([]),[O,L]=(0,s.useState)([]),M=(0,i.A)({validation:{phone:{regex:"",message:x("error:invalid-phone-number"),additionalValidation:w.TM},countryCode:{regex:"",message:x("error:no-country-code"),additionalValidation:e=>!String(e?.phone).startsWith(`+${e.countryCode}`)}},onSubmit:async r=>{let n=String(r?.phone),s={event:S.U.RecruitFriend,ecommerce:{platform:f?"App":"Web",invited_phone_number:n,recruiter_code:e?.user?.recruiterCode}};(0,N.u4)(s),t(!0)}}),B=x("profile:user-x-is-inviting-you-to-use-this-discount",{name:e.user?.firstNames||e.user?.lastName,websiteUrl:"www.dominos.no",recruiterCode:e.user?.re
1cruiterCode});(0,s.useEffect)(()=>{if(F){let e=e=>{void 0!==e.data&&$(JSON.parse(e.data).contacts)};document.addEventListener("message",e),window.addEventListener("message",e),g&&window.ReactNativeWebView.postMessage(JSON.stringify({type:"contacts"}))}},[F]);let R=r=>{let t=E.find(e=>e.id===r)?.phoneNumbers[0].number;if(t){let n=String(t),s={event:S.U.RecruitFriend,ecommerce:{platform:f?"App":"Web",invited_phone_number:n,recruiter_code:e?.user?.recruiterCode}};(0,N.u4)(s),L([...O,r])}};return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(_.cw,{children:(0,n.jsxs)(p.A,{width:"min",children:[(0,n.jsx)(l.A,{top:7,align:"center",children:(0,n.jsx)("h2",{children:x("profile:refer-a-friend")})}),(0,n.jsx)(l.A,{top:2,align:"center",children:(0,n.jsx)("p",{children:x("profile:choose-how-to-share")})}),(0,n.jsx)(l.A,{top:[4,7],children:(0,n.jsx)(u.A,{name:"SMS",text:"Del via SMS",openByDefault:!0,children:(0,n.jsxs)(n.Fragment,{children:[r&&(0,n.jsx)(l.A,{top:4,children:(0,n.jsx)(o.A,{children:(0,n.jsxs)(d.A,{align:"center",justify:"center",children:[(0,n.jsx)(m.A,{type:"bullet",paddedExtra:!0}),(0,n.jsx)("p",{className:"small",children:(0,n.jsx)("strong",{children:x("profile:sms-sent")})})]})})}),!r&&(0,n.jsxs)("form",{onSubmit:M.handleSubmit,children:[(0,n.jsx)(l.A,{top:2,children:(0,n.jsx)(C.A,{name:"phone",manualChange:M.handleMultipleChanges,placeholder:x("mobile-number"),value:M.values.phone,error:M.errors.phone||M.errors.countryCode})}),g&&(0,n.jsx)(l.A,{top:2,children:(0,n.jsx)(u.A,{name:"ContactList",text:x("profile:share-via-contact"),openByDefault:!0,children:(0,n.jsxs)(n.Fragment,{children:[!F&&(0,n.jsx)(c.A,{type:"button",full:!0,onClick:()=>P(!0),children:x("profile:see-contacts")}),F&&(0,n.jsx)(l.A,{align:"center",children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.A,{top:3,bottom:3,children:(0,n.jsx)(h.A,{full:!0,type:"search",name:"contactFilter",placeholder:x("profile:filter-contacts"),onChange:e=>b(e.target.value),value:j})}),(0,n.jsx)(d.A,{full:!0,column:!0,wrap:!0,children:(0,n.jsx)(n.Fragment,{children:void 0!==E&&E.filter(e=>e.name&&e.name.toLowerCase().includes(j.toLowerCase())).filter(e=>e?.phoneNumbers?.length>0).map(e=>(0,n.jsx)(v,{contact:e,onAdd:R,invitedContacts:O},e.id))})})]})})]})})}),(0,n.jsx)(l.A,{top:2,children:(0,n.jsxs)(o.A,{children:[(0,n.jsx)("p",{className:"small",children:(0,n.jsx)("strong",{children:x("common-words:preview")})}),(0,n.jsx)(l.A,{top:1,children:(0,n.jsx)("p",{className:"small",children:B})})]})}),(0,n.jsx)(l.A,{top:4,children:(0,n.jsx)(c.A,{full:!0,type:"submit",children:"Send SMS"})})]})]})})}),(0,n.jsx)(l.A,{top:2,children:(0,n.jsxs)(u.A,{name:"Facebook",text:x("profile:share-via-facebook"),children:[(0,n.jsx)("p",{children:x("profile:use-button-bellow-to-go-to-facebook")}),(0,n.jsx)(l.A,{top:2,children:(0,n.jsx)(c.v,{href:`https://www.facebook.com/sharer/sharer.php?u=https://www.dominos.no${(0,y.aM)("register-user")}?vervekode=${e.user?.recruiterCode}`,full:!0,children:x("profile:share-via-facebook")})})]})}),(0,n.jsx)(l.A,{top:2,bottom:7,children:(0,n.jsxs)(u.A,{name:"Other",text:x("profile:share-manually"),children:[(0,n.jsx)(l.A,{top:2,children:(0,n.jsx)("p",{children:x("profile:share-link-message")})}),(0,n.jsx)(l.A,{top:2,children:(0,n.jsx)(o.A,{children:(0,n.jsx)("p",{className:"small",children:(0,n.jsx)("a",{href:`https://www.dominos.no${(0,y.aM)("register-user")}?vervekode=${e.user?.recruiterCode}`,children:`https://www.dominos.no${(0,y.aM)("register-user")}?vervekode=${e.user?.recruiterCode}`})})})})]})})]})})})}},99826:e=>{e.exports={input:"Input_input__MPP3N",field:"Input_field__hBpte",shadow:"Input_shadow__58S4S",message:"Input_message__Av1gn","placeholder-wrapper":"Input_placeholder-wrapper__6wgds",placeholder:"Input_placeholder__HmlYS","-touched":"Input_-touched__g8q7z",inputContainer:"Input_inputContainer__gG_xz",inputBlock:"Input_inputBlock__5DbEO",inputField:"Input_inputField__DUqrF","border-hider":"Input_border-hider__vv16X","-error":"Input_-error__k5_F8","-success":"Input_-success__Rsj5J","-full":"Input_-full__QtlGs","-disabled":"Input_-disabled__RPjlA","-show-message":"Input_-show-message__URYZ2",tooltip:"Input_tooltip__mAENl"}}}]);
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.