1"use strict";(self.webpackChunkflosports_webapp=self.webpackChunkflosports_webapp||[]).push([[4102],{64102:(N,U,n)=>{n.r(U),n.d(U,{RedeemModule:()=>H});var R=n(99286),g=n(47951),j=n(94179),O=n(26520),e=n(94650);let P=(()=>{class t{constructor(o){this.router=o}}return t.\u0275fac=function(o){return new(o||t)(e.\u0275\u0275directiveInject(O.Router))},t.\u0275cmp=e.\u0275\u0275defineComponent({type:t,selectors:[["flo-redeem"]],decls:4,vars:0,consts:[[1,"container"],[1,"redeem-main"]],template:function(o,h){1&o&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",0)(2,"div",1),e.\u0275\u0275element(3,"router-outlet"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementContainerEnd())},dependencies:[O.RouterOutlet],styles:[".container[_ngcontent-%COMP%]{background:#f5f5f7;text-align:center;min-height:100vh}.container[_ngcontent-%COMP%] div.redeem-main[_ngcontent-%COMP%]{padding-top:60px}"],changeDetection:0}),t})();var K=n(67112);let f=(()=>{class t{constructor(){this.message="Thank you for redeeming your O'Malley Settlement Voucher! Choose your sport below (you may have to log in again)"}}return t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=e.\u0275\u0275defineComponent({type:t,selectors:[["flo-redeem-thank-you"]],decls:5,vars:2,consts:[[1,"py-5"],[3,"directNavigation"]],template:function(o,h){1&o&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",0)(2,"p"),e.\u0275\u0275text(3),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(4,"flo-choose-sport",1),e.\u0275\u0275elementContainerEnd()),2&o&&(e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(h.message),e.\u0275\u0275advance(1),e.\u0275\u0275property("directNavigation",!0))},dependencies:[K.b],encapsulation:2,changeDetection:0}),t})();var C=n(95698),b=n(18505),I=n(63900),L=n(4707),B=n(37548),E=n(5201),A=n(62843),_=n(70262),$=n(39646),D=n(54004),W=n(91954),k=n(93081),w=n(60872);let T=(()=>{class t{constructor(o,h,a){this.offersService=o,this.paymentsService=h,this.logger=a,this.monthlyOffer$=this.offersService.offers$.pipe((0,D.U)(x=>x.find(F=>"month"===F.offerMetadata?.period)),(0,C.q)(1))}validateAndRedeem(o,h){return o&&o.email?this.paymentsService.checkOMalleyEligibility(o.email).pipe((0,I.w)(a=>a.eligible?this.monthlyOffer$:(0,A._)(()=>a)),(0,I.w)(a=>this.paymentsService.createSubscription(a,void 0,h,!0)),(0,D.U)(a=>{if(void 0!==a&&a.status)return{user:o,subscription:a}}),(0,_.K)(a=>"User not authenticated"===a?(0,$.of)(void 0):a.message&&404===a.statusCode?(0,$.of)({user:o,subscription:a}):(this.logger.error("Error redeeming OMalley subscription",a),(0,$.of)(void 0)))):(0,A._)(()=>new Error("User not authenticated"))}}return t.\u0275fac=function(o){return new(o||t)(e.\u0275\u0275inject(k.b),e.\u0275\u0275inject(w.c),e.\u0275\u0275inject(W.te))},t.\u0275prov=e.\u0275\u0275defineInjectable({token:t,factory:t.\u0275fac}),t})();var G=n(88384),M=n(36895),V=n(39137),i=n(24118);function r(t,m){1&t&&e.\u0275\u0275element(0,"p",2),2&t&&e.\u0275\u0275property("innerHTML",m.ngIf,e.\u0275\u0275sanitizeHtml)}const c=function(){return["/login"]},s=function(){return{redirect:"/redeem/omalley"}};function l(t,m){if(1&t){const o=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"h1",3),e.\u0275\u0275text(1,"Sign up below to redeem your O'Malley Settlement Voucher"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(2,"p",4),e.\u0275\u0275text(3,"Only eligible users can proceed."),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",5)(5,"div",6)(6,"flo-email-signup",7),e.\u0275\u0275listener("emailSignupSuccess",function(a){e.\u0275\u0275restoreView(o);const x=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(x.handleSignupSuccess(a))}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"div",8)(8,"p",9),e.\u0275\u0275text(9,"Already have an account? "),e.\u0275\u0275elementStart(10,"a",10),e.\u0275\u0275text(11,"Log In"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(12,"div",11)(13,"p",12),e.\u0275\u0275text(14,' By clicking "Redeem" you are agreeing to our '),e.\u0275\u0275elementStart(15,"a",13),e.\u0275\u0275text(16,"Terms of Service "),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(17," and "),e.\u0275\u0275elementStart(18,"a",14),e.\u0275\u0275text(19,"Privacy Policy"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(20,". "),e.\u0275\u0275elementEnd()()()()}2&t&&(e.\u0275\u0275advance(6),e.\u0275\u0275property("buttonText","Redeem"),e.\u0275\u0275advance(4),e.\u0275\u0275property("routerLink",e.\u0275\u0275pureFunction0(3,c))("queryParams",e.\u0275\u0275pureFunction0(4,s)))}let v=(()=>{class t{constructor(o,h,a,x){this.checkoutNavService=o,this.authService=h,this.redeemOMalleyService=a,this.recaptchaV3Service=x,this.errorMessage$=new L.t(1),this.userIdentity$=this.authService.userIdentity$.pipe((0,C.q)(1),(0,b.b)(F=>{F&&(this.errorMessage$.next("Validating O'Malley Settlement Voucher, please wait..."),this.handleSignupSuccess(F))}
1)).subscribe()}handleSignupSuccess(o){this.recaptchaV3Service.execute("purchase").pipe((0,I.w)(h=>this.redeemOMalleyService.validateAndRedeem(o,h)),(0,b.b)(h=>{404===h?.subscription.statusCode?this.errorMessage$.next(`Email ${o.analyticsData.email} is not eligible for the O'Malley Settlement Voucher. <br><a href='/plans'>Go to Plans to select a FloSports subscription</a>`):this.checkoutNavService.navigateToFinalDestination({redirect:"/redeem/thank-you"})}),(0,C.q)(1)).subscribe()}}return t.\u0275fac=function(o){return new(o||t)(e.\u0275\u0275directiveInject(B.V),e.\u0275\u0275directiveInject(E.e),e.\u0275\u0275directiveInject(T),e.\u0275\u0275directiveInject(G.YC))},t.\u0275cmp=e.\u0275\u0275defineComponent({type:t,selectors:[["flo-redeem-omalley-form"]],decls:4,vars:4,consts:[["class","error-box py-6",3,"innerHTML",4,"ngIf","ngIfElse"],["signupForm",""],[1,"error-box","py-6",3,"innerHTML"],[1,"funnel-title"],[1,"activation-code-message","flo-footnote"],[1,"main-content"],[1,"funnel-form-section","mt-5"],[3,"buttonText","emailSignupSuccess"],[1,"funnel-form-footnotes"],[1,"funnel-form-footnote","flo-footnote"],["floAnalytics","","queryParamsHandling","merge","routerLinkActive","active","name","Go To Login",1,"text-900","text-decoration-underline","hover-grey-500",3,"routerLink","queryParams"],[1,"funnel-form-footnotes","mt-5"],[1,"funnel-form-footnote","funnel-form-legal-text","flo-footnote"],["floAnalytics","","name","Terms of Service","href","https://www.flosports.tv/terms-of-service/","target","_blank","rel","noopener","tabindex","-1"],["floAnalytics","","name","Privacy Policy","target","_blank","rel","noopener","href","http://www.flosports.tv/privacy/","tabindex","-1"]],template:function(o,h){if(1&o&&(e.\u0275\u0275template(0,r,1,1,"p",0),e.\u0275\u0275pipe(1,"async"),e.\u0275\u0275template(2,l,21,5,"ng-template",null,1,e.\u0275\u0275templateRefExtractor)),2&o){const a=e.\u0275\u0275reference(3);e.\u0275\u0275property("ngIf",e.\u0275\u0275pipeBind1(1,2,h.errorMessage$))("ngIfElse",a)}},dependencies:[M.O5,V.v,O.RouterLinkWithHref,O.RouterLinkActive,i.H,M.Ov],encapsulation:2,changeDetection:0}),t})();var p=n(98351),u=n(14814);let d=(()=>{class t{constructor(o,h,a){this.authService=o,this.verticalService=h,this.router=a}canActivate(o,h){return this.verticalService.siteId$.pipe((0,I.w)(a=>this.authService.hasAccess({id:a,premium:!0},p._g.Site)),(0,D.U)(a=>(a&&this.router.navigate(["/"]),!a)))}}return t.\u0275fac=function(o){return new(o||t)(e.\u0275\u0275inject(E.e),e.\u0275\u0275inject(u.A),e.\u0275\u0275inject(O.Router))},t.\u0275prov=e.\u0275\u0275defineInjectable({token:t,factory:t.\u0275fac}),t})(),S=(()=>{class t{constructor(o,h,a){this.paymentsService=o,this.authService=h,this.router=a}canActivate(o,h){return this.authService.userIdentity$.pipe((0,I.w)(a=>a&&a.email?this.paymentsService.checkOMalleyEligibility(a.email):(0,A._)(()=>new Error("User not authenticated"))),(0,D.U)(a=>!!a.message.toLowerCase().includes("email has already redeemed".toLowerCase())||(a.message.includes("continue through the signup process")&&this.router.navigate(["redeem/omalley"]),!1)),(0,_.K)(a=>(this.router.navigate(["redeem/omalley"]),(0,$.of)(!1))))}}return t.\u0275fac=function(o){return new(o||t)(e.\u0275\u0275inject(w.c),e.\u0275\u0275inject(E.e),e.\u0275\u0275inject(O.Router))},t.\u0275prov=e.\u0275\u0275defineInjectable({token:t,factory:t.\u0275fac}),t})(),y=(()=>{class t{}return t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=e.\u0275\u0275defineNgModule({type:t}),t.\u0275inj=e.\u0275\u0275defineInjector({imports:[O.RouterModule.forChild([{path:"",component:P,data:{shouldShowEventTicker:!1},children:[{path:"omalley",component:v,canActivate:[d],data:{shouldShowEventTicker:!1}},{path:"thank-you",component:f,canActivate:[S],data:{shouldShowEventTicker:!1}}]}])]}),t})();var Y=n(92767);let H=(()=>{class t{}return t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=e.\u0275\u0275defineNgModule({type:t}),t.\u0275inj=e.\u0275\u0275defineInjector({providers:[d,S,T],imports:[R.m8,g.F,y,j.CreateAccountModule,Y.B]}),t})()},60872:(N,U,n)=>{n.d(U,{Y:()=>T,c:()=>G});var R=n(80529),g=n(39646),j=n(39300),O=n(39841),e=n(63900),P=n(54004),K=n(34782),f=n(70262),C=n(18505),b=n(91954),I=n(7069),L=n(98878),B=n(1390),E=n(94650),A=n(50245),_=n(5201),$=n(57042),D=n(37038),W=n(14814),k=n(42338),w=n(46435),T=(()=>{return(M=T||(T={})).GooglePay="google_pay",M.ApplePay="apple_pay",M.Default="card",T;var M})();let G=(()=>{class M{constructor(i,r,c,s,l,v,p,u,d){this.http=i,this.environmentService=r,this.authService=c,this.cookieService=s,this.couponService=l,this.verticalService=v,this.impactService=p,this.locationService=u,this.logger=
1d,this.activeOffering$=this.authService.userIdentity$.pipe((0,e.w)(S=>S?this.getUserSubscriptions(!1,S.id).pipe((0,j.h)(I.bb),(0,P.U)(y=>{if(y&&y[0]){if(y[0].status===L.ux.Active&&y[0].offers)return y[0].offers[0];if(y[0].status===L.ux.Cancelled&&(0,B.Z)(new Date(y[0].accessEndDate),Date.now()))return y[0].offers[0]}}),(0,K.d)(1)):(0,g.of)(null))),this.activeSubscription$=this.authService.userIdentity$.pipe((0,e.w)(S=>S?this.getUserSubscriptions(!0,S.id).pipe((0,j.h)(I.bb),(0,P.U)(y=>y[0]),(0,K.d)(1)):(0,g.of)(null)))}getImpactClickId(){return this.impactService.getClickId()}previewSubscription(i,r,c){return this.http.post(`${this.environmentService.config.endpoints.payments}/subscriptions/${i.id}/preview`,{offeringIds:[r.id],coupon:c}).pipe((0,f.K)(l=>(this.logger.error("Error accessing Payments Service",{error:l}),(0,g.of)(void 0))))}createPaymentIntent(i,r,c,s){return this.http.post(`${this.environmentService.config.endpoints.payments}/payment-intents`,{offer:i?.id,captcha:r,coupon:c,email:s}).pipe((0,f.K)(v=>{throw 403!==v.status&&401!==v.status&&this.logger.error("Error creating payment intent",{error:v}),new Error(v.message)}))}claimGiftSubscription(i,r){return this.http.post(`${this.environmentService.config.endpoints.payments}/pending-subscriptions/${i}/claim`,{captcha:r}).pipe((0,f.K)(l=>(this.logger.error("An error occurred when claiming a gifted subscription",{error:l}),(0,g.of)(void 0))))}createGiftSubscription(i,r,c,s){return this.http.post(`${this.environmentService.config.endpoints.payments}/pending-subscriptions`,{type:"stripe",offering:i.id,email:c,currency:i?.offerMetadata?.currency,paymentIntent:r,captcha:s}).pipe((0,f.K)(p=>{if(p&&p.message&&this.logger.error("Payment failure",{error:p}),p instanceof R.UA&&400===p.status)return(0,g.of)(p.error.errors.message?p.error.errors.message:{message:"An error occurred while processing your payment. You were not charged. Please try again or contact support."});if(p instanceof R.UA&&500===p.status)throw{...p,message:"An error occurred while processing your payment. You were not charged. Please try again or contact support."};return(0,g.of)(void 0)}))}createSubscription(i,r,c,s=!1,l){const v=this.authService.getUserFromStoredToken(),p=this.impactService.getClickId();return(0,O.a)([this.couponService.coupon$,this.verticalService.siteId$]).pipe((0,e.w)(([u,d])=>{const S=`${this.environmentService.config.endpoints.payments}/subscriptions`,y={type:"stripe",offering:i?.id,user:Number(v?.id),coupon:u?u.id:"",currency:i?.offerMetadata?.currency,extraMetadata:{isInstallment:i?.offerMetadata?.isInstallment,installmentPlanDuration:i?.offerMetadata?.isInstallment?12:void 0,siteId:d,impact_click_id:p},captcha:c,paymentIntent:r,isOmalley:!!s||void 0,freeTrialDays:s?30:void 0,promoGift:l};return this.http.post(S,y)}),(0,C.b)(u=>{this.impactService.setCustomerInfo(u.customerId,v?.email??""),this.cookieService.set("subscription_start_date",u.createdAt),this.authService.userIdentitySource.next(v),this.couponService.clearCoupon()}),(0,f.K)(u=>{if(u&&u.message&&this.logger.error(u.message,u.error),u instanceof R.UA&&400===u.status)return(0,g.of)(u.error.errors.message);if(u instanceof R.UA){if(500===u.status)throw{...u,message:"An error occurred while processing your payment. You were not charged. Please try again or contact support."};let d=u.error.message;if(!d.includes("contact your bank")&&!d.includes("insufficient funds")){const S="If you are certain you have entered the correct information for an unexpired card with sufficient funds, please reach out to your bank or contact support.";d=d.includes(".")?d.concat(` ${S}`):d.concat(`. ${S}`)}throw{...u,message:d}}return(0,g.of)(void 0)}))}createStripeTaxSubscription(i,r,c,s,l,v){const p=this.authService.getUserFromStoredToken(),u=this.impactService.getClickId();return this.verticalService.siteId$.pipe((0,e.w)(d=>{const S=`${this.environmentService.config.endpoints.payments}/subscriptions`,y={type:"stripe-tax",offering:i?.id,user:Number(p?.id),coupon:s,currency:i?.offerMetadata?.currency,extraMetadata:{siteId:d,impact_click_id:u},captcha:c??"",paymentMethodId:r,email:l,promoGift:v};return this.http.post(S,y)}),(0,C.b)(()=>{p&&this.impactService.setCustomerInfo(p.id,p.email??""),this.authService.userIdentitySource.next(p)}),(0,f.K)(d=>{throw 403!==d.status&&401!==d.status&&this.logger.error("Error creating subscription",{error:d}),d}))}createCheckoutSession(i,r,c){return this.verticalService.siteId$.pipe((0,e.w)(s=>this.http.post(`${this.environmentService.config.endpoints.payments}/checkout-sessions`,{offering:i?.id,coupon:c,captcha:r,siteId:s,uiMode:"custom",returnUrl:`${this.locationService.location}/pay`})),(0,f.K)(s=>{throw 403!==s.status&&401!==s.status&&this.logger.error("Error creating checkout session",{error:s}),s}))}verifyCheckoutSession(i){const r=`${this.environmentService.config.endpoints.payments}/checkout-sessions/${encodeURIComponent(i)}/verify`,c=this.authService.getUserFromStoredToken();return this.http.post(r,{}).pipe((0,C.b)(s=>{"complete"===s.status&&(c&&this.impactService.setCustomerInfo(c.id,c.email??""),this.authService.userIdentitySource.next(c),this.couponService.clearCoupon())}),(0,f.K)(s=>{throw 403!==s.status&&401!==s.status&&this.logger.error("Error verifying checkout session",{error:s}),s}))}getUserSubscriptions(i,r){return this.http.get(`${this.environmentService.config.endpoints.payments}/users/${r}/subscriptions`,{params:{onlyActive:i}}).pipe((0,f.K)(s=>(this.logger.error("Error fetching user active subscriptions",{error:s}),(0,g.of)(void 0))))}upgradeSubscription(i,r,c){const s=`${this.environmentService.config.endpoints.payments}/subscriptions/${i.id}`,l=this.authService.getUserFromStoredToken();return this.http.post(s,{offeringIds:[r.id],coupon:c}).pipe((0,C.b)(()=>{this.authService.userIdentitySource.next(l)}
1),(0,f.K)(v=>(this.logger.error("Error accessing Payments Service",{error:v}),(0,g.of)(void 0))))}cancelSubscription(i){return this.http.delete(`${this.environmentService.config.endpoints.payments}/subscriptions/${i}`).pipe((0,f.K)(r=>(404!==r.status&&this.logger.error(`Error cancelling subscriptionId: ${i}`,{error:r}),(0,g.of)([]))))}pauseSubscription(i,r){return this.http.patch(`${this.environmentService.config.endpoints.payments}/subscriptions/${i}/pause`,r).pipe((0,f.K)(c=>{throw 404!==c.status&&this.logger.error(`Error pausing subscriptionId: ${i}`,{error:c}),c}))}applyCoupon(i,r,c,s){return this.http.post(`${this.environmentService.config.endpoints.payments}/subscriptions/${i}`,{offeringIds:[r],coupon:s},{params:{spac:c}}).pipe((0,f.K)(l=>(404!==l.status&&this.logger.error(`Error applying coupon for churn prevention. subscriptionId: ${i}`,{error:l}),(0,g.of)("There was an error with the server"))))}reactivateSubscription(i){return this.http.patch(`${this.environmentService.config.endpoints.payments}/subscriptions/${i}/revert-cancellation`,{}).pipe((0,f.K)(c=>{const s=c.error;return(0,g.of)({error:s,message:s&&s.message||"There was an error with the server."})}))}updateCard(i){return this.http.patch(`${this.environmentService.config.endpoints.payments}/stripe/card`,{token:i}).pipe((0,P.U)(()=>{}),(0,f.K)(r=>{throw this.logger.error("Error updating credit card",{error:r}),r}))}createCardUpdateIntent(){return this.http.post(`${this.environmentService.config.endpoints.payments}/stripe/card/intent`,{}).pipe((0,f.K)(r=>{throw 403!==r.status&&401!==r.status&&this.logger.error("Error creating card update intent",{error:r}),r}))}updateCardPaymentMethod(i){return this.http.patch(`${this.environmentService.config.endpoints.payments}/stripe/card`,{paymentMethod:i}).pipe((0,P.U)(()=>{}),(0,f.K)(r=>{throw this.logger.error("Error updating card payment method",{error:r}),r}))}checkOMalleyEligibility(i){return this.http.get(`${this.environmentService.config.endpoints.payments}/users/omalley-beneficiary/${encodeURIComponent(i)}`).pipe((0,P.U)(r=>r),(0,f.K)(r=>r.status<500&&404===r.status&&404===r.error.statusCode?(0,g.of)(r.error):(this.logger.info("Error checking OMalley eligibility",{error:r}),(0,g.of)({message:"An error occurred while checking OMalley eligibility",eligible:!1,statusCode:500}))))}}return M.\u0275fac=function(i){return new(i||M)(E.\u0275\u0275inject(R.eN),E.\u0275\u0275inject(A.L),E.\u0275\u0275inject(_.e),E.\u0275\u0275inject($.N),E.\u0275\u0275inject(D.jb),E.\u0275\u0275inject(W.A),E.\u0275\u0275inject(k.E),E.\u0275\u0275inject(w.a),E.\u0275\u0275inject(b.te))},M.\u0275prov=E.\u0275\u0275defineInjectable({token:M,factory:M.\u0275fac,providedIn:"root"}),M})()}}]);
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.