PageSourceSearch

https://performrgo.com/assets/DirectoryManagePage.Cu1_zNoe.js

js performrgo.com collected 2026-10-05 22:48:24 UTC 33,027 bytes, 1 lines download raw bytes

1import{X as Lt,d as a,Y as $t,j as t,e as k,v as Rt,A as v,T as i,h as p,B as h,R as b,Z as Dt,t as j,Q as A,a9 as Pt,at as Ft,a1 as Me,a2 as Te,V as Ne,cI as rt,a5 as Bt,D as ue,o as he,f as me,k as pe,_ as zt}from"./index.BdFycjDt.js";import{C as Gt}from"./ContentCopy.CVfQpnpS.js";import{U as ot}from"./UploadFile.Bh9qsMZ7.js";import{i as m}from"./industryDirectoryApi.BlQ8w1HI.js";import{G as lt}from"./Grid.DiRnEHfS.js";import{C as z}from"./Card.y4fRYbDG.js";import{C as G}from"./CardContent.BGaAZbjQ.js";import{T as Ot,a as ge}from"./Tabs.CJggTe4U.js";import{D as Ut}from"./Divider.kxa6B8uw.js";import{S as Yt}from"./Switch.ByUbcwKo.js";import{L as ct}from"./LinearProgress.B-V9CFME.js";import"./KeyboardArrowRight.BLvVExjl.js";const Vt={"sag-aftra":"SAG-AFTRA","sag aftra":"SAG-AFTRA",sag:"SAG-AFTRA",aftra:"SAG-AFTRA",aea:"AEA","actors equity":"AEA","actors' equity":"AEA",equity:"AEA",agma:"AGMA",agva:"AGVA",iatse:"IATSE",afm:"AFM",sdc:"SDC","usa 829":"USA 829","united scenic artists":"USA 829",none:"Non-union","non-union":"Non-union",nonunion:"Non-union","non union":"Non-union","n/a":"Non-union",dga:"DGA","directors guild of america":"DGA","dramatists guild":"DGA",wga:"WGA",csa:"CSA",pga:"PGA","producers guild of america":"PGA"},dt={actor:"actor",actress:"actor",performer:"actor",singer:"singer",vocalist:"singer","singer vocalist":"singer",dancer:"dancer","musical theatre":"musical_theatre","musical theater":"musical_theatre",musician:"musician","musician reads music plays instrument":"musician","pit musician":"musician",puppeteer:"puppeteer","puppet maker":"puppeteer",director:"director","assistant director":"assistant_director","casting director":"casting_director",choreographer:"choreographer",conductor:"conductor","costume designer":"costume_designer",dramaturg:"dramaturg","fight director":"fight_director","fight choreographer":"fight_director","intimacy director":"intimacy_director","intimacy coordinator":"intimacy_director","lighting designer":"lighting_designer","music director":"music_director","musical director":"music_director","projection designer":"projection_designer","props designer":"props_designer","prop designer":"props_designer","scenic artist":"scenic_artist","scenic designer":"set_designer","set designer":"set_designer","sound designer":"sound_designer",accessibility:"accessibility",captioning:"accessibility",administrator:"administrator",administration:"administrator","artistic director":"artistic_director","box office":"box_office","house manager":"house_manager",marketing:"marketing",publicity:"marketing",photographer:"photographer",producer:"producer","teaching artist":"teaching_artist",videographer:"videographer","assistant stage manager":"asm",asm:"asm","dance captain":"dance_captain","production manager":"production_manager","stage manager":"stage_manager","stage manager stage supervisor":"stage_manager","stage supervisor":"stage_manager","backstage crew":"backstage_crew","running crew":"backstage_crew","stage running crew":"backstage_crew","stage crew":"backstage_crew",carpenter:"carpenter","scenic carpenter":"carpenter",flyman:"flyman","light board operator":"light_operator","lighting technician":"light_operator","lighting tech":"light_operator","load in strike crew":"load_in_crew","master electrician":"master_electrician","projection operator":"projection_operator","props master":"props_master","prop master":"props_master",rigger:"rigger","sound board operator":"sound_operator","sound technician":"sound_operator","sound tech":"sound_operator","technical director":"technical_director",welder:"welder","costume crew":"costume_crew","costume crew maintenance":"costume_crew",wardrobe:"costume_crew","wardrobe management":"costume_crew",draper:"draper",dresser:"dresser","makeup artist":"makeup_artist","make up artist":"makeup_artist",stitcher:"stitcher","costume maker":"stitcher","wig maker":"wig_maker"},K=r=>r.toLowerCase().normalize("NFKD").replace(/[̀-ͯ]/g,"").replace(/[^a-z0-9$]+/g," ").trim();function xe(r){const n=(r??"").toString(),o=[];let c=0,y="";for(const u of n)u==="("&&(c+=1),u===")"&&(c=Math.max(0,c-1)),(u===","||u===";"||u==="|")&&c===0?(o.push(y),y=""):y+=u;return o.push(y),o.map(u=>
1u.replace(/\s+/g," ").trim()).filter(Boolean)}const Ht={first_name:["first name","first","given name","firstname"],last_name:["last name","last","surname","family name","lastname"],full_name:["name","full name","member name"],email:["email","e-mail","email address","e mail"],phone:["phone","phone number","mobile","cell","telephone"],pronouns:["pronouns","pronoun"],website:["website","web site","url","site","portfolio"],city:["city","address 1 city","address city","town"],state:["state","region","address 1 region","address region","province"],unions:["unions","union","union status","union affiliation","union affiliations"],works_as:["works as","work as","crafts","craft","roles","role","job","jobs","area of work","areas of work","discipline","disciplines"],languages:["languages","language","languages spoken"],why_join:["why join","why did you join","reason for joining","membership type","member type","communities i am part of"],photo:["photo","headshot","photo url"],resume:["resume","resume url","cv"]};function Kt(r){const n=K(r);for(const[o,c]of Object.entries(Ht))if(c.includes(n))return o;return null}function qt(r,n){const o=K(r);if(!o)return null;if(dt[o])return dt[o];const c=n.find(u=>K(u.label)===o||u.key===o.replace(/ /g,"_"));return c?c.key:n.find(u=>u.label.split("/").some(L=>K(L)===o))?.key??null}function Qt(r){const n=K(r).replace(/\s*\(.*$/,"").trim();return Vt[n]??r.replace(/\s*\(.*\)\s*$/,"").trim()}function Xt(r,n){return!(r.map(K).includes("industry")||n.length)}function Jt(r,n){const[o=[],...c]=r,y=o.map(_=>(_??"").toString().trim()),u=y.map(Kt),L=y.filter((_,d)=>_&&!u[d]),M=new Map;let te=0,q=0;for(const _ of c){const d={},O={};y.forEach((g,W)=>{const R=(_[W]??"").toString().replace(/\s+/g," ").trim();if(!g||!R)return;O[g]=R;const D=u[W];D&&(d[D]=d[D]?`${d[D]}, ${R}`:R)});const S=(d.email??"").toLowerCase();let U=d.first_name??"",Y=d.last_name??"";if(!U&&!Y&&d.full_name){const g=d.full_name.split(" ");U=g[0]??"",Y=g.slice(1).join(" ")}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(S)||!(U||Y)){te+=1;continue}const V=xe(d.works_as),Q=xe(d.why_join),f=[...new Set(xe(d.unions).map(Qt).filter(Boolean))],ne=[...new Set(V.map(g=>qt(g,n)).filter(g=>!!g))],X=[...new Set(xe(d.languages).map(g=>g.replace(/^\w/,W=>W.toUpperCase())))],se=[V.join(", "),X.join(", "),...L.map(g=>O[g]).filter(Boolean),Q.join(", ")].filter(Boolean),E={email:S,first_name:U,last_name:Y,phone:d.phone?en(d.phone):null,pronouns:d.pronouns?d.pronouns.toLowerCase().replace(/\s*\/\s*/g,"/").replace(/^\w/,g=>g.toUpperCase()):null,website:d.website?tn(d.website):null,city:d.city||null,state:d.state||null,unions:f,crafts:ne,languages:X,kind:Xt(Q,V)?"audience":"industry",join_answers:O,search_text:se.join(" · ")},C=M.get(S);if(!C){M.set(S,E);continue}q+=1,M.set(S,Zt(C,E))}const $=[...M.values()];return{rows:$,skipped:te,merged:q,industry:$.filter(_=>_.kind==="industry").length,audience:$.filter(_=>_.kind==="audience").length,otherHeaders:L}}function Zt(r,n){const o=(c,y)=>[...new Set([...c,...y])];return{...r,phone:r.phone??n.phone,pronouns:r.pronouns??n.pronouns,website:r.website??n.website,city:r.city??n.city,state:r.state??n.state,unions:o(r.unions,n.unions),crafts:o(r.crafts,n.crafts),languages:o(r.languages,n.languages),kind:r.kind==="industry"||n.kind==="industry"?"industry":"audience",join_answers:{...n.join_answers,...r.join_answers},search_text:[r.search_text,n.search_text].filter(Boolean).join(" · ")}}function en(r){const n=r.replace(/\D/g,""),o=n.length===11&&n.startsWith("1")?n.slice(1):n;return o.length===10?`(${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6)}`:r.trim()}function tn(r){const n=r.trim();return n&&(/^https?:\/\//i.test(n)?n:`https://${n}`)}async function nn(r){const n=await zt(()=>import("./xlsx.CKwrMZHi.js"),[]),o=n.read(await r.arrayBuffer(),{type:"array",raw:!1}),c=o.Sheets[o.SheetNames[0]];return c?n.utils.sheet_to_json(c,{header:1,defval:"",raw:!1,blankrows:!1}):[]}const sn={industry:"Industry",audience:"Audience"},an=["Non-union","AEA","SAG-AFTRA","AGMA","AGVA","USA 829","IATSE","SDC","AFM"];function yn(){const{slug:r=""}
1=Lt(),[n,o]=a.useState(null),[c,y]=a.useState(null),[u,L]=a.useState([]),[M,te]=a.useState([]),[q,$]=a.useState([]),[_,d]=$t(),O=["members","producers","auditions","email"],S=Math.max(0,O.indexOf(_.get("tab"))),U=e=>d(s=>{const l=new URLSearchParams(s);return e>0?l.set("tab",O[e]):l.delete("tab"),l}),[Y,V]=a.useState(!0),[Q,f]=a.useState(null),[ne,X]=a.useState(null),[se,E]=a.useState(null),[C,g]=a.useState(null),[W,R]=a.useState(!1),[D,ut]=a.useState("director"),[Le,ht]=a.useState({}),[mt,ae]=a.useState(!1),[fe,$e]=a.useState(""),[Re,De]=a.useState(""),[Pe,Fe]=a.useState(""),[pt,ie]=a.useState(!1),[ye,Be]=a.useState(""),[ze,Ge]=a.useState(""),[ve,Oe]=a.useState(""),[J,Ue]=a.useState(""),[be,Ye]=a.useState(!1),[je,gt]=a.useState([]),[P,Ve]=a.useState([]),[F,He]=a.useState([]),[re,Ke]=a.useState(""),[oe,qe]=a.useState(""),[T,we]=a.useState(null),[xt,Z]=a.useState(!1),[H,Qe]=a.useState(!1),[Xe,Je]=a.useState([]),[le,ft]=a.useState(""),[Ze,yt]=a.useState(""),_e=300,Se=Ze.trim().toLowerCase(),ke=(Se?u.filter(e=>(e.profile?.stage_name??"").toLowerCase().includes(Se)||(e.profile?.contact_email??"").toLowerCase().includes(Se)):u).slice(0,_e),[vt,Ae]=a.useState(!1),[et,tt]=a.useState(null),[x,Ce]=a.useState(null),[nt,st]=a.useState(!1),[w,ce]=a.useState(null),[I,Ie]=a.useState(null),[at,ee]=a.useState(null),N=a.useCallback(async()=>{V(!0);try{const e=await m.getDirectoryBySlug(r);if(o(e),!e)return;const[s,l,B,We,Tt,Nt]=await Promise.all([m.stats(e.id),m.listMembers(e.id),m.listReaders(e.id),m.listAuditions(e.id),m.listCrafts(),m.listMailings(e.id)]);y(s),L(l),te(B),$(We),gt(Tt),Je(Nt),Ue(e.invite_note??"")}catch(e){f(e?.message??"Could not open this directory.")}finally{V(!1)}},[r]);a.useEffect(()=>{N()},[N]),a.useEffect(()=>{if(!n)return;let e=!0;return we(null),m.mailingAudienceCount(n.id,P,F,le).then(s=>{e&&we(s)}).catch(()=>{e&&we(null)}),()=>{e=!1}},[n,P,F,le]);const de=e=>je.find(s=>s.key===e)?.label??e.replace(/_/g," "),bt=je.reduce((e,s)=>(e.set(s.category,[...e.get(s.category)??[],s]),e),new Map),jt=async()=>{if(!(!n||be)){Ye(!0),f(null);try{const e=await m.saveDirectory({id:n.id,invite_note:J.trim()||null});o(e),E("Saved. Every invitation from now on carries your note.")}catch(e){f(e instanceof Error?e.message:"Your note did not save.")}finally{Ye(!1)}}},wt=async()=>{if(!(!n||H)){Qe(!0),f(null);try{const{sent:e,suppressed:s}=await m.sendMailing(n.id,re.trim(),oe,P,F,le);Z(!1),Ke(""),qe(""),E(`Sent to ${e} ${e===1?"member":"members"}.${s>0?` ${s} ${s===1?"person has":"people have"} opted out of email and did not get it.`:""}`),Je(await m.listMailings(n.id))}catch(e){Z(!1),f(e instanceof Error?e.message:"That email did not send.")}finally{Qe(!1)}}},_t=()=>{tt(null),Ce(null),Ie(null),ee(null),ce(null),Ae(!0)},St=async e=>{if(e){st(!0),ee(null),Ce(null),Ie(null);try{const s=await nn(e);if(s.length<2)throw new Error("That file has no rows under its headers.");tt(e.name),Ce(Jt(s,je))}catch(s){ee(s instanceof Error?s.message:"That file could not be read.")}finally{st(!1)}}},kt=async()=>{if(!(!n||!x||w)){ee(null),ce({done:0,total:x.rows.length});try{const e=await m.importMembers(n.id,x.rows,(B,We)=>ce({done:B,total:We}));Ie(e);const[s,l]=await Promise.all([m.stats(n.id),m.listMembers(n.id)]);y(s),L(l)}catch(e){ee(e instanceof Error?e.message:"The import stopped partway. Upload the same file again; nobody is entered twice.")}finally{ce(null)}}},it=async(e,s)=>{X(e),f(null);try{await m.setMemberStatus(e,s),await N()}catch(l){f(l instanceof Error?l.message:"That membership did not change.")}finally{X(null)}},At=async()=>{if(!(!n||W)){R(!0),f(null);try{const{active:e}=await m.inviteReader(n.id,fe,Re,Pe,D);ae(!1),$e(""),De(""),Fe(""),E(e?"Invited, and emailed. They already had an account, so they are on the list now.":"Invited, and emailed. They are on the list the moment they sign in with that address, with no password for you to hand over."),await N()}catch(e){f(e?.message??"That invitation did not send."),await N()}finally{R(!1)}}},Ct=async e=>{if(!C){g(e.id),f(null);try{await m.resumeReader(e.id),E(`${e.display_name||e.email} can search again. The hour starts over for them.`),await N()}catch(s){f(s instanceof Error?s.message:"That reader was not resumed.")}finally{g(null)}}},Ee=async(e,s)=>{if(!C){g(e.id),f(null);try{await m.reviewReader(e.id,s,Le[e.id]??e.access_role),await N()}catch(l){f(l instanceof Error?l.message:"That access change did n
1ot save.")}finally{g(null)}}},It=async()=>{if(n)try{const e=await m.saveAudition({directory_id:n.id,name:ye,venue:ze||null,status:"draft"});ve&&await m.addDay(e.id,ve),ie(!1),Be(""),Ge(""),Oe(""),await N()}catch(e){f(e?.message??"That audition did not save.")}},Et=async e=>{await m.saveAudition({id:e.id,notes_shared:!e.notes_shared}),$(s=>s.map(l=>l.id===e.id?{...l,notes_shared:!l.notes_shared}:l))},Wt=async(e,s)=>{await m.saveAudition({id:e.id,status:s}),$(l=>l.map(B=>B.id===e.id?{...B,status:s}:B))},Mt=async e=>{e&&(await navigator.clipboard.writeText(`${window.location.origin}/citywide/${e}`),E("Sign-up link copied. Put it anywhere: a poster, an email, a social post."))};return Y?t.jsx(k,{sx:{display:"flex",justifyContent:"center",py:8},children:t.jsx(Rt,{})}):n?t.jsxs(k,{sx:{maxWidth:1100,mx:"auto",px:{xs:2,md:0},py:{xs:2,md:4}},children:[t.jsx(i,{variant:"h2",sx:{mb:.5},children:n.name}),t.jsx(i,{color:"text.secondary",sx:{mb:3},children:[n.city,n.state].filter(Boolean).join(", ")||"Your town directory"}),Q?t.jsx(v,{severity:"error",sx:{mb:2},onClose:()=>f(null),children:Q}):null,se?t.jsx(v,{severity:"success",sx:{mb:2},onClose:()=>E(null),children:se}):null,c?t.jsx(lt,{container:!0,spacing:2,sx:{mb:3},children:[{label:"Listed Now",value:c.listed_now},{label:"On The Email List",value:c.members_active},{label:"Audience Only",value:c.members_audience??0},{label:"Waiting On You",value:c.members_pending+(c.readers_pending??0)},{label:"Producers With Access",value:c.readers_active},{label:"Cannot Be Listed Yet",value:c.awaiting_age}].map(e=>t.jsx(lt,{item:!0,xs:6,md:2,children:t.jsx(z,{variant:"outlined",children:t.jsxs(G,{children:[t.jsx(i,{variant:"overline",color:"text.secondary",children:e.label}),t.jsx(i,{variant:"h4",children:e.value})]})})},e.label))}):null,c&&c.awaiting_age>0?t.jsxs(v,{severity:"info",sx:{mb:3},children:[c.awaiting_age," ",c.awaiting_age===1?"member has":"members have"," not told us their year of birth, so they stay off the list. Nobody appears in a searchable directory until we know they are an adult."]}):null,t.jsxs(Ot,{value:S,onChange:(e,s)=>U(s),variant:"scrollable",scrollButtons:"auto",allowScrollButtonsMobile:!0,sx:{mb:2},children:[t.jsx(ge,{label:`Members (${u.length})`}),t.jsx(ge,{label:`Producers (${M.length})`}),t.jsx(ge,{label:`Auditions (${q.length})`}),t.jsx(ge,{label:"Email Members"})]}),S===0?t.jsxs(p,{spacing:1,children:[t.jsxs(k,{sx:{display:"flex",gap:1,flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(i,{color:"text.secondary",sx:{flex:"1 1 320px"},children:"Your membership list, as it stands. Upload your list any time: each person is matched by email, so nobody is entered twice and a newer export only adds and updates."}),t.jsx(h,{variant:"contained",startIcon:t.jsx(ot,{}),onClick:_t,sx:{textTransform:"none"},children:"Import Members"})]}),u.length>20?t.jsx(b,{size:"small",label:"Find A Member",placeholder:"Name or email",value:Ze,onChange:e=>yt(e.target.value),sx:{maxWidth:360}}):null,u.length===0?t.jsx(v,{severity:"info",children:"Nobody is on the list yet. Import your membership spreadsheet, or wait for people to ask to join."}):ke.length===0?t.jsx(v,{severity:"info",children:"Nobody on the list matches that."}):ke.map(e=>t.jsx(z,{variant:"outlined",children:t.jsxs(G,{sx:{display:"flex",gap:2,alignItems:"center",py:1.5},children:[t.jsx(Dt,{src:e.profile?.headshot_url??void 0,sx:{width:48,height:48},children:(e.profile?.stage_name??"?").slice(0,1)}),t.jsxs(k,{sx:{flex:1,minWidth:0},children:[t.jsx(i,{variant:"subtitle1",children:e.profile?.stage_name??"Withdrawn member"}),t.jsxs(p,{direction:"row",spacing:.5,useFlexGap:!0,flexWrap:"wrap",sx:{mt:.5},children:[t.jsx(j,{size:"small",label:e.status}),e.member_kind==="audience"?t.jsx(j,{size:"small",color:"default",variant:"outlined",label:"Audience · email only"}):null,e.source==="import"&&e.profile&&!e.profile.claimed?t.jsx(j,{size:"small",variant:"outlined",label:"Imported · not yet claimed"}):null,(e.profile?.crafts??[]).slice(0,4).map(s=>t.jsx(j,{size:"small",variant:"outlined",label:s.replace(/_/g," ")},s))]})]}),t.jsx(p,{direction:"row",spacing:1,children:e.status==="pending"||e.status==="declined"?t.jsx(h,{size:"small",variant:"contained",disabled:ne!==null,onClick:()=>{it(e.id,"active")},children:"Approve"}):e.status==="active"?t.jsx(h,{size:"small",color:"inherit",disabled:ne!==null,onClick:()=>{it(e.id,"removed")},children:"Remove"}):null})]})},e.id)),ke.length===_e?t.jsxs(i,{variant:"caption",color:"text.secondary",children:["The first ",_e," are shown. Type a name or email to find anyone else."]}):null]}):null,S===1?t.jsxs(t.Fragment,{children:[t.jsx(h,{variant:"contained",sx:{mb:2},onClick:()=>ae(!0),children:"Invite A Producer"}),t.jsxs(i,{color:"text.secondary",sx:{mb:2},children:["Review each person and company before approving. Directors search performers. Producers search all professional categories. Nobody can download the list. A reader who looks at more than ",n.reader_hourly_ceiling??400," people in an hour is paused and you get an email."]}),t.jsx(z,{variant:"outlined",sx:{mb:2},children:t.jsxs(G,{children:[t.jsx(i,{variant:"subtitle1",sx:{mb:.5},children:"What your invitation says"}),t.jsxs(i,{variant:"body2",color:"text.secondary",sx:{mb:1.5},children:["Every producer you invite gets this email from ",n.name,". Your note goes in right after the greeting."]}),t.jsxs(k,{sx:{bgcolor:"action.hover",borderRadius:1,p:2,mb:2,fontSize:14,lineHeight:1.6},children:[t.jsxs(i,{variant:"body2",sx:{fontWeight:600,mb:1},children:["You have access to the ",n.name]}),t.jsx(i,{variant:"body2",sx:{mb:1},children:"Hi [first name],"}),J.trim()?t.jsx(i,{variant:"body2",sx:{mb:1,whiteSpace:"pre-line",fontStyle:"italic"},children:J.trim()}):null,t.jsxs(i,{variant:"body2",sx:{mb:1},children:[n.name," has added you [for company] to its directory of theatre professionals",[n.city,n.state].filter(
1Boolean).length?` in ${[n.city,n.state].filter(Boolean).join(", ")}`:"",". You can search it by the job somebody does, their union, and what they are open to being asked about. Your access covers performers, designers, stage managers, crew, wardrobe, and front of house."]}),t.jsx(i,{variant:"body2",sx:{mb:1},children:"There is no password to keep track of. Sign in with [their email] and you are in. Use that same address every time and it will always let you back."}),t.jsx(i,{variant:"body2",sx:{mb:1},children:"[Open the directory]"}),t.jsxs(i,{variant:"caption",color:"text.secondary",children:[n.name," decides who is listed here and who can read it. If you were not expecting this, you can ignore it and nothing happens."]})]}),t.jsx(b,{label:"Your Note",fullWidth:!0,multiline:!0,minRows:2,value:J,onChange:e=>Ue(e.target.value),inputProps:{maxLength:1500},helperText:"Optional. A sentence or two in your own voice; leave it empty to send the standard text."}),t.jsx(h,{variant:"outlined",sx:{mt:1.5},disabled:be||J.trim()===(n.invite_note??"").trim(),onClick:()=>{jt()},children:be?"Saving...":"Save Note"})]})}),M.length===0&&t.jsx(v,{severity:"info",children:"No producer or director applications have arrived."}),t.jsx(p,{spacing:1,children:M.map(e=>t.jsx(z,{variant:"outlined",children:t.jsx(G,{children:t.jsxs(p,{spacing:2,children:[t.jsxs(k,{sx:{overflowWrap:"anywhere"},children:[t.jsx(i,{variant:"subtitle1",children:e.display_name||e.email}),t.jsxs(i,{variant:"body2",children:[e.company_name," ",e.email]}),e.company_website&&t.jsx(i,{variant:"body2",children:e.company_website}),e.casting_details&&t.jsx(i,{sx:{mt:1,whiteSpace:"pre-wrap"},children:e.casting_details}),t.jsxs(p,{direction:"row",spacing:.5,useFlexGap:!0,flexWrap:"wrap",sx:{mt:1},children:[t.jsx(j,{size:"small",label:e.status}),e.paused_at?t.jsx(j,{size:"small",color:"warning",label:"Paused"}):null]}),e.paused_at?t.jsxs(v,{severity:"warning",sx:{mt:1},children:["Paused ",new Date(e.paused_at).toLocaleString(),". ",e.paused_reason," Their searches return nobody until you resume them."]}):null,e.status==="active"&&e.user_id?t.jsxs(i,{variant:"caption",display:"block",color:"text.secondary",sx:{mt:.75},children:[e.searches_7d?`${e.searches_7d} ${e.searches_7d===1?"search":"searches"} and ${e.people_7d??0} ${e.people_7d===1?"person":"people"} looked at in the last seven days.`:"No searches in the last seven days.",e.last_search_at?` Last search ${new Date(e.last_search_at).toLocaleString()}.`:""]}):null,e.reviewed_at&&t.jsxs(i,{variant:"caption",display:"block",children:["Last reviewed by ",e.reviewer_name||"the organizer"," on ",new Date(e.reviewed_at).toLocaleString(),"."]})]}),t.jsxs(b,{select:!0,label:"Approved Search Access",size:"small",fullWidth:!0,value:Le[e.id]??e.access_role,disabled:C!==null,onChange:s=>ht(l=>({...l,[e.id]:s.target.value})),children:[t.jsx(A,{value:"director",children:"Director: Performers"}),t.jsx(A,{value:"producer",children:"Producer: All Categories"})]}),t.jsxs(p,{direction:"row",spacing:1,useFlexGap:!0,flexWrap:"wrap",children:[e.paused_at?t.jsx(h,{variant:"contained",color:"warning",disabled:C!==null,onClick:()=>{Ct(e)},children:"Resume Access"}):null,t.jsx(h,{variant:e.paused_at?"outlined":"contained",disabled:C!==null,onClick:()=>{Ee(e,"active")},children:e.status==="active"||e.status==="invited"?"Save Access":e.status==="revoked"?"Restore Access":"Approve Access"}),e.status==="pending"&&t.jsx(h,{disabled:C!==null,onClick:()=>{Ee(e,"declined")},children:"Decline"}),(e.status==="active"||e.status==="invited")&&t.jsx(h,{disabled:C!==null,onClick:()=>{Ee(e,"revoked")},children:"Revoke Access"})]})]})})},e.id))})]}):null,S===2?t.jsxs(t.Fragment,{children:[t.jsx(h,{variant:"contained",sx:{mb:2},onClick:()=>ie(!0),children:"New Citywide Audition"}),t.jsx(p,{spacing:1.5,children:q.map(e=>t.jsx(z,{variant:"outlined",children:t.jsxs(G,{children:[t.jsxs(p,{direction:{xs:"column",md:"row"},spacing:2,justifyContent:"space-between",alignItems:{md:"center"},children:[t.jsxs(k,{children:[t.jsx(i,{variant:"h6",children:e.name}),t.jsx(i,{variant:"body2",color:"text.secondary",children:e.venue||"No venue set"})]}),t.jsxs(p,{direction:"row",spacing:1,alignItems:"center",children:[t.jsx(b,{select:!0,size:"small",value:e.status,sx:{minWidth:130},onChange:s=>{Wt(e,s.target.value)},children:["draft","open","running","closed"].map(s=>t.jsx(A,{value:s,children:s},s))}),t.jsx(h,{size:"small",startIcon:t.jsx(Gt,{}),onClick:()=>{Mt(e.public_token)},children:"Sign-Up Link"}),t.jsx(h,{size:"small",variant:"outlined",component:Pt,to:`/showcase/town/${r}/audition/${e.id}`,children:"Open The Room"})]})]}),t.jsx(Ut,{sx:{my:1.5}}),t.jsx(Ft,{control:t.jsx(Yt,{checked:e.notes_shared,onChange:()=>{Et(e)}}),label:"Let producers read each other's notes at this audition"}),t.jsx(i,{variant:"caption",color:"text.secondary",display:"block",children:"Off by default. Notes never leave this event and are never shown to a performer."})]})},e.id))})]}):null,S===3?t.jsxs(p,{spacing:2,children:[t.jsxs(i,{color:"text.secondary",children:["Write to the members who need to hear it. Leave every filter empty to reach everyone. The email comes from ",n.name," and replies come to you."]}),t.jsx(z,{variant:"outlined",children:t.jsx(G,{children:t.jsxs(p,{spacing:2,children:[t.jsxs(p,{direction:{xs:"column",md:"row"},spacing:2,children:[t.jsxs(Me,{sx:{minWidth:{md:200}},fullWidth:!0,children:[t.jsx(Te,{id:"mail-kind-label",children:"Who"}),t.jsxs(Ne,{labelId:"mail-kind-label",value:le,label:"Who",onChange:e=>ft(e.target.value),children:[t.jsx(A,{value:"",children:"Everyone on the list"}),t.jsx(A,{value:"industry",children:"Industry members"}),t.jsx(A,{value:"audience",children:"Audience members"})]})]}
1),t.jsxs(Me,{fullWidth:!0,children:[t.jsx(Te,{id:"mail-craft-label",children:"Area of Work"}),t.jsx(Ne,{labelId:"mail-craft-label",multiple:!0,value:P,onChange:e=>Ve(typeof e.target.value=="string"?[]:e.target.value),input:t.jsx(rt,{label:"Area of Work"}),renderValue:e=>e.map(de).join(", "),MenuProps:{PaperProps:{style:{maxHeight:420}}},children:[...bt.entries()].flatMap(([e,s])=>[t.jsx(A,{disabled:!0,sx:{opacity:1},children:t.jsx(i,{variant:"overline",color:"text.secondary",children:e})},e),...s.map(l=>t.jsx(A,{value:l.key,children:l.label},l.key))])})]}),t.jsxs(Me,{sx:{minWidth:{md:220}},fullWidth:!0,children:[t.jsx(Te,{id:"mail-union-label",children:"Union"}),t.jsx(Ne,{labelId:"mail-union-label",multiple:!0,value:F,onChange:e=>He(typeof e.target.value=="string"?[]:e.target.value),input:t.jsx(rt,{label:"Union"}),renderValue:e=>e.join(", "),children:an.map(e=>t.jsx(A,{value:e,children:e},e))})]})]}),t.jsxs(p,{direction:"row",spacing:.5,useFlexGap:!0,flexWrap:"wrap",alignItems:"center",children:[t.jsx(j,{size:"small",color:"primary",label:T===null?"Counting...":`${T} ${T===1?"member":"members"}`}),P.map(e=>t.jsx(j,{size:"small",variant:"outlined",label:de(e),onDelete:()=>Ve(s=>s.filter(l=>l!==e))},e)),F.map(e=>t.jsx(j,{size:"small",variant:"outlined",label:e,onDelete:()=>He(s=>s.filter(l=>l!==e))},e))]}),t.jsx(b,{label:"Subject",fullWidth:!0,required:!0,value:re,inputProps:{maxLength:200},onChange:e=>Ke(e.target.value)}),t.jsx(b,{label:"Message",fullWidth:!0,required:!0,multiline:!0,minRows:8,value:oe,inputProps:{maxLength:2e4},onChange:e=>qe(e.target.value),helperText:"Plain text. A blank line starts a new paragraph, and any link becomes clickable."}),t.jsx(i,{variant:"caption",color:"text.secondary",children:"Every copy ends with why the member is getting it, a link to change or leave their membership, and an unsubscribe link. Anyone who has unsubscribed from email is skipped."}),t.jsx(k,{children:t.jsxs(h,{variant:"contained",startIcon:t.jsx(Bt,{}),disabled:H||!re.trim()||!oe.trim()||!T,onClick:()=>Z(!0),children:["Send To ",T??0," ",T===1?"Member":"Members"]})})]})})}),t.jsx(i,{variant:"h6",sx:{mt:1},children:"Sent"}),Xe.length===0?t.jsx(v,{severity:"info",children:"Nothing has been sent from here yet."}):t.jsx(p,{spacing:1,children:Xe.map(e=>t.jsx(z,{variant:"outlined",children:t.jsxs(G,{sx:{py:1.5},children:[t.jsxs(p,{direction:{xs:"column",md:"row"},spacing:1,justifyContent:"space-between",alignItems:{md:"center"},children:[t.jsxs(k,{sx:{minWidth:0},children:[t.jsx(i,{variant:"subtitle1",sx:{lineHeight:1.3},children:e.subject}),t.jsxs(i,{variant:"body2",color:"text.secondary",children:[new Date(e.sent_at).toLocaleString()," · ",e.recipient_count," ",e.recipient_count===1?"member":"members",e.suppressed_count>0?` · ${e.suppressed_count} opted out`:""]})]}),t.jsxs(p,{direction:"row",spacing:.5,useFlexGap:!0,flexWrap:"wrap",children:[e.kind?t.jsx(j,{size:"small",label:`${sn[e.kind]} members`}):null,!e.kind&&e.crafts.length+e.unions.length===0?t.jsx(j,{size:"small",label:"Everyone"}):null,e.crafts.map(s=>t.jsx(j,{size:"small",variant:"outlined",label:de(s)},s)),e.unions.map(s=>t.jsx(j,{size:"small",variant:"outlined",label:s},s))]})]}),t.jsx(i,{variant:"body2",sx:{mt:1,whiteSpace:"pre-wrap",color:"text.secondary"},children:e.body.length>400?`${e.body.slice(0,400)}...`:e.body})]})},e.id))})]}):null,t.jsxs(ue,{open:vt,onClose:()=>{w||Ae(!1)},maxWidth:"sm",fullWidth:!0,disableScrollLock:!0,children:[t.jsx(he,{children:"Import Members"}),t.jsx(me,{children:t.jsxs(p,{spacing:2,sx:{pt:1},children:[t.jsx(i,{variant:"body2",color:"text.secondary",children:"A spreadsheet or CSV with one person per row and the column names in the first row. Name, email, phone, what they work as, unions, pronouns, languages, and why they joined are read by name; every other column is kept with the person and can be searched. A person who said Industry, or who told you what they work as, is an industry member. Everyone else is an audience member: on your email list, never in the directory."}),t.jsxs(h,{component:"label",variant:"outlined",startIcon:t.jsx(ot,{}),disabled:nt||!!w,sx:{alignSelf:"flex-start",textTransform:"none"},children:[et?"Choose A Different File":"Choose A File",t.jsx("input",{hidden:!0,type:"file",accept:".csv,.xlsx,.xls,.numbers,text/csv",onChange:e=>{St(e.target.files?.[0]??null)}})]}),nt?t.jsx(ct,{}):null,at?t.jsx(v,{severity:"error",children:at}):null,x&&!I?t.jsxs(v,{severity:"info",icon:!1,children:[t.jsx(i,{variant:"body2",children:t.jsx("strong",{children:et})}),t.jsxs(i,{variant:"body2",children:[x.rows.length," people: ",x.industry," industry, ",x.audience," audience.",x.merged>0?` ${x.merged} ${x.merged===1?"row shared":"rows shared"} an email with another and ${x.merged===1?"was":"were"} folded in.`:"",x.skipped>0?` ${x.skipped} ${x.skipped===1?"row has":"rows have"} no email or no name and will be left out.`:""]}),x.otherHeaders.length>0?t.jsxs(i,{variant:"body2",sx:{mt:.5},children:["Kept with each person: ",x.otherHeaders.join(", "),"."]}):null,t.jsx(i,{variant:"body2",sx:{mt:.5},children:"Nobody appears to producers from an import. An industry member is listed once they claim their entry with an account and their year of birth."})]}):null,w?t.jsxs(k,{children:[t.jsx(ct,{variant:"determinate",value:w.total?Math.round(w.done/w.total*100):0}
1),t.jsxs(i,{variant:"caption",color:"text.secondary",children:[w.done," of ",w.total]})]}):null,I?t.jsxs(v,{severity:"success",children:[I.created," added, ",I.updated," already here and refreshed",I.skipped>0?`, ${I.skipped} left out`:"","."," ",I.industry," industry and ",I.audience," audience members are on the email list."]}):null]})}),t.jsxs(pe,{children:[t.jsx(h,{onClick:()=>Ae(!1),disabled:!!w,children:I?"Done":"Cancel"}),I?null:t.jsx(h,{variant:"contained",onClick:()=>{kt()},disabled:!x||x.rows.length===0||!!w,children:w?"Importing...":`Import ${x?.rows.length??0} People`})]})]}),t.jsxs(ue,{open:xt,onClose:()=>{H||Z(!1)},fullWidth:!0,maxWidth:"sm",disableScrollLock:!0,children:[t.jsxs(he,{children:["Send To ",T??0," ",T===1?"Member":"Members","?"]}),t.jsx(me,{children:t.jsxs(p,{spacing:1.5,sx:{mt:1},children:[t.jsx(i,{variant:"subtitle2",children:re.trim()}),t.jsx(i,{variant:"body2",sx:{whiteSpace:"pre-wrap"},children:oe.trim()}),t.jsxs(i,{variant:"caption",color:"text.secondary",children:["Going to ",P.length+F.length===0?"every member":[...P.map(de),...F].join(", "),". Once it is sent it cannot be recalled."]})]})}),t.jsxs(pe,{children:[t.jsx(h,{disabled:H,onClick:()=>Z(!1),children:"Cancel"}),t.jsx(h,{variant:"contained",disabled:H,onClick:()=>{wt()},children:H?"Sending...":"Send"})]})]}),t.jsxs(ue,{open:mt,onClose:()=>{W||ae(!1)},fullWidth:!0,maxWidth:"sm",disableScrollLock:!0,children:[t.jsx(he,{children:"Approve And Invite"}),t.jsx(me,{children:t.jsxs(p,{spacing:2,sx:{mt:1},children:[t.jsx(v,{severity:"info",children:"Sending an invitation approves access immediately. Review the person and company first."}),t.jsxs(b,{select:!0,label:"Search Access",value:D,onChange:e=>ut(e.target.value),children:[t.jsx(A,{value:"director",children:"Director: Performers"}),t.jsx(A,{value:"producer",children:"Producer: All Categories"})]}),t.jsx(b,{label:"Email",type:"email",required:!0,fullWidth:!0,value:fe,onChange:e=>$e(e.target.value),helperText:"We write to them, and they get in by signing in with this address. There is no password for you to send."}),t.jsx(b,{label:"Name",fullWidth:!0,value:Re,onChange:e=>De(e.target.value)}),t.jsx(b,{label:"Company",fullWidth:!0,value:Pe,onChange:e=>Fe(e.target.value)})]})}),t.jsxs(pe,{children:[t.jsx(h,{disabled:W,onClick:()=>ae(!1),children:"Cancel"}),t.jsx(h,{variant:"contained",disabled:W||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(fe.trim()),onClick:()=>{At()},children:"Approve And Invite"})]})]}),t.jsxs(ue,{open:pt,onClose:()=>ie(!1),fullWidth:!0,maxWidth:"sm",disableScrollLock:!0,children:[t.jsx(he,{children:"New Citywide Audition"}),t.jsx(me,{children:t.jsxs(p,{spacing:2,sx:{mt:1},children:[t.jsx(b,{label:"Name",required:!0,fullWidth:!0,value:ye,onChange:e=>Be(e.target.value)}),t.jsx(b,{label:"Venue",fullWidth:!0,value:ze,onChange:e=>Ge(e.target.value)}),t.jsx(b,{label:"First Day",type:"date",fullWidth:!0,value:ve,InputLabelProps:{shrink:!0},onChange:e=>Oe(e.target.value)})]})}),t.jsxs(pe,{children:[t.jsx(h,{onClick:()=>ie(!1),children:"Cancel"}),t.jsx(h,{variant:"contained",disabled:!ye.trim(),onClick:()=>{It()},children:"Create"})]})]})]}):t.jsx(k,{sx:{maxWidth:900,mx:"auto",p:3},children:t.jsx(v,{severity:"warning",children:"That directory does not exist, or you do not run it."})})}export{yn as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.