1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,533885,e=>{"use strict";var t=e.i(148500);function a(e){let t={};return void 0!==e.fontFamily&&(t.fontFamily=e.fontFamily),void 0!==e.fontSize&&(t.fontSize=e.fontSize),void 0!==e.color&&(t.color=e.color),void 0!==e.fontWeight&&(t.fontWeight=e.fontWeight),void 0!==e.fontStyle&&(t.fontStyle=e.fontStyle),void 0!==e.textDecoration&&(t.textDecoration=e.textDecoration),t}e.s(["useElementFormatModal",0,function({fieldPrefix:e,sectionIndex:r,onElementSelect:n,onTextUpdate:l,getElementStyles:o}){let s=(0,t.useCallback)((t,a)=>{a.stopPropagation();let l=o(t);n?.(`${e}-${t}`,r,l)},[e,r,n,o]);return{handleFormatClick:s,handleFormatSave:(0,t.useCallback)((t,r)=>{l?.(`${e}-${t}`,"",a(r))},[e,l]),handleStyleUpdate:(0,t.useCallback)((t,r)=>{l?.(`${e}-${t}`,"",a(r))},[e,l])}}],533885)},633108,e=>{"use strict";var t=e.i(148500),a=e.i(24255);e.s(["useItemImageManagement",0,function({images:e,onItemUpdate:r,onImageUpload:n,imageIndexField:l,cropPrefix:o}){let[s,i]=(0,t.useState)(!1),[d,c]=(0,t.useState)(null),[u,m]=(0,t.useState)(!1),p=(0,t.useRef)(null),[x,g]=(0,t.useState)(!1),[f,b]=(0,t.useState)(null),[h,v]=(0,t.useState)(""),y=(0,t.useCallback)(t=>{let r=t[l];if(null!=r){let t=e[Number(r)];return t?(0,a.getImageUrl)(t)||("string"==typeof t?t:null):null}return t.image||null},[e,l]),k=(0,t.useCallback)(e=>{c(e),i(!0)},[]),w=(0,t.useCallback)(e=>{null!==d&&r(d,l,String(e)),i(!1),c(null)},[d,r,l]),j=(0,t.useCallback)(()=>{n?p.current?.click():alert("Upload feature is not available. Please refresh the page.")},[n]),C=(0,t.useCallback)(async e=>{let t=e.target.files?.[0];if(t&&null!==d&&n){m(!0);try{let e=await n(t,d);null!==e?(r(d,l,String(e)),i(!1),c(null)):alert("Failed to upload image. Please try again.")}catch(e){console.error("[useItemImageManagement] Failed to upload image:",e),alert("Failed to upload image. Please try again.")}finally{m(!1)}e.target.value=""}},[d,n,r,l]),N=(0,t.useCallback)((e,t)=>{v(t),b(e),g(!0)},[]),S=(0,t.useCallback)(()=>{g(!1),b(null)},[]),D=(0,t.useCallback)(e=>{null!==f&&(r(f,`${o}CropX`,String(e.x)),r(f,`${o}CropY`,String(e.y)),r(f,`${o}CropZoom`,String(e.zoom)),e.cropRect&&r(f,`${o}CropRect`,JSON.stringify(e.cropRect)),e.imageAspectRatio&&r(f,`${o}AspectRatio`,String(e.imageAspectRatio)))},[f,r,o]);return{showImageModal:s,setShowImageModal:i,selectingItemIndex:d,isUploading:u,isCropOpen:x,cropItemIndex:f,cropUrl:h,openCrop:N,closeCrop:S,handleCropSave:D,getItemImageUrl:y,handleImageClick:k,handleImageSelect:w,handleUploadNew:j,handleFileChange:C,fileInputRef:p}}])},126003,e=>{"use strict";var t=e.i(39887),a=e.i(364161),r=e.i(24255);e.s(["ImageSelectionModal",0,function({isOpen:e,onClose:n,images:l,isUploading:o,onUploadNe
1w:s,onSelect:i,fileInputRef:d,onFileChange:c,title:u="Select Image"}){return e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("input",{ref:d,type:"file",accept:"image/*",onChange:c,onClick:e=>e.stopPropagation(),className:"hidden"}),(0,a.createPortal)((0,t.jsx)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/70 backdrop-blur-sm pointer-events-auto",onClick:e=>{e.stopPropagation(),e.target===e.currentTarget&&n()},children:(0,t.jsxs)("div",{className:"relative max-w-4xl w-full mx-4 bg-white rounded-lg shadow-2xl overflow-hidden pointer-events-auto",onClick:e=>e.stopPropagation(),children:[(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),n()},className:"absolute top-4 right-4 z-10 w-8 h-8 flex items-center justify-center text-gray-600 hover:bg-gray-100 rounded-full transition-colors",children:"â"}),(0,t.jsxs)("div",{className:"p-6 relative",children:[o&&(0,t.jsx)("div",{className:"absolute inset-0 bg-white/80 flex items-center justify-center z-10 rounded-lg",children:(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,t.jsx)("div",{className:"w-6 h-6 border-2 border-gray-300 border-t-black rounded-full animate-spin"}),(0,t.jsx)("span",{className:"text-sm text-gray-600",children:"Uploading..."})]})}),(0,t.jsx)("h3",{className:"text-xl font-semibold text-gray-800 mb-4",children:u}),(0,t.jsxs)("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-5 gap-4 mb-6",children:[(0,t.jsxs)("button",{onClick:e=>{e.stopPropagation(),s()},disabled:o,className:`aspect-video border-2 border-dashed border-gray-300 rounded-lg hover:border-gray-400 hover:bg-gray-50 transition-colors flex flex-col items-center justify-center text-gray-500 hover:text-gray-700 ${o?"opacity-50 cursor-not-allowed":""}`,children:[(0,t.jsx)("svg",{className:"w-8 h-8 mb-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),(0,t.jsx)("span",{className:"text-xs text-center",children:o?"Uploading...":"Upload New"})]}),l.map((e,a)=>(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),i(a)},disabled:o,className:`aspect-video rounded-lg overflow-hidden border-2 border-transparent hover:border-blue-500 transition-colors ${o?"opacity-50 cursor-not-allowed":""}`,children:(0,t.jsx)("img",{src:(0,r.getImageUrl)(e)||("string"==typeof e?e:""),alt:`Image ${a+1}`,loading:"lazy",decoding:"async",className:"w-full h-full object-cover"})},a))]}),0===l.length&&(0,t.jsx)("p",{className:"text-center text-gray-500 text-sm mb-4",children:'No images uploaded yet. Click "Upload New" to add one.'})]})]})}),document.body)]}):null}])},400932,e=>{"use strict";function t(e,t,a){try{return new Intl.DateTimeFormat(e,t).format(a)}catch{return new Intl.DateTimeFormat("en-US",t).format(a)}}e.s(["DATE_FORMAT_OPTIONS",0,[{value:"eu",label:"European",example:"DD.MM.YYYY"},{value:"us",label:"American",example:"MM/DD/YYYY"},{value:"iso",label:"ISO",example:"YYYY-MM-DD"}],"formatCalendarDate",0,function(e,a={}){let r,{weekday:n="none",month:l="numeric",year:o=!0,locale:s="en"}=a;if(!e)return{weekday:"",date:"",formatted:""};let i=(e.includes("T")?e.split("T")[0]:e).split("-").map(Number),[d,c,u]=i;if(i.length<3||!i.every(Number.isFinite))return{weekday:"",date:e,formatted:e};let m=new Date(Date.UTC(d,c-1,u));if("numeric"===l){let e=String(u).padStart(2,"0"),t=String(c).padStart(2,"0");r=o?`${e}.${t}.${d}`:`${e}.${t}.`}else if("eu-short"===l||"eu-long"===l){let e="eu-short"===l?"short":"long",a=function(e,t,a,r){let n={day:"numeric",month:t,timeZone:"UTC",...r?{year:"numeric"}:{}};try{let t=new Intl.DateTimeFormat(e,n).formatToParts(a),r=t.find(e=>"month"===e.type)?.value;if(r)return r}catch{}let l=new Intl.DateTimeFormat("en-US",n).formatToParts(a);return l.find(e=>"month"===e.type)?.value??""}(s,e,m,o);r=""!==a&&/\D/.test(a)?[`${u}.`,a,o?String(d):""].filter(Boolean).join(" "):t(s,{day:"numeric",month:e,timeZone:"UTC",...o?{year:"numeric"}:{}},m)}else r=t(s,{day:"numeric",month:l,timeZone:"UTC",...o?{year:"numeric"}:{}},m);let p="none"===n?"":t(s,{weekday:n,timeZone:"UTC"},m);
1return{weekday:p,date:r,formatted:[p,r].filter(Boolean).join(", ")}},"formatDate",0,function(e,t="eu"){if(!e)return"";let[a,r,n]=(e.includes("T")?e.split("T")[0]:e).split("-");if(!a||!r||!n)return e;switch(t){case"eu":default:return`${n}.${r}.${a}`;case"us":return`${r}/${n}/${a}`;case"iso":return`${a}-${r}-${n}`}}])},568091,e=>{"use strict";var t=e.i(103431);e.s(["TRANSLATED_EVENT_FIELDS",0,["title","subtitle","venue","details","linkText"],"eventLink",0,function(e){return"string"==typeof e.link&&""!==e.link?e.link:"string"==typeof e.eventUrl?e.eventUrl:""},"translatedEventText",0,function(e,a){return{title:(0,t.translatedItemLabel)(e,"title",a),subtitle:(0,t.translatedItemLabel)(e,"subtitle",a),venue:(0,t.translatedItemLabel)(e,"venue",a),details:(0,t.translatedItemLabel)(e,"details",a)}}])},276980,e=>{"use strict";var t=e.i(148500),a=e.i(400932),r=e.i(375984);let n={Calendar:{weekday:"none",month:"numeric",year:!0},CalendarV2:{weekday:"none",month:"numeric",year:!0},CalendarV3:{weekday:"none",month:"numeric",year:!0},CalendarV4:{weekday:"none",month:"long",year:!0},CalendarV5:{weekday:"long",month:"numeric",year:!0}},l={weekday:"none",month:"numeric",year:!0};function o(e,t){let a=t&&n[t]||l;return{weekday:e?.calendarWeekdayFormat??a.weekday,month:e?.calendarMonthFormat??a.month,year:e?.calendarShowYear??a.year}}let s=["numeric","short","long","eu-short","eu-long"];e.s(["CALENDAR_DATE_LOCALE_AUTOMATIC",0,"","CALENDAR_DATE_STACK_CLASSES",0,"w-full md:w-auto md:min-w-[128px] md:max-w-[224px] md:flex-shrink-0","CALENDAR_DATE_STACK_DETAIL_CLASSES",0,"w-full md:w-auto md:min-w-[160px] md:max-w-[320px] md:flex-shrink-0","calendarDateLocaleSelectValue",0,function(e){return e||""},"calendarDateWrapClass",0,function(e){return e.includes(" ")?"":"whitespace-nowrap"},"resolveCalendarDateSettings",0,o,"toCalendarDateLocale",0,function(e){return""===e?void 0:e},"toCalendarMonthFormat",0,function(e){return s.includes(e)?e:"numeric"},"toCalendarWeekdayFormat",0,function(e){return"short"===e||"long"===e?e:"none"},"useCalendarChromeLanguage",0,function(e,t){return(0,r.useWeekdayLocale)(e,t?.calendarWeekdayLocale)},"useCalendarDateFormat",0,function(e,n,l){let s=(0,r.useWeekdayLocale)(e,n?.calendarWeekdayLocale),i=o(n,l);return(0,t.useMemo)(()=>{let e={locale:s,weekday:i.weekday,month:i.month,year:i.year};return{format:t=>(0,a.formatCalendarDate)(t,e).formatted,parts:t=>(0,a.formatCalendarDate)(t,e)}},[s,i.weekday,i.month,i.year])}])},251718,922203,342088,998740,630838,694898,e=>{"use strict";var t=e.i(39887),a=e.i(148500),r=e.i(364161),n=e.i(103431),l=e.i(568091),o=e.i(103299);let s=e=>e.startsWith("venue_");e.s(["CalendarEventModal",0,function({isOpen:e,mode:i,initialData:d,enableDateRange:c=!0,archiveGroups:u,resolution:m,onSave:p,onSaveMany:x,onClose:g}){let[f,b]=(0,a.useState)({title:"",subtitle:"",date:new Date().toISOString().split("T")[0],endDate:"",time:"",venue:"",details:"",link:"",linkText:"",archiveGroupId:void 0,programme:[],cast:[]}),[h,v]=(0,a.useState)([]),[y,k]=(0,a.useState)(!1),[w,j]=(0,a.useState)(""),[C,N]=(0,a.useState)(null),S=(0,a.useRef)([]);if((0,a.useEffect)(()=>{e&&d&&(b({...d,programme:Array.isArray(d.programme)?d.programme:[],cast:Array.isArray(d.cast)?d.cast:[]}),v([]),k(!1),j(""))},[e,d]),(0,a.useEffect)(()=>{if(null===C)return;let e=S.current[C];e&&(e.focus(),e.select()),N(null)},[C]),(0,a.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"===e.key&&g()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e,g]),!e)return null;let D=(e,t)=>{b(a=>({...a,[e]:t}))},$=f.programme??[],E=f.cast??[],L=""!==(d?.title??"").trim()?m:{...m,mode:"section"},T=(0,n.isTranslating)(L),A=T?` (${L.activeLanguage.toUpperCase()})`:"",I=(0,n.isTranslating)(m)&&!T,F=(0,n.itemLabelEdit)(f,"title",L),R=(0,n.itemLabelEdit)(f,"subtitle",L),O=(0,n.itemLabelEdit)(f,"venue",L),P=(0,n.itemLabelEdit)(f,"details",L),U=(0,n.itemLabelEdit)(f,"linkText",L),B=f.linkText||(0,o.getButtonLabels)(L.activeLanguage).itemLink,M=e=>{b(t=>({...t,programme:e}))},G=e=>{b(t=>({...t,cast:e}))},W=(e,t,a)=>{M($.map((r,n)=>n===e?{...r,[t]:a}:r))},_=(e,t,a)=>{G(E.map((r,n)=>n===e?{...r,[t]:a}:r))},V="add"===i&&!!x,z=h.map(e=>({date:e.date.trim(),endDate:e.endDate.trim(),time:e.time.trim(),venue:(e.venue??"").trim()})),Y=V&&z.length>
10,H=Y&&y,K={date:f.date,endDate:f.endDate,time:f.time,venue:w},Z=[{...K,venue:w.trim()},...z],J=(()=>{if(!Y)return null;if(z.some(e=>""===e.date))return"One of the extra dates is still empty. Pick a date for it, or remove the row.";let e=Z.map(e=>H?`${e.date}T${e.time}@${(e.venue??"").toLowerCase()}`:`${e.date}T${e.time}`),t=e.findIndex((t,a)=>e.indexOf(t)!==a);if(-1!==t){let e=Z[t];if(H){let t=e.time?`${e.date} at ${e.time}`:e.date,a=e.venue?` (${e.venue})`:"",r=[!e.time&&"time",!e.venue&&"venue"].filter(e=>"string"==typeof e),n=r.length>0?` with no ${r.join(" and no ")}`:"";return`${t}${a} is listed twice${n}. Give one of them a different time or venue, or remove the repeat.`}return e.time?`${e.date} at ${e.time} is listed twice. Give one of them a different time, or remove the repeat.`:`${e.date} is listed twice with no time. Give one of them a time, or remove the repeat.`}return null})(),X=e=>{e?(j(O.value),v(e=>e.map(e=>({...e,venue:O.value})))):(D(O.field,w),v(e=>e.map(e=>({date:e.date,endDate:e.endDate,time:e.time})))),k(e)},q=""!==f.title.trim()&&""!==f.date&&null===J,Q=(e,t)=>{let a=e;for(let e of t){let t=(0,n.itemLabelEdit)(a,e,L);if(t.field===e||!t.stored.trim())continue;let r={...a};delete r[t.field],t.stored.trim()===(0,n.translatedItemLabel)(r,e,L).trim()&&(a=r)}return a},ee=e=>{let t=Q(e,l.TRANSLATED_EVENT_FIELDS);return{...t,...t.programme?{programme:t.programme.map(e=>Q(e,["work"]))}:{},...t.cast?{cast:t.cast.map(e=>Q(e,["role"]))}:{}}},et=(e,a,r)=>(0,t.jsxs)("div",{className:"flex flex-col md:flex-row gap-3",children:[(0,t.jsxs)("div",{className:"flex gap-3 md:flex-[3]",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("label",{className:"block text-xs font-semibold text-gray-500 uppercase tracking-wider mb-1",children:["Date ",(0,t.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,t.jsx)("input",{type:"date",value:e.date,onChange:e=>a("date",e.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-black focus:border-transparent text-sm text-black"})]}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"block text-xs font-semibold text-gray-500 uppercase tracking-wider mb-1",children:"End Date"}),(0,t.jsx)("input",{type:"date",value:e.endDate,onChange:e=>a("endDate",e.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-black focus:border-transparent text-sm text-black"})]}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"block text-xs font-semibold text-gray-500 uppercase tracking-wider mb-1",children:"Time"}),(0,t.jsx)("input",{type:"time",value:e.time,onChange:e=>a("time",e.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-black focus:border-transparent text-sm text-black"})]})]}),H&&(0,t.jsxs)("div",{className:"md:flex-1",children:[(0,t.jsxs)("label",{className:"block text-xs font-semibold text-gray-500 uppercase tracking-wider mb-1",children:["Venue",A]}),(0,t.jsx)("input",{ref:e=>{S.current[r]=e},type:"text",value:e.venue??"",onChange:e=>a("venue",e.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-black focus:border-transparent text-sm text-black",placeholder:"Venue (optional)","aria-label":`Venue for date ${r+1}`})]})]}),ea=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"fixed inset-0 z-[999998] bg-black/20",onClick:g}),(0,t.jsxs)("div",{className:"fixed z-[999999] bg-white rounded-lg shadow-2xl border border-gray-200 w-[90vw] max-w-2xl max-h-[90vh] flex flex-col",style:{left:"50%",top:"50%",transform:"translate(-50%, -50%)"},onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b border-gray-200 flex-shrink-0",children:[(0,t.jsx)("h3",{className:"text-sm font-bold text-black uppercase tracking-wider",children:"edit"===i?"Edit Event":"Add Event"}),(0,t.jsx)("button",{onClick:g,className:"p-1 hover:bg-gray-100 rounded transition-colors",title:"Close",children:(0,t.jsx)("svg",{className:"w-4 h-4 text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsxs)("div",{className:"p-4 space-y-4 overflow-y-auto flex-1",children:[I&&(0,t.jsxs)("p",{className:"text-xs text-gray-600 bg-gray-50 border border-gray-200 rounded-md px-3 py-2",children:["New events are written in ",m.baseLanguage.toUpperCase(),". Save this one, then reopen it to add the ",m.activeLanguage.toUpperCase()," translation."]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs font-semibold text-gray-500 uppercase tracking-wider mb-1",children:["Title",A," ",!T&&(0,t.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,t.jsx)("input",{type:"text",value:F.value,onChange:e=>D(F.field,e.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-black focus:border-transparent text-sm text-black",placeholder:"Event title",autoFocus:!0})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs font-semibold text-gray-500 uppercase tracking-wider mb-1",children:["Subtitle",A]}
1),(0,t.jsx)("input",{type:"text",value:R.value,onChange:e=>D(R.field,e.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-black focus:border-transparent text-sm text-black",placeholder:"Event subtitle (optional)"})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex gap-2 items-end",children:[(0,t.jsx)("div",{className:"flex-1",children:et(K,(e,t)=>{"venue"===e?j(t):D(e,t)},0)}),Y&&(0,t.jsx)("div",{className:"w-7 flex-shrink-0"})]}),V&&h.map((e,a)=>(0,t.jsxs)("div",{className:"flex gap-2 items-end",children:[(0,t.jsx)("div",{className:"flex-1",children:et(e,(e,t)=>v(r=>r.map((r,n)=>n===a?{...r,[e]:t}:r)),a+1)}),(0,t.jsx)("button",{onClick:()=>{1===h.length&&y&&X(!1),v(e=>e.filter((e,t)=>t!==a))},className:"w-7 h-7 mb-1.5 flex-shrink-0 bg-gray-100 hover:bg-red-100 hover:text-red-600 text-gray-600 rounded flex items-center justify-center text-sm",title:"Remove date",children:"Ã"})]},a)),V&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>{let e=h.length>0?h[h.length-1].venue??"":w;v(t=>[...t,H?{date:"",endDate:"",time:f.time,venue:e}:{date:"",endDate:"",time:f.time}]),H&&N(h.length+1)},className:"w-full px-3 py-2 border border-dashed border-gray-300 rounded-md hover:bg-gray-50 transition-colors text-xs font-medium text-gray-600",children:"+ Add another date"}),Y&&!J&&(0,t.jsxs)("p",{className:"text-xs text-gray-600",children:["Saves ",Z.length," separate events â same details, one per row. Each keeps its own end date",H?", time and venue":" and time",", and can be edited or removed on its own afterwards."]}),J&&(0,t.jsx)("p",{className:"text-xs text-red-600",children:J})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[!H&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs font-semibold text-gray-500 uppercase tracking-wider mb-1",children:["Venue",A]}),(0,t.jsx)("input",{type:"text",value:O.value,onChange:e=>D(O.field,e.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-black focus:border-transparent text-sm text-black",placeholder:"Venue (optional)"})]}),Y&&(0,t.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",checked:y,onChange:e=>X(e.target.checked),className:"w-4 h-4 rounded border-gray-300 accent-black"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Different venue for each date"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs font-semibold text-gray-500 uppercase tracking-wider mb-1",children:["Details",A]}),(0,t.jsx)("textarea",{value:P.value,onChange:e=>D(P.field,e.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-black focus:border-transparent text-sm text-black resize-y",placeholder:"Additional event details (optional)",rows:3})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-semibold text-gray-500 uppercase tracking-wider mb-1",children:"Link URL"}),(0,t.jsx)("input",{type:"url",value:f.link,onChange:e=>D("link",e.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-black focus:border-transparent text-sm text-black",placeholder:"https://... (optional)"})]}),f.link&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs font-semibold text-gray-500 uppercase tracking-wider mb-1",children:["Link Text",A]}),(0,t.jsx)("input",{type:"text",value:U.value,onChange:e=>D(U.field,e.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-black focus:border-transparent text-sm text-black",placeholder:B})]}),u&&u.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-semibold text-gray-500 uppercase tracking-wider mb-1",children:"Archive Group"}),(0,t.jsxs)("select",{value:f.archiveGroupId||"",onChange:e=>b(t=>({...t,archiveGroupId:e.target.value||void 0})),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-black focus:border-transparent text-sm text-black",children:[(0,t.jsx)("option",{value:"",children:"Ungrouped"}),u.map(e=>(0,t.jsx)("option",{value:e.id,children:(0,n.translatedItemLabel)(e,"name",m)},e.id))]})]}),(0,t.jsxs)("details",{className:"border border-gray-200 rounded-md",children:[(0,t.jsxs)("summary",{className:"cursor-pointer px-3 py-2 text-xs font-semibold text-gray-500 uppercase tracking-wider hover:bg-gray-50 select-none",children:["Programme (",$.length,")"]}),(0,t.jsxs)("div",{className:"p-3 space-y-2 border-t border-gray-200",children:[$.map((e,a)=>{let r;return(0,t.jsxs)("div",{className:"flex gap-2 items-start",children:[(0,t.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,t.jsx)("input",{type:"text",value:e.composer||"",onChange:e=>W(a,"composer",e.target.value),className:"w-full px-2 py-1.5 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-black focus:border-transparent text-sm text-black",placeholder:"Composer (optional)"}),(r=(0,n.itemLabelEdit)(e,"work",L),(0,t.jsx)("input",{type:"text",value:r.value,onChange:e=>W(a,r.field,e.target.value),className:"w-full px-2 py-1.5 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-black focus:border-transparent text-sm text-black",placeholder:`Work title${A}`}))]}),(0,t.jsx)("button",{onClick:()=>M($.filter((e,t)=>
1t!==a)),className:"w-7 h-7 mt-1 bg-gray-100 hover:bg-red-100 hover:text-red-600 text-gray-600 rounded flex items-center justify-center text-sm",title:"Remove entry",children:"Ã"})]},a)}),(0,t.jsx)("button",{onClick:()=>M([...$,{composer:"",work:""}]),className:"w-full px-3 py-2 border border-dashed border-gray-300 rounded-md hover:bg-gray-50 transition-colors text-xs font-medium text-gray-600",children:"+ Add programme entry"})]})]}),(0,t.jsxs)("details",{className:"border border-gray-200 rounded-md",children:[(0,t.jsxs)("summary",{className:"cursor-pointer px-3 py-2 text-xs font-semibold text-gray-500 uppercase tracking-wider hover:bg-gray-50 select-none",children:["Cast (",E.length,")"]}),(0,t.jsxs)("div",{className:"p-3 space-y-2 border-t border-gray-200",children:[E.map((e,a)=>{let r;return(0,t.jsxs)("div",{className:"flex gap-2 items-start",children:[(0,t.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,t.jsx)("input",{type:"text",value:e.name,onChange:e=>_(a,"name",e.target.value),className:"w-full px-2 py-1.5 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-black focus:border-transparent text-sm text-black",placeholder:"Performer name"}),(r=(0,n.itemLabelEdit)(e,"role",L),(0,t.jsx)("input",{type:"text",value:r.value,onChange:e=>_(a,r.field,e.target.value),className:"w-full px-2 py-1.5 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-black focus:border-transparent text-sm text-black",placeholder:`Role / instrument${A}`}))]}),(0,t.jsx)("button",{onClick:()=>G(E.filter((e,t)=>t!==a)),className:"w-7 h-7 mt-1 bg-gray-100 hover:bg-red-100 hover:text-red-600 text-gray-600 rounded flex items-center justify-center text-sm",title:"Remove entry",children:"Ã"})]},a)}),(0,t.jsx)("button",{onClick:()=>G([...E,{name:"",role:""}]),className:"w-full px-3 py-2 border border-dashed border-gray-300 rounded-md hover:bg-gray-50 transition-colors text-xs font-medium text-gray-600",children:"+ Add cast entry"})]})]})]}),(0,t.jsxs)("div",{className:"p-4 border-t border-gray-200 flex gap-2 flex-shrink-0",children:[(0,t.jsx)("button",{onClick:g,className:"flex-1 px-4 py-2 border border-gray-300 rounded-md hover:bg-gray-50 transition-colors text-sm font-medium text-black",children:"Cancel"}),(0,t.jsx)("button",{onClick:()=>{q&&(Y&&x?x(Z.map(({venue:e,...t})=>{let a={...f,...t};return ee(H?((e,t)=>{if(t===O.value.trim())return{...e,[O.field]:t};let a={...e,venue:t};for(let e of Object.keys(a))s(e)&&delete a[e];return a})(a,e??""):a)})):p(ee(f)),g())},disabled:!q,className:"flex-1 px-4 py-2 bg-black text-white rounded-md hover:bg-gray-800 transition-colors text-sm font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:"edit"===i?"Save Changes":Y?`Add ${Z.length} Events`:"Add Event"})]})]})]});return(0,r.createPortal)(ea,document.body)}],251718);let i={title:"",subtitle:"",date:new Date().toISOString().split("T")[0],endDate:"",time:"",venue:"",details:"",link:"",linkText:""};e.s(["useCalendarEventModal",0,function(){let[e,t]=(0,a.useState)({isOpen:!1,mode:"add",eventIndex:null,initialData:null}),r=(0,a.useCallback)(()=>{t({isOpen:!0,mode:"add",eventIndex:null,initialData:{...i,date:new Date().toISOString().split("T")[0]}})},[]),n=(0,a.useCallback)((e,a)=>{t({isOpen:!0,mode:"edit",eventIndex:e,initialData:a})},[]),l=(0,a.useCallback)(e=>{t({isOpen:!0,mode:"add",eventIndex:null,initialData:{...e}})},[]),o=(0,a.useCallback)(()=>{t({isOpen:!1,mode:"add",eventIndex:null,initialData:null})},[]);return{isOpen:e.isOpen,mode:e.mode,eventIndex:e.eventIndex,initialData:e.initialData,openAddModal:r,openEditModal:n,openCopyModal:l,closeModal:o}}],922203);var d=e.i(88477);e.s(["useCalendarArchiveGroups",0,function(e,t,r,l,o){let s=(0,a.useMemo)(()=>{let t=e.content?.calendarArchiveGroups;return Array.isArray(t)&&t.length>0?t:[]},[e.content?.calendarArchiveGroups]),i=(0,d.useLanguageResolution)(e.content),c=!!t?.enableArchiveGroups,u=r&&"past"===l&&c&&s.length>0,[m,p]=(0,a.useState)(new Set),x=(0,a.useCallback)(e=>{p(t=>{let a=new Set(t);return a.has(e)?a.delete(e):a.add(e),a})},[]),g=(0,a.useCallback)(e=>({groupedEvents:s.map(t=>({group:t,events:e.filter(e=>e.archiveGroupId===t.id)})),ungroupedEvents:e.filter(e=>!e.archiveGroupId||!s.some(t=>t.id===e.archiveGroupId))}),[s]),f=(0,a.useCallback)(()=>
1{let e={id:`archgrp_${crypto.randomUUID()}`,name:`Season ${s.length+1}`},t=[...s,e];o?.("calendarArchiveGroups",JSON.stringify(t))},[s,o]),b=(0,a.useCallback)(e=>(0,n.translatedItemLabel)(e,"name",i),[i]),h=(0,a.useCallback)((e,t)=>{let a=s.map((a,r)=>r===e?{...a,[(0,n.itemLabelEdit)(a,"name",i).field]:t}:a);o?.("calendarArchiveGroups",JSON.stringify(a))},[s,o,i]),v=(0,a.useCallback)(e=>{let t=s.filter((t,a)=>a!==e);o?.("calendarArchiveGroups",JSON.stringify(t))},[s,o]);return{groups:s,enableArchiveGroups:c,shouldGroup:u,expandedGroups:m,toggleGroup:x,getGroupedEvents:g,addGroup:f,groupName:b,updateGroup:h,removeGroup:v}},"useCalendarTab",0,function(e){let[t,r]=(0,a.useState)(e||"upcoming");return(0,a.useEffect)(()=>{e||"archive"===new URLSearchParams(window.location.search).get("tab")&&r("past")},[]),[t,r]}],342088);var c=e.i(276980);e.i(811881);var u=e.i(403690);e.s(["CollapsibleArchiveGroup",0,function({groupId:e,groupName:a,eventCount:r,isExpanded:n,onToggle:l,headerColor:s,headingFont:i,bodyFont:d,headerOpacity:m=1,chevronClassName:p="w-4 h-4 md:w-5 md:h-5",headingClassName:x="text-lg md:text-xl",innerSpacingClassName:g="space-y-6 md:space-y-8",containerClassName:f,editable:b=!1,onRename:h,onRemove:v,data:y,sectionConfig:k,sectionName:w,getButtonStyles:j,onFormatButtonClick:C,showLessClassName:N="text-sm",children:S}){let D=`${w||"calendar"}-show-less`,$=(0,c.useCalendarChromeLanguage)(y?.content,k),E=(0,o.getButtonLabels)($);return(0,t.jsxs)("div",{className:f,children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 cursor-pointer select-none",onClick:e=>{e.stopPropagation(),l()},children:[(0,t.jsx)("svg",{className:`${p} flex-shrink-0 transition-transform duration-300`,style:{color:s,opacity:m,transform:n?"rotate(90deg)":"rotate(0deg)"},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,t.jsx)("h3",{className:`${x} font-semibold uppercase tracking-wider`,style:{fontFamily:`'${i}', serif`,color:s,opacity:m},onDoubleClick:b&&h?e=>{e.stopPropagation();let t=e.currentTarget;t.contentEditable="true",t.focus();let r=()=>{t.contentEditable="false";let e=t.textContent?.trim()||a;e!==a&&h(e),t.removeEventListener("blur",r)};t.addEventListener("blur",r),t.addEventListener("keydown",e=>{"Enter"===e.key&&(e.preventDefault(),t.blur())})}:void 0,children:a}),(0,t.jsxs)("span",{className:"text-xs opacity-50",style:{color:s,fontFamily:`'${d}', sans-serif`},children:["(",r,")"]}),b&&v&&(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),v()},className:"w-5 h-5 bg-red-500 hover:bg-red-600 text-white rounded-full text-xs flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",title:"Remove group",children:"Ã"})]}),(0,t.jsx)("div",{className:"grid transition-[grid-template-rows] duration-500 ease-out",style:{gridTemplateRows:n?"1fr":"0fr"},children:(0,t.jsxs)("div",{className:"overflow-hidden min-h-0",children:[(0,t.jsx)("div",{className:`pt-6 ${g}`,children:S}),r>0&&(0,t.jsx)("div",{className:"flex justify-center pt-6 pb-2",children:y?(0,t.jsx)(u.StyledButton,{onClick:e=>{e.stopPropagation(),l()},data:y,variant:"expand",className:`${N} font-medium`,styleOverride:k?.moreButtonStyle,colorOverride:k?.moreButtonColor,buttonStyles:j?.(D),editable:b,buttonField:D,onFormatButtonClick:C,children:E.showLess}):(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),l()},className:`${N} tracking-wider uppercase transition-opacity hover:opacity-100 opacity-60`,style:{color:s,fontFamily:`'${i}', serif`},children:E.showLess})})]})})]})}],998740);var m=e.i(410369);e.s(["ArchiveButton",0,function({data:e,editable:a,sectionName:r,sectionSlug:n,sectionConfig:l,getCurrentValue:o,getButtonStyles:s,onFormatButtonClick:i,onSubPageNavigate:d,className:c="text-sm"}){let p=o?.("calendar-archive-button","ARCHIVE")||"ARCHIVE",x=`${r||"calendar"}-archive`;return a&&d?(0,t.jsx)(u.StyledButton,{onClick:()=>d((r||"Calendar")+"#archive"),data:e,variant:"expand",className:`${c} font-medium flex items-center gap-1`,styleOverride:l?.moreButtonStyle,colorOverride:l?.moreButtonColor,buttonStyles:s?.(x),editable:a,buttonField:x,onFormatButtonClick:i,children:p}):(0,t.jsx)(m.StyledLink,{href:`/${n}?tab=archive`,data:e,variant:"expand",className:`${c} font-medium flex items-center gap-1`,styleOverride:l?.moreButtonStyle,colorOverride:l?.moreButtonColor,buttonStyles:s?.(x),editable:a,buttonField:x,onFormatButtonClick:i,children:p})}],630838),e.s(["InlineArchiveTabButton",0,function({editable:e,sectionName:r,sectionSlug:n,tabColor:l,tabFontFamily:o,tabFontSize:s,className:i,separatorClassName:d,getCurrentValue:c,onTextUpdate:u,onSubPageNavigate:m}){let[p,x]=(0,a.useState)(!1),g=(0,a.useRef)(null),f=(0,a.useRef)(null),b=c?.("calendar-archive-button","ARCHIVE")||"ARCHIVE",h={color:l,fontFamily:o,fontSize:s,opacity:.6,fontWeight:400};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:d,style:{color:l,fontFamily:o,fontSize:s,opacity:.4},children:"|"}),p&&e?(0,t.jsx)("input",{type:"text",value:c?.("calendar-archive-button","")??"",onChange:e=>u?.("calendar-archive-button",e.target.value),onBlur:()=>{(c?.("calendar-archive-button","")??"").trim()||u?.("calendar-archive-button","ARCHIVE"),x(!1)},onKeyDown:e=>{("Enter"===e.key||"Escape"===e.key)&&x(!1)},autoFocus:!0,className:"bg-white/10 border border-white/20 outline-none text-center pointer-events-auto tracking-wider up
1percase",style:{color:l,fontFamily:o,fontSize:s,fontWeight:400,minWidth:"80px"}}):e&&m?(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{f.current=null,m((r||"Calendar")+"#archive")},250)},onDoubleClick:e=>{e.stopPropagation(),f.current&&(clearTimeout(f.current),f.current=null),x(!0)},onTouchEnd:e=>{let t=Date.now();g.current&&t-g.current.time<400?(e.preventDefault(),x(!0),g.current=null):g.current={time:t}},className:`tracking-wider transition-opacity uppercase ${i||""}`,style:h,title:"Double-click to edit",children:b}):(0,t.jsx)("a",{href:`/${n}?tab=archive`,className:`tracking-wider transition-opacity uppercase ${i||""}`,style:h,children:b})]})}],694898)}]);
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.