PageSourceSearch

https://music-prod.com/assets/Vyre-CY1ATW2F.js

js music-prod.com collected 2026-09-29 12:34:38 UTC 24,410 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-query-REUEbryQ.js";import{u as s,r as t}from"./vendor-react-tIoPkRwd.js";import{B as r,f as a,I as n,X as o,R as i,D as l,a as d,b as c,c as m,d as x,g as p,ac as u}from"./index--0ud_HHy.js";import{u as h,b}from"./useVyreExpansions-78Z_uhHg.js";import{a as f}from"./useVyreVersions-1iF7r97z.js";import{D as j,a as g,b as v,e as N,f as w}from"./dropdown-menu-BhjWH65A.js";import{S as y,s as k,u as C,a as S}from"./StudioPrototypeShell-BVmvXgVU.js";import{S as R}from"./search-_JRoWt2Y.js";import{L as E}from"./list-BWMfzf2M.js";import{G as V}from"./grid-2x2-BQswnUaf.js";import{W as _}from"./wand-sparkles-CiwRmzuC.js";import{C as P}from"./chevron-right-0eTVlG1M.js";import{I as Y}from"./info-O2IQVtLI.js";import{B as L}from"./boxes-CIRdT8he.js";import{H as I}from"./heart-DmdPMtb5.js";import{S as z}from"./shield-check-D0Z_Ion2.js";import{S as M}from"./sparkles-B8pZP29O.js";import{A as O}from"./archive-HPrh893-.js";import{C as A}from"./clock-3-BwiM1g5T.js";import"./vendor-ui-BVtOlGvj.js";import"./vendor-supabase-BcbvpzCe.js";import"./memberCodes-D8CLuRSK.js";import"./check-ekX4Q09Q.js";import"./circle-DNRAjJQk.js";import"./avatar-c931wG66.js";import"./index-C7SvN4ly.js";import"./useSamples-B_N49dgg.js";import"./useProjectFiles-6gAyIFer.js";import"./useCourses-xdaRKKLV.js";import"./useCourseCategories-CHRMRi9s.js";import"./clock-Bhs4QKh8.js";import"./audio-lines-DULcR7cS.js";import"./package-CkDJiKTU.js";import"./folder-kanban-D7t3RK-S.js";import"./graduation-cap-ByWPWr0j.js";import"./music-2-C3kKuYfW.js";const B="music-prod-studio-prototype-vyre-favorites",D="music-prod-studio-prototype-vyre-recents";function F(e,s){try{const t=JSON.parse(e.getItem(s)||"[]");return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch{return[]}}function $(e,s,t=12){return[s,...e.filter(e=>e!==s)].slice(0,t)}function q(e,s){const t=new Set(e);return t.has(s)?t.delete(s):t.add(s),t}function U(e){if(!e)return"Not scheduled";const s=new Date(e);return Number.isNaN(s.getTime())?e:new Intl.DateTimeFormat("en",{day:"numeric",month:"short",year:"numeric"}).format(s)}function H({section:s,userName:t,membership:n,onHome:o,onSamples:i,onProjects:l,onVyre:d,onCourses:c,onUpdates:m,onSection:x}){const p=[{id:"all",label:"All Expansions",icon:L},{id:"released",label:"Released",icon:z},{id:"coming",label:"Coming",icon:M},{id:"stock",label:"Stock Content",icon:O},{id:"favorites",label:"Favorites",icon:I},{id:"recent",label:"Recently Viewed",icon:A}];return e.jsx(y,{userName:t,membership:n,sectionLabel:"VYRE Library",children:p.map(t=>e.jsxs(r,{variant:"ghost",title:t.label,onClick:()=>x(t.id),className:a("mb-1 h-9 w-full justify-start rounded-md px-2 text-xs max-lg:justify-center",s===t.id&&"bg-secondary text-foreground"),children:[e.jsx(t.icon,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"max-lg:hidden",children:t.label})]},t.id))})}function T({mode:s,query:t,sort:a,view:i,count:l,version:d,versionLoading:c,versionUnavailable:m,inputRef:x,onMode:p,onQuery:u,onSort:h,onView:b}){var f;const y=[{id:"catalog",label:"Catalog order"},{id:"newest",label:"Newest"},{id:"oldest",label:"Oldest"},{id:"name-asc",label:"Name A-Z"},{id:"name-desc",label:"Name Z-A"}];return e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:"flex min-h-20 items-center gap-5 border-b border-border px-5 py-4",children:[e.jsxs("div",{className:"min-w-52",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h1",{className:"text-xl font-semibold tracking-normal",children:"VYRE"}),e.jsx("span",{className:"rounded border border-border px-2 py-0.5 font-mono text-[10px] text-muted-foreground",children:c?"Loading version":m?"Version unavailable":`v${d||"Not listed"}`})]}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Music-Prod virtual instrument"})]}),e.jsxs("div",{className:"relative ml-auto w-full max-w-md",children:[e.jsx(R,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(n,{ref:x,value:t,onChange:e=>u(e.target.value),placeholder:"presets"===s?"Search indexed presets or categories...":"Search expansions...",className:"h-9 rounded-md pl-9 pr-9 text-xs"}),t&&e.jsx(r,{variant:"ghost",size:"icon","aria-label":"Clear search",className:"absolute right-1 top-1 h-7 w-7 rounded",onClick:()=>u(""),children:e.jsx(o,{})})]}),e.jsxs("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:[l," results"]})]}),e.jsxs("div",{className:"flex min-h-12 items-center gap-2 overflow-x-auto border-b border-border px-4",children:[e.jsx("div",{className:"flex shrink-0 gap-1",children:[{id:"expansions",label:"Browse Expansions",compact:"Expansions"},{id:"presets",label:"Browse Presets",compact:"Presets"},{id:"information",label:"VYRE Information",compact:"Info"}].map(t=>e.jsxs(r,{variant:s===t.id?"secondary":"ghost",size:"sm",className:"h-8 rounded-md text-xs",onClick:()=>p(t.id),children:[e.jsx("span",{className:"max-lg:hidden",children:t.label}),e.jsx("span",{className:"lg:hidden",children:t.compact})]},t.id))}),"expansions"===s&&e.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[e.jsxs(j,{children:[e.jsx(g,{asChild:!0,children:e.jsxs(r,{variant:"outline",size:"sm",className:"h-8 rounded-md text-xs max-lg:hidden",children:["Sort: ",null==(f=y.find(e=>e.id===a))?void 0:f.label]})}),e.jsx(v,{align:"end",children:e.jsx(N,{value:a,onValueChange:e=>h(e),children:y.map(s=>e.jsx(w,{value:s.id,className:"text-xs",children:s.label},s.id))})})]}),e.jsxs("div",{className:"ml-1 flex border border-border max-lg:hidden",children:[e.jsx(r,{variant:"list"===i?"
1secondary":"ghost",size:"icon","aria-label":"List view",className:"h-8 w-8 rounded-none",onClick:()=>b("list"),children:e.jsx(E,{})}),e.jsx(r,{variant:"grid"===i?"secondary":"ghost",size:"icon","aria-label":"Grid view",className:"h-8 w-8 rounded-none",onClick:()=>b("grid"),children:e.jsx(V,{})})]})]})]})]})}function J({packs:s,view:t,selectedId:n,favorites:o,section:i,query:l,onSelect:d,onFavorite:c,onBrowse:m,onClear:x}){if(!s.length){const s=l?`No results for “${l}”`:"favorites"===i?"No favorite expansions yet":"recent"===i?"No recently viewed expansions":"No VYRE content available",t="favorites"===i?"Favorite an expansion to keep it close.":"recent"===i?"Browse an expansion and it will appear here.":"No substitute catalog entries are shown.";return e.jsx(re,{icon:R,title:s,detail:t,children:l&&e.jsx(r,{variant:"outline",size:"sm",className:"mt-4 rounded-md",onClick:x,children:"Clear search"})})}return"grid"===t?e.jsx("div",{className:"grid content-start grid-cols-2 gap-2 overflow-y-auto p-3 2xl:grid-cols-3",children:s.map(s=>e.jsxs("article",{"data-studio-vyre-pack":s.id,onClick:()=>d(s),onDoubleClick:()=>m(s),className:a("cursor-default border border-border bg-card p-2 hover:border-brand/50",n===s.id&&"border-brand bg-brand/10"),children:[e.jsx(ee,{pack:s,size:"large"}),e.jsxs("div",{className:"mt-3 flex gap-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-xs font-medium",children:s.name}),e.jsx(se,{pack:s})]}),e.jsx(te,{active:o.has(s.id),name:s.name,onClick:()=>c(s.id)})]}),e.jsx("p",{className:"mt-3 truncate border-t border-border/70 pt-2 text-[10px] text-muted-foreground",children:s.release_date||(s.is_stock?"Stock content":"Release date unavailable")})]},s.id))}):e.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[e.jsxs("div",{role:"row",className:"sticky top-0 z-10 grid h-8 grid-cols-[42px_minmax(170px,1.4fr)_90px_100px_minmax(130px,1fr)_38px] items-center gap-3 border-b border-border bg-background/95 px-3 text-[10px] uppercase text-muted-foreground",children:[e.jsx("span",{}),e.jsx("span",{children:"Expansion"}),e.jsx("span",{children:"Status"}),e.jsx("span",{children:"Release"}),e.jsx("span",{children:"Description"}),e.jsx("span",{})]}),s.map(s=>e.jsxs("div",{"data-studio-vyre-pack":s.id,role:"row",tabIndex:0,onClick:()=>d(s),onDoubleClick:()=>m(s),className:a("grid h-14 cursor-default grid-cols-[42px_minmax(170px,1.4fr)_90px_100px_minmax(130px,1fr)_38px] items-center gap-3 border-b border-border/60 px-3 outline-none hover:bg-secondary/50 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring",n===s.id&&"bg-secondary"),children:[e.jsx(ee,{pack:s,size:"small"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-xs font-medium",children:s.name}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:s.is_stock?"Stock library":"Expansion"})]}),e.jsx(se,{pack:s}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:s.release_date||"Not listed"}),e.jsx("span",{className:"truncate text-[10px] text-muted-foreground",children:s.description||"VYRE catalog content"}),e.jsx(te,{active:o.has(s.id),name:s.name,onClick:()=>c(s.id)})]},s.id))]})}function Q({pack:s,presets:t,query:a,category:n,loading:o,unavailable:l,onCategory:d,onLoad:c}){if(!s)return e.jsx(re,{icon:_,title:"Select an expansion first",detail:"Choose an expansion to read its authoritative public preset index."});if(o)return e.jsx(ae,{icon:i,title:"Loading the preset index...",detail:`Reading published metadata for ${s.name}`,spin:!0});if(l)return e.jsx(ae,{icon:i,title:"Preset index unavailable",detail:"Installed preset files remain native-app only."});const m=Array.from(new Set(t.map(e=>e.category))).sort();return e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[e.jsxs("div",{className:"flex min-h-10 items-center gap-1 overflow-x-auto border-b border-border px-3",children:[e.jsx(r,{variant:"all"===n?"secondary":"ghost",size:"sm",className:"h-7 rounded-md text-[10px]",onClick:()=>d("all"),children:"All"}),m.map(s=>e.jsx(r,{variant:n===s?"secondary":"ghost",size:"sm",className:"h-7 shrink-0 rounded-md text-[10px]",onClick:()=>d(s),children:s},s))]}),t.length?e.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[e.jsxs("div",{className:"grid h-8 grid-cols-[minmax(180px,1fr)_140px_110px] items-center border-b border-border px-4 text-[10px] uppercase text-muted-foreground",children:[e.jsx("span",{children:"Preset"}),e.jsx("span",{children:"Category"}),e.jsx("span",{children:"Action"})]}),t.map(s=>e.jsxs("div",{"data-studio-vyre-preset":s.id,className:"grid h-12 grid-cols-[minmax(180px,1fr)_140px_110px] items-center border-b border-border/60 px-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-xs font-medium",children:s.name}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Public catalog index"})]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:s.category}),e.jsxs(r,{variant:"ghost",size:"sm",className:"h-7 justify-start rounded-md text-[10px]",onClick:()=>c(s),children:["Load preview ",e.jsx(P,{})]})]},s.id))]}):e.jsx(re,{icon:R,title:a?`No presets for “${a}”`:"No indexed presets available",detail:"Installed preset files are available only to the native Music-Prod Studio app."})]})}
1function W({version:s,releaseDate:t,versionUnavailable:r,packCount:a}){return e.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[e.jsxs("section",{className:"grid grid-cols-4 border-b border-border",children:[e.jsx(oe,{label:"Public catalog version",value:r?"Unavailable":s||"Not listed",real:!0}),e.jsx(oe,{label:"Catalog expansions",value:String(a),real:!0}),e.jsx(oe,{label:"Installation",value:"Not connected"}),e.jsx(oe,{label:"Preset access",value:"Native app only"})]}),e.jsxs("section",{className:"border-b border-border p-5",children:[e.jsx("p",{className:"text-[10px] font-semibold uppercase text-muted-foreground",children:"Real web data"}),e.jsx("h2",{className:"mt-2 text-base font-semibold",children:"Public VYRE catalog"}),e.jsxs("p",{className:"mt-2 max-w-2xl text-xs leading-5 text-muted-foreground",children:["Version ",s||"unavailable",t?`, published ${U(t)}`:"",". Expansion and preset names are read from the public Music-Prod catalog. Catalog availability does not establish ownership or local installation."]})]}),e.jsxs("section",{className:"p-5",children:[e.jsx("p",{className:"text-[10px] font-semibold uppercase text-muted-foreground",children:"Native macOS workflow · prototype only"}),e.jsx("h2",{className:"mt-2 text-base font-semibold",children:"VYRE installation"}),e.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:"Installation status is available only to the native Music-Prod Studio app."}),e.jsx(ne,{steps:["Music-Prod Studio","Detect installed VYRE plugin","Resolve authoritative VYRE identity","Read installed version","Connect installed expansions","Open VYRE workspace"]})]})]})}function G({pack:s,presetCount:t,favorite:a,onFavorite:n,onBrowse:o}){return s?e.jsxs("aside",{className:"w-72 shrink-0 overflow-y-auto border-l border-border bg-background max-xl:hidden",children:[e.jsxs("div",{className:"border-b border-border p-4",children:[e.jsx(ee,{pack:s,size:"hero"}),e.jsxs("div",{className:"mt-4 flex items-start gap-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h2",{className:"text-base font-semibold tracking-normal",children:s.name}),e.jsx("div",{className:"mt-2",children:e.jsx(se,{pack:s})})]}),e.jsx(te,{active:a,name:s.name,onClick:n})]}),e.jsxs(r,{variant:"brand",className:"mt-4 w-full rounded-md",onClick:o,children:[e.jsx(_,{}),"Browse workflow preview"]}),e.jsx("p",{className:"mt-2 text-center text-[10px] text-muted-foreground",children:"Prototype only. No plugin or content is opened."})]}),e.jsxs(ie,{title:"Catalog details",children:[e.jsx(le,{label:"Content",value:s.is_stock?"Stock library":"Expansion"}),e.jsx(le,{label:"Release",value:s.release_date||"Not listed"}),e.jsx(le,{label:"Indexed presets",value:void 0===t?"Select Presets":String(t)})]}),s.description&&e.jsx(ie,{title:"About",children:e.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:s.description})}),e.jsx(ie,{title:"Access boundary",children:e.jsx("p",{className:"text-[10px] leading-5 text-muted-foreground",children:"Catalog metadata is public web data. Entitlement and installed expansion state are not inferred here."})})]}):e.jsx("aside",{className:"grid w-72 shrink-0 place-items-center border-l border-border p-6 text-center max-xl:hidden",children:e.jsxs("div",{children:[e.jsx(Y,{className:"mx-auto h-6 w-6 text-muted-foreground"}),e.jsx("p",{className:"mt-3 text-xs font-medium",children:"No expansion selected"}),e.jsx("p",{className:"mt-1 text-[10px] text-muted-foreground",children:"Select catalog content to inspect its details."})]})})}function Z({title:s,kind:t,open:a,onOpenChange:n}){const o="preset"===t?["Select preset","Verify VYRE installation","Resolve preset","Open VYRE","Load preset"]:["Open VYRE","Verify entitlement","Resolve installed VYRE","Resolve selected content","Open native VYRE workspace"];return e.jsx(l,{open:a,onOpenChange:n,children:e.jsxs(d,{className:"max-w-md rounded-md border-border bg-background p-0",children:[e.jsxs(c,{className:"border-b border-border p-5",children:[e.jsx("span",{className:"w-fit rounded border border-brand/40 bg-brand/10 px-2 py-1 text-[10px] font-semibold text-brand",children:"Native macOS workflow · prototype only"}),e.jsx(m,{className:"pt-3 text-base tracking-normal",children:"preset"===t?"Load preset workflow":"Open VYRE workflow"}),e.jsxs(x,{className:"text-xs",children:[s," would follow this controlled native flow."]})]}),e.jsxs("div",{className:"p-5",children:[e.jsx(ne,{steps:o}),e.jsx("div",{className:"mt-4 border border-border bg-secondary/50 p-3 text-[10px] leading-5 text-muted-foreground",children:"This web prototype does not download content, inspect files, install VYRE, launch a plugin, launch a DAW, or call an updater."}),e.jsx(r,{variant:"brand",className:"mt-4 w-full rounded-md",onClick:()=>n(!1),children:"Done"})]})]})})}function X({mode:s,subject:t,onRetry:a}){const n="version"===t?"VYRE version":"VYRE content";return"loading"===s?e.jsx(ae,{icon:i,title:`Loading ${n}
1...`,detail:"Reading public Music-Prod catalog data",spin:!0}):"error"===s?e.jsx(re,{icon:i,title:`${n} is unavailable`,detail:"No substitute data or installation claim is shown.",children:a&&e.jsx(r,{variant:"outline",size:"sm",className:"mt-4 rounded-md",onClick:a,children:"Try again"})}):e.jsx(re,{icon:L,title:"No VYRE content available",detail:"New public catalog entries will appear here."})}function K({destination:s,onHome:t,onSamples:a}){const n="Updates";return e.jsxs("main",{className:"flex min-w-0 flex-1 flex-col",children:[e.jsxs("div",{className:"flex h-14 items-center border-b border-border px-6",children:[e.jsx("p",{className:"text-sm font-semibold",children:n}),e.jsx("span",{className:"ml-3 rounded border border-border px-2 py-0.5 text-[10px] text-muted-foreground",children:"Coming next"})]}),e.jsx(re,{icon:_,title:`${n} workspace`,detail:"This destination is not implemented in this prototype phase.",children:e.jsxs("div",{className:"mt-4 flex gap-2",children:[e.jsx(r,{variant:"outline",size:"sm",onClick:t,children:"Home"}),e.jsx(r,{variant:"brand",size:"sm",onClick:a,children:"Browse Samples"})]})})]})}function ee({pack:s,size:t}){const r=function(e){return e.thumbnail_url||e.logo_url||null}(s);return e.jsx("div",{className:a("grid shrink-0 place-items-center overflow-hidden bg-secondary","small"===t&&"h-9 w-9 rounded","large"===t&&"aspect-[16/7] w-full","hero"===t&&"aspect-[16/7] w-full rounded-md"),children:r?e.jsx("img",{src:r,alt:"",className:"h-full w-full object-cover"}):e.jsx(_,{className:a("text-muted-foreground","hero"===t?"h-8 w-8":"h-4 w-4")})})}function se({pack:s}){return e.jsx("span",{className:a("inline-flex w-fit rounded border px-1.5 py-0.5 text-[10px] font-medium","released"===s.status?"border-success/40 bg-success/10 text-success":"border-border bg-secondary text-muted-foreground"),children:"released"===s.status?"Released":"Coming"})}function te({active:s,name:t,onClick:n}){return e.jsx(r,{variant:"ghost",size:"icon","aria-label":`${s?"Remove":"Favorite"} ${t}`,className:a("h-8 w-8 shrink-0 rounded",s&&"text-brand"),onClick:e=>{e.stopPropagation(),n()},children:e.jsx(I,{className:a("h-4 w-4",s&&"fill-current")})})}function re({icon:s,title:t,detail:r,children:a}){return e.jsx("div",{className:"grid flex-1 place-items-center p-8",children:e.jsxs("div",{className:"max-w-sm text-center",children:[e.jsx(s,{className:"mx-auto h-7 w-7 text-muted-foreground"}),e.jsx("p",{className:"mt-3 text-sm font-medium",children:t}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:r}),a]})})}function ae({icon:s,title:t,detail:r,spin:n}){return e.jsx("div",{className:"grid flex-1 place-items-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx(s,{className:a("mx-auto h-6 w-6 text-muted-foreground",n&&"animate-spin")}),e.jsx("p",{className:"mt-3 text-sm font-medium",children:t}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:r})]})})}function ne({steps:s}){return e.jsx("div",{className:"mt-4",children:s.map((t,r)=>e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("span",{className:"grid h-6 w-6 place-items-center rounded-full border border-border bg-secondary text-[10px] font-semibold",children:r+1}),r<s.length-1&&e.jsx("span",{className:"h-5 w-px bg-border"})]}),e.jsx("p",{className:"pt-1 text-xs",children:t})]},t))})}function oe({label:s,value:t,real:r}){return e.jsxs("div",{className:"border-r border-border p-4 last:border-r-0",children:[e.jsx("p",{className:"text-[10px] text-muted-foreground",children:s}),e.jsx("p",{className:"mt-2 text-sm font-medium",children:t}),e.jsx("p",{className:"mt-1 text-[9px] uppercase text-muted-foreground",children:r?"Real web data":"Native-only state"})]})}function ie({title:s,children:t}){return e.jsxs("section",{className:"border-b border-border p-4",children:[e.jsx("h3",{className:"mb-3 text-[10px] font-semibold uppercase text-muted-foreground",children:s}),t]})}function le({label:s,value:t}){return e.jsxs("div",{className:"flex items-center justify-between border-b border-border/50 py-2 text-xs last:border-0",children:[e.jsx("span",{className:"text-muted-foreground",children:s}),e.jsx("span",{className:"max-w-40 truncate text-right",children:t})]})}function de(){var r,a,n,o;
1const i=s(),l=p(),d=f(),c=h(),[m,x]=t.useState("expansions"),[j,g]=t.useState("all"),[v,N]=t.useState("catalog"),[w,y]=t.useState("list"),[R,E]=t.useState(""),[V,_]=t.useState("all"),[P,Y]=t.useState(null),[L,I]=t.useState(()=>new Set(F(localStorage,B))),[z,M]=t.useState(()=>F(localStorage,D)),[O,A]=t.useState(null),[U,ee]=t.useState(null),se=t.useRef(null),te=c.data||[],re=t.useMemo(()=>function(e,s){const t=new Map(s.recentIds.map((e,s)=>[e,s]));return[...e.filter(e=>"draft"!==e.status).filter(e=>function(e,s){const t=s.trim().toLowerCase();return!t||[e.name,e.description,e.status,e.is_stock?"stock included":"",e.release_date].some(e=>String(e||"").toLowerCase().includes(t))}(e,s.query)).filter(e=>"released"===s.section?"released"===e.status:"coming"===s.section?"coming"===e.status:"stock"===s.section?e.is_stock:"favorites"===s.section?s.favoriteIds.has(e.id):"recent"!==s.section||t.has(e.id))].sort((e,r)=>"recent"===s.section?(t.get(e.id)??1/0)-(t.get(r.id)??1/0):"newest"===s.sort?r.created_at.localeCompare(e.created_at):"oldest"===s.sort?e.created_at.localeCompare(r.created_at):"name-asc"===s.sort?e.name.localeCompare(r.name):"name-desc"===s.sort?r.name.localeCompare(e.name):e.sort_order-r.sort_order)}(te,{query:"expansions"===m?R:"",section:j,sort:v,favoriteIds:L,recentIds:z}),[L,m,te,R,z,j,v]),ae=te.find(e=>e.id===P)||null,ne=b(null==ae?void 0:ae.id),oe=t.useMemo(()=>function(e,s,t){const r=s.trim().toLowerCase();return e.filter(e=>!r||[e.name,e.category].some(e=>e.toLowerCase().includes(r))).filter(e=>"all"===t||e.category===t).sort((e,s)=>e.sort_order-s.sort_order||e.name.localeCompare(s.name))}(ne.data||[],"presets"===m?R:"",V),[V,m,ne.data,R]),ie=k(l),le="presets"===m?oe.length:"information"===m?0:re.length;t.useEffect(()=>{localStorage.setItem(B,JSON.stringify([...L]))},[L]),t.useEffect(()=>{localStorage.setItem(D,JSON.stringify(z))},[z]),t.useEffect(()=>{P&&!te.some(e=>e.id===P)&&Y(null)},[te,P]),C(se,()=>{E(""),ee(null)});const de=e=>{Y(e.id),M(s=>$(s,e.id)),A({title:e.name,kind:"open"})};return e.jsxs(S,{children:[e.jsxs(u,{children:[e.jsx("title",{children:"Music-Prod Studio VYRE Prototype"}),e.jsx("meta",{name:"description",content:"An isolated desktop UX prototype for the future Music-Prod Studio VYRE workspace."})]}),e.jsx(H,{section:j,userName:l.userName,membership:ie,onHome:()=>i("/studio-prototype/home"),onSamples:()=>i("/studio-prototype/samples"),onProjects:()=>i("/studio-prototype/project-files"),onVyre:()=>ee(null),onCourses:()=>i("/studio-prototype/courses"),onUpdates:()=>i("/studio-prototype/updates"),onSection:e=>{g(e),x("expansions"),ee(null)}}),U?e.jsx(K,{destination:U,onHome:()=>i("/studio-prototype/home"),onSamples:()=>i("/studio-prototype/samples")}):e.jsxs(e.Fragment,{children:[e.jsxs("main",{className:"flex min-w-0 flex-1 flex-col bg-background",children:[e.jsx(T,{mode:m,query:R,sort:v,view:w,count:le,version:null==(r=d.data)?void 0:r.version,versionLoading:d.isLoading,versionUnavailable:d.isError,inputRef:se,onMode:e=>{x(e),E(""),_("all"),ee(null)},onQuery:E,onSort:N,onView:y}),"information"===m?e.jsx(W,{version:null==(a=d.data)?void 0:a.version,releaseDate:null==(n=d.data)?void 0:n.release_date,versionUnavailable:d.isError,packCount:te.length}):c.isLoading?e.jsx(X,{mode:"loading",subject:"content"}):c.isError?e.jsx(X,{mode:"error",subject:"content",onRetry:()=>{c.refetch()}}):te.length?"presets"===m?e.jsx(Q,{pack:ae,presets:oe,query:R,category:V,loading:ne.isLoading,unavailable:ne.isError,onCategory:_,onLoad:e=>A({title:e.name,kind:"preset"})}):e.jsx(J,{packs:re,view:w,selectedId:P||void 0,favorites:L,section:j,query:R,onSelect:e=>{Y(e.id),M(s=>$(s,e.id))},onFavorite:e=>I(s=>q(s,e)),onBrowse:de,onClear:()=>E("")}):e.jsx(X,{mode:"empty",subject:"content"})]}),e.jsx(G,{pack:ae,presetCount:null==(o=ne.data)?void 0:o.length,favorite:Boolean(ae&&L.has(ae.id)),onFavorite:()=>ae&&I(e=>q(e,ae.id)),onBrowse:()=>ae&&de(ae)})]}),e.jsx(Z,{title:(null==O?void 0:O.title)||"VYRE",kind:(null==O?void 0:O.kind)||"open",open:Boolean(O),onOpenChange:e=>{e||A(null)}})]})}export{de as default};

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.