PageSourceSearch

https://app.flocksocial.com/835.2d704667cc680e67.js

js flocksocial.com collected 2026-09-29 07:49:38 UTC 138,608 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwhite_label_dash=self.webpackChunkwhite_label_dash||[]).push([[835],{835(So,K,l){l.d(K,{PlanAndBillingModule:()=>_o});var A=l(6399),g=l(4460),Q=l(1935),q=l(3202),d=l(1229),P=l(559),c=l(5280),p=l(2394);const ee=(0,p.hZ)("dropDownPlan",[(0,p.kY)("void => *",[(0,p.iF)({"max-height":"0px"}),(0,p.i0)(300,(0,p.iF)({"max-height":"64px"}))]),(0,p.kY)("* => void",[(0,p.iF)({"max-height":"64px"}),(0,p.i0)(300,(0,p.iF)({"max-height":"0px"}))])]),ne=(0,p.hZ)("slideRight",[(0,p.kY)("void => *",[(0,p.iF)({transform:"translateX(100%)"}),(0,p.i0)(300,(0,p.iF)({transform:"translateX(0)"}))]),(0,p.kY)("* => void",[(0,p.iF)({transform:"translateX(0)"}),(0,p.i0)(300,(0,p.iF)({transform:"translateX(100%)"}))])]),te=(0,p.hZ)("expand",[(0,p.kY)("void => *",[(0,p.iF)({"max-height":"0",opacity:0}),(0,p.i0)(100,(0,p.iF)({opacity:1,"max-height":"30px"}))]),(0,p.kY)("* => void",[(0,p.iF)({"max-height":"30px",opacity:1}),(0,p.i0)(100,(0,p.iF)({opacity:0,"max-height":"0"}))])]);var C=l(9556),k=l(9767),u=l(5756),$=l(2986),I=l(5215),O=l(8672),B=l(1134),w=l(1155),e=l(539),S=l(5261),_=l(325),F=l(74),R=l(9548),oe=l(8839),ie=l(9787),Y=l(9086),ae=l(4652),re=l(2487),se=l(6435),le=l(4409);const ce=(t,a)=>({trial_period:t,trial_unit:a}),pe=(t,a)=>({amount:t,period:a}),de=(t,a)=>({price:t,plan_period:a});function me(t,a){if(1&t&&e.nrm(0,"img",23),2&t){const n=e.XpG(2);e.Y8G("src",n.agency.logoOnboardingMedium,e.B4B)}}function ge(t,a){if(1&t&&e.nrm(0,"img",23),2&t){const n=e.XpG(2);e.Y8G("src",n.agency.logoOnboardingBig,e.B4B)}}function _e(t,a){1&t&&(e.j41(0,"div",24)(1,"div",25),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",26),e.EFF(5,">"),e.k0s(),e.j41(6,"div",27),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.j41(9,"div",26),e.EFF(10,">"),e.k0s(),e.j41(11,"div",25),e.EFF(12),e.nI1(13,"translate"),e.k0s()()),2&t&&(e.R7$(2),e.SpI(" ",e.bMT(3,3,"onboarding.personal-info")," "),e.R7$(5),e.SpI(" ",e.bMT(8,5,"onboarding.plan-and-payment")," "),e.R7$(5),e.SpI(" ",e.bMT(13,7,"onboarding.step-complete")," "))}function ue(t,a){if(1&t){const n=e.RV6();e.j41(0,"div",31),e.nrm(1,"app-user-box",32),e.j41(2,"div",33),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.toggleAccountDialogVisibility(!0))}),e.nrm(3,"img",34),e.k0s()()}if(2&t){const n=e.XpG(3);e.R7$(),e.Y8G("subscription",n.onboardingService.subscription)("socialLogo",!0),e.R7$(2),e.Y8G("src",n.getImageSrc("ic_change_grey.svg"),e.B4B)}}function he(t,a){if(1&t&&(e.j41(0,"div",42),e.EFF(1),e.k0s()),2&t){const n=e.XpG(5);e.R7$(),e.SpI(" ",n.selectedPlan.name," ")}}function fe(t,a){if(1&t&&(e.j41(0,"div",39)(1,"div",40),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.DNE(4,he,2,1,"div",41),e.k0s()),2&t){const n=e.XpG(4);e.R7$(2),e.SpI(" ",e.bMT(3,2,"onboarding.selected-plan")," "),e.R7$(2),e.Y8G("ngIf",n.selectedPlan)}}function be(t,a){if(1&t){const n=e.RV6();e.j41(0,"div",43),e.bIt("click",function(){e.eBV(n);const i=e.XpG(4);return e.Njj(i.onChangePlan())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&t&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"onboarding.change-plan")," "))}function ye(t,a){if(1&t&&(e.j41(0,"div",35)(1,"div",36),e.DNE(2,fe,5,4,"div",37)(3,be,3,3,"div",38),e.k0s()()),2&t){const n=e.XpG(3);e.Y8G("@dropDownPlan",void 0),e.R7$(2),e.Y8G("ngIf",n.selectedPlan),e.R7$(),e.Y8G("ngIf",!n.agency.preselectedPlan)}}function Pe(t,a){if(1&t&&(e.j41(0,"div",28),e.DNE(1,ue,4,3,"div",29)(2,ye,4,3,"div",30),e.k0s()),2&t){const n=e.XpG(2);e.R7$(),e.Y8G("ngIf",n.onboardingService.subscription),e.R7$(),e.Y8G("ngIf",n.onboardingService.selectedPlan&&!n.isCurrentOnboardingStep(n.OnboardingStep.CHOOSE_PLAN))}}function ve(t,a){if(1&t){const n=e.RV6();e.j41(0,"app-plan-group-chooser",51),e.bIt("selectedPlanGroupChange",function(i){e.eBV(n);const r=e.XpG(3);return e.Njj(r.onChoosePlanGroup(i))}),e.k0s()}if(2&t){const n=e.XpG(3);e.Y8G("planGroups",n.onboardingService.planGroups)("selectedPlanGroup",n.selectedPlanGroup)}}function Ce(t,a){if(1&t){const n=e.RV6();e.j41(0,"fa-icon",60),e.bIt("mouseenter",function(i){e.eBV(n),e.XpG(3);const r=e.sdS(10),s=e.XpG(2);return e.Njj(s.showTooltip(r,i))})("mouseleave",function(){e.eBV(n),e.XpG(3);const i=e.sdS(10);return e.Njj(i.hide())}),e.k0s()}
1if(2&t){e.XpG(3);const n=e.sdS(10),o=e.XpG(2);e.AVh("color-bkg-4",!n.visible)("color-text-link",n.visible),e.Y8G("icon",o.faWarning)}}function Se(t,a){if(1&t&&(e.j41(0,"div",61),e.EFF(1),e.k0s()),2&t){const n=e.XpG().$implicit,o=e.XpG(4);e.R7$(),e.Lme(" ",n.getPrice()," / ",o.getPeriod(o.selectedPlanGroup)," ")}}function Me(t,a){if(1&t&&(e.j41(0,"span",65),e.EFF(1),e.k0s()),2&t){const n=e.XpG(2).$implicit,o=e.XpG(4);e.R7$(),e.JRh(o.getMonhtlyPlanPrice(n))}}function xe(t,a){if(1&t&&(e.j41(0,"div",62),e.DNE(1,Me,2,1,"span",63),e.j41(2,"span",64),e.EFF(3),e.k0s(),e.EFF(4),e.nI1(5,"translate"),e.k0s()),2&t){const n=e.XpG().$implicit,o=e.XpG(4);e.R7$(),e.Y8G("ngIf",o.getMonhtlyPlanPrice(n)),e.R7$(),e.AVh("color-text-link",o.getMonhtlyPlanPrice(n)),e.R7$(),e.SpI(" ",n.getPriceMonhtly()," "),e.R7$(),e.SpI(" / ",e.bMT(5,5,"shared.time-period.month")," ")}}function ke(t,a){if(1&t&&e.nrm(0,"svg-icon",66),2&t){const n=e.XpG(5);e.Y8G("src",n.getImageSrc("checkbox_checked_v1.svg"))}}function Ie(t,a){if(1&t){const n=e.RV6();e.j41(0,"div",54),e.bIt("click",function(){const i=e.eBV(n).$implicit,r=e.XpG(4);return e.Njj(r.onSelectPlan(i))}),e.j41(1,"div",55),e.EFF(2),e.DNE(3,Ce,1,5,"fa-icon",56),e.k0s(),e.DNE(4,Se,2,2,"div",57)(5,xe,6,7,"div",58)(6,ke,1,1,"svg-icon",59),e.k0s()}if(2&t){const n=a.$implicit,o=e.XpG(4);e.AVh("plan-selected",n===o.selectedPlan)("border-selection",n===o.selectedPlan),e.R7$(2),e.SpI(" ",n.name," "),e.R7$(),e.Y8G("ngIf",o.showPlanWarning(n)),e.R7$(),e.Y8G("ngIf",!o.agency.showMonthlyPrice),e.R7$(),e.Y8G("ngIf",o.agency.showMonthlyPrice),e.R7$(),e.Y8G("ngIf",n===o.selectedPlan)}}function we(t,a){if(1&t&&(e.j41(0,"div",52),e.DNE(1,Ie,7,9,"div",53),e.k0s()),2&t){const n=e.XpG(3);e.AVh("single-plan-group",n.onboardingService.planGroups&&1===n.onboardingService.planGroups.length),e.R7$(),e.Y8G("ngForOf",n.selectedPlanGroup.plans)}}function Ge(t,a){if(1&t&&(e.j41(0,"div",44)(1,"div",45)(2,"div",46),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"div",47),e.EFF(6),e.nI1(7,"translate"),e.k0s(),e.DNE(8,ve,1,2,"app-plan-group-chooser",48),e.k0s(),e.nrm(9,"app-custom-tooltip",49,0),e.DNE(11,we,2,3,"div",50),e.k0s()),2&t){const n=e.XpG(2);e.R7$(3),e.SpI(" ",e.bMT(4,9,"onboarding.select-plan.title")," "),e.R7$(3),e.SpI(" ",e.bMT(7,11,"onboarding.select-plan.subtitle")," "),e.R7$(2),e.Y8G("ngIf",n.onboardingService.planGroups),e.R7$(),e.xc7("left",n.warningPostionLeft+"px")("top",n.warningPostionTop+"px"),e.Y8G("tranlaste",n.getAudienceWarning()),e.R7$(2),e.Y8G("ngIf",n.selectedPlanGroup)}}function Te(t,a){1&t&&e.nrm(0,"app-secure-payment")}function Ee(t,a){if(1&t){const n=e.RV6();e.j41(0,"div",67)(1,"button",68),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.onChoosePlan())}),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.DNE(4,Te,1,0,"app-secure-payment",4),e.k0s()}if(2&t){const n=e.XpG(2);e.R7$(2),e.SpI(" ",e.bMT(3,2,"onboarding.select-plan.proceed-to-payment")," "),e.R7$(2),e.Y8G("ngIf",n.agency.showChargebeeSecurePayment)}}function Oe(t,a){if(1&t){const n=e.RV6();e.j41(0,"app-choose-payment-method",69),e.bIt("onAddNewPaymentMethodEvent",function(i){e.eBV(n);const r=e.XpG(2);return e.Njj(r.addNewPaymentMethod(i))})("onSelectPaymentOptionEvent",function(i){e.eBV(n);const r=e.XpG(2);return e.Njj(r.onSelectPaymentOption(i))})("onHostedPaymentRedirectEvent",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.hostedPaymentRedirect())})("onChoosePaymentMethodEvent",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.onChoosePaymentMethod())}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("agency",n.agency)("selectedPlan",n.selectedPlan)("isPaymentMethodLoading",n.isPaymentMethodLoading)("selectedPaymentMethod",n.selectedPaymentMethod)("primaryPaymentMethod",n.getPrimaryPaymentMethod())("paymentMethods",n.paymentMethods)("showPaymentVerification",n.showPaymentVerification)}}function Re(t,a){if(1&t){const n=e.RV6();e.j41(0,"app-new-payment-method",70),e.bIt("updateOnboardingStepEvent",function(i){e.eBV(n);const r=e.XpG(2);return e.Njj(r.updateOnboardingStep(i))}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("agency",n.agency)("paymentMethods",n.paymentMethods)("showPaymentVerification",n.showPaymentVerification)("paypalBtnIcon",n.getImageSrc("paypal-btn.svg"))("cardIcon",n.getImageSrc("ic_card_v1.svg"))("backIcon",n.getImageSrc("arrow_onboarding_back.svg"))}}function je(t,a){if(1&t){const n=e.RV6();e.j41(0,"app-new-card-payment",71),e.bIt("onTokenizeEvent",function(i){e.eBV(n);const r=e.XpG(2);return e.Njj(r.onTokenize(i))})("onSetComponentEvent",function(i){e.eBV(n);const r=e.XpG(2);return e.Njj(r.setComponent(i))})("onBackEvent",function(i){e.eBV(n);const r=e.XpG(2);return e.Njj(r.onBack(i))}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("isDarkModeEnabled",null==n.agency?null:n.agency.darkMode)("currency",n.currency)("selectedPlan",n.selectedPlan)("isCardLoading",n.isCardLoading)("showPaymentVerification",n.showPaymentVerification)("cardComponent",n.cardComponent)("error",n.paymentError)("name",n.name)("agencyBackIcon",n.getImageSrc("arrow_onboarding_back.svg"))}}
1function Ae(t,a){if(1&t){const n=e.RV6();e.j41(0,"app-billing-address",72),e.bIt("onSubmitDoneEvent",function(i){e.eBV(n);const r=e.XpG(2);return e.Njj(r.onBillingAddressSubmit(i))}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("onboardingBackIcon",n.getImageSrc("arrow_onboarding_back.svg"))("subscription",n.getSubscription())}}function $e(t,a){if(1&t&&(e.j41(0,"div",84),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t){const n=e.XpG(3);e.R7$(),e.SpI(" ",e.i5U(2,1,"onboarding.select-plan.free-trial-badge",e.l_i(4,ce,n.selectedPlan.trialPeriod,n.getTrialPeriodTranslation()))," ")}}function Be(t,a){if(1&t&&(e.j41(0,"div",46),e.EFF(1),e.k0s()),2&t){const n=e.XpG(3);e.R7$(),e.SpI(" ",n.selectedPlan.name," ")}}function Fe(t,a){if(1&t&&(e.j41(0,"div",46),e.EFF(1),e.k0s()),2&t){const n=e.XpG(3);e.R7$(),e.SpI(" ",n.getCustomPlanTitle()," ")}}function Ye(t,a){if(1&t&&(e.j41(0,"div",85),e.EFF(1),e.k0s()),2&t){const n=e.XpG(3);e.R7$(),e.SpI(" ",n.selectedPlan.description," ")}}function Ne(t,a){if(1&t&&(e.j41(0,"div",86)(1,"span"),e.EFF(2),e.k0s()()),2&t){const n=e.XpG(3);e.R7$(2),e.JRh(n.getPrice())}}function De(t,a){if(1&t&&(e.j41(0,"div",87)(1,"span",88),e.EFF(2),e.k0s(),e.j41(3,"span",89),e.EFF(4),e.k0s()()),2&t){const n=e.XpG(3);e.R7$(2),e.JRh(n.selectedPlan.getPrice()),e.R7$(2),e.JRh(n.getPrice())}}function Ve(t,a){if(1&t&&(e.j41(0,"div",90)(1,"span"),e.EFF(2),e.k0s()()),2&t){const n=e.XpG(3);e.R7$(2),e.SpI("/",n.getPeriod(n.selectedPlanGroup),"")}}function ze(t,a){if(1&t&&(e.j41(0,"div",91),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t){const n=e.XpG(3);e.R7$(),e.SpI(" ",e.i5U(2,1,"onboarding.select-plan.cancel-anytime",e.l_i(4,pe,n.selectedPlan.getPrice(),n.getPeriod(n.selectedPlanGroup)))," ")}}function Xe(t,a){if(1&t&&(e.j41(0,"div",91),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t){const n=e.XpG(3);e.R7$(),e.SpI(" ",e.i5U(2,1,"onboarding.select-plan.trial-price-desc",e.l_i(4,de,n.getNextEstimate(),n.getPlanGroupNameY(n.selectedPlanGroup).toLowerCase()))," ")}}function Le(t,a){if(1&t&&(e.j41(0,"div",92),e.nrm(1,"svg-icon",93),e.EFF(2),e.k0s()),2&t){const n=a.$implicit,o=e.XpG(3);e.R7$(),e.Y8G("src",o.getImageSrc("feature_icon.svg")),e.R7$(),e.SpI(" ",n," ")}}function Ue(t,a){if(1&t&&(e.j41(0,"div",73),e.DNE(1,$e,3,7,"div",74)(2,Be,2,1,"div",75)(3,Fe,2,1,"div",75)(4,Ye,2,1,"div",76),e.j41(5,"div",77),e.DNE(6,Ne,3,1,"div",78)(7,De,5,2,"div",79)(8,Ve,3,1,"div",80),e.k0s(),e.j41(9,"div",81),e.DNE(10,ze,3,7,"div",82)(11,Xe,3,7,"div",82),e.k0s(),e.DNE(12,Le,3,2,"div",83),e.k0s()),2&t){const n=e.XpG(2);e.R7$(),e.Y8G("ngIf",n.selectedPlan.hasTrial()),e.R7$(),e.Y8G("ngIf",!n.getCustomPlanTitle()),e.R7$(),e.Y8G("ngIf",n.getCustomPlanTitle()),e.R7$(),e.Y8G("ngIf",null==n.selectedPlan?null:n.selectedPlan.description),e.R7$(2),e.Y8G("ngIf",!n.selectedPlan.getNewPrice()),e.R7$(),e.Y8G("ngIf",n.selectedPlan.getNewPrice()),e.R7$(),e.Y8G("ngIf",!n.getCustomPrice()&&!n.selectedPlan.hasTrial()),e.R7$(2),e.Y8G("ngIf",!n.selectedPlan.hasTrial()),e.R7$(),e.Y8G("ngIf",n.selectedPlan.hasTrial()),e.R7$(),e.Y8G("ngForOf",n.selectedPlan.features)}}function He(t,a){if(1&t){const n=e.RV6();e.j41(0,"a",101),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.onShowCouponInput())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&t&&(e.Y8G("@fadeInOut",void 0),e.R7$(),e.SpI(" ",e.bMT(2,2,"onboarding.coupon-box.i-have-coupon")," "))}function We(t,a){1&t&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"onboarding.coupon-box.apply")," "))}function Je(t,a){1&t&&e.nrm(0,"app-small-loader",108),2&t&&e.Y8G("color","white")("scale",.8)}function Ze(t,a){if(1&t){const n=e.RV6();e.j41(0,"div",102)(1,"div",103)(2,"input",104),e.nI1(3,"translate"),e.mxI("ngModelChange",function(i){e.eBV(n);const r=e.XpG(3);return e.DH7(r.coupon,i)||(r.coupon=i),e.Njj(i)}),e.bIt("keyup.enter",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.onApplyCoupon())}),e.k0s(),e.j41(4,"fa-icon",105),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.onHideCouponInput())}),e.k0s()(),e.j41(5,"button",106),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.onApplyCoupon())}),e.DNE(6,We,3,3,"span",4)(7,Je,1,2,"app-small-loader",107),e.k0s()()}if(2&t){const n=e.XpG(3);e.Y8G("@fadeInOut",void 0),e.R7$(2),e.AVh("invalid",n.selectedPlan.coupon&&n.selectedPlan.coupon.error),e.R50("ngModel",n.coupon),e.Y8G("placeholder",e.bMT(3,8,"onboarding.coupon-box.enter-coupon-here")),e.R7$(2),e.Y8G("icon",n.faClose),e.R7$(2),e.Y8G("ngIf",!n.selectedPlan.isLoadingCoupon()),e.R7$(),e.Y8G("ngIf",n.selectedPlan.isLoadingCoupon())}}function Ke(t,a){if(1&t){const n=e.RV6();e.j41(0,"div",103)(1,"div",109),e.EFF(2),e.k0s(),e.j41(3,"fa-icon",110),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.onEditCoupon())}),e.k0s()()}if(2&t){const n=e.XpG(3);e.Y8G("@fadeInOut",void 0),e.R7$(),e.AVh("error",n.selectedPlan.getCouponError()),e.R7$(),e.SpI(" ",n.couponService.selectedCoupon," "),e.R7$(),e.Y8G("icon",n.faPen)}}function Qe(t,a){if(1&t&&e.nrm(0,"div",111),2&t){const n=e.XpG(3);e.Y8G("innerHTML",n.selectedPlan.coupon.note,e.npT)("@fadeInOut",void 0)}}
1function qe(t,a){if(1&t&&e.nrm(0,"div",112),2&t){const n=e.XpG(3);e.Y8G("innerHTML",n.selectedPlan.coupon.error,e.npT)("@fadeInOut",void 0)}}function en(t,a){if(1&t&&(e.j41(0,"div",94),e.DNE(1,He,3,4,"a",95)(2,Ze,8,10,"div",96)(3,Ke,4,5,"div",97),e.j41(4,"div",98),e.DNE(5,Qe,1,2,"div",99)(6,qe,1,2,"div",100),e.k0s()()),2&t){const n=e.XpG(2);e.R7$(),e.Y8G("ngIf",!n.inputCoupon&&!n.couponService.selectedCoupon&&!n.selectedPlan.isLoadingCoupon()),e.R7$(),e.Y8G("ngIf",n.inputCoupon),e.R7$(),e.Y8G("ngIf",n.couponService.selectedCoupon),e.R7$(2),e.Y8G("ngIf",n.selectedPlan.coupon&&n.selectedPlan.coupon.note&&!n.selectedPlan.coupon.error),e.R7$(),e.Y8G("ngIf",n.selectedPlan.coupon&&n.selectedPlan.coupon.error)}}function nn(t,a){if(1&t&&(e.j41(0,"div",7),e.DNE(1,me,1,1,"img",8)(2,ge,1,1,"img",8),e.j41(3,"div",9),e.DNE(4,_e,14,9,"div",10),e.j41(5,"div",11),e.DNE(6,Pe,3,2,"div",12),e.j41(7,"div",13),e.DNE(8,Ge,12,13,"div",14)(9,Ee,5,4,"div",15)(10,Oe,1,7,"app-choose-payment-method",16)(11,Re,1,6,"app-new-payment-method",17)(12,je,1,9,"app-new-card-payment",18)(13,Ae,1,2,"app-billing-address",19),e.k0s()(),e.j41(14,"div",20),e.DNE(15,Ue,13,10,"div",21)(16,en,7,5,"div",22),e.k0s()()()),2&t){const n=e.XpG();e.R7$(),e.Y8G("ngIf",n.agency.onboardingLogo&&!n.onboardingService.isBigScreen()),e.R7$(),e.Y8G("ngIf",n.agency.onboardingLogo&&n.onboardingService.isBigScreen()),e.R7$(2),e.Y8G("ngIf",!n.agency.onboardingLogo),e.R7$(2),e.Y8G("ngIf",!n.isCurrentOnboardingStep(n.OnboardingStep.BILLING_ADDRESS)),e.R7$(2),e.Y8G("ngIf",n.isCurrentOnboardingStep(n.OnboardingStep.CHOOSE_PLAN)),e.R7$(),e.Y8G("ngIf",n.isCurrentOnboardingStep(n.OnboardingStep.CHOOSE_PLAN)),e.R7$(),e.Y8G("ngIf",n.isOnboardingStep(n.OnboardingStep.CHOOSE_PAYMENT)),e.R7$(),e.Y8G("ngIf",n.isOnboardingStep(n.OnboardingStep.NEW_PAYMENT)),e.R7$(),e.Y8G("ngIf",n.isOnboardingStep(n.OnboardingStep.CARD_PAYMENT)),e.R7$(),e.Y8G("ngIf",n.isOnboardingStep(n.OnboardingStep.BILLING_ADDRESS)),e.R7$(2),e.Y8G("ngIf",n.selectedPlan),e.R7$(),e.Y8G("ngIf",n.agency.couponsOboarding&&n.selectedPlan)}}function tn(t,a){if(1&t){const n=e.RV6();e.j41(0,"div",113),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.showChangeAccountPopup=!1)}),e.j41(1,"div",114),e.bIt("click",function(i){return e.eBV(n),e.Njj(i.stopPropagation())}),e.j41(2,"svg-icon",115),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.showChangeAccountPopup=!1)}),e.k0s(),e.j41(3,"div",116),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"div",117),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.j41(9,"div",103)(10,"button",118),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.onChangeAccount())}),e.EFF(11),e.nI1(12,"translate"),e.k0s(),e.j41(13,"button",119),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.showChangeAccountPopup=!1)}),e.EFF(14),e.nI1(15,"translate"),e.k0s()()()()}if(2&t){const n=e.XpG();e.Y8G("@fadeInOut",void 0),e.R7$(2),e.Y8G("src",n.getImageSrc("ic_close_v1.svg")),e.R7$(),e.AVh("f-size-26",!n.isMobile()),e.R7$(),e.SpI(" ",e.bMT(5,14,"onboarding.change-account-popup.title")," "),e.R7$(2),e.AVh("f-size-14",!n.isMobile()),e.R7$(),e.SpI(" ",e.bMT(8,16,"onboarding.change-account-popup.subtitle")," "),e.R7$(3),e.AVh("f-size-16",!n.isMobile()),e.R7$(),e.SpI(" ",e.bMT(12,18,"onboarding.change-account-popup.change-account")," "),e.R7$(2),e.AVh("f-size-16",!n.isMobile()),e.R7$(),e.SpI(" ",e.bMT(15,20,"onboarding.change-account-popup.use-current-account")," ")}}function on(t,a){if(1&t&&e.nrm(0,"img",136),2&t){const n=e.XpG(2);e.Y8G("src",n.getImageSrc("instagram.svg"),e.B4B)}}function an(t,a){if(1&t&&e.nrm(0,"img",136),2&t){const n=e.XpG(2);e.Y8G("src",n.getImageSrc("tiktok.svg"),e.B4B)}}function rn(t,a){1&t&&e.nrm(0,"div",137)}function sn(t,a){if(1&t&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&t){const n=e.XpG(4);e.R7$(),e.SpI(" ",n.onboardingService.selectedPlan.getPrice()," ")}}function ln(t,a){if(1&t&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&t){const n=e.XpG(4);e.R7$(),e.SpI(" ",n.selectedPlan.coupon.newPrice," ")}}function cn(t,a){if(1&t&&(e.j41(0,"span",27),e.EFF(1," ( "),e.DNE(2,sn,2,1,"span",4)(3,ln,2,1,"span",4),e.EFF(4," ) "),e.k0s()),2&t){const n=e.XpG(3);e.R7$(2),e.Y8G("ngIf",n.selectedPlan&&!n.selectedPlan.getNewPrice()),e.R7$(),e.Y8G("ngIf",n.selectedPlan&&n.selectedPlan.getNewPrice())}}function pn(t,a){if(1&t){const n=e.RV6();e.j41(0,"img",141),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.onChangePlan())}),e.k0s()}if(2&t){const n=e.XpG(3);e.Y8G("src",n.getImageSrc("ic_change_grey.svg"),e.B4B)}}function dn(t,a){if(1&t&&(e.j41(0,"div",138)(1,"div",39)(2,"div",126),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"div",127),e.EFF(6),e.DNE(7,cn,5,2,"span",139),e.k0s()(),e.DNE(8,pn,1,1,"img",140),e.k0s()),2&t){const n=e.XpG(2);e.R7$(3),e.SpI(" ",e.bMT(4,4,"onboarding.plan-and-billing-mobile.plan")," "),e.R7$(3),e.SpI(" ",n.onboardingService.selectedPlan.name," "),e.R7$(),e.Y8G("ngIf","engagement"!==n.agency.name&&"upgram"!==n.agency.name),e.R7$(),e.Y8G("ngIf",!n.agency.preselectedPlan)}}function mn(t,a){if(1&t&&(e.j41(0,"div",142)(1,"div",143),e.EFF(2),e.k0s(),e.j41(3,"div",144),e.EFF(4),e.k0s()()),2&t){const n=e.XpG(2);e.R7$(2),e.SpI(" ",n.getCurrentTitle()," "),e.R7$(2),e.SpI(" ",n.getCurrentBody()," ")}}function gn(t,a){1&t&&e.nrm(0,"div",137)}function _n(t,a){if(1&t&&e.nrm(0,"app-choose-plan-mobile",145),2&t){const n=e.XpG(2);e.Y8G("parent",n)}}function un(t,a){if(1&t){const n=e.RV6();e.j41(0,"app-choose-payment-method",146),e.bIt("onAddNewPaymentMethodEvent",function(i){e.eBV(n);const r=e.XpG(2);return e.Njj(r.addNewPaymentMethod(i))})("onSelectPaymentOptionEvent",function(i){e.eBV(n);const r=e.XpG(2);return e.Njj(r.onSelectPaymentOption(i))})("onHostedPaymentRedirectEvent",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.hostedPaymentRedirect())})("onChoosePaymentMethodEvent",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.onChoosePaymentMethod())}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("agency",n.agency)("selectedPlan",n.selectedPlan)("selectedPaymentMethod",n.selectedPaymentMethod)("primaryPaymentMethod",n.getPrimaryPaymentMethod())("paymentMethods",n.paymentMethods)("isPaymentMethodLoading",n.isPaymentMethodLoading)("showPaymentVerification",n.showPaymentVerification)}}function hn(t,a){if(1&t){const n=e.RV6();e.j41(0,"app-new-payment-method-mobile",147),e.bIt("onSetComponentEvent",function(i){e.eBV(n);const r=e.XpG(2);return e.Njj(r.setComponent(i))})("onTokenizeEvent",function(i){e.eBV(n);const r=e.XpG(2);return e.Njj(r.onTokenize(i))}),e.k0s()}if(2&t){const n=e.XpG(2);e.Y8G("currency",n.currency)("selectedPlan",n.selectedPlan)("cardComponent",n.cardComponent)("isCardLoading",n.isCardLoading)("isDarkMode",null==n.agency?null:n.agency.darkMode)("name",n.name)("showPaymentVerification",n.showPaymentVerification)("paypalBtnIcon",n.getImageSrc("paypal-btn.svg"))("cardIcon",n.getImageSrc("ic_card_v1.svg"))("paypalIcon",n.getImageSrc("paypal.svg"))("applePayIcon",n.getImageSrc("apple-pay_full.svg"))}}function fn(t,a){if(1&t){const n=e.RV6();e.j41(0,"app-billing-address-mobile",148),e.bIt("onSubmitDoneEvent",function(i){e.eBV(n);const r=e.XpG(2);return e.Njj(r.onBillingAddressSubmit(i))}),e.k0s()}}function bn(t,a){if(1&t){const n=e.RV6();e.j41(0,"div",120)(1,"div",121)(2,"div",122)(3,"div",123),e.nrm(4,"img",124),e.DNE(
15,on,1,1,"img",125)(6,an,1,1,"img",125),e.k0s(),e.j41(7,"div",39)(8,"div",126),e.EFF(9),e.nI1(10,"translate"),e.k0s(),e.j41(11,"div",127),e.EFF(12),e.k0s()(),e.j41(13,"img",128),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.toggleAccountDialogVisibility(!0))}),e.k0s()(),e.DNE(14,rn,1,0,"div",129)(15,dn,9,6,"div",130)(16,mn,5,2,"div",131)(17,gn,1,0,"div",129),e.k0s(),e.DNE(18,_n,1,1,"app-choose-plan-mobile",132)(19,un,1,7,"app-choose-payment-method",133)(20,hn,1,11,"app-new-payment-method-mobile",134)(21,fn,1,0,"app-billing-address-mobile",135),e.k0s()}if(2&t){const n=e.XpG();e.R7$(4),e.Y8G("src",n.onboardingService.subscription.img,e.B4B),e.R7$(),e.Y8G("ngIf","instagram"===n.onboardingService.subscription.social),e.R7$(),e.Y8G("ngIf","tiktok"===n.onboardingService.subscription.social),e.R7$(3),e.SpI(" ",e.bMT(10,14,"onboarding.plan-and-billing-mobile.account")," "),e.R7$(3),e.SpI(" @",n.onboardingService.subscription.username," "),e.R7$(),e.Y8G("src",n.getImageSrc("ic_change_grey.svg"),e.B4B),e.R7$(),e.Y8G("ngIf",!n.isCurrentOnboardingStep(n.OnboardingStep.CHOOSE_PLAN)&&n.onboardingService.selectedPlan),e.R7$(),e.Y8G("ngIf",!n.isCurrentOnboardingStep(n.OnboardingStep.CHOOSE_PLAN)&&n.onboardingService.selectedPlan),e.R7$(),e.Y8G("ngIf",n.isCurrentOnboardingStep(n.OnboardingStep.CHOOSE_PAYMENT)),e.R7$(),e.Y8G("ngIf",!n.isCurrentOnboardingStep(n.OnboardingStep.CHOOSE_PAYMENT)),e.R7$(),e.Y8G("ngIf",n.isCurrentOnboardingStep(n.OnboardingStep.CHOOSE_PLAN)),e.R7$(),e.Y8G("ngIf",n.isCurrentOnboardingStep(n.OnboardingStep.CHOOSE_PAYMENT)),e.R7$(),e.Y8G("ngIf",n.isCurrentOnboardingStep(n.OnboardingStep.NEW_PAYMENT)||n.isCurrentOnboardingStep(n.OnboardingStep.CARD_PAYMENT)),e.R7$(),e.Y8G("ngIf",n.isCurrentOnboardingStep(n.OnboardingStep.BILLING_ADDRESS))}}function yn(t,a){1&t&&e.nrm(0,"app-subscription-loader")}function Pn(t,a){if(1&t){const n=e.RV6();e.j41(0,"app-subscription-error",149),e.bIt("closed",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.onboardingService.errorCreatingSubscription=null)}),e.k0s()}if(2&t){const n=e.XpG();e.Y8G("errorMessage",n.onboardingService.errorCreatingSubscription)}}function vn(t,a){if(1&t){const n=e.RV6();e.j41(0,"app-confirm-yearly-plan-dialog",150),e.bIt("onCloseDialogEvent",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.onCloseYearlyPlanDialog())})("onConfirmEvent",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.onConfirmYearlyPlan())}),e.k0s()}}let M=(()=>{class t{get isBigScreen(){return this.onboardingService.isBigScreen()}constructor(n,o,i,r,s,m,x,uo,ho,fo,bo,yo,Po,vo,Co){this.agencyService=n,this.onboardingService=o,this.translateService=i,this.userService=r,this.toastService=s,this.router=m,this.route=x,this.location=uo,this.cookieService=ho,this.paymentService=fo,this.httpSender=bo,this.couponService=yo,this.renderer=Po,this.paymentVerificationService=vo,this.customerService=Co,this.estimates={},this.faWarning=P.QJT,this.faCheck=P.e68,this.faPen=B.hpd,this.faClose=P.yYc,this.warningPostionTop=0,this.warningPostionLeft=0,this.OnboardingStep=c.E,this.cardComponent=null,this.pendingTokenizeData=null}ngOnInit(){this.setBodyScrollPosition(),this.agency=this.agencyService.agency;const n=this.getSubscription();if(this.paymentService.getPaymentSources(),n)if(n.isDraft()||this.onboardingService.subscriptionJustCreated){if(this.paymentService.preloadBraintree(),this.paymentService.initStripe(),this.paymentService.initChargebeeApplePay(),this.userService.currentSubscription=n,this.onboardingService.setSubscription(n),this.onboardingService.platform=c.F6.INSTAGRAM,this.setPlan(this.onboardingService.selectedPlan),this.onboardingService.planGroups)this.initPlans();else{const{uuid:o}=this.onboardingService.subscription;this.onboardingService.getPlans(o).add(()=>{this.initPlans()})}this.updateLocation(),this.location.onPopState(()=>{this.updateLocation()}),null===this.onboardingService.planGroups&&this.onboardingService.getPlans(n.uuid),this.currency=this.agencyService.getCurrency(),this.paymentMethods=this.paymentService.paymentMethods,this.name=this.customerService.getFullName(),this.setShowPaymentVerification(this.selectedPlan),this.selectedPaymentMethod=this.getPaymentMethod()}else if(n.hasAccount())this.userService.navigateByCurrentSubscription();else{const{uuid:o}=this.onboardingService.subscription;this.router.navigateByUrl(`onboarding/subscriptions/${o}/connect-account/add-password`)}else this.router.navigateByUrl("/onboarding")}setPlan(n){this.selectedPlan=n,this.checkCouponValidity(n)}setBodyScrollPosition(){this.renderer.setProperty(document.body,"scrollTop",0),this.renderer.setProperty(document.documentElement,"scrollTop",0)}checkCouponValidity(n){!n||!this.couponService.selectedCoupon||(!n.coupon||n.c
1oupon.name!==this.couponService.selectedCoupon)&&(this.coupon=this.couponService.selectedCoupon,this.onApplyCoupon())}initPlans(){const n=this.getCurrentPlan(this.onboardingService.subscription);if(n){this.setPlan(n);for(let o of this.onboardingService.planGroups)o.periodUnit===n.periodUnit&&o.period==n.period&&(this.selectedPlanGroup=o)}else this.setPlan(this.getDefaultPlan());this.sendPlanGroupViewAnalytics(this.selectedPlanGroup),this.isMobile()||this.sendPlanViewAnalytics(this.selectedPlan),this.checkLocalStorageCoupon()}checkLocalStorageCoupon(){let n=null;this.onboardingService.subscription&&this.onboardingService.subscription.uuid&&(n=this.couponService.getCouponForSubscription(this.onboardingService.subscription.uuid)),n||(n=this.couponService.getPendingCoupon(),n&&this.onboardingService.subscription&&this.onboardingService.subscription.uuid&&this.couponService.migratePendingCoupon(this.onboardingService.subscription.uuid)),n&&this.httpSender.get("billing/coupons/"+n).subscribe({next:o=>{"expired"!==o.body.coupon.status&&(this.couponService.selectedCoupon=n,this.checkCouponValidity(this.selectedPlan))},error:o=>{console.error(o)}})}isSliderRight(){return!(!this.selectedPlanGroup||!this.onboardingService.planGroups)&&this.selectedPlanGroup===this.onboardingService.planGroups[1]}getPlanGroupPeriod(n){return n.periodUnit}updateLocation(){if(this.router.url.includes("/plan"))this.onboardingService.onboardingStep=c.E.CHOOSE_PLAN;else if(this.router.url.includes("/billing-address"))this.onboardingService.onboardingStep=c.E.BILLING_ADDRESS;else if(this.router.url.includes("/billing")){const{paymentMethods:n}=this.paymentService,{hostedPayment:o}=this.agencyService.agency;if(n&&n.length>0)this.onboardingService.onboardingStep=c.E.CHOOSE_PAYMENT;else{if(!o)return void(this.onboardingService.onboardingStep=c.E.NEW_PAYMENT);this.onboardingService.onboardingStep=c.E.CHOOSE_PAYMENT}}if(this.onboardingService.onboardingStep===c.E.CHOOSE_PLAN&&this.onboardingService.subscription.plan_id&&this.agencyService.agency.preselectedPlan){const{uuid:n,plan_id:o}=this.onboardingService.subscription;this.router.navigateByUrl(`/onboarding/subscriptions/${n}/billing?plan_id${o}`)}}getDefaultPlan(){const{planGroups:n}=this.onboardingService;if(null===n||0===n.length)return null;if(!this.selectedPlan){const o=localStorage.getItem("plan");if(o)for(const i of this.onboardingService.planGroups)for(const r of i.plans)if(r.id===o)return this.selectedPlanGroup=i,r}if(this.selectedPlanGroup){for(const o of this.selectedPlanGroup.plans)if(this.selectedPlan){if(this.selectedPlan.name===o.name)return o}else if(o.default)return o;return this.selectedPlanGroup.plans[0]}if(!this.selectedPlanGroup){for(let o of this.onboardingService.planGroups)for(const i of o.plans)if(i.default)return this.selectedPlanGroup=o,i;return this.selectedPlanGroup=this.onboardingService.planGroups[0],this.selectedPlanGroup.plans[0]}return null}getCurrentPlan(n){for(const o of this.onboardingService.planGroups)for(const i of o.plans)if(i.id===n.plan_id)return i;return null}getSubscription(){const n=this.route.snapshot.paramMap.get("uuid");for(const o of this.userService.subscriptions)if(n===o.uuid)return o;return null}onChoosePlanGroup(n){this.selectedPlanGroup!==n&&(this.mixpanelEvent("billing_change",{pk:this.onboardingService.subscription?.pk,periodUnit:n.periodUnit}),this.selectedPlanGroup=n,this.setPlan(this.getDefaultPlan()),this.sendPlanGroupViewAnalytics(n),this.isMobile()||this.sendPlanViewAnalytics(this.selectedPlan))}onSelectPlan(n){!this.isMobile()&&n!==this.selectedPlan&&(this.sendPlanSelectedAnalytics(n),this.sendPlanViewAnalytics(n)),this.mixpanelEvent("plan_change",{pk:this.onboardingService.subscription?.pk,plan:n.name}),this.setPlan(n)}sendPlanSelectedAnalytics(n){const{periodUnit:o,id:i,currency:r,price:s}=n;window.dataLayer.push({event:"select_item",service_type:this.onboardingService.platform===c.F6.INSTAGRAM?"instagram":"tiktok",ecommerce:{item_list_id:o,item_list_name:o,items:[{item_id:i,item_name:i,item_brand:this.agencyService.agency.brandName,currency:r,price:s/100,affiliation:this.cookieService.get("x-tapfilliate-token")}]}})}sendPlanViewAnalytics(n){const{periodUnit:o,id:i,currency:r,price:s}=n;window.dataLayer.push({event:"view_item",service_type:this.onboardingService.platform===c.F6.INSTAGRAM?"instagram":"tiktok",ecommerce:{item_list_id:o,item_list_name:o,items:[{item_id:i,item_name:i,item_brand:this.agencyService.agency.brandName,currency:r,price:s/100,affiliation:this.cookieService.get("x-tapfilliate-token"),quantity:1}]}})}sendPlanGroupViewAnalytics(n){if(!n)return;const{plans:o,periodUnit:i}=n;let r=[];for(const s of o)r.push({item_id:s.id,item_name:s.id,item_brand:this.agencyService.agency.brandName,currency:s.currency,price:s.price/100,affiliation:this.cookieService.get("x-tapfilliate-token"),quantity:1});window.dataLayer.push({event:"view_item_list",service_type:this.onboardingService.platform===c.F6.INSTAGRAM?"instagram":"tiktok",ecommerce:{item_list_id:i,item_list_name:i,items:r}})}
1onChoosePlan(){this.onboardingService.subscription?(this.loadingPlan=!0,this.onboardingService.choosePlan(this.onboardingService.subscription,this.selectedPlan).subscribe({next:n=>{this.onChoosePlanCallback(n,this.selectedPlan),this.mixpanelEvent("billing_proceed",{pk:this.onboardingService.subscription?.pk,plan:this.selectedPlan?.name})},error:n=>{this.onChoosePlanCallback(n,this.selectedPlan),this.mixpanelEvent("billing_proceed_fail",{pk:this.onboardingService.subscription?.pk,error:n})}})):this.toastService.showToast(this.translateService.instant("errors.unknow-exception"),u.TS.RED)}onChoosePlanCallback(n,o){if(this.loadingPlan=!1,200===n.status||201===n.status){window.dataLayer.push({event:"onb_add_to_cart"}),this.onboardingService.selectedPlan=this.selectedPlan,this.onboardingService.subscription.plan=o,this.onboardingService.subscription.plan_id=o.id;const{paymentMethods:i}=this.paymentService;if(i&&i.length>0)this.onboardingService.onboardingStep=c.E.CHOOSE_PAYMENT;else{const{hostedPayment:r}=this.agencyService.agency;if(!r)return void(this.onboardingService.onboardingStep=c.E.NEW_PAYMENT);this.onboardingService.onboardingStep=c.E.CHOOSE_PAYMENT}this.paymentService.getPrimaryPaymentMethod(!1),this.onboardingService.nextStep(this.onboardingService.subscription,c.E.CHOOSE_PLAN)}else this.setSelectPlanSentry(n,o)}getPeriod(n){return C.I.getGroupPeriod(n,this.translateService)}getPlanGroupName(n){return n?C.I.getGroupPeriod(n,this.translateService):""}getPlanGroupNameY(n){return n?C.I.getGroupPeriodY(n,this.translateService):""}onChangePlan(){this.onboardingService.onboardingStep=c.E.CHOOSE_PLAN,this.location.pushState(null,null,`onboarding/subscriptions/${this.onboardingService.subscription.uuid}/plan`),this.onboardingService.selectedPlan=null,this.onboardingService.subscription.plan=null,this.selectedPlan=null,this.selectedPlan=this.getDefaultPlan()}onChangeAccount(){this.onDeleteDraft(this.onboardingService.subscription)}onDeleteDraft(n){this.onboardingService.deleteDraftSubscription(n.uuid).subscribe({next:o=>this.onDeleteDraftCallback(o,n),error:o=>this.onDeleteDraftCallback(o,n)})}onDeleteDraftCallback(n,o){const{status:i}=n;if(200===i||201===i){for(let r=0;r<this.userService.subscriptions.length;r++)if(o.uuid===this.userService.subscriptions[r].uuid)return this.userService.subscriptions.splice(r,1),this.onboardingService.onboardingStep=c.E.CHOOSE_PLATFORM,this.onboardingService.platform=null,this.onboardingService.selectedAccount=null,void this.router.navigateByUrl("/onboarding")}else this.onboardingService.onboardingStep=c.E.CHOOSE_PLATFORM,this.onboardingService.platform=null,this.onboardingService.selectedAccount=null,this.router.navigateByUrl("/onboarding")}isMobile(){return window.innerWidth<I.s}getCurrentTitle(){const{onboardingStep:n}=this.onboardingService;return n===c.E.CHOOSE_PLAN?this.translateService.instant("onboarding.plan-and-billing-mobile.plan"):n===c.E.CHOOSE_PAYMENT||n===c.E.NEW_PAYMENT||n===c.E.CARD_PAYMENT?this.translateService.instant("onboarding.plan-and-billing-mobile.payment-method"):""}getCurrentBody(){const{onboardingStep:n}=this.onboardingService;if(n===c.E.CHOOSE_PLAN)return this.translateService.instant("onboarding.plan-and-billing-mobile.not-selected-yet");if(n===c.E.CHOOSE_PAYMENT){const o=this.getPaymentMethod();if(o)return"card"===o.type?o.brand.toUpperCase()+" "+this.translateService.instant("onboarding.plan-and-billing-mobile.ending-with")+" "+o.last4:"apple_pay"===o.type?"Apple Pay "+this.translateService.instant("onboarding.plan-and-billing-mobile.ending-with")+" "+o.last4:"paypal_express_checkout"===o.type?"PayPal":o.type.toUpperCase()}else{if(n===c.E.NEW_PAYMENT)return this.translateService.instant("onboarding.plan-and-billing-mobile.not-selected-yet");if(n===c.E.CARD_PAYMENT)return this.translateService.instant("onboarding.plan-and-billing-mobile.not-selected-yet")}return""}getPaymentMethod(){return this.onboardingService.selectedPaymentMethod?this.onboardingService.selectedPaymentMethod:this.paymentService.primaryPaymentMethod()}getCustomPrice(){return this.translateService.instant("onboarding.select-plan.custom-price")}getPrice(){return this.getCustomPrice()?this.getCustomPrice():this.selectedPlan.hasTrial()?this.translateService.instant("onboarding.select-plan.free"):this.selectedPlan.getNewPrice()?this.selectedPlan.coupon.newPrice:this.selectedPlan.getPrice()}getCustomPlanTitle(){return this.translateService.instant("onboarding.select-plan.custom-plan-title")}onEditCoupon(){this.onHideCouponInput(),this.onShowCouponInput()}onShowCouponInput(){this.inputCoupon=!0}onHideCouponInput(){this.inputCoupon=!1,this.couponService.clear(),this.onboardingService.planGroups.forEach(n=>
1{n.plans.forEach(o=>{o.coupon=null})})}onApplyCoupon(){this.selectedPlan.isLoadingCoupon()||this.couponService.getCoupon(this.coupon,this.selectedPlan).subscribe({next:()=>{this.coupon&&this.onboardingService.subscription&&this.couponService.setCouponForSubscription(this.onboardingService.subscription.uuid?this.onboardingService.subscription.uuid:null,this.coupon),this.getSubscriptionEstimate(),this.userService.subscriptions.length<=1&&this.mixpanelEvent("signup_coupon_apply",{coupon:this.coupon,plan:this.selectedPlan.id,pk:this.onboardingService.selectedAccount?.pk||"Unknown PK",email:this.customerService.email})},error:n=>{console.error(n)}})}getSubscriptionEstimate(){this.couponService.getNewSubscriptionEstimate(this.coupon,this.selectedPlan).subscribe({next:n=>{this.inputCoupon=!1,this.estimates[this.selectedPlan.id+"_"+this.coupon]=n},error:n=>{console.error(n)}})}getNextEstimate(){if(!this.selectedPlan)return null;const n=this.estimates[this.selectedPlan.id+"_"+this.coupon];return n?n.getPrice():this.selectedPlan.getPrice()}capitalizeFirstLetter(n){return!n||n.length<1?"":n.charAt(0).toUpperCase()+n.slice(1)}showTooltip(n,o){n.show();const r=o.target.getBoundingClientRect();this.warningPostionLeft=r.left+8,this.warningPostionTop=r.top}getAudienceWarning(){return this.translateService.instant("onboarding.select-plan.audience-warning")}showPlanWarning(n){return!(!this.onboardingService.subscription?.isPrivate||!n.getFeature($.W.FOLLOWER_BURST.id)&&!n.getFeature($.W.GUARANTEED_FOLLOWERS.id))}getImageSrc(n){return this.agencyService.getImg(n)}getTrialPeriodTranslation(n){return n||(n=this.selectedPlan),n.getTrialPeriod(this.translateService)}isOnboardingStep(n){return this.onboardingService.onboardingStep===n}onBack(n){this.onboardingService.onboardingStep=n}setComponent(n){this.cardComponent=n}setShowPaymentVerification(n){this.showPaymentVerification=this.paymentVerificationService.showPaymentVerification(n)}onTokenize({name:n,country:o}){if(!this.isCardLoading&&this.cardComponent){if("year"===this.selectedPlan?.periodUnit)return this.pendingTokenizeData={name:n,country:o},void(this.showConfirmYearlyPlanDialog=!0);this.performTokenization({name:n,country:o})}}performTokenization({name:n,country:o}){this.isCardLoading=!0,this.onboardingService.loadingCreatingSubscription=!0;const i={firstName:n,countryCode:o.code.toUpperCase()};this.agency.chargebee3ds?this.paymentService.getPaymentIntent("card").subscribe({next:r=>{const s=r.body?.payment_intent;this.cardComponent.authorizeWith3ds(s,i,{change:m=>{console.log("change"),console.log(m)},error:m=>{console.log("error"),console.error(m)},success:m=>{console.log("success"),console.log(m)},challenge:m=>{console.log("challenge"),console.log(m)}}).then(m=>{this.paymentService.createPaymentSourceUsingPaymentIntent(m?.id).subscribe({next:x=>{this.addPaymentMethodCallback(x),this.handleMixpanelFinish()},error:x=>{this.handleAddPaymentCardError(x)}})}).catch(m=>{console.error(m),this.handleAddPaymentCardError(m)})},error:r=>{console.error(r),this.handleMixpanelFinishError(r)}}):this.cardComponent.tokenize(i).then(r=>{this.paymentService.addPaymentMethodCard(r.token).subscribe({next:s=>{this.addPaymentMethodCallback(s),this.handleMixpanelFinish()},error:s=>{this.handleAddPaymentCardError(s),this.handleMixpanelFinishError(s)}})}).catch(r=>{this.handleMixpanelFinishError(r),this.paymentError=r,this.toastService.showToast(this.translateService.instant("errors.payment.failed-to-add-card"),u.TS.RED),this.isCardLoading=!1,this.onboardingService.loadingCreatingSubscription=!1})}handleMixpanelFinish(){this.onboardingService.mixpanelEvent("billing_finish",{pk:this.onboardingService.subscription?.pk,plan_id:this.selectedPlan?.id,payment_method_type:"new_card",billing_period:this.selectedPlan.periodUnit})}handleMixpanelFinishError(n){const o=this.userService.subscriptions.length<=1;this.onboardingService.mixpanelEvent("billing_finish_fail",{pk:this.onboardingService.subscription?.pk,plan_id:this.selectedPlan?.id,payment_method_type:"new_card",error:n,error_type:"card_tokenization_failed",error_message:n.message||"Unknown error",flow_type:o?"signup_flow":"inapp_flow",subscription_count:this.userService.subscriptions.length,subscription_status:this.onboardingService.subscription?.status,billing_period:this.selectedPlan.periodUnit})}addPaymentMethodCallback(n){const{status:o}=n;
1if(200===o||201===o){window.dataLayer.push({event:"onb_add_payment_source"});const i=O.g.parse(n.body.payment_source);this.paymentService.paymentMethods.unshift(i),this.paymentService.primaryPaymentId=i.id,this.selectedPaymentMethod=i,this.paymentMethods=this.paymentService.paymentMethods,this.onboardingService.createSubscription(this.onboardingService.subscription).add(()=>{this.isCardLoading=!1,this.onboardingService.errorCreatingSubscription&&(this.onboardingService.onboardingStep=c.E.CHOOSE_PAYMENT)})}}handleAddPaymentCardError(n){this.setSentryMessage(n),this.onboardingService.loadingCreatingSubscription=!1;const o=String(n?.error?.error?.message||n?.error?.message||n?.message||"Unknown error");this.onboardingService.mixpanelEvent("billing_finish_fail",{pk:this.onboardingService.subscription?.pk,plan_id:this.selectedPlan?.id,payment_method_type:"new_card",error:n,error_type:"payment_source_creation_failed",error_message:o,flow_type:this.userService.subscriptions.length<=1?"signup_flow":"inapp_flow",subscription_count:this.userService.subscriptions.length,subscription_status:this.onboardingService.subscription?.status,page_url:window.location.href});const i=this.translateService.instant("errors.payment.failed-to-add-card"),s=o.indexOf("Error message");if(-1!==s){const m=o.substring(s+13).replace(/^\s*:\s*/,"").trim();this.paymentError=new Error(m),this.toastService.showToast(`${i} ${m}`,u.TS.RED)}else this.paymentError=new Error(o),this.toastService.showToast(i,u.TS.RED);this.isCardLoading=!1}setSentryMessage(n){d.l7("error",n),d.l7("json",JSON.stringify(n)),d.wd("Onboarding: Failed to add card")}addNewPaymentMethod(n){this.onboardingService.onboardingStep=n}hostedPaymentRedirect(){this.paymentService.redirectToHostedPayment()}onSelectPaymentOption(n){this.onboardingService.selectedPaymentMethod=n,this.selectedPaymentMethod=n}getPrimaryPaymentMethod(){return this.paymentService.primaryPaymentMethod()}onChoosePaymentMethod(){this.getSelected()&&!this.isPaymentMethodLoading?"year"!==this.selectedPlan?.periodUnit?this.performPaymentMethodSelection():this.showConfirmYearlyPlanDialog=!0:this.toastService.showToast(this.translateService.instant("onboarding.choose-payment.error-choose-payment"),u.TS.RED)}performPaymentMethodSelection(){this.getSelected()&&!this.isPaymentMethodLoading?(this.onboardingService.mixpanelEvent("add_account",{pk:this.onboardingService.subscription?.pk,plan_id:this.selectedPlan?.id,payment_method_type:this.getSelected()?.type||"existing"}),this.isPaymentMethodLoading=!0,this.onboardingService.loadingCreatingSubscription=!0,this.paymentService.setPrimaryPaymentMethod(this.getSelected()).subscribe({next:()=>{this.onboardingService.createSubscription(this.onboardingService.subscription).add(()=>{this.isPaymentMethodLoading=!1,this.onboardingService.errorCreatingSubscription&&(this.onboardingService.onboardingStep=c.E.CHOOSE_PAYMENT)})},error:n=>{this.setPaymentMethodSentry(n),this.onboardingService.mixpanelEvent("billing_finish_fail",{pk:this.onboardingService.subscription?.pk,plan_id:this.selectedPlan?.id,payment_method_type:this.getSelected()?.type||"existing",error:n,error_type:"payment_method_set_failed",error_message:n.message||"Unknown error",flow_type:this.userService.subscriptions.length<=1?"signup_flow":"inapp_flow",subscription_count:this.userService.subscriptions.length,subscription_status:this.onboardingService.subscription?.status,page_url:window.location.href}),this.toastService.showUnexpectedToast(),this.onboardingService.loadingCreatingSubscription=!1,this.isPaymentMethodLoading=!1}})):this.toastService.showToast(this.translateService.instant("onboarding.choose-payment.error-choose-payment"),u.TS.RED)}onConfirmYearlyPlan(){this.showConfirmYearlyPlanDialog=!1,this.pendingTokenizeData?(this.performTokenization(this.pendingTokenizeData),this.pendingTokenizeData=null):this.performPaymentMethodSelection()}onCloseYearlyPlanDialog(){this.showConfirmYearlyPlanDialog=!1,this.pendingTokenizeData=null}setPaymentMethodSentry(n){this.getSelected()?d.l7("payment",this.getSelected().id):d.l7("payment","null"),d.l7("error",n),d.l7("json",JSON.stringify(n)),d.wd("Onboarding: Failed to set primary payment")}setSelectPlanSentry(n,o){d.l7("plan",JSON.stringify(o)),d.l7("error",n),d.l7("json",JSON.stringify(n)),d.wd("Onboarding: Failed to choose plan"),this.toastService.showToast(this.translateService.instant("errors.onboarding.faled-to-select-plan"),u.TS.RED)}getSelected(){return this.selectedPaymentMethod?this.selectedPaymentMethod:this.getPrimaryPaymentMethod()}onBillingAddressSubmit(n){this.onboardingService.nextStep(this.onboardingService.subscription,n)}isCurrentOnboardingStep(n){return this.onboardingService.onboardingStep===n}toggleAccountDialogVisibility(n){this.showChangeAccountPopup=n,this.mixpanelEvent("signup_account_change",{pk:this.onboardingService.subscription?.pk})}updateOnboardingStep(n){this.onboardingService.onboardingStep=n}
1getPeriodDiscount(n){return this.agency.priceDiscount[n.periodUnit]}getMonhtlyPlanPrice(n){if(!this.onboardingService.planGroups||"month"===n.periodUnit&&1===n.period)return null;for(const o of this.onboardingService.planGroups)if("month"===o.periodUnit&&1===o.period)for(const i of o.plans)if(i.planGroupId===n.planGroupId)return i.getPrice();return null}mixpanelEvent(n,o){w.A.__loaded&&w.A.track(n,o)}static{this.\u0275fac=function(o){return new(o||t)(e.rXU(S.z),e.rXU(c.x$),e.rXU(_.c$),e.rXU(F.D),e.rXU(u.fw),e.rXU(R.Ix),e.rXU(R.nX),e.rXU(oe.Vw),e.rXU(ie.O1),e.rXU(Y.h),e.rXU(ae.t),e.rXU(re.O),e.rXU(e.sFG),e.rXU(se.t),e.rXU(le.m))}}static{this.\u0275cmp=e.VBU({type:t,selectors:[["app-plan-and-billing"]],standalone:!1,decls:7,vars:6,consts:[["planwarning",""],["class","outer onboarding-outer",4,"ngIf"],["class","overlay show-overlay",3,"click",4,"ngIf"],["class","mobile",4,"ngIf"],[4,"ngIf"],[3,"errorMessage","closed",4,"ngIf"],[3,"onCloseDialogEvent","onConfirmEvent",4,"ngIf"],[1,"outer","onboarding-outer"],["class","logo",3,"src",4,"ngIf"],[1,"container"],["class","label f-size-16 f-medium",4,"ngIf"],[1,"left"],["class","top container-onboarding",4,"ngIf"],[1,"bottom","container-onboarding"],["class","plan-chooser",4,"ngIf"],["class","proceed__button bkg-2",4,"ngIf"],["class","paymentMethod",3,"agency","selectedPlan","isPaymentMethodLoading","selectedPaymentMethod","primaryPaymentMethod","paymentMethods","showPaymentVerification","onAddNewPaymentMethodEvent","onSelectPaymentOptionEvent","onHostedPaymentRedirectEvent","onChoosePaymentMethodEvent",4,"ngIf"],["class","paymentMethod",3,"agency","paymentMethods","showPaymentVerification","paypalBtnIcon","cardIcon","backIcon","updateOnboardingStepEvent",4,"ngIf"],["class","paymentMethod",3,"isDarkModeEnabled","currency","selectedPlan","isCardLoading","showPaymentVerification","cardComponent","error","name","agencyBackIcon","onTokenizeEvent","onSetComponentEvent","onBackEvent",4,"ngIf"],["class","paymentMethod",3,"onboardingBackIcon","subscription","onSubmitDoneEvent",4,"ngIf"],[1,"right","container-onboarding","relative"],["class","selected-plan",4,"ngIf"],["class","coupon-box",4,"ngIf"],[1,"logo",3,"src"],[1,"label","f-size-16","f-medium"],[1,"color-text-3"],[1,"arrow","color-text-3"],[1,"color-text-link"],[1,"top","container-onboarding"],["class","h-box selected-account",4,"ngIf"],["class","choosen-plan",4,"ngIf"],[1,"h-box","selected-account"],[3,"subscription","socialLogo"],[1,"change-account","bkg-3",3,"click"],[1,"ic-change-account",3,"src"],[1,"choosen-plan"],[1,"h-box","wrapper-choosen-plan","border-bkg-3"],["class","v-box",4,"ngIf"],["class","change-plan f-size-14 f-medium color-text-link",3,"click",4,"ngIf"],[1,"v-box"],[1,"f-size-12","f-regular","color-text-3","onboarding-selected-plan-label"],["class","f-size-16 f-semi-bold color-text-2 onboarding-selected-plan-name",4,"ngIf"],[1,"f-size-16","f-semi-bold","color-text-2","onboarding-selected-plan-name"],[1,"change-plan","f-size-14","f-medium","color-text-link",3,"click"],[1,"plan-chooser"],[1,"plan-chooser__wrapper"],[1,"f-size-26","f-bold","color-text-1"],[1,"f-size-14","f-regular","color-text-3"],[3,"planGroups","selectedPlanGroup","selectedPlanGroupChange",4,"ngIf"],[1,"plan-warning",3,"tranlaste"],["class","plans",3,"single-plan-group",4,"ngIf"],[3,"selectedPlanGroupChange","planGroups","selectedPlanGroup"],[1,"plans"],["class","plan",3,"plan-selected","border-selection","click",4,"ngFor","ngForOf"],[1,"plan",3,"click"],[1,"f-semi-bold","f-size-16","color-text-2","plan-name"],[3,"color-bkg-4","color-text-link","icon","mouseenter","mouseleave",4,"ngIf"],["class","color-text-3 f-size-14 f-regular",4,"ngIf"],["class","color-text-3 f-size-14 f-regular lower-case",4,"ngIf"],["class","checkbox stroke-icon-selection fill-icon-selection",3,"src",4,"ngIf"],[3,"mouseenter","mouseleave","icon"],[1,"color-text-3","f-size-14","f-regular"],[1,"color-text-3","f-size-14","f-regular","lower-case"],["class","monthly-plan-price",4,"ngIf"],[1,"plan-price-text","f-semi-bold"],[1,"monthly-plan-price"],[1,"checkbox","stroke-icon-selection","fill-icon-selection",3,"src"],[1,"proceed__button","bkg-2"],[1,"btn-primary","f-size-16","f-medium",3,"click"],[1,"paymentMethod",3,"onAddNewPaymentMethodEvent","onSelectPaymentOptionEvent","onHostedPaymentRedirectEvent","onChoosePaymentMethodEvent","agency","selectedPlan","isPaymentMethodLoading","selectedPaymentMethod","primaryPaymentMethod","paymentMethods","showPaymentVerification"],[1,"paymentMethod",3,"updateOnboardingStepEvent","agency","paymentMethods","showPaymentVerification","paypalBtnIcon","cardIcon","backIcon"],[1,"paymentMethod",3,"onTokenizeEvent","onSetComponentEvent","onBackEvent","isDarkModeEnabled","currency","selectedPlan","isCardLoading","showPaymentVerification","cardComponent","error","name","agencyBackIcon"],[1,"paymentMethod",3,"onSubmitDoneEvent","onboardingBackIcon","subscription"],[1,"selected-plan"],["class","badge-free-trial f-size-14 f-semi-bold",4,"ngIf"],["class","f-size-26 f-bold color-text-1",4,"ngIf"],["class","f-size-14 f-regular color-text-3 plan-desc plan-desc-desktop",4,"ngIf"],[1,"h-box","price-box"],["class","f-size-52 f-bold color-text-1 onboarding-desktop-price",4,"ngIf"],["class","f-bold onboarding-desktop-price",4,"ngIf"],["class","f-size-16 f-regular color-text-3 period",4,"ngIf"],[1,"h-box","cancel-anytime-box"],["class","cancel-anytime f-size-14 f-regular color-text-3",4,"ngIf"],["class","feature f-size-16 f-regular h-box color-text-2",4,"ngFor","ngForOf"],[1,"badge-free-trial","f-size-14","f-semi-bold"],[1,"f-size-14","f-regular","color-text-3","plan-desc","plan-desc-desktop"],[1,"f-size-52","f-bold","color-text-1","onboarding-desktop-price"],[1,"f-bold","onboarding-desktop-price"],[1,"old-price","f-size-24","color-text-3"],[1,"f-size-52","color-green"],[1,"f-size-16","f-regular","color-text-3","period"],[1,"cancel-anytime","f-size-14","f-regular","color-text-3"],[1,"feature","f-size-16","f-regular","h-box","color-text-2"],[1,"green-checkbox","fill-green","sroke-green",3,"src"],[1,"coupon-box"],["class","f-size-16 f-semi-bold color-text-link 
1i-have-coupon",3,"click",4,"ngIf"],["class","coupon-input",4,"ngIf"],["class","h-box",4,"ngIf"],[1,"coupon-note-box"],["class","color-text-3 f-size-12 f-regular coupon-note",3,"innerHTML",4,"ngIf"],["class","color-text-error error-note f-size-12 f-regular",3,"innerHTML",4,"ngIf"],[1,"f-size-16","f-semi-bold","color-text-link","i-have-coupon",3,"click"],[1,"coupon-input"],[1,"h-box"],["autofocus","",1,"f-size-16","f-medium","border-bkg-4",3,"ngModelChange","keyup.enter","ngModel","placeholder"],[1,"f-size-20","icon-remove","color-text-3",3,"click","icon"],[1,"btn-primary","f-size-14","f-medium",3,"click"],[3,"color","scale",4,"ngIf"],[3,"color","scale"],[1,"selected-coupon","border-green","f-size-16","f-semi-bold"],[1,"f-size-20","icon-edit","color-text-3",3,"click","icon"],[1,"color-text-3","f-size-12","f-regular","coupon-note",3,"innerHTML"],[1,"color-text-error","error-note","f-size-12","f-regular",3,"innerHTML"],[1,"overlay","show-overlay",3,"click"],[1,"change-accunt-popup","container-popup",3,"click"],[1,"ic-close","fill-bkg-4",3,"click","src"],[1,"f-size-22","f-bold","color-text-1"],[1,"f-size-12","f-regular","color-text-2"],[1,"btn-primary","f-medium","f-size-14",3,"click"],[1,"btn-disabled","f-medium","f-size-14",3,"click"],[1,"mobile"],[1,"header"],[1,"selected-account-mobile","bkg-3","border-green"],[1,"img-box"],[1,"img-selected",3,"src"],["class","ic-platform-mobile bkg-3 border-bkg-3",3,"src",4,"ngIf"],[1,"f-size-12","f-regular","color-text-3"],[1,"f-size-14","f-semi-bold","color-text-2"],[1,"ic-change-account-mobile",3,"click","src"],["class","line bkg-4",4,"ngIf"],["class","selected-plan-mobile bkg-3 border-green",4,"ngIf"],["class","current v-box bkg-blue color-white",4,"ngIf"],[3,"parent",4,"ngIf"],[3,"agency","selectedPlan","selectedPaymentMethod","primaryPaymentMethod","paymentMethods","isPaymentMethodLoading","showPaymentVerification","onAddNewPaymentMethodEvent","onSelectPaymentOptionEvent","onHostedPaymentRedirectEvent","onChoosePaymentMethodEvent",4,"ngIf"],[3,"currency","selectedPlan","cardComponent","isCardLoading","isDarkMode","name","showPaymentVerification","paypalBtnIcon","cardIcon","paypalIcon","applePayIcon","onSetComponentEvent","onTokenizeEvent",4,"ngIf"],[3,"onSubmitDoneEvent",4,"ngIf"],[1,"ic-platform-mobile","bkg-3","border-bkg-3",3,"src"],[1,"line","bkg-4"],[1,"selected-plan-mobile","bkg-3","border-green"],["class","color-text-link",4,"ngIf"],["class","ic-change-plan-mobile",3,"src","click",4,"ngIf"],[1,"ic-change-plan-mobile",3,"click","src"],[1,"current","v-box","bkg-blue","color-white"],[1,"f-size-12","f-regular"],[1,"f-size-14","f-semi-bold"],[3,"parent"],[3,"onAddNewPaymentMethodEvent","onSelectPaymentOptionEvent","onHostedPaymentRedirectEvent","onChoosePaymentMethodEvent","agency","selectedPlan","selectedPaymentMethod","primaryPaymentMethod","paymentMethods","isPaymentMethodLoading","showPaymentVerification"],[3,"onSetComponentEvent","onTokenizeEvent","currency","selectedPlan","cardComponent","isCardLoading","isDarkMode","name","showPaymentVerification","paypalBtnIcon","cardIcon","paypalIcon","applePayIcon"],[3,"onSubmitDoneEvent"],[3,"closed","errorMessage"],[3,"onCloseDialogEvent","onConfirmEvent"]],template:function(o,i){1&o&&(e.nrm(0,"app-floating-user"),e.DNE(1,nn,17,12,"div",1)(2,tn,16,22,"div",2)(3,bn,22,16,"div",3)(4,yn,1,0,"app-subscription-loader",4)(5,Pn,1,1,"app-subscription-error",5)(6,vn,1,0,"app-confirm-yearly-plan-dialog",6)),2&o&&(e.R7$(),e.Y8G("ngIf",!i.isMobile()),e.R7$(),e.Y8G("ngIf",i.showChangeAccountPopup),e.R7$(),e.Y8G("ngIf",i.isMobile()),e.R7$(),e.Y8G("ngIf",i.onboardingService.loadingCreatingSubscription),e.R7$(),e.Y8G("ngIf",i.onboardingService.errorCreatingSubscription),e.R7$(),e.Y8G("ngIf","year"===(null==i.selectedPlan?null:i.selectedPlan.periodUnit)&&i.showConfirmYearlyPlanDialog))},styles:[".outer[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;min-height:100vh;height:100vh;padding:6.25rem}.arrow[_ngcontent-%COMP%]{margin:0 .5rem}.label[_ngcontent-%COMP%]{position:absolute;top:-1.25rem;left:0;transform:translateY(-100%);display:flex;align-items:center}.logo[_ngcontent-%COMP%]{position:absolute;top:2.5rem;left:2.5rem;display:flex;align-items:center;z-index:1}@media only screen and (max-height: 1000px){.outer[_ngcontent-%COMP%]{padding:3.75rem 6.25rem}.logo[_ngcontent-%COMP%]{top:.625rem;left:.9375rem}}.container[_ngcontent-%COMP%]{left:0;display:flex;gap:1.25rem;position:relative;width:66.875rem;max-width:100%;height:49.3125rem;max-height:100%}.left[_ngcontent-%COMP%]{flex-basis:45%;flex-grow:3;border-radius:1.25rem;display:flex;flex-flow:column}
1.left[_ngcontent-%COMP%]   .top[_ngcontent-%COMP%]{border-radius:1.25rem;margin-bottom:1.25rem}.left[_ngcontent-%COMP%]   .bottom[_ngcontent-%COMP%]{overflow:auto;flex-basis:100%;border-radius:1.25rem;box-shadow:0 .3125rem .625rem #0a17530d;display:flex;flex-direction:column;justify-content:space-between}.right[_ngcontent-%COMP%]{flex-basis:60%;flex-grow:4;border-radius:1.25rem;padding:1.25rem 1.25rem 6rem;box-shadow:0 .3125rem .625rem #0a17530d}.search-item-img[_ngcontent-%COMP%]{height:3.75rem;width:3.75rem}.container-onboarding.top[_ngcontent-%COMP%]{box-shadow:0 3px .5rem #0000001a}.selected-account[_ngcontent-%COMP%]{text-align:start;width:100%;height:6.875rem;border-radius:1.25rem;padding:1.5625rem 1.875rem;padding-left:0;position:relative;justify-content:space-between}.ic-arrow[_ngcontent-%COMP%]{width:.75rem}.change-account[_ngcontent-%COMP%]{width:38px;height:38px;border-radius:.625rem;box-shadow:0 .3125rem .625rem #0a17530d;cursor:pointer}.change-account[_ngcontent-%COMP%]   .ic-change-account[_ngcontent-%COMP%]{margin:10px;width:18px;height:18px}.choosen-plan[_ngcontent-%COMP%]{overflow:hidden;position:relative;border-bottom-left-radius:1.25rem;border-bottom-right-radius:1.25rem}.choosen-plan[_ngcontent-%COMP%] > .h-box[_ngcontent-%COMP%]{border-top-width:1px;border-top-style:solid;padding:8px 30px 12px;justify-content:space-between}.plan-chooser[_ngcontent-%COMP%]{position:relative}.plan-chooser__wrapper[_ngcontent-%COMP%]{padding:1.25rem}.discount[_ngcontent-%COMP%]{padding:3px 6px;border-radius:.3125rem;margin-left:.5rem}.plans[_ngcontent-%COMP%]{overflow:auto;padding:0 1.25rem}.single-plan-group[_ngcontent-%COMP%]{top:6.4375rem}.plan[_ngcontent-%COMP%]{position:relative;box-shadow:0 3px .5rem #0000001a;border-radius:.9375rem;display:flex;flex-flow:column;padding:1rem 1.25rem;justify-content:center;margin-bottom:1rem;transition:all .15s ease-in;border-width:2px;border-style:solid;cursor:pointer}.plan[_ngcontent-%COMP%]   .checkbox[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem;position:absolute;right:1.875rem;top:50%;transform:translateY(-50%)}.plan-name[_ngcontent-%COMP%]{display:flex;column-gap:.75rem}.plan-name[_ngcontent-%COMP%]   .discount[_ngcontent-%COMP%]{margin-left:0}.plan[_ngcontent-%COMP%]:not(.plan-selected){border-color:transparent}.selected-plan[_ngcontent-%COMP%]{overflow-y:auto;height:100%;width:100%}.plan-desc[_ngcontent-%COMP%]{margin-top:.5rem;margin-bottom:.5rem}.price-box[_ngcontent-%COMP%] > .period[_ngcontent-%COMP%]{margin-top:1.875rem}.bold-desc[_ngcontent-%COMP%]{margin-top:2.5rem;margin-bottom:1.25rem}.feature[_ngcontent-%COMP%]{margin-bottom:1rem}.feature[_ngcontent-%COMP%]   .green-checkbox[_ngcontent-%COMP%]{width:1.25rem;min-width:1.25rem;height:1.25rem;margin-right:.5rem}.change-plan[_ngcontent-%COMP%]{cursor:pointer;padding:3px}.overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;height:100vh;width:100vw;display:flex;justify-content:center;align-items:center;z-index:100}.change-accunt-popup[_ngcontent-%COMP%]{position:relative;text-align:center;border-radius:.625rem;padding:3.125rem;max-width:35.5rem}.change-accunt-popup[_ngcontent-%COMP%]   .h-box[_ngcontent-%COMP%]{margin-top:1.25rem}.change-accunt-popup[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:first-of-type{margin-right:.625rem}.change-accunt-popup[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:last-of-type{margin-left:.625rem}.change-accunt-popup[_ngcontent-%COMP%]   .ic-close[_ngcontent-%COMP%]{position:absolute;right:1.25rem;top:1.25rem;width:2rem;height:2rem;cursor:pointer}.header[_ngcontent-%COMP%]{margin:0 -1.25rem}.selected-account-mobile[_ngcontent-%COMP%]{display:flex;align-items:center;border-left-width:.5rem;border-left-style:solid;height:3.375rem;padding-right:3.125rem}.img-box[_ngcontent-%COMP%]{position:relative;margin-left:.75rem;height:2.375rem;margin-right:.625rem}.img-selected[_ngcontent-%COMP%]{width:2.375rem;height:2.375rem;border-radius:50%}.ic-platform-mobile[_ngcontent-%COMP%]{position:absolute;border-radius:50%;border-width:2px;border-style:solid;right:-1px;bottom:-4px;height:.75rem;width:.75rem}.ic-change-account-mobile[_ngcontent-%COMP%]{padding:.3125rem;cursor:pointer;position:absolute;right:.9375rem}.current[_ngcontent-%COMP%]{height:3.375rem;padding:0 1.25rem;justify-content:center}.ic-change-plan-mobile[_ngcontent-%COMP%]{cursor:pointer;position:absolute;right:1.25rem}.selected-plan-mobile[_ngcontent-%COMP%]{display:flex;align-items:center;padding-left:1.25rem;height:3.375rem;border-left-width:.5rem;border-left-style:solid;padding-right:3.125rem}.line[_ngcontent-%COMP%]{height:1px;width:100%}.plans-btn[_ngcontent-%COMP%]{height:3.25rem;margin:1.25rem;margin-top:0;border-radius:.625rem;display:flex;align-items:center;padding-left:1.25rem}.btn-proceed[_ngcontent-%COMP%]{position:sticky;left:0;bottom:0}.cancel-anytime-box[_ngcontent-%COMP%]{margin-bottom:1.25rem}.coupon-box[_ngcontent-%COMP%]{position:absolute;bottom:1.5rem;right:1.5rem;left:1.5rem}.coupon-box[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{width:100%;height:3.75rem;transition:all .3s ease-in}.coupon-box[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{min-width:5.125rem;height:2.5rem;min-height:2.5rem;position:absolute;right:42px;top:.625rem;width:initial;padding:0 1.25rem}.coupon-box[_ngcontent-%COMP%]   .error-note[_ngcontent-%COMP%]{position:absolute;top:100%;transform:translate(1.25rem,4px)}.i-have-coupon[_ngcontent-%COMP%], .coupon-input[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;right:0}.selected-coupon[_ngcontent-%COMP%]{width:100%;height:3.75rem;border-radius:.625rem;border-width:1.5px;border-style:solid;
1display:flex;align-items:center;padding-left:1.25rem}.coupon-note[_ngcontent-%COMP%]{position:absolute;top:100%;transform:translate(1.25rem,4px)}.old-price[_ngcontent-%COMP%]{text-decoration:line-through;text-decoration-thickness:1.5px;margin-right:6px}.badge-free-trial[_ngcontent-%COMP%]{padding:.3125rem .75rem;border-radius:.3125rem;display:inline-block;margin-bottom:.75rem}.plan-warning[_ngcontent-%COMP%]{position:fixed;top:0;left:0;z-index:1}.lower-case[_ngcontent-%COMP%]{text-transform:lowercase}.choosen-plan[_ngcontent-%COMP%]   .line[_ngcontent-%COMP%]{position:absolute;left:0;top:30px}.monthly-plan-price[_ngcontent-%COMP%]{text-decoration:line-through}.icon-remove[_ngcontent-%COMP%]{margin-left:16px;cursor:pointer}.icon-edit[_ngcontent-%COMP%]{cursor:pointer;margin-left:16px}@media only screen and (max-width: 899px){.change-accunt-popup[_ngcontent-%COMP%]{padding:1.25rem;margin:1.25rem}.change-accunt-popup[_ngcontent-%COMP%]   .h-box[_ngcontent-%COMP%]{margin-top:.75rem}.change-accunt-popup[_ngcontent-%COMP%]   .f-size-12[_ngcontent-%COMP%]{margin-top:4px}.change-accunt-popup[_ngcontent-%COMP%]   .ic-close[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;right:.625rem;top:.625rem}}.proceed__button[_ngcontent-%COMP%]{padding:.5rem 1.25rem 1.25rem;position:sticky;left:0;bottom:0}.paymentMethod[_ngcontent-%COMP%]{padding:1.5rem;height:100%}"],data:{animation:[k.Ws,ee,ne]}})}}return t})();var G=l(3313);function Cn(t,a){if(1&t&&(e.j41(0,"div",10),e.EFF(1),e.k0s()),2&t){const n=e.XpG().$implicit,o=e.XpG(2);e.R7$(),e.SpI(" ",o.getPeriodDiscount(n)," ")}}function Sn(t,a){if(1&t){const n=e.RV6();e.j41(0,"div",8),e.bIt("click",function(){const i=e.eBV(n).$implicit,r=e.XpG(2);return e.Njj(r.onSlider(i))}),e.EFF(1),e.DNE(2,Cn,2,1,"div",9),e.k0s()}if(2&t){const n=a.$implicit,o=e.XpG(2);e.xc7("width",o.getPlanGroupWidth()+"%")("left",o.getPlanGroupLeft(n)+"%"),e.AVh("selected",n===o.selectedPlanGroup),e.R7$(),e.SpI(" ",o.getPlanGroupName(n)," "),e.R7$(),e.Y8G("ngIf",o.getPeriodDiscount(n))}}function Mn(t,a){if(1&t&&(e.j41(0,"div",4)(1,"div",5),e.nrm(2,"div",6),e.DNE(3,Sn,3,8,"div",7),e.k0s()()),2&t){const n=e.XpG();e.R7$(2),e.xc7("left",n.getSliderLeft()+"%")("width",n.getPlanGroupWidth()+"%"),e.R7$(),e.Y8G("ngForOf",n.planGroups)}}function xn(t,a){if(1&t&&(e.j41(0,"div",17),e.EFF(1),e.k0s()),2&t){const n=e.XpG(2);e.R7$(),e.SpI(" ",n.getPeriodDiscount(n.selectedPlanGroup)," ")}}function kn(t,a){if(1&t&&(e.j41(0,"div",17),e.EFF(1),e.k0s()),2&t){const n=e.XpG().$implicit,o=e.XpG(2);e.R7$(),e.SpI(" ",o.getPeriodDiscount(n)," ")}}function In(t,a){if(1&t){const n=e.RV6();e.j41(0,"div",18),e.bIt("click",function(){const i=e.eBV(n).$implicit,r=e.XpG(2);return e.Njj(r.onSlider(i))}),e.EFF(1),e.DNE(2,kn,2,1,"div",13),e.k0s()}if(2&t){const n=a.$implicit,o=e.XpG(2);e.R7$(),e.SpI(" ",o.getPlanGroupName(n)," "),e.R7$(),e.Y8G("ngIf",o.getPeriodDiscount(n))}}function wn(t,a){if(1&t){const n=e.RV6();e.j41(0,"div",11),e.bIt("click",function(){e.eBV(n);const i=e.sdS(7);return e.Njj(i.classList.toggle("show"))}),e.j41(1,"span",12),e.EFF(2),e.DNE(3,xn,2,1,"div",13),e.k0s(),e.nrm(4,"svg-icon",14,0),e.j41(6,"div",15,1),e.DNE(8,In,3,2,"div",16),e.k0s()()}if(2&t){const n=e.XpG();e.AVh("f-size-16",!n.isMobile()),e.R7$(2),e.SpI(" ",n.getPlanGroupName(n.selectedPlanGroup)," "),e.R7$(),e.Y8G("ngIf",n.getPeriodDiscount(n.selectedPlanGroup)),e.R7$(),e.Y8G("src",n.getImageSrc("arrow_down_v1.svg")),e.R7$(4),e.Y8G("ngForOf",n.planGroups)}}let N=(()=>{class t{constructor(n,o){this.translateService=n,this.agency=o,this.planGroups=[],this.selectedPlanGroupChange=new e.bkB}isSliderRight(){return!1}onSlider(n){this.selectedPlanGroupChange.emit(n)}getPlanGroupName(n){return n?this.agency.agency.peridSelectorYmode?C.I.getGroupPeriodY(n,this.translateService):C.I.getGroupPeriod(n,this.translateService):""}getPeriodDiscount(n){return this.agency.agency.priceDiscount[n.periodUnit]}getPlanGroupWidth(){return 100/this.planGroups.length}getSliderLeft(){const n=this.planGroups.findIndex(o=>o===this.selectedPlanGroup);return n>0?n*this.getPlanGroupWidth():0}getPlanGroupLeft(n){return this.planGroups.indexOf(n)*this.getPlanGroupWidth()}getImageSrc(n){return this.agency.getImg(n)}isMobile(){return window.innerWidth<I.s}static{this.\u0275fac=function(o){return new(o||t)(e.rXU(_.c$),e.rXU(S.z))}}static{this.\u0275cmp=e.VBU({type:t,selectors:[["app-plan-group-chooser"]],inputs:{planGroups:"planGroups",selectedPlanGroup:"selectedPlanGroup"},outputs:{selectedPlanGroupChange:"selectedPlanGroupChange"},standalone:!1,decls:2,vars:2,consts:[["arrow",""],["dropdown_plans",""],["class","plan-slider selection-sli
1der f-size-16 f-medium",4,"ngIf"],["class","plans-btn dropdown-btn dropdown-selector-white f-bold f-size-14 box-shadow",3,"f-size-16","click",4,"ngIf"],[1,"plan-slider","selection-slider","f-size-16","f-medium"],[1,"slider-wrapper"],[1,"slider"],["class","plan-group color-text-2",3,"selected","width","left","click",4,"ngFor","ngForOf"],[1,"plan-group","color-text-2",3,"click"],["class","discount bkg-red color-white f-size-12 f-bold single-line-text",4,"ngIf"],[1,"discount","bkg-red","color-white","f-size-12","f-bold","single-line-text"],[1,"plans-btn","dropdown-btn","dropdown-selector-white","f-bold","f-size-14","box-shadow",3,"click"],[1,"plan-name","color-text-2"],["class","discount bkg-red color-white f-size-12 f-bold",4,"ngIf"],[1,"ic-arrow","fill-icon",3,"src"],[1,"dropdown"],["class","dropdown-item period-item color-text-2",3,"click",4,"ngFor","ngForOf"],[1,"discount","bkg-red","color-white","f-size-12","f-bold"],[1,"dropdown-item","period-item","color-text-2",3,"click"]],template:function(o,i){1&o&&e.DNE(0,Mn,4,5,"div",2)(1,wn,9,6,"div",3),2&o&&(e.Y8G("ngIf",2===i.planGroups.length||3===i.planGroups.length),e.R7$(),e.Y8G("ngIf",i.planGroups.length>3))},dependencies:[g.Sq,g.bT,G.DM],styles:[".plan-slider[_ngcontent-%COMP%]{height:56px;width:100%;border-radius:.625rem;position:relative;cursor:pointer;margin-top:.5rem;box-shadow:1px 1px 3px #0000001a;padding:4px}.slider-wrapper[_ngcontent-%COMP%]{position:relative;height:100%}.slider[_ngcontent-%COMP%]{position:absolute;height:48px;border-radius:8px;transition:all .3s ease-in}.plan-group[_ngcontent-%COMP%]{position:absolute;height:100%;display:flex;justify-content:center;align-items:center;transition:all .3s ease-in;text-align:center}.plan-name[_ngcontent-%COMP%]{display:flex;column-gap:.75rem}.plan-name[_ngcontent-%COMP%]   .discount[_ngcontent-%COMP%]{margin-left:0}.discount[_ngcontent-%COMP%]{padding:3px 6px;border-radius:.3125rem;position:absolute;bottom:0;left:50%;transform:translate(-50%,50%) translateY(4px)}.ic-arrow[_ngcontent-%COMP%]{width:.75rem}.plans-btn.dropdown-btn[_ngcontent-%COMP%]{height:3.25rem;border-radius:.625rem;display:flex;align-items:center;padding-left:1.25rem;margin-top:10px}.plans-btn.dropdown-btn[_ngcontent-%COMP%]   .discount[_ngcontent-%COMP%]{position:relative;margin-left:8px;transform:none;left:initial}@media only screen and (max-width: 899px){.plan-slider[_ngcontent-%COMP%]{height:49px}.slider[_ngcontent-%COMP%]{height:41px}.plans-btn.dropdown-btn[_ngcontent-%COMP%]{border-radius:6px}}"]})}}return t})();var T=l(8836);let D=(()=>{class t{constructor(){this.faLock=B.LgV}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=e.VBU({type:t,selectors:[["app-secure-payment"]],standalone:!1,decls:4,vars:4,consts:[[1,"f-size-14","f-medium","color-green","secure-payment"],[1,"icon-lock",3,"icon"]],template:function(o,i){1&o&&(e.j41(0,"div",0),e.nrm(1,"fa-icon",1),e.EFF(2),e.nI1(3,"translate"),e.k0s()),2&o&&(e.R7$(),e.Y8G("icon",i.faLock),e.R7$(),e.SpI(" ",e.bMT(3,2,"onboarding.secure-payment"),"\n"))},dependencies:[T.aY,_.D9],styles:[".secure-payment[_ngcontent-%COMP%]{margin-top:12px;display:flex;align-items:center;justify-content:center}.icon-lock[_ngcontent-%COMP%]{margin-right:10px}"]})}}return t})();var E=l(5305),h=l(4388);function Gn(t,a){1&t&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"onboarding.billing-address.button")," "))}function Tn(t,a){1&t&&e.nrm(0,"app-small-loader",10),2&t&&e.Y8G("color","white")("opacity",.6)}let En=(()=>{class t{constructor(n){this.router=n,this.onSubmitDoneEvent=new e.bkB}onBack(n){this.router.navigateByUrl(`onboarding/subscriptions/${n}/plan`)}onSubmitDone(n){this.isFormLoading=!1,n&&this.onSubmitDoneEvent.emit(c.E.BILLING_ADDRESS)}onContinue(){this.billingForm.onSubmitHandler()}static{this.\u0275fac=function(o){return new(o||t)(e.rXU(R.Ix))}}static{this.\u0275cmp=e.VBU({type:t,selectors:[["app-billing-address"]],viewQuery:function(o,i){if(1&o&&e.GBs(E.Z,5),2&o){let r;e.mGM(r=e.lsd())&&(i.billingForm=r.first)}},inputs:{onboardingBackIcon:"onboardingBackIcon",subscription:"subscription"},outputs:{onSubmitDoneEvent:"onSubmitDoneEvent"},standalone:!1,decls:14,vars:10,consts:[[1,"container"],[1,"h-box"],[1,"btn-onboarding-back","bkg-3",3,"click"],[1,"ic-back",3,"src"],[1,"f-size-26","f-bold","color-text-1"],[1,"f-regular","f-size-14","color-text-3","subtitle","oboarding-payment-subtitle"],[3,"onSubmitDone","onSubmit"],[1,"subscribe","btn-primary","btn-flex","f-size-16","f-medium",3,"click","disabled"],[4,"ngIf"],[3,"color","opacity",4,"ngIf"],[3,"color","opacity"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2),e.bIt("click",function(){return i.onBack(i.subscription.uuid)}),e.nrm(3,"img",3),e.k0s(),e.j41(4,"div",4),e.EFF(5),e.nI1(6,"translate"),e.k0s()(),e.j41(7,"div",5),e.EFF(8),e.nI1(9,"translate"),e.k0s(),e.j41(10,"app-billing-address-form",6),e.bIt("onSubmitDone",function(s){return i.onSubmitDone(s)})("onSubmit",function(){return i.isFormLoading=!0}),e.k0s(),e.j41(11,"button",7),e.bIt("click",function(){return i.onContinue()}),e.DNE(12,Gn,3,3,"span",8)(13,Tn,1,2,"app-small-loader",9),e.k0s()()),2&o&&(e.R7$(3),e.Y8G("src",i.onboardingBackIcon,e.B4B),e.R7$(2),e.SpI(" ",e.bMT(6,6,"onboarding.billing-address.title")," "),e.R7$(3),e.SpI(" ",e.bMT(9,8,"onboarding.billing-address.subtitle")," "),e.R7$(3),e.Y8G("disabled",i.isFormLoading),e.R7$(),e.Y8G("ngIf",!i.isFormLoading),e.R7$(),e.Y8G("ngIf",i.isFormLoading))},dependencies:[g.bT,h.M,E.Z,_.D9],styles:[".container[_ngcontent-%COMP%]{height:100%;display:flex;flex-flow:column}.subtitle[_ngcontent-%COMP%]{margin-top:.5rem;margin-bottom:1rem}.subscribe[_ngcontent-%COMP%]{margin-top:auto}"]})}}return t})();function On(t,a){1&t&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"onboarding.billing-address.button")," "))}function Rn(t,a){1&t&&e.nrm(0,"app-small-loader",7),2&t&&e.Y8G("color","white")("opacity",.6)}let jn=(()=>
1{class t{constructor(){this.onSubmitDoneEvent=new e.bkB}onContinue(){this.billingForm.onSubmitHandler()}onSubmitDone(n){this.isFormLoading=!1,n&&this.onSubmitDoneEvent.emit(c.E.BILLING_ADDRESS)}setFormLoading(n){this.isFormLoading=n}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=e.VBU({type:t,selectors:[["app-billing-address-mobile"]],viewQuery:function(o,i){if(1&o&&e.GBs(E.Z,5),2&o){let r;e.mGM(r=e.lsd())&&(i.billingForm=r.first)}},outputs:{onSubmitDoneEvent:"onSubmitDoneEvent"},standalone:!1,decls:11,vars:9,consts:[[1,"title","f-size-26","f-bold","color-text-1"],[1,"f-regular","f-size-14","color-text-3","subtitle","oboarding-payment-subtitle"],[3,"onSubmitDone","onSubmit"],[1,"btn-box","bkg-1"],[1,"subscribe","btn-primary","btn-flex","f-size-16","f-medium",3,"click","disabled"],[4,"ngIf"],[3,"color","opacity",4,"ngIf"],[3,"color","opacity"]],template:function(o,i){1&o&&(e.j41(0,"div",0),e.EFF(1),e.nI1(2,"translate"),e.k0s(),e.j41(3,"div",1),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"app-billing-address-form",2),e.bIt("onSubmitDone",function(s){return i.onSubmitDone(s)})("onSubmit",function(){return i.setFormLoading(!0)}),e.k0s(),e.j41(7,"div",3)(8,"button",4),e.bIt("click",function(){return i.onContinue()}),e.DNE(9,On,3,3,"span",5)(10,Rn,1,2,"app-small-loader",6),e.k0s()()),2&o&&(e.R7$(),e.SpI(" ",e.bMT(2,5,"onboarding.billing-address.title"),"\n"),e.R7$(3),e.SpI(" ",e.bMT(5,7,"onboarding.billing-address.subtitle"),"\n"),e.R7$(4),e.Y8G("disabled",i.isFormLoading),e.R7$(),e.Y8G("ngIf",!i.isFormLoading),e.R7$(),e.Y8G("ngIf",i.isFormLoading))},dependencies:[g.bT,h.M,E.Z,_.D9],styles:[".title[_ngcontent-%COMP%]{margin-top:1rem;margin-bottom:4px}.btn-box[_ngcontent-%COMP%]{position:fixed;bottom:0;left:0;right:0;padding:1.25rem}"]})}}return t})();const An=t=>({trial_period:t});function $n(t,a){if(1&t){const n=e.RV6();e.j41(0,"div",15),e.bIt("click",function(){const i=e.eBV(n).$implicit,r=e.XpG(2);return e.Njj(r.onSelectPaymentOption(i))}),e.nrm(1,"app-payment-option",16),e.k0s()}if(2&t){let n,o;const i=a.$implicit,r=e.XpG(2);e.AVh("selected",i.id===(null==(n=r.getSelected())?null:n.id))("border-selection",i.id===(null==(o=r.getSelected())?null:o.id)),e.R7$(),e.Y8G("payment",i)}}function Bn(t,a){1&t&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"onboarding.new-card.pay-and-subscribe")," "))}function Fn(t,a){if(1&t&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t){const n=e.XpG(2);e.R7$(),e.SpI(" ",e.i5U(2,1,"onboarding.new-card.start-free-trial",e.eq3(4,An,n.getTrialPeriod(n.selectedPlan)))," ")}}function Yn(t,a){1&t&&e.nrm(0,"app-small-loader",17),2&t&&e.Y8G("color","white")("opacity",.6)}function Nn(t,a){1&t&&(e.j41(0,"span",18),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"onboarding.payment-authorization-info")," "))}function Dn(t,a){1&t&&e.nrm(0,"app-secure-payment")}function Vn(t,a){if(1&t){const n=e.RV6();e.j41(0,"div",2)(1,"div",3),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",4),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.j41(7,"div",5),e.DNE(8,$n,2,5,"div",6),e.k0s(),e.j41(9,"div",7),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.onAddNewPaymentMethod(i.hostedPayment))}),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"div",8),e.nrm(13,"input",9)(14,"label",10),e.nI1(15,"translate"),e.k0s(),e.j41(16,"button",11),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.onChoosePaymentMethod())}),e.DNE(17,Bn,3,3,"span",12)(18,Fn,3,6,"span",12)(19,Yn,1,2,"app-small-loader",13),e.k0s(),e.DNE(20,Nn,3,3,"span",14)(21,Dn,1,0,"app-secure-payment",12),e.k0s()}if(2&t){const n=e.XpG();e.R7$(2),e.SpI(" ",e.bMT(3,11,"onboarding.choose-payment.title")," "),e.R7$(3),e.SpI(" ",e.bMT(6,13,"onboarding.choose-payment.subtitle")," "),e.R7$(3),e.Y8G("ngForOf",n.paymentMethods),e.R7$(2),e.SpI(" + ",e.bMT(11,15,"onboarding.choose-payment.add-new")," "),e.R7$(4),e.Y8G("innerHTML",e.bMT(15,17,"onboarding.new-card.privacy-policy"),e.npT),e.R7$(2),e.Y8G("disabled",n.disabledButton()),e.R7$(),e.Y8G("ngIf",!(n.selectedPlan&&n.selectedPlan.hasTrial()||n.isPaymentMethodLoading)),e.R7$(),e.Y8G("ngIf",n.selectedPlan&&n.selectedPlan.hasTrial()&&!n.isPaymentMethodLoading),e.R7$(),e.Y8G("ngIf",n.isPaymentMethodLoading),e.R7$(),e.Y8G("ngIf",n.showPaymentVerification),e.R7$(),e.Y8G("ngIf",n.agency.showChargebeeSecurePayment)}}function zn(t,a){if(1&t&&e.nrm(0,"app-choose-payment-method-mobile",19),2&t){const n=e.XpG();e.Y8G("parent",n)}}let V=(()=>{class t{constructor(n){this.translateService=n,this.onAddNewPaymentMethodEvent=new e.bkB,this.onSelectPaymentOptionEvent=new e.bkB,this.onHostedPaymentRedirectEvent=ne
1w e.bkB,this.onChoosePaymentMethodEvent=new e.bkB}ngOnInit(){this.initializeHostedPayment()}initializeHostedPayment(){const n=this.agency?.hostedPayment;n&&(this.hostedPayment=n),this.checkPaymentMethod(this.hostedPayment,this.paymentMethods)&&this.onAddNewPaymentMethod(this.hostedPayment)}checkPaymentMethod(n,o){return o&&0===o.length&&!n}getSelected(){return this.selectedPaymentMethod?this.selectedPaymentMethod:this.primaryPaymentMethod}getTrialPeriod(n){return`${n.trialPeriod}-${n.getTrialPeriod(this.translateService)}`}isMobile(){return window.innerWidth<I.s}disabledButton(){return!(!this.isPaymentMethodLoading&&this.paymentMethods&&0!==this.paymentMethods.length)}onAddNewPaymentMethod(n){n?this.onHostedPaymentRedirectEvent.emit():this.onAddNewPaymentMethodEvent.emit(c.E.NEW_PAYMENT)}onSelectPaymentOption(n){this.onSelectPaymentOptionEvent.emit(n)}onChoosePaymentMethod(){this.onChoosePaymentMethodEvent.emit()}static{this.\u0275fac=function(o){return new(o||t)(e.rXU(_.c$))}}static{this.\u0275cmp=e.VBU({type:t,selectors:[["app-choose-payment-method"]],inputs:{agency:"agency",selectedPlan:"selectedPlan",paymentMethods:"paymentMethods",showPaymentVerification:"showPaymentVerification",selectedPaymentMethod:"selectedPaymentMethod",primaryPaymentMethod:"primaryPaymentMethod",isPaymentMethodLoading:"isPaymentMethodLoading"},outputs:{onAddNewPaymentMethodEvent:"onAddNewPaymentMethodEvent",onSelectPaymentOptionEvent:"onSelectPaymentOptionEvent",onHostedPaymentRedirectEvent:"onHostedPaymentRedirectEvent",onChoosePaymentMethodEvent:"onChoosePaymentMethodEvent"},standalone:!1,decls:2,vars:2,consts:[["class","container",4,"ngIf"],[3,"parent",4,"ngIf"],[1,"container"],[1,"f-size-26","f-bold","color-text-1"],[1,"f-regular","f-size-14","color-text-3","subtitle","oboarding-payment-subtitle"],[1,"payments"],["class","payment-method bkg-3",3,"selected","border-selection","click",4,"ngFor","ngForOf"],[1,"add-new","f-medium","f-size-16","color-text-link",3,"click"],[1,"button-terms","bkg-3"],["type","checkbox","name","terms","id","terms","checked","","disabled","",1,"checkbox","form-control"],["htmlFor","terms",1,"f-size-14","f-regular","color-text-2",3,"innerHTML"],[1,"subscribe","btn-primary","btn-flex","f-size-16","f-medium",3,"click","disabled"],[4,"ngIf"],[3,"color","opacity",4,"ngIf"],["class","f-size-14 f-regular color-text-3 payment-info",4,"ngIf"],[1,"payment-method","bkg-3",3,"click"],[3,"payment"],[3,"color","opacity"],[1,"f-size-14","f-regular","color-text-3","payment-info"],[3,"parent"]],template:function(o,i){1&o&&e.DNE(0,Vn,22,19,"div",0)(1,zn,1,1,"app-choose-payment-method-mobile",1),2&o&&(e.Y8G("ngIf",!i.isMobile()),e.R7$(),e.Y8G("ngIf",i.isMobile()))},styles:[".container[_ngcontent-%COMP%]{height:100%;display:flex;flex-flow:column}.subtitle[_ngcontent-%COMP%]{margin-top:.5rem;margin-bottom:1rem}.payment-method[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%;height:3.875rem;border-radius:.5rem;cursor:pointer;margin-bottom:1rem}.payment-method.selected[_ngcontent-%COMP%]{border-width:2px;border-style:solid}.payment-method[_ngcontent-%COMP%]:last-of-type{margin-bottom:0}.ic-payment-method[_ngcontent-%COMP%]{margin-right:.75rem;width:2rem;height:1.75rem}.add-new[_ngcontent-%COMP%]{margin:11px auto;text-align:center;padding:5px;cursor:pointer}.payments[_ngcontent-%COMP%]{max-height:15.625rem;overflow:auto}.payment-info[_ngcontent-%COMP%]{text-align:center;margin-bottom:0;margin-top:.5rem}.button-terms[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:.5rem .75rem;border-radius:.5rem;width:100%;margin-bottom:1rem}.button-terms[_ngcontent-%COMP%]   .checkbox[_ngcontent-%COMP%]{width:.875rem;height:.875rem}"]})}}return t})();var z=l(586);const Xn=t=>({amount:t}),Ln=t=>({trial_period:t});function Un(t,a){if(1&t){const n=e.RV6();e.j41(0,"div",9),e.bIt("click",function(){const i=e.eBV(n).$implicit,r=e.XpG();return e.Njj(r.parent.onSelectPaymentOption(i))}),e.nrm(1,"app-payment-option",10),e.k0s()}if(2&t){let n,o;const i=a.$implicit,r=e.XpG();e.AVh("selected",i.id===(null==(n=r.parent.getSelected())?null:n.id))("border-selection",i.id===(null==(o=r.parent.getSelected())?null:o.id)),e.R7$(),e.Y8G("payment",i)}}function Hn(t,a){if(1&t&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t){const n=e.XpG(2);e.R7$(),e.SpI(" ",e.i5U(2,1,"onboarding.choose-payment.pay-and-subscribe",e.eq3(4,Xn,n.parent.selectedPlan.getPrice()))," ")}}function Wn(t,a){if(1&t&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t){const n=e.XpG(2);e.R7$(),e.SpI(" ",e.i5U(2,1,"onboarding.new-card.start-free-trial",e.eq3(4,Ln,n.parent.getTrialPeriod(n.parent.selectedPlan)))," ")}}function Jn(t,a){1&t&&e.nrm(0,"app-small-loader",14),2&t&&e.Y8G("color","white")("opacity",.6)}function Zn(t,a){if(1&t){const n=e.RV6();e.j41(0,"button",11),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.parent.onChoosePaymentMethod())}),e.DNE(1,Hn,3,6,"span",12)(2,Wn,3,6,"span",12)(3,Jn,1,2,"app-small-loader",13),e.k0s()}if(2&t){const n=e.XpG();e.Y8G("disabled",n.parent.disabledButton()),e.R7$(),e.Y8G("ngIf",!n.parent.selectedPlan.hasTrial()&&!n.parent.isPaymentMethodLoading),e.R7$(),e.Y8G("ngIf",n.parent.selectedPlan.hasTrial()&&!n.parent.isPaymentMethodLoading),e.R7$(),e.Y8G("ngIf",n.parent.isPaymentMethodLoading)}}function Kn(t,a){1&t&&(e.j41(0,"span",15),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"onboarding.payment-authorization-info")," "))}let Qn=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=e.VBU({type:t,selectors:[["app-choose-payment-method-mobile"]],inputs:{parent:"parent"},standalone:!1,decls:15,vars:12,consts:[[1,"container"],[1,"f-size-20","f-bold","color-text-1"],[1,"f-regular","f-size-14","color-text-3","subtitle","oboarding-payment-subtitle"],[1,"payments"],["class","payment-method bkg-3",3,"selected","border-selection","click",4,"ngFor","ngForOf"],[1,"add-new","f-medium","f-size-14","color-text-link",3,"click"],[1,"btn-box","bkg-1"],["class","subscribe btn-secondary btn-flex f-size-14 f-medium onboarding-subscribe-btn",3,"disabled","click",4,"ngIf"],["class","f-size-14 f-regular color-text-3 payment-info",4,"ngIf"],[1,"payment-method","bkg-3",3,"click"],[3,"payment"],[1,"subscribe","btn-secondary","btn-flex","f-size-14","f-medium","onboarding-subscribe-btn",3,"click","disabled"],[4,"ngIf"],[3,"color","opacity",4,"ngIf"],[3,"color","opacity"],[1,"f-size-14","f-regular","color-text-3","payment-info"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"div",1),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",2),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.j41(7,"div",3),e.DNE(8,Un,2,5,"div",4),e.k0s(),e.j41(9,"div",5),e.bIt("click",function(){return i.parent.onAddNewPaymentMethod(i.parent.hostedPayment)}),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"div",6),e.DNE(13,Zn,4,4,"button",7)(14,Kn,3,3,"span",8),e.k0s()()),2&o&&(e.R7$(2),e.SpI(" ",e.bMT(3,6,"onboarding.new-payment.title")," "),e.R7$(3),e.SpI(" ",e.bMT(6,8,"onboarding.new-payment.subtitle")," "),e.R7$(3),e.Y8G("ngForOf",i.parent.paymentMethods),e.R7$(2),e.SpI(" + ",e.bMT(11,10,"onboarding.choose-payment.add-new")," "),e.R7$(3),e.Y8G("ngIf",i.parent.selectedPlan),e.R7$(),e.Y8G("ngIf",i.parent.showPaymentVerification))},dependencies:[g.Sq,g.bT,h.M,z.T,_.D9],styles:[".container[_ngcontent-%COMP%]{margin-top:1rem;display:flex;flex-flow:column}.subtitle[_ngcontent-%COMP%]{margin-top:.5rem;margin-bottom:1rem}.subscribe[_ngcontent-%COMP%]{margin-top:auto}.payment-method[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%;height:3.25rem;border-radius:.5rem;cursor:pointer;margin-bottom:.75rem}.payment-method[_ngcontent-%COMP%]:last-of-type{margin-bottom:0}.payment-method.selected[_ngcontent-%COMP%]{border-width:2px;border-style:solid}.ic-payment-method[_ngcontent-%COMP%]{margin-right:.75rem;width:2rem;height:1.75rem}.add-new[_ngcontent-%COMP%]{margin:.6875rem auto;text-align:center;padding:5px;cursor:pointer}.payments[_ngcontent-%COMP%]{max-height:15.625rem;overflow:auto}.btn-box[_ngcontent-%COMP%]{position:fixed;bottom:0;left:0;right:0;padding:1.25rem}.payment-info[_ngcontent-%COMP%]{text-align:center;margin-bottom:0;padding-top:.5rem;margin-top:auto}"]})}}return t})();var qn=l(5996),X=l(9164);const et=(t,a)=>({trial_period:t,trial_unit:a});function nt(t,a){if(1&t){const n=e.RV6();e.j41(0,"div",16),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.onAddCoupon())}),e.nrm(1,"svg-icon",17),e.EFF(2),e.nI1(3,"translate"),e.k0s()}if(2&t){const n=e.XpG();e.R7$(),e.Y8G("applyClass",!0)("src",n.parent.getImageSrc("ic_coupon.svg")),e.R7$(),e.SpI(" ",e.bMT(3,3,"onboarding.choose-plan-mobile.add-coupon")," ")}}function tt(t,a){if(1&t){const n=e.RV6();e.j41(0,"div",18)(1,"div",19),e.nrm(2,"svg-icon",20),e.EFF(3),e.k0s(),e.j41(4,"fa-icon",21),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.parent.couponService.clear())}),e.k0s()()}if(2&t){const n=e.XpG();e.R7$(),e.AVh("error",n.parent.selectedPlan&&n.parent.selectedPlan.getCouponError()),e.R7$(),e.AVh("fill-red",n.parent.selectedPlan.getCouponError())("fill-green",!n.parent.selectedPlan.getCouponError()),e.Y8G("applyClass",!0)("src",n.parent.getImageSrc("ic_coupon.svg")),e.R7$(),e.SpI(" ",n.parent.couponService.selectedCoupon," "),e.R7$(),e.Y8G("icon",n.faClose)}}
1function ot(t,a){if(1&t){const n=e.RV6();e.j41(0,"app-plan-group-chooser",22),e.bIt("selectedPlanGroupChange",function(i){e.eBV(n);const r=e.XpG();return e.Njj(r.parent.onChoosePlanGroup(i))}),e.k0s()}if(2&t){const n=e.XpG();e.Y8G("planGroups",n.parent.onboardingService.planGroups)("selectedPlanGroup",n.parent.selectedPlanGroup)}}function it(t,a){if(1&t){const n=e.RV6();e.j41(0,"fa-icon",40),e.bIt("mouseenter",function(i){e.eBV(n);const r=e.XpG(3),s=e.sdS(11);return e.Njj(r.showTooltip(s,i))})("mouseleave",function(){e.eBV(n),e.XpG(3);const i=e.sdS(11);return e.Njj(i.hide())}),e.k0s()}if(2&t){const n=e.XpG(3),o=e.sdS(11);e.AVh("color-bkg-4",!o.visible)("color-text-link",o.visible),e.Y8G("icon",n.parent.faWarning)}}function at(t,a){if(1&t&&(e.j41(0,"span",41),e.EFF(1),e.k0s()),2&t){const n=e.XpG().$implicit,o=e.XpG(2);e.R7$(),e.SpI(" ",o.getOldPrice(n)," ")}}function rt(t,a){if(1&t&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&t){const n=e.XpG(3);e.R7$(),e.SpI(" /",n.parent.getPeriod(n.parent.selectedPlanGroup)," ")}}function st(t,a){if(1&t&&(e.j41(0,"div",42),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t){const n=e.XpG().$implicit,o=e.XpG(2);e.R7$(),e.SpI(" ",e.i5U(2,1,"onboarding.select-plan.free-trial-badge",e.l_i(4,et,n.trialPeriod,o.parent.getTrialPeriodTranslation(n)))," ")}}function lt(t,a){if(1&t&&(e.j41(0,"div",43)(1,"span",44),e.EFF(2),e.k0s(),e.EFF(3),e.nI1(4,"translate"),e.k0s()),2&t){const n=e.XpG().$implicit,o=e.XpG(2);e.R7$(),e.AVh("cupon-price",null!==o.getOldPrice(n)),e.R7$(),e.JRh(n.getPriceMonhtly()),e.R7$(),e.SpI(" / ",e.bMT(4,4,"shared.time-period.month")," ")}}function ct(t,a){if(1&t&&e.nrm(0,"div",45),2&t){const n=e.XpG().$implicit;e.Y8G("innerHTML",n.getCouponNote(),e.npT)}}function pt(t,a){if(1&t&&e.nrm(0,"div",46),2&t){const n=e.XpG().$implicit;e.Y8G("innerHTML",n.getCouponError(),e.npT)}}function dt(t,a){if(1&t&&(e.j41(0,"div",50),e.nrm(1,"svg-icon",51),e.EFF(2),e.k0s()),2&t){const n=a.$implicit,o=e.XpG(4);e.R7$(),e.Y8G("src",o.parent.getImageSrc("feature_icon.svg")),e.R7$(),e.SpI(" ",n," ")}}function mt(t,a){if(1&t&&(e.j41(0,"div",47)(1,"div",48),e.EFF(2),e.k0s(),e.DNE(3,dt,3,2,"div",49),e.k0s()),2&t){const n=e.XpG().$implicit;e.R7$(2),e.SpI(" ",n.description," "),e.R7$(),e.Y8G("ngForOf",n.features)}}function gt(t,a){1&t&&(e.j41(0,"div",55),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"onboarding.choose-plan-mobile.tap-to-expand")," "))}function _t(t,a){1&t&&(e.j41(0,"div",55),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"onboarding.choose-plan-mobile.tap-to-collapse")," "))}function ut(t,a){if(1&t&&(e.j41(0,"div",52),e.nrm(1,"div",53),e.DNE(2,gt,3,3,"div",54)(3,_t,3,3,"div",54),e.k0s()),2&t){const n=e.XpG(3);e.R7$(),e.AVh("rotate",n.expandPlan),e.R7$(),e.Y8G("ngIf",!n.expandPlan),e.R7$(),e.Y8G("ngIf",n.expandPlan)}}function ht(t,a){if(1&t){const n=e.RV6();e.j41(0,"div",25),e.bIt("click",function(){const i=e.eBV(n).$implicit,r=e.XpG(2);return e.Njj(r.onSelectPlan(i))}),e.j41(1,"div",26)(2,"div",27)(3,"div")(4,"div",28),e.EFF(5),e.DNE(6,it,1,5,"fa-icon",29),e.k0s(),e.j41(7,"div",18)(8,"div",30),e.EFF(9),e.k0s(),e.j41(10,"div",31),e.DNE(11,at,2,1,"span",32)(12,rt,2,1,"span",11),e.k0s()()(),e.j41(13,"div",33),e.DNE(14,st,3,7,"div",34)(15,lt,5,6,"div",35),e.k0s()(),e.DNE(16,ct,1,1,"div",36)(17,pt,1,1,"div",37)(18,mt,4,2,"div",38),e.k0s(),e.DNE(19,ut,4,4,"div",39),e.k0s()}if(2&t){const n=a.$implicit,o=e.XpG(2);e.AVh("selected",o.parent.selectedPlan===n)("border-selection",o.parent.selectedPlan===n)("border-transparent",o.parent.selectedPlan!==n),e.R7$(5),e.SpI(" ",n.name," "),e.R7$(),e.Y8G("ngIf",o.parent.showPlanWarning(n)),e.R7$(2),e.AVh("cupon-price",null!==o.getOldPrice(n)),e.R7$(),e.SpI(" ",o.getPrice(n)," "),e.R7$(2),e.Y8G("ngIf",o.getOldPrice(n)),e.R7$(),e.Y8G("ngIf",!o.parent.agency.showMonthlyPrice),e.R7$(2),e.Y8G("ngIf",n.hasTrial()),e.R7$(),e.Y8G("ngIf",o.showMonthlyPrice(n)),e.R7$(),e.Y8G("ngIf",n===o.parent.selectedPlan&&n.getCouponNote()&&!n.getCouponError()),e.R7$(),e.Y8G("ngIf",n===o.parent.selectedPlan&&n.getCouponError()),e.R7$(),e.Y8G("ngIf",o.expandPlan&&o.parent.selectedPlan===n),e.R7$(),e.Y8G("ngIf",o.parent.selectedPlan===n)}}function ft(t,a){if(1&t&&(e.j41(0,"div",23),e.DNE(1,ht,20,19,"div",24),e.k0s()),2&t){const n=e.XpG();e.R7$(),e.Y8G("ngForOf",n.parent.selectedPlanGroup.plans)}}function bt(t,a){1&t&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"onboarding.choose-plan-mobile.select-plan")," "))}function yt(t,a){if(1&t&&e.nrm(0,"img",56),2&t){const n=e.XpG();e.Y8G("src",n.parent.getImageSrc("arrow_btn.svg"),e.B4B)}}function Pt(t,a){1&t&&e.nrm(0,"app-small-loader",57),2&t&&e.Y8G("color","white")("opacity",.6)}function vt(t,a){if(1&t&&(e.j41(0,"div",58),e.EFF(1),e.k0s()),2&t){const n=e.XpG();e.R7$(),e.SpI(" ",n.getBottomText()," ")}}function Ct(t,a){if(1&t){const n=e.RV6();e.j41(0,"app-add-coupon-popup",59),e.bIt("onClose",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.parent.inputCoupon=!1)})("onApply",function(i){e.eBV(n);const r=e.XpG();return e.Njj(r.onApplyCoupon(i))}),e.k0s()}if(2&t){const n=e.XpG();e.Y8G("@fadeInOut",void 0)("plan",n.parent.selectedPlan)}}let St=(()=>{class t{constructor(n){this.translate=n,this.faClose=P.yYc,this.expandPlan=!1,this.warningPostionLeft=0,this.warningPostionTop=0}ngOnInit(){}onSelectPlan(n){this.parent.selectedPlan===n?this.toggleExpandPlan(n):(this.collapsePlan(),this.parent.onSelectPlan(n),this.parent.sendPlanSelectedAnalytics(n))}onSlider(n){this.parent.selectedPlanGroup!=n&&(this.expandPlan=!1),this.parent.onChoosePlanGroup(n)}onAddCoupon(){this.parent.inputCoupon=!0}onApplyCoupon(n){this.parent.coupon=n,this.parent.onApplyCoupon()}getPrice(n){return n.getNewPrice()?n.getNewPrice():n.getPrice()}getOldPrice(n){return n.getNewPrice()?n.getPrice():null}showTooltip(n,o){n.show();const r=o.target.getBoundingClientRect();this.warningPostionLeft=r.left+8,this.warningPostionTop=r.top}getBottomText(){const n=this.translate.instant("onboarding.choose-plan-mobile.bottom-text");if(n&&n.length>0)return n}toggleExpandPlan(n){this.expandPlan=!this.expandPlan,this.expandPlan&&this.parent.sendPlanViewAnalytics(n)}collapsePlan(){this.expandPlan=!1}
1getPeriodDiscount(n){return this.parent.getPeriodDiscount(n)}showMonthlyPrice(n){return(1!==n.period||"month"!==n.periodUnit)&&this.parent.agency.showMonthlyPrice}static{this.\u0275fac=function(o){return new(o||t)(e.rXU(_.c$))}}static{this.\u0275cmp=e.VBU({type:t,selectors:[["app-choose-plan-mobile"]],inputs:{parent:"parent"},standalone:!1,decls:20,vars:20,consts:[["planwarning",""],[1,"h-box","top-box"],[1,"title","f-size-20","f-bold","color-text-1"],["class","coupon-btn-bkg color-text-selection h-box f-medium",3,"click",4,"ngIf"],["class","h-box",4,"ngIf"],[1,"subtitle","f-size-14","f-regular","color-text-3"],[3,"planGroups","selectedPlanGroup","selectedPlanGroupChange",4,"ngIf"],[1,"plan-warning",3,"tranlaste"],["class","plans",4,"ngIf"],[1,"btn-box","bkg-1"],[1,"btn-primary","btn-flex","proceed-button","f-size-14","f-semi-bold",3,"click"],[4,"ngIf"],["class","ic-btn-arrow",3,"src",4,"ngIf"],["class","creatable-loader",3,"color","opacity",4,"ngIf"],["class","f-size-12 f-regular color-text-3 bottom-text",4,"ngIf"],[3,"plan","onClose","onApply",4,"ngIf"],[1,"coupon-btn-bkg","color-text-selection","h-box","f-medium",3,"click"],[1,"ic-coupon","fill-icon-selection",3,"applyClass","src"],[1,"h-box"],[1,"selected-coupon","color-green","h-box","f-medium"],[1,"ic-coupon",3,"applyClass","src"],[1,"f-size-12","icon-remove","color-text-3",3,"click","icon"],[3,"selectedPlanGroupChange","planGroups","selectedPlanGroup"],[1,"plans"],["class","plan bkg-2",3,"selected","border-selection","border-transparent","click",4,"ngFor","ngForOf"],[1,"plan","bkg-2",3,"click"],[1,"content"],[1,"h-box","space-between","price-box"],[1,"f-size-12","f-semi-bold","color-text-2","plan-name"],[3,"color-bkg-4","color-text-link","icon","mouseenter","mouseleave",4,"ngIf"],[1,"f-size-24","f-bold","color-text-2","onboarding-price-text"],[1,"f-size-14","f-regular","color-text-3","period"],["class","old-price color-text-3",4,"ngIf"],[1,"text-end"],["class","badge-free-trial-mobile f-size-12 f-semi-bold",4,"ngIf"],["class","color-text-3 f-size-12 f-regular lower-case monthly-price",4,"ngIf"],["class","selected-coupon-note-mobile border-green f-size-12 f-regular",3,"innerHTML",4,"ngIf"],["class","selected-coupon-note-mobile error border-red f-size-12 f-regular",3,"innerHTML",4,"ngIf"],["class","more-content",4,"ngIf"],["class","footer h-box border-bkg-3",4,"ngIf"],[3,"mouseenter","mouseleave","icon"],[1,"old-price","color-text-3"],[1,"badge-free-trial-mobile","f-size-12","f-semi-bold"],[1,"color-text-3","f-size-12","f-regular","lower-case","monthly-price"],[1,"color-blue"],[1,"selected-coupon-note-mobile","border-green","f-size-12","f-regular",3,"innerHTML"],[1,"selected-coupon-note-mobile","error","border-red","f-size-12","f-regular",3,"innerHTML"],[1,"more-content"],[1,"f-size-12","f-medium","more-desc","color-text-3"],["class","feature f-size-12 f-regular h-box color-text-2",4,"ngFor","ngForOf"],[1,"feature","f-size-12","f-regular","h-box","color-text-2"],[1,"green-checkbox","sroke-green","fill-green",3,"src"],[1,"footer","h-box","border-bkg-3"],[1,"arrow","border-bkg-4"],["class","f-size-12 f-regular color-text-3",4,"ngIf"],[1,"f-size-12","f-regular","color-text-3"],[1,"ic-btn-arrow",3,"src"],[1,"creatable-loader",3,"color","opacity"],[1,"f-size-12","f-regular","color-text-3","bottom-text"],[3,"onClose","onApply","plan"]],template:function(o,i){if(1&o){const r=e.RV6();e.j41(0,"div",1)(1,"div",2),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.DNE(4,nt,4,5,"div",3)(5,tt,5,10,"div",4),e.k0s(),e.j41(6,"div",5),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.DNE(9,ot,1,2,"app-plan-group-chooser",6),e.nrm(10,"app-custom-tooltip",7,0),e.DNE(12,ft,2,1,"div",8),e.j41(13,"div",9)(14,"button",10),e.bIt("click",function(){return e.eBV(r),e.Njj(i.parent.onChoosePlan())}),e.DNE(15,bt,3,3,"span",11)(16,yt,1,1,"img",12)(17,Pt,1,2,"app-small-loader",13),e.k0s(),e.DNE(18,vt,2,1,"div",14),e.k0s(),e.DNE(19,Ct,1,2,"app-add-coupon-popup",15)}2&o&&(e.R7$(2),e.SpI(" ",e.bMT(3,16,"onboarding.choose-plan-mobile.title")," "),e.R7$(2),e.Y8G("ngIf",!i.parent.couponService.selectedCoupon&&i.parent.agency.couponsOboarding),e.R7$(),e.Y8G("ngIf",i.parent.couponService.selectedCoupon),e.R7$(2),e.SpI(" ",e.bMT(8,18,"onboarding.choose-plan-mobile.subtitle"),"\n"),e.R7$(2),e.Y8G("ngIf",i.parent.onboardingService.planGroups),e.R7$(),e.xc7("left",i.warningPostionLeft+"px")("top",i.warningPostionTop+"px"),e.Y8G("tranlaste",i.parent.getAudienceWarning()),e.R7$(2),e.Y8G("ngIf",i.parent.selectedPlanGroup),e.R7$(3),e.Y8G("ngIf",!i.parent.loadingPlan),e.R7$(),e.Y8G("ngIf",!i.parent.loadingPlan),e.R7$(),e.Y8G("ngIf",i.parent.loadingPlan),e.R7$(),e.Y8G("ngIf",i.getBottomText()),e.R7$(),e.Y8G("ngIf",i.parent.inputCoupon))},dependencies:[g.Sq,g.bT,G.DM,T.aY,h.M,qn.x,X.I,N,_.D9],styles:[".subtitle[_ngcontent-%COMP%]{margin-top:4px}.plan-slider[_ngcontent-%COMP%]{height:2rem;width:100%;border-radius:.375rem;position:relative;cursor:pointer;margin-top:1.25rem}.plan-slider[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:50%;height:2rem;position:absolute;top:0;display:flex;justify-content:center;align-items:center;transition:all .3s ease-in}.plan-slider[_ngcontent-%COMP%]   .slider[_ngcontent-%COMP%]{border-radius:.375rem;left:0}.plan-slider[_ngcontent-%COMP%]   .slider-right[_ngcontent-%COMP%]{left:50%}.plan-slider[_ngcontent-%COMP%]   .monthly[_ngcontent-%COMP%]{left:0}.plan-slider[_ngcontent-%COMP%]   .annual[_ngcontent-%COMP%]{left:50%}.discount[_ngcontent-%COMP%]{padding:3px .375rem;border-radius:5px;margin-left:.5rem}.plans[_ngcontent-%COMP%]{margin-top:1rem;margin-bottom:3.125rem}.plan[_ngcontent-%COMP%]{box-shadow:0 1px 4px 1px #0000001a;border-radius:.375rem;margin-bottom:1.0625rem;cursor:pointer}.plan[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{padding:16px}.plan[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .period[_ngcontent-%COMP%]{transform:translate(5px,5px
1)}.plan.selected[_ngcontent-%COMP%]{border-width:2px;border-style:solid}.plan.selected[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{padding-bottom:5px}.ic-arrow[_ngcontent-%COMP%]{width:.75rem}.btn-box[_ngcontent-%COMP%]{position:fixed;bottom:0;left:0;right:0;padding:1.25rem}.arrow[_ngcontent-%COMP%]{width:0;height:0;border-width:5px;border-style:solid;border-right-color:#0000;border-bottom-color:#0000;border-left-color:#0000;transform:translateY(35%);margin-right:7px}.rotate[_ngcontent-%COMP%]{transform:rotate(180deg) translateY(35%)}.footer[_ngcontent-%COMP%]{justify-content:center;padding:3px 0;border-top-width:1px;border-top-style:solid}.green-checkbox[_ngcontent-%COMP%]{height:12px;width:12px;min-width:12px;margin-right:4px}.more-desc[_ngcontent-%COMP%]{margin-bottom:.75rem}.feature[_ngcontent-%COMP%]{margin-bottom:.5rem}.plans-btn[_ngcontent-%COMP%]{height:3.125rem;margin-top:1.25rem;border-radius:.375rem;display:flex;align-items:center;padding-left:1.25rem}.top-box[_ngcontent-%COMP%]{justify-content:space-between;align-items:center;margin-top:15px}.ic-coupon[_ngcontent-%COMP%]{width:.8125rem;height:1.125rem;margin-right:4px}.coupon-btn-bkg[_ngcontent-%COMP%]{border-radius:4px;padding:2px .5rem;cursor:pointer}.selected-coupon[_ngcontent-%COMP%]{border-radius:4px;padding:2px .5rem}.selected-coupon-note-mobile[_ngcontent-%COMP%]{border-radius:.375rem;padding:.625rem;border-width:1px;border-style:solid;margin-bottom:.75rem}.old-price[_ngcontent-%COMP%]{text-decoration:line-through;text-decoration-thickness:1.5px}.plan-name[_ngcontent-%COMP%]{display:flex;column-gap:.75rem}.plan-name[_ngcontent-%COMP%]   .discount[_ngcontent-%COMP%]{margin-left:0}.plan-warning[_ngcontent-%COMP%]{position:fixed;top:0;left:0;z-index:1}.bottom-text[_ngcontent-%COMP%]{margin-top:.625rem;text-align:center}.badge-free-trial-mobile[_ngcontent-%COMP%]{padding:2px 8px;border-radius:8px;display:inline-block}.text-end[_ngcontent-%COMP%]{text-align:end}.monthly-price[_ngcontent-%COMP%]{margin-top:4px}.price-box[_ngcontent-%COMP%]{align-items:flex-start}.icon-remove[_ngcontent-%COMP%]{margin-left:4px}"],data:{animation:[te,k.Ws]}})}}return t})();var b=l(6346),f=l(4456),y=l(9283),L=l(7534),j=l(4917);const Mt=t=>({val:t}),xt=t=>({trial_period:t});function kt(t,a){1&t&&e.nrm(0,"app-small-loader",25),2&t&&e.Y8G("scale",2)("opacity",.5)}function It(t,a){if(1&t&&(e.j41(0,"div",26),e.EFF(1),e.k0s()),2&t){const n=e.XpG();e.R7$(),e.SpI(" ",n.error.message," ")}}function wt(t,a){1&t&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"onboarding.new-card.pay-and-subscribe")," "))}function Gt(t,a){if(1&t&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t){const n=e.XpG();e.R7$(),e.SpI(" ",e.i5U(2,1,"onboarding.new-card.start-free-trial",e.eq3(4,xt,n.getTrialPeriod()))," ")}}function Tt(t,a){1&t&&(e.j41(0,"span",27),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"onboarding.payment-authorization-info")," "))}let Et=(()=>{class t{constructor(n,o){this.translateService=n,this.agency=o,this.onBackEvent=new e.bkB,this.onSetComponentEvent=new e.bkB,this.onTokenizeEvent=ne
1w e.bkB,this.locale="en",this.styles={},this.fonts=b.Z2,this.placeholder=b.wE,this.classes=b.ry}ngOnInit(){this.styles=(0,b.no)(this.isDarkModeEnabled)}onBack(){this.onBackEvent.emit(c.E.NEW_PAYMENT)}setComponent(n){this.onSetComponentEvent.emit(n)}onTokenize(){!this.name||!this.country||this.onTokenizeEvent.emit({name:this.name,country:this.country})}hasTrial(){return!!this.selectedPlan&&this.selectedPlan.hasTrial()}getTrialPeriod(){return`${this.selectedPlan.trialPeriod}-${this.selectedPlan.getTrialPeriod(this.translateService)}`}onSelectCountry(n){this.country=n}isValidCardInput(){if(!this.country||!this.name||!this.cardComponent)return!1;for(let n of this.cardComponent.fields)if(!n.status.isValid)return!1;return!0}static{this.\u0275fac=function(o){return new(o||t)(e.rXU(_.c$),e.rXU(S.z))}}static{this.\u0275cmp=e.VBU({type:t,selectors:[["app-new-card-payment"]],inputs:{cardComponent:"cardComponent",isDarkModeEnabled:"isDarkModeEnabled",currency:"currency",isCardLoading:"isCardLoading",selectedPlan:"selectedPlan",showPaymentVerification:"showPaymentVerification",error:"error",name:"name",agencyBackIcon:"agencyBackIcon"},outputs:{onBackEvent:"onBackEvent",onSetComponentEvent:"onSetComponentEvent",onTokenizeEvent:"onTokenizeEvent"},standalone:!1,decls:41,vars:32,consts:[[1,"container"],[1,"h-box","title-box"],[1,"btn-onboarding-back","bkg-3",3,"click"],[1,"ic-back",3,"src"],[1,"f-size-26","f-bold","new-card-title","color-text-1","title"],[1,"card-container"],["class","loader overlay-card-loading",3,"scale","opacity",4,"ngIf"],[1,"input-card-wrapper"],["name","name","type","text","placeholder","John Doe",1,"input-card","f-medium","f-size-16",3,"ngModelChange","ngClass","ngModel"],[1,"ex1-label","color-text-placeholder","f-medium","f-size-16"],[3,"countrySelected"],["id","card-field","cbCardField","",1,"fieldset","field",3,"ready","styles","classes","currency","placeholder","locale"],["id","number-field","cbNumberField","",1,"input-card","input-details","f-medium","f-size-16",3,"placeholder"],[1,"ex1-fields"],[1,"ex1-field"],["id","expiry-field","cbExpiryField","",1,"input-card","input-details","f-medium","f-size-16"],["id","cvv-field","cbCvvField","",1,"input-card","input-details","f-medium","f-size-16"],["class","error color-text-error","role","alert",4,"ngIf"],[1,"button-wrapper"],[1,"button-terms","bkg-3"],["type","checkbox","name","terms","id","terms","checked","","disabled","",1,"checkbox","form-control"],["htmlFor","terms",1,"f-size-14","f-regular","color-text-2",3,"innerHTML"],[1,"btn-primary","f-size-16","f-medium","onboarding-subscribe-btn",3,"click","disabled"],[4,"ngIf"],["class","f-size-14 f-regular color-text-3 payment-info",4,"ngIf"],[1,"loader","overlay-card-loading",3,"scale","opacity"],["role","alert",1,"error","color-text-error"],[1,"f-size-14","f-regular","color-text-3","payment-info"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2),e.bIt("click",function(){return i.onBack()}),e.nrm(3,"img",3),e.k0s(),e.j41(4,"h3",4),e.EFF(5),e.nI1(6,"translate"),e.k0s()(),e.j41(7,"div",5),e.DNE(8,kt,1,2,"app-small-loader",6),e.j41(9,"div",7)(10,"input",8),e.mxI("ngModelChange",function(s){return e.DH7(i.name,s)||(i.name=s),s}),e.k0s(),e.j41(11,"label",9),e.EFF(12),e.nI1(13,"translate"),e.k0s()(),e.j41(14,"app-billing-country-dropdown",10),e.bIt("countrySelected",function(s){return i.onSelectCountry(s)}),e.k0s(),e.j41(15,"div",11),e.bIt("ready",function(s){return i.setComponent(s)}),e.j41(16,"div",7),e.nrm(17,"div",12),e.j41(18,"label",9),e.EFF(19),e.nI1(20,"translate"),e.k0s()(),e.j41(21,"div",13)(22,"div",14),e.nrm(23,"div",15),e.j41(24,"label",9),e.EFF(25),e.nI1(26,"translate"),e.k0s()(),e.j41(27,"div",14),e.nrm(28,"div",16),e.j41(29,"label",9),e.EFF(30," CVC "),e.k0s()()()()(),e.DNE(31,It,2,1,"div",17),e.j41(32,"div",18)(33,"div",19),e.nrm(34,"input",20)(35,"label",21),e.nI1(36,"translate"),e.k0s(),e.j41(37,"button",22),e.bIt("click",function(){return i.onTokenize()}),e.DNE(38,wt,3,3,"span",23)(39,Gt,3,6,"span",23),e.k0s()(),e.DNE(40,Tt,3,3,"span",24),e.k0s()),2&o&&(e.R7$(3),e.Y8G("src",i.agencyBackIcon,e.B4B),e.R7$(2),e.SpI(" ",e.bMT(6,20,"onboarding.new-card.title")," "),e.R7$(3),e.Y8G("ngIf",i.isCardLoading),e.R7$(2),e.Y8G("ngClass",e.eq3(30,Mt,i.name)),e.R50("ngModel",i.name),e.R7$(2),e.SpI(" ",e.bMT(13,22,"placeholder.name-on-card")," "),e.R7$(3),e.Y8G("styles",i.styles)("classes",i.classes)("currency",i.currency)("placeholder",i.placeholder)("locale",i.locale),e.R7$(2),e.Y8G("placeholder","4111 1111 1111 1111"),e.R7$(2),e.SpI(" ",e.bMT(20,24,"placeholder.card-number")," "),e.R7$(6),e.SpI(" ",e.bMT(26,26,"placeholder.expiry")," "),e.R7$(6),e.Y8G("ngIf",i.error),e.R7$(4),e.Y8G("innerHTML",e.bMT(36,28,"onboarding.new-card.privacy-policy"),e.npT),e.R7$(2),e.Y8G("disabled",i.isCardLoading||!i.isValidCardInput()),e.R7$(),e.Y8G("ngIf",!i.hasTrial()),e.R7$(),e.Y8G("ngIf",i.hasTrial()),e.R7$(),e.Y8G("ngIf",i.showPaymentVerification))},dependencies:[g.YU,g.bT,f.me,f.BC,f.vS,y.kC,y.V6,y.Bt,y.t3,h.M,L.I,j.ZP,_.D9],styles:[".container[_ngcontent-%COMP%]{display:flex;flex-flow:column;height:100%}.title-box[_ngcontent-%COMP%]{margin-bottom:1rem}.ex1.container[_ngcontent-%COMP%]{margin:auto;padding:6.25rem 0;min-height:100vh}.ex1-field[_ngcontent-%COMP%]{position:relative;height:3.75rem;margin-bottom:2rem}.ex1-fields[_ngcontent-%COMP%]{display:flex;margin-left:-1rem}.ex1-fields[_ngcontent-%COMP%]   .ex1-field[_ngcontent-%COMP%]{flex:1;margin-left:1rem}.input-card[_ngcontent-%COMP%]{margin-bottom:1.25rem}.input-card[_ngcontent-%COMP%]:focus{border:none}.input-card[_ngcontent-%COMP%]::placeholder{color:transparent}.card-container[_ngcontent-%COMP%]{position:relative}.loader[_ngcontent-%COMP%]{position:absolute;
1left:0;top:0;width:100%;height:100%;z-index:2}.payment-info[_ngcontent-%COMP%]{text-align:center;margin-bottom:0;padding-top:.5rem;margin-top:auto}.input-card-wrapper[_ngcontent-%COMP%]{position:relative}.new-card-title[_ngcontent-%COMP%]{margin:0}.error[_ngcontent-%COMP%]{margin-bottom:1rem}.onboarding-subscribe-btn[_ngcontent-%COMP%]{margin-top:auto}.button-terms[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:.5rem .75rem;border-radius:.5rem;width:100%;margin-bottom:1rem}.button-terms[_ngcontent-%COMP%]   .checkbox[_ngcontent-%COMP%]{width:.875rem;height:.875rem}"]})}}return t})();var U=l(4205),H=l(3900),Ot=l(5797),Rt=l(5545),jt=l.n(Rt),At=l(4527),W=l.n(At),v=l(6016);let J=(()=>{class t{constructor(n,o,i,r,s){this.onboardingService=n,this.translateService=o,this.agency=i,this.toastService=r,this.paymentService=s,this.onApplePayCancelTriggeredSubject=new Ot.t(!1),this.onApplePayCancelTriggered$=this.onApplePayCancelTriggeredSubject.asObservable()}initPayments(){const{applePay:n,paypal:o}=this.agency.agency;switch(n){case v.H2.BRAINTREE:this.paymentService.braintreeInstance?this.initApplePay():this.paymentService.braintreeEmitter.subscribe({next:()=>{this.initApplePay()},error:i=>{console.error(i)}});break;case v.H2.STRIPE:this.paymentService.applePayAvailable?this.applePayAvailable=!0:this.paymentService.stripeEmitter.subscribe({next:()=>{this.applePayAvailable=!0},error:i=>{console.error(i)}});break;case v.H2.CHARGEBEE:this.paymentService.applePayAvailable?this.applePayAvailable=!0:this.paymentService.chargebeeEmitter.subscribe({next:()=>{this.applePayAvailable=!0},error:i=>{console.log(i)}})}n===v.H2.CHARGEBEE&&this.initChargebeeApplePay(),o&&(this.paymentService.payp
1alInstance?this.initPaypal():this.paymentService.paypalEmitter.subscribe({next:()=>{this.initPaypal()}}))}initPaypal(){W().isSupported()&&(this.paypalAvailable=!0)}onPaypalButton(){if(W().isSupported()){this.loadingMethod="paypal";const n=this;this.paymentService.paypalInstance.tokenize({flow:"vault",enableShippingAddress:!1},function(o,i){if(o)return n.loadingMethod=null,"CUSTOMER"!==o.type&&console.error("Error tokenizing:",o),void("PAYPAL_POPUP_CLOSED"===o.code?n.toastService.showToast(n.translateService.instant("errors.canceled-paypal"),u.TS.RED):(d.l7("token_code",o.code),d.l7("token_type",o.type),d.wd("Onboarding: Failed paypal"),n.toastService.showUnexpectedToast()));n.sendPaypalToken(i.nonce)})}else console.error("Paypal is not supported")}sendPaypalToken(n){this.loadingMethod="paypal",this.paymentService.addPaymentMethodPaypal(n).subscribe({next:o=>this.sendPaypalTokenCallback(o),error:o=>this.sendPaypalTokenCallback(o)})}sendPaypalTokenCallback(n){if(200===n.status||201===n.status){window.dataLayer.push({event:"onb_add_payment_source"});let o=O.g.parse(n.body.payment_source);this.paymentService.paymentMethods.unshift(o),this.paymentService.primaryPaymentId=o.id,this.onboardingService.createSubscription(this.onboardingService.subscription).add(()=>{this.loadingMethod=null})}else n.error&&n.error.error&&"Problem while adding the payment method. Error message : Card already present"==n.error.error.message?this.toastService.showToast(this.translateService.instant("errors.card-already-present"),u.TS.RED):(d.l7("error",n),d.l7("json",JSON.stringify(n)),d.wd("Onboarding: Failed to add paypal"),this.toastService.showToast(this.translateService.instant("errors.payment.failed-to-send-paypal-token"),u.TS.RED)),this.loadingMethod=null}initApplePay(){const n=window.ApplePaySession;if(n){if(n.canMakePayments()||console.error("This device is not capable of making Apple Pay payments"),!(n&&n.supportsVersion(3)&&n.canMakePayments()))return;
1console.log("Apple Pay supported"),jt().create({client:this.paymentService.braintreeInstance}).then(o=>{this.applePayInstance=o,this.applePayAvailable=!0}).catch(o=>{d.l7("json",JSON.stringify(o)),d.wd("Onboarding: Failed to create applepay"),this.toastService.showToast(this.translateService.instant("errors.payment.failed-to-create-apple-pay"),u.TS.RED),console.error("Error creating apple pay component",o)})}}onBeginApplePay(){const{applePay:n}=this.agency.agency;n===v.H2.STRIPE?this.onStripeApplePay():n===v.H2.BRAINTREE&&this.onBraintreeApplePay()}onStripeApplePay(){this.loadingMethod="apple";let n=this;this.paymentService.paymentRequest.on("token",function(o){o.complete("success"),o.token&&o.token.id?n.sendApplePayToken(o.token.id):n.toastService.showUnexpectedToast()}),this.paymentService.paymentRequest.on("cancel",function(){this.loadingMethod=null}),this.paymentService.paymentRequest.show()}onBraintreeApplePay(){this.loadingMethod="apple";let n=this;const o=this.applePayInstance.createPaymentRequest({total:{label:"Apple Pay Subscription",amount:"0.0"}}),i=new window.ApplePaySession(3,o);i.oncancel=()=>{this.onApplePayCancel()},i.onvalidatemerchant=function(r){n.applePayInstance.performValidation({validationURL:r.validationURL,displayName:n.agency.agency.brandName},function(s,m){s?n.toastService.showToast(n.translateService.instant("errors.payment.failed-validating-merchant"),u.TS.RED):i.completeMerchantValidation(m)})},i.onpaymentauthorized=function(r){n.applePayInstance.tokenize({token:r.payment.token},function(s,m){if(s)return console.error("Error tokenizing Apple Pay:",s),d.l7("json",JSON.stringify(s)),d.wd("Onboarding: Failed applepay"),void i.completePayment(window.ApplePaySession.STATUS_FAILURE);n.sendApplePayToken(m.nonce),i.completePayment(window.ApplePaySession.STATUS_SUCCESS)})},i.begin()}sendApplePayToken(n){this.paymentService.addPaymentMethodApplePay(n).subscribe({next:o=>this.sendApplePayTokenCallback(o),error:o=>this.sendApplePayTokenCallback(o)})}onApplePayCancel(){this.onApplePayCancelTriggeredSubject.next(!0),this.loadingMethod=null,this.toastService.showToast(this.translateService.instant("errors.payment.apple-pay-session-cancelled"),u.TS.RED)}sendApplePayTokenCallback(n){if(200===n.status||201===n.status){window.dataLayer.push({event:"onb_add_payment_source"});let o=O.g.parse(n.body.payment_source);this.paymentService.paymentMethods.unshift(o),this.paymentService.primaryPaymentId=o.id,this.onboardingService.createSubscription(this.onboardingService.subscription).add(()=>{this.loadingMethod=null})}else this.loadingMethod=null,d.l7("error",n),d.l7("json",JSON.stringify(n)),d.wd("Onboarding: Failed to add applepay"),this.toastService.showToast(this.translateService.instant("errors.payment.failed-to-send-apple-token"),u.TS.RED)}initChargebeeApplePay(){const n=this;this.paymentService.getPaymentIntent().subscribe({next:o=>{this.paymentService.applePayHandler.setPaymentIntent(o.body.payment_intent),this.paymentService.applePayHandler.mountPaymentButton("#apple-pay-button").then(()=>this.paymentService.applePayHandler.handlePayment({error:r=>{console.error(r)},success:r=>{n.createPaymentSourceUsingPaymentIntent(r.paymentIntent.id)},change:()=>{}})).catch(r=>{console.error(r)})},error:()=>{}})}createPaymentSourceUsingPaymentIntent(n){this.paymentService.createPaymentSourceUsingPaymentIntent(n).subscribe({next:o=>this.sendApplePayTokenCallback(o),error:o=>this.sendApplePayTokenCallback(o)})}static{this.\u0275fac=function(o){return new(o||t)(e.KVO(c.x$),e.KVO(_.c$),e.KVO(S.z),e.KVO(u.fw),e.KVO(Y.h))}}static{this.\u0275prov=e.jDH({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function $t(t,a){if(1&t){const n=e.RV6();e.j41(0,"div",10),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.onBack())}),e.nrm(1,"img",11),e.k0s()}if(2&t){const n=e.XpG();e.R7$(),e.Y8G("src",n.backIcon,e.B4B)}}function Bt(t,a){if(1&t){const n=e.RV6();e.j41(0,"button",12),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.onCardPayment())}),e.nrm(1,"svg-icon",13),e.EFF(2),e.nI1(3,"translate"),e.k0s()}if(2&t){const n=e.XpG();e.R7$(),e.Y8G("src",n.cardIcon),e.R7$(),e.SpI(" ",e.bMT(3,2,"onboarding.new-payment.card")," ")}}
1function Ft(t,a){if(1&t&&e.nrm(0,"img",17),2&t){const n=e.XpG(2);e.Y8G("src",n.paypalBtnIcon,e.B4B)}}function Yt(t,a){1&t&&e.nrm(0,"app-small-loader",18),2&t&&e.Y8G("color","white")("opacity",.6)}function Nt(t,a){if(1&t){const n=e.RV6();e.j41(0,"button",14),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.onPaypal())}),e.DNE(1,Ft,1,1,"img",15)(2,Yt,1,2,"app-small-loader",16),e.k0s()}if(2&t){const n=e.XpG();e.Y8G("disabled",n.newPaymentService.loadingMethod),e.R7$(),e.Y8G("ngIf",!n.newPaymentService.loadingMethod),e.R7$(),e.Y8G("ngIf",n.newPaymentService.loadingMethod)}}function Dt(t,a){if(1&t){const n=e.RV6();e.qex(0),e.j41(1,"button",19),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.newPaymentService.onBeginApplePay())}),e.k0s(),e.bVm()}if(2&t){const n=e.XpG();e.R7$(),e.AVh("gone",n.newPaymentService.loadingMethod),e.Y8G("disabled",n.newPaymentService.loadingMethod)}}function Vt(t,a){1&t&&(e.j41(0,"div",20),e.nrm(1,"app-small-loader",18),e.k0s()),2&t&&(e.R7$(),e.Y8G("color","white")("opacity",.6))}function zt(t,a){1&t&&(e.j41(0,"span",21),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"onboarding.payment-authorization-info")," "))}let Xt=(()=>{class t{constructor(n,o,i){this.newPaymentService=n,this.changeDetector=o,this.zone=i,this.updateOnboardingStepEvent=new e.bkB,this.destroy$=new U.B}ngOnInit(){this.newPaymentService.initPayments(),this.newPaymentService.onApplePayCancelTriggered$.pipe((0,H.Q)(this.destroy$)).subscribe(n=>{n&&setTimeout(()=>{this.zone.run(()=>{this.changeDetector.detectChanges()})})})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onCardPayment(){this.updateOnboardingStepEvent.emit(c.E.CARD_PAYMENT)}onBack(){this.updateOnboardingStepEvent.emit(c.E.CHOOSE_PAYMENT)}isMobile(){return window.innerWidth<I.s}onPaypal(){this.newPaymentService.onPaypalButton()}static{this.\u0275fac=function(o){return new(o||t)(e.rXU(J),e.rXU(e.gRc),e.rXU(e.SKi))}}static{this.\u0275cmp=e.VBU({type:t,selectors:[["app-new-payment-method"]],inputs:{agency:"agency",showPaymentVerification:"showPaymentVerification",paymentMethods:"paymentMethods",paypalBtnIcon:"paypalBtnIcon",cardIcon:"cardIcon",backIcon:"backIcon"},outputs:{updateOnboardingStepEvent:"updateOnboardingStepEvent"},standalone:!1,decls:14,vars:12,consts:[[1,"container"],[1,"h-box"],["class","btn-onboarding-back bkg-3",3,"click",4,"ngIf"],[1,"f-size-26","f-bold","color-text-1"],[1,"f-regular","f-size-14","color-text-3","subtitle","oboarding-payment-subtitle"],["class","btn-primary btn-flex payment-btn f-medium f-size-16 btn-card",3,"click",4,"ngIf"],["class","btn btn-paypal payment-btn btn-flex",3,"disabled","click",4,"ngIf"],[4,"ngIf"],["class","apple-loading",4,"ngIf"],["class","f-size-14 f-regular color-text-3 payment-info",4,"ngIf"],[1,"btn-onboarding-back","bkg-3",3,"click"],[1,"ic-back",3,"src"],[1,"btn-primary","btn-flex","payment-btn","f-medium","f-size-16","btn-card",3,"click"],[1,"ic-card","fill-white",3,"src"],[1,"btn","btn-paypal","payment-btn","btn-flex",3,"click","disabled"],["class","ic-paypal",3,"src",4,"ngIf"],[3,"color","opacity",4,"ngIf"],[1,"ic-paypal",3,"src"],[3,"color","opacity"],["id","apple-pay-button",1,"d-flex","justify-content-between","align-items-center",3,"click","disabled"],[1,"apple-loading"],[1,"f-size-14","f-regular","color-text-3","payment-info"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"div",1),e.DNE(2,$t,2,1,"div",2),e.j41(3,"div",3),e.EFF(4),e.nI1(5,"translate"),e.k0s()(),e.j41(6,"div",4),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.DNE(9,Bt,4,4,"button",5)(10,Nt,3,3,"button",6)(11,Dt,2,3,"ng-container",7)(12,Vt,2,2,"div",8)(13,zt,3,3,"span",9),e.k0s()),2&o&&(e.R7$(2),e.Y8G("ngIf",i.paymentMethods&&(null==i.paymentMethods?null:i.paymentMethods.length)),e.R7$(2),e.SpI(" ",e.bMT(5,8,"onboarding.new-payment.title")," "),e.R7$(3),e.SpI(" ",e.bMT(8,10,"onboarding.new-payment.subtitle")," "),e.R7$(2),e.Y8G("ngIf",!i.newPaymentService.loadingMethod),e.R7$(),e.Y8G("ngIf",(!i.newPaymentService.loadingMethod||"paypal"===i.newPaymentService.loadingMethod)&&i.agency.paypal),e.R7$(),e.Y8G("ngIf",i.newPaymentService.applePayAvailable),e.R7$(),e.Y8G("ngIf","apple"===i.newPaymentService.loadingMethod),e.R7$(),e.Y8G("ngIf",i.showPaymentVerification))},dependencies:[g.bT,G.DM,h.M,_.D9],styles:[".container[_ngcontent-%COMP%]{position:relative;height:100%}.subtitle[_ngcontent-%COMP%]{margin-top:.5rem;margin-bottom:1rem}.payment-btn[_ngcontent-%COMP%]{height:3.75rem;min-height:3.75rem;margin-bottom:1rem;border-radius:.5rem}.payment-btn[_ngcontent-%COMP%]:hover{opacity:.9}.ic-card[_ngcontent-%COMP%]{margin-right:.5rem;width:1.75rem;height:1.75rem}#paypal-button[_ngcontent-%COMP%]{margin-bottom:9px;padding-right:1px}#apple-pay-button[_ngcontent-%COMP%]{display:block;background-color:#000;background-image:-webkit-named-image(apple-pay-logo-white);background-size:100% 100%;background-origin:content-box;background-repeat:no-repeat;width:100%;height:3.75rem;min-height:3.75rem;padding:1.125rem 0;border-radius:.5rem;transition:all .5s ease-out}#apple-pay-button[_ngcontent-%COMP%]:focus{cursor:wait}#apple-pay-button[_ngcontent-%COMP%]:active{cursor:wait}.apple-loading[_ngcontent-%COMP%]{background-color:#000;border-radius:.5rem;height:3.75rem;min-height:3.75rem}.payment-info[_ngcontent-%COMP%]{text-align:center;margin-bottom:0}"]})}}return t})();var Z=l(2136),Lt=l(5984);const Ut=t=>({amount:t}),Ht=t=>({trial_period:t});function Wt(t,a){1&t&&e.nrm(0,"app-small-loader",23),2&t&&e.Y8G("scale",2)("opacity",.5)}function Jt(t,a){if(1&t&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t){const n=e.XpG(2);e.R7$(),e.SpI(" ",e.i5U(2,1,"onboarding.choose-payment.pay-and-subscribe",e.eq3(4,Ut,n.selectedPlan.getPrice()))," ")}}
1function Zt(t,a){if(1&t&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t){const n=e.XpG(2);e.R7$(),e.SpI(" ",e.i5U(2,1,"onboarding.new-card.start-free-trial",e.eq3(4,Ht,n.getTrialPeriod()))," ")}}function Kt(t,a){1&t&&e.nrm(0,"app-small-loader",27),2&t&&e.Y8G("color","white")("opacity",.6)}function Qt(t,a){if(1&t){const n=e.RV6();e.j41(0,"button",24),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.onTokenize())}),e.DNE(1,Jt,3,6,"span",25)(2,Zt,3,6,"span",25)(3,Kt,1,2,"app-small-loader",26),e.k0s()}if(2&t){const n=e.XpG();e.Y8G("disabled",n.isCardLoading||!n.isValidCardInput()),e.R7$(),e.Y8G("ngIf",!(n.selectedPlan&&n.selectedPlan.hasTrial()||n.isCardLoading)),e.R7$(),e.Y8G("ngIf",n.hasTrial()&&!n.isCardLoading),e.R7$(),e.Y8G("ngIf",n.isCardLoading)}}function qt(t,a){if(1&t&&e.nrm(0,"div",28),2&t){const n=e.XpG();e.Y8G("innerHTML",n.getCardDesc(),e.npT)}}function eo(t,a){if(1&t&&e.nrm(0,"img",32),2&t){const n=e.XpG(2);e.Y8G("src",n.paypalBtnIcon,e.B4B)}}function no(t,a){1&t&&e.nrm(0,"app-small-loader",33),2&t&&e.Y8G("color","white")("opacity",.6)("scale",.8)}function to(t,a){if(1&t){const n=e.RV6();e.j41(0,"button",29),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.onPaypal())}),e.DNE(1,eo,1,1,"img",30)(2,no,1,3,"app-small-loader",31),e.k0s()}if(2&t){const n=e.XpG();e.Y8G("disabled",n.newPaymentService.loadingMethod),e.R7$(),e.Y8G("ngIf",!n.newPaymentService.loadingMethod),e.R7$(),e.Y8G("ngIf",n.newPaymentService.loadingMethod)}}function oo(t,a){1&t&&(e.j41(0,"div",34),e.nrm(1,"app-small-loader",33),e.k0s()),2&t&&(e.R7$(),e.Y8G("color","white")("opacity",.6)("scale",.8))}function io(t,a){1&t&&(e.j41(0,"span",35),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&t&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"onboarding.payment-authorization-info")," "))}let ao=(()=>{class t{constructor(n,o,i,r){this.newPaymentService=n,this.translateService=o,this.changeDetector=i,this.zone=r,this.onSetComponentEvent=new e.bkB,this.onTokenizeEvent=ne
1w e.bkB,this.locale="en",this.styles={},this.fonts=b.Z2,this.classes=b.ry,this.placeholder=b.wE,this.paymentOptions=Z.Mp,this.destroy$=new U.B}ngOnInit(){this.styles=(0,b.no)(this.isDarkMode),this.paymentOption=Z.Mp.CARD,this.newPaymentService.initPayments(),this.newPaymentService.onApplePayCancelTriggered$.pipe((0,H.Q)(this.destroy$)).subscribe(n=>{n&&setTimeout(()=>{this.zone.run(()=>{this.changeDetector.detectChanges()})})})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onSelectPaymentOption(n){this.isCardLoading||this.newPaymentService.loadingMethod||(this.paymentOption=n)}setComponent(n){this.onSetComponentEvent.emit(n)}onTokenize(){this.onTokenizeEvent.emit({name:this.name,country:this.country})}isValidCardInput(){if(!this.country||!this.name||!this.cardComponent)return!1;for(let n of this.cardComponent.fields)if(!n.status.isValid)return!1;return!0}getCardDesc(){return this.translateService.instant("onboarding.new-payment-mobile.you-will-bew-charged-card")}hasTrial(){return this.selectedPlan&&this.selectedPlan.hasTrial()}getTrialPeriod(){return`${this.selectedPlan.trialPeriod}-${this.selectedPlan.getTrialPeriod(this.translateService)}`}onPaypal(){this.newPaymentService.onPaypalButton()}isPaymentOptionSelected(n){return this.paymentOption===n}onSelectCountry(n){this.country=n}static{this.\u0275fac=function(o){return new(o||t)(e.rXU(J),e.rXU(_.c$),e.rXU(e.gRc),e.rXU(e.SKi))}}static{this.\u0275cmp=e.VBU({type:t,selectors:[["app-new-payment-method-mobile"]],inputs:{cardComponent:"cardComponent",currency:"currency",selectedPlan:"selectedPlan",isCardLoading:"isCardLoading",showPaymentVerification:"showPaymentVerification",isDarkMode:"isDarkMode",name:"name",paypalBtnIcon:"paypalBtnIcon",cardIcon:"cardIcon",paypalIcon:"paypalIcon",applePayIcon:"applePayIcon"},outputs:{onSetComponentEvent:"onSetComponentEvent",onTokenizeEvent:"onTokenizeEvent"},standalone:!1,decls:38,vars:41,consts:[[1,"title","f-size-20","f-bold","color-text-1"],[3,"onSelect","applePay","paypal","paymentOption"],[1,"card-container"],["class","loader overlay-card-loading",3,"scale","opacity",4,"ngIf"],[1,"input-card-wrapper"],["type","text","placeholder","John Doe","name","name",1,"input-card","f-medium","f-size-16",3,"ngModelChange","ngClass","ngModel"],[1,"ex1-label","color-text-placeholder","f-medium","f-size-16"],[3,"countrySelected"],["id","card-field","cbCardField","",1,"fieldset","field",3,"ready","styles","classes","currency","placeholder","locale"],["id","number-field","cbNumberField","",1,"input-card","input-details","f-medium","f-size-16",3,"placeholder"],[1,"ex1-fields"],[1,"ex1-field"],["id","expiry-field","cbExpiryField","",1,"input-card","input-details","f-medium","f-size-16"],["for","expiry-field",1,"ex1-label","color-text-placeholder","f-medium","f-size-16"],["id","cvv-field","cbCvvField","",1,"input-card","input-details","f-medium","f-size-16"],[1,"btn-box","bkg-1"],["class","subscribe btn-secondary btn-flex f-size-14 f-medium onboarding-subscribe-btn",3,"disabled","click",4,"ngIf"],["class","payment-desc f-size-14 f-regular color-text-3",3,"innerHTML",4,"ngIf"],["class","btn btn-paypal payment-btn btn-flex",3,"disabled","click",4,"ngIf"],["class","apple-loading",4,"ngIf"],["id","apple-pay-button",1,"d-flex","justify-content-between","align-items-center",3,"click","disabled"],[1,"payment-desc","f-size-14","f-regular","color-text-3"],["class","f-size-14 f-regular color-text-3 payment-desc",4,"ngIf"],[1,"loader","overlay-card-loading",3,"scale","opacity"],[1,"subscribe","btn-secondary","btn-flex","f-size-14","f-medium","onboarding-subscribe-btn",3,"click","disabled"],[4,"ngIf"],[3,"color","opacity",4,"ngIf"],[3,"color","opacity"],[1,"payment-desc","f-size-14","f-regular","color-text-3",3,"innerHTML"],[1,"btn","btn-paypal","payment-btn","btn-flex",3,"click","disabled"],["class","ic-paypal",3,"src",4,"ngIf"],[3,"color","opacity","scale",4,"ngIf"],[1,"ic-paypal",3,"src"],[3,"color","opacity","scale"],[1,"apple-loading"],[1,"f-size-14","f-regular","color-text-3","payment-desc"]],template:function(o,i){1&o&&(e.j41(0,"div",0),e.EFF(1),e.nI1(2,"translate"),e.k0s(),e.j41(3,"app-payment-method-slider",1),e.bIt("onSelect",function(s){return i.onSelectPaymentOption(s)}
1),e.k0s(),e.j41(4,"div",2),e.DNE(5,Wt,1,2,"app-small-loader",3),e.j41(6,"div",4)(7,"input",5),e.mxI("ngModelChange",function(s){return e.DH7(i.name,s)||(i.name=s),s}),e.k0s(),e.j41(8,"label",6),e.EFF(9),e.nI1(10,"translate"),e.k0s()(),e.j41(11,"app-billing-country-dropdown",7),e.bIt("countrySelected",function(s){return i.onSelectCountry(s)}),e.k0s(),e.j41(12,"div",8),e.bIt("ready",function(s){return i.setComponent(s)}),e.j41(13,"div",4),e.nrm(14,"div",9),e.j41(15,"label",6),e.EFF(16),e.nI1(17,"translate"),e.k0s()(),e.j41(18,"div",10)(19,"div",11),e.nrm(20,"div",12),e.j41(21,"label",13),e.EFF(22),e.nI1(23,"translate"),e.k0s()(),e.j41(24,"div",11),e.nrm(25,"div",14),e.j41(26,"label",6),e.EFF(27," CVC "),e.k0s()()()()(),e.j41(28,"div",15),e.DNE(29,Qt,4,4,"button",16)(30,qt,1,1,"div",17)(31,to,3,3,"button",18)(32,oo,2,3,"div",19),e.j41(33,"button",20),e.bIt("click",function(){return i.newPaymentService.onBeginApplePay()}),e.k0s(),e.j41(34,"div",21),e.EFF(35),e.nI1(36,"translate"),e.k0s(),e.DNE(37,io,3,3,"span",22),e.k0s()),2&o&&(e.R7$(),e.SpI(" ",e.bMT(2,31,"onboarding.new-payment-mobile.title"),"\n"),e.R7$(2),e.Y8G("applePay",i.newPaymentService.applePayAvailable)("paypal",i.newPaymentService.payp
1alAvailable)("paymentOption",i.paymentOption),e.R7$(),e.AVh("card-desc",i.getCardDesc())("gone",!i.isPaymentOptionSelected(i.paymentOptions.CARD)),e.R7$(),e.Y8G("ngIf",i.isCardLoading),e.R7$(2),e.Y8G("ngClass",i.name?"val":""),e.R50("ngModel",i.name),e.R7$(2),e.SpI(" ",e.bMT(10,33,"placeholder.name-on-card")," "),e.R7$(3),e.Y8G("styles",i.styles)("classes",i.classes)("currency",i.currency)("placeholder",i.placeholder)("locale",i.locale),e.R7$(2),e.Y8G("placeholder","4111 1111 1111 1111"),e.R7$(2),e.SpI(" ",e.bMT(17,35,"placeholder.card-number")," "),e.R7$(6),e.SpI(" ",e.bMT(23,37,"placeholder.expiry")," "),e.R7$(7),e.Y8G("ngIf",i.selectedPlan&&i.isPaymentOptionSelected(i.paymentOptions.CARD)),e.R7$(),e.Y8G("ngIf",i.isPaymentOptionSelected(i.paymentOptions.CARD)&&i.getCardDesc()),e.R7$(),e.Y8G("ngIf",i.isPaymentOptionSelected(i.paymentOptions.PAYPAL)),e.R7$(),e.Y8G("ngIf","apple"===i.newPaymentService.loadingMethod&&i.isPaymentOptionSelected(i.paymentOptions.APPLE_PAY)),e.R7$(),e.AVh("gone",i.newPaymentService.loadingMethod||!i.isPaymentOptionSelected(i.paymentOptions.APPLE_PAY)),e.Y8G("disabled",i.newPaymentService.loadingMethod),e.R7$(),e.AVh("gone",i.isPaymentOptionSelected(i.paymentOptions.CARD)||i.hasTrial()),e.R7$(),e.SpI(" ",e.bMT(36,39,"onboarding.new-payment-mobile.you-will-bew-charged")," "),e.R7$(2),e.Y8G("ngIf",i.showPaymentVerification))},dependencies:[g.YU,g.bT,f.me,f.BC,f.vS,y.kC,y.V6,y.Bt,y.t3,h.M,L.I,Lt.E,j.ZP,_.D9],styles:[".title[_ngcontent-%COMP%]{margin-top:16px;margin-bottom:12px}.payment-selector[_ngcontent-%COMP%]{display:flex;height:80px;column-gap:10px;margin-bottom:11px}.payment-option[_ngcontent-%COMP%]{position:relative;flex-basis:50%;flex-grow:1;height:100%;border-radius:6px;cursor:pointer;transition:all .1s ease-in}.payment-option[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transition:all .2s ease-in}.payment-option[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{position:absolute;left:10px;bottom:10px;opacity:0;transform:translateY(100%);transition:all .2s ease-in}.payment-option.selected[_ngcontent-%COMP%]{border-width:2px;border-style:solid}.payment-option.selected[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{opacity:1;transform:translateY(0)}.payment-option.card[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{height:25.5px;width:32px}.payment-option.card.selected[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{left:10px;top:13px;height:18px;width:22px;filter:grayscale(0) brightness(1);transform:translate(0)}.payment-option.paypal[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{height:37.5px}.payment-option.paypal.selected[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{left:12px;top:10px;height:23.7px;transform:translate(0)}.payment-option.apple[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{height:24px}.payment-option.apple.selected[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{left:10px;top:13px;height:18px;transform:translate(0)}.ex1.container[_ngcontent-%COMP%]{margin:auto;padding:100px 0;min-height:100vh}.ex1-field[_ngcontent-%COMP%]{position:relative;height:60px;margin-bottom:10px}.ex1-fields[_ngcontent-%COMP%]{display:flex;margin-left:-16px}.ex1-fields[_ngcontent-%COMP%]   .ex1-field[_ngcontent-%COMP%]{flex:1;margin-left:16px}.input-card[_ngcontent-%COMP%]{margin-bottom:20px}.input-card[_ngcontent-%COMP%]:focus{border:none}.input-card[_ngcontent-%COMP%]::placeholder{color:transparent}.card-container[_ngcontent-%COMP%]{position:relative;margin-bottom:50px}.card-desc[_ngcontent-%COMP%]{margin-bottom:100px}.loader[_ngcontent-%COMP%]{position:absolute;left:0;top:0;width:100%;height:100%;z-index:2}.subscribe[_ngcontent-%COMP%]{height:50px;min-height:50px}.btn-box[_ngcontent-%COMP%]{position:fixed;bottom:0;left:0;right:0;padding:20px;min-height:85px;z-index:1}.payment-desc[_ngcontent-%COMP%]{text-align:center;margin-top:8px;margin-bottom:0}#paypal-button[_ngcontent-%COMP%]{margin-bottom:-7px}.hidden[_ngcontent-%COMP%]{height:0;opacity:0;pointer-events:none}#paypal-button.hidden[_ngcontent-%COMP%]{margin-bottom:0}.apple-loading[_ngcontent-%COMP%]{background-color:#000;border-radius:10px;height:50px}#apple-pay-button[_ngcontent-%COMP%]{display:block;background-color:#000;background-image:-webkit-named-image(apple-pay-logo-white);background-size:100% 100%;background-origin:content-box;background-repeat:no-repeat;width:100%;height:50px;min-height:50px;padding:12px 0;transition:all .5s ease-out}#apple-pay-button[_ngcontent-%COMP%]:focus{cursor:wait}#apple-pay-button[_ngcontent-%COMP%]:active{cursor:wait}.input-card-wrapper[_ngcontent-%COMP%]{position:relative}"]})}}return t})();var ro=l(4029);let so=(()=>{class t{constructor(n,o,i){this.agencyService=n,this.popupService=o,this.userService=i,this.onCloseDialogEvent=ne
1w e.bkB,this.onConfirmEvent=new e.bkB,this.faClose=P.GRI,this.faCircleExclamation=P.lEd}ngOnInit(){this.popupService.disableScroll()}onContainerClick(n){n.stopPropagation()}isMobile(){return window.innerWidth<801}ngOnDestroy(){this.popupService.enableScroll()}closeDialog(){this.mixpanelEvent("billing_yearly_close",{pk:this.userService.currentSubscription?.pk}),this.onCloseDialogEvent.emit()}cancelDialog(){this.mixpanelEvent("billing_yearly_cancel",{pk:this.userService.currentSubscription?.pk}),this.onCloseDialogEvent.emit()}confirmSelection(){this.mixpanelEvent("billing_yearly_confirm",{pk:this.userService.currentSubscription?.pk}),this.onConfirmEvent.emit()}mixpanelEvent(n,o){w.A.__loaded&&w.A.track(n,o)}static{this.\u0275fac=function(o){return new(o||t)(e.rXU(S.z),e.rXU(ro.O),e.rXU(F.D))}}static{this.\u0275cmp=e.VBU({type:t,selectors:[["app-confirm-yearly-plan-dialog"]],outputs:{onCloseDialogEvent:"onCloseDialogEvent",onConfirmEvent:"onConfirmEvent"},standalone:!1,decls:24,vars:19,consts:[[1,"overlay","show-overlay"],[1,"content__container"],[1,"content","bkg-1"],[1,"content__close",3,"click"],[1,"color-text-3","f-size-18",3,"icon"],[1,"content__wrapper"],[1,"color-text-3","content__wrapper__icon",3,"icon"],[1,"title","f-size-24","f-bold","color-text-1"],[1,"subtitle","f-size-14","f-regular","color-text-5",3,"innerHTML"],[1,"content__notice","bkg-3","color-text-3","f-size-14","f-medium"],[1,"f-size-18"],[1,"content__footer"],[1,"btn","btn-cancel","f-size-16","f-medium",3,"click"],[1,"f-size-16","f-medium","btn-primary",3,"click"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.bIt("click",function(){return i.closeDialog()}),e.nrm(4,"fa-icon",4),e.k0s(),e.j41(5,"div",5),e.nrm(6,"fa-icon",6),e.j41(7,"div",7),e.EFF(8),e.nI1(9,"translate"),e.k0s(),e.nrm(10,"div",8),e.nI1(11,"translate"),e.k0s(),e.j41(12,"div",9)(13,"span",10),e.EFF(14,"\u{1f4b0}"),e.k0s(),e.EFF(15),e.nI1(16,"translate"),e.k0s(),e.j41(17,"div",11)(18,"button",12),e.bIt("click",function(){return i.cancelDialog()}),e.EFF(19),e.nI1(20,"translate"),e.k0s(),e.j41(21,"button",13),e.bIt("click",function(){return i.confirmSelection()}),e.EFF(22),e.nI1(23,"translate"),e.k0s()()()()()),2&o&&(e.Y8G("@fadeInOut",void 0)("@overlayBkg",i.agencyService.agency.darkMode?"dark":"light"),e.R7$(4),e.Y8G("icon",i.faClose),e.R7$(2),e.Y8G("icon",i.faCircleExclamation),e.R7$(2),e.SpI(" ",e.bMT(9,9,"onboarding.select-plan.confirm-yearly.title")," "),e.R7$(2),e.Y8G("innerHTML",e.bMT(11,11,"onboarding.select-plan.confirm-yearly.description"),e.npT),e.R7$(5),e.SpI(" ",e.bMT(16,13,"onboarding.select-plan.confirm-yearly.notice")," "),e.R7$(4),e.SpI(" ",e.bMT(20,15,"onboarding.select-plan.confirm-yearly.cancel")," "),e.R7$(3),e.SpI(" ",e.bMT(23,17,"onboarding.select-plan.confirm-yearly.confirm")," "))},dependencies:[T.aY,_.D9],styles:[".overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;height:100vh;width:100vw;display:flex;justify-content:center;align-items:center;pointer-events:all;z-index:3}.content[_ngcontent-%COMP%]{display:flex;flex-flow:column;align-items:center;justify-content:center;text-align:center;position:relative;gap:1rem;width:100%;max-width:25.5rem;border-radius:.625rem;padding:1.25rem}.content__close[_ngcontent-%COMP%]{position:absolute;top:1rem;right:1rem;z-index:1;cursor:pointer}.content__footer[_ngcontent-%COMP%]{display:flex;flex-flow:row;align-items:center;gap:1rem;width:100%}.content__notice[_ngcontent-%COMP%]{width:100%;padding:.25rem;border-radius:.5rem;display:flex;justify-content:center;align-items:center;gap:.25rem}.content__wrapper[_ngcontent-%COMP%]{display:flex;flex-flow:column;align-items:center;justify-content:center;text-align:center;gap:.25rem}.content__wrapper__icon[_ngcontent-%COMP%]{font-size:2rem}@media only screen and (min-width: 1024px){.content__wrapper__icon[_ngcontent-%COMP%]{font-size:3rem}}.content__container[_ngcontent-%COMP%]{display:flex;flex-flow:column;align-items:center;justify-content:center;text-align:center;width:100%;height:100%;position:absolute;left:0;top:0}.show-overlay[_ngcontent-%COMP%]{background:#00000080}.btn-grey[_ngcontent-%COMP%]{background:#526c79;transition:all .3s ease;color:#fff}.btn-grey[_ngcontent-%COMP%]:hover{background:#485e6a}button[_ngcontent-%COMP%]{height:2.75rem;min-height:2.75rem}"],data:{animation:[k.Ws,k.r5]}})}}return t})();var lo=l(1808),co=l(7316),po=l(6938),mo=l(4676);const go=[{path:"",children:[{path:"plan",component:M},{path:"billing",component:M},{path:"billing-address",component:M}]}];let _o=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275mod=e.$C({type:t})}static{this.\u0275inj=e.G2t({imports:[g.MD,Q.G,q.x,A.iI.forChild(go),A.iI]})}}return t})();e.wjB(M,function(){return[g.Sq,g.bT,f.me,f.BC,f.vS,G.DM,T.aY,h.M,lo.g,co.a,po.X,X.I,mo.T,j.ZP,En,jn,V,St,Et,Xt,ao,so,N,D]},function(){return[_.D9]}),e.wjB(V,function(){return[g.Sq,g.bT,h.M,z.T,Qn,D]},function(){return[_.D9]})}}]);

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.