PageSourceSearch

https://bazzookas.com/chunk-4DWVNT5R.js

js bazzookas.com collected 2026-10-08 21:41:39 UTC 127,356 bytes, 25 lines download raw bytes

1import{a as St}from"./chunk-DUQQIXJS.js";import{a as vt,d as Re,e as wt,g as Ie,h as Ct}from"./chunk-ZKW7NMML.js";import{b as gt,d as Pe,e as bt,f as yt}from"./chunk-SOOBZPY5.js";import{a as ft,b as Ve,c as G,e as Ce,f as z,h as _t,i as U,j as ie,k as ne,n as xt,p as ce,q as oe,r as ht,s as pe,t as De,u as re}from"./chunk-2IOFZNIB.js";import{b as fe,c as we,d as ae,e as tt,g as _e,h as it,i as nt,k as ot,l as rt,m as lt,n as at,p as ke,q as st,r as xe,s as ct,t as dt,u as mt,w as ut}from"./chunk-F6DWAOTV.js";import{$ as s,A as b,Aa as C,B as T,Ba as _,C as H,Ca as le,Da as Z,E as B,Ea as J,Fa as K,Ha as Ye,Ja as ye,K as Be,La as ve,M as ee,Ma as R,Oa as j,Q as o,S as ge,T as A,Va as X,W as $e,Wa as $,X as g,Xa as Qe,Ya as Ze,Z as te,Za as Je,_ as m,a as W,aa as se,ab as Se,b as ue,bb as q,cc as pt,da as Ge,e as y,ea as k,fa as ze,ga as We,ha as Y,ia as Q,ib as Ke,ja as l,k as je,ka as r,kb as Xe,l as qe,la as f,lb as et,ma as P,na as I,pa as E,q as Le,qa as v,ra as c,u as S,ua as He,x as F,y as L,ya as D,z as h,za as p}from"./chunk-7UZ6ZFFH.js";var Ee=class i{NOMINATIM_URL="https://nominatim.openstreetmap.org/search";lastRequestTime=0;pendingRequest=null;search(n){return je(this.throttledSearch(n))}throttledSearch(n){return y(this,null,function*(){if(this.pendingRequest)try{yield this.pendingRequest}catch{}let e=Date.now(),t=Math.max(0,1500-(e-this.lastRequestTime));t>0&&(yield new Promise(u=>setTimeout(u,t)));let a=new URLSearchParams({q:n,format:"json",addressdetails:"1",limit:"3","accept-language":"en"});this.lastRequestTime=Date.now(),this.pendingRequest=fetch(`${this.NOMINATIM_URL}?${a}`).then(u=>u.ok?u.json():[]).catch(()=>[]);let d=yield this.pendingRequest;return this.pendingRequest=null,d||[]})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Le({token:i,factory:i.\u0275fac,providedIn:"root"})};function Ft(i,n){if(i&1&&(P(0),p(1),I()),i&2){let e=c().$implicit;o(),C(e.venue)}}function Tt(i,n){i&1&&(P(0),p(1," \xB7 "),I())}function Mt(i,n){if(i&1&&(P(0),p(1),I()),i&2){let e=c().$implicit;o(),C(e.city)}}
1function Nt(i,n){if(i&1&&(P(0),p(1),I()),i&2){let e=c(2).$implicit;o(),_(" +",e.myClaim.plusOnes,"")}}function Ut(i,n){i&1&&(l(0,"span"),p(1,"Leave list"),r())}function Ot(i,n){i&1&&(l(0,"span"),p(1,"\u2026"),r())}function Vt(i,n){if(i&1){let e=E();P(0),l(1,"span",20),p(2," \u2713 On the list"),g(3,Nt,2,1,"ng-container",2),r(),l(4,"button",21),v("click",function(){h(e);let a=c().$implicit,d=c(2);return b(d.removeMe(a))}),g(5,Ut,2,0,"span",2)(6,Ot,2,0,"span",2),r(),I()}if(i&2){let e=c().$implicit;o(3),m("ngIf",e.myClaim.plusOnes),o(),m("disabled",e.removing),te("aria-label","Remove me from the guest list for "+e.title),o(),m("ngIf",!e.removing),o(),m("ngIf",e.removing)}}function Dt(i,n){if(i&1){let e=E();P(0),l(1,"span",22)(2,"span",23),p(3),r(),p(4),r(),l(5,"button",24),v("click",function(){h(e);let a=c(2).$implicit,d=c(2);return b(d.toggleExpanded(a))}),p(6),r(),I()}if(i&2){let e=c(2).$implicit,t=c(2);o(),s("color",t.colors==null?null:t.colors.textSecondary),o(),s("color",t.colors==null?null:t.colors.textPrimary),o(),_(" ",t.Math.max(0,e.spots-e.claimed)," "),o(),_(" spot",e.spots-e.claimed===1?"":"s"," left "),o(),s("background-color",(t.colors==null?null:t.colors.textPrimary)||"#111")("color",(t.colors==null?null:t.colors.background)||"#fff")("border-color",(t.colors==null?null:t.colors.textPrimary)||"#111"),m("disabled",e.spots-e.claimed<=0),o(),_(" ",e.spots-e.claimed>0?"Claim spot":"Sold out"," ")}}function Rt(i,n){if(i&1&&(l(0,"span",25),p(1," No guestlist spot available for this show "),r()),i&2){let e=c(4);s("color",e.colors==null?null:e.colors.textSecondary)("border-color",((e.colors==null?null:e.colors.textPrimary)||"#111")+"44")}}function At(i,n){if(i&1&&g(0,Dt,7,14,"ng-container",18)(1,Rt,2,4,"ng-template",null,1,R),i&2){let e=D(2),t=c().$implicit;m("ngIf",t.spots>0)("ngIfElse",e)}}function jt(i,n){if(i&1&&(l(0,"option",33),p(1),r()),i&2){let e=n.$implicit;m("value",e),o(),_("+",e,"")}}function qt(i,n){if(i&1){let e=E();P(0),l(1,"label",30),p(2,"Bring along"),r(),l(3,"select",31),K("ngModelChange",function(a){h(e);let d=c(2).$implicit;return J(d.plusOnes,a)||(d.plusOnes=a),b(a)}),g(4,jt,2,2,"option",32),r(),I()}if(i&2){let e=c(2).$implicit,t=c(2);o(),s("color",t.colors==null?null:t.colors.textPrimary),o(2),s("background-color",t.colors==null?null:t.colors.background)("color",t.colors==null?null:t.colors.textPrimary)("border-color",(t.colors==null?null:t.colors.textPrimary)||"#111"),Z("ngModel",e.plusOnes),o(),m("ngForOf",t.plusOneOptions(e))}}function Lt(i,n){i&1&&(l(0,"span"),p(1,"Confirm spot \u2192"),r())}function Bt(i,n){i&1&&(l(0,"span"),p(1,"Claiming\u2026"),r())}function $t(i,n){if(i&1&&(l(0,"p",34),p(1),r()),i&2){let e=c(2).$implicit;o(),C(e.error)}}function Gt(i,n){if(i&1){let e=E();l(0,"div",26),g(1,qt,5,10,"ng-container",2),l(2,"button",27),v("click",function(){h(e);let a=c().$implicit,d=c(2);return b(d.claim(a))}),g(3,Lt,2,0,"span",2)(4,Bt,2,0,"span",2),r(),l(5,"button",28),v("click",function(){h(e);let a=c().$implicit;return b(a.expanded=!1)}),p(6," Cancel "),r(),g(7,$t,2,1,"p",29),r()}if(i&2){let e=c().$implicit,t=c(2);s("border-color",((t.colors==null?null:t.colors.textPrimary)||"#111")+"33"),o(),m("ngIf",e.allowPlusOne&&e.plusOneMax>0),o(),s("background-color",(t.colors==null?null:t.colors.textPrimary)||"#111")("color",(t.colors==null?null:t.colors.background)||"#fff")("border-color",(t.colors==null?null:t.colors.textPrimary)||"#111"),m("disabled",e.claiming),o(),m("ngIf",!e.claiming),o(),m("ngIf",e.claiming),o(),s("color",t.colors==null?null:t.colors.textSecondary),o(2),m("ngIf",e.error)}}function zt(i,n){if(i&1&&(l(0,"li",10),f(1,"div",11),l(2,"div",12)(3,"div",13)(4,"p",14),p(5),r(),l(6,"h3",15),p(7),r(),l(8,"p",16),g(9,Ft,2,1,"ng-container",2)(10,Tt,2,0,"ng-container",2)(11,Mt,2,1,"ng-container",2),r()(),l(12,"div",17),g(13,Vt,7,5,"ng-container",18)(14,At,3,2,"ng-template",null,0,R),r()(),g(16,Gt,8,15,"div",19),r()),i&2){let e=n.$implicit,t=D(15),a=c(2);s("background-color",a.colors==null?null:a.colors.background)("border-color",(a.colors==null?null:a.colors.textPrimary)||"#111"),o(),s("color",(a.colors==null?null:a.colors.primary)||(a.colors==null?null:a.colors.navigation_button)||"#111"),o(4),_(" ",a.formatDate(e.date)," "),o(),s("color",a.colors==null?null:a.colors.textPrimary),o(),_(" ",e.title," "),o(),s("color",a.colors==null?null:a.colors.textSecondary),o(),m("ngIf",e.venue),o(),m("ngIf",e.venue&&e.city),o(),m("ngIf",e.city),o(2),m("ngIf",e.myClaim)("ngIfElse",t),o(3),m("ngIf",e.expanded&&!e.myClaim&&e.spots>0)}}
1function Wt(i,n){if(i&1&&(P(0),l(1,"header",4)(2,"div")(3,"h2",5),p(4," Guestlist "),r(),l(5,"p",6),p(6),r()(),l(7,"span",7),p(8),r()(),l(9,"ul",8),g(10,zt,17,18,"li",9),r(),I()),i&2){let e=c();o(3),s("color",e.colors==null?null:e.colors.textPrimary),o(2),s("color",e.colors==null?null:e.colors.textSecondary),o(),_(" Spots ",e.artistName||"the band"," reserved for the people closest to them. First come, first served. "),o(),s("color",(e.colors==null?null:e.colors.primary)||(e.colors==null?null:e.colors.navigation_button)||"#111")("border-color",(e.colors==null?null:e.colors.primary)||(e.colors==null?null:e.colors.navigation_button)||"#111"),o(),le(" ",e.events.length," ",e.events.length===1?"show":"shows"," "),o(2),m("ngForOf",e.events)("ngForTrackBy",e.trackById)}}function Ht(i,n){if(i&1&&(P(0),l(1,"header",35)(2,"h2",5),p(3," Guestlist "),r()(),l(4,"div",36),f(5,"div",11),l(6,"p",37),p(7," No shows on the calendar yet "),r(),l(8,"p",6),p(9),r()(),I()),i&2){let e=c();o(2),s("color",e.colors==null?null:e.colors.textPrimary),o(2),s("background-color",e.colors==null?null:e.colors.background)("border-color",(e.colors==null?null:e.colors.textPrimary)||"#111"),o(),s("color",(e.colors==null?null:e.colors.primary)||(e.colors==null?null:e.colors.navigation_button)||"#111"),o(),s("color",e.colors==null?null:e.colors.textPrimary),o(2),s("color",e.colors==null?null:e.colors.textSecondary),o(),_(" You'll be the first to know when ",e.artistName||"the band"," announces a new show. Check back soon, or follow them on socials so you don't miss the next drop. ")}}function Yt(i,n){if(i&1&&(P(0),p(1," at "),l(2,"span",43),p(3),r(),I()),i&2){let e=c(2);o(3),C(e.confirmRemoveEvent.venue)}}function Qt(i,n){i&1&&(l(0,"span"),p(1,"Yes, take me off"),r())}function Zt(i,n){i&1&&(l(0,"span"),p(1,"Removing\u2026"),r())}function Jt(i,n){if(i&1){let e=E();l(0,"div",38),v("click",function(){h(e);let a=c();return b(a.closeConfirmRemove())}),l(1,"div",39),v("click",function(a){return h(e),b(a.stopPropagation())}),f(2,"div",40),l(3,"span",41),p(4," Leave the list "),r(),l(5,"p",42),p(6," Take yourself off the guest list for "),l(7,"span",43),p(8),r(),g(9,Yt,4,1,"ng-container",2),p(10,"? "),r(),l(11,"p",44),p(12," Your spot opens back up for someone else. You can always claim again later if there are still spots free. "),r(),l(13,"div",45)(14,"button",46),v("click",function(){h(e);let a=c();return b(a.closeConfirmRemove())}),p(15," Stay on the list "),r(),l(16,"button",47),v("click",function(){h(e);let a=c();return b(a.confirmRemove())}),g(17,Qt,2,0,"span",2)(18,Zt,2,0,"span",2),r()()()()}if(i&2){let e=c();o(),s("background-color",(e.colors==null?null:e.colors.background)||"#fff")("border-color",(e.colors==null?null:e.colors.textPrimary)||"#111")("--pop-shadow-color",(e.colors==null?null:e.colors.textPrimary)||"#111"),o(4),s("color",e.colors==null?null:e.colors.textPrimary),o(3),C(e.confirmRemoveEvent.title),o(),m("ngIf",e.confirmRemoveEvent.venue),o(2),s("color",e.colors==null?null:e.colors.textSecondary),o(3),s("background-color",(e.colors==null?null:e.colors.background)||"#fff")("border-color",(e.colors==null?null:e.colors.textPrimary)||"#111")("color",(e.colors==null?null:e.colors.textPrimary)||"#111"),m("disabled",e.confirmRemoveEvent.removing),o(2),m("disabled",e.confirmRemoveEvent.removing),o(),m("ngIf",!e.confirmRemoveEvent.removing),o(),m("ngIf",e.confirmRemoveEvent.removing)}}var Fe=class i{artistId=null;artistName=null;currentUser=null;colors=null;focusEventId=null;firestore=S(G);artistService=S(Pe);cdr=S(j);injector=S(B);Math=Math;events=[];confirmRemoveEvent=null;ngOnInit(){this.load()}ngOnChanges(n){(n.artistId||n.currentUser)&&this.load()}trackById=(n,e)=>e.id;formatDate(n){if(!n)return"";try{return new Date(n).toLocaleDateString(void 0,{weekday:"short",day:"numeric",month:"short",year:"numeric"})}catch{return n}}plusOneOptions(n){return Array.from({length:n.plusOneMax+1},(e,t)=>t)}toggleExpanded(n){this.events.forEach(e=>{e!==n&&(e.expanded=!1)}),n.expanded=!n.expanded,n.error=null,this.cdr.markForCheck()}load(){return y(this,null,function*(){if(!this.artistId){this.events=[];return}try{let n=this.artistService.getSupabase();if(!n){console.warn("[guestlist-claim] no supabase client"),this.events=[];return}let e=new Date().toISOString().split("T")[0],{data:t,error:a}=yield n.from("events").select("id, name, date, venue_id, guestlist_spots, guestlist_claimed, guestlist_allow_plus_one, guestlist_plus_one_max, venues(name, city_name)").eq("fs_artists_id",this.artistId).gte("date",e).neq("status","cancelled").order("date",{ascending:!0}).limit(50);a&&console.warn("[guestlist-claim] events query error:",a);let d=t||[],u=new Map;if(this.currentUser&&d.length>0){let x=d.map(O=>O.id),{data:M}=yield n.from("event_guestlist").select("event_id, plus_ones").eq("user_id",this.currentUser.uid).in("event_id",x);for(let O of M||[])u.set(O.event_id,{plusOnes:Number(O.plus_ones)||0})}let w=d.map(x=>{let M=u.get(x.id)||null;return{id:x.id,date:x.date,title:x.name||"Untitled show",venue:x.venues?.name||"",city:x.venues?.city_name||"",spots:Number(x.guestlist_spots)||0,claimed:Number(x.guestlist_claimed)||0,allowPlusOne:!!x.guestlist_allow_plus_one,plusOneMax:Number(x.guestlist_plus_one_max)||1,myClaim:M,expanded:x.id===this.focusEventId,plusOnes:0,claiming:!1,removing:!1,error:null}});this.events=w,this.cdr.markForCheck()}catch(n){console.warn("[guestlist-claim] load failed:",n),this.events=[],this.cdr.markForCheck()}})}claim(n){return y(this,null,function*(){if(!this.currentUser||!this.artistId||n.claiming)return;let e=this.artistService.getSupabase();if(!e)return;n.claiming=!0,n.error=null,this.cdr.markForCheck();let t=yield this.readProfile(),a=Math.max(0,Math.min(n.plusOneMax,Number(n.plusOnes)||0));try{let{data:d,error:u}=yield e.rpc("claim_guestlist_spot",{p_event_id:n.id,p_user_id:this.currentUser.uid,p_fs_artists_id:this.artistId,p_user_name:t.userName||t.dis
1playName||"",p_first_name:t.firstName||"",p_last_name:t.lastName||"",p_email:this.currentUser.email||"",p_plus_ones:a});if(u)throw u;if(d==="sold_out"){n.error="Sold out \u2014 these spots just went.",n.claimed=n.spots;return}if(d==="closed"){n.error="This guestlist is closed.";return}n.myClaim={plusOnes:a},d==="claimed"&&(n.claimed=n.claimed+1,this.queueConfirmEmails(n,t).catch(()=>{})),n.expanded=!1}catch(d){n.error=d?.message||"Could not claim a spot. Please try again."}finally{n.claiming=!1,this.cdr.markForCheck()}})}removeMe(n){!this.currentUser||!this.artistId||n.removing||!n.myClaim||(this.confirmRemoveEvent=n,this.cdr.markForCheck())}closeConfirmRemove(){this.confirmRemoveEvent=null,this.cdr.markForCheck()}confirmRemove(){return y(this,null,function*(){let n=this.confirmRemoveEvent;if(!n||!this.currentUser||!this.artistId||n.removing||!n.myClaim)return;let e=this.artistService.getSupabase();if(e){n.removing=!0,n.error=null,this.cdr.markForCheck();try{let{error:t}=yield e.from("event_guestlist").delete().eq("event_id",n.id).eq("user_id",this.currentUser.uid);if(t)throw t;n.myClaim=null,n.claimed=Math.max(0,n.claimed-1),n.plusOnes=0,n.expanded=!1,this.confirmRemoveEvent=null}catch(t){n.error=t?.message||"Could not leave the list. Please try again."}finally{n.removing=!1,this.cdr.markForCheck()}}})}readProfile(){return y(this,null,function*(){if(!this.currentUser)return{};try{let n=yield F(this.injector,()=>{let e=U(this.firestore,`users/${this.currentUser.uid}`);return ie(e)});return n.exists()?ue(W({},n.data()),{displayName:this.currentUser.displayName||""}):{displayName:this.currentUser.displayName||""}}catch{return{displayName:this.currentUser.displayName||""}}})}queueConfirmEmails(n,e){return y(this,null,function*(){if(!this.currentUser?.email)return;let t=(e.userName||e.displayName||`${e.firstName||""} ${e.lastName||""}`).trim()||"a fan",a=this.formatDate(n.date),d=[n.venue,n.city].filter(Boolean).join(", "),u={to:this.currentUser.email,subject:`You're on the list \u2014 ${this.artistName||"us"} @ ${n.venue||n.title}`,html:`
2        <p>Hey ${this.escape(t.split(" ")[0]||t)},</p>
3        <p>You're on the guest list for <strong>${this.escape(n.title)}</strong> on ${this.escape(a)}${d?` at <strong>${this.escape(d)}</strong>`:""}.</p>
4        ${(n.myClaim?.plusOnes||0)>0?`<p>You're bringing <strong>+${n.myClaim?.plusOnes}</strong>.</p>`:""}
5        <p>Just bring a valid ID and your name \u2014 the venue will check you in.</p>
6        <p>See you there. \u{1F39F}\uFE0F</p>`,createdAt:Ve(),status:"queued",kind:"guestlist-claim-fan",eventId:n.id,artistId:this.artistId},w={to:`artist:${this.artistId}`,subject:`New guest list claim for ${n.title}`,html:`
7        <p>${this.escape(t)} (${this.escape(this.currentUser.email)}) just claimed a spot for <strong>${this.escape(n.title)}</strong> on ${this.escape(a)}.</p>
8        ${(n.myClaim?.plusOnes||0)>0?`<p>Bringing <strong>+${n.myClaim?.plusOnes}</strong>.</p>`:""}
9        <p>${n.claimed} of ${n.spots} spots claimed.</p>`,createdAt:Ve(),status:"queued",kind:"guestlist-claim-artist",eventId:n.id,artistId:this.artistId};yield Promise.all([F(this.injector,()=>{let x=U(this.firestore,`musisum_mail_queue/glclaim_${n.id}_${this.currentUser.uid}_fan`);return pe(x,u,{merge:!0})}),F(this.injector,()=>{let x=U(this.firestore,`musisum_mail_queue/glclaim_${n.id}_${this.currentUser.uid}_artist`);return pe(x,w,{merge:!0})})])})}escape(n){return(n||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=A({type:i,selectors:[["app-guestlist-claim"]],inputs:{artistId:"artistId",artistName:"artistName",currentUser:"currentUser",colors:"colors",focusEventId:"focusEventId"},features:[L],decls:3,vars:3,consts:[["hasSpotsConfigured",""],["noSpotConfigured",""],[4,"ngIf"],["class","gl-modal-back",3,"click",4,"ngIf"],[1,"mb-6","flex","items-end","justify-between","gap-3","flex-wrap"],[1,"text-2xl","sm:text-3xl","font-black","uppercase","leading-none",2,"letter-spacing","-0.01em"],[1,"text-sm","mt-2","opacity-80"],[1,"pop-stamp","inline-flex","items-center","px-3","py-1.5","text-[11px]","font-black","uppercase","tracking-widest","border-2","border-dashed"],[1,"space-y-4","list-none","p-0","m-0"],["class","pop-card relative p-4 sm:p-5 border-2 sm:border-[3px]","style","--pop-offset-x: 5px; --pop-offset-y: 5px;",3,"background-color","border-color",4,"ngFor","ngForOf","ngForTrackBy"],[1,"pop-card","relative","p-4","sm:p-5","border-2","sm:border-[3px]",2,"--pop-offset-x","5px","--pop-offset-y","5px"],[1,"absolute","
9inset-x-0","top-0","h-2","pop-stripe"],[1,"flex","items-start","gap-3","sm:gap-4","mt-2","flex-wrap"],[1,"flex-1","min-w-0"],[1,"text-[10px]","sm:text-xs","font-bold","uppercase","tracking-widest","opacity-70","mb-1"],[1,"text-lg","sm:text-xl","font-black","leading-tight","truncate"],[1,"text-xs","sm:text-sm","opacity-80","mt-0.5"],[1,"flex","items-center","gap-2"],[4,"ngIf","ngIfElse"],["class","mt-4 pt-4 border-t border-dashed flex flex-wrap items-center gap-3",3,"border-color",4,"ngIf"],[1,"inline-flex","items-center","gap-1.5","px-3","py-1.5","text-[11px]","font-black","uppercase","tracking-widest","border-2",2,"background","#d1fae5","border-color","#047857","color","#064e3b"],["type","button",1,"pop-btn","inline-flex","items-center","gap-1","px-2.5","py-1.5","text-[10px]","font-black","uppercase","tracking-widest","border-2","disabled:opacity-50","disabled:cursor-wait",2,"background","#fff","border-color","#b91c1c","color","#b91c1c",3,"click","disabled"],[1,"inline-flex","flex-col","items-center","px-2.5","py-1","text-[10px]","font-black","uppercase","tracking-widest"],[1,"text-base","font-black"],["type","button",1,"pop-btn","inline-flex","items-center","gap-1.5","px-4","py-2","text-[11px]","font-black","uppercase","tracking-widest","border-2","disabled:opacity-50","disabled:cursor-not-allowed",3,"click","disabled"],[1,"inline-flex","items-center","px-3","py-1.5","text-[11px]","font-bold","uppercase","tracking-widest","border-2","border-dashed"],[1,"mt-4","pt-4","border-t","border-dashed","flex","flex-wrap","items-center","gap-3"],["type","button",1,"pop-btn","inline-flex","items-center","gap-1.5","px-4","py-2","text-[11px]","font-black","uppercase","tracking-widest","border-2","disabled:opacity-50","disabled:cursor-wait",3,"click","disabled"],["type","button",1,"text-[11px]","font-bold","uppercase","tracking-widest","opacity-70","hover:opacity-100",3,"click"],["class","w-full text-xs font-bold mt-1","style","color:#b91c1c;",4,"ngIf"],[1,"text-[11px]","font-black","uppercase","tracking-widest"],[1,"px-3","py-1.5","text-sm","border-2","font-bold",3,"ngModelChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"w-full","text-xs","font-bold","mt-1",2,"color","#b91c1c"],[1,"mb-6"],[1,"pop-card","relative","p-5","sm:p-6","border-2","sm:border-[3px]","text-center",2,"--pop-offset-x","5px","--pop-offset-y","5px"],[1,"text-base","sm:text-lg","font-black","uppercase","tracking-widest","mt-2"],[1,"gl-modal-back",3,"click"],[1,"gl-modal","pop-card","relative","px-5","sm:px-7","py-6","border-2","sm:border-[3px]",2,"--pop-offset-x","8px","--pop-offset-y","8px",3,"click"],[1,"absolute","inset-x-0","top-0","h-2.5","pop-stripe",2,"color","#b91c1c"],[1,"absolute","-top-3","left-5","sm:left-7","px-2.5","py-1","text-[10px]","sm:text-xs","font-black","uppercase","tracking-widest",2,"background","#b91c1c","color","#fff"],[1,"text-sm","sm:text-base","font-bold","mt-3","leading-snug"],[1,"font-black"],[1,"text-xs","sm:text-sm","mt-2","opacity-80"],[1,"flex","flex-col","sm:flex-row","sm:justify-end","gap-2","mt-5"],["type","button",1,"pop-btn","inline-flex","items-center","justify-center","px-4","py-2","text-[11px]","font-black","uppercase","tracking-widest","border-2","disabled:opacity-50",3,"click","disabled"],["type","button",1,"pop-btn","inline-flex","items-center","justify-center","px-4","py-2","text-[11px]","font-black","uppercase","tracking-widest","border-2","disabled:opacity-50","disabled:cursor-wait",2,"background","#b91c1c","border-color","#7f1d1d","color","#fff",3,"click","disabled"]],template:function(e,t){e&1&&g(0,Wt,11,13,"ng-container",2)(1,Ht,10,13,"ng-container",2)(2,Jt,19,22,"div",3),e&2&&(m("ngIf",t.events.length>0),o(),m("ngIf",t.events.length===0),o(),m("ngIf",t.confirmRemoveEvent))},dependencies:[q,X,$,xe,lt,at,rt,ae,_e],styles:[".pop-stripe[_ngcontent-%COMP%]{background-image:repeating-linear-gradient(135deg,currentColor 0,currentColor 8px,transparent 8px,transparent 16px)}.pop-card[_ngcontent-%COMP%]{box-shadow:var(--pop-offset, 6px 6px) 0 0 var(--pop-shadow-color, #111);transition:transform .15s ease,box-shadow .15s ease}.pop-stamp[_ngcontent-%COMP%]{transform:rotate(-6deg);letter-spacing:.08em}.pop-btn[_ngcontent-%COMP%]{transition:transform .12s ease,box-shadow .12s ease}.pop-btn[_ngcontent-%COMP%]:hover:not(:disabled){transform:translate(-1px,-1px);box-shadow:5px 5px 0 0 var(--pop-shadow-color, #111)}.pop-btn[_ngcontent-%COMP%]:active:not(:disabled){transform:translate(2px,2px);box-shadow:0 0 0 0 var(--pop-shadow-color, #111)}.gl-modal-back[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0f172a8c;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:9999;display:flex;align-items:center;justify-content:center;padding:1rem;animation:_ngcontent-%COMP%_gl-fade .14s ease-out}@keyframes _ngcontent-%COMP%_gl-fade{0%{opacity:0}
9to{opacity:1}}.gl-modal[_ngcontent-%COMP%]{width:100%;max-width:460px;animation:_ngcontent-%COMP%_gl-pop .18s cubic-bezier(.22,1,.36,1)}@keyframes _ngcontent-%COMP%_gl-pop{0%{opacity:0;transform:translateY(6px) scale(.97)}to{opacity:1;transform:none}}"],changeDetection:0})};function Kt(i,n){if(i&1&&(l(0,"p",12),p(1),r()),i&2){let e=c(3);s("color",e.colors==null?null:e.colors.textSecondary),o(),C(e.poll.description)}}function Xt(i,n){if(i&1){let e=E();l(0,"button",16),v("click",function(){let a=h(e).$implicit,d=c(4);return b(d.vote(a.id))}),p(1),r()}if(i&2){let e=n.$implicit,t=c(4);s("background-color",t.colors==null?null:t.colors.background)("border-color",(t.colors==null?null:t.colors.textPrimary)||"#111")("color",t.colors==null?null:t.colors.textPrimary),m("disabled",t.voting),o(),_(" ",e.label," ")}}function ei(i,n){if(i&1&&(l(0,"p",17),p(1),r()),i&2){let e=c(4);o(),C(e.error)}}function ti(i,n){if(i&1&&(l(0,"div",13),g(1,Xt,2,8,"button",14)(2,ei,2,1,"p",15),r()),i&2){let e=c(3);o(),m("ngForOf",e.poll.options)("ngForTrackBy",e.trackByOptionId),o(),m("ngIf",e.error)}}function ii(i,n){if(i&1&&(l(0,"div")(1,"div",21)(2,"span",22),p(3),r(),l(4,"span",23),p(5),r()(),l(6,"div",24),f(7,"div",25),r()()),i&2){let e=n.$implicit,t=c(4);o(2),s("color",t.colors==null?null:t.colors.textPrimary),o(),C(e.label),o(),s("color",t.colors==null?null:t.colors.textSecondary),o(),le(" ",e.votes||0," \xB7 ",t.percent(e.votes),"% "),o(),s("border-color",(t.colors==null?null:t.colors.textPrimary)||"#111")("background-color",(t.colors==null?null:t.colors.backgroundSecondary)||"#fafafa"),o(),s("width",t.percent(e.votes),"%")("background-color",t.myOptionId===e.id?(t.colors==null?null:t.colors.textPrimary)||"#111":(t.colors==null?null:t.colors.primary)||(t.colors==null?null:t.colors.navigation_button)||"#666")}}function ni(i,n){if(i&1&&(l(0,"div",18)(1,"p",19),p(2),r(),g(3,ii,8,15,"div",20),r()),i&2){let e=c(3);o(2),_(" Thanks for voting \xB7 ",e.poll.totalVotes||0," votes total "),o(),m("ngForOf",e.poll.options)("ngForTrackBy",e.trackByOptionId)}}function oi(i,n){if(i&1&&(P(0),l(1,"div",7)(2,"h4",8),p(3),r(),g(4,Kt,2,3,"p",9)(5,ti,3,3,"div",10)(6,ni,4,3,"div",11),r(),I()),i&2){let e=c(2);o(),s("background-color",e.colors==null?null:e.colors.background)("border-color",(e.colors==null?null:e.colors.textPrimary)||"#111"),o(),s("color",e.colors==null?null:e.colors.textPrimary),o(),C(e.poll.title),o(),m("ngIf",e.poll.description),o(),m("ngIf",!e.hasVoted),o(),m("ngIf",e.hasVoted)}}function ri(i,n){if(i&1&&(l(0,"div",26),f(1,"div",27),l(2,"p",28),p(3," No active poll "),r(),l(4,"p",5),p(5),r()()),i&2){let e=c(2);s("background-color",e.colors==null?null:e.colors.background)("border-color",(e.colors==null?null:e.colors.textPrimary)||"#111"),o(),s("color",(e.colors==null?null:e.colors.primary)||(e.colors==null?null:e.colors.navigation_button)||"#111"),o(),s("color",e.colors==null?null:e.colors.textPrimary),o(2),s("color",e.colors==null?null:e.colors.textSecondary),o(),_(" ",e.artistName||"The band"," hasn't posted a poll yet. We'll surface the next one here the moment it goes live. ")}}function li(i,n){if(i&1&&(P(0),g(1,oi,7,10,"ng-container",6)(2,ri,6,11,"ng-template",null,1,R),I()),i&2){let e=D(3),t=c();o(),m("ngIf",t.poll)("ngIfElse",e)}}function ai(i,n){if(i&1&&f(0,"div",29),i&2){let e=c();s("border-color",((e.colors==null?null:e.colors.textPrimary)||"#111")+"33")}}var Te=class i{artistId=null;artistName=null;currentUser=null;colors;firestore=S(G);injector=S(B);cdr=S(j);poll=null;loading=!0;voting=!1;hasVoted=!1;myOptionId=null;error=null;ngOnChanges(n){(n.artistId||n.currentUser)&&this.refresh()}trackByOptionId(n,e){return e.id}percent(n){let e=this.poll?.totalVotes||0;return!e||!n?0:Math.max(0,Math.min(100,Math.round(n/e*100)))}refresh(){return y(this,null,function*(){if(!this.artistId){this.loading=!1,this.cdr.markForCheck();return}this.loading=!0,this.error=null,this.cdr.markForCheck();try{let n=yield F(this.injector,()=>y(this,null,function*(){let e=z(this.firestore,`musisum_polls/${this.artistId}/polls`),t=oe(e,re("active","==",!0),ce("createdAt","desc"),xt(1)),d=(yield ne(t)).docs[0];return d?W({id:d.id},d.data()):null}));if(this.poll=n,n&&this.currentUser){let e=yield F(this.injector,()=>ie(U(this.firestore,`musisum_polls/${this.artistId}/polls/${n.id}/responses/${this.currentUser.uid}`)));e.exists()?(this.hasVoted=!0,this.myOptionId=e.data().optionId||null):(this.hasVoted=!1,this.myOptionId=null)}else this.hasVoted=!1,this.myOptionId=null}catch(n){console.warn("[poll-section] refresh failed:",n),this.poll=null}finally{this.loading=!1,this.cdr.markForCheck()}})}vote(n){return y(this,null,function*(){if(!(!this.poll||!this.artistId||!this.currentUser||this.voting)){this.voting=!0,this.error=null,this.cdr.markForCheck();try{let e=`musisum_polls/${this.artistId}/polls/${this.poll.id}`,t=`${e}/responses/${this.currentUser.uid}`;yield F(this.injector,()=>ht(this.firestore,a=>y(this,null,function*(){let d=U(this.firestore,t);if((yield a.get(d)).exists())throw new Error("Already voted");let w=U(this.firestore,e),x=yield a.get(w);if(!x.exists())throw new Error("Poll missing");let M=x.data(),O=(M.options||[]).map(N=>N.id===n?ue(W({},N),{votes:(N.votes||0)+1}):N);a.update(w,{options:O,totalVotes:(M.totalVotes||0)+1}),a.set(d,{optionId:n,createdAt:Date.now()})}))),this.poll&&(this.poll=ue(W({},this.poll),{totalVotes:(this.poll.totalVotes||0)+1,options:this.poll.options.map(a=>a.id===n?ue(W({},a),{votes:(a.votes||0)+1}):a)})),this.myOptionId=n,this.hasVoted=!0}catch(e){this.error=e?.message==="Already voted"?"You already voted on this poll.":"Could not register your vote. Try again?"}finally{this.voting=!1,this.cdr.markForCheck()}}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=A({type:i,selectors:[["app-poll-section"]],inputs:{artistId:"artistId",artistName:"artistName",currentUser:"currentUser",colors:"colors"},features:[L],decls:9,vars:7,consts:[["loadingTpl",""],["noPoll",""],[1,"space-y-4"],[1,"mb-2"],[1,"text-2xl","font-black","uppercase","leading-none"],[1,"text-sm","mt-2","opacity-80"],[4,"ngIf","ngIfElse"],[1,"pop-card","border-2","sm:border-[3px]","p-5","sm:p-6",2,"--pop-offset-x","6px","--pop-offset-y","6px"],[1,"text-lg","sm:text-xl","font-black","mb-2"],["class","text-sm mb-4 opacity-80",3,"color",4,"ngIf"],["class","space-y-2",4,"ngIf"],["class","space-y-3",4,"ngIf"],[1,"text-sm","mb-4","opacity-80"],[1,"space-y-2"],["type","button","class","pop-btn w-full text-left px-4 py-3 text-sm font-bold border-2 disabled:opacity-50",3,"disabled","background-color","border-color","color","click",4,"ngFor","ngForOf","ngForTrackBy"],["class","text-xs font-bold mt-2","style","color: #b91c1c;",4,"ngIf"],["type","button",1,"pop-btn","w-full","text-left","px-4","py-3","text-sm","font-bold","border-2","disabled:opacity-50",3,"click","disabled"],[1,"text-xs","font-bold","mt-2",2,"color","#b91c1c"],[1,"space-y-3"],[1,"text-[11px]","font-black","uppercase","tracking-widest","opacity-70"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"flex","items-center","justify-between","mb-1"],[1,"text-sm","font-bold"],[1,"text-xs","font-mono"],[1,"h-2","border-2"],[1,"h-full","transition-all"],[1,"pop-card","relative","p-5","sm:p-6","border-2","sm:border-[3px]","text-center",2,"--pop-offset-x","5px","--pop-offset-y","5px"],[1,"absolute","
9inset-x-0","top-0","h-2","pop-stripe"],[1,"text-base","sm:text-lg","font-black","uppercase","tracking-widest","mt-2"],[1,"border-2","p-6","animate-pulse",2,"height","140px"]],template:function(e,t){if(e&1&&(l(0,"div",2)(1,"header",3)(2,"h3",4),p(3,"Poll"),r(),l(4,"p",5),p(5),r()(),g(6,li,4,2,"ng-container",6)(7,ai,1,2,"ng-template",null,0,R),r()),e&2){let a=D(8);o(2),s("color",t.colors==null?null:t.colors.textPrimary),o(2),s("color",t.colors==null?null:t.colors.textSecondary),o(),_(" ",t.artistName||"The band"," wants to hear from you. "),o(),m("ngIf",!t.loading)("ngIfElse",a)}},dependencies:[q,X,$],styles:[".pop-card[_ngcontent-%COMP%]{box-shadow:var(--pop-offset, 6px 6px) 0 0 var(--pop-shadow-color, #111)}.pop-stripe[_ngcontent-%COMP%]{background-image:repeating-linear-gradient(135deg,currentColor 0,currentColor 8px,transparent 8px,transparent 16px)}"],changeDetection:0})};function si(i,n){if(i&1&&(l(0,"p",14),p(1),r()),i&2){let e=c(3);o(),C(e.error)}}function ci(i,n){if(i&1){let e=E();l(0,"div",8)(1,"textarea",9),K("ngModelChange",function(a){h(e);let d=c(2);return J(d.draft,a)||(d.draft=a),b(a)}),r(),l(2,"div",10)(3,"span",11),p(4),r(),l(5,"button",12),v("click",function(){h(e);let a=c(2);return b(a.submit())}),p(6),r()(),g(7,si,2,1,"p",13),r()}if(i&2){let e=c(2);s("background-color",e.colors==null?null:e.colors.background)("border-color",(e.colors==null?null:e.colors.textPrimary)||"#111"),o(),s("background-color",e.colors==null?null:e.colors.background)("color",e.colors==null?null:e.colors.textPrimary)("border-color",(e.colors==null?null:e.colors.textPrimary)||"#111"),He("placeholder","What do you want to ask ",e.artistName||"the band","?"),Z("ngModel",e.draft),o(2),s("color",e.colors==null?null:e.colors.textSecondary),o(),_("",e.draft.length," / 500"),o(),s("background-color",(e.colors==null?null:e.colors.textPrimary)||"#111")("color",(e.colors==null?null:e.colors.background)||"#fff")("border-color",(e.colors==null?null:e.colors.textPrimary)||"#111"),m("disabled",e.submitting||!e.draft.trim()),o(),_(" ",e.submitting?"Sending\u2026":"Send question"," "),o(),m("ngIf",e.error)}}function pi(i,n){if(i&1&&(l(0,"div",21)(1,"p",16),p(2),r(),l(3,"p",17),p(4),r(),l(5,"p",18),p(6),ye(7,"date"),r()()),i&2){let e=c(3);s("border-color",((e.colors==null?null:e.colors.textPrimary)||"#111")+"33"),o(),s("color",(e.colors==null?null:e.colors.primary)||(e.colors==null?null:e.colors.navigation_button)),o(),_(" ",e.artistName||"The band"," replied "),o(),s("color",e.colors==null?null:e.colors.textPrimary),o(),C(e.record.answer),o(),s("color",e.colors==null?null:e.colors.textSecondary),o(),C(ve(7,11,e.record.answeredAt,"medium"))}}function di(i,n){if(i&1&&(l(0,"p",22),p(1),r()),i&2){let e=c(3);s("color",e.colors==null?null:e.colors.textSecondary),o(),_(" Waiting for ",e.artistName||"the band"," to reply\u2026 ")}}function mi(i,n){if(i&1&&(l(0,"div",15)(1,"div")(2,"p",16),p(3,"Your question"),r(),l(4,"p",17),p(5),r(),l(6,"p",18),p(7),ye(8,"date"),r()(),g(9,pi,8,14,"div",19)(10,di,2,3,"p",20),r()),i&2){let e=c(2);s("background-color",e.colors==null?null:e.colors.background)("border-color",(e.colors==null?null:e.colors.textPrimary)||"#111"),o(4),s("color",e.colors==null?null:e.colors.textPrimary),o(),C(e.record.question),o(),s("color",e.colors==null?null:e.colors.textSecondary),o(),C(ve(8,12,e.record.askedAt,"medium")),o(2),m("ngIf",e.re
9cord.answer),o(),m("ngIf",!e.record.answer)}}function ui(i,n){if(i&1&&(P(0),g(1,ci,8,25,"div",6)(2,mi,11,15,"div",7),I()),i&2){let e=c();o(),m("ngIf",!e.record),o(),m("ngIf",e.record)}}function gi(i,n){if(i&1&&f(0,"div",23),i&2){let e=c();s("border-color",((e.colors==null?null:e.colors.textPrimary)||"#111")+"33")}}var Me=class i{artistId=null;artistName=null;currentUser=null;colors;firestore=S(G);injector=S(B);cdr=S(j);loading=!0;submitting=!1;draft="";record=null;error=null;ngOnChanges(n){(n.artistId||n.currentUser)&&this.refresh()}get docPath(){return!this.artistId||!this.currentUser?.uid?null:`musisum_questions/${this.artistId}/questions/${this.currentUser.uid}`}refresh(){return y(this,null,function*(){let n=this.docPath;if(!n){this.loading=!1,this.cdr.markForCheck();return}this.loading=!0,this.cdr.markForCheck();try{let e=yield F(this.injector,()=>ie(U(this.firestore,n)));this.record=e.exists()?e.data():null}catch(e){console.warn("[question-section] refresh failed:",e),this.record=null}finally{this.loading=!1,this.cdr.markForCheck()}})}submit(){return y(this,null,function*(){let n=this.docPath;if(!n||this.submitting)return;let e=this.draft.trim();if(e){this.submitting=!0,this.error=null,this.cdr.markForCheck();try{let t={question:e,askedAt:Date.now(),userName:this.currentUser?.displayName||this.currentUser?.email?.split("@")[0]||"Fan",userEmail:this.currentUser?.email||void 0};yield F(this.injector,()=>pe(U(this.firestore,n),t,{merge:!1})),this.record=t,this.draft=""}catch(t){this.error="Could not send your question. Try again?",console.warn("[question-section] submit failed:",t)}finally{this.submitting=!1,this.cdr.markForCheck()}}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=A({type:i,selectors:[["app-question-section"]],inputs:{artistId:"artistId",artistName:"artistName",currentUser:"currentUser",colors:"colors"},features:[L],decls:9,vars:6,consts:[["loadingTpl",""],[1,"space-y-4"],[1,"mb-2"],[1,"text-2xl","font-black","uppercase","leading-none"],[1,"text-sm","mt-2","opacity-80"],[4,"ngIf","ngIfElse"],["class","pop-card border-2 sm:border-[3px] p-5 sm:p-6 space-y-3","style","--pop-offset-x: 6px; --pop-offset-y: 6px;",3,"background-color","border-color",4,"ngIf"],["class","pop-card border-2 sm:border-[3px] p-5 sm:p-6 space-y-4","style","--pop-offset-x: 6px; --pop-offset-y: 6px;",3,"background-color","border-color",4,"ngIf"],[1,"pop-card","border-2","sm:border-[3px]","p-5","sm:p-6","space-y-3",2,"--pop-offset-x","6px","--pop-offset-y","6px"],["rows","4","maxlength","500",1,"pop-input","block","w-full","px-3","py-2","text-sm","focus:outline-none","border-2",3,"ngModelChange","ngModel","placeholder"],[1,"flex","items-center","justify-between","gap-3"],[1,"text-[10px]","font-mono","opacity-70"],["type","button",1,"pop-btn","px-4","py-2","text-[11px]","font-black","uppercase","tracking-widest","border-2","disabled:opacity-50",3,"click","disabled"],["class","text-xs font-bold","style","color: #b91c1c;",4,"ngIf"],[1,"text-xs","font-bold",2,"color","#b91c1c"],[1,"pop-card","border-2","sm:border-[3px]","p-5","sm:p-6","space-y-4",2,"--pop-offset-x","6px","--pop-offset-y","6px"],[1,"text-[10px]","font-black","uppercase","tracking-widest","opacity-70","mb-1"],[1,"text-sm","whitespace-pre-wrap"],[1,"text-[10px]","mt-1","opacity-60","font-mono"],["class","border-t-2 border-dashed pt-4",3,"border-color",4,"ngIf"],["class","text-xs italic opacity-70",3,"color",4,"ngIf"],[1,"border-t-2","border-dashed","pt-4"],[1,"text-xs","italic","opacity-70"],[1,"border-2","p-6","animate-pulse",2,"height","140px"]],template:function(e,t){if(e&1&&(l(0,"div",1)(1,"header",2)(2,"h3",3),p(3,"Ask Your 1 Question"),r(),l(4,"p",4),p(5," One question per fan. Make it count. "),r()(),g(6,ui,3,2,"ng-container",5)(7,gi,1,2,"ng-template",null,0,R),r()),e&2){let a=D(8);o(2),s("color",t.colors==null?null:t.colors.textPrimary),o(2),s("color",t.colors==null?null:t.colors.textSecondary),o(2),m("ngIf",!t.loading)("ngIfElse",a)}},dependencies:[q,$,Se,xe,fe,ae,ke,_e],encapsulation:2,changeDetection:0})};var fi=(i,n)=>n.id;function _i(i,n){if(i&1&&(l(0,"p",13),p(1),r()),i&2){let e=c();o(),C(e.error)}}function xi(i,n){if(i&1&&(l(0,"p",14),p(1),r()),i&2){let e=c();o(),C(e.success)}}function hi(i,n){if(i&1&&(l(0,"span"),p(1),r()),i&2){let e=c().$implicit;o(),_(", ",e.country,"")}}function bi(i,n){if(i&1&&(l(0,"span",21),p(1),r()),i&2){let e=c().$implicit;o(),_(" \xB7 ",e.venue,"")}}function yi(i,n){if(i&1&&(l(0,"p",27),p(1),r()),i&2){let e=c().$implicit,t=c(3);s("color",t.colors==null?null:t.colors.textSecondary),o(),C(e.notes)}}function vi(i,n){if(i&1&&(l(0,"span",28),p(1,"New reply"),r()),i&2){let e=c(4);s("border-color",(e.colors==null?null:e.colors.textPrimary)||"#111")("color",e.colors==null?null:e.colors.textPrimary)}}function wi(i,n){if(i&1&&(l(0,"p",35),p(1,"Loading\u2026"),r()),i&2){let e=c(5);s("color",e.colors==null?null:e.colors.textSecondary)}}function Ci(i,n){if(i&1&&(l(0,"p",35),p(1),r()),i&2){let e=c(5);s("color",e.colors==null?null:e.colors.textSecondary),o(),_(" No replies yet. ",e.artistName||"The band"," sees your request and can answer here. ")}}function Si(i,n){if(i&1&&(l(0,"div",36)(1,"p",37),p(2),r(),l(3,"p",38),p(4),r()()),i&2){let e=n.$implicit,t=c(5);se("text-right",e.mine),o(),s("color",t.colors==null?null:t.colors.textPrimary),o(),_(" ",e.mine?"You":e.senderName||t.artistName||"Band"," "),o(),s("color",t.colors==null?null:t.colors.textSecondary),o(),C(e.text)}}function ki(i,n){if(i&1){let e=E();l(0,"div",29),g(1,wi,2,2,"p",30)(2,Ci,2,3,"p",30),Y(3,Si,5,8,"div",31,fi),l(5,"div",32)(6,"textarea",33),K("ngModelChange",function(a){h(e);let d=c(4);return J(d.replyDraft,a)||(d.replyDraft=a),b(a)}),r(),l(7,"button",34),v("click",function(){h(e);let a=c().$implicit,d=c(3);return b(d.sendReply(a))}),p(8),r()()()}if(i&2){let e=c(4);s("border-color",((e.colors==null?null:e.colors.textPrimary)||"#111")+"33"),o(),k(e.threadLoading?1:-1),o(),k(!e.threadLoading&&e.threadMsgs.length===0?2:-1),o(),Q(e.threadMsgs),o(3),s("background-color",e.colors==null?null:e.colors.background)("color",e.colors==null?null:e.colors.textPrimary)("border-color",(e.colors==null?null:e.colors.textPrimary)||"#111"),Z("ngModel",e.replyDraft),o(),s("background-color",(e.colors==null?null:e.colors.textPrimary)||"#111")("color",(e.colors==null?null:e.colors.background)||"#fff")("border-color",(e.colors==null?null:e.colors.textPrimary)||"#111"),m("disabled",e.replySending||!e.replyDraft.trim()),o(),_(" ",e.replySending?"\u2026":"Send"," ")}}function Pi(i,n){if(i&1){let e=E();l(0,"div",19)(1,"p",20),p(2),g(3,hi,2,1,"span")(4,bi,2,1,"span",21),r(),g(5,yi,2,3,"p",22),l(6,"p",23),p(7),ye(8,"date"),r(),l(9,"button",24),v("click",function(){let a=h(e).$implicit,d=c(3);return b(d.toggleThread(a))}),p(10),g(11,vi,2,4,"span",25),r(),g(12,ki,9,19,"div",26),r()}if(i&2){let e=n.$implicit,t=c(3);s("background-color",t.colors==null?null:t.colors.background)("border-color",((t.colors==null?null:t.colors.textPrimary)||"#111")+"55"),o(),s("color",t.colors==null?null:t.colors.textPrimary),o(),_(" ",e.city,""),o(),k(e.country?3:-1),o(),k(e.venue?4:-1),o(),k(e.notes?5:-1),o(),s("color",t.colors==null?null:t.colors.textSecondary),o(),C(ve(8,18,e.createdAt,"medium")),o(2),s("color",t.colors==null?null:t.colors.textPrimary),o(),_(" ",t.expandedId===e.id?"Hide conversation":"Conversation"," "),o(),k(e.unreadForFan?11:-1),o(),k(t.expandedId===e.id?12:-1)}}function Ii(i,n){if(i&1&&(l(0,"div",16)(1,"p",17),p(2,"Your requests"),r(),Y(3,Pi,13,21,"div",18,Ge().trackByRequestId,!0),r()),i&2){let e=c(2);o(),s("color",e.colors==null?null:e.colors.textPrimary),o(2),Q(e.myRequests)}}function Ei(i,n){if(i&1&&g(0,Ii,5,2,"div",16),i&2){let e=c();k(e.myRequests.length>0?0:-1)}}function Fi(i,n){if(i&1&&f(0,"div",39),i&2){let e=c();s("border-color",((e.colors==null?null:e.colors.textPrimary)||"#111")+"33")}}var Ne=class i{artistId=null;artistName=null;currentUser=null;colors;firestore=S(G);injector=S(B);cdr=S(j);city="";country="";venue="";notes="";loading=!0;submitting=!1;myRequests=[];error=null;success=null;expandedId=null;threadMsgs=[];threadLoading=!1;replyDraft="";replySending=!1;trackByRequestId(n,e){return e.id||""}ngOnChanges(n){(n.artistId||n.currentUser)&&this.refresh()}refresh(){return y(this,null,function*(){if(!this.artistId||!this.currentUser?.uid){this.loading=!1,this.cdr.markForCheck();return}this.loading=!0,this.cdr.markForCheck();try{let n=z(this.firestore,`musisum_show_requests/${this.artistId}/requests`),e=oe(n,re("userID","==",this.currentUser.uid),ce("createdAt","desc")),t=yield F(this.injector,()=>ne(e));this.myRequests=t.docs.map(a=>W({id:a.id},a.data()))}catch(n){console.warn("[showrequest-section] refresh failed:",n),this.myRequests=[]}finally{this.loading=!1,this.cdr.markForCheck()}})}submit(){return y(this,null,function*(){if(!this.artistId||!this.currentUser||this.submitting)return;let n=this.city.trim();if(n){this.submitting=!0,this.error=null,this.success=null,this.cdr.markForCheck();try{let e={userID:this.currentUser.uid,userName:this.currentUser.displayName||this.currentUser.email?.split("@")[0]||"Fan",userEmail:this.currentUser.email||null,city:n,country:this.country.trim()||null,venue:this.venue.trim()||null,notes:this.notes.trim()||null,createdAt:Date.now()};yield F(this.injector,()=>Ce(z(this.firestore,`musisum_show_requests/${this.artistId}/requests`),e)),this.success="Thanks! Your request was sent.",this.city="",this.country="",this.venue="",this.notes="",this.refresh(),setTimeout(()=>{this.success=null,this.cdr.markForCheck()},4e3)}catch(e){this.error="Could not send. Try again?",console.warn("[showrequest-section] submit failed:",e)}finally{this.submitting=!1,this.cdr.markForCheck()}}})}toggleThread(n){return y(this,null,function*(){if(this.expandedId===n.id){this.expandedId=null,this.threadMsgs=[],this.replyDraft="",this.cdr.markForCheck();return}this.expandedId=n.id||null,this.replyDraft="",yield this.loadThread(n),n.unreadForFan&&this.artistId&&n.id&&(n.unreadForFan=!1,F(this.injector,()=>De(U(this.firestore,`musisum_show_requests/${this.artistId}/requests/${n.id}`),{unreadForFan:!1}
9)).catch(()=>{}))})}loadThread(n){return y(this,null,function*(){if(!(!this.artistId||!n.id)){this.threadLoading=!0,this.cdr.markForCheck();try{let e=z(this.firestore,`musisum_show_requests/${this.artistId}/requests/${n.id}/messages`),t=yield F(this.injector,()=>ne(oe(e,ce("createdAt"))));this.threadMsgs=t.docs.map(a=>{let d=a.data();return{id:a.id,mine:d.sender!=="band",senderName:String(d.senderName||""),text:String(d.text||""),createdAt:String(d.createdAt||"")}})}catch(e){console.warn("[showrequest-section] thread load failed:",e),this.threadMsgs=[]}finally{this.threadLoading=!1,this.cdr.markForCheck()}}})}sendReply(n){return y(this,null,function*(){if(!this.artistId||!this.currentUser||!n.id||this.replySending)return;let e=this.replyDraft.trim();if(e){this.replySending=!0,this.cdr.markForCheck();try{let t=new Date().toISOString();yield F(this.injector,()=>Ce(z(this.firestore,`musisum_show_requests/${this.artistId}/requests/${n.id}/messages`),{text:e,sender:"fan",senderName:this.currentUser.displayName||this.currentUser.email?.split("@")[0]||"Fan",createdAt:t})),yield F(this.injector,()=>De(U(this.firestore,`musisum_show_requests/${this.artistId}/requests/${n.id}`),{lastMessageText:e.substring(0,200),lastMessageAt:t,lastSender:"fan",unreadForArtist:!0,unreadForFan:!1,readByArtist:!1})),this.replyDraft="",yield this.loadThread(n)}catch(t){console.warn("[showrequest-section] reply failed:",t)}finally{this.replySending=!1,this.cdr.markForCheck()}}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=A({type:i,selectors:[["app-showrequest-section"]],inputs:{artistId:"artistId",artistName:"artistName",currentUser:"currentUser",colors:"colors"},features:[L],decls:31,vars:56,consts:[[1,"space-y-4"],[1,"mb-2"],[1,"text-2xl","font-black","uppercase","leading-none"],[1,"text-sm","mt-2","opacity-80"],[1,"pop-card","border-2","sm:border-[3px]","p-5","sm:p-6","space-y-3",2,"--pop-offset-x","6px","--pop-offset-y","6px"],[1,"block","text-[10px]","font-black","uppercase","tracking-widest","mb-1"],["type","text","maxlength","80","placeholder","e.g. Berlin",1,"pop-input","block","w-full","px-3","py-2","text-sm","focus:outline-none","border-2",3,"ngModelChange","ngModel"],[1,"grid","grid-cols-2","gap-3"],["type","text","maxlength","60",1,"pop-input","block","w-full","px-3","py-2","text-sm","focus:outline-none","border-2",3,"ngModelChange","ngModel"],["type","text","maxlength","80",1,"pop-input","block","w-full","px-3","py-2","text-sm","focus:outline-none","border-2",3,"ngModelChange","ngModel"],["rows","3","maxlength","400","placeholder","Any details? Crowd size, special occasion\u2026",1,"pop-input","block","w-full","px-3","py-2","text-sm","focus:outline-none","border-2",3,"ngModelChange","ngModel"],[1,"flex","items-center","justify-end"],["type","button",1,"pop-btn","px-4","py-2","text-[11px]","font-black","uppercase","tracking-widest","border-2","disabled:opacity-50",3,"click","disabled"],[1,"text-xs","font-bold",2,"color","#b91c1c"],[1,"text-xs","font-bold",2,"color","#047857"],[1,"border-2","p-4","animate-pulse",2,"height","80px",3,"border-color"],[1,"space-y-2"],[1,"text-[10px]","font-black","uppercase","tracking-widest","opacity-70","mt-2"],[1,"border-2","px-4","py-3",3,"background-color","border-color"],[1,"border-2","px-4","py-3"],[1,"text-sm","font-bold"],[1,"font-normal","opacity-70"],[1,"text-xs","mt-1","opacity-80",3,"color"],[1,"text-[10px]","mt-1","opacity-60","font-mono"],["type","button",1,"mt-2","text-[10px]","font-black","uppercase","tracking-widest","underline",3,"click"],[1,"ml-1","px-1.5","py-0.5","border-2","not-italic",3,"border-color","color"],[1,"mt-3","space-y-2","border-t-2","pt-3",3,"border-color"],[1,"text-xs","mt-1","opacity-80"],[1,"ml-1","px-1.5","py-0.5","border-2","not-italic"],[1,"mt-3","space-y-2","border-t-2","pt-3"],[1,"text-xs","opacity-60",3,"color"],[1,"text-xs",3,"text-right"],[1,"flex","items-end","gap-2","pt-1"],["rows","2","maxlength","1000","placeholder","Write a reply\u2026",1,"pop-input","block","w-full","px-3","py-2","text-xs","focus:outline-none","border-2",3,"ngModelChange","ngModel"],["type","button",1,"pop-btn","px-3","py-2","text-[10px]","font-black","uppercase","tracking-widest","border-2","disabled:opacity-50",3,"click","disabled"],[1,"text-xs","opacity-60"],[1,"text-xs"],[1,"font-bold","opacity-70"],[1,"mt-0.5","whitespace-pre-line"],[1,"border-2","p-4","animate-pulse",2,"height","80px"]],template:function(e,t){e&1&&(l(0,"div",0)(1,"header",1)(2,"h3",2),p(3,"Show Request"),r(),l(4,"p",3),p(5),r()(),l(6,"div",4)(7,"div")(8,"label",5),p(9,"City *"),r(),l(10,"input",6),K("ngModelChange",function(d){return J(t.city,d)||(t.city=d),d}),r()(),l(11,"div",7)(12,"div")(13,"label",5),p(14,"Country"),r(),l(15,"input",8),K("ngModelChange",function(d){return J(t.country,d)||(t.country=d),d}),r()(),l(16,"div")(17,"label",5),p(18,"Venue (optional)"),r(),l(19,"input",9),K("ngModelChange",function(d){return J(t.venue,d)||(t.venue=d),d}),r()()(),l(20,"div")(21,"label",5),p(22,"Notes"),r(),l(23,"textarea",10),K("ngModelChange",function(d){return J(t.notes,d)||(t.notes=d),d}),r()(),l(24,"div",11)(25,"button",12),v("click",function(){return t.submit()}
9),p(26),r()(),g(27,_i,2,1,"p",13)(28,xi,2,1,"p",14),r(),g(29,Ei,1,1)(30,Fi,1,2,"div",15),r()),e&2&&(o(2),s("color",t.colors==null?null:t.colors.textPrimary),o(2),s("color",t.colors==null?null:t.colors.textSecondary),o(),_(" Tell ",t.artistName||"the band"," where you'd love to see them play. "),o(),s("background-color",t.colors==null?null:t.colors.background)("border-color",(t.colors==null?null:t.colors.textPrimary)||"#111"),o(2),s("color",t.colors==null?null:t.colors.textPrimary),o(2),s("background-color",t.colors==null?null:t.colors.background)("color",t.colors==null?null:t.colors.textPrimary)("border-color",(t.colors==null?null:t.colors.textPrimary)||"#111"),Z("ngModel",t.city),o(3),s("color",t.colors==null?null:t.colors.textPrimary),o(2),s("background-color",t.colors==null?null:t.colors.background)("color",t.colors==null?null:t.colors.textPrimary)("border-color",(t.colors==null?null:t.colors.textPrimary)||"#111"),Z("ngModel",t.country),o(2),s("color",t.colors==null?null:t.colors.textPrimary),o(2),s("background-color",t.colors==null?null:t.colors.background)("color",t.colors==null?null:t.colors.textPrimary)("border-color",(t.colors==null?null:t.colors.textPrimary)||"#111"),Z("ngModel",t.venue),o(2),s("color",t.colors==null?null:t.colors.textPrimary),o(2),s("background-color",t.colors==null?null:t.colors.background)("color",t.colors==null?null:t.colors.textPrimary)("border-color",(t.colors==null?null:t.colors.textPrimary)||"#111"),Z("ngModel",t.notes),o(2),s("background-color",(t.colors==null?null:t.colors.textPrimary)||"#111")("color",(t.colors==null?null:t.colors.background)||"#fff")("border-color",(t.colors==null?null:t.colors.textPrimary)||"#111"),m("disabled",t.submitting||!t.city.trim()),o(),_(" ",t.submitting?"Sending\u2026":"Send request"," "),o(),k(t.error?27:-1),o(),k(t.success?28:-1),o(),k(t.loading?30:29))},dependencies:[q,Se,xe,fe,ae,ke,_e],encapsulation:2,changeDetection:0})};function Ti(i,n){if(i&1){let e=E();P(0),l(1,"div",11),f(2,"img",12),l(3,"button",13),v("click",function(){let a=h(e).ngIf,d=c(3);return b(d.remove(a))}),p(4),r()(),I()}if(i&2){let e=n.ngIf,t=c().index,a=c(2);o(),s("border-color",(a.colors==null?null:a.colors.textPrimary)||"#111")("background-color",(a.colors==null?null:a.colors.backgroundSecondary)||"#fafafa"),o(),m("src",e.thumbnailURL||e.imageUrl,ee)("alt","Your fan photo "+(t+1)),o(),m("disabled",a.busyId===e.id),o(),_(" ",a.busyId===e.id?"\u2026":"Remove"," ")}}function Mi(i,n){if(i&1){let e=E();l(0,"label",14)(1,"span",15),p(2,"+"),r(),l(3,"span",16),p(4),r(),l(5,"input",17),v("change",function(a){h(e);let d=c(3);return b(d.onFile(a))}),r()()}if(i&2){let e=c(3);s("border-color",((e.colors==null?null:e.colors.textPrimary)||"#111")+"88")("background-color",(e.colors==null?null:e.colors.backgroundSecondary)||"#fafafa"),se("opacity-50",e.uploading),o(),s("color",e.colors==null?null:e.colors.textPrimary),o(2),s("color",e.colors==null?null:e.colors.textSecondary),o(),_(" ",e.uploading?"Uploading\u2026":"Upload"," "),o(),m("disabled",e.uploading)}}function Ni(i,n){if(i&1&&(P(0),g(1,Ti,5,8,"ng-container",6)(2,Mi,6,12,"ng-template",null,1,R),I()),i&2){let e=n.index,t=D(3),a=c(2);o(),m("ngIf",a.myPics[e])("ngIfElse",t)}}function Ui(i,n){if(i&1&&(l(0,"p",18),p(1),r()),i&2){let e=c(2);s("color",e.colors==null?null:e.colors.textSecondary),o(),_(" Uploading\u2026 ",e.progress,"% ")}}function Oi(i,n){if(i&1&&(l(0,"p",19),p(1),r()),i&2){let e=c(2);o(),C(e.error)}}function Vi(i,n){if(i&1&&(P(0),l(1,"div",7),g(2,Ni,4,2,"ng-container",8),r(),g(3,Ui,2,3,"p",9)(4,Oi,2,1,"p",10),I()),i&2){let e=c();o(2),m("ngForOf",e.slots),o(),m("ngIf",e.progress>0&&e.progress<100),o(),m("ngIf",e.error)}}function Di(i,n){if(i&1&&f(0,"div",22),i&2){let e=c(2);s("border-color",((e.colors==null?null:e.colors.textPrimary)||"#111")+"33")}}function Ri(i,n){if(i&1&&(l(0,"div",20),g(1,Di,1,2,"div",21),r()),i&2){let e=c();o(),m("ngForOf",e.slots)}}var Ue=class i{artistId=null;artistName=null;currentUser=null;colors;firestore=S(G);storage=S(vt);injector=S(B);cdr=S(j);slots=[0,1,2];loading=!0;uploading=!1;busyId=null;progress=0;myPics=[];error=null;ngOnChanges(n){(n.artistId||n.currentUser)&&this.refresh()}refresh(){return y(this,null,function*(){if(!this.artistId||!this.currentUser?.uid){this.loading=!1,this.cdr.markForCheck();return}this.loading=!0,this.cdr.markForCheck();try{let n=z(this.firestore,"musisum_dropbox"),e=oe(n,re("artist_id","==",this.artistId),re("submittedBy","==",this.currentUser.uid),ce("submissionDate","desc")),t=yield F(this.injector,()=>ne(e));this.myPics=t.docs.slice(0,3).map(a=>W({id:a.id},a.data()))}catch(n){console.warn("[fanpics-section] refresh failed:",n),this.myPics=[]}finally{this.loading=!1,this.cdr.markForCheck()}})}onFile(n){return y(this,null,function*(){let e=n.target,t=e.files?.[0];if(t&&(e.value="",!(!this.artistId||!this.currentUser||this.uploading))){if(this.myPics.length>=3){this.error="You already have three pics. Remove one first.",this.cdr.markForCheck();return}if(t.size>10*1024*1024){this.error="Pic is too big, max 10 MB.",this.cdr.markForCheck();return}this.uploading=!0,this.error=null,this.progress=0,this.cdr.markForCheck();try{let a=yield this.generateThumbnail(t,600,.78).catch(()=>null),d=Date.now(),u=(t.name.split(".").pop()||"jpg").toLowerCase(),w=`${this.currentUser.uid}_${d}`,x=`musisum_dropbox/${this.artistId}/${w}.${u}`,M=a?`musisum_dropbox/${this.artistId}/${w}_thumb.jpg`:null,O=yield this.uploadWithProgress(x,t,!0),N=null;if(a&&M)try{N=yield this.uploadWithProgress(M,a,!1)}catch(me){console.warn("[fanpics-section] thumb upload failed (non-fatal):",me)}let V={artist_id:this.artistId,imageUrl:O,storagePath:x,submittedBy:this.currentUser.uid,submitterName:this.currentUser.displayName||this.currentUser.email?.split("@")[0]||"Fan",submissionDate:new Date};N&&(V.thumbnailURL=N),M&&N&&(V.thumbnailPath=M),yield F(this.injector,()=>Ce(z(this.firestore,"musisum_dropbox"),V)),yield this.refresh()}catch(a){console.warn("[fanpics-section] upload failed:",a),this.error="Upload failed. Try again?"}finally{this.uploading=!1,this.progress=0,this.cdr.markForCheck()}}})}uploadWithProgress(n,e,t){let a=Ie(this.storage,n),d=Ct(a,e,St());return new Promise((u,w)=>{d.on("state_changed",x=>{t&&(this.progress=Math.round(x.bytesTransferred/x.totalBytes*100),this.cdr.markForCheck())},x=>w(x),()=>y(this,null,function*(){try{let x=yield wt(d.snapshot.ref);u(x)}catch(x){w(x)}}))})}generateThumbnail(n,e,t){return new Promise((a,d)=>
9{if(typeof window>"u"||!n.type.startsWith("image/")){d(new Error("No image / no DOM"));return}let u=URL.createObjectURL(n),w=new Image;w.onload=()=>{try{let x=Math.min(e/w.width,e/w.height,1),M=Math.max(1,Math.round(w.width*x)),O=Math.max(1,Math.round(w.height*x)),N=document.createElement("canvas");N.width=M,N.height=O;let V=N.getContext("2d");if(!V){URL.revokeObjectURL(u),d(new Error("No canvas ctx"));return}V.drawImage(w,0,0,M,O),N.toBlob(me=>{URL.revokeObjectURL(u),me?a(me):d(new Error("Thumbnail encode failed"))},"image/jpeg",t)}catch(x){URL.revokeObjectURL(u),d(x)}},w.onerror=()=>{URL.revokeObjectURL(u),d(new Error("Image decode failed"))},w.src=u})}remove(n){return y(this,null,function*(){if(!(!n.id||this.busyId)){this.busyId=n.id,this.error=null,this.cdr.markForCheck();try{if(n.storagePath)try{yield Re(Ie(this.storage,n.storagePath))}catch{}if(n.thumbnailPath)try{yield Re(Ie(this.storage,n.thumbnailPath))}catch{}yield F(this.injector,()=>_t(U(this.firestore,`musisum_dropbox/${n.id}`))),this.myPics=this.myPics.filter(e=>e.id!==n.id)}catch(e){console.warn("[fanpics-section] delete failed:",e),this.error="Could not remove that photo."}finally{this.busyId=null,this.cdr.markForCheck()}}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=A({type:i,selectors:[["app-fanpics-section"]],inputs:{artistId:"artistId",artistName:"artistName",currentUser:"currentUser",colors:"colors"},features:[L],decls:9,vars:7,consts:[["loadingTpl",""],["emptySlot",""],[1,"space-y-4"],[1,"mb-2"],[1,"text-2xl","font-black","uppercase","leading-none"],[1,"text-sm","mt-2","opacity-80"],[4,"ngIf","ngIfElse"],[1,"grid","grid-cols-3","gap-3","sm:gap-4"],[4,"ngFor","ngForOf"],["class","text-[11px] font-mono opacity-70 mt-2",3,"color",4,"ngIf"],["class","text-xs font-bold mt-2","style","color: #b91c1c;",4,"ngIf"],[1,"relative","aspect-square","border-2","sm:border-[3px]","overflow-hidden"],["loading","lazy",1,"w-full","h-full","object-cover",3,"src","alt"],["type","button","title","Remove this photo",1,"absolute","top-1","right-1","px-2","py-0.5","text-[9px]","font-black","uppercase","tracking-widest","border-2","disabled:opacity-50",2,"background","rgba(255,255,255,0.95)","border-color","#b91c1c","color","#b91c1c",3,"click","disabled"],[1,"relative","aspect-square","border-2","border-dashed","flex","flex-col","items-center","justify-center","cursor-pointer","hover:opacity-80","transition-opacity"],[1,"text-3xl","font-black"],[1,"text-[10px]","font-black","uppercase","tracking-widest","mt-1","opacity-70"],["type","file","accept","image/*",1,"hidden",3,"change","disabled"],[1,"text-[11px]","font-mono","opacity-70","mt-2"],[1,"text-xs","font-bold","mt-2",2,"color","#b91c1c"],[1,"grid","grid-cols-3","gap-3"],["class","aspect-square border-2 animate-pulse",3,"border-color",4,"ngFor","ngForOf"],[1,"aspect-square","border-2","animate-pulse"]],template:function(e,t){if(e&1&&(l(0,"div",2)(1,"header",3)(2,"h3",4),p(3,"Best 3 Fanpics"),r(),l(4,"p",5),p(5),r()(),g(6,Vi,5,3,"ng-container",6)(7,Ri,2,1,"ng-template",null,0,R),r()),e&2){let a=D(8);o(2),s("color",t.colors==null?null:t.colors.textPrimary),o(2),s("color",t.colors==null?null:t.colors.textSecondary),o(),_(" Share up to three of your favourite shots of ",t.artistName||"the band",". "),o(),m("ngIf",!t.loading)("ngIfElse",a)}},dependencies:[q,X,$],encapsulation:2,changeDetection:0})};function Ai(i,n){if(i&1&&(l(0,"a",12),T(),l(1,"svg",13),f(2,"path",14),r(),p(3),r()),i&2){let e=n.$implicit,t=c(4);s("background-color",t.colors==null?null:t.colors.background)("border-color",(t.colors==null?null:t.colors.textPrimary)||"#111")("color",t.colors==null?null:t.colors.textPrimary),m("href",t.downloadUrl(e),ee),o(3),_(" ",e.label," ")}}function ji(i,n){if(i&1&&(l(0,"div",8)(1,"h4",9),p(2),r(),l(3,"div",10),g(4,Ai,4,8,"a",11),r()()),i&2){let e=n.$implicit,t=c(3);s("background-color",t.colors==null?null:t.colors.background)("border-color",(t.colors==null?null:t.colors.textPrimary)||"#111"),o(),s("color",t.colors==null?null:t.colors.textPrimary),o(),C(e.productName),o(2),m("ngForOf",e.files)}}function qi(i,n){if(i&1&&(P(0),g(1,ji,5,8,"div",7),I()),i&2){let e=c(2);o(),m("ngForOf",e.purchases)}}function Li(i,n){if(i&1&&(l(0,"div",15),f(1,"div",16),l(2,"p",17),p(3,"No orders yet"),r(),l(4,"p",5),p(5),r()()),i&2){let e=c(2);s("background-color",e.colors==null?null:e.colors.background)("border-color",(e.colors==null?null:e.colors.textPrimary)||"#111"),o(),s("color",(e.colors==null?null:e.colors.primary)||(e.colors==null?null:e.colors.navigation_button)||"#111"),o(),s("color",e.colors==null?null:e.colors.textPrimary),o(2),s("color",e.colors==null?null:e.colors.textSecondary),o(),_(" Buy something from ",e.artistName||"this artist","'s shop and it'll show up here, with a download link if it's digital. ")}}function Bi(i,n){if(i&1&&(P(0),g(1,qi,2,1,"ng-container",6)(2,Li,6,11,"ng-template",null,1,R),I()),i&2){let e=D(3),t=c();o(),m("ngIf",t.purchases.length)("ngIfElse",e)}}function $i(i,n){if(i&1&&f(0,"div",18),i&2){let e=c();s("border-color",((e.colors==null?null:e.colors.textPrimary)||"#111")+"33")}}var kt="https://europe-west1-pinguin-radio-d46f3.cloudfunctions.net",Oe=class i{artistId=null;artistName=null;currentUser=null;colors;cdr=S(j);purchases=[];loading=!0;ngOnChanges(n){(n.artistId||n.currentUser)&&this.refresh()}downloadUrl(n){return`${kt}/musisumDigitalDownload?token=${n.token}&file=${n.fileIndex}`}refresh(){return y(this,null,function*(){if(!this.artistId||!this.currentUser){this.purchases=[],this.loading=!1,this.cdr.markForCheck();return}this.loading=!0,this.cdr.markForCheck();try{let n=yield this.currentUser.getIdToken(),t=yield(yield fetch(`${kt}/musisumGetMyDigitalPurchases`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},body:JSON.stringify({data:{artistId:this.artistId}})})).json();this.purchases=t.result?.purchases||[]}catch(n){console.warn("[digital-downloads-section] refresh failed:",n),this.purchases=[]}finally{this.loading=!1,this.cdr.markForCheck()}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=A({type:i,selectors:[["app-digital-downloads-section"]],inputs:{artistId:"artistId",artistName:"artistName",currentUser:"currentUser",colors:"colors"},features:[L],decls:9,vars:7,consts:[["loadingTpl",""],["noPurchases",""],[1,"space-y-4"],[1,"mb-2"],[1,"text-2xl","font-black","uppercase","leading-none"],[1,"text-sm","mt-2","opacity-80"],[4,"ngIf","ngIfElse"],["class","pop-card border-2 sm:border-[3px] p-5 sm:p-6","
9style","--pop-offset-x: 6px; --pop-offset-y: 6px;",3,"background-color","border-color",4,"ngFor","ngForOf"],[1,"pop-card","border-2","sm:border-[3px]","p-5","sm:p-6",2,"--pop-offset-x","6px","--pop-offset-y","6px"],[1,"text-lg","font-black","mb-3"],[1,"flex","flex-wrap","gap-2"],["target","_blank","rel","noopener","class","pop-btn inline-flex items-center gap-1.5 px-3 py-2 text-xs font-bold border-2",3,"href","background-color","border-color","color",4,"ngFor","ngForOf"],["target","_blank","rel","noopener",1,"pop-btn","inline-flex","items-center","gap-1.5","px-3","py-2","text-xs","font-bold","border-2",3,"href"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","stroke-width","2",1,"w-3.5","h-3.5"],["stroke-linecap","round","stroke-linejoin","round","d","M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M7.5 12 12 16.5m0 0L16.5 12M12 16.5V3"],[1,"pop-card","relative","p-5","sm:p-6","border-2","sm:border-[3px]","text-center",2,"--pop-offset-x","5px","--pop-offset-y","5px"],[1,"absolute","inset-x-0","top-0","h-2","pop-stripe"],[1,"text-base","sm:text-lg","font-black","uppercase","tracking-widest","mt-2"],[1,"border-2","p-6","animate-pulse",2,"height","120px"]],template:function(e,t){if(e&1&&(l(0,"div",2)(1,"header",3)(2,"h3",4),p(3,"My Orders"),r(),l(4,"p",5),p(5),r()(),g(6,Bi,4,2,"ng-container",6)(7,$i,1,2,"ng-template",null,0,R),r()),e&2){let a=D(8);o(2),s("color",t.colors==null?null:t.colors.textPrimary),o(2),s("color",t.colors==null?null:t.colors.textSecondary),o(),_(" Digital tracks and albums you bought from ",t.artistName||"this artist",". "),o(),m("ngIf",!t.loading)("ngIfElse",a)}},dependencies:[q,X,$],styles:[".pop-card[_ngcontent-%COMP%]{box-shadow:var(--pop-offset, 6px 6px) 0 0 var(--pop-shadow-color, #111)}.pop-stripe[_ngcontent-%COMP%]{background-image:repeating-linear-gradient(135deg,currentColor 0,currentColor 8px,transparent 8px,transparent 16px)}"],changeDetection:0})};var Gi=()=>[1,2,3],zi=(i,n)=>n.place_id||n.display_name,Wi=(i,n)=>n.name,Hi=(i,n)=>n.title,Yi=(i,n)=>n.id;function Qi(i,n){if(i&1&&f(0,"img",88),i&2){let e=c(3);m("src",e.artist.logo==null?null:e.artist.logo.downloadURL,ee)("alt",e.artist.name)}}function Zi(i,n){if(i&1&&(l(0,"span",89),p(1),r()),i&2){let e=c(3);s("color",e.websiteSettings.colors.navigation_text),o(),_(" ",e.artist.name," ")}}function Ji(i,n){if(i&1){let e=E();l(0,"a",91),v("click",function(a){h(e);let d=c().$implicit,u=c(3);return b(u.onMenuItemClick(d,a))}),T(),l(1,"svg",27),f(2,"path",92),r(),p(3),r()}if(i&2){let e=c().$implicit;o(3),_(" ",e.label," ")}}function Ki(i,n){if(i&1){let e=E();l(0,"a",93),v("click",function(a){h(e);let d=c().$implicit,u=c(3);return b(u.onMenuItemClick(d,a))}),l(1,"span",94),p(2),r(),f(3,"span",95),r()}if(i&2){let e=c().$implicit,t=c(3);m("routerLink",e.value),o(2),C(e.label),o(),s("background-color",t.websiteSettings.colors.navigation_button)}}function Xi(i,n){if(i&1&&(P(0),g(1,Ji,4,1,"a",90)(2,Ki,4,4,"ng-template",null,0,R),I()),i&2){let e=n.$implicit,t=D(3);o(),m("ngIf",e.type==="backstage")("ngIfElse",t)}}function en(i,n){i&1&&(T(),l(0,"svg",96),f(1,"path",97),r())}function tn(i,n){i&1&&(T(),l(0,"svg",96),f(1,"path",98),r())}function nn(i,n){if(i&1){let e=E();l(0,"a",101),v("click",function(a){h(e);let d=c().$implicit,u=c(4);return b(u.onMobileMenuItemClick(d,a))}),T(),l(1,"svg",102),f(2,"path",92),r(),p(3),r()}if(i&2){let e=c().$implicit;o(3),_(" ",e.label," ")}}function on(i,n){if(i&1){let e=E();l(0,"a",103),v("click",function(a){h(e);let d=c().$implicit,u=c(4);return b(u.onMobileMenuItemClick(d,a))}),p(1),r()}if(i&2){let e=c().$implicit,t=c(4);s("border-color",t.websiteSettings.colors.navigation_button),m("routerLink",e.value),o(),_(" ",e.label," ")}}function rn(i,n){if(i&1&&(P(0),g(1,nn,4,1,"a",100)(2,on,2,4,"ng-template",null,1,R),I()),i&2){let e=n.$implicit,t=D(3);o(),m("ngIf",e.type==="backstage")("ngIfElse",t)}}function ln(i,n){if(i&1&&(l(0,"div",99),g(1,rn,4,2,"ng-container",83),r()),i&2){let e=c(3);o(),m("ngForOf",e.getMenuItems())("ngForTrackBy",e.trackByMenuKey)}}function an(i,n){if(i&1){let e=E();l(0,"nav",74)(1,"div",75)(2,"div",76)(3,"div",77)(4,"a",78),g(5,Qi,1,2,"img",79)(6,Zi,2,3,"span",80),r()(),l(7,"div",81)(8,"div",82),g(9,Xi,4,2,"ng-container",83),r()(),l(10,"div",84)(11,"button",85),v("click",function(){h(e);let a=c(2);return b(a.toggleMobileMenu())}),g(12,en,2,0,"svg",86)(13,tn,2,0,"svg",86),r()()(),g(14,ln,2,2,"div",87),r()()}if(i&2){let e=c(2);s("background-color",e.websiteSettings.colors.navigation)("color",e.websiteSettings.colors.navigation_text),o(5),m("ngIf",e.websiteSettings.showLogoInNav&&(e.artist.logo==null?null:e.artist.logo.downloadURL)),o(),m("ngIf",!e.websiteSettings.showLogoInNav||!(e.artist.logo!=null&&e.artist.logo.downloadURL)),o(),se("justify-center",e.websiteSettings.centeredNav)("justify-end",!e.websiteSettings.centeredNav)("gap-8",!e.websiteSettings.centeredNav)("gap-1",e.websiteSettings.centeredNav),o(2),m("ngForOf",e.getMenuItems())("ngForTrackBy",e.trackByMenuKey),o(2),s("border","1p
9x solid "+e.websiteSettings.colors.navigation_button),te("aria-label",e.mobileMenuOpen?"Close menu":"Open menu")("aria-expanded",e.mobileMenuOpen),o(),m("ngIf",!e.mobileMenuOpen),o(),m("ngIf",e.mobileMenuOpen),o(),m("ngIf",e.mobileMenuOpen)}}function sn(i,n){if(i&1&&(l(0,"nav",104)(1,"div",75)(2,"div",105)(3,"a",106),T(),l(4,"svg",102),f(5,"path",107),r(),p(6," Back to website "),r(),H(),l(7,"span",108),T(),l(8,"svg",102),f(9,"path",31),r(),p(10," Backstage "),r()()()()),i&2){let e=c(2);s("background-color",e.websiteSettings.colors.navigation||e.websiteSettings.colors.background)("color",e.websiteSettings.colors.navigation_text||e.websiteSettings.colors.textPrimary)("border-color",(e.websiteSettings.colors.textPrimary||"#111")+"22")}}function cn(i,n){if(i&1&&f(0,"img",109),i&2){let e=c(2);s("border-color",e.websiteSettings.colors.textPrimary||"#111"),m("src",e.currentUser.photoURL,ee)("alt",e.displayName)}}function pn(i,n){if(i&1&&(l(0,"div",110),p(1),r()),i&2){let e=c(2);s("background-color",e.websiteSettings.colors.primary||e.websiteSettings.colors.navigation_button||"#111")("color",e.websiteSettings.colors.primaryText||e.websiteSettings.colors.navigation_text||"#fff")("border-color",e.websiteSettings.colors.textPrimary||"#111"),o(),_(" ",e.userInitials," ")}}function dn(i,n){if(i&1&&(l(0,"div",41),T(),l(1,"svg",111),f(2,"path",112),r(),H(),l(3,"span",113),p(4),r()()),i&2){let e=c(2);o(4),C(e.errorMessage)}}function mn(i,n){if(i&1&&(l(0,"div",42),T(),l(1,"svg",111),f(2,"path",28),r(),H(),l(3,"span",113),p(4),r()()),i&2){let e=c(2);o(4),C(e.successMessage)}}function un(i,n){i&1&&(l(0,"p",46),p(1,"Max 50 characters"),r())}function gn(i,n){if(i&1&&(l(0,"span",114),p(1,"\u2026"),r()),i&2){let e=c(2);s("color",e.websiteSettings.colors.textSecondary)}}function fn(i,n){if(i&1){let e=E();l(0,"li",117),v("mousedown",function(){let a=h(e).$implicit,d=c(3);return b(d.selectLocationSuggestion(a))}),l(1,"div",118),p(2),r(),l(3,"div",119),p(4),r()()}if(i&2){let e=n.$implicit,t=c(3);s("background-color",t.websiteSettings.colors.background||"#ffffff")("color",t.websiteSettings.colors.textPrimary),o(2),_(" ",(e.address==null?null:e.address.city)||(e.address==null?null:e.address.town)||(e.address==null?null:e.address.village)||(e.address==null?null:e.address.municipality)||e.name," "),o(),s("color",t.websiteSettings.colors.textSecondary),o(),_(" ",e.display_name," ")}}function _n(i,n){if(i&1&&(l(0,"ul",115),Y(1,fn,5,8,"li",116,zi),r()),i&2){let e=c(2);s("background-color",e.websiteSettings.colors.background||"#ffffff")("border","2px solid "+(e.websiteSettings.colors.textPrimary||"#111")),o(),Q(e.locationSuggestions)}}function xn(i,n){i&1&&(T(),l(0,"svg",120),f(1,"circle",121)(2,"path",122),r(),p(3," Saving\u2026 "))}function hn(i,n){i&1&&p(0," Save \u2192 ")}function bn(i,n){i&1&&p(0," Stopping\u2026 ")}function yn(i,n){if(i&1&&p(0),i&2){let e=c(2);_(" Stop following ",e.artist.name," ")}}function vn(i,n){if(i&1&&(l(0,"div",135)(1,"div",136)(2,"span",137),p(3),r()(),l(4,"div",138)(5,"p",139),p(6),r(),l(7,"p",140),p(8,"Visit \u2192"),r()()()),i&2){let e=n.$implicit,t=c(3);s("background-color",t.websiteSettings.colors.background)("border-color",t.websiteSettings.colors.textPrimary||"#111"),o(),s("background-color",t.websiteSettings.colors.backgroundSecondary||"#fafafa")("border-color",(t.websiteSettings.colors.textPrimary||"#111")+"22"),o(),s("color",t.websiteSettings.colors.textPrimary||"#111"),o(),_(" ",e.initial," "),o(2),s("color",t.websiteSettings.colors.textPrimary),o(),C(e.name)}}function wn(i,n){if(i&1&&(l(0,"div",141)(1,"div",142)(2,"p",143),p(3),r(),l(4,"p",144),p(5),r()(),l(6,"span",145),p(7),r()()),i&2){let e=n.$implicit,t=c(3);s("background-color",t.websiteSettings.colors.background)("border-color",t.websiteSettings.colors.textPrimary||"#111"),o(2),s("color",t.websiteSettings.colors.textPrimary),o(),C(e.title),o(),s("color",t.websiteSettings.colors.textSecondary),o(),_(" ",e.subtitle," "),o(),s("border-color",t.websiteSettings.colors.textPrimary||"#111")("color",t.websiteSettings.colors.textPrimary),o(),_(" ",e.spots," spots ")}}
9function Cn(i,n){i&1&&(T(),l(0,"svg",146),f(1,"circle",121)(2,"path",122),r(),p(3," Following\u2026 "))}function Sn(i,n){if(i&1&&(T(),l(0,"svg",102),f(1,"path",147),r(),p(2)),i&2){let e=c(3);o(2),_(" Follow ",e.artist.name," ")}}function kn(i,n){if(i&1){let e=E();l(0,"section",64)(1,"div",123)(2,"div",124),Y(3,vn,9,14,"div",125,Wi),r(),l(5,"div",126),Y(6,wn,8,15,"div",127,Hi),r()(),l(8,"div",128)(9,"div",129),f(10,"div",35),l(11,"div",130),p(12," Members\xA0Only "),r(),l(13,"h2",131),p(14),r(),l(15,"p",132),p(16),r(),l(17,"button",133),v("click",function(){h(e);let a=c(2);return b(a.followArtistFromGate())}),g(18,Cn,4,0)(19,Sn,3,1),r(),l(20,"p",134),p(21," One click. Free. No spam. "),r()()()()}if(i&2){let e=c(2);o(3),Q(e.dummyBands),o(3),Q(e.dummyGuestlist),o(3),s("background-color",e.websiteSettings.colors.background)("border-color",e.websiteSettings.colors.textPrimary||"#111"),o(),s("color",e.websiteSettings.colors.primary||e.websiteSettings.colors.navigation_button||"#111"),o(),s("color",e.websiteSettings.colors.textPrimary||"#111")("border-color",e.websiteSettings.colors.textPrimary||"#111"),o(2),s("color",e.websiteSettings.colors.textPrimary),o(),_(" Backstage is for fans of ",e.artist.name," "),o(),s("color",e.websiteSettings.colors.textSecondary||e.websiteSettings.colors.textPrimary),o(),_(" Follow ",e.artist.name," to unlock guestlist spots, the bands you connect with on Musisum, and the rest of the backstage. "),o(),s("background-color",e.websiteSettings.colors.textPrimary||"#111")("color",e.websiteSettings.colors.background||"#fff")("border-color",e.websiteSettings.colors.textPrimary||"#111"),m("disabled",e.followingArtist),o(),k(e.followingArtist?18:19),o(2),s("color",e.websiteSettings.colors.textSecondary)}}function Pn(i,n){if(i&1&&(l(0,"span",155),p(1),r()),i&2){let e=c(3);s("color",e.websiteSettings.colors.primary||e.websiteSettings.colors.navigation_button||"#111")("border-color",e.websiteSettings.colors.primary||e.websiteSettings.colors.navigation_button||"#111"),o(),le(" ",e.totalFollowsCount," ",e.totalFollowsCount===1?"pass":"passes"," ")}}function In(i,n){if(i&1&&f(0,"div",157),i&2){let e=c(4);s("background-color",e.websiteSettings.colors.backgroundSecondary||"#f5f5f5")("border-color",e.websiteSettings.colors.textPrimary||"#111")}}function En(i,n){i&1&&(l(0,"div",153),Y(1,In,1,4,"div",156,We),r()),i&2&&(o(),Q(Ye(0,Gi)))}function Fn(i,n){if(i&1&&(l(0,"div",158)(1,"p",159),p(2," No passes yet "),r(),l(3,"p",160),p(4," You haven't followed any other bands. Connect with more artists on Musisum and they'll show up here. "),r()()),i&2){let e=c(3);s("background-color",e.websiteSettings.colors.backgroundSecondary||"#fafafa")("border-color",(e.websiteSettings.colors.textPrimary||"#111")+"55"),o(3),s("color",e.websiteSettings.colors.textSecondary)}}function Tn(i,n){if(i&1&&f(0,"img",167),i&2){let e=c().$implicit;m("src",e.logoUrl,ee)("alt",e.name)}}function Mn(i,n){if(i&1&&(l(0,"span",137),p(1),r()),i&2){let e=c().$implicit,t=c(4);s("color",t.websiteSettings.colors.textPrimary||"#111"),o(),_(" ",e.name.charAt(0).toUpperCase()," ")}}function Nn(i,n){if(i&1&&(l(0,"a",165)(1,"div",166),g(2,Tn,1,2,"img",167)(3,Mn,2,3,"span",168),r(),l(4,"div",138)(5,"p",139),p(6),r(),l(7,"p",169),p(8," Visit \u2192 "),r()()()),i&2){let e=n.$implicit,t=c(4);s("background-color",t.websiteSettings.colors.background)("border-color",t.websiteSettings.colors.textPrimary||"#111"),m("href",e.websiteUrl,ee),o(),s("background-color",t.websiteSettings.colors.backgroundSecondary||"#fafafa")("border-color",(t.websiteSettings.colors.textPrimary||"#111")+"22"),o(),k(e.logoUrl?2:3),o(3),s("color",t.websiteSettings.colors.textPrimary),o(),C(e.name)}}function Un(i,n){if(i&1&&(l(0,"p",170),p(1),r()),i&2){let e=c(4);s("color",e.websiteSettings.colors.textSecondary),o(),le(" Showing the ",e.followedArtists.length," most recent of ",e.totalFollowsCount," ")}}function On(i,n){i&1&&(l(0,"span",176),p(1,"\xB7\xB7\xB7"),r())}function Vn(i,n){if(i&1){let e=E();l(0,"button",178),v("click",function(){h(e);let a=c().$implicit,d=c(5);return b(d.goToFollowsPage(a))}),p(1),r()}if(i&2){let e=c().$implicit,t=c(5);s("background-color",e===t.followsPage?t.websiteSettings.colors.primary||t.websiteSettings.colors.navigation_button||"#111":t.websiteSettings.colors.background)("color",e===t.followsPage?t.websiteSettings.colors.primaryText||t.websiteSettings.colors.navigation_text||"#fff":t.websiteSettings.colors.textPrimary)("border-color",t.websiteSettings.colors.textPrimary||"#111"),te("aria-current",e===t.followsPage?"page":null)("aria-label","Page "+(e+1)),o(),_(" ",e+1," ")}}function Dn(i,n){if(i&1&&g(0,On,2,0,"span",176)(1,Vn,2,9,"button",177),i&2){let e=n.$implicit;k(e===-1?0:1)}}function Rn(i,n){if(i&1){let e=E();l(0,"nav",164)(1,"p",171),p(2),r(),l(3,"div",172)(4,"button",173),v("click",function(){h(e);let a=c(4);return b(a.prevFollowsPage())}
9),T(),l(5,"svg",102),f(6,"path",107),r()(),Y(7,Dn,2,1,null,null,ze),H(),l(9,"button",174),v("click",function(){h(e);let a=c(4);return b(a.nextFollowsPage())}),T(),l(10,"svg",102),f(11,"path",175),r()()()()}if(i&2){let e=c(4);o(),s("color",e.websiteSettings.colors.textSecondary),o(),le(" Page ",e.followsPage+1," / ",e.totalFollowPages," "),o(2),s("background-color",e.websiteSettings.colors.background)("border-color",e.websiteSettings.colors.textPrimary||"#111")("color",e.websiteSettings.colors.textPrimary),m("disabled",e.followsPage===0),o(3),Q(e.followsPageNumbers),o(2),s("background-color",e.websiteSettings.colors.background)("border-color",e.websiteSettings.colors.textPrimary||"#111")("color",e.websiteSettings.colors.textPrimary),m("disabled",e.followsPage>=e.totalFollowPages-1)}}function An(i,n){if(i&1&&(l(0,"div",161),Y(1,Nn,9,13,"a",162,Yi),r(),g(3,Un,2,4,"p",163)(4,Rn,12,18,"nav",164)),i&2){let e=c(3);o(),Q(e.pagedFollowedArtists),o(2),k(e.totalFollowsCount>e.followedArtists.length?3:-1),o(),k(e.totalFollowPages>1?4:-1)}}function jn(i,n){if(i&1&&(l(0,"section",148)(1,"header",149)(2,"div")(3,"h2",150),p(4,"Bands you follow"),r(),l(5,"p",151),p(6," One Musisum login, every artist you've connected with. "),r()(),g(7,Pn,2,6,"span",152),r(),g(8,En,3,1,"div",153)(9,Fn,5,6,"div",154)(10,An,5,2),r()),i&2){let e=c(2);o(3),s("color",e.websiteSettings.colors.textPrimary),o(2),s("color",e.websiteSettings.colors.textSecondary),o(2),k(!e.loadingFollows&&e.totalFollowsCount>0?7:-1),o(),k(e.loadingFollows?8:e.followedArtists.length===0?9:10)}}function qn(i,n){i&1&&(T(),l(0,"svg",187),f(1,"path",188)(2,"path",189),r())}function Ln(i,n){i&1&&(T(),l(0,"svg",187),f(1,"path",190),r())}function Bn(i,n){i&1&&(T(),l(0,"svg",187),f(1,"circle",191)(2,"path",192)(3,"path",193),r())}function $n(i,n){i&1&&(T(),l(0,"svg",187),f(1,"path",194)(2,"circle",195)(3,"circle",196),r())}function Gn(i,n){i&1&&(T(),l(0,"svg",187),f(1,"path",197)(2,"circle",198),r())}function zn(i,n){i&1&&(T(),l(0,"svg",187),f(1,"path",199)(2,"path",200),r())}function Wn(i,n){if(i&1){let e=E();l(0,"button",184),v("click",function(){let a=h(e).$implicit,d=c(3);return b(d.setBackstageSection(a.id))}),P(1,185),g(2,qn,3,0,"svg",186)(3,Ln,2,0,"svg",186)(4,Bn,4,0,"svg",186)(5,$n,4,0,"svg",186)(6,Gn,3,0,"svg",186)(7,zn,3,0,"svg",186),I(),p(8),r()}if(i&2){let e=n.$implicit,t=c(3);s("background-color",t.activeBackstageSection===e.id?t.websiteSettings.colors.textPrimary||"#111":t.websiteSettings.colors.background)("color",t.activeBackstageSection===e.id?t.websiteSettings.colors.background||"#fff":t.websiteSettings.colors.textPrimary||"#111")("border-color",t.websiteSettings.colors.textPrimary||"#111"),te("aria-selected",t.activeBackstageSection===e.id),o(),m("ngSwitch",e.id),o(),m("ngSwitchCase","guestlist"),o(),m("ngSwitchCase","poll"),o(),m("ngSwitchCase","question"),o(),m("ngSwitchCase","showrequest"),o(),m("ngSwitchCase","fanpics"),o(),m("ngSwitchCase","downloads"),o(),_(" ",e.label," ")}}function Hn(i,n){if(i&1&&f(0,"app-guestlist-claim",182),i&2){let e=c(3);m("artistId",e.artist.id||null)("artistName",e.artist.name||null)("currentUser",e.currentUser)("colors",e.websiteSettings.colors)("focusEventId",e.focusEventId)}}function Yn(i,n){if(i&1&&f(0,"app-poll-section",183),i&2){let e=c(3);m("artistId",e.artist.id||null)("artistName",e.artist.name||null)("currentUser",e.currentUser)("colors",e.websiteSettings.colors)}}function Qn(i,n){if(i&1&&f(0,"app-question-section",183),i&2){let e=c(3);m("artistId",e.artist.id||null)("artistName",e.artist.name||null)("currentUser",e.currentUser)("colors",e.websiteSettings.colors)}}function Zn(i,n){if(i&1&&f(0,"app-showrequest-section",183),i&2){let e=c(3);m("artistId",e.artist.id||null)("artistName",e.artist.name||null)("currentUser",e.currentUser)("colors",e.websiteSettings.colors)}}function Jn(i,n){if(i&1&&f(0,"app-fanpics-section",183),i&2){let e=c(3);m("artistId",e.artist.id||null)("artistName",e.artist.name||null)("currentUser",e.currentUser)("colors",e.websiteSettings.colors)}}function Kn(i,n){if(i&1&&f(0,"app-digital-downloads-section",183),i&2){let e=c(3);m("artistId",e.artist.id||null)("artistName",e.artist.name||null)("currentUser",e.currentUser)("colors",e.websiteSettings.colors)}}function Xn(i,n){if(i&1&&(P(0),l(1,"nav",179),g(2,Wn,9,15,"button",180),r(),l(3,"section",181),g(4,Hn,1,5,"app-guestlist-claim",182)(5,Yn,1,4,"app-poll-section",183)(6,Qn,1,4,"app-question-section",183)(7,Zn,1,4,"app-showrequest-section",183)(8,Jn,1,4,"app-fanpics-section",183)(9,Kn,1,4,"app-digital-downloads-section",183),r(),I()),i&2){let e,t=c(2);o(2),m("ngForOf",t.backstageNavItems),o(2),k((e=t.activeBackstageSection)==="guestlist"?4:e==="poll"?5:e==="question"?6:e==="showrequest"?7:e==="fanpics"?8:e==="downloads"?9:-1)}}function eo(i,n){if(i&1){let e=E();
9l(0,"div",4),g(1,an,15,23,"nav",5)(2,sn,11,6,"nav",6),l(3,"main",7)(4,"div",8)(5,"nav",9)(6,"button",10),v("click",function(){h(e);let a=c();return b(a.setTab("backstage"))}),p(7," Backstage "),r(),l(8,"button",10),v("click",function(){h(e);let a=c();return b(a.setTab("profile"))}),p(9," Profile "),r()(),l(10,"header",11)(11,"div",12)(12,"div",13),f(13,"div",14),l(14,"div",15),p(15," Backstage Pass "),r(),l(16,"div",16),p(17," All\xA0Access "),r(),l(18,"div",17)(19,"div",18),g(20,cn,1,4,"img",19)(21,pn,2,7,"div",20),r(),l(22,"div",21)(23,"p",22),p(24," Welcome back "),r(),l(25,"h1",23),p(26),r(),l(27,"p",24),p(28),r()()(),l(29,"div",25)(30,"span",26),T(),l(31,"svg",27),f(32,"path",28),r(),p(33),r(),H(),l(34,"div",29)(35,"button",30),v("click",function(){h(e);let a=c();return b(a.togglePassFlip())}),T(),l(36,"svg",27),f(37,"path",31),r(),p(38," Account "),r(),H(),l(39,"button",32),v("click",function(){h(e);let a=c();return b(a.onLogout())}),p(40," Exit "),T(),l(41,"svg",27),f(42,"path",33),r()()()()(),H(),l(43,"div",34),f(44,"div",35),l(45,"div",36)(46,"span",37),p(47," Your Details "),r(),l(48,"button",38),v("click",function(){h(e);let a=c();return b(a.togglePassFlip())}),T(),l(49,"svg",39),f(50,"path",40),r(),p(51," Pass "),r()(),g(52,dn,5,1,"div",41)(53,mn,5,1,"div",42),H(),l(54,"form",43),v("ngSubmit",function(){h(e);let a=c();return b(a.onSave())}),l(55,"div")(56,"label",44),p(57,"Username"),r(),f(58,"input",45),g(59,un,2,0,"p",46),r(),l(60,"div",47)(61,"div")(62,"label",48),p(63,"First name"),r(),f(64,"input",49),r(),l(65,"div")(66,"label",50),p(67,"Last name"),r(),f(68,"input",51),r()(),l(69,"div",52)(70,"label",53),p(71,"Location"),r(),l(72,"input",54),v("input",function(){h(e);let a=c();return b(a.onLocationInput())})("focus",function(){h(e);let a=c();return b(a.locationDropdownOpen=a.locationSuggestions.length>0||a.locationSearching)})("blur",function(){h(e);let a=c();return b(a.onLocationBlur())}),r(),g(73,gn,2,2,"span",55)(74,_n,3,4,"ul",56),r(),l(75,"div")(76,"label",57),p(77),r(),f(78,"input",58),r(),l(79,"div",59)(80,"button",60),v("click",function(){h(e);let a=c();return b(a.togglePassFlip())}),p(81," Cancel "),r(),l(82,"button",61),g(83,xn,4,0)(84,hn,1,0),r()()(),l(85,"div",62)(86,"button",63),v("click",function(){h(e);let a=c();return b(a.unfollowArtistFromBackstage())}),g(87,bn,1,0)(88,yn,1,1),r()()()()(),g(89,kn,22,26,"section",64)(90,jn,11,6,"section",65)(91,Xn,10,2,"ng-container",66),l(92,"section",67)(93,"div",68)(94,"div",69)(95,"p",70),p(96," Member ID "),r(),l(97,"p",71),p(98),r()(),l(99,"button",72),v("click",function(){h(e);let a=c();return b(a.onLogout())}),p(100," Exit Backstage "),T(),l(101,"svg",27),f(102,"path",33),r()()()()()(),H(),f(103,"app-musisum-footer",73),r()}if(i&2){let e=c();m("ngStyle",e.getThemeStyles()),o(),m("ngIf",e.shouldShowNavigation()),o(),m("ngIf",!e.shouldShowNavigation()),o(),s("background-color",e.websiteSettings.colors.background)("color",e.websiteSettings.colors.textPrimary)("--pop-shadow-color",e.websiteSettings.colors.textPrimary||"#111"),o(3),s("background-color",e.activeTab==="backstage"?e.websiteSettings.colors.textPrimary||"#111":e.websiteSettings.colors.background)("color",e.activeTab==="backstage"?e.websiteSettings.colors.background||"#fff":e.websiteSettings.colors.textPrimary||"#111")("border-color",e.websiteSettings.colors.textPrimary||"#111"),te("aria-selected",e.activeTab==="backstage"),o(2),s("background-color",e.activeTab==="profile"?e.websiteSettings.colors.textPrimary||"#111":e.websiteSettings.colors.background)("color",e.activeTab==="profile"?e.websiteSettings.colors.background||"#fff":e.websiteSettings.colors.textPrimary||"#111")("border-color",e.websiteSettings.colors.textPrimary||"#111"),te("aria-selected",e.activeTab==="profile"),o(3),se("is-flipped",e.passFlipped),o(),s("background-color",e.websiteSettings.colors.background)("border-color",e.websiteSettings.colors.textPrimary||"#111"),o(),s("color",e.websiteSettings.colors.primary||e.websiteSettings.colors.navigation_button||"#111"),o(),s("background-color",e.websiteSettings.colors.textPrimary||"#111")("color",e.websiteSettings.colors.background||"#fff"),o(2),s("color",e.websiteSettings.colors.primary||"#111")("border-color",e.websiteSettings.colors.primary||"#111"),o(4),k(e.currentUser.photoURL?20:21),o(6),_(" ",e.displayName," "),o(2),_(" ",e.currentUser.email," "),o(),s("border-color",(e.websiteSettings.colors.textPrimary||"#111")+"33"),o(4),_(" via ",e.providerLabel," "),o(2),s("background-color",e.websiteSettings.colors.textPrimary||"#111")("color",e.websiteSettings.colors.background||"#fff")("border-color",e.websiteSettings.colors.textPrimary||"#111"),te("aria-pressed",e.passFlipped),o(4),s("border-color",e.websiteSettings.colors.textPrimary||"#111")("color",e.websiteSettings.colors.textPrimary||"#111")("background-color",e.websiteSettings.colors.background),o(4),s("background-color",e.websiteSettings.colors.backgroundSecondary||"#fafafa")("border-color",e.websiteSettings.colors.textPrimary||"#111"),o(),s("color",e.websiteSettings.colors.primary||e.websiteSettings.colors.navigation_button||"#111"),o(2),s("background-color",e.websiteSettings.colors.textPrimary||"#111")("color",e.websiteSettings.colors.background||"#fff"),o(2),s("background-color",e.websiteSettings.colors.background)("border-color",e.websiteSettings.colors.textPrimary||"#111")("color",e.websiteSettings.colors.textPrimary||"#111"),o(4),k(e.errorMessage?52:-1),o(),k(e.successMessage?53:-1),o(),m("formGroup",e.profileForm),o(2),s("color",e.websiteSettings.colors.textPrimary),o(2),s("background-color",e.websiteSettings.colors.background)("color",e.websiteSettings.colors.textPrimary)("border-color",e.userName!=null&&e.userName.invali
9d&&(e.userName!=null&&e.userName.touched)?"#ef4444":e.websiteSettings.colors.textPrimary||"#111"),o(),k(e.userName!=null&&e.userName.invalid&&(e.userName!=null&&e.userName.touched)&&(!(e.userName==null||e.userName.errors==null)&&e.userName.errors.maxlength)?59:-1),o(3),s("color",e.websiteSettings.colors.textPrimary),o(2),s("background-color",e.websiteSettings.colors.background)("color",e.websiteSettings.colors.textPrimary)("border-color",e.firstName!=null&&e.firstName.invalid&&(e.firstName!=null&&e.firstName.touched)?"#ef4444":e.websiteSettings.colors.textPrimary||"#111"),o(2),s("color",e.websiteSettings.colors.textPrimary),o(2),s("background-color",e.websiteSettings.colors.background)("color",e.websiteSettings.colors.textPrimary)("border-color",e.lastName!=null&&e.lastName.invalid&&(e.lastName!=null&&e.lastName.touched)?"#ef4444":e.websiteSettings.colors.textPrimary||"#111"),o(2),s("color",e.websiteSettings.colors.textPrimary),o(2),s("background-color",e.websiteSettings.colors.background)("color",e.websiteSettings.colors.textPrimary)("border-color",e.location!=null&&e.location.invalid&&(e.location!=null&&e.location.touched)?"#ef4444":e.websiteSettings.colors.textPrimary||"#111"),o(),k(e.locationSearching?73:-1),o(),k(e.locationDropdownOpen&&e.locationSuggestions.length>0?74:-1),o(2),s("color",e.websiteSettings.colors.textPrimary),o(),_("Email \xB7 via ",e.providerLabel,""),o(),s("background-color",e.websiteSettings.colors.background)("color",e.websiteSettings.colors.textSecondary)("border-color",(e.websiteSettings.colors.textPrimary||"#111")+"55"),o(2),s("background-color",e.websiteSettings.colors.background)("border-color",e.websiteSettings.colors.textPrimary||"#111")("color",e.websiteSettings.colors.textPrimary),o(2),s("background-color",e.websiteSettings.colors.textPrimary||"#111")("color",e.websiteSettings.colors.background||"#fff")("border-color",e.websiteSettings.colors.textPrimary||"#111"),m("disabled",e.isSaving||e.profileForm.invalid),o(),k(e.isSaving?83:84),o(2),s("border-color",(e.websiteSettings.colors.textPrimary||"#111")+"33"),o(),s("color",e.websiteSettings.colors.textPrimary),m("disabled",e.unfollowingArtist),o(),k(e.unfollowingArtist?87:88),o(2),k(e.activeTab==="backstage"&&e.isFollowingArtist===!1?89:-1),o(),m("ngIf",e.activeTab==="profile"),o(),m("ngIf",e.activeTab==="backstage"&&e.isFollowingArtist===!0),o(),s("border-color",(e.websiteSettings.colors.textPrimary||"#111")+"55"),o(2),s("color",e.websiteSettings.colors.textSecondary),o(4),C(e.currentUser.uid),o(),s("background-color",e.websiteSettings.colors.background)("border-color",e.websiteSettings.colors.textPrimary||"#111")("color",e.websiteSettings.colors.textPrimary),o(4),m("artist",e.artist)("websiteSettings",e.websiteSettings)}}function to(i,n){i&1&&(l(0,"div",201)(1,"div",202)(2,"div",29),f(3,"div",203)(4,"div",204)(5,"div",205),r(),l(6,"span",206),p(7,"Loading profile..."),r()()())}function io(i){return i?i.normalize("NFKD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").trim():""}var Pt=class i extends yt{constructor(e,t,a,d,u){super(e,t,a,d,u);this.cdr=u;this.profileForm=this.fb.group({userName:["",[we.maxLength(50)]],firstName:["",[we.maxLength(50)]],lastName:["",[we.maxLength(50)]],location:["",[we.maxLength(100)]],email:[{value:"",disabled:!0}]})}authService=S(dt);router=S(Xe);route=S(Ke);fb=S(st);firestore=S(G);injector=S(B);geo=S(Ee);host=S(mt,{optional:!0});authSubscription;currentUser=null;profileForm;isLoading=!1;isSaving=!1;errorMessage=null;successMessage=null;mobileMenuOpen=!1;followedArtists=[];loadingFollows=!1;totalFollowsCount=0;followsPageSize=12;followsPage=0;passFlipped=!1;focusEventId=null;isFollowingArtist=null;followingArtist=!1;activeTab="backstage";activeBackstageSection="guestlist";setTab(e){this.activeTab=e,this.passFlipped=e==="profile",this.cdr.markForCheck()}setBackstageSection(e){this.activeBackstageSection=e,this.cdr.markForCheck()}backstageNavItems=[{id:"guestlist",label:"Guestlist"},{id:"poll",label:"Poll"},{id:"question",label:"Ask Question"},{id:"showrequest",label:"Show Request"},{id:"fanpics",label:"Best 3 Fanpics"},{id:"downloads",label:"My Orders"}];unfollowingArtist=!1;dummyBands=[{name:"The Northern Lights",initial:"N"},{name:"Velvet Hour",initial:"V"},{name:"Echoes of Summer",initial:"E"},{name:"Midnight Routine",initial:"M"},{name:"Paper Stars",initial:"P"},{name:"Cassette Drift",initial:"C"}];dummyGuestlist=[{title:"Live at Paradiso",subtitle:"Amsterdam \xB7 This Frid
9ay",spots:12},{title:"Tour Final",subtitle:"Rotterdam \xB7 Next month",spots:5}];togglePassFlip(){this.passFlipped=!this.passFlipped,this.activeTab=this.passFlipped?"profile":"backstage",this.cdr.markForCheck()}locationSuggestions=[];locationSearching=!1;locationDropdownOpen=!1;locationSearchTimer=null;followIdsAll=[];resolvedArtistCache=new Map;static FOLLOWS_CACHE_PREFIX="mssm_profile_follows_v1_";static FOLLOWS_CACHE_TTL_MS=5*60*1e3;lastLoadedFollowsUid=null;ngOnInit(){return y(this,null,function*(){this.seoService.setPrivatePageSEO("Your profile","Your account and profile settings."),this.focusEventId=this.route.snapshot.queryParamMap.get("gl");let e=this.host||(typeof window<"u"?window.location.host:ft.hostname||"");if(yield Promise.all([e?this.getData(e):Promise.resolve(),this.authService.authReady]),this.currentUser=this.authService.getCurrentUser(),!this.currentUser){this.router.navigate(["/"]);return}this.cdr.markForCheck(),this.currentUser.getIdToken().catch(()=>{}),this.lastLoadedFollowsUid=this.currentUser.uid,this.loadUserData().catch(()=>{}),this.loadFollowedArtists(this.currentUser.uid),this.checkFollowStatus(this.currentUser.uid),this.authSubscription=this.authService.getCurrentUserObservable().subscribe(t=>y(this,null,function*(){let a=this.currentUser?.uid??null,d=t?.uid??null;if(this.currentUser=t,!t){this.router.navigate(["/"]);return}d!==a&&(this.lastLoadedFollowsUid=d,yield this.loadUserData(),this.loadFollowedArtists(t.uid)),this.cdr.markForCheck()}))})}ngOnDestroy(){this.authSubscription&&this.authSubscription.unsubscribe()}loadUserData(){return y(this,null,function*(){if(this.currentUser){this.profileForm.patchValue({email:this.currentUser.email||""});try{let t=yield F(this.injector,()=>{let d=U(this.firestore,"users",this.currentUser.uid);return ie(d)}),a=t.exists()?t.data():null;a&&this.profileForm.patchValue({userName:a.userName||"",firstName:a.firstName||"",lastName:a.lastName||"",location:a.location||""})}catch(e){console.error("Error loading user data from Firestore:",e)}this.cdr.markForCheck()}})}onSave(){return y(this,null,function*(){if(!(this.profileForm.invalid||!this.currentUser)){this.isSaving=!0,this.errorMessage=null,this.successMessage=null,this.cdr.markForCheck();try{try{yield this.currentUser.getIdToken()}catch{}let e=this.profileForm.value.userName?.trim()||null,t=this.profileForm.value.firstName?.trim()||null,a=this.profileForm.value.lastName?.trim()||null,d=this.profileForm.value.location?.trim()||null,u={};if(e!==null&&(u.userName=e),t!==null&&(u.firstName=t),a!==null&&(u.lastName=a),d!==null&&(u.location=d),Object.keys(u).length>0){let w=F(this.injector,()=>{let M=U(this.firestore,"users",this.currentUser.uid);return pe(M,u,{merge:!0})}),x=new Promise((M,O)=>{setTimeout(()=>O(new Error("Save timed out, please try again")),1e4)});yield Promise.race([w,x])}e&&e!==this.currentUser.displayName&&pt(this.currentUser,{displayName:e}).catch(w=>console.warn("[profile] updateProfile mirror failed (non-fatal):",w)),this.profileForm.patchValue({userName:e||"",firstName:t||"",lastName:a||"",location:d||""}),this.successMessage="Profile updated successfully!",this.currentUser.reload().then(()=>{this.currentUser=this.authService.getCurrentUser(),this.cdr.markForCheck()}).catch(()=>{}),setTimeout(()=>{this.successMessage=null;try{this.cdr.detectChanges()}catch{}},3e3)}catch(e){this.errorMessage=e.message||"Failed to update profile. Please try again."}finally{this.isSaving=!1;try{this.cdr.detectChanges()}catch{}}}})}onLogout(){return y(this,null,function*(){try{yield this.authService.logout(),this.router.navigate(["/"])}catch(e){this.errorMessage=e.message||"Failed to logout. Please try again.",this.cdr.markForCheck()}})}get userName(){return this.profileForm.get("userName")}get firstName(){return this.profileForm.get("firstName")}get lastName(){return this.profileForm.get("lastName")}get location(){return this.profileForm.get("location")}get email(){return this.profileForm.get("email")}liveAuthUser(){return this.authService.getCurrentUser()??this.currentUser??null}get displayName(){let e=this.profileForm.getRawValue()||{},t=(e.userName||"").trim();if(t)return t;let a=(e.firstName||"").trim(),d=(e.lastName||"").trim();
9if(a||d)return[a,d].filter(Boolean).join(" ");let u=this.liveAuthUser();return u?.displayName?u.displayName:u?.email?u.email.split("@")[0]:"there"}get userInitials(){let e=this.profileForm.getRawValue()||{},t=this.liveAuthUser(),a=(e.userName||"").trim()||[e.firstName,e.lastName].filter(Boolean).join(" ").trim()||t?.displayName||t?.email||"",d=String(a).trim().split(/\s+/).filter(Boolean);return d.length===0?"?":d.length===1?d[0].slice(0,2).toUpperCase():(d[0][0]+d[1][0]).toUpperCase()}get providerLabel(){let e=this.liveAuthUser()?.providerData?.[0]?.providerId;return e==="google.com"?"Google":e==="password"?"email":e||"Musisum"}loadFollowedArtists(e){return y(this,null,function*(){let t=this.readFollowsCache(e);if(t){this.followIdsAll=t.followIds,this.totalFollowsCount=t.total,this.resolvedArtistCache.clear();for(let a of t.resolved)a&&this.resolvedArtistCache.set(a.id,a);this.followedArtists=t.resolved.slice(0,this.followsPageSize),this.followsPage=0,this.loadingFollows=!1,this.cdr.markForCheck()}else this.loadingFollows=!0,this.cdr.markForCheck();try{let d=[...yield this.fetchFollowRowsForUid(e)].sort((N,V)=>(V.created??0)-(N.created??0));this.totalFollowsCount=d.length;let u=new Set,w=[],x=0,M=0,O=0;for(let N of d){let V=String(N?.artistID??"").trim();if(!V){x++;continue}if(V===this.artist?.id){M++;continue}if(u.has(V)){O++;continue}u.add(V),w.push(V)}this.followIdsAll=w,t||(this.resolvedArtistCache.clear(),this.followsPage=0),yield this.loadFollowsPage(this.followsPage),this.writeFollowsCache(e)}catch(a){console.warn("Failed to load followed artists:",a),this.followIdsAll=[],this.followedArtists=[],this.totalFollowsCount=0}finally{this.loadingFollows=!1,this.cdr.markForCheck()}})}fetchFollowRowsForUid(e){return y(this,null,function*(){let t=()=>F(this.injector,()=>{let u=z(this.firestore,"artistFollowers"),w=oe(u,re("userID","==",e));return ne(w)}),a=yield t();return a.empty&&(yield new Promise(d=>setTimeout(d,250)),a=yield t()),a.docs.map(d=>d.data())})}trackByArtistId(e,t){return t.id}readFollowsCache(e){if(typeof sessionStorage>"u")return null;try{let t=sessionStorage.getItem(i.FOLLOWS_CACHE_PREFIX+e);if(!t)return null;let a=JSON.parse(t);return!a||typeof a.ts!="number"||!Array.isArray(a.followIds)||Date.now()-a.ts>i.FOLLOWS_CACHE_TTL_MS?null:a}catch{return null}}writeFollowsCache(e){if(!(typeof sessionStorage>"u"))try{let t=this.followIdsAll.map(d=>this.resolvedArtistCache.get(d)).filter(d=>!!d),a={followIds:this.followIdsAll,resolved:t,total:this.totalFollowsCount,ts:Date.now()};sessionStorage.setItem(i.FOLLOWS_CACHE_PREFIX+e,JSON.stringify(a))}catch{}}checkFollowStatus(e){return y(this,null,function*(){if(!this.artist?.id){this.isFollowingArtist=!1,this.cdr.markForCheck();return}if(this.isArtistTeamMember(e)){this.isFollowingArtist=!0,this.cdr.markForCheck();return}try{let t=yield F(this.injector,()=>{let a=U(this.firestore,`artistFollowers/${this.artist.id}_${e}`);return ie(a)});this.isFollowingArtist=t.exists()}catch{this.isFollowingArtist=!1}finally{this.cdr.markForCheck()}})}isArtistTeamMember(e){let t=this.artist;return!t||!e?!1:!!(t.uid===e||t.claimedBy===e||t.admin&&typeof t.admin=="object"&&t.admin[e])}followArtistFromGate(){return y(this,null,function*(){if(!(!this.currentUser||!this.artist?.id||this.followingArtist)){this.followingArtist=!0,this.cdr.markForCheck();try{yield this.artistService.followArtist(this.artist.id,this.currentUser.uid),this.isFollowingArtist=!0,this.loadFollowedArtists(this.currentUser.uid)}catch(e){console.warn("[profile] follow-gate write failed:",e)}finally{this.followingArtist=!1,this.cdr.markForCheck()}}})}unfollowArtistFromBackstage(){return y(this,null,function*(){if(!(!this.currentUser||!this.artist?.id||this.unfollowingArtist)){this.unfollowingArtist=!0,this.passFlipped=!1,this.cdr.markForCheck();try{if(yield this.artistService.unfollowArtist(this.artist.id,this.currentUser.uid),this.isFollowingArtist=!1,typeof window<"u")try{window.scrollTo({top:0,behavior:"smooth"})}catch{}}catch(e){console.warn("[profile] unfollow failed:",e)}finally{this.unfollowingArtist=!1,this.cdr.markForCheck()}}})}onLocationInput(){let e=(this.profileForm.value?.location||"").trim();if(this.locationSearchTimer&&clearTimeout(this.locationSearchTimer),!e||e.length<3){this.locationSuggestions=[],this.locationSearching=!1,this.locationDropdownOpen=!1,this.cdr.markForCheck();return}this.locationSearching=!0,this.locationDropdownOpen=!0,this.cdr.markForCheck(),this.locationSearchTimer=setTimeout(()=>y(this,null,function*(){try{let t=yield qe(this.geo.search(e)),a=new Set;this.locationSuggestions=(t||[]).filter(d=>{let u=(d.display_name||"").trim().toLowerCase();return!u||a.has(u)?!1:(a.add(u),!0)}).slice(0,5)}catch{this.locationSuggestions=[]}finally{this.locationSearching=!1,this.cdr.markForCheck()}}),500)}selectLocationSuggestion(e){let t=e?.address||{},a=t.city||t.town||t.village||t.municipality||e.name||"",d=t.country||"",u=a&&d?`${a}, ${d}`:a||e.display_name||"";this.profileForm.patchValue({location:u}),this.locationSuggestions=[],this.locationSearching=!1,this.locationDropdownOpen=!1,this.cdr.markForCheck()}onLocationBlur(){setTimeout(()=>{this.locationDropdownOpen=!1,this.cdr.markForCheck()},150)}get totalFollowPages(){return this.followIdsAll.length?Math.ceil(this.followIdsAll.length/this.followsPageSize):1}get pagedFollowedArtists(){return this.followedArtists}loadFollowsPage(e){return y(this,null,function*(){let t=e*this.followsPageSize,a=this.followIdsAll.slice(t,t+this.followsPageSize),d=a.filter(u=>!this.resolvedArtistCache.has(u));if(d.length>0){let u=yield Promise.all(d.map(w=>y(this,null,function*(){try{let[x,M]=yield Promise.all([this.artistService.getArtistById(w),this.artistService.getArtistSettingsById(w)]);if(!x)return[w,null];let O=(M?.domain||"").trim(),N=(x.slug||"").trim(),V=x.name||"Artist",me=N||x.id,It=N||io(V)||x.id,Et=O?`https://${O.replace(/^https?:\/\//,"").replace(/\/$/,"")}/`:`https://musisum.com/artist/${me}`;return[w,{id:x.id,name:V,slug:It,logoUrl:x.logo?.downloadURL||x.downloadurl||null,websiteUrl:Et}]}catch{return[w,null]}})));for(let[w,x]of u)this.resolvedArtistCache.set(w,x)}this.followedArtists=a.map(u=>this.resolvedArtistCache.get(u)).filter(u=>!!u),this.cdr.markForCheck()})}get followsPageNumbers(){let e=this.totalFollowPages,t=this.followsPage;if(e<=7)return Array.from({length:e}
9,(u,w)=>w);let a=[],d=u=>{a.includes(u)||a.push(u)};d(0),t-1>1&&d(-1);for(let u=Math.max(1,t-1);u<=Math.min(e-2,t+1);u++)d(u);return t+1<e-2&&d(-1),d(e-1),a}goToFollowsPage(e){return y(this,null,function*(){if(e<0||e>=this.totalFollowPages||e===this.followsPage&&this.followedArtists.length>0)return;this.followsPage=e,this.followIdsAll.slice(e*this.followsPageSize,(e+1)*this.followsPageSize).some(d=>!this.resolvedArtistCache.has(d))&&(this.loadingFollows=!0,this.cdr.markForCheck());try{yield this.loadFollowsPage(e)}finally{if(this.loadingFollows=!1,typeof window<"u")try{document.getElementById("follows-section")?.scrollIntoView({behavior:"smooth",block:"start"})}catch{}this.cdr.markForCheck()}})}prevFollowsPage(){this.goToFollowsPage(this.followsPage-1)}nextFollowsPage(){this.goToFollowsPage(this.followsPage+1)}trackByMenuKey(e,t){return t.key||e}getMenuItems(){let e=super.getMenuItems(),t=e.find(a=>a.type==="backstage");return t&&(t.value=this.currentUser?"/profile":"/login"),e}toggleMobileMenu(){this.mobileMenuOpen=!this.mobileMenuOpen,this.cdr.markForCheck()}closeMobileMenu(){this.mobileMenuOpen=!1,this.cdr.markForCheck()}onMenuItemClick(e,t){e.type==="backstage"&&(t.preventDefault(),this.currentUser||this.router.navigate(["/"]))}onMobileMenuItemClick(e,t){e.type==="backstage"?(t.preventDefault(),this.closeMobileMenu(),this.currentUser||this.router.navigate(["/"])):this.closeMobileMenu()}static \u0275fac=function(t){return new(t||i)(ge(Be),ge(Pe),ge(ut),ge(bt),ge(j))};static \u0275cmp=A({type:i,selectors:[["app-profile"]],features:[$e],decls:2,vars:2,consts:[["regularLink",""],["regularMobileLink",""],["class","min-h-screen transition-opacity duration-300",3,"ngStyle",4,"ngIf"],["class","min-h-screen flex items-center justify-center bg-white",4,"ngIf"],[1,"min-h-screen","transition-opacity","duration-300",3,"ngStyle"],["class","sticky top-0 z-50 backdrop-blur-lg","style","box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.06);",3,"background-color","color",4,"ngIf"],["class","sticky top-0 z-50 backdrop-blur-lg border-b","style","box-shadow: 0 1px 3px 0 rgba(0,0,0,0.06);",3,"background-color","color","border-color",4,"ngIf"],[1,"relative","py-12","sm:py-16","pop-halftone"],[1,"relative","max-w-3xl","mx-auto","px-4","sm:px-6","lg:px-8"],["role","tablist","aria-label","Backstage sections",1,"flex","items-center","gap-2","mb-5"],["type","button","role","tab",1,"pop-btn","px-4","py-2","text-[11px]","sm:text-xs","font-black","uppercase","tracking-widest","border-2",3,"click"],[1,"relative","mb-10","sm:mb-14","pass-flipper"],[1,"pass-inner"],[1,"pass-face","pass-front","pop-card","relative","px-5","sm:px-8","py-7","sm:py-8","border-2","sm:border-[3px]",2,"--pop-offset-x","8px","--pop-offset-y","8px"],[1,"absolute","inset-x-0","top-0","h-3","pop-stripe"],[1,"absolute","-top-3","left-5","sm:left-8","px-2.5","py-1","text-[10px]","sm:text-xs","font-black","uppercase","tracking-widest"],[1,"hidden","sm:flex","pop-stamp","absolute","top-6","right-5","sm:right-8","items-center","justify-center","px-3","py-1.5","border-2","border-dashed","text-[10px]","font-mono","font-black","uppercase"],[1,"flex","items-center","gap-4","sm:gap-6","mt-3","sm:mt-2"],[1,"flex-shrink-0"],[1,"h-20","w-20","sm:h-24","sm:w-24","object-cover","border-2","sm:border-[3px]",3,"src","alt","border-color"],[1,"h-20","w-20","sm:h-24","sm:w-24","flex","items-center","justify-center","font-black","text-2xl","sm:text-3xl","border-2","sm:border-[3px]",3,"background-color","color","border-color"],[1,"flex-1","min-w-0"],[1,"text-[10px]","sm:text-xs","font-bold","uppercase","tracking-[0.2em]","opacity-70","mb-1"],[1,"text-3xl","sm:text-4xl","md:text-5xl","font-black","leading-none","truncate",2,"letter-spacing","-0.02em"],[1,"text-xs","sm:text-sm","truncate","mt-2","font-mono","opacity-70"],[1,"mt-5","sm:mt-6","pt-4","flex","items-center","justify-between","gap-2","sm:gap-3","border-t","border-dashed","flex-wrap"],[1,"inline-flex","items-center","gap-1.5","text-[10px]","sm:text-xs","font-bold","uppercase","tracking-wider","opacity-80"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","stroke-width","2.5",1,"h-3.5","w-3.5"],["stroke-linecap","round","stroke-linejoin","round","d","M5 13l4 4L19 7"],[1,"flex","items-center","gap-2"],["type","button","aria-label","Open account details",1,"pop-btn","inline-flex","items-center","gap-1.5","px-3","py-1.5","text-[11px]","sm:text-xs","font-black","uppercase","tracking-widest","border-2",3,"click"],["stroke-linecap","round","stroke-linejoin","round","d","M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"],["type","button",1,"pop-btn","inline-flex","items-center","gap-1.5","px-3","py-1.5","text-[11px]","sm:text-xs","font-black","uppercase","tracking-widest","border-2",3,"click"],["stroke-linecap","round","stroke-linejoin","round","d","M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"],[1,"pass-face","pass-back","pop-card","relative","px-4","sm:px-6","py-5","sm:py-6","border-2","sm:border-[3px]",2,"--pop-offset-x","8px","--pop-offset-y","8px"],[1,"absolute","
9inset-x-0","top-0","h-2.5","pop-stripe"],[1,"flex","items-center","justify-between","gap-2","mb-4","mt-1"],[1,"px-2","py-0.5","text-[10px]","font-black","uppercase","tracking-widest"],["type","button","aria-label","Flip back to backstage pass",1,"pop-btn","flex-shrink-0","inline-flex","items-center","gap-1","px-2.5","py-1","text-[10px]","font-black","uppercase","tracking-widest","border-2",3,"click"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","stroke-width","2.5",1,"h-3","w-3"],["stroke-linecap","round","stroke-linejoin","round","d","M9 5l-7 7 7 7M2 12h20"],[1,"mb-3","px-2.5","py-1.5","text-xs","flex","items-center","gap-2","border-2",2,"background-color","#fee2e2","border-color","#b91c1c","color","#7f1d1d"],[1,"mb-3","px-2.5","py-1.5","text-xs","flex","items-center","gap-2","border-2",2,"background-color","#d1fae5","border-color","#047857","color","#064e3b"],["id","profileForm",1,"space-y-3",3,"ngSubmit","formGroup"],["for","userName",1,"block","text-[10px]","font-black","uppercase","tracking-widest","mb-1"],["id","userName","type","text","formControlName","userName","autocomplete","name","placeholder","How should we call you?",1,"pop-input","block","w-full","px-3","py-2","text-sm","focus:outline-none","border-2"],[1,"mt-1","text-[10px]","font-bold","text-red-600","uppercase","tracking-wider"],[1,"grid","grid-cols-2","gap-3"],["for","firstName",1,"block","text-[10px]","font-black","uppercase","tracking-widest","mb-1"],["id","firstName","type","text","formControlName","firstName","autocomplete","given-name",1,"pop-input","block","w-full","px-3","py-2","text-sm","focus:outline-none","border-2"],["for","lastName",1,"block","text-[10px]","font-black","uppercase","tracking-widest","mb-1"],["id","lastName","type","text","formControlName","lastName","autocomplete","family-name",1,"pop-input","block","w-full","px-3","py-2","text-sm","focus:outline-none","border-2"],[1,"relative"],["for","location",1,"block","text-[10px]","font-black","uppercase","tracking-widest","mb-1"],["id","location","type","text","formControlName","location","autocomplete","off","placeholder","Start typing a city\u2026",1,"pop-input","block","w-full","px-3","py-2","text-sm","focus:outline-none","border-2",3,"input","focus","blur"],[1,"absolute","right-3","top-[42px]","text-xs",3,"color"],["role","listbox",1,"absolute","left-0","right-0","mt-1","max-h-64","overflow-y-auto",2,"z-index","50","transform","translateZ(1px)","box-shadow","4px 4px 0 0 rgba(0,0,0,0.85)",3,"background-color","border"],["for","email",1,"block","text-[10px]","font-black","uppercase","tracking-widest","mb-1"],["id","email","type","email","formControlName","email","readonly","",1,"block","w-full","px-3","py-2","text-sm","font-mono","cursor-not-allowed","border-2","border-dashed"],[1,"flex","items-center","justify-end","gap-2","pt-1"],["type","button",1,"pop-btn","inline-flex","items-center","justify-center","px-3","py-2","text-[11px]","font-black","uppercase","tracking-widest","border-2",3,"click"],["type","submit",1,"pop-btn","inline-flex","items-center","justify-center","px-4","py-2","text-[11px]","font-black","uppercase","tracking-widest","border-2","disabled:opacity-50","disabled:cursor-not-allowed",3,"disabled"],[1,"mt-4","pt-3","border-t","border-dashed","flex","items-center","justify-end"],["type","button",1,"text-[10px]","font-bold","uppercase","tracking-widest","opacity-60","hover:opacity-100","transition-opacity","disabled:opacity-30","disabled:cursor-not-allowed",3,"click","disabled"],[1,"relative","mb-14"],["id","follows-section","class","mb-14 scroll-mt-24",4,"ngIf"],[4,"ngIf"],[1,"pt-7","mt-2","border-t-2","border-dashed"],[1,"flex","flex-col","sm:flex-row","sm:items-center","sm:justify-between","gap-4"],[1,"text-[11px]","font-mono","leading-relaxed"],[1,"font-black","uppercase","tracking-widest","text-[10px]","mb-1","opacity-80"],[1,"break-all","opacity-80"],["type","button",1,"pop-btn","sm:hidden","inline-flex","items-center","justify-center","gap-2","px-4","py-2.5","text-xs","font-black","uppercase","tracking-widest","border-2",3,"click"],[3,"artist","websiteSettings"],[1,"sticky","top-0","z-50","backdrop-blur-lg",2,"box-shadow","0 1px 3px 0 rgba(0, 0, 0, 0.06)"],[1,"max-w-7xl","mx-auto","px-4","sm:px-6","lg:px-8"],[1,"flex","items-center","h-16","sm:h-20"],[1,"flex","items-center","flex-shrink-0"],["routerLink","/",1,"block"],["class","h-10 w-auto max-h-16 object-contain transition-transform duration-300 hover:scale-105 flex-shrink-0",3,"src","alt",4,"ngIf"],["class","font-extrabold tracking-tight text-lg sm:text-xl whitespace-nowrap",3,"color",4,"ngIf"],[1,"hidden","md:flex","items-center","flex-1"],[1,"flex","items-center","gap-1"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"md:hidden","flex-shrink-0"],[1,"p-2","sm:p-2.5","transition-all","duration-300","active:bg-white/20","touch-manipulation","rounded-md",3,"click"],["class","w-5 h-5 sm:w-6 sm:h-6","fill","none","stroke","currentColor","viewBox","0 0 24 24","stroke-width","2",4,"ngIf"],["class","md:hidden pb-3 space-y-1 animate-slide-down",4,"ngIf"],[1,"h-10","w-auto","max-h-16","object-contain","transition-transform","duration-300","hover:scale-105","flex-shrink-0",3,"src","alt"],[1,"font-extrabold","tracking-tight","text-lg","sm:text-xl","whitespace-nowrap"],["class",`ml-2 inline-flex items-center gap-1.5 px-4 py-2 text-xs font-black uppercase tracking-wider
10                        bg-yellow-400 hover:bg-yellow-300 text-black border-2 border-black
11                        transition-all duration-150 cursor-pointer
12                        shadow-[3px_3px_0px_0px_rgba(0,0,0,1)]
13                        hover:shadow-[2px_2px_0px_0px_rgba(0,0,0,1)]
14                        hover:translate-x-[1px] hover:translate-y-[1px]
15                        active:translate-x-[3px] active:translate-y-[3px]
16                        active:shadow-none
17                        focus:outline-none focus:ring-4 focus:ring-yellow-400/40`,3,"click",4,"ngIf","ngIfElse"],[1,"ml-2","inline-flex","items-center","gap-1.5","px-4","py-2","text-xs","font-black","uppercase","tracking-wider","bg-yellow-400","hover:bg-yellow-300","text-black","border-2","border-black","transition-all","duration-150","cursor-pointer","shadow-[3px_3px_0px_0px_rgba(0,0,0,1)]","hover:shadow-[2px_2px_0px_0px_rgba(0,0,0,1)]","hover:translate-x-[1px]","hover:translate-y-[1px]","active:translate-x-[3px]","active:translate-y-[3px]","active:shadow-none","focus:outline-none","focus:ring-4","focus:ring-yellow-400/40",3,"click"],["stroke-linecap","round","stroke-linejoin","round","d","M16.5 6v.75m0 3v.75m0 3v.75m0 3V18m-9-5.25h5.25M7.5 15h3M3.375 5.25c-.621 0-1.125.504-1.125 1.125v3.026a2.999 2.999 0 0 1 0 5.198v3.026c0 .621.504 1.125 1.125 1.125h17.25c.621 0 1.125-.504 1.125-1.125v-3.026a2.999 2.999 0 0 1 0-5.198V6.375c0-.621-.504-1.125-1.125-1.125H3.375Z"],[1,"text-sm","font-semibold","uppercase","tracking-wider","px-4","py-2","relative","group","nav-link-transition",3,"click","routerLink"],[1,"relative","z-10"],[1,"absolute","
17inset-x-0","bottom-0","h-0.5","transform","scale-x-0","group-hover:scale-x-100","transition-transform","duration-300","origin-left"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","stroke-width","2",1,"w-5","h-5","sm:w-6","sm:h-6"],["stroke-linecap","round","stroke-linejoin","round","d","M4 6h16M4 12h16M4 18h16"],["stroke-linecap","round","stroke-linejoin","round","d","M6 18L18 6M6 6l12 12"],[1,"md:hidden","pb-3","space-y-1","animate-slide-down"],["class",`mx-3 mt-3 inline-flex items-center justify-center gap-2 px-4 py-3 text-sm font-black uppercase tracking-wider
18                    bg-yellow-400 hover:bg-yellow-300 text-black border-2 border-black
19                    transition-all duration-150 cursor-pointer
20                    shadow-[4px_4px_0px_0px_rgba(0,0,0,1)]
21                    hover:shadow-[2px_2px_0px_0px_rgba(0,0,0,1)]
22                    hover:translate-x-[2px] hover:translate-y-[2px]
23                    active:translate-x-[4px] active:translate-y-[4px]
24                    active:shadow-none
25                    focus:outline-none focus:ring-4 focus:ring-yellow-400/40`,3,"click",4,"ngIf","ngIfElse"],[1,"mx-3","mt-3","inline-flex","items-center","justify-center","gap-2","px-4","py-3","text-sm","font-black","uppercase","tracking-wider","bg-yellow-400","hover:bg-yellow-300","text-black","border-2","border-black","transition-all","duration-150","cursor-pointer","shadow-[4px_4px_0px_0px_rgba(0,0,0,1)]","hover:shadow-[2px_2px_0px_0px_rgba(0,0,0,1)]","hover:translate-x-[2px]","hover:translate-y-[2px]","active:translate-x-[4px]","active:translate-y-[4px]","active:shadow-none","focus:outline-none","focus:ring-4","focus:ring-yellow-400/40",3,"click"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","stroke-width","2.5",1,"h-4","w-4"],[1,"block","px-4","py-3","text-sm","font-semibold","uppercase","tracking-wider","transition-all","duration-300","active:pl-6","border-l-2","touch-manipulation",2,"background","rgba(255, 255, 255, 0.03)",3,"click","routerLink"],[1,"sticky","top-0","z-50","backdrop-blur-lg","border-b",2,"box-shadow","0 1px 3px 0 rgba(0,0,0,0.06)"],[1,"flex","items-center","justify-between","h-14","sm:h-16"],["routerLink","/",1,"inline-flex","items-center","gap-2","text-sm","font-bold","uppercase","tracking-widest","transition-opacity","hover:opacity-70"],["stroke-linecap","round","stroke-linejoin","round","d","M15 19l-7-7 7-7"],["aria-current","page",1,"inline-flex","items-center","gap-2","text-sm","font-black","uppercase","tracking-widest"],[1,"h-20","w-20","sm:h-24","sm:w-24","object-cover","border-2","sm:border-[3px]",3,"src","alt"],[1,"h-20","w-20","sm:h-24","sm:w-24","flex","items-center","justify-center","font-black","text-2xl","sm:text-3xl","border-2","sm:border-[3px]"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","stroke-width","2.5",1,"h-4","w-4","flex-shrink-0"],["stroke-linecap","round","stroke-linejoin","round","d","M12 9v2m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"],[1,"font-bold","leading-tight"],[1,"absolute","right-3","top-[42px]","text-xs"],["role","listbox",1,"absolute","left-0","right-0","mt-1","max-h-64","overflow-y-auto",2,"z-index","50","transform","translateZ(1px)","box-shadow","4px 4px 0 0 rgba(0,0,0,0.85)"],["role","option",1,"px-4","py-2.5","cursor-pointer","transition-colors","hover:opacity-80",2,"border-bottom","1px solid rgba(0,0,0,0.08)",3,"background-color","color"],["role","option",1,"px-4","py-2.5","cursor-pointer","transition-colors","hover:opacity-80",2,"border-bottom","1px solid rgba(0,0,0,0.08)",3,"mousedown"],[1,"text-sm","font-bold"],[1,"text-xs","mt-0.5","truncate"],["fill","none","viewBox","0 0 24 24",1,"animate-spin","-ml-1","mr-1.5","h-3.5","w-3.5"],["cx","12","cy","12","r","10","stroke","currentColor","stroke-width","4",1,"opacity-25"],["fill","currentColor","d","M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",1,"opacity-75"],["aria-hidden","true",1,"select-none","pointer-events-none",2,"filter","blur(8px)","opacity","0.65"],[1,"grid","grid-cols-2","sm:grid-cols-3","gap-5","sm:gap-6","mb-8"],[1,"pop-polaroid","pop-card","flex","flex-col","p-3","pb-4","border-2","sm:border-[3px]",2,"--pop-offset-x","5px","--pop-offset-y","5px",3,"background-color","border-color"],[1,"space-y-3"],[1,"pop-card","border-2","px-4","py-3","flex","items-center","justify-between","gap-3",2,"--pop-offset-x","5px","--pop-offset-y","5px",3,"background-color","border-color"],[1,"absolute","
25inset-0","flex","items-start","justify-center","pt-8","sm:pt-14","px-4",2,"background","rgba(0,0,0,0.18)"],["role","dialog","aria-labelledby","gate-title",1,"pop-card","relative","w-full","max-w-md","px-5","sm:px-7","py-6","sm:py-7","border-2","sm:border-[3px]","text-center",2,"--pop-offset-x","8px","--pop-offset-y","8px"],[1,"inline-block","pop-stamp","px-3","py-1","mt-2","mb-4","border-2","border-dashed","text-[10px]","font-mono","font-black","uppercase","tracking-widest"],["id","gate-title",1,"text-xl","sm:text-2xl","md:text-3xl","font-black","leading-tight","mb-3",2,"letter-spacing","-0.02em"],[1,"text-sm","mb-6","max-w-sm","mx-auto","opacity-85"],["type","button",1,"pop-btn","inline-flex","items-center","justify-center","gap-2","px-5","py-2.5","text-xs","sm:text-sm","font-black","uppercase","tracking-widest","border-2","disabled:opacity-50","disabled:cursor-not-allowed",3,"click","disabled"],[1,"text-[11px]","mt-5","font-bold","uppercase","tracking-widest","opacity-60"],[1,"pop-polaroid","pop-card","flex","flex-col","p-3","pb-4","border-2","sm:border-[3px]",2,"--pop-offset-x","5px","--pop-offset-y","5px"],[1,"aspect-square","w-full","mb-3","flex","items-center","justify-center","border-2"],[1,"text-3xl","sm:text-4xl","font-black"],[1,"px-1","min-w-0"],[1,"text-sm","font-black","truncate",2,"letter-spacing","-0.01em"],[1,"text-[10px]","mt-0.5","uppercase","tracking-widest","opacity-60"],[1,"pop-card","border-2","px-4","py-3","flex","items-center","justify-between","gap-3",2,"--pop-offset-x","5px","--pop-offset-y","5px"],[1,"min-w-0"],[1,"text-sm","font-black","truncate"],[1,"text-xs","opacity-70","truncate"],[1,"flex-shrink-0","text-[10px]","font-black","uppercase","tracking-widest","px-2","py-1","border-2"],["fill","none","viewBox","0 0 24 24",1,"animate-spin","h-4","w-4"],["stroke-linecap","round","stroke-linejoin","round","d","M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"],["id","follows-section",1,"mb-14","scroll-mt-24"],[1,"mb-6","flex","items-end","justify-between","gap-3","flex-wrap"],[1,"text-2xl","sm:text-3xl","font-black","uppercase","leading-none",2,"letter-spacing","-0.01em"],[1,"text-sm","mt-2","opacity-80"],[1,"pop-stamp","inline-flex","items-center","px-3","py-1.5","text-[11px]","font-black","uppercase","tracking-widest","border-2","border-dashed",3,"color","border-color"],[1,"grid","grid-cols-2","sm:grid-cols-3","gap-4","sm:gap-5"],[1,"p-7","text-center","border-2","border-dashed",3,"background-color","border-color"],[1,"pop-stamp","inline-flex","items-center","px-3","py-1.5","text-[11px]","font-black","uppercase","tracking-widest","border-2","border-dashed"],[1,"pop-polaroid","animate-pulse","border-2",2,"height","160px",3,"background-color","border-color"],[1,"pop-polaroid","animate-pulse","border-2",2,"height","160px"],[1,"p-7","text-center","border-2","border-dashed"],[1,"text-[11px]","font-black","uppercase","tracking-widest","mb-2","opacity-70"],[1,"text-sm","opacity-90"],[1,"grid","grid-cols-2","sm:grid-cols-3","gap-5","sm:gap-6"],["target","_blank","rel","noopener noreferrer",1,"pop-polaroid","pop-card","group","flex","flex-col","p-3","pb-4","transition-transform","duration-200","border-2","sm:border-[3px]",2,"--pop-offset-x","5px","--pop-offset-y","5px",3,"href","background-color","border-color"],[1,"mt-5","text-[11px]","font-bold","uppercase","tracking-widest","opacity-70",3,"color"],["aria-label","Followed bands pagination",1,"mt-7","flex","items-center","justify-between","gap-3","flex-wrap"],["target","_blank","rel","noopener noreferrer",1,"pop-polaroid","pop-card","group","flex","flex-col","p-3","pb-4","transition-transform","duration-200","border-2","sm:border-[3px]",2,"--pop-offset-x","5px","--pop-offset-y","5px",3,"href"],[1,"aspect-square","w-full","mb-3","flex","items-center","justify-center","overflow-hidden","border-2"],["loading","lazy",1,"h-full","w-full","object-cover",3,"src","alt"],[1,"text-3xl","sm:text-4xl","font-black",3,"color"],[1,"text-[10px]","mt-0.5","uppercase","tracking-widest","opacity-60","group-hover:opacity-100","transition-opacity"],[1,"mt-5","text-[11px]","font-bold","uppercase","tracking-widest","opacity-70"],[1,"text-[11px]","font-bold","uppercase","tracking-widest","opacity-70"],[1,"flex","items-center","gap-1.5"],["type","button","aria-label","Previous page",1,"pop-btn","inline-flex","items-center","justify-center","h-9","w-9","text-sm","border-2","disabled:opacity-30","disabled:cursor-not-allowed",3,"click","disabled"],["type","button","aria-label","Next page",1,"pop-btn","inline-flex","items-center","justify-center","h-9","w-9","text-sm","border-2","disabled:opacity-30","disabled:cursor-not-allowed",3,"click","disabled"],["stroke-linecap","round","stroke-linejoin","round","d","M9 5l7 7-7 7"],[1,"px-1","text-sm","font-black","select-none","opacity-50"],["type","button",1,"pop-btn","inline-flex","items-center","justify-center","h-9","min-w-9","px-2.5","text-sm","font-black","border-2",3,"background-color","color","border-color"],["type","button",1,"pop-btn","inline-flex","items-center","justify-center","h-9","min-w-9","px-2.5","text-sm","font-black","border-2",3,"click"],["role","tablist","aria-label","Backstage interactions",1,"no-scrollbar","flex","items-center","gap-2","overflow-x-auto","-mx-1","px-1","pb-1","mb-6"],["type","button","role","tab","class","pop-btn shrink-0 inline-flex items-center gap-1.5 px-3 py-1.5 text-[10px] sm:text-[11px] font-black uppercase tracking-widest border-2",3,"background-color","color","border-color","click",4,"ngFor","ngForOf"],[1,"mb-14"],[3,"artistId","artistName","currentUser","colors","focusEventId"],[3,"artistId","artistName","currentUser","colors"],["type","button","role","tab",1,"pop-btn","shrink-0","inline-flex","items-center","gap-1.5","px-3","py-1.5","text-[10px]","sm:text-[11px]","font-black","uppercase","tracking-widest","border-2",3,"click"],[3,"ngSwitch"],["class","w-3.5 h-3.5 shrink-0","fill","none","stroke","currentColor","viewBox","0 0 24 24","stroke-width","2",4,"ngSwitchCase"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","stroke-width","2",1,"w-3.5","h-3.5","shrink-0"],["stroke-linecap","round","d","M8 6h13M8 12h13M8 18h13"],["stroke-linecap","round","d","M3 6h.01M3 12h.01M3 18h.01"],["stroke-linecap","round","stroke-linejoin","round","d","M4 20V10M12 20V4M20 20v-6"],["cx","12","cy","12","r","9"],["stroke-linecap","round","stroke-linejoin","round","d","M9.5 9a2.5 2.5 0 0 1 4.9.75c0 1.5-2.15 1.85-2.4 3.15"],["stroke-linecap","round","d","M12 17h.01"],["stroke-linecap","round","stroke-linejoin","round","d","M9 18V5l10-2v13"],["cx","6","cy","18","r","3"],["cx","16","cy","16","r","3"],["stroke-linecap","round","stroke-linejoin","round","d","M4 8a2 2 0 0 1 2-2h1l1.5-2h7L17 6h1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8Z"],["cx","12","cy","13","r","3.5"],["stroke-linecap","round","stroke-linejoin","round","d","M6 8h12l-1 12H7L6 8Z"],["stroke-linecap","round","d","M9 8V6a3 3 0 0 1 6 0v2"],[1,"min-h-screen","flex","items-center","justify-center","bg-white"],[1,"flex","flex-col","items-center","gap-4","text-gray-500"],[1,"h-2","w-2","rounded-full","animate-pulse","bg-gray-400"],[1,"h-2","w-2","rounded-full","animate-pulse","bg-gray-400",2,"animation-delay","0.2s"],[1,"h-2","w-2","rounded-full","animate-pulse","bg-gray-400",2,"animation-delay","0.4s"],[1,"text-sm"]],template:function(t,a){t&1&&g(0,eo,104,157,"div",2)(1,to,8,0,"div",3),t&2&&(m("ngIf",a.artist&&a.websiteSettings&&a.currentUser),o(),m("ngIf",!a.dataLoaded||!a.currentUser))},dependencies:[q,X,$,Je,Qe,Ze,ct,it,fe,ae,tt,nt,ot,et,gt,Fe,Te,Me,Ne,Ue,Oe],styles:[".no-scrollbar[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:none}.no-scrollbar[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.pop-halftone[_ngcontent-%COMP%]{background-image:radial-gradient(circle,rgba(0,0,0,.06) 1px,transparent 1px);background-size:18px 18px;background-position:0 0}.pop-stripe[_ngcontent-%COMP%]{background-image:repeating-linear-gradient(135deg,currentColor 0,currentColor 8px,transparent 8px,transparent 16px)}.pop-card[_ngcontent-%COMP%]{box-shadow:var(--pop-offset, 6px 6px) 0 0 var(--pop-shadow-color, #111);transition:transform .15s ease,box-shadow .15s ease}.pop-card-hover[_ngcontent-%COMP%]:hover{transform:translate(-2px,-2px);box-shadow:calc(var(--pop-offset-x, 8px)) calc(var(--pop-offset-y, 8px)) 0 0 var(--pop-shadow-color, #111)}.pop-stamp[_ngcontent-%COMP%]{transform:rotate(-6deg);letter-spacing:.08em}.pop-polaroid[_ngcontent-%COMP%]:nth-child(2n){transform:rotate(1.5deg)}.pop-polaroid[_ngcontent-%COMP%]:nth-child(odd){transform:rotate(-1deg)}.pop-polaroid[_ngcontent-%COMP%]:hover{transform:rotate(0) translateY(-3px)}.pop-input[_ngcontent-%COMP%]{transition:border-color .12s ease,box-shadow .12s ease,transform .12s ease}.pop-input[_ngcontent-%COMP%]:focus{transform:translate(-1px,-1px);box-shadow:3px 3px 0 0 var(--pop-shadow-color, #111)}.pop-btn[_ngcontent-%COMP%]{transition:transform .12s ease,box-shadow .12s ease}.pop-btn[_ngcontent-%COMP%]:hover:not(:disabled){transform:translate(-1px,-1px);box-shadow:5px 5px 0 0 var(--pop-shadow-color, #111)}.pop-btn[_ngcontent-%COMP%]:active:not(:disabled){transform:translate(2px,2px);box-shadow:0 0 0 0 var(--pop-shadow-color, #111)}.pass-flipper[_ngcontent-%COMP%]{perspective:1800px}.pass-inner[_ngcontent-%COMP%]{display:grid;position:relative;transform-style:preserve-3d;transition:transform .7s cubic-bezier(.22,1,.36,1)}.pass-inner.is-flipped[_ngcontent-%COMP%]{transform:rotateY(180deg)}.pass-face[_ngcontent-%COMP%]{grid-area:1 / 1;width:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden}.pass-back[_ngcontent-%COMP%]{transform:rotateY(180deg)}.pass-inner[_ngcontent-%COMP%]:not(.is-flipped)   .pass-back[_ngcontent-%COMP%], .pass-inner.is-flipped[_ngcontent-%COMP%]   .pass-front[_ngcontent-%COMP%]{pointer-events:none}"],changeDetection:0})};export{Pt as ProfileComponent};

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.