1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ff962b17-80fe-4c30-ba86-e1afdba2fbf4",e._sentryDebugIdIdentifier="sentry-dbid-ff962b17-80fe-4c30-ba86-e1afdba2fbf4")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7336,7410],{17410:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>S});var a=n(95155),o=n(12115),s=n(20063),l=n(72935),i=n(20905),r=n(59558),c=n(9521),d=n(5746),u=n(20317),m=n(28122),h=n(53380),p=n(39599),g=n.n(p),y=n(95121),f=n(26139);function b(e){var t;let n=e.filter(e=>e.linked).map(e=>e.label);return n.length<=1?null!=(t=n[0])?t:"no other method":"".concat(n.slice(0,-1).join(", ")," or ").concat(n.at(-1))}function x(e){var t,n;let s,{flow:l,accountEmail:i,emailVerified:r,methods:c,passwordStatus:d,onBack:u,onClose:p,onConfirmUnlink:x,onVerify:w,onPasswordChange:v,onConfigurePassword:j,onSendEmailVerification:C,onDone:_,onDisconnectAfterSuccess:k}=e,N=(0,o.useRef)(null);(0,f.L)(N);let[B,I]=(0,o.useState)(""),[S,E]=(0,o.useState)(""),[F,M]=(0,o.useState)(""),P="mutating"===l.state;"target"in l?s=l.target:"mutating"===l.state||"success"===l.state?s=l.operation.providerId:"error"===l.state&&(s=null==(n=l.operation)?void 0:n.providerId);let A=s?(0,y.L8)(s).label:"Sign-in method",D="verifying"===l.state?c.filter(e=>e.manageable&&e.linked&&("link"===l.action||e.id!==l.target)):[],O="confirming-unlink"===l.state?c.filter(e=>e.linked&&e.id!==l.target):[],L=(0,y.qp)(d),R=S.length>0&&S===F;return(0,a.jsx)("div",{className:g().modalOverlay,onClick:P?void 0:p,children:(0,a.jsxs)("div",{ref:N,className:g().modalContent,onClick:e=>e.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":"security-flow-title",tabIndex:-1,children:[(0,a.jsxs)("div",{className:g().modalHeader,children:[P?(0,a.jsx)("span",{}):(0,a.jsx)("button",{className:g().closeButton,onClick:u,type:"button","aria-label":"Back to account",children:(0,a.jsx)(m.kRp,{})}),(0,a.jsx)("h2",{className:g().modalTitle,id:"security-flow-title",children:"Sign-in & security"}),(0,a.jsx)("button",{className:g().closeButton,onClick:p,disabled:P,type:"button","aria-label":"Close security settings",children:(0,a.jsx)(m.yGN,{})})]}),(0,a.jsxs)("div",{className:g().securityFlowBody,"aria-live":"polite",children:["confirming-unlink"===l.state&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h.VIB,{className:g().securityHeroIcon}),(0,a.jsxs)("h3",{children:["Disconnect ",A,"?"]}),(0,a.jsxs)("p",{children:[A," will no longer be able to access this account. You will still sign in with"," ",(0,a.jsx)("strong",{children:b(O)}),"."]}),"password"!==l.target&&(0,a.jsx)("p",{className:g().securityWarning,children:"Signing in with the disconnected provider later may create a separate AEO Checker account."}),(0,a.jsxs)("div",{className:g().securityActions,children:[(0,a.jsx)("button",{className:g().secondaryButton,onClick:u,type:"button",children:"Cancel"}),(0,a.jsx)("button",{className:g().dangerButton,onClick:x,type:"button",children:"Continue"})]})]}),"verifying"===l.state&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h.VIB,{className:g().securityHeroIcon}),(0,a.jsx)("h3",{children:"Verify itâs you"}),(0,a.jsxs)("p",{children:["Verify with a connected method before ","link"===l.action?"connecting":"disconnecting"," ",A,". Your account, subscription, and data stay with the same AEO Checker account."]}),(0,a.jsx)("div",{className:g().verificationChoices,children:D.map(e=>"password"===e.id?(0,a.jsxs)("form",{className:g().passwordForm,onSubmit:e=>{e.preventDefault(),w("password",B)},children:[(0,a.jsx)("label",{htmlFor:"current-account-password",children:"Current password"}),(0,a.jsx)("input",{id:"current-account-password",type:"password",autoComplete:"current-password",value:B,onChange:e=>I(e.target.value)}),(0,a.jsx)("button",{className:g().primaryButton,disabled:!B,type:"submit",children:"Verify with password"})]},e.id):(0,a.jsxs)("button",{className:g().secondaryButton,onClick:()=>w(e.id),type:"button",children:["Continue with ",e.label]},e.id))})]}),"configuring-password"===l.state&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{children:"Add Email & password"}),(0,a.jsx)("p",{children:"This password will sign in to the same AEO Checker account and keep your subscription and data."}),i&&r?(0,a.jsxs)("form",{className:g().passwordForm,onSubmit:e=>{e.preventDefault(),j(S)},children:[(0,a.jsx)("label",{htmlFor:"account-password-email",children:"Account email"}),(0,a.jsx)("input",{id:"account-password-email",value:i,readOnly:!0,autoComplete:"username"}),(0,a.jsx)("label",{htmlFor:"new-account-password",children:"New password"}),(0,a.jsx)("input",{id:"new-account-password",type:"password",autoComplete:"new-password",value:S,onChange:e=>{E(e.target.value),v(e.target.value)}}),(0,a.jsx)("label",{htmlFor:"confirm-account-password",children:"Confirm password"}),(0,a.jsx)("input",{id:"confirm-account-password",type:"password",autoComplete:"new-password",value:F,onChange:e=>M(e.target.value)}),L.length>0&&(0,a.jsx)("ul",{className:g().policyList,children:L.map(e=>(0,a.jsx)("li",{children:e},e))}),F&&!R&&(0,a.jsx)("p",{className:g().fieldError,children:"Passwords do not match."}),(0,a.jsx)("button",{className:g().primaryButton,disabled:!(null==d?void 0:d.isValid)||!R,type:"submit",children:"Add password"})]}):(0,a.jsxs)("div",{className:g().securityWarning,children:[(0,a.jsx)("p",{children:"Verify your account email before adding a password."}),i&&(0,a.jsx)("button",{className:g().inlineButton,onClick:C,type:"button",children:"Send verification email"})]})]}),"mutating"===l.state&&(0,a.jsxs)("div",{className:g().processingState,role:"status",children:[(0,a.jsx)("span",{className:g().spinner,"aria-hidden":"true"}),(0,a.jsxs)("h3",{children:["Updating ",A,"â¦"]}),(0,a.jsx)("p",{children:"Keep this window open while Firebase securely commits the change."})]}),"success"===l.state&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h.VIB,{className:g().securityHeroIcon}),(0,a.jsxs)("h3",{children:[A," ","link"===l.operation.action?"connected":"disconnected"]}),(0,a.jsx)("p",{children:"unlink"===l.operation.action?"Sign in with ".concat(b(c.filter(e=>e.linked&&e.id!==l.operation.providerId)),"."):"You can now use this method to sign in to the same AEO Checker account."}),l.reconciliationPending&&(0,a.jsx)("p",{className:g().securityWarning,children:"The credential change is complete. Your security notification is pending and will retry automatically."}),(0,a.jsxs)("div",{className:g().securityActions,children:["link"===l.operation.action&&"password"===l.operation.providerId&&(null==(t=c.find(e=>"google.com"===e.id))?void 0:t.linked)&&(0,a.jsx)("button",{className:g().secondaryButton,onClick:()=>k("google.com"),type:"button",children:"Disconnect Google"}),(0,a.jsx)("button",{className:g().primaryButton,onClick:_,type:"button",children:"Done"})]})]}),"error"===l.state&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{children:"We couldnât complete that change"}),(0,a.jsx)("p",{className:g().fieldError,role:"alert",children:l.message}),(0,a.jsxs)("div",{className:g().securityActions,children:[(0,a.jsx)("button",{className:g().secondaryButton,onClick:u,type:"button",children:"Back to account"}),(0,a.jsx)("a",{className:g().secondaryButton,href:"mailto:[email protected]",children:"Contact support"})]})]})]})]})})}var w=n(27336),v=n(36145),j=n.n(v),C=n(81240);let _=[{value:"too_expensive",label:"It's too expensive"},{value:"missing_features",label:"It's missing features I need"},{value:"switched_service",label:"I'm switching to another tool"},{value:"unused",label:"I'm not using it enough"},{value:"too_complex",label:"It's too complicated"},{value:"low_quality",label:"The quality is not good enough"},{value:"other",label:"Other"}];function k(e){if(!e)return"the end of your billing period";try{return new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}catch(e){return"the end of your billing period"}}function N(e){var t;let{isOpen:n,onClose:s}=e,{token:i,refreshUserProfile:r}=(0,l.A)(),{showToast:u}=(0,c.d)(),[h,p]=(0,o.useState)("loading"),[g,y]=(0,o.useState)(null),[f,b]=(0,o.useState)(null),[x,w]=(0,o.useState)(null),[v,N]=(0,o.useState)(""),[B,I]=(0,o.useState)(null),[S,E]=(0,o.useState)(!1),[F,M]=(0,o.useState)(null),[P,A]=(0,o.useState)(null),D=(0,o.useRef)(!1),O=(0,o.useCallback)(e=>{p(e),(0,C.capturePH)("cancel_flow_step_viewed",{step:e})},[]);(0,o.useEffect)(()=>
1{if(!n||!i)return;D.current=!1,p("loading"),w(null),N(""),I(null),M(null),A(null),b(null),(0,C.capturePH)("cancel_flow_opened");let e=!1;return(0,d.w)(i).then(t=>{e||(y(t),M(t.currentPeriodEnd),t.cancelAtPeriodEnd?p("scheduled"):p("survey"))}).catch(t=>{e||(console.error("Error loading cancel flow state:",t),b((0,d.sm)(t)&&409===t.status?t.message:"We could not load your subscription details. Please try again in a moment."),p("error"))}),()=>{e=!0}},[n,i]);let L=(0,o.useCallback)(()=>{D.current||"loading"===h||"scheduled"===h||"error"===h||(0,C.capturePH)("cancel_flow_abandoned",{step:h}),s()},[s,h]);if(!n)return null;let R=()=>(null==g?void 0:g.discountAvailable)?"discount":(null==g?void 0:g.pauseAvailable)?"pause":"confirm",H=(e,t)=>{(0,C.capturePH)("cancel_flow_offer_declined",{offer:e}),O(t)},Y=async()=>{if(i&&x&&!S){E(!0);try{let{surveyId:e}=await (0,d.R4)(x,v.trim()||null,i);I(e),O(R())}catch(e){console.error("Error submitting cancellation survey:",e),O(R())}finally{E(!1)}}},V=async()=>{if(i&&!S){E(!0);try{await (0,d.es)(B,i),D.current=!0,O("saved_discount"),u.success({title:"50% discount applied to your next invoice."})}catch(e){console.error("Error applying discount:",e),u.error({title:"Could not apply the discount. Please try again."})}finally{E(!1)}}},T=async()=>{if(i&&!S){E(!0);try{var e;let t=await (0,d.ys)(B,i);A(null!=(e=t.pausedUntil)?e:null),D.current=!0,O("saved_pause"),u.success({title:"Your subscription is paused for the next month."})}catch(e){console.error("Error pausing subscription:",e),u.error({title:"Could not pause the subscription. Please try again."})}finally{E(!1)}}},U=async()=>{if(i&&!S){E(!0);try{var e;let t=await (0,d.M2)(B,i);M(null!=(e=t.currentPeriodEnd)?e:F),D.current=!0,O("cancelled"),r(!0)}catch(e){console.error("Error cancelling subscription:",e),u.error({title:"Could not cancel the subscription. Please try again."})}finally{E(!1)}}};return(0,a.jsx)("div",{className:j().modalOverlay,onClick:L,children:(0,a.jsxs)("div",{className:j().modalContent,onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("button",{type:"button",className:j().closeButton,onClick:L,children:(0,a.jsx)(m.yGN,{})}),"loading"===h&&(0,a.jsx)("div",{className:j().centered,children:(0,a.jsx)("p",{className:j().subtitle,children:"Loading your subscriptionâ¦"})}),"error"===h&&(0,a.jsxs)("div",{className:j().centered,children:[(0,a.jsx)("h2",{className:j().title,children:"Something went wrong"}),(0,a.jsx)("p",{className:j().subtitle,children:null!=f?f:"We could not load your subscription details. Please try again in a moment."}),(0,a.jsx)("button",{type:"button",className:j().secondaryButton,onClick:L,children:"Close"})]}),"scheduled"===h&&(0,a.jsxs)("div",{className:j().centered,children:[(0,a.jsx)("h2",{className:j().title,children:"Cancellation already scheduled"}),(0,a.jsxs)("p",{className:j().subtitle,children:["Your subscription is set to end on ",(0,a.jsx)("strong",{children:k(F)}),". You keep full access until then."]}),(0,a.jsx)("button",{type:"button",className:j().secondaryButton,onClick:L,children:"Close"})]}),"survey"===h&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:j().title,children:"Before you goâ¦"}),(0,a.jsx)("p",{className:j().subtitle,children:"What is the main reason you want to cancel?"}),(0,a.jsx)("div",{className:j().reasonList,children:_.map(e=>(0,a.jsxs)("label",{className:"".concat(j().reasonOption," ").concat(x===e.value?j().reasonSelected:""),children:[(0,a.jsx)("input",{type:"radio",name:"cancel-reason",value:e.value,checked:x===e.value,onChange:()=>w(e.value)}),(0,a.jsx)("span",{children:e.label})]},e.value))}),(0,a.jsx)("textarea",{className:j().commentBox,placeholder:"Anything we could have done better? (optional)",value:v,onChange:e=>N(e.target.value),maxLength:1e3,rows:3}),(0,a.jsxs)("div",{className:j().actionRow,children:[(0,a.jsx)("button",{type:"button",className:j().secondaryButton,onClick:L,children:"Keep my plan"}),(0,a.jsx)("button",{type:"button",className:j().dangerButton,onClick:Y,disabled:!x||S,children:S?"Savingâ¦":"Continue"})]})]}),"discount"===h&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:j().offerBadge,children:[null!=(t=null==g?void 0:g.discountPercent)?t:50,"% OFF"]}),(0,a.jsx)("h2",{className:j().title,children:"How about 50% off your next bill?"}),(0,a.jsx)("p",{className:j().subtitle,children:"Stay with us and your next invoice is half price â applied instantly, no code needed. Your daily AI-visibility tracking keeps running without a gap."}),(0,a.jsxs)("div",{className:j().actionRow,children:[(0,a.jsx)("button",{type:"button",className:j().primaryButton,onClick:V,disabled:S,children:S?"Applyingâ¦":"Apply 50% discount"}),(0,a.jsx)("button",{type:"button",className:j().linkButton,onClick:()=>H("discount",(null==g?void 0:g.pauseAvailable)?"pause":"confirm"),disabled:S,children:"No thanks, continue"})]})]}),"pause"===h&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:j().title,children:"Need a break instead?"}),(0,a.jsx)("p",{className:j().subtitle,children:"Pause your subscription for one month. You will not be charged during the pause, your history is kept, and billing resumes automatically."}),(0,a.jsxs)("div",{className:j().actionRow,children:[(0,a.jsx)("button",{type:"button",className:j().primaryButton,onClick:T,disabled:S,children:S?"Pausingâ¦":"Pause for 1 month"}),(0,a.jsx)("button",{type:"button",className:j().linkButton,onClick:()=>H("pause","confirm"),disabled:S,children:"No thanks, continue"})]})]}),"confirm"===h&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:j().title,children:"Confirm cancellation"}),(0,a.jsxs)("p",{className:j().subtitle,children:["Your plan stays active until ",(0,a.jsx)("strong",{children:k(F)}),". After that, daily tracking stops and your dashboards are locked."]}),(0,a.jsxs)("div",{className:j().actionRow,children:[(0,a.jsx)("button",{type:"button",className:j().secondaryButton,onClick:L,children:"Keep my plan"}),(0,a.jsx)("button",{type:"button",className:j().dangerButton,onClick:U,disabled:S,children:S?"Cancellingâ¦":"Cancel subscription"})]})]}),"saved_discount"===h&&(0,a.jsxs)("div",{className:j().centered,children:[(0,a.jsx)("h2",{className:j().title,children:"Discount applied \uD83C\uDF89"}),(0,a.jsx)("p",{className:j().subtitle,children:"Your next invoice is 50% off. Thanks for staying with us!"}),(0,a.jsx)("button",{type:"button",className:j().primaryButton,onClick:L,children:"Back to dashboard"})]}),"saved_pause"===h&&(0,a.jsxs)("div",{className:j().centered,children:[(0,a.jsx)("h2",{className:j().title,children:"Subscription paused"}),(0,a.jsxs)("p",{className:j().subtitle,children:["You will not be charged until ",(0,a.jsx)("strong",{children:k(P)}),". Billing resumes automatically after that."]}),(0,a.jsx)("button",{type:"button",className:j().primaryButton,onClick:L,children:"Back to dashboard"})]}
1),"cancelled"===h&&(0,a.jsxs)("div",{className:j().centered,children:[(0,a.jsx)("h2",{className:j().title,children:"Cancellation scheduled"}),(0,a.jsxs)("p",{className:j().subtitle,children:["Sorry to see you go. Your plan stays active until"," ",(0,a.jsx)("strong",{children:k(F)})," â you can resume any time before then from your billing portal."]}),(0,a.jsx)("button",{type:"button",className:j().secondaryButton,onClick:L,children:"Close"})]})]})})}var B=n(25608),I=n(69545);function S(e){var t,n,m;let{isOpen:h,onClose:p}=e,g=(0,s.useRouter)(),f=(0,s.usePathname)(),{user:b,userProfile:v,logout:j,isPaid:_,token:k,isImpersonating:S,impersonationInfo:E,exitImpersonation:F,refreshUserProfile:M,reauthenticateAuthMethod:P,linkPasswordAuthMethod:A,linkSocialAuthMethod:D,unlinkAuthMethod:O,reconcileAuthMethodOperation:L,validateAuthMethodPassword:R,sendAccountEmailVerification:H}=(0,l.A)(),{openAuthModal:Y,openPaywallModal:V,openImpersonateModal:T}=(0,r.h)(),{showToast:U}=(0,c.d)(),{ownedSites:K,sharedDashboards:W,sitesLoaded:G,reloadSites:q}=(0,i.Ek)(),[J,X]=(0,o.useState)(!1),[Q,z]=(0,o.useState)(!1),[Z,$]=(0,o.useState)(null),[ee,et]=(0,o.useState)(null),[en,ea]=(0,o.useState)(!1),[eo,es]=(0,o.useState)(!1),[el,ei]=(0,o.useState)({state:"idle"}),[er,ec]=(0,o.useState)(null),[ed,eu]=(0,o.useState)(null),em=(0,o.useRef)(0),eh=(0,o.useRef)(null),ep="true",eg="false"!==ep&&("admin"!==ep||!!(null==v?void 0:v.isAdmin)),ey=(0,B.J8)(v),ef=null==v?void 0:v.entitlements;(0,o.useEffect)(()=>{h&&k&&ey&&!G&&(null!=f&&f.includes("/webapp/analytics")||q())},[h,k,ey,G,f,q]),(0,o.useEffect)(()=>{if(!h||!k||!ey)return void et(null);let e=!1;return(0,d.HK)(k).then(t=>{e||et(t)}).catch(()=>{e||et(null)}),()=>{e=!0}},[h,k,ey]),(0,o.useEffect)(()=>{if(!h||!k||!_)return void $(null);let e=!1;return(0,d.w)(k).then(t=>{e||$(t)}).catch(()=>{e||$(null)}),()=>{e=!0}},[h,k,_]),(0,o.useEffect)(()=>{if(!h)return;let e=e=>{if("Escape"===e.key&&"mutating"!==el.state){if("idle"!==el.state)return void ei({state:"idle"});p()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[h,p,el.state]);let eb=(0,o.useMemo)(()=>(0,I.wB)(b,v),[b,v]),ex=(0,I.bl)(b,v),ew=(0,o.useMemo)(()=>(0,I.gt)(v,_,Z),[v,_,Z]),ev=(0,o.useMemo)(()=>(0,I.mO)({entitlements:ef,brandsUsed:K.length,promptQuota:ee,sharedBrandCount:W.length}),[ef,K.length,ee,W.length]),ej=(0,o.useMemo)(()=>(0,I.MI)(ef,_),[ef,_]);if(!h||!v)return null;let eC=ex.filter(e=>e.linked&&e.manageable).length,e_=ed?[...ex].sort((e,t)=>Number(t.id===ed)-Number(e.id===ed)):ex,ek=(e,t)=>{eu(null),b&&b.getIdTokenResult().then(n=>{let a=n.claims.firebase,o=a&&"object"==typeof a&&"sign_in_provider"in a&&"string"==typeof a.sign_in_provider?a.sign_in_provider:null;o&&["password","google.com","github.com"].includes(o)&&ex.some(e=>e.id===o&&e.linked)&&("link"===t||o!==e)&&eu(o)}).catch(()=>{})},eN=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,C.capturePH)("account_security:auth_method_change_".concat(e),{action:t.action,provider_id:t.providerId,method_count:eC,...n})},eB=()=>{let e=eh.current;eh.current=null,e&&window.setTimeout(()=>{var t;null==(t=document.querySelector('[data-auth-method-id="'.concat(e,'"] button')))||t.focus()},0)},eI=()=>{"mutating"!==el.state&&(ei({state:"idle"}),eB())},eS=e=>{let t=ex.find(t=>t.id===e);(null==t?void 0:t.canDisconnect)&&(eh.current=e,eN("started",{action:"unlink",providerId:e}),ek(e,"unlink"),ei({state:"confirming-unlink",target:e}))},eE=async(e,t)=>{ei({state:"mutating",operation:e});let n=!1;try{"link"===e.action&&"password"===e.providerId?await A(null!=t?t:""):"link"===e.action?await D(e.providerId):await O(e.providerId),n=!0;let a=await L(e);eN("completed",e,{method_count_after:"link"===e.action?eC+1:eC-1,notification_status:a.notificationStatus}),ei({state:"success",operation:e}),U.success({title:"".concat((0,y.L8)(e.providerId).label," ").concat("link"===e.action?"connected":"disconnected",".")})}catch(t){if(n&&t instanceof y.GC){eN("completed",e,{method_count_after:"link"===e.action?eC+1:eC-1,notification_status:"pending"}),ei({state:"success",operation:e,reconciliationPending:!0});return}eN("failed",e,{error_code:(0,y.K8)(t)}),ei({state:"error",operation:e,message:(0,y.xy)(t)})}},eF=async(e,t)=>{if("verifying"!==el.state)return;let{action:n,target:a}=el;try{if(await P("password"===e?{providerId:e,password:null!=t?t:""}:{providerId:e}),"link"===n&&"password"===a)ei({state:"configuring-password",operationId:crypto.randomUUID()});else await eE({operationId:crypto.randomUUID(),action:n,providerId:a})}catch(e){if((0,y.Yp)(e)){ei({state:"idle"}),eB();return}eN("failed",{action:n,providerId:a},{error_code:(0,y.K8)(e)}),ei({state:"error",message:(0,y.xy)(e)})}},eM=async()=>{try{await H(),U.success({title:"Verification email sent. Reopen this flow after verifying."})}catch(e){U.error({title:(0,y.xy)(e)})}},eP=async()=>
1{if(k)try{ea(!0);let{url:e}=await (0,d.VK)(k);window.open(e,"_blank","noopener,noreferrer")}catch(e){console.error("Error redirecting to subscription management:",e),U.error({title:"Could not open the billing portal. Please try again."})}finally{ea(!1)}},eA=async()=>{await j(),p()},eD=async()=>{try{if(!k)return;p(),U.message({title:"Account deletion in progress...",durationMs:0,preserve:!0}),await (0,d.LI)(k),await j(),U.success({title:"Account and all associated data successfully deleted."})}catch(e){console.error("Error deleting account:",e),U.error({title:"Failed to delete account. Please try again."})}},eO=async e=>{if(k&&!v.emailSuppressed)try{es(!0),await (0,d.Jq)(e,k),await M(),U.success({title:e?"Product emails enabled.":"Product emails disabled."})}catch(e){console.error("Error updating product email preference:",e),U.error({title:"Could not update your product email preference."})}finally{es(!1)}};return(0,a.jsxs)(a.Fragment,{children:["idle"!==el.state?(0,a.jsx)(x,{flow:el,accountEmail:eb.email,emailVerified:!!(null==b?void 0:b.emailVerified),methods:e_,passwordStatus:er,onBack:eI,onClose:eI,onConfirmUnlink:()=>{"confirming-unlink"===el.state&&ei({state:"verifying",action:"unlink",target:el.target})},onVerify:eF,onPasswordChange:e=>{let t=++em.current;if(!e)return void ec(null);R(e).then(e=>{t===em.current&&ec(e)}).catch(()=>{t===em.current&&ec(null)})},onConfigurePassword:e=>{"configuring-password"===el.state&&eE({operationId:el.operationId,action:"link",providerId:"password"},e)},onSendEmailVerification:eM,onDone:eI,onDisconnectAfterSuccess:eS}):(0,a.jsx)(u.A,{identity:eb,plan:ew,usageMeters:ev,capabilities:ej,brands:0!==K.length||G?K:null,brandLimit:ey&&null!=(t=null==ef?void 0:ef.brandLimit)?t:0,sharedBrandCount:W.length,signInMethods:ex,isPaid:_,isAdmin:!!v.isAdmin,isPasswordUser:(0,I.uC)(b,v),hasAgencyBranding:!!(null==ef?void 0:ef.agencyBranding),impersonatingEmail:S?null!=(m=null!=(n=null==E?void 0:E.targetEmail)?n:eb.email)?m:"":null,isOpeningPortal:en,productEmailsEnabled:!0===v.marketingOptIn,emailSuppressed:!0===v.emailSuppressed,isSavingMarketingPreference:eo,authMethodManagementEnabled:eg,onClose:p,onNavigate:e=>{p(),g.push(e)},onUpgrade:()=>V({intent:"analytics",trigger:"settings_upgrade"}),onManageBilling:eP,onCancelSubscription:()=>z(!0),onResetPassword:()=>{var e;p(),Y("resetPassword",{prefillEmail:null!=(e=eb.email)?e:void 0})},onConnectAuthMethod:e=>{eh.current=e,eN("started",{action:"link",providerId:e}),ec(null),ek(e,"link"),ei({state:"verifying",action:"link",target:e})},onDisconnectAuthMethod:eS,onImpersonate:()=>{p(),T()},onExitImpersonation:()=>{p(),F()},onLogout:eA,onDeleteAccount:()=>X(!0),onMarketingPreferenceChange:eO}),(0,a.jsx)(w.default,{isOpen:J,onClose:()=>X(!1),message:"Permanently delete account. This action cannot be undone and all your associated data will be lost.",onConfirm:eD,onCancel:()=>X(!1)}),(0,a.jsx)(N,{isOpen:Q,onClose:()=>z(!1)})]})}},27336:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var a=n(95155),o=n(12115),s=n(28122),l=n(75548),i=n.n(l);function r(e){let{isOpen:t,onClose:n,message:l,onConfirm:r,onCancel:c,confirmButtonText:d="Yes, Delete"}=e;(0,o.useEffect)(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[t]),(0,o.useEffect)(()=>{let e=e=>{"Escape"===e.key&&u()};return t&&document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t]);let u=()=>{c&&c(),n()};return t?(0,a.jsx)("div",{className:i().modalOverlay,onClick:u,children:(0,a.jsxs)("div",{className:i().modalContent,onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:i().modalHeader,children:[(0,a.jsx)("h2",{children:"Confirm Action"}),(0,a.jsx)("button",{className:i().closeButton,onClick:u,"aria-label":"Close modal",children:(0,a.jsx)(s.yGN,{})})]}),(0,a.jsx)("div",{className:i().modalBody,children:(0,a.jsxs)("div",{className:i().confirmationContent,children:[(0,a.jsx)(s.eHT,{className:i().warningIcon}),(0,a.jsx)("p",{children:l})]})}),(0,a.jsxs)("div",{className:i().modalFooter,children:[(0,a.jsx)("button",{className:i().cancelButton,onClick:u,children:"Cancel"}),(0,a.jsx)("button",{className:i().confirmButton,onClick:()=>{r(),n()},children:d})]})]})}):null}},36145:e=>{e.exports={modalOverlay:"CancelFlowModal_modalOverlay__CISE6",modalContent:"CancelFlowModal_modalContent__ZD7Qe",closeButton:"CancelFlowModal_closeButton__G8_R5",title:"CancelFlowModal_title__6mt_A",subt
1itle:"CancelFlowModal_subtitle__n10AV",centered:"CancelFlowModal_centered__I00D7",offerBadge:"CancelFlowModal_offerBadge__F6BwB",reasonList:"CancelFlowModal_reasonList__Wc9Wp",reasonOption:"CancelFlowModal_reasonOption__aADGx",reasonSelected:"CancelFlowModal_reasonSelected__O1wxJ",commentBox:"CancelFlowModal_commentBox__j2oez",actionRow:"CancelFlowModal_actionRow__bEMRK",primaryButton:"CancelFlowModal_primaryButton__HlIAO",secondaryButton:"CancelFlowModal_secondaryButton__wNDc1",dangerButton:"CancelFlowModal_dangerButton__XXmkJ",linkButton:"CancelFlowModal_linkButton__B7h8d"}},75548:e=>{e.exports={modalOverlay:"ConfirmationModal_modalOverlay__eY1V5",modalContent:"ConfirmationModal_modalContent__mKgu5",modalHeader:"ConfirmationModal_modalHeader__f6Xkd",closeButton:"ConfirmationModal_closeButton__31j6W",confirmationContent:"ConfirmationModal_confirmationContent__QnIxH",warningIcon:"ConfirmationModal_warningIcon__86ihT",modalFooter:"ConfirmationModal_modalFooter__NemxG",cancelButton:"ConfirmationModal_cancelButton__fYuhh",confirmButton:"ConfirmationModal_confirmButton__6_B1K"}}}]);
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.