1"use strict";(self.webpackChunkbritbox=self.webpackChunkbritbox||[]).push([[5529],{75529(o,n,l){l.r(n);var e=l(89379),i=l(80296),t=l(9950),a=l(93047),d=l(17411),r=l(10853),s=l(99628),c=l(76325),u=(l(77607),l(44414));const v=o=>{var n,l,v,f;const C=(0,t.useState)({heading:null,description:null}),p=(0,i.A)(C,2),m=p[0],g=p[1],h=(0,t.useState)(null),y=(0,i.A)(h,2),b=y[0],D=y[1],O=null===o||void 0===o||null===(n=o.cmsTrans)||void 0===n?void 0:n.britboxsharedimageassets;(0,t.useEffect)(()=>{var n,l,e,i,t,a,d,s,c,u,v,f,C,p,m,g,h,y,b,D;if((!sessionStorage.cpCustomerID||"undefined"===sessionStorage.cpCustomerID)&&!(0,r.Ri)("getAccessToken"))return(0,r.qb)("CustomerID and token empty","https://www.britbox.com/",!0);(0,r.XW)("Cancel Subscription","cancellationOfferPageLoad ",{dataLayer:{event:"ev.load",key:"cancellationOfferPageLoad",pageTitle:"Subscription Cancellation Offer",userStatus:null!==(n=sessionStorage)&&void 0!==n&&n.currentSubscriptionStatus?null===(l=sessionStorage)||void 0===l?void 0:l.currentSubscriptionStatus:null===o||void 0===o||null===(e=o.location)||void 0===e||null===(i=e.state)||void 0===i?void 0:i.subscriptionStatus,promoCode:null!==o&&void 0!==o&&null!==(t=o.location)&&void 0!==t&&null!==(a=t.state)&&void 0!==a&&a.retentionPromotion&&(null===o||void 0===o||null===(d=o.location)||void 0===d||null===(s=d.state)||void 0===s||null===(c=s.retentionPromotion)||void 0===c?void 0:c.length)>0?null===o||void 0===o||null===(u=o.location)||void 0===u||null===(v=u.state)||void 0===v||null===(f=v.retentionPromotion[0])||void 0===f?void 0:f.promotionID:null===o||void 0===o||null===(C=o.location)||void 0===C||null===(p=C.state)||void 0===p||null===(m=p.getCancelPromotionsResp)||void 0===m||null===(g=m.promotionsResponseMessage[0])||void 0===g?void 0:g.promotionID,productID:(null===o||void 0===o||null===(h=o.location)||void 0===h||null===(y=h.state)||void 0===y?void 0:y.serviceID)||"",billingPeriodType:(null===o||void 0===o||null===(b=o.location)||void 0===b||null===(D=b.state)||void 0===D?void 0:D.billingPeriodType)||""}})},[]),(0,t.useEffect)(()=>{var n,l,i,t,a,d,s,c,u,v,f,C,p,m,h,y,b,D,O;(0,r.hM)({pageName:"Cancellation Offer",event:"onLoad : Customer Landed on Cancellation Offer Page",action:"Cancellation Journey Step 4",country:null===o||void 0===o?void 0:o.getUserGeoCountry});const S=null===o||void 0===o||null===(n=o.location)||void 0===n||null===(l=n.state)||void 0===l?void 0:l.isCustomerInFreeTrail,P=null===o||void 0===o||null===(i=o.location)||void 0===i||null===(t=i.state)||void 0===t?void 0:t.retentionPromotion,x=P&&(null===P||void 0===P?void 0:P.length)>0,I=x&&(null===P||void 0===P||null===(a=P[0])||void 0===a?void 0:a.promotionID)===(null===o||void 0===o||null===(d=o.location)||void 0===d||null===(s=d.state)||void 0===s||null===(c=s.getCancelPromotionsResp)||void 0===c||null===(u=c.promotionsResponseMessage[0])||void 0===u?void 0:u.promotionID),k={Monthly:S?null===o||void 0===o||null===(v=o.CancellationOfferData)||void 0===v?void 0:v.retentionMonthlyCopy:null===o||void 0===o||null===(f=o.CancellationOfferData)||void 0===f?void 0:f.heading,Annual:S?null===o||void 0===o||null===(C=o.CancellationOfferData)||void 0===C?void 0:C.heading:null===o||void 0===o||null===(p=o.CancellationOfferData)||void 0===p?void 0:p.retentionAnnualCopy,Premier:null===o||void 0===o||null===(m=o.CancellationOfferData)||void 0===m?void 0:m.retentionPremierCopy},A={Monthly:S?null===o||void 0===o||null===(h=o.CancellationOfferData)||void 0===h?void 0:h.retentionMonthlySubCopy:null===o||void 0===o||null===(y=o.CancellationOfferData)||void 0===y?void 0:y.offerDescription,Annual:S?null===o||void 0===o||null===(b=o.CancellationOfferData)||void 0===b?void 0:b.offerDescription:null===o||void 0===o||null===(D=o.CancellationOfferData)||void 0===D?void 0:D.retentionAnnualSubCopy,Premier:null===o||void 0===o||null===(O=o.CancellationOfferData)||void 0===O?void 0:O.retentionPremierSubCopy};g(n=>{var l,i,t,a,d,r,s,c,u,v,f,C;return(0,e.A)((0,e.A)({},n),{},{heading:x?I?null===o||void 0===o||null===(l=o.CancellationOfferData)||void 0===l?void 0:l.heading:null===o||void 0===o||null===(i=o.CancellationOfferData)||void 0===i?void 0:i.headingForVarient:k[null===o||void 0===o||null===(t=o.location)||void 0===t||null===(a=t.state)||void 0===a||null===(d=a.getCancelPromotionsResp)||void 0===d||null===(r=d.promotionsResponseMessage[0])||void 0===r?void 0:r.product],description:x?I?null===o||void 0===o||null===(s=o.CancellationOfferData)||void 0===s?void 0:s.offerDescription:null===o||void 0===o||null===(c=o.CancellationOfferData)||void 0===c?void 0:c.offerDescriptionForVarient:A[
1null===o||void 0===o||null===(u=o.location)||void 0===u||null===(v=u.state)||void 0===v||null===(f=v.getCancelPromotionsResp)||void 0===f||null===(C=f.promotionsResponseMessage[0])||void 0===C?void 0:C.product]})})},[null===o||void 0===o?void 0:o.CancellationOfferData]);return(0,u.jsx)(t.Fragment,{children:0!==(null===(l=Object.keys(null===o||void 0===o?void 0:o.cmsTrans))||void 0===l?void 0:l.length)&&(null===o||void 0===o?void 0:o.CancellationOfferData.cancelCta)&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(s.d,(0,e.A)((0,e.A)({},o),{},{pageHeaderMenu:o.headerMenu})),(0,u.jsx)("div",{className:"cancelsubs-bg",children:(0,u.jsxs)("div",{className:"account-page cancelsubscription-page",children:[(0,u.jsx)("div",{className:"page-title-back",children:(0,u.jsxs)(a.N_,{to:"/accountdetails/profile"+window.location.search,children:[(0,u.jsx)("img",{src:"".concat("https://prod-dotcms.evergent.com/dA/").concat(null===O||void 0===O?void 0:O.backNavIcon),alt:"Back nav icon"}),null===o||void 0===o||null===(v=o.CancellationOfferData)||void 0===v?void 0:v.backNavLabel]})}),(0,u.jsxs)("div",{className:"form",children:[b&&(0,u.jsxs)("div",{className:"error-container",children:[(0,u.jsx)("h3",{children:"Error"}),(0,u.jsx)("span",{children:b})]}),(0,u.jsxs)("div",{className:"mb-16",children:[(0,u.jsx)("img",{src:"".concat("https://prod-dotcms.evergent.com/dA/").concat(null===o||void 0===o||null===(f=o.CancellationOfferData)||void 0===f?void 0:f.offerIcon),alt:"AcceptOffer",className:"offerIcon"}),(0,u.jsx)("h1",{children:null!==m&&void 0!==m&&m.heading?null===m||void 0===m?void 0:m.heading:""}),(0,u.jsx)("p",{children:null===o||void 0===o?void 0:o.CancellationOfferData.copy}),(0,u.jsx)("p",{dangerouslySetInnerHTML:{__html:null!==m&&void 0!==m&&m.description?null===m||void 0===m?void 0:m.description:""}})]}),(0,u.jsxs)("div",{className:"button-container",children:[(0,u.jsx)("button",{className:"button",onClick:()=>(async()=>{var n,l,i,t,a,s,c,u,v,f,C,p,m,g,h,y;(0,r.XW)("Cancellation Offer","dismissCancellation",{dataLayer:{event:"ev.click",key:"dismissCancellation",pageTitle:"Subscription Cancellation Offer",userStatus:null!==(n=sessionStorage)&&void 0!==n&&n.currentSubscriptionStatus?null===(l=sessionStorage)||void 0===l?void 0:l.currentSubscriptionStatus:null===o||void 0===o||null===(i=o.location)||void 0===i||null===(t=i.state)||void 0===t?void 0:t.subscriptionStatus,promoCode:null===o||void 0===o||null===(a=o.location)||void 0===a||null===(s=a.state)||void 0===s?void 0:s.promotionId,productID:(null===o||void 0===o||null===(c=o.location)||void 0===c||null===(u=c.state)||void 0===u?void 0:u.serviceID)||"",billingPeriodType:(null===o||void 0===o||null===(v=o.location)||void 0===v||null===(f=v.state)||void 0===f?void 0:f.billingPeriodType)||""}}),(0,r.hM)({pageName:"Cancellation Offer",event:"onClick : Customer Dismissed Cancellation",action:"Customer Cancellation Agreed To Apply Retention Offer",country:null===o||void 0===o?void 0:o.getUserGeoCountry});const b={req_data:{countryId:null!==o&&void 0!==o&&null!==(C=o.location)&&void 0!==C&&null!==(p=C.state)&&void 0!==p&&p.customerPaymentCountry?null===o||void 0===o||null===(m=o.location)||void 0===m||null===(g=m.state)||void 0===g?void 0:g.customerPaymentCountry:null===o||void 0===o?void 0:o.getUserGeoCountry,promoCode:null===o||void 0===o||null===(h=o.location)||void 0===h||null===(y=h.state)||void 0===y?void 0:y.promotionID},url:"addOPPromotion"},O=await d.t.fetchtoNode(b.url,b);var S;"1"===(null===O||void 0===O?void 0:O.responseCode)?((0,r.hM)({pageName:"Cancellation Offer",event:"onClick : Customer Dismissed Cancellation",action:"Redirecting",redirectURL:"/cancellationofferconfirmed",country:null===o||void 0===o?void 0:o.getUserGeoCountry}),o.history.push({pathname:"/cancellationofferconfirmed",search:window.location.search,state:(0,e.A)({},null===o||void 0===o||null===(S=o.location)||void 0===S?void 0:S.state)})):"0"===(null===O||void 0===O?void 0:O.responseCode)?(D(()=>(0,r.vH)("eV2434")),(0,r.hM)({pageName:"Cancellation Offer",event:"onClick : Customer Dismissed Cancellation",flow:"Retention Offer Not Aplied",errorMessage:"Retention Offer API Failed ".concat(O),country:null===o||void 0===o?void 0:o.getUserGeoCountry})):(D(()=>(0,r.vH)("eV2434")),(0,r.hM)({pageName:"Cancellation Offer",event:"onClick : Customer Dismissed Cancellation",flow:"Retention Offer Not Aplied",errorMessage:"Retention Offer API Failed",country:null===o||void 0===o?void 0:o.getUserGeoCountry}))})(),children:null===o||void 0===o?void 0:o.CancellationOfferData.confirmCta}),(0,u.jsx)("button",{className:"button button-light",onClick:()=>(async()=>{var n,l,i,t,a,d,s,c,u,v,f,C,p,m,g,h,y;(0,r.XW)("Cancellation Offer","confirmCancellation",{dataLayer:{event:"ev.click",key:"confirmCancellation",pageTitle:"Subscription Cancellation Offer",userStatus:null!==(n=sessionStorage)&&void 0!==n&&n.currentSubscriptionStatus?null===(l=sessionStorage)||void 0===l?void 0:l.currentSubscriptionStatus:null===o||void 0===o||null===(i=o.location)||void 0===i||null===(t=i.state)||void 0===t?void 0:t.subscriptionStatus,cancellationReason:null===o||void 0===o||null===(a=o.location)||void 0===a||null===(d=a.state)||void 0===d?void 0:d.finalReasonDescription,promoCode:null===o||void 0===o||null===(s=o.location)||void 0===s||null===(c=s.state)||void 0===c?void 0:c.promotionId,productID:(null===o||void 0===o||null===(u=o.location)||void 0===u||null===(v=u.state)||void 0===v?void 0:v.serviceID)||"",billingPeriodType:(null===o||void 0===o||null===(f=o.location)||void 0===f||null===(C=f.state)||void 0===C?void 0:C.billingPeriodType)||""}});const b=null!==o&&void 0!==o&&null!==(p=o.location)&&void 0!==p&&null!==(m=p.state)&&void 0!==m&&m.customerPaymentCountry?null===o||void 0===o||null===(g=o.location)||void 0===g||null===(h=g.state)||void 0===h?void 0:h.customerPaymentCountry:null===o||void 0===o?void 0:o.getUserGeoCountry,O=await(0,r.c8)(null===o||void 0===o||null===(y=o.location)||void 0===y?void 0:y.state,b);var S;"1"===(null===O||void 0===O?void 0:O.responseCode)?((0,r.hM)({pageName:"Cancellation Offer",event:"onClick : Customer Proceeded With Cancellation",action:"Redirecting",redirectURL:"/cancellationsubscriptionconfirmed",country:null===o||void 0===o?void 0:o.getUserGeoCountry}),o.history.push({pathname:"/cancellationsubscriptionconfirmed",search:window.location.search,state:(0,e.A)({},null===o||void 0===o||null===(S=o.location)||void 0===S?void 0:S.state)})):"0"===(null===O||void 0===O?void 0:O.responseCode)?(D(()=>(0,r.vH)("eV2434")),(0,r.hM)({pageName:"Cancellation Offer",event:"onClick : Customer Proceeded With Cancellation",action:"Customer Cancellation Falied",errorMessage:"Cancel Service API Failed : ".concat(O),country:null===o||void 0===o?void 0:o.getUserGeoCountry})):(D(()=>(0,r.vH)("eV2434")),(0,r.hM)({pageName:"Cancellation Offer",event:"onClick : Customer Proceeded With Cancellation",action:"Customer Cancellation Falied",errorMessage:"Cancel Service API Failed",country:null===o||void 0===o?void 0:o.getUserGeoCountry}))})(),children:null===o||void 0===o?void 0:o.CancellationOfferData.cancelCta}
1)]})]})]})}),(0,u.jsx)("div",{children:(0,u.jsx)(c.M,{footerPageData:o.footerPageData})})]})})};l.d(n,["default",0,v])}}]);
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.