1import{y as b,r as i,j as e,B as _,a2 as E,v as x,O as M,s as H,bz as K,bA as U,a1 as R,ag as Q,T as X,L as J,W as q,D as Z,a as ee,b as se,e as ae,f as te,a7 as re,A as ne}from"./index-BNrdOJig.js";import{S as A,a as D,b as P,c as I,d as k}from"./select-F0D4_o6M.js";import{c as le,u as ie,d as de,l as G,s as ce,e as oe,p as ue,f as me,h as xe,i as he,b as pe}from"./subscriptions.functions-BUoSkefH.js";import{P as L}from"./paymentGateways-CYuRFGiq.js";import{I as O}from"./input-CwAqzCK4.js";import{S as fe}from"./switch-C1ei1wwS.js";import{W as ge}from"./wand-sparkles-DSBQh42L.js";import{C as T}from"./card-BiTQ_Rx7.js";import{L as z}from"./label-5jAbssum.js";import{C as ye}from"./circle-dollar-sign-CAZcCOCn.js";import{C as je}from"./circle-x-DgJhG60J.js";import{H as B}from"./hand-coins-dG5UDIga.js";import{C as be}from"./calendar-days-ChavMRYP.js";import{C as V}from"./credit-card-DuGDEZtl.js";import"./index-BdQq_4o_.js";import"./index-Dc9JXvma.js";import"./index-xFoOlCOp.js";import"./index-CknWoRzV.js";import"./chevron-down-Bsk54EUt.js";import"./chevron-up-CzmrE-s_.js";function we(){const s=b(le),r=b(ie),y=b(de),[o,h]=i.useState(null),[p,f]=i.useState(!1),[u,c]=i.useState("5.00"),[d,N]=i.useState("20.00"),[j,g]=i.useState(L[0]?.id??"stripe"),[w,m]=i.useState(!0),[v,C]=i.useState(!1);i.useEffect(()=>{(async()=>{try{const S=(await s()).rule;S&&(h(S),f(S.enabled),c((S.threshold_cents/100).toFixed(2)),N((S.topup_cents/100).toFixed(2)),g(S.gateway_id))}finally{m(!1)}})()},[s]);const n=async()=>{C(!0);try{await r({data:{enabled:p,thresholdCents:Math.round(parseFloat(u)*100),topupCents:Math.round(parseFloat(d)*100),gatewayId:j}}),x.success("Auto-funding rule saved");const l=await s();h(l.rule)}catch(l){x.error(l.message)}finally{C(!1)}},t=async()=>{if(confirm("Remove auto-funding rule?")){C(!0);try{await y(),x.success("Removed"),h(null),f(!1)}catch(l){x.error(l.message)}finally{C(!1)}}};return e.jsxs("div",{className:"rounded-2xl border border-border bg-card/60 p-5 space-y-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-primary/15 flex items-center justify-center shrink-0",children:e.jsx(ge,{className:"w-5 h-5 text-primary"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"font-display text-lg font-bold",children:"Auto-fund my wallet"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"When your wallet dips below the threshold, we'll top it up from your saved gateway so your subscription always charges successfully."})]}),e.jsx(fe,{checked:p,onCheckedChange:f,disabled:w})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Top up when below"}),e.jsx(O,{type:"number",step:"0.01",value:u,onChange:l=>c(l.target.value),disabled:!p})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Add this amount"}),e.jsx(O,{type:"number",step:"0.01",value:d,onChange:l=>N(l.target.value),disabled:!p})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"From gateway"}),e.jsxs(A,{value:j,onValueChange:g,disabled:!p,children:[e.jsx(D,{children:e.jsx(P,{})}),e.jsx(I,{children:L.map(l=>e.jsx(k,{value:l.id,children:l.name},l.id))})]})]})]}),o?.last_run_at&&e.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["Last run: ",new Date(o.last_run_at).toLocaleString()," · ",o.last_status??"â"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(_,{onClick:n,disabled:v||w,className:"rounded-full",children:[v?e.jsx(E,{className:"w-4 h-4 animate-spin mr-2"}):null,"Save rule"]}),o&&e.jsx(_,{variant:"outline",onClick:t,disabled:v,className:"rounded-full",children:"Remove"})]}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Once a payment gateway API is configured in the admin Payment Gateways panel, the top-up will run automatically each hour. We never store your card â the gateway does."})]})}function Ne({subs:s,onChanged:r}){const y=b(G),o=b(ce),h=b(oe),{data:p}=M({queryKey:["billing-plans"],queryFn:()=>y()}),{data:f}=M({queryKey:["enabled-gateways"],queryFn:async()=>{const{data:t}=await H.from("payment_gateway_settings").select("gateway_id, checkout_url_template").eq("enabled",!0);return t??[]}}),[u,c]=i.useState(""),[d,N]=i.useState("stripe"),[j,g]=i.useState(!1),w=p?.plans??[],m=s.find(t=>t.status==="trialing"),v=s.find(t=>t.status==="pending_verification");async function C(){if(!u)return x.error("Pick a plan");g(!0);try{const t=await o({data:{planId:u,billingDay:1,gatewayId:d}});x.success(`Opening ${d} to verify your card ($${(t.verificationAmountCents/100).toFixed(2)}
1 hold, fully refundable in trial)`);const l=f?.find(a=>a.gateway_id===d)?.checkout_url_template,S=l?l.replace("{sub}",t.subscriptionId).replace("{amt}",String(t.verificationAmountCents)).replace("{currency}",t.currency):`/billing/verify?sub=${t.subscriptionId}&gw=${d}&amt=${t.verificationAmountCents}`;window.open(S,"_blank","noopener,noreferrer"),await r()}catch(t){x.error(t instanceof Error?t.message:"Could not start trial")}finally{g(!1)}}async function n(t){g(!0);try{await h({data:{subscriptionId:t}}),x.success("Trial cancelled â your hold will be refunded"),await r()}catch(l){x.error(l instanceof Error?l.message:"Could not cancel")}finally{g(!1)}}if(m){const t=w.find(l=>l.id===m.plan_id);return e.jsxs(T,{className:"p-6 border-2 border-primary/40",children:[e.jsx("h3",{className:"font-display text-lg font-black",children:"Free trial active"}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[t?.name??"Plan"," â trial ends"," ",m.trial_ends_at?new Date(m.trial_ends_at).toLocaleDateString():"soon",". Your card was verified with a refundable hold of the first ",t?.interval,"'s charge."]}),e.jsx(_,{variant:"outline",className:"mt-3",disabled:j,onClick:()=>n(m.id),children:"Cancel trial & refund hold"})]})}return v?e.jsxs(T,{className:"p-6 border-2 border-amber-500/40",children:[e.jsx("h3",{className:"font-display text-lg font-black",children:"Awaiting card verification"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Finish the gateway checkout we opened in the new tab. Once your card is verified your free trial will start automatically."})]}):e.jsxs(T,{className:"p-6",children:[e.jsx("h3",{className:"font-display text-lg font-black",children:"Start a free trial"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"$0 due today. We verify your card with a refundable hold of the first period's charge. Cancel anytime in the next 7 days for a full refund. After the trial, billing continues on your chosen interval (monthly or yearly)."}),e.jsxs("div",{className:"grid sm:grid-cols-2 gap-3 mt-4",children:[e.jsxs("div",{children:[e.jsx(z,{className:"text-xs uppercase",children:"Plan"}),e.jsxs(A,{value:u,onValueChange:c,children:[e.jsx(D,{children:e.jsx(P,{placeholder:"Choose a plan"})}),e.jsx(I,{children:w.map(t=>e.jsxs(k,{value:t.id,children:[t.name," â $",(t.price_cents/100).toFixed(2),"/",t.interval]},t.id))})]})]}),e.jsxs("div",{children:[e.jsx(z,{className:"text-xs uppercase",children:"Payment gateway"}),e.jsxs(A,{value:d,onValueChange:N,children:[e.jsx(D,{children:e.jsx(P,{})}),e.jsxs(I,{children:[e.jsx(k,{value:"stripe",children:"Stripe"}),e.jsx(k,{value:"paypal",children:"PayPal"}),e.jsx(k,{value:"square",children:"Square"}),e.jsx(k,{value:"authorize_net",children:"Authorize.Net"})]})]})]})]}),e.jsx(_,{className:"mt-4 w-full",disabled:j||!u,onClick:C,children:j?"Opening checkoutâ¦":"Verify card & start free trial"}),e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:"We never see or store your card details. The gateway holds the first-period amount and returns it instantly if you cancel during the trial."})]})}function Ve(){const s=K(),r=b(G),y=b(pe),o=b(he),h=b(xe),p=b(me),f=b(ue),[u,c]=i.useState([]),[d,N]=i.useState([]),[j,g]=i.useState([]),[w,m]=i.useState(null),[v,C]=i.useState(!0),n=async()=>{const[a,F]=await Promise.all([r(),y()]);c(a.plans),N(F.subscriptions),g(F.charges),C(!1)};i.useEffect(()=>{n()},[]);const t=i.useMemo(()=>s?u.filter(a=>a.role==="any"||a.role===s.role):u,[u,s]),l=a=>`$${(a/100).toFixed(2)}`,S=a=>new Date(a).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"});return e.jsxs(U,{profile:s,title:"Billing",subtitle:"Plans, payment method & monthly schedule",children:[e.jsxs("div",{className:"space-y-8",children:[e.jsxs("section",{children:[e.jsx("h2",{className:"font-display text-xl font-black mb-3",children:"Your subscriptions"}),v?e.jsxs("div",{className:"rounded-2xl border border-border p-10 text-center text-muted-foreground",children:[e.jsx(E,{className:"w-5 h-5 animate-spin inline mr-2"})," Loadingâ¦"]}):d.length===0?e.jsxs("div",{className:"rounded-2xl border border-border p-10 text-center",children:[e.jsx(ye,{className:"w-8 h-8 mx-auto text-muted-foreground mb-2"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"You don't have an active plan yet â pick one below."})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:d.map(a=>e.jsx(ve,{sub:a,onChange:n,updateFn:h,cancelFn:p,payNowFn:f},a.id))})]}),e.jsxs("section",{children:[e.jsx("div",{className:"flex items-end justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h2",{className:"font-display text-xl font-black",children:"Available plans"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"All plans are monthly. Card data is never stored on our servers â gateways host the form."})]})}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:t.map(a=>{const F=d.find(W=>
1W.plan_id===a.id&&W.status!=="cancelled");return e.jsxs("div",{className:"rounded-2xl border border-border bg-card/60 p-5 flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"font-display text-lg font-bold",children:a.name}),e.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground border border-border rounded-full px-2 py-0.5",children:a.role})]}),e.jsxs("div",{className:"mt-3 text-3xl font-black",children:[l(a.price_cents),e.jsx("span",{className:"text-sm text-muted-foreground font-normal",children:" /mo"})]}),a.description&&e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:a.description}),e.jsx("ul",{className:"mt-3 space-y-1.5 text-sm flex-1",children:(a.features||[]).map((W,Y)=>e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(R,{className:"w-4 h-4 text-emerald-400 shrink-0 mt-0.5"}),e.jsx("span",{children:W})]},Y))}),e.jsxs(_,{className:"mt-4 rounded-full",variant:F?"outline":"default",onClick:()=>m(a),children:[F?"Change settings":"Subscribe"," ",e.jsx(Q,{className:"w-4 h-4 ml-1"})]})]},a.id)})})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"font-display text-xl font-black mb-3",children:"Recent charges"}),e.jsx("div",{className:"rounded-2xl border border-border overflow-hidden",children:j.length===0?e.jsx("div",{className:"p-8 text-center text-sm text-muted-foreground",children:"No charges yet."}):e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left px-4 py-2",children:"Date"}),e.jsx("th",{className:"text-left px-4 py-2",children:"Source"}),e.jsx("th",{className:"text-left px-4 py-2",children:"Status"}),e.jsx("th",{className:"text-right px-4 py-2",children:"Amount"})]})}),e.jsx("tbody",{children:j.map(a=>e.jsxs("tr",{className:"border-t border-border",children:[e.jsx("td",{className:"px-4 py-2",children:S(a.created_at)}),e.jsx("td",{className:"px-4 py-2 capitalize",children:a.source}),e.jsxs("td",{className:"px-4 py-2",children:[a.status==="succeeded"&&e.jsxs("span",{className:"text-emerald-400 inline-flex items-center gap-1",children:[e.jsx(R,{className:"w-3 h-3"})," Paid"]}),a.status==="insufficient_funds"&&e.jsxs("span",{className:"text-amber-400 inline-flex items-center gap-1",children:[e.jsx(X,{className:"w-3 h-3"})," Wallet short"]}),a.status==="failed"&&e.jsxs("span",{className:"text-destructive inline-flex items-center gap-1",children:[e.jsx(je,{className:"w-3 h-3"})," Failed"]}),a.status==="pending_manual"&&e.jsxs("span",{className:"text-primary inline-flex items-center gap-1",children:[e.jsx(B,{className:"w-3 h-3"})," Awaiting manual pay"]})]}),e.jsx("td",{className:"px-4 py-2 text-right font-mono",children:l(a.amount_cents)})]},a.id))})]})})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Need to top up your wallet? ",e.jsx(J,{to:"/wallet",className:"text-primary font-bold",children:"Open your wallet â"})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"font-display text-xl font-black mb-3",children:"Wallet auto-funding"}),e.jsx(we,{})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"font-display text-xl font-black mb-3",children:"Free trial (card verified, $0 today)"}),e.jsx(Ne,{subs:d,onChanged:n}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Yearly plans get reminders 30, 7, and 1 day before renewal. Monthly plans get a 1-day reminder."})]})]}),e.jsx(Ce,{plan:w,existing:d.find(a=>a.plan_id===w?.id)??null,onClose:()=>m(null),onSaved:async()=>{m(null),await n(),x.success("Subscription updated")},subscribeFn:o,updateFn:h})]})}function ve({sub:s,onChange:r,updateFn:y,cancelFn:o,payNowFn:h}){const p=c=>`$${(c/100).toFixed(2)}`,f=new Date(s.next_charge_at),u=s.status==="active"?e.jsx("span",{className:"text-emerald-400",children:"Active"}):s.status==="grace"?e.jsx("span",{className:"text-amber-400",children:"Retry pending"}):s.status==="suspended"?e.jsx("span",{className:"text-destructive",children:"Suspended"}):e.jsx("span",{className:"text-muted-foreground",children:"Cancelled"});return e.jsxs("div",{className:"rounded-2xl border border-border bg-card/60 p-5 space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-display text-lg font-bold",children:s.plan.name}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[p(s.plan.price_cents)," / month · ",u]})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Next charge"}),e.jsxs("div",{className:"font-display text-lg flex items-center gap-1 justify-end",children:[e.jsx(be,{className:"w-4 h-4 text-primary"}),f.toLocaleDateString(void 0,{month:"short",day:"numeric"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[e.jsxs("div",{className:"rounded-lg border border-border p-2",children:[e.jsx("div",{className:"text-muted-foreground",children:"Funding"}),e.jsxs("div",{className:"font-bold flex items-center gap-1 capitalize",children:[s.funding_method==="wallet"&&e.jsx(q,{className:"w-3 h-3"}),s.funding_method==="gateway"&&e.jsx(V,{className:"w-3 h-3"}),s.funding_method==="manual"&&e.jsx(B,{className:"w-3 h-3"}),s.funding_method,s.gateway_id?` · ${s.gateway_id}`:""]})]}),e.jsxs("div",{className:"rounded-lg border border-border p-2",children:[e.jsx("div",{className:"text-muted-foreground",children:"Billing day"}),e.jsxs("div",{className:"font-bold",children:[s.billing_day," of each month"]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2 pt-1",children:[e.jsx(_,{size:"sm",variant:"outline",className:"rounded-full",onClick:async()=>{await y({data:{subscriptionId:s.id,autoRenew:!s.auto_renew}}),x.success(s.auto_renew?"Auto-renew turned off":"Auto-renew turned on"),r()},children:s.auto_renew?"Disable auto-renew":"Enable auto-renew"}),(s.status==="grace"||s.status==="active")&&s.funding_method==="wallet"&&e.jsx(_,{size:"sm",className:"rounded-full",onClick:async()=>{const d=(await h({data:{subscriptionId:s.id}}))?.result?.ok;x[d?"success":"error"](d?"Wallet charged":"Wallet was short â top up and retry"),r()},children:"Pay now from wallet"}
1),s.status!=="cancelled"&&e.jsx(_,{size:"sm",variant:"ghost",className:"rounded-full text-destructive",onClick:async()=>{confirm("Cancel this subscription?")&&(await o({data:{subscriptionId:s.id}}),x.success("Subscription cancelled"),r())},children:"Cancel"})]})]})}function Ce({plan:s,existing:r,onClose:y,onSaved:o,subscribeFn:h,updateFn:p}){const[f,u]=i.useState(r?.billing_day??1),[c,d]=i.useState(r?.funding_method??"wallet"),[N,j]=i.useState(r?.gateway_id??"stripe"),[g,w]=i.useState(r?.auto_renew??!0),[m,v]=i.useState(!1);i.useEffect(()=>{s&&(u(r?.billing_day??new Date().getDate()),d(r?.funding_method??"wallet"),j(r?.gateway_id??"stripe"),w(r?.auto_renew??!0))},[s?.id,r?.id]);const C=async()=>{if(s){v(!0);try{r?await p({data:{subscriptionId:r.id,billingDay:f,fundingMethod:c,gatewayId:c==="gateway"?N:null,autoRenew:g}}):await h({data:{planId:s.id,billingDay:f,fundingMethod:c,gatewayId:c==="gateway"?N:null,autoRenew:g}}),c==="gateway"&&x.info("We'll open the gateway pop-up next time we charge so you can confirm â your card is held by them, not us."),await o()}catch(n){x.error(n?.message??"Couldn't save subscription")}finally{v(!1)}}};return s?e.jsx(Z,{open:!!s,onOpenChange:n=>!n&&y(),children:e.jsxs(ee,{className:"bg-card border-border max-w-lg",children:[e.jsxs(se,{children:[e.jsxs(ae,{className:"font-display text-2xl",children:[r?"Update":"Subscribe to"," ",s.name]}),e.jsxs(te,{className:"text-sm",children:["$",(s.price_cents/100).toFixed(2)," per month. We never store or see your card â gateways handle that."]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground mb-2",children:"How do you want to pay each month?"}),e.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[e.jsx($,{icon:q,label:"Charge my Wallet",desc:"Safest â no card stored. Auto-renew uses the funds in your MO Streams wallet.",selected:c==="wallet",onClick:()=>d("wallet")}),e.jsx($,{icon:V,label:"Auto-charge a gateway",desc:"Card / PayPal / crypto held securely by your chosen provider. They charge themselves on schedule.",selected:c==="gateway",onClick:()=>d("gateway")}),e.jsx($,{icon:B,label:"Charge me manually",desc:"We just remind you 3 days before. You decide when and how to pay each month.",selected:c==="manual",onClick:()=>d("manual")})]})]}),c==="gateway"&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground mb-1",children:"Gateway"}),e.jsxs(A,{value:N,onValueChange:j,children:[e.jsx(D,{children:e.jsx(P,{})}),e.jsx(I,{children:L.map(n=>e.jsx(k,{value:n.id,children:n.name},n.id))})]}),e.jsx("p",{className:"text-[11px] text-muted-foreground mt-1",children:"A secure pop-up from this provider opens on charge day â they see your card, we don't."})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-muted-foreground mb-1",children:"Bill me on dayâ¦"}),e.jsxs(A,{value:String(f),onValueChange:n=>u(Number(n)),children:[e.jsx(D,{children:e.jsx(P,{})}),e.jsx(I,{children:Array.from({length:28},(n,t)=>t+1).map(n=>e.jsxs(k,{value:String(n),children:["Day ",n," of each month"]},n))})]})]}),e.jsxs("label",{className:"flex items-start gap-2 text-sm rounded-lg border border-border p-3",children:[e.jsx("input",{type:"checkbox",checked:g,onChange:n=>w(n.target.checked),className:"mt-1"}),e.jsxs("span",{children:[e.jsx("span",{className:"font-bold",children:"Auto-renew every month"}),e.jsx("span",{className:"block text-xs text-muted-foreground",children:"Turn off to pay manually each month even if you picked Wallet or Gateway."})]})]}),e.jsxs("div",{className:"rounded-lg border border-border bg-background/40 p-3 text-xs flex items-start gap-2",children:[e.jsx(re,{className:"w-4 h-4 text-emerald-400 shrink-0 mt-0.5"}),e.jsx("p",{children:"We never store or see your card. Every gateway opens its own secure pop-up where the card is held by them. The Wallet option doesn't touch a card at all."})]})]}),e.jsxs(ne,{className:"flex-row gap-2 sm:justify-end",children:[e.jsx(_,{variant:"outline",onClick:y,className:"rounded-full",disabled:m,children:"Cancel"}),e.jsxs(_,{onClick:C,className:"rounded-full",disabled:m,children:[m?e.jsx(E,{className:"w-4 h-4 mr-1 animate-spin"}):null,r?"Save changes":"Subscribe"]})]})]})}):null}
1function $({icon:s,label:r,desc:y,selected:o,onClick:h}){return e.jsxs("button",{type:"button",onClick:h,className:`text-left rounded-lg border p-3 flex gap-3 transition ${o?"border-primary bg-primary/10":"border-border bg-background/40 hover:border-primary/50"}`,children:[e.jsx(s,{className:`w-5 h-5 mt-0.5 ${o?"text-primary":"text-muted-foreground"}`}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"text-sm font-bold",children:r}),e.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:y})]}),o&&e.jsx(R,{className:"w-5 h-5 text-primary"})]})}export{Ve as component};
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.