1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="221ffad5-09db-b568-0626-87e5e57735e7")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,8297925,e=>{"use strict";let t=(0,e.i(1406963).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},7981248,e=>{"use strict";var t=e.i(5934275),a=e.i(6654612),s=e.i(427794),r=e.i(5291967),i=e.i(2597637),l=e.i(4877550),n=e.i(8467500),o=e.i(3205156),c=e.i(4650876),d=e.i(7824076),u="Switch",[p,m]=(0,l.createContextScope)(u),[h,x]=p(u),g=s.forwardRef((e,a)=>{let{__scopeSwitch:l,name:o,checked:c,defaultChecked:p,required:m,disabled:x,value:g="on",onCheckedChange:f,form:b,...j}=e,[C,w]=s.useState(null),k=(0,i.useComposedRefs)(a,e=>w(e)),N=s.useRef(!1),S=!C||b||!!C.closest("form"),[P,R]=(0,n.useControllableState)({prop:c,defaultProp:p??!1,onChange:f,caller:u});return(0,t.jsxs)(h,{scope:l,checked:P,disabled:x,children:[(0,t.jsx)(d.Primitive.button,{type:"button",role:"switch","aria-checked":P,"aria-required":m,"data-state":v(P),"data-disabled":x?"":void 0,disabled:x,value:g,...j,ref:k,onClick:(0,r.composeEventHandlers)(e.onClick,e=>{R(e=>!e),S&&(N.current=e.isPropagationStopped(),N.current||e.stopPropagation())})}),S&&(0,t.jsx)(y,{control:C,bubbles:!N.current,name:o,value:g,checked:P,required:m,disabled:x,form:b,style:{transform:"translateX(-100%)"}})]})});g.displayName=u;var f="SwitchThumb",b=s.forwardRef((e,a)=>{let{__scopeSwitch:s,...r}=e,i=x(f,s);return(0,t.jsx)(d.Primitive.span,{"data-state":v(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:a})});b.displayName=f;var y=s.forwardRef(({__scopeSwitch:e,control:a,checked:r,bubbles:l=!0,...n},d)=>{let u=s.useRef(null),p=(0,i.useComposedRefs)(u,d),m=(0,o.usePrevious)(r),h=(0,c.useSize)(a);return s.useEffect(()=>{let e=u.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(m!==r&&t){let a=new Event("click",{bubbles:l});t.call(e,r),e.dispatchEvent(a)}},[m,r,l]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...n,tabIndex:-1,ref:p,style:{...n.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function v(e){return e?"checked":"unchecked"}y.displayName="SwitchBubbleInput",e.s(["Root",0,g,"Switch",0,g,"SwitchThumb",0,b,"Thumb",0,b,"createSwitchScope",0,m],6124036);var j=e.i(6124036),j=j,C=e.i(8541048);let w=e=>{let s,r,i,l,n,o=(0,a.c)(9);return o[0]!==e?({className:s,...r}=e,o[0]=e,o[1]=s,o[2]=r):(s=o[1],r=o[2]),o[3]!==s?(i=(0,C.cn)("peer focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-input inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-xs transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",s),o[3]=s,o[4]=i):i=o[4],o[5]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(j.Thumb,{className:(0,C.cn)("bg-background pointer-events-none block h-4 w-4 rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")}),o[5]=l):l=o[5],o[6]!==r||o[7]!==i?(n=(0,t.jsx)(j.Root,{className:i,...r,children:l}),o[6]=r,o[7]=i,o[8]=n):n=o[8],n};w.displayName=j.Root.displayName,e.s(["Switch",0,w],7981248)},6151996,e=>{"use strict";var t=e.i(5934275),a=e.i(6654612),s=e.i(3294237),r=e.i(8541048);let i=(0,s.cva)("@container/card rounded-lg border transition-all duration-200 ease-out",{variants:{variant:{default:"bg-card text-card-foreground shadow-sm hover:shadow-md",interactive:"bg-card text-card-foreground cursor-pointer shadow-sm hover:-translate-y-0.5 hover:shadow-lg",matrix:"border-[#00FF41]/30 bg-[#0D0D0D] text-white shadow-[0_0_15px_rgba(0,255,65,0.1)] hover:shadow-[0_0_20px_rgba(0,255,65,0.15)]",matrixGlow:"border-[#00FF41]/50 bg-[#0D0D0D] text-white shadow-[0_0_25px_rgba(0,255,65,0.2)] hover:border-[#00FF41]/70 hover:shadow-[0_0_35px_rgba(0,255,65,0.3)]",matrixInteractive:"cursor-pointer border-[#00FF41]/30 bg-[#0D0D0D] text-white shadow-[0_0_15px_rgba(0,255,65,0.1)] hover:-translate-y-0.5 hover:border-[#00FF41]/50 hover:shadow-[0_0_25px_rgba(0,255,65,0.2)]"}},defaultVariants:{variant:"default"}}),l=e=>{let s,l,n,o,c,d,u=(0,a.c)(12);return u[0]!==e?({className:s,variant:o,ref:n,...l}=e,u[0]=e,u[1]=s,u[2]=l,u[3]=n,u[4]=o):(s=u[1],l=u[2],n=u[3],o=u[4]),u[5]!==s||u[6]!==o?(c=(0,r.cn)(i({variant:o}),s),u[5]=s,u[6]=o,u[7]=c):c=u[7],u[8]!==l||u[9]!==n||u[10]!==c?(d=(0,t.jsx)("div",{ref:n,className:c,...l}),u[8]=l,u[9]=n,u[10]=c,u[11]=d):d=u[11],d};
2l.displayName="Card";let n=e=>{let s,i,l,n,o=(0,a.c)(8);return o[0]!==e?({className:s,...i}=e,o[0]=e,o[1]=s,o[2]=i):(s=o[1],i=o[2]),o[3]!==s?(l=(0,r.cn)("flex flex-col space-y-1.5 p-4 sm:p-6",s),o[3]=s,o[4]=l):l=o[4],o[5]!==i||o[6]!==l?(n=(0,t.jsx)("div",{className:l,...i}),o[5]=i,o[6]=l,o[7]=n):n=o[7],n};n.displayName="CardHeader";let o=e=>{let s,i,l,n,o=(0,a.c)(8);return o[0]!==e?({className:s,...i}=e,o[0]=e,o[1]=s,o[2]=i):(s=o[1],i=o[2]),o[3]!==s?(l=(0,r.cn)("leading-none font-semibold tracking-tight",s),o[3]=s,o[4]=l):l=o[4],o[5]!==i||o[6]!==l?(n=(0,t.jsx)("h3",{className:l,...i}),o[5]=i,o[6]=l,o[7]=n):n=o[7],n};o.displayName="CardTitle";let c=e=>{let s,i,l,n,o=(0,a.c)(8);return o[0]!==e?({className:s,...i}=e,o[0]=e,o[1]=s,o[2]=i):(s=o[1],i=o[2]),o[3]!==s?(l=(0,r.cn)("text-muted-foreground text-sm",s),o[3]=s,o[4]=l):l=o[4],o[5]!==i||o[6]!==l?(n=(0,t.jsx)("p",{className:l,...i}),o[5]=i,o[6]=l,o[7]=n):n=o[7],n};c.displayName="CardDescription";let d=e=>{let s,i,l,n,o=(0,a.c)(8);return o[0]!==e?({className:s,...i}=e,o[0]=e,o[1]=s,o[2]=i):(s=o[1],i=o[2]),o[3]!==s?(l=(0,r.cn)("p-4 pt-0 sm:p-6 sm:pt-0",s),o[3]=s,o[4]=l):l=o[4],o[5]!==i||o[6]!==l?(n=(0,t.jsx)("div",{className:l,...i}),o[5]=i,o[6]=l,o[7]=n):n=o[7],n};d.displayName="CardContent";let u=e=>{let s,i,l,n,o=(0,a.c)(8);return o[0]!==e?({className:s,...i}=e,o[0]=e,o[1]=s,o[2]=i):(s=o[1],i=o[2]),o[3]!==s?(l=(0,r.cn)("flex items-center p-4 pt-0 sm:p-6 sm:pt-0",s),o[3]=s,o[4]=l):l=o[4],o[5]!==i||o[6]!==l?(n=(0,t.jsx)("div",{className:l,...i}),o[5]=i,o[6]=l,o[7]=n):n=o[7],n};u.displayName="CardFooter",e.s(["Card",0,l,"CardContent",0,d,"CardDescription",0,c,"CardFooter",0,u,"CardHeader",0,n,"CardTitle",0,o])},9831597,e=>{"use strict";
2e.i(5934275),e.i(6654612),e.i(5635790),e.i(8880932),e.s([])},9371522,e=>{"use strict";var t=e.i(6280304);e.s(["Loader2",()=>t.default])},5535009,e=>{"use strict";let t=(0,e.i(1406963).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",0,t])},26165,e=>{"use strict";var t=e.i(8297925);e.s(["CheckIcon",()=>t.default])},5560552,e=>{"use strict";let t=(0,e.i(1406963).default)("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);e.s(["default",0,t])},2996844,e=>{"use strict";let t={tattoo:{slug:"tattoo",label:"Tattoo Studio",icon:"ð¨",templateFolder:"tattoo",templateReady:!0,themePrefix:"tattoo"},barber:{slug:"barber",label:"Barber Shop",icon:"ð",templateFolder:"barber",templateReady:!1,themePrefix:"barber"},beauty:{slug:"beauty",label:"Beauty Salon",icon:"ð",templateFolder:"beauty",templateReady:!1,themePrefix:"beauty"},gym:{slug:"gym",label:"Gym & Fitness",icon:"ðï¸",templateFolder:"gym",templateReady:!0,themePrefix:"gym"},restaurant:{slug:"restaurant",label:"Restaurant",icon:"ð½ï¸",templateFolder:"restaurant",templateReady:!0,themePrefix:"restaurant"},fight:{slug:"fight",label:"Martial Arts",icon:"ð¥",templateFolder:"fight",templateReady:!1,themePrefix:"fight"},supply:{slug:"supply",label:"Supplier / Distributor",icon:"ð¦",templateFolder:"supply",templateReady:!1,themePrefix:"supply"},"mma-predictions":{slug:"mma-predictions",label:"MMA Predictions",icon:"ð®",templateFolder:"mma-predictions",templateReady:!0,themePrefix:"mma-predictions"},universal:{slug:"universal",label:"Other / Universal",icon:"ð¢",templateFolder:"universal",templateReady:!1,themePrefix:"universal"}},a=Object.keys(t);e.s(["VERTICALS",0,t,"VERTICAL_SLUGS",0,a])},4249463,e=>{"use strict";var t=e.i(5934275),a=e.i(6654612),s=e.i(427794),r=e.i(26165),i=e.i(5560552),i=i,l=e.i(6573531),n=e.i(4007205),o=e.i(6151996),c=e.i(1558278);e.i(9831597);var d=e.i(8880932),u=e.i(7981248),p=e.i(2996844),m=e.i(5535009),m=m,h=e.i(9371522),x=e.i(49695),g=e.i(4424942);let f="inkedcore.pending_coupon";function b({tier:e,vertical:a,onApply:i,onClear:l,appliedCode:o,appliedDetails:c}){var d;let[u,p]=(0,s.useState)(""),[y,v]=(0,s.useState)(null),[j,C]=(0,s.useState)(null),[w,k]=(0,s.useTransition)(),N=()=>{v(null),C(null);let t=u.trim().toUpperCase();t.length<2?v("Enter a coupon code"):k(async()=>{try{let s=await fetch("/api/billing/coupons/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:t,tier:e,vertical:a})});if(!(s.headers.get("content-type")??"").includes("application/json")){if(s.redirected||s.url.includes("/auth/sign-in")){try{sessionStorage.setItem(f,JSON.stringify({code:t,tier:e,vertical:a}))}catch{}C(`${t} saved. Click Subscribe to sign up; the coupon applies on checkout.`),p("")}else v("Coupon validation unavailable");return}if(!s.ok){let e=await s.json().catch(()=>({}));v(e.error??"Coupon validation failed");return}let r=await s.json();if(!r.valid||!r.coupon)return void v(function(e){switch(e){case"not_found":return"Coupon code not found";case"expired":return"Coupon has expired";case"exhausted":return"Coupon is no longer available";case"tier_mismatch":return"Coupon does not apply to this tier";case"vertical_mismatch":return"Coupon does not apply to this industry";case"inactive":return"Coupon is inactive";default:return"Coupon validation failed"}}(r.reason));i(t,r.coupon),p("")}catch(e){v(e instanceof Error?e.message:"Unable to validate coupon")}})};return o&&c?(0,t.jsxs)("div",{className:"border-primary/40 bg-primary/5 flex items-center justify-between gap-3 rounded-md border px-3 py-2 text-sm","data-test":"coupon-applied",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.CheckIcon,{className:"text-primary h-4 w-4"}),(0,t.jsx)("span",{className:"font-mono font-medium",children:o}),(0,t.jsx)("span",{className:"text-muted-foreground",children:null!==(d=c).percentOff?`-${d.percentOff}%`:null!==d.amountOffCents?`-$${(d.amountOffCents/100).toFixed(0)}`:d.displayName})]}),(0,t.jsx)(n.Button,{"aria-label":"Clear coupon",variant:"ghost",size:"sm",onClick:l,"data-test":"coupon-clear",children:(0,t.jsx)(x.XIcon,{className:"h-3 w-3"})})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(g.Input,{type:"text",placeholder:"Coupon code",value:u,onChange:e=>p(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),N())},disabled:w,className:"font-mono uppercase","data-test":"coupon-input"}),(0,t.jsx)(n.Button,{type:"button",variant:"outline",onClick:N,disabled:w||u.trim().length<2,"data-test":"coupon-apply",children:w?(0,t.jsx)(h.Loader2,{className:"h-4 w-4 animate-spin"}):"Apply"})]}),y?(0,t.jsx)("p",{className:"text-destructive text-xs","data-test":"coupon-error",children:y}):null,j?(0,t.jsxs)("p",{className:"text-muted-foreground flex items-start gap-1 text-xs","data-test":"coupon-pending-signup",children:[(0,t.jsx)(m.default,{className:"mt-0.5 h-3 w-3 shrink-0"}),(0,t.jsx)("span",{children:j})]}):null]})}let y={tattoo:["Portfolio & gallery","Aftercare reminders","Deposit workflow"],barber:["Walk-in queue","Recurring bookings","Loyalty rewards"],beauty:["Package deals","Treatment notes","Product retail"],gym:["Class scheduling","Member check-in","Trainer payouts"],restaurant:["Menu builder","Reservations","Kitchen tickets"],fight:["Belt progression","Competition tracking","Seminar sales"],supply:["Wholesale catalog","Van stock & routing","B2B order inbox"],"mma-predictions":["Per-fight win probability","A-vs-B fight simulator","Value vs market edge"],universal:["Flexible schedule","Custom services","Generic booking"]},v=new Set(Object.keys(p.VERTICALS));function j(e){let s,c,d,u,m,h,x,g,f,v,j,w,k,N,S,P,R,_,F,T,L,I,O,D,M=(0,a.c)(70),{tier:E,vertical:$,yearly:B,onSubscribe:U,isLoading:A,disabled:G,appliedCode:V,appliedDetails:H,onApplyCoupon:J,onClearCoupon:z}=e,K=B?E.priceYearlyCents:E.priceMonthlyCents,q=null!==K&&K>0,W=y[$],X=E.isCanaryClone?"border-primary shadow-lg":void 0,Y=`pricing-card-${E.id}`;M[0]!==E.displayName?(s=(0,t.jsx)(o.CardTitle,{children:E.displayName}),M[0]=E.displayName,M[1]=s):s=M[1],M[2]!==E.isCanaryClone?(c=E.isCanaryClone?(0,t.jsx)(l.Badge,{children:"Full Canary"}):null,M[2]=E.isCanaryClone,M[3]=c):c=M[3],M[4]!==s||M[5]!==c?(d=(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[s,c]}),M[4]=s,M[5]=c,M[6]=d):d=M[6];let Q=E.description??"Subscription tier";M[7]!==Q?(u=(0,t.jsx)(o.CardDescription,{children:Q}),M[7]=Q,M[8]=u):u=M[8],M[9]!==q||M[10]!==K||M[11]!==B?(m=(0,t.jsx)("div",{children:q?(0,t.jsxs)("p",{className:"text-3xl font-bold",children:["$",((K??0)/100).toFixed(0),(0,t.jsxs)("span",{className:"text-muted-foreground text-base font-normal",children:["/",B?"yr":"mo"]})]}):(0,t.jsx)("p",{className:"text-muted-foreground text-lg font-medium",children:"Contact sales"})}),M[9]=q,M[10]=K,M[11]=B,M[12]=m):m=M[12],M[13]!==d||M[14]!==u||M[15]!==m?(h=(0,t.jsxs)(o.CardHeader,{className:"space-y-3",children:[d,u,m]}),M[13]=d,M[14]=u,M[15]=m,M[16]=h):h=M[16],M[17]===Symbol.for("react.memo_cache_sentinel")?(x=(0,t.jsx)(r.CheckIcon,{className:"text-primary mt-0.5 h-4 w-4"}),M[17]=x):x=M[17];let Z=-1===E.maxUsers?"Unlimited users":`${E.maxUsers} users`;M[18]!==Z?(g=(0,t.jsxs)("li",{className:"flex gap-2",children:[x,(0,t.jsx)("span",{children:Z})]}),M[18]=Z,M[19]=g):g=M[19],M[20]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)(r.CheckIcon,{className:"text-primary mt-0.5 h-4 w-4"}),M[20]=f):f=M[20];let ee=-1===E.maxLocations?"Unlimited locations":`${E.maxLocations}
2 location${1===E.maxLocations?"":"s"}`;M[21]!==ee?(v=(0,t.jsxs)("li",{className:"flex gap-2",children:[f,(0,t.jsx)("span",{children:ee})]}),M[21]=ee,M[22]=v):v=M[22],M[23]===Symbol.for("react.memo_cache_sentinel")?(j=(0,t.jsx)(r.CheckIcon,{className:"text-primary mt-0.5 h-4 w-4"}),M[23]=j):j=M[23],M[24]!==E.storageGb?(w=(0,t.jsxs)("li",{className:"flex gap-2",children:[j,(0,t.jsxs)("span",{children:[E.storageGb," GB storage"]})]}),M[24]=E.storageGb,M[25]=w):w=M[25],M[26]===Symbol.for("react.memo_cache_sentinel")?(k=(0,t.jsx)(r.CheckIcon,{className:"text-primary mt-0.5 h-4 w-4"}),M[26]=k):k=M[26];let et=-1===E.domainLimit?"Unlimited domains":0===E.domainLimit?"Subdomain only":`${E.domainLimit} custom domain${1===E.domainLimit?"":"s"}`;M[27]!==et?(N=(0,t.jsxs)("li",{className:"flex gap-2",children:[k,(0,t.jsx)("span",{children:et})]}),M[27]=et,M[28]=N):N=M[28],M[29]===Symbol.for("react.memo_cache_sentinel")?(S=(0,t.jsx)(r.CheckIcon,{className:"text-primary mt-0.5 h-4 w-4"}),M[29]=S):S=M[29],M[30]!==E.enabledModules.length?(P=(0,t.jsxs)("li",{className:"flex gap-2",children:[S,(0,t.jsxs)("span",{children:[E.enabledModules.length," modules"]})]}),M[30]=E.enabledModules.length,M[31]=P):P=M[31],M[32]!==g||M[33]!==v||M[34]!==w||M[35]!==N||M[36]!==P?(R=(0,t.jsxs)("ul",{className:"space-y-2 text-sm",children:[g,v,w,N,P]}),M[32]=g,M[33]=v,M[34]=w,M[35]=N,M[36]=P,M[37]=R):R=M[37],M[38]!==W||M[39]!==$?(_=W.length>0?(0,t.jsxs)("div",{className:"bg-muted/50 rounded-md p-3",children:[(0,t.jsxs)("p",{className:"mb-1 text-xs font-medium tracking-wide uppercase",children:[p.VERTICALS[$].label," highlights"]}),(0,t.jsx)("ul",{className:"space-y-1 text-xs",children:W.map(C)})]}):null,M[38]=W,M[39]=$,M[40]=_):_=M[40],M[41]!==V||M[42]!==H||M[43]!==q||M[44]!==J||M[45]!==z||M[46]!==E.id||M[47]!==$?(F=q?(0,t.jsx)(b,{tier:E.id,vertical:$,onApply:J,onClear:z,appliedCode:V,appliedDetails:H}):null,M[41]=V,M[42]=H,M[43]=q,M[44]=J,M[45]=z,M[46]=E.id,M[47]=$,M[48]=F):F=M[48],M[49]!==R||M[50]!==_||M[51]!==F?(T=(0,t.jsxs)(o.CardContent,{className:"space-y-3",children:[R,_,F]}),M[49]=R,M[50]=_,M[51]=F,M[52]=T):T=M[52],M[53]!==U||M[54]!==E.id?(L=()=>U(E.id),M[53]=U,M[54]=E.id,M[55]=L):L=M[55];let ea=!q||G,es=`pricing-subscribe-${E.id}`;return M[56]!==A||M[57]!==q?(I=A?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.default,{className:"mr-2 h-4 w-4 animate-spin"}),"Redirectingâ¦"]}):q?"Subscribe":"Contact sales",M[56]=A,M[57]=q,M[58]=I):I=M[58],M[59]!==L||M[60]!==ea||M[61]!==e
2s||M[62]!==I?(O=(0,t.jsx)(o.CardFooter,{children:(0,t.jsx)(n.Button,{className:"w-full",onClick:L,disabled:ea,"data-test":es,children:I})}),M[59]=L,M[60]=ea,M[61]=es,M[62]=I,M[63]=O):O=M[63],M[64]!==X||M[65]!==Y||M[66]!==T||M[67]!==O||M[68]!==h?(D=(0,t.jsxs)(o.Card,{className:X,"data-test":Y,children:[h,T,O]}),M[64]=X,M[65]=Y,M[66]=T,M[67]=O,M[68]=h,M[69]=D):D=M[69],D}function C(e){return(0,t.jsxs)("li",{children:["⢠",e]},e)}e.s(["PricingCards",0,function({tiers:e,isAuthenticated:a}){let[r,i]=(0,s.useState)("tattoo"),[o,m]=(0,s.useState)(!1),[h,x]=(0,s.useState)(null),[g,b]=(0,s.useTransition)(),[y,C]=(0,s.useState)({}),w=(0,s.useRef)(!1),k=(0,s.useMemo)(()=>Object.values(p.VERTICALS),[]),N=(e,t,a)=>C(s=>({...s,[e]:{code:t,details:a}})),S=e=>{if(!a){let t=new URLSearchParams;t.set("tier",e),t.set("vertical",r);let a=y[e];a&&t.set("coupon",a.code),t.set("autoSubscribe","1");let s=`/pricing?${t.toString()}`;window.location.assign(`/auth/sign-up?next=${encodeURIComponent(s)}`);return}x(e);let t=y[e];b(async()=>{try{let a=await fetch("/api/billing/checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tierId:e,vertical:r,billingCycle:o?"yearly":"monthly",...t?{couponCode:t.code}:{}})});if(!a.ok){let e=await a.json().catch(()=>({})),t=e.error??"Checkout failed";throw Error(e.detail?`${t} (${e.detail})`:t)}let{sessionUrl:s}=await a.json();s?window.location.assign(s):d.toast.error("Checkout session missing redirect URL")}catch(e){d.toast.error(e instanceof Error?e.message:"Unable to start checkout. Please try again.")}finally{x(null)}})};return(0,s.useEffect)(()=>{if(w.current||!a)return;let e=new URL(window.location.href),t=e.searchParams.get("tier"),s=e.searchParams.get("vertical"),l=e.searchParams.get("coupon"),n="1"===e.searchParams.get("autoSubscribe"),o=null;try{let e=sessionStorage.getItem(f);e&&(o=JSON.parse(e))}catch{o=null}if(!t&&!s&&!l&&!o){w.current=!0;return}w.current=!0;let c=s&&v.has(s)?s:o?.vertical&&v.has(o.vertical)?o.vertical:null;c&&i(c);let d=l??o?.code??null,u=t??o?.tier??null;(e.searchParams.has("tier")||e.searchParams.has("vertical")||e.searchParams.has("coupon")||e.searchParams.has("autoSubscribe"))&&(e.searchParams.delete("tier"),e.searchParams.delete("vertical"),e.searchParams.delete("coupon"),e.searchParams.delete("autoSubscribe"),window.history.replaceState({},"",e.toString()));try{sessionStorage.removeItem(f)}catch{}d&&u&&(async()=>{try{let e=await fetch("/api/billing/coupons/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:d,tier:u,vertical:c??r})});if(!e.ok)return;let t=await e.json();t.valid&&t.coupon&&(N(u,d,t.coupon),n&&setTimeout(()=>S(u),0))}catch{}})()},[a]),(0,t.jsxs)("div",{className:"space-y-8","data-test":"pricing-cards",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,t.jsx)("div",{className:"flex flex-wrap justify-center gap-2",children:k.map(e=>(0,t.jsxs)(n.Button,{variant:r===e.slug?"default":"outline",size:"sm",onClick:()=>i(e.slug),"data-test":`pricing-vertical-${e.slug}`,children:[(0,t.jsx)("span",{className:"mr-2","aria-hidden":"true",children:e.icon}),e.label]},e.slug))}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(c.Label,{htmlFor:"billing-cycle",children:"Monthly"}),(0,t.jsx)(u.Switch,{id:"billing-cycle",checked:o,onCheckedChange:m,"data-test":"pricing-yearly-toggle"}),(0,t.jsxs)(c.Label,{htmlFor:"billing-cycle",children:["Yearly ",(0,t.jsx)(l.Badge,{variant:"secondary",children:"Save ~17%"})]})]})]}),(0,t.jsx)("div",{className:"grid gap-6 md:grid-cols-2 xl:grid-cols-4",children:e.map(e=>{let a=y[e.id];return(0,t.jsx)(j,{tier:e,vertical:r,yearly:o,onSubscribe:S,isLoading:h===e.id&&g,disabled:g,appliedCode:a?.code??null,appliedDetails:a?.details??null,onApplyCoupon:(t,a)=>N(e.id,t,a),onClearCoupon:()=>{let t;return t=e.id,C(e=>{let a={...e};return delete a[t],a})}},e.id)})})]})}],4249463)}]); 3 4//# debugId=221ffad5-09db-b568-0626-87e5e57735e7
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.