PageSourceSearch

https://www.tracklib.com/assets/use-pricing-state-DhvIibeE.js

js tracklib.com collected 2026-10-02 06:48:23 UTC 7,971 bytes, 1 lines download raw bytes

1import{j as e,r as E}from"./react-CaZ3b-uf.js";import{K as l,b3 as S,b4 as $,bh as R,b1 as A,b0 as F,bf as M,au as O,a2 as Y,U as V}from"./tanstack-start-BzM2Ciq7.js";import{R as x}from"./Reveal-PCaWov7S.js";import{a as z}from"./ui-utils-Bj2vDxdV.js";import{Y as g,aa as H,af as U,O as B,X as K,c as W}from"./shell--root-CfSXB45t.js";import{R as G,a as q}from"./radio-group-Bhc3Gpjg.js";import{u as X}from"./public-stats-BR2yTDQJ.js";import{g as J,h as Q}from"./tanstack-router-DdV6ARKN.js";import{b as v,a as _}from"./tier-periods-CYe6lSLh.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"[email protected]"};var a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="a3f8dada-a050-4006-9730-70dfa8ff01a1",s._sentryDebugIdIdentifier="sentry-dbid-a3f8dada-a050-4006-9730-70dfa8ff01a1")}catch{}})();const Z=z("flex flex-col gap-6 rounded-md p-6 text-card-foreground shadow-sm md:p-8",{variants:{color:{primary:"bg-card",transparent:"border border-border bg-transparent"}},defaultVariants:{color:"primary"}}),ee=({className:s,color:a,...o})=>e.jsx("div",{className:l(Z({color:a}),s),"data-slot":"card",...o}),se=({className:s,...a})=>e.jsx("div",{className:l("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-4 border-border border-b has-data-[slot=card-action]:grid-cols-[1fr_auto]",s),"data-slot":"card-header",...a}),ae=({className:s,...a})=>e.jsx("div",{className:l("font-bold text-body-xl leading-none",s),"data-slot":"card-title",...a}),re=({className:s,...a})=>e.jsx("div",{className:l("",s),"data-slot":"card-content",...a}),te=s=>{const{yearlyPeriod:a,monthlyPeriod:o,currency:r,profile:n,defaultYearly:d}=s,t=g(n,a?.price??0,r,a?.price_inc_vat??0),m=g(n,(a?.price??0)/12,r,(a?.price_inc_vat??0)/12),c=g(n,o?.price??0,r,o?.price_inc_vat??0),u=H(o,n,r),h={value:"yearly",label:"Yearly",badge:"Most popular",price:t,subLabel:"/year",strikePrice:null,secondaryLine:`${m}/month`,hasDiscount:!0},p={value:"monthly",label:"Monthly",badge:null,price:c,subLabel:u.subLabel,strikePrice:u.strikePrice,secondaryLine:u.secondaryLine,hasDiscount:u.hasDiscount};return d?[h,p]:[p,h]},oe=({pricing:s,className:a})=>{const{period:o,setPeriod:r,isLoading:n}=s,d=E.useMemo(()=>te(s),[s]);return e.jsx(G,{className:l("grid auto-rows-fr grid-cols-1 gap-6 lg:grid-cols-2",n?"invisible":"fade-in animate-in duration-300 ease-out motion-reduce:animate-none",a),onValueChange:t=>r(t),value:o,children:d.map(t=>e.jsxs("label",{className:"relative flex h-full w-full cursor-pointer items-center gap-5 rounded-xl border-2 border-input p-4 shadow-xs outline-none transition-colors has-data-[state=checked]:border-primary sm:p-6",htmlFor:`period-${t.value}`,children:[t.badge&&e.jsx("span",{className:"absolute top-[-14px] right-5 rounded-full bg-green px-3 py-1 font-bold text-background text-body-fixed-sm",children:t.badge}),e.jsx(q,{className:"size-6 cursor-pointer rounded-md md:size-10 [&_svg]:size-4 md:[&_svg]:size-6","data-testid":`period-option-${t.value}`,id:`period-${t.value}`,value:t.value,variant:"accent-check"}),e.jsxs("div",{className:"flex flex-1 flex-col gap-0.5",children:[e.jsx("span",{className:"font-bold text-body-sm",children:t.label}),t.strikePrice&&e.jsx("span",{className:"font-bold text-body-lg text-red line-through",children:t.strikePrice}),e.jsxs("span",{className:"flex flex-wrap items-baseline gap-x-1 data-[has-discount=true]:text-green","data-has-discount":t.hasDiscount,children:[e.jsx("span",{className:"whitespace-nowrap font-bold text-body-2xl",children:t.price}),e.jsx("span",{className:"whitespace-nowrap font-bold text-body-sm",children:t.subLabel})]}),t.secondaryLine&&e.jsx("p",{className:"text-body-md text-muted-foreground",children:t.secondaryLine})]})]},t.value))})},ne=150,ie=55,le=s=>{const{songs:a,sounds:o}=X();return[{icon:e.jsx(S,{}),title:`Sample ${a} real songs`,description:"Original tracks, fully licensed and ready to sample."},{icon:e.jsx($,{}),title:`${o} royalty-free sounds`,description:"High-quality loops and one-shots."},{icon:e.jsx(R,{}),title:"Fee-free licensing",description:"License your royalty-bearing samples with no upfront fees."},{icon:e.jsx(A,{}),title:"Desktop app",description:"Drag and drop samples straight to your DAW."},{icon:e.jsx(F,{}),title:"Mobile app",description:"Discover samples and make beats on the go."},{icon:e.jsx(M,{}),title:"Fresh sounds weekly",description:"New packs, exclusive drops and handpicked gems."},{icon:e.jsx(Y,{}),title:s?`${s} credits / month`:e.jsx(O,{className:"h-4 w-32"})}]},de=({credits:s,stagger:a=!1})=>{const o=le(s);return e.jsx(e.Fragment,{children:o.map((r,n)=>e.jsx(x,{delay:ne+n*ie,enabled:a,children:e.jsxs("div",{className:"grid grid-cols-[auto_1fr] items-center gap-4 [&_svg]:size-6 [&_svg]:text-muted",children:[r.icon,e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:"font-bold text-body-sm",children:r.title}),r.description&&e.jsx("span",{className:"text-body-sm text-muted-foreground",children:r.description})]})]})}
1,n))})},ce=({inviter:s})=>e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"flex flex-col break-words font-heading text-heading-lg uppercase",children:s?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-accent",children:s}),e.jsx("span",{children:"invites you to Tracklib!"})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"The only sample library"}),e.jsx("span",{className:"text-accent",children:"you'll ever need"})]})}),e.jsx("p",{className:"max-w-2xl break-words text-body-lg text-muted-foreground",children:s?`${s} welcomes you to Tracklib with a special offer!`:"Sample classic records, exclusive packs and royalty-free sounds - all in one place."})]}),Pe=({pricing:s,cta:a,className:o,stagger:r=!1})=>{const{selectedPeriod:n,isLoading:d}=s,t=n?.tier.credits_give_per_month,{inviter:m,isResolving:c}=U();return e.jsxs("div",{className:l("grid gap-12 xl:grid-cols-[1fr_auto] xl:items-start",o),children:[e.jsxs("div",{className:"flex min-w-0 flex-col gap-12",children:[e.jsx(x,{delay:0,enabled:r,children:e.jsx("div",{"aria-hidden":c||void 0,className:l("flex flex-col gap-4",c?"invisible":"fade-in animate-in fill-mode-backwards delay-100 duration-300 ease-out motion-reduce:animate-none"),children:e.jsx(ce,{inviter:m})})}),e.jsxs("div",{className:"flex flex-col gap-8",children:[e.jsx(x,{delay:90,enabled:r,children:e.jsx(oe,{pricing:s})}),e.jsx(x,{delay:180,enabled:r,children:e.jsx("div",{className:l("flex",d?"invisible":"fade-in animate-in delay-300 duration-300 ease-out motion-reduce:animate-none"),children:a})})]})]}),e.jsx(x,{delay:90,enabled:r,children:e.jsxs(ee,{className:"xl:w-96",children:[e.jsx(se,{children:e.jsx(ae,{children:"What you get"})}),e.jsx(re,{className:"flex flex-col gap-6",children:e.jsx(de,{credits:t,stagger:r})})]})})]})},ue=s=>s==="yearly"||s==="monthly",me=s=>s.free_months>0?`${s.free_months} ${s.free_months===1?"month":"months"}`:`${s.free_days} ${s.free_days===1?"day":"days"}`,pe=s=>s.free_months>0?`${s.free_months}-Month`:`${s.free_days}-Day`,we=s=>{const a=J(),o=Q({strict:!1}),{data:r}=B(),{data:n}=V(),{currency:d}=K(),{isCancelledFromTrial:t}=W(),m=n?.currency||d||"USD",c=v(r?.periods,"Yearly"),u=v(r?.periods,"Monthly"),h=T=>{a({to:".",search:C=>({...C,period:T}),replace:!0,resetScroll:!1})},p=r?.default_yearly??!0,N=p?"yearly":"monthly",y=(s?s[0]:ue(o.period)?o.period:null)??N,P=s?s[1]:h,w=y==="yearly"?c:u,f=y==="yearly"?_(r?.periods,"Yearly"):_(r?.periods,"Monthly"),k=!!f,j=o.addon==="true",D=j&&f?f:w,i=r?.trial_offer,b=!!(i&&(i.free_days>0||i.free_months>0)&&!t),L=b&&i?me(i):void 0,I=b&&i?pe(i):void 0;return{period:y,setPeriod:P,yearlyPeriod:c,monthlyPeriod:u,selectedPeriod:D,defaultYearly:p,hasAddon:k,addonSelected:j,profile:n,currency:m,isLoading:!r,trialOffer:i,offersTrial:b,trialDurationLabel:L,trialDurationAdjective:I}};export{Pe as P,we as u};

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.