1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6209],{42472:e=>{e.exports={pageWrapper:"cancel_pageWrapper__BPClC",pageTitle:"cancel_pageTitle__M7xFS",pageSubtitle:"cancel_pageSubtitle___2P62",primaryBtn:"cancel_primaryBtn__byz4k"}},51260:()=>{},53897:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_sites/[siteSlug]/cancel",function(){return n(95185)}])},95185:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSP:()=>b,default:()=>_});var a=n(37876),r=n(14232),s=n(40880),i=n(8349),l=n(89099),c=n(88876),o=n(12365),u=n(20884),p=n(81249),d=n(10346),h=n(50287),m=n(42472),y=n.n(m),b=!0;let _=e=>{let{globalData:t}=e,{siteTitle:n,publisherCurrency:m,publisher:{displayName:b="the Publisher"}}=t,{query:{siteSlug:_,undo:g=!1}}=(0,l.useRouter)(),[f,w]=(0,r.useState)(!1),[x,j]=(0,r.useState)(null),[N,S]=(0,r.useState)(!1),k=(0,c.A)("subscription_canceled"),v=(0,c.A)("subscription_undo_cancel"),T=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/cancel",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteSlug:_,order:x,undo:g})}),t=await e.json();if("success"===t.status){w(!0),S(!1);let e=(0,i.A)(x.product,x.interval,m),t={currency:e.currency,value:parseFloat(e.price.toString()),transaction_id:x.product.id.toString(),items:[e]};g?v(t):k(t)}else S(!0)}catch(e){(0,s.v)(e,{order:x}),S(!0)}},[_,x,g,w]);return(0,a.jsx)(p.A,{...t,title:"".concat(n," | Cancel Subscription"),headerTheme:"simple",footerTheme:"simple",hideAds:!0,children:(0,a.jsx)("div",{className:y().pageWrapper,children:f?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("h1",{className:y().pageTitle,children:["Your cancelation has been ",g?"undone":"processed","."]}),(0,a.jsx)(u.A,{href:"/account#subscription",children:"Back to account management"})]}):(0,a.jsxs)(a.Fragment,{children:[g?(0,a.jsx)("h1",{className:y().pageTitle,children:"Undo your cancelation"}):(0,a.jsx)("h1",{className:y().pageTitle,children:"Cancel your subscription"}),(0,a.jsx)("h4",{className:y().pageSubtitle,children:"Your current subscription and renewal date:"}),(0,a.jsx)(o.A,{showEditLink:!1,setParentOrder:j}),g?(0,a.jsx)("p",{children:"If you undo your cancelation, your subscription will continue as shown here."}):(0,a.jsx)("p",{children:"If you cancel, your subscription and billing will end on this date, including any scheduled subscription changes."}),(0,a.jsxs)("button",{className:y().primaryBtn,type:"button",disabled:!x||N,onClick:e=>{e.preventDefault(),T()},children:["Confirm ",g?null:"cancelation"]}),N?(0,a.jsx)(d.A,{msg:"There was an error canceling your subscription. Please try again later or contact ".concat(b," directly for assistance. Thank you!"),status:h.A.Error}):null]})})})}},96010:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(14232);let r=a.createContext({});function s({count:e=1,wrapper:t,className:n,containerClassName:s,containerTestId:i,circle:l=!1,style:c,...o}){var u,p,d;let h=a.useContext(r),m={...o};for(let[e,t]of Object.entries(o))void 0===t&&delete m[e];let y={...h,...m,circle:l},b={...c,...function({baseColor:e,highlightColor:t,width:n,height:a,borderRadius:r,circle:s,direction:i,duration:l,enableAnimation:c=!0}){let o={};return"rtl"===i&&(o["--animation-direction"]="reverse"),"number"==typeof l&&(o["--animation-duration"]=`${l}s`),c||(o["--pseudo-element-display"]="none"),("string"==typeof n||"number"==typeof n)&&(o.width=n),("string"==typeof a||"number"==typeof a)&&(o.height=a),("string"==typeof r||"number"==typeof r)&&(o.borderRadius=r),s&&(o.borderRadius="50%"),void 0!==e&&(o["--base-color"]=e),void 0!==t&&(o["--highlight-color"]=t),o}(y)},_="react-loading-skeleton";n&&(_+=` ${n}`);let g=null!=(u=y.inline)&&u,f=[],w=Math.ceil(e);for(let t=0;t<w;t++){let n=b;if(w>e&&t===w-1){let t=null!=(p=n.width)?p:"100%",a=e%1,r="number"==typeof t?t*a:`calc(${t} * ${a})`;n={...n,width:r}}let r=a.createElement("span",{className:_,style:n,key:t},"â");g?f.push(r):f.push(a.createElement(a.Fragment,{key:t},r,a.createElement("br",null)))}return a.createElement("span",{className:s,"data-testid":i,"aria-live":"polite","aria-busy":null==(d=y.enableAnimation)||d},t?f.map((e,n)=>a.createElement(t,{key:n},e)):f)}}},e=>{e.O(0,[1596,6071,1249,2617,636,6593,8792],()=>e(e.s=53897)),_N_E=e.O()}]);
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.