1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,1398105,e=>{"use strict";var t=e.i(7843476),a=e.i(5271645),s=e.i(7856511),i=e.i(2217255),r=e.i(674632),n=e.i(7787304),o=e.i(5985902),c=e.i(4547608),l=e.i(3013222),u=e.i(7610012),d=e.i(7951383),m=e.i(5152088),h=e.i(3427217),p=e.i(2694214),x=e.i(5248799),g=e.i(6339540);function y({open:e,onClose:s,discountCode:i,discountPercent:r,discountFixed:n,duration:f,referralCode:v}){let[j,N]=(0,a.useState)(""),[_,b]=(0,a.useState)(!1),[k,C]=(0,a.useState)(null),{trackClick:P}=(0,g.default)(),S=(0,a.useRef)(null),w=x.api.practice.systemDesign.purchase.captureCheckoutEmail.useMutation({onSuccess:()=>{b(!0),P("checkout_email_capture::success")},onError:e=>{e.message.includes("Too many attempts")?C("Too many attempts. Please try again later."):C("Something went wrong. Please try again.")}}),E=()=>{j&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(j)?(C(null),P("checkout_email_capture::submit"),w.mutate({email:j,discountCode:i,duration:["month","year","lifetime"].includes(f)?f:"year",referralCode:v})):C("Please enter a valid email address.")},F=r?`${Math.round(r)}%`:n?`$${n}`:null;return(0,t.jsx)(c.Dialog,{open:e,onOpenChange:e=>{e||s()},children:(0,t.jsxs)(c.DialogContent,{ref:S,size:"xs","aria-describedby":void 0,className:"overflow-visible rounded-3xl outline-none",onOpenAutoFocus:e=>{e.preventDefault(),S.current?.focus()},children:[(0,t.jsx)(c.DialogTitle,{className:"sr-only",children:"Get your Premium discount"}),(0,t.jsxs)("div",{className:"relative p-6",children:[(0,t.jsx)(o.IconButton,{onClick:s,size:"small",className:"absolute right-2 top-2",children:(0,t.jsx)(h.XMarkIcon,{style:{width:20,height:20}})}),_?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 py-4",children:[(0,t.jsx)(p.CheckCircleIcon,{className:"w-12 h-12 text-green-500"}),(0,t.jsx)("h6",{className:(0,m.cn)((0,d.typographyVariants)({variant:"h6"}),"text-center"),children:"Check your inbox!"}),(0,t.jsxs)("p",{className:(0,m.cn)((0,d.typographyVariants)({variant:"body2"}),"m-0 text-center text-muted-foreground"),children:["We sent your discount link to ",(0,t.jsx)("strong",{children:j})]})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("h5",{className:(0,m.cn)((0,d.typographyVariants)({variant:"h5"}),"mt-2 text-center font-semibold"),children:F?`Get ${F} off Premium`:"Get your Premium discount"}),(0,t.jsx)("p",{className:(0,m.cn)((0,d.typographyVariants)({variant:"body2"}),"m-0 text-center text-muted-foreground"),children:"Enter your email and we'll send you a link with your discount applied."})]}),(0,t.jsxs)(l.FormField,{children:[(0,t.jsx)(u.Input,{type:"email",placeholder:"[email protected]",value:j,onChange:e=>{N(e.target.value),C(null)},onKeyDown:e=>{"Enter"===e.key&&E()},inputSize:"small",className:(0,m.cn)(k&&"border-error"),"aria-invalid":!!k,"aria-describedby":k?"checkout-email-capture-error":void 0}),k&&(0,t.jsx)(l.FormHelperText,{error:!0,id:"checkout-email-capture-error",children:k})]}),(0,t.jsx)(o.Button,{variant:"contained",color:"primary",fullWidth:!0,onClick:E,disabled:w.isPending,className:"py-3 font-semibold",children:w.isPending?"Sending...":"Send me my discount"}),(0,t.jsx)("span",{className:(0,m.cn)((0,d.typographyVariants)({variant:"caption"}),"text-center text-disabled-foreground"),children:"No subscription. No auto-renewal. One-time purchase."})]})]})]})})}var f=e.i(7562912);let v="hi_email_capture_dismissed";e.s(["PremiumCheckoutView",0,function({discount:e,isLifetimeAccess:o,durationPricing:c}){(0,n.useFeature)("flag_premium_checkout_a_a_test","control");let l=(0,i.useSession)(),{data:u,logExposure:d}=(0,n.useFeatureWithoutExposure)("flag_checkout_email_capture","control"),m=(0,n.useFeature)("flag_checkout_hide_price_logged_out","control",{logExposure:"unauthenticated"===l.status}),{dismissed:h,dismiss:p}=function(){let[e,t]=(0,a.useState)(!0);return(0,a.useEffect)(()=>{try{t("true"===localStorage.getItem(v))}catch{t(!1)}},[]),{dismissed:e,dismiss:(0,a.useCallback)(()=>{t(!0);try{localStorage.setItem(v,"true")}catch{}},[])}}(),{duration:x,referralCode:g}=(0,f.useSafeSearchParams)("premiumCheckout");(0,a.useEffect)(()=>{"unauthenticated"===l.status&&d()},[l.status,d]);let j="unauthenticated"===l.status&&"hide_price"===m;return o?(0,t.jsx)("div",{className:"max-w-5xl mx-auto mt-6 md:mt-12 px-4",children:(0,t.jsxs)(s.Alert,{severity:"success",className:"mb-6",children:[(0,t.jsx)(s.AlertTitle,{children:"ð You already have lifetime access!"}),"You have unlimited access to all Premium features for life. No need to purchase additional access."]})}):(0,t.jsxs)("div",{className:"max-w-5xl mx-auto mt-6 md:mt-12 px-4",children:[(0,t.jsx)(r.default,{discount:e,durationPricing:c,hidePricing:j}),(0,t.jsx)(y,{open:"unauthenticated"===l.status&&"email_capture"===u&&!h,onClose:p,discountCode:e?.code,discountPercent:e?.percentOrFixed==="PERCENT"?100*e.amount:void 0,discountFixed:e?.percentOrFixed==="FIXED"?e.amount/100:void 0,duration:x,referralCode:g})]})}],1398105)}]); 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;
2n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4e59134a-5a70-57a9-899e-20d74ab45542")}catch(e){}}(); 3//# debugId=4e59134a-5a70-57a9-899e-20d74ab45542
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.