1import{a as _,z as h,k as w,j as I,b as k,bK as S,t as l}from"./DQ705e-R.js";import{S as q}from"./X7NYbzTv.js";import{s as x}from"./D1R34rGp.js";import{f as C,b as D,i as R,o as T,D as j,y as B,j as c,e as u}from"./iJPA3RaR.js";try{let n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new n.Error().stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="10c04be9-864e-4d26-ade5-9797a84368fc",n._sentryDebugIdIdentifier="sentry-dbid-10c04be9-864e-4d26-ade5-9797a84368fc")}catch{}const U=C({__name:"upgrade-inter",setup(n){const{hydrateUser:o}=_(),p=u(null),s=u(null),y=u(!0),d=u(!1),{public:{stripeKey:m}}=h();return w({meta:[{name:"robots",content:"noindex"}]}),D(async()=>{p.value=q.getInstance(m);const a=I(),t=k();let e=decodeURIComponent(a.query.from||"/?km_=1");e.includes("km_=1")||(e.includes("?")?e+="&km_=1":e+="?km_=1");const v=a.query.setup_intent,b=a.query.tier;a.query.setup_intent_secret;const i=a.query.redirect_status,g=a.query.price_id;if(i==="succeeded"){let f=0;s.value=x(async()=>{if(!d.value){d.value=!0;try{const r=await p.value.confirmSubscriptionCheckout(v,g);if(r?.subscribed){if(clearInterval(s.value),!s.value)return;s.value=null,await o(),await S(null,b,r),t.replace(e+"&success=1");return}else if(!r?.subscribed){if(r?.reason)return clearInterval(s.value),l.show(r.reason,"nonative","danger"),t.replace(e);f+=1,f>=30&&(clearInterval(s.value),alert("Checkout could not be confirmed. Please use our support chat."),y.value=!1,s.value=null,t.replace(e+"&success=1"))}}catch(r){console.error(r)}finally{d.value=!1}}},3e3)}else{if(i==="canceled")return l.show("Transaction canceled by user","nonative","primary"),t.replace(e);if(i==="failed"){l.show("Transaction denied: You have not been charged","nonative","primary"),t.replace(e);return}else if(i==="pending"){t.replace(e),l.show("Transaction was canceled","nonative","primary");return}}}),(a,t)=>{const e=R("ion-page");return T(),j(e,{class:"page"},{default:B(()=>[...t[0]||(t[0]=[c("div",{style:{display:"flex","justify-content":"center","align-items":"center",height:"100%"}},[c("div",{style:{"text-align":"center"}},[c("p",{style:{"font-size":"24px"}},"Processing transaction, please wait."),c("p",null,"You will be redirected automatically.")])],-1)])]),_:1})}}});
1export{U as default};
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.