PageSourceSearch

https://www.prosoundeffects.com/_nuxt/C0f4SaAu.js

js prosoundeffects.com collected 2026-10-02 04:44:05 UTC 14,610 bytes, 3 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BAl-M2VW.js","./CmB3FgNx.js","./entry.CNm0TPlk.css","./mfRygQUJ.js","./DlAUqK2U.js","./SectionLoader.iy4dr33z.css","./tDfSmKtN.js","./Bl6uzW9V.js","./CHIgUVhi.js","./DQXA3oKj.js","./ChOKVcqp.js","./C6534OHC.js","./FUKBWQwh.js","./DDRqXvlF.js","./Cxq-6Grf.js","./D1ZNHKqm.js","./B-lLdkhL.js","./D-pctMGk.js","./CYCFWBEj.js","./B7okPWYz.js","./DyexbcUr.js","./CS_3Z4qf.js","./V0UaidaI.js","./BGbzXtzw.js"])))=>i.map(i=>d[i]);
2import{j as F,o as c,k as N,w as _,l as ee,at as Me,m as a,ay as Ae,az as Ce,U as y,V as l,ae as Re,X as h,a3 as I,a4 as T,K as b,W as L,$ as te,f as g,R as Ie,bP as ne,y as Te,ab as Se,x as Ee,z as Le,s as we,Y as Ne,a9 as Be,a5 as Ue,c as je,r as Fe,v as Q,_ as Z}from"./CmB3FgNx.js";import{_ as Pe}from"./mfRygQUJ.js";import{_ as De,a as ze}from"./tDfSmKtN.js";import{c as Ve,P as Oe,u as qe}from"./DQXA3oKj.js";import{D as K}from"./CYCFWBEj.js";import{A as Ge}from"./B7okPWYz.js";import{u as Ke}from"./CS_3Z4qf.js";import{u as He}from"./V0UaidaI.js";const[We]=Ve("MenuGroup");var Xe=F({__name:"MenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(n){const i=n,m=We({id:""});return(f,o)=>(c(),N(a(Oe),Me(i,{id:a(m).id||void 0}),{default:_(()=>[ee(f.$slots,"default")]),_:3},16,["id"]))}}),Ye=Xe,Je=F({__name:"DropdownMenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(n){const i=n;return qe(),(m,f)=>(c(),N(a(Ye),Ae(Ce(i)),{default:_(()=>[ee(m.$slots,"default")]),_:3},16))}}),Qe=Je;const Ze={class:"flex items-center justify-between gap-3 rounded-2xl border border-action-tertiary-default bg-system-base-off-white px-4 py-3 shadow-sm xl:px-6"},et={class:"flex min-w-0 items-center gap-3"},tt={class:"min-w-0"},nt={class:"body-2 truncate font-medium text-text-dark-blue-10"},it={class:"label-1 truncate text-text-grey-10"},at={class:"flex shrink-0 items-center gap-2"},st={key:1,class:"label-2 inline-flex items-center rounded-full bg-accent-blue-bg px-2 py-0.5 font-medium text-accent-blue-fg"},ot={key:2,class:"label-2 inline-flex items-center rounded-full bg-accent-purple-bg px-2 py-0.5 font-medium text-accent-purple-fg"},rt={key:3,class:"label-1 font-medium text-product-red-20"},mt=["disabled","aria-label"],lt=F({__name:"TeamListRow",props:{kind:{},member:{},invitation:{},isMember:{type:Boolean},isAdmin:{type:Boolean},canManage:{type:Boolean},loading:{type:Boolean}},emits:["set-admin","remove-admin","set-member","remove-member","remove-from-team","resend-invite","cancel-invite"],setup(n){const i=n,m=g(()=>i.kind==="invitation"?{member:i.invitation?.isMember??!0,admin:i.invitation?.isAdmin??!1}:{member:!!i.isMember,admin:!!i.isAdmin}),f=["bg-accent-blue-bg text-accent-blue-fg","bg-accent-teal-bg text-accent-teal-fg","bg-accent-amber-bg text-accent-amber-fg","bg-accent-purple-bg text-accent-purple-fg"],o=g(()=>{const d=i.member?.id||i.member?.firstEmail||i.invitation?.email||"";let e=0;for(let v=0;v<d.length;v++)e+=d.charCodeAt(v);return f[e%f.length]}),s=g(()=>{if(i.kind==="invitation")return"N/A";const d=i.member,e=d?.lastName?.trim(),v=d?.firstName?.trim();return e&&v?`${e}, ${v}`:e||v||d?.displayName?.trim()||d?.firstEmail||"—"}),$=g(()=>i.kind==="invitation"?i.invitation?.email??"":i.member?.firstEmail??""),k=g(()=>i.kind==="invitation"?"N":(i.member?.userName?.[0]||i.member?.firstName?.[0]||"?").toUpperCase());return(d,e)=>{const v=te,x=De,P=ze;return c(),y("li",Ze,[l("div",et,[l("div",{class:Re(["flex size-9 shrink-0 items-center justify-center rounded-full font-medium",a(o)])},h(a(k)),3),l("div",tt,[l("p",nt,h(a(s)),1),l("p",it,h(a($)),1)])]),l("div",at,[n.loading?(c(),N(v,{key:0,name:"lucide:loader-2",class:"size-4 animate-spin text-text-grey-10","aria-label":"Loading"})):I("",!0),a(m).member?(c(),y("span",st," Member ")):I("",!0),a(m).admin?(c(),y("span",ot," Admin ")):I("",!0),n.kind==="invitation"?(c(),y("span",rt," Pending ")):I("",!0),n.canManage?(c(),N(P,{key:4,align:"end"},{trigger:_(()=>[l("button",{type:"button",class:"flex cursor-pointer items-center rounded-md p-1 hover:bg-section-secondary-strength-2 disabled:opacity-60",disabled:n.loading,"aria-label":`Manage ${a(s)}`},[b(v,{name:"lucide:chevron-down",class:"size-5 text-text-grey-10"})],8,mt)]),default:_(()=>[n.kind==="invitation"?(c(),y(T,{key:0},[b(x,{onClick:e[0]||(e[0]=M=>d.$emit("resend-invite"))},{default:_(()=>[...e[9]||(e[9]=[L("Re-send Invite",-1)])]),_:1}),b(x,{onClick:e[1]||(e[1]=M=>d.$emit("cancel-invite"))},{default:_(()=>[...e[10]||(e[10]=[l("span",{class:"text-product-red-20"},"Revoke Invite",-1)])]),_:1})],64)):n.isMember&&n.isAdmin?(c(),y(T,{key:1},[b(a(Qe),{class:"label-2 px-4 pb-1 pt-1 font-medium uppercase tracking-wide text-text-grey-20"},{default:_(()=>[...e[11]||(e[11]=[L(" Role ",-1)])]),_:1}),b(x,{onClick:e[2]||(e[2]=M=>d.$emit("remove-member"))},{default:_(()=>[...e[12]||(e[12]=[l("span",{class:"text-product-red-20"},"Remove Member",-1)])]),_:1}),b(x,{onClick:e[3]||(e[3]=M=>d.$emit("remove-admin"))},{default:_(()=>[...e[13]||(e[13]=[l("span",{class:"text-product-red-20"},"Remove Admin",-1)])]),_:1}),b(a(K),{class:"my-1 h-px bg-system-neutral-grey-40"}),b(x,{onClick:e[4]||(e[4]=M=>d.$emit("remove-from-team"))},{default:_(()=>[...e[14]||(e[14]=[l("span",{class:"text-product-red-20"},"Remove from team",-1)])]),_:1})],64)):n.isMember?(c(),y(T,{key:2},[b(x,{onClick:e[5]||(e[5]=M=>d.$emit("set-admin"))},{default:_(()=>[...e[15]||(e[15]=[L("Make Admin",-1)])]),_:1}),b(a(K),{class:"my-1 h-px bg-system-neutral-grey-40"}),b(x,{onClick:e[6]||(e[6]=M=>d.$emit("remove-from-team"))},{default:_(()=>[...e[16]||(e[16]=[l("span",{class:"text-product-red-20"},"Remove from team",-1)])]),_:1})],64)):n.isAdmin?(c(),y(T,{key:3},[b(x,{onClick:e[7]||(e[7]=M=>d.$emit("set-member"))},{default:_(()=>[...e[17]||(e[17]=[L("Make Member",-1)])]),_:1}),b(a(K),{class:"my-1 h-px bg-system-neutral-grey-40"}),b(x,{onClick:e[8]||(e[8]=M=>d.$emit("remove-from-team"))},{default:_(()=>[...e[18]||(e[18]=[l("span",{class:"text-product-red-20"},"Remove from team",-1)])]),_:1})],64)):I("",!0)]),_:1})):I("",!0)])])}}}),dt=Object.assign(lt,{__name:"AccountTeamListRow"});function ut(n,i,m,f){const o=new Map;for(const s of n)s.id&&o.set(s.id,s);for(const s of i)s.id&&!o.has(s.id)&&o.set(s.id,s);return[...o.values()].map(s=>({member:s,isMember:!!s.id&&f.has(s.id),isAdmin:!!s.id&&m.has(s.id)})).sort((s,$)=>Number($.isAdmin)-Number(s.isAdmin))}const w=n=>n.trim().toLowerCase();function Ut(n){const i=new Set,m=[];for(const f of n.split(",")){const o=f.trim();!o||i.has(w(o))||(i.add(w(o)),m.push(o))}return m}function jt(n){return n.length>0&&n.every(Ie)}function ct(n,i){const m=n.flatMap(o=>[...o.emails??[],o.firstEmail??""]),f=i.map(o=>o.email??"");return{memberEmails:m.filter(Boolean),invitedEmails:f.filter(Boolean)}}function Ft(n,i){const m=new Set(i.memberEmails.map(w)),f=new Set(i.invitedEmails.map(w)),o=[],s=[];for(const k of n)m.has(w(k))?o.push(k.trim()):f.has(w(k))&&s.push(k.trim());const $=[];return o.length&&$.push(o.length===1?`${o[0]} is already a team member.`:`${o.join(", ")} are already team members.`),s.length&&$.push(s.length===1?`${s[0]} already has a pending invitation.`:`${s.join(", ")} already have pending invitations.`),$.join(" ")}function Pt(n){return n.isMember||n.isAdmin}function ie(){return Se().public.apiBase||"https://api.prosoundeffects.c
2om"}function ae(){const n=Te().accessToken?.trim();return n?{Authorization:`Bearer ${n}`}:{}}async function C(n,i){try{return await $fetch(n,{baseURL:ie(),method:"POST",headers:{...ae(),"Content-Type":"application/json"},body:i??{},credentials:"include"})}catch(m){const f=m?.statusCode??500,o=m?.message??"Request failed";throw new ne(o,f,o,m)}}function vt(){async function n(){try{return await $fetch("/v1/account/my-team",{baseURL:ie(),method:"GET",headers:{...ae(),Accept:"application/json"},credentials:"include"})}catch(e){const v=e?.statusCode??500,x=e?.message??"Failed to load team";throw new ne(x,v,x,e)}}function i(e,v){return C("/v1/account/my-team/invite",{emails:e,isMember:v.isMember,isAdmin:v.isAdmin})}function m(e){return C(`/v1/account/my-team/invite/${encodeURIComponent(e)}/send`)}function f(e){return C(`/v1/account/my-team/invite/${encodeURIComponent(e)}/cancel`)}function o(e){return C(`/v1/account/set-admin/${encodeURIComponent(e)}`)}function s(e){return C(`/v1/account/remove-admin/${encodeURIComponent(e)}`)}function $(e){return C(`/v1/account/set-member/${encodeURIComponent(e)}`)}function k(e){return C(`/v1/account/remove-member/${encodeURIComponent(e)}`)}function d(e){return C(`/v1/account/remove-from-team/${encodeURIComponent(e)}`)}return{fetchTeam:n,inviteMembers:i,resendInvite:m,cancelInvite:f,setAdmin:o,removeAdmin:s,setMember:$,removeMember:k,removeFromTeam:d}}const ft={class:"mb-6"},pt={class:"heading-4 text-text-dark-blue-10"},bt={class:"mb-6 flex items-center justify-between"},gt={class:"heading-6 text-text-dark-blue-10"},yt={class:"body-2 text-text-grey-10"},_t={class:"flex flex-col gap-8 xl:flex-row xl:gap-12"},xt={class:"flex flex-1 flex-col gap-4"},kt={key:0,class:"flex justify-center py-12"},$t={key:1,class:"rounded-lg border border-product-red-20/40 bg-product-red-20/5 p-4"},ht={class:"body-2 mb-3 text-text-grey-10"},Mt={key:2,class:"flex flex-col gap-2"},At={key:3,class:"body-2 py-8 text-center text-text-grey-10"},Ct={class:"xl:w-[320px] xl:shrink-0"},Rt=F({__name:"index",async setup(n){let i,m;He("Team Members");const f=Ee(),{user:o}=Le(f),s=g(()=>o.value?.id??""),$=g(()=>{const t=A.value?.admins??[];return!!s.value&&t.includes(s.value)}),k=we(),d=Ke(),e=Q(()=>Z(()=>import("./BAl-M2VW.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]),import.meta.url)),v=Q(()=>Z(()=>import("./BGbzXtzw.js"),__vite__mapDeps([23,1,2]),import.meta.url)),{fetchTeam:x,inviteMembers:P,resendInvite:M,cancelInvite:se,setAdmin:oe,removeAdmin:re,setMember:me,removeMember:le,removeFromTeam:de}=vt(),{data:A,pending:ue,error:H,refresh:D}=([i,m]=Ne(()=>je("account-team",()=>x(),{default:()=>null})),i=await i,m(),i),B=g(()=>A.value?.members??[]),z=g(()=>A.value?.administrators??[]),V=g(()=>(A.value?.invitations??[]).filter(t=>!t.redeemed)),ce=g(()=>new Set(A.value?.admins??[])),ve=g(()=>new Set(B.value.map(t=>t.id).filter(t=>!!t))),U=g(()=>B.value.length),j=g(()=>A.value?.seats??0),W=g(()=>Math.max(0,j.value-U.value)),fe=g(()=>j.value>=U.value&&j.value>0),X=g(()=>{const t=ut(B.value,z.value,ce.value,ve.value).map(p=>({kind:"member",...p})),u=V.value.map(p=>({kind:"invitation",invitation:p}));return[...t,...u]}),Y=t=>t.kind==="invitation"?t.invitation.id??"":"",O=Fe(null);async function R(t,u,p,S){O.value=t;try{await u(),await D(),d.success(p)}catch(q){const G=q?.message||S;d.error(G)}finally{O.value=null}}function pe(){const{memberEmails:t,invitedEmails:u}=ct([...B.value,...z.value],V.value);k.open(e,{memberEmails:t,invitedEmails:u,onInvite:async(p,S)=>{await P(p,S),await D(),d.success(p.length===1?`${p[0]} was invited.`:`${p.length} invitations sent.`)}})}function J(t){const u=B.value.find(p=>p.id===t)??z.value.find(p=>p.id===t);return[u?.firstName,u?.lastName].filter(Boolean).join(" ")||u?.firstEmail||"this team member"}function be(t){t&&R(t,()=>oe(t),"Admin access granted.","Failed to grant admin access.")}function ge(t){t&&R(t,()=>re(t),"Admin access removed.","Failed to remove admin access.")}function ye(t){t&&R(t,()=>me(t),"Member seat granted.","Failed to grant member seat.")}function _e(t){if(!t)return;const u=J(t);k.open(v,{title:"Remove member seat",message:`Remove ${u}'s member seat? They'll keep admin access but stop using a paid seat.`,confirmLabel:"Remove seat",onConfirm:()=>R(t,()=>le(t),"Member seat removed.","Failed to remove member seat.")})}function xe(t){if(!t)return;const u=J(t);k.open(v,{title:"Remove from team",message:`Remove ${u} from the team? This removes their seat and admin access.`,confirmLabel:"Remove",onConfirm:()=>R(t,()=>de(t),"Removed from team.","Failed to remove from team.")})}function ke(t){t&&R(t,()=>M(t),"Invitation re-sent.","Failed to resend invitation.")}function $e(t){if(!t)return;const u=V.value.find(p=>p.id===t)?.email||"this invitation";k.open(v,{title:"Cancel invitation",message:`Cancel the invitation to ${u}?`,confirmLabel:"Cancel invite",cancelLabel:"Keep",onConfirm:()=>R(t,()=>se(t),"Invitation cancelled.","Failed to cancel invitation.")})}return(t,u)=>{const p=te,S=Be,q=Pe,G=dt,he=Ge;return c(),y("div",null,[l("div",ft,[l("h1",pt,h(a(A)?.name||"Team members"),1)]),l("div",bt,[l("h6",gt,[a(fe)?(c(),y(T,{key:0},[L(h(a(U))+" of "+h(a(j))+" "+h(a(j)===1?"seat":"seats")+" taken ",1),l("span",yt," · "+h(a(W)?`${a(W)} available`:"none available"),1)],64)):(c(),y(T,{key:1},[L(h(a(U))+" "+h(a(U)===1?"member":"members"),1)],64))]),a($)?(c(),N(S,{key:0,size:"xs",onClick:pe},{default:_(()=>[u[1]||(u[1]=l("span",{class:"pse-button__label"},"Invite",-1)),b(p,{name:"lucide:user-plus",class:"size-5 shrink-0","aria-hidden":""})]),_:1})):I("",!0)]),l("div",_t,[l("div",xt,[a(ue)&&!a(A)?(c(),y("div",kt,[b(q)])):a(
2H)?(c(),y("div",$t,[u[2]||(u[2]=l("p",{class:"body-1--semibold mb-1 text-product-red-20"},"Couldn't load your team",-1)),l("p",ht,h(a(H).message),1),b(S,{label:"Try again",variant:"secondary",size:"xs",onClick:u[0]||(u[0]=r=>a(D)())})])):a(X).length?(c(),y("ul",Mt,[(c(!0),y(T,null,Ue(a(X),r=>(c(),N(G,{key:r.kind==="member"?`m-${r.member.id}`:`i-${r.invitation.id}`,kind:r.kind,member:r.kind==="member"?r.member:void 0,invitation:r.kind==="invitation"?r.invitation:void 0,"is-member":r.kind==="member"?r.isMember:!1,"is-admin":r.kind==="member"?r.isAdmin:!1,"can-manage":a($)&&(r.kind==="invitation"||r.member.id!==a(s)),loading:a(O)===(r.kind==="member"?r.member.id:r.invitation.id),onSetAdmin:E=>be(r.kind==="member"?r.member.id??"":""),onRemoveAdmin:E=>ge(r.kind==="member"?r.member.id??"":""),onSetMember:E=>ye(r.kind==="member"?r.member.id??"":""),onRemoveMember:E=>_e(r.kind==="member"?r.member.id??"":""),onRemoveFromTeam:E=>xe(r.kind==="member"?r.member.id??"":""),onResendInvite:E=>ke(Y(r)),onCancelInvite:E=>$e(Y(r))},null,8,["kind","member","invitation","is-member","is-admin","can-manage","loading","onSetAdmin","onRemoveAdmin","onSetMember","onRemoveMember","onRemoveFromTeam","onResendInvite","onCancelInvite"]))),128))])):(c(),y("p",At," No team members yet. Invite some teammates to get started. "))]),l("div",Ct,[b(he)])])])}}}),Dt=Object.freeze(Object.defineProperty({__proto__:null,default:Rt},Symbol.toStringTag,{value:"Module"}));export{jt as a,Dt as b,Pt as h,Ft as i,Ut as p};
3//# sourceMappingURL=C0f4SaAu.js.map

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.