1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._posthogReleaseId=e._posthogReleaseId||"01a0d059-0dc8-0000-0784-6ee3765120be";var n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="23de858c-5381-569a-a687-78c89dbc245e")}catch(e){}}();import{j as s,r as Q}from"./1_rjLJJT.js";import{c as F,dz as We,b$ as et,B as W,t as H,bf as tt,aG as st,L as De,ao as ye,dv as Ee,O as ne,u as Ne,bh as it,dA as Ue,o as $e,H as J,T as L,aV as lt,bi as Qe,dB as nt,dC as at,a as M,F as Je,C as Ye,a7 as ot,dD as rt,bI as ct,dE as Re,bj as Ve,j as dt,i as Ke,dg as pt,ak as ft,ap as ut,dF as mt,h as xt,ae as Me,af as Be}from"./BzLaZ4LI.js";import{c as be,b as ve,T as ht,a as gt}from"./Da5HTlwd.js";import{L as ae,u as Le,H as qe}from"./CJi0kXOi.js";import{g as Fe}from"./DsKN6oxK.js";import{O as bt,m as Ze,as as vt,at as kt,D as jt,af as wt}from"./CF1GVhvA.js";import{b as yt,a as Nt,c as St,e as It,D as Ot,d as Ct}from"./CqYXRKlk.js";import"./BiUYuhao.js";import"./BnWyCVyG.js";function At(t){const e=F.c(8),{personId:i,handle:c}=t;let l;e[0]!==c||e[1]!==i?(l={personId:i,handle:c},e[0]=c,e[1]=i,e[2]=l):l=e[2];const{justCopied:o,copy:n}=We(l);let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(et,{size:16}),e[3]=d):d=e[3];const f=o?"Copied!":"Copy link";let a;return e[4]!==n||e[5]!==o||e[6]!==f?(a=s.jsxs(W,{variant:"primary",size:"sm",className:"gap-2",onClick:n,disabled:o,children:[d,f]}),e[4]=n,e[5]=o,e[6]=f,e[7]=a):a=e[7],a}function Tt(t){const e=F.c(34),{application:i}=t,c=ne(),{handle:l,personId:o}=Ne(),n=i.applicantHandle?`@${i.applicantHandle}`:i.applicantName??"Applicant";let d;e[0]!==i.id||e[1]!==c||e[2]!==l||e[3]!==o?(d=c("guestSpotApplication",{handle:l,personId:o,applicationId:i.id}),e[0]=i.id,e[1]=c,e[2]=l,e[3]=o,e[4]=d):d=e[4];const f=i.applicantProfileImageUrl??it;let a;e[5]!==n||e[6]!==f?(a=s.jsx("img",{src:f,alt:n,className:"size-12 rounded-full bg-ink-black-100 object-cover dark:bg-ink-black-800"}),e[5]=n,e[6]=f,e[7]=a):a=e[7];let m;e[8]!==i.hasUnreadConversation?(m=i.hasUnreadConversation?s.jsx("svg",{height:"18",width:"18",className:"absolute -right-1 -top-1 z-10 text-ink-white dark:text-ink-black-900",children:s.jsx("circle",{cx:"9",cy:"9",r:"6",stroke:"currentColor",strokeWidth:"3",fill:"#DB4B3A"})}):null,e[8]=i.hasUnreadConversation,e[9]=m):m=e[9];let r;e[10]!==a||e[11]!==m?(r=s.jsxs("div",{className:"relative shrink-0",children:[a,m]}),e[10]=a,e[11]=m,e[12]=r):r=e[12];let x;e[13]!==n?(x=s.jsx(J,{size:"xl",className:"w-full truncate",children:n}),e[13]=n,e[14]=x):x=e[14];const u=i.proposedStartsOn??i.advertisedStartsOn,g=i.proposedEndsOn??i.advertisedEndsOn;let p;e[15]!==i.proposedDates||e[16]!==u||e[17]!==g?(p=Ue(i.proposedDates,u,g,"arrow",{maxShown:4}),e[15]=i.proposedDates,e[16]=u,e[17]=g,e[18]=p):p=e[18];let b;e[19]!==p?(b=s.jsx(L,{variant:"body",size:"sm",className:"w-full truncate",children:p}),e[19]=p,e[20]=b):b=e[20];let v;e[21]!==i.createdAt?(v=Fe(i.createdAt,$e(),"Applied"),e[21]=i.createdAt,e[22]=v):v=e[22];let h;e[23]!==v?(h=s.jsx(L,{variant:"label",size:"xs",inactive:!0,children:v}),e[23]=v,e[24]=h):h=e[24];let k;e[25]!==b||e[26]!==h||e[27]!==x?(k=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-2 py-1",children:[x,b,h]}),e[25]=b,e[26]=h,e[27]=x,e[28]=k):k=e[28];let w;e[29]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(lt,{size:24,className:"shrink-0 self-center text-ink-black/40 dark:text-ink-white/40"}),e[29]=w):w=e[29];let j;return e[30]!==d||e[31]!==k||e[32]!==r?(j=s.jsxs(ae,{to:d,viewTransition:!0,className:"flex w-full items-start gap-4 border-b border-ink-black/10 px-5 py-4 no-underline dark:border-ink-white/10",children:[r,k,w]}),e[30]=d,e[31]=k,e[32]=r,e[33]=j):j=e[33],j}function ke(t){const e=F.c(17),{personId:i,tab:c,archived:l,emptyTitle:o,emptyDescription:n,emptyAction:d}=t,f=l===void 0?!1:l;let a;e[0]!==f||e[1]!==i||e[2]!==c?(a={personId:i,tab:c,archived:f,limit:24},e[0]=f,e[1]=i,e[2]=c,e[3]=a):a=e[3];const m=!!i;let r;e[4]!==m?(r={getNextPageParam:zt,enabled:m},e[4]=m,e[5]=r):r=e[5];const{data:x,isLoading:u,isFetchingNextPage:g,fetchNextPage:p,error:b,refetch:v}=H.getPageOfStudioJobApplications.useInfiniteQuery(a,r);let h;if(e[6]!==f||e[7]!==x?.pages||e[8]!==d||e[9]!==n||e[10]!==o||e[11]!==b||e[12]!==p||e[13]!==g||e[14]!==u||e[15]!==v){const k=x?.pages??[],w=k[k.length-1]?.hasMore===!0,j=k.flatMap(Pt);h=s.jsx(tt,{hasMore:w,onLoadMore:p,children:u&&!g?s.jsx(st,{children:s.jsx(De,{})}):j.length>0?s.jsx("div",{className:"flex flex-col overflow-hidden",children:s.jsx(bt,{initial:!1,children:j.map(_t)})},f?"archived":"active"):b?s.jsx(ye,{icon:Ee,title:"Unable to load applications",description:"Please try again.",children:s.jsx(W,{variant:"secondary",size:"sm",onClick:()=>{v()},children:"Try again"})}):s.jsx(ye,{icon:Ee,title:o,description:n,children:d})}),e[6]=f,e[7]=x?.pages,e[8]=d,e[9]=n,e[10]=o,e[11]=b,e[12]=p,e[13]=g,e[14]=u,e[15]=v,e[16]=h}else h=e[16];return h}function _t(t){return s.jsx(Ze.div,{initial:!1,animate:{x:0,opacity:1,height:"auto"},exit:{x:"110%",opacity:0,height:0},transition:{x:{duration:.24,ease:"easeIn"},opacity:{duration:.2},height:{duration:.28,delay:.16,ease:"easeInOut"}},style:{overflow:"hidden"},children:s.jsx(Tt,{application:t})},t.id)}function Pt(t){return t.applications}function zt(t){return t.applications[t.applications.length-1]?.id}function je(t){const e=F.c(11),{count:i,isSelected:c}=t,l=Q.useRef(null),o=Q.useRef(i);let n,d;if(e[0]!==i?(n=()=>{const u=l.current;u&&o.current!==void 0&&i!==void 0&&i>o.current&&(u.style.animation="count-pop 500ms ease-out"),o.current=i},d=[i],e[0]=i,e[1]=n,e[2]=d):(n=e[1],d=e[2]),Q.useEffect(n,d),i===void 0){let u;return e[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ot,{className:"inline-flex h-4 w-4 roun
1ded-full"}),e[3]=u):u=e[3],u}if(i===0)return null;const f=c?"bg-ink-black text-ink-white":"bg-ink-black/5 text-ink-black-400";let a;e[4]!==f?(a=M("flex items-center justify-center w-4 h-4 px-1 rounded-full",f),e[4]=f,e[5]=a):a=e[5];const m=i>99?"99+":i;let r;e[6]!==m?(r=s.jsx("span",{className:"text-[10px] leading-none font-medium",children:m}),e[6]=m,e[7]=r):r=e[7];let x;return e[8]!==a||e[9]!==r?(x=s.jsx("div",{ref:l,onAnimationEnd:Et,className:a,children:r}),e[8]=a,e[9]=r,e[10]=x):x=e[10],x}function Et(t){t.currentTarget.style.animation=""}function Dt(){const t=F.c(87),{personId:e}=Ne(),i=ne(),c=Le(),[l,o]=Qe(nt,"new"),[n,d]=Q.useState(!1);let f;t[0]!==e?(f={personId:e},t[0]=e,t[1]=f):f=t[1];const a=!!e;let m;t[2]!==a?(m={enabled:a},t[2]=a,t[3]=m):m=t[3];const{data:r}=H.getStudioJobApplicationCounts.useQuery(f,m);let x;t[4]!==e?(x={personId:e},t[4]=e,t[5]=x):x=t[5];const u=!!e;let g;t[6]!==u?(g={enabled:u},t[6]=u,t[7]=g):g=t[7];const{data:p,isError:b}=H.studioJobPostings.getStudioJobPostingsForManager.useQuery(x,g);let v;t[8]!==e?(v={personId:e},t[8]=e,t[9]=v):v=t[9];const h=!!e;let k;t[10]!==h?(k={enabled:h},t[10]=h,t[11]=k):k=t[11];const{data:w}=H.getManagedPeople.useQuery(v,k);let j;t[12]!==e?(j={studioOrManagerPersonId:e},t[12]=e,t[13]=j):j=t[13];const C=!!e;let A;t[14]!==C?(A={enabled:C},t[14]=C,t[15]=A):A=t[15];const{data:I}=H.getStudioProfile.useQuery(j,A),U=I?.name??"your studio",y=w?.targetPerson?.handle,D=r===void 0?void 0:r.new+r.inReview+r.accepted+r.past,N=D===0&&p?.length===0;let T;t[16]!==p?(T=p?.some(Ut),t[16]=p,t[17]=T):T=t[17];const _=T,E=(p?.length??0)>0&&D===0;let P;t[18]!==i||t[19]!==c||t[20]!==e||t[21]!==y?(P=ge=>{const{replace:Ge}=ge===void 0?{}:ge,Xe=Ge===void 0?!1:Ge;c(i("guestSpotPostings",{personId:e,handle:y}),{state:{openCreate:!0},viewTransition:!0,replace:Xe})},t[18]=i,t[19]=c,t[20]=e,t[21]=y,t[22]=P):P=t[22];const z=P,R=e??"";let G;t[23]!==y||t[24]!==R?(G={personId:R,handle:y},t[23]=y,t[24]=R,t[25]=G):G=t[25];const{justCopied:$,copy:O}=We(G),S=Q.useRef(!1);let B,re;t[26]!==z||t[27]!==N?(B=()=>{!N||S.current||(S.current=!0,z({replace:!0}))},re=[N,z],t[26]=z,t[27]=N,t[28]=B,t[29]=re):(B=t[28],re=t[29]),Q.useEffect(B,re);let ce;t[30]===Symbol.for("react.memo_cache_sentinel")?(ce=s.jsx(qe,{children:s.jsx("title",{children:"Guest spots"})}),t[30]=ce):ce=t[30];let Y;t[31]!==o?(Y=ge=>{o(ge),d(!1)},t[31]=o,t[32]=Y):Y=t[32];let de;t[33]===Symbol.for("react.memo_cache_sentinel")?(de=s.jsx(J,{size:"2xl",children:"Guest Spots"}),t[33]=de):de=t[33];let V;t[34]!==O||t[35]!==i||t[36]!==N||t[37]!==_||t[38]!==b||t[39]!==$||t[40]!==c||t[41]!==e||t[42]!==y?(V=!N&&s.jsxs("div",{className:"flex flex-row gap-2",children:[s.jsxs("button",{type:"button",onClick:O,disabled:$,className:"flex h-8 items-center gap-1.5 rounded-full bg-ink-black/5 pl-3 pr-4 text-ink-black dark:bg-ink-white/5 dark:text-ink-white",children:[s.jsx(at,{size:16}),s.jsx(L,{variant:"label",size:"xs",className:"uppercase",children:$?"Copied":"Copy link"})]}),s.jsxs(W,{onClick:()=>c(i("guestSpotPostings",{personId:e,handle:y}),{viewTransition:!0}),size:"sm",children:[s.jsx("span",{className:M("size-2 shrink-0 rounded-full",_?"bg-[#4DB855]":"bg-ink-white/20 dark:bg-ink-black/20",_===void 0&&!b&&"animate-pulse")}),b?"Posting":_===void 0?"Loadingâ¦":_?"Open":"Closed"]})]}),t[34]=O,t[35]=i,t[36]=N,t[37]=_,t[38]=b,t[39]=$,t[40]=c,t[41]=e,t[42]=y,t[43]=V):V=t[43];let K;t[44]!==V?(K=s.jsxs("div",{className:"flex items-center justify-between px-5 pt-4 pb-2",children:[de,V]}),t[44]=V,t[45]=K):K=t[45];let pe;t[46]===Symbol.for("react.memo_cache_sentinel")?(pe=s.jsx("div",{className:"absolute bottom-0 left-0 w-full h-px bg-ink-black-100"}),t[46]=pe):pe=t[46];let fe;t[47]===Symbol.for("react.memo_cache_sentinel")?(fe=s.jsx("span",{children:"New"}),t[47]=fe):fe=t[47];const Ie=r?.new,Oe=l==="new";let q;t[48]!==Ie||t[49]!==Oe?(q=s.jsx(ve,{variant:"underline",value:"new",children:s.jsxs("span",{className:"flex items-center gap-1 flex-nowrap justify-center",children:[fe,s.jsx(je,{count:Ie,isSelected:Oe})]})}),t[48]=Ie,t[49]=Oe,t[50]=q):q=t[50];let ue;t[51]===Symbol.for("react.memo_cache_sentinel")?(ue=s.jsx("span",{children:"Offered"}),t[51]=ue):ue=t[51];const Ce=r?.inReview,Ae=l==="in-review";let Z;t[52]!==Ce||t[53]!==Ae?(Z=s.jsx(ve,{variant:"underline",value:"in-review",children:s.jsxs("span",{className:"flex items-center gap-1 flex-nowrap justify-center",children:[ue,s.jsx(je,{count:Ce,isSelected:Ae})]})}),t[52]=Ce,t[53]=Ae,t[54]=Z):Z=t[54];let me;t[55]===Symbol.for("react.memo_cache_sentinel")?(me=s.jsx("span",{children:"Upcoming"}),t[55]=me):me=t[55];const Te=r?.accepted,_e=l==="accepted";let X;t[56]!==Te||t[57]!==_e?(X=s.jsx(ve,{variant:"underline",value:"accepted",children:s.jsxs("span",{className:"flex items-center gap-1 flex-nowrap justify-center",children:[me,s.jsx(je,{count:Te,isSelected:_e})]})}),t[56]=Te,t[57]=_e,t[58]=X):X=t[58];let xe;t[59]===Symbol.for("react.memo_cache_sentinel")?(xe=s.jsx("span",{children:"Past"}),t[59]=xe):xe=t[59];const Pe=r?.past,ze=l==="past";let ee;t[60]!==Pe||t[61]!==ze?(ee=s.jsx(ve,{variant:"underline",value:"past",children:s.jsxs("span",{className:"flex items-center gap-1 flex-nowrap justify-center",children:[xe,s.jsx(je,{count:Pe,isSelected:ze})]})}),t[60]=Pe,t[61]=ze,t[62]=ee):ee=t[62];let te;t[63]!==q||t[64]!==Z||t[65]!==X||t[66]!==ee?(te=s.jsxs("div",{className:"relative",children:[pe,s.jsxs(ht,{variant:"underline",className:"relative z-10 mb-3 px-5 overflow-x-auto invisible-scrollbar",children:[q,Z,X,ee]})]}),t[63]=q,t[64]=Z,t[65]=X,t[66]=ee,t[67]=te):te=t[67];let se;
1t[68]!==K||t[69]!==te?(se=s.jsx("div",{className:"bg-ink-paper dark:bg-ink-black-900",children:s.jsxs("div",{className:"mx-auto max-w-screen-xs w-full",children:[K,te]})}),t[68]=K,t[69]=te,t[70]=se):se=t[70];let ie;t[71]!==l||t[72]!==n||t[73]!==z||t[74]!==E||t[75]!==N||t[76]!==e||t[77]!==y||t[78]!==U?(ie=N?s.jsx(ye,{icon:vt,title:"Create a guest spot",description:`Create your first guest spot posting for ${U}`,children:s.jsx(W,{size:"sm",onClick:()=>z(),children:"New guest spot"})}):s.jsx("div",{className:"mx-auto max-w-screen-xs w-full",children:s.jsxs("div",{className:"relative flex flex-col flex-1 pb-4",children:[(l==="new"||l==="in-review")&&s.jsx("div",{className:"flex px-5 mb-3",children:s.jsx(W,{variant:n?"primary":"tertiary",size:"sm",onClick:()=>d(!n),className:"inline-flex h-7 min-h-7 px-3 rounded-full gap-1 border-0",children:"Archived"})}),s.jsx(be,{value:"new",className:M("mt-0 flex flex-col flex-1 gap-4",l!=="new"&&"hidden"),children:e?s.jsx(ke,{personId:e,tab:"new",archived:n,emptyTitle:"No new applications",emptyDescription:"When artists apply to your postings, they'll show up here.",emptyAction:E?s.jsx(At,{personId:e,handle:y}):void 0}):null}),s.jsx(be,{value:"in-review",className:M("mt-0 flex flex-col flex-1 gap-4",l!=="in-review"&&"hidden"),children:e?s.jsx(ke,{personId:e,tab:"in-review",archived:n,emptyTitle:"No offers out",emptyDescription:"Offers you've sent will show up here."}):null}),s.jsx(be,{value:"accepted",className:M("mt-0 flex flex-col flex-1 gap-4",l!=="accepted"&&"hidden"),children:e?s.jsx(ke,{personId:e,tab:"accepted",archived:!1,emptyTitle:"No upcoming guest spots",emptyDescription:"Confirmed guest artists will show up here."}):null}),s.jsx(be,{value:"past",className:M("mt-0 flex flex-col flex-1 gap-4",l!=="past"&&"hidden"),children:e?s.jsx(ke,{personId:e,tab:"past",archived:!1,emptyTitle:"No past guest spots",emptyDescription:"Completed and cancelled guest spots will show up here."}):null})]})}),t[71]=l,t[72]=n,t[73]=z,t[74]=E,t[75]=N,t[76]=e,t[77]=y,t[78]=U,t[79]=ie):ie=t[79];let le;t[80]!==se||t[81]!==ie?(le=s.jsx(Je,{headerSlot:se,children:ie}),t[80]=se,t[81]=ie,t[82]=le):le=t[82];let he;return t[83]!==l||t[84]!==Y||t[85]!==le?(he=s.jsxs(s.Fragment,{children:[ce,s.jsx(Ye,{className:"px-0",children:s.jsx(gt,{value:l,onValueChange:Y,children:le})})]}),t[83]=l,t[84]=Y,t[85]=le,t[86]=he):he=t[86],he}function Ut(t){return t.isPublished}function $t(t){const e=F.c(26),{className:i,size:c,delay:l,duration:o,colorFrom:n,colorTo:d,style:f,reverse:a,initialOffset:m,borderWidth:r}=t,x=c===void 0?50:c,u=l===void 0?0:l,g=o===void 0?6:o,p=n===void 0?"#ffaa40":n,b=d===void 0?"#9c40ff":d,v=a===void 0?!1:a,h=m===void 0?0:m,k=r===void 0?1:r;if(kt())return null;let j;e[0]!==k?(j={padding:k,WebkitMask:"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",WebkitMaskComposite:"xor",mask:"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",maskComposite:"exclude"},e[0]=k,e[1]=j):j=e[1];const C=j;let A;e[2]!==i?(A=M("absolute aspect-square",i),e[2]=i,e[3]=A):A=e[3];const I=`rect(0 auto auto 0 round ${x}px)`,U=`linear-gradient(to left, ${p}, ${b}, transparent)`;let y;e[4]!==x||e[5]!==f||e[6]!==I||e[7]!==U?(y={width:x,offsetPath:I,background:U,...f},e[4]=x,e[5]=f,e[6]=I,e[7]=U,e[8]=y):y=e[8];const D=`${h}%`;let N;e[9]!==D?(N={offsetDistance:D},e[9]=D,e[10]=N):N=e[10];let T;e[11]!==h||e[12]!==v?(T={offsetDistance:v?[`${100-h}%`,`${-h}%`]:[`${h}%`,`${100+h}%`]},e[11]=h,e[12]=v,e[13]=T):T=e[13];const _=-u;let E;e[14]!==g||e[15]!==_?(E={repeat:1/0,ease:"linear",duration:g,delay:_},e[14]=g,e[15]=_,e[16]=E):E=e[16];let P;e[17]!==A||e[18]!==y||e[19]!==N||e[20]!==T||e[21]!==E?(P=s.jsx(Ze.div,{className:A,style:y,initial:N,animate:T,transition:E}),e[17]=A,e[18]=y,e[19]=N,e[20]=T,e[21]=E,e[22]=P):P=e[22];let z;return e[23]!==C||e[24]!==P?(z=s.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 rounded-[inherit]",style:C,children:P}),e[23]=C,e[24]=P,e[25]=z):z=e[25],z}function oe(t){return t.studioName??t.studioHandle??"A studio"}function Lt(t){const e=F.c(38),{spot:i,personId:c,handle:l}=t,o=ne();let n;e[0]!==i.proposedStartsOn||e[1]!==i.studioImageUrl?(n=s.jsx(Se,{imageUrl:i.studioImageUrl,startsOn:i.proposedStartsOn,className:"bg-ink-
1paper dark:bg-ink-black-800"}),e[0]=i.proposedStartsOn,e[1]=i.studioImageUrl,e[2]=n):n=e[2];let d;e[3]!==i?(d=oe(i),e[3]=i,e[4]=d):d=e[4];let f;e[5]!==d?(f=s.jsx(J,{size:"xl",className:"w-full truncate",children:d}),e[5]=d,e[6]=f):f=e[6];let a;e[7]!==i.proposedDates||e[8]!==i.proposedEndsOn||e[9]!==i.proposedStartsOn?(a=Ue(i.proposedDates,i.proposedStartsOn,i.proposedEndsOn,"compact",{maxShown:4}),e[7]=i.proposedDates,e[8]=i.proposedEndsOn,e[9]=i.proposedStartsOn,e[10]=a):a=e[10];let m;e[11]!==a?(m=s.jsx(L,{variant:"body",size:"sm",inactive:!0,className:"w-full truncate",children:a}),e[11]=a,e[12]=m):m=e[12];let r;e[13]!==f||e[14]!==m?(r=s.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-2",children:[f,m]}),e[13]=f,e[14]=m,e[15]=r):r=e[15];let x;e[16]!==o||e[17]!==l||e[18]!==c||e[19]!==i.bookId?(x=i.bookId?s.jsx(ae,{to:o("bookSettings",{bookId:i.bookId,personId:c,handle:l}),viewTransition:!0,className:dt({variant:"tertiary",size:"sm",className:"z-10"}),children:"Manage booking"}):null,e[16]=o,e[17]=l,e[18]=c,e[19]=i.bookId,e[20]=x):x=e[20];let u;e[21]!==r||e[22]!==x?(u=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col items-start gap-4",children:[r,x]}),e[21]=r,e[22]=x,e[23]=u):u=e[23];let g;e[24]!==o||e[25]!==l||e[26]!==c||e[27]!==i.applicationId?(g=o("guestSpotApplication",{personId:c,handle:l,applicationId:i.applicationId}),e[24]=o,e[25]=l,e[26]=c,e[27]=i.applicationId,e[28]=g):g=e[28];let p;e[29]!==i?(p=oe(i),e[29]=i,e[30]=p):p=e[30];const b=`View ${p} guest spot details`;let v;e[31]!==b||e[32]!==g?(v=s.jsx(ae,{to:g,viewTransition:!0,"aria-label":b,className:"absolute inset-0"}),e[31]=b,e[32]=g,e[33]=v):v=e[33];let h;return e[34]!==n||e[35]!==v||e[36]!==u?(h=s.jsxs("div",{className:"relative flex items-center gap-5",children:[n,u,v]}),e[34]=n,e[35]=v,e[36]=u,e[37]=h):h=e[37],h}function Ft(t){const e=F.c(69),{offer:i,personId:c,handle:l}=t,o=H.useUtils(),n=ne(),[d,f]=Q.useState(!1);let a;e[0]!==o?(a={onSuccess:()=>{Ke({title:"Guest spot accepted",description:"Your guest book is ready â open it when you're set.",variant:"success"}),o.getGuestSpots.invalidate(),o.getPersonSettings.invalidate(),f(!1)},onError:Gt},e[0]=o,e[1]=a):a=e[1];const{mutate:m,isPending:r}=H.acceptStudioJobAgreement.useMutation(a);let x;e[2]!==i?(x=oe(i),e[2]=i,e[3]=x):x=e[3];const u=x;let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx($t,{colorFrom:"#000000",colorTo:"#000000",duration:4}),e[4]=g):g=e[4];let p;e[5]!==i.proposedStartsOn||e[6]!==i.studioImageUrl?(p=s.jsx(Se,{imageUrl:i.studioImageUrl,startsOn:i.proposedStartsOn,className:"bg-ink-black/5 dark:bg-ink-white/10"}),e[5]=i.proposedStartsOn,e[6]=i.studioImageUrl,e[7]=p):p=e[7];let b;e[8]!==u?(b=s.jsx(J,{size:"xl",className:"w-full truncate",children:u}),e[8]=u,e[9]=b):b=e[9];let v;e[10]!==i.proposedDates||e[11]!==i.proposedEndsOn||e[12]!==i.proposedStartsOn?(v=Ue(i.proposedDates,i.proposedStartsOn,i.proposedEndsOn,"compact",{maxShown:4}),e[10]=i.proposedDates,e[11]=i.proposedEndsOn,e[12]=i.proposedStartsOn,e[13]=v):v=e[13];let h;e[14]!==v?(h=s.jsx(L,{variant:"body",size:"sm",inactive:!0,className:"w-full truncate",children:v}),e[14]=v,e[15]=h):h=e[15];let k;e[16]!==i.createdAt?(k=Fe(i.createdAt,$e(),"Offered"),e[16]=i.createdAt,e[17]=k):k=e[17];let w;e[18]!==k?(w=s.jsx(L,{variant:"label",size:"xs",inactive:!0,children:k}),e[18]=k,e[19]=w):w=e[19];let j;e[20]!==b||e[21]!==h||e[22]!==w?(j=s.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-2",children:[b,h,w]}),e[20]=b,e[21]=h,e[22]=w,e[23]=j):j=e[23];let C;e[24]!==n||e[25]!==l||e[26]!==i.applicationId||e[27]!==c?(C=n("guestSpotApplication",{personId:c,handle:l,applicationId:i.applicationId}),e[24]=n,e[25]=l,e[26]=i.applicationId,e[27]=c,e[28]=C):C=e[28];let A;e[29]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(L,{variant:"label",size:"sm",children:"Review"}),e[29]=A):A=e[29];let I;e[30]!==C?(I=s.jsx(ae,{to:C,viewTransition:!0,className:"relative z-10 flex h-8 shrink-0 items-center rounded-full bg-ink-black/5 px-3 no-underline dark:bg-ink-white/10",children:A}),e[30]=C,e[31]=I):I=e[31];let U;e[32]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(W,{onClick:()=>f(!0),fullWidth:!0,size:"sm",children:"Confirm"}),e[32]=U):U=e[32];let y;e[33]!==I?(y=s.jsxs("div",{className:"flex w-full items-center gap-1",children:[I,U]}),e[33]=I,e[34]=y):y=e[34];let D;e[35]!==j||e[36]!==y?(D=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col items-start gap-4 pr-2",children:[j,y]}),e[35]=j,e[36]=y,e[37]=D):D=e[37];let N;e[38]!==D||e[39]!==p?(N=s.jsxs("div",{className:"flex items-center gap-5",children:[p,D]}),e[38]=D,e[39]=p,e[40]=N):N=e[40];let T;e[41]!==n||e[42]!==l||e[43]!==i.applicationId||e[44]!==c?(T=n("guestSpotApplication",{personId:c,handle:l,applicationId:i.applicationId}),e[41]=n,e[42]=l,e[43]=i.applicationId,e[44]=c,e[45]=T):T=e[45];let _;e[46]!==T?(_=s.jsx(ae,{to:T,viewTransition:!0,"aria-hidden":!0,tabIndex:-1,
1className:"absolute inset-0"}),e[46]=T,e[47]=_):_=e[47];let E;e[48]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(yt,{children:"Accept this guest spot?"}),e[48]=E):E=e[48];let P;e[49]!==u?(P=s.jsxs(Nt,{children:[E,s.jsxs(St,{className:"leading-snug",children:["This creates your guest book for ",u,", set to the proposed dates. It starts closed â open it when you are ready to take bookings."]})]}),e[49]=u,e[50]=P):P=e[50];let z;e[51]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(jt,{asChild:!0,children:s.jsx(W,{variant:"secondary",children:"Not yet"})}),e[51]=z):z=e[51];let R;e[52]!==m||e[53]!==i.id?(R=()=>m({agreementId:i.id}),e[52]=m,e[53]=i.id,e[54]=R):R=e[54];const G=r?"Acceptingâ¦":"Yes, accept";let $;e[55]!==r||e[56]!==R||e[57]!==G?($=s.jsxs(It,{children:[z,s.jsx(W,{disabled:r,onClick:R,children:G})]}),e[55]=r,e[56]=R,e[57]=G,e[58]=$):$=e[58];let O;e[59]!==P||e[60]!==$?(O=s.jsxs(Ot,{showClose:!1,children:[P,$]}),e[59]=P,e[60]=$,e[61]=O):O=e[61];let S;e[62]!==d||e[63]!==O?(S=s.jsx(Ct,{open:d,onOpenChange:f,children:O}),e[62]=d,e[63]=O,e[64]=S):S=e[64];let B;return e[65]!==N||e[66]!==_||e[67]!==S?(B=s.jsxs("div",{className:"relative overflow-hidden rounded-3xl bg-ink-paper p-3 dark:bg-ink-black-900",children:[g,N,_,S]}),e[65]=N,e[66]=_,e[67]=S,e[68]=B):B=e[68],B}function Gt(t){Ke({title:"Unable to accept this guest spot. Try again.",description:t.message,variant:"error"})}function Se(t){const e=F.c(10),{imageUrl:i,startsOn:c,className:l}=t;let o;e[0]!==l?(o=M("relative h-30 w-36 shrink-0 overflow-hidden rounded-2xl",l),e[0]=l,e[1]=o):o=e[1];let n;e[2]!==i?(n=i?s.jsx("img",{src:i,alt:"",className:"absolute inset-0 size-full object-cover"}):s.jsx("div",{className:"flex size-full items-center justify-center",children:s.jsx(wt,{className:"size-6 text-ink-black/20 dark:text-ink-white/20"})}),e[2]=i,e[3]=n):n=e[3];let d;e[4]!==c?(d=s.jsx(pt,{plainDate:c,className:"absolute left-3.5 top-3.5 z-10"}),e[4]=c,e[5]=d):d=e[5];let f;return e[6]!==o||e[7]!==n||e[8]!==d?(f=s.jsxs("div",{className:o,children:[n,d]}),e[6]=o,e[7]=n,e[8]=d,e[9]=f):f=e[9],f}function Rt(t){const e=F.c(33),{application:i,personId:c,handle:l}=t,o=ne(),n=Le();let d;e[0]!==i?(d=oe(i),e[0]=i,e[1]=d):d=e[1];const f=d;let a;e[2]!==i.id||e[3]!==o||e[4]!==l||e[5]!==n||e[6]!==c?(a=()=>n(o("guestSpotApplication",{personId:c,handle:l,applicationId:i.id}),{viewTransition:!0}),e[2]=i.id,e[3]=o,e[4]=l,e[5]=n,e[6]=c,e[7]=a):a=e[7];let m;e[8]!==i.advertisedStartsOn||e[9]!==i.studioImageUrl?(m=s.jsx(Se,{imageUrl:i.studioImageUrl,startsOn:i.advertisedStartsOn,className:"bg-ink-paper dark:bg-ink-black-800"}),e[8]=i.advertisedStartsOn,e[9]=i.studioImageUrl,e[10]=m):m=e[10];let r;e[11]!==f?(r=s.jsx(J,{size:"xl",className:"w-full truncate",children:f}),e[11]=f,e[12]=r):r=e[12];let x;e[13]!==i.advertisedEndsOn||e[14]!==i.advertisedStartsOn?(x=Ve(i.advertisedStartsOn,i.advertisedEndsOn),e[13]=i.advertisedEndsOn,e[14]=i.advertisedStartsOn,e[15]=x):x=e[15];let u;e[16]!==x?(u=s.jsx(L,{variant:"body",size:"sm",inactive:!0,className:"w-full truncate",children:x}),e[16]=x,e[17]=u):u=e[17];let g;e[18]!==i.createdAt?(g=Fe(i.createdAt,$e(),"Applied"),e[18]=i.createdAt,e[19]=g):g=e[19];let p;e[20]!==g?(p=s.jsx(L,{variant:"label",size:"xs",inactive:!0,children:g}),e[20]=g,e[21]=p):p=e[21];let b;e[22]!==r||e[23]!==u||e[24]!==p?(b=s.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-2",children:[r,u,p]}),e[22]=r,e[23]=u,e[24]=p,e[25]=b):b=e[25];let v;e[26]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs("div",{className:"flex h-[18px] items-center gap-1 rounded-full bg-ink-black/5 pl-1.5 pr-2 dark:bg-ink-white/10",children:[s.jsx("span",{className:"size-1.5 shrink-0 rounded-full bg-[#FFA008]","aria-hidden":!0}),s.jsx(L,{variant:"label",size:"xs",inactive:!0,children:"In review"})]}),e[26]=v):v=e[26];let h;e[27]!==b?(h=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col items-start gap-4",children:[b,v]}),e[27]=b,e[28]=h):h=e[28];let k;return e[29]!==h||e[30]!==a||e[31]!==m?(k=s.jsxs("button",{type:"button",className:"flex w-full items-center gap-5 text-left",onClick:a,children:[m,h]}),e[29]=h,e[30]=a,e[31]=m,e[32]=k):k=e[32],k}function Mt(t){const e=F.c(30),{studio:i,studioImageUrl:c,startsOn:l,endsOn:o,applicationId:n,personId:d,handle:f,status:a}=t,m=ne(),r=Le();let x;e[0]!==n||e[1]!==m||e[2]!==f||e[3]!==r||e[4]!==d?(x=()=>r(m("guestSpotApplication",{personId:d,handle:f,applicationId:n}),{viewTransition:!0}),e[0]=n,e[1]=m,e[2]=f,e[3]=r,e[4]=d,e[5]=x):x=e[5];let u;e[6]!==l||e[7]!==c?(u=s.jsx(Se,{imageUrl:c,startsOn:l,className:"bg-ink-
1paper dark:bg-ink-black-800"}),e[6]=l,e[7]=c,e[8]=u):u=e[8];let g;e[9]!==i?(g=oe(i),e[9]=i,e[10]=g):g=e[10];let p;e[11]!==g?(p=s.jsx(J,{size:"xl",className:"w-full truncate",children:g}),e[11]=g,e[12]=p):p=e[12];let b;e[13]!==o||e[14]!==l?(b=Ve(l,o),e[13]=o,e[14]=l,e[15]=b):b=e[15];let v;e[16]!==b?(v=s.jsx(L,{variant:"body",size:"sm",inactive:!0,className:"w-full truncate",children:b}),e[16]=b,e[17]=v):v=e[17];let h;e[18]!==p||e[19]!==v?(h=s.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-2",children:[p,v]}),e[18]=p,e[19]=v,e[20]=h):h=e[20];let k;e[21]!==a?(k=a==="not-selected"?s.jsx("div",{className:"flex h-[18px] items-center rounded-full bg-ink-black/5 px-2 dark:bg-ink-white/10",children:s.jsx(L,{variant:"label",size:"xs",inactive:!0,children:"Not selected"})}):s.jsxs("div",{className:"flex h-[18px] items-center gap-1 rounded-full bg-ink-black pl-1.5 pr-2 dark:bg-ink-white",children:[s.jsx(ft,{size:10,className:"shrink-0 text-ink-white dark:text-ink-black"}),s.jsx(L,{variant:"label",size:"xs",className:"text-ink-white dark:text-ink-black",children:a==="completed"?"Completed":"Archived"})]}),e[21]=a,e[22]=k):k=e[22];let w;e[23]!==h||e[24]!==k?(w=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col items-start gap-4",children:[h,k]}),e[23]=h,e[24]=k,e[25]=w):w=e[25];let j;return e[26]!==x||e[27]!==u||e[28]!==w?(j=s.jsxs("button",{type:"button",className:"flex w-full items-center gap-5 text-left",onClick:x,children:[u,w]}),e[26]=x,e[27]=u,e[28]=w,e[29]=j):j=e[29],j}function we(t){const e=F.c(4),{title:i,description:c,children:l}=t;let o;return e[0]!==l||e[1]!==c||e[2]!==i?(o=s.jsx("div",{className:"pt-16",children:s.jsx(ye,{centered:!1,icon:Ee,title:i,description:c,children:l})}),e[0]=l,e[1]=c,e[2]=i,e[3]=o):o=e[3],o}const He=[{key:"pending",label:"Pending"},{key:"upcoming",label:"Upcoming"},{key:"past",label:"Past"}];function Bt(t){const e=F.c(13),{label:i,count:c,active:l,onClick:o}=t,n=l?"border-ink-black dark:border-ink-white":"border-transparent";let d;e[0]!==n?(d=M("flex h-12 items-center gap-1.5 border-b-[1.5px] pb-0.5",n),e[0]=n,e[1]=d):d=e[1];const f=l?"text-ink-black dark:text-ink-white":"text-ink-black/60 dark:text-ink-white/60";let a;e[2]!==i||e[3]!==f?(a=s.jsx(L,{variant:"label",size:"base",className:f,children:i}),e[2]=i,e[3]=f,e[4]=a):a=e[4];let m;e[5]!==l||e[6]!==c?(m=c>0?s.jsx("span",{className:M("flex size-4 items-center justify-center rounded-full",l?"bg-ink-black dark:bg-ink-white":"bg-ink-black/5 dark:bg-ink-white/10"),children:s.jsx(L,{variant:"label",size:"xs",className:l?"text-ink-white dark:text-ink-black":"text-ink-black/30 dark:text-ink-white/30",children:c})}):null,e[5]=l,e[6]=c,e[7]=m):m=e[7];let r;return e[8]!==o||e[9]!==d||e[10]!==a||e[11]!==m?(r=s.jsxs("button",{type:"button",onClick:o,className:d,children:[a,m]}),e[8]=o,e[9]=d,e[10]=a,e[11]=m,e[12]=r):r=e[12],r}function Ht(){const t=F.c(37),{personId:e,handle:i}=Ne(),[c,l]=Qe(rt,"pending");let o;t[0]!==c?(o=He.find(I=>I.key===c)?.key??"pending",t[0]=c,t[1]=o):o=t[1];const n=o,d=!!e;let f;t[2]!==d?(f={enabled:d},t[2]=d,t[3]=f):f=t[3];const{data:a,isLoading:m,error:r,refetch:x}=H.getGuestSpots.useQuery(e??"",f);if(!e||m){let I;return t[4]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(De,{}),t[4]=I):I=t[4],I}let u,g,p,b,v,h,k;if(t[5]!==n||t[6]!==a||t[7]!==r||t[8]!==i||t[9]!==e||t[10]!==x||t[11]!==l){const I=ct(new Date),U=a?.spots??[],y=a?.applications??[],D=U.filter(qt),N=y.filter(Kt),T=U.filter(Vt),_=T.filter(O=>!Re(O.proposedEndsOn,I)),E=T.filter(O=>Re(O.proposedEndsOn,I)),P=y.filter(Yt),z={pending:D.length+N.length,upcoming:_.length,past:E.length+P.length},R=()=>{if(n==="pending")return z.pending===0?s.jsx(we,{title:"Nothing pending",description:"Your applications and offers will show up here."}):s.jsxs("div",{className:"flex flex-col gap-8",children:[D.length>0?s.jsx("div",{className:"flex flex-col gap-5",children:D.map(S=>s.jsx(Ft,{offer:S,personId:e,handle:i},S.id))}):null,N.length>0?s.jsx("div",{className:"flex flex-col gap-5",children:N.map(S=>s.jsx(Rt,{application:S,personId:e,handle:i},S.id))}):null]});if(n==="upcoming")return _.length===0?s.jsx(we,{title:"No upcoming guest spots",description:"Spots you've confirmed will show up here."}):s.jsx("div",{className:"flex flex-col gap-5",children:_.map(S=>s.jsx(Lt,{spot:S,personId:e,handle:i},S.id))});if(z.past===0)return s.jsx(we,{title:"No past guest spots",description:"Completed and archived spots will show up here."});const O=[...E.map(Jt),...P.map(Qt)].sort(Wt);return s.jsx("div",{className:"flex flex-col gap-5",children:O.map(S=>s.jsx(Mt,{studio:S.studio,studioImageUrl:S.studioImageUrl,startsOn:S.startsOn,endsOn:S.endsOn,applicationId:S.applicationId,personId:e,handle:i,status:S.status},S.key))})};t[19]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(qe,{children:s.jsx("title",{children:"Guest spots"})}),t[19]=k):k=t[19],g=Ye,h="px-0",u=Je;let G;t[20]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx("div",{className:"flex items-center px-5 py-4",children:s.jsx(J,{size:"2xl",children:"Guest Spots"})}),t[20]=G):G=t[20];const $=He.map(O=>s.jsx(Bt,{label:O.label,count:z[O.key],active:n===O.key,onClick:()=>l(O.key)},O.key));
1t[21]!==$?(v=s.jsx("div",{className:"bg-ink-paper dark:bg-ink-black-900",children:s.jsxs("div",{className:"mx-auto w-full max-w-screen-xs",children:[G,s.jsx("div",{className:"flex items-center gap-5 border-b border-ink-black/10 px-5 dark:border-ink-white/10",children:$})]})}),t[21]=$,t[22]=v):v=t[22],p="mx-auto w-full max-w-screen-xs px-4 py-6",b=r||!a?s.jsx(we,{title:"Unable to load guest spots",description:"Please try again.",children:s.jsx(W,{variant:"secondary",size:"sm",onClick:()=>{x()},children:"Try again"})}):R(),t[5]=n,t[6]=a,t[7]=r,t[8]=i,t[9]=e,t[10]=x,t[11]=l,t[12]=u,t[13]=g,t[14]=p,t[15]=b,t[16]=v,t[17]=h,t[18]=k}else u=t[12],g=t[13],p=t[14],b=t[15],v=t[16],h=t[17],k=t[18];let w;t[23]!==p||t[24]!==b?(w=s.jsx("div",{className:p,children:b}),t[23]=p,t[24]=b,t[25]=w):w=t[25];let j;t[26]!==u||t[27]!==v||t[28]!==w?(j=s.jsx(u,{headerSlot:v,children:w}),t[26]=u,t[27]=v,t[28]=w,t[29]=j):j=t[29];let C;t[30]!==g||t[31]!==h||t[32]!==j?(C=s.jsx(g,{className:h,children:j}),t[30]=g,t[31]=h,t[32]=j,t[33]=C):C=t[33];let A;return t[34]!==C||t[35]!==k?(A=s.jsxs(s.Fragment,{children:[k,C]}),t[34]=C,t[35]=k,t[36]=A):A=t[36],A}function Wt(t,e){return(e.endsOn??"").localeCompare(t.endsOn??"")}function Qt(t){return{key:t.id,studio:t,studioImageUrl:t.studioImageUrl,startsOn:t.advertisedStartsOn,endsOn:t.advertisedEndsOn,applicationId:t.id,status:t.hasAnyAgreement?"archived":"not-selected"}}function Jt(t){return{key:t.id,studio:t,studioImageUrl:t.studioImageUrl,startsOn:t.proposedStartsOn,endsOn:t.proposedEndsOn,applicationId:t.applicationId,status:"completed"}}function Yt(t){return t.isArchived}function Vt(t){return t.isAccepted}function Kt(t){return!t.isArchived}function qt(t){return!t.isAccepted}function os(){const t=F.c(9),{personId:e,isLoading:i}=Ne(),{isEnabled:c,isLoading:l}=ut("guest-marketplace-preview",e),o=!!e;let n;t[0]!==o?(n={enabled:o},t[0]=o,t[1]=n):n=t[1];const{data:d,isLoading:f}=H.getPersonSettings.useQuery(e??"",n),a=!!d?.isStudioManager,m=!l&&!f&&!c&&!a;let r;t[2]!==m?(r={enabled:m},t[2]=m,t[3]=r):r=t[3];const{hasActivity:x,isLoading:u}=mt(e,r);if(i||l||f||u){let p;return t[4]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(De,{code:xt.featureFlagEnabled_isLoading}),t[4]=p):p=t[4],p}if(a){if(!c){let b;return t[5]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Me,{code:Be.featureFlagNotEnabled}),t[5]=b):b=t[5],b}let p;return t[6]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Dt,{}),t[6]=p):p=t[6],p}if(!c&&!x){let p;return t[7]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Me,{code:Be.featureFlagNotEnabled}),t[7]=p):p=t[7],p}let g;return t[8]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Ht,{}),t[8]=g):g=t[8],g}export{os as default}; 2 3//# chunkId=23de858c-5381-569a-a687-78c89dbc245e
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.