1(function(){try{var M=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},_=new M.Error().stack;_&&(M._sentryDebugIds=M._sentryDebugIds||{},M._sentryDebugIds[_]="74f49cac-22fc-4aff-a10c-ae5fcba41aac",M._sentryDebugIdIdentifier="sentry-dbid-74f49cac-22fc-4aff-a10c-ae5fcba41aac")}catch{}})(),(self.webpackChunkelopage_web_apps=self.webpackChunkelopage_web_apps||[]).push([[9394],{9394:(M,_,d)=>{d.d(_,{A:()=>St});var s=d(86070),b=d(30758),c=d(94636),l=d(59394),f=d(75146),T=d(39291),z=d(29938),P=d(98535),u=d(93539),Y=d(80126),$=d(97500),p=d.n($),g=d(39799),x=d(4436),B=d(40853),L=d(19922),N=d(30673),k=d(44978),Z=d(26205),h=d(69680),G=d(33209),ae=d(35226);const ie="/app/invite",fe=(e,t)=>(0,ae.LO)(`${ie}/${e}/join`,t),be=e=>(0,ae.fG)(`${ie}/check_pid/${e}`);var ue=d(69712),le=d(58412),V=d(74008),I=d(5190);const C=e=>({marginFix:{display:"inline-block"},embedFormContainer:{padding:30,width:`${e.embedFormContainerMaxWidth}px`,margin:15,position:"relative","&:before":{backgroundColor:e.embedFormColor,opacity:e.embedFormContainerOpacity/100,content:'""',position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"block",borderRadius:e.embedFormContainerRadius,boxShadow:`0 6px 20px rgba(0, 0, 0, ${e.embedFormShadowOpacity/100})`},"@media (max-width: 630px)":{width:`${e.embedFormContainerMaxWidth>300?300:e.embedFormContainerMaxWidth}px`}},errorContainer:{margin:"20px 0px 20px 0px"},nameInputsContainer:{display:"flex"},registrationFormContainer:{borderTop:`solid 1px ${V.lm.eloGrey20};`,position:"relative",paddingTop:e.labelsEnabled?"30px":"40px","& .fas:not(.fa-exclamation-circle)":{color:V.lm.eloGrey50,fontSize:"18px",position:"absolute",right:0,top:10,cursor:"pointer","&:hover":{opacity:.8}}},embedFormLabel:{fontSize:`${e.labelSize}px`,fontFamily:(0,P.f6)(e.labelFontFamily),...(0,I.im)(e.labelFontStyle),fontWeight:(0,I.Kn)(e.labelFontStyle),color:e.labelColor},embedFormResultContainer:{marginTop:"30px"},embedFormAcceptContainer:{margin:"30px 0px 30px 0px"},registrationCta:{textAlign:"center",color:e.regCtaFontColor,fontFamily:(0,P.f6)(e.regCtaFontFamily),fontSize:"13px",lineHeight:1,cursor:"pointer"},embedFormHeader:{textAlign:"left"},embedFormTitle:{marginBottom:"30px",fontFamily:(0,P.f6)(e.titleFontFamily),...(0,I.im)(e.titleFontStyle),fontWeight:(0,I.Kn)(e.titleFontStyle),color:e.titleFontColor,fontSize:`${e.titleFontSize}px`,lineHeight:1},embedFormDescription:{fontSize:"12px",color:V.lm.eloGrey40,lineHeight:1,"&:not(:last-child)":{marginBottom:"15px"}},embedFormContent:{position:"relative"},textLink:{fontFamily:(0,P.f6)(e.fontFamily),...(0,I.im)(e.fontStyle),fontWeight:(0,I.Kn)(e.fontStyle),color:e.fontColor,fontSize:`${e.fontSize}px`,"&:hover":{color:e.fontColor,opacity:.8}},button:{background:e.buttonStyle===le.ll.outlined?"none":e.buttonColor,border:`2px solid ${e.buttonColor||"#FFB000"}`,fontFamily:(0,P.f6)(e.buttonFontFamily),...(0,I.im)(e.buttonFontStyle),fontWeight:(0,I.Kn)(e.buttonFontStyle),color:e.buttonFontColor,fontSize:`${e.buttonFontSize}px`,borderRadius:`${e.buttonBorderRadius}px`,lineHeight:1,wordBreak:"break-word",textAlign:"center",padding:"10px 30px",whiteSpace:"nowrap","&:hover":{backgroundColor:e.buttonHoverColor},"&:focus":{outline:"none"},"&:active":{opacity:.7},"&:disabled":{opacity:.6}},slider:{padding:"30px 45px",margin:"15px",position:"relative",display:"inline-block","&:before":{backgroundColor:"#ffffff",opacity:e.sliderBackgroundOpacity/100,content:'""',position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"block",borderRadius:"4px",boxShadow:`0 6px 20px rgba(0, 0, 0, ${e.sliderShadowOpacity/100})`}},backgroundImageContainer:{height:270,borderRadius:`${e.badgeBorderRadius}px ${e.badgeBorderRadius}px 0 0`,backgroundColor:"#efedef",color:V.lm.eloWhite,fontSize:85,width:"100%",display:"flex","& > div":{borderRadius:`${e.badgeBorderRadius}px ${e.badgeBorderRadius}px 0 0`}},boxShadowFix:{padding:"15px",display:"inline-block"},productBackground:{padding:"28px 20px",background:e.badgeColor,borderRadius:`0 0 ${e.badgeBorderRadius}px ${e.badgeBorderRadius}px`}
1,productCover:{backgroundSize:"cover",width:"100%",backgroundPosition:"center"},badgeContainer:{backgroundColor:e.badgeColor,transition:"all .2s ease-in-out",borderRadius:`${e.badgeBorderRadius}px`,boxShadow:"0 6px 20px 0 rgb(0,0,0,0.15)",width:270,position:"relative",display:"inline-block"},priceContainer:{display:"block",textAlign:"center",lineHeight:1.2,backgroundColor:e.tagBackground,position:"absolute",top:"35px",right:"-10px",padding:"5px 20px",borderRadius:"3px"},price:{fontFamily:(0,P.f6)(e.buttonFontFamily),fontSize:"16px",fontWeight:"bold",color:e.tagFontColor},productName:{marginBottom:"15px",wordBreak:"break-word",fontFamily:(0,P.f6)(e.badgeFontFamily),fontStyle:(0,I.pV)(e.badgeFontStyle),fontWeight:(0,I.Kn)(e.badgeFontStyle),color:e.badgeFontColor,fontSize:`${e.badgeFontSize}px`},buttonContainer:{display:"flex",alignItems:"center",justifyContent:u.lP[e.buttonAlignment]},shadow:{"&:hover":{"-webkit-box-shadow":"0px 8px 15px 0px rgba(0, 0, 0, 0.25)","-moz-box-shadow":"0px 8px 15px 0px rgba(0, 0, 0, 0.25)",transition:"all 0.4s ease 0s"}},textShadow:{"&:hover":{textShadow:"0px 0px 6px rgba(255, 255, 255, 1)","-webkit-box-shadow":"0px 8px 15px 0px rgba(0, 0, 0, 0.25)","-moz-box-shadow":"0px 8px 15px 0px rgba(0, 0, 0, 0.25)",transition:"all 0.2s ease 0s"}},transparency:{"&:hover":{opacity:.8}},stretching:{"&:hover":{letterSpacing:3,"-webkit-box-shadow":"0px 5px 16px 0px rgba(0, 0, 0, 0.29)","-moz-box-shadow":"0px 5px 16px 0px rgba(0, 0, 0, 0.29)",transition:"all 0.3s ease 0s"}},"@keyframes increasingAnimation":{"80%":{"-webkit-transform":"scale(1.2,1.2)",transform:"scale(1.2,1.2)"}},increasing:{margin:"0px 15px 0px 15px",transition:"all 0.7s","&:hover":{transform:"scale(1.17,1.17)","-webkit-animation":"increasingAnimation 0.25s ease",animation:"increasingAnimation 0.25s ease","-webkit-animation-iteration-count":1,"animation-iteration-count":1,animationName:"$increasingAnimation"}},bordering:{"&:hover":{transition:"all 0.5s",borderRadius:e.borderRadius===void 0||e.borderRadius>0?0:30}},"@keyframes swingAnimation":{"15%":{"-webkit-transform":"translateX(5px)",transform:"translateX(5px)"},"30%":{"-webkit-transform":"translateX(-5px)",transform:"translateX(-5px)"},"50%":{"-webkit-transform":"translateX(3px)",transform:"translateX(3px)"},"65%":{"-webkit-transform":"translateX(-3px)",transform:"translateX(-3px)"},"80%":{"-webkit-transform":"translateX(2px)",transform:"translateX(2px)"},"100%":{"-webkit-transform":"translateX(0)",transform:"translateX(0)"}},swing:{"&:hover":{"-webkit-animation":"swingAnimation 1s ease",animation:"swingAnimation 1s ease","-webkit-animation-iteration-count":1,"animation-iteration-count":1,animationName:"$swingAnimation"}},fillOutlineSwitch:{transition:"all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1) 0s",position:"relative","&:hover":{background:e.style===le.ll.outlined?e.buttonColor:"none"}},coloredShadow:{"&:hover":{"-webkit-box-shadow":`0px 8px 15px 0px ${e.buttonColor}`,"-moz-box-shadow":`0px 8px 15px 0px ${e.buttonColor}`,transition:"all 0.4s ease 0s"}},poweredBy:{marginTop:30,marginBottom:-20,textAlign:"center",color:"#9e9e9e",fontSize:11,lineHeight:1},elopageLink:{fontSize:11,color:"#ffb000",marginLeft:5,"&:hover":{opacity:.8,color:"#ffb000"}}});var Ee=d(24446),D=d(98421),ge=d(23476),F=d(3882),Le=Object.defineProperty,De=Object.getOwnPropertyDescriptor,Me=(e,t,o)=>t in e?Le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,de=(e,t,o,n)=>{for(var r=n>1?void 0:n?De(t,o):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(r=(n?i(t,o,r):i(r))||r);return n&&r&&Le(t,o,r),r},he=(e,t,o)=>Me(e,typeof t!="symbol"?t+"":t,o);const _e=(0,g.Ay)(C)(({classes:e})=>(0,s.jsxs)("div",{className:e.poweredBy,children:[F.t("react.shared.powered_by"),(0,s.jsx)("a",{className:e.elopageLink,href:`https://${ge.mD.production}/`,children:"ablefy"})]}));let Q=class extends b.Component{constructor(e){super(e),he(this,"emailExists",!1),he(this,"validateEmail",async()=>{const{userData:{email:t}}=this.props;D.y$.isEmail(t)&&(this.emailExists=!!await(0,Ee.bd)(t))}),he(this,"handleFormSubmit",()=>{this.recaptchaRef.current.executeAsync().then(t=>{const{handleSubmit:o,setRecaptcha:n}=this.props;n(t),o()})}),(0,l.Gn)(this),this.recaptchaRef=b.createRef()}componentDidMount(){const{userData:{email:e}}=this.props;D.y$.isEmail(e)&&this.validateEmail()}get isFormValid(){const{userData:{firstName:e,lastName:t,password:o,termsAccepted:n,email:r}}=this.props;return r&&e&&t&&o&&n}render(){const{classes:e,labelsEnabled:t,embedPrefs:o,locale:n,handleUserData:r,handleCloseForm:a,sellerStore:i,userData:{firstName:m,lastName:y,password:O,termsAccepted:w,email:X},setRecaptcha:q}=this.props,ne=this.emailExists?F.t("front.widgets.embed_form.email_exists",{locale:n}
1):F.t("front.widgets.embed_form.invalid_email",{locale:n}),A=(0,s.jsx)("span",{dangerouslySetInnerHTML:{__html:F.t("front.widgets.embed_form.accept_terms_text",{locale:n})}}),W=D.y$.isEmail(X)&&!this.emailExists,pe=X&&W&&m&&y&&O&&w,se=!i.isAppActive("elopage-badge");return(0,s.jsxs)("div",{className:e.registrationFormContainer,children:[(0,s.jsx)("i",{className:"fas fa-times-circle",onClick:()=>{a(),q(null)}}),(0,s.jsxs)("div",{className:"fields-container",children:[(0,s.jsx)(h.A_,{label:t&&F.t("front.widgets.embed_form.first_name",{locale:n}),placeholder:F.t("front.widgets.embed_form.first_name",{locale:n}),value:m,onChange:R=>r("firstName",R),className:"fields-container__grow-2",labelClassName:e.embedFormLabel,required:!0}),(0,s.jsx)(h.A_,{label:t&&F.t("front.widgets.embed_form.last_name",{locale:n}),placeholder:F.t("front.widgets.embed_form.last_name",{locale:n}),value:y,onChange:R=>r("lastName",R),labelClassName:e.embedFormLabel,className:"fields-container__grow-2",required:!0})]}),(0,s.jsx)(h.A_,{label:t&&F.t("front.widgets.embed_form.email",{locale:n}),placeholder:F.t("front.widgets.embed_form.email",{locale:n}),value:X,onChange:R=>r("email",R),labelClassName:e.embedFormLabel,isInvalid:W!==void 0&&!W,errorMessage:ne,onBlur:this.validateEmail,required:!0}),(0,s.jsx)(h.A_,{label:t&&F.t("front.widgets.embed_form.password",{locale:n}),placeholder:F.t("front.widgets.embed_form.password",{locale:n}),value:O,onChange:R=>r("password",R),labelClassName:e.embedFormLabel,type:"password",required:!0}),(0,s.jsx)("div",{className:"field",children:(0,s.jsx)(h.Cj,{recaptchaRef:this.recaptchaRef,locale:n})}),(0,s.jsx)(h.Yh,{label:A,checked:w,onChange:()=>r("termsAccepted",!w),className:"checkbox-field--no-margin"}),(0,s.jsx)("div",{className:e.buttonContainer,children:(0,s.jsx)("button",{onClick:this.handleFormSubmit,className:p()(e.button,e[o.buttonAnimation]),disabled:!pe,children:F.t("front.widgets.embed_form.create_account",{locale:n})})}),se&&(0,s.jsx)(_e,{})]})}};de([l.sH],Q.prototype,"emailExists",2),de([l.EW],Q.prototype,"isFormValid",1),de([l.XI],Q.prototype,"validateEmail",2),Q=de([(0,c.WQ)("affiliateProgramsStore","sellerStore"),c.PA],Q);const Te=(0,g.Ay)(C)(Q);var j=d(3882),Oe=Object.defineProperty,$e=Object.getOwnPropertyDescriptor,He=(e,t,o)=>t in e?Oe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,E=(e,t,o,n)=>{for(var r=n>1?void 0:n?$e(t,o):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(r=(n?i(t,o,r):i(r))||r);return n&&r&&Oe(t,o,r),r},S=(e,t,o)=>He(e,typeof t!="symbol"?t+"":t,o);let v=class extends b.Component{constructor(e){super(e),S(this,"formConfigs",{}),S(this,"userData",{firstName:"",lastName:"",email:"",password:"",termsAccepted:!1}),S(this,"registrationOpened",!1),S(this,"affiliateProgram",{commission:[],affiliateProgramCommissions:[]}),S(this,"loading",!1),S(this,"recaptcha",null),S(this,"handlePubIdSubmit",()=>{be(this.formConfigs.publisherId).then(t=>{if(t.success)return this.joinPublisher();this.changeFormConfigs("publishError",j.t("front.widgets.embed_form.not_found_publisher"))})}),S(this,"joinPublisher",()=>{const{productLink:{affiliateNode:t={},embedPrefs:{locale:o}}}=this.props,{publisherId:n}=t,a=N.M.profileType===Z.uB.publisher?n:null;fe(this.affiliateProgram.id,{joinId:a,publisherId:this.formConfigs.publisherId,headers:{locale:o}}).then(i=>{if(i.error)return this.changeFormConfigs("publishError",i.error);this.changeFormConfigs("affiliateProgramJoined",!0)})}),S(this,"setRecaptcha",t=>this.recaptcha=t),S(this,"handleUserData",(t,o)=>{this.userData={...this.userData,[t]:o}}),S(this,"fetchAffiliateProgram",()=>{const{affiliateProgramsStore:t,productLink:{affiliateNode:o={},embedPrefs:{prid:n}}}=this.props,{affiliateProgramId:r}=o,a=n||r;a&&t.fetchItem(a,{expand:["covers","affiliate_program_commissions"]}).then(i=>{this.affiliateProgram=i.data})}),S(this,"changeFormConfigs",(t,o)=>{this.formConfigs={...this.formConfigs,[t]:o}}),S(this,"handleRegistrationSubmit",()=>{const{firstName:t,lastName:o,email:n,password:r,termsAccepted:a}=this.userData,i={email:n,password:r,profileType:Z.KU.publisher,userProfilesAttributes:[{firstName:t,lastName:o}],publisher:{termsAccepted:a},recaptcha:this.recaptcha};(0,ue.Hh)(i).then(m=>{this.loading=!0,this.changeFormConfigs("registrationFormOpened",!this.formConfigs.registrationFormOpened),(0,G.fetchItem)({headers:m.accessToken}).then(y=>{this.changeFormConfigs("publisherId",y.data.id),(0,l.h5)(()=>this.loading=!1)})})}),(0,l.Gn)(this)}componentDidMount(){this.fetchAffiliateProgram()}componentDidUpdate(){const{productLink:{affiliateNode:e={},embedPrefs:{prid:t}}}=this.props,{affiliateProgramId:o}=e,{id:n}=this.affiliateProgram||{},r=t||o;r&&n!==parseInt(r)&&this.fetchAffiliateProgram()}render(){const{classes:e,productLink:{embedPrefs:t,seller:o,product:n={},embedPrefs:{labelsEnabled:r,locale:a,prid:i}}}=this.props,m=(this.affiliateProgram||{}).form===k.ZR.all,{commission:y,affiliateProgramCommissions:O,name:w,cookiesExpire:X=0}=this.affiliateProgram||{},q=m?y:O,ne=(0,B.zs)(m,q,(0,B.Oq)(this.affiliateProgram)),{affiliateProgramJoined:A,publisherId:W,publishError:pe,registrationFormOpened:se}=this.formConfigs,R=(0,z.sc)(o,n.slug,`?${Y.A.stringify({pid:W,prid:i})}`),wt=p()({[e.embedFormAcceptContainer]:!A,[e.embedFormResultContainer]:A});return(0,s.jsx)("div",{className:e.marginFix,children:(0,s.jsxs)("div",{id:"embed-form-wrapper",className:e.embedFormContainer,children:[this.loading&&(0,s.jsx)("div",{className:"lmask"}),(0,s.jsxs)("div",{className:e.embedFormContent,children:[(0,s.jsxs)("div",{className:e.embedFormHeader,children:[(0,s.jsx)("div",{className:e.embedFormTitle,children:w}),(0,s.jsxs)("div",{className:e.embedFormDescription,children:[(0,s.jsx)("b",{children:j.t("front.widgets.embed_form.commission_for_sale",{locale:a})}),`: ${ne}`]}),(0,s.jsxs)("div",{className:e.embedFormDescription,children:[(0,s.jsx)("b",{children:j.t("front.widgets.embed_form.cookie_lifetime",{locale:a})}),[":",j.t("front.widgets.embed_form.day",{locale:a,count:X})].join(" ")]})]}),(0,s.jsxs)("div",{className:wt,children:[A?(0,s.jsx)(h.A_,{label:r&&j.t("front.widgets.embed_form.product_url",{locale:a}),placeholder:j.t("front.widgets.embed_form.product_url",{locale:a}),value:R,labelClassName:e.embedFormLabel,disabled:!0}):(0,s.jsx)(h.oz,{label:r&&j.t("front.widgets.embed_form.publisher_id",{locale:a}),placeholder:j.t("front.widgets.embed_form.publisher_id",{locale:a}),value:W,onChange:Ie=>this.changeFormConfigs("publisherId",Ie),onBlur:Ie=>this.changeFormConfigs("publisherId",Ie),labelClassName:e.embedFormLabel,errorText:j.t("react.shared.validations.required",{locale:a}),required:!0}),pe&&!A&&(0,s.jsx)("div",{className:e.errorContainer,children:(0,s.jsx)(h.bx,{message:pe})}),A?(0,s.jsx)("div",{className:e.buttonContainer,children:(0,s.jsx)("button",{onClick:()=>(0,L.eM)(R),className:p()(e.button,e[t.buttonAnimation]),disabled:!W,children:j.t("front.widgets.embed_form.copy",{locale:a})})}):(0,s.jsx)("div",{className:e.buttonContainer,children:(0,s.jsx)("button",{onClick:this.handlePubIdSubmit,className:p()(e.button,e[t.buttonAnimation]),disabled:!W,children:j.t("front.widgets.embed_form.accept",{locale:a})})})]}),!A&&(se?(0,s.jsx)(Te,{userData:this.userData,handleUserData:this.handleUserData,handleSubmit:this.handleRegistrationSubmit,embedPrefs:t,handleCloseForm:()=>this.changeFormConfigs("registrationFormOpened",!se),labelsEnabled:r,locale:a,recaptcha:this.recaptcha,setRecaptcha:this.setRecaptcha}):(0,s.jsx)("div",{className:e.registrationCta,dangerouslySetInnerHTML:{__html:j.t("front.widgets.embed_form.not_publisher_yet",{locale:a})},onClick:()=>this.changeFormConfigs("registrationFormOpened",!se)}))]})]})})}};E([l.sH],v.prototype,"formConfigs",2),E([l.sH],v.prototype,"userData",2),E([l.sH],v.prototype,"registrationOpened",2),E([l.sH],v.prototype,"affiliateProgram",2),E([l.sH],v.prototype,"loading",2),E([l.sH],v.prototype,"recaptcha",2),E([l.XI],v.prototype,"setRecaptcha",2),E([l.XI],v.prototype,"handleUserData",2),E([l.XI],v.prototype,"fetchAffiliateProgram",2),E([l.XI],v.prototype,"changeFormConfigs",2),E([l.XI],v.prototype,"handleRegistrationSubmit",2),v=E([(0,c.WQ)("affiliateProgramsStore"),c.PA],v);const We=(0,g.Ay)(C)(v),ze=e=>(0,s.jsx)(x.NP,{theme:e.productLink.embedPrefs,children:(0,s.jsx)(We,{...e})});var ee=d(29787),ke=Object.defineProperty,Ue=Object.getOwnPropertyDescriptor,Ke=(e,t,o,n)=>{for(var r=n>1?void 0:n?Ue(t,o):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(r=(n?i(t,o,r):i(r))||r);return n&&r&&ke(t,o,r),r};let xe=class extends b.Component{render(){const{productLink:e,classes:t,productLink:{embedPrefs:o}}=this.props;return(0,s.jsx)("div",{className:t.marginFix,children:(0,s.jsx)("a",{target:"blank",className:t.textLink,href:(0,ee.Ah)(e,e.product,e.
1seller),children:o.text})})}};xe=Ke([c.PA],xe);const Xe=(0,g.Ay)(C)(xe),Ye=e=>(0,s.jsx)(x.NP,{theme:e.productLink.embedPrefs,children:(0,s.jsx)(Xe,{...e})});var Ze=Object.defineProperty,Ge=Object.getOwnPropertyDescriptor,Ve=(e,t,o,n)=>{for(var r=n>1?void 0:n?Ge(t,o):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(r=(n?i(t,o,r):i(r))||r);return n&&r&&Ze(t,o,r),r};let ve=class extends b.Component{render(){const{productLink:e,productLink:{embedPrefs:t,product:o},classes:n}=this.props,r=p()(n.button,n[t.buttonAnimation]);return(0,s.jsx)("div",{style:{display:"inline-block"},children:(0,s.jsx)("button",{className:r,onClick:()=>window.open((0,ee.Ah)(e,o)),children:t.buttonText})})}};ve=Ve([c.PA],ve);const Qe=(0,g.Ay)(C)(ve),Je=e=>(0,s.jsx)(x.NP,{theme:e.productLink.embedPrefs,children:(0,s.jsx)(Qe,{...e})});var qe=d(24662),ce=d(21470),et=Object.defineProperty,tt=Object.getOwnPropertyDescriptor,ot=(e,t,o,n)=>{for(var r=n>1?void 0:n?tt(t,o):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(r=(n?i(t,o,r):i(r))||r);return n&&r&&et(t,o,r),r};const rt=({classes:e,convertToPrice:t,product:o})=>(0,s.jsx)("div",{className:e.priceContainer,translate:"no",children:(0,s.jsx)("span",{className:e.price,children:t(o.displayPrice,o.displayCurrencyId)})});let ye=class extends b.Component{render(){const{currenciesStore:{convertToPrice:e,getId:t},forSlider:o,productLink:n,productLink:{embedPrefs:r},classes:a,productsStore:i}=this.props,m=o?this.props.product:i.item,y=(0,ee.Ah)(n,m),O=t((0,ce.OG)(m)),w=e((0,ce.X_)(m),O);return(0,s.jsx)("div",{className:a.boxShadowFix,children:(0,s.jsxs)("div",{className:a.badgeContainer,children:[r.priceTagEnabled&&(0,s.jsx)(rt,{classes:a,productPrice:w,product:m,convertToPrice:e}),(0,s.jsx)("div",{className:a.backgroundImageContainer,children:(0,ce.Rn)(m,"s640")?(0,s.jsx)("div",{style:{backgroundImage:(0,qe.t7)((0,ce.Rn)(m,"s640"))},className:a.productCover}):(0,s.jsx)("i",{className:"far fa-image m-auto"})}),(0,s.jsxs)("div",{className:a.productBackground,children:[(0,s.jsx)("div",{className:a.productName,children:m.name}),(0,s.jsx)("div",{className:a.buttonContainer,children:(0,s.jsx)("button",{type:"button",onClick:()=>window.open(y),className:p()(a.button,a[r.buttonAnimation]),children:r.buttonText})})]})]})})}};ye=ot([(0,c.WQ)("currenciesStore","productsStore"),c.PA],ye);const nt=(0,g.Ay)(C)(ye),Ae=e=>(0,s.jsx)(x.NP,{theme:e.productLink.embedPrefs,children:(0,s.jsx)(nt,{...e})});var st=d(40134),at=Object.defineProperty,it=Object.getOwnPropertyDescriptor,lt=(e,t,o,n)=>{for(var r=n>1?void 0:n?it(t,o):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(r=(n?i(t,o,r):i(r))||r);return n&&r&&at(t,o,r),r};let Pe=class extends b.Component{render(){const{productLink:e,productLink:{seller:t,embedPrefs:{redirection:o,arrowColor:n}},classes:r,productsStore:a,isPreview:i}=this.props,m=a.list.map(y=>{const O=o===u.CH.paymentPage,w=(0,z.eo)(t,O?"/payment":"");return(0,s.jsx)(Ae,{productLink:e,product:y,url:`${w}?${Y.A.stringify((0,st.ap)(e.params))}`,forSlider:!0},y.id)});return(0,s.jsx)("div",{className:r.marginFix,children:(0,s.jsx)("div",{id:"elopageSliderContainer",className:r.slider,children:(0,s.jsx)(h.Kc,{id:e.token,slideItems:m,updateDisabled:i,style:{activeElementScale:1.1,modifier:1.5,arrowsColor:n}})})})}};Pe=lt([(0,c.WQ)("productsStore"),c.PA],Pe);const dt=(0,g.Ay)(C)(Pe),ct=e=>(0,s.jsx)(x.NP,{theme:e.productLink.embedPrefs,children:(0,s.jsx)(dt,{...e})});var te=d(26143),U=d(37006),Be=Object.defineProperty,mt=Object.getOwnPropertyDescriptor,pt=(e,t,o)=>t in e?Be(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Ce=(e,t,o,n)=>{for(var r=n>1?void 0:n?mt(t,o):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(r=(n?i(t,o,r):i(r))||r);return n&&r&&Be(t,o,r),r},Fe=(e,t,o)=>pt(e,typeof t!="symbol"?t+"":t,o);let oe=class extends b.Component{constructor(e){super(e),Fe(this,"iframeInited",!1),Fe(this,"initIframeResizing",()=>{if(document.getElementById("embedPaymentPage").contentWindow.postMessage({action:"loadCompleted"},"*"),!this.iframeInited)return setTimeout(this.initIframeResizing,50)}),Fe(this,"handleMessage",t=>{const o=document.getElementById("embedPaymentPage");t.action==="loadCompleted"?this.iframeInited=!0:t.action==="resize"?o.style.height=`${t.height}px`:t.action===U.xF.redirection&&window.parent.postMessage({action:U.xF.redirection,url:t.url,iframeSrc:window.location.href},"*")}),(0,l.Gn)(this)}componentDidMount(){this.initIframeResizing(),(0,te.G5)(this.handleMessage)}render(){const{productLink:e,productsStore:{item:t}}=this.props,o=(0,ee.Ah)(e,t,{},!0);return(0,s.jsx)("div",{id:"embedPaymentPageContainer",style:{backgroundColor:"transparent"},children:(0,s.jsx)("iframe",{id:"embedPaymentPage",src:o,frameBorder:0,style:{width:"100%"}})})}};Ce([l.sH],oe.prototype,"iframeInited",2),Ce([l.XI],oe.prototype,"handleMessage",2),oe=Ce([(0,c.WQ)("productsStore"),c.PA],oe);
1const ft=oe;var bt=Object.defineProperty,ut=Object.getOwnPropertyDescriptor,gt=(e,t,o,n)=>{for(var r=n>1?void 0:n?ut(t,o):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(r=(n?i(t,o,r):i(r))||r);return n&&r&&bt(t,o,r),r};let Se=class extends b.Component{render(){const{productLink:e,productLink:{name:t,embedPrefs:o,product:n}}=this.props;return(0,s.jsx)("div",{children:(0,s.jsx)("a",{target:"blank",href:(0,ee.Ah)(e,n),children:o.banner&&(0,s.jsx)("img",{src:o.banner,alt:t,style:{maxWidth:"100%"}})})})}};Se=gt([c.PA],Se);const ht=Se;var Ne=Object.defineProperty,xt=Object.getOwnPropertyDescriptor,vt=(e,t,o)=>t in e?Ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,we=(e,t,o,n)=>{for(var r=n>1?void 0:n?xt(t,o):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(r=(n?i(t,o,r):i(r))||r);return n&&r&&Ne(t,o,r),r},H=(e,t,o)=>vt(e,typeof t!="symbol"?t+"":t,o);class me extends b.Component{constructor(t){super(t),H(this,"embedOrigin",null),H(this,"index",0),H(this,"msgHandler",o=>{o.origin!=="https://js.stripe.com"&&this.handleMessageReceived(o.data)}),H(this,"listenEmbedMessage",()=>{window.addEventListener?window.addEventListener("message",this.msgHandler,!1):window.attachEvent("onmessage",this.msgHandler)}),H(this,"handleMessageReceived",o=>{const{iframeSrc:n,index:r,action:a}=o;(window.location.href===n&&(r===this.index||!this.index)||a===U.xF.redirection)&&this.processMessage(o)}),H(this,"processMessage",o=>{const{action:n,index:r,url:a}=o;if(n===U.xF.iframeInjected){this.embedOrigin=a,this.index=r;const i=document.getElementById("wrapper");i&&(0,te.z4)(i.children[0],this.resizeIframeMessage),this.notifyLoadComplete()}else n===U.xF.redirection&&(0,te.ZA)({msg:{action:U.xF.redirection,iframeSrc:window.location.href,url:a},origin:"*"})}),H(this,"resizeIframeMessage",o=>{(0,te.ZA)({msg:{action:"resize",iframeSrc:window.location.href,index:this.index,...o},origin:"*"})}),H(this,"notifyLoadComplete",()=>{(0,te.ZA)({msg:{action:U.xF.iframeMounted,iframeSrc:window.location.href},origin:"*"})}),(0,l.Gn)(this)}componentDidMount(){this.listenEmbedMessage()}render(){return null}}we([l.sH],me.prototype,"embedOrigin",2),we([l.sH],me.prototype,"index",2),we([l.XI],me.prototype,"handleMessageReceived",2);const yt=me;var Re=Object.defineProperty,Pt=Object.getOwnPropertyDescriptor,Ct=(e,t,o)=>t in e?Re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,re=(e,t,o,n)=>{for(var r=n>1?void 0:n?Pt(t,o):t,a=e.length-1,i;a>=0;a--)(i=e[a])&&(r=(n?i(t,o,r):i(r))||r);return n&&r&&Re(t,o,r),r},J=(e,t,o)=>Ct(e,typeof t!="symbol"?t+"":t,o);const Ft={[u.YZ.textLink]:Ye,[u.YZ.button]:Je,[u.YZ.banner]:ht,[u.YZ.badge]:Ae,[u.YZ.slider]:ct,[u.YZ.embedForm]:ze,[u.YZ.embedPaymentPage]:ft};let K=class extends b.Component{constructor(e){super(e),J(this,"formData",{form:u.YZ.textLink,embedPrefs:{}}),J(this,"loading",!0),J(this,"doTransparent",(t,o)=>{document&&o&&t===u.YZ.embedPaymentPage&&(document.body.style.backgroundColor="transparent")}),J(this,"fetchProductLink",async()=>{const{embeddableItemsStore:t,productsStore:o,sellerFontsStore:n,isPreview:r,match:{params:{token:a}}}=this.props,i=await t.fetchItem(a,{expand:["seller","product","affiliate_node"]}),{data:m={}}=i||{};this.setFormData(m);const{form:y,productId:O,seller:{username:w}={},embedPrefs:{productIds:X,transparent:q}={}}=m||{};this.doTransparent(y,q&&q!=="false"),n.fetchFullList({username:w}).then(A=>{A.success&&(0,P.tU)(A.data.list)});const ne=y===u.YZ.slider;!r&&O&&await o.fetchItem(O,{username:w,expand:["pricing_plans","covers"]}),!o.list.length&&ne&&(o.setExpands(["covers"]),await o.fetchList({username:w,id:(0,l.HO)(X),canBeSoldViaShop:!0})),this.setLoading(!1)}),J(this,"setFormData",(t={})=>this.formData=t),J(this,"setLoading",t=>this.loading=t),(0,l.Gn)(this)}async componentDidMount(){const{productLink:e,isPreview:t,isCreate:o,productsStore:n,sellerFontsStore:r,currenciesStore:a}=this.props;if(!t&&!o)await a.fetchList(),await this.fetchProductLink();else{const i=(0,T.A)(e,"sellerId","")||(0,T.A)(e,"seller.id","");this.setFormData(e),r.fetchFullList({sellerId:i}).then(m=>{m.success&&(0,P.tU)(m.data.list)}),o&&e.form===u.YZ.slider&&(n.setExpands(["covers"]),n.fetchList({username:e.seller.username,id:(0,l.HO)(e.embedPrefs.productIds),canBeSoldViaShop:!0})),this.setLoading(!1)}}componentDidUpdate(){const{productLink:e,isPreview:t}=this.props;t&&!(0,z.r$)(this.formData,e)&&this.setFormData(e)}componentWillUnmount(){const{productsStore:e}=this.props;e.resetExpands()}render(){const{isPreview:e}=this.props,{form:t}=this.formData||{};if(this.loading||!t)return null;const o=Ft[t];return(0,s.jsxs)(b.Fragment,{children:[(0,s.jsx)(o,{productLink:this.formData,isPreview:e}),(0,s.jsx)(yt,{})]})}};re([l.sH],K.prototype,"formData",2),re([l.sH],K.prototype,"loading",2),re([l.XI],K.prototype,"setFormData",2),re([l.XI],K.prototype,"setLoading",2),K=re([f.y,(0,c.WQ)("embeddableItemsStore","productsStore","sellerFontsStore","currenciesStore"),c.PA],K);const St=K},29787:(M,_,d)=>{d.d(_,{Ah:()=>u,IT:()=>Y,te:()=>$});var s=d(80126),b=d(59394),c=d(48775),l=d(49696),f=d(12747),T=d(40134);const z=(0,f.sy)("webHost"),P=p=>{const{form:g,params:x,embedPrefs:B,embedPrefs:{purpose:L}={},affiliateNode:N}=p||{},k=g===l.YZ.embedPaymentPage,Z=L===l.ji.courseLesson,h={};return N&&(h.pid=N.publisherId,h.prid=N.affiliateProgramId),k?(0,T.ap)({...x,...h,embedType:l.a0.onPage}):Z?(0,T.ap)({...x,...h,lessonId:B.lessonId}):(0,T.ap)({...x,...h})},u=(p,g={},x={},B=!1)=>{const{embedPrefs:L,seller:N={}}=p||{},{slug:k}=g||{},{protocol:Z,host:h,username:G}=(0,c.Im)(N)?x:N,{purpose:ae,redirection:ie,transparent:fe}=L||{},{displayed_plans_id:be,bundles:ue,upsells:le,preselect_upsells:V,tickets:I,...je}=P((0,b.HO)(p)),C=s.A.stringify({displayed_plans_id:Array(be),bundles:Array(ue),upsells:Array(le),preselect_upsells:Array(V),tickets:Array(JSON.stringify(I)),transparent:fe,...je}),D=`${Z}://${B?z:h}`,ge=ie===l.CH.paymentPage;switch(ae){case l.ji.product:return[`${D}/s/${G}/${k}`,ge?"/payment":"","?",C].join("");case l.ji.shop:return[`${D}/s/${G}`,C].join("?");case l.ji.courseLesson:return[`${D}/payer/s/${G}/courses/${k}`,C].join("?");case l.ji.loginPage:return[`${D}/s/${G}/sign_in`,C].join("?");case l.ji.customLink:return[`${L.url}`,C].join(L.url.indexOf("?")>-1?"&":"?");default:return D}},Y=p=>{const{token:g,product:x,form:B}=p,L=(0,f.sy)("webHost"),N=(0,f.sy)("webProtocol");return B===l.YZ.plainLink?u(p,x):`<div id='widgets-container' data-token='${g}'></div><script data-token='${g}' id='widgets-script' src='${`${N}://${L}/widgets.js`}'><\/script>`.trim()},$=(p={})=>{const{embedPrefs:g,form:x}=p,{transparent:B}=g,L=x===l.YZ.embedPaymentPage?{embed_type:l.a0.onPage,transparent:B}:{};return p.url?`${s.A.parseUrl(p.url).url}?${s.A.stringify({...p.params,...L})}`:u(p,p.product)}},93539:(M,_,d)=>{d.d(_,{CH:()=>l.CH,EF:()=>T,NS:()=>Y,NT:()=>l.NT,Xj:()=>g,YZ:()=>l.YZ,_S:()=>$,gX:()=>P,h0:()=>x,ji:()=>l.ji,lP:()=>p,oA:()=>z,qM:()=>u,qm:()=>l.qm});var s=d(33073),b=d(58412),c=d(74008),l=d(49696),f=d(3882);const T={formSelection:"formSelection",affiliateProgram:"affiliateProgram",detailsStep:"detailsStep",redirectionStep:"redirectionStep",paramsFormStep:"paramsFormStep",customizationStep:"customizationStep",previewStep:"previewStep"},z={plainLink:"fas fa-link",textLink:"fas fa-font",button:"fas fa-power-off",banner:"fas fa-image",badge:"fas fa-file-image",slider:"fas fa-images",embedForm:"fas fa-window-maximize",embedPaymentPage:"fas fa-credit-card"},P={plainLink:"light-blue",textLink:"pink",button:"blue",banner:"orange",badge:"red",slider:"light-green",embedForm:"violet",embedPaymentPage:"green"},u={shop:"fas fa-shopping-basket",product:"fas fa-archive",course_lesson:"fas fa-graduation-cap",login_page:"fas fa-sign-in-alt",custom_link:"fas fa-link"},Y={product:"product",course:"course",seller:"seller",customLink:"customLink",productWithAffiliate:"productWithAffiliate"},$={left:"left",right:"right",center:"center"},p={left:"flex-start",right:"flex-end",center:"center"},g={[l.YZ.textLink]:{text:"Lorem ipsum dolor sit amet",fontFamily:"Montserrat Reg",fontStyle:"normal",fontColor:c.lm.eloBlue,fontSize:24},[l.YZ.button]:{buttonText:f.t("react.shared.button.buy_now").toUpperCase(),buttonFontFamily:"Montserrat Medium",buttonFontStyle:"bold",buttonFontColor:c.lm.eloWhite,buttonFontSize:20,buttonColor:c.lm.eloLightGreen,buttonHoverColor:c.lm.eloLightGreen,buttonBorderRadius:6,buttonStyle:b.ll.filled,buttonAnimation:s.H.transparency},[l.YZ.badge]:{badgeColor:c.lm.eloWhite,badgeBorderRadius:6,badgeFontFamily:"Montserrat Reg",badgeFontStyle:"bold",badgeFontColor:c.lm.eloBlack,badgeFontSize:14,buttonText:f.t("react.shared.button.buy_now"),buttonFontFamily:"Montserrat Reg",buttonFontStyle:"normal",buttonFontColor:c.lm.eloWhite,buttonFontSize:12,buttonColor:c.lm.eloOrange,buttonHoverColor:c.lm.eloDarkOrange,buttonBorderRadius:30,buttonStyle:b.ll.filled,buttonAnimation:s.H.transparency,priceBackgroun
1dColor:c.lm.eloBlue,priceFontColor:c.lm.eloWhite,priceTagEnabled:!0,buttonAlignment:$.center,tagBackground:c.lm.eloBlue,tagFontColor:c.lm.eloWhite},[l.YZ.slider]:{badgeColor:c.lm.eloWhite,badgeBorderRadius:6,badgeFontFamily:"Montserrat Reg",badgeFontStyle:"bold",badgeFontColor:c.lm.eloBlack,badgeFontSize:14,buttonText:f.t("react.shared.button.buy_now"),buttonFontFamily:"Montserrat Reg",buttonFontStyle:"normal",buttonFontColor:c.lm.eloWhite,buttonFontSize:12,buttonColor:c.lm.eloOrange,buttonHoverColor:c.lm.eloDarkOrange,buttonBorderRadius:30,buttonStyle:b.ll.filled,buttonAnimation:s.H.transparency,priceBackgroundColor:c.lm.eloBlue,priceFontColor:c.lm.eloWhite,priceTagEnabled:!0,buttonAlignment:$.center,tagBackground:c.lm.eloBlue,tagFontColor:c.lm.eloWhite,sliderBackgroundOpacity:100,sliderShadowOpacity:15,arrowColor:c.lm.eloOrange},[l.YZ.embedForm]:{embedFormContainerMaxWidth:600,embedFormContainerOpacity:100,embedFormShadowOpacity:15,embedFormContainerRadius:4,embedFormColor:c.lm.eloWhite,titleFontFamily:"Montserrat Reg",titleFontStyle:"bold",titleFontColor:c.lm.eloBlack,titleFontSize:18,regCtaFontFamily:"Montserrat Reg",regCtaFontColor:c.lm.eloBlue,buttonText:f.t("shared.common.accept"),buttonFontFamily:"Montserrat Reg",buttonFontStyle:"normal",buttonFontColor:c.lm.eloWhite,buttonFontSize:13,buttonColor:c.lm.eloOrange,buttonHoverColor:c.lm.eloDarkOrange,buttonBorderRadius:17,buttonStyle:b.ll.filled,buttonAnimation:s.H.transparency,buttonAlignment:$.right,locale:f.locale,labelsEnabled:!0,labelFontFamily:"Montserrat Reg",labelFontStyle:"bold",labelColor:c.lm.eloGrey70,labelSize:13}},x=[{label:f.t("react.cabinet.common.id"),csvKey:"id"},{label:f.t("react.cabinet.common.name"),csvKey:"name"},{label:f.t("react.cabinet.common.notes"),csvKey:"description"},{label:f.t("react.cabinet.common.product_name"),csvKey:"product"},{label:f.t("shared.common.created"),csvKey:"created"},{label:f.t("react.cabinet.common.link"),csvKey:"link"},{label:f.t("react.cabinet.product.link.short_link"),csvKey:"short_link"},{label:f.t("react.cabinet.product.link.embed_code"),csvKey:"embed_code"},{label:f.t("react.shared.linked_to"),csvKey:"purpose"},{label:f.t("react.shared.views"),csvKey:"views"}]}}]); 2 3//# sourceMappingURL=9394.cea24e90dc967a5796bc.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.