PageSourceSearch

https://21st.dev/_next/static/chunks/14306-eb3fdef111149c74.js

js 21st.dev collected 2026-10-02 07:10:44 UTC 34,365 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[14306],{1833:(e,t,r)=>{r.d(t,{gi:()=>s});var n=r(501277),a=r(882315);function s(){let e,t=(0,n.c)(1),r=(0,a.useRef)(null);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={getId:e=>(r.current=function(e,t,r=()=>crypto.randomUUID()){return e?.key===t?e:{key:t,id:r()}}(r.current,e.join(":")),r.current.id),clear(){r.current=null},clearIfTerminal(e,t){e>=400&&e<500&&429!==e&&"checkout_in_progress"!==t&&(r.current=null)}},t[0]=e):e=t[0],e}},63347:(e,t,r)=>{r.d(t,{b:()=>l});var n=r(465915),a=r(501277),s=r(144758),i=r(528688);function l(e){let t,r,l,o,d=(0,a.c)(14),{interval:c,onChange:u,yearlySavePct:m,ariaLabel:p,className:h,hideSave:x,disabled:b}=e,f=void 0===p?"Billing period":p,g=void 0!==x&&x,y=void 0!==b&&b;return d[0]!==h?(t=(0,i.cn)("inline-flex w-fit",h),d[0]=h,d[1]=t):t=d[1],d[2]!==y||d[3]!==g||d[4]!==c||d[5]!==u||d[6]!==m?(r=s.aU.map(e=>(0,n.jsxs)("button",{type:"button","aria-label":"year"===e?`Yearly, save ${m}%`:"Quarterly",onClick:()=>u(e),"aria-pressed":c===e,disabled:y,className:(0,i.cn)("whitespace-nowrap rounded-md px-2.5 py-1 text-xs font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary/70 disabled:pointer-events-none disabled:opacity-60",c===e?"bg-background text-foreground shadow-sm ring-1 ring-foreground/5 dark:shadow-none":"text-muted-foreground hover:text-foreground"),children:["year"===e?"Yearly":"Quarterly","year"===e&&!g&&(0,n.jsxs)("span",{className:"text-blue-600",children:[" \xb7 Save ",m,"%"]})]},e)),d[2]=y,d[3]=g,d[4]=c,d[5]=u,d[6]=m,d[7]=r):r=d[7],d[8]!==f||d[9]!==r?(l=(0,n.jsx)("div",{className:"inline-flex w-fit rounded-lg bg-muted p-0.5",role:"group","aria-label":f,children:r}),d[8]=f,d[9]=r,d[10]=l):l=d[10],d[11]!==t||d[12]!==l?(o=(0,n.jsx)("div",{className:t,children:l}),d[11]=t,d[12]=l,d[13]=o):o=d[13],o}},113216:(e,t,r)=>{r.d(t,{i:()=>f});var n=r(465915),a=r(501277),s=r(63347),i=r(887015),l=r(528688),o=r(256610);function d(e){let t,r,s,d,c,u,m,p,h,x,b,f,g,y,v,j,w,N,k,S=(0,a.c)(66),{enabled:C,onEnabledChange:T,allowance:_,onAllowanceChange:A,interval:$,baseLabel:P,aiLabel:I,aiCreditsSuffix:M,baseMonthlyPriceCents:L,monthlyPriceCents:z,priceSuffix:E,disabled:q,className:U}=e,Y=void 0===M?"monthly credits":M,B=void 0===E?"/ month":E,O=void 0!==q&&q;S[0]!==U?(t=(0,l.cn)("rounded-xl bg-muted/60 p-2",U),S[0]=U,S[1]=t):t=S[1];let D=!C;S[2]!==T?(r=()=>T(!1),S[2]=T,S[3]=r):r=S[3];
1let F=C?"border-border bg-background hover:border-foreground/40":"border-primary bg-primary/5";S[4]!==F?(s=(0,l.cn)("min-w-0 cursor-pointer rounded-lg border px-3 py-2.5 text-left transition-[background-color,border-color,transform] duration-150 active:scale-[0.98] disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100",F),S[4]=F,S[5]=s):s=S[5],S[6]!==P?(d=(0,n.jsx)("span",{className:"block truncate text-sm font-medium text-foreground",children:P}),S[6]=P,S[7]=d):d=S[7],S[8]===Symbol.for("react.memo_cache_sentinel")?(c=(0,n.jsx)("span",{className:"block text-xs/5 text-muted-foreground",children:"No monthly AI credits"}),S[8]=c):c=S[8],S[9]!==L||S[10]!==$||S[11]!==B?(u=L?(0,n.jsxs)("span",{className:"mt-1 block text-xs font-medium tabular-nums text-foreground",children:[(0,i.lJ)(L($))," ",B]}):null,S[9]=L,S[10]=$,S[11]=B,S[12]=u):u=S[12],S[13]!==P||S[14]!==O||S[15]!==u||S[16]!==D||S[17]!==r||S[18]!==s||S[19]!==d?(m=(0,n.jsxs)("button",{type:"button","aria-label":P,"aria-pressed":D,disabled:O,onClick:r,className:s,children:[d,c,u]}),S[13]=P,S[14]=O,S[15]=u,S[16]=D,S[17]=r,S[18]=s,S[19]=d,S[20]=m):m=S[20],S[21]!==T?(p=()=>T(!0),S[21]=T,S[22]=p):p=S[22];let J=C?"border-primary bg-primary/5":"border-border bg-background hover:border-foreground
1/40";S[23]!==J?(h=(0,l.cn)("min-w-0 cursor-pointer rounded-lg border px-3 py-2.5 text-left transition-[background-color,border-color,transform] duration-150 active:scale-[0.98] disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100",J),S[23]=J,S[24]=h):h=S[24],S[25]!==I?(x=(0,n.jsx)("span",{className:"block truncate text-sm font-medium text-foreground",children:I}),S[25]=I,S[26]=x):x=S[26],S[27]!==_?(b=_.toLocaleString(),S[27]=_,S[28]=b):b=S[28],S[29]!==Y||S[30]!==b?(f=(0,n.jsxs)("span",{className:"block text-xs/5 text-muted-foreground",children:[b," ",Y]}),S[29]=Y,S[30]=b,S[31]=f):f=S[31],S[32]!==_||S[33]!==$||S[34]!==z||S[35]!==B?(g=z?(0,n.jsxs)("span",{className:"mt-1 block text-xs font-medium tabular-nums text-foreground",children:[(0,i.lJ)(z(_,$))," ",B]}):null,S[32]=_,S[33]=$,S[34]=z,S[35]=B,S[36]=g):g=S[36],S[37]!==I||S[38]!==O||S[39]!==C||S[40]!==p||S[41]!==h||S[42]!==x||S[43]!==f||S[44]!==g?(y=(0,n.jsxs)("button",{type:"button","aria-label":I,"aria-pressed":C,disabled:O,onClick:p,className:h,children:[x,f,g]}),S[37]=I,S[38]=O,S[39]=C,S[40]=p,S[41]=h,S[42]=x,S[43]=f,S[44]=g,S[45]=y):y=S[45],S[46]!==m||S[47]!==y?(v=(0,n.jsxs)("div",{role:"group","aria-label":"Plan type",className:"grid grid-cols-2 gap-2",children:[m,y]}),S[46]=m,S[47]=y,S[48]=v):v=S[48];let R=!C,Z=!C,Q=C?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0";S[49]!==Q?(j=(0,l.cn)("grid transition-[grid-template-rows,opacity] duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] motion-reduce:transition-none",Q),S[49]=Q,S[50]=j):j=S[50];let K=O||!C;return S[51]!==_||S[52]!==$||S[53]!==z||S[54]!==A||S[55]!==K?(w=(0,n.jsx)("div",{className:"min-h-0 overflow-hidden",children:(0,n.jsx)(o.K,{value:_,onChange:A,interval:$,disabled:K,monthlyPriceCents:z,className:"mt-2"})}),S[51]=_,S[52]=$,S[53]=z,S[54]=A,S[55]=K,S[56]=w):w=S[56],S[57]!==R||S[58]!==Z||S[59]!==j||S[60]!==w?(N=(0,n.jsx)("div",{"aria-hidden":R,inert:Z,className:j,children:w}),S[57]=R,S[58]=Z,S[59]=j,S[60]=w,S[61]=N):N=S[61],S[62]!==v||S[63]!==N||S[64]!==t?(k=(0,n.jsxs)("div",{className:t,children:[v,N]}),S[62]=v,S[63]=N,S[64]=t,S[65]=k):k=S[65],k}let c={builder:"Builder",pro:"Pro"};function u(e){let t,r,s,l,o,d,u,m,p=(0,a.c)(17),{state:h,membership:x}=e;if("loading"===h||"clear"===h||"unknown"===h)return null;if("legacy"===h){let e;return p[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsxs)(i.id,{children:[(0,n.jsx)("p",{className:"font-medium",children:"Cancel your legacy plan first"}),(0,n.jsx)("p",{className:"mt-1 text-muted-foreground",children:"You still have an active legacy plan. Cancel it in billing before starting a Team plan."})]}),p[0]=e):e=p[0],e}let b=x?.currentPeriodEnd;p[1]!==b?(t=(0,i.FU)(b),p[1]=b,p[2]=t):t=p[2];let f=t,g=c[x?.plan??"builder"]??"personal";p[3]!==x?(r=x?.amountCents&&x.amountCents>0?(0,i.lJ)(x.amountCents):null,p[3]=x,p[4]=r):r=p[4];let y=r;if("ending"===h){let e,t;p[5]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)("p",{className:"font-medium",children:"Your personal plan is ending"}),p[5]=e):e=p[5];let r=f?`Your personal plan already ends on ${f} and will not renew. Team billing starts today.`:"Your personal plan is already set to end and will not renew. Team billing starts today.";return p[6]!==r?(t=(0,n.jsxs)(i.id,{children:[e,(0,n.jsx)("p",{className:"mt-1 text-muted-foreground",children:r})]}),p[6]=r,p[7]=t):t=p[7],t}let v=x?.status??"active";s="trialing"===v?f?`Your personal trial runs until ${f}. Continue and it ends then instead of turning into a paid plan.`:"Continue and your personal trial ends instead of turning into a paid plan.":"past_due"===v||"unpaid"===v?"Your personal plan has a payment that did not go through. Continue and it stops renewing, so only the Team plan is billed from today.":"paused"===v?"Your personal plan is paused and is not being billed. Continue and it stops renewing, so it will never start charging again.":f?`Continue and your personal plan stops renewing. You keep it until ${f}, and Team billing starts today.`:"Continue and your personal plan stops renewing. You keep it for the rest of the peri
1od you paid for, and Team billing starts today.",p[8]===Symbol.for("react.memo_cache_sentinel")?(l=(0,n.jsx)("p",{className:"font-medium",children:"Switch your personal plan"}),p[8]=l):l=p[8];let j=y?`You pay ${y} for ${g} personally. A Team seat already includes everything that plan gives you, so we do not sell you both.`:`You already have a personal ${g} plan. A Team seat already includes everything it gives you, so we do not sell you both.`;return p[9]!==j?(o=(0,n.jsx)("p",{className:"mt-1 text-muted-foreground",children:j}),p[9]=j,p[10]=o):o=p[10],p[11]!==s?(d=(0,n.jsx)("p",{className:"mt-1 text-muted-foreground",children:s}),p[11]=s,p[12]=d):d=p[12],p[13]===Symbol.for("react.memo_cache_sentinel")?(u=(0,n.jsx)("p",{className:"mt-1 text-muted-foreground",children:"Changed your mind? You can resume the personal plan any time from billing."}),p[13]=u):u=p[13],p[14]!==o||p[15]!==d?(m=(0,n.jsxs)(i.id,{children:[l,o,d,u]}),p[14]=o,p[15]=d,p[16]=m):m=p[16],m}var m=r(861275),p=r(672045);function h(e,t){return(0,m.Dc)(t,"pro",e)}function x(e){return(0,m.Dc)(e,"builder")}function b(e){let t,r,s,o,d,c,u,m,h,x,b,f,g=(0,a.c)(32),{seats:y,onSeatsChange:v,aiEnabled:j,aiAllowance:w,periodTotalCents:N,periodLabel:k,disabled:S,className:C}=e;g[0]!==C?(t=(0,l.cn)("overflow-hidden rounded-xl border border-border bg-background",C),g[0]=C,g[1]=t):t=g[1],g[2]!==S||g[3]!==v||g[4]!==y?(r=(0,n.jsx)("div",{className:"px-4 py-4",children:(0,n.jsx)(p.c,{seats:y,onChange:v,disabled:S})}),g[2]=S,g[3]=v,g[4]=y,g[5]=r):r=g[5];let T=j?"Team Builder + AI":"Team Builder";return g[6]!==T?(s=(0,n.jsx)("p",{className:"font-medium text-foreground",children:T}),g[6]=T,g[7]=s):s=g[7],g[8]!==w||g[9]!==j?(o=j?`${w.toLocaleString()} monthly credits per seat`:"No monthly AI credits",g[8]=w,g[9]=j,g[10]=o):o=g[10],g[11]!==o?(d=(0,n.jsx)("p",{className:"mt-0.5 text-xs/5 text-muted-foreground",children:o}),g[11]=o,g[12]=d):d=g[12],g[13]!==s||g[14]!==d?(c=(0,n.jsxs)("div",{className:"min-w-0",children:[s,d]}),g[13]=s,g[14]=d,g[15]=c):c=g[15],g[16]===Symbol.for("react.memo_cache_sentinel")?(u=(0,n.jsx)("p",{className:"text-xs text-muted-foreground",children:"Total"}),g[16]=u):u=g[16],g[17]!==N?(m=(0,i.lJ)(N),g[17]=N,g[18]=m):m=g[18],g[19]!==k||g[20]!==m?(h=(0,n.jsxs)("div",{className:"shrink-0 text-right",children:[u,(0,n.jsxs)("p",{className:"font-semibold tabular-nums text-foreground",children:[m," / ",k]})]}),g[19]=k,g[20]=m,g[21]=h):h=g[21],g[22]!==h||g[23]!==c?(x=(0,n.jsxs)("div",{className:"flex items-end justify-between gap-6 border-t border-border/70 px-4 py-4",children:[c,h]}),g[22]=h,g[23]=c,g[24]=x):x=g[24],g[25]!==y?(b=(0,n.jsxs)("p",{className:"border-t border-border/70 bg-muted/60 px-4 py-3 text-xs/5 text-muted-foreground",children:["One selected plan applies to all ",y," seats. Tax is calculated at checkout."]}),g[25]=y,g[26]=b):b=g[26],g[27]!==t||g[28]!==x||g[29]!==b||g[30]!==r?(f=(0,n.jsxs)("div",{className:t,children:[r,x,b]}),g[27]=t,g[28]=x,g[29]=b,g[30]=r,g[31]=f):f=g[31],f}function f(e){let t,r,i,o,c,p,f,g=(0,a.c)(32),{interval:y,onIntervalChange:v,seats:j,onSeatsChange:w,aiEnabled:N,onAiEnabledChange:k,aiAllowance:S,onAiAllowanceChange:C,editableAi:T,disabled:_,personalPlan:A,className:$}=e,P=void 0===T||T,I=void 0!==_&&_;g[0]!==S||g[1]!==N||g[2]!==y||g[3]!==j?(t=(0,m.fi)(y,j,N,S),g[0]=S,g[1]=N,g[2]=y,g[3]=j,g[4]=t):t=g[4];let M=t,L="year"===y?"year":"3 months";return g[5]!==$?(r=(0,l.cn)("space-y-4",$),g[5]=$,g[6]=r):r=g[6],g[7]!==S||g[8]!==N||g[9]!==I||g[10]!==P||g[11]!==y||g[12]!==C||g[13]!==k||g[14]!==v?(i=P?(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,n.jsx)("h2",{className:"text-base font-semibold text-foreground",children:"Choose a plan"}),v?(0,n.jsx)(s.b,{interval:y,onChange:v,yearlySavePct:(0,m.at)(),ariaLabel:"Team billing period",disabled:I}):null]}),(0,n.jsx)(d,{enabled:N,onEnabledChange:k,allowance:S,onAllowanceChange:C,interval:y,baseLabel:"Team Builder",aiLabel:"Team Builder + AI",aiCreditsSuffix:"credits per seat / month",baseMonthlyPriceCents:x,monthlyPriceCents:h,priceSuffix:"/ seat / month",disabled:I})]}):v?(0,n.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,n.jsx)("h2",{className:"text-base font-semibold text-foreground",children:"Billing period"}),(0,n.jsx)(s.b,{interval:y,onChange:v,yearlySavePct:(0,m.at)(),ariaLabel:"Team billing period",disabled:I})]}):null,g[7]=S,g[8]=N,g[9]=I,g[10]=P,g[11]=y,g[12]=C,g[13]=k,g[14]=v,g[15]=i):i=g[15],g[16]===Symbol.for("react.memo_cache_sentinel")?(o=(0,n.jsx)("h2",{id:"team-order-details-heading",className:"text-base font-semibold text-foreground",children:"Order details"}),g[16]=o):o=g[16],g[17]!==S||g[18]!==N||g[19]!==I||g[20]!==w||g[21]!==L||g[22]!==M||g[23]!==j?(c=(0,n.jsx)(b,{seats:j,onSeatsChange:w,aiEnabled:N,aiAllowance:S,periodTotalCents:M,periodLabel:L,disabled:I}),g[17]=S,g[18]=N,g[19]=I,g[20]=w,g[21]=L,g[22]=M,g[23]=j,g[24]=c):c=g[24],g[25]!==A?(p=A?(0,n.jsx)(u,{state:A.state,membership:A.membership}):null,g[25]=A,g[26]=p):p=g[26],g[27]!==r||g[28]!==i||g[29]!==c||g[30]!==p?(f=(0,n.jsxs)("section",{className:r,"aria-labelledby":"team-order-details-heading",children:[i,o,c,p]}),g[27]=r,g[28]=i,g[29]=c,g[30]=p,g[31]=f):f=g[31],f}},114306:(e,t,r)=>{r.d(t,{u:()=>v});var n=r(465915),a=r(872144),s=r(398590),i=r(935232),l=r(271920),o=r(221917),d=r(996607),c=r(882315),u=r(518367),m=r(800779),p=r(987460),h=r(617671),x=r
1(861275),b=r(245020),f=r(113216),g=r(327495),y=r(1833);function v({paywallSource:e,open:t,onOpenChange:r,initialInterval:j="quarter",initialSeats:w=x.iv,initialAiEnabled:N=!1,initialAiAllowance:k=h.MZ,lockInterval:S=!1,lockAiConfiguration:C=!1,backLabel:T,onBack:_,onDraftChange:A,existingTeam:$}){let{isSignedIn:P}=(0,i.d)(),I=(0,s.KX)(),[M,L]=(0,c.useState)(j),[z,E]=(0,c.useState)(w),[q,U]=(0,c.useState)(N),[Y,B]=(0,c.useState)(k),[O,D]=(0,c.useState)(!1),F=(0,y.gi)(),J=(0,d.useRouter)(),R=(0,g.M)();(0,c.useEffect)(()=>{t&&(L(j),E(w),U(N),B(k))},[t,k,N,j,w]);let Z=(0,x.fi)(M,z,q,Y);function Q(e){r(e),e||(F.clear(),window.setTimeout(()=>{D(!1)},200))}async function K(){if(!P){let t=new URL((0,a.z_)("/pricing",{...(0,a.zq)(),paywallSource:(0,a.zq)().paywallSource??e}),window.location.origin);t.searchParams.set("interval",M),t.searchParams.set("seats",String(z)),t.searchParams.set("aiEnabled",String(q)),t.searchParams.set("proMonthlyCredits",String(Y)),t.searchParams.set("checkout","team"),window.setTimeout(()=>{I({redirectUrl:t.toString(),afterSignInUrl:t.toString()})},0);return}if("legacy"===R.state)return void J.push("/settings/billing");if(D(!0),"switch"===R.state){let e=await R.runSwitch();if(!e.ok){u.toast.error(e.message),D(!1);return}}try{let t=Z/100,r=$?window.location.pathname:"/",n=new URL(window.location.origin+r);n.searchParams.set("amount",t.toFixed(2));let s=F.getId([$?.id??"new",M,z,q?"ai-on":"ai-off",Y]),i=await (0,b.I)({interval:M,seats:z,aiEnabled:q,aiAllowance:Y,checkoutAttemptId:s,existingTeam:$,paywallSource:(0,a.zq)().paywallSource??e,successUrl:n.toString(),cancelUrl:`${window.location.origin}${r}`});if("checkout"!==i.kind){R.applyServerDecision(i),D(!1);return}window.location.href=i.url}catch(e){e.status&&F.clearIfTerminal(e.status,e.code),u.toast.error(e instanceof Error?e.message:"Failed to start checkout."),D(!1)}}return(0,n.jsx)(p.lG,{open:t,onOpenChange:Q,children:(0,n.jsxs)(p.Cf,{className:"sm:max-w-2xl",children:[_?(0,n.jsxs)("button",{type:"button",onClick:function(){F.clear(),D(!1),_?.()},className:"mb-1 inline-flex w-fit items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[(0,n.jsx)(l.A,{className:"size-4"}),T??"Back"]}):null,(0,n.jsxs)(p.c7,{children:[(0,n.jsx)(p.L3,{children:$?`Choose seats for ${$.name}`:C?"Confirm Team plan":"Start your team"}),(0,n.jsx)(p.rr,{children:C?"Choose the number of seats. Your selected Team plan applies to everyone.":"Choose the seat count and one plan for the whole team."})]}),(0,n.jsx)(p.R4,{className:"min-w-0",children:(0,n.jsx)(f.i,{personalPlan:{state:R.state,membership:R.membership},interval:M,onIntervalChange:S?void 0:function(e){L(e),A?.({interval:e,seats:z,aiEnabled:q,aiAllowance:Y})},seats:z,onSeatsChange:function(e){E(e),A?.({interval:M,seats:e,aiEnabled:q,aiAllowance:Y})},aiEnabled:q,onAiEnabledChange:function(e){U(e),A?.({interval:M,seats:z,aiEnabled:e,aiAllowance:Y})},aiAllowance:Y,onAiAllowanceChange:function(e){B(e),A?.({interval:M,seats:z,aiEnabled:q,aiAllowance:e})},editableAi:!C,disabled:O})}),(0,n.jsxs)(p.Es,{className:"sm:justify-between",children:[_?(0,n.jsx)("span",{}):(0,n.jsx)(m.$,{type:"button",variant:"outline",onClick:()=>Q(!1),children:"Cancel"}),(0,n.jsx)(m.$,{type:"button",onClick:K,disabled:O||"loading"===R.state,children:O?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.A,{className:"mr-2 h-4 w-4 animate-spin"}),R.isSwitching?"Switching…":"Redirecting…"]}):R.primaryLabel(Z,z)})]})]})})}},245020:(e,t,r)=>{r.d(t,{I:()=>o});var n=r(872144),a=r(431495),s=r(828979),i=r(508591),l=r(861275);async function o({paywallSource:e=(0,n.zq)().paywallSource,interval:t,seats:r,aiEnabled:d,aiAllowance:c,checkoutAttemptId:u,successUrl:m,cancelUrl:p,existingTeam:h}){let[x,b]=await Promise.all([(0,s.Sb)(),Promise.resolve((0,a.TH)((0,a.c6)()))]),f=(0,l.zo)(r,d),g=crypto.randomUUID();(0,i.X)({name:"checkout_started",eventId:g});let y=await fetch("/api/21st/team-membership/create-checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({interval:t,...e?{paywallSource:e}:{},...f,proMonthlyCredits:c,checkoutAttemptId:u,icEventId:g,teamId:h?.id,...h?{teamName:h.name}:{},successUrl:m,cancelUrl:(0,n.z_)(p,{...(0,n.zq)(),paywallSource:e}),...x,...b})}),v=await y.json();if(!y.ok){if("personal_membership_active"===v.code&&v.membership)return{kind:"switch_required",membership:v.membership};if("legacy_subscription_active"===v.code)return{kind:"legacy_blocked"}}if(!y.ok||!v.url){let e=Error(v.error||"Failed to start checkout");throw Object.assign(e,{status:y.status,code:v.code}),e}return{kind:"checkout",url:v.url}}},256610:(e,t,r)=>{r.d(t,{K:()=>p});var n=r(465915),a=r(501277),s=r(126628),i=r(882315),l=r(234723),o=r
1(144758),d=r(843585),c=r(528688),u=r(887015);function m(e,t){return d.qp[e][t]/o.ns[t]}function p(e){let t,r,o,p,h,x,b,f,g,y,v,j=(0,a.c)(34),{value:w,onChange:N,interval:k,disabled:S,className:C,monthlyPriceCents:T,showSelectedPrice:_}=e,A=void 0!==S&&S,$=void 0!==_&&_,[P,I]=(0,i.useState)(!1),M=(0,i.useId)(),L=T??m;j[0]!==w?(t=w.toLocaleString(),j[0]=w,j[1]=t):t=j[1];let z=`Monthly AI credits: ${t}`;return j[2]!==C?(r=(0,c.cn)("flex h-9 w-full items-center justify-between gap-3 rounded-lg border border-border bg-background px-3 text-left text-sm text-foreground transition-[background-color,border-color,transform] duration-150 hover:border-foreground/40 active:scale-[0.99] disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100",C),j[2]=C,j[3]=r):r=j[3],j[4]!==w?(o=w.toLocaleString(),j[4]=w,j[5]=o):o=j[5],j[6]!==o?(p=(0,n.jsxs)("span",{className:"min-w-0 truncate font-medium",children:[o," monthly credits"]}),j[6]=o,j[7]=p):p=j[7],j[8]!==k||j[9]!==L||j[10]!==$||j[11]!==w?(h=$&&(0,n.jsxs)(n.Fragment,{children:[(0,u.lJ)(L(w,k)),"/mo"]}),j[8]=k,j[9]=L,j[10]=$,j[11]=w,j[12]=h):h=j[12],j[13]===Symbol.for("react.memo_cache_sentinel")?(x=(0,n.jsx)(s.A,{className:"size-4"}),j[13]=x):x=j[13],j[14]!==h?(b=(0,n.jsxs)("span",{className:"flex shrink-0 items-center gap-2 text-muted-foreground",children:[h,x]}),j[14]=h,j[15]=b):b=j[15],j[16]!==A||j[17]!==b||j[18]!==z||j[19]!==r||j[20]!==p?(f=(0,n.jsx)(l.Wv,{asChild:!0,children:(0,n.jsxs)("button",{type:"button",disabled:A,"aria-label":z,className:r,children:[p,b]})}),j[16]=A,j[17]=b,j[18]=z,j[19]=r,j[20]=p,j[21]=f):f=j[21],j[22]!==M||j[23]!==k||j[24]!==N||j[25]!==L||j[26]!==w?(g=d.wy.map(e=>{let t=w===e;return(0,n.jsxs)("label",{className:(0,c.cn)("flex min-h-10 w-full cursor-pointer items-center gap-2 rounded-md px-2.5 py-2 text-left text-sm has-focus-visible:ring-2 has-focus-visible:ring-primary/70",t?"bg-primary/10 text-primary":"text-foreground hover:bg-accent"),children:[(0,n.jsx)("input",{type:"radio",name:M,value:e,checked:t,onChange:()=>{N(e),I(!1)},className:"sr-only"}),(0,n.jsxs)("span",{className:"flex-1 font-medium",children:[e.toLocaleString()," credits"]}),(0,n.jsxs)("span",{className:(0,c.cn)("tabular-nums",t?"text-primary":"text-muted-foreground"),children:[(0,u.lJ)(L(e,k)),"/mo"]})]},e)}),j[22]=M,j[23]=k,j[24]=N,j[25]=L,j[26]=w,j[27]=g):g=j[27],j[28]!==g?(y=(0,n.jsx)(l.hl,{forceDark:!1,align:"start",className:"z-[10002] w-[var(--radix-popover-trigger-width)] p-1",children:(0,n.jsx)("fieldset",{"aria-label":"Monthly AI credits",children:g})}),j[28]=g,j[29]=y):y=j[29],j[30]!==P||j[31]!==f||j[32]!==y?(v=(0,n.jsxs)(l.AM,{open:P,onOpenChange:I,children:[f,y]}),j[30]=P,j[31]=f,j[32]=y,j[33]=v):v=j[33],v}},327495:(e,t,r)=>{r.d(t,{M:()=>l});var n=r(882315),a=r(887015),s=r(612586);let i="We could not change your personal plan just now. Nothing was charged. Try again in a moment.";function l(){let{membership:e,isActive:t,legacyBlocksNewPlan:r,isLoading:l,isError:o,refetch:d}
1=(0,s.x1)(),[c,u]=(0,n.useState)(null),[m,p]=(0,n.useState)(!1),h="clear";c?h="legacy"===c.kind?"legacy":"switch":l?h="loading":o?h="unknown":r?h="legacy":t&&e.cancelAtPeriodEnd?h="ending":t&&(h="switch");let x=c?.kind==="switch"?c.membership:t?{stripeSubscriptionId:"",stripeCustomerId:null,plan:e.plan,status:e.status??"active",amountCents:e.amountCents,interval:e.interval??null,currentPeriodEnd:e.currentPeriodEnd,cancelAtPeriodEnd:e.cancelAtPeriodEnd,source:"database"}:null,b=(0,n.useCallback)((e,t)=>{if("loading"===h)return"Checking your plan…";if("legacy"===h)return"Open billing";let r=`${(0,a.lJ)(e)} for ${t} seats`;return"switch"===h?`Switch to Team \xb7 ${r}`:`Continue \xb7 ${r}`},[h]),f=(0,n.useCallback)(async()=>{p(!0);try{let e=await fetch("/api/21st/membership/switch-to-team",{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}),t=await e.json().catch(()=>null);if(!e.ok)return{ok:!1,message:t?.error||i};return u(null),await d(),{ok:!0,personalEndsAt:t?.personalEndsAt??null}}catch{return{ok:!1,message:i}}finally{p(!1)}},[d]),g=(0,n.useCallback)(e=>{u("legacy_blocked"===e.kind?{kind:"legacy"}:{kind:"switch",membership:e.membership})},[]);return{state:h,membership:x,isSwitching:m,primaryLabel:b,runSwitch:f,applyServerDecision:g}}},617671:(e,t,r)=>{r.d(t,{MT:()=>l,MZ:()=>a,f2:()=>d,f4:()=>s,kT:()=>o});var n=r(861990);let a=r(843585).TI,s={builder:0,pro:n.tX},i={500:{quarter:7500,year:22500},1e3:{quarter:15e3,year:45e3},2e3:{quarter:3e4,year:9e4}},l={builder:{quarter:3e3,year:9e3},pro:i[a]};function o(e){return"pro"===e?"pro":"builder"}function d(e,t,r=a){return"pro"===e?i[r][t]:l.builder[t]}},672045:(e,t,r)=>{r.d(t,{c:()=>c});var n=r(465915),a=r(501277),s=r(498755),i=r(459317),l=r(800779),o=r(528688),d=r(861275);function c(e){let t,r,c,u,m,p,h,x,b,f,g,y=(0,a.c)(26),{seats:v,onChange:j,disabled:w,minimumSeats:N,className:k}=e,S=void 0!==w&&w,C=void 0===N?d.iv:N,T=Math.max(d.iv,C);y[0]!==k?(t=(0,o.cn)("flex items-center justify-between gap-4",k),y[0]=k,y[1]=t):t=y[1],y[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("p",{className:"font-medium text-foreground",children:"Seats"}),(0,n.jsx)("p",{className:"text-xs text-muted-foreground",children:"One plan applies to every team member."})]}),y[2]=r):r=y[2],y[3]!==j||y[4]!==v?(c=()=>j(v-1),y[3]=j,y[4]=v,y[5]=c):c=y[5];let _=S||v<=T;y[6]===Symbol.for("react.memo_cache_sentinel")?(u=(0,n.jsx)(s.A,{className:"size-4"}),y[6]=u):u=y[6],y[7]!==c||y[8]!==_?(m=(0,n.jsx)(l.$,{type:"button",variant:"outline",size:"icon",onClick:c,disabled:_,"aria-label":"Remove one Team seat",children:u}),y[7]=c,y[8]=_,y[9]=m):m=y[9],y[10]!==v?(p=(0,n.jsx)("output",{"aria-live":"polite",className:"min-w-7 text-center font-medium tabular-nums text-foreground",children:v}),y[10]=v,y[11]=p):p=y[11],y[12]!==j||y[13]!==v?(h=()=>j(v+1),y[12]=j,y[13]=v,y[14]=h):h=y[14];let A=S||v>=d.QL;return y[15]===Symbol.for("react.memo_cache_sentinel")?(x=(0,n.jsx)(i.A,{className:"size-4"}),y[15]=x):x=y[15],y[16]!==h||y[17]!==A?(b=(0,n.jsx)(l.$,{type:"button",variant:"outline",size:"icon",onClick:h,disabled:A,"aria-label":"Add one Team seat",children:x}),y[16]=h,y[17]=A,y[18]=b):b=y[18],y[19]!==b||y[20]!==m||y[21]!==p?(f=(0,n.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5",role:"group",children:[m,p,b]}),y[19]=b,y[20]=m,y[21]=p,y[22]=f):f=y[22],y[23]!==f||y[24]!==t?(g=(0,n.jsxs)("section",{"aria-label":"Team seat quantity",className:t,children:[r,f]}),y[23]=f,y[24]=t,y[25]=g):g=y[25],g}},861275:(e,t,r)=>{r.d(t,{Dc:()=>x,En:()=>b,QL:()=>c,R:()=>f,UK:()=>h,aO:()=>l,at:()=>g,fi:()=>p,iv:()=>d,rY:()=>m,sF:()=>s,zo:()=>u});var n=r(617671);let a={builder:{quarter:n.MT.builder.quarter/3,year:n.MT.builder.year/12},pro:{quarter:n.MT.pro.quarter/3,year:n.MT.pro.year/12}},s=["Centralized billing","Shared collections","Admin controls"],i={builder:"Builder",pro:"Builder + AI"};function l(e,t){let r=i[e];return void 0===t?r:`${r} seat${1===t?"":"s"}`}l("builder",1),n.f4.builder,l("pro",1),n.f4.pro;let o={quarter:3,year:12},d=2,c=50;function u(e,t){return t?{builderSeats:0,proSeats:e}:{builderSeats:e,proSeats:0}}function m({builderSeats:e,proSeats:t}){return 0===e||0===t}function p(e,t,r,a=n.MZ){return(0,n.f2)(r?"pro":"builder",e,a)*t}function h(e){let t=e/100;return Number.isInteger(t)?`$${t}`:`$${t.toFixed(2)}`}function x(e,t,r=n.MZ){return(0,n.f2)(t,e,r)/o[e]}function b({builderSeats:e,proSeats:t}){return e+t}function f(e,t,r=n.MZ){return function(e,{builderSeats:t,proSeats:r},a=n.MZ){return t*x(e,"builder")+r*x(e,"pro",a)}(e,t,r)*o[e]}function g(){return Math.round((1-a.builder.year/a.builder.quarter)*100)}},887015:(e,t,r)=>{r.d(t,{Cm:()=>w,FU:()=>m,GH:()=>g,GZ:()=>v,Ty:()=>j,cM:()=>y,cQ:()=>p,id:()=>b,j6:()=>h,lJ:()=>u,uL:()=>x,x2:()=>f});var n=r(465915),a=r(501277),s=r(265018),i=r(271920),l=r(910410),o=r.n(l),d=r(71500),c=r(528688);function u(e){let t=Math.abs(e)/100,r=Number.isInteger(t)?t.toString():t.toFixed(2);return`${e<0?"−":""}$${r}`}function m(e){if(!e)return null;let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.getTime())?null:t.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})}function p(e){let t,r,s=(0,a.c)(5),{children:i,className:l}=e;
1return s[0]!==l?(t=(0,c.cn)("flex flex-col gap-6 pt-8 pb-24",l),s[0]=l,s[1]=t):t=s[1],s[2]!==i||s[3]!==t?(r=(0,n.jsx)("div",{className:t,children:i}),s[2]=i,s[3]=t,s[4]=r):r=s[4],r}function h(e){let t,r,s=(0,a.c)(5),{children:i,className:l}=e;return s[0]!==l?(t=(0,c.cn)("relative left-1/2 w-[calc(100vw-2rem)] max-w-5xl -translate-x-1/2 sm:w-[calc(100vw-3rem)]",l),s[0]=l,s[1]=t):t=s[1],s[2]!==i||s[3]!==t?(r=(0,n.jsx)("div",{className:t,children:i}),s[2]=i,s[3]=t,s[4]=r):r=s[4],r}function x(e){let t,r,s,i,l=(0,a.c)(11),{name:o,label:d,detail:c,className:u}=e,m=void 0===d?"Current plan":d;return l[0]!==m?(t=(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:m}),l[0]=m,l[1]=t):t=l[1],l[2]!==o?(r=(0,n.jsx)("h2",{className:"mt-0.5 text-3xl font-semibold tracking-tight text-foreground",children:o}),l[2]=o,l[3]=r):r=l[3],l[4]!==c?(s=c?(0,n.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:c}):null,l[4]=c,l[5]=s):s=l[5],l[6]!==u||l[7]!==t||l[8]!==r||l[9]!==s?(i=(0,n.jsxs)("div",{className:u,children:[t,r,s]}),l[6]=u,l[7]=t,l[8]=r,l[9]=s,l[10]=i):i=l[10],i}function b(e){let t,r,i,l,o,u=(0,a.c)(14),{children:m,tone:p,className:h}=e,x="destructive"===(void 0===p?"default":p),b=x?"bg-destructive/5":"bg-muted/60";u[0]!==h||u[1]!==b?(t=(0,c.cn)("flex items-start gap-3 rounded-xl px-4 py-3.5",b,h),u[0]=h,u[1]=b,u[2]=t):t=u[2],u[3]!==x?(r=x?(0,n.jsx)(s.A,{className:"mt-0.5 size-4 shrink-0 text-destructive"}):(0,n.jsx)(d.yri,{className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),u[3]=x,u[4]=r):r=u[4];let f=x?"text-destructive":"text-foreground";return u[5]!==f?(i=(0,c.cn)("min-w-0 flex-1 text-sm leading-relaxed",f),u[5]=f,u[6]=i):i=u[6],u[7]!==m||u[8]!==i?(l=(0,n.jsx)("div",{className:i,children:m}),u[7]=m,u[8]=i,u[9]=l):l=u[9],u[10]!==t||u[11]!==r||u[12]!==l?(o=(0,n.jsxs)("div",{className:t,children:[r,l]}),u[10]=t,u[11]=r,u[12]=l,u[13]=o):o=u[13],o}function f(e){let t,r,s,i,l,o=(0,a.c)(14),{amount:d,unit:c,billed:u,detail:m,className:p}=e,h=void 0===c?"per month":c;return o[0]!==h?(t=(0,n.jsx)("span",{className:"ml-1.5 text-sm font-medium text-muted-foreground",children:h}),o[0]=h,o[1]=t):t=o[1],o[2]!==d||o[3]!==t?(r=(0,n.jsxs)("p",{className:"text-2xl font-semibold tracking-tight text-foreground",children:[d,t]}),o[2]=d,o[3]=t,o[4]=r):r=o[4],o[5]!==u?(s=(0,n.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:u}),o[5]=u,o[6]=s):s=o[6],o[7]!==m?(i=m?(0,n.jsx)("p",{className:"mt-0.5 text-sm tabular-nums text-muted-foreground",children:m}):null,o[7]=m,o[8]=i):i=o[8],o[9]!==p||o[10]!==r||o[11]!==s||o[12]!==i?(l=(0,n.jsxs)("div",{className:p,children:[r,s,i]}),o[9]=p,o[10]=r,o[11]=s,o[12]=i,o[13]=l):l=o[13],l}function g(e){let t,r,s=(0,a.c)(7),{onClick:i,disabled:l,tone:o,className:d}=e,u=void 0!==l&&l,m="destructive"===(void 0===o?"default":o)?"text-destructive":"text-foreground";return s[0]!==d||s[1]!==m?(t=(0,c.cn)("mt-0.5 font-medium underline underline-offset-2 transition-opacity hover:opacity-70 disabled:opacity-50",m,d),s[0]=d,s[1]=m,s[2]=t):t=s[2],s[3]!==u||s[4]!==i||s[5]!==t?(r=(0,n.jsx)("button",{type:"button",onClick:i,disabled:u,className:t,children:"See billing details"}),s[3]=u,s[4]=i,s[5]=t,s[6]=r):r=s[6],r}function y(e){let t,r,s,i=(0,a.c)(5),{className:l}=e;return i[0]!==l?(t=(0,c.cn)("text-sm text-muted-foreground",l),i[0]=l,i[1]=t):t=i[1],i[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,n.jsx)(o(),{href:"/pricing",className:"underline underline-offset-2 hover:text-foreground",children:"Pricing"}),i[2]=r):r=i[2],i[3]!==t?(s=(0,n.jsxs)("p",{className:t,children:["View all plans & features on the"," ",r," ","page."]}),i[3]=t,i[4]=s):s=i[4],s}function v(e){let t,r,s,l,o,d=(0,a.c)(13),{title:u,onBack:m,backLabel:p,disabled:h,className:x}=e,b=void 0===p?"Back to Billing":p,f=void 0!==h&&h;return d[0]!==x?(t=(0,c.cn)("space-y-3",x),d[0]=x,d[1]=t):t=d[1],d[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,n.jsx)(i.A,{className:"size-4"}),d[2]=r):r=d[2],d[3]!==b||d[4]!==f||d[5]!==m?(s=(0,n.jsxs)("button",{type:"button",onClick:m,disabled:f,className:"inline-flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground disabled:opacity-50",children:[r,b]}),d[3]=b,d[4]=f,d[5]=m,d[6]=s):s=d[6],d[7]!==u?(l=(0,n.jsx)("h2",{className:"text-xl font-semibold tracking-tight text-foreground",children:u}),d[7]=u,d[8]=l):l=d[8],d[9]!==t||d[10]!==s||d[11]!==l?(o=(0,n.jsxs)("div",{className:t,children:[s,l]}),d[9]=t,d[10]=s,d[11]=l,d[12]=o):o=d[12],o}function j(e){let t,r,s=(0,a.c)(10),{selected:i,onSelect:l,children:o,disabled:d,className:u,ariaLabel:m}=e,p=void 0!==d&&d,h=i?"border-primary bg-primary/5":"border-border hover:border-foreground
1/40";return s[0]!==u||s[1]!==h?(t=(0,c.cn)("relative w-full rounded-lg border px-4 py-2.5 text-left text-sm text-foreground outline-offset-2 transition-[background-color,border-color,transform] duration-150 active:scale-[0.97] focus-visible:outline-2 focus-visible:outline-primary/70 disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100",h,u),s[0]=u,s[1]=h,s[2]=t):t=s[2],s[3]!==m||s[4]!==o||s[5]!==p||s[6]!==l||s[7]!==i||s[8]!==t?(r=(0,n.jsx)("button",{type:"button",role:"radio","aria-checked":i,"aria-label":m,disabled:p,onClick:l,className:t,children:o}),s[3]=m,s[4]=o,s[5]=p,s[6]=l,s[7]=i,s[8]=t,s[9]=r):r=s[9],r}function w(e){let t,r,s,i,l,o,d,m,p,h,x,b,f=(0,a.c)(37),{items:g,subtotalCents:y,totalCents:v,totalLabel:j,taxLabel:w,showSubtotal:N,showTax:k,pending:S,children:C,className:T}=e,_=void 0===v?y:v,A=void 0===j?"Total due today":j,$=void 0===w?"Calculated at checkout":w,P=void 0===N||N,I=void 0===k||k,M=void 0!==S&&S?"animate-pulse rounded bg-muted text-transparent":void 0;if(f[0]!==T?(t=(0,c.cn)("overflow-hidden rounded-xl bg-muted/60 px-4 text-sm",T),f[0]=T,f[1]=t):t=f[1],f[2]!==g||f[3]!==M){let e;f[5]!==M?(e=e=>(0,n.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("p",{className:"font-medium text-foreground",children:e.title}),e.description&&(0,n.jsx)("p",{className:"text-xs text-muted-foreground",children:e.description})]}),null!=e.monthlyCents&&(0,n.jsxs)("span",{className:(0,c.cn)("shrink-0 tabular-nums text-foreground",M),children:[u(e.monthlyCents),"/mo"]}),null!=e.amountCents&&(0,n.jsx)("span",{className:(0,c.cn)("shrink-0 tabular-nums text-foreground",M),children:u(e.amountCents)})]},e.key),f[5]=M,f[6]=e):e=f[6],r=g.map(e),f[2]=g,f[3]=M,f[4]=r}else r=f[4];return f[7]!==C||f[8]!==r?(s=(0,n.jsxs)("div",{className:"space-y-3 py-4",children:[r,C]}),f[7]=C,f[8]=r,f[9]=s):s=f[9],f[10]!==M||f[11]!==P||f[12]!==y?(i=P&&(0,n.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,n.jsx)("span",{className:"text-muted-foreground",children:"Subtotal"}),(0,n.jsx)("span",{className:(0,c.cn)("tabular-nums text-foreground",M),children:u(y)})]}),f[10]=M,f[11]=P,f[12]=y,f[13]=i):i=f[13],f[14]!==I||f[15]!==$?(l=I&&(0,n.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,n.jsx)("span",{className:"text-muted-foreground",children:"Tax"}),(0,n.jsx)("span",{className:"text-right text-muted-foreground",children:$})]}),f[14]=I,f[15]=$,f[16]=l):l=f[16],f[17]!==A?(o=(0,n.jsx)("span",{className:"text-foreground",children:A}),f[17]=A,f[18]=o):o=f[18],f[19]!==M?(d=(0,c.cn)("text-lg tabular-nums text-foreground",M),f[19]=M,f[20]=d):d=f[20],f[21]!==_?(m=u(_),f[21]=_,f[22]=m):m=f[22],f[23]!==d||f[24]!==m?(p=(0,n.jsx)("span",{className:d,children:m}),f[23]=d,f[24]=m,f[25]=p):p=f[25],f[26]!==o||f[27]!==p?(h=(0,n.jsxs)("div",{className:"flex items-center justify-between gap-4 border-t border-border/60 pt-2 font-medium",children:[o,p]}),f[26]=o,f[27]=p,f[28]=h):h=f[28],f[29]!==i||f[30]!==l||f[31]!==h?(x=(0,n.jsxs)("div",{className:"space-y-2 border-t border-border/60 py-3.5",children:[i,l,h]}),f[29]=i,f[30]=l,f[31]=h,f[32]=x):x=f[32],f[33]!==x||f[34]!==t||f[35]!==s?(b=(0,n.jsxs)("div",{className:t,children:[s,x]}),f[33]=x,f[34]=t,f[35]=s,f[36]=b):b=f[36],b}}}]);

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.