@seatlayer/js 0.81.0 → 0.82.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var ic=Object.create;var Ei=Object.defineProperty;var nc=Object.getOwnPropertyDescriptor;var rc=Object.getOwnPropertyNames;var sc=Object.getPrototypeOf,oc=Object.prototype.hasOwnProperty;var Or=i=>{throw TypeError(i)};var ac=(i,e,t)=>()=>{if(t)throw t[0];try{return i&&(e=i(i=0)),e}catch(n){throw t=[n],n}};var _r=(i,e)=>{for(var t in e)Ei(i,t,{get:e[t],enumerable:!0})},Dr=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of rc(e))!oc.call(i,r)&&r!==t&&Ei(i,r,{get:()=>e[r],enumerable:!(n=nc(e,r))||n.enumerable});return i};var Nr=(i,e,t)=>(t=i!=null?ic(sc(i)):{},Dr(e||!i||!i.__esModule?Ei(t,"default",{value:i,enumerable:!0}):t,i)),lc=i=>Dr(Ei({},"__esModule",{value:!0}),i);var Hn=(i,e,t)=>e.has(i)||Or("Cannot "+t);var m=(i,e,t)=>(Hn(i,e,"read from private field"),t?t.call(i):e.get(i)),L=(i,e,t)=>e.has(i)?Or("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),T=(i,e,t,n)=>(Hn(i,e,"write to private field"),n?n.call(i,t):e.set(i,t),t),x=(i,e,t)=>(Hn(i,e,"access private method"),t);var ws={};_r(ws,{errorCopy:()=>zn,mountCheckout:()=>qc,unavailableCopy:()=>vs});function zc(i,e){try{window.sessionStorage.setItem($c,JSON.stringify({orderId:i,...e?{eventKey:e}:{},storedAt:Date.now()}))}catch{}}function Uc(){if(typeof document>"u"||document.getElementById(ys))return;let i=document.createElement("style");i.id=ys,i.textContent=jc,document.head.appendChild(i)}function vs(i,e){let t=`${e} ${e===1?"seat is":"seats are"} held for a limited time.`;return i==="payments_off_for_event"?{title:"This event isn\u2019t sold online",body:`${t} The organiser isn\u2019t taking payment for this event here.`,detail:"Nothing has been charged. Check where you found this event for how to get tickets."}:i==="unavailable_for_event"?{title:"This event isn\u2019t taking payment yet",body:`${t} Online payment is not switched on for this event.`,detail:"Nothing has been charged. If you were sent here to pay, let the organiser know \u2014 only they can turn payment on for this event."}:{title:"Finish in the ticketing checkout",body:`${t} Payment for this event is taken elsewhere.`,detail:"Nothing has been charged. Continue in the checkout on this page to pay for your seats."}}function zn(i){switch(i){case"gateway_not_connected":case"payments_not_enabled_for_event":return"This event is not taking online payments. Contact the organiser to buy these seats.";case"provider_mismatch":return"This event\u2019s payment setup changed while you were choosing. Nothing was charged \u2014 please try again.";case"hold_not_active":case"hold_not_found":return"Your seats were released before checkout started. Nothing was charged \u2014 please pick again.";case"checkout_already_started":return"A payment for these seats is already in progress. Finish that one, or wait for it to time out before starting again.";case"event_closed":return"Sales for this event have closed.";case"insufficient_hosted_credits":return"Ticket sales are temporarily paused while the organiser updates their SeatLayer balance. Nothing was charged \u2014 please try again later or contact the organiser.";case"gateway_currency_mismatch":case"unsupported_currency":case"mixed_currency_hold":case"price_unusable":return"These seats cannot be checked out right now because of a pricing configuration problem. Nothing was charged \u2014 please contact the organiser.";case"rate_limited":return"Too many attempts. Wait a moment and try again.";default:return"We could not start the payment. Nothing was charged \u2014 please try again."}}function Gc(){let i=window.Razorpay;return i?Promise.resolve(i):new Promise((e,t)=>{let n=document.querySelector(`script[src="${bs}"]`),r=n??document.createElement("script"),s=()=>{let o=window.Razorpay;o?e(o):t(new Error("razorpay_unavailable"))};r.addEventListener("load",s,{once:!0}),r.addEventListener("error",()=>t(new Error("razorpay_script_failed")),{once:!0}),!n&&(r.src=bs,r.async=!0,document.head.appendChild(r))})}function F(i,e,t){let n=document.createElement(i);return e&&(n.className=e),t!==void 0&&(n.textContent=t),n}function qc(i){Uc();let e=!0,t=!1,n=F("div","sl-hco");n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true");let r=F("div","sl-hco-card");n.appendChild(r);let s=()=>{e=!1,n.remove(),document.removeEventListener("keydown",a,!0)},o=()=>{s(),i.onCancel()};function a($){$.key!=="Escape"||!n.isConnected||($.stopPropagation(),$.preventDefault(),o())}document.addEventListener("keydown",a,!0);let l=F("h2","sl-hco-title","Checkout"),c=`sl-hco-t-${Math.random().toString(36).slice(2,8)}`;l.id=c,n.setAttribute("aria-labelledby",c);let d=(...$)=>{r.replaceChildren(l,...$)},p=$=>{if(!e)return;let X=F("p","sl-hco-status sl-hco-error",$);X.setAttribute("role","alert");let H=F("button","sl-hco-back","Back to seats");H.type="button",H.addEventListener("click",o),d(X,H)},u=$=>{if(!e)return;let X=F("p","sl-hco-status",$);X.setAttribute("role","status"),d(X)},h=async $=>{u("Payment received \u2014 confirming your seats\u2026");let X=Date.now()+9e4;for(;e&&Date.now()<X;){try{let H=await i.orderStatus($);if(!e)return;if(H.status==="confirmed"){t=!0,l.textContent="Your tickets are confirmed";let yt=F("p","sl-hco-status",`${H.seatCount} ${H.seatCount===1?"seat":"seats"} confirmed. Your tickets \u2014 with their door QR codes \u2014 are in your email.`),Xe=F("dl","sl-hco-receipt"),Zt=(H.tickets??[]).map(vt=>vt.label);Zt.length&&Xe.append(F("dt",void 0,"Seats"),F("dd",void 0,Zt.join(", "))),Xe.append(F("dt",void 0,"Paid"),F("dd",void 0,`${H.amountFormatted} ${H.currency}`),F("dt",void 0,"Order"),F("dd","sl-hco-ref",H.orderId));let Ci=F("button","sl-hco-back","Close");if(Ci.type="button",Ci.addEventListener("click",o),H.ticketUrl){let vt=F("a","sl-hco-tickets","View tickets & QR codes");vt.href=H.ticketUrl,vt.target="_blank",vt.rel="noreferrer",d(yt,Xe,vt,Ci)}else d(yt,Xe,Ci);i.onConfirmed(H);return}if(H.status==="failed"||H.status==="expired"){p(H.status==="expired"?"Your seats were released before payment completed. Nothing was charged \u2014 please pick again.":"The payment did not complete. If you were charged, it has been refunded automatically.");return}}catch{}await new Promise(H=>setTimeout(H,2e3))}!e||t||p("Still confirming with the payment provider. If your payment went through, your tickets will arrive by email shortly \u2014 you do not need to pay again.")};if(i.state.kind==="unavailable"){let $=vs(i.state.reason,i.state.seatCount);l.textContent=$.title;let X=F("p","sl-hco-label","Seats held"),H=F("button","sl-hco-back","Back to seat map");return H.type="button",H.addEventListener("click",o),r.replaceChildren(X,l,F("p","sl-hco-status",$.body),F("p","sl-hco-note",$.detail),H),i.root.appendChild(n),H.focus(),{destroy:s}}if(i.state.kind==="resume")return i.root.appendChild(n),h(i.state.orderId),{destroy:s};let{order:g,provider:y}=i.state,S=F("div","sl-hco-summary"),k=F("div","sl-hco-seats");for(let $ of g.labels)k.appendChild(F("span","sl-hco-seat",$));let v=i.formatMoney(g.total,g.currency),f=F("div","sl-hco-total");f.append(F("span",void 0,"Total"),F("strong",void 0,v)),S.append(k,f);let P=F("form","sl-hco-form"),B=F("label","sl-hco-label","Email \u2014 your tickets go here"),E=F("input","sl-hco-input");E.type="email",E.required=!0,E.autocomplete="email",E.placeholder="you@example.com",E.id=`${c}-email`,B.htmlFor=E.id;let O=F("label","sl-hco-label","Name (optional)"),M=F("input","sl-hco-input");M.type="text",M.autocomplete="name",M.placeholder="Your name",M.id=`${c}-name`,O.htmlFor=M.id;let A=F("button","sl-hco-pay",`Pay ${v}`);A.type="submit",A.disabled=!0;let N=F("button","sl-hco-back","Back to seats");N.type="button",N.addEventListener("click",o);let _=new Date(g.expiresAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),V=F("p","sl-hco-note",`Your seats are held until ${_}. Payment is handled by ${y==="razorpay"?"Razorpay":"Stripe"} \u2014 we never see your card details.`),Z=F("p","sl-hco-note");Z.append("The event organizer and SeatLayer use your email to issue and manage your tickets. ");let q=F("a",void 0,"Privacy Policy");q.href="https://seatlayer.io/privacy/",q.target="_blank",q.rel="noreferrer",Z.appendChild(q);let gt=()=>/.+@.+\..+/.test(E.value.trim());E.addEventListener("input",()=>{A.disabled=!gt()});let bt=async()=>{u("Opening secure payment\u2026");try{let $=await i.startSession({holdId:g.holdId,buyerEmail:E.value.trim(),...M.value.trim()?{buyerName:M.value.trim()}:{}});if(!e)return;if($.redirectUrl){zc($.orderId,i.eventKey),u("Taking you to secure payment\u2026"),window.location.assign($.redirectUrl);return}if($.clientPayload){let X=$.clientPayload,H=await Gc();if(!e)return;u("Waiting for payment\u2026"),new H({key:X.key,order_id:X.orderId,amount:X.amount,currency:X.currency,name:X.name,prefill:X.prefill,handler:()=>{h($.orderId)},modal:{ondismiss:()=>{e&&Qt()}}}).open();return}p(zn("gateway_unavailable"))}catch($){i.onError?.($),p(zn($?.code))}};P.addEventListener("submit",$=>{$.preventDefault(),gt()&&bt()}),P.append(B,E,O,M,Z,A,N,V);let Qt=()=>{l.textContent="Checkout",d(S,P),A.disabled=!gt()};return Qt(),i.root.appendChild(n),E.focus(),{destroy:s}}var bs,ys,$c,jc,xs=ac(()=>{"use strict";bs="https://checkout.razorpay.com/v1/checkout.js",ys="seatlayer-checkout-style",$c="@seatlayer/pending-checkout/v1";jc=`
1
+ "use strict";var Kl=Object.create;var wi=Object.defineProperty;var Wl=Object.getOwnPropertyDescriptor;var Yl=Object.getOwnPropertyNames;var Xl=Object.getPrototypeOf,Zl=Object.prototype.hasOwnProperty;var Mo=i=>{throw TypeError(i)};var Ql=(i,e,t)=>()=>{if(t)throw t[0];try{return i&&(e=i(i=0)),e}catch(n){throw t=[n],n}};var Lo=(i,e)=>{for(var t in e)wi(i,t,{get:e[t],enumerable:!0})},Ho=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Yl(e))!Zl.call(i,o)&&o!==t&&wi(i,o,{get:()=>e[o],enumerable:!(n=Wl(e,o))||n.enumerable});return i};var Ro=(i,e,t)=>(t=i!=null?Kl(Xl(i)):{},Ho(e||!i||!i.__esModule?wi(t,"default",{value:i,enumerable:!0}):t,i)),Jl=i=>Ho(wi({},"__esModule",{value:!0}),i);var Pn=(i,e,t)=>e.has(i)||Mo("Cannot "+t);var m=(i,e,t)=>(Pn(i,e,"read from private field"),t?t.call(i):e.get(i)),L=(i,e,t)=>e.has(i)?Mo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),T=(i,e,t,n)=>(Pn(i,e,"write to private field"),n?n.call(i,t):e.set(i,t),t),x=(i,e,t)=>(Pn(i,e,"access private method"),t);var Fo={};Lo(Fo,{errorCopy:()=>Mn,mountCheckout:()=>mc,unavailableCopy:()=>Bo});function dc(i,e){try{window.sessionStorage.setItem(cc,JSON.stringify({orderId:i,...e?{eventKey:e}:{},storedAt:Date.now()}))}catch{}}function hc(){if(typeof document>"u"||document.getElementById(Do))return;let i=document.createElement("style");i.id=Do,i.textContent=pc,document.head.appendChild(i)}function Bo(i,e){let t=`${e} ${e===1?"seat is":"seats are"} held for a limited time.`;return i==="payments_off_for_event"?{title:"This event isn\u2019t sold online",body:`${t} The organiser isn\u2019t taking payment for this event here.`,detail:"Nothing has been charged. Check where you found this event for how to get tickets."}:i==="unavailable_for_event"?{title:"This event isn\u2019t taking payment yet",body:`${t} Online payment is not switched on for this event.`,detail:"Nothing has been charged. If you were sent here to pay, let the organiser know \u2014 only they can turn payment on for this event."}:{title:"Finish in the ticketing checkout",body:`${t} Payment for this event is taken elsewhere.`,detail:"Nothing has been charged. Continue in the checkout on this page to pay for your seats."}}function Mn(i){switch(i){case"gateway_not_connected":case"payments_not_enabled_for_event":return"This event is not taking online payments. Contact the organiser to buy these seats.";case"provider_mismatch":return"This event\u2019s payment setup changed while you were choosing. Nothing was charged \u2014 please try again.";case"hold_not_active":case"hold_not_found":return"Your seats were released before checkout started. Nothing was charged \u2014 please pick again.";case"checkout_already_started":return"A payment for these seats is already in progress. Finish that one, or wait for it to time out before starting again.";case"event_closed":return"Sales for this event have closed.";case"insufficient_hosted_credits":return"Ticket sales are temporarily paused while the organiser updates their SeatLayer balance. Nothing was charged \u2014 please try again later or contact the organiser.";case"gateway_currency_mismatch":case"unsupported_currency":case"mixed_currency_hold":case"price_unusable":return"These seats cannot be checked out right now because of a pricing configuration problem. Nothing was charged \u2014 please contact the organiser.";case"rate_limited":return"Too many attempts. Wait a moment and try again.";default:return"We could not start the payment. Nothing was charged \u2014 please try again."}}function uc(){let i=window.Razorpay;return i?Promise.resolve(i):new Promise((e,t)=>{let n=document.querySelector(`script[src="${No}"]`),o=n??document.createElement("script"),r=()=>{let s=window.Razorpay;s?e(s):t(new Error("razorpay_unavailable"))};o.addEventListener("load",r,{once:!0}),o.addEventListener("error",()=>t(new Error("razorpay_script_failed")),{once:!0}),!n&&(o.src=No,o.async=!0,document.head.appendChild(o))})}function F(i,e,t){let n=document.createElement(i);return e&&(n.className=e),t!==void 0&&(n.textContent=t),n}function mc(i){hc();let e=!0,t=!1,n=F("div","sl-hco");n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true");let o=F("div","sl-hco-card");n.appendChild(o);let r=()=>{e=!1,n.remove(),document.removeEventListener("keydown",a,!0)},s=()=>{r(),i.onCancel()};function a($){$.key!=="Escape"||!n.isConnected||($.stopPropagation(),$.preventDefault(),s())}document.addEventListener("keydown",a,!0);let l=F("h2","sl-hco-title","Checkout"),c=`sl-hco-t-${Math.random().toString(36).slice(2,8)}`;l.id=c,n.setAttribute("aria-labelledby",c);let d=(...$)=>{o.replaceChildren(l,...$)},p=$=>{if(!e)return;let Y=F("p","sl-hco-status sl-hco-error",$);Y.setAttribute("role","alert");let R=F("button","sl-hco-back","Back to seats");R.type="button",R.addEventListener("click",s),d(Y,R)},u=$=>{if(!e)return;let Y=F("p","sl-hco-status",$);Y.setAttribute("role","status"),d(Y)},h=async $=>{u("Payment received \u2014 confirming your seats\u2026");let Y=Date.now()+9e4;for(;e&&Date.now()<Y;){try{let R=await i.orderStatus($);if(!e)return;if(R.status==="confirmed"){t=!0,l.textContent="Your tickets are confirmed";let bt=F("p","sl-hco-status",`${R.seatCount} ${R.seatCount===1?"seat":"seats"} confirmed. Your tickets \u2014 with their door QR codes \u2014 are in your email.`),Xe=F("dl","sl-hco-receipt"),Yt=(R.tickets??[]).map(yt=>yt.label);Yt.length&&Xe.append(F("dt",void 0,"Seats"),F("dd",void 0,Yt.join(", "))),Xe.append(F("dt",void 0,"Paid"),F("dd",void 0,`${R.amountFormatted} ${R.currency}`),F("dt",void 0,"Order"),F("dd","sl-hco-ref",R.orderId));let vi=F("button","sl-hco-back","Close");if(vi.type="button",vi.addEventListener("click",s),R.ticketUrl){let yt=F("a","sl-hco-tickets","View tickets & QR codes");yt.href=R.ticketUrl,yt.target="_blank",yt.rel="noreferrer",d(bt,Xe,yt,vi)}else d(bt,Xe,vi);i.onConfirmed(R);return}if(R.status==="failed"||R.status==="expired"){p(R.status==="expired"?"Your seats were released before payment completed. Nothing was charged \u2014 please pick again.":"The payment did not complete. If you were charged, it has been refunded automatically.");return}}catch{}await new Promise(R=>setTimeout(R,2e3))}!e||t||p("Still confirming with the payment provider. If your payment went through, your tickets will arrive by email shortly \u2014 you do not need to pay again.")};if(i.state.kind==="unavailable"){let $=Bo(i.state.reason,i.state.seatCount);l.textContent=$.title;let Y=F("p","sl-hco-label","Seats held"),R=F("button","sl-hco-back","Back to seat map");return R.type="button",R.addEventListener("click",s),o.replaceChildren(Y,l,F("p","sl-hco-status",$.body),F("p","sl-hco-note",$.detail),R),i.root.appendChild(n),R.focus(),{destroy:r}}if(i.state.kind==="resume")return i.root.appendChild(n),h(i.state.orderId),{destroy:r};let{order:f,provider:b}=i.state,k=F("div","sl-hco-summary"),S=F("div","sl-hco-seats");for(let $ of f.labels)S.appendChild(F("span","sl-hco-seat",$));let v=i.formatMoney(f.total,f.currency),P=F("div","sl-hco-total");P.append(F("span",void 0,"Total"),F("strong",void 0,v)),k.append(S,P);let y=F("form","sl-hco-form"),H=F("label","sl-hco-label","Email \u2014 your tickets go here"),C=F("input","sl-hco-input");C.type="email",C.required=!0,C.autocomplete="email",C.placeholder="you@example.com",C.id=`${c}-email`,H.htmlFor=C.id;let N=F("label","sl-hco-label","Name (optional)"),M=F("input","sl-hco-input");M.type="text",M.autocomplete="name",M.placeholder="Your name",M.id=`${c}-name`,N.htmlFor=M.id;let A=F("button","sl-hco-pay",`Pay ${v}`);A.type="submit",A.disabled=!0;let _=F("button","sl-hco-back","Back to seats");_.type="button",_.addEventListener("click",s);let D=new Date(f.expiresAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),V=F("p","sl-hco-note",`Your seats are held until ${D}. Payment is handled by ${b==="razorpay"?"Razorpay":"Stripe"} \u2014 we never see your card details.`),ne=F("p","sl-hco-note");ne.append("The event organizer and SeatLayer use your email to issue and manage your tickets. ");let ee=F("a",void 0,"Privacy Policy");ee.href="https://seatlayer.io/privacy/",ee.target="_blank",ee.rel="noreferrer",ne.appendChild(ee);let W=()=>/.+@.+\..+/.test(C.value.trim());C.addEventListener("input",()=>{A.disabled=!W()});let gt=async()=>{u("Opening secure payment\u2026");try{let $=await i.startSession({holdId:f.holdId,buyerEmail:C.value.trim(),...M.value.trim()?{buyerName:M.value.trim()}:{}});if(!e)return;if($.redirectUrl){dc($.orderId,i.eventKey),u("Taking you to secure payment\u2026"),window.location.assign($.redirectUrl);return}if($.clientPayload){let Y=$.clientPayload,R=await uc();if(!e)return;u("Waiting for payment\u2026"),new R({key:Y.key,order_id:Y.orderId,amount:Y.amount,currency:Y.currency,name:Y.name,prefill:Y.prefill,handler:()=>{h($.orderId)},modal:{ondismiss:()=>{e&&Wt()}}}).open();return}p(Mn("gateway_unavailable"))}catch($){i.onError?.($),p(Mn($?.code))}};y.addEventListener("submit",$=>{$.preventDefault(),W()&&gt()}),y.append(H,C,N,M,ne,A,_,V);let Wt=()=>{l.textContent="Checkout",d(k,y),A.disabled=!W()};return Wt(),i.root.appendChild(n),C.focus(),{destroy:r}}var No,Do,cc,pc,Vo=Ql(()=>{"use strict";No="https://checkout.razorpay.com/v1/checkout.js",Do="seatlayer-checkout-style",cc="@seatlayer/pending-checkout/v1";pc=`
2
2
  /* The card is centred, but max-height:100% lets a long form reach the bottom
3
3
  edge \u2014 and on the hosted buyer page that edge is the phone's edge, with the
4
4
  Pay button last in the scroll. Reserve the home-indicator gutter here too.
@@ -38,7 +38,7 @@
38
38
  .sl-hco-tickets{display:block;width:100%;margin-top:14px;padding:12px;font:inherit;font-size:15px;
39
39
  font-weight:650;text-align:center;text-decoration:none;color:var(--sl-accent-ink);
40
40
  background:var(--sl-accent);border-radius:calc(var(--sl-radius) * .55)}
41
- `});var vh={};_r(vh,{ApiError:()=>U,BuyerAccessContext:()=>pe,BuyerAccessUnavailableError:()=>re,BuyerRealtimeClient:()=>xe,EmbeddedDesigner:()=>sn,PerformanceGroupDestroyedError:()=>Q,PerformanceGroupPicker:()=>An,SEATING_CHART_CALLBACK_PROPS:()=>Yn,SEATING_CHART_HANDLE_METHODS:()=>qn,SEATING_CHART_IDENTITY_PROPS:()=>Kn,SEATING_CHART_VALUE_PROPS:()=>Wn,SeasonApiError:()=>z,SeasonPicker:()=>Ln,SeasonPublicSessionRefused:()=>bi,SeasonRecoveryTimeoutError:()=>wi,SeatPicker:()=>Ge,SeatingChart:()=>rn,attachPickerFrame:()=>tc,bindSeatingChartHandle:()=>zs,buildSeatingChartOptions:()=>js,createBuyerAccessContext:()=>Pt,createControllerSink:()=>wt,parseTicketOfferAvailability:()=>an,shortOperationReference:()=>$t,ticketOfferPrices:()=>ln});module.exports=lc(vh);var j=require("@seatlayer/core");var Qe="seatlayer.v1";function cc(i){let e=typeof i.default=="string"?i.default:"free",t={};if(i.seats&&typeof i.seats=="object")for(let[n,r]of Object.entries(i.seats))typeof r=="string"&&r!==e&&(t[n]=r);return{default:e,exceptions:t}}function dc(i,e){if(!i||i.default!==e.default)return null;let t=[];for(let[n,r]of Object.entries(e.exceptions))i.exceptions[n]!==r&&t.push({label:n,status:r});for(let n of Object.keys(i.exceptions))n in e.exceptions||t.push({label:n,status:e.default});return t}function pc(i,e){for(let t of e)t.status===i.default?delete i.exceptions[t.label]:i.exceptions[t.label]=t.status}function Br(i){if(/(?:^|[?&#])(?:token|access_token|bearer|authorization|ticket|tkt|bse)=/i.test(i))throw new Error("seatlayer: refusing to open a socket with a credential in the URL");if(/\bbse_[A-Za-z0-9._-]+/.test(i))throw new Error("seatlayer: refusing to open a socket with a credential in the URL")}var xe=class{constructor(e){this.ws=null;this.stopped=!0;this.attempt=0;this.reconnectTimer=null;this.pingTimer=null;this.pongTimer=null;this.resumeTimer=null;this.projection=null;this.version=null;this.v1=!1;this.useQueryMarker=!1;this.hidden=null;this.closedSections=null;this.opts=e,Br(e.url)}get protocol(){return this.ws?this.v1?"v1":"legacy":null}get snapshotVersion(){return this.version}start(){this.stopped&&(this.stopped=!1,this.connect())}stop(){this.stopped=!0,this.clearTimers();let e=this.ws;if(this.ws=null,e){e.onopen=null,e.onmessage=null,e.onclose=null,e.onerror=null;try{e.close()}catch{}}}restart(){this.stop(),this.projection=null,this.version=null,this.attempt=0,this.start()}async connect(){if(this.stopped)return;let e=[Qe];if(this.opts.mintTicket){let s;try{s=await this.opts.mintTicket()}catch(o){this.reportIfAccessError(o),this.scheduleReconnect();return}if(this.stopped)return;s?.protocols?.length?(e=[...s.protocols],e.includes(Qe)||e.unshift(Qe)):s?.ticket&&(e=[Qe,`tkt.${s.ticket}`])}let t=this.version!==null;t&&e.push(`sv.${this.version}`);let n=this.useQueryMarker?`${this.opts.url}${this.opts.url.includes("?")?"&":"?"}pv=1`:this.opts.url;Br(n);let r;try{r=(this.opts.socketFactory??((o,a)=>new WebSocket(o,a)))(n,e)}catch{this.scheduleReconnect();return}this.ws=r,r.onopen=()=>{this.ws===r&&(this.attempt=0,this.v1=r.protocol===Qe,this.v1||(this.useQueryMarker=!0),this.startKeepalive(r),t?this.resumeTimer=setTimeout(()=>{this.resumeTimer=null,this.opts.sink.resync()},5e3):this.resumeTimer=setTimeout(()=>{this.resumeTimer=null,this.opts.sink.resync({reason:"connect"})},5e3))},r.onmessage=s=>{if(this.ws!==r)return;let o;try{o=JSON.parse(typeof s.data=="string"?s.data:"")}catch{return}!o||typeof o!="object"||this.handleFrame(o)},r.onclose=s=>{if(this.ws===r){if(this.ws=null,this.clearTimers(),s?.code===4401){if(s.reason==="access_expired"){this.scheduleReconnect();return}this.stopped=!0,this.opts.onAccessUnavailable?.({reason:"revoked",code:"access_revoked",retryable:!1});return}this.scheduleReconnect()}},r.onerror=()=>{try{r.close()}catch{}}}handleFrame(e){let t=typeof e.type=="string"?e.type:"";if(e.protocol===1&&(this.v1=!0),typeof e.snapshotVersion=="number"&&(this.version=e.snapshotVersion),t==="pong"){this.clearPongTimer();return}if(Array.isArray(e.hidden)||Array.isArray(e.closed)){let n=Array.isArray(e.hidden)?e.hidden:[],r=Array.isArray(e.closed)?e.closed:[],s=n.join("\0"),o=r.join("\0");(s!==this.hidden||o!==this.closedSections)&&(this.hidden=s,this.closedSections=o,this.opts.sink.onSections?.(n,r,{withInventory:t==="snapshot"||!!e.seats}))}if(t!=="hidden"){if(t==="presence"){this.opts.sink.onPresence?.({shoppingSessions:Number(e.shoppingSessions)||0,activeHolds:Number(e.activeHolds)||0});return}if(t!=="allocation"){if(t==="snapshot"||!t&&e.seats){this.answered();let n=cc(e),r=dc(this.projection,n);this.projection=n,r===null?this.opts.sink.applyProjection?this.opts.sink.applyProjection(n):this.opts.sink.resync():r.length&&this.opts.sink.applyStatuses(r);return}if(t==="delta"&&Array.isArray(e.changes)){this.answered();let n=e.changes.filter(r=>typeof r?.label=="string"&&typeof r?.status=="string").map(r=>({label:r.label,status:r.status}));if(!n.length)return;this.projection&&pc(this.projection,n),this.opts.sink.applyStatuses(n)}}}}answered(){this.resumeTimer&&(clearTimeout(this.resumeTimer),this.resumeTimer=null)}reportIfAccessError(e){let t=e?.reason;e?.name==="BuyerAccessUnavailableError"&&(this.stopped=!0,this.opts.onAccessUnavailable?.({reason:t??"invalid",code:e.code,status:e.status,retryable:t==="paused"}))}startKeepalive(e){this.pingTimer=setInterval(()=>{if(this.ws===e){try{e.send(JSON.stringify({type:"ping"}))}catch{return}this.clearPongTimer(),this.pongTimer=setTimeout(()=>{this.pongTimer=null;try{e.close()}catch{}},1e4)}},25e3)}scheduleReconnect(){if(this.stopped||this.reconnectTimer)return;let e=Math.min(this.attempt++,5),t=Math.min(1e3*2**e,15e3),n=Math.random()*t;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}clearPongTimer(){this.pongTimer&&(clearTimeout(this.pongTimer),this.pongTimer=null)}clearTimers(){this.pingTimer&&clearInterval(this.pingTimer),this.pingTimer=null,this.clearPongTimer(),this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null,this.resumeTimer&&clearTimeout(this.resumeTimer),this.resumeTimer=null}};function hc(i){return i==="blocked"?"not_for_sale":i==="held"||i==="booked"||i==="free"||i==="not_for_sale"?i:"free"}function wt(i,e={}){let t=n=>{let r=i.tableSelection(n);if(r)return r.physicalSeatIds;let s=i.idForLabel(n);return s?[s]:[]};return{applyStatuses(n){let r=new Set([...i.currentHold()?.labels??[],...e.ownLabels?.()??[]]),s={free:[],held:[],booked:[],not_for_sale:[]},o=[],a=[],l=new Map(i.getSelection().map(c=>[c.label,c.id]));for(let c of n){let d=t(c.label);if(!d.length)continue;let p=hc(c.status);if(s[p].push(...d),e.flashOnLiveChange&&p!=="free"&&!r.has(c.label)&&d.some(u=>i.getStatus(u)==="free")){let u=p==="held"?"#f4b740":"#f43f5e";for(let h of d)o.push({id:h,color:u})}p!=="free"&&!r.has(c.label)&&l.has(c.label)&&a.push(c.label)}for(let c of["free","held","booked","not_for_sale"])s[c].length&&i.setStatus(s[c],c);for(let c of o)i.flashSeat(c.id,c.color);if(a.length){let c=a.flatMap(p=>t(p));c.length&&i.deselect(c);let d=n.some(p=>p.status==="blocked"&&a.includes(p.label));e.onSelectedObjectUnavailable?.(a,d?"ineligible":"taken")}e.onStatusChange?.()},...i.applyProjection?{applyProjection:n=>{i.applyProjection(n)}}:{},async resync(n){await(i.resync?i.resync(n):i.refresh())},onSections(n,r,s){s?.withInventory||(i.resync?i.resync({reason:"frame"}):i.refresh()),e.onSections?.(n,r,s)}}}var U=class extends Error{constructor(e,t,n,r,s,o){super(t),this.name="ApiError",this.status=e,this.code=n,this.conflicts=r,this.reason=s,this.retryAfterS=o}},Fr=10,Vr=1;function Ai(i,e){let t=(i??"").trim();if(t){let n=Number(t);if(Number.isFinite(n)&&n>=0)return Math.ceil(n);let r=Date.parse(t);if(Number.isFinite(r))return Math.max(0,Math.ceil((r-Date.now())/1e3))}if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return Math.ceil(e)}var uc={seat_conflict:"taken",conflict:"taken",channel_assignment_conflict:"ineligible",allocation_exhausted:"exhausted"},Be=class{constructor(e,t={}){this.base=e;this.viewerId=typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`viewer_${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`;this.access=t.access,this.onObjectUnavailable=t.onObjectUnavailable;let n=t.referral?.trim();this.referral=n?n.slice(0,120):void 0}get accessScoped(){return!!this.access?.configured}async request(e,t={},n={}){let r=t.method??"GET",s={},o;t.body!==void 0&&(s["Content-Type"]="application/json",o=JSON.stringify(t.body));let a=await this.access?.authorization(n.auth?"unauthorized":"initial");a&&(s.Authorization=a);let l=await fetch(`${this.base}${e}`,{method:r,headers:s,body:o,credentials:"omit"}),d=(l.headers.get("content-type")??"").includes("application/json")?await l.json().catch(()=>null):null;if(!l.ok){let p=d,u=p?.code??p?.error;if(this.access?.configured&&(l.status===401||l.status===403||l.status===422)&&await this.access.handleFailure(l.status,u)&&!n.auth)return this.request(e,t,{...n,auth:!0});if(l.status===409){let g=u?uc[u]:void 0,y=p?.conflicts?.map(S=>S.label)??t.labels??[];g&&this.onObjectUnavailable?.({labels:y,reason:g,code:u})}let h;if(l.status===429&&(h=Ai(l.headers.get("Retry-After"),p?.retryAfterSeconds)??Vr,r==="GET"&&!n.rateLimit&&h<=Fr))return await new Promise(g=>setTimeout(g,h*1e3)),this.request(e,t,{...n,rateLimit:!0});throw new U(l.status,p?.error??`request_failed_${l.status}`,u,p?.conflicts,p?.reason,h)}return d}async requestBlob(e,t={}){let n={},r=await this.access?.authorization(t.auth?"unauthorized":"initial");r&&(n.Authorization=r);let s=await fetch(`${this.base}${e}`,{method:"GET",headers:n,credentials:"omit"});if(s.ok)return s.blob();let a=(s.headers.get("content-type")??"").includes("application/json")?await s.json().catch(()=>null):null,l=a?.code??a?.error;if(this.access?.configured&&(s.status===401||s.status===403||s.status===422)&&await this.access.handleFailure(s.status,l)&&!t.auth)return this.requestBlob(e,{...t,auth:!0});let c;if(s.status===429&&(c=Ai(s.headers.get("Retry-After"),a?.retryAfterSeconds)??Vr,!t.rateLimit&&c<=Fr))return await new Promise(d=>setTimeout(d,c*1e3)),this.requestBlob(e,{...t,rateLimit:!0});throw new U(s.status,a?.error??`request_failed_${s.status}`,l,void 0,void 0,c)}chart(e){return this.request(`/pub/events/${encodeURIComponent(e)}/chart`)}eventConfiguration(e){return this.request(`/pub/events/${encodeURIComponent(e)}/event-configuration`)}reportViewEvidence(e,t){return this.request(`/pub/events/${encodeURIComponent(e)}/view-evidence-reports`,{method:"POST",body:{seatId:t.seatId,...t.evidenceId?{evidenceId:t.evidenceId}:{},...t.message?{message:t.message}:{}}})}asset(e,t){return/^[a-zA-Z0-9._-]+$/.test(t)?this.requestBlob(`/pub/events/${encodeURIComponent(e)}/assets/${encodeURIComponent(t)}`):Promise.reject(new U(404,"not_found","not_found"))}objects(e){return this.request(`/pub/events/${encodeURIComponent(e)}/objects?compact=1`)}hold(e,t,n,r){return this.request(`/pub/events/${encodeURIComponent(e)}/hold`,{method:"POST",body:{selections:t,...n?{ttlMs:n}:{},...r?{replaceHoldId:r}:{},...this.referral?{referral:this.referral}:{}},labels:t.map(s=>s.label)})}bestAvailable(e,t,n,r,s){return this.request(`/pub/events/${encodeURIComponent(e)}/best-available`,{method:"POST",body:{qty:t,...n?{categoryKey:n}:{},...r?{zoneId:r}:{},...s?{ttlMs:s}:{},...this.referral?{referral:this.referral}:{}}})}resume(e,t){return this.request(`/pub/events/${encodeURIComponent(e)}/hold/resume`,{method:"POST",body:{holdId:t}})}release(e,t,n){return this.request(`/pub/events/${encodeURIComponent(e)}/release`,{method:"POST",body:{labels:t,holdId:n}})}extend(e,t,n){return this.request(`/pub/events/${encodeURIComponent(e)}/extend`,{method:"POST",body:{holdId:t,...n?{ttlMs:n}:{}}})}paymentOptions(e){return this.request(`/pub/events/${encodeURIComponent(e)}/payment-options`)}availability(e,t=!1){return this.request(`/pub/events/${encodeURIComponent(e)}/availability${t?"?live=1":""}`)}startCheckout(e,t){return this.request(`/pub/events/${encodeURIComponent(e)}/checkout`,{method:"POST",body:t})}orderStatus(e){return this.request(`/pub/orders/${encodeURIComponent(e)}/status`)}subscribeTicket(e){return this.request(`/pub/events/${encodeURIComponent(e)}/subscribe-tickets`,{method:"POST",body:{}})}subscribeUrl(e){let t=this.base.replace(/^http/,"ws"),n=new URLSearchParams({surface:"picker",viewerId:this.viewerId});return`${t}/pub/events/${encodeURIComponent(e)}/subscribe?${n}`}socketUrl(e){return this.accessScoped?"":this.subscribeUrl(e)}socketProtocols(e){return this.accessScoped?[]:[Qe]}createRealtime(e,t){return this.accessScoped?null:new xe({url:this.subscribeUrl(e),sink:t})}};var ne=require("@seatlayer/core");var St=require("@seatlayer/core");var Li=require("@seatlayer/core/core/color");function Le(i){if(!i)return null;let e=i.trim().toLowerCase();if(e==="white")return{r:255,g:255,b:255};if(e==="black")return{r:0,g:0,b:0};let t=/^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(e)?.[1];if(t){let r=t.length<=4?[...t].map(s=>`${s}${s}`).join(""):t;return{r:Number.parseInt(r.slice(0,2),16),g:Number.parseInt(r.slice(2,4),16),b:Number.parseInt(r.slice(4,6),16)}}let n=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*[\d.]+%?)?\s*\)$/i.exec(e);return n?{r:Math.max(0,Math.min(255,Number(n[1]))),g:Math.max(0,Math.min(255,Number(n[2]))),b:Math.max(0,Math.min(255,Number(n[3])))}:null}function Pi(i){return(0,Li.relativeLuminance255)([i.r,i.g,i.b])}function ye(i,e){let t=Le(i),n=Le(e);if(!t||!n)return null;let r=Math.max(Pi(t),Pi(n)),s=Math.min(Pi(t),Pi(n));return(r+.05)/(s+.05)}function Ze(i,e="#172033",t="#eef1f8"){return(ye(e,i)??0)>=(ye(t,i)??0)?e:t}function mc(i){return(0,Li.rgb255ToHex)(i.r,i.g,i.b)}function Rn(i,e,t){let n=Le(i),r=Le(e);if(!n||!r)return null;let s=Math.max(0,Math.min(1,t));return mc({r:n.r*s+r.r*(1-s),g:n.g*s+r.g*(1-s),b:n.b*s+r.b*(1-s)})}var Mi="#d8a425",fc=.18;function $r(i,e){let t=Rn(Mi,e,fc)??e;if((ye(Mi,t)??0)>=4.5)return Mi;for(let n=.15;n<=1;n+=.05){let r=Rn(Mi,i,1-n);if(r&&(ye(r,t)??0)>=4.5)return r}return Ze(t)}function zr(i,e,t,n){if((ye(i,t)??4.5)>=4.5&&(ye(i,n)??4.5)>=4.5)return i;if(!Le(i)||!Le(e))return e;for(let r=.15;r<=1;r+=.05){let s=Rn(i,e,1-r);if(s&&(ye(s,t)??0)>=4.5&&(ye(s,n)??0)>=4.5)return s}return e}function jr(i){return{"--sl-chrome":i?"#ffffff":"#556278","--sl-chrome-line":i?"rgba(23,32,51,.55)":"rgba(233,238,247,.55)"}}var Ur=["--sl-bg","--sl-surface","--sl-text","--sl-muted","--sl-line","--sl-accent-text","--sl-warn-text","--sl-chrome","--sl-chrome-line"];function Gr(i,e){let t=e??i["--sl-bg"],n=Le(t)?Ze(t)==="#172033":!1,r=Le(i["--sl-bg"])?Ze(i["--sl-bg"])==="#172033":!1;if(n===r)return null;let s=n?"#ffffff":"#1a2234",o=Ze(t),a=i["--sl-accent"];return{"--sl-bg":t,"--sl-surface":s,"--sl-text":o,"--sl-muted":n?"#667085":"#a5aec2","--sl-line":n?"rgba(23,32,51,.16)":"rgba(165,174,194,.24)","--sl-accent-text":zr(a,o,t,s),...jr(n),"--sl-warn-text":$r(o,s)}}var qr={light:{background:"#ffffff",surface:"#f6f7fb",text:"#172033",muted:"#667085",line:"rgba(23,32,51,.16)",map:"#e9edf4"},dark:{background:"#0f1522",surface:"#1a2234",text:"#eef1f8",muted:"#a5aec2",line:"rgba(165,174,194,.24)",map:"#0f1522"}};function gc(){try{return window.matchMedia?.("(prefers-color-scheme: dark)").matches===!0}catch{return!1}}function Jt(i){if(i)return i==="auto"?gc()?"dark":"light":i}function xt(i,e=i?.mode){if(i?.map)return i.map;let t=Jt(e);return t?{background:qr[t].map}:null}function Hi(i){let e;try{e=window.matchMedia?.("(prefers-color-scheme: dark)")}catch{return()=>{}}if(!e)return()=>{};let t=n=>i(n.matches);return typeof e.addEventListener=="function"?e.addEventListener("change",t):e.addListener?.(t),()=>{typeof e.removeEventListener=="function"?e.removeEventListener("change",t):e.removeListener?.(t)}}function kt(i,e,t){let n=t?qr[t]:null,r=e?.background??n?.background??i?.background??"#0f1522",s=Le(r)?Ze(r)==="#172033":!1,o=e?.surface??n?.surface??(s?"#ffffff":"#1a2234"),a=e?.accent??i?.accent??"#f4b740",l=i?.accentInk,c=e?.accentInk??(l&&(ye(l,a)??4.5)>=4.5?l:Ze(a,"#1a1200","#ffffff")),d=n?void 0:i?.textColor,p=e?.text??n?.text??(d&&(ye(d,r)??4.5)>=4.5&&(ye(d,o)??4.5)>=4.5?d:Ze(r));return{"--sl-accent":a,"--sl-accent-ink":c,"--sl-accent-text":zr(a,p,r,o),"--sl-warn-text":$r(p,o),"--sl-bg":r,"--sl-surface":o,"--sl-text":p,"--sl-muted":e?.muted??n?.muted??(s?"#667085":"#a5aec2"),"--sl-line":e?.line??n?.line??(s?"rgba(23,32,51,.16)":"rgba(165,174,194,.24)"),...jr(s),"--sl-scrim-ink":s?"rgba(16,22,36,1)":"rgba(4,7,13,1)","--sl-font":e?.fontFamily??i?.fontFamily??"-apple-system,BlinkMacSystemFont,'Segoe UI',Inter,sans-serif","--sl-radius":`${e?.radius??14}px`}}function bc(){return`<svg class="sl-boot-venue" viewBox="0 0 200 140" preserveAspectRatio="xMidYMid meet" aria-hidden="true" focusable="false"><g class="sl-boot-shells">${["M20 92a80 52 0 0 1 160 0v14a94 62 0 0 0-160 0z","M32 74a68 42 0 0 1 136 0v12a80 50 0 0 0-136 0z","M46 58a54 32 0 0 1 108 0v10a64 38 0 0 0-108 0z"].map(e=>`<path d="${e}" />`).join("")}</g><rect class="sl-boot-stage" x="62" y="16" width="76" height="16" rx="4" /></svg>`}function Kr(i,e,t){let n=document.createElement("div");n.className="sl-picker",n.tabIndex=-1,n.lang=(0,St.getLocale)(),n.dir=(0,St.localeDirection)(),i.appendChild(n),Object.entries(kt(void 0,t)).forEach(([s,o])=>n.style.setProperty(s,o)),n.innerHTML=`
41
+ `});var uh={};Lo(uh,{ApiError:()=>G,BuyerAccessContext:()=>ue,BuyerAccessUnavailableError:()=>re,BuyerRealtimeClient:()=>ke,EmbeddedDesigner:()=>tn,PerformanceGroupDestroyedError:()=>Z,PerformanceGroupPicker:()=>Tn,SEATING_CHART_CALLBACK_PROPS:()=>Yn,SEATING_CHART_HANDLE_METHODS:()=>qn,SEATING_CHART_IDENTITY_PROPS:()=>Kn,SEATING_CHART_VALUE_PROPS:()=>Wn,SeasonApiError:()=>z,SeasonPicker:()=>An,SeasonPublicSessionRefused:()=>pi,SeasonRecoveryTimeoutError:()=>mi,SeatPicker:()=>Ue,SeatingChart:()=>en,attachPickerFrame:()=>ql,bindSeatingChartHandle:()=>rs,buildSeatingChartOptions:()=>ss,createBuyerAccessContext:()=>Lt,createControllerSink:()=>vt,parseTicketOfferAvailability:()=>on,shortOperationReference:()=>Bt,ticketOfferPrices:()=>rn});module.exports=Jl(uh);var j=require("@seatlayer/core");var Ze="seatlayer.v1";function ec(i){let e=typeof i.default=="string"?i.default:"free",t={};if(i.seats&&typeof i.seats=="object")for(let[n,o]of Object.entries(i.seats))typeof o=="string"&&o!==e&&(t[n]=o);return{default:e,exceptions:t}}function tc(i,e){if(!i||i.default!==e.default)return null;let t=[];for(let[n,o]of Object.entries(e.exceptions))i.exceptions[n]!==o&&t.push({label:n,status:o});for(let n of Object.keys(i.exceptions))n in e.exceptions||t.push({label:n,status:e.default});return t}function ic(i,e){for(let t of e)t.status===i.default?delete i.exceptions[t.label]:i.exceptions[t.label]=t.status}function Io(i){if(/(?:^|[?&#])(?:token|access_token|bearer|authorization|ticket|tkt|bse)=/i.test(i))throw new Error("seatlayer: refusing to open a socket with a credential in the URL");if(/\bbse_[A-Za-z0-9._-]+/.test(i))throw new Error("seatlayer: refusing to open a socket with a credential in the URL")}var ke=class{constructor(e){this.ws=null;this.stopped=!0;this.attempt=0;this.reconnectTimer=null;this.pingTimer=null;this.pongTimer=null;this.resumeTimer=null;this.projection=null;this.version=null;this.v1=!1;this.useQueryMarker=!1;this.hidden=null;this.closedSections=null;this.opts=e,Io(e.url)}get protocol(){return this.ws?this.v1?"v1":"legacy":null}get snapshotVersion(){return this.version}start(){this.stopped&&(this.stopped=!1,this.connect())}stop(){this.stopped=!0,this.clearTimers();let e=this.ws;if(this.ws=null,e){e.onopen=null,e.onmessage=null,e.onclose=null,e.onerror=null;try{e.close()}catch{}}}restart(){this.stop(),this.projection=null,this.version=null,this.attempt=0,this.start()}async connect(){if(this.stopped)return;let e=[Ze];if(this.opts.mintTicket){let r;try{r=await this.opts.mintTicket()}catch(s){this.reportIfAccessError(s),this.scheduleReconnect();return}if(this.stopped)return;r?.protocols?.length?(e=[...r.protocols],e.includes(Ze)||e.unshift(Ze)):r?.ticket&&(e=[Ze,`tkt.${r.ticket}`])}let t=this.version!==null;t&&e.push(`sv.${this.version}`);let n=this.useQueryMarker?`${this.opts.url}${this.opts.url.includes("?")?"&":"?"}pv=1`:this.opts.url;Io(n);let o;try{o=(this.opts.socketFactory??((s,a)=>new WebSocket(s,a)))(n,e)}catch{this.scheduleReconnect();return}this.ws=o,o.onopen=()=>{this.ws===o&&(this.attempt=0,this.v1=o.protocol===Ze,this.v1||(this.useQueryMarker=!0),this.startKeepalive(o),t?this.resumeTimer=setTimeout(()=>{this.resumeTimer=null,this.opts.sink.resync()},5e3):this.resumeTimer=setTimeout(()=>{this.resumeTimer=null,this.opts.sink.resync({reason:"connect"})},5e3))},o.onmessage=r=>{if(this.ws!==o)return;let s;try{s=JSON.parse(typeof r.data=="string"?r.data:"")}catch{return}!s||typeof s!="object"||this.handleFrame(s)},o.onclose=r=>{if(this.ws===o){if(this.ws=null,this.clearTimers(),r?.code===4401){if(r.reason==="access_expired"){this.scheduleReconnect();return}this.stopped=!0,this.opts.onAccessUnavailable?.({reason:"revoked",code:"access_revoked",retryable:!1});return}this.scheduleReconnect()}},o.onerror=()=>{try{o.close()}catch{}}}handleFrame(e){let t=typeof e.type=="string"?e.type:"";if(e.protocol===1&&(this.v1=!0),typeof e.snapshotVersion=="number"&&(this.version=e.snapshotVersion),t==="pong"){this.clearPongTimer();return}if(Array.isArray(e.hidden)||Array.isArray(e.closed)){let n=Array.isArray(e.hidden)?e.hidden:[],o=Array.isArray(e.closed)?e.closed:[],r=n.join("\0"),s=o.join("\0");(r!==this.hidden||s!==this.closedSections)&&(this.hidden=r,this.closedSections=s,this.opts.sink.onSections?.(n,o,{withInventory:t==="snapshot"||!!e.seats}))}if(t!=="hidden"){if(t==="presence"){this.opts.sink.onPresence?.({shoppingSessions:Number(e.shoppingSessions)||0,activeHolds:Number(e.activeHolds)||0});return}if(t!=="allocation"){if(t==="snapshot"||!t&&e.seats){this.answered();let n=ec(e),o=tc(this.projection,n);this.projection=n,o===null?this.opts.sink.applyProjection?this.opts.sink.applyProjection(n):this.opts.sink.resync():o.length&&this.opts.sink.applyStatuses(o);return}if(t==="delta"&&Array.isArray(e.changes)){this.answered();let n=e.changes.filter(o=>typeof o?.label=="string"&&typeof o?.status=="string").map(o=>({label:o.label,status:o.status}));if(!n.length)return;this.projection&&ic(this.projection,n),this.opts.sink.applyStatuses(n)}}}}answered(){this.resumeTimer&&(clearTimeout(this.resumeTimer),this.resumeTimer=null)}reportIfAccessError(e){let t=e?.reason;e?.name==="BuyerAccessUnavailableError"&&(this.stopped=!0,this.opts.onAccessUnavailable?.({reason:t??"invalid",code:e.code,status:e.status,retryable:t==="paused"}))}startKeepalive(e){this.pingTimer=setInterval(()=>{if(this.ws===e){try{e.send(JSON.stringify({type:"ping"}))}catch{return}this.clearPongTimer(),this.pongTimer=setTimeout(()=>{this.pongTimer=null;try{e.close()}catch{}},1e4)}},25e3)}scheduleReconnect(){if(this.stopped||this.reconnectTimer)return;let e=Math.min(this.attempt++,5),t=Math.min(1e3*2**e,15e3),n=Math.random()*t;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}clearPongTimer(){this.pongTimer&&(clearTimeout(this.pongTimer),this.pongTimer=null)}clearTimers(){this.pingTimer&&clearInterval(this.pingTimer),this.pingTimer=null,this.clearPongTimer(),this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null,this.resumeTimer&&clearTimeout(this.resumeTimer),this.resumeTimer=null}};function nc(i){return i==="blocked"?"not_for_sale":i==="held"||i==="booked"||i==="free"||i==="not_for_sale"?i:"free"}function vt(i,e={}){let t=n=>{let o=i.tableSelection(n);if(o)return o.physicalSeatIds;let r=i.idForLabel(n);return r?[r]:[]};return{applyStatuses(n){let o=new Set([...i.currentHold()?.labels??[],...e.ownLabels?.()??[]]),r={free:[],held:[],booked:[],not_for_sale:[]},s=[],a=[],l=new Map(i.getSelection().map(c=>[c.label,c.id]));for(let c of n){let d=t(c.label);if(!d.length)continue;let p=nc(c.status);if(r[p].push(...d),e.flashOnLiveChange&&p!=="free"&&!o.has(c.label)&&d.some(u=>i.getStatus(u)==="free")){let u=p==="held"?"#f4b740":"#f43f5e";for(let h of d)s.push({id:h,color:u})}p!=="free"&&!o.has(c.label)&&l.has(c.label)&&a.push(c.label)}for(let c of["free","held","booked","not_for_sale"])r[c].length&&i.setStatus(r[c],c);for(let c of s)i.flashSeat(c.id,c.color);if(a.length){let c=a.flatMap(p=>t(p));c.length&&i.deselect(c);let d=n.some(p=>p.status==="blocked"&&a.includes(p.label));e.onSelectedObjectUnavailable?.(a,d?"ineligible":"taken")}e.onStatusChange?.()},...i.applyProjection?{applyProjection:n=>{i.applyProjection(n)}}:{},async resync(n){await(i.resync?i.resync(n):i.refresh())},onSections(n,o,r){r?.withInventory||(i.resync?i.resync({reason:"frame"}):i.refresh()),e.onSections?.(n,o,r)}}}var G=class extends Error{constructor(e,t,n,o,r,s){super(t),this.name="ApiError",this.status=e,this.code=n,this.conflicts=o,this.reason=r,this.retryAfterS=s}},Oo=10,_o=1;function xi(i,e){let t=(i??"").trim();if(t){let n=Number(t);if(Number.isFinite(n)&&n>=0)return Math.ceil(n);let o=Date.parse(t);if(Number.isFinite(o))return Math.max(0,Math.ceil((o-Date.now())/1e3))}if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return Math.ceil(e)}var oc={seat_conflict:"taken",conflict:"taken",channel_assignment_conflict:"ineligible",allocation_exhausted:"exhausted"},Be=class{constructor(e,t={}){this.base=e;this.viewerId=typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`viewer_${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`;this.access=t.access,this.onObjectUnavailable=t.onObjectUnavailable;let n=t.referral?.trim();this.referral=n?n.slice(0,120):void 0}get accessScoped(){return!!this.access?.configured}async request(e,t={},n={}){let o=t.method??"GET",r={},s;t.body!==void 0&&(r["Content-Type"]="application/json",s=JSON.stringify(t.body));let a=await this.access?.authorization(n.auth?"unauthorized":"initial");a&&(r.Authorization=a);let l=await fetch(`${this.base}${e}`,{method:o,headers:r,body:s,credentials:"omit"}),d=(l.headers.get("content-type")??"").includes("application/json")?await l.json().catch(()=>null):null;if(!l.ok){let p=d,u=p?.code??p?.error;if(this.access?.configured&&(l.status===401||l.status===403||l.status===422)&&await this.access.handleFailure(l.status,u)&&!n.auth)return this.request(e,t,{...n,auth:!0});if(l.status===409){let f=u?oc[u]:void 0,b=p?.conflicts?.map(k=>k.label)??t.labels??[];f&&this.onObjectUnavailable?.({labels:b,reason:f,code:u})}let h;if(l.status===429&&(h=xi(l.headers.get("Retry-After"),p?.retryAfterSeconds)??_o,o==="GET"&&!n.rateLimit&&h<=Oo))return await new Promise(f=>setTimeout(f,h*1e3)),this.request(e,t,{...n,rateLimit:!0});throw new G(l.status,p?.error??`request_failed_${l.status}`,u,p?.conflicts,p?.reason,h)}return d}async requestBlob(e,t={}){let n={},o=await this.access?.authorization(t.auth?"unauthorized":"initial");o&&(n.Authorization=o);let r=await fetch(`${this.base}${e}`,{method:"GET",headers:n,credentials:"omit"});if(r.ok)return r.blob();let a=(r.headers.get("content-type")??"").includes("application/json")?await r.json().catch(()=>null):null,l=a?.code??a?.error;if(this.access?.configured&&(r.status===401||r.status===403||r.status===422)&&await this.access.handleFailure(r.status,l)&&!t.auth)return this.requestBlob(e,{...t,auth:!0});let c;if(r.status===429&&(c=xi(r.headers.get("Retry-After"),a?.retryAfterSeconds)??_o,!t.rateLimit&&c<=Oo))return await new Promise(d=>setTimeout(d,c*1e3)),this.requestBlob(e,{...t,rateLimit:!0});throw new G(r.status,a?.error??`request_failed_${r.status}`,l,void 0,void 0,c)}chart(e){return this.request(`/pub/events/${encodeURIComponent(e)}/chart`)}eventConfiguration(e){return this.request(`/pub/events/${encodeURIComponent(e)}/event-configuration`)}reportViewEvidence(e,t){return this.request(`/pub/events/${encodeURIComponent(e)}/view-evidence-reports`,{method:"POST",body:{seatId:t.seatId,...t.evidenceId?{evidenceId:t.evidenceId}:{},...t.message?{message:t.message}:{}}})}asset(e,t){return/^[a-zA-Z0-9._-]+$/.test(t)?this.requestBlob(`/pub/events/${encodeURIComponent(e)}/assets/${encodeURIComponent(t)}`):Promise.reject(new G(404,"not_found","not_found"))}objects(e){return this.request(`/pub/events/${encodeURIComponent(e)}/objects?compact=1`)}hold(e,t,n,o){return this.request(`/pub/events/${encodeURIComponent(e)}/hold`,{method:"POST",body:{selections:t,...n?{ttlMs:n}:{},...o?{replaceHoldId:o}:{},...this.referral?{referral:this.referral}:{}},labels:t.map(r=>r.label)})}bestAvailable(e,t,n,o,r){return this.request(`/pub/events/${encodeURIComponent(e)}/best-available`,{method:"POST",body:{qty:t,...n?{categoryKey:n}:{},...o?{zoneId:o}:{},...r?{ttlMs:r}:{},...this.referral?{referral:this.referral}:{}}})}resume(e,t){return this.request(`/pub/events/${encodeURIComponent(e)}/hold/resume`,{method:"POST",body:{holdId:t}})}release(e,t,n){return this.request(`/pub/events/${encodeURIComponent(e)}/release`,{method:"POST",body:{labels:t,holdId:n}})}extend(e,t,n){return this.request(`/pub/events/${encodeURIComponent(e)}/extend`,{method:"POST",body:{holdId:t,...n?{ttlMs:n}:{}}})}paymentOptions(e){return this.request(`/pub/events/${encodeURIComponent(e)}/payment-options`)}availability(e,t=!1){return this.request(`/pub/events/${encodeURIComponent(e)}/availability${t?"?live=1":""}`)}startCheckout(e,t){return this.request(`/pub/events/${encodeURIComponent(e)}/checkout`,{method:"POST",body:t})}orderStatus(e){return this.request(`/pub/orders/${encodeURIComponent(e)}/status`)}subscribeTicket(e){return this.request(`/pub/events/${encodeURIComponent(e)}/subscribe-tickets`,{method:"POST",body:{}})}subscribeUrl(e){let t=this.base.replace(/^http/,"ws"),n=new URLSearchParams({surface:"picker",viewerId:this.viewerId});return`${t}/pub/events/${encodeURIComponent(e)}/subscribe?${n}`}socketUrl(e){return this.accessScoped?"":this.subscribeUrl(e)}socketProtocols(e){return this.accessScoped?[]:[Ze]}createRealtime(e,t){return this.accessScoped?null:new ke({url:this.subscribeUrl(e),sink:t})}};var oe=require("@seatlayer/core");var Et=require("@seatlayer/core");var ce=require("@seatlayer/core"),Wo=require("@seatlayer/core/core/seatConfidence");var $o=require("@seatlayer/core"),zo=require("@seatlayer/core/core/cdnAsset");var rc=/^data:image\/(?:png|jpe?g|webp|gif|avif);base64,[a-z0-9+/]+={0,2}$/i,sc=/[\s"'<>`\\]/;function ac(i){return i.startsWith("//")?!1:i.startsWith("/")||i.startsWith("./")||i.startsWith("../")}function lc(){try{let i=typeof location>"u"?"":location.origin;return i&&i!=="null"?i:null}catch{return null}}function wt(i){if(typeof i!="string"||!i||i.length>2e6||i!==i.trim())return!1;if(i.startsWith("data:"))return rc.test(i);if(sc.test(i))return!1;let e=lc();if(ac(i)){if(!e)return!1;try{let t=new URL(i,e);return t.origin===e&&!t.username&&!t.password}catch{return!1}}try{let t=new URL(i);return t.username||t.password?!1:t.protocol==="https:"||e!=null&&t.origin===e}catch{return!1}}var fc=require("@seatlayer/core/core/cdnAsset");function g(i,e){let t=(0,$o.t)(i);return t===i?e:t}function Qe(){return globalThis.matchMedia?.("(pointer: coarse)").matches??!1?g("picker.dragToLookTouch","Drag to look \xB7 pinch to zoom \xB7 tap \u2715 to close"):g("picker.dragToLookMouse","Drag to look \xB7 pinch or scroll to zoom \xB7 Esc to close")}function Si(){return{rotate:g("picker.dragToRotateVenue","Drag to rotate the venue"),move:g("picker.dragToMoveVenue","Drag to move the venue"),zoomIn:g("picker.zoomIn","Zoom in"),zoomOut:g("picker.zoomOut","Zoom out"),fitView:g("picker.fitWholeVenue","Show whole venue")}}function jo(i,e){let t=e?i.toLocaleUpperCase(e):i.toLocaleUpperCase(),n=e?i.toLocaleLowerCase(e):i.toLocaleLowerCase();if(i!==t||t===n)return i;let o=[...n][0]??"";return(e?o.toLocaleUpperCase(e):o.toLocaleUpperCase())+n.slice(o.length)}function Go(i){if(typeof i=="string"){let e=document.querySelector(i);if(!e)throw new Error(`seatmap: container "${i}" not found`);return e}if(!(i instanceof HTMLElement))throw new Error("seatmap: container must be a CSS selector or an HTMLElement");return i}function B(i){return String(i??"").replace(/[&<>"']/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[e])}function Uo(i,e,t){let n=e.find(r=>wt(r))??null;if(i.replaceChildren(),!n)return i.textContent=t.slice(0,1).toUpperCase(),null;let o=document.createElement("img");return o.alt="",o.referrerPolicy="no-referrer",o.src=n,i.appendChild(o),n}var xt=null;function ki(){if(xt!==null)return xt;try{if(typeof document>"u")return xt=!1;xt=!!document.createElement("canvas").getContext("webgl2")}catch{xt=!1}return xt}function Ln(i){return(0,zo.cdnAssetUrl)(i)}var Xt=null;function Zt(){return Xt||(Xt=(typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?import(Ln("seatlayer-view3d.mjs")):import("@seatlayer/core/view3d")).catch(e=>{throw Xt=null,e}),Xt)}function Ti(){(typeof navigator>"u"?void 0:navigator.connection)?.saveData||Zt().catch(()=>{})}async function Ei(){return typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?import(Ln("seatlayer-panorama.mjs")):import("@seatlayer/core")}async function Ci(){return typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?import(Ln("seatlayer-checkout.mjs")):Promise.resolve().then(()=>(Vo(),Fo))}function qo(i){return i==="unavailable_for_event"||i==="payments_off_for_event"?i:"not_configured"}function Ai(i,e,t){let n={month:"short",day:"numeric",hour:"numeric",minute:"2-digit"},o=new Date(i);if(e)try{return o.toLocaleString(t,{...n,timeZone:e})}catch{}return o.toLocaleString(t,n)}function Hn(i){return String(i??"\u2014").replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[e])}function E(i){return String(i??"").replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[e])}function Rn(i){return i?(0,ce.seatNoteRowModel)(i).map(e=>({...e,title:g(e.titleKey,e.titleFallback)})):[]}function Yo(i){return Rn(i).map(e=>e.title)}function Je(i,e={}){let t=Rn(i);if(!t.length)return"";let n=e.compact?15:17,o=t.map(r=>`<div class="sl-note sl-note-${E(r.tone)}"><span class="sl-note-i">${(0,ce.seatTypeIconSvg)(r.icon,{size:n})}</span><span class="sl-note-t"><b>${E(r.title)}</b>`+(r.note?`<span class="sl-note-n">${E(r.note)}</span>`:"")+"</span></div>").join("");return`<div class="sl-notes${e.compact?" compact":""}">${o}</div>`}function Xo(i){return Rn(i).map(e=>{let t=E(e.note?`${e.title}: ${e.note}`:e.title);return`<span class="sl-cx-mark sl-cx-mark-${E(e.tone)}" role="img" aria-label="${t}" title="${t}">${(0,ce.seatTypeIconSvg)(e.icon,{size:13})}</span>`}).join("")}function Pi(i){let e=[];return i?.restrictedView&&e.push(g("picker.restrictedView","Restricted view")),i?.obstructedView&&e.push(g("picker.obstructedView","Obstructed view")),e}function In(i,e){if(!i)return"";let t=e?g("picker.viewFromThisSeat","View from this seat"):g("picker.seeItIn3d","See it in 3D"),n=e?g("picker.viewFromHere","View from here"):t;return`<button type="button" class="sl-confirm-3d" aria-label="${t}"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2l9 5v10l-9 5-9-5V7z"/><path d="M12 12l9-5M12 12v10M12 12L3 7"/></svg><span>${n}</span></button>`}function Zo(i){if(!i)return"";let e=i.previous.label||i.previous.id,t=i.next.label||i.next.id;return`<span class="sl-seccard-nav" aria-label="${g("picker.browseSections","Browse sections")}"><button type="button" data-section-nav="${B(i.previous.id)}" aria-label="${g("picker.previousSection","Previous section")}: ${B(e)}" title="${B(e)}">\u2190</button><button type="button" data-section-nav="${B(i.next.id)}" aria-label="${g("picker.nextSection","Next section")}: ${B(t)}" title="${B(t)}">\u2192</button></span>`}function Qo(i,e){if(!e)return"";let t=e,n=t.includes(i.id),o=n?t.length>1?g("picker.openComparison","Open comparison"):g("picker.savedForComparison","Saved for comparison"):t.length?g("picker.compareWithSaved","Compare with saved"):g("picker.saveToCompare","Save to compare");return`<button type="button" class="sl-confirm-compare"${n&&t.length===1?" disabled":""}><span aria-hidden="true">\u21C4</span><span>${E(o)}</span></button>`}function Jo(i,e,t){if(!t)return"";let n=(0,Wo.seatConfidenceDisclosure)(i.confidenceEvidence),o=n.modeledTarget??n.reality;return`<button type="button" class="sl-confirm-confidence" aria-label="Open seat confidence passport for ${E(i.displayLabel??i.label)}"><span><em>${E(e)}</em><strong>${E(n.headline)}</strong><small>${E(o)}</small></span><b>Passport</b></button>`}function X(i){let e=i?.rowLabel,t=i?.sectionLabel;if(!e||!t)return e;for(let n of["-"," ","\xB7","/","_"]){let o=`${t}${n}`;if(e.startsWith(o)&&e.length>o.length)return e.slice(o.length)}return(0,ce.compactRowLabel)(e,t)}function gc(i){switch(i){case"paused":return{title:g("picker.accessPausedTitle","These seats are on hold right now"),body:g("picker.accessPausedBody","The organizer has paused this selection. Try again in a few minutes."),action:g("picker.accessRetry","Try again")};case"revoked":return{title:g("picker.accessRevokedTitle","This access link is no longer active"),body:g("picker.accessRevokedBody","Ask whoever sent you here for a new link to keep booking these seats."),action:g("picker.accessRefresh","Refresh")};case"no_token":case"provider_failed":return{title:g("picker.accessExpiredTitle","The seat map timed out"),body:g("picker.accessExpiredBody","Any seats you\u2019re holding stay held. Refresh to see what\u2019s available now."),action:g("picker.accessRefresh","Refresh")};default:return{title:g("picker.accessInvalidTitle","We couldn\u2019t verify your access"),body:g("picker.accessInvalidBody","You can still book anything shown as available. Contact whoever sent you here for access to the rest."),action:g("picker.accessRefresh","Refresh")}}}var bc=6;function er(i,e,t){let n=Hn;return[i?.sectionLabel?`<div class="sl-confirm-field sl-confirm-sec${i.sectionLabel.length>bc?" sl-confirm-sec-long":""}"><span class="sl-confirm-key">${g("picker.section","Section")}</span><span class="sl-confirm-value">${n(i.sectionLabel)}</span></div>`:"",i?.rowLabel||i?.objectType==="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${n(t)}</span><span class="sl-confirm-value">${n(X(i)??i?.displayLabel??e)}</span></div>`:"",i?.objectType!=="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${g("picker.seat","Seat")}</span><span class="sl-confirm-value">${n(i?.seatNumber??i?.displayLabel??e)}</span></div>`:""].filter(Boolean).join("")}function tr(i,e,t){let n=Hn,o=i?.objectType==="booth",r=i?.objectType==="table"&&!!i?.bookingMode,s=o||r||!i?.seatNumber,a=i?.sectionLabel??(s?void 0:i?.displayLabel),l=r?`${g("picker.guests","Guests")} ${i?.bookingMode==="variable"?`${i?.minOccupancy}\u2013${i?.maxOccupancy}`:i?.capacity}`:void 0,d=(s?[l,a?i?.rowLabel??i?.displayLabel:void 0]:[i?.rowLabel?`${t} ${X(i)??""}`.trim():void 0,`${g("picker.seat","Seat")} ${i?.seatNumber??e}`]).filter(Boolean).join(" \xB7 ");return(a?`<span class="sl-confirm-place">${n(a)}</span>`:"")+(d?`<span class="sl-confirm-pos">${a?" \xB7 ":""}${n(d)}</span>`:"")+(a||d?"":`<span class="sl-confirm-pos">${n(e)}</span>`)}function ir(i,e){if(!i)return"";let t=e?g("picker.viewFromThisSeat","View from this seat"):g("picker.seeItIn3d","See it in 3D");return`<button type="button" class="sl-confirm-pill sl-confirm-3dpill" aria-label="${t}" title="${t}"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2l9 5v10l-9 5-9-5V7z"/><path d="M12 12l9-5M12 12v10M12 12L3 7"/></svg><span aria-hidden="true">3D</span></button>`}function nr(i,e){if(!i||e)return"";let t=g("picker.seeItIn3d","See it in 3D");return`<button type="button" class="sl-confirm-3drow" aria-label="${t}" title="${t}"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2l9 5v10l-9 5-9-5V7z"/><path d="M12 12l9-5M12 12v10M12 12L3 7"/></svg><span aria-hidden="true">3D</span></button>`}function Ko(i){return i.buyerMessage?.trim()||(i.restriction==="companion"?g("picker.companionRequiresWheelchair","Requires the adjacent wheelchair place"):void 0)}function or(i,e,t){let n=Hn;if(i.length>1)return`<fieldset class="sl-confirm-tiers"><legend>${g("picker.ticketType","Ticket type")}</legend>`+i.map(s=>{let a=Ko(s);return`<button type="button" class="sl-confirm-tier" data-confirm-tier="${n(s.id)}" aria-pressed="${s.id===e}"><span class="sl-confirm-tier-copy"><span class="sl-confirm-tier-name">${n(s.name)}</span>`+(a?`<small class="sl-confirm-tier-note">${n(a)}</small>`:"")+`</span><span class="sl-confirm-tier-price">${n(t(s))}</span></button>`}).join("")+"</fieldset>";let o=i[0],r=o?Ko(o):void 0;return r?`<p class="sl-confirm-tier-note">${n(r)}</p>`:""}function rr(i){return`<span class="sl-seccard-dot" style="background:${E(i.color)}"></span><span class="sl-seccard-name">${E(i.label)}</span><span class="sl-seccard-left" data-full="${E(i.leftLabel)}" data-short="${E(i.leftShortLabel??i.leftLabel)}">${E(i.leftLabel)}</span>`+i.nav+i.close}function sr(i){return`<div class="sl-seccard-head"><span class="sl-seccard-dot" style="background:${E(i.color)}"></span><span class="sl-seccard-name">${E(i.label)}</span>`+(i.showPrice?`<span class="sl-seccard-price">${E(i.priceLabel)}</span>`:"")+i.close+`</div><div class="sl-seccard-zone">${i.zoneLabel?`${E(i.zoneLabel)} \xB7 `:""}<span class="sl-seccard-left">${E(i.leftLabel)}</span></div>`+(i.entrance?`<div class="sl-seccard-entrance">${E(i.entrance)}</div>`:"")+(i.mix?`<div class="sl-seccard-mix">${i.mix}</div>`:"")+`<div class="sl-seccard-foot"><button type="button" class="sl-seccard-overview">\u2190 ${E(i.overviewLabel)}</button>`+i.nav+`<span class="sl-seccard-hint">${E(i.hint)}</span></div>`}function ar(i){return`<span class="sl-seccard-mix-item${i.dim?" sl-dim":""}"><span class="sl-seccard-mix-dot" style="background:${E(i.color)}"></span>${E(i.label)} <span class="sl-seccard-mix-price">${E(i.rangeLabel)}</span></span>`}function lr(i){return'<div class="sl-confirm-grid">'+i.identityFields+`</div><div class="sl-confirm-cat"><span class="sl-confirm-cat-name">${E(i.categoryLabel)}</span>`+(i.priceLabel?`<span class="sl-confirm-price">${E(i.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-id">'+i.marker+`<span class="sl-confirm-dot" style="background:${E(i.categoryColor)}" aria-hidden="true"></span><span class="sl-sr">${E(i.categoryLabel)}</span><span class="sl-confirm-who">`+i.identity+"</span>"+(i.priceLabel?`<span class="sl-confirm-idprice">${E(i.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-body">'+i.commercial+i.tierChoices+i.groupDates+i.wheelchair+(i.thumb||i.see3dPill?`<div class="sl-confirm-strip">${i.thumb}<span class="sl-confirm-pills">${i.see3dPill}</span></div>`:"")+i.inspect+'<div class="sl-confirm-row">'+(i.see3dRow??"")+`<button type="button" class="sl-confirm-cancel">${E(i.cancelLabel)}</button><button type="button" class="sl-confirm-add"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12.5l4 4L19 7"/></svg><span class="sl-confirm-add-t">${E(i.selectLabel)}</span></button></div></div>`}function cr(i,e){let t=B,{variable:n}=e;return`<section class="sl-table-dialog" role="dialog" aria-modal="true" aria-labelledby="sl-table-title" aria-describedby="sl-table-copy"><div class="sl-table-head"><div class="sl-table-eyebrow">${t(n?(0,ce.t)("picker.flexiblePartyTypeWord",{typeWord:e.typeWord}):(0,ce.t)("picker.wholeTypeWord",{typeWord:e.typeWord}))}</div><h2 class="sl-table-title" id="sl-table-title">${t(i.displayLabel??i.label)}</h2><p class="sl-table-copy" id="sl-table-copy">${t(n?g("picker.chooseGuestsCopy","Choose how many guests will sit together. This table is held exclusively for your party."):(0,ce.t)("picker.allPlacesBookedTogether",{count:i.capacity}))}</p></div><div class="sl-table-body"><div class="sl-table-summary"><span>${t(e.categoryLabel)}</span>`+(e.suppressPricing?"":`<b data-table-unit>${t((0,ce.t)("picker.perGuestPrice",{price:e.unitPrice}))}</b>`)+`<span class="muted">${t(g("picker.tableCapacity","Table capacity"))}</span><span>${t((0,ce.t)("picker.guestsCount",{count:i.capacity}))}</span>`+(e.suppressPricing?"":`<span class="muted">${t(g("picker.total","Total"))}</span><b data-table-total></b>`)+"</div>"+(n?`<label class="sl-table-qtylabel" id="sl-table-qty-label">${t(g("picker.numberOfGuests","Number of guests"))}</label><div class="sl-table-stepper" role="group" aria-labelledby="sl-table-qty-label"><button type="button" data-table-step="-1" aria-label="${t(g("picker.fewerGuests","Fewer guests"))}">\u2212</button><output aria-live="polite" data-table-qty>${i.quantity}</output><button type="button" data-table-step="1" aria-label="${t(g("picker.moreGuests","More guests"))}">+</button></div><div class="sl-table-range">${t((0,ce.t)("picker.chooseMinMaxGuests",{min:i.minOccupancy,max:i.maxOccupancy}))}</div>`:`<input type="hidden" data-table-qty value="${i.capacity}">`)+`<div class="sl-table-actions"><button type="button" class="sl-table-cancel">${t((0,ce.t)("common.cancel"))}</button><button type="button" class="sl-table-confirm">${t(e.held?g("picker.updateTable","Update table"):n?g("picker.selectTable","Select table"):g("picker.selectWholeTable","Select whole table"))}</button></div></div></section>`}function dr(i,e){let t=gc(i),n=document.createElement("div");n.className="sl-interrupt sl-access",n.setAttribute("role","status"),n.setAttribute("aria-live","polite");let o=document.createElement("div");o.className="sl-interrupt-card";let r=document.createElement("div");r.className="sl-interrupt-title",r.textContent=t.title;let s=document.createElement("div");s.className="sl-interrupt-body",s.textContent=t.body,o.append(r,s);let a=document.createElement("div");a.className="sl-interrupt-actions";let l=document.createElement("button");l.type="button",l.className="sl-interrupt-act";let c=document.createElement("span");c.className="sl-interrupt-act-icon",c.setAttribute("aria-hidden","true"),c.textContent="\u21BB";let d=document.createElement("span");return d.textContent=t.action,l.append(c,d),l.addEventListener("click",async()=>{n.classList.add("is-reloading"),l.disabled=!0;try{await e()}catch{}finally{n.isConnected&&(n.classList.remove("is-reloading"),l.disabled=!1)}}),a.appendChild(l),o.appendChild(a),n.appendChild(o),n}function pr(i,e){return`<div class="sl-a11yhead"><span class="sl-a11yhead-t">${E(i)}</span><button type="button" class="sl-a11yclose" data-a11y-close aria-label="${B(e)}"><svg viewBox="0 0 24 24" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></button></div>`}function hr(i){return i.map(e=>{let t=`<button type="button" role="switch" class="sl-a11yrow${e.className?` ${e.className}`:""}${e.on?" on":""}" data-a11y-row="${E(e.key)}" aria-checked="${e.on}" aria-pressed="${e.on}"`+(e.disabled?' disabled aria-disabled="true"':"")+`><span class="sl-a11yrow-i" aria-hidden="true">${e.iconHtml}</span><span class="sl-a11yrow-t"><span class="sl-a11yrow-l">${E(e.label)}</span></span>`+(e.count?`<span class="sl-a11yrow-c">${E(e.count)}</span>`:"")+'<span class="sl-a11yrow-s" aria-hidden="true"></span></button>';return e.note?`<div class="sl-a11yrow-w">${t}${St({id:`sl-info-${B(e.key.replace(/[^A-Za-z0-9]+/g,"-"))}`,label:e.note,text:E(e.note)})}</div>`:t}).join("")}function St(i){return`<span class="sl-info"${i.wrapRef?` data-ref="${B(i.wrapRef)}"`:""}><button type="button" class="sl-info-btn" data-sl-info aria-label="${B(i.label)}" aria-describedby="${B(i.id)}" aria-expanded="false"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 11v5"/><path d="M12 8h.01"/></svg></button><span class="sl-info-pop" role="tooltip" id="${B(i.id)}"${i.ref?` data-ref="${B(i.ref)}"`:""}>${i.text}</span></span>`}var Hi=require("@seatlayer/core/core/color");function Le(i){if(!i)return null;let e=i.trim().toLowerCase();if(e==="white")return{r:255,g:255,b:255};if(e==="black")return{r:0,g:0,b:0};let t=/^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(e)?.[1];if(t){let o=t.length<=4?[...t].map(r=>`${r}${r}`).join(""):t;return{r:Number.parseInt(o.slice(0,2),16),g:Number.parseInt(o.slice(2,4),16),b:Number.parseInt(o.slice(4,6),16)}}let n=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*[\d.]+%?)?\s*\)$/i.exec(e);return n?{r:Math.max(0,Math.min(255,Number(n[1]))),g:Math.max(0,Math.min(255,Number(n[2]))),b:Math.max(0,Math.min(255,Number(n[3])))}:null}function Mi(i){return(0,Hi.relativeLuminance255)([i.r,i.g,i.b])}function we(i,e){let t=Le(i),n=Le(e);if(!t||!n)return null;let o=Math.max(Mi(t),Mi(n)),r=Math.min(Mi(t),Mi(n));return(o+.05)/(r+.05)}function et(i,e="#172033",t="#eef1f8"){return(we(e,i)??0)>=(we(t,i)??0)?e:t}function yc(i){return(0,Hi.rgb255ToHex)(i.r,i.g,i.b)}function On(i,e,t){let n=Le(i),o=Le(e);if(!n||!o)return null;let r=Math.max(0,Math.min(1,t));return yc({r:n.r*r+o.r*(1-r),g:n.g*r+o.g*(1-r),b:n.b*r+o.b*(1-r)})}var Li="#d8a425",vc=.18;function ur(i,e){let t=On(Li,e,vc)??e;if((we(Li,t)??0)>=4.5)return Li;for(let n=.15;n<=1;n+=.05){let o=On(Li,i,1-n);if(o&&(we(o,t)??0)>=4.5)return o}return et(t)}function mr(i,e,t,n){if((we(i,t)??4.5)>=4.5&&(we(i,n)??4.5)>=4.5)return i;if(!Le(i)||!Le(e))return e;for(let o=.15;o<=1;o+=.05){let r=On(i,e,1-o);if(r&&(we(r,t)??0)>=4.5&&(we(r,n)??0)>=4.5)return r}return e}function fr(i){return{"--sl-chrome":i?"#ffffff":"#556278","--sl-chrome-line":i?"rgba(23,32,51,.55)":"rgba(233,238,247,.55)"}}var gr=["--sl-bg","--sl-surface","--sl-text","--sl-muted","--sl-line","--sl-accent-text","--sl-warn-text","--sl-chrome","--sl-chrome-line"];function br(i,e){let t=e??i["--sl-bg"],n=Le(t)?et(t)==="#172033":!1,o=Le(i["--sl-bg"])?et(i["--sl-bg"])==="#172033":!1;if(n===o)return null;let r=n?"#ffffff":"#1a2234",s=et(t),a=i["--sl-accent"];return{"--sl-bg":t,"--sl-surface":r,"--sl-text":s,"--sl-muted":n?"#667085":"#a5aec2","--sl-line":n?"rgba(23,32,51,.16)":"rgba(165,174,194,.24)","--sl-accent-text":mr(a,s,t,r),...fr(n),"--sl-warn-text":ur(s,r)}}var yr={light:{background:"#ffffff",surface:"#f6f7fb",text:"#172033",muted:"#667085",line:"rgba(23,32,51,.16)",map:"#e9edf4"},dark:{background:"#0f1522",surface:"#1a2234",text:"#eef1f8",muted:"#a5aec2",line:"rgba(165,174,194,.24)",map:"#0f1522"}};function wc(){try{return window.matchMedia?.("(prefers-color-scheme: dark)").matches===!0}catch{return!1}}function Qt(i){if(i)return i==="auto"?wc()?"dark":"light":i}function kt(i,e=i?.mode){if(i?.map)return i.map;let t=Qt(e);return t?{background:yr[t].map}:null}function Ri(i){let e;try{e=window.matchMedia?.("(prefers-color-scheme: dark)")}catch{return()=>{}}if(!e)return()=>{};let t=n=>i(n.matches);return typeof e.addEventListener=="function"?e.addEventListener("change",t):e.addListener?.(t),()=>{typeof e.removeEventListener=="function"?e.removeEventListener("change",t):e.removeListener?.(t)}}function Tt(i,e,t){let n=t?yr[t]:null,o=e?.background??n?.background??i?.background??"#0f1522",r=Le(o)?et(o)==="#172033":!1,s=e?.surface??n?.surface??(r?"#ffffff":"#1a2234"),a=e?.accent??i?.accent??"#f4b740",l=i?.accentInk,c=e?.accentInk??(l&&(we(l,a)??4.5)>=4.5?l:et(a,"#1a1200","#ffffff")),d=n?void 0:i?.textColor,p=e?.text??n?.text??(d&&(we(d,o)??4.5)>=4.5&&(we(d,s)??4.5)>=4.5?d:et(o));return{"--sl-accent":a,"--sl-accent-ink":c,"--sl-accent-text":mr(a,p,o,s),"--sl-warn-text":ur(p,s),"--sl-bg":o,"--sl-surface":s,"--sl-text":p,"--sl-muted":e?.muted??n?.muted??(r?"#667085":"#a5aec2"),"--sl-line":e?.line??n?.line??(r?"rgba(23,32,51,.16)":"rgba(165,174,194,.24)"),...fr(r),"--sl-scrim-ink":r?"rgba(16,22,36,1)":"rgba(4,7,13,1)","--sl-font":e?.fontFamily??i?.fontFamily??"-apple-system,BlinkMacSystemFont,'Segoe UI',Inter,sans-serif","--sl-radius":`${e?.radius??14}px`}}function xc(){return`<svg class="sl-boot-venue" viewBox="0 0 200 140" preserveAspectRatio="xMidYMid meet" aria-hidden="true" focusable="false"><g class="sl-boot-shells">${["M20 92a80 52 0 0 1 160 0v14a94 62 0 0 0-160 0z","M32 74a68 42 0 0 1 136 0v12a80 50 0 0 0-136 0z","M46 58a54 32 0 0 1 108 0v10a64 38 0 0 0-108 0z"].map(e=>`<path d="${e}" />`).join("")}</g><rect class="sl-boot-stage" x="62" y="16" width="76" height="16" rx="4" /></svg>`}function vr(i,e,t){let n=document.createElement("div");n.className="sl-picker",n.tabIndex=-1,n.lang=(0,Et.getLocale)(),n.dir=(0,Et.localeDirection)(),i.appendChild(n),Object.entries(Tt(void 0,t)).forEach(([r,s])=>n.style.setProperty(r,s)),n.innerHTML=`
42
42
  <div class="sl-head">
43
43
  <div class="sl-logo" data-ref="logo"></div>
44
44
  <div class="sl-head-info" data-ref="headInfo">
@@ -63,6 +63,9 @@
63
63
  <div class="sl-zoom" data-ref="zoom">
64
64
  <button type="button" data-sl-a="picker.zoomIn" aria-label="${e("picker.zoomIn","Zoom in")}" data-sl-ti="picker.zoomIn" title="${e("picker.zoomIn","Zoom in")}" data-ref="zin">+</button>
65
65
  <button type="button" data-sl-a="picker.zoomOut" aria-label="${e("picker.zoomOut","Zoom out")}" data-sl-ti="picker.zoomOut" title="${e("picker.zoomOut","Zoom out")}" data-ref="zout">\u2212</button>
66
+ <button type="button" data-sl-a="picker.fitWholeVenue" aria-label="${e("picker.fitWholeVenue","Show whole venue")}" data-sl-ti="picker.fitWholeVenue" title="${e("picker.fitWholeVenue","Show whole venue")}" data-ref="zfit">
67
+ <svg viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="3"/><circle cx="12" cy="12" r="2"/></svg>
68
+ </button>
66
69
  <button type="button" data-sl-a="picker.fullScreen" aria-label="${e("picker.fullScreen","Full screen")}" data-sl-ti="picker.fullScreen" title="${e("picker.fullScreen","Full screen")}" aria-pressed="false" data-ref="zfs">
67
70
  <svg viewBox="0 0 24 24"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg>
68
71
  <span class="sl-zfs-lbl" data-sl-t="picker.fullScreen" aria-hidden="true">${e("picker.fullScreen","Full screen")}</span>
@@ -70,29 +73,24 @@
70
73
  </div>
71
74
  <div class="sl-boot" data-ref="boot">
72
75
  <div class="sl-boot-bar" aria-hidden="true"></div>
73
- ${bc()}
76
+ ${xc()}
74
77
  <span class="sl-boot-say" role="status" aria-live="polite" data-sl-t="picker.loadingSeatMap">${e("picker.loadingSeatMap","Loading seat map\u2026")}</span>
75
78
  </div>
76
79
  <div class="sl-toast" data-ref="toast" role="status" aria-live="polite"></div>
77
80
  </div>
78
81
  <div class="sl-side" data-ref="side">
79
82
  <div class="sl-sheet-head" data-ref="sheetHead">
80
- <div class="sl-sheet-grab"></div>
81
- <div class="sl-sheet-bar">
82
- <div class="sl-sheet-peek" data-ref="peek"></div>
83
- <button type="button" class="sl-sheet-toggle" data-ref="sheetToggle" data-sl-a="picker.openTicketPanel" aria-label="${e("picker.openTicketPanel","Open ticket panel")}" aria-expanded="false">
84
- <svg viewBox="0 0 24 24"><path d="M6 15l6-6 6 6"/></svg>
85
- </button>
86
- </div>
83
+ <button type="button" class="sl-sheet-toggle" data-ref="sheetToggle" data-sl-a="picker.openTicketPanel" aria-label="${e("picker.openTicketPanel","Open ticket panel")}" aria-expanded="false">
84
+ <svg viewBox="0 0 24 24"><path d="M6 15l6-6 6 6"/></svg>
85
+ </button>
87
86
  </div>
88
87
  <div class="sl-sec sl-filtersec" data-ref="filtersSec" data-sl-t="picker.filters">${e("picker.filters","Filters")}</div>
89
88
  <div class="sl-filters" data-ref="filters"></div>
90
89
  <div class="sl-offer" data-ref="offer" role="status" aria-live="polite"></div>
91
- <div class="sl-sec sl-prices-sec" data-ref="pricesSec"><span data-sl-t="picker.ticketPrices">${e("picker.ticketPrices","Ticket prices")}</span></div>
92
- <div class="sl-prices-hint" data-ref="pricesHint"></div>
90
+ <div class="sl-sec sl-prices-sec" data-ref="pricesSec"><span data-sl-t="picker.ticketPrices">${e("picker.ticketPrices","Ticket prices")}</span>${St({id:"sl-info-prices",label:e("picker.aboutTicketPrices","About ticket prices"),text:e("picker.priceHint","Colours on the map are ticket types \u2014 tap one below to show just those seats."),ref:"pricesHint",wrapRef:"pricesInfo"})}</div>
93
91
  <div class="sl-prices" data-ref="prices"></div>
94
92
  <div class="sl-sec sl-seats-sec">
95
- <span data-sl-t="picker.yourSeats">${e("picker.yourSeats","Your seats")}</span>
93
+ <span class="sl-sec-title"><span data-sl-t="picker.yourSeats">${e("picker.yourSeats","Your seats")}</span>${St({id:"sl-info-seats",label:e("picker.aboutYourSeats","How to choose seats"),text:e("picker.trayHintTapOrBest","Tap a seat on the map, or let us pick the best available for you."),ref:"trayHint",wrapRef:"seatsInfo"})}</span>
96
94
  <span class="sl-seat-summary" data-ref="seatSummary"></span>
97
95
  </div>
98
96
  <div class="sl-tray" data-ref="tray"></div>
@@ -101,7 +99,7 @@
101
99
  <button type="button" class="sl-cta" data-ref="cta" disabled></button>
102
100
  </div>
103
101
  </div>
104
- </div>`;let r={};return n.querySelectorAll("[data-ref]").forEach(s=>{r[s.dataset.ref]=s}),{root:n,mapHost:r.map,els:r}}function Wr(i){let e=(t,n)=>{for(let r of i.querySelectorAll(`[${t}]`)){let s=r.getAttribute(t);if(!s)continue;let o=(0,St.t)(s);o!==s&&n(r,o)}};e("data-sl-t",(t,n)=>{t.textContent=n}),e("data-sl-a",(t,n)=>{t.setAttribute("aria-label",n)}),e("data-sl-ti",(t,n)=>{t.setAttribute("title",n)})}function Ri(i,e){let t=(0,ne.resolveLocale)(i),n=ne.TRANSLATED_LOCALES.includes(t)?t:"en";return e&&(0,ne.setStringOverrides)(e),{locale:n,direction:(0,ne.localeDirection)(n),ready:(0,ne.loadLocale)(i)}}function Ii(i,e,t){i.lang=e.locale,i.dir=e.direction,e.ready.then(t)}function Yr(i,e){if(!i)return null;let t=(e.languages??[]).map(r=>(0,ne.resolveLocale)(r)).filter((r,s,o)=>o.indexOf(r)===s);if(t.length<2)return null;let n=document.createElement("select");n.className="sl-langsel",n.setAttribute("aria-label",e.label);for(let r of t){let s=document.createElement("option");s.value=r,s.textContent=ne.LOCALE_NAMES[r]??r,s.selected=r===(0,ne.getLocale)(),n.appendChild(s)}return n.addEventListener("change",()=>e.onChange(n.value)),i.appendChild(n),n}function Xr(i,e){e.root.lang=i,e.root.dir=(0,ne.localeDirection)(i),Wr(e.root);for(let n of e.painters)try{n()}catch{}e.refreshMapCopy();let t=e.languageSelect;t&&t.value!==i&&(t.value=i)}var re=class extends Error{constructor(e){super(`buyer_access_unavailable:${e.reason}`),this.name="BuyerAccessUnavailableError",this.reason=e.reason,this.code=e.code,this.status=e.status}},yc=new Set(["buyer_access_expired"]),vc=new Set(["paused","provider_failed","channel_denied","sales_not_open"]);function wc(i,e){switch(e){case"buyer_access_invalid":return"invalid";case"buyer_access_revoked":return"revoked";case"buyer_access_origin_mismatch":return"origin_mismatch";case"buyer_access_event_mismatch":return"event_mismatch";case"buyer_access_group_mismatch":return"group_mismatch";case"buyer_access_mode_mismatch":return"mode_mismatch";case"buyer_access_environment_mismatch":return"environment_mismatch";case"channel_access_denied":return"channel_denied";case"channel_paused":return"paused";case"invalid_channel_scope":return"invalid_scope";case"audience_not_public":return"audience_not_public";case"sales_not_open":return"sales_not_open";case"origin_not_allowed":return"origin_not_allowed";default:break}return i===401?"invalid":null}function xc(i,e){return i===401&&!!e&&yc.has(e)}var kc=3e4,le,ce,Ct,Et,ei,Fe,He,At,ti,ii,ni,Je,de,In,Oi,Tt,pe=class{constructor(e){L(this,de);L(this,le,null);L(this,ce,0);L(this,Ct,null);L(this,Et);L(this,ei);L(this,Fe,null);L(this,He,null);L(this,At,null);L(this,ti);L(this,ii);L(this,ni,!1);L(this,Je);if(T(this,Et,e.provider),T(this,ei,e.skewMs??kc),T(this,ti,e.onExpired),T(this,ii,e.onUnavailable),e.token){let t=typeof e.token=="string"?{token:e.token}:e.token;x(this,de,In).call(this,t)}T(this,ni,!!m(this,Et)||!!m(this,le))}get configured(){return m(this,ni)}onRenewed(e){T(this,Je,e)}get unavailable(){return m(this,He)}get hasToken(){return!!m(this,le)&&(m(this,ce)===0||m(this,ce)>Date.now())}get expiresAt(){return m(this,ce)}async authorization(e="initial"){if(!this.configured)return null;if(m(this,He))throw new re(m(this,He));let t=Date.now();if(!m(this,le)||m(this,ce)>0&&m(this,ce)-m(this,ei)<=t){let r=!!m(this,le)&&m(this,ce)>0&&m(this,ce)<=t,s=m(this,le)?r?"expired":"expiring":e,o=await x(this,de,Oi).call(this,s);if(!o)throw new re(m(this,He)??m(this,At)??x(this,de,Tt).call(this,"provider_failed"));return`Bearer ${o}`}return`Bearer ${m(this,le)}`}async handleFailure(e,t){var r;if(!this.configured)return!1;if(xc(e,t)){T(this,le,null),T(this,ce,0);let s=await x(this,de,Oi).call(this,"unauthorized",t);return(r=m(this,ti))==null||r.call(this,{reason:"unauthorized",code:t,refreshed:!!s}),!!s}let n=wc(e,t);return n&&x(this,de,Tt).call(this,n,t,e),!1}async refresh(e="manual"){return T(this,He,null),T(this,At,null),T(this,le,null),T(this,ce,0),!!await x(this,de,Oi).call(this,e)}clear(){T(this,le,null),T(this,Ct,null),T(this,ce,0),T(this,Fe,null),T(this,Je,void 0)}toJSON(){return{configured:this.configured,hasToken:this.hasToken}}toString(){return"[BuyerAccessContext redacted]"}};le=new WeakMap,ce=new WeakMap,Ct=new WeakMap,Et=new WeakMap,ei=new WeakMap,Fe=new WeakMap,He=new WeakMap,At=new WeakMap,ti=new WeakMap,ii=new WeakMap,ni=new WeakMap,Je=new WeakMap,de=new WeakSet,In=function(e){return!e||typeof e.token!="string"||!e.token?null:(T(this,Ct,e.token),T(this,le,e.token),T(this,ce,typeof e.expiresAt=="number"?e.expiresAt:0),m(this,le))},Oi=function(e,t){if(m(this,Fe))return m(this,Fe);let n=m(this,Et);if(!n)return x(this,de,Tt).call(this,"no_token",t),Promise.resolve(null);let r=m(this,Ct),s=(async()=>{try{let o=await n({reason:e}),a=x(this,de,In).call(this,o);if(!a)return x(this,de,Tt).call(this,"provider_failed",t),null;if(r&&r!==a&&m(this,Je))try{await m(this,Je).call(this,{previousToken:r,token:a,reason:e})}catch{}return a}catch{return x(this,de,Tt).call(this,"provider_failed",t),null}finally{T(this,Fe,null)}})();return T(this,Fe,s),s},Tt=function(e,t,n){var s;let r={reason:e,code:t,status:n,retryable:e==="paused"||e==="channel_denied"||e==="sales_not_open"};return T(this,At,r),vc.has(e)||(T(this,He,r),T(this,le,null),T(this,ce,0)),(s=m(this,ii))==null||s.call(this,r),r};function Pt(i,e={}){return!i.buyerAccessTokenProvider&&!i.buyerAccessToken?null:new pe({provider:i.buyerAccessTokenProvider,token:i.buyerAccessToken,...e})}var Sc=3e4;function Tc(i){if(!i||typeof i!="object"||Array.isArray(i))return!1;let e=i;return typeof e.token=="string"&&e.token.startsWith("bse_")&&typeof e.expiresAt=="number"&&Number.isFinite(e.expiresAt)&&e.expiresAt>Date.now()&&!!e.event&&typeof e.event=="object"&&!!e.doc&&typeof e.doc=="object"&&!!e.objects&&typeof e.objects=="object"&&!Array.isArray(e.objects)&&!!e.objects.seats&&typeof e.objects.seats=="object"}var On=class{constructor(e,t,n){this.base=e;this.event=t;this.publicKey=n;this.value=null;this.inflight=null}async load(e=!1){if(e&&(this.value=null),this.value&&this.value.expiresAt-Sc>Date.now())return this.value;if(this.inflight)return this.inflight;let t=(async()=>{let n=await fetch(`${this.base}/pub/events/${encodeURIComponent(this.event)}/bootstrap`,{method:"POST",body:JSON.stringify({publicKey:this.publicKey}),credentials:"omit"}),r=await n.json().catch(()=>null);if(!n.ok){let s=n.status===429?Ai(n.headers.get("Retry-After"),r?.retryAfterSeconds):void 0;throw new U(n.status,r?.error??`request_failed_${n.status}`,r?.code??r?.error,void 0,void 0,s)}if(!Tc(r))throw new U(502,"invalid_bootstrap_response","invalid_bootstrap_response");return this.value=r,r})();this.inflight=t;try{return await t}finally{this.inflight===t&&(this.inflight=null)}}async token(e){let t=e==="expiring"||e==="expired"||e==="unauthorized"||e==="manual",n=await this.load(t);return{token:n.token,expiresAt:n.expiresAt}}},_n=class extends Be{constructor(t,n,r,s,o){super(t,{...o,access:s});this.event=n;this.loader=r;this.bootstrapAccess=s;this.initialChartDelivered=!1;this.initialObjectsDelivered=!1}assertEvent(t){if(t!==this.event)throw new U(404,"not_found","not_found")}async bundle(t){return this.assertEvent(t),await this.bootstrapAccess.authorization("initial"),this.loader.load()}async chart(t){if(this.assertEvent(t),this.initialChartDelivered)return super.chart(t);let n=await this.bundle(t);return this.initialChartDelivered=!0,{event:n.event,doc:n.doc,chartDelivery:n.chartDelivery}}async objects(t){if(this.assertEvent(t),this.initialObjectsDelivered)return super.objects(t);let n=await this.bundle(t);return this.initialObjectsDelivered=!0,n.objects}};function _i(i){let e=new On(i.base,i.event,i.publicKey),t=new pe({provider:({reason:n})=>e.token(n),...i.accessHooks});return{access:t,api:new _n(i.base,i.event,e,t,i.apiOptions??{})}}var ee=require("@seatlayer/core");var J={enter:260,exit:180,spring:320,flight:500,stagger:30,crossfade:120,collapse:150,rung:200,reducedFade:120,easeEnter:"cubic-bezier(.2,.8,.2,1)",easeExit:"cubic-bezier(.4,0,1,1)",easeSpring:"cubic-bezier(.34,1.56,.64,1)"};var Cc=`.sl-picker,.sl-modal-scrim,.sl-mo-host{--sl-dur-enter:${J.enter}ms;--sl-dur-exit:${J.exit}ms;--sl-dur-spring:${J.spring}ms;--sl-dur-flight:${J.flight}ms;--sl-dur-stagger:${J.stagger}ms;--sl-dur-xfade:${J.crossfade}ms;--sl-dur-collapse:${J.collapse}ms;--sl-dur-rung:${J.rung}ms;--sl-ease-enter:${J.easeEnter};--sl-ease-exit:${J.easeExit};--sl-ease-spring:${J.easeSpring};--sl-mo-ox:50%;--sl-mo-oy:50%}`,Ec=`@media (prefers-reduced-motion:reduce){.sl-picker,.sl-modal-scrim,.sl-mo-host{--sl-dur-enter:0ms;--sl-dur-exit:0ms;--sl-dur-spring:0ms;--sl-dur-flight:0ms;--sl-dur-stagger:0ms;--sl-dur-collapse:0ms;--sl-dur-rung:0ms;--sl-dur-xfade:${J.reducedFade}ms}.sl-mo-in,.sl-mo-out,.sl-mo-slide-up,.sl-mo-slide-down,.sl-mo-spring,.sl-mo-rise,.sl-mo-zoom,.sl-mo-scrim,.sl-mo-stagger > *{animation-name:slMoFade;animation-duration:${J.reducedFade}ms;animation-delay:0ms}.sl-mo-hint,.sl-mo-rotate-in,.sl-mo-fly,.sl-mo-collapse{animation:none}.sl-confirm-add-invite,.sl-confirm-add-invite::after{animation:none}.sl-mo-indicator{transition:none}}`,Qr=Cc+`
102
+ </div>`;let o={};return n.querySelectorAll("[data-ref]").forEach(r=>{o[r.dataset.ref]=r}),{root:n,mapHost:o.map,els:o}}function wr(i){let e=(t,n)=>{for(let o of i.querySelectorAll(`[${t}]`)){let r=o.getAttribute(t);if(!r)continue;let s=(0,Et.t)(r);s!==r&&n(o,s)}};e("data-sl-t",(t,n)=>{t.textContent=n}),e("data-sl-a",(t,n)=>{t.setAttribute("aria-label",n)}),e("data-sl-ti",(t,n)=>{t.setAttribute("title",n)})}function Ii(i,e){let t=(0,oe.resolveLocale)(i),n=oe.TRANSLATED_LOCALES.includes(t)?t:"en";return e&&(0,oe.setStringOverrides)(e),{locale:n,direction:(0,oe.localeDirection)(n),ready:(0,oe.loadLocale)(i)}}function Oi(i,e,t){i.lang=e.locale,i.dir=e.direction,e.ready.then(t)}function xr(i,e){if(!i)return null;let t=(e.languages??[]).map(o=>(0,oe.resolveLocale)(o)).filter((o,r,s)=>s.indexOf(o)===r);if(t.length<2)return null;let n=document.createElement("select");n.className="sl-langsel",n.setAttribute("aria-label",e.label);for(let o of t){let r=document.createElement("option");r.value=o,r.textContent=oe.LOCALE_NAMES[o]??o,r.selected=o===(0,oe.getLocale)(),n.appendChild(r)}return n.addEventListener("change",()=>e.onChange(n.value)),i.appendChild(n),n}function Sr(i,e){e.root.lang=i,e.root.dir=(0,oe.localeDirection)(i),wr(e.root);for(let n of e.painters)try{n()}catch{}e.refreshMapCopy();let t=e.languageSelect;t&&t.value!==i&&(t.value=i)}var re=class extends Error{constructor(e){super(`buyer_access_unavailable:${e.reason}`),this.name="BuyerAccessUnavailableError",this.reason=e.reason,this.code=e.code,this.status=e.status}},Sc=new Set(["buyer_access_expired"]),kc=new Set(["paused","provider_failed","channel_denied","sales_not_open"]);function Tc(i,e){switch(e){case"buyer_access_invalid":return"invalid";case"buyer_access_revoked":return"revoked";case"buyer_access_origin_mismatch":return"origin_mismatch";case"buyer_access_event_mismatch":return"event_mismatch";case"buyer_access_group_mismatch":return"group_mismatch";case"buyer_access_mode_mismatch":return"mode_mismatch";case"buyer_access_environment_mismatch":return"environment_mismatch";case"channel_access_denied":return"channel_denied";case"channel_paused":return"paused";case"invalid_channel_scope":return"invalid_scope";case"audience_not_public":return"audience_not_public";case"sales_not_open":return"sales_not_open";case"origin_not_allowed":return"origin_not_allowed";default:break}return i===401?"invalid":null}function Ec(i,e){return i===401&&!!e&&Sc.has(e)}var Cc=3e4,de,pe,At,Pt,Jt,Fe,He,Mt,ei,ti,ii,tt,he,_n,_i,Ct,ue=class{constructor(e){L(this,he);L(this,de,null);L(this,pe,0);L(this,At,null);L(this,Pt);L(this,Jt);L(this,Fe,null);L(this,He,null);L(this,Mt,null);L(this,ei);L(this,ti);L(this,ii,!1);L(this,tt);if(T(this,Pt,e.provider),T(this,Jt,e.skewMs??Cc),T(this,ei,e.onExpired),T(this,ti,e.onUnavailable),e.token){let t=typeof e.token=="string"?{token:e.token}:e.token;x(this,he,_n).call(this,t)}T(this,ii,!!m(this,Pt)||!!m(this,de))}get configured(){return m(this,ii)}onRenewed(e){T(this,tt,e)}get unavailable(){return m(this,He)}get hasToken(){return!!m(this,de)&&(m(this,pe)===0||m(this,pe)>Date.now())}get expiresAt(){return m(this,pe)}async authorization(e="initial"){if(!this.configured)return null;if(m(this,He))throw new re(m(this,He));let t=Date.now();if(!m(this,de)||m(this,pe)>0&&m(this,pe)-m(this,Jt)<=t){let o=!!m(this,de)&&m(this,pe)>0&&m(this,pe)<=t,r=m(this,de)?o?"expired":"expiring":e,s=await x(this,he,_i).call(this,r);if(!s)throw new re(m(this,He)??m(this,Mt)??x(this,he,Ct).call(this,"provider_failed"));return`Bearer ${s}`}return`Bearer ${m(this,de)}`}async handleFailure(e,t){var o;if(!this.configured)return!1;if(Ec(e,t)){T(this,de,null),T(this,pe,0);let r=await x(this,he,_i).call(this,"unauthorized",t);return(o=m(this,ei))==null||o.call(this,{reason:"unauthorized",code:t,refreshed:!!r}),!!r}let n=Tc(e,t);return n&&x(this,he,Ct).call(this,n,t,e),!1}async refresh(e="manual"){return T(this,He,null),T(this,Mt,null),T(this,de,null),T(this,pe,0),!!await x(this,he,_i).call(this,e)}clear(){T(this,de,null),T(this,At,null),T(this,pe,0),T(this,Fe,null),T(this,tt,void 0)}toJSON(){return{configured:this.configured,hasToken:this.hasToken}}toString(){return"[BuyerAccessContext redacted]"}};de=new WeakMap,pe=new WeakMap,At=new WeakMap,Pt=new WeakMap,Jt=new WeakMap,Fe=new WeakMap,He=new WeakMap,Mt=new WeakMap,ei=new WeakMap,ti=new WeakMap,ii=new WeakMap,tt=new WeakMap,he=new WeakSet,_n=function(e){return!e||typeof e.token!="string"||!e.token?null:(T(this,At,e.token),T(this,de,e.token),T(this,pe,typeof e.expiresAt=="number"?e.expiresAt:0),m(this,de))},_i=function(e,t){if(m(this,Fe))return m(this,Fe);let n=m(this,Pt);if(!n)return x(this,he,Ct).call(this,"no_token",t),Promise.resolve(null);let o=m(this,At),r=(async()=>{try{let s=await n({reason:e}),a=x(this,he,_n).call(this,s);if(!a)return x(this,he,Ct).call(this,"provider_failed",t),null;if(o&&o!==a&&m(this,tt))try{await m(this,tt).call(this,{previousToken:o,token:a,reason:e})}catch{}return a}catch{return x(this,he,Ct).call(this,"provider_failed",t),null}finally{T(this,Fe,null)}})();return T(this,Fe,r),r},Ct=function(e,t,n){var r;let o={reason:e,code:t,status:n,retryable:e==="paused"||e==="channel_denied"||e==="sales_not_open"};return T(this,Mt,o),kc.has(e)||(T(this,He,o),T(this,de,null),T(this,pe,0)),(r=m(this,ti))==null||r.call(this,o),o};function Lt(i,e={}){return!i.buyerAccessTokenProvider&&!i.buyerAccessToken?null:new ue({provider:i.buyerAccessTokenProvider,token:i.buyerAccessToken,...e})}var Ac=3e4;function Pc(i){if(!i||typeof i!="object"||Array.isArray(i))return!1;let e=i;return typeof e.token=="string"&&e.token.startsWith("bse_")&&typeof e.expiresAt=="number"&&Number.isFinite(e.expiresAt)&&e.expiresAt>Date.now()&&!!e.event&&typeof e.event=="object"&&!!e.doc&&typeof e.doc=="object"&&!!e.objects&&typeof e.objects=="object"&&!Array.isArray(e.objects)&&!!e.objects.seats&&typeof e.objects.seats=="object"}var Nn=class{constructor(e,t,n){this.base=e;this.event=t;this.publicKey=n;this.value=null;this.inflight=null}async load(e=!1){if(e&&(this.value=null),this.value&&this.value.expiresAt-Ac>Date.now())return this.value;if(this.inflight)return this.inflight;let t=(async()=>{let n=await fetch(`${this.base}/pub/events/${encodeURIComponent(this.event)}/bootstrap`,{method:"POST",body:JSON.stringify({publicKey:this.publicKey}),credentials:"omit"}),o=await n.json().catch(()=>null);if(!n.ok){let r=n.status===429?xi(n.headers.get("Retry-After"),o?.retryAfterSeconds):void 0;throw new G(n.status,o?.error??`request_failed_${n.status}`,o?.code??o?.error,void 0,void 0,r)}if(!Pc(o))throw new G(502,"invalid_bootstrap_response","invalid_bootstrap_response");return this.value=o,o})();this.inflight=t;try{return await t}finally{this.inflight===t&&(this.inflight=null)}}async token(e){let t=e==="expiring"||e==="expired"||e==="unauthorized"||e==="manual",n=await this.load(t);return{token:n.token,expiresAt:n.expiresAt}}},Dn=class extends Be{constructor(t,n,o,r,s){super(t,{...s,access:r});this.event=n;this.loader=o;this.bootstrapAccess=r;this.initialChartDelivered=!1;this.initialObjectsDelivered=!1}assertEvent(t){if(t!==this.event)throw new G(404,"not_found","not_found")}async bundle(t){return this.assertEvent(t),await this.bootstrapAccess.authorization("initial"),this.loader.load()}async chart(t){if(this.assertEvent(t),this.initialChartDelivered)return super.chart(t);let n=await this.bundle(t);return this.initialChartDelivered=!0,{event:n.event,doc:n.doc,chartDelivery:n.chartDelivery}}async objects(t){if(this.assertEvent(t),this.initialObjectsDelivered)return super.objects(t);let n=await this.bundle(t);return this.initialObjectsDelivered=!0,n.objects}};function Ni(i){let e=new Nn(i.base,i.event,i.publicKey),t=new ue({provider:({reason:n})=>e.token(n),...i.accessHooks});return{access:t,api:new Dn(i.base,i.event,e,t,i.apiOptions??{})}}var J=require("@seatlayer/core");var Q={enter:260,exit:180,spring:320,flight:500,stagger:30,crossfade:120,collapse:150,rung:200,reducedFade:120,easeEnter:"cubic-bezier(.2,.8,.2,1)",easeExit:"cubic-bezier(.4,0,1,1)",easeSpring:"cubic-bezier(.34,1.56,.64,1)"};var Mc=`.sl-picker,.sl-modal-scrim,.sl-mo-host{--sl-dur-enter:${Q.enter}ms;--sl-dur-exit:${Q.exit}ms;--sl-dur-spring:${Q.spring}ms;--sl-dur-flight:${Q.flight}ms;--sl-dur-stagger:${Q.stagger}ms;--sl-dur-xfade:${Q.crossfade}ms;--sl-dur-collapse:${Q.collapse}ms;--sl-dur-rung:${Q.rung}ms;--sl-ease-enter:${Q.easeEnter};--sl-ease-exit:${Q.easeExit};--sl-ease-spring:${Q.easeSpring};--sl-mo-ox:50%;--sl-mo-oy:50%}`,Lc=`@media (prefers-reduced-motion:reduce){.sl-picker,.sl-modal-scrim,.sl-mo-host{--sl-dur-enter:0ms;--sl-dur-exit:0ms;--sl-dur-spring:0ms;--sl-dur-flight:0ms;--sl-dur-stagger:0ms;--sl-dur-collapse:0ms;--sl-dur-rung:0ms;--sl-dur-xfade:${Q.reducedFade}ms}.sl-mo-in,.sl-mo-out,.sl-mo-slide-up,.sl-mo-slide-down,.sl-mo-spring,.sl-mo-rise,.sl-mo-zoom,.sl-mo-scrim,.sl-mo-stagger > *{animation-name:slMoFade;animation-duration:${Q.reducedFade}ms;animation-delay:0ms}.sl-mo-hint,.sl-mo-rotate-in,.sl-mo-fly,.sl-mo-collapse{animation:none}.sl-confirm-add-invite,.sl-confirm-add-invite::after{animation:none}.sl-mo-indicator{transition:none}}`,kr=Mc+`
105
103
  /* Anchored open/close. The translate is 8px TOWARD the anchor, which is what
106
104
  makes the card look attached to the seat rather than dropped on the map. */
107
105
  .sl-mo-in{transform-origin:var(--sl-mo-ox) var(--sl-mo-oy);
@@ -168,7 +166,7 @@
168
166
  @keyframes slMoZoom{from{opacity:0;transform:scale(1.02)}to{opacity:1;transform:none}}
169
167
  .sl-mo-rotate-in{animation:slMoSpin var(--sl-dur-spring) var(--sl-ease-spring) 1 both}
170
168
  @keyframes slMoSpin{from{opacity:0;transform:rotate(-140deg) scale(.8)}to{opacity:1;transform:none}}
171
- `+Ec;function Di(){try{return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches===!0}catch{return!1}}function Dn(i,e){if(!e){i.style.removeProperty("--sl-mo-ox"),i.style.removeProperty("--sl-mo-oy");return}Ni(i,e,i.getBoundingClientRect())}function Ni(i,e,t){let n=t.width||1,r=t.height||1,s=o=>Math.max(0,Math.min(100,o));i.style.setProperty("--sl-mo-ox",`${s((e.x-t.left)/n*100).toFixed(1)}%`),i.style.setProperty("--sl-mo-oy",`${s((e.y-t.top)/r*100).toFixed(1)}%`)}function Zr(i,e,t){let n=i.getBoundingClientRect(),r=t.getBoundingClientRect();Ni(i,e,{left:n.left-r.left,top:n.top-r.top,width:n.width,height:n.height})}function Bi(i,e){i.classList.remove("sl-mo-out"),e!==void 0&&Dn(i,e),i.classList.remove("sl-mo-in"),i.offsetWidth,i.classList.add("sl-mo-in")}function Jr(i){i.classList.add("sl-mo-stagger");let e=0;for(let t of Array.from(i.children))t.style.setProperty("--sl-mo-i",String(e)),e+=1}function Mt(i,e,t={className:"sl-mo-out",duration:J.exit}){let n=()=>{r||(r=!0,!(typeof window>"u")&&(clearTimeout(s),i.removeEventListener("animationend",n),e?e():i.remove()))},r=!1;i.classList.remove("sl-mo-in","sl-mo-slide-up","sl-mo-spring","sl-mo-zoom","sl-mo-rise"),i.classList.add(t.className),i.addEventListener("animationend",n);let s=setTimeout(n,Di()?0:t.duration+60)}var Oh={className:"sl-mo-slide-down",duration:J.exit};function es(i){if(Di())return i.onArrive?.(),null;let e=document.createElement("div");e.className="sl-mo-fly sl-mo-host",e.setAttribute("aria-hidden","true"),e.textContent=i.label??"",e.style.left=`${i.from.x}px`,e.style.top=`${i.from.y}px`,e.style.background=i.color??"var(--sl-accent,#6e7bff)",e.style.color=i.ink??"#fff",e.style.setProperty("--sl-fly-dx",`${Math.round(i.to.x-i.from.x)}px`),e.style.setProperty("--sl-fly-dy",`${Math.round(i.to.y-i.from.y)}px`),document.body.appendChild(e);let t=!1,n=()=>{t||(t=!0,window.clearTimeout(r),e.remove(),i.onArrive?.())};e.addEventListener("animationend",n);let r=window.setTimeout(n,J.flight+80);return e}var G=i=>String(i??"").replace(/[&<>"']/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[e]);function Lt(i,e){let t=0;for(let n of i.get(e)?.values()??[])t+=n;return t}function ts(i){let e=[];for(let[t,n]of i)for(let[r,s]of n)s>0&&e.push({areaId:t,tierId:r,qty:s});return e}function is(i){let e=new Map;for(let t of i.keys())e.set(t,Lt(i,t));return e}function ri(i,e,t,n){let r=i.get(e)??new Map;n>0?r.set(t,n):r.delete(t),r.size?i.set(e,r):i.delete(e)}function ns(i){let e=new Map;for(let t of i)t.objectType!=="ga"||!t.objectId||e.set(t.objectId,(e.get(t.objectId)??0)+(t.quantity??1));return e}function Ve(i,e){let t=ns(e),n=0;for(let r of i.keys())n+=Math.max(0,Lt(i,r)-(t.get(r)??0));return n}function rs(i,e,t){let n=ns(t),r=0;for(let s of e){let o=i.gaQty.get(s.id);if(!o)continue;let a=n.get(s.id)??0;for(let[l,c]of o){let d=Math.max(0,c-a);a=Math.max(0,a-c),r+=d*i.paidPrice(s.categoryKey,l,Ac(s,l),s.id)}}return r}function Ac(i,e){return e?i.tiers?.find(t=>t.id===e)?.price??i.price:i.price}function ss(i){let e=[],t=new Map;for(let n of i){if(n.objectType!=="ga"||!n.objectId){e.push({...n,labels:[n.label]});continue}let r=`${n.objectId}\0${n.tierId??""}`,s=t.get(r);if(s){s.quantity=(s.quantity??0)+(n.quantity??1),s.labels.push(n.label);continue}let o={...n,quantity:n.quantity??1,labels:[n.label]};t.set(r,o),e.push(o)}return e}function os(i,e,t){let n=new Set(t);for(let r of e)r.objectType==="ga"&&r.objectId&&n.has(r.label)&&ri(i,r.objectId,r.tierId??null,0)}function Bn(i,e){if(i.objectType!=="ga")return i.label;let t=e.find(n=>n.id===i.objectId);return t?.displayLabel??t?.label??i.label}function Pc(i){let e=new Map;for(let t of i){if(t.objectType!=="ga"||!t.objectId)continue;let n=`${t.objectId}\0${t.tierId??""}`;e.set(n,(e.get(n)??0)+(t.quantity??1))}return e}function Fi(i){let e=i.tiers??[];return e.length>1?e.map(t=>({id:t.id,label:t.name||t.id,price:t.price})):[{id:null,label:i.displayType??(0,ee.t)("picker.generalAdmission"),price:i.price}]}function as(i,e){let t=i.totalTicketCount()-Lt(i.gaQty,e.id);return Math.max(0,Math.min(e.available,i.maxTickets-t))}function Fn(i,e,t,n){if(ke(i,!1),i.salesClosed){i.toast(i.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}let r=Fi(e),s=i.gaQty.get(e.id),o=Lt(i.gaQty,e.id)>0,a=as(i,e);if(a<=0&&!o){i.toast(e.available>0?(0,ee.t)("picker.maxTicketsForOrder",{count:i.maxTickets}):i.tf("picker.soldOutTitle","Sold out"),"warning");return}if(i.onGAPromptHook){let u={};for(let[g,y]of s??[])u[g??""]=y;if(i.onGAPromptHook({area:e,selected:u,min:0,max:a,tiers:r,confirm:g=>{Rc(i,e,r,g,a)},cancel:()=>ke(i)})===!0)return}let l=new Map;for(let u of r)l.set(u.id,s?.get(u.id)??0);!o&&a>0&&l.set(r[0].id,1);let c={area:e,tiers:r,draft:l,max:a,reopened:o},d=i.root?.dataset.layout==="narrow",p=document.createElement("div");p.className=d?"sl-ga-scrim sl-mo-scrim":"sl-ga-pop-layer",p.innerHTML=Mc(i,c,d),i.root?.appendChild(p),i.gaPromptEl=p,i.gaPromptReturnFocus=n??document.activeElement,d||Ic(i,p,t),i.reducedMotion()&&(p.dataset.motion="reduced"),cs(i,c),Lc(i,p,c),requestAnimationFrame(()=>p.querySelector('[data-ga-step="1"]')?.focus())}function Mc(i,e,t){let{area:n,tiers:r}=e,s=r.length>1,o=n.displayLabel??n.label,a=r.map(l=>`<div class="sl-ga-prompt-row" data-ga-tier="${G(l.id??"")}"><div class="sl-ga-prompt-label"><span>${G(s?l.label:i.tf("picker.gaChooseTickets","How many tickets?"))}</span>`+(s?`<small>${G(i.money(i.paidPrice(n.categoryKey,l.id,l.price,n.id)))}</small>`:"")+`</div><div class="sl-ga-stepper" role="group" aria-label="${G(s?l.label:o)}"><button type="button" data-ga-step="-1" aria-label="${G(i.tf("picker.fewer","Fewer"))}">\u2212</button><output data-ga-qty aria-live="polite">0</output><button type="button" data-ga-step="1" aria-label="${G(i.tf("picker.more","More"))}">+</button></div></div>`).join("");return`<section class="${t?"sl-ga-sheet":"sl-ga-pop"}" role="dialog" aria-modal="true" aria-label="${G((0,ee.t)("picker.gaChooseForArea",{area:o}))}"><div class="sl-ga-prompt-head"><div class="sl-ga-prompt-eyebrow">${G(n.displayType??i.tf("picker.generalAdmission","General admission"))}</div><h2 class="sl-ga-prompt-title">${G(o)}</h2><p class="sl-ga-prompt-sub" data-ga-sub></p><button type="button" class="sl-ga-prompt-close" data-ga-cancel aria-label="${G((0,ee.t)("common.close"))}">\xD7</button></div><div class="sl-ga-prompt-body">${a}`+(r.length>1?`<div class="sl-ga-prompt-total"><span>${G(i.tf("picker.total","Total"))}</span><b data-ga-total></b></div>`:"")+'<p class="sl-ga-prompt-hint" data-ga-hint></p></div><div class="sl-ga-prompt-actions">'+(e.reopened?`<button type="button" class="sl-ga-prompt-remove" data-ga-remove>${G(i.tf("picker.gaRemove","Remove"))}</button>`:`<button type="button" class="sl-ga-prompt-remove" data-ga-cancel>${G((0,ee.t)("common.cancel"))}</button>`)+'<button type="button" class="sl-ga-prompt-confirm" data-ga-confirm></button></div></section>'}function Vn(i){let e=0;for(let t of i.draft.values())e+=t;return e}function ls(i,e){let t=0;for(let n of e.tiers)t+=(e.draft.get(n.id)??0)*i.paidPrice(e.area.categoryKey,n.id,n.price,e.area.id);return t}function cs(i,e){let t=i.gaPromptEl;if(!t)return;let n=Vn(e),r=ls(i,e);t.querySelectorAll("[data-ga-tier]").forEach(c=>{let d=c.dataset.gaTier?c.dataset.gaTier:null,p=e.draft.get(d)??0,u=c.querySelector("[data-ga-qty]");u&&(u.value=String(p)),c.querySelectorAll("[data-ga-step]").forEach(h=>{h.disabled=Number(h.dataset.gaStep)<0?p<=0:n>=e.max})});let s=t.querySelector("[data-ga-sub]");s&&(s.textContent=`${i.money(i.paidPrice(e.area.categoryKey,e.tiers[0].id,e.tiers[0].price,e.area.id))} \xB7 ${(0,ee.tCount)("picker.leftCount",e.area.available)}`);let o=t.querySelector("[data-ga-total]");o&&(o.textContent=i.money(r));let a=t.querySelector("[data-ga-hint]");a&&(a.textContent=n>=e.max&&e.max>0?e.area.available<=e.max?(0,ee.tCount)("picker.leftCount",e.area.available):(0,ee.t)("picker.maxTicketsForOrder",{count:i.maxTickets}):"");let l=t.querySelector("[data-ga-confirm]");l&&(l.textContent=e.reopened?(0,ee.tCount)("picker.gaUpdate",n,{count:n}):(0,ee.tCount)("picker.gaAdd",n,{count:n,price:i.money(r)}),l.disabled=n<=0&&!e.reopened)}function Lc(i,e,t){e.querySelectorAll("[data-ga-step]").forEach(n=>{n.addEventListener("click",()=>{let r=n.closest("[data-ga-tier]");if(!r)return;let s=r.dataset.gaTier?r.dataset.gaTier:null,o=Number(n.dataset.gaStep),a=t.draft.get(s)??0,l=t.max-Vn(t);t.draft.set(s,Math.max(0,a+(o>0?Math.min(1,l):-1))),cs(i,t)})}),e.querySelectorAll("[data-ga-cancel]").forEach(n=>n.addEventListener("click",()=>ke(i))),e.querySelector("[data-ga-remove]")?.addEventListener("click",()=>{i.gaQty.delete(t.area.id),ke(i),i.syncTray(),Nn(i,(0,ee.t)("picker.gaRemoved",{area:t.area.displayLabel??t.area.label}))}),e.querySelector("[data-ga-confirm]")?.addEventListener("click",()=>{Hc(i,t)}),e.addEventListener("mousedown",n=>{n.target===e&&ke(i)}),e.addEventListener("keydown",n=>{if(n.key==="Escape"){n.stopPropagation(),ke(i);return}if(n.key!=="Tab")return;let r=[...e.querySelectorAll('button:not(:disabled),[tabindex]:not([tabindex="-1"])')];if(!r.length)return;let s=r[0],o=r[r.length-1];n.shiftKey&&document.activeElement===s?(n.preventDefault(),o.focus()):!n.shiftKey&&document.activeElement===o&&(n.preventDefault(),s.focus())})}function Hc(i,e){let t=Vn(e),n=ls(i,e);for(let s of e.tiers)ri(i.gaQty,e.area.id,s.id,e.draft.get(s.id)??0);ke(i),i.syncTray();let r=e.area.displayLabel??e.area.label;t>0?Nn(i,(0,ee.tCount)("picker.gaAdded",t,{count:t,area:r,price:i.money(n)})):Nn(i,(0,ee.t)("picker.gaRemoved",{area:r}))}function Rc(i,e,t,n,r){if(typeof n=="number")ri(i.gaQty,e.id,t[0].id,Math.max(0,Math.min(r,Math.floor(n))));else{i.gaQty.delete(e.id);let s=r;for(let o of t){let a=Math.max(0,Math.floor(n[o.id??""]??0)),l=Math.min(a,s);s-=l,ri(i.gaQty,e.id,o.id,l)}}i.syncTray()}function ke(i,e=!0){let t=i.gaPromptReturnFocus;i.gaPromptEl&&Mt(i.gaPromptEl),i.gaPromptEl=null,i.gaPromptReturnFocus=null,e&&t&&requestAnimationFrame(()=>(t.isConnected?t:i.root)?.focus())}function Ic(i,e,t){let n=i.root,r=e.querySelector(".sl-ga-pop");if(!n||!r||!t)return;let s=n.getBoundingClientRect(),o=t.x-s.left,a=t.y-s.top;e.style.setProperty("--sl-ga-anchor-x",`${o}px`),e.style.setProperty("--sl-ga-anchor-y",`${a}px`),requestAnimationFrame(()=>{let l=r.offsetWidth||260,c=r.offsetHeight||220,d=Math.max(8,Math.min(s.width-l-8,o-l/2)),p=a-c-14,u=p>=8?p:Math.min(s.height-c-8,a+14);r.style.left=`${d}px`,r.style.top=`${Math.max(8,u)}px`,r.dataset.side=p>=8?"above":"below",r.style.setProperty("--sl-ga-arrow-x",`${Math.max(12,Math.min(l-12,o-d))}px`)})}function Nn(i,e){i.srEl&&(i.srEl.textContent=e)}function ds(i,e,t=[]){let n=[],r=Pc(t);for(let o of e){let a=i.gaQty.get(o.id);if(!a)continue;let l=Fi(o);for(let c of l){let d=(a.get(c.id)??0)-(r.get(`${o.id}\0${c.id??""}`)??0);if(d<=0)continue;let p=i.paidPrice(o.categoryKey,c.id,c.price,o.id);n.push(`<div class="sl-ga" data-ga="${G(o.id)}" data-ga-row-tier="${G(c.id??"")}"><div class="sl-ga-info"><div class="sl-ga-name">${G(o.displayLabel??o.label)}</div><div class="sl-ga-sub">${G(l.length>1?c.label:o.displayType??i.tf("picker.generalAdmission","General admission"))} \xB7 ${G(i.money(p))} \xB7 ${G((0,ee.tCount)("picker.leftCount",o.available))}</div></div><div class="sl-ga-qty"><button type="button" data-d="-1" aria-label="${G(i.tf("picker.fewer","Fewer"))}">\u2212</button><span>${d}</span><button type="button" data-d="1" aria-label="${G(i.tf("picker.more","More"))}">+</button></div></div>`)}}let s=e.filter(o=>Lt(i.gaQty,o.id)<=0&&!t.some(a=>a.objectId===o.id));return s.length&&n.push(`<div class="sl-ga-areas" data-ga-areas><button type="button" class="sl-ga-areas-toggle" data-ga-areas-toggle aria-expanded="${i.gaAreasExpanded}"><span>${G(i.tf("picker.gaAreasHeading","Areas"))}</span><small>${s.length}</small></button>`+(i.gaAreasExpanded?`<div class="sl-ga-areas-list">${s.map(o=>`<button type="button" class="sl-ga-area-open" data-ga-open="${G(o.id)}"${o.available<=0?" disabled":""}><span class="name">${G(o.displayLabel??o.label)}<small>${G(o.displayType??i.tf("picker.generalAdmission","General admission"))}</small></span><span class="meta">${G(i.money(i.paidPrice(o.categoryKey,null,o.price,o.id)))} \xB7 ${G(o.available>0?(0,ee.tCount)("picker.leftCount",o.available):i.tf("picker.soldOutTitle","Sold out"))}</span></button>`).join("")}</div>`:"")+"</div>"),n.join("")}function ps(i,e,t){e.querySelectorAll(".sl-ga .sl-ga-qty button").forEach(n=>{n.addEventListener("click",()=>{let r=n.closest(".sl-ga");if(!r?.dataset.ga)return;let s=t.find(c=>c.id===r.dataset.ga);if(!s)return;let o=r.dataset.gaRowTier?r.dataset.gaRowTier:null,a=Number(n.dataset.d),l=i.gaQty.get(s.id)?.get(o)??0;if(a>0&&as(i,s)-Lt(i.gaQty,s.id)<=0){i.toast((0,ee.t)("picker.maxTicketsForOrder",{count:i.maxTickets}),"warning");return}ri(i.gaQty,s.id,o,Math.max(0,l+a)),i.syncTray()})}),e.querySelector("[data-ga-areas-toggle]")?.addEventListener("click",()=>{i.gaAreasExpanded=!i.gaAreasExpanded,i.syncTray()}),e.querySelectorAll("[data-ga-open]").forEach(n=>{n.addEventListener("click",()=>{let r=t.find(s=>s.id===n.dataset.gaOpen);r&&Fn(i,r,null,n)})})}var Vi='<svg viewBox="0 0 64 56" width="12" height="11" fill="none" aria-hidden="true" focusable="false" style="display:block"><path d="M4 13 Q16 6 29 7 L28.5 17 Q17 16.5 7 22 Z" fill="#f4b740"/><path d="M4 13 Q16 6 29 7 L28.5 17 Q17 16.5 7 22 Z" fill="#f4b740" transform="translate(64 0) scale(-1 1)"/><path d="M8 28 Q18 22 28.6 23 L28.2 32 Q18 28.5 10 36 Z" fill="#fcf7ee"/><path d="M8 28 Q18 22 28.6 23 L28.2 32 Q18 28.5 10 36 Z" fill="#fcf7ee" transform="translate(64 0) scale(-1 1)"/><path d="M11 41 Q19 35 28.2 36 L27.8 45 Q19.5 42 13.5 49 Z" fill="#fcf7ee"/><path d="M11 41 Q19 35 28.2 36 L27.8 45 Q19.5 42 13.5 49 Z" fill="#fcf7ee" transform="translate(64 0) scale(-1 1)"/></svg>';var Oc=/^data:image\/(?:png|jpe?g|webp|gif|avif);base64,[a-z0-9+/]+={0,2}$/i,_c=/[\s"'<>`\\]/;function Dc(i){return i.startsWith("//")?!1:i.startsWith("/")||i.startsWith("./")||i.startsWith("../")}function Nc(){try{let i=typeof location>"u"?"":location.origin;return i&&i!=="null"?i:null}catch{return null}}function Ht(i){if(typeof i!="string"||!i||i.length>2e6||i!==i.trim())return!1;if(i.startsWith("data:"))return Oc.test(i);if(_c.test(i))return!1;let e=Nc();if(Dc(i)){if(!e)return!1;try{let t=new URL(i,e);return t.origin===e&&!t.username&&!t.password}catch{return!1}}try{let t=new URL(i);return t.username||t.password?!1:t.protocol==="https:"||e!=null&&t.origin===e}catch{return!1}}var Bc=/^[a-zA-Z0-9._-]+$/;function $n(i){let e;try{e=new URL(i,"https://seatlayer.invalid")}catch{return null}if(e.search||e.hash)return null;let t=/^\/pub\/events\/([^/]+)\/assets\/([^/]+)$/.exec(e.pathname);if(!t)return null;try{let n=decodeURIComponent(t[1]),r=decodeURIComponent(t[2]);return!n||!Bc.test(r)?null:{eventKey:n,asset:r}}catch{return null}}function Fc(i){try{return/^\/pub\/events\/[^/]+\/assets(?:\/|$)/.test(new URL(i,"https://seatlayer.invalid").pathname)}catch{return!1}}var Rt=class{constructor(e,t){this.eventKey=e;this.load=t;this.pending=new Map;this.created=new Set;this.disposed=!1}resolve(e){let t=$n(e);if(!t)return Promise.resolve(Fc(e)||!Ht(e)?null:e);if(t.eventKey!==this.eventKey||!this.load||this.disposed)return Promise.resolve(null);let n=this.pending.get(e);if(n)return n;let r=this.load(this.eventKey,t.asset).then(s=>{let o=URL.createObjectURL(s);return this.disposed?(URL.revokeObjectURL(o),null):(this.created.add(o),o)}).catch(s=>{throw this.pending.delete(e),s});return this.pending.set(e,r),r}dispose(){if(!this.disposed){this.disposed=!0;for(let e of this.created)URL.revokeObjectURL(e);this.created.clear(),this.pending.clear()}}};var tt=require("@seatlayer/core"),Xi=require("@seatlayer/core/view3d/crossfade/panorama");var hs=`
169
+ `+Lc;function Di(){try{return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches===!0}catch{return!1}}function Bn(i,e){if(!e){i.style.removeProperty("--sl-mo-ox"),i.style.removeProperty("--sl-mo-oy");return}Bi(i,e,i.getBoundingClientRect())}function Bi(i,e,t){let n=t.width||1,o=t.height||1,r=s=>Math.max(0,Math.min(100,s));i.style.setProperty("--sl-mo-ox",`${r((e.x-t.left)/n*100).toFixed(1)}%`),i.style.setProperty("--sl-mo-oy",`${r((e.y-t.top)/o*100).toFixed(1)}%`)}function Tr(i,e,t){let n=i.getBoundingClientRect(),o=t.getBoundingClientRect();Bi(i,e,{left:n.left-o.left,top:n.top-o.top,width:n.width,height:n.height})}function Er(i,e){i.classList.remove("sl-mo-out"),e!==void 0&&Bn(i,e),i.classList.remove("sl-mo-in"),i.offsetWidth,i.classList.add("sl-mo-in")}function Cr(i){i.classList.add("sl-mo-stagger");let e=0;for(let t of Array.from(i.children))t.style.setProperty("--sl-mo-i",String(e)),e+=1}function Fi(i,e,t={className:"sl-mo-out",duration:Q.exit}){let n=()=>{o||(o=!0,!(typeof window>"u")&&(clearTimeout(r),i.removeEventListener("animationend",n),e?e():i.remove()))},o=!1;i.classList.remove("sl-mo-in","sl-mo-slide-up","sl-mo-spring","sl-mo-zoom","sl-mo-rise"),i.classList.add(t.className),i.addEventListener("animationend",n);let r=setTimeout(n,Di()?0:t.duration+60)}var Oh={className:"sl-mo-slide-down",duration:Q.exit};function Ar(i){if(Di())return i.onArrive?.(),null;let e=document.createElement("div");e.className="sl-mo-fly sl-mo-host",e.setAttribute("aria-hidden","true"),e.textContent=i.label??"",e.style.left=`${i.from.x}px`,e.style.top=`${i.from.y}px`,e.style.background=i.color??"var(--sl-accent,#6e7bff)",e.style.color=i.ink??"#fff",e.style.setProperty("--sl-fly-dx",`${Math.round(i.to.x-i.from.x)}px`),e.style.setProperty("--sl-fly-dy",`${Math.round(i.to.y-i.from.y)}px`),document.body.appendChild(e);let t=!1,n=()=>{t||(t=!0,window.clearTimeout(o),e.remove(),i.onArrive?.())};e.addEventListener("animationend",n);let o=window.setTimeout(n,Q.flight+80);return e}var U=i=>String(i??"").replace(/[&<>"']/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[e]);function Ht(i,e){let t=0;for(let n of i.get(e)?.values()??[])t+=n;return t}function Pr(i){let e=[];for(let[t,n]of i)for(let[o,r]of n)r>0&&e.push({areaId:t,tierId:o,qty:r});return e}function Mr(i){let e=new Map;for(let t of i.keys())e.set(t,Ht(i,t));return e}function ni(i,e,t,n){let o=i.get(e)??new Map;n>0?o.set(t,n):o.delete(t),o.size?i.set(e,o):i.delete(e)}function Lr(i){let e=new Map;for(let t of i)t.objectType!=="ga"||!t.objectId||e.set(t.objectId,(e.get(t.objectId)??0)+(t.quantity??1));return e}function Ve(i,e){let t=Lr(e),n=0;for(let o of i.keys())n+=Math.max(0,Ht(i,o)-(t.get(o)??0));return n}function Hr(i,e,t){let n=Lr(t),o=0;for(let r of e){let s=i.gaQty.get(r.id);if(!s)continue;let a=n.get(r.id)??0;for(let[l,c]of s){let d=Math.max(0,c-a);a=Math.max(0,a-c),o+=d*i.paidPrice(r.categoryKey,l,Hc(r,l),r.id)}}return o}function Hc(i,e){return e?i.tiers?.find(t=>t.id===e)?.price??i.price:i.price}function Rr(i){let e=[],t=new Map;for(let n of i){if(n.objectType!=="ga"||!n.objectId){e.push({...n,labels:[n.label]});continue}let o=`${n.objectId}\0${n.tierId??""}`,r=t.get(o);if(r){r.quantity=(r.quantity??0)+(n.quantity??1),r.labels.push(n.label);continue}let s={...n,quantity:n.quantity??1,labels:[n.label]};t.set(o,s),e.push(s)}return e}function Ir(i,e,t){let n=new Set(t);for(let o of e)o.objectType==="ga"&&o.objectId&&n.has(o.label)&&ni(i,o.objectId,o.tierId??null,0)}function Vn(i,e){if(i.objectType!=="ga")return i.label;let t=e.find(n=>n.id===i.objectId);return t?.displayLabel??t?.label??i.label}function Rc(i){let e=new Map;for(let t of i){if(t.objectType!=="ga"||!t.objectId)continue;let n=`${t.objectId}\0${t.tierId??""}`;e.set(n,(e.get(n)??0)+(t.quantity??1))}return e}function Vi(i){let e=i.tiers??[];return e.length>1?e.map(t=>({id:t.id,label:t.name||t.id,price:t.price})):[{id:null,label:i.displayType??(0,J.t)("picker.generalAdmission"),price:i.price}]}function Or(i,e){let t=i.totalTicketCount()-Ht(i.gaQty,e.id);return Math.max(0,Math.min(e.available,i.maxTickets-t))}function $n(i,e,t,n){if(Te(i,!1),i.salesClosed){i.toast(i.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}let o=Vi(e),r=i.gaQty.get(e.id),s=Ht(i.gaQty,e.id)>0,a=Or(i,e);if(a<=0&&!s){i.toast(e.available>0?(0,J.t)("picker.maxTicketsForOrder",{count:i.maxTickets}):i.tf("picker.soldOutTitle","Sold out"),"warning");return}if(i.onGAPromptHook){let u={};for(let[f,b]of r??[])u[f??""]=b;if(i.onGAPromptHook({area:e,selected:u,min:0,max:a,tiers:o,confirm:f=>{Nc(i,e,o,f,a)},cancel:()=>Te(i)})===!0)return}let l=new Map;for(let u of o)l.set(u.id,r?.get(u.id)??0);!s&&a>0&&l.set(o[0].id,1);let c={area:e,tiers:o,draft:l,max:a,reopened:s},d=i.root?.dataset.layout==="narrow",p=document.createElement("div");p.className=d?"sl-ga-scrim sl-mo-scrim":"sl-ga-pop-layer",p.innerHTML=Ic(i,c,d),i.root?.appendChild(p),i.gaPromptEl=p,i.gaPromptReturnFocus=n??document.activeElement,d||Dc(i,p,t),i.reducedMotion()&&(p.dataset.motion="reduced"),Nr(i,c),Oc(i,p,c),requestAnimationFrame(()=>p.querySelector('[data-ga-step="1"]')?.focus())}function Ic(i,e,t){let{area:n,tiers:o}=e,r=o.length>1,s=n.displayLabel??n.label,a=o.map(l=>`<div class="sl-ga-prompt-row" data-ga-tier="${U(l.id??"")}"><div class="sl-ga-prompt-label"><span>${U(r?l.label:i.tf("picker.gaChooseTickets","How many tickets?"))}</span>`+(r?`<small>${U(i.money(i.paidPrice(n.categoryKey,l.id,l.price,n.id)))}</small>`:"")+`</div><div class="sl-ga-stepper" role="group" aria-label="${U(r?l.label:s)}"><button type="button" data-ga-step="-1" aria-label="${U(i.tf("picker.fewer","Fewer"))}">\u2212</button><output data-ga-qty aria-live="polite">0</output><button type="button" data-ga-step="1" aria-label="${U(i.tf("picker.more","More"))}">+</button></div></div>`).join("");return`<section class="${t?"sl-ga-sheet":"sl-ga-pop"}" role="dialog" aria-modal="true" aria-label="${U((0,J.t)("picker.gaChooseForArea",{area:s}))}"><div class="sl-ga-prompt-head"><div class="sl-ga-prompt-eyebrow">${U(n.displayType??i.tf("picker.generalAdmission","General admission"))}</div><h2 class="sl-ga-prompt-title">${U(s)}</h2><p class="sl-ga-prompt-sub" data-ga-sub></p><button type="button" class="sl-ga-prompt-close" data-ga-cancel aria-label="${U((0,J.t)("common.close"))}">\xD7</button></div><div class="sl-ga-prompt-body">${a}`+(o.length>1?`<div class="sl-ga-prompt-total"><span>${U(i.tf("picker.total","Total"))}</span><b data-ga-total></b></div>`:"")+'<p class="sl-ga-prompt-hint" data-ga-hint></p></div><div class="sl-ga-prompt-actions">'+(e.reopened?`<button type="button" class="sl-ga-prompt-remove" data-ga-remove>${U(i.tf("picker.gaRemove","Remove"))}</button>`:`<button type="button" class="sl-ga-prompt-remove" data-ga-cancel>${U((0,J.t)("common.cancel"))}</button>`)+'<button type="button" class="sl-ga-prompt-confirm" data-ga-confirm></button></div></section>'}function zn(i){let e=0;for(let t of i.draft.values())e+=t;return e}function _r(i,e){let t=0;for(let n of e.tiers)t+=(e.draft.get(n.id)??0)*i.paidPrice(e.area.categoryKey,n.id,n.price,e.area.id);return t}function Nr(i,e){let t=i.gaPromptEl;if(!t)return;let n=zn(e),o=_r(i,e);t.querySelectorAll("[data-ga-tier]").forEach(c=>{let d=c.dataset.gaTier?c.dataset.gaTier:null,p=e.draft.get(d)??0,u=c.querySelector("[data-ga-qty]");u&&(u.value=String(p)),c.querySelectorAll("[data-ga-step]").forEach(h=>{h.disabled=Number(h.dataset.gaStep)<0?p<=0:n>=e.max})});let r=t.querySelector("[data-ga-sub]");r&&(r.textContent=`${i.money(i.paidPrice(e.area.categoryKey,e.tiers[0].id,e.tiers[0].price,e.area.id))} \xB7 ${(0,J.tCount)("picker.leftCount",e.area.available)}`);let s=t.querySelector("[data-ga-total]");s&&(s.textContent=i.money(o));let a=t.querySelector("[data-ga-hint]");a&&(a.textContent=n>=e.max&&e.max>0?e.area.available<=e.max?(0,J.tCount)("picker.leftCount",e.area.available):(0,J.t)("picker.maxTicketsForOrder",{count:i.maxTickets}):"");let l=t.querySelector("[data-ga-confirm]");l&&(l.textContent=e.reopened?(0,J.tCount)("picker.gaUpdate",n,{count:n}):(0,J.tCount)("picker.gaAdd",n,{count:n,price:i.money(o)}),l.disabled=n<=0&&!e.reopened)}function Oc(i,e,t){e.querySelectorAll("[data-ga-step]").forEach(n=>{n.addEventListener("click",()=>{let o=n.closest("[data-ga-tier]");if(!o)return;let r=o.dataset.gaTier?o.dataset.gaTier:null,s=Number(n.dataset.gaStep),a=t.draft.get(r)??0,l=t.max-zn(t);t.draft.set(r,Math.max(0,a+(s>0?Math.min(1,l):-1))),Nr(i,t)})}),e.querySelectorAll("[data-ga-cancel]").forEach(n=>n.addEventListener("click",()=>Te(i))),e.querySelector("[data-ga-remove]")?.addEventListener("click",()=>{i.gaQty.delete(t.area.id),Te(i),i.syncTray(),Fn(i,(0,J.t)("picker.gaRemoved",{area:t.area.displayLabel??t.area.label}))}),e.querySelector("[data-ga-confirm]")?.addEventListener("click",()=>{_c(i,t)}),e.addEventListener("mousedown",n=>{n.target===e&&Te(i)}),e.addEventListener("keydown",n=>{if(n.key==="Escape"){n.stopPropagation(),Te(i);return}if(n.key!=="Tab")return;let o=[...e.querySelectorAll('button:not(:disabled),[tabindex]:not([tabindex="-1"])')];if(!o.length)return;let r=o[0],s=o[o.length-1];n.shiftKey&&document.activeElement===r?(n.preventDefault(),s.focus()):!n.shiftKey&&document.activeElement===s&&(n.preventDefault(),r.focus())})}function _c(i,e){let t=zn(e),n=_r(i,e);for(let r of e.tiers)ni(i.gaQty,e.area.id,r.id,e.draft.get(r.id)??0);Te(i),i.syncTray();let o=e.area.displayLabel??e.area.label;t>0?Fn(i,(0,J.tCount)("picker.gaAdded",t,{count:t,area:o,price:i.money(n)})):Fn(i,(0,J.t)("picker.gaRemoved",{area:o}))}function Nc(i,e,t,n,o){if(typeof n=="number")ni(i.gaQty,e.id,t[0].id,Math.max(0,Math.min(o,Math.floor(n))));else{i.gaQty.delete(e.id);let r=o;for(let s of t){let a=Math.max(0,Math.floor(n[s.id??""]??0)),l=Math.min(a,r);r-=l,ni(i.gaQty,e.id,s.id,l)}}i.syncTray()}function Te(i,e=!0){let t=i.gaPromptReturnFocus;i.gaPromptEl&&Fi(i.gaPromptEl),i.gaPromptEl=null,i.gaPromptReturnFocus=null,e&&t&&requestAnimationFrame(()=>(t.isConnected?t:i.root)?.focus())}function Dc(i,e,t){let n=i.root,o=e.querySelector(".sl-ga-pop");if(!n||!o||!t)return;let r=n.getBoundingClientRect(),s=t.x-r.left,a=t.y-r.top;e.style.setProperty("--sl-ga-anchor-x",`${s}px`),e.style.setProperty("--sl-ga-anchor-y",`${a}px`),requestAnimationFrame(()=>{let l=o.offsetWidth||260,c=o.offsetHeight||220,d=Math.max(8,Math.min(r.width-l-8,s-l/2)),p=a-c-14,u=p>=8?p:Math.min(r.height-c-8,a+14);o.style.left=`${d}px`,o.style.top=`${Math.max(8,u)}px`,o.dataset.side=p>=8?"above":"below",o.style.setProperty("--sl-ga-arrow-x",`${Math.max(12,Math.min(l-12,s-d))}px`)})}function Fn(i,e){i.srEl&&(i.srEl.textContent=e)}function Dr(i,e,t=[]){let n=[],o=Rc(t);for(let s of e){let a=i.gaQty.get(s.id);if(!a)continue;let l=Vi(s);for(let c of l){let d=(a.get(c.id)??0)-(o.get(`${s.id}\0${c.id??""}`)??0);if(d<=0)continue;let p=i.paidPrice(s.categoryKey,c.id,c.price,s.id);n.push(`<div class="sl-ga" data-ga="${U(s.id)}" data-ga-row-tier="${U(c.id??"")}"><div class="sl-ga-info"><div class="sl-ga-name">${U(s.displayLabel??s.label)}</div><div class="sl-ga-sub">${U(l.length>1?c.label:s.displayType??i.tf("picker.generalAdmission","General admission"))} \xB7 ${U(i.money(p))} \xB7 ${U((0,J.tCount)("picker.leftCount",s.available))}</div></div><div class="sl-ga-qty"><button type="button" data-d="-1" aria-label="${U(i.tf("picker.fewer","Fewer"))}">\u2212</button><span>${d}</span><button type="button" data-d="1" aria-label="${U(i.tf("picker.more","More"))}">+</button></div></div>`)}}let r=e.filter(s=>Ht(i.gaQty,s.id)<=0&&!t.some(a=>a.objectId===s.id));return r.length&&n.push(`<div class="sl-ga-areas" data-ga-areas><button type="button" class="sl-ga-areas-toggle" data-ga-areas-toggle aria-expanded="${i.gaAreasExpanded}"><span>${U(i.tf("picker.gaAreasHeading","Areas"))}</span><small>${r.length}</small></button>`+(i.gaAreasExpanded?`<div class="sl-ga-areas-list">${r.map(s=>`<button type="button" class="sl-ga-area-open" data-ga-open="${U(s.id)}"${s.available<=0?" disabled":""}><span class="name">${U(s.displayLabel??s.label)}<small>${U(s.displayType??i.tf("picker.generalAdmission","General admission"))}</small></span><span class="meta">${U(i.money(i.paidPrice(s.categoryKey,null,s.price,s.id)))} \xB7 ${U(s.available>0?(0,J.tCount)("picker.leftCount",s.available):i.tf("picker.soldOutTitle","Sold out"))}</span></button>`).join("")}</div>`:"")+"</div>"),n.join("")}function Br(i,e,t){e.querySelectorAll(".sl-ga .sl-ga-qty button").forEach(n=>{n.addEventListener("click",()=>{let o=n.closest(".sl-ga");if(!o?.dataset.ga)return;let r=t.find(c=>c.id===o.dataset.ga);if(!r)return;let s=o.dataset.gaRowTier?o.dataset.gaRowTier:null,a=Number(n.dataset.d),l=i.gaQty.get(r.id)?.get(s)??0;if(a>0&&Or(i,r)-Ht(i.gaQty,r.id)<=0){i.toast((0,J.t)("picker.maxTicketsForOrder",{count:i.maxTickets}),"warning");return}ni(i.gaQty,r.id,s,Math.max(0,l+a)),i.syncTray()})}),e.querySelector("[data-ga-areas-toggle]")?.addEventListener("click",()=>{i.gaAreasExpanded=!i.gaAreasExpanded,i.syncTray()}),e.querySelectorAll("[data-ga-open]").forEach(n=>{n.addEventListener("click",()=>{let o=t.find(r=>r.id===n.dataset.gaOpen);o&&$n(i,o,null,n)})})}var $i='<svg viewBox="0 0 64 56" width="12" height="11" fill="none" aria-hidden="true" focusable="false" style="display:block"><path d="M4 13 Q16 6 29 7 L28.5 17 Q17 16.5 7 22 Z" fill="#f4b740"/><path d="M4 13 Q16 6 29 7 L28.5 17 Q17 16.5 7 22 Z" fill="#f4b740" transform="translate(64 0) scale(-1 1)"/><path d="M8 28 Q18 22 28.6 23 L28.2 32 Q18 28.5 10 36 Z" fill="#fcf7ee"/><path d="M8 28 Q18 22 28.6 23 L28.2 32 Q18 28.5 10 36 Z" fill="#fcf7ee" transform="translate(64 0) scale(-1 1)"/><path d="M11 41 Q19 35 28.2 36 L27.8 45 Q19.5 42 13.5 49 Z" fill="#fcf7ee"/><path d="M11 41 Q19 35 28.2 36 L27.8 45 Q19.5 42 13.5 49 Z" fill="#fcf7ee" transform="translate(64 0) scale(-1 1)"/></svg>';var Bc=/^[a-zA-Z0-9._-]+$/;function jn(i){let e;try{e=new URL(i,"https://seatlayer.invalid")}catch{return null}if(e.search||e.hash)return null;let t=/^\/pub\/events\/([^/]+)\/assets\/([^/]+)$/.exec(e.pathname);if(!t)return null;try{let n=decodeURIComponent(t[1]),o=decodeURIComponent(t[2]);return!n||!Bc.test(o)?null:{eventKey:n,asset:o}}catch{return null}}function Fc(i){try{return/^\/pub\/events\/[^/]+\/assets(?:\/|$)/.test(new URL(i,"https://seatlayer.invalid").pathname)}catch{return!1}}var Rt=class{constructor(e,t){this.eventKey=e;this.load=t;this.pending=new Map;this.created=new Set;this.disposed=!1}resolve(e){let t=jn(e);if(!t)return Promise.resolve(Fc(e)||!wt(e)?null:e);if(t.eventKey!==this.eventKey||!this.load||this.disposed)return Promise.resolve(null);let n=this.pending.get(e);if(n)return n;let o=this.load(this.eventKey,t.asset).then(r=>{let s=URL.createObjectURL(r);return this.disposed?(URL.revokeObjectURL(s),null):(this.created.add(s),s)}).catch(r=>{throw this.pending.delete(e),r});return this.pending.set(e,o),o}dispose(){if(!this.disposed){this.disposed=!0;for(let e of this.created)URL.revokeObjectURL(e);this.created.clear(),this.pending.clear()}}};var it=require("@seatlayer/core"),qi=require("@seatlayer/core/view3d/crossfade/panorama");var Fr=`
172
170
  /* confirm card: a candidate is not in the tray until Select. Map gestures and
173
171
  floating chrome pause while the card owns focus, keeping the camera stable. */
174
172
  .sl-picker[data-confirming="true"] .sl-map-host>:not(.sl-confirm){pointer-events:none}
@@ -250,7 +248,12 @@
250
248
  .sl-confirm-id{display:none}
251
249
  .sl-confirm-strip{display:contents}
252
250
  .sl-confirm-pills{display:none}
253
- .sl-confirm-body{padding:11px 12px 12px}
251
+ /* THE BODY'S GUTTERS ARE NAMED. The seat-note bands are full-bleed and live
252
+ inside this padded body, so they cancel it with a negative margin \u2014 and
253
+ they have to cancel the PHONE's tighter padding too. Two custom properties
254
+ mean one rule in pickerStylesNotes does both widths; a hard-coded -12px
255
+ would leave a 2px sliver of surface down each edge on narrow. */
256
+ .sl-confirm-body{--sl-cbody-x:12px;--sl-cbody-y:11px;padding:var(--sl-cbody-y) var(--sl-cbody-x) 12px}
254
257
  .sl-confirm-tiers{display:grid;gap:6px;margin:0 0 9px;padding:0;border:0}
255
258
  .sl-confirm-tiers legend{margin:0 0 6px;padding:0;color:var(--sl-muted);font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
256
259
  .sl-confirm-tier{display:flex;align-items:center;gap:9px;width:100%;min-height:40px;padding:8px 10px;border:1px solid var(--sl-line);
@@ -509,7 +512,7 @@
509
512
  note keeps its own 10px so the gap never depends on what is above it. The
510
513
  strip carries no margin of its own \u2014 the body's padding IS the gap under the
511
514
  identity line, and having both stacked 20px of air above the photo. */
512
- .sl-picker[data-layout="narrow"] .sl-confirm-body{padding:8px 10px 10px}
515
+ .sl-picker[data-layout="narrow"] .sl-confirm-body{--sl-cbody-x:10px;--sl-cbody-y:8px;padding:var(--sl-cbody-y) var(--sl-cbody-x) 10px}
513
516
  .sl-picker[data-layout="narrow"] .sl-confirm-tier{min-height:38px;padding:7px 9px}
514
517
  .sl-picker[data-layout="narrow"] .sl-confirm-row{margin-top:0}
515
518
  .sl-picker[data-layout="narrow"] .sl-confirm-row:not(:first-child){margin-top:10px}
@@ -546,7 +549,7 @@
546
549
  color:var(--sl-text);font-weight:700;font-size:12px;display:flex;align-items:center;justify-content:center;gap:7px}
547
550
  .sl-confirm-view:hover{border-color:var(--sl-muted)}
548
551
  .sl-confirm-view svg{width:14px;height:14px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
549
- `;var us=`
552
+ `;var Vr=`
550
553
  /* Test mode is environment context, not an action. The chip flows in the
551
554
  top-left anchor region: the old rotated corner ribbon sat at a negative
552
555
  offset and was clipped by the widget root's rounded overflow:hidden (its
@@ -712,8 +715,12 @@
712
715
  .sl-tip-reason{padding:8px 12px 10px 15px;margin-top:1px;font-size:11.5px;line-height:1.35;
713
716
  font-weight:650;color:var(--sl-muted);
714
717
  border-top:1px solid color-mix(in srgb,var(--sl-line) 60%,transparent)}
715
- .sl-tip-cx{display:flex;align-items:center;gap:6px;padding:5px 10px 7px;font-size:10.5px;font-weight:700;color:#e8b24a}
716
- .sl-tip-cx .g{font-size:12px}
718
+ /* The card's seat notes sit at its foot, under the reason line, and they are
719
+ BANDS \u2014 so the card's own 2px bottom padding has to go, or the last band
720
+ floats on a sliver of surface instead of meeting the card's edge. Only when
721
+ there are notes: a card without them keeps the breathing room. .sl-tip-cx
722
+ was the two hand-picked lines this block replaced. */
723
+ .sl-tip:has(.sl-notes){padding-bottom:0}
717
724
 
718
725
  /* Performance Group: the night strip on a partly-available seat's card, and
719
726
  the per-night pane + mode switch in the selection tray. A card the buyer
@@ -803,7 +810,7 @@
803
810
  .sl-pg-switch:hover{border-style:solid;color:var(--sl-text);border-color:var(--sl-accent)}
804
811
  @media(prefers-reduced-motion:reduce){.sl-tip{animation:none!important}.sl-tip,.sl-tip-switch,.sl-pg-switch{transition:none!important}}
805
812
  @media(max-width:639px){.sl-confirm-group-dates{width:min(340px,calc(100% - 20px))}.sl-confirm-date{min-height:32px}}
806
- `;var ms=`
813
+ `;var $r=`
807
814
  /* 3D venue overlay \u2014 mounts over the (paused) Konva stage inside the map host.
808
815
  Carries its own gradient so it paints instantly before the scene builds, and
809
816
  cross-fades on enter/exit via a compositor-only opacity transition. Sits below
@@ -947,17 +954,43 @@
947
954
  /* While immersed, the 2D-only chrome is meaningless \u2014 hide it, keep Map|3D. */
948
955
  .sl-picker[data-view3d="on"] .sl-rungs,
949
956
  .sl-picker[data-view3d="on"] .sl-floors,
950
- .sl-picker[data-view3d="on"] .sl-zoom,
951
957
  .sl-picker[data-view3d="on"] .sl-seccard,
952
958
  /* The overview toggle went with the overview: 3D frames itself, and the panel
953
959
  it opens is already hidden by the line above \u2014 leaving the button was
954
960
  leaving a control that does nothing in the buyer's only left-hand column. */
955
961
  .sl-picker[data-view3d="on"] .sl-minimap-toggle,
956
962
  .sl-picker[data-view3d="on"] .sl-minimap{display:none!important}
957
- /* Immersed, the left-hand column carries the accessibility menu and the 3D
958
- navigation next to each other over a moving render. Six pixels between two
959
- 44px targets is a mis-tap; twelve is the same spacing the bottom-right zoom
960
- cluster uses. */
963
+ /* THE ZOOM COLUMN EMPTIES, IT DOES NOT VANISH. Stepping and fitting are
964
+ meaningless while the camera frames itself, so every disc goes \u2014 but the \u267F
965
+ control rides this column now (it used to sit alone in the bottom-left
966
+ corner), and 3D is exactly where a buyer may still need to say "show me the
967
+ wheelchair places". Hiding .sl-zoom outright would have taken the one
968
+ control in it that is not about zoom. So the children go and the column
969
+ stays, holding a single 36px disc. */
970
+ .sl-picker[data-view3d="on"] .sl-zoom>*:not(.sl-a11y){display:none!important}
971
+ /* ...AND THAT ONE DISC HAS TO GET OUT OF THE RAIL'S WAY. On a wide viewport
972
+ the 3D module docks its own controls in the SAME bottom-right corner the zoom
973
+ column anchors to, and the \u267F came to rest on top of the dock's bottom
974
+ control \u2014 "Show whole venue" \u2014 covering about 60% of it, enough that
975
+ elementFromPoint at that control's centre returned the \u267F and the buyer had no
976
+ way back to the whole venue (walk-through, 2026-09-05).
977
+
978
+ The lift is the dock's own geometry (view3d/ui/controlDock): five 44px
979
+ controls in two columns \u2014 rotate/move at gap 6, then +/\u2212/fit at gap 6 \u2014 with
980
+ a 7px gap between the columns, so 5*44 + 3*6 + 7 = 245px, sitting 14px off
981
+ the bottom. Clearing 259px puts the disc the same 12px above the rail that
982
+ the rest of this chrome uses between stacked controls. The --sl-3d-rail-h var is
983
+ honoured first, so the day the dock publishes its measured height this stops
984
+ being arithmetic.
985
+
986
+ WIDE ONLY. The narrow dock drops rotate/move and +/\u2212 to the fit chip alone
987
+ and lifts itself to 76px, so on a phone the two already clear each other and
988
+ this margin would only strand the \u267F in the middle of the map. */
989
+ .sl-picker[data-view3d="on"]:not([data-layout="narrow"]) .sl-zoom{
990
+ margin-bottom:calc(var(--sl-3d-rail-h, 245px) + 14px)}
991
+ /* Immersed, the left-hand column carries the 3D navigation over a moving
992
+ render. Six pixels between two 44px targets is a mis-tap; twelve is the same
993
+ spacing the bottom-right zoom cluster uses. */
961
994
  .sl-picker[data-view3d="on"] .sl-anchor[data-region="bottom-left"],
962
995
  .sl-picker[data-view3d="on"] .sl-anchor[data-region="left-rail"]{gap:12px}
963
996
  /* Room kept clear on the right for the module's own Overview chip. Measured
@@ -1033,7 +1066,7 @@
1033
1066
  .sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm{bottom:6px}
1034
1067
  .sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-grid,
1035
1068
  .sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-cat,
1036
- .sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-body>.sl-cx{display:none}
1069
+ .sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-body>.sl-notes{display:none}
1037
1070
  .sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-body{padding:6px 8px 7px}
1038
1071
  .sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-confidence{margin-top:0}
1039
1072
  .sl-picker[data-view3d="on"][data-layout="narrow"][data-density="compact"] .sl-confirm-confidence em{display:block;margin-bottom:2px;
@@ -1148,121 +1181,82 @@
1148
1181
  .sl-view3d-passport-shell{padding:max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom))}
1149
1182
  .sl-view3d-passport{width:100%;max-height:100%;padding:14px 14px max(24px,calc(14px + env(safe-area-inset-bottom)));border-radius:15px}
1150
1183
  }
1151
- `;var fs=`
1152
- /* THE PHONE TICKET LIST (owner 2026-08-27: "on mobile the cards take lots of
1153
- space, lots of white space on each card"). The desktop card spends ~72px per
1154
- ticket on SECTION/ROW/SEAT eyebrows, a category line and a 34px icon rail \u2014
1155
- all of it repeated per seat. On phone the eyebrows are lifted into ONE header
1156
- row, each ticket is a 40px line divided by a hairline rather than a card with
1157
- its own border, and the category name goes: the map already paints the colour
1158
- and the price is on the line. What is left is what a ticket stub prints. */
1159
- .sl-picker[data-layout="narrow"] .sl-tray{padding:8px 10px 10px;gap:6px}
1184
+ `;var zr=`
1185
+ .sl-notes{display:flex;flex-direction:column;gap:0;margin:0}
1186
+ /* No radius, no border, no inset: a band is the card's full width or it is a
1187
+ plate again. The hairline lives on the JOIN, so the first band sits flush
1188
+ against the category band above it and the block reads as a continuation of
1189
+ it rather than as a new object. */
1190
+ .sl-note{display:flex;align-items:flex-start;gap:9px;padding:9px 14px;
1191
+ background:color-mix(in srgb,var(--sl-text) 6%,var(--sl-surface));
1192
+ animation:slNoticeIn .28s ease both}
1193
+ .sl-note+.sl-note{border-top:1px solid color-mix(in srgb,var(--sl-line) 60%,transparent)}
1194
+ .sl-note-i{flex:none;display:flex;align-items:center;justify-content:center;line-height:0;
1195
+ margin-top:1px;color:var(--sl-muted)}
1196
+ .sl-note-i svg{display:block}
1197
+ .sl-note-t{min-width:0;display:flex;flex-direction:column;gap:2px}
1198
+ .sl-note-t b{font-size:12.5px;font-weight:800;color:var(--sl-text)}
1199
+ .sl-note-n{font-size:11px;line-height:1.4;color:color-mix(in srgb,var(--sl-muted) 75%,var(--sl-text))}
1200
+ /* A view restriction keeps the amber caution tone \u2014 deliberately NOT the red of
1201
+ a taken seat: the seat is available, the view is the caveat. */
1202
+ .sl-note-warn{background:color-mix(in srgb,var(--sl-warn) 10%,var(--sl-surface))}
1203
+ .sl-note-warn .sl-note-i,.sl-note-warn .sl-note-t b{color:var(--sl-warn-text)}
1204
+ .sl-note-premium{background:color-mix(in srgb,var(--sl-premium) 10%,var(--sl-surface))}
1205
+ .sl-note-premium .sl-note-i,.sl-note-premium .sl-note-t b{color:var(--sl-premium-text)}
1206
+ /* THE CONFIRM CARD'S BODY IS PADDED AND THE BANDS ARE NOT. The body owns its
1207
+ gutters as custom properties (see pickerStylesConfirm) precisely so this
1208
+ block can cancel them and reach both edges, at desktop width and at the
1209
+ phone's tighter padding, from ONE rule. The notes are the body's first child,
1210
+ so the negative block-start puts them hard against the category band. */
1211
+ .sl-confirm-body>.sl-notes{margin:calc(var(--sl-cbody-y,11px)*-1) calc(var(--sl-cbody-x,12px)*-1) 10px}
1212
+ /* Compact: the tap/hover card is narrower and floats over the map, so the type
1213
+ comes down a rung and the inset moves to 15px \u2014 the tap card's own text
1214
+ inset, which clears the category rail on its leading edge. The bands stay. */
1215
+ .sl-notes.compact{border-top:1px solid color-mix(in srgb,var(--sl-line) 60%,transparent)}
1216
+ .sl-notes.compact .sl-note{padding:7px 12px 7px 15px}
1217
+ .sl-notes.compact .sl-note-t b{font-size:11.5px;font-weight:750}
1218
+ .sl-notes.compact .sl-note-n{font-size:10.5px}
1219
+ `;var jr=`
1220
+ /* THE PHONE SHOWS THE DESKTOP CARD (owner call 2026-09-06: "cards should be
1221
+ the same design as desktop"). What used to be here was a second rendering of
1222
+ the cart \u2014 a bordered .sl-tlist box of 44px hairline-divided .sl-tline rows,
1223
+ with consecutive seats folded into runs behind a "+6 more". It saved real
1224
+ pixels, and it cost the sheet its coherence: a bordered list on --sl-surface
1225
+ between a chrome band and a shadowed footer reads as three blocks stacked in
1226
+ a panel, not as one panel. The collapsed sheet caps the tray at three cards
1227
+ and scrolls instead (see the peek rules in the base sheet), which is the
1228
+ same answer without a second design to keep in step.
1229
+
1230
+ Gone with it: .sl-tlist, .sl-tline and its dot/id/mult parts, .sl-trun-toggle
1231
+ and the folded runs it opened, .sl-tmore, and every narrow-only override of
1232
+ .sl-chip. The tray's own narrow padding went too \u2014 the gutters are the
1233
+ desktop panel's 14px now, so the cards line up with the total line under
1234
+ them. */
1160
1235
  /* The map IS the instruction on a phone, so the sentence goes \u2014 but only
1161
1236
  visually. A blind buyer has no map to read it off. */
1162
1237
  .sl-picker[data-layout="narrow"] .sl-tray-hint{position:absolute!important;width:1px!important;height:1px!important;
1163
1238
  padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;
1164
1239
  white-space:nowrap!important;border:0!important}
1165
- /* THE TRAY'S FLOOR IS ONE WHOLE TICKET, not one whole card. 96px was sized for
1166
- the two-line card; against a 40px line it forced 32px of empty tray under a
1167
- one-ticket cart \u2014 the exact whitespace this pass exists to remove. 64px is
1168
- the list header plus one line, which is what "never crushed" has to mean
1169
- here: the buyer can always see a complete ticket. */
1170
- .sl-picker[data-layout="narrow"] .sl-tray{min-height:64px}
1171
- .sl-tlist{display:flex;flex-direction:column;overflow:hidden;background:var(--sl-surface);
1172
- border:1px solid var(--sl-line);border-radius:var(--sl-r-sm)}
1173
- /* 44px, NOT 40. The remove button's target box was nominally 44 and measured
1174
- 41x39: a 32px button with a -6px inset cannot reach the floor inside a 40px
1175
- line, because the line above and below it own those pixels. Four pixels a
1176
- line is what a reachable destructive control costs. */
1177
- .sl-picker[data-layout="narrow"] .sl-tline{display:flex;align-items:center;gap:7px;min-height:44px;
1178
- padding:0 4px 0 9px;border:0;border-radius:0;background:transparent;box-shadow:none;font-size:13px}
1179
- .sl-picker[data-layout="narrow"] .sl-tline+.sl-tline{border-top:1px solid color-mix(in srgb,var(--sl-line) 70%,transparent)}
1180
- .sl-picker[data-layout="narrow"] .sl-tline.sl-held{background:color-mix(in srgb,var(--sl-accent) 7%,transparent);
1181
- box-shadow:inset 3px 0 0 color-mix(in srgb,var(--sl-accent) 72%,transparent)}
1182
- /* Section ellipsizes; row, seat and price are what the buyer checks against the
1183
- map and against their money, so they never wrap and never shrink. */
1184
- .sl-tline-id{flex:1;min-width:0;display:flex;align-items:center;gap:5px;white-space:nowrap;font-variant-numeric:tabular-nums}
1185
- .sl-tline-id b{min-width:0;overflow:hidden;text-overflow:ellipsis;font-weight:700}
1186
- .sl-tline-id i{flex:none;font-style:normal;color:var(--sl-muted)}
1187
- .sl-tline-id span{flex:none;font-weight:600}
1188
- .sl-tline-mult{flex:none;color:var(--sl-muted);font-size:11px;font-variant-numeric:tabular-nums}
1189
- .sl-picker[data-layout="narrow"] .sl-tline .amt{flex:none;font-weight:700;font-variant-numeric:tabular-nums}
1190
- /* 32px of ink, 44px of target \u2014 the same grow-the-target-not-the-ink pattern
1191
- the price rail uses. */
1192
- /* Above the price beside it, so the box is the full 44 across and not clipped
1193
- to 41 by a run of text that is not a control anyway. */
1194
- .sl-picker[data-layout="narrow"] .sl-tline .rm{position:relative;z-index:1;flex:none;width:32px;height:32px;min-height:32px;
1195
- border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--sl-muted)}
1196
- .sl-picker[data-layout="narrow"] .sl-tline .rm::before{content:'';position:absolute;top:50%;left:50%;
1197
- width:44px;height:44px;transform:translate(-50%,-50%)}
1198
- .sl-picker[data-layout="narrow"] .sl-tline .rm svg{width:12px;height:12px;stroke:currentColor;stroke-width:2.4;fill:none;stroke-linecap:round}
1199
- /* The selected tick shrinks to the category-coloured dot the legend already
1200
- taught; the held lock keeps its glyph, because a lock is not a colour. */
1201
- .sl-tline-dot{flex:none;width:9px;height:9px;border-radius:50%;background:var(--sl-accent)}
1202
- .sl-picker[data-layout="narrow"] .sl-tline .sl-ticket-state{width:8px;height:8px;flex:none;background:var(--sl-accent)}
1203
- .sl-picker[data-layout="narrow"] .sl-tline .sl-ticket-state svg{display:none}
1204
- .sl-picker[data-layout="narrow"] .sl-tline.sl-held .sl-ticket-state{width:14px;height:14px}
1205
- .sl-picker[data-layout="narrow"] .sl-tline.sl-held .sl-ticket-state svg{display:block;width:9px;height:9px}
1206
- .sl-picker[data-layout="narrow"] .sl-tline .tier{max-width:104px;min-height:28px;padding:0 22px 0 7px;font-size:11px}
1207
- .sl-picker[data-layout="narrow"] .sl-tline .sl-table-edit{margin:0}
1208
- /* A folded run trades the dot for the chevron that opens it \u2014 one control per
1209
- line, never two competing affordances in 8px. */
1210
- /* 18px WAS NOT A TARGET. This chevron is the only way into a folded run \u2014 the
1211
- control a buyer reaches for to drop one seat out of six \u2014 and it was half the
1212
- width of the \u2715 beside it. The ink stays small so the line still reads as a
1213
- line; the box around it reaches the touch floor, the same way the price
1214
- chips and the remove button do. */
1215
- .sl-trun-toggle{position:relative;flex:none;width:24px;height:32px;margin-left:-4px;display:flex;align-items:center;justify-content:center;color:var(--sl-muted)}
1216
- .sl-trun-toggle::before{content:'';position:absolute;top:50%;left:50%;width:44px;height:44px;transform:translate(-50%,-50%)}
1217
- .sl-trun-toggle svg{width:13px;height:13px;stroke:currentColor;stroke-width:2.2;fill:none;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s}
1218
- .sl-trun-toggle[aria-expanded="true"] svg{transform:rotate(90deg)}
1219
- /* These carry the SAME narrow prefix as the line rule above on purpose: a bare
1220
- .sl-tline.sl-tsub loses to the [data-layout="narrow"] .sl-tline rule on
1221
- specificity no matter which comes last, and a folded run would then render
1222
- with every one of its members already showing. */
1223
- .sl-picker[data-layout="narrow"] .sl-tline.sl-tsub{display:none}
1224
- .sl-picker[data-layout="narrow"] .sl-tline.sl-tsub[data-open="true"]{display:flex;padding-left:26px;background:color-mix(in srgb,var(--sl-line) 16%,transparent)}
1225
- /* Last, deliberately: a collapsed tail stays hidden even when its run is open. */
1226
- .sl-picker[data-layout="narrow"] .sl-tlist[data-collapsed="true"] .sl-tline[data-overflow="true"]{display:none}
1227
- .sl-tmore{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:40px;
1228
- padding:0 10px;font-size:12.5px;font-weight:650;color:var(--sl-muted);border-top:1px solid var(--sl-line)}
1229
- .sl-tmore svg{width:13px;height:13px;flex:none;stroke:currentColor;stroke-width:2.2;fill:none;
1230
- stroke-linecap:round;stroke-linejoin:round;transition:transform .18s}
1231
- .sl-tmore[aria-expanded="true"] svg{transform:rotate(180deg)}
1232
-
1233
- /* THE SHEET HEAD IS A ROW, NOT A BAND (owner pass 2026-08-27). Open, it held
1234
- "1 ticket \xB7 $180" and a chevron inside 48px of chrome with air on both
1235
- sides \u2014 a title bar's worth of screen for six words and one control. 36px,
1236
- the handle overlapping into it exactly as it does at peek. */
1237
- .sl-picker[data-layout="narrow"][data-sheet="open"] .sl-sheet-head{min-height:36px;padding:0 6px 0 12px}
1238
- .sl-picker[data-layout="narrow"][data-sheet="open"] .sl-sheet-grab{top:4px}
1239
- .sl-picker[data-layout="narrow"][data-sheet="open"] .sl-sheet-bar{min-height:36px}
1240
- .sl-picker[data-layout="narrow"][data-sheet="open"] .sl-sheet-peek{font-size:14px;font-weight:700}
1241
- /* 28px of INK while the panel is open \u2014 the head has no height to spare there
1242
- \u2014 over the 44px pseudo-target the coarse-pointer block now gives it. */
1243
- .sl-picker[data-layout="narrow"][data-sheet="open"] .sl-sheet-toggle{width:28px;height:28px}
1244
- /* THE FOOT SAYS IT ONCE. "Secure 6 more & checkout" already counts the
1245
- pending seats, so nothing under it repeats them, and the by-line is one
1246
- 18px row rather than a padded block. The bottom inset stays on .sl-side, which is the one place
1247
- it can cover the collapsed sheet too (see SeatPickerSafeArea). */
1248
- .sl-picker[data-layout="narrow"] .sl-foot{padding:8px 14px 6px}
1249
- /* NO WAY BACK INTO THE FINDER OVER A NON-EMPTY CART, ON ANY LAYOUT (owner
1250
- call 2026-09-05). A narrow-only rule used to hide the tray's \u2726 re-entry
1251
- and the collapsed bar's ghost twin; both controls are gone from the markup
1252
- now, on every width, so there is nothing left to hide. Once a cart has
1253
- tickets, it stays a cart \u2014 the finder belongs to the empty one. */
1254
- .sl-peek-total{margin-inline-start:6px;font-variant-numeric:tabular-nums}
1255
- .sl-picker[data-layout="narrow"] .sl-powered{min-height:18px;margin-top:6px;margin-bottom:0;padding:0;font-size:11px}
1256
- .sl-picker[data-layout="narrow"] .sl-powered svg{width:14px;height:14px}
1257
- /* THE SECURED STRIP IS GONE (phone: owner call 2026-08-27; every layout:
1258
- owner call 2026-09-05). It was a boxed row above the pay button \u2014 a tick,
1259
- "N secured", a sentence about a clock, and a Change button. Every part of
1260
- it is said better somewhere else: the count is in the cart head, the clock
1261
- is the header pill, and Change released the WHOLE hold when the \u2715 on each
1262
- held line already releases one seat. Below the button there is now only
1263
- the by-line, and nothing at all when white-label hides that too. */
1264
- .sl-picker[data-layout="narrow"] .sl-foot{display:flex;flex-direction:column;gap:0}
1265
-
1240
+ /* THE TOUCH FLOOR ON THE CART CARD, WITHOUT WAITING FOR pointer:coarse. The
1241
+ base sheet grows these two to a real 44px under a coarse pointer, which is
1242
+ every phone \u2014 but a narrow layout is also every phone-sized embed and every
1243
+ responsive preview, and the \u2715 on a ticket is not a control to leave at 30px
1244
+ in any of them. Same grow-the-target-not-the-ink shape the rest of the
1245
+ widget uses: the box reaches the floor, the glyph inside does not move. */
1246
+ .sl-picker[data-layout="narrow"] .sl-chip .rm,
1247
+ .sl-picker[data-layout="narrow"] .sl-chip .view{min-height:44px;height:44px;width:44px}
1248
+
1249
+ /* THE SHEET HEAD IS ONE CHEVRON ON BOTH STATES (owner call 2026-09-05), and
1250
+ its rules live in the base sheet beside the toggle they style. Open, it used
1251
+ to carry "1 ticket \xB7 $180" and a corner arrow; that summary is the footer's
1252
+ total line now, on both widths.
1253
+
1254
+ THE FOOT IS NOT RESTYLED HERE EITHER. It used to take its own phone padding,
1255
+ its own by-line size and a flex column layout, on top of losing its total row
1256
+ in the base sheet. The collapsed sheet IS that block now, so it is the same
1257
+ block on both widths \u2014 one set of tokens, one shadow, one thing to get
1258
+ right. The bottom inset stays on .sl-side, which is the one place it covers
1259
+ both sheet states (see SeatPickerSafeArea). */
1266
1260
  /* THE DEFAULT PHONE TRAY (same owner pass: "even default this much space and
1267
1261
  text"). With an empty cart the tray showed a sentence, a card title, a
1268
1262
  sub-line under the title, two full-width selects and a button \u2014 240px to say
@@ -1278,16 +1272,16 @@
1278
1272
  the tab order still follows the page. */
1279
1273
  .sl-picker[data-layout="narrow"] .sl-ba{grid-template-columns:auto minmax(0,1fr);gap:6px;padding:8px;border-radius:11px}
1280
1274
  .sl-picker[data-layout="narrow"] .sl-ba::after{display:none}
1281
- /* The card's own button already says what the card does, so the title and the
1282
- sentence under it go \u2014 but NOT on the confirm face, which is a question the
1283
- buyer has to read before answering. That face marks itself role="alert". */
1284
- .sl-picker[data-layout="narrow"] .sl-ba:not([role="alert"]) .sl-ba-title,
1285
- .sl-picker[data-layout="narrow"] .sl-ba-copy{display:none}
1275
+ /* THE TITLE STAYS ON THE PHONE NOW. It used to be hidden here \u2014 the card's own
1276
+ button already says what the card does, so a wrapping two-line sentence
1277
+ above it was pure cost. It is one short line carrying the \u24D8 and the "\u2605 Best
1278
+ seats" quick-pick (owner call 2026-09-06), and hiding the row would take the
1279
+ premium toggle with it. The base sheet already sizes it for this width, so
1280
+ there is nothing left to override here \u2014 only a rule to NOT write. */
1286
1281
  .sl-picker[data-layout="narrow"] .sl-ba select{min-height:34px;padding:0 24px 0 9px;font-size:12.5px}
1287
1282
  /* Row 1 and row 2: one decision each, the full width of the card. Two selects
1288
1283
  sharing a row at 375px is a listbox you open by aiming \u2014 and a zone name is
1289
1284
  the longest string on the card. */
1290
- .sl-picker[data-layout="narrow"] .sl-ba-premium{order:1}
1291
1285
  .sl-picker[data-layout="narrow"] .sl-ba-cat{order:2;grid-column:1/-1}
1292
1286
  .sl-picker[data-layout="narrow"] .sl-ba-zone{order:3;grid-column:1/-1}
1293
1287
  /* An absent zone select leaves no gap: it is simply not in the DOM, and the
@@ -1344,37 +1338,57 @@
1344
1338
  font:inherit;font-size:12px;font-weight:800;color:var(--sl-on-accent,#fff);background:var(--sl-accent)}
1345
1339
  .sl-lapse-note button:focus-visible{outline:2px solid var(--sl-accent);outline-offset:2px}
1346
1340
 
1347
- /* "4 free" / "None left" \u2014 tabular so a column of counts does not jitter as
1348
- other buyers take seats out from under the returning one. */
1349
- .sl-a11yrow-c{flex:none;font-size:10.5px;font-weight:800;color:var(--sl-muted);font-variant-numeric:tabular-nums}
1341
+ /* "4 free" / "0" \u2014 tabular so a column of counts does not jitter as other
1342
+ buyers take seats out from under the returning one. TEXT, NOT A CHIP (owner
1343
+ call 2026-09-06: the bordered pill "does not look good"): the count is a
1344
+ fact about the row it sits in, and a pill gave it the weight of a second
1345
+ control competing with the switch. */
1346
+ .sl-a11yrow-c{flex:none;white-space:nowrap;font-size:10.5px;font-weight:800;color:var(--sl-muted);font-variant-numeric:tabular-nums}
1350
1347
  /* The count as a DESTINATION. Once the engine can step the map through the
1351
1348
  sections that hold the spaces, "12 free" stops being a fact and becomes the
1352
1349
  way to reach one \u2014 so it is a real button beside the switch, not a span
1353
1350
  inside it: keyboard-reachable, and announcing where it is about to go. It
1354
1351
  sits outside the row because a <button> inside a <button> is markup the
1355
- parser discards. */
1356
- .sl-a11yrow-w{display:flex;align-items:center;gap:2px}
1352
+ parser discards.
1353
+
1354
+ IT STILL HAS TO READ AS PART OF THE LINE. The wrapper reserves the switch's
1355
+ own column as padding and the switch is placed into it absolutely \u2014 it is a
1356
+ descendant of the row button, so it stays part of that button's hit area \u2014
1357
+ which leaves the count (and the \u24D8, where a row has one) sitting between the
1358
+ label and the toggle, in the order the row is read: icon, name, count,
1359
+ switch. */
1360
+ .sl-a11yrow-w{position:relative;display:flex;align-items:center;gap:6px;padding-inline-end:42px}
1357
1361
  .sl-a11yrow-w .sl-a11yrow{flex:1;min-width:0}
1358
- button.sl-a11yrow-c{flex:none;min-height:32px;padding:0 9px;border:1px solid var(--sl-line);
1359
- border-radius:999px;background:transparent;cursor:pointer;font:inherit;
1360
- font-size:10.5px;font-weight:800;color:var(--sl-muted);font-variant-numeric:tabular-nums}
1361
- button.sl-a11yrow-c:hover{border-color:var(--sl-muted);color:var(--sl-text)}
1362
- button.sl-a11yrow-c:focus-visible{outline:2px solid var(--sl-accent);outline-offset:2px}
1363
- button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
1362
+ .sl-a11yrow-w .sl-a11yrow-s{position:absolute;inset-inline-end:8px;top:50%;transform:translateY(-50%)}
1363
+ button.sl-a11yrow-c{flex:none;width:auto;height:auto;min-height:32px;padding:0;border:0;background:transparent;cursor:pointer;
1364
+ font:inherit;font-size:10.5px;font-weight:800;color:var(--sl-muted);font-variant-numeric:tabular-nums;
1365
+ text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px;transition:color .15s,text-decoration-color .15s}
1366
+ button.sl-a11yrow-c:hover{color:var(--sl-text);text-decoration-color:currentColor}
1367
+ button.sl-a11yrow-c:focus-visible{outline:2px solid var(--sl-accent);outline-offset:2px;border-radius:6px}
1368
+ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default;text-decoration-color:transparent}
1364
1369
  /* Sold out, not absent. Dimmed and unswitchable, but still read aloud. */
1365
1370
  .sl-a11yrow[disabled]{opacity:.58;cursor:default}
1366
1371
  .sl-a11yrow[disabled]:hover{background:transparent}
1367
1372
  .sl-cx-mark-premium{color:var(--sl-premium-deep)}
1368
- .sl-cx-mark-info{color:var(--sl-muted)}
1369
- .sl-chip-cx{display:grid;gap:4px;padding-top:5px;border-top:1px solid color-mix(in srgb,var(--sl-line) 72%,transparent)}
1370
- .sl-chip-cx-tags{display:flex;flex-wrap:wrap;gap:4px}
1371
- .sl-chip-cx-tag{display:inline-flex;align-items:center;gap:4px;width:fit-content;padding:2px 6px;border-radius:999px;
1372
- font-size:9.5px;font-weight:800;line-height:1.2;white-space:nowrap}
1373
- .sl-chip-cx-tag.premium{color:var(--sl-premium-text);background:color-mix(in srgb,var(--sl-premium) 11%,var(--sl-surface));
1374
- border:1px solid color-mix(in srgb,var(--sl-premium) 30%,var(--sl-line))}
1375
- .sl-chip-cx-tag.limited{color:var(--sl-text);background:color-mix(in srgb,#f4b740 11%,var(--sl-surface));
1376
- border:1px solid color-mix(in srgb,#f4b740 32%,var(--sl-line))}
1377
- .sl-chip-cx-note{font-size:10.5px;line-height:1.35;color:var(--sl-muted)}
1373
+ .sl-cx-mark-note{color:var(--sl-muted)}
1374
+ .sl-cx-mark-access{color:var(--sl-muted)}
1375
+ /* THE CART KEEPS ITS TEXT-ONLY NOTE LINE. Everywhere else the notes are
1376
+ full-bleed bands (pickerStylesNotes) \u2014 the cart chip is the one surface that
1377
+ is NOT a popup: it is a bordered ticket in a list, the column is narrow
1378
+ enough that a band's padding wrapped "Restricted view" onto two lines, and a
1379
+ tinted band inside a bordered ticket reads as a card inside a card. So the
1380
+ ground, the gutters and the hairline between rows all come off, and what is
1381
+ left is icon, title, note \u2014 a footnote under the line it belongs to.
1382
+
1383
+ This is a deliberate exception and it is the reason these overrides look like
1384
+ they are undoing the band: they are. */
1385
+ .sl-chip-main .sl-notes{gap:3px;margin:0;padding-top:5px;
1386
+ border-top:1px solid color-mix(in srgb,var(--sl-line) 72%,transparent)}
1387
+ .sl-chip-main .sl-note{padding:0;background:transparent;gap:6px;align-items:flex-start}
1388
+ .sl-chip-main .sl-note+.sl-note{border-top:0}
1389
+ .sl-chip-main .sl-note-i{margin-top:0}
1390
+ .sl-chip-main .sl-note-t b{font-size:10px;font-weight:800}
1391
+ .sl-chip-main .sl-note-n{font-size:10px;line-height:1.35}
1378
1392
 
1379
1393
  /* PILLS SHRINK, THEN THEY WRAP (fitTextRow, rungs 1-3). "Stattdessen Pl\xE4tze
1380
1394
  nebeneinander finden" is four words longer than "Find seats together
@@ -1396,7 +1410,7 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
1396
1410
  .sl-picker .sl-fitpill.sl-fit-p2,.sl-picker .sl-fitpill.sl-fit-p3{font-size:11.5px}
1397
1411
  .sl-picker .sl-fitpill.sl-fit-p3{white-space:normal;text-align:center;
1398
1412
  padding-top:6px;padding-bottom:6px;line-height:1.2}
1399
- `;var gs="seatlayer-picker-style",Vc=`
1413
+ `;var Gr="seatlayer-picker-style",Vc=`
1400
1414
  .sl-picker{position:relative;display:flex;flex-direction:column;width:100%;height:100%;min-height:420px;overflow:hidden;
1401
1415
  background:var(--sl-bg);color:var(--sl-text);font-family:var(--sl-font);border-radius:var(--sl-radius);
1402
1416
  /* iOS INFLATES FIXED-PX TYPE IN A HOST LAYOUT IT DECIDES IS TOO NARROW, and
@@ -1430,7 +1444,16 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
1430
1444
  Named once because the sheet's padding and all four of its height rules
1431
1445
  must agree: box-sizing:border-box above means padding EATS a fixed height,
1432
1446
  so every height grows by exactly what the padding reserves. */
1433
- --sl-safe-b:env(safe-area-inset-bottom,0px)}
1447
+ --sl-safe-b:env(safe-area-inset-bottom,0px);
1448
+ /* THE MAP'S OWN CONTROLS NEED THIS MUCH MAP (measured 375x812, 2026-09-06).
1449
+ The right-hand control column is 170px of discs \u2014 \u267F 44 + three 36px zoom
1450
+ discs + three 6px gaps \u2014 pinned 12px off the bottom of the map, and the
1451
+ Map/3D toggle rides the top-right anchor 12px off the top. With an open
1452
+ sheet and four tickets the map host measured 193px, so the column's top
1453
+ disc landed ON the "3D" segment. 12 + 170 + a 58px corridor + 12 + the
1454
+ toggle's own 34px is 264: the smallest map that keeps the two clusters
1455
+ apart. Named once because all three open-sheet caps must agree. */
1456
+ --sl-map-floor:264px}
1434
1457
  .sl-picker *{box-sizing:border-box;margin:0;padding:0}
1435
1458
  /* Keep the reset intentionally specificity-free. Standalone map and panel
1436
1459
  controls must be able to establish their own token surfaces in either theme. */
@@ -1510,13 +1533,12 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
1510
1533
  map's raw-pointer gesture pipeline is untouched. */
1511
1534
  .sl-picker[data-layout="narrow"] .sl-body{flex-direction:column}
1512
1535
  .sl-picker[data-layout="narrow"] .sl-map{min-height:0;flex:1}
1513
- /* SAFE AREA LIVES ON THE SHEET, NOT ON THE FOOT. At peek the rule below hides
1514
- everything but the head \u2014 so the FOOT is not the bottom-most element, the
1515
- HEAD is, and it is the head that carries the Continue/Checkout pill. Padding
1516
- the foot alone would fix the opened sheet and leave the collapsed one (where
1517
- most buyers are) still under the home indicator. Padding the container covers
1518
- both states with one rule, and each height below grows by the same amount so
1519
- no content box shrinks. */
1536
+ /* SAFE AREA LIVES ON THE SHEET, NOT ON THE FOOT. The footer is the bottom-most
1537
+ element in both sheet states now, so padding it would work \u2014 but it would be
1538
+ a second place to remember, and everything here is box-sizing:border-box, so
1539
+ padding the foot shortens the button inside it rather than lifting it off the
1540
+ home indicator. Padding the container covers both states with one rule, and
1541
+ each cap below grows by the same amount so no content box shrinks. */
1520
1542
  /* THE SHEET IS AS TALL AS ITS TICKETS, NO TALLER (owner call 2026-08-27). It
1521
1543
  used to be a FIXED height, so a buyer holding ONE ticket lost 50-60% of the
1522
1544
  phone to a mostly-empty panel. The height is now the content's own
@@ -1528,21 +1550,85 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
1528
1550
  height:auto alone could never transition. */
1529
1551
  .sl-picker[data-layout="narrow"] .sl-side{width:100%;border-left:0;border-top:1px solid var(--sl-line);
1530
1552
  flex:none;height:auto;max-height:calc(min(72%,480px) + var(--sl-safe-b));padding-bottom:var(--sl-safe-b);
1531
- overflow:hidden;transition:max-height .3s cubic-bezier(.2,.8,.2,1);overscroll-behavior:contain}
1532
- .sl-picker[data-layout="narrow"][data-sheet="open"][data-has-selection="false"] .sl-side{max-height:calc(min(380px,64%) + var(--sl-safe-b))}
1553
+ background:var(--sl-bg);box-shadow:0 -8px 26px -20px rgba(0,0,0,.72);
1554
+ overflow:visible;clip-path:inset(-32px 0 0 0);
1555
+ transition:max-height .3s cubic-bezier(.2,.8,.2,1);overscroll-behavior:contain}
1556
+ /* CLIPPED, NOT overflow:hidden. Half of the 22px grab pill sits ABOVE this
1557
+ box's top edge, which is what makes it a handle ON the panel rather than a
1558
+ button inside it \u2014 and overflow:hidden clips at the padding box, so that
1559
+ half simply vanished. A negative-top inset clip opens exactly that band
1560
+ (plus room for the panel's own upward shadow) and still cuts the bottom,
1561
+ which is the whole job the overflow was doing: hiding the content the
1562
+ max-height animation is squeezing past. */
1563
+ /* AN OPEN SHEET NEVER TAKES THE MAP'S CONTROLS WITH IT. Every open-sheet cap
1564
+ carries the same third term: the sheet may not grow past what leaves the map
1565
+ --sl-map-floor of height. Without it a four-ticket cart drove the map host
1566
+ to 193px and the bottom-right control column climbed into the Map/3D toggle
1567
+ \u2014 two live controls in the same 38x28 box.
1568
+ The 236px inner floor is the sheet's own irreducible content \u2014 10px of sheet
1569
+ head + the tray's 96px floor + the 116px footer that carries the CTA \u2014 so a
1570
+ very short container loses map clearance rather than the button that takes
1571
+ the money. At 375x812 the cap binds (map 264, sheet 411) and four tickets
1572
+ still stand in the tray without scrolling. */
1573
+ .sl-picker[data-layout="narrow"][data-sheet="open"] .sl-side{
1574
+ max-height:calc(min(72%,480px,max(236px,100% - var(--sl-map-floor))) + var(--sl-safe-b))}
1575
+ .sl-picker[data-layout="narrow"][data-sheet="open"][data-has-selection="false"] .sl-side{
1576
+ max-height:calc(min(380px,64%,max(236px,100% - var(--sl-map-floor))) + var(--sl-safe-b))}
1533
1577
  /* With the price list expanded the sheet takes the with-selection height so
1534
1578
  the tray (cart + best-seats) is never crushed under the fixed-size list. */
1535
- .sl-picker[data-layout="narrow"][data-sheet="open"][data-prices-open="true"] .sl-side{max-height:calc(min(480px,74%) + var(--sl-safe-b))}
1536
- /* SLIM CHROME (owner call 2026-08-19): the peek is ONE 50px row. The grab
1537
- handle no longer owns a row of its own \u2014 it is a 4px bar painted at the
1538
- top of the same head, and the pills inside are 34px, so the whole thing
1539
- still clears the 44px touch floor while giving the map 26px back. */
1540
- /* THE PEEK CLIP FOLLOWS THE HEAD. The head grew to 58px (0.77.1) but this
1541
- clip still said 50, so the bottom 8px of the collapsed bar \u2014 the lower edge
1542
- of its 44px buttons \u2014 was cut off on every phone (client screenshot,
1543
- 2026-09-03). One number, read from the head. */
1544
- .sl-picker[data-layout="narrow"][data-sheet="peek"] .sl-side{max-height:calc(66px + var(--sl-safe-b));overflow:hidden}
1545
- .sl-picker[data-layout="narrow"][data-sheet="peek"] .sl-side > :not(.sl-sheet-head){display:none}
1579
+ .sl-picker[data-layout="narrow"][data-sheet="open"][data-prices-open="true"] .sl-side{
1580
+ max-height:calc(min(480px,74%,max(236px,100% - var(--sl-map-floor))) + var(--sl-safe-b))}
1581
+ /* THE COLLAPSED SHEET IS THE FOOTER (owner call 2026-09-05), and the footer is
1582
+ the SAME block the desktop panel has: the tickets, "1 ticket \u2026 $80", the CTA
1583
+ and the by-line, in one set of rules for both widths.
1584
+
1585
+ It used to be a bespoke one-liner \u2014 "From $30 \xB7 \u2726 Find seats" on an empty
1586
+ cart, "2 tickets \xB7 Continue $60" once seats existed \u2014 with its own markup,
1587
+ stylesheet block and renderer, restating in 50px of chrome what the footer
1588
+ eight lines below already said. Two summaries of one cart drifted: the clock
1589
+ moved between the pill and the header as the sheet opened, and a buyer with
1590
+ seats held could not see the button that takes their money.
1591
+
1592
+ So the peek state no longer hides the sheet's contents; it hides everything
1593
+ that is NOT the cart and the footer, and caps the cart.
1594
+
1595
+ The cap is a fraction rather than a fixed number of pixels because the tray
1596
+ below is a flex item that gives way: on a short container the sheet clamps
1597
+ here, the tray shrinks and scrolls, and the button is never the part that
1598
+ gets cut off. */
1599
+ /* 54% AND 356px, NOT 52% AND 340px. The cap above caps the TRAY, and this one
1600
+ must be able to hand it 228px or that cap never binds. Measured at 375x812
1601
+ with ten tickets: 10 head + 228 tray + 116 footer = 354, and 52% of that
1602
+ body resolved to 350 \u2014 four pixels short, which showed as one pixel of the
1603
+ fourth card rather than five. The fraction still wins on a short phone,
1604
+ where the tray shrinks and scrolls and the button is never cut off. */
1605
+ .sl-picker[data-layout="narrow"][data-sheet="peek"] .sl-side{max-height:calc(min(54%,356px) + var(--sl-safe-b))}
1606
+ .sl-picker[data-layout="narrow"][data-sheet="peek"] .sl-side > :not(.sl-sheet-head):not(.sl-tray):not(.sl-foot){display:none}
1607
+ /* THREE TICKETS AND A HAIRLINE OF THE FOURTH (owner item 20). Ten tickets used
1608
+ to be a sheet that grew until it owned the phone; the cart scrolls inside
1609
+ its own box now and the map keeps its room.
1610
+
1611
+ RE-DERIVED FOR THE DESKTOP CARD (2026-09-06), which is the card the phone
1612
+ shows now. MEASURED at 375x812: 10px of tray padding-top + three 64px
1613
+ .sl-chip cards + two 7px tray gaps = 216px for three whole tickets, then one
1614
+ more gap and 5px of the fourth so the box reads as scrollable rather than
1615
+ finished \u2014 228px.
1616
+
1617
+ 64px, not the 48px min-height in the rule and not the 52px the card measures
1618
+ on a mouse: a coarse pointer gives the \u2715 and the eye a REAL 44px box (they
1619
+ sit 2px apart, so grown invisible boxes would overlap and the \u2715 would claim
1620
+ part of the eye's own ink), and 44 + 9 + 9 + 2 is 64. A touch desktop has
1621
+ always drawn this card at 64 too. */
1622
+ .sl-picker[data-layout="narrow"][data-sheet="peek"] .sl-tray{max-height:228px;min-height:0;overflow-y:auto;overscroll-behavior:contain}
1623
+ /* In peek the tray is the CART and nothing else. The best-seats card, the
1624
+ closed note, the by-night summary and the "Areas" disclosure are all things
1625
+ to read and decide about; they belong to the opened sheet, which has the
1626
+ room. An allowlist rather than a list of what to hide, so the next thing
1627
+ added to the tray does not silently appear in the collapsed sheet. */
1628
+ .sl-picker[data-layout="narrow"][data-sheet="peek"] .sl-tray > :not(.sl-chip):not(.sl-ga){display:none}
1629
+ /* An empty cart has no tickets to show at all, and a tray with only its own
1630
+ padding in it would put an 18px band between the chevron and the total. */
1631
+ .sl-picker[data-layout="narrow"][data-sheet="peek"][data-has-selection="false"] .sl-tray{display:none}
1546
1632
  /* flex:1 is 1 1 0%, and a ZERO basis makes the tray contribute nothing to the
1547
1633
  sheet's content height \u2014 the sheet would collapse to its chrome no matter
1548
1634
  how many tickets were in the cart. An auto basis is what lets the cart push
@@ -1558,28 +1644,24 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
1558
1644
  the tray scrolls like any other overflowing list. */
1559
1645
  .sl-picker[data-layout="narrow"][data-has-selection="false"] .sl-tray{min-height:0}
1560
1646
  .sl-picker[data-layout="narrow"] .sl-prices{max-height:150px;overflow-y:auto;overscroll-behavior:contain}
1561
- .sl-picker[data-layout="narrow"] .sl-foot{position:static;background:var(--sl-bg)}
1562
- /* NARROW FOOT SAYS EVERYTHING ONCE: the sheet head carries the count and total
1563
- and the header pill ticks the clock, so the total row goes. The rest of the
1564
- phone foot \u2014 padding, the secured caption, the by-line \u2014 is in TRAY_CSS. */
1565
- .sl-picker[data-layout="narrow"] .sl-total{display:none}
1647
+ /* THE FOOT IS NOT RESTYLED ON NARROW AT ALL. It used to lose its total row,
1648
+ hide itself on an empty cart and take its own padding and by-line size, all
1649
+ because a peek bar was saying those things instead. One block on both widths
1650
+ is one set of tokens and one thing to get right; the only narrow-only
1651
+ difference left is the WORD on the button, which syncCta decides. */
1566
1652
  .sl-picker[data-layout="narrow"] .sl-tray{scrollbar-width:thin}
1567
- .sl-picker[data-layout="narrow"] .sl-foot.empty{display:none}
1568
1653
  .sl-picker[data-layout="narrow"] .sl-sheet-head{order:0}
1569
1654
  .sl-picker[data-layout="narrow"] .sl-seats-sec{display:none}
1570
1655
  .sl-picker[data-layout="narrow"] .sl-tray{order:2}
1571
1656
  .sl-picker[data-layout="narrow"] .sl-filtersec{order:3}
1572
1657
  .sl-picker[data-layout="narrow"] .sl-filters{order:4}
1573
1658
  .sl-picker[data-layout="narrow"] .sl-prices-sec{order:5}
1574
- .sl-picker[data-layout="narrow"] .sl-prices-hint{order:6}
1575
1659
  .sl-picker[data-layout="narrow"] .sl-pricef{order:6}
1576
1660
  .sl-picker[data-layout="narrow"] .sl-prices{order:7}
1577
1661
  .sl-picker[data-layout="narrow"] .sl-foot{order:8}
1578
- .sl-picker[data-layout="narrow"] .sl-tray-hint,
1579
1662
  .sl-picker[data-layout="narrow"] .sl-filtersec,
1580
1663
  .sl-picker[data-layout="narrow"] .sl-filters,
1581
1664
  .sl-picker[data-layout="narrow"] .sl-prices-sec,
1582
- .sl-picker[data-layout="narrow"] .sl-prices-hint,
1583
1665
  .sl-picker[data-layout="narrow"] .sl-prices{display:none!important}
1584
1666
  .sl-picker[data-layout="narrow"][data-has-selection="true"] .sl-filtersec,
1585
1667
  .sl-picker[data-layout="narrow"][data-has-selection="true"] .sl-filters,
@@ -1589,27 +1671,32 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
1589
1671
  in-flight busy states, which legitimately show with a non-empty cart \u2014 those
1590
1672
  set data-ba-active="true" (see setAttribute alongside data-has-selection). */
1591
1673
  .sl-picker[data-layout="narrow"][data-has-selection="true"]:not([data-ba-active="true"]) .sl-ba{display:none}
1592
- /* Touch chrome: pinch exists, so zoom IN is a gesture and the + button is
1593
- noise. Zoom OUT is not the same case \u2014 pinching outwards repeatedly is the
1594
- fiddliest gesture on a phone, and it is the one a buyer reaches for when
1595
- they are lost. So \u2212 comes back, but only once they are deep enough to BE
1596
- lost (data-zoomed, set from the seats rung), and never +. */
1597
- .sl-picker[data-layout="narrow"] .sl-zoom [data-ref="zin"]{display:none}
1598
- /* ONE CONTROL, NOT TWO. "\u2212" and "fit to screen" were two discs in the same
1599
- corner that both back the camera out, and nothing on either said which was
1600
- which. The phone dropped fit-to-screen first (2026-08); wide followed on
1601
- 2026-09-05 (owner call) \u2014 the stack is "+" and "\u2212" everywhere, the section
1602
- pill's \u2715 and the minimap already take a buyer back to the whole venue, and
1603
- the 3D view keeps its own Fit view because an orbit camera can be lost in a
1604
- way a 2D map cannot. */
1674
+ /* THREE CONTROLS ON THE PHONE (owner call 2026-09-05), and each one says a
1675
+ different thing: "+" steps in, "\u2212" walks one rung back out, and the framed
1676
+ dot puts the whole venue on screen in one tap.
1677
+
1678
+ This corner used to hold "\u2212" alone. The argument for that was that pinch
1679
+ already zooms in, so "+" was noise \u2014 but a phone buyer who has pinched
1680
+ themselves somewhere odd has only ONE control to reason with, and it was
1681
+ the one that also decided, wrongly, when it had nothing left to do. Three
1682
+ labelled discs cost 72 more pixels of a corner and remove every dead end.
1683
+
1684
+ "\u2212" and the fit disc do not duplicate each other: "\u2212" is the ladder (out of
1685
+ the seat, out of the section, then the venue) and the fit disc is the whole
1686
+ venue immediately, however deep the buyer is. Only the fit pose itself dims
1687
+ them, and it dims both \u2014 see syncMapStepBack. */
1688
+ .sl-zoom>[data-ref="zfit"]{display:none}
1689
+ .sl-picker[data-layout="narrow"] .sl-zoom>[data-ref="zfit"]{display:flex}
1690
+ /* Wide keeps its two: the section pill's \u2715, the minimap and a mouse wheel are
1691
+ all right there, and full screen already sits in the header as a labelled
1692
+ pill (dockLayoutChrome). */
1605
1693
 
1606
1694
  /* THE PRICE RAIL \u2014 the phone's legend, and the only one it gets by default.
1607
- On narrow the price LIST lives behind two gates (open the sheet, then open
1608
- the disclosure), so a buyer looking at five colours had nothing on screen
1609
- telling them what any of them costs. The list is still the detail view: it
1610
- carries "N left", offer names and the held/sold key, none of which fit a
1611
- chip. The rail carries the one thing that must never be a tap away \u2014 colour
1612
- to price.
1695
+ On narrow the price LIST lives behind two gates (open the sheet, then the
1696
+ disclosure), so a buyer looking at five colours had nothing on screen saying
1697
+ what any of them costs. The list is still the detail view: it carries "N
1698
+ left", offer names and the held/sold key, none of which fit a chip. The rail
1699
+ carries the one thing that must never be a tap away \u2014 colour to price.
1613
1700
 
1614
1701
  Price-first and name-dropped on purpose: the category name is already
1615
1702
  painted on the map, and a phone buyer is matching a colour to a number.
@@ -1639,16 +1726,28 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
1639
1726
  the pinned escape chip, before anyone had touched it. Five short chips gain
1640
1727
  nothing from snapping; landing on the first price is worth more than a tidy
1641
1728
  swipe. */
1729
+ /* THE LAST PRICE IS NOT CUT IN HALF. Measured at 375px: 370px of chips inside
1730
+ a 355px box, so the cheapest chip ended 15px past the edge \u2014 and the end
1731
+ fade was 18px, narrow enough that the chip kept a legible "$3" and then a
1732
+ sliced glyph. It read as a damaged chip rather than as one continuing off
1733
+ the rail. The fade is 30px below, which dissolves the tail instead of
1734
+ cutting it; scroll-padding keeps a chip brought in by keyboard focus clear
1735
+ of that gradient. The rail still scrolls and nothing is hidden.
1736
+ NO END PADDING. It was tried, and it lies to syncRailEdges: the flag is
1737
+ "content wider than the box", so padding past the last chip can raise the
1738
+ fade over a chip that is entirely visible. Overflow must mean a clipped
1739
+ chip, or the gradient stops meaning "there is more". */
1642
1740
  .sl-rail-scroll{display:flex;align-items:center;gap:5px;flex:1;min-width:0;
1643
- overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding:1px}
1741
+ overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding:1px;
1742
+ scroll-padding-inline:6px 30px}
1644
1743
  /* Fade ONLY a clipping edge, so a hidden sixth chip reads as "more" and a
1645
1744
  rail that fits keeps every rounded end intact (syncRailEdges sets these).
1646
1745
  "start" is the left edge in LTR and the right edge in RTL, so the gradient
1647
1746
  direction follows the root's dir. */
1648
- .sl-rail-scroll[data-fade-end="true"]{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 18px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 18px),transparent)}
1747
+ .sl-rail-scroll[data-fade-end="true"]{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 30px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 30px),transparent)}
1649
1748
  .sl-rail-scroll[data-fade-start="true"]{-webkit-mask-image:linear-gradient(90deg,transparent,#000 18px);mask-image:linear-gradient(90deg,transparent,#000 18px)}
1650
- .sl-rail-scroll[data-fade-start="true"][data-fade-end="true"]{-webkit-mask-image:linear-gradient(90deg,transparent,#000 18px,#000 calc(100% - 18px),transparent);mask-image:linear-gradient(90deg,transparent,#000 18px,#000 calc(100% - 18px),transparent)}
1651
- .sl-picker[dir="rtl"] .sl-rail-scroll[data-fade-end="true"]{-webkit-mask-image:linear-gradient(-90deg,#000 calc(100% - 18px),transparent);mask-image:linear-gradient(-90deg,#000 calc(100% - 18px),transparent)}
1749
+ .sl-rail-scroll[data-fade-start="true"][data-fade-end="true"]{-webkit-mask-image:linear-gradient(90deg,transparent,#000 18px,#000 calc(100% - 30px),transparent);mask-image:linear-gradient(90deg,transparent,#000 18px,#000 calc(100% - 30px),transparent)}
1750
+ .sl-picker[dir="rtl"] .sl-rail-scroll[data-fade-end="true"]{-webkit-mask-image:linear-gradient(-90deg,#000 calc(100% - 30px),transparent);mask-image:linear-gradient(-90deg,#000 calc(100% - 30px),transparent)}
1652
1751
  .sl-picker[dir="rtl"] .sl-rail-scroll[data-fade-start="true"]{-webkit-mask-image:linear-gradient(-90deg,transparent,#000 18px);mask-image:linear-gradient(-90deg,transparent,#000 18px)}
1653
1752
  .sl-rail-scroll::-webkit-scrollbar{display:none}
1654
1753
  /* 24px ink, taller target: the chip stays small so five prices fit a phone
@@ -1686,102 +1785,36 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
1686
1785
  .sl-rc:disabled{opacity:.45;cursor:default}
1687
1786
  .sl-rc:disabled .sl-rc-t{text-decoration:line-through}
1688
1787
 
1689
- /* bottom-sheet head: grab handle + one-line summary (narrow only). The WHOLE
1690
- head is the tap/swipe toggle target (min 44px), so it reads as one control. */
1691
- .sl-sheet-head{display:none;flex-direction:column;justify-content:center;padding:6px 12px 8px;min-height:56px;
1788
+ /* THE SHEET HEAD IS A GRAB HANDLE ON THE PANEL'S EDGE (owner call 2026-09-06:
1789
+ "the arrow looks bad, why give it a whole band"). It was a 44px band with a
1790
+ 32px disc floating in it \u2014 a row of chrome above a panel whose every other
1791
+ row is a ticket, which is what made the sheet read as three stacked blocks.
1792
+ The chevron is a 40x22 pill now, straddling the sheet's own top edge the way
1793
+ a drawer handle sits on a drawer: eleven pixels above the border line and
1794
+ eleven below, with the head reduced to that lower half and NOTHING drawn
1795
+ under it \u2014 no divider, no band.
1796
+
1797
+ The whole row is still the tap and swipe target, and so is the pill: the
1798
+ pointer handlers live on the head, and a press starting on the pill now
1799
+ tracks with them (a 10px strip is not something a thumb can drag). */
1800
+ .sl-sheet-head{display:none;align-items:center;justify-content:center;padding:0;min-height:10px;
1692
1801
  cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none;flex:none}
1693
- /* THE COLLAPSED SHEET IS THE LAST 50px OF THE SCREEN, which on a phone with a
1694
- home indicator is the strip the OS also claims. The head is the whole peek
1695
- state, so it carries the inset itself rather than relying on the panel's
1696
- padding \u2014 a gesture bar over the Continue pill is a tap that pays for
1697
- nothing. A max() keeps the ordinary spacing on hardware with no inset. */
1698
- /* THE HANDLE OWNS ITS OWN 8PX. The 44px peek buttons (0.77.0) sit
1699
- align-self:center in a 50px head, which put their top edge 3px below the
1700
- head's top \u2014 straight through the grab handle painted at top:4px. The head
1701
- is 58px with the row pushed 8px down, so the handle's band is clear of any
1702
- button's box; the same 8pt lift ships in the Flutter picker. */
1703
- .sl-picker[data-layout="narrow"] .sl-sheet-head{display:flex;position:relative;min-height:66px;
1704
- padding:8px 12px 0 12px;padding-bottom:max(0px,var(--sl-safe-b))}
1705
- .sl-picker[data-layout="narrow"][data-sheet="peek"] .sl-side{padding-bottom:0}
1706
- .sl-picker[data-layout="narrow"] .sl-sheet-grab{position:absolute;top:4px;left:50%;width:35px;height:4px;margin:0;transform:translateX(-50%);opacity:.5}
1707
- .sl-picker[data-layout="narrow"] .sl-sheet-bar{min-height:50px;gap:10px}
1708
- .sl-picker[data-layout="narrow"] .sl-sheet-peek{font-size:12.5px}
1709
- /* The pay button on the collapsed sheet is the single most-pressed control on
1710
- a phone; 34px was under the touch floor and it sat six pixels from the
1711
- chevron that opens the panel, so a miss on one hit the other. */
1712
- .sl-picker[data-layout="narrow"] .sl-sheet-peek .go{min-height:44px;padding:0 14px;font-size:12.5px}
1713
- .sl-picker[data-layout="narrow"] .sl-sheet-peek .go.ghost{padding:0 10px}
1714
- .sl-picker[data-layout="narrow"] .sl-sheet-toggle{width:44px;height:44px;margin:0}
1715
- /* The hold clock rides INSIDE the Continue pill while the sheet is collapsed
1716
- (that pill is the way to pay from the peek), so the header pill can go
1717
- quiet: one live clock on screen, not two. The open sheet hides the peek
1718
- pill, so the header pill comes back there. */
1719
- /* The empty bar's one door. Accent-filled, because with nothing in the cart it
1720
- is not competing with a Continue \u2014 it IS the primary action, and the chevron
1721
- beside it keeps its own job of opening the panel to browse.
1722
-
1723
- SMALLER INK THAN THE PILL IT REPLACES. At the peek bar's full 44px it read
1724
- as a checkout button on a bar with nothing to check out, and it crowded the
1725
- line it shares with the price. Thirty-six pixels of pill carries the same
1726
- weight as the Continue pill's type without claiming a decision that has not
1727
- been made yet; the target underneath it is still 44, reached the same way
1728
- the price chips reach theirs. */
1729
- /* ROUNDED RECTANGLE, LARGER TYPE (client review 2026-09-03, after seats.io's
1730
- BOOK NOW). The 36px pill read as an aside; the empty bar's one door is the
1731
- primary action and should look like one. 44px tall, 11px radius, 14px 800.
1732
- Still "Find seats", not "Book now": nothing is selected yet and the tap
1733
- opens the best-available form, so the button says what the tap does. */
1734
- /* NO CHEVRON ON THE COLLAPSED BAR (owner, 2026-09-03): the whole head is the
1735
- tap and swipe target already, and the arrow only took width from the one
1736
- button the bar exists for. The button is 48px, 16px type, right-aligned. */
1737
- .sl-picker[data-layout="narrow"][data-sheet="peek"] .sl-sheet-toggle{display:none}
1738
- .sl-picker[data-layout="narrow"] .sl-sheet-peek .go.sl-sheet-find{position:relative;align-self:center;
1739
- min-height:48px;height:48px;padding:0 20px;gap:6px;border-radius:12px;font-size:16px;font-weight:800}
1740
- /* The amount in "From $42" is the fact; the word is the caption. */
1741
- .sl-picker[data-layout="narrow"] .sl-sheet-peek .sl-peek-sum{font-size:12px;font-weight:700;color:var(--sl-muted)}
1742
- .sl-picker[data-layout="narrow"] .sl-sheet-peek .sl-peek-price{font-size:19px;font-weight:850;color:var(--sl-text);
1743
- font-variant-numeric:tabular-nums;margin:0 2px}
1744
- .sl-picker[data-layout="narrow"][data-sheet="peek"] .sl-sheet-peek .sl-sheet-go[data-act="checkout"]{min-height:48px;border-radius:12px;padding:0 18px;font-size:16px}
1745
- .sl-sheet-find::before{content:'';position:absolute;top:50%;left:0;right:0;height:44px;transform:translateY(-50%)}
1746
- /* The line the pill sits on clips its own overflow (that is what ellipsises a
1747
- long summary), so it has to be at least as tall as the target it contains \u2014
1748
- otherwise the four pixels of reach above and below the 36px pill are simply
1749
- cut off and the smaller ink becomes a smaller button after all. */
1750
- .sl-picker[data-layout="narrow"] .sl-sheet-peek{min-height:44px}
1751
- .sl-peek-spark{font-size:12px;line-height:1}
1752
- .sl-peek-time{opacity:.72;font-weight:700;font-variant-numeric:tabular-nums;margin-inline-start:6px}
1753
- .sl-picker[data-layout="narrow"][data-sheet="peek"][data-peek-clock="true"] .sl-hold-pill.on:not(.is-expiring){display:none}
1754
- /* OPEN sheet: the head is context, not controls \u2014 the pill it carries at peek
1755
- ("Best seats"/"Continue") duplicates the card and CTA right below it, and
1756
- every saved pixel is tray room (owner call 2026-08-14). */
1757
- .sl-picker[data-layout="narrow"][data-sheet="open"] .sl-sheet-head{min-height:42px}
1758
- .sl-picker[data-layout="narrow"][data-sheet="open"] .sl-sheet-grab{top:5px}
1759
- .sl-picker[data-layout="narrow"][data-sheet="open"] .sl-sheet-bar{min-height:32px}
1760
- .sl-picker[data-layout="narrow"][data-sheet="open"] .sl-sheet-peek .go{display:none}
1761
- .sl-picker[data-layout="narrow"][data-sheet="peek"] .sl-sheet-head{height:100%}
1762
- .sl-sheet-grab{width:36px;height:4px;border-radius:999px;background:var(--sl-muted);opacity:.55;margin:1px auto 5px}
1763
- .sl-sheet-bar{display:flex;align-items:center;gap:8px;min-height:44px}
1764
- .sl-sheet-peek{display:flex;align-items:center;gap:7px;flex:1;min-width:0;font-size:13px;font-weight:700;color:var(--sl-text);
1765
- white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
1766
- .sl-sheet-peek .sub{color:var(--sl-muted);font-weight:600}
1767
- /* collapsed-peek "Continue" affordance: a real accent pill, not plain text */
1768
- .sl-sheet-peek .go{margin-left:auto;flex:none;display:inline-flex;align-items:center;min-height:30px;
1769
- padding:6px 13px;border-radius:999px;background:var(--sl-accent);color:var(--sl-accent-ink);
1770
- font-weight:800;font-size:12.5px}
1771
- /* The add-more accelerator sits beside the primary pill and must not compete
1772
- with it: outlined, not filled. Only the first .go claims the auto margin, so
1773
- the pair stays together at the right edge rather than splitting apart. */
1774
- .sl-sheet-peek .go.ghost{gap:5px;background:transparent;color:var(--sl-text);border:1px solid var(--sl-line);font-weight:750}
1775
- .sl-sheet-peek .go.ghost:hover,.sl-sheet-peek .go.ghost:focus-visible{border-color:var(--sl-accent);color:var(--sl-accent-text)}
1776
- .sl-sheet-peek .go.ghost + .go{margin-left:0}
1802
+ .sl-picker[data-layout="narrow"] .sl-sheet-head{display:flex;position:relative}
1803
+ /* A PILL ON THE EDGE, NOT A DISC IN A BAND. Absolute rather than a negative
1804
+ margin so the head keeps its own 10px of height whatever the pill does, and
1805
+ the sheet's clip-path (see .sl-side above) is what lets the upper half out. */
1806
+ .sl-sheet-toggle{position:absolute;top:-11px;left:0;right:0;margin:0 auto;
1807
+ width:40px;height:22px;border-radius:999px;flex:none;display:flex;
1808
+ align-items:center;justify-content:center;color:var(--sl-muted);
1809
+ background:color-mix(in srgb,var(--sl-line) 62%,var(--sl-bg));
1810
+ border:1px solid var(--sl-line);
1811
+ transition:color .15s,background .15s}
1812
+ .sl-sheet-toggle:hover,.sl-sheet-toggle:focus-visible{color:var(--sl-text);background:color-mix(in srgb,var(--sl-line) 92%,var(--sl-bg))}
1813
+ .sl-sheet-toggle svg{width:14px;height:14px;stroke:currentColor;stroke-width:2.4;fill:none;
1814
+ stroke-linecap:round;stroke-linejoin:round}
1777
1815
  /* state chevron: points UP while peeking, rotates to point DOWN when open.
1778
1816
  Base keeps an explicit rotate(0) \u2014 transitioning to/from a bare 'none' leaves
1779
1817
  the value stuck in some engines, so both endpoints must be real transforms. */
1780
- .sl-sheet-toggle{width:44px;height:44px;margin:-8px -8px -8px 0;border-radius:999px;flex:none;display:flex;
1781
- align-items:center;justify-content:center;color:var(--sl-muted);transition:color .15s,background .15s}
1782
- .sl-sheet-toggle:hover,.sl-sheet-toggle:focus-visible{color:var(--sl-text);background:color-mix(in srgb,var(--sl-line) 44%,transparent)}
1783
- .sl-sheet-toggle svg{width:21px;height:21px;stroke:currentColor;stroke-width:2.4;fill:none;
1784
- stroke-linecap:round;stroke-linejoin:round}
1785
1818
  .sl-sheet-toggle svg{transform:rotate(0deg);transition:transform .24s cubic-bezier(.2,.8,.2,1)}
1786
1819
  .sl-picker[data-sheet="open"] .sl-sheet-toggle svg{transform:rotate(180deg)}
1787
1820
 
@@ -1804,9 +1837,7 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
1804
1837
  /* MOBILE SPACE BELONGS TO THE CART (owner call 2026-08-14): the price list is
1805
1838
  one tap away behind the "Ticket prices" row, not a permanent tenant. Zone
1806
1839
  flags and section taps already answer "what does it cost" in context. */
1807
- .sl-picker[data-layout="narrow"][data-sheet="open"][data-prices-open="true"] .sl-prices-hint{display:block!important}
1808
1840
  .sl-picker[data-layout="narrow"][data-sheet="open"][data-prices-open="true"] .sl-prices{display:flex!important}
1809
- .sl-picker[data-layout="narrow"][data-sheet="open"] .sl-tray-hint{display:block!important}
1810
1841
  /* The row reads as the toggle it is on narrow: chevron + pointer. */
1811
1842
  .sl-picker[data-layout="narrow"] .sl-prices-sec{cursor:pointer}
1812
1843
  .sl-picker[data-layout="narrow"] .sl-prices-sec::after{content:'';width:8px;height:8px;flex:none;margin-left:auto;
@@ -1814,9 +1845,16 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
1814
1845
  transform:rotate(45deg);transition:transform .2s cubic-bezier(.2,.8,.2,1)}
1815
1846
  .sl-picker[data-layout="narrow"][data-prices-open="true"] .sl-prices-sec::after{transform:rotate(-135deg)}
1816
1847
  /* THE \u267F CONTROL AND ITS MENU.
1817
- Bottom-left, above the dock bar with the other corner controls, and opening
1818
- UPWARD because below it there is only the dock. */
1848
+ IT RIDES THE RIGHT-HAND CONTROL COLUMN (owner call 2026-09-06), as the top
1849
+ disc above "+", on both layouts. Alone in the bottom-left corner it read as
1850
+ a stray fourth thing on the map \u2014 a lone disc opposite a stack of discs \u2014
1851
+ and the corner it sat in is the minimap's. The column is where a buyer
1852
+ already looks for map controls, so the menu opens UPWARD from it and
1853
+ towards the map, anchored to the column's own edge (inset-inline-end). */
1819
1854
  .sl-a11y{position:relative}
1855
+ /* The zoom discs carry a definite width, so flexbox leaves them at the
1856
+ column's inline start; this wrapper has none and would stretch past them. */
1857
+ .sl-zoom>.sl-a11y{align-self:flex-start}
1820
1858
  /* Same disc tokens as the zoom column, and it was the worse of the two: an
1821
1859
  opaque panel surface with a .24 hairline \u2014 a dark blob with no edge. */
1822
1860
  .sl-a11ybtn{width:36px;height:36px;border-radius:999px;display:grid;place-items:center;
@@ -1831,20 +1869,52 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
1831
1869
  .sl-a11ybtn:focus-visible{outline:2px solid var(--sl-accent);outline-offset:2px}
1832
1870
  .sl-picker[data-layout="narrow"] .sl-a11ybtn{width:44px;height:44px}
1833
1871
  .sl-picker[data-layout="narrow"] .sl-a11ybtn svg{width:21px;height:21px}
1834
- .sl-a11ymenu{position:absolute;bottom:calc(100% + 8px);left:0;z-index:8;
1872
+ /* THE PANEL IS BOUNDED AND SCROLLS. With twelve accommodation rows it is 697px
1873
+ tall and opens from a corner ~549px down the map, so unbounded it put its
1874
+ first two rows \u2014 the wheelchair and companion filters \u2014 above the top of the
1875
+ window, unreachable. --sl-a11ymenu-max is measured against the MAP at open
1876
+ time (see pickerAccessibilityMenu.fit); the fallback keeps a no-JS host sane. */
1877
+ .sl-a11ymenu{position:absolute;bottom:calc(100% + 8px);inset-inline-end:0;z-index:8;
1835
1878
  min-width:264px;max-width:min(320px,calc(100vw - 32px));padding:4px;
1879
+ max-height:var(--sl-a11ymenu-max,calc(100dvh - 96px));overflow-y:auto;
1880
+ overscroll-behavior:contain;scrollbar-gutter:stable;
1836
1881
  border:1px solid var(--sl-line);border-radius:12px;background:var(--sl-surface);
1837
1882
  color:var(--sl-text);box-shadow:0 24px 48px -24px rgba(0,0,0,.65)}
1838
1883
  .sl-a11ymenu[hidden]{display:none}
1884
+ /* THE HEADER IS THE PHONE'S WAY OUT, and only the phone's. On a desktop the
1885
+ panel is dismissed by the pointer that is already moving \u2014 click anywhere,
1886
+ press Escape, or press the disc again \u2014 so a title bar there would be one
1887
+ more thing to read above a list that already says what it is. On narrow the
1888
+ \u2715 is the exit every other sheet in this widget offers, and it sticks to the
1889
+ top of the scroller so twelve provisions cannot carry it away. */
1890
+ .sl-a11yhead{display:none;position:sticky;top:-4px;z-index:1;align-items:center;gap:8px;
1891
+ margin:-4px -4px 2px;padding:4px 4px 4px 10px;background:var(--sl-surface);
1892
+ border-bottom:1px solid var(--sl-line)}
1893
+ .sl-picker[data-layout="narrow"] .sl-a11yhead{display:flex}
1894
+ .sl-a11yhead-t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
1895
+ font-size:12.5px;font-weight:800;color:var(--sl-text)}
1896
+ .sl-a11yclose{flex:none;width:44px;height:44px;border-radius:999px;display:grid;place-items:center;
1897
+ background:transparent;border:0;color:var(--sl-muted);cursor:pointer}
1898
+ .sl-a11yclose:hover{color:var(--sl-text)}
1899
+ .sl-a11yclose:focus-visible{outline:2px solid var(--sl-accent);outline-offset:-2px}
1900
+ .sl-a11yclose svg{width:17px;height:17px;stroke:currentColor;stroke-width:2.2;fill:none;stroke-linecap:round}
1839
1901
  .sl-a11yrow{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;
1840
1902
  padding:6px 8px;border:0;border-radius:9px;background:transparent;color:inherit;
1841
1903
  font:inherit;font-size:12.5px;text-align:start;cursor:pointer}
1842
1904
  .sl-a11yrow:hover{background:color-mix(in srgb,var(--sl-muted) 12%,transparent)}
1843
1905
  .sl-a11yrow:focus-visible{outline:2px solid var(--sl-accent);outline-offset:-2px}
1844
1906
  .sl-a11yrow-i{flex:none;width:20px;text-align:center;font-size:14px}
1845
- .sl-a11yrow-t{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
1907
+ /* ONE LINE PER ROW (owner call 2026-09-06). The row used to be able to grow a
1908
+ second, muted line under the label \u2014 the companion-seat sentence \u2014 and with
1909
+ twelve provisions that turned the menu into a page of prose. That sentence
1910
+ is behind an \u24D8 beside the label now, and the label itself is the SHORT name
1911
+ (picker.accessShort.*), so it fits the line it is given and truncates
1912
+ rather than wrapping if a translation still does not. */
1913
+ .sl-a11yrow-t{flex:1;min-width:0}
1914
+ /* Only the PROVISION rows. The two header switches below them say whole
1915
+ sentences and keep the two lines they have always had. */
1916
+ .sl-a11yrow[data-a11y-row^="a11y:"] .sl-a11yrow-t{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
1846
1917
  .sl-a11yrow-l{font-weight:700;line-height:1.25}
1847
- .sl-a11yrow-n{font-size:10.5px;font-weight:600;color:var(--sl-muted);line-height:1.3}
1848
1918
  /* The switch: a track that fills with the accent and a knob that slides. It is
1849
1919
  drawn rather than a checkbox so it reads identically on both themes. */
1850
1920
  .sl-a11yrow-s{flex:none;position:relative;width:34px;height:20px;border-radius:999px;
@@ -1888,7 +1958,24 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
1888
1958
  display:grid;place-items:center;cursor:pointer;font-size:12px;font-weight:850;color:var(--sl-text);background:var(--sl-surface)}
1889
1959
  .sl-offer-info>summary::-webkit-details-marker{display:none}.sl-offer-info[open]>summary{border-color:var(--sl-accent);color:var(--sl-accent-text)}
1890
1960
  .sl-offer-detail{margin-top:10px;padding-top:9px;border-top:1px solid var(--sl-line);font-size:10.5px;line-height:1.45;color:var(--sl-muted)}
1891
- .sl-sec{padding:14px 14px 4px;font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--sl-muted);font-weight:700}
1961
+ .sl-sec{position:relative;padding:14px 14px 4px;font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--sl-muted);font-weight:700}
1962
+ .sl-sec-title{display:inline-flex;align-items:center;gap:6px}
1963
+ /* THE PANEL EXPLAINS ITSELF THROUGH ONE CONTROL (owner call 2026-09-05). The
1964
+ sentences that sat under "Ticket prices", under "Your seats" and inside the
1965
+ best-seats card are behind a small \u24D8 in the header they explain. Hover and
1966
+ keyboard focus open it; a tap toggles it (touch has no hover) and the next
1967
+ press elsewhere closes it. The sentence is positioned by the HEADER or CARD
1968
+ it sits in \u2014 both are position:relative \u2014 so it spans that container and
1969
+ never falls out of the panel, wherever the control lands on the line. */
1970
+ .sl-info{display:inline-flex;align-items:center;margin-inline-start:6px;vertical-align:middle}
1971
+ .sl-info-btn{width:16px;height:16px;padding:0;border-radius:999px;border:1px solid var(--sl-line);background:transparent;
1972
+ color:var(--sl-muted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:color .15s,border-color .15s}
1973
+ .sl-info-btn svg{width:11px;height:11px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
1974
+ .sl-info-btn:hover,.sl-info-btn:focus-visible,.sl-info.open .sl-info-btn{color:var(--sl-text);border-color:var(--sl-text)}
1975
+ .sl-info-pop{display:none;position:absolute;z-index:9;top:calc(100% - 2px);inset-inline:12px;padding:9px 11px;border-radius:10px;
1976
+ background:var(--sl-surface);border:1px solid var(--sl-line);box-shadow:0 12px 28px -12px rgba(0,0,0,.45);
1977
+ color:var(--sl-text);font-size:11.5px;font-weight:500;line-height:1.45;letter-spacing:0;text-transform:none;text-align:start;white-space:normal}
1978
+ .sl-info:hover .sl-info-pop,.sl-info:focus-within .sl-info-pop,.sl-info.open .sl-info-pop{display:block}
1892
1979
  .sl-prices-sec{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:13px}
1893
1980
  /* A PILL, NOT A FORM CONTROL. It stays a <select> \u2014 the native listbox is the
1894
1981
  only picker that works on every phone, with a keyboard and with a screen
@@ -1900,12 +1987,6 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
1900
1987
  .sl-price-select{min-height:30px;max-width:130px;padding:0 26px 0 11px;border:1px solid var(--sl-line);border-radius:999px;
1901
1988
  background-color:var(--sl-surface);color:var(--sl-text);font:inherit;font-size:11px;font-weight:750;letter-spacing:0;text-transform:none}
1902
1989
  .sl-price-select:hover{border-color:var(--sl-muted)}
1903
- /* One sentence that teaches the whole colour code \u2014 a first-time buyer sees
1904
- "Head Tables \xB7 $165" and coloured dots with nothing connecting them. Gone
1905
- the moment they have seats (they've learned it) and while sales are closed. */
1906
- .sl-prices-hint{padding:0 14px 7px;font-size:11px;line-height:1.45;color:var(--sl-muted)}
1907
- .sl-picker[data-has-selection="true"] .sl-prices-hint,
1908
- .sl-picker[data-sales-closed="true"] .sl-prices-hint{display:none}
1909
1990
  .sl-prices{display:flex;flex-direction:column;padding:4px 14px 8px;border-bottom:1px solid var(--sl-line)}
1910
1991
  .sl-prices-sec,.sl-prices,.sl-seats-sec{flex:none}
1911
1992
  .sl-price-row{display:flex;align-items:center;gap:7px;min-height:28px;font-size:12px;
@@ -1916,7 +1997,6 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
1916
1997
  .sl-price-row.sl-active .sl-price-label{color:var(--sl-accent-text)}
1917
1998
  .sl-dot{width:9px;height:9px;border-radius:50%;flex:none;background:var(--sl-cat-dot,var(--sl-accent))}
1918
1999
  .sl-price-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}
1919
- .sl-price-left{font-size:11px;color:var(--sl-muted);font-variant-numeric:tabular-nums}
1920
2000
  .sl-price-amt{font-weight:800;font-variant-numeric:tabular-nums}
1921
2001
  /* long category lists: capped by default, scroll once expanded */
1922
2002
  .sl-prices.sl-expanded{max-height:196px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
@@ -1929,22 +2009,18 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
1929
2009
  .sl-status-icon{width:13px;height:13px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;
1930
2010
  color:#fff;background:#6b7280;line-height:1}
1931
2011
  .sl-status-icon svg{width:8px;height:8px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
1932
- /* These two swatches must be the SAME MARKS the map paints, or the key teaches
1933
- a language the canvas does not speak. Held wears the dashed ring at full
1934
- size; sold is plain and smaller (0.85x, matching SOLD_SEAT_SCALE). An
1935
- an outline rather than a border, so the dash sits outside the disc and the
1936
- swatch keeps its size - and the text token, so the ring flips with the theme
1937
- exactly as the map's ring ink does. */
1938
- .sl-status-icon.held{outline:1px dashed var(--sl-text);outline-offset:1px}
1939
- .sl-status-icon.sold{width:11px;height:11px;background:#8b93a0;outline:none}
1940
- .sl-status-icon.sold svg{width:8px;height:8px;stroke-width:2.4}
2012
+ /* ONE swatch, the SAME MARK the map paints (owner call 2026-09-05): a seat the
2013
+ buyer cannot take \u2014 sold, or held by someone else \u2014 is a flat grey disc with
2014
+ nothing drawn on it, so the key shows exactly that and names it once. The
2015
+ fill and alpha mirror render/seatStatusPaint's UNAVAILABLE_SEAT_FILL and
2016
+ UNAVAILABLE_SEAT_OPACITY, so the key teaches the language the canvas speaks. */
2017
+ .sl-status-icon.unavailable{background:#9ca3af;opacity:.55;outline:none}
1941
2018
 
1942
2019
  /* tray */
1943
2020
  .sl-seats-sec{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:13px}
1944
2021
  .sl-seat-summary{font-size:10px;letter-spacing:0;text-transform:none;white-space:nowrap}
1945
2022
  .sl-tray{flex:1;padding:10px 14px 14px;display:flex;flex-direction:column;gap:7px;min-height:0;overflow-y:auto;
1946
2023
  overscroll-behavior:contain;scrollbar-gutter:stable}
1947
- .sl-tray-hint{font-size:12.5px;color:var(--sl-muted);line-height:1.5}
1948
2024
  /* ONE ROW PER TICKET. The card was a two-column grid with a bordered icon
1949
2025
  column down its right edge \u2014 a second box drawn inside every ticket, holding
1950
2026
  two 26px buttons on a card one line tall. It is a row now: dot, name over a
@@ -2166,16 +2242,22 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
2166
2242
  hairline: a control nobody could see was a control, which costs more than a
2167
2243
  hidden label does. The disc tokens are resolved from the ground these are
2168
2244
  really painted on, not from the panel palette \u2014 see resolveMapChromeTokens. */
2169
- .sl-zoom button{width:36px;height:36px;border-radius:999px;
2245
+ /* > , NOT A DESCENDANT SELECTOR. The \u267F menu opens inside this column now, and
2246
+ as .sl-zoom button these rules reached every switch row and every count
2247
+ inside that popover: 36x36 discs on the disc surface, 17px/700 type, a
2248
+ rounded hairline each. The whole menu rendered as a stack of pills, and a
2249
+ "15 free" count squeezed into 36px wrapped onto two lines. The column styles
2250
+ the column's own controls. */
2251
+ .sl-zoom>button{width:36px;height:36px;border-radius:999px;
2170
2252
  background:var(--sl-chrome);
2171
2253
  border:1px solid var(--sl-chrome-line);
2172
2254
  box-shadow:0 6px 16px -8px rgba(0,0,0,.55);
2173
2255
  color:var(--sl-text);font-size:17px;font-weight:700;display:flex;align-items:center;justify-content:center;transition:border-color .15s,opacity .15s}
2174
- .sl-zoom button:hover:not(:disabled){border-color:var(--sl-text)}
2256
+ .sl-zoom>button:hover:not(:disabled){border-color:var(--sl-text)}
2175
2257
  /* NOTHING LEFT TO BACK OUT OF. It dims rather than disappearing: a corner that
2176
2258
  empties itself as the buyer arrives reads as the map losing a feature. */
2177
- .sl-zoom button:disabled{opacity:.42;cursor:default;box-shadow:none}
2178
- .sl-zoom svg{width:14px;height:14px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
2259
+ .sl-zoom>button:disabled{opacity:.42;cursor:default;box-shadow:none}
2260
+ .sl-zoom>button svg{width:14px;height:14px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
2179
2261
  /* Full-screen promotion: the capability existed (native + iOS overlay +
2180
2262
  framed-host paths) but hid as the 4th unlabelled glyph in a corner stack \u2014
2181
2263
  even the owner could not pick it out. dockLayoutChrome docks the SAME
@@ -2305,8 +2387,8 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
2305
2387
  .sl-rail.is-in .sl-rc:nth-child(4){animation-delay:120ms}
2306
2388
  .sl-rail.is-in .sl-rc:nth-child(n+5){animation-delay:160ms}
2307
2389
  @keyframes slRailIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
2308
- .sl-picker.is-arriving .sl-sheet-head{animation:slPeekIn 240ms ease-out both;animation-delay:200ms}
2309
- @keyframes slPeekIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
2390
+ .sl-picker.is-arriving .sl-sheet-head{animation:slSheetIn 240ms ease-out both;animation-delay:200ms}
2391
+ @keyframes slSheetIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
2310
2392
  @media(prefers-reduced-motion:reduce){
2311
2393
  .sl-boot,.sl-boot-venue,.sl-boot-bar::after,.sl-shells-in,
2312
2394
  .sl-rail.is-in .sl-rc,.sl-picker.is-arriving .sl-sheet-head{animation:none;transition:none}
@@ -2396,20 +2478,28 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
2396
2478
  The 42px \u2726 watermark went with it. It was decoration behind live controls
2397
2479
  that every one of them then needed a z-index to sit in front of. */
2398
2480
  .sl-ba{position:relative;flex:none;overflow:hidden;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;
2399
- padding:13px;border:1px solid color-mix(in srgb,var(--sl-accent) 34%,var(--sl-line));border-radius:13px;
2481
+ padding:12px;border:1px solid color-mix(in srgb,var(--sl-accent) 34%,var(--sl-line));border-radius:13px;
2400
2482
  background:linear-gradient(135deg,color-mix(in srgb,var(--sl-accent) 5%,var(--sl-surface)),color-mix(in srgb,var(--sl-accent) 11%,var(--sl-surface)))}
2401
- .sl-ba-title{grid-column:1/-1;display:flex;align-items:center;gap:7px;font-size:13px;font-weight:850}
2402
- .sl-ba-title .spark{color:var(--sl-accent-text);font-size:16px}
2403
- .sl-ba-copy{grid-column:1/-1;margin:-5px 0 2px 23px;color:var(--sl-muted);font-size:10.5px;line-height:1.35}
2483
+ /* ONE LINE, WHATEVER IS ON IT. The title, its \u24D8 and the premium quick-pick
2484
+ share this row; the words are the only part that may shrink, so they get the
2485
+ ellipsis and the two controls keep their size. */
2486
+ .sl-ba-title{position:relative;grid-column:1/-1;display:flex;align-items:center;gap:5px;
2487
+ flex-wrap:nowrap;font-size:12.5px;font-weight:850}
2488
+ .sl-ba-title-t{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
2489
+ .sl-ba-title .spark{flex:none;color:var(--sl-accent-text);font-size:16px}
2490
+ .sl-ba-title .sl-info{flex:none;margin-inline-start:auto}
2404
2491
  .sl-ba-cat{grid-column:2}
2405
2492
  .sl-ba-zone{grid-column:1/-1}
2406
2493
  /* "\u2605 Best seats" premium quick-pick \u2014 gold accent echoing the \u2605 Premium pill on
2407
- the confirm popover; deliberately distinct from the accent-toned qty/go. */
2408
- .sl-ba-premium{position:relative;grid-column:1/-1;justify-self:start;display:inline-flex;align-items:center;gap:6px;
2409
- padding:6px 12px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.02em;cursor:pointer;
2494
+ the confirm popover; deliberately distinct from the accent-toned qty/go.
2495
+ IT RIDES THE TITLE LINE (owner call 2026-09-06), so it is a compact pill at
2496
+ the end of that row rather than a full row of its own; the 44px touch box
2497
+ comes from the coarse-pointer block below, not from its ink. */
2498
+ .sl-ba-premium{position:relative;flex:none;display:inline-flex;align-items:center;gap:4px;
2499
+ padding:4px 8px;border-radius:999px;font-size:10px;font-weight:800;letter-spacing:.01em;cursor:pointer;
2410
2500
  color:var(--sl-premium-text);background:color-mix(in srgb,var(--sl-premium) 10%,var(--sl-surface));
2411
2501
  border:1px solid color-mix(in srgb,var(--sl-premium) 34%,var(--sl-line));transition:filter .15s,background .15s,color .15s}
2412
- .sl-ba-premium .star{font-size:12px;line-height:1;color:var(--sl-premium)}
2502
+ .sl-ba-premium .star{font-size:11px;line-height:1;color:var(--sl-premium)}
2413
2503
  .sl-ba-premium:hover{filter:brightness(1.05)}
2414
2504
  .sl-ba-premium.on{color:var(--sl-premium-ink);background:linear-gradient(135deg,#f0cf6b,#e0b23f);border-color:transparent;
2415
2505
  box-shadow:0 6px 16px color-mix(in srgb,var(--sl-premium) 26%,transparent)}
@@ -2448,7 +2538,6 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
2448
2538
  .sl-ba-actions .replace{border-color:var(--sl-accent);background:var(--sl-accent);color:var(--sl-accent-ink)}
2449
2539
  .sl-picker[data-layout="narrow"] .sl-ba{padding:10px;gap:8px}
2450
2540
  .sl-picker[data-layout="narrow"] .sl-ba-title{font-size:12.5px}
2451
- .sl-picker[data-layout="narrow"] .sl-ba-copy{display:none}
2452
2541
  /* NOTHING NARROWER THAN A THUMB SITS BESIDE ANYTHING ELSE. At 390px the
2453
2542
  category and zone selects shared a row at ~170px each, which is a listbox
2454
2543
  you open by aiming. Both take the full width here, and every control on this
@@ -2481,14 +2570,17 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
2481
2570
  Applied only to controls with clearance around them; tightly stacked pairs
2482
2571
  (the cart chip's remove/view rail) instead get real height on narrow. */
2483
2572
  @media (pointer:coarse){
2484
- .sl-zoom button,.sl-cbbtn,.sl-close,.sl-ga-qty button,.sl-ba-qty button,.sl-price-more,
2485
- .sl-seccard-x,.sl-fs-pill,.sl-side-toggle,.sl-minimap-toggle,.sl-floor-info,
2486
- /* The sheet chevron shrinks to 28px of ink while the panel is open (there is
2487
- no height to spare there) and was never on this list, so the one control
2488
- that closes the panel was a 28px target. */
2489
- .sl-sheet-toggle{position:relative}
2490
- .sl-zoom button::after,.sl-cbbtn::after,.sl-close::after,.sl-ga-qty button::after,.sl-ba-qty button::after,
2491
- .sl-price-more::after,.sl-seccard-x::after,.sl-fs-pill::after,.sl-side-toggle::after,
2573
+ .sl-zoom>button,.sl-a11ybtn,.sl-cbbtn,.sl-close,.sl-ga-qty button,.sl-ba-qty button,.sl-price-more,
2574
+ .sl-seccard-x,.sl-fs-pill,.sl-side-toggle,.sl-minimap-toggle,.sl-ba-premium,
2575
+ .sl-floor-info{position:relative}
2576
+ /* THE SHEET HANDLE IS NOT ON THAT LIST, and putting it back breaks the
2577
+ sheet: the pill is position:absolute on the panel's top edge, and a bare
2578
+ .sl-sheet-toggle{position:relative} here has equal specificity and a later
2579
+ position, so it would win and drop the pill into the head's flex flow \u2014 on
2580
+ every device this block exists for. It is already positioned, so the
2581
+ ::after below has its containing block anyway. */
2582
+ .sl-zoom>button::after,.sl-a11ybtn::after,.sl-cbbtn::after,.sl-close::after,.sl-ga-qty button::after,.sl-ba-qty button::after,
2583
+ .sl-price-more::after,.sl-seccard-x::after,.sl-fs-pill::after,.sl-side-toggle::after,.sl-ba-premium::after,
2492
2584
  .sl-minimap-toggle::after,.sl-floor-info::after,.sl-sheet-toggle::after{
2493
2585
  content:'';position:absolute;top:50%;left:50%;width:max(100%,44px);height:max(100%,44px);
2494
2586
  transform:translate(-50%,-50%)}
@@ -2498,10 +2590,10 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
2498
2590
  given real height instead and 32px was the most the stack could spare. The
2499
2591
  row is one 48px line now with the two actions SIDE BY SIDE, so there is
2500
2592
  nothing to overlap and no reason to stop short of the floor.
2501
- The phone's DENSE line is a different row and keeps its own small ink over
2502
- a real box \u2014 see .sl-tline in the tray sheet. */
2503
- .sl-chip:not(.sl-tline) .rm,
2504
- .sl-chip:not(.sl-tline) .view{min-height:44px;height:44px;width:44px}
2593
+ The phone shows this same card now (owner call 2026-09-06), so there is
2594
+ one rule for one row rather than an exception carved out of it. */
2595
+ .sl-chip .rm,
2596
+ .sl-chip .view{min-height:44px;height:44px;width:44px}
2505
2597
  }
2506
2598
 
2507
2599
  /* screen-reader live region */
@@ -2595,22 +2687,15 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
2595
2687
  .sl-seccard-nav button:hover,.sl-seccard-nav button:focus-visible{border-color:var(--sl-accent);color:var(--sl-accent-text)}
2596
2688
  .sl-seccard.mini .sl-seccard-nav{margin-left:2px}
2597
2689
  .sl-seccard.mini .sl-seccard-nav button{width:24px;height:24px;font-size:12px}
2598
- /* commercial seat flags \u2014 limited-view caution + premium tag. Amber tone,
2599
- deliberately distinct from the red taken/held state; shown on the confirm
2600
- card, echoed as a small \u25D0 marker on cart chips and the hover tip. */
2601
- .sl-cx{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
2602
- .sl-cx-warn{display:flex;align-items:flex-start;gap:7px;padding:8px 10px;border-radius:9px;
2603
- background:color-mix(in srgb,#f4b740 13%,var(--sl-surface));border:1px solid color-mix(in srgb,#f4b740 40%,var(--sl-line));
2604
- animation:slNoticeIn .28s ease both}
2605
- .sl-cx-glyph{flex:none;font-size:14px;line-height:1.2;color:#f4b740}
2606
- .sl-cx-txt{min-width:0;display:flex;flex-direction:column;gap:2px}
2607
- .sl-cx-txt b{font-size:12px;font-weight:800;color:var(--sl-text)}
2608
- .sl-cx-note{font-size:11px;line-height:1.4;color:var(--sl-muted)}
2609
- .sl-cx-premium{display:inline-flex;align-items:center;gap:6px;align-self:flex-start;padding:4px 10px;border-radius:999px;
2610
- font-size:11px;font-weight:800;letter-spacing:.02em;color:#c9a24b;
2611
- background:color-mix(in srgb,#e8c15a 13%,var(--sl-surface));border:1px solid color-mix(in srgb,#e8c15a 38%,var(--sl-line))}
2612
- .sl-cx-star{font-size:12px;line-height:1;color:#e8c15a}
2613
- .sl-cx-mark{flex:none;font-size:12px;line-height:1;color:#f4b740;cursor:help}
2690
+ /* SEAT NOTES \u2014 one BAND per per-seat attribute, on every popup. The rules
2691
+ live in pickerStylesNotes.ts (this sheet is at the app's 1,500-line cap on
2692
+ a vendored source); NOTES_CSS is concatenated immediately after it, which
2693
+ is where the block sat. */
2694
+ /* The cart line's icon-only markers. Same drawings, no words \u2014 the accessible
2695
+ name carries the title, so nothing here is icon-only to a screen reader. */
2696
+ .sl-cx-mark{flex:none;display:inline-flex;align-items:center;line-height:0;color:var(--sl-muted);cursor:help}
2697
+ .sl-cx-mark svg{display:block}
2698
+ .sl-cx-mark-warn{color:var(--sl-warn-text)}
2614
2699
  /* 360\xB0 seat-view modal (fills the widget; drag-to-look-around equirectangular) */
2615
2700
  .sl-view{position:absolute;inset:0;z-index:12;display:flex;flex-direction:column;background:var(--sl-bg);
2616
2701
  transition:opacity .18s ease,transform .18s ease}
@@ -2774,12 +2859,6 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
2774
2859
  @keyframes slAccessVeilIn{from{opacity:0}to{opacity:1}}
2775
2860
  @keyframes slAccessCardIn{from{opacity:0;transform:translateY(14px) scale(.96)}to{opacity:1;transform:none}}
2776
2861
  @keyframes slAccessSpin{to{transform:rotate(360deg)}}
2777
- /* The collapsed sheet's one-liner reacting to a seat landing in the cart. The
2778
- global reduced-motion block above already neutralises it. */
2779
- @keyframes slPeekBump{0%{transform:scale(1)}45%{transform:scale(1.15)}100%{transform:scale(1)}}
2780
- .sl-peek-sum{display:inline-block;transform-origin:left center}
2781
- .sl-peek-bump{animation:slPeekBump .24s cubic-bezier(.2,.8,.2,1)}
2782
-
2783
2862
  @media(prefers-reduced-motion:reduce){
2784
2863
  .sl-picker *,.sl-modal-scrim *{animation-duration:.001ms!important;animation-iteration-count:1!important;
2785
2864
  transition-duration:.001ms!important;scroll-behavior:auto!important}
@@ -2827,7 +2906,7 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
2827
2906
  corners, and it is the frame. */
2828
2907
  .sl-modal-frame > .sl-picker{border-radius:0}
2829
2908
  @media(max-width:640px){.sl-modal-scrim{padding:0}.sl-modal-frame{width:100%;height:100%;border-radius:0}}
2830
- `;function It(){if(document.getElementById(gs))return;let i=document.createElement("style");i.id=gs,i.textContent=Vc+hs+fs+ms+us+Qr,document.head.appendChild(i)}var ks=require("@seatlayer/core"),Ss=require("@seatlayer/core/core/cdnAsset");var Kc=require("@seatlayer/core/core/cdnAsset");function b(i,e){let t=(0,ks.t)(i);return t===i?e:t}function et(){return globalThis.matchMedia?.("(pointer: coarse)").matches??!1?b("picker.dragToLookTouch","Drag to look \xB7 pinch to zoom \xB7 tap \u2715 to close"):b("picker.dragToLookMouse","Drag to look \xB7 pinch or scroll to zoom \xB7 Esc to close")}function Ts(i,e){let t=e?i.toLocaleUpperCase(e):i.toLocaleUpperCase(),n=e?i.toLocaleLowerCase(e):i.toLocaleLowerCase();if(i!==t||t===n)return i;let r=[...n][0]??"";return(e?r.toLocaleUpperCase(e):r.toLocaleUpperCase())+n.slice(r.length)}function Cs(i){if(typeof i=="string"){let e=document.querySelector(i);if(!e)throw new Error(`seatmap: container "${i}" not found`);return e}if(!(i instanceof HTMLElement))throw new Error("seatmap: container must be a CSS selector or an HTMLElement");return i}function D(i){return String(i??"").replace(/[&<>"']/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[e])}function Es(i,e,t){let n=e.find(s=>Ht(s))??null;if(i.replaceChildren(),!n)return i.textContent=t.slice(0,1).toUpperCase(),null;let r=document.createElement("img");return r.alt="",r.referrerPolicy="no-referrer",r.src=n,i.appendChild(r),n}var Ot=null;function $i(){if(Ot!==null)return Ot;try{if(typeof document>"u")return Ot=!1;Ot=!!document.createElement("canvas").getContext("webgl2")}catch{Ot=!1}return Ot}function jn(i){return(0,Ss.cdnAssetUrl)(i)}var si=null;function oi(){return si||(si=(typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?import(jn("seatlayer-view3d.mjs")):import("@seatlayer/core/view3d")).catch(e=>{throw si=null,e}),si)}function zi(){(typeof navigator>"u"?void 0:navigator.connection)?.saveData||oi().catch(()=>{})}async function ji(){return typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?import(jn("seatlayer-panorama.mjs")):import("@seatlayer/core")}async function Ui(){return typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?import(jn("seatlayer-checkout.mjs")):Promise.resolve().then(()=>(xs(),ws))}function As(i){return i==="unavailable_for_event"||i==="payments_off_for_event"?i:"not_configured"}function Gi(i,e,t){let n={month:"short",day:"numeric",hour:"numeric",minute:"2-digit"},r=new Date(i);if(e)try{return r.toLocaleString(t,{...n,timeZone:e})}catch{}return r.toLocaleString(t,n)}async function qi(i,e){let t=i.overlay.productionElements;if(!t?.some(r=>r.contentImageUrl))return i;let n=await Promise.all(t.map(async r=>{if(!r.contentImageUrl)return r;try{let s=await e(r.contentImageUrl);if(!s){let{contentImageUrl:o,...a}=r;return a}return{...r,runtimeContentImageUrl:s}}catch{let{contentImageUrl:s,...o}=r;return o}}));return{...i,overlay:{...i.overlay,productionElements:n}}}async function Ki(i,e){if(i)try{let t=await e(i);return t?await(await fetch(t)).arrayBuffer():void 0}catch{return}}var $e=require("@seatlayer/core/view/panoramaDelivery");function Wi(i){let{root:e,source:t,caption:n,real:r,closeLabel:s,dragHint:o,viewFromSeatLabel:a,real360Label:l,previewLabel:c,resolveAsset:d,onClose:p}=i,u=i.chrome??{},h=document.createElement("div");h.className="sl-view sl-mo-zoom",h.setAttribute("role","dialog"),h.setAttribute("aria-label",a),h.innerHTML='<div class="sl-view-head"><span class="sl-view-title"></span><span class="sl-view-cap"></span><button type="button" class="sl-view-x"><svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></button></div><div class="sl-view-pano"><span class="sl-view-badge"></span><span class="sl-view-hint"></span></div>';let g=H=>h.querySelector(H)?.remove();u.title===!1?g(".sl-view-title"):h.querySelector(".sl-view-title").textContent=a,u.caption===!1?g(".sl-view-cap"):h.querySelector(".sl-view-cap").textContent=n,h.querySelector(".sl-view-x").setAttribute("aria-label",s),u.badge===!1?g(".sl-view-badge"):h.querySelector(".sl-view-badge").textContent=r?l:c,h.querySelector(".sl-view-hint").textContent=o,e.appendChild(h);let y=h.querySelector(".sl-view-pano"),S=(0,$e.planPanoramaDelivery)(t,(0,$e.browserPanoramaConstraints)()),k=new AbortController;y.style.backgroundImage=`url(${JSON.stringify(S.initialUrl)})`;let v=()=>{};S.upgradeUrl&&(v=(0,$e.schedulePanoramaUpgrade)(()=>{d(S.upgradeUrl).then(H=>!H||k.signal.aborted?null:(0,$e.loadPanoramaImage)(H,k.signal).then(()=>H)).then(H=>{!H||!h.isConnected||k.signal.aborted||(y.style.backgroundImage=`url(${JSON.stringify(H)})`)}).catch(()=>{})}));let f=70,P=35,B=1,E=y.clientHeight||1,O=y.clientWidth||1,M=-(E*(180/f)*2/2-O/2),A=0,N=()=>{let H=y.clientHeight||1,yt=H*(180/f)*B,Xe=Math.max(0,yt-H),Zt=Math.min(Xe/2,P/180*yt);A=Math.min(Zt,Math.max(-Zt,A)),y.style.backgroundSize=`auto ${yt}px`,y.style.backgroundPosition=`${M}px ${A-Xe/2}px`};N();let _=!1,V=0,Z=0,q=H=>{_=!0,V=H.clientX,Z=H.clientY,y.classList.add("drag"),y.setPointerCapture?.(H.pointerId)},gt=H=>{_&&(M+=H.clientX-V,A+=H.clientY-Z,V=H.clientX,Z=H.clientY,N())},bt=H=>{_=!1,y.classList.remove("drag"),y.releasePointerCapture?.(H.pointerId)},Qt=H=>{H.preventDefault(),B=Math.min(2.4,Math.max(1,B+(H.deltaY<0?.12:-.12))),N()};y.addEventListener("pointerdown",q),y.addEventListener("pointermove",gt),y.addEventListener("pointerup",bt),y.addEventListener("pointercancel",bt),y.addEventListener("wheel",Qt,{passive:!1});let $=h.querySelector(".sl-view-x");$.addEventListener("click",p);let X=H=>{H.key==="Escape"&&(H.stopPropagation(),p())};return h.addEventListener("keydown",X),$.focus(),{element:h,dispose(){v(),k.abort(),y.removeEventListener("pointerdown",q),y.removeEventListener("pointermove",gt),y.removeEventListener("pointerup",bt),y.removeEventListener("pointercancel",bt),y.removeEventListener("wheel",Qt),h.removeEventListener("keydown",X),$.removeEventListener("click",p)}}}function Wc(i,e){if(!e)return{targetSeatId:null,previousSeatId:null,nextSeatId:null};let t=i.find(s=>s.id===e);if(!t?.rowId)return{targetSeatId:e,previousSeatId:null,nextSeatId:null};let n=i.filter(s=>s.rowId===t.rowId),r=n.findIndex(s=>s.id===e);return{targetSeatId:e,previousSeatId:r>0?n[r-1].id:null,nextSeatId:r>=0&&r+1<n.length?n[r+1].id:null}}var Ps=6e4,Yi=class{constructor(e){this.buyerView_="map";this.targetSeatId_=null;this.focusedSectionId_=null;this.navigationMode_="orbit";this.overlay=null;this.handle=null;this.generation=0;this.seatViewGeneration=0;this.seatViewElement=null;this.seatViewDispose=null;this.options=e}get buyerView(){return this.buyerView_}get targetSeatId(){return this.targetSeatId_}get focusedSectionId(){return this.focusedSectionId_}get seatPosition(){return Wc(this.options.seats(),this.targetSeatId_)}get navigationMode(){return this.navigationMode_}canOffer3D(){return this.options.enable3D?this.handle&&this.overlay?!0:!this.options.doc()||!$i()?!1:this.options.seats().length<=this.max3DSeats():!1}canOfferSeatView(){return this.options.enableSeatView?this.options.seats().some(e=>!!e.viewUrl)?!0:this.hasStage():!1}async setBuyerView(e,t={}){if(e==="map"){this.exit3D();return}if(!this.canOffer3D())throw new Error("venue_3d_unavailable");if(this.buyerView_==="venue3d"&&this.handle){t.flyToSeatId?(this.targetSeatId_=t.flyToSeatId,this.focusedSectionId_=this.findSeat(t.flyToSeatId)?.sectionId??null,this.options.onViewChange(this.buyerView_,this.targetSeatId_),await this.handle.flyToSeat(t.flyToSeatId)):t.resetView&&this.handle.focusOverview();return}if(this.handle&&this.overlay){await this.restore3D(t);return}await this.enter3D(t.flyToSeatId)}async openSeatView(e){if(!this.canOfferSeatView())throw new Error("seat_view_unavailable");let t=this.findSeat(e),n=this.options.host(),r=this.options.doc();if(!t||!n||!r)throw new Error("seat_view_unavailable");let s=++this.seatViewGeneration,o,a,l=!1;if(t.viewUrl){let g=t.viewMeta?.previewUrl,y=!!g&&g!==t.viewUrl,S=y?await this.options.resolveAsset(g):null,k=y?t.viewUrl:await this.options.resolveAsset(t.viewUrl);if(s!==this.seatViewGeneration||!k||y&&!S)return;o={url:k,...S?{previewUrl:S}:{},...y?{resolveUrl:this.options.resolveAsset}:{},...t.viewMeta?.sourceWidth!==void 0?{sourceWidth:t.viewMeta.sourceWidth}:{},...t.viewMeta?.sourceHeight!==void 0?{sourceHeight:t.viewMeta.sourceHeight}:{},...t.viewMeta?.previewWidth!==void 0?{previewWidth:t.viewMeta.previewWidth}:{},...t.viewMeta?.previewHeight!==void 0?{previewHeight:t.viewMeta.previewHeight}:{},...t.viewMeta?.variants?.length?{variants:t.viewMeta.variants}:{},...t.viewMeta?.coverage?{coverage:t.viewMeta.coverage}:{},...t.viewMeta?.capturedAt?{capturedAt:t.viewMeta.capturedAt}:{},...t.viewMeta?.sourceLabel?{sourceLabel:t.viewMeta.sourceLabel}:{}},a=(0,Xi.seatViewDisclosure)(o),l=(0,Xi.isAuthoredSeatView)(o)}else{if(!this.hasStage())throw new Error("seat_view_unavailable");let{generateSeatPanorama:g}=await ji();if(s!==this.seatViewGeneration)return;let y=r.floors?.find(v=>v.objects.some(f=>f.type==="row"&&f.id===t.rowId)),S=t.focalPoint??y?.focalPoint??r.focalPoint,k=g(t,S,[...this.options.seats()]);o={url:k.url,generated:!0},a=(0,tt.t)("picker.illustrationCaption",{m:k.distanceM})}if(s!==this.seatViewGeneration)return;this.closeSeatView(!1),this.prepareHostTheme(n,r),It();let c=this.options.chrome??{},d=et(),p=(0,tt.t)("picker.viewFromSeat",{label:t.displayLabel||t.label}),u=l?(0,tt.t)("picker.real360"):(0,tt.t)("picker.preview"),h=Wi({root:n,source:o,caption:a,real:l,closeLabel:b("picker.close","Close"),dragHint:d,viewFromSeatLabel:p,real360Label:(0,tt.t)("picker.real360"),previewLabel:(0,tt.t)("picker.preview"),chrome:{title:c.seatViewTitle,caption:c.seatViewCaption,badge:c.seatViewBadge},resolveAsset:this.options.resolveAsset,onClose:()=>this.closeSeatView(!0,!0)});this.seatViewElement=h.element,this.seatViewDispose=h.dispose,this.options.onSeatViewChange?.({seatId:t.id,title:p,caption:a,badge:u,real:l,generated:!!o.generated,dragHint:d})}pushLiveState(){this.handle&&(this.handle.setAvailability(this.options.seats().map(e=>({seatId:e.id,state:this.seatState(e)}))),this.handle.setSelection(this.options.selection().map(e=>e.id)))}focusOverview(){return this.buyerView_!=="venue3d"||!this.handle?!1:(this.handle.focusOverview(),!0)}focusSection(e){return this.buyerView_==="venue3d"?this.handle?.focusSection(e)??!1:!1}focusFloor(e){let t=this.options.doc();if(this.buyerView_!=="venue3d"||!this.handle||!t?.floors?.length)return!1;let n=t.floors.findIndex(r=>r.id===e);return n>=0&&this.handle.focusFloor(n)}zoomIn(){return this.buyerView_!=="venue3d"||!this.handle?!1:(this.handle.zoomIn(),!0)}zoomOut(){return this.buyerView_!=="venue3d"||!this.handle?!1:(this.handle.zoomOut(),!0)}setNavigationMode(e){return this.navigationMode_=e,this.buyerView_!=="venue3d"||!this.handle?!1:(this.handle.setNavigationMode(e),this.options.onViewChange(this.buyerView_,this.targetSeatId_),!0)}destroy(){this.generation+=1,this.closeSeatView(!0,!1);try{this.handle?.dispose()}catch{}this.handle=null,this.overlay?.remove(),this.overlay=null,this.buyerView_="map",this.targetSeatId_=null,this.focusedSectionId_=null}max3DSeats(){let e=this.options.max3DSeats;if(typeof e=="number"&&e>0)return e;let t=globalThis.navigator;return(t?.hardwareConcurrency??8)<=4||(t?.deviceMemory??8)<=4||(globalThis.matchMedia?.("(pointer: coarse)").matches??!1)?Ps/2:Ps}async enter3D(e){let t=this.options.host(),n=this.options.doc();if(!t||!n||this.overlay)throw new Error("venue_3d_unavailable");It(),this.prepareHostTheme(t,n);let r=document.createElement("div");r.className="sl-view3d",r.setAttribute("role","group"),r.setAttribute("aria-label",b("picker.interactive3dVenueView","Interactive 3D venue view")),Object.assign(r.style,{position:"absolute",inset:"0",zIndex:"4",opacity:"0",touchAction:"none",transition:this.reducedMotion()?"none":"opacity 260ms cubic-bezier(.2,.8,.2,1)",background:"radial-gradient(120% 120% at 50% 0%,#191f28 0%,#0d1014 70%)"});let s=document.createElement("div");s.className="sl-view3d-loading",s.setAttribute("role","status"),s.setAttribute("aria-live","polite"),s.textContent=b("picker.loading3d","Building the 3D venue\u2026"),r.appendChild(s),t.appendChild(r),this.overlay=r;let o=++this.generation;if(this.reducedMotion()?r.style.opacity="1":requestAnimationFrame(()=>{r.style.opacity="1"}),await this.nextPaint(),!(o!==this.generation||this.overlay!==r))try{let[a,l]=await Promise.all([oi(),this.options.loadEventConfiguration()]),c=l?await qi(l,this.options.resolveAsset):null,d=await Ki(n.theme?.venue3d?.shellAssetUrl,this.options.resolveAsset);if(o!==this.generation||this.overlay!==r)return;let p={doc:n,seats:[...this.options.seats()],...c?{eventConfigurationId:c.id,eventConfiguration:c}:{},...d?{registeredShellGlb:d}:{}};s.textContent=b("picker.building3d","Building venue geometry\u2026");let u=await a.prepareVenue3D(p);if(o!==this.generation||this.overlay!==r)return;let h=this.options.chrome??{},g=a.mountVenue3D(r,{...p,prepared:u},{portraitOverviewCrop:!0,arriveAtSeatEye:!0,lookAroundHint:et(),...h.view3dCaption===!1||h.view3dSeatStepper===!1||h.view3dControlDock===!1?{chrome:{caption:h.view3dCaption!==!1,seatStepper:h.view3dSeatStepper!==!1,controlDock:h.view3dControlDock!==!1}}:{},seatViewActionLabel:y=>this.findSeat(y)?.viewUrl?b("picker.openAuthored360","Open venue 360\xB0"):b("picker.lookAroundLive3d","Look around in live 3D"),onSeatPick:y=>this.toggleSeat(y),onSeatInspect:y=>this.toggleSeat(y),onViewTargetChange:y=>{this.targetSeatId_=y,y&&(this.focusedSectionId_=this.findSeat(y)?.sectionId??null),this.options.onViewChange("venue3d",y)},onSectionFocusChange:y=>{this.focusedSectionId_=y,this.options.onViewChange("venue3d",this.targetSeatId_)},...this.options.enableSeatView?{getSeatView:y=>this.seatViewFor3D(y)}:{}});if(o!==this.generation||this.overlay!==r){g.dispose();return}this.handle=g,this.buyerView_="venue3d",this.targetSeatId_=e??null,this.focusedSectionId_=e?this.findSeat(e)?.sectionId??null:null,g.setNavigationMode(this.navigationMode_),requestAnimationFrame(()=>s.remove()),this.pushLiveState(),this.options.onViewChange("venue3d",this.targetSeatId_),e&&await g.flyToSeat(e)}catch(a){if(o!==this.generation)return;throw this.options.onError?.(a),this.remove3DOverlay(!1),a}}exit3D(){this.buyerView_==="map"&&!this.overlay||(this.generation+=1,this.buyerView_="map",this.targetSeatId_=null,this.focusedSectionId_=null,this.remove3DOverlay(!0,!!this.handle),this.options.onViewChange("map",null))}remove3DOverlay(e,t=!1){let n=this.handle,r=this.overlay;if(this.options.restoreMap(),t&&n&&r){r.style.pointerEvents="none";let s=()=>{this.buyerView_!=="map"||this.overlay!==r||(r.style.visibility="hidden",this.options.restoreMap())};!e||this.reducedMotion()?(r.style.opacity="0",s()):(requestAnimationFrame(()=>{r.style.opacity="0"}),setTimeout(s,280));return}if(this.handle=null,this.overlay=null,!r){try{n?.dispose()}catch{}this.options.restoreMap();return}if(!e||this.reducedMotion()){try{n?.dispose()}catch{}r.remove(),this.options.restoreMap();return}r.style.pointerEvents="none",requestAnimationFrame(()=>{r.style.opacity="0"}),setTimeout(()=>{try{n?.dispose()}catch{}r.remove(),this.options.restoreMap()},280)}async restore3D(e){let t=this.overlay,n=this.handle;if(!t||!n)throw new Error("venue_3d_unavailable");this.buyerView_="venue3d",this.targetSeatId_=e.flyToSeatId??null,this.focusedSectionId_=e.flyToSeatId?this.findSeat(e.flyToSeatId)?.sectionId??null:null,t.style.visibility="visible",t.style.pointerEvents="auto",this.reducedMotion()?t.style.opacity="1":requestAnimationFrame(()=>{t.style.opacity="1"}),n.resize(),n.setNavigationMode(this.navigationMode_),this.pushLiveState(),this.options.onViewChange("venue3d",this.targetSeatId_),e.flyToSeatId?await n.flyToSeat(e.flyToSeatId):e.resetView&&n.focusOverview()}nextPaint(){return this.reducedMotion()||typeof requestAnimationFrame!="function"?Promise.resolve():new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}toggleSeat(e){if(!this.findSeat(e))return;this.options.selection().some(r=>r.id===e)?this.options.deselect(e):this.options.status(e)==="free"&&this.options.select(e),this.pushLiveState()}seatState(e){switch(this.options.status(e.id)){case"held":return"held";case"booked":return"sold";case"not_for_sale":return"dimmed";default:return"available"}}async seatViewFor3D(e){let t=this.findSeat(e);if(!t)throw new Error("seat_view_unavailable");if(t.viewUrl){let n=t.viewMeta?.previewUrl,r=!!n&&n!==t.viewUrl,s=r?await this.options.resolveAsset(n):null,o=r?t.viewUrl:await this.options.resolveAsset(t.viewUrl);if(!o||r&&!s)throw new Error("seat_view_unavailable");return{url:o,...s?{previewUrl:s}:{},...r?{resolveUrl:this.options.resolveAsset}:{},...t.viewMeta?.variants?.length?{variants:t.viewMeta.variants}:{},...t.viewMeta?.initialBearingDeg!==void 0?{initialBearingDeg:t.viewMeta.initialBearingDeg}:{},...t.viewMeta?.initialPitchDeg!==void 0?{initialPitchDeg:t.viewMeta.initialPitchDeg}:{},...t.viewMeta?.coverage?{coverage:t.viewMeta.coverage}:{},...t.viewMeta?.capturedAt?{capturedAt:t.viewMeta.capturedAt}:{},...t.viewMeta?.sourceLabel?{sourceLabel:t.viewMeta.sourceLabel}:{}}}return{url:"",generated:!0,mediaKind:"model",coverage:"exact-seat",sourceLabel:b("picker.chartDerivedModel","Chart-derived model")}}closeSeatView(e=!0,t=!1){e&&(this.seatViewGeneration+=1);let n=this.seatViewElement;if(this.seatViewDispose?.(),this.seatViewDispose=null,this.seatViewElement=null,!!n){if(this.options.onSeatViewChange?.(null),!t||this.reducedMotion()){n.remove();return}n.classList.add("is-leaving"),setTimeout(()=>n.remove(),190)}}findSeat(e){return this.options.seats().find(t=>t.id===e||t.label===e)}hasStage(){let e=this.options.doc();return e?(e.floors?.flatMap(n=>n.objects)??e.objects).some(n=>n.type==="shape"&&(n.role==="stage"||!!n.stageKind)):!1}prepareHostTheme(e,t){getComputedStyle(e).position==="static"&&(e.style.position="relative");let n=t.theme;e.style.setProperty("--sl-bg",n?.background??"#f6f7fb"),e.style.setProperty("--sl-surface","#ffffff"),e.style.setProperty("--sl-text",n?.textColor??"#10162a"),e.style.setProperty("--sl-muted","#697386"),e.style.setProperty("--sl-line","#d9deea"),e.style.setProperty("--sl-accent",n?.accent??"#ef4056"),e.style.setProperty("--sl-accent-ink",n?.accentInk??"#ffffff")}reducedMotion(){return globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}};var Yc={host:"web",platform:"web",bundle:"",protocol:0,chromeOwner:"web"},Xc={...Yc},Qi=null,Ms=null;function Qc(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():0}function Zc(){let i=e=>Math.max(0,Math.round(e*100)/100);return{bootMs:i(Qc()),documentMs:Qi==null?0:i(Qi),handshakeMs:Qi==null||Ms==null?0:i(Ms-Qi)}}function Ls(){let{host:i,platform:e,bundle:t,protocol:n,chromeOwner:r}=Xc,s=Zc();return{host:i,platform:e,...t?{bundle:t}:{},...n?{protocol:n}:{},chromeOwner:r,bootMs:s.bootMs,documentMs:s.documentMs,handshakeMs:s.handshakeMs}}var Hs=new Set;function ze(i){return Hs.has(i)?"repeat":"cold"}function Zi(i){let e=ze(i);return Hs.add(i),e}function ue(i){return typeof i=="number"&&Number.isFinite(i)&&i>=0?Math.round(i):0}function Jc(){return typeof location>"u"?!1:/^(localhost|127\.0\.0\.1|\[::1\])$/i.test(location.hostname)}function ed(i){if(!/^[A-Za-z0-9_-]{1,80}$/.test(i.event))return null;let e=i.performanceProfile??{};return{event:i.event,scope:i.scope,surface:i.surface,outcome:i.outcome,stage:i.stage?.slice(0,32)??"",ms:ue(i.ms),api:ue(e.loadChartAndStatuses)||ue(e.loadChart),scene:ue(e.buildScene),panel:ue(e.buildBuyerControls),paint:ue(e.firstPaint),normalize:ue(e.normalizeBuyerModel),renderer:ue(e.createRenderer),seats:ue(i.seats),floors:ue(i.floors),view:i.view??"map",load:i.load??ze(i.event),transport:i.transport??"pubapi",chartBytes:ue(i.chartDelivery?.bytes),chartCache:i.chartDelivery?.cache??"",...Ls(),availabilityMs:ue(e.loadStatuses)}}var td=new Set;function Re(i){let e=ed(i);if(e){for(let t of td)try{t(e)}catch{}typeof fetch>"u"||Jc()||fetch(`${i.apiBase.replace(/\/+$/,"")}/pub/telemetry/chart-load`,{method:"POST",headers:{"Content-Type":"application/json","X-SeatLayer-Client":"1"},body:JSON.stringify(e),credentials:"omit",keepalive:!0}).catch(()=>{})}}function ai(i){if(!i)return null;let e=i.getBoundingClientRect();return e.width>0&&e.height>0?e:null}function id(i){return ai(i.peek?.querySelector(".sl-peek-sum"))??ai(i.foot?.querySelector(".sl-total"))??ai(i.tray)??ai(i.sheetHead)}function Gn(i,e,t,n){let r=i,s=r.map;if(!s||!e)return;let o=s.getBoundingClientRect(),a={x:o.left+e.x,y:o.top+e.y},l=t.displayLabel??t.label,c=n?.find(p=>p.key===t.categoryKey)?.color,d=()=>{let p=id(r);p&&es({from:a,to:{x:p.left+p.width/2,y:p.top+p.height/2},label:l,color:c})};ai(r.peek)?requestAnimationFrame(d):d()}var Un=60,nd=650;function Rs(i,e){if(!e.length||i.focusSeats?.(e.map(r=>r.id)))return;let t=e.find(r=>r.sectionId)?.sectionId;if(!t)return;let n=e.filter(r=>r.sectionId===t);i.focus(t,{x:n.reduce((r,s)=>r+s.x,0)/n.length,y:n.reduce((r,s)=>r+s.y,0)/n.length})}function Is(i,e){let t=!Di();Rs({focusSeats:n=>i.focusSeats?.(n,{animate:t})===!0,focus:(n,r)=>i.focusSection(n,r)},(e?.items??[]).filter(n=>n.objectType!=="ga").slice(0,10).map(n=>i.seatByLabel(n.label)).filter(n=>!!n))}function Os(i,e){if(!e.length)return;let t=i.reducedMotion===!0;t||e.forEach((o,a)=>{i.schedule(()=>i.pop(o.id),a*Un)});let n=t?0:e.length*Un,r=e.find(o=>o.sectionId)?.sectionId;if(i.schedule(()=>Rs(i,e),n),t)return;let s=n+(i.focusSeats||r?nd:0);e.forEach((o,a)=>{i.schedule(()=>Gn(i.regions,i.screenPoint(o),o,i.categories),s+a*Un)})}function rd(i,e,t){for(let n of i)if(e>=n.x&&t>=n.y&&e<=n.x+n.w&&t<=n.y+n.h)return!0;return!1}var Ji=class{constructor(){this.rects=[];this.host=null;this.pointers=new Set;this.touches=new Set;this.mouseDown=!1;this.onPointerDown=e=>{this.inside(e.clientX,e.clientY)&&(this.pointers.add(e.pointerId),this.swallow(e))};this.onPointerFollow=e=>{this.pointers.has(e.pointerId)&&this.swallow(e)};this.onPointerEnd=e=>{this.pointers.delete(e.pointerId)&&this.swallow(e)};this.onTouchStart=e=>{let t=this.changed(e);if(!t.length)return;let n=!0;for(let r of t)this.inside(r.clientX,r.clientY)?this.touches.add(r.identifier):n=!1;n&&this.swallow(e)};this.onTouchFollow=e=>{let t=this.changed(e);t.length&&t.every(n=>this.touches.has(n.identifier))&&this.swallow(e)};this.onTouchEnd=e=>{let t=this.changed(e);if(!t.length)return;let n=t.every(r=>this.touches.has(r.identifier));for(let r of t)this.touches.delete(r.identifier);n&&this.swallow(e)};this.onMouseDown=e=>{this.inside(e.clientX,e.clientY)&&(this.mouseDown=!0,this.swallow(e))};this.onMouseFollow=e=>{this.mouseDown&&this.swallow(e)};this.onMouseUp=e=>{this.mouseDown&&(this.mouseDown=!1,this.swallow(e))};this.onClick=e=>{this.inside(e.clientX,e.clientY)&&this.swallow(e)}}set(e){this.rects=e.map(t=>({x:t.x,y:t.y,w:t.w,h:t.h})),this.rects.length||(this.pointers.clear(),this.touches.clear(),this.mouseDown=!1)}get(){return this.rects}attach(e){if(this.host===e)return;this.detach(),this.host=e;let t={capture:!0,passive:!1};e.addEventListener("pointerdown",this.onPointerDown,t),e.addEventListener("pointermove",this.onPointerFollow,t),e.addEventListener("pointerup",this.onPointerEnd,t),e.addEventListener("pointercancel",this.onPointerEnd,t),e.addEventListener("touchstart",this.onTouchStart,t),e.addEventListener("touchmove",this.onTouchFollow,t),e.addEventListener("touchend",this.onTouchEnd,t),e.addEventListener("touchcancel",this.onTouchEnd,t),e.addEventListener("mousedown",this.onMouseDown,t),e.addEventListener("mousemove",this.onMouseFollow,t),e.addEventListener("mouseup",this.onMouseUp,t),e.addEventListener("click",this.onClick,t),e.addEventListener("dblclick",this.onClick,t)}detach(){let e=this.host;if(!e)return;let t={capture:!0};e.removeEventListener("pointerdown",this.onPointerDown,t),e.removeEventListener("pointermove",this.onPointerFollow,t),e.removeEventListener("pointerup",this.onPointerEnd,t),e.removeEventListener("pointercancel",this.onPointerEnd,t),e.removeEventListener("touchstart",this.onTouchStart,t),e.removeEventListener("touchmove",this.onTouchFollow,t),e.removeEventListener("touchend",this.onTouchEnd,t),e.removeEventListener("touchcancel",this.onTouchEnd,t),e.removeEventListener("mousedown",this.onMouseDown,t),e.removeEventListener("mousemove",this.onMouseFollow,t),e.removeEventListener("mouseup",this.onMouseUp,t),e.removeEventListener("click",this.onClick,t),e.removeEventListener("dblclick",this.onClick,t),this.host=null,this.pointers.clear(),this.touches.clear(),this.mouseDown=!1}inside(e,t){if(!this.rects.length||!this.host)return!1;let n=this.host.getBoundingClientRect();return rd(this.rects,e-n.left,t-n.top)}swallow(e){e.stopImmediatePropagation(),e.stopPropagation(),e.cancelable&&e.preventDefault()}changed(e){let t=e.changedTouches;return t?Array.from(t):[]}},_s=.48,sd=8;function od(i,e,t,n=_s){let r=Math.max(0,t.top),s=e.height-Math.max(0,t.bottom);if(!(s>r))return 0;let o=Number.isFinite(n)?Math.min(1,Math.max(0,n)):_s,a=r+(s-r)*o-i;return Math.abs(a)<=sd?0:Math.round(a)}function Ds(i,e,t={}){let n=i.gestureCount();if(t.gestures!==void 0&&t.gestures!==n)return{dy:0,gestures:n};let r=i.seatPoint(e);if(!r)return{dy:0,gestures:n};let s=od(r.y,{height:i.mapHeight()},i.insets(),t.fraction);return s?{dy:i.panScreenBy({x:0,y:s},t.animate!==!1)?s:0,gestures:n}:{dy:0,gestures:n}}var li=class i{constructor(e,t=null){this.seams=e;this.watch=null;this.mode=t,this.watchMode()}themeMode(){return this.mode}setThemeMode(e,t){let n=t!==void 0&&"mapTheme"in t;e===this.mode&&!n||(n&&this.seams.setHostMapTheme(t.mapTheme??void 0),this.mode=e,this.watchMode(),this.applyThemeMode())}static groundFor(e){return xt(null,e)}applyThemeMode(){let e=this.seams.mapTheme()??i.groundFor(this.mode);this.seams.applyMapTheme(e??null)&&this.seams.changed()}watchMode(){this.watch?.(),this.watch=null,this.mode==="auto"&&(this.watch=Hi(()=>this.applyThemeMode()))}setViewportInsets(e){this.seams.applyViewportInsets(e),this.seams.changed()}viewportInsets(){return this.seams.readViewportInsets()}dispose(){this.watch?.(),this.watch=null}};var Bs=require("@seatlayer/core"),Fs=require("@seatlayer/core/core/seatConfidence");var Ns=require("@seatlayer/core");function _t(i){let e=i.viewMeta?.previewUrl??i.viewUrl;return e&&($n(e)||Ht(e))?e:null}function tn(i){if(!i)return!1;let e=i.floors?.length?i.floors.map(t=>t.objects??[]):[i.objects??[]];for(let t of e)for(let n of t)if(n.type==="shape"&&(n.role==="stage"||n.stageKind))return!0;return!1}var ad=512,en=new Map;function nn(i,e){if(!e)return null;let t=`${i.id}|${Math.round(e.x)},${Math.round(e.y)}`,n=en.get(t);if(n!==void 0)return n;let r=null;try{r=(0,Ns.generateSeatThumb)(i,e).distanceM??null}catch{r=null}return en.size>=ad&&en.clear(),en.set(t,r),r}function ci(i){return i.getFocusedSection()!==null||i.seatsRevealed()}function ld(i,e){return{accessibilityFilter:i.length>0,limitedViewFilter:e.some(t=>t.commercial?.restrictedView||t.commercial?.obstructedView)}}function cd(i,e,t,n){for(let r of e){if(r.count<=0)continue;let s=i.accessibilitySpread?.([r.key]);for(let o of s?.sections??[]){let a=t.get(o.id)??n.get(o.id);if(!a||o.free<=0)continue;let l=a.accessibleFree??(a.accessibleFree={});l[r.key]=o.free}}}function Vs(i,e,t){let n=i.doc,r=n?.theme??{},s=i.categoryAvailability(),o=i.getGAAreas(),a=i.getFloors(),l=i.getExpandedSeats(),c=i.getAccessNeeds(),d=ld(c,l),p=e.seatPosition,u=p.targetSeatId?i.seatDetails(p.targetSeatId):null,h=new Map(l.map(v=>[v.id,v])),g=tn(n),y=n?.floors?.flatMap(v=>v.objects)??n?.objects??[],S=new Map,k=new Map;for(let v of y){if(v.type!=="section")continue;let f={id:v.id,label:v.label,...v.displayLabel?{displayLabel:v.displayLabel}:{},...v.zone?{zoneId:v.zone}:{}};S.set(v.id,f);let P=v.logicalSectionId??v.id;k.has(P)||k.set(P,f)}return cd(i,c,S,k),{event:{key:t.event,name:t.eventInfo?.name??n?.name??t.event,venue:t.eventInfo?.venue??null,startsAt:t.eventInfo?.startsAt??null,timezone:t.eventInfo?.timezone??null,currency:t.eventInfo?.currency??t.currency??"USD",locale:(0,Bs.getLocale)()||t.eventLocale,posterUrl:t.eventInfo?.posterUrl??null,mode:t.mode_??"live",salesClosed:t.eventInfo?.salesClosed??!1},branding:{...r.accent?{accent:r.accent}:{},...r.accentInk?{accentInk:r.accentInk}:{},...r.background?{background:r.background}:{},...r.textColor?{textColor:r.textColor}:{},...r.brandName?{brandName:r.brandName}:{},...r.logoUrl?{logoUrl:r.logoUrl}:{},attributionRequired:!r.hideBadge},features:{ga:o.length>0,tiers:!!n?.categories.some(v=>v.tiers?.length),floors:a.length>1,zones:!!n?.zones?.length,sections:S.size>0,bestAvailable:!0,...d,venue3d:e.canOffer3D(),seatView:e.canOfferSeatView()},catalog:{categories:(n?.categories??[]).filter(v=>!v.notForSale).map(v=>({key:v.key,label:v.label,color:v.color,price:v.price??v.tiers?.[0]?.price??0,available:s[v.key]??0,...Object.prototype.hasOwnProperty.call(s,v.key)?{free:s[v.key]}:{},tiers:(v.tiers??[]).map(f=>({id:f.id,name:f.name,price:f.price,...f.currency?{currency:f.currency}:{}}))})),zones:(n?.zones??[]).map(v=>({id:v.id,label:v.label,...v.color?{color:v.color}:{}})),sections:[...S.values()],gaAreas:o,bestAvailableZones:i.getBestAvailableZones()},map:{floors:a,activeFloorId:i.getActiveFloorId()||a[0]?.id||null,floorMode:i.isFloorOverview()?"all":"single",floorLabelStyle:i.getRenderer()?.getFloorLabelStyle?.()??"number",rung:i.getRung(),canZoomOut:ci(i)||t.focusedSection_!==null,focusedSectionId:i.getFocusedSection(),focusedSection:t.focusedSection_,viewMode:i.getViewMode(),buyerView:e.buyerView,view3dTargetSeatId:p.targetSeatId,view3dTargetSeat:u,view3dPreviousSeatId:p.previousSeatId,view3dNextSeatId:p.nextSeatId,view3dFocusedSectionId:e.focusedSectionId,view3dNavigationMode:e.navigationMode,colorblindSafe:t.colorblindSafe_,viewportInsets:i.getViewportInsets(),categoryFilter:t.categoryFilter_?[...t.categoryFilter_]:null,accessibilityFilter:t.accessibilityFilter_?[...t.accessibilityFilter_]:null,hideLimitedView:t.hideLimitedView_,accessNeeds:c},selection:{seats:i.getSelection().map(v=>{let f=h.get(v.id);if(!f)return v;let P=i.worldToScreen({x:f.x,y:f.y}),B=_t(f),E=g?nn(f,f.focalPoint??n?.focalPoint):null;return{...v,screenPoint:{x:P.x,y:P.y},...B?{seatViewThumb:{reference:B,kind:"real"}}:{},...E!=null?{sightlineMetres:E}:{},...f.confidenceEvidence?{seatViewConfidence:(0,Fs.seatConfidenceDisclosure)(f.confidenceEvidence)}:{}}}),validity:i.getSelectionValidity(),maxSelection:t.maxSelection_},access:{...t.accessState_}}}var dd="https://api.seatlayer.io",$s=10;function pd(i){if(typeof i=="string"){let e=document.querySelector(i);if(!e)throw new Error(`seatmap: container "${i}" not found`);return e}if(!(i instanceof HTMLElement))throw new Error("seatmap: container must be a CSS selector or an HTMLElement");return i}var rn=class{constructor(e){this.mount=null;this.hostEl=null;this.interactionEnabled_=!0;this.eventLocale=null;this.localeGeneration=0;this.languageSelect=null;this.rendered=!1;this.mode_=null;this.eventInfo=null;this.categoryFilter_=null;this.accessibilityFilter_=null;this.hideLimitedView_=!1;this.focusedSection_=null;this.lastReportedViewRung_=null;this.lastReportedCanZoomOut_=!1;this.tipEl=null;this.tipPos={x:0,y:0};this.onTipMove=null;this.blockedRegions=null;this.realtime=null;this.holdingLabels=new Set;if(!e||typeof e!="object")throw new Error("seatmap: options object is required");if(!e.container)throw new Error("seatmap: `container` is required");if(!e.event||typeof e.event!="string")throw new Error("seatmap: `event` key is required");this.opts=e,this.maxSelection_=e.maxSelection??$s,this.colorblindSafe_=e.colorblindSafe??!1;let t=!!(e.buyerAccessTokenProvider||e.buyerAccessToken||e.publicKey);this.accessState_={configured:t,status:t?"ready":"public"},this.publicKey=e.publicKey;let n={onExpired:a=>{this.accessState_={configured:!0,status:a.refreshed?"ready":"expired"},this.opts.onAccessExpired?.(a),this.notifyMapStateChange()},onUnavailable:a=>{this.accessState_={configured:!0,status:"unavailable",reason:a.reason},this.opts.onAccessUnavailable?.(a),this.notifyMapStateChange()}},r=(e.apiBase??dd).replace(/\/+$/,"");this.apiBase=r;let s=e.publicKey&&!e.buyerAccessTokenProvider&&!e.buyerAccessToken?_i({base:r,event:e.event,publicKey:e.publicKey,accessHooks:n,apiOptions:{onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)}}):null;this.access=s?.access??Pt(e,n);let o=s?.api??new Be(r,{access:this.access??void 0,onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)});this.api=o,this.controller=new j.PickerController({transport:o,eventKey:e.event,maxSelection:this.maxSelection_,selectedObjects:e.selectedObjects,selectableObjects:e.selectableObjects,numberOfPlacesToSelect:e.numberOfPlacesToSelect,selectionValidators:e.selectionValidators,currency:e.currency,onSelectionChange:a=>{this.immersive?.pushLiveState(),this.opts.onSelectionChange?.(a)},onSelectionValidityChange:a=>this.opts.onSelectionValidityChange?.(a),onSelectionValid:a=>this.opts.onSelectionValid?.(a),onSelectionInvalid:a=>this.opts.onSelectionInvalid?.(a),onDeselect:a=>{this.controller.currentHold()?.labels.includes(a.label)&&this.controller.releaseLabels([a.label])},retapKeepsSelection:!0,onSeatRetap:a=>this.opts.onSeatRetap?.(a),onSelectionLimit:a=>this.opts.onSelectionLimit?.(a),onHold:a=>this.opts.onHold?.({holdId:a.holdId,expiresAt:a.expiresAt,seats:a.seats,items:a.items}),onHoldRestored:a=>this.opts.onHoldRestored?.({holdId:a.holdId,expiresAt:a.expiresAt,seats:a.seats,items:a.items}),onHoldExpired:()=>this.opts.onHoldExpired?.(),onGAClick:a=>{let l=this.controller.getGAAreas().find(c=>c.id===a);l&&(this.opts.onGAClick?.(l),this.opts.onGAPrompt?.({area:l,selected:{},min:0,max:Math.max(0,Math.min(l.available,(this.opts.maxSelection??$s)-this.controller.getSelection().length)),tiers:Fi(l),confirm:c=>{let d=typeof c=="number"?c:Object.values(c).reduce((p,u)=>p+u,0);this.holdGA(l.id,d)},cancel:()=>{}}))},onError:a=>this.opts.onError?.(a),onDeckTap:a=>{this.opts.onDeckTap?.(a),this.notifyMapStateChange()},onHint:a=>this.opts.onHint?.(a),onSectionFocus:a=>{this.focusedSection_=a,this.opts.onSectionFocus?.(a),this.notifyMapStateChange()},onViewChange:()=>this.handleViewChange(),onStatusChange:()=>{this.immersive?.pushLiveState(),this.opts.onStatusChange?.()},onSalesClosed:()=>{this.eventInfo&&(this.eventInfo.salesClosed=!0),this.opts.onSalesClosed?.()},flashOnLiveChange:!0,onSeatHover:a=>{this.opts.onSeatHover?.(a),this.opts.seatTooltip!==!1&&this.updateTooltip(a)},colorblindSafe:e.colorblindSafe,mapTheme:e.mapTheme??li.groundFor(e.theme?.mode)??null}),this.hostSurface=new li({mapTheme:()=>this.opts.mapTheme,setHostMapTheme:a=>{this.opts.mapTheme=a},applyMapTheme:a=>this.controller.setMapTheme(a),applyViewportInsets:a=>this.controller.setViewportInsets(a),readViewportInsets:()=>this.controller.getViewportInsets(),changed:()=>this.notifyMapStateChange()},e.theme?.mode??null),this.buyerAssetUrls=new Rt(e.event,(a,l)=>o.asset(a,l)),this.immersive=new Yi({host:()=>this.hostEl,doc:()=>this.controller.doc,seats:()=>this.controller.getExpandedSeats(),selection:()=>this.controller.getSelection(),status:a=>this.controller.getStatus(a),select:a=>this.controller.select([a]),deselect:a=>this.controller.deselect([a]),loadEventConfiguration:()=>this.controller.loadEventConfiguration(),resolveAsset:a=>this.buyerAssetUrls.resolve(a),enable3D:e.enable3D!==!1,enableSeatView:e.enableSeatView!==!1,max3DSeats:e.max3DSeats,...e.chrome?{chrome:e.chrome}:{},restoreMap:()=>this.controller.refitCurrentView(),onViewChange:(a,l)=>{this.opts.onBuyerViewChange?.({view:a,...l?{seatId:l}:{}}),this.notifyMapStateChange()},onSeatViewChange:a=>this.opts.onSeatViewChange?.(a),onError:a=>this.opts.onError?.(a)}),this.lastReportedViewRung_=this.controller.getRung(),this.lastReportedCanZoomOut_=ci(this.controller)}handleViewChange(){this.opts.onViewChange?.();let e=this.controller.getRung(),t=ci(this.controller);e===this.lastReportedViewRung_&&t===this.lastReportedCanZoomOut_||(this.lastReportedViewRung_=e,this.lastReportedCanZoomOut_=t,this.opts.onMapStateChange?.())}notifyMapStateChange(){this.lastReportedViewRung_=this.controller.getRung(),this.lastReportedCanZoomOut_=ci(this.controller),this.opts.onMapStateChange?.()}async render(){if(this.rendered)return this;let e=performance.now();this.rendered=!0;let t=Ri(this.opts.locale,this.opts.messages),n=this.localeGeneration+=1,r=(0,j.getLocale)();this.mount=pd(this.opts.container);let s=document.createElement("div");s.style.width="100%",s.style.height="100%",s.style.position="relative",this.mount.appendChild(s),this.hostEl=s,this.blockedRegions?.attach(s),Ii(s,t,a=>{a!==r&&this.applyActiveLocale(a,n)}),this.applyInteractionState();let o=await this.controller.render(s);if(!o)return Re({apiBase:this.apiBase,event:this.opts.event,scope:"event",surface:"seating_chart",outcome:"failure",stage:"load_chart",ms:performance.now()-e,load:ze(this.opts.event),transport:"pubapi"}),this.rendered=!1,this.opts.errorDisplay!=="none"&&this.showLoadFailure(s),this;if(this.eventLocale=o.locale??null,!this.opts.locale&&this.eventLocale&&this.setLocale(this.eventLocale),this.buildLanguageSwitcher(s),this.controller.setViewMode(this.opts.initialView??"flat"),this.opts.floorLabelStyle&&this.setFloorLabelStyle(this.opts.floorLabelStyle),this.startRealtime(),this.mode_=o.mode==="test"?"test":"live",this.eventInfo={name:o.eventName,venue:o.venue??null,startsAt:o.startsAt??null,timezone:o.timezone??null,currency:o.currency??this.opts.currency??"USD",posterUrl:o.posterUrl??null,salesClosed:o.salesClosed},this.opts.seatTooltip!==!1){let a=document.createElement("div");a.setAttribute("role","tooltip"),a.style.cssText='position:absolute;z-index:7;pointer-events:none;display:none;max-width:240px;background:#10162a;color:#fff;border-radius:10px;padding:9px 12px;font:500 12px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 10px 30px -10px rgba(0,0,0,.5);',s.appendChild(a),this.tipEl=a,this.onTipMove=l=>{let c=s.getBoundingClientRect();this.tipPos={x:l.clientX-c.left,y:l.clientY-c.top},this.tipEl&&this.tipEl.style.display!=="none"&&this.placeTooltip()},s.addEventListener("mousemove",this.onTipMove)}if(o.mode==="test"&&this.opts.showTestModeIndicator!==!1){s.style.overflow="hidden";let a=document.createElement("div");a.dataset.slI18n="testMode",a.textContent=(0,j.t)("picker.testMode"),a.setAttribute("aria-label",(0,j.t)("picker.testMode")),a.style.cssText="position:absolute;top:18px;right:-34px;z-index:6;transform:rotate(45deg);width:140px;text-align:center;padding:4px 0;background:#f4b740;color:#1a1200;font:800 10.5px/1.4 -apple-system,BlinkMacSystemFont,sans-serif;letter-spacing:.12em;box-shadow:0 2px 8px rgba(0,0,0,.25);pointer-events:none;",s.appendChild(a)}return this.buildBadge(s),Re({apiBase:this.apiBase,event:this.opts.event,scope:"event",surface:"seating_chart",outcome:"success",ms:performance.now()-e,performanceProfile:o.performanceProfile,chartDelivery:o.chartDelivery,seats:this.controller.getExpandedSeats().length,floors:this.controller.getFloors().length,view:"map",load:Zi(this.opts.event),transport:"pubapi"}),this}buildBadge(e){if(this.controller.doc?.theme?.hideBadge)return;let t=document.createElement("a");t.dataset.slI18n="badge",t.href="https://seatlayer.io",t.target="_blank",t.rel="noopener noreferrer",t.setAttribute("aria-label",(0,j.t)("picker.poweredBy")),t.style.cssText='position:absolute;bottom:10px;right:12px;z-index:5;display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;background:rgba(255,255,255,.92);color:#4a5163;text-decoration:none;font:600 11px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.02em;box-shadow:0 2px 8px rgba(0,0,0,.12);';let n=document.createElement("span");n.setAttribute("aria-hidden","true"),n.style.cssText="width:16px;height:16px;border-radius:4px;flex:none;display:flex;align-items:center;justify-content:center;background:#0c1220;color:#fcf7ee",n.innerHTML=Vi;let r=document.createElement("span");r.textContent=(0,j.t)("picker.poweredBy"),t.append(n,r),e.appendChild(t)}placeTooltip(){if(!this.tipEl||!this.hostEl)return;let e=this.hostEl.clientWidth,t=this.tipEl.offsetWidth,n=this.tipEl.offsetHeight,r=this.tipPos.x+14,s=this.tipPos.y-n-12;r+t>e-8&&(r=this.tipPos.x-t-14),s<8&&(s=this.tipPos.y+18),this.tipEl.style.left=`${Math.max(8,r)}px`,this.tipEl.style.top=`${Math.max(8,s)}px`}updateTooltip(e){if(!this.tipEl)return;if(!e){this.tipEl.style.display="none";return}let t=(0,j.formatMoney)(e.price,e.currency,{...Number.isInteger(e.price)?{minimumFractionDigits:0,maximumFractionDigits:0}:{},locale:this.opts.locale,fallback:(l,c)=>`${l} ${c}`}),n=document.createElement("div");n.style.cssText="font-weight:700;font-size:13px",n.textContent=e.label;let r=document.createElement("div");r.style.cssText="display:flex;align-items:center;gap:6px;margin-top:4px;color:#c7cddc";let s=document.createElement("span");s.style.cssText="width:9px;height:9px;border-radius:50%;flex:none",s.style.background=e.categoryColor;let o=document.createElement("span");o.textContent=e.categoryLabel;let a=document.createElement("span");if(a.style.cssText="margin-left:auto;font-weight:700;color:#fff",a.textContent=t,r.append(s,o,a),this.tipEl.replaceChildren(n,r),e.status!=="free"){let l=document.createElement("div");l.style.cssText="margin-top:5px;font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;color:#fca5a5;font-weight:700",l.textContent=e.status==="held"?(0,j.t)("map.statusHeld"):(0,j.t)("map.statusTaken"),this.tipEl.appendChild(l)}this.tipEl.style.display="block",this.placeTooltip()}buildLanguageSwitcher(e){let t=(this.opts.languages??[]).map(r=>(0,j.resolveLocale)(r)).filter((r,s,o)=>o.indexOf(r)===s);if(t.length<2)return;let n=document.createElement("select");n.setAttribute("aria-label",(0,j.t)("picker.preferredTicketType")),n.style.cssText='position:absolute;bottom:10px;left:12px;z-index:5;appearance:none;padding:5px 9px;border-radius:999px;border:0;cursor:pointer;background:rgba(255,255,255,.92);color:#4a5163;font:600 11px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 2px 8px rgba(0,0,0,.12);';for(let r of t){let s=document.createElement("option");s.value=r,s.textContent=j.LOCALE_NAMES[r]??r,s.selected=r===(0,j.getLocale)(),n.appendChild(s)}n.addEventListener("change",()=>{this.setLocale(n.value)}),e.appendChild(n),this.languageSelect=n}async setLocale(e){let t=(0,j.getLocale)(),n=this.localeGeneration+=1,r=await(0,j.loadLocale)(e);return this.opts.messages&&(0,j.setStringOverrides)(this.opts.messages),r===t||this.applyActiveLocale(r,n),r}applyActiveLocale(e,t){if(t!==this.localeGeneration)return;let n=this.hostEl;if(n){n.lang=e,n.dir=(0,j.localeDirection)(e);for(let r of n.querySelectorAll("[data-sl-i18n]"))if(r.dataset.slI18n==="testMode")r.textContent=(0,j.t)("picker.testMode"),r.setAttribute("aria-label",(0,j.t)("picker.testMode"));else if(r.dataset.slI18n==="badge"){r.setAttribute("aria-label",(0,j.t)("picker.poweredBy"));let s=r.querySelector("span:last-child");s&&(s.textContent=(0,j.t)("picker.poweredBy"))}this.languageSelect&&this.languageSelect.value!==e&&(this.languageSelect.value=e),this.controller.refreshMapCopy()}}getMode(){return this.mode_}getPickerState(){return Vs(this.controller,this.immersive,{event:this.opts.event,currency:this.opts.currency,mode_:this.mode_,eventInfo:this.eventInfo,eventLocale:this.eventLocale,focusedSection_:this.focusedSection_,colorblindSafe_:this.colorblindSafe_,categoryFilter_:this.categoryFilter_,accessibilityFilter_:this.accessibilityFilter_,hideLimitedView_:this.hideLimitedView_,maxSelection_:this.maxSelection_,accessState_:this.accessState_})}getCategoryAvailability(){return this.controller.categoryAvailability()}getBestAvailableZones(){return this.controller.getBestAvailableZones()}getActiveFloorId(){return this.controller.getActiveFloorId()||null}getRung(){return this.controller.getRung()}getFocusedSection(){return this.controller.getFocusedSection()}focusSection(e){if(this.immersive.buyerView==="venue3d"&&this.immersive.focusSection(e)){this.notifyMapStateChange();return}this.controller.focusSection(e),this.notifyMapStateChange()}overview(){if(this.immersive.focusOverview()){this.notifyMapStateChange();return}this.controller.overview(),this.notifyMapStateChange()}setRung(e){this.controller.setRung(e),this.notifyMapStateChange()}setCategoryFilter(e,t=!1){this.categoryFilter_=e?[...e]:null,this.controller.setCategoryFilter(e),t&&this.controller.focusCategoryFilter(e),this.notifyMapStateChange()}setAccessibilityFilter(e){this.accessibilityFilter_=e?[...e]:null,this.controller.setAccessibilityFilter(e),this.notifyMapStateChange(),e?.length&&this.focusAccessibilityFilter()}focusAccessibilityFilter(){this.controller.focusAccessibilityFilter?.(),this.notifyMapStateChange()}focusNextAccessibleSection(e){let t=this.controller.focusNextAccessibleSection?.(e)??null;return t&&this.notifyMapStateChange(),t}setCommercialLimitedFilter(e){this.hideLimitedView_=e,this.controller.setCommercialLimitedFilter(e),this.notifyMapStateChange()}getSelection(){return this.controller.getSelection()}selectObjects(e){let t=this.controller.select(e);return this.immersive.pushLiveState(),t}deselectObjects(e){this.controller.deselect(e),this.immersive.pushLiveState()}clearSelection(){this.controller.clearSelection(),this.immersive.pushLiveState()}selectCategories(e){return this.controller.selectCategories(e)}deselectCategories(e){this.controller.deselectCategories(e)}setSelectableObjects(e){this.controller.setSelectableObjects(e)}setMaxSelection(e){this.maxSelection_=e,this.controller.setMaxSelection(e),this.notifyMapStateChange()}getSelectionValidity(){return this.controller.getSelectionValidity()}async hold(e={}){try{return await this.holdOrThrow(e)}catch(t){return this.opts.onError?.(t),null}}async holdOrThrow(e={}){let t=this.controller.getSelectionValidity();if(t&&!t.isValid){let n=t.violations.includes("numberOfPlacesToSelect");throw Object.assign(new Error(n?`seatmap: select exactly ${t.required} places before holding`:"seatmap: adjust the ticket selection before holding"),{code:n?"selection_count_mismatch":"selection_invalid",selection:t})}this.holdingLabels=new Set(this.controller.getSelection().map(n=>n.label));try{let n=await this.controller.hold(void 0,e.ttlMs);return n?{holdId:n.holdId,expiresAt:n.expiresAt,seats:n.seats,items:n.items}:null}finally{this.holdingLabels.clear()}}async resumeHold(e){try{return await this.resumeHoldOrThrow(e)}catch(t){return this.opts.onError?.(t),null}}async resumeHoldOrThrow(e){let t=await this.controller.resumeHold(e);return t?{holdId:t.holdId,expiresAt:t.expiresAt,seats:t.seats,items:t.items}:null}async extendHold(e){try{let t=await this.controller.extendHold(e);return t?{holdId:t.holdId,expiresAt:t.expiresAt,seats:t.seats,items:t.items}:null}catch(t){return this.opts.onError?.(t),null}}getCurrentHold(){let e=this.controller.currentHold();return e?{holdId:e.holdId,expiresAt:e.expiresAt,seats:e.seats,items:e.items}:null}getGAAreas(){return this.controller.getGAAreas()}async holdGA(e,t,n={}){try{return await this.holdGAOrThrow(e,t,n)}catch(r){return this.opts.onError?.(r),null}}async holdGAOrThrow(e,t,n={}){let r=await this.controller.holdGA(e,t,n);return r?{holdId:r.holdId,expiresAt:r.expiresAt,seats:r.seats,items:r.items}:null}async bestAvailable(e,t,n={}){try{return await this.bestAvailableOrThrow(e,t,n)}catch(r){return this.opts.onError?.(r),null}}async bestAvailableOrThrow(e,t,n={}){let r=await this.controller.bestAvailable(e,t,n);return Is(this.controller,r),r?{holdId:r.holdId,expiresAt:r.expiresAt,labels:r.labels,seats:r.seats,items:r.items,...n.zoneId?{zoneId:n.zoneId}:{}}:null}setSeatTier(e,t){this.controller.setSeatTier(e,t)}setTableQuantity(e,t){return this.controller.setTableQuantity(e,t)}async replaceTableQuantity(e,t,n){try{return await this.replaceTableQuantityOrThrow(e,t,n)}catch(r){return this.opts.onError?.(r),null}}async replaceTableQuantityOrThrow(e,t,n){let r=await this.controller.replaceTableQuantity(e,t,n);return r?{holdId:r.holdId,expiresAt:r.expiresAt,seats:r.seats,items:r.items}:null}getFloors(){return this.controller.getFloors()}setFloor(e){if(this.immersive.buyerView==="venue3d"&&e!=="all"&&this.immersive.focusFloor(e)){this.notifyMapStateChange();return}if(this.controller.getFloors().length<=1){console.warn("seatmap: setFloor() ignored \u2014 this chart has a single floor");return}e==="all"?this.controller.setFloorOverview(!0):this.controller.setFloor(e),this.notifyMapStateChange()}setFloorLabelStyle(e){this.controller.getRenderer()?.setFloorLabelStyle?.(e),this.notifyMapStateChange()}setSectionFocusDim(e){this.controller.setSectionFocusDim(e)}setSelectionFocus(e){this.controller.setSelectionFocus(e)}setBlockedRegions(e){if(!this.blockedRegions){if(!e.length)return;this.blockedRegions=new Ji,this.hostEl&&this.blockedRegions.attach(this.hostEl)}this.blockedRegions.set(e)}getBlockedRegions(){return this.blockedRegions?.get()??[]}frameSeat(e,t={}){let n=this.controller.getRenderer();return Ds({seatPoint:r=>{let s=this.controller.getExpandedSeats().find(o=>o.id===r);return s?this.controller.worldToScreen({x:s.x,y:s.y}):null},mapHeight:()=>this.hostEl?.clientHeight??0,insets:()=>this.controller.getViewportInsets(),gestureCount:()=>n?.getCameraGestureCount?.()??0,panScreenBy:(r,s)=>n?.panScreenBy?(n.panScreenBy(r,{animate:s}),!0):!1},e,t)}setColorblindSafe(e){this.colorblindSafe_=e,this.controller.setColorblindSafe(e),this.notifyMapStateChange()}setViewMode(e){this.controller.setViewMode(e),this.notifyMapStateChange()}getViewMode(){return this.controller.getViewMode()}zoomIn(){this.immersive.zoomIn()||(this.controller.zoomIn(),this.notifyMapStateChange())}zoomOut(){this.immersive.zoomOut()||(this.controller.zoomOut(),this.notifyMapStateChange())}zoomToFit(){this.immersive.focusOverview()||(this.controller.zoomToFit(),this.notifyMapStateChange())}setThemeMode(e,t){this.hostSurface.setThemeMode(e,t)}getThemeMode(){return this.hostSurface.themeMode()}setViewportInsets(e){this.hostSurface.setViewportInsets(e)}getViewportInsets(){return this.hostSurface.viewportInsets()}setBuyerView(e,t){return this.immersive.setBuyerView(e,t)}getBuyerView(){return this.immersive.buyerView}openSeatView(e){return this.immersive.openSeatView(e)}setVenue3DNavigationMode(e){if(!this.immersive.setNavigationMode(e))throw new Error("venue_3d_not_active")}setInteractionEnabled(e){this.interactionEnabled_=e,this.applyInteractionState()}applyInteractionState(){let e=this.hostEl;e&&(e.style.pointerEvents=this.interactionEnabled_?"":"none",e.toggleAttribute("inert",!this.interactionEnabled_),this.interactionEnabled_?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden","true"))}async release(){await this.controller.release()}async releaseLabels(e){return this.controller.releaseLabels(e)}startRealtime(){!this.access?.configured||this.realtime||(this.realtime=new xe({url:this.api.subscribeUrl(this.opts.event),mintTicket:()=>this.api.subscribeTicket(this.opts.event),onAccessUnavailable:e=>this.opts.onAccessUnavailable?.(e),sink:wt(this.controller,{flashOnLiveChange:!0,ownLabels:()=>this.holdingLabels,onStatusChange:()=>{this.immersive.pushLiveState(),this.opts.onStatusChange?.()},onSelectedObjectUnavailable:(e,t)=>this.opts.onSelectedObjectUnavailable?.({labels:e,reason:t})})}),this.realtime.start())}async refreshAvailability(){let e=await this.controller.refreshAvailability();return this.immersive.pushLiveState(),this.opts.onStatusChange?.(),e.lost.length&&this.opts.onSelectedObjectUnavailable?.({labels:e.lost,reason:"taken"}),this.notifyMapStateChange(),e}async refreshAccess(){if(!this.access?.configured)return!1;let e=await this.access.refresh("manual");return e&&(this.accessState_={configured:!0,status:"ready"},await this.controller.refresh(),this.realtime?.restart(),this.realtime||this.startRealtime()),this.notifyMapStateChange(),e}showLoadFailure(e){let t=document.createElement("div");t.setAttribute("role","status"),t.style.cssText='display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;height:100%;min-height:180px;box-sizing:border-box;padding:24px;text-align:center;font:500 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#3b4256;';let n=document.createElement("div");n.textContent="The seat map didn\u2019t load.",t.appendChild(n);let r=document.createElement("button");r.type="button",r.textContent="Try again",r.style.cssText="appearance:none;border:1px solid #c9cede;background:#fff;color:#10162a;border-radius:8px;padding:8px 16px;font:600 13px/1 inherit;cursor:pointer;",r.addEventListener("click",()=>{this.destroy(),this.render().catch(s=>this.opts.onError?.(s))}),t.appendChild(r),e.appendChild(t)}destroy(){this.blockedRegions?.detach(),this.hostSurface.dispose(),this.immersive.destroy(),this.buyerAssetUrls.dispose(),this.realtime?.stop(),this.realtime=null,this.access?.clear(),this.hostEl&&this.onTipMove&&this.hostEl.removeEventListener("mousemove",this.onTipMove),this.tipEl=null,this.onTipMove=null,this.languageSelect=null,this.controller.destroy(),this.hostEl&&this.hostEl.parentNode&&this.hostEl.parentNode.removeChild(this.hostEl),this.hostEl=null,this.mount=null,this.rendered=!1,this.mode_=null,this.eventInfo=null,this.focusedSection_=null}};var qn=["hold","resumeHold","getCurrentHold","getGAAreas","holdGA","bestAvailable","release","releaseLabels","getSelection","selectObjects","deselectObjects","clearSelection","selectCategories","deselectCategories","setSelectableObjects","setMaxSelection","getSelectionValidity","setSeatTier","getFloors","setFloor","setColorblindSafe","zoomIn","zoomOut","zoomToFit","refreshAccess"],hd={hold:()=>Promise.resolve(null),resumeHold:()=>Promise.resolve(null),getCurrentHold:()=>null,getGAAreas:()=>[],holdGA:()=>Promise.resolve(null),bestAvailable:()=>Promise.resolve(null),release:()=>Promise.resolve(),releaseLabels:()=>Promise.resolve(!1),getSelection:()=>[],selectObjects:()=>[],deselectObjects:()=>{},clearSelection:()=>{},selectCategories:()=>[],deselectCategories:()=>{},setSelectableObjects:()=>{},setMaxSelection:()=>{},getSelectionValidity:()=>null,setSeatTier:()=>{},getFloors:()=>[],setFloor:()=>{},setColorblindSafe:()=>{},zoomIn:()=>{},zoomOut:()=>{},zoomToFit:()=>{},refreshAccess:()=>Promise.resolve(!1)};function zs(i){let e={};for(let t of qn)e[t]=(...n)=>{let r=i();return r?r[t](...n):hd[t]()};return e}var Kn=["event","apiBase","maxSelection","numberOfPlacesToSelect","selectionValidators","publicKey","locale","currency","colorblindSafe","initialView","errorDisplay"],Wn=[...Kn,"selectedObjects","selectableObjects","messages","seatTooltip","buyerAccessTokenProvider","buyerAccessToken"],Yn=["onSelectionChange","onSelectionValidityChange","onSelectionValid","onSelectionInvalid","onSelectionLimit","onHold","onHoldRestored","onHoldExpired","onGAClick","onGAPrompt","onError","onDeckTap","onHint","onSeatHover","onAccessExpired","onAccessUnavailable","onSelectedObjectUnavailable"];function js(i,e,t){let n={container:i};for(let r of Wn)n[r]=e[r];for(let r of Yn)n[r]=t[r];return n}var ud=new Set(["seatlayer.designer.ready","seatlayer.designer.saved","seatlayer.designer.published","seatlayer.designer.close","seatlayer.designer.error"]),md=2e4,fd=480,gd=180*1e3,bd=900*1e3,yd=.8,vd=30*1e3,wd=1e5,xd=4,kd=50;function Xn(i){if(typeof i!="string")return i;let e=document.querySelector(i);if(!e)throw new Error(`EmbeddedDesigner container not found: ${i}`);return e}function Sd(i){let e=(i??"").toLowerCase();return e.includes("expire")||e.includes("revoke")||e==="401"?"expired":e.includes("mismatch")?"mismatch":e.includes("timeout")?"timeout":"load"}var Td={expired:{title:"This design session expired",body:"For your security, editing sessions are short-lived. Start a fresh one to keep designing."},mismatch:{title:"This editor doesn't match this chart",body:"The session that loaded belongs to a different chart or workspace. Reopen the designer to continue."},timeout:{title:"The designer is taking too long",body:"It did not finish loading in time. This is usually a slow connection \u2014 try again."},load:{title:"We couldn't load the designer",body:"Something went wrong while opening the editor. Please try again."}},sn=class{constructor(e){this.frame=null;this.designerOrigin="";this.overlay=null;this.timeoutTimer=null;this.renewTimer=null;this.autoRecoverUsed=!1;this.phase="loading";this.identityEstablished=!1;this.restoreContainerPosition=null;this.pinned=!1;this.frameStyleBeforeFs=null;this.docOverflowBeforeFs=null;this.bodyOverflowBeforeFs=null;this.fsKeyHandler=null;this.lastAutoHeight="";this.fillRaf=null;this.reprobeRaf=null;this.fillListening=!1;this.containerEl=null;this.fillMode=null;this.resizeObs=null;this.scheduleFill=()=>{this.fillRaf===null&&(this.fillRaf=requestAnimationFrame(()=>{this.fillRaf=null,this.applyFill()}))};this.scheduleReprobe=()=>{this.reprobeRaf===null&&(this.reprobeRaf=requestAnimationFrame(()=>{this.reprobeRaf=null,!this.pinned&&(this.fillMode=this.detectFillMode(),this.syncContainerObserver(),this.applyFill())}))};this.handleMessage=e=>{if(!this.frame||e.origin!==this.designerOrigin||e.source!==this.frame.contentWindow||!e.data||typeof e.data!="object")return;let t=e.data;if(t.type==="seatlayer.designer.handshake"&&typeof t.nonce=="string"&&t.nonce.length<=128){this.frame.contentWindow?.postMessage({type:"seatlayer.designer.parent",nonce:t.nonce},this.designerOrigin);return}if(t.type==="seatlayer.designer.resize"){!this.fillEnabled()&&this.autoResizeEnabled()&&typeof t.px=="number"&&Number.isFinite(t.px)&&t.px>0&&(this.lastAutoHeight=`${Math.round(t.px)}px`,this.pinned||this.setFrameHeight(this.lastAutoHeight));return}if(t.type==="seatlayer.designer.fullscreen"){t.on===!0?this.pinFullscreen():t.on===!1&&this.unpinFullscreen();return}if(typeof t.type!="string"||!ud.has(t.type))return;let n={type:t.type,chartId:typeof t.chartId=="string"?t.chartId:void 0,workspaceId:typeof t.workspaceId=="string"?t.workspaceId:void 0,expiresAt:typeof t.expiresAt=="number"?t.expiresAt:void 0,code:typeof t.code=="string"?t.code:void 0,message:typeof t.message=="string"?t.message:void 0,meta:t.meta,fatal:typeof t.fatal=="boolean"?t.fatal:void 0,action:typeof t.action=="string"?t.action:void 0},r=this.identityEstablished||n.type==="seatlayer.designer.ready"||n.type==="seatlayer.designer.saved"||n.type==="seatlayer.designer.published"||n.type==="seatlayer.designer.close",s=this.options.expectedChartId!==void 0&&n.chartId!==this.options.expectedChartId&&(r||n.chartId!==void 0),o=this.options.expectedWorkspaceId!==void 0&&n.workspaceId!==this.options.expectedWorkspaceId&&(r||n.workspaceId!==void 0);if(s||o){this.showError("mismatch");return}switch(n.type){case"seatlayer.designer.ready":this.identityEstablished=!0,this.sessionExpiresAt=n.expiresAt,this.phase="ready",this.clearTimeoutTimer(),this.removeOverlay(),this.autoRecoverUsed=!1,this.scheduleRenewal(n.expiresAt),this.options.onReady?.(n);break;case"seatlayer.designer.saved":this.options.onSaved?.(n);break;case"seatlayer.designer.published":this.options.onPublished?.(n);break;case"seatlayer.designer.close":this.options.onClose?.(n);break;case"seatlayer.designer.error":{let a=Sd(n.code);if(a==="expired"&&this.autoRenewEnabled()&&!this.autoRecoverUsed){this.autoRecoverUsed=!0,this.clearRenewTimer(),this.options.onRequestRelaunch();return}(typeof n.fatal=="boolean"?n.fatal:a!=="load"||this.phase!=="ready")&&this.showError(a),this.options.onError?.(n);break}}};this.options=e}mount(){this.destroy();let e=new URL(this.options.designerUrl,window.location.href);if(e.protocol!=="https:"&&e.hostname!=="localhost"&&e.hostname!=="127.0.0.1")throw new Error("EmbeddedDesigner requires an HTTPS designerUrl outside local development.");this.designerOrigin=e.origin;let t=document.createElement("iframe");t.title=this.options.title??"Venue chart Designer",t.allow=this.options.allow??"fullscreen; clipboard-write",t.referrerPolicy=this.options.referrerPolicy??"origin",t.src=e.toString(),t.style.setProperty("width","100%","important"),t.style.setProperty("height",typeof this.options.height=="number"?`${this.options.height}px`:"100%","important"),t.style.border="0",Object.assign(t.style,this.options.style),this.options.className&&(t.className=this.options.className);let n=Xn(this.options.container);if(this.containerEl=n,window.addEventListener("message",this.handleMessage),n.append(t),this.frame=t,this.fillEnabled()&&this.startFill(),this.phase="loading",this.loadingStateEnabled()){this.ensureContainerPositioned(n),this.renderOverlay(n,"loading");let r=this.options.loadingTimeoutMs??md;r>0&&Number.isFinite(r)&&(this.timeoutTimer=setTimeout(()=>{this.phase==="loading"&&this.showError("timeout")},r))}return t}setDesignerUrl(e){return this.options={...this.options,designerUrl:e},this.mount()}getIframe(){return this.frame}setSizing(e,t){this.options={...this.options,height:e,minHeight:t},this.frame&&(this.stopFill(),this.lastAutoHeight="",this.fillEnabled()?(this.pinned||this.setFrameHeight("100%"),this.startFill()):this.pinned||this.setFrameHeight(`${e}px`))}setRelaunchPolicy(e,t){this.options={...this.options,onRequestRelaunch:e,autoRenewSession:t},this.clearRenewTimer(),this.phase==="ready"&&this.scheduleRenewal(this.sessionExpiresAt)}destroy(){window.removeEventListener("message",this.handleMessage),this.stopFill(),this.unpinFullscreen(),this.clearTimeoutTimer(),this.clearRenewTimer(),this.removeOverlay(),this.restoreContainerStyle(),this.frame?.remove(),this.frame=null,this.containerEl=null,this.fillMode=null,this.designerOrigin="",this.phase="loading",this.identityEstablished=!1,this.sessionExpiresAt=void 0,this.lastAutoHeight=""}loadingStateEnabled(){return this.options.showLoadingState!==!1}autoResizeEnabled(){return this.options.autoResize!==!1}fillEnabled(){return typeof this.options.height!="number"}setFrameHeight(e){this.frame?.style.setProperty("height",e,"important")}detectFillMode(){let e=this.containerEl,t=this.frame;if(this.pinned||!e||!t)return this.fillMode??"viewport";let n=()=>e.getBoundingClientRect().height,r=t.style.getPropertyValue("height"),s=t.style.getPropertyPriority("height");t.style.setProperty("height","0px","important");let o=n();t.style.setProperty("height",`${wd}px`,"important");let a=n();return r?t.style.setProperty("height",r,s):t.style.removeProperty("height"),!(a-o>xd)&&o>=kd?"container":"viewport"}applyFill(){if(!this.frame||this.pinned)return;let e=this.options.minHeight??fd;if(this.fillMode==="container"&&this.containerEl){let r=Math.max(e,Math.round(this.containerEl.getBoundingClientRect().height));this.setFrameHeight(`${r}px`);return}let t=this.frame.getBoundingClientRect().top,n=Math.max(e,Math.round(window.innerHeight-t));this.setFrameHeight(`${n}px`)}syncContainerObserver(){let e=this.fillMode==="container"&&!!this.containerEl&&typeof ResizeObserver<"u";e&&!this.resizeObs?(this.resizeObs=new ResizeObserver(()=>this.scheduleFill()),this.resizeObs.observe(this.containerEl)):!e&&this.resizeObs&&(this.resizeObs.disconnect(),this.resizeObs=null)}startFill(){this.fillMode=this.detectFillMode(),this.syncContainerObserver(),this.applyFill(),!this.fillListening&&(this.fillListening=!0,window.addEventListener("resize",this.scheduleReprobe),window.addEventListener("orientationchange",this.scheduleReprobe),window.addEventListener("scroll",this.scheduleFill,{passive:!0}))}stopFill(){this.fillRaf!==null&&(cancelAnimationFrame(this.fillRaf),this.fillRaf=null),this.reprobeRaf!==null&&(cancelAnimationFrame(this.reprobeRaf),this.reprobeRaf=null),this.resizeObs&&(this.resizeObs.disconnect(),this.resizeObs=null),this.fillListening&&(this.fillListening=!1,window.removeEventListener("resize",this.scheduleReprobe),window.removeEventListener("orientationchange",this.scheduleReprobe),window.removeEventListener("scroll",this.scheduleFill))}pinFullscreen(){if(this.pinned||!this.frame)return;this.pinned=!0,this.frameStyleBeforeFs=this.frame.getAttribute("style");let e={position:"fixed",top:"0",right:"0",bottom:"0",left:"0",width:"100vw",height:"100vh",margin:"0",border:"0","z-index":"2147483000",background:"#101625"};for(let[n,r]of Object.entries(e))this.frame.style.setProperty(n,r,"important");let t=document.documentElement;this.docOverflowBeforeFs=t.style.overflow,t.style.overflow="hidden",document.body&&(this.bodyOverflowBeforeFs=document.body.style.overflow,document.body.style.overflow="hidden"),this.fsKeyHandler=n=>{n.key==="Escape"&&this.unpinFullscreen()},window.addEventListener("keydown",this.fsKeyHandler)}unpinFullscreen(){this.pinned&&(this.pinned=!1,this.frame&&(this.frameStyleBeforeFs===null?this.frame.removeAttribute("style"):this.frame.setAttribute("style",this.frameStyleBeforeFs),this.fillEnabled()?this.applyFill():this.autoResizeEnabled()&&this.lastAutoHeight?this.setFrameHeight(this.lastAutoHeight):typeof this.options.height=="number"&&this.setFrameHeight(`${this.options.height}px`)),this.frameStyleBeforeFs=null,this.docOverflowBeforeFs!==null&&(document.documentElement.style.overflow=this.docOverflowBeforeFs,this.docOverflowBeforeFs=null),this.bodyOverflowBeforeFs!==null&&document.body&&(document.body.style.overflow=this.bodyOverflowBeforeFs,this.bodyOverflowBeforeFs=null),this.fsKeyHandler&&(window.removeEventListener("keydown",this.fsKeyHandler),this.fsKeyHandler=null))}clearTimeoutTimer(){this.timeoutTimer!==null&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)}autoRenewEnabled(){return!!this.options.onRequestRelaunch&&this.options.autoRenewSession!==!1}clearRenewTimer(){this.renewTimer!==null&&(clearTimeout(this.renewTimer),this.renewTimer=null)}scheduleRenewal(e){if(this.clearRenewTimer(),!this.autoRenewEnabled()||typeof e!="number"||!Number.isFinite(e))return;let t=e-Date.now();if(t<=0)return;let n=t<bd?t*yd:t-gd,r=Math.max(vd,n);this.renewTimer=setTimeout(()=>{this.renewTimer=null,this.autoRenewEnabled()&&this.options.onRequestRelaunch()},r)}ensureContainerPositioned(e){getComputedStyle(e).position==="static"&&(this.restoreContainerPosition=e.style.position,e.style.position="relative")}restoreContainerStyle(){if(this.restoreContainerPosition!==null){try{Xn(this.options.container).style.position=this.restoreContainerPosition}catch{}this.restoreContainerPosition=null}}removeOverlay(){this.overlay?.remove(),this.overlay=null}showError(e){if(this.phase="error",this.clearTimeoutTimer(),!this.loadingStateEnabled())return;let t;try{t=Xn(this.options.container)}catch{return}this.renderOverlay(t,"error",e)}handleTryAgain(){if(this.options.onRequestRelaunch){this.options.onRequestRelaunch();return}this.mount()}renderOverlay(e,t,n){this.removeOverlay();let r=document.createElement("div");r.setAttribute("data-seatlayer-designer-overlay",t),r.setAttribute("role",t==="error"?"alert":"status"),r.setAttribute("aria-live","polite"),Object.assign(r.style,{position:"absolute",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",background:"#101625",color:"#e6ebf5",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',zIndex:"2",overflow:"hidden"}),t==="loading"?this.buildSkeleton(r):this.buildErrorCard(r,n??"load"),e.append(r),this.overlay=r}buildSkeleton(e){let t=document.createElement("style");t.textContent=`
2909
+ `;function It(){if(document.getElementById(Gr))return;let i=document.createElement("style");i.id=Gr,i.textContent=Vc+zr+Fr+jr+$r+Vr+kr,document.head.appendChild(i)}async function zi(i,e){let t=i.overlay.productionElements;if(!t?.some(o=>o.contentImageUrl))return i;let n=await Promise.all(t.map(async o=>{if(!o.contentImageUrl)return o;try{let r=await e(o.contentImageUrl);if(!r){let{contentImageUrl:s,...a}=o;return a}return{...o,runtimeContentImageUrl:r}}catch{let{contentImageUrl:r,...s}=o;return s}}));return{...i,overlay:{...i.overlay,productionElements:n}}}async function ji(i,e){if(i)try{let t=await e(i);return t?await(await fetch(t)).arrayBuffer():void 0}catch{return}}var $e=require("@seatlayer/core/view/panoramaDelivery");function Gi(i){let{root:e,source:t,caption:n,real:o,closeLabel:r,dragHint:s,viewFromSeatLabel:a,real360Label:l,previewLabel:c,resolveAsset:d,onClose:p}=i,u=i.chrome??{},h=document.createElement("div");h.className="sl-view sl-mo-zoom",h.setAttribute("role","dialog"),h.setAttribute("aria-label",a),h.innerHTML='<div class="sl-view-head"><span class="sl-view-title"></span><span class="sl-view-cap"></span><button type="button" class="sl-view-x"><svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></button></div><div class="sl-view-pano"><span class="sl-view-badge"></span><span class="sl-view-hint"></span></div>';let f=R=>h.querySelector(R)?.remove();u.title===!1?f(".sl-view-title"):h.querySelector(".sl-view-title").textContent=a,u.caption===!1?f(".sl-view-cap"):h.querySelector(".sl-view-cap").textContent=n,h.querySelector(".sl-view-x").setAttribute("aria-label",r),u.badge===!1?f(".sl-view-badge"):h.querySelector(".sl-view-badge").textContent=o?l:c,h.querySelector(".sl-view-hint").textContent=s,e.appendChild(h);let b=h.querySelector(".sl-view-pano"),k=(0,$e.planPanoramaDelivery)(t,(0,$e.browserPanoramaConstraints)()),S=new AbortController;b.style.backgroundImage=`url(${JSON.stringify(k.initialUrl)})`;let v=()=>{};k.upgradeUrl&&(v=(0,$e.schedulePanoramaUpgrade)(()=>{d(k.upgradeUrl).then(R=>!R||S.signal.aborted?null:(0,$e.loadPanoramaImage)(R,S.signal).then(()=>R)).then(R=>{!R||!h.isConnected||S.signal.aborted||(b.style.backgroundImage=`url(${JSON.stringify(R)})`)}).catch(()=>{})}));let P=70,y=35,H=1,C=b.clientHeight||1,N=b.clientWidth||1,M=-(C*(180/P)*2/2-N/2),A=0,_=()=>{let R=b.clientHeight||1,bt=R*(180/P)*H,Xe=Math.max(0,bt-R),Yt=Math.min(Xe/2,y/180*bt);A=Math.min(Yt,Math.max(-Yt,A)),b.style.backgroundSize=`auto ${bt}px`,b.style.backgroundPosition=`${M}px ${A-Xe/2}px`};_();let D=!1,V=0,ne=0,ee=R=>{D=!0,V=R.clientX,ne=R.clientY,b.classList.add("drag"),b.setPointerCapture?.(R.pointerId)},W=R=>{D&&(M+=R.clientX-V,A+=R.clientY-ne,V=R.clientX,ne=R.clientY,_())},gt=R=>{D=!1,b.classList.remove("drag"),b.releasePointerCapture?.(R.pointerId)},Wt=R=>{R.preventDefault(),H=Math.min(2.4,Math.max(1,H+(R.deltaY<0?.12:-.12))),_()};b.addEventListener("pointerdown",ee),b.addEventListener("pointermove",W),b.addEventListener("pointerup",gt),b.addEventListener("pointercancel",gt),b.addEventListener("wheel",Wt,{passive:!1});let $=h.querySelector(".sl-view-x");$.addEventListener("click",p);let Y=R=>{R.key==="Escape"&&(R.stopPropagation(),p())};return h.addEventListener("keydown",Y),$.focus(),{element:h,dispose(){v(),S.abort(),b.removeEventListener("pointerdown",ee),b.removeEventListener("pointermove",W),b.removeEventListener("pointerup",gt),b.removeEventListener("pointercancel",gt),b.removeEventListener("wheel",Wt),h.removeEventListener("keydown",Y),$.removeEventListener("click",p)}}}function $c(i,e){if(!e)return{targetSeatId:null,previousSeatId:null,nextSeatId:null};let t=i.find(r=>r.id===e);if(!t?.rowId)return{targetSeatId:e,previousSeatId:null,nextSeatId:null};let n=i.filter(r=>r.rowId===t.rowId),o=n.findIndex(r=>r.id===e);return{targetSeatId:e,previousSeatId:o>0?n[o-1].id:null,nextSeatId:o>=0&&o+1<n.length?n[o+1].id:null}}var Ur=6e4,Ui=class{constructor(e){this.buyerView_="map";this.targetSeatId_=null;this.focusedSectionId_=null;this.navigationMode_="orbit";this.overlay=null;this.handle=null;this.generation=0;this.seatViewGeneration=0;this.seatViewElement=null;this.seatViewDispose=null;this.options=e}get buyerView(){return this.buyerView_}get targetSeatId(){return this.targetSeatId_}get focusedSectionId(){return this.focusedSectionId_}get seatPosition(){return $c(this.options.seats(),this.targetSeatId_)}get navigationMode(){return this.navigationMode_}canOffer3D(){return this.options.enable3D?this.handle&&this.overlay?!0:!this.options.doc()||!ki()?!1:this.options.seats().length<=this.max3DSeats():!1}canOfferSeatView(){return this.options.enableSeatView?this.options.seats().some(e=>!!e.viewUrl)?!0:this.hasStage():!1}async setBuyerView(e,t={}){if(e==="map"){this.exit3D();return}if(!this.canOffer3D())throw new Error("venue_3d_unavailable");if(this.buyerView_==="venue3d"&&this.handle){t.flyToSeatId?(this.targetSeatId_=t.flyToSeatId,this.focusedSectionId_=this.findSeat(t.flyToSeatId)?.sectionId??null,this.options.onViewChange(this.buyerView_,this.targetSeatId_),await this.handle.flyToSeat(t.flyToSeatId)):t.resetView&&this.handle.focusOverview();return}if(this.handle&&this.overlay){await this.restore3D(t);return}await this.enter3D(t.flyToSeatId)}async openSeatView(e){if(!this.canOfferSeatView())throw new Error("seat_view_unavailable");let t=this.findSeat(e),n=this.options.host(),o=this.options.doc();if(!t||!n||!o)throw new Error("seat_view_unavailable");let r=++this.seatViewGeneration,s,a,l=!1;if(t.viewUrl){let f=t.viewMeta?.previewUrl,b=!!f&&f!==t.viewUrl,k=b?await this.options.resolveAsset(f):null,S=b?t.viewUrl:await this.options.resolveAsset(t.viewUrl);if(r!==this.seatViewGeneration||!S||b&&!k)return;s={url:S,...k?{previewUrl:k}:{},...b?{resolveUrl:this.options.resolveAsset}:{},...t.viewMeta?.sourceWidth!==void 0?{sourceWidth:t.viewMeta.sourceWidth}:{},...t.viewMeta?.sourceHeight!==void 0?{sourceHeight:t.viewMeta.sourceHeight}:{},...t.viewMeta?.previewWidth!==void 0?{previewWidth:t.viewMeta.previewWidth}:{},...t.viewMeta?.previewHeight!==void 0?{previewHeight:t.viewMeta.previewHeight}:{},...t.viewMeta?.variants?.length?{variants:t.viewMeta.variants}:{},...t.viewMeta?.coverage?{coverage:t.viewMeta.coverage}:{},...t.viewMeta?.capturedAt?{capturedAt:t.viewMeta.capturedAt}:{},...t.viewMeta?.sourceLabel?{sourceLabel:t.viewMeta.sourceLabel}:{}},a=(0,qi.seatViewDisclosure)(s),l=(0,qi.isAuthoredSeatView)(s)}else{if(!this.hasStage())throw new Error("seat_view_unavailable");let{generateSeatPanorama:f}=await Ei();if(r!==this.seatViewGeneration)return;let b=o.floors?.find(v=>v.objects.some(P=>P.type==="row"&&P.id===t.rowId)),k=t.focalPoint??b?.focalPoint??o.focalPoint,S=f(t,k,[...this.options.seats()]);s={url:S.url,generated:!0},a=(0,it.t)("picker.illustrationCaption",{m:S.distanceM})}if(r!==this.seatViewGeneration)return;this.closeSeatView(!1),this.prepareHostTheme(n,o),It();let c=this.options.chrome??{},d=Qe(),p=(0,it.t)("picker.viewFromSeat",{label:t.displayLabel||t.label}),u=l?(0,it.t)("picker.real360"):(0,it.t)("picker.preview"),h=Gi({root:n,source:s,caption:a,real:l,closeLabel:g("picker.close","Close"),dragHint:d,viewFromSeatLabel:p,real360Label:(0,it.t)("picker.real360"),previewLabel:(0,it.t)("picker.preview"),chrome:{title:c.seatViewTitle,caption:c.seatViewCaption,badge:c.seatViewBadge},resolveAsset:this.options.resolveAsset,onClose:()=>this.closeSeatView(!0,!0)});this.seatViewElement=h.element,this.seatViewDispose=h.dispose,this.options.onSeatViewChange?.({seatId:t.id,title:p,caption:a,badge:u,real:l,generated:!!s.generated,dragHint:d})}pushLiveState(){this.handle&&(this.handle.setAvailability(this.options.seats().map(e=>({seatId:e.id,state:this.seatState(e)}))),this.handle.setSelection(this.options.selection().map(e=>e.id)))}focusOverview(){return this.buyerView_!=="venue3d"||!this.handle?!1:(this.handle.focusOverview(),!0)}focusSection(e){return this.buyerView_==="venue3d"?this.handle?.focusSection(e)??!1:!1}focusFloor(e){let t=this.options.doc();if(this.buyerView_!=="venue3d"||!this.handle||!t?.floors?.length)return!1;let n=t.floors.findIndex(o=>o.id===e);return n>=0&&this.handle.focusFloor(n)}zoomIn(){return this.buyerView_!=="venue3d"||!this.handle?!1:(this.handle.zoomIn(),!0)}zoomOut(){return this.buyerView_!=="venue3d"||!this.handle?!1:(this.handle.zoomOut(),!0)}setNavigationMode(e){return this.navigationMode_=e,this.buyerView_!=="venue3d"||!this.handle?!1:(this.handle.setNavigationMode(e),this.options.onViewChange(this.buyerView_,this.targetSeatId_),!0)}destroy(){this.generation+=1,this.closeSeatView(!0,!1);try{this.handle?.dispose()}catch{}this.handle=null,this.overlay?.remove(),this.overlay=null,this.buyerView_="map",this.targetSeatId_=null,this.focusedSectionId_=null}max3DSeats(){let e=this.options.max3DSeats;if(typeof e=="number"&&e>0)return e;let t=globalThis.navigator;return(t?.hardwareConcurrency??8)<=4||(t?.deviceMemory??8)<=4||(globalThis.matchMedia?.("(pointer: coarse)").matches??!1)?Ur/2:Ur}async enter3D(e){let t=this.options.host(),n=this.options.doc();if(!t||!n||this.overlay)throw new Error("venue_3d_unavailable");It(),this.prepareHostTheme(t,n);let o=document.createElement("div");o.className="sl-view3d",o.setAttribute("role","group"),o.setAttribute("aria-label",g("picker.interactive3dVenueView","Interactive 3D venue view")),Object.assign(o.style,{position:"absolute",inset:"0",zIndex:"4",opacity:"0",touchAction:"none",transition:this.reducedMotion()?"none":"opacity 260ms cubic-bezier(.2,.8,.2,1)",background:"radial-gradient(120% 120% at 50% 0%,#191f28 0%,#0d1014 70%)"});let r=document.createElement("div");r.className="sl-view3d-loading",r.setAttribute("role","status"),r.setAttribute("aria-live","polite"),r.textContent=g("picker.loading3d","Building the 3D venue\u2026"),o.appendChild(r),t.appendChild(o),this.overlay=o;let s=++this.generation;if(this.reducedMotion()?o.style.opacity="1":requestAnimationFrame(()=>{o.style.opacity="1"}),await this.nextPaint(),!(s!==this.generation||this.overlay!==o))try{let[a,l]=await Promise.all([Zt(),this.options.loadEventConfiguration()]),c=l?await zi(l,this.options.resolveAsset):null,d=await ji(n.theme?.venue3d?.shellAssetUrl,this.options.resolveAsset);if(s!==this.generation||this.overlay!==o)return;let p={doc:n,seats:[...this.options.seats()],...c?{eventConfigurationId:c.id,eventConfiguration:c}:{},...d?{registeredShellGlb:d}:{}};r.textContent=g("picker.building3d","Building venue geometry\u2026");let u=await a.prepareVenue3D(p);if(s!==this.generation||this.overlay!==o)return;let h=this.options.chrome??{},f=a.mountVenue3D(o,{...p,prepared:u},{portraitOverviewCrop:!0,arriveAtSeatEye:!0,lookAroundHint:Qe(),navLabels:Si(),...h.view3dCaption===!1||h.view3dSeatStepper===!1||h.view3dControlDock===!1?{chrome:{caption:h.view3dCaption!==!1,seatStepper:h.view3dSeatStepper!==!1,controlDock:h.view3dControlDock!==!1}}:{},seatViewActionLabel:b=>this.findSeat(b)?.viewUrl?g("picker.openAuthored360","Open venue 360\xB0"):g("picker.lookAroundLive3d","Look around in live 3D"),onSeatPick:b=>this.toggleSeat(b),onSeatInspect:b=>this.toggleSeat(b),onViewTargetChange:b=>{this.targetSeatId_=b,b&&(this.focusedSectionId_=this.findSeat(b)?.sectionId??null),this.options.onViewChange("venue3d",b)},onSectionFocusChange:b=>{this.focusedSectionId_=b,this.options.onViewChange("venue3d",this.targetSeatId_)},...this.options.enableSeatView?{getSeatView:b=>this.seatViewFor3D(b)}:{}});if(s!==this.generation||this.overlay!==o){f.dispose();return}this.handle=f,this.buyerView_="venue3d",this.targetSeatId_=e??null,this.focusedSectionId_=e?this.findSeat(e)?.sectionId??null:null,f.setNavigationMode(this.navigationMode_),requestAnimationFrame(()=>r.remove()),this.pushLiveState(),this.options.onViewChange("venue3d",this.targetSeatId_),e&&await f.flyToSeat(e)}catch(a){if(s!==this.generation)return;throw this.options.onError?.(a),this.remove3DOverlay(!1),a}}exit3D(){this.buyerView_==="map"&&!this.overlay||(this.generation+=1,this.buyerView_="map",this.targetSeatId_=null,this.focusedSectionId_=null,this.remove3DOverlay(!0,!!this.handle),this.options.onViewChange("map",null))}remove3DOverlay(e,t=!1){let n=this.handle,o=this.overlay;if(this.options.restoreMap(),t&&n&&o){o.style.pointerEvents="none";let r=()=>{this.buyerView_!=="map"||this.overlay!==o||(o.style.visibility="hidden",this.options.restoreMap())};!e||this.reducedMotion()?(o.style.opacity="0",r()):(requestAnimationFrame(()=>{o.style.opacity="0"}),setTimeout(r,280));return}if(this.handle=null,this.overlay=null,!o){try{n?.dispose()}catch{}this.options.restoreMap();return}if(!e||this.reducedMotion()){try{n?.dispose()}catch{}o.remove(),this.options.restoreMap();return}o.style.pointerEvents="none",requestAnimationFrame(()=>{o.style.opacity="0"}),setTimeout(()=>{try{n?.dispose()}catch{}o.remove(),this.options.restoreMap()},280)}async restore3D(e){let t=this.overlay,n=this.handle;if(!t||!n)throw new Error("venue_3d_unavailable");this.buyerView_="venue3d",this.targetSeatId_=e.flyToSeatId??null,this.focusedSectionId_=e.flyToSeatId?this.findSeat(e.flyToSeatId)?.sectionId??null:null,t.style.visibility="visible",t.style.pointerEvents="auto",this.reducedMotion()?t.style.opacity="1":requestAnimationFrame(()=>{t.style.opacity="1"}),n.resize(),n.setNavigationMode(this.navigationMode_),this.pushLiveState(),this.options.onViewChange("venue3d",this.targetSeatId_),e.flyToSeatId?await n.flyToSeat(e.flyToSeatId):e.resetView&&n.focusOverview()}nextPaint(){return this.reducedMotion()||typeof requestAnimationFrame!="function"?Promise.resolve():new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))})}toggleSeat(e){if(!this.findSeat(e))return;this.options.selection().some(o=>o.id===e)?this.options.deselect(e):this.options.status(e)==="free"&&this.options.select(e),this.pushLiveState()}seatState(e){switch(this.options.status(e.id)){case"held":return"held";case"booked":return"sold";case"not_for_sale":return"dimmed";default:return"available"}}async seatViewFor3D(e){let t=this.findSeat(e);if(!t)throw new Error("seat_view_unavailable");if(t.viewUrl){let n=t.viewMeta?.previewUrl,o=!!n&&n!==t.viewUrl,r=o?await this.options.resolveAsset(n):null,s=o?t.viewUrl:await this.options.resolveAsset(t.viewUrl);if(!s||o&&!r)throw new Error("seat_view_unavailable");return{url:s,...r?{previewUrl:r}:{},...o?{resolveUrl:this.options.resolveAsset}:{},...t.viewMeta?.variants?.length?{variants:t.viewMeta.variants}:{},...t.viewMeta?.initialBearingDeg!==void 0?{initialBearingDeg:t.viewMeta.initialBearingDeg}:{},...t.viewMeta?.initialPitchDeg!==void 0?{initialPitchDeg:t.viewMeta.initialPitchDeg}:{},...t.viewMeta?.coverage?{coverage:t.viewMeta.coverage}:{},...t.viewMeta?.capturedAt?{capturedAt:t.viewMeta.capturedAt}:{},...t.viewMeta?.sourceLabel?{sourceLabel:t.viewMeta.sourceLabel}:{}}}return{url:"",generated:!0,mediaKind:"model",coverage:"exact-seat",sourceLabel:g("picker.chartDerivedModel","Chart-derived model")}}closeSeatView(e=!0,t=!1){e&&(this.seatViewGeneration+=1);let n=this.seatViewElement;if(this.seatViewDispose?.(),this.seatViewDispose=null,this.seatViewElement=null,!!n){if(this.options.onSeatViewChange?.(null),!t||this.reducedMotion()){n.remove();return}n.classList.add("is-leaving"),setTimeout(()=>n.remove(),190)}}findSeat(e){return this.options.seats().find(t=>t.id===e||t.label===e)}hasStage(){let e=this.options.doc();return e?(e.floors?.flatMap(n=>n.objects)??e.objects).some(n=>n.type==="shape"&&(n.role==="stage"||!!n.stageKind)):!1}prepareHostTheme(e,t){getComputedStyle(e).position==="static"&&(e.style.position="relative");let n=t.theme;e.style.setProperty("--sl-bg",n?.background??"#f6f7fb"),e.style.setProperty("--sl-surface","#ffffff"),e.style.setProperty("--sl-text",n?.textColor??"#10162a"),e.style.setProperty("--sl-muted","#697386"),e.style.setProperty("--sl-line","#d9deea"),e.style.setProperty("--sl-accent",n?.accent??"#ef4056"),e.style.setProperty("--sl-accent-ink",n?.accentInk??"#ffffff")}reducedMotion(){return globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}};var zc={host:"web",platform:"web",bundle:"",protocol:0,chromeOwner:"web"},jc={...zc},Ki=null,qr=null;function Gc(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():0}function Uc(){let i=e=>Math.max(0,Math.round(e*100)/100);return{bootMs:i(Gc()),documentMs:Ki==null?0:i(Ki),handshakeMs:Ki==null||qr==null?0:i(qr-Ki)}}function Kr(){let{host:i,platform:e,bundle:t,protocol:n,chromeOwner:o}=jc,r=Uc();return{host:i,platform:e,...t?{bundle:t}:{},...n?{protocol:n}:{},chromeOwner:o,bootMs:r.bootMs,documentMs:r.documentMs,handshakeMs:r.handshakeMs}}var Wr=new Set;function ze(i){return Wr.has(i)?"repeat":"cold"}function Wi(i){let e=ze(i);return Wr.add(i),e}function fe(i){return typeof i=="number"&&Number.isFinite(i)&&i>=0?Math.round(i):0}function qc(){return typeof location>"u"?!1:/^(localhost|127\.0\.0\.1|\[::1\])$/i.test(location.hostname)}function Kc(i){if(!/^[A-Za-z0-9_-]{1,80}$/.test(i.event))return null;let e=i.performanceProfile??{};return{event:i.event,scope:i.scope,surface:i.surface,outcome:i.outcome,stage:i.stage?.slice(0,32)??"",ms:fe(i.ms),api:fe(e.loadChartAndStatuses)||fe(e.loadChart),scene:fe(e.buildScene),panel:fe(e.buildBuyerControls),paint:fe(e.firstPaint),normalize:fe(e.normalizeBuyerModel),renderer:fe(e.createRenderer),seats:fe(i.seats),floors:fe(i.floors),view:i.view??"map",load:i.load??ze(i.event),transport:i.transport??"pubapi",chartBytes:fe(i.chartDelivery?.bytes),chartCache:i.chartDelivery?.cache??"",...Kr(),availabilityMs:fe(e.loadStatuses)}}var Wc=new Set;function Re(i){let e=Kc(i);if(e){for(let t of Wc)try{t(e)}catch{}typeof fetch>"u"||qc()||fetch(`${i.apiBase.replace(/\/+$/,"")}/pub/telemetry/chart-load`,{method:"POST",headers:{"Content-Type":"application/json","X-SeatLayer-Client":"1"},body:JSON.stringify(e),credentials:"omit",keepalive:!0}).catch(()=>{})}}function Yi(i){if(!i)return null;let e=i.getBoundingClientRect();return e.width>0&&e.height>0?e:null}function Yc(i){return Yi(i.foot?.querySelector(".sl-total"))??Yi(i.tray)??Yi(i.sheetHead)}function Un(i,e,t,n){let o=i,r=o.map;if(!r||!e)return;let s=r.getBoundingClientRect(),a={x:s.left+e.x,y:s.top+e.y},l=t.displayLabel??t.label,c=n?.find(p=>p.key===t.categoryKey)?.color,d=()=>{let p=Yc(o);p&&Ar({from:a,to:{x:p.left+p.width/2,y:p.top+p.height/2},label:l,color:c})};o.sheetHead&&Yi(o.sheetHead)?requestAnimationFrame(d):d()}var Gn=60,Xc=650;function Yr(i,e){if(!e.length||i.focusSeats?.(e.map(o=>o.id)))return;let t=e.find(o=>o.sectionId)?.sectionId;if(!t)return;let n=e.filter(o=>o.sectionId===t);i.focus(t,{x:n.reduce((o,r)=>o+r.x,0)/n.length,y:n.reduce((o,r)=>o+r.y,0)/n.length})}function Xr(i,e){let t=!Di();Yr({focusSeats:n=>i.focusSeats?.(n,{animate:t})===!0,focus:(n,o)=>i.focusSection(n,o)},(e?.items??[]).filter(n=>n.objectType!=="ga").slice(0,10).map(n=>i.seatByLabel(n.label)).filter(n=>!!n))}function Zr(i,e){if(!e.length)return;let t=i.reducedMotion===!0;t||e.forEach((s,a)=>{i.schedule(()=>i.pop(s.id),a*Gn)});let n=t?0:e.length*Gn,o=e.find(s=>s.sectionId)?.sectionId;if(i.schedule(()=>Yr(i,e),n),t)return;let r=n+(i.focusSeats||o?Xc:0);e.forEach((s,a)=>{i.schedule(()=>Un(i.regions,i.screenPoint(s),s,i.categories),r+a*Gn)})}function Zc(i,e,t){for(let n of i)if(e>=n.x&&t>=n.y&&e<=n.x+n.w&&t<=n.y+n.h)return!0;return!1}var Xi=class{constructor(){this.rects=[];this.host=null;this.pointers=new Set;this.touches=new Set;this.mouseDown=!1;this.onPointerDown=e=>{this.inside(e.clientX,e.clientY)&&(this.pointers.add(e.pointerId),this.swallow(e))};this.onPointerFollow=e=>{this.pointers.has(e.pointerId)&&this.swallow(e)};this.onPointerEnd=e=>{this.pointers.delete(e.pointerId)&&this.swallow(e)};this.onTouchStart=e=>{let t=this.changed(e);if(!t.length)return;let n=!0;for(let o of t)this.inside(o.clientX,o.clientY)?this.touches.add(o.identifier):n=!1;n&&this.swallow(e)};this.onTouchFollow=e=>{let t=this.changed(e);t.length&&t.every(n=>this.touches.has(n.identifier))&&this.swallow(e)};this.onTouchEnd=e=>{let t=this.changed(e);if(!t.length)return;let n=t.every(o=>this.touches.has(o.identifier));for(let o of t)this.touches.delete(o.identifier);n&&this.swallow(e)};this.onMouseDown=e=>{this.inside(e.clientX,e.clientY)&&(this.mouseDown=!0,this.swallow(e))};this.onMouseFollow=e=>{this.mouseDown&&this.swallow(e)};this.onMouseUp=e=>{this.mouseDown&&(this.mouseDown=!1,this.swallow(e))};this.onClick=e=>{this.inside(e.clientX,e.clientY)&&this.swallow(e)}}set(e){this.rects=e.map(t=>({x:t.x,y:t.y,w:t.w,h:t.h})),this.rects.length||(this.pointers.clear(),this.touches.clear(),this.mouseDown=!1)}get(){return this.rects}attach(e){if(this.host===e)return;this.detach(),this.host=e;let t={capture:!0,passive:!1};e.addEventListener("pointerdown",this.onPointerDown,t),e.addEventListener("pointermove",this.onPointerFollow,t),e.addEventListener("pointerup",this.onPointerEnd,t),e.addEventListener("pointercancel",this.onPointerEnd,t),e.addEventListener("touchstart",this.onTouchStart,t),e.addEventListener("touchmove",this.onTouchFollow,t),e.addEventListener("touchend",this.onTouchEnd,t),e.addEventListener("touchcancel",this.onTouchEnd,t),e.addEventListener("mousedown",this.onMouseDown,t),e.addEventListener("mousemove",this.onMouseFollow,t),e.addEventListener("mouseup",this.onMouseUp,t),e.addEventListener("click",this.onClick,t),e.addEventListener("dblclick",this.onClick,t)}detach(){let e=this.host;if(!e)return;let t={capture:!0};e.removeEventListener("pointerdown",this.onPointerDown,t),e.removeEventListener("pointermove",this.onPointerFollow,t),e.removeEventListener("pointerup",this.onPointerEnd,t),e.removeEventListener("pointercancel",this.onPointerEnd,t),e.removeEventListener("touchstart",this.onTouchStart,t),e.removeEventListener("touchmove",this.onTouchFollow,t),e.removeEventListener("touchend",this.onTouchEnd,t),e.removeEventListener("touchcancel",this.onTouchEnd,t),e.removeEventListener("mousedown",this.onMouseDown,t),e.removeEventListener("mousemove",this.onMouseFollow,t),e.removeEventListener("mouseup",this.onMouseUp,t),e.removeEventListener("click",this.onClick,t),e.removeEventListener("dblclick",this.onClick,t),this.host=null,this.pointers.clear(),this.touches.clear(),this.mouseDown=!1}inside(e,t){if(!this.rects.length||!this.host)return!1;let n=this.host.getBoundingClientRect();return Zc(this.rects,e-n.left,t-n.top)}swallow(e){e.stopImmediatePropagation(),e.stopPropagation(),e.cancelable&&e.preventDefault()}changed(e){let t=e.changedTouches;return t?Array.from(t):[]}},Qr=.48,Qc=8;function Jc(i,e,t,n=Qr){let o=Math.max(0,t.top),r=e.height-Math.max(0,t.bottom);if(!(r>o))return 0;let s=Number.isFinite(n)?Math.min(1,Math.max(0,n)):Qr,a=o+(r-o)*s-i;return Math.abs(a)<=Qc?0:Math.round(a)}function Jr(i,e,t={}){let n=i.gestureCount();if(t.gestures!==void 0&&t.gestures!==n)return{dy:0,gestures:n};let o=i.seatPoint(e);if(!o)return{dy:0,gestures:n};let r=Jc(o.y,{height:i.mapHeight()},i.insets(),t.fraction);return r?{dy:i.panScreenBy({x:0,y:r},t.animate!==!1)?r:0,gestures:n}:{dy:0,gestures:n}}var oi=class i{constructor(e,t=null){this.seams=e;this.watch=null;this.mode=t,this.watchMode()}themeMode(){return this.mode}setThemeMode(e,t){let n=t!==void 0&&"mapTheme"in t;e===this.mode&&!n||(n&&this.seams.setHostMapTheme(t.mapTheme??void 0),this.mode=e,this.watchMode(),this.applyThemeMode())}static groundFor(e){return kt(null,e)}applyThemeMode(){let e=this.seams.mapTheme()??i.groundFor(this.mode);this.seams.applyMapTheme(e??null)&&this.seams.changed()}watchMode(){this.watch?.(),this.watch=null,this.mode==="auto"&&(this.watch=Ri(()=>this.applyThemeMode()))}setViewportInsets(e){this.seams.applyViewportInsets(e),this.seams.changed()}viewportInsets(){return this.seams.readViewportInsets()}dispose(){this.watch?.(),this.watch=null}};var ts=require("@seatlayer/core"),is=require("@seatlayer/core/core/seatConfidence");var es=require("@seatlayer/core");function Ot(i){let e=i.viewMeta?.previewUrl??i.viewUrl;return e&&(jn(e)||wt(e))?e:null}function Qi(i){if(!i)return!1;let e=i.floors?.length?i.floors.map(t=>t.objects??[]):[i.objects??[]];for(let t of e)for(let n of t)if(n.type==="shape"&&(n.role==="stage"||n.stageKind))return!0;return!1}var ed=512,Zi=new Map;function Ji(i,e){if(!e)return null;let t=`${i.id}|${Math.round(e.x)},${Math.round(e.y)}`,n=Zi.get(t);if(n!==void 0)return n;let o=null;try{o=(0,es.generateSeatThumb)(i,e).distanceM??null}catch{o=null}return Zi.size>=ed&&Zi.clear(),Zi.set(t,o),o}function ri(i){return i.getFocusedSection()!==null||i.seatsRevealed()}function td(i){let e=i.atVenueFit?.(),t=i.canZoomIn?.();return{...typeof e=="boolean"?{atVenueFit:e}:{},...typeof t=="boolean"?{canZoomIn:t}:{}}}function id(i,e){return{accessibilityFilter:i.length>0,limitedViewFilter:e.some(t=>t.commercial?.restrictedView||t.commercial?.obstructedView)}}function nd(i,e,t,n){for(let o of e){if(o.count<=0)continue;let r=i.accessibilitySpread?.([o.key]);for(let s of r?.sections??[]){let a=t.get(s.id)??n.get(s.id);if(!a||s.free<=0)continue;let l=a.accessibleFree??(a.accessibleFree={});l[o.key]=s.free}}}function ns(i,e,t){let n=i.doc,o=n?.theme??{},r=i.categoryAvailability(),s=i.getGAAreas(),a=i.getFloors(),l=i.getExpandedSeats(),c=i.getAccessNeeds(),d=id(c,l),p=e.seatPosition,u=p.targetSeatId?i.seatDetails(p.targetSeatId):null,h=new Map(l.map(v=>[v.id,v])),f=Qi(n),b=n?.floors?.flatMap(v=>v.objects)??n?.objects??[],k=new Map,S=new Map;for(let v of b){if(v.type!=="section")continue;let P={id:v.id,label:v.label,...v.displayLabel?{displayLabel:v.displayLabel}:{},...v.zone?{zoneId:v.zone}:{}};k.set(v.id,P);let y=v.logicalSectionId??v.id;S.has(y)||S.set(y,P)}return nd(i,c,k,S),{event:{key:t.event,name:t.eventInfo?.name??n?.name??t.event,venue:t.eventInfo?.venue??null,startsAt:t.eventInfo?.startsAt??null,timezone:t.eventInfo?.timezone??null,currency:t.eventInfo?.currency??t.currency??"USD",locale:(0,ts.getLocale)()||t.eventLocale,posterUrl:t.eventInfo?.posterUrl??null,mode:t.mode_??"live",salesClosed:t.eventInfo?.salesClosed??!1},branding:{...o.accent?{accent:o.accent}:{},...o.accentInk?{accentInk:o.accentInk}:{},...o.background?{background:o.background}:{},...o.textColor?{textColor:o.textColor}:{},...o.brandName?{brandName:o.brandName}:{},...o.logoUrl?{logoUrl:o.logoUrl}:{},attributionRequired:!o.hideBadge},features:{ga:s.length>0,tiers:!!n?.categories.some(v=>v.tiers?.length),floors:a.length>1,zones:!!n?.zones?.length,sections:k.size>0,bestAvailable:!0,...d,venue3d:e.canOffer3D(),seatView:e.canOfferSeatView()},catalog:{categories:(n?.categories??[]).filter(v=>!v.notForSale).map(v=>({key:v.key,label:v.label,color:v.color,price:v.price??v.tiers?.[0]?.price??0,available:r[v.key]??0,...Object.prototype.hasOwnProperty.call(r,v.key)?{free:r[v.key]}:{},tiers:(v.tiers??[]).map(P=>({id:P.id,name:P.name,price:P.price,...P.currency?{currency:P.currency}:{}}))})),zones:(n?.zones??[]).map(v=>({id:v.id,label:v.label,...v.color?{color:v.color}:{}})),sections:[...k.values()],gaAreas:s,bestAvailableZones:i.getBestAvailableZones()},map:{floors:a,activeFloorId:i.getActiveFloorId()||a[0]?.id||null,floorMode:i.isFloorOverview()?"all":"single",floorLabelStyle:i.getRenderer()?.getFloorLabelStyle?.()??"number",rung:i.getRung(),canZoomOut:ri(i)||t.focusedSection_!==null,...td(i),focusedSectionId:i.getFocusedSection(),focusedSection:t.focusedSection_,viewMode:i.getViewMode(),buyerView:e.buyerView,view3dTargetSeatId:p.targetSeatId,view3dTargetSeat:u,view3dPreviousSeatId:p.previousSeatId,view3dNextSeatId:p.nextSeatId,view3dFocusedSectionId:e.focusedSectionId,view3dNavigationMode:e.navigationMode,colorblindSafe:t.colorblindSafe_,viewportInsets:i.getViewportInsets(),categoryFilter:t.categoryFilter_?[...t.categoryFilter_]:null,accessibilityFilter:t.accessibilityFilter_?[...t.accessibilityFilter_]:null,hideLimitedView:t.hideLimitedView_,accessNeeds:c},selection:{seats:i.getSelection().map(v=>{let P=h.get(v.id);if(!P)return v;let y=i.worldToScreen({x:P.x,y:P.y}),H=Ot(P),C=f?Ji(P,P.focalPoint??n?.focalPoint):null;return{...v,screenPoint:{x:y.x,y:y.y},...H?{seatViewThumb:{reference:H,kind:"real"}}:{},...C!=null?{sightlineMetres:C}:{},...P.confidenceEvidence?{seatViewConfidence:(0,is.seatConfidenceDisclosure)(P.confidenceEvidence)}:{}}}),validity:i.getSelectionValidity(),maxSelection:t.maxSelection_},access:{...t.accessState_}}}var od="https://api.seatlayer.io",os=10;function rd(i){if(typeof i=="string"){let e=document.querySelector(i);if(!e)throw new Error(`seatmap: container "${i}" not found`);return e}if(!(i instanceof HTMLElement))throw new Error("seatmap: container must be a CSS selector or an HTMLElement");return i}var en=class{constructor(e){this.mount=null;this.hostEl=null;this.interactionEnabled_=!0;this.eventLocale=null;this.localeGeneration=0;this.languageSelect=null;this.rendered=!1;this.mode_=null;this.eventInfo=null;this.categoryFilter_=null;this.accessibilityFilter_=null;this.hideLimitedView_=!1;this.focusedSection_=null;this.lastReportedViewRung_=null;this.lastReportedCanZoomOut_=!1;this.tipEl=null;this.tipPos={x:0,y:0};this.onTipMove=null;this.blockedRegions=null;this.realtime=null;this.holdingLabels=new Set;if(!e||typeof e!="object")throw new Error("seatmap: options object is required");if(!e.container)throw new Error("seatmap: `container` is required");if(!e.event||typeof e.event!="string")throw new Error("seatmap: `event` key is required");this.opts=e,this.maxSelection_=e.maxSelection??os,this.colorblindSafe_=e.colorblindSafe??!1;let t=!!(e.buyerAccessTokenProvider||e.buyerAccessToken||e.publicKey);this.accessState_={configured:t,status:t?"ready":"public"},this.publicKey=e.publicKey;let n={onExpired:a=>{this.accessState_={configured:!0,status:a.refreshed?"ready":"expired"},this.opts.onAccessExpired?.(a),this.notifyMapStateChange()},onUnavailable:a=>{this.accessState_={configured:!0,status:"unavailable",reason:a.reason},this.opts.onAccessUnavailable?.(a),this.notifyMapStateChange()}},o=(e.apiBase??od).replace(/\/+$/,"");this.apiBase=o;let r=e.publicKey&&!e.buyerAccessTokenProvider&&!e.buyerAccessToken?Ni({base:o,event:e.event,publicKey:e.publicKey,accessHooks:n,apiOptions:{onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)}}):null;this.access=r?.access??Lt(e,n);let s=r?.api??new Be(o,{access:this.access??void 0,onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)});this.api=s,this.controller=new j.PickerController({transport:s,eventKey:e.event,maxSelection:this.maxSelection_,selectedObjects:e.selectedObjects,selectableObjects:e.selectableObjects,numberOfPlacesToSelect:e.numberOfPlacesToSelect,selectionValidators:e.selectionValidators,currency:e.currency,onSelectionChange:a=>{this.immersive?.pushLiveState(),this.opts.onSelectionChange?.(a)},onSelectionValidityChange:a=>this.opts.onSelectionValidityChange?.(a),onSelectionValid:a=>this.opts.onSelectionValid?.(a),onSelectionInvalid:a=>this.opts.onSelectionInvalid?.(a),onDeselect:a=>{this.controller.currentHold()?.labels.includes(a.label)&&this.controller.releaseLabels([a.label])},retapKeepsSelection:!0,onSeatRetap:a=>this.opts.onSeatRetap?.(a),onSelectionLimit:a=>this.opts.onSelectionLimit?.(a),onHold:a=>this.opts.onHold?.({holdId:a.holdId,expiresAt:a.expiresAt,seats:a.seats,items:a.items}),onHoldRestored:a=>this.opts.onHoldRestored?.({holdId:a.holdId,expiresAt:a.expiresAt,seats:a.seats,items:a.items}),onHoldExpired:()=>this.opts.onHoldExpired?.(),onGAClick:a=>{let l=this.controller.getGAAreas().find(c=>c.id===a);l&&(this.opts.onGAClick?.(l),this.opts.onGAPrompt?.({area:l,selected:{},min:0,max:Math.max(0,Math.min(l.available,(this.opts.maxSelection??os)-this.controller.getSelection().length)),tiers:Vi(l),confirm:c=>{let d=typeof c=="number"?c:Object.values(c).reduce((p,u)=>p+u,0);this.holdGA(l.id,d)},cancel:()=>{}}))},onError:a=>this.opts.onError?.(a),onDeckTap:a=>{this.opts.onDeckTap?.(a),this.notifyMapStateChange()},onHint:a=>this.opts.onHint?.(a),onSectionFocus:a=>{this.focusedSection_=a,this.opts.onSectionFocus?.(a),this.notifyMapStateChange()},onViewChange:()=>this.handleViewChange(),onStatusChange:()=>{this.immersive?.pushLiveState(),this.opts.onStatusChange?.()},onSalesClosed:()=>{this.eventInfo&&(this.eventInfo.salesClosed=!0),this.opts.onSalesClosed?.()},flashOnLiveChange:!0,onSeatHover:a=>{this.opts.onSeatHover?.(a),this.opts.seatTooltip!==!1&&this.updateTooltip(a)},colorblindSafe:e.colorblindSafe,mapTheme:e.mapTheme??oi.groundFor(e.theme?.mode)??null}),this.hostSurface=new oi({mapTheme:()=>this.opts.mapTheme,setHostMapTheme:a=>{this.opts.mapTheme=a},applyMapTheme:a=>this.controller.setMapTheme(a),applyViewportInsets:a=>this.controller.setViewportInsets(a),readViewportInsets:()=>this.controller.getViewportInsets(),changed:()=>this.notifyMapStateChange()},e.theme?.mode??null),this.buyerAssetUrls=new Rt(e.event,(a,l)=>s.asset(a,l)),this.immersive=new Ui({host:()=>this.hostEl,doc:()=>this.controller.doc,seats:()=>this.controller.getExpandedSeats(),selection:()=>this.controller.getSelection(),status:a=>this.controller.getStatus(a),select:a=>this.controller.select([a]),deselect:a=>this.controller.deselect([a]),loadEventConfiguration:()=>this.controller.loadEventConfiguration(),resolveAsset:a=>this.buyerAssetUrls.resolve(a),enable3D:e.enable3D!==!1,enableSeatView:e.enableSeatView!==!1,max3DSeats:e.max3DSeats,...e.chrome?{chrome:e.chrome}:{},restoreMap:()=>this.controller.refitCurrentView(),onViewChange:(a,l)=>{this.opts.onBuyerViewChange?.({view:a,...l?{seatId:l}:{}}),this.notifyMapStateChange()},onSeatViewChange:a=>this.opts.onSeatViewChange?.(a),onError:a=>this.opts.onError?.(a)}),this.lastReportedViewRung_=this.controller.getRung(),this.lastReportedCanZoomOut_=ri(this.controller)}handleViewChange(){this.opts.onViewChange?.();let e=this.controller.getRung(),t=ri(this.controller);e===this.lastReportedViewRung_&&t===this.lastReportedCanZoomOut_||(this.lastReportedViewRung_=e,this.lastReportedCanZoomOut_=t,this.opts.onMapStateChange?.())}notifyMapStateChange(){this.lastReportedViewRung_=this.controller.getRung(),this.lastReportedCanZoomOut_=ri(this.controller),this.opts.onMapStateChange?.()}async render(){if(this.rendered)return this;let e=performance.now();this.rendered=!0;let t=Ii(this.opts.locale,this.opts.messages),n=this.localeGeneration+=1,o=(0,j.getLocale)();this.mount=rd(this.opts.container);let r=document.createElement("div");r.style.width="100%",r.style.height="100%",r.style.position="relative",this.mount.appendChild(r),this.hostEl=r,this.blockedRegions?.attach(r),Oi(r,t,a=>{a!==o&&this.applyActiveLocale(a,n)}),this.applyInteractionState();let s=await this.controller.render(r);if(!s)return Re({apiBase:this.apiBase,event:this.opts.event,scope:"event",surface:"seating_chart",outcome:"failure",stage:"load_chart",ms:performance.now()-e,load:ze(this.opts.event),transport:"pubapi"}),this.rendered=!1,this.opts.errorDisplay!=="none"&&this.showLoadFailure(r),this;if(this.eventLocale=s.locale??null,!this.opts.locale&&this.eventLocale&&this.setLocale(this.eventLocale),this.buildLanguageSwitcher(r),this.controller.setViewMode(this.opts.initialView??"flat"),this.opts.floorLabelStyle&&this.setFloorLabelStyle(this.opts.floorLabelStyle),this.startRealtime(),this.mode_=s.mode==="test"?"test":"live",this.eventInfo={name:s.eventName,venue:s.venue??null,startsAt:s.startsAt??null,timezone:s.timezone??null,currency:s.currency??this.opts.currency??"USD",posterUrl:s.posterUrl??null,salesClosed:s.salesClosed},this.opts.seatTooltip!==!1){let a=document.createElement("div");a.setAttribute("role","tooltip"),a.style.cssText='position:absolute;z-index:7;pointer-events:none;display:none;max-width:240px;background:#10162a;color:#fff;border-radius:10px;padding:9px 12px;font:500 12px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 10px 30px -10px rgba(0,0,0,.5);',r.appendChild(a),this.tipEl=a,this.onTipMove=l=>{let c=r.getBoundingClientRect();this.tipPos={x:l.clientX-c.left,y:l.clientY-c.top},this.tipEl&&this.tipEl.style.display!=="none"&&this.placeTooltip()},r.addEventListener("mousemove",this.onTipMove)}if(s.mode==="test"&&this.opts.showTestModeIndicator!==!1){r.style.overflow="hidden";let a=document.createElement("div");a.dataset.slI18n="testMode",a.textContent=(0,j.t)("picker.testMode"),a.setAttribute("aria-label",(0,j.t)("picker.testMode")),a.style.cssText="position:absolute;top:18px;right:-34px;z-index:6;transform:rotate(45deg);width:140px;text-align:center;padding:4px 0;background:#f4b740;color:#1a1200;font:800 10.5px/1.4 -apple-system,BlinkMacSystemFont,sans-serif;letter-spacing:.12em;box-shadow:0 2px 8px rgba(0,0,0,.25);pointer-events:none;",r.appendChild(a)}return this.buildBadge(r),Re({apiBase:this.apiBase,event:this.opts.event,scope:"event",surface:"seating_chart",outcome:"success",ms:performance.now()-e,performanceProfile:s.performanceProfile,chartDelivery:s.chartDelivery,seats:this.controller.getExpandedSeats().length,floors:this.controller.getFloors().length,view:"map",load:Wi(this.opts.event),transport:"pubapi"}),this}buildBadge(e){if(this.controller.doc?.theme?.hideBadge)return;let t=document.createElement("a");t.dataset.slI18n="badge",t.href="https://seatlayer.io",t.target="_blank",t.rel="noopener noreferrer",t.setAttribute("aria-label",(0,j.t)("picker.poweredBy")),t.style.cssText='position:absolute;bottom:10px;right:12px;z-index:5;display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;background:rgba(255,255,255,.92);color:#4a5163;text-decoration:none;font:600 11px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.02em;box-shadow:0 2px 8px rgba(0,0,0,.12);';let n=document.createElement("span");n.setAttribute("aria-hidden","true"),n.style.cssText="width:16px;height:16px;border-radius:4px;flex:none;display:flex;align-items:center;justify-content:center;background:#0c1220;color:#fcf7ee",n.innerHTML=$i;let o=document.createElement("span");o.textContent=(0,j.t)("picker.poweredBy"),t.append(n,o),e.appendChild(t)}placeTooltip(){if(!this.tipEl||!this.hostEl)return;let e=this.hostEl.clientWidth,t=this.tipEl.offsetWidth,n=this.tipEl.offsetHeight,o=this.tipPos.x+14,r=this.tipPos.y-n-12;o+t>e-8&&(o=this.tipPos.x-t-14),r<8&&(r=this.tipPos.y+18),this.tipEl.style.left=`${Math.max(8,o)}px`,this.tipEl.style.top=`${Math.max(8,r)}px`}updateTooltip(e){if(!this.tipEl)return;if(!e){this.tipEl.style.display="none";return}let t=(0,j.formatMoney)(e.price,e.currency,{...Number.isInteger(e.price)?{minimumFractionDigits:0,maximumFractionDigits:0}:{},locale:this.opts.locale,fallback:(l,c)=>`${l} ${c}`}),n=document.createElement("div");n.style.cssText="font-weight:700;font-size:13px",n.textContent=e.label;let o=document.createElement("div");o.style.cssText="display:flex;align-items:center;gap:6px;margin-top:4px;color:#c7cddc";let r=document.createElement("span");r.style.cssText="width:9px;height:9px;border-radius:50%;flex:none",r.style.background=e.categoryColor;let s=document.createElement("span");s.textContent=e.categoryLabel;let a=document.createElement("span");if(a.style.cssText="margin-left:auto;font-weight:700;color:#fff",a.textContent=t,o.append(r,s,a),this.tipEl.replaceChildren(n,o),e.status!=="free"){let l=document.createElement("div");l.style.cssText="margin-top:5px;font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;color:#fca5a5;font-weight:700",l.textContent=e.status==="held"?(0,j.t)("map.statusHeld"):(0,j.t)("map.statusTaken"),this.tipEl.appendChild(l)}this.tipEl.style.display="block",this.placeTooltip()}buildLanguageSwitcher(e){let t=(this.opts.languages??[]).map(o=>(0,j.resolveLocale)(o)).filter((o,r,s)=>s.indexOf(o)===r);if(t.length<2)return;let n=document.createElement("select");n.setAttribute("aria-label",(0,j.t)("picker.preferredTicketType")),n.style.cssText='position:absolute;bottom:10px;left:12px;z-index:5;appearance:none;padding:5px 9px;border-radius:999px;border:0;cursor:pointer;background:rgba(255,255,255,.92);color:#4a5163;font:600 11px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 2px 8px rgba(0,0,0,.12);';for(let o of t){let r=document.createElement("option");r.value=o,r.textContent=j.LOCALE_NAMES[o]??o,r.selected=o===(0,j.getLocale)(),n.appendChild(r)}n.addEventListener("change",()=>{this.setLocale(n.value)}),e.appendChild(n),this.languageSelect=n}async setLocale(e){let t=(0,j.getLocale)(),n=this.localeGeneration+=1,o=await(0,j.loadLocale)(e);return this.opts.messages&&(0,j.setStringOverrides)(this.opts.messages),o===t||this.applyActiveLocale(o,n),o}applyActiveLocale(e,t){if(t!==this.localeGeneration)return;let n=this.hostEl;if(n){n.lang=e,n.dir=(0,j.localeDirection)(e);for(let o of n.querySelectorAll("[data-sl-i18n]"))if(o.dataset.slI18n==="testMode")o.textContent=(0,j.t)("picker.testMode"),o.setAttribute("aria-label",(0,j.t)("picker.testMode"));else if(o.dataset.slI18n==="badge"){o.setAttribute("aria-label",(0,j.t)("picker.poweredBy"));let r=o.querySelector("span:last-child");r&&(r.textContent=(0,j.t)("picker.poweredBy"))}this.languageSelect&&this.languageSelect.value!==e&&(this.languageSelect.value=e),this.controller.refreshMapCopy()}}getMode(){return this.mode_}getPickerState(){return ns(this.controller,this.immersive,{event:this.opts.event,currency:this.opts.currency,mode_:this.mode_,eventInfo:this.eventInfo,eventLocale:this.eventLocale,focusedSection_:this.focusedSection_,colorblindSafe_:this.colorblindSafe_,categoryFilter_:this.categoryFilter_,accessibilityFilter_:this.accessibilityFilter_,hideLimitedView_:this.hideLimitedView_,maxSelection_:this.maxSelection_,accessState_:this.accessState_})}getCategoryAvailability(){return this.controller.categoryAvailability()}getBestAvailableZones(){return this.controller.getBestAvailableZones()}getActiveFloorId(){return this.controller.getActiveFloorId()||null}getRung(){return this.controller.getRung()}getFocusedSection(){return this.controller.getFocusedSection()}focusSection(e){if(this.immersive.buyerView==="venue3d"&&this.immersive.focusSection(e)){this.notifyMapStateChange();return}this.controller.focusSection(e),this.notifyMapStateChange()}overview(){if(this.immersive.focusOverview()){this.notifyMapStateChange();return}this.controller.overview(),this.notifyMapStateChange()}setRung(e){this.controller.setRung(e),this.notifyMapStateChange()}setCategoryFilter(e,t=!1){this.categoryFilter_=e?[...e]:null,this.controller.setCategoryFilter(e),t&&this.controller.focusCategoryFilter(e),this.notifyMapStateChange()}setAccessibilityFilter(e){this.accessibilityFilter_=e?[...e]:null,this.controller.setAccessibilityFilter(e),this.notifyMapStateChange(),e?.length&&this.focusAccessibilityFilter()}focusAccessibilityFilter(){this.controller.focusAccessibilityFilter?.(),this.notifyMapStateChange()}focusNextAccessibleSection(e){let t=this.controller.focusNextAccessibleSection?.(e)??null;return t&&this.notifyMapStateChange(),t}setCommercialLimitedFilter(e){this.hideLimitedView_=e,this.controller.setCommercialLimitedFilter(e),this.notifyMapStateChange()}getSelection(){return this.controller.getSelection()}selectObjects(e){let t=this.controller.select(e);return this.immersive.pushLiveState(),t}deselectObjects(e){this.controller.deselect(e),this.immersive.pushLiveState()}clearSelection(){this.controller.clearSelection(),this.immersive.pushLiveState()}selectCategories(e){return this.controller.selectCategories(e)}deselectCategories(e){this.controller.deselectCategories(e)}setSelectableObjects(e){this.controller.setSelectableObjects(e)}setMaxSelection(e){this.maxSelection_=e,this.controller.setMaxSelection(e),this.notifyMapStateChange()}getSelectionValidity(){return this.controller.getSelectionValidity()}async hold(e={}){try{return await this.holdOrThrow(e)}catch(t){return this.opts.onError?.(t),null}}async holdOrThrow(e={}){let t=this.controller.getSelectionValidity();if(t&&!t.isValid){let n=t.violations.includes("numberOfPlacesToSelect");throw Object.assign(new Error(n?`seatmap: select exactly ${t.required} places before holding`:"seatmap: adjust the ticket selection before holding"),{code:n?"selection_count_mismatch":"selection_invalid",selection:t})}this.holdingLabels=new Set(this.controller.getSelection().map(n=>n.label));try{let n=await this.controller.hold(void 0,e.ttlMs);return n?{holdId:n.holdId,expiresAt:n.expiresAt,seats:n.seats,items:n.items}:null}finally{this.holdingLabels.clear()}}async resumeHold(e){try{return await this.resumeHoldOrThrow(e)}catch(t){return this.opts.onError?.(t),null}}async resumeHoldOrThrow(e){let t=await this.controller.resumeHold(e);return t?{holdId:t.holdId,expiresAt:t.expiresAt,seats:t.seats,items:t.items}:null}async extendHold(e){try{let t=await this.controller.extendHold(e);return t?{holdId:t.holdId,expiresAt:t.expiresAt,seats:t.seats,items:t.items}:null}catch(t){return this.opts.onError?.(t),null}}getCurrentHold(){let e=this.controller.currentHold();return e?{holdId:e.holdId,expiresAt:e.expiresAt,seats:e.seats,items:e.items}:null}getGAAreas(){return this.controller.getGAAreas()}async holdGA(e,t,n={}){try{return await this.holdGAOrThrow(e,t,n)}catch(o){return this.opts.onError?.(o),null}}async holdGAOrThrow(e,t,n={}){let o=await this.controller.holdGA(e,t,n);return o?{holdId:o.holdId,expiresAt:o.expiresAt,seats:o.seats,items:o.items}:null}async bestAvailable(e,t,n={}){try{return await this.bestAvailableOrThrow(e,t,n)}catch(o){return this.opts.onError?.(o),null}}async bestAvailableOrThrow(e,t,n={}){let o=await this.controller.bestAvailable(e,t,n);return Xr(this.controller,o),o?{holdId:o.holdId,expiresAt:o.expiresAt,labels:o.labels,seats:o.seats,items:o.items,...n.zoneId?{zoneId:n.zoneId}:{}}:null}setSeatTier(e,t){this.controller.setSeatTier(e,t)}setTableQuantity(e,t){return this.controller.setTableQuantity(e,t)}async replaceTableQuantity(e,t,n){try{return await this.replaceTableQuantityOrThrow(e,t,n)}catch(o){return this.opts.onError?.(o),null}}async replaceTableQuantityOrThrow(e,t,n){let o=await this.controller.replaceTableQuantity(e,t,n);return o?{holdId:o.holdId,expiresAt:o.expiresAt,seats:o.seats,items:o.items}:null}getFloors(){return this.controller.getFloors()}setFloor(e){if(this.immersive.buyerView==="venue3d"&&e!=="all"&&this.immersive.focusFloor(e)){this.notifyMapStateChange();return}if(this.controller.getFloors().length<=1){console.warn("seatmap: setFloor() ignored \u2014 this chart has a single floor");return}e==="all"?this.controller.setFloorOverview(!0):this.controller.setFloor(e),this.notifyMapStateChange()}setFloorLabelStyle(e){this.controller.getRenderer()?.setFloorLabelStyle?.(e),this.notifyMapStateChange()}setSectionFocusDim(e){this.controller.setSectionFocusDim(e)}setSelectionFocus(e){this.controller.setSelectionFocus(e)}setBlockedRegions(e){if(!this.blockedRegions){if(!e.length)return;this.blockedRegions=new Xi,this.hostEl&&this.blockedRegions.attach(this.hostEl)}this.blockedRegions.set(e)}getBlockedRegions(){return this.blockedRegions?.get()??[]}frameSeat(e,t={}){let n=this.controller.getRenderer();return Jr({seatPoint:o=>{let r=this.controller.getExpandedSeats().find(s=>s.id===o);return r?this.controller.worldToScreen({x:r.x,y:r.y}):null},mapHeight:()=>this.hostEl?.clientHeight??0,insets:()=>this.controller.getViewportInsets(),gestureCount:()=>n?.getCameraGestureCount?.()??0,panScreenBy:(o,r)=>n?.panScreenBy?(n.panScreenBy(o,{animate:r}),!0):!1},e,t)}setColorblindSafe(e){this.colorblindSafe_=e,this.controller.setColorblindSafe(e),this.notifyMapStateChange()}setViewMode(e){this.controller.setViewMode(e),this.notifyMapStateChange()}getViewMode(){return this.controller.getViewMode()}zoomIn(){this.immersive.zoomIn()||(this.controller.zoomIn(),this.notifyMapStateChange())}zoomOut(){this.immersive.zoomOut()||(this.controller.zoomOut(),this.notifyMapStateChange())}zoomToFit(){this.immersive.focusOverview()||(this.controller.zoomToFit(),this.notifyMapStateChange())}setThemeMode(e,t){this.hostSurface.setThemeMode(e,t)}getThemeMode(){return this.hostSurface.themeMode()}setViewportInsets(e){this.hostSurface.setViewportInsets(e)}getViewportInsets(){return this.hostSurface.viewportInsets()}setBuyerView(e,t){return this.immersive.setBuyerView(e,t)}getBuyerView(){return this.immersive.buyerView}openSeatView(e){return this.immersive.openSeatView(e)}setVenue3DNavigationMode(e){if(!this.immersive.setNavigationMode(e))throw new Error("venue_3d_not_active")}setInteractionEnabled(e){this.interactionEnabled_=e,this.applyInteractionState()}applyInteractionState(){let e=this.hostEl;e&&(e.style.pointerEvents=this.interactionEnabled_?"":"none",e.toggleAttribute("inert",!this.interactionEnabled_),this.interactionEnabled_?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden","true"))}async release(){await this.controller.release()}async releaseLabels(e){return this.controller.releaseLabels(e)}startRealtime(){!this.access?.configured||this.realtime||(this.realtime=new ke({url:this.api.subscribeUrl(this.opts.event),mintTicket:()=>this.api.subscribeTicket(this.opts.event),onAccessUnavailable:e=>this.opts.onAccessUnavailable?.(e),sink:vt(this.controller,{flashOnLiveChange:!0,ownLabels:()=>this.holdingLabels,onStatusChange:()=>{this.immersive.pushLiveState(),this.opts.onStatusChange?.()},onSelectedObjectUnavailable:(e,t)=>this.opts.onSelectedObjectUnavailable?.({labels:e,reason:t})})}),this.realtime.start())}async refreshAvailability(){let e=await this.controller.refreshAvailability();return this.immersive.pushLiveState(),this.opts.onStatusChange?.(),e.lost.length&&this.opts.onSelectedObjectUnavailable?.({labels:e.lost,reason:"taken"}),this.notifyMapStateChange(),e}async refreshAccess(){if(!this.access?.configured)return!1;let e=await this.access.refresh("manual");return e&&(this.accessState_={configured:!0,status:"ready"},await this.controller.refresh(),this.realtime?.restart(),this.realtime||this.startRealtime()),this.notifyMapStateChange(),e}showLoadFailure(e){let t=document.createElement("div");t.setAttribute("role","status"),t.style.cssText='display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;height:100%;min-height:180px;box-sizing:border-box;padding:24px;text-align:center;font:500 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#3b4256;';let n=document.createElement("div");n.textContent="The seat map didn\u2019t load.",t.appendChild(n);let o=document.createElement("button");o.type="button",o.textContent="Try again",o.style.cssText="appearance:none;border:1px solid #c9cede;background:#fff;color:#10162a;border-radius:8px;padding:8px 16px;font:600 13px/1 inherit;cursor:pointer;",o.addEventListener("click",()=>{this.destroy(),this.render().catch(r=>this.opts.onError?.(r))}),t.appendChild(o),e.appendChild(t)}destroy(){this.blockedRegions?.detach(),this.hostSurface.dispose(),this.immersive.destroy(),this.buyerAssetUrls.dispose(),this.realtime?.stop(),this.realtime=null,this.access?.clear(),this.hostEl&&this.onTipMove&&this.hostEl.removeEventListener("mousemove",this.onTipMove),this.tipEl=null,this.onTipMove=null,this.languageSelect=null,this.controller.destroy(),this.hostEl&&this.hostEl.parentNode&&this.hostEl.parentNode.removeChild(this.hostEl),this.hostEl=null,this.mount=null,this.rendered=!1,this.mode_=null,this.eventInfo=null,this.focusedSection_=null}};var qn=["hold","resumeHold","getCurrentHold","getGAAreas","holdGA","bestAvailable","release","releaseLabels","getSelection","selectObjects","deselectObjects","clearSelection","selectCategories","deselectCategories","setSelectableObjects","setMaxSelection","getSelectionValidity","setSeatTier","getFloors","setFloor","setColorblindSafe","zoomIn","zoomOut","zoomToFit","refreshAccess"],sd={hold:()=>Promise.resolve(null),resumeHold:()=>Promise.resolve(null),getCurrentHold:()=>null,getGAAreas:()=>[],holdGA:()=>Promise.resolve(null),bestAvailable:()=>Promise.resolve(null),release:()=>Promise.resolve(),releaseLabels:()=>Promise.resolve(!1),getSelection:()=>[],selectObjects:()=>[],deselectObjects:()=>{},clearSelection:()=>{},selectCategories:()=>[],deselectCategories:()=>{},setSelectableObjects:()=>{},setMaxSelection:()=>{},getSelectionValidity:()=>null,setSeatTier:()=>{},getFloors:()=>[],setFloor:()=>{},setColorblindSafe:()=>{},zoomIn:()=>{},zoomOut:()=>{},zoomToFit:()=>{},refreshAccess:()=>Promise.resolve(!1)};function rs(i){let e={};for(let t of qn)e[t]=(...n)=>{let o=i();return o?o[t](...n):sd[t]()};return e}var Kn=["event","apiBase","maxSelection","numberOfPlacesToSelect","selectionValidators","publicKey","locale","currency","colorblindSafe","initialView","errorDisplay"],Wn=[...Kn,"selectedObjects","selectableObjects","messages","seatTooltip","buyerAccessTokenProvider","buyerAccessToken"],Yn=["onSelectionChange","onSelectionValidityChange","onSelectionValid","onSelectionInvalid","onSelectionLimit","onHold","onHoldRestored","onHoldExpired","onGAClick","onGAPrompt","onError","onDeckTap","onHint","onSeatHover","onAccessExpired","onAccessUnavailable","onSelectedObjectUnavailable"];function ss(i,e,t){let n={container:i};for(let o of Wn)n[o]=e[o];for(let o of Yn)n[o]=t[o];return n}var ad=new Set(["seatlayer.designer.ready","seatlayer.designer.saved","seatlayer.designer.published","seatlayer.designer.close","seatlayer.designer.error"]),ld=2e4,cd=480,dd=180*1e3,pd=900*1e3,hd=.8,ud=30*1e3,md=1e5,fd=4,gd=50;function Xn(i){if(typeof i!="string")return i;let e=document.querySelector(i);if(!e)throw new Error(`EmbeddedDesigner container not found: ${i}`);return e}function bd(i){let e=(i??"").toLowerCase();return e.includes("expire")||e.includes("revoke")||e==="401"?"expired":e.includes("mismatch")?"mismatch":e.includes("timeout")?"timeout":"load"}var yd={expired:{title:"This design session expired",body:"For your security, editing sessions are short-lived. Start a fresh one to keep designing."},mismatch:{title:"This editor doesn't match this chart",body:"The session that loaded belongs to a different chart or workspace. Reopen the designer to continue."},timeout:{title:"The designer is taking too long",body:"It did not finish loading in time. This is usually a slow connection \u2014 try again."},load:{title:"We couldn't load the designer",body:"Something went wrong while opening the editor. Please try again."}},tn=class{constructor(e){this.frame=null;this.designerOrigin="";this.overlay=null;this.timeoutTimer=null;this.renewTimer=null;this.autoRecoverUsed=!1;this.phase="loading";this.identityEstablished=!1;this.restoreContainerPosition=null;this.pinned=!1;this.frameStyleBeforeFs=null;this.docOverflowBeforeFs=null;this.bodyOverflowBeforeFs=null;this.fsKeyHandler=null;this.lastAutoHeight="";this.fillRaf=null;this.reprobeRaf=null;this.fillListening=!1;this.containerEl=null;this.fillMode=null;this.resizeObs=null;this.scheduleFill=()=>{this.fillRaf===null&&(this.fillRaf=requestAnimationFrame(()=>{this.fillRaf=null,this.applyFill()}))};this.scheduleReprobe=()=>{this.reprobeRaf===null&&(this.reprobeRaf=requestAnimationFrame(()=>{this.reprobeRaf=null,!this.pinned&&(this.fillMode=this.detectFillMode(),this.syncContainerObserver(),this.applyFill())}))};this.handleMessage=e=>{if(!this.frame||e.origin!==this.designerOrigin||e.source!==this.frame.contentWindow||!e.data||typeof e.data!="object")return;let t=e.data;if(t.type==="seatlayer.designer.handshake"&&typeof t.nonce=="string"&&t.nonce.length<=128){this.frame.contentWindow?.postMessage({type:"seatlayer.designer.parent",nonce:t.nonce},this.designerOrigin);return}if(t.type==="seatlayer.designer.resize"){!this.fillEnabled()&&this.autoResizeEnabled()&&typeof t.px=="number"&&Number.isFinite(t.px)&&t.px>0&&(this.lastAutoHeight=`${Math.round(t.px)}px`,this.pinned||this.setFrameHeight(this.lastAutoHeight));return}if(t.type==="seatlayer.designer.fullscreen"){t.on===!0?this.pinFullscreen():t.on===!1&&this.unpinFullscreen();return}if(typeof t.type!="string"||!ad.has(t.type))return;let n={type:t.type,chartId:typeof t.chartId=="string"?t.chartId:void 0,workspaceId:typeof t.workspaceId=="string"?t.workspaceId:void 0,expiresAt:typeof t.expiresAt=="number"?t.expiresAt:void 0,code:typeof t.code=="string"?t.code:void 0,message:typeof t.message=="string"?t.message:void 0,meta:t.meta,fatal:typeof t.fatal=="boolean"?t.fatal:void 0,action:typeof t.action=="string"?t.action:void 0},o=this.identityEstablished||n.type==="seatlayer.designer.ready"||n.type==="seatlayer.designer.saved"||n.type==="seatlayer.designer.published"||n.type==="seatlayer.designer.close",r=this.options.expectedChartId!==void 0&&n.chartId!==this.options.expectedChartId&&(o||n.chartId!==void 0),s=this.options.expectedWorkspaceId!==void 0&&n.workspaceId!==this.options.expectedWorkspaceId&&(o||n.workspaceId!==void 0);if(r||s){this.showError("mismatch");return}switch(n.type){case"seatlayer.designer.ready":this.identityEstablished=!0,this.sessionExpiresAt=n.expiresAt,this.phase="ready",this.clearTimeoutTimer(),this.removeOverlay(),this.autoRecoverUsed=!1,this.scheduleRenewal(n.expiresAt),this.options.onReady?.(n);break;case"seatlayer.designer.saved":this.options.onSaved?.(n);break;case"seatlayer.designer.published":this.options.onPublished?.(n);break;case"seatlayer.designer.close":this.options.onClose?.(n);break;case"seatlayer.designer.error":{let a=bd(n.code);if(a==="expired"&&this.autoRenewEnabled()&&!this.autoRecoverUsed){this.autoRecoverUsed=!0,this.clearRenewTimer(),this.options.onRequestRelaunch();return}(typeof n.fatal=="boolean"?n.fatal:a!=="load"||this.phase!=="ready")&&this.showError(a),this.options.onError?.(n);break}}};this.options=e}mount(){this.destroy();let e=new URL(this.options.designerUrl,window.location.href);if(e.protocol!=="https:"&&e.hostname!=="localhost"&&e.hostname!=="127.0.0.1")throw new Error("EmbeddedDesigner requires an HTTPS designerUrl outside local development.");this.designerOrigin=e.origin;let t=document.createElement("iframe");t.title=this.options.title??"Venue chart Designer",t.allow=this.options.allow??"fullscreen; clipboard-write",t.referrerPolicy=this.options.referrerPolicy??"origin",t.src=e.toString(),t.style.setProperty("width","100%","important"),t.style.setProperty("height",typeof this.options.height=="number"?`${this.options.height}px`:"100%","important"),t.style.border="0",Object.assign(t.style,this.options.style),this.options.className&&(t.className=this.options.className);let n=Xn(this.options.container);if(this.containerEl=n,window.addEventListener("message",this.handleMessage),n.append(t),this.frame=t,this.fillEnabled()&&this.startFill(),this.phase="loading",this.loadingStateEnabled()){this.ensureContainerPositioned(n),this.renderOverlay(n,"loading");let o=this.options.loadingTimeoutMs??ld;o>0&&Number.isFinite(o)&&(this.timeoutTimer=setTimeout(()=>{this.phase==="loading"&&this.showError("timeout")},o))}return t}setDesignerUrl(e){return this.options={...this.options,designerUrl:e},this.mount()}getIframe(){return this.frame}setSizing(e,t){this.options={...this.options,height:e,minHeight:t},this.frame&&(this.stopFill(),this.lastAutoHeight="",this.fillEnabled()?(this.pinned||this.setFrameHeight("100%"),this.startFill()):this.pinned||this.setFrameHeight(`${e}px`))}setRelaunchPolicy(e,t){this.options={...this.options,onRequestRelaunch:e,autoRenewSession:t},this.clearRenewTimer(),this.phase==="ready"&&this.scheduleRenewal(this.sessionExpiresAt)}destroy(){window.removeEventListener("message",this.handleMessage),this.stopFill(),this.unpinFullscreen(),this.clearTimeoutTimer(),this.clearRenewTimer(),this.removeOverlay(),this.restoreContainerStyle(),this.frame?.remove(),this.frame=null,this.containerEl=null,this.fillMode=null,this.designerOrigin="",this.phase="loading",this.identityEstablished=!1,this.sessionExpiresAt=void 0,this.lastAutoHeight=""}loadingStateEnabled(){return this.options.showLoadingState!==!1}autoResizeEnabled(){return this.options.autoResize!==!1}fillEnabled(){return typeof this.options.height!="number"}setFrameHeight(e){this.frame?.style.setProperty("height",e,"important")}detectFillMode(){let e=this.containerEl,t=this.frame;if(this.pinned||!e||!t)return this.fillMode??"viewport";let n=()=>e.getBoundingClientRect().height,o=t.style.getPropertyValue("height"),r=t.style.getPropertyPriority("height");t.style.setProperty("height","0px","important");let s=n();t.style.setProperty("height",`${md}px`,"important");let a=n();return o?t.style.setProperty("height",o,r):t.style.removeProperty("height"),!(a-s>fd)&&s>=gd?"container":"viewport"}applyFill(){if(!this.frame||this.pinned)return;let e=this.options.minHeight??cd;if(this.fillMode==="container"&&this.containerEl){let o=Math.max(e,Math.round(this.containerEl.getBoundingClientRect().height));this.setFrameHeight(`${o}px`);return}let t=this.frame.getBoundingClientRect().top,n=Math.max(e,Math.round(window.innerHeight-t));this.setFrameHeight(`${n}px`)}syncContainerObserver(){let e=this.fillMode==="container"&&!!this.containerEl&&typeof ResizeObserver<"u";e&&!this.resizeObs?(this.resizeObs=new ResizeObserver(()=>this.scheduleFill()),this.resizeObs.observe(this.containerEl)):!e&&this.resizeObs&&(this.resizeObs.disconnect(),this.resizeObs=null)}startFill(){this.fillMode=this.detectFillMode(),this.syncContainerObserver(),this.applyFill(),!this.fillListening&&(this.fillListening=!0,window.addEventListener("resize",this.scheduleReprobe),window.addEventListener("orientationchange",this.scheduleReprobe),window.addEventListener("scroll",this.scheduleFill,{passive:!0}))}stopFill(){this.fillRaf!==null&&(cancelAnimationFrame(this.fillRaf),this.fillRaf=null),this.reprobeRaf!==null&&(cancelAnimationFrame(this.reprobeRaf),this.reprobeRaf=null),this.resizeObs&&(this.resizeObs.disconnect(),this.resizeObs=null),this.fillListening&&(this.fillListening=!1,window.removeEventListener("resize",this.scheduleReprobe),window.removeEventListener("orientationchange",this.scheduleReprobe),window.removeEventListener("scroll",this.scheduleFill))}pinFullscreen(){if(this.pinned||!this.frame)return;this.pinned=!0,this.frameStyleBeforeFs=this.frame.getAttribute("style");let e={position:"fixed",top:"0",right:"0",bottom:"0",left:"0",width:"100vw",height:"100vh",margin:"0",border:"0","z-index":"2147483000",background:"#101625"};for(let[n,o]of Object.entries(e))this.frame.style.setProperty(n,o,"important");let t=document.documentElement;this.docOverflowBeforeFs=t.style.overflow,t.style.overflow="hidden",document.body&&(this.bodyOverflowBeforeFs=document.body.style.overflow,document.body.style.overflow="hidden"),this.fsKeyHandler=n=>{n.key==="Escape"&&this.unpinFullscreen()},window.addEventListener("keydown",this.fsKeyHandler)}unpinFullscreen(){this.pinned&&(this.pinned=!1,this.frame&&(this.frameStyleBeforeFs===null?this.frame.removeAttribute("style"):this.frame.setAttribute("style",this.frameStyleBeforeFs),this.fillEnabled()?this.applyFill():this.autoResizeEnabled()&&this.lastAutoHeight?this.setFrameHeight(this.lastAutoHeight):typeof this.options.height=="number"&&this.setFrameHeight(`${this.options.height}px`)),this.frameStyleBeforeFs=null,this.docOverflowBeforeFs!==null&&(document.documentElement.style.overflow=this.docOverflowBeforeFs,this.docOverflowBeforeFs=null),this.bodyOverflowBeforeFs!==null&&document.body&&(document.body.style.overflow=this.bodyOverflowBeforeFs,this.bodyOverflowBeforeFs=null),this.fsKeyHandler&&(window.removeEventListener("keydown",this.fsKeyHandler),this.fsKeyHandler=null))}clearTimeoutTimer(){this.timeoutTimer!==null&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)}autoRenewEnabled(){return!!this.options.onRequestRelaunch&&this.options.autoRenewSession!==!1}clearRenewTimer(){this.renewTimer!==null&&(clearTimeout(this.renewTimer),this.renewTimer=null)}scheduleRenewal(e){if(this.clearRenewTimer(),!this.autoRenewEnabled()||typeof e!="number"||!Number.isFinite(e))return;let t=e-Date.now();if(t<=0)return;let n=t<pd?t*hd:t-dd,o=Math.max(ud,n);this.renewTimer=setTimeout(()=>{this.renewTimer=null,this.autoRenewEnabled()&&this.options.onRequestRelaunch()},o)}ensureContainerPositioned(e){getComputedStyle(e).position==="static"&&(this.restoreContainerPosition=e.style.position,e.style.position="relative")}restoreContainerStyle(){if(this.restoreContainerPosition!==null){try{Xn(this.options.container).style.position=this.restoreContainerPosition}catch{}this.restoreContainerPosition=null}}removeOverlay(){this.overlay?.remove(),this.overlay=null}showError(e){if(this.phase="error",this.clearTimeoutTimer(),!this.loadingStateEnabled())return;let t;try{t=Xn(this.options.container)}catch{return}this.renderOverlay(t,"error",e)}handleTryAgain(){if(this.options.onRequestRelaunch){this.options.onRequestRelaunch();return}this.mount()}renderOverlay(e,t,n){this.removeOverlay();let o=document.createElement("div");o.setAttribute("data-seatlayer-designer-overlay",t),o.setAttribute("role",t==="error"?"alert":"status"),o.setAttribute("aria-live","polite"),Object.assign(o.style,{position:"absolute",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",background:"#101625",color:"#e6ebf5",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',zIndex:"2",overflow:"hidden"}),t==="loading"?this.buildSkeleton(o):this.buildErrorCard(o,n??"load"),e.append(o),this.overlay=o}buildSkeleton(e){let t=document.createElement("style");t.textContent=`
2831
2910
  @media (prefers-reduced-motion: no-preference) {
2832
2911
  @keyframes seatlayer-designer-shimmer {
2833
2912
  0% { background-position: -320px 0; }
@@ -2837,9 +2916,9 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
2837
2916
  animation: seatlayer-designer-shimmer 1.25s ease-in-out infinite;
2838
2917
  background-size: 640px 100%;
2839
2918
  }
2840
- }`,e.append(t);let n="linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.10) 37%, rgba(255,255,255,0.04) 63%)",r=document.createElement("div");Object.assign(r.style,{position:"absolute",inset:"0",display:"flex",flexDirection:"column",padding:"16px",gap:"14px",opacity:"0.9"});let s=c=>{let d=document.createElement("div");return d.className="sl-shimmer",Object.assign(d.style,{background:n,borderRadius:"8px"}),Object.assign(d.style,c),d};r.append(s({height:"40px",width:"100%",flex:"0 0 auto"}));let o=document.createElement("div");Object.assign(o.style,{display:"flex",gap:"14px",flex:"1 1 auto",minHeight:"0"}),o.append(s({width:"220px",height:"100%",flex:"0 0 auto"})),o.append(s({flex:"1 1 auto",height:"100%"})),r.append(o),e.append(r);let a=document.createElement("div");Object.assign(a.style,{position:"relative",zIndex:"1",display:"flex",alignItems:"center",gap:"10px",padding:"10px 16px",borderRadius:"999px",background:"rgba(16, 22, 37, 0.72)",fontSize:"13px",fontWeight:"500",letterSpacing:"0.01em"});let l=document.createElement("span");l.className="sl-shimmer",Object.assign(l.style,{width:"9px",height:"9px",borderRadius:"50%",background:n,flex:"0 0 auto"}),a.append(l),a.append(document.createTextNode("Loading designer\u2026")),e.append(a)}buildErrorCard(e,t){let n=Td[t],r=document.createElement("div");Object.assign(r.style,{maxWidth:"420px",margin:"0 24px",padding:"28px",textAlign:"center",background:"rgba(255, 255, 255, 0.03)",border:"1px solid rgba(255, 255, 255, 0.08)",borderRadius:"16px",boxShadow:"0 12px 40px rgba(0, 0, 0, 0.35)"});let s=document.createElement("h2");s.textContent=n.title,Object.assign(s.style,{margin:"0 0 8px",fontSize:"17px",fontWeight:"600",color:"#f4f7ff"});let o=document.createElement("p");o.textContent=n.body,Object.assign(o.style,{margin:"0 0 20px",fontSize:"13.5px",lineHeight:"1.5",color:"#aab4c8"});let a=document.createElement("button");a.type="button",a.textContent="Try again",Object.assign(a.style,{appearance:"none",cursor:"pointer",border:"0",borderRadius:"10px",padding:"10px 22px",fontSize:"14px",fontWeight:"600",color:"#101625",background:"#7aa2ff"}),a.addEventListener("click",()=>this.handleTryAgain()),r.append(s,o,a),e.append(r)}};var R=require("@seatlayer/core"),Cn=require("@seatlayer/core/view3d/crossfade/panorama");function Us(i){return!!i&&i.clientWidth>0&&i.scrollWidth>i.clientWidth+1}function Cd(i){return i.some(e=>Us(e))}var on="data-fit-gone",Ed=12;function Qn(i,e,t=Us){if(!i)return 0;for(let n of e)i.classList.remove(n.cls);if(i.querySelectorAll(`[${on}]`).forEach(n=>{n.removeAttribute(on),n.hidden=!1}),i.dataset.fit="0",i.clientWidth<=0||!t(i))return 0;for(let n=0;n<e.length;n+=1){let r=e[n];n>0&&i.classList.remove(e[n-1].cls),i.classList.add(r.cls),i.dataset.fit=String(n+1);let s=r.give?r.give(i):!0;if(!t(i))return n+1;if(r.repeat&&r.give){for(let o=1;s&&o<Ed;o+=1)if(s=r.give(i),!t(i))return n+1}}return e.length}function Ad(i,e="[data-fit-seg]"){let t=[...i.querySelectorAll(e)].filter(n=>!n.hidden);return t.length<2?!1:Gs(t[t.length-1])}function Pd(i,e){let t=i.querySelector(e);return t&&!t.hidden?Gs(t):!1}function Gs(i){let e=i.previousElementSibling;return e instanceof HTMLElement&&e.tagName==="I"&&(e.setAttribute(on,""),e.hidden=!0),i.setAttribute(on,""),i.hidden=!0,!0}function Md(i){if(!i)return!1;let e=(i.getAttribute("aria-label")||i.textContent||"").trim();return e?(i.setAttribute("aria-label",e),i.setAttribute("title",e),!0):!1}function qs(i){if(!i)return 0;let e=i.querySelector(".sl-confirm-cancel"),t=i.querySelector(".sl-confirm-add-t");return Qn(i,[{cls:"sl-fit-track"},{cls:"sl-fit-type"},{cls:"sl-fit-icon",give:()=>Md(e)}],()=>Cd([e,t]))}function Ks(i){return Qn(i,[{cls:"sl-fit-notype",give:e=>Pd(e,"[data-fit-type]")},{cls:"sl-fit-short",give:e=>Ad(e),repeat:!0}])}function Zn(i){return i?(i.classList.add("sl-fitpill"),Qn(i,[{cls:"sl-fit-p1"},{cls:"sl-fit-p2"},{cls:"sl-fit-p3"}])):0}var Ld=["on-sale","low","sold-out","presale","closed"];function di(i){return i==null?null:typeof i=="number"&&Number.isFinite(i)&&i>=0?i:void 0}function Ys(i){return i==null?null:typeof i=="number"&&Number.isFinite(i)&&i>=0?i:void 0}function Ws(i){if(i==null)return null;if(typeof i!="object"||Array.isArray(i))return;let e=i,t=e.count,n=e.index;if(typeof n!="number"||!Number.isInteger(n)||n<1||typeof t!="number"||!Number.isInteger(t)||t<n)return;let r=e.remaining;if(r!=null&&(typeof r!="number"||!Number.isInteger(r)||r<0))return;let s={index:n,count:t,remaining:r??null};if(e.id!==void 0){if(typeof e.id!="string"||!e.id.trim())return;s.id=e.id.trim()}if(e.name!==void 0){if(typeof e.name!="string"||!e.name.trim())return;s.name=e.name.trim()}if(e.categoryKey!==void 0){if(e.categoryKey!==null&&(typeof e.categoryKey!="string"||!e.categoryKey.trim()))return;s.categoryKey=e.categoryKey==null?null:e.categoryKey.trim()}for(let o of["startsAt","endsAt"]){if(e[o]===void 0)continue;let a=Ys(e[o]);if(a===void 0)return;s[o]=a}return s}function Hd(i){if(i==null)return null;if(typeof i!="object"||Array.isArray(i))return;let e=i;if(!Number.isInteger(e.assignmentVersion)||e.assignmentVersion<0||!Array.isArray(e.channels)||!Array.isArray(e.objects))return;let t=[],n=new Set;for(let o of e.channels){if(!o||typeof o!="object"||Array.isArray(o))return;let a=o,l=typeof a.channelId=="string"?a.channelId.trim():"";if(!l||n.has(l)||!Number.isInteger(a.pricingVersion)||a.pricingVersion<0||!Array.isArray(a.priceOverrides))return;let c=[],d=new Set;for(let p of a.priceOverrides){if(!p||typeof p!="object"||Array.isArray(p))return;let u=p,h=typeof u.categoryKey=="string"?u.categoryKey.trim():"",g=u.tierId===null?null:typeof u.tierId=="string"&&u.tierId.trim()?u.tierId.trim():void 0,y=di(u.price);if(!h||g===void 0||y===void 0||y===null)return;let S=`${h}\0${g??""}`;if(d.has(S))return;d.add(S),c.push({categoryKey:h,tierId:g,price:y})}n.add(l),t.push({channelId:l,pricingVersion:a.pricingVersion,priceOverrides:c})}let r=[],s=new Set;for(let o of e.objects){if(!o||typeof o!="object"||Array.isArray(o))return;let a=o,l=typeof a.label=="string"?a.label.trim():"",c=typeof a.channelId=="string"?a.channelId.trim():"";if(!l||s.has(l)||!n.has(c))return;s.add(l),r.push({label:l,channelId:c})}return{assignmentVersion:e.assignmentVersion,channels:t,objects:r}}function an(i){if(!i||typeof i!="object"||Array.isArray(i))return null;let e=i,t=Ld.find(d=>d===e.state);if(!t)return null;let n=di(e.fromPrice),r=di(e.previousPrice);if(n===void 0||r===void 0)return null;let s=e.currency==null?null:typeof e.currency=="string"&&e.currency.trim()?e.currency.trim():void 0;if(s===void 0)return null;let o=Ws(e.release);if(o===void 0)return null;let a=e.upcoming===void 0?null:Ws(e.upcoming);if(a===void 0)return null;let l=[];if(e.prices!=null){if(!Array.isArray(e.prices))return null;let d=[];for(let p of e.prices){if(!p||typeof p!="object"||Array.isArray(p))return null;let u=p,h=typeof u.categoryKey=="string"?u.categoryKey.trim():"";if(!h)return null;let g=di(u.price),y=di(u.previousPrice);if(g==null||y===void 0)return null;let S={categoryKey:h,price:g,previousPrice:y};if(u.offerId!==void 0){if(typeof u.offerId!="string"||!u.offerId.trim())return null;S.offerId=u.offerId.trim()}if(u.offerName!==void 0){if(typeof u.offerName!="string"||!u.offerName.trim())return null;S.offerName=u.offerName.trim()}if(u.remaining!==void 0){if(u.remaining!==null&&(typeof u.remaining!="number"||!Number.isInteger(u.remaining)||u.remaining<0))return null;S.remaining=u.remaining==null?null:u.remaining}for(let k of["startsAt","endsAt"]){if(u[k]===void 0)continue;let v=Ys(u[k]);if(v===void 0)return null;S[k]=v}d.push(S)}l=d}let c=Hd(e.channelPricing);return c===void 0?null:{state:t,fromPrice:n,previousPrice:r,currency:s,release:o,upcoming:a,prices:l,channelPricing:c}}function Xs(i){return i?.changed!==!1}function Qs(i,e){if(!i)return null;let t=null,n=r=>{r!=null&&r>e&&(t===null||r<t)&&(t=r)};for(let r of[i.release,i.upcoming])n(r?.startsAt),n(r?.endsAt);for(let r of i.prices)n(r.startsAt),n(r.endsAt);return t}function ln(i){let e={};for(let t of i?.prices??[])e[t.categoryKey]=t.price;return e}function Zs(i){return i.focusedSection!==null?i.deeperThanSectionFrame===!1?"venue":"section":i.seatsRevealed?"venue":"none"}var Se=require("@seatlayer/core"),eo=require("@seatlayer/core/core/seatConfidence");function Jn(i){return String(i??"\u2014").replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[e])}function C(i){return String(i??"").replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[e])}function Ie(i){return i?.restrictedView?b("picker.restrictedView","Restricted view"):i?.obstructedView?b("picker.obstructedView","Obstructed view"):""}function to(i){if(!i)return"";let e=[];i.premium&&e.push(`<div class="sl-cx-premium"><span class="sl-cx-star" aria-hidden="true">\u2605</span>${b("picker.premiumSeat","Premium seat")}</div>`);let t=Ie(i);return t?e.push(`<div class="sl-cx-warn"><span class="sl-cx-glyph" aria-hidden="true">\u25D0</span><span class="sl-cx-txt"><b>${t}</b>${i.note?`<span class="sl-cx-note">${C(i.note)}</span>`:""}</span></div>`):i.note&&e.push(`<div class="sl-cx-warn"><span class="sl-cx-glyph" aria-hidden="true">\u2139</span><span class="sl-cx-txt"><span class="sl-cx-note">${C(i.note)}</span></span></div>`),e.length?`<div class="sl-cx">${e.join("")}</div>`:""}function er(i){if(!i)return"";let e=[];if(i.premium){let n=C(b("picker.premiumSeat","Premium seat"));e.push(`<span class="sl-cx-mark sl-cx-mark-premium" role="img" aria-label="${n}" title="${n}">\u2605</span>`)}let t=Ie(i);if(t){let n=C(i.note?`${t}: ${i.note}`:t);e.push(`<span class="sl-cx-mark sl-cx-mark-limited" role="img" aria-label="${n}" title="${n}">\u25D0</span>`)}else if(i.note){let n=C(i.note);e.push(`<span class="sl-cx-mark sl-cx-mark-info" role="img" aria-label="${n}" title="${n}">\u2139</span>`)}return e.join("")}function tr(i){if(!i)return"";let e=[];i.premium&&e.push(`<span class="sl-chip-cx-tag premium"><span aria-hidden="true">\u2605</span>${b("picker.premiumSeat","Premium seat")}</span>`);let t=Ie(i);return t&&e.push(`<span class="sl-chip-cx-tag limited"><span aria-hidden="true">\u25D0</span>${C(t)}</span>`),!e.length&&!i.note?"":'<div class="sl-chip-cx">'+(e.length?`<div class="sl-chip-cx-tags">${e.join("")}</div>`:"")+(i.note?`<div class="sl-chip-cx-note">${C(i.note)}</div>`:"")+"</div>"}function Dt(i){return i==="no-seat"?b("picker.emptyWheelchairSpace","Empty wheelchair space"):i==="seat-present"?b("picker.accessiblePhysicalSeat","Accessible physical seat"):""}function io(i){let e=Dt(i);return e?`<div class="sl-cx"><div class="sl-cx-warn"><span class="sl-cx-glyph" aria-hidden="true">\u267F</span><span class="sl-cx-txt"><b>${e}</b></span></div></div>`:""}function pi(i){let e=Dt(i);return e?`<span class="sl-cx-mark" role="img" aria-label="${e}" title="${e}">\u267F</span>`:""}function ir(i,e){if(!i)return"";let t=e?b("picker.viewFromThisSeat","View from this seat"):b("picker.seeItIn3d","See it in 3D"),n=e?b("picker.viewFromHere","View from here"):t;return`<button type="button" class="sl-confirm-3d" aria-label="${t}"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2l9 5v10l-9 5-9-5V7z"/><path d="M12 12l9-5M12 12v10M12 12L3 7"/></svg><span>${n}</span></button>`}function no(i){if(!i)return"";let e=i.previous.label||i.previous.id,t=i.next.label||i.next.id;return`<span class="sl-seccard-nav" aria-label="${b("picker.browseSections","Browse sections")}"><button type="button" data-section-nav="${D(i.previous.id)}" aria-label="${b("picker.previousSection","Previous section")}: ${D(e)}" title="${D(e)}">\u2190</button><button type="button" data-section-nav="${D(i.next.id)}" aria-label="${b("picker.nextSection","Next section")}: ${D(t)}" title="${D(t)}">\u2192</button></span>`}function ro(i,e){if(!e)return"";let t=e,n=t.includes(i.id),r=n?t.length>1?b("picker.openComparison","Open comparison"):b("picker.savedForComparison","Saved for comparison"):t.length?b("picker.compareWithSaved","Compare with saved"):b("picker.saveToCompare","Save to compare");return`<button type="button" class="sl-confirm-compare"${n&&t.length===1?" disabled":""}><span aria-hidden="true">\u21C4</span><span>${C(r)}</span></button>`}function so(i,e,t){if(!t)return"";let n=(0,eo.seatConfidenceDisclosure)(i.confidenceEvidence),r=n.modeledTarget??n.reality;return`<button type="button" class="sl-confirm-confidence" aria-label="Open seat confidence passport for ${C(i.displayLabel??i.label)}"><span><em>${C(e)}</em><strong>${C(n.headline)}</strong><small>${C(r)}</small></span><b>Passport</b></button>`}function Y(i){let e=i?.rowLabel,t=i?.sectionLabel;if(!e||!t)return e;for(let n of["-"," ","\xB7","/","_"]){let r=`${t}${n}`;if(e.startsWith(r)&&e.length>r.length)return e.slice(r.length)}return(0,Se.compactRowLabel)(e,t)}function Rd(i){switch(i){case"paused":return{title:b("picker.accessPausedTitle","These seats are on hold right now"),body:b("picker.accessPausedBody","The organizer has paused this selection. Try again in a few minutes."),action:b("picker.accessRetry","Try again")};case"revoked":return{title:b("picker.accessRevokedTitle","This access link is no longer active"),body:b("picker.accessRevokedBody","Ask whoever sent you here for a new link to keep booking these seats."),action:b("picker.accessRefresh","Refresh")};case"no_token":case"provider_failed":return{title:b("picker.accessExpiredTitle","The seat map timed out"),body:b("picker.accessExpiredBody","Any seats you\u2019re holding stay held. Refresh to see what\u2019s available now."),action:b("picker.accessRefresh","Refresh")};default:return{title:b("picker.accessInvalidTitle","We couldn\u2019t verify your access"),body:b("picker.accessInvalidBody","You can still book anything shown as available. Contact whoever sent you here for access to the rest."),action:b("picker.accessRefresh","Refresh")}}}var Id=6;function oo(i,e,t){let n=Jn;return[i?.sectionLabel?`<div class="sl-confirm-field sl-confirm-sec${i.sectionLabel.length>Id?" sl-confirm-sec-long":""}"><span class="sl-confirm-key">${b("picker.section","Section")}</span><span class="sl-confirm-value">${n(i.sectionLabel)}</span></div>`:"",i?.rowLabel||i?.objectType==="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${n(t)}</span><span class="sl-confirm-value">${n(Y(i)??i?.displayLabel??e)}</span></div>`:"",i?.objectType!=="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${b("picker.seat","Seat")}</span><span class="sl-confirm-value">${n(i?.seatNumber??i?.displayLabel??e)}</span></div>`:""].filter(Boolean).join("")}function ao(i,e,t){let n=Jn,r=i?.objectType==="booth",s=i?.objectType==="table"&&!!i?.bookingMode,o=r||s||!i?.seatNumber,a=i?.sectionLabel??(o?void 0:i?.displayLabel),l=s?`${b("picker.guests","Guests")} ${i?.bookingMode==="variable"?`${i?.minOccupancy}\u2013${i?.maxOccupancy}`:i?.capacity}`:void 0,d=(o?[l,a?i?.rowLabel??i?.displayLabel:void 0]:[i?.rowLabel?`${t} ${Y(i)??""}`.trim():void 0,`${b("picker.seat","Seat")} ${i?.seatNumber??e}`]).filter(Boolean).join(" \xB7 ");return(a?`<span class="sl-confirm-place">${n(a)}</span>`:"")+(d?`<span class="sl-confirm-pos">${a?" \xB7 ":""}${n(d)}</span>`:"")+(a||d?"":`<span class="sl-confirm-pos">${n(e)}</span>`)}function lo(i,e){if(!i)return"";let t=e?b("picker.viewFromThisSeat","View from this seat"):b("picker.seeItIn3d","See it in 3D");return`<button type="button" class="sl-confirm-pill sl-confirm-3dpill" aria-label="${t}" title="${t}"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2l9 5v10l-9 5-9-5V7z"/><path d="M12 12l9-5M12 12v10M12 12L3 7"/></svg><span aria-hidden="true">3D</span></button>`}function co(i,e){if(!i||e)return"";let t=b("picker.seeItIn3d","See it in 3D");return`<button type="button" class="sl-confirm-3drow" aria-label="${t}" title="${t}"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2l9 5v10l-9 5-9-5V7z"/><path d="M12 12l9-5M12 12v10M12 12L3 7"/></svg><span aria-hidden="true">3D</span></button>`}function Js(i){return i.buyerMessage?.trim()||(i.restriction==="companion"?b("picker.companionRequiresWheelchair","Requires the adjacent wheelchair place"):void 0)}function po(i,e,t){let n=Jn;if(i.length>1)return`<fieldset class="sl-confirm-tiers"><legend>${b("picker.ticketType","Ticket type")}</legend>`+i.map(o=>{let a=Js(o);return`<button type="button" class="sl-confirm-tier" data-confirm-tier="${n(o.id)}" aria-pressed="${o.id===e}"><span class="sl-confirm-tier-copy"><span class="sl-confirm-tier-name">${n(o.name)}</span>`+(a?`<small class="sl-confirm-tier-note">${n(a)}</small>`:"")+`</span><span class="sl-confirm-tier-price">${n(t(o))}</span></button>`}).join("")+"</fieldset>";let r=i[0],s=r?Js(r):void 0;return s?`<p class="sl-confirm-tier-note">${n(s)}</p>`:""}function ho(i){return`<span class="sl-seccard-dot" style="background:${C(i.color)}"></span><span class="sl-seccard-name">${C(i.label)}</span><span class="sl-seccard-left" data-full="${C(i.leftLabel)}" data-short="${C(i.leftShortLabel??i.leftLabel)}">${C(i.leftLabel)}</span>`+i.nav+i.close}function uo(i){return`<div class="sl-seccard-head"><span class="sl-seccard-dot" style="background:${C(i.color)}"></span><span class="sl-seccard-name">${C(i.label)}</span>`+(i.showPrice?`<span class="sl-seccard-price">${C(i.priceLabel)}</span>`:"")+i.close+`</div><div class="sl-seccard-zone">${i.zoneLabel?`${C(i.zoneLabel)} \xB7 `:""}<span class="sl-seccard-left">${C(i.leftLabel)}</span></div>`+(i.entrance?`<div class="sl-seccard-entrance">${C(i.entrance)}</div>`:"")+(i.mix?`<div class="sl-seccard-mix">${i.mix}</div>`:"")+`<div class="sl-seccard-foot"><button type="button" class="sl-seccard-overview">\u2190 ${C(i.overviewLabel)}</button>`+i.nav+`<span class="sl-seccard-hint">${C(i.hint)}</span></div>`}function mo(i){return`<span class="sl-seccard-mix-item${i.dim?" sl-dim":""}"><span class="sl-seccard-mix-dot" style="background:${C(i.color)}"></span>${C(i.label)} <span class="sl-seccard-mix-price">${C(i.rangeLabel)}</span></span>`}function fo(i){return'<div class="sl-confirm-grid">'+i.identityFields+`</div><div class="sl-confirm-cat"><span class="sl-confirm-cat-name">${C(i.categoryLabel)}</span>`+(i.priceLabel?`<span class="sl-confirm-price">${C(i.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-id">'+i.marker+`<span class="sl-confirm-dot" style="background:${C(i.categoryColor)}" aria-hidden="true"></span><span class="sl-sr">${C(i.categoryLabel)}</span><span class="sl-confirm-who">`+i.identity+"</span>"+(i.priceLabel?`<span class="sl-confirm-idprice">${C(i.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-body">'+i.tierChoices+i.groupDates+i.wheelchair+i.commercial+(i.thumb||i.see3dPill?`<div class="sl-confirm-strip">${i.thumb}<span class="sl-confirm-pills">${i.see3dPill}</span></div>`:"")+i.inspect+'<div class="sl-confirm-row">'+(i.see3dRow??"")+`<button type="button" class="sl-confirm-cancel">${C(i.cancelLabel)}</button><button type="button" class="sl-confirm-add"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12.5l4 4L19 7"/></svg><span class="sl-confirm-add-t">${C(i.selectLabel)}</span></button></div></div>`}function go(i,e){let t=D,{variable:n}=e;return`<section class="sl-table-dialog" role="dialog" aria-modal="true" aria-labelledby="sl-table-title" aria-describedby="sl-table-copy"><div class="sl-table-head"><div class="sl-table-eyebrow">${t(n?(0,Se.t)("picker.flexiblePartyTypeWord",{typeWord:e.typeWord}):(0,Se.t)("picker.wholeTypeWord",{typeWord:e.typeWord}))}</div><h2 class="sl-table-title" id="sl-table-title">${t(i.displayLabel??i.label)}</h2><p class="sl-table-copy" id="sl-table-copy">${t(n?b("picker.chooseGuestsCopy","Choose how many guests will sit together. This table is held exclusively for your party."):(0,Se.t)("picker.allPlacesBookedTogether",{count:i.capacity}))}</p></div><div class="sl-table-body"><div class="sl-table-summary"><span>${t(e.categoryLabel)}</span>`+(e.suppressPricing?"":`<b data-table-unit>${t((0,Se.t)("picker.perGuestPrice",{price:e.unitPrice}))}</b>`)+`<span class="muted">${t(b("picker.tableCapacity","Table capacity"))}</span><span>${t((0,Se.t)("picker.guestsCount",{count:i.capacity}))}</span>`+(e.suppressPricing?"":`<span class="muted">${t(b("picker.total","Total"))}</span><b data-table-total></b>`)+"</div>"+(n?`<label class="sl-table-qtylabel" id="sl-table-qty-label">${t(b("picker.numberOfGuests","Number of guests"))}</label><div class="sl-table-stepper" role="group" aria-labelledby="sl-table-qty-label"><button type="button" data-table-step="-1" aria-label="${t(b("picker.fewerGuests","Fewer guests"))}">\u2212</button><output aria-live="polite" data-table-qty>${i.quantity}</output><button type="button" data-table-step="1" aria-label="${t(b("picker.moreGuests","More guests"))}">+</button></div><div class="sl-table-range">${t((0,Se.t)("picker.chooseMinMaxGuests",{min:i.minOccupancy,max:i.maxOccupancy}))}</div>`:`<input type="hidden" data-table-qty value="${i.capacity}">`)+`<div class="sl-table-actions"><button type="button" class="sl-table-cancel">${t((0,Se.t)("common.cancel"))}</button><button type="button" class="sl-table-confirm">${t(e.held?b("picker.updateTable","Update table"):n?b("picker.selectTable","Select table"):b("picker.selectWholeTable","Select whole table"))}</button></div></div></section>`}function bo(i,e){let t=Rd(i),n=document.createElement("div");n.className="sl-interrupt sl-access",n.setAttribute("role","status"),n.setAttribute("aria-live","polite");let r=document.createElement("div");r.className="sl-interrupt-card";let s=document.createElement("div");s.className="sl-interrupt-title",s.textContent=t.title;let o=document.createElement("div");o.className="sl-interrupt-body",o.textContent=t.body,r.append(s,o);let a=document.createElement("div");a.className="sl-interrupt-actions";let l=document.createElement("button");l.type="button",l.className="sl-interrupt-act";let c=document.createElement("span");c.className="sl-interrupt-act-icon",c.setAttribute("aria-hidden","true"),c.textContent="\u21BB";let d=document.createElement("span");return d.textContent=t.action,l.append(c,d),l.addEventListener("click",async()=>{n.classList.add("is-reloading"),l.disabled=!0;try{await e()}catch{}finally{n.isConnected&&(n.classList.remove("is-reloading"),l.disabled=!1)}}),a.appendChild(l),r.appendChild(a),n.appendChild(r),n}function yo(i){return i.map(e=>`<button type="button" role="switch" class="sl-a11yrow${e.className?` ${e.className}`:""}${e.on?" on":""}" data-a11y-row="${C(e.key)}" aria-checked="${e.on}" aria-pressed="${e.on}"`+(e.disabled?' disabled aria-disabled="true"':"")+`><span class="sl-a11yrow-i" aria-hidden="true">${C(e.icon)}</span><span class="sl-a11yrow-t"><span class="sl-a11yrow-l">${C(e.label)}</span>`+(e.note?`<span class="sl-a11yrow-n">${C(e.note)}</span>`:"")+"</span>"+(e.count?`<span class="sl-a11yrow-c">${C(e.count)}</span>`:"")+'<span class="sl-a11yrow-s" aria-hidden="true"></span></button>').join("")}function vo(i){let e=document.createElement("div");e.className="sl-floors on",e.setAttribute("role","group"),e.setAttribute("aria-label",i.tf("picker.chooseLevel","Choose level"));let t=[{id:"",name:i.tf("picker.allFloors","All floors")},...i.floors.map(s=>({id:s.id,name:s.name}))];for(let s of t){let o=document.createElement("button");o.type="button",o.dataset.floor=s.id,o.textContent=s.name,o.setAttribute("aria-pressed","false"),o.addEventListener("click",()=>i.onChoose(s.id)),e.appendChild(o)}let n=document.createElement("button");n.type="button",n.className="sl-floor-info",n.textContent="i";let r=i.tf("picker.floorHelp","All floors shows the complete venue. Choose one level to inspect and select its seats.");return n.setAttribute("aria-label",r),n.title=r,e.appendChild(n),e}function wo(i,e,t){if(!i)return;let n=t?"":e;i.querySelectorAll("button[data-floor]").forEach(r=>{r.setAttribute("aria-pressed",String(r.dataset.floor===n))})}var Te=require("@seatlayer/core");var cn=class{constructor(e){this.el=null;this.current=null;this.collapsed=!1;this.shownAt=0;this.host=e}get summary(){return this.current}adopt(e){this.current=e}get element(){return this.el}show(e){if(e&&e.id!==this.current?.id&&this.host.collapseSheet(),this.current=e,!e){this.el?.remove(),this.el=null,this.host.refreshMinimap();return}this.collapsed=this.host.controller.getRung()==="seats",this.shownAt=Date.now(),this.render(e),this.host.refreshMinimap()}wireNavigation(e){e.querySelectorAll("[data-section-nav]").forEach(t=>{t.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation();let r=t.dataset.sectionNav;r&&this.host.controller.focusSection(r)})})}render(e){let t=this.host.map();if(!t)return;if(this.host.root()?.dataset.layout==="narrow"){this.el?.remove(),this.el=null;return}let n=e.categories.length?e.categories.map(h=>{let g=this.host.controller.doc?.categories.find(y=>y.key===h.key);return g?this.host.catPriceRange(g):{min:h.priceMin,max:h.priceMax}}).filter(h=>h!=null):[{min:e.priceMin,max:e.priceMax}],r=Math.min(...n.map(h=>h.min)),s=Math.max(...n.map(h=>h.max)),o=r===s?this.host.money(r):`${this.host.money(r)}\u2013${this.host.money(s)}`,a=(0,Te.tCount)("picker.seatsLeftInSection",e.seatsLeft),l=(0,Te.t)("picker.seatsLeftShort",{count:e.seatsLeft}),c=`<button type="button" class="sl-seccard-x" aria-label="${(0,Te.t)("picker.closeSectionSummary")}">\u2715</button>`,d=no(this.host.sectionNeighbours(e.id)),p={label:e.label,color:e.color,leftLabel:a,leftShortLabel:l,nav:d,close:c};this.el?.remove();let u=document.createElement("div");if(this.collapsed)u.className="sl-seccard mini on",u.setAttribute("role","button"),u.setAttribute("aria-label",(0,Te.t)("picker.sectionSummaryAria",{label:e.label})),u.innerHTML=ho(p),this.wireNavigation(u),u.addEventListener("click",h=>{h.target.closest(".sl-seccard-x")||(this.collapsed=!1,this.shownAt=Date.now(),this.render(e))}),u.querySelector(".sl-seccard-x").addEventListener("click",()=>this.host.controller.overview()),(this.host.region("top-center")??t).appendChild(u);else{u.className="sl-seccard on",u.setAttribute("role","dialog"),u.setAttribute("aria-label",(0,Te.t)("picker.sectionSummaryAria",{label:e.label}));let h=this.host.priceBandKeys(),g=this.host.suppressPricing(),y=e.categories.map(S=>{let k=this.host.controller.doc?.categories.find(f=>f.key===S.key),v=k?this.host.catPriceRange(k):{min:S.priceMin,max:S.priceMax};return mo({label:S.label,color:S.color,dim:h!=null&&!h.has(S.key),rangeLabel:g?"":v&&v.min!==v.max?`${this.host.money(v.min)}\u2013${this.host.money(v.max)}`:this.host.money(v?.min??S.price)})}).join("");u.innerHTML=uo({...p,priceLabel:o,showPrice:!g&&e.categories.length>0,zoneLabel:e.zoneLabel,entrance:e.entrance?`${(0,Te.t)("picker.entrance")} ${e.entrance}`:void 0,mix:y,overviewLabel:(0,Te.t)("picker.overview"),hint:(0,Te.t)("picker.tapSeatHint")}),this.wireNavigation(u),u.querySelector(".sl-seccard-x").addEventListener("click",()=>this.host.controller.overview()),u.querySelector(".sl-seccard-overview").addEventListener("click",()=>this.host.controller.overview()),(this.host.region("top-center")??t).appendChild(u)}this.el=u}collapse(){!this.el||this.collapsed||!this.current||(this.collapsed=!0,this.render(this.current))}onView(){if(!(!this.el||this.collapsed||!this.current)){if(this.host.controller.getRung()==="seats"){this.collapse();return}if(Date.now()-this.shownAt<1400){this.coverage()>.25&&this.collapse();return}this.collapse()}}coverage(){let e=this.el,t=this.current,n=this.host.map();if(!e||!t||!n)return 0;let r=this.host.activeFloorObjects().find(v=>v.type==="section"&&v.id===t.id)?.outline;if(!r||r.length<3)return 0;let s=r.map(v=>this.host.controller.worldToScreen(v)),o=s.map(v=>v.x),a=s.map(v=>v.y),l=Math.min(...o),c=Math.min(...a),d=Math.max(...o)-l,p=Math.max(...a)-c;if(d<=0||p<=0)return 0;let u=n.getBoundingClientRect(),h=e.getBoundingClientRect(),g=h.left-u.left,y=h.top-u.top,S=Math.max(0,Math.min(g+h.width,l+d)-Math.max(g,l)),k=Math.max(0,Math.min(y+h.height,c+p)-Math.max(y,c));return S*k/(d*p)}};var nt=require("@seatlayer/core"),qo=require("@seatlayer/core/core/color");var je=require("@seatlayer/core");function nr(i,e,t){try{return new Intl.DateTimeFormat(e,{...t,...i.timezone?{timeZone:i.timezone}:{}}).format(new Date(i.startsAt))}catch{return new Date(i.startsAt).toLocaleString(e)}}var dn=(i,e)=>nr(i,e,{dateStyle:"medium"}),pn=(i,e)=>nr(i,e,{timeStyle:"short"}),hn=(i,e)=>nr(i,e,{weekday:"short",day:"numeric",month:"short"});function xo(i,e,t,n){return!i.length||i.length>=e?null:{summary:n,labels:i.map(r=>`${dn(r,t)} \xB7 ${pn(r,t)}`)}}function Od(i,e){let t=new Set(e);return i.map(n=>({...n,free:!t.has(n.eventKey)}))}function ko(i,e){let t=[...i];if(t.length<=1)return t[0]??"";try{return new Intl.ListFormat(e,{style:"long",type:"conjunction"}).format(t)}catch{return t.join(", ")}}function _d(i,e,t="",n=!1){if(!i.length)return"";let r=i.map(s=>{let o=s.free?e.free:e.blocked,a=n&&s.free?`<input class="sl-night-choice" type="checkbox" data-pg-event-key="${C(s.eventKey)}" aria-label="${C(`${s.shortDate}: ${o}`)}" checked>`:"";return`<li class="sl-night${s.free?" ok":" no"}" aria-label="${C(`${s.shortDate}: ${o}`)}">`+a+`<i class="sl-night-dot" aria-hidden="true"></i><span class="d">${C(s.shortDate)}</span><span class="st">${C(o)}</span></li>`}).join("");return`<div class="sl-tip-nights"><div class="sl-tip-nights-title">${C(e.title)}</div><ul class="sl-nightstrip">${r}</ul><p class="sl-tip-nights-note">${C(e.notAvailableOn)}</p>`+t+"</div>"}function Dd(i){return i.selectPartialLabel&&i.pinned?`<button type="button" class="sl-tip-switch" data-pg-select-partial>${C(i.selectPartialLabel)}</button>`:i.switchLabel&&i.pinned?`<button type="button" class="sl-tip-switch" data-pg-switch-mode>${C(i.switchLabel)}</button>`:i.switchLabel||i.selectPartialLabel?"":`<p class="sl-tip-advice">${C(i.advice)}</p>`}function Nd(i){return Number(i.available)+Number(i.selected)+Number(i.partial)+Number(i.unavailable)}function So(i,e,t){if(Nd(i)<2)return"";let n=(s,o,a="")=>`<li class="sl-pg-legend-item"><i class="sl-pg-sw ${s}"${a}></i>${C(o)}</li>`,r=[];return i.available&&r.push(n("sl-pg-sw-free",e.available,` style="background:${C(t)}"`)),i.selected&&r.push(n("sl-pg-sw-sel",e.selected)),i.partial&&r.push(n("sl-pg-sw-split",e.partial,` style="--sl-pg-sw-cat:${C(t)}"`)),i.unavailable&&r.push(n("sl-pg-sw-off",e.unavailable)),`<ul class="sl-pg-legend-list" aria-label="${C(e.title)}">${r.join("")}</ul>`}function To(i,e){if(!i.length)return"";let t=i.map(n=>{let r=n.labels.length?n.labels.join(", "):e.empty;return`<li class="sl-pg-night-row${n.labels.length?"":" empty"}${n.active?" active":""}" role="button" tabindex="0"${n.active?' aria-current="true"':""} data-event-key="${C(n.eventKey)}"><span class="n">${C(n.name)}</span><span class="s">${C(r)}</span></li>`}).join("");return`<div class="sl-pg-nights" role="group" aria-label="${C(e.title)}"><div class="sl-pg-nights-title">${C(e.title)}</div><ul class="sl-pg-nights-list">${t}</ul></div>`}function rr(i,e){if(i?.kind!=="partial"||!e?.length)return null;let t=i.data?.blockedEventKeys??[],n=Od(e,t);return{states:n,missing:n.filter(r=>!r.free).map(r=>r.shortDate)}}function Co(i,e){return i?_d(i.states,{title:b("picker.group.partlyAvailableTitle","Free on some nights only"),free:b("picker.group.nightFree","Free"),blocked:b("picker.group.nightBlocked","Not available"),notAvailableOn:(0,je.t)("picker.group.notAvailableOn",{dates:ko(i.missing,e.locale)})},Dd({switchLabel:e.switchLabel??null,selectPartialLabel:e.selectPartialLabel??null,pinned:e.pinned,advice:b("picker.group.pickSeatFreeEveryNight","Pick a seat that is free every night.")}),!!e.selectPartialLabel&&!!e.pinned):""}function Bd(i,e,t,n){if(!i.length)return"";let r=new Set(e),s=new Set(t),o=i.map(a=>{let l=r.has(a.eventKey);return`<li class="sl-confirm-date${l?"":" blocked"}"><label><input type="checkbox" data-pg-confirm-event-key="${C(a.eventKey)}" aria-label="${C(`${a.shortDate}: ${l?n.available:n.unavailable}`)}"${l&&s.has(a.eventKey)?" checked":""}${l?"":" disabled"}><span class="sl-confirm-date-label">${C(a.shortDate)}</span><span class="sl-confirm-date-state">${C(l?n.available:n.unavailable)}</span></label></li>`}).join("");return`<fieldset class="sl-confirm-dates" data-pg-confirm-dates><legend>${C(n.title)}</legend><p class="sl-confirm-dates-copy">${C(n.copy)}</p><label class="sl-confirm-date-all"><input type="checkbox" data-pg-confirm-all><span>${C(n.selectAll)}</span></label><ul>${o}</ul><p class="sl-confirm-dates-summary" data-pg-confirm-summary aria-live="polite"></p></fieldset>`}function Eo(i,e,t,n){let r=e.availableEventKeys(t);return Bd(i,r,e.includedEventKeys(),{title:n("picker.group.confirmDatesTitle","Choose performance dates"),copy:r.length===i.length?n("picker.group.confirmAllDatesCopy","This seat is available for all {count} dates. Keep all selected, or remove dates you do not want.").replace("{count}",String(i.length)):n("picker.group.confirmPartialDatesCopy","This seat is available for {available} of {total} dates. Choose one date or keep every available date.").replace("{available}",String(r.length)).replace("{total}",String(i.length)),selectAll:n("picker.group.confirmSelectAll","Select all available dates"),available:n("picker.group.nightFree","Available"),unavailable:n("picker.group.nightBlocked","Unavailable")})}function Ao(i){return[...i.querySelectorAll("[data-pg-confirm-event-key]")].filter(e=>e.checked&&!e.disabled).map(e=>e.dataset.pgConfirmEventKey).filter(Boolean)}function Po(i,e,t,n){let r=[...i.querySelectorAll("[data-pg-confirm-event-key]")];if(!e||!r.length)return;let s=i.querySelector(".sl-confirm-add"),o=i.querySelector("[data-pg-confirm-all]"),a=()=>{let l=r.filter(p=>!p.disabled),c=Ao(i).length;o&&(o.checked=c===l.length,o.indeterminate=c>0&&c<l.length);let d=i.querySelector("[data-pg-confirm-summary]");d&&(d.textContent=c===l.length?t("picker.group.confirmAllSelected","All {count} available dates are selected.").replace("{count}",String(c)):t("picker.group.confirmSelectedOfAvailable","{selected} of {available} available dates selected.").replace("{selected}",String(c)).replace("{available}",String(l.length))),s.disabled=c===0,s.textContent=c?e.label(c):t("picker.group.confirmChooseOne","Choose at least 1 date"),n()};r.forEach(l=>l.addEventListener("change",a)),o?.addEventListener("change",()=>{r.filter(l=>!l.disabled).forEach(l=>{l.checked=o.checked}),a()}),a()}async function Mo(i,e,t){if(!i||!t||!i.querySelector("[data-pg-confirm-event-key]"))return!0;let n=Ao(i);if(!n.length)return!1;let r=i.querySelector(".sl-confirm-add");return r?.setAttribute("aria-busy","true"),r&&(r.disabled=!0),await t.apply(e,n)?!0:(r?.removeAttribute("aria-busy"),r?.isConnected&&(r.disabled=!1),!1)}function Lo(i,e,t){return i?(0,je.t)("picker.group.seatPartlyAvailable",{label:e,free:i.states.length-i.missing.length,total:i.states.length,dates:ko(i.missing,t)}):""}function Ho(i,e){let t=i.map((n,r)=>{let s=n.state==="done"?e.done:n.state==="current"?e.current:e.upcoming;return`<li class="sl-pg-step-item" data-step="${C(n.id)}" data-state="${C(n.state)}"${n.state==="current"?' aria-current="step"':""}><span class="i" aria-hidden="true">${n.state==="done"?"\u2713":String(r+1)}</span><span class="l">${C(n.label)}</span><span class="sl-pg-sr">${C(s)}</span></li>`}).join("");return`<ol class="sl-pg-steps" aria-label="${C(e.label)}">${t}</ol>`}function sr(i,e){return`<ul class="sl-pg-cards">${i.map(n=>`<li class="sl-pg-card" data-event-key="${C(n.eventKey)}"><span class="n">${C(n.name)}</span><time datetime="${C(n.iso)}"><span class="d">${C(n.date)}</span><span class="t">${C(n.time)}</span></time></li>`).join("")}</ul><p class="sl-pg-included">${C(e)}</p>`}function Ro(i){let e=i.rows.map(t=>`<li class="sl-pg-pane-row${t.labels.length?"":" empty"}" data-event-key="${C(t.eventKey)}"><span class="n">${C(t.name)}</span><span class="s">${C(t.labels.length?t.labels.join(", "):i.empty)}</span></li>`).join("");return`<div class="sl-pg-pane-title">${C(i.title)}</div><ul class="sl-pg-pane-list">${e}</ul>`+(i.note?`<p class="sl-pg-pane-note">${C(i.note)}</p>`:"")+(i.total?`<div class="sl-pg-pane-total"><span>${C(i.total.label)}</span><b>${C(i.total.amount)}</b></div>`:"")+(i.holdStatus?`<p class="sl-pg-hold-status" role="status">${C(i.holdStatus)}</p>`:"")}function Io(i){let e=Math.max(0,i);return`${Math.floor(e/6e4)}:${String(Math.floor(e/1e3)%60).padStart(2,"0")}`}function Oo(i,e){if(!i||i.seats<=0)return"";if(e==="same_seat"){let t=i.perPerformance??i.seats;return i.totalPerformances&&i.performances<i.totalPerformances?(0,je.tCount)("picker.group.performancesChosenOf",t,{chosen:i.performances,total:i.totalPerformances}):(0,je.tCount)("picker.group.seatsEveryPerformance",t)}return i.perPerformance!=null&&i.performancesChosen===i.performances?(0,je.tCount)("picker.group.seatsPerPerformance",i.seats,{per:i.perPerformance}):(0,je.tCount)("picker.group.performancesChosenOf",i.seats,{chosen:i.performancesChosen,total:i.performances})}function _o(i,e){i.querySelectorAll(".sl-pg-night-row[data-event-key]").forEach(t=>{let n=()=>e(t.dataset.eventKey);t.addEventListener("click",n),t.addEventListener("keydown",r=>{r.key!=="Enter"&&r.key!==" "||(r.preventDefault(),n())})})}var Do=require("@seatlayer/core");function Ce(i){return String(i??"\u2014").replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[e])}function Fd(i,e){let t=i.objectType==="table"&&!!i.bookingMode,n=i.objectType==="booth",r=t||n||!i.seatNumber,s=r?i.rowLabel??i.displayLabel??i.label:i.seatNumber,o=t?`${b("picker.guests","Guests")} ${i.bookingMode==="variable"?`${i.minOccupancy}\u2013${i.maxOccupancy}`:i.capacity}`:!n&&i.rowLabel?`${e} ${Y(i)??""}`.trim():"";return`<div class="sl-tip-head"><div class="sl-tip-id"><span class="sl-tip-seat${r?" name":""}">${Ce(s)}</span>`+(o?`<span class="sl-tip-row">${Ce(o)}</span>`:"")+"</div>"+(i.sectionLabel?`<div class="sl-tip-sec"><span class="sl-tip-eyebrow">${b("picker.section","Section")}</span><span class="sl-tip-secname">${Ce(i.sectionLabel)}</span></div>`:"")+"</div>"}function No(i,e){let t=i.status==="not_for_sale",n=i.mark?.kind==="partial",r=i.status==="free"||n?"":`<span class="sl-tip-tag">${t?b("picker.notAvailable","Not available"):i.status==="held"?(0,Do.t)("map.statusHeld"):b("picker.sold","Sold")}</span>`,s=t?"":e.price,o=s?`<span class="sl-tip-amt">${Ce(s)}</span>`:"",a=!s&&e.priceNote?`<div class="sl-tip-note">${Ce(e.priceNote)}</div>`:"",l=Ie(i.commercial),c=l?`<div class="sl-tip-cx"><span class="g" aria-hidden="true">\u25D0</span>${Ce(l)}</div>`:"",d=Dt(i.wheelchairSpaceType),p=d?`<div class="sl-tip-cx"><span class="g" aria-hidden="true">\u267F</span>${Ce(d)}</div>`:"",u=e.reason?`<div class="sl-tip-reason">${Ce(e.reason)}</div>`:"";return'<i class="sl-tip-rail" aria-hidden="true"></i>'+Fd(i,e.rowTypeWord)+`<div class="sl-tip-cat"><span class="sl-tip-dot" style="background:${Ce(i.categoryColor)}"></span><span class="sl-tip-name">${Ce(i.categoryLabel)}</span>`+r+o+"</div>"+a+u+p+c+(e.extra??"")}function Bo(i,e,t,n){let r=i.x+14,s=i.y-n.height-12,o=i.y+18,a=s;r+n.width>e-8&&(r=i.x-n.width-14),s<8&&o+n.height<=t-8&&(a=o);let l=Math.max(8,t-n.height-8);return{left:Math.max(8,Math.min(r,Math.max(8,e-n.width-8))),top:Math.max(8,Math.min(a,l))}}function Fo(i,e,t,n=22){let r=Math.max(8,Math.min(i.x-t.width/2,Math.max(8,e.width-t.width-8))),s=i.y-n-t.height,o=i.y+n;return s>=8?{left:r,top:s,placement:"above"}:o+t.height<=e.height-8?{left:r,top:o,placement:"below"}:{left:r,top:Math.max(8,Math.min(s<8?o:s,Math.max(8,e.height-t.height-8))),placement:s<8?"below":"above"}}var or=14,Vd=12,$d=12,zd=8;function Vo(i,e,t,n=Vd){let r=e.height-or-t.height,s=$d,o=r-n;if(o<=s)return{placement:"sheet",nudgeY:0};let a=(s+o)/2-i;return Math.abs(a)<=zd?{placement:"sheet",nudgeY:0}:{placement:"sheet",nudgeY:Math.round(a)}}function $o(i,e,t,n,r=0){let s=t.width/2+12,o=Math.max(s,Math.min(e.width-s,i.x)),a=i.y+r+t.height+24<=e.height,l=i.y-r<t.height+24&&a?"below":"above",c=l==="above"?i.y-r:i.y+r,d=n&&l==="above"?Math.max(t.height+24,c):c;return{left:o,top:Math.max(8,Math.min(e.height-8,d)),placement:l}}function zo(i,e,t){let n=i.querySelector("[data-pg-select-partial]"),r=[...i.querySelectorAll("[data-pg-event-key]")],s=()=>r.filter(a=>a.checked).map(a=>a.dataset.pgEventKey).filter(Boolean),o=()=>{if(!n)return;let a=s().length;n.disabled=a===0,n.textContent=e?.(a)??n.textContent};r.forEach(a=>{a.addEventListener("change",o);let l=a.closest(".sl-night");l?.classList.add("selectable"),l?.addEventListener("click",c=>{c.target!==a&&(a.checked=!a.checked,o())})}),n?.addEventListener("click",()=>{let a=s();a.length&&t?.(a)})}function it(i){let e=i?.displayType?.trim()||i?.rowType?.trim();return e||(i?.objectType==="table"?b("picker.table","Table"):i?.objectType==="booth"?b("picker.booth","Booth"):b("picker.row","Row"))}var jd="sl-confirm-scrim",Ud="--sl-scrim-mask";function Gd(i){let e=Math.round(i.x),t=Math.round(i.y);return`radial-gradient(circle at ${e}px ${t}px, transparent 0 56px, #000 88px)`}function jo(i,e,t,n){let r=i??document.createElement("div");return i||(r.className=jd),r.style.setProperty(Ud,Gd(n)),t.parentNode===e?r.nextSibling!==t&&e.insertBefore(r,t):r.parentNode!==e&&e.appendChild(r),r}function ar(i){return i?.remove(),null}var qd=360,Kd=160,Wd=700,Uo=450;function Go(){try{return globalThis.matchMedia?.("(pointer: coarse)").matches??!1}catch{return!1}}function Yd(i){return(0,qo.contrastRatio)("#ffffff",i)>=3?"#ffffff":"#0b0f19"}var un=class{constructor(e){this.el=null;this.seat=null;this.outsideTap=null;this.scrim=null;this.shownAt=0;this.lift=null;this.framing=null;this.mode="add";this.host=e}get element(){return this.el}set element(e){this.el=e}get candidate(){return this.seat}set candidate(e){this.seat=e}thumbHtml(e){let t=this.host.controller.doc;if(!t)return"";let n=_t(e)?e.viewUrl??"":"",r=tn(t);if(!n&&!r)return"";let s=n?null:nn(e,e.focalPoint??t.focalPoint);if(!n&&s==null)return"";let o=r&&s!=null?`<div class="sl-confirm-sight">${D((0,nt.t)("picker.sightline",{m:s}))}</div>`:"";if(!n)return o;let a=D((0,nt.t)("picker.viewFromSeat",{label:e.label})),l=D(this.host.tf("picker.viewFromHere","View from here"));return`<button type="button" class="sl-confirm-view sl-confirm-thumbwrap" aria-label="${a}"><img class="sl-confirm-thumb" alt="" /><span class="sl-confirm-thumb-badge">\u{1F52D} ${l}</span></button>`+o}show(e,t="add"){let n=this.host;this.mode=t;let r=this.seat?.id;this.el?.remove(),this.el=null,this.seat=e,n.root()?.setAttribute("data-confirming","true"),n.els().side?.toggleAttribute("inert",!0),Object.values(n.regions()).forEach(M=>M.toggleAttribute("inert",!0)),n.controller.setSelectionFocus(e.id),r&&r!==e.id&&n.controller.deselect([r]),n.hideTooltip();let s=n.controller.seatDetails(e.id),o=n.controller.doc?.categories.find(M=>M.key===e.categoryKey),a=s?.price??(o?.tiers?.length?o.tiers[0].price:o?.price),l=a!=null?n.paidPrice(e.categoryKey,s?.tierId??o?.tiers?.[0]?.id??null,a,e.label):void 0,c=oo(s,e.displayLabel??e.label,it(s)),d=s?.tiers??o?.tiers??[],p=s?.tierId??d[0]?.id,u=n.suppressPricing()?"":po(d,p,M=>n.money(n.paidPrice(e.categoryKey,M.id,M.price,e.label))),h=n.buyerView()==="venue3d",g=n.performanceGroup()?.confirmDateSelection??void 0,y=g?n.performanceGroup()?.nights?.()??[]:[],S=g?Eo(y,g,e.id,(M,A)=>n.tf(M,A)):"";this.shownAt=performance.now();let k=document.createElement("div");k.className="sl-confirm sl-mo-in",t==="remove"&&k.classList.add("sl-confirm-removing"),S&&k.classList.add("sl-confirm-group-dates"),k.setAttribute("role","dialog"),k.setAttribute("aria-label",(0,nt.t)("picker.confirmSeatLabel",{label:e.label}));let v=n.controller.getRenderer?.()?.categoryDisplayColor?.(e.categoryKey)??o?.color??"#6e7bff";k.style.setProperty("--sl-cat",v),k.style.setProperty("--sl-cat-ink",Yd(v));let f=String(s?.categoryLabel??o?.label??e.categoryKey),P=n.controller.categoryAvailability()[e.categoryKey],B=typeof P=="number"&&P>0?(0,nt.tCount)("picker.leftCount",P):"";k.innerHTML=fo({identityFields:c,identity:ao(s,e.displayLabel??e.label,it(s)),marker:pi(s?.wheelchairSpaceType),see3dPill:lo(n.canOffer3d(),h),categoryColor:v,categoryLabel:f,priceLabel:!n.suppressPricing()&&l!=null?n.money(l):"",categoryLeftLabel:B,tierChoices:u,groupDates:S,wheelchair:io(s?.wheelchairSpaceType),commercial:to(e.commercial),thumb:n.seatViewEnabled()&&n.buyerView()!=="venue3d"?this.thumbHtml(e):"",inspect:h?`<div class="sl-confirm-inspect-row">${so(e,n.suppressPricing()?`${s?.displayLabel??e.displayLabel??e.label}`:`${s?.displayLabel??e.displayLabel??e.label} \xB7 ${l==null?n.tf("picker.priceNotSupplied","Price not supplied"):n.money(l)}`,h)}${ro(e,h?n.view3dCompareSeatIds():null)}${ir(n.canOffer3d(),h)}</div>`:ir(n.canOffer3d(),h),see3dRow:co(n.canOffer3d(),h),cancelLabel:(0,nt.t)("common.cancel"),selectLabel:t==="remove"?n.tf("picker.removeSeat","Remove seat"):n.addSeatLabel(s?.objectType)}),t==="remove"&&k.querySelector(".sl-confirm-add svg path")?.setAttribute("d","M6 6l12 12M18 6L6 18"),n.els().map.appendChild(k),this.el=k;let E=k.querySelector(".sl-confirm-thumb"),O=E?.closest(".sl-confirm-thumbwrap")??null;if(E&&O){let M=!1,A=()=>{if(M||!O.isConnected)return;M=!0;let _=()=>{O.remove(),this.el===k&&n.reanchor()};if(n.reducedMotion()||typeof requestAnimationFrame!="function"){_();return}O.style.height=`${O.offsetHeight}px`,O.classList.add("sl-confirm-thumb-out"),requestAnimationFrame(()=>{O.style.height="0px",O.style.opacity="0"}),setTimeout(_,Kd)};E.addEventListener("error",A),E.addEventListener("load",()=>{E.naturalWidth||A()});let N=e.viewMeta?.previewUrl??e.viewUrl;N?n.resolveAssetUrl(N).then(_=>{if(!(!k.isConnected||this.el!==k)){if(!_){A();return}E.src=_}}).catch(_=>{A(),n.onError(_)}):A()}n.reanchor(),this.liftSeatClearOfSheet(e),k.querySelector(".sl-confirm-view")?.addEventListener("click",()=>{n.openSeatView(e)}),k.querySelector(".sl-confirm-confidence")?.addEventListener("click",M=>{n.openSeatConfidencePassport(e,M.currentTarget instanceof HTMLElement?M.currentTarget:null)}),k.querySelector(".sl-confirm-compare")?.addEventListener("click",()=>n.saveView3dComparisonSeat(e)),k.querySelectorAll("[data-confirm-tier]").forEach(M=>{M.addEventListener("click",()=>{let A=M.dataset.confirmTier,N=d.find(V=>V.id===A);if(!N)return;n.controller.setSeatTier(e.id,N.id),k.querySelectorAll("[data-confirm-tier]").forEach(V=>{V.setAttribute("aria-pressed",String(V===M))});let _=k.querySelector(".sl-confirm-price");_&&(_.textContent=n.money(n.paidPrice(e.categoryKey,N.id,N.price,e.label))),n.reanchor()})}),k.querySelectorAll(".sl-confirm-3d,.sl-confirm-3dpill,.sl-confirm-3drow").forEach(M=>{M.addEventListener("pointerdown",zi,{once:!0}),M.addEventListener("click",()=>{n.buyerView()==="venue3d"?(n.dismiss(),n.view3dHandle()?.flyToSeat(e.id)):(n.rememberView3dReturnSeat(e),n.dismiss(),n.enter3d(e.id))})}),Po(k,g,(M,A)=>n.tf(M,A),()=>n.reanchor()),k.querySelector(".sl-confirm-add").addEventListener("click",()=>{if(!this.ghostActivation()){if(this.mode==="remove"){this.removeCommitted();return}this.commit()}}),k.querySelector(".sl-confirm-cancel").addEventListener("click",()=>{this.ghostActivation()||this.cancel()}),this.armOutsideTap(k),requestAnimationFrame(()=>{let M=k.querySelector(".sl-confirm-add");M?.focus(),n.liftToastOverConfirm(),n.fitTranslatedRows(),n.inviteCommit(k,M)})}liftSeatClearOfSheet(e){let t=this.host.controller.getRenderer();this.framing={gestures:t?.getCameraGestureCount?.()??0,quietUntil:0},this.frameSeatForSheet(e)}frameSeatForSheet(e){let t=this.host,n=t.root();if(!this.el||n?.dataset.layout!=="narrow"||n?.dataset.view3d==="on")return;let r=t.els().map;if(!r)return;let s=t.controller.worldToScreen({x:e.x,y:e.y}),o=t.controller.getRenderer(),a=o?.getCameraGestureCount?.()??0,{nudgeY:l}=Vo(s.y,{height:r.clientHeight},{height:this.el.offsetHeight||230}),c=this.lift&&this.lift.gestures===a?this.lift.dy:0;if(!l){this.lift=c?{dy:c,gestures:a}:null;return}let d=!t.reducedMotion();o?.panScreenBy?.({x:0,y:l},{animate:d}),this.lift={dy:c+l,gestures:a},this.framing&&(this.framing.gestures=a,this.framing.quietUntil=d?this.now()+Wd:0)}reframeSeatForSheet(){let e=this.framing,t=this.seat;!e||!t||e.quietUntil&&this.now()<e.quietUntil||(this.host.controller.getRenderer()?.getCameraGestureCount?.()??e.gestures)!==e.gestures||this.frameSeatForSheet(t)}now(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}settleLift(){let e=this.lift;if(this.lift=null,this.framing=null,!e)return;let t=this.host.controller.getRenderer();(t?.getCameraGestureCount?.()??e.gestures)===e.gestures&&t?.panScreenBy?.({x:0,y:-e.dy},{animate:!this.host.reducedMotion()})}reanchor(){let e=this.host;if(!this.el||!this.seat||e.root()?.dataset.view3d==="on")return;let t=e.controller.worldToScreen({x:this.seat.x,y:this.seat.y}),n=e.els().map;if(e.root()?.dataset.layout==="narrow"){this.el.removeAttribute("data-placement"),this.el.style.removeProperty("bottom"),this.scrim=jo(this.scrim,n,this.el,t),Zr(this.el,t,n),e.liftToastOverConfirm(),this.reframeSeatForSheet();return}this.scrim=ar(this.scrim);let r=n.clientWidth,s=n.clientHeight,o=this.el.offsetWidth||276,a=this.el.offsetHeight||230,l=this.el.classList.contains("sl-confirm-group-dates"),c=e.controller.seatScreenRadius()*1.5,d=$o(t,{width:r,height:s},{width:o,height:a},l,c);this.el.dataset.placement=d.placement,this.el.style.left=`${d.left}px`,this.el.style.top=`${d.top}px`,Ni(this.el,t,{left:d.left,top:d.top,width:o,height:a})}ghostActivation(){return Go()?performance.now()-this.shownAt<Uo:!1}armOutsideTap(e){this.disarmOutsideTap();let t=this.host,n=s=>{if(this.el!==e){this.disarmOutsideTap();return}let o=s.target;!o||e.contains(o)||t.els().tray?.contains(o)||this.cancel()};this.outsideTap=n;let r=t.root();setTimeout(()=>{this.outsideTap===n&&(r??document).addEventListener("pointerdown",n,!0)},Go()?Uo:0)}disarmOutsideTap(){if(!this.outsideTap)return;let e=this.outsideTap;this.outsideTap=null,(this.host.root()??document).removeEventListener("pointerdown",e,!0),document.removeEventListener("pointerdown",e,!0)}dismiss(){let e=this.host;this.disarmOutsideTap(),this.scrim=ar(this.scrim),this.settleLift(),this.el&&Mt(this.el),this.el=null,this.seat=null,e.liftToastOverConfirm(),e.root()?.removeAttribute("data-confirming"),Object.values(e.regions()).forEach(t=>t.toggleAttribute("inert",!1)),e.applyPanelCollapsed(),e.controller.setSelectionFocus(null)}async commit(){let e=this.host,t=this.seat;if(!t)return;let r=this.el?.querySelector(".sl-confirm-add")??null;if(r?.classList.contains("is-adding")||!await Mo(this.el,t.id,e.performanceGroup()?.confirmDateSelection??void 0))return;e.collapseSectionCard(),this.seat=null,e.syncTray(),e.syncSelectionTo3d();let s=()=>{e.dismiss(),Gn(e.els(),e.controller.worldToScreen(t),t,e.controller.doc?.categories)};if(!r||e.reducedMotion()){s();return}r.classList.remove("sl-confirm-add-invite"),r.classList.add("is-adding"),r.setAttribute("aria-disabled","true");let o=r.querySelector(".sl-confirm-add-t");o&&(o.textContent=e.tf("picker.added","Added")),e.scheduleMotion(s,qd)}cancel(){let e=this.host,t=this.seat;t&&(this.mode!=="remove"&&e.controller.deselect([t.id]),this.seat&&e.dismiss(),e.syncSelectionTo3d(),e.root()?.focus({preventScroll:!0}))}removeCommitted(){let e=this.host,t=this.seat;t&&(e.controller.deselect([t.id]),e.dismiss(),e.syncTray(),e.syncSelectionTo3d(),e.root()?.focus({preventScroll:!0}))}};function Ko(i,e,t){if(!e||t)return;e.classList.add("sl-confirm-add-invite");let n=()=>e.classList.remove("sl-confirm-add-invite");i.addEventListener("pointerdown",n,{once:!0}),i.addEventListener("keydown",n,{once:!0}),e.addEventListener("focus",n,{once:!0})}function Wo(i,e){return i&&i!=="seat"?e("picker.select","Select"):e("picker.addSeat","Add seat")}var Yo=require("@seatlayer/core"),Nt=require("@seatlayer/core/picker/minimapGeometry");function Xd(i,e){return i.x<=e.x&&i.y<=e.y&&i.x+i.width>=e.x+e.width&&i.y+i.height>=e.y+e.height}function Xo(i,e){let t=new lr(i);return t.build(e),t}var lr=class{constructor(e){this.host=e;this.miniCanvas=null;this.miniBase=null;this.miniWrap=null;this.miniToggle=null;this.miniLabel=null;this.miniTf=null;this.miniDrag=null;this.miniSuppressClick=!1;this.userClosed=!1}dispose(){this.miniToggle?.remove(),this.miniWrap?.remove(),this.miniToggle=null,this.miniWrap=null,this.miniCanvas=null,this.miniBase=null,this.miniLabel=null,this.miniTf=null,this.miniDrag=null,this.host.root()?.removeAttribute("data-minimap-open")}build(e){if(!this.host.controller.getViewport())return;let n=document.createElement("button");n.type="button",n.className="sl-minimap-toggle",n.setAttribute("aria-label",b("picker.openVenueMap","Open venue overview map")),n.setAttribute("aria-expanded","false"),n.innerHTML='<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 6l5-2 8 3 5-2v13l-5 2-8-3-5 2zM8 4v13M16 7v13"/></svg>',e.appendChild(n),this.miniToggle=n;let r=document.createElement("div");r.className="sl-minimap",r.setAttribute("role","group");let s=document.createElement("div");s.className="sl-minimap-bar";let o=document.createElement("span");o.className="sl-minimap-label";let a=document.createElement("span");a.className="sl-minimap-key",a.setAttribute("aria-label",b("picker.minimapStateKey","Focused, selected, available, and inactive sections")),a.innerHTML='<i class="focused" title="Focused"></i><i class="selected" title="Selected"></i><i title="Available"></i><i class="inactive" title="Inactive"></i>';let l=document.createElement("button");l.type="button",l.className="sl-minimap-close",l.setAttribute("aria-label",b("picker.closeVenueMap","Close venue overview map")),l.textContent="\xD7",s.append(o,a,l);let c=document.createElement("canvas");c.tabIndex=0,c.setAttribute("role","application"),c.setAttribute("aria-label",b("picker.venueMapInstructions","Venue overview map. Drag the viewport, click a section, or use arrow keys to pan.")),r.append(s,c),e.appendChild(r),this.miniWrap=r,this.miniLabel=o,this.miniCanvas=c;let d=document.createElement("canvas");this.miniBase=d,n.addEventListener("click",()=>{let p=this.host.root()?.dataset.minimapOpen==="true";this.userClosed=p,this.setMinimapOpen(!p)}),l.addEventListener("click",()=>{this.userClosed=!0,this.setMinimapOpen(!1)}),c.addEventListener("click",p=>{if(this.miniSuppressClick){this.miniSuppressClick=!1;return}this.minimapJump(p)}),c.addEventListener("pointerdown",p=>this.minimapPointerDown(p)),c.addEventListener("pointermove",p=>this.minimapPointerMove(p)),c.addEventListener("pointerup",p=>this.minimapPointerUp(p)),c.addEventListener("pointercancel",p=>this.minimapPointerUp(p)),c.addEventListener("keydown",p=>this.minimapKeydown(p)),this.layoutMinimap(),this.syncMinimapLabel(),this.drawMinimapStatic(),this.drawMinimapRect()}setAutoOpen(e){if(this.miniWrap){if(!e){this.userClosed=!1,this.host.root()?.dataset.minimapOpen==="true"&&this.setMinimapOpen(!1,!1);return}this.userClosed||this.host.root()?.dataset.minimapOpen==="true"||this.setMinimapOpen(!0,!1)}}setMinimapOpen(e,t=!0){this.host.root()?.setAttribute("data-minimap-open",String(e)),this.miniToggle?.setAttribute("aria-expanded",String(e)),t&&(e?this.miniCanvas?.focus():this.miniToggle?.focus())}layoutMinimap(){let e=this.miniCanvas,t=this.miniBase,n=this.host.controller.getViewport()?.bounds;if(!e||!t||!n||!(n.width>0&&n.height>0))return;let r=196,s=146,o=6,a=n.width/Math.max(1,n.height),l=r,c=Math.round(r/a);c>s&&(c=s,l=Math.round(s*a)),l=Math.max(64,l),c=Math.max(48,c);let d=Math.min(2,window.devicePixelRatio||1);e.width=Math.round(l*d),e.height=Math.round(c*d),e.style.width=`${l}px`,e.style.height=`${c}px`,t.width=e.width,t.height=e.height,this.miniTf=(0,Nt.createMinimapTransform)(n,e.width,e.height,d,o)}syncMinimapLabel(){if(!this.miniLabel||!this.miniWrap)return;let e=this.host.controller.getFloors(),t=this.host.controller.isFloorOverview()?b("picker.allFloors","All floors"):e.find(d=>d.id===this.host.controller.getActiveFloorId())?.name??b("picker.venueOverview","Venue overview"),n=this.host.controller.getMinimapSnapshot().sections,s=n.find(d=>d.active)?.label??this.host.focusedSectionLabel(),o=s?`${t} \xB7 ${s}`:t;this.miniLabel.textContent=o;let a=n.filter(d=>d.state==="selected").length,l=n.filter(d=>d.state==="available").length,c=n.filter(d=>d.state==="inactive").length;this.miniWrap.setAttribute("aria-label",n.length?`${o}. ${a} selected, ${l} available, ${c} inactive sections.`:o),this.miniCanvas?.setAttribute("aria-label",n.length?`${o}. ${a} selected, ${l} available, ${c} inactive sections. ${b("picker.venueMapInstructions","The outlined region is the visible map area. Drag it, click a section, or use arrow keys to pan.")}`:`${o}. ${b("picker.venueMapInstructions","The outlined region is the visible map area. Drag it, click elsewhere, or use arrow keys to pan.")}`)}refreshMinimap(){this.miniBase&&(this.layoutMinimap(),this.syncMinimapLabel(),this.drawMinimapStatic(),this.drawMinimapRect())}drawMinimapStatic(){let e=this.miniBase,t=this.miniTf;if(!e||!t)return;let n=e.getContext("2d");if(!n)return;n.clearRect(0,0,e.width,e.height);let r=p=>p*t.scale+t.offX,s=p=>p*t.scale+t.offY,o=this.host.cssVar("--sl-line")||"rgba(139,147,167,.5)",a=this.host.cssVar("--sl-muted")||"#8b93a7",l=this.host.cssVar("--sl-accent")||"#6e7bff",c=this.host.cssVar("--sl-success")||"#22a06b",d=this.host.controller.getMinimapSnapshot();for(let p of d.sections){if(p.outline.length<3)continue;n.beginPath(),p.outline.forEach((h,g)=>g===0?n.moveTo(r(h.x),s(h.y)):n.lineTo(r(h.x),s(h.y))),n.closePath();let u=p.paint;if(n.globalAlpha=p.state==="inactive"?.5:.92,u?n.fillStyle=u.fill:(n.globalAlpha=p.state==="inactive"?.18:p.state==="selected"?.72:.34,n.fillStyle=p.state==="inactive"?a:p.state==="selected"?l:c),n.fill(),n.globalAlpha=.82,n.lineWidth=Math.max(1,t.dpr),n.strokeStyle=u?.stroke||o,n.stroke(),p.owned){n.globalAlpha=1,n.lineWidth=Math.max(2,t.dpr*1.5),n.strokeStyle=l,n.stroke();let h=p.outline.reduce((g,y)=>({x:g.x+y.x,y:g.y+y.y}),{x:0,y:0});n.beginPath(),n.arc(r(h.x/p.outline.length),s(h.y/p.outline.length),Math.max(1.5,t.dpr*1.6),0,Math.PI*2),n.fillStyle=l,n.fill(),n.beginPath(),p.outline.forEach((g,y)=>y===0?n.moveTo(r(g.x),s(g.y)):n.lineTo(r(g.x),s(g.y))),n.closePath()}p.active&&(n.globalAlpha=1,n.lineJoin="round",n.lineWidth=Math.max(4,t.dpr*3.5),n.strokeStyle=this.host.cssVar("--sl-surface")||"#fff",n.stroke(),n.lineWidth=Math.max(2,t.dpr*1.75),n.strokeStyle=l,n.stroke())}if(n.globalAlpha=1,!d.sections.length){let p=Math.max(1,t.dpr),u=this.host.controller.getRenderer?.(),h=new Map,g=y=>{let S=h.get(y);if(S)return S;let k=u?.categoryDisplayColor?.(y)||c;return h.set(y,k),k};for(let y of d.seats)n.globalAlpha=y.state==="inactive"?.22:.78,n.fillStyle=y.state==="inactive"?a:y.state==="selected"?l:g(y.categoryKey),n.beginPath(),n.arc(r(y.x),s(y.y),p,0,Math.PI*2),n.fill();n.globalAlpha=1}}drawMinimapRect(){let e=this.miniCanvas,t=this.miniBase,n=this.miniTf;if(!e||!t||!n)return;let r=e.getContext("2d");if(!r)return;r.clearRect(0,0,e.width,e.height),r.drawImage(t,0,0);let s=this.host.controller.getViewport();if(!s||Xd(s.visible,s.bounds))return;let o=(0,Nt.minimapViewportPlan)(s.visible,n,e.width,e.height,Math.max(2,n.dpr*2)),a=this.host.cssVar("--sl-text")||"#12151c",l=this.host.cssVar("--sl-surface")||"#fff";r.save(),r.globalAlpha=.1,r.fillStyle=a,r.fillRect(o.raw.x,o.raw.y,o.raw.width,o.raw.height),r.globalAlpha=.9,r.lineJoin="round",r.lineWidth=Math.max(4,n.dpr*3.25),r.strokeStyle=l,r.strokeRect(o.raw.x,o.raw.y,o.raw.width,o.raw.height),r.globalAlpha=1,r.lineWidth=Math.max(2,n.dpr*1.75),r.strokeStyle=a,r.strokeRect(o.raw.x,o.raw.y,o.raw.width,o.raw.height),o.clipped&&Object.values(o.clippedEdges).some(Boolean)&&(r.setLineDash([Math.max(3,n.dpr*3),Math.max(2,n.dpr*2)]),r.strokeRect(o.clipped.x,o.clipped.y,o.clipped.width,o.clipped.height)),r.restore()}minimapWorldPoint(e){let t=this.miniCanvas,n=this.miniTf;if(!t||!n)return null;let r=t.getBoundingClientRect(),s=(e.clientX-r.left)*(t.width/Math.max(1,r.width)),o=(e.clientY-r.top)*(t.height/Math.max(1,r.height));return{...(0,Nt.minimapPointToWorld)({x:s,y:o},n),px:s,py:o}}minimapPointerDown(e){let t=this.minimapWorldPoint(e),n=this.host.controller.getViewport()?.visible;!t||!n||!(t.x>=n.x&&t.x<=n.x+n.width&&t.y>=n.y&&t.y<=n.y+n.height)||(this.miniDrag={pointerId:e.pointerId,offsetX:t.x-(n.x+n.width/2),offsetY:t.y-(n.y+n.height/2),startX:e.clientX,startY:e.clientY,moved:!1},this.miniCanvas?.setPointerCapture(e.pointerId),this.miniCanvas?.classList.add("sl-dragging"),e.preventDefault())}minimapPointerMove(e){let t=this.miniDrag;if(!t||t.pointerId!==e.pointerId)return;let n=this.minimapWorldPoint(e);n&&(!t.moved&&Math.hypot(e.clientX-t.startX,e.clientY-t.startY)>2&&(t.moved=!0,this.host.controller.clearSectionFocus()),this.host.controller.panToWorld({x:n.x-t.offsetX,y:n.y-t.offsetY}),e.preventDefault())}minimapPointerUp(e){let t=this.miniDrag;!t||t.pointerId!==e.pointerId||(this.miniSuppressClick=t.moved,this.miniDrag=null,this.miniCanvas?.classList.remove("sl-dragging"),this.miniCanvas?.hasPointerCapture(e.pointerId)&&this.miniCanvas.releasePointerCapture(e.pointerId))}minimapKeydown(e){let t=this.host.controller.getViewport()?.visible;if(!t)return;if(e.key==="Home"){this.host.controller.overview(),e.preventDefault();return}let n=e.key==="ArrowLeft"?-t.width*.2:e.key==="ArrowRight"?t.width*.2:0,r=e.key==="ArrowUp"?-t.height*.2:e.key==="ArrowDown"?t.height*.2:0;!n&&!r||(this.host.controller.clearSectionFocus(),this.host.controller.panToWorld({x:t.x+t.width/2+n,y:t.y+t.height/2+r}),e.preventDefault())}minimapJump(e){let t=this.minimapWorldPoint(e);if(t){for(let n of this.host.controller.getMinimapSnapshot().sections)if(!(n.state==="inactive"||n.outline.length<3)&&(0,Yo.pointInPolygon)(t,n.outline)){this.host.controller.focusSection(n.id);return}this.host.controller.clearSectionFocus(),this.host.controller.panToWorld(t)}}};var mn=require("@seatlayer/core");var Qd=12;function Qo(i,e){let t=e.floors(),n=new Set(t.map(E=>E.label.trim().toLocaleLowerCase())),r=e.zones().filter(E=>E.seatCount>0&&!n.has(E.label.trim().toLocaleLowerCase())),s=e.sections().filter(E=>E.seatCount>0&&!n.has(E.label.trim().toLocaleLowerCase())),o=r.length>1?[]:s,a=t.length>1,l=r.length>1,c=o.length>1;if(!a&&!l&&!c)return null;let d=document.createElement("div");d.className="sl-view3d-nav";let p=null,u=document.createElement("button");u.type="button",u.className="sl-view3d-nav-toggle",u.setAttribute("aria-expanded","false");let h='<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M15.5 8.5l-2 5-5 2 2-5z"/></svg>',g=document.createElement("span");u.innerHTML=h,u.appendChild(g);let y=()=>{for(let E of d.querySelectorAll(":scope > div")){let O=E.querySelector('[aria-pressed="true"]');!O||E.scrollWidth<=E.clientWidth||O.scrollIntoView({block:"nearest",inline:"nearest"})}},S=()=>{if(p)return p;for(let E of d.querySelectorAll(":scope > div")){let O=E.querySelector('button[aria-pressed="true"]'),M=O?.textContent?.trim();if(M&&O?.dataset.floor!=="")return M}return a&&(l||c)?b("picker.levelsAndAreas","Levels & areas"):a?b("picker.levels","Levels"):b("picker.areas","Areas")},k=E=>{d.classList.toggle("is-open",E),u.setAttribute("aria-expanded",String(E)),E&&typeof requestAnimationFrame=="function"&&requestAnimationFrame(y),g.textContent=S()};u.addEventListener("click",()=>k(!d.classList.contains("is-open"))),d.addEventListener("keydown",E=>{E.key!=="Escape"||!d.classList.contains("is-open")||(E.preventDefault(),E.stopPropagation(),k(!1),u.focus())});let v=document.createElement("button");v.type="button",v.className="sl-view3d-nav-close",v.innerHTML='<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M18 6L6 18M6 6l12 12"/></svg>';let f=b("picker.closeVenueNavigation","Close venue navigation");v.setAttribute("aria-label",f),v.title=f,v.addEventListener("click",()=>{k(!1),u.focus()}),k(!1),d.appendChild(u);let P=E=>{},B=E=>{};if(a){let E=document.createElement("div");E.setAttribute("role","group"),E.setAttribute("aria-label",b("picker.levels","Levels"));let O=[];B=N=>{O.forEach(_=>{_.setAttribute("aria-pressed",String((_.dataset.floor===""?null:Number(_.dataset.floor))===N))})};let M=N=>{e.focusFloor(N)&&(B(N),P(N))},A=(N,_)=>{let V=document.createElement("button");V.type="button",V.textContent=N,V.dataset.floor=_===null?"":String(_),V.setAttribute("aria-pressed",String(_===null)),V.addEventListener("click",()=>{M(_),k(!1)}),O.push(V),E.appendChild(V)};A(b("picker.allLevels","All levels"),null);for(let N of t)A(N.label||(0,mn.t)("picker.levelNumber",{number:N.index+1}),N.index);d.appendChild(E)}if(l||c){let E=document.createElement("div");E.setAttribute("role","group"),E.setAttribute("aria-label",b("picker.areas","Areas"));let O=l?r.map(A=>({id:A.id,label:A.label||A.id,go:()=>{e.focusZone(A.id)}})):o.map(A=>({id:A.id,label:A.label||A.id,floorIndex:A.floorIndex,go:()=>{e.focusSection(A.id),Number.isFinite(A.floorIndex)&&B(A.floorIndex)}})),M=A=>{let N=l||A===null?O:O.filter(_=>_.floorIndex===void 0||_.floorIndex===A);if(E.replaceChildren(),!N.length){E.remove();return}if(E.isConnected||d.insertBefore(E,v.isConnected?v:null),!l&&N.length>Qd){let _=document.createElement("select");_.setAttribute("aria-label",b("picker.jumpToSection","Jump to section"));let V=document.createElement("option");V.value="",V.textContent=b("picker.jumpToSection","Jump to section"),_.appendChild(V);for(let Z of N){let q=document.createElement("option");q.value=Z.id,q.textContent=Z.label,_.appendChild(q)}_.addEventListener("change",()=>{N.find(Z=>Z.id===_.value)?.go()}),E.appendChild(_);return}for(let _ of N){let V=document.createElement("button");V.type="button",V.textContent=_.label,V.dataset.area=_.id,V.addEventListener("click",()=>{p=_.label,_.go(),k(!1)}),E.appendChild(V)}};P=M,M(null)}return d.appendChild(v),i.appendChild(d),d}var fn=class{constructor(e){this.host=e;this.chip=null}sync(){let e=this.host.overlay();if(!e||this.host.savedSeatIds().length===0){this.chip?.remove(),this.chip=null;return}let t=this.chip;if(!t){t=document.createElement("div"),t.className="sl-view3d-compare-saved",t.setAttribute("role","group"),t.setAttribute("aria-label",b("picker.savedSeatComparison","Saved seat comparison"));let s=document.createElement("button");s.type="button",s.className="main",s.addEventListener("click",()=>{this.host.savedSeatIds().length>1?this.host.openComparison():this.host.toast(b("picker.chooseAnotherToCompare","Choose another seat to compare."),"neutral")});let o=document.createElement("button");o.type="button",o.className="clear",o.textContent="\xD7",o.setAttribute("aria-label",b("picker.clearSavedSeatComparison","Clear saved seat comparison")),o.addEventListener("click",()=>this.host.clearComparison()),t.append(s,o),e.appendChild(t),this.chip=t}let n=this.host.savedSeatIds().length,r=t.querySelector(".main");r&&(r.textContent=n>1?(0,mn.t)("picker.compareCount",{count:n}):b("picker.oneSeatSaved","1 seat saved"),r.setAttribute("aria-label",n>1?(0,mn.t)("picker.openComparisonOfSeats",{count:n}):b("picker.oneSeatSavedChooseAnother","One seat saved; choose another to compare")))}remove(){this.chip?.remove(),this.chip=null}mainButton(){return this.chip?.querySelector(".main")??null}};function Zo(i){return!i?.querySelector('[data-ref="zfs"]')}var Jo="sl:sheet-hint";function ea(i){let e=i.boot;if(!e?.isConnected)return;if(i.reducedMotion){e.remove();return}e.classList.add("is-going"),setTimeout(()=>e.remove(),200);let t=document.createElement("div");t.className="sl-shells-in",t.setAttribute("aria-hidden","true"),i.map?.appendChild(t),setTimeout(()=>t.remove(),650),i.rail?.classList.add("is-in"),i.root?.classList.add("is-arriving"),setTimeout(()=>{i.rail?.classList.remove("is-in"),i.root?.classList.remove("is-arriving"),Zd(i.root)},900)}function Zd(i){if(!i||i.dataset.layout!=="narrow")return;try{if(window.sessionStorage.getItem(Jo))return;window.sessionStorage.setItem(Jo,"1")}catch{}let e=i.querySelector(".sl-sheet-grab");e&&(e.classList.add("sl-mo-hint"),e.addEventListener("animationend",()=>e.classList.remove("sl-mo-hint"),{once:!0}))}function ta(i,e){i.addEventListener("keydown",t=>{if(t.key==="Escape"){for(let n of e())if(n.open()){t.preventDefault(),t.stopPropagation(),n.close();return}}})}function gn(i){let e=i.committedSelection(),t=i.controller.getGAAreas(),n=i.hold?.items??[],r=new Set(n.map(u=>u.label)),s=rs(i,t,n),o=Ve(i.gaQty,n),a=n.reduce((u,h)=>u+i.paidPrice(h.categoryKey,h.tierId,h.unitPrice,h.label)*(h.quantity??1),0),l=n.reduce((u,h)=>u+(h.quantity??1),0),c=e.filter(u=>!r.has(u.label)),d=c.reduce((u,h)=>u+i.paidPrice(h.categoryKey,h.tierId??null,h.price,h.label)*(h.quantity??1),0)+s+a,p=c.reduce((u,h)=>u+(h.quantity??1),0)+o+l;return{seats:e,freshSeats:c,gaAreas:t,heldItems:n,heldLabels:r,heldCount:l,total:d,count:p}}function bn(i,e){let t=e.tiers?.length?e.tiers[0].price:e.price;return t===void 0||!e.key?t:i.paidPrice(e.key,e.tiers?.[0]?.id??null,t)}function yn(i,e){let t=e.tiers?.length?e.tiers.map(n=>i.paidPrice(e.key,n.id??null,n.price)):e.price==null?[]:[i.paidPrice(e.key,null,e.price)];if(e.key)for(let n of i.pricesByChannel.values())for(let r of n)r.categoryKey===e.key&&t.push(r.price);return t.length?{min:Math.min(...t),max:Math.max(...t)}:void 0}var hi="seatlayer_";function Jd(){let i=globalThis;return i.document?.modelContext??i.navigator?.modelContext??null}function me(i,e){return e?{ok:!1,reason:i,message:e}:{ok:!1,reason:i}}function ep(i){return Array.isArray(i)?i.filter(e=>typeof e=="string"&&!!e):[]}function tp(i,e){let t=i.event();if(!t)return me("not_loaded","The seat map has not finished loading.");let n=i.selectionLimits();return{ok:!0,event:t,selection:{max:n.max,...n.required!=null?{required:n.required}:{}},categories:i.categories(),zones:i.zones(),hasPremiumSeats:i.hasPremiumSeats(),holdsAllowed:e}}function ia(i,e){let t=r=>!!r&&r.toLowerCase()===e.toLowerCase(),n=i.find(r=>t(r.key??r.id))??i.find(r=>t(r.label));return n?.key??n?.id??null}function na(i,e){let t=e.map(n=>i.describeSeat(n.id));return{seatIds:e.map(n=>n.id),labels:e.map(n=>n.label),section:t[0]?.section??"",row:t[0]?.row??"",seats:e.map((n,r)=>t[r]?.seat||n.label),category:t[0]?.category??e[0].categoryKey,unitPrice:e[0].price,total:e.reduce((n,r)=>n+r.price,0)}}function ip(i,e,t){let n=new Map;for(let s of e){let o=n.get(s.rowKey);o?o.push(s):n.set(s.rowKey,[s])}let r=[];for(let s of n.values()){let o=[...s].sort((l,c)=>l.index-c.index),a=0;for(let l=1;l<=o.length;l++)if(l===o.length||o[l].index!==o[l-1].index+1||o[l].categoryKey!==o[l-1].categoryKey){for(let d=a;d+t<=l;d+=t)r.push(na(i,o.slice(d,d+t)));a=l}}return r}function np(i,e,t){let n=new Map;for(let s of e){let o=n.get(s.sectionKey);o?o.push(s):n.set(s.sectionKey,[s])}let r=[];for(let s of n.values()){if(s.length<t)continue;let o=[...s].sort((a,l)=>a.price!==l.price?l.price-a.price:a.rowKey.localeCompare(l.rowKey)||a.index-l.index);r.push(na(i,o.slice(0,t)))}return r}function rp(i,e){if(!i.event())return me("not_loaded","The seat map has not finished loading.");let n=i.selectionLimits(),r=Math.floor(Number(e.count));if(!Number.isInteger(r)||r<1||r>n.max)return me("bad_count",`count must be a whole number between 1 and ${n.max}.`);let s=Number.isInteger(Number(e.limit))?Math.max(1,Math.min(20,Number(e.limit))):5,o=e.together===void 0?!0:!!e.together,a=typeof e.max_price=="number"&&Number.isFinite(e.max_price)?e.max_price:null,l=typeof e.category=="string"&&e.category?e.category:null,c=typeof e.zone=="string"&&e.zone?e.zone:null,d=l?ia(i.categories(),l):null;if(l&&!d)return me("no_match",`No ticket type called "${l}".`);let p=c?ia(i.zones(),c):null;if(c&&!p)return me("no_match",`No zone called "${c}".`);let u=i.seats().filter(y=>y.available);if(!u.length)return me("sold_out");let h=u.filter(y=>(!d||y.categoryKey===d)&&(!p||y.zoneId===p)&&(a==null||y.price<=a));if(!h.length)return me("no_match");let g=o?ip(i,h,r):np(i,h,r);return g.length?(g.sort((y,S)=>S.unitPrice!==y.unitPrice?S.unitPrice-y.unitPrice:y.row.localeCompare(S.row)||y.labels[0].localeCompare(S.labels[0])),{ok:!0,groups:g.slice(0,s),searched:{count:r,filters:{...a!=null?{max_price:a}:{},...d?{category:d}:{},...p?{zone:p}:{},together:o}}}):me(o?"not_enough_together":"no_match")}function ra(i){return{ok:!0,...i.selection()}}function sp(i,e){let t=i.event();if(!t)return me("not_loaded","The seat map has not finished loading.");if(t.salesClosed)return me("event_closed","Sales are closed for this event.");let n=ep(e.seat_ids);return n.length?(i.clearSelection(),i.selectObjects(n),ra(i)):me("nothing_requested","Pass one or more seat ids or labels in seat_ids.")}function op(i,e){let t=async r=>{try{return await r()}catch(s){return me("error",s instanceof Error?s.message:String(s))}},n=[{name:`${hi}describe_event`,title:"Describe this seated event",description:"Read the event, its ticket types with live availability and prices, its zones, and how many seats this buyer may select. Call this first.",inputSchema:{type:"object",properties:{},additionalProperties:!1},annotations:{readOnlyHint:!0,untrustedContentHint:!0},execute:()=>t(()=>tp(i,e))},{name:`${hi}find_seats`,title:"Find available seats",description:"Search the seat map for groups of available seats. Read-only: it never selects, holds or reserves anything. Returns candidate groups with their seat ids, prices and location.",inputSchema:{type:"object",properties:{count:{type:"integer",minimum:1,description:"How many seats are needed."},max_price:{type:"number",description:"Highest acceptable price per seat."},category:{type:"string",description:"Ticket type key or label to restrict the search to."},zone:{type:"string",description:"Zone id or label to restrict the search to."},together:{type:"boolean",description:"Require the seats to be side by side in one row (default true)."},limit:{type:"integer",minimum:1,maximum:20,description:"How many candidate groups to return (default 5)."}},required:["count"],additionalProperties:!1},annotations:{readOnlyHint:!0,untrustedContentHint:!0},execute:r=>t(()=>rp(i,r))},{name:`${hi}select_seats`,title:"Select seats on the map",description:"Replace the current selection with the given seats, exactly as tapping them would. The buyer sees the seats light up and the basket update. No reservation is made.",inputSchema:{type:"object",properties:{seat_ids:{type:"array",items:{type:"string"},description:"Seat ids or labels, e.g. from find_seats."}},required:["seat_ids"],additionalProperties:!1},annotations:{readOnlyHint:!1,untrustedContentHint:!0},execute:r=>t(()=>sp(i,r))},{name:`${hi}get_selection`,title:"Read the current selection",description:"Read the seats currently selected in the basket, their total, any open reservation, and whether the selection satisfies this event\u2019s rules.",inputSchema:{type:"object",properties:{},additionalProperties:!1},annotations:{readOnlyHint:!0,untrustedContentHint:!0},execute:()=>t(()=>ra(i))}];return e&&n.push({name:`${hi}hold_selection`,title:"Reserve the selected seats",description:"Reserve the currently selected seats for this buyer for a limited time, exactly as pressing the checkout button would. Confirm with the buyer before calling this.",inputSchema:{type:"object",properties:{},additionalProperties:!1},annotations:{readOnlyHint:!1,untrustedContentHint:!0},execute:()=>t(()=>i.hold())}),n}async function sa(i,e={}){let t=Jd();if(!t||typeof t.registerTool!="function")return null;let n=new AbortController,r=op(i,!!e.holds),s=[],o=e.exposedTo?.length?[...new Set(e.exposedTo)]:void 0;try{for(let a of r)await t.registerTool(a,{signal:n.signal,...o?{exposedTo:o}:{}}),s.push(a.name)}catch(a){console.warn("seatmap: WebMCP tools could not be registered",a)}return s.length?{names:s,dispose:()=>{if(n.abort(),typeof t.unregisterTool=="function")for(let a of s)try{t.unregisterTool(a)}catch{}}}:null}async function oa(i){let e=i.opts.webMcp;if(!e||i.destroyed)return;let t=typeof e=="object"&&!!e.holds,n=typeof e=="object"?e.exposedTo:void 0;try{i.webMcp=await sa(dr(i,t),{holds:t,exposedTo:n}),i.destroyed&&cr(i)}catch(r){console.warn("seatmap: WebMCP registration failed",r)}}function cr(i){i.webMcp?.dispose(),i.webMcp=null}function dr(i,e){let t=(n,r)=>{if(Number.isInteger(n.logicalSeatIndex))return n.logicalSeatIndex;let s=n.id.lastIndexOf(":"),o=s<0?NaN:Number(n.id.slice(s+1));return Number.isFinite(o)?o:r};return{event:()=>{let n=i.renderInfo;return n?{name:n.eventName??"",venue:n.venue??null,startsAt:n.startsAt??null,timezone:n.timezone??null,currency:i.currency,salesClosed:i.salesClosed}:null},selectionLimits:()=>({max:i.maxTickets,required:i.exactTickets}),categories:()=>{let n=i.controller.categoryAvailability();return(i.controller.doc?.categories??[]).filter(r=>!r.notForSale).map(r=>{let s=yn(i,r),o=bn(i,r);return{key:r.key,label:r.label??r.key,...o===void 0?{}:{price:o},...s&&s.min!==s.max?{priceRange:s}:{},available:n[r.key]??0}})},zones:()=>i.controller.getBestAvailableZones(),hasPremiumSeats:()=>i.controller.hasPremiumSeats(),seats:()=>{let n=i.controller.getActiveFloorId(),r=[];return i.allSeats().forEach((s,o)=>{if(s.floorId&&n&&s.floorId!==n)return;let a=i.controller.getStatus(s.id)??"free",l=i.controller.doc?.categories.find(d=>d.key===s.categoryKey),c=l?.tiers?.length?l.tiers[0].price:l?.price??0;r.push({id:s.id,label:s.label,rowKey:s.logicalRowId??s.rowId,sectionKey:s.sectionId??s.rowId,index:t(s,o),categoryKey:s.categoryKey,price:i.paidPrice(s.categoryKey,l?.tiers?.[0]?.id??null,c,s.label),...s.zoneId?{zoneId:s.zoneId}:{},available:a==="free"&&!l?.notForSale})}),r},describeSeat:n=>{let r=i.controller.seatDetails(n);return r?{section:r.sectionLabel??"",row:Y(r)??"",seat:r.seatNumber??r.label,category:r.categoryLabel??r.categoryKey}:null},selection:()=>{let{freshSeats:n,total:r,count:s}=gn(i);return{seats:n.map(o=>({id:o.id,label:o.label,section:o.sectionLabel??"",row:Y(o)??"",seat:o.seatNumber??o.label,category:o.categoryKey,price:i.paidPrice(o.categoryKey,o.tierId??null,o.price,o.label)})),count:s,total:r,currency:i.currency,hold:i.hold?{id:i.hold.holdId,expiresAt:i.hold.expiresAt}:null,validity:i.getSelectionValidity()}},clearSelection:()=>i.clearSelection(),selectObjects:n=>{i.selectObjects(n)},hold:()=>e?ap(i):Promise.resolve({ok:!1,reason:"not_allowed"})}}async function ap(i){if(i.salesClosed)return{ok:!1,reason:"event_closed"};if(!i.totalTicketCount())return{ok:!1,reason:"nothing_selected"};let e=i.controller.getSelectionValidity(i.totalTicketCount());return e&&!e.isValid?{ok:!1,reason:"invalid_selection"}:(await i.handleCta(),i.hold?{ok:!0,hold:{id:i.hold.holdId,expiresAt:i.hold.expiresAt}}:{ok:!1,reason:"hold_failed"})}function pr(i){return{renderingTimeMillis:i.ms,performanceProfile:i.performanceProfile,seatCount:i.seatCount,objectCount:i.objectCount,sectionCount:i.sectionCount,view:i.view,eventKey:i.eventKey,chartName:i.chartName,floorCount:i.floorCount,transport:i.transport,load:i.load,metricScope:i.metricScope,operationalTelemetryReporter:"sdk"}}function aa(i,e){Re({apiBase:i.apiBase,event:i.eventKey,scope:i.metricScope,surface:i.surface,outcome:"success",ms:i.ms,performanceProfile:i.performanceProfile,chartDelivery:i.chartDelivery,seats:i.seatCount,floors:i.floorCount,view:i.view,load:i.load,transport:i.transport}),e("chart_rendered",pr(i))}var la=require("@seatlayer/core/core/seatConfidence");function se(i){return String(i??"").replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}function ca(i){let e=(0,la.seatConfidenceDisclosure)(i.seat.confidenceEvidence),t=i.seat.confidenceEvidence,n=e.limitations.length?`<h4>Known limits</h4><ul>${e.limitations.map(c=>`<li>${se(c)}</li>`).join("")}</ul>`:"",r=e.modeledTarget?`<div><dt>Modeled target</dt><dd>${se(e.modeledTarget)}</dd></div>`:"",s=t?`<div><dt>Evidence ID</dt><dd>${se(t.evidenceId)}</dd></div><div><dt>Model version</dt><dd>${se(t.modelVersion)}</dd></div><div><dt>Event configuration</dt><dd>${se(t.eventConfigurationId??"Not configuration-specific")}</dd></div><div><dt>Approval</dt><dd>${se(t.approvedByRole??"No external approval supplied")}</dd></div>`+(t.validUntil?`<div><dt>Valid until</dt><dd>${se(t.validUntil.slice(0,10))}</dd></div>`:""):"<div><dt>Evidence ID</dt><dd>None supplied</dd></div>",o=Ie(i.seat.commercial)||i.restrictionFallback,a=`<div><dt>View restriction</dt><dd>${se(o)}</dd></div>`+(i.seat.commercial?.note?`<div><dt>Organizer note</dt><dd>${se(i.seat.commercial.note)}</dd></div>`:""),l=i.canReport?'<button type="button" data-report>Report this view</button><p data-report-status role="status" aria-live="polite"></p>':"";return`<div class="sl-view3d-passport-scrim" aria-hidden="true"></div><section class="sl-view3d-passport" role="dialog" aria-modal="true" aria-labelledby="sl-view3d-passport-title"><header><div><span>Seat confidence passport</span><strong id="sl-view3d-passport-title">${se(i.title)}</strong></div><button type="button" data-close aria-label="Close seat confidence passport">\xD7</button></header><div class="sl-view3d-passport-summary"><strong>${se(e.headline)}</strong><span>${se(e.coverage)} \xB7 ${se(e.freshness)}</span></div><dl><div><dt>Model status</dt><dd>${se(e.model)}</dd></div><div><dt>Reality evidence</dt><dd>${se(e.reality)}</dd></div><div><dt>Source</dt><dd>${se(e.provenance)}</dd></div>`+a+r+s+`</dl>${n}<p class="sl-view3d-passport-note">This passport describes supplied evidence and known limits. It does not guarantee that every temporary obstruction or real-world condition is knowable before the event build.</p>`+l+"</section>"}function da(i){return i?i.closest("[data-report]")?"report":i.closest("[data-close]")||i.classList.contains("sl-view3d-passport-scrim")?"close":null:null}function vn(i,e,t){let n=i?.querySelector("[data-report]"),r=i?.querySelector("[data-report-status]");n&&(n.disabled=e!=="failed",n.textContent=e==="received"?"Report received":"Report this view"),r&&(r.setAttribute("role",e==="failed"?"alert":"status"),r.textContent=e==="sending"?"Sending report\u2026":e==="received"?`Report received. Reference ${t??""}.`:"The report could not be sent. Please try again.")}function hr(i,e,t=null){let n=i.view3dEl;if(!n)return;ui(i,!1);let r=e.confidenceEvidence,s=i.controller.seatDetails(e.id),o=document.createElement("div");o.className="sl-view3d-passport-shell",o.innerHTML=ca({seat:e,title:s?.displayLabel??e.displayLabel??e.label,restrictionFallback:i.tf("picker.noAuthoredRestriction","No organizer-authored restriction"),canReport:typeof i.api.reportViewEvidence=="function"});let a=[...new Set([...n.children,...[...i.els.map.children].filter(u=>u!==n)])].filter(u=>u instanceof HTMLElement),l=a.map(u=>({element:u,inert:u.inert,ariaHidden:u.getAttribute("aria-hidden")}));for(let u of a)u.inert=!0,u.setAttribute("aria-hidden","true");n.appendChild(o),n.classList.add("has-passport"),i.view3dPassportEl=o;let c=o.querySelector(".sl-view3d-passport"),d=()=>[...c.querySelectorAll('button:not(:disabled),[href],[tabindex]:not([tabindex="-1"])')],p=u=>{if(u.key==="Escape"){u.preventDefault(),u.stopPropagation(),u.stopImmediatePropagation(),ui(i);return}if(u.key!=="Tab")return;let h=d();if(!h.length)return;let g=h[0],y=h[h.length-1];u.shiftKey&&document.activeElement===g?(u.preventDefault(),y.focus()):!u.shiftKey&&document.activeElement===y&&(u.preventDefault(),g.focus())};window.addEventListener("keydown",p,!0),i.view3dPassportCleanup=()=>{window.removeEventListener("keydown",p,!0);for(let y of l)y.element.inert=y.inert,y.ariaHidden===null?y.element.removeAttribute("aria-hidden"):y.element.setAttribute("aria-hidden",y.ariaHidden);let u=t?.isConnected?t:i.confirmEl?.querySelector(".sl-confirm-confidence")??i.view3dCompareEl?.querySelector("[data-passport-seat]")??null,h=u?.closest(".sl-confirm,.sl-view3d-compare");h?.isConnected&&(h.inert=!1,h.removeAttribute("aria-hidden")),o.remove(),n.classList.remove("has-passport"),i.view3dPassportEl===o&&(i.view3dPassportEl=null);let g=u??i.view3dCompareEl?.querySelector("[data-passport-seat]")??i.confirmEl?.querySelector(".sl-confirm-confidence")??i.view3dCompareChip.mainButton();(t?.isConnected?t:g)?.focus()},o.addEventListener("click",u=>{let h=da(u.target instanceof HTMLElement?u.target:null);h==="close"&&ui(i),h==="report"&&lp(i,e)}),requestAnimationFrame(()=>d()[0]?.focus()),i.emit3dAnalytics("3d_confidence_passport_opened",{seatId:e.id,evidenceId:r?.evidenceId??null,eventConfigurationId:r?.eventConfigurationId??null,modelLevel:r?.modelLevel??"unverified",realityLevel:r?.realityLevel??"none"})}async function lp(i,e){if(i.api.reportViewEvidence){vn(i.view3dPassportEl,"sending");try{let t=await i.api.reportViewEvidence(i.opts.event,{seatId:e.id,evidenceId:e.confidenceEvidence?.evidenceId});i.emit3dAnalytics("3d_confidence_view_reported",{seatId:e.id,evidenceId:e.confidenceEvidence?.evidenceId??null}),vn(i.view3dPassportEl,"received",t.report.id)}catch{vn(i.view3dPassportEl,"failed")}}}function ui(i,e=!0){let t=i.view3dPassportCleanup;if(i.view3dPassportCleanup=null,!t){i.view3dPassportEl?.remove(),i.view3dPassportEl=null,i.view3dEl?.classList.remove("has-passport");return}e||(document.activeElement instanceof HTMLElement?document.activeElement:null)?.blur(),t(),e||i.root?.focus({preventScroll:!0})}function pa(i){let e=i.view3dEl;if(!e||i.view3dCompareSeatIds.length<2)return;rt(i,!1);let t=i.view3dCompareSeatIds.map(h=>i.view3dComparisonSnapshot(h)).filter(h=>!!h);if(t.length<2){i.clearView3dComparison();return}let n=h=>C(h),r=t.some(h=>!!h.price),s=document.createElement("div");s.className="sl-view3d-compare-shell";let o=t.map((h,g)=>`<article><span>Seat ${g===0?"A":"B"}</span><strong>${n(h.label)}</strong><small>Section ${n(h.section)} \xB7 Row ${n(h.row)}</small><dl>`+(r?`<div><dt>Current price</dt><dd>${n(h.price)}</dd></div>`:"")+`<div><dt>Ticket type</dt><dd>${n(h.category)}</dd></div><div><dt>Availability</dt><dd>${n(h.availability)}</dd></div><div><dt>View source</dt><dd>${n(h.viewSource)}</dd></div><div><dt>View restriction</dt><dd>${n(h.limited)}</dd></div><div><dt>Seat confidence</dt><dd>${n(h.confidence.headline)}</dd></div><div><dt>Reality check</dt><dd>${n(h.confidence.reality)}</dd></div><div><dt>Accessibility</dt><dd>${n(h.accessibility)}</dd></div></dl><div class="sl-view3d-compare-actions"><button type="button" data-passport-seat="${n(h.seat.id)}">Passport</button><button type="button" data-view-seat="${n(h.seat.id)}">View seat</button><button type="button" class="select" data-select-seat="${n(h.seat.id)}"${h.selectable?"":" disabled"}>Select seat</button></div></article>`).join("");s.innerHTML=`<div class="sl-view3d-compare-scrim" aria-hidden="true"></div><section class="sl-view3d-compare" role="dialog" aria-modal="true" aria-labelledby="sl-view3d-compare-title"><header><div><span>Seat inspection</span><strong id="sl-view3d-compare-title">Compare disclosed attributes</strong></div><button type="button" data-close aria-label="Close seat comparison">\xD7</button></header><p class="sl-view3d-compare-note">${r?"Current price and availability":"Availability"} comes from this picker. Modeled views are chart-derived unless organizer media is labeled.</p><div class="sl-view3d-compare-grid">${o}</div></section>`;let a=document.activeElement instanceof HTMLElement?document.activeElement:null,l=[...e.children].filter(h=>h instanceof HTMLElement),c=l.map(h=>({element:h,inert:h.inert,ariaHidden:h.getAttribute("aria-hidden")}));for(let h of l)h.inert=!0,h.setAttribute("aria-hidden","true");e.appendChild(s),e.classList.add("has-comparison"),i.view3dCompareEl=s;let d=s.querySelector(".sl-view3d-compare"),p=()=>[...d.querySelectorAll('button:not(:disabled),[href],[tabindex]:not([tabindex="-1"])')],u=h=>{if(h.key==="Escape"){h.preventDefault(),rt(i);return}if(h.key!=="Tab")return;let g=p();if(!g.length)return;let y=g[0],S=g[g.length-1];h.shiftKey&&document.activeElement===y?(h.preventDefault(),S.focus()):!h.shiftKey&&document.activeElement===S&&(h.preventDefault(),y.focus())};window.addEventListener("keydown",u),i.view3dCompareCleanup=()=>{window.removeEventListener("keydown",u);for(let h of c)h.element.inert=h.inert,h.ariaHidden===null?h.element.removeAttribute("aria-hidden"):h.element.setAttribute("aria-hidden",h.ariaHidden);s.remove(),e.classList.remove("has-comparison"),i.view3dCompareEl===s&&(i.view3dCompareEl=null),a?.isConnected?a.focus():i.view3dCompareChip.mainButton()?.focus()},s.querySelector("[data-close]")?.addEventListener("click",()=>rt(i)),s.querySelectorAll("[data-passport-seat]").forEach(h=>h.addEventListener("click",()=>{let g=h.dataset.passportSeat,y=g?i.allSeats().find(S=>S.id===g):void 0;y&&hr(i,y,h)})),s.querySelectorAll("[data-view-seat]").forEach(h=>h.addEventListener("click",()=>{let g=h.dataset.viewSeat;rt(i,!1),g&&i.view3dHandle?.flyToSeat(g)})),s.querySelectorAll("[data-select-seat]").forEach(h=>h.addEventListener("click",()=>{let g=h.dataset.selectSeat;g&&cp(i,g)})),requestAnimationFrame(()=>p()[0]?.focus()),i.emit3dAnalytics("3d_comparison_opened",{seatIds:i.view3dCompareSeatIds.slice()})}function rt(i,e=!0){let t=i.view3dCompareCleanup;if(i.view3dCompareCleanup=null,!t){i.view3dCompareEl?.remove(),i.view3dCompareEl=null,i.view3dEl?.classList.remove("has-comparison");return}e||(document.activeElement instanceof HTMLElement?document.activeElement:null)?.blur(),t(),e||i.root?.focus({preventScroll:!0})}function cp(i,e){if(i.salesClosed){i.toast(i.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}let t=i.allSeats().find(r=>r.id===e);if(!t)return;if(rt(i,!1),!i.controller.select([e]).length){i.syncSelectionTo3d(),i.toast(i.tf("picker.seatNoLongerAvailable","That seat is no longer available."),"warning");return}i.syncSelectionTo3d(),i.showConfirm(t),i.emit3dAnalytics("3d_comparison_selected",{seatId:e})}var fa=require("@seatlayer/core"),ga=require("@seatlayer/core/view3d/crossfade/panorama");var ur=require("@seatlayer/core");var dp=900,pp=450;function hp(i){switch(i){case"seat":return b("picker.stopYourSeat","Your seat");case"row":return b("picker.stopYourRow","Your row");case"section":return b("picker.stopYourSection","Your section");default:return b("picker.stopWholeVenue","Whole venue")}}function ha(i,e){let t=document.createElement("button");t.type="button",t.className="sl-view3d-recentre sl-mo-rotate-in",t.textContent="\u25CE";let n=b("picker.recentreOnStage","Recentre on the stage");t.setAttribute("aria-label",n),t.title=n,t.addEventListener("click",()=>{e.handle()?.recentreSeatView()});let r=document.createElement("div");r.className="sl-view3d-stop",r.setAttribute("role","status"),r.setAttribute("aria-live","polite"),i.append(t,r);let s=null,o=null;return{onStopChange(a){if(s&&(clearTimeout(s),s=null),o&&(clearTimeout(o),o=null),!a){r.classList.remove("is-shown"),r.textContent="",o=setTimeout(()=>{o=null,i.classList.remove("is-seat-view")},pp);return}i.classList.add("is-seat-view"),r.textContent=hp(a),r.classList.add("is-shown"),s=setTimeout(()=>{s=null,r.classList.remove("is-shown")},dp)},dispose(){s&&(clearTimeout(s),s=null),o&&(clearTimeout(o),o=null),t.remove(),r.remove(),i.classList.remove("is-seat-view")}}}var up=44,mp=92;function ua(i,e,t,n={}){let r=i?.sectionLabel,s=Y(i),o=fp(i,e),a=[r,s?(0,ur.t)("picker.rowLabel",{label:s}):null,o?(0,ur.t)("picker.seatLabel",{label:o}):null].filter(Boolean).join(" \xB7 "),l=n.maxChars??(n.narrow?up:mp);for(let c of[t,n.shortTail??t,null]){let d=[a,c].filter(Boolean).join(" \xB7 ");if(d.length<=l||c==null)return d}return a}function fp(i,e){if(i?.seatNumber)return i.seatNumber;let t=i?.displayLabel??e,n=r=>{!r||!t.startsWith(r)||t.length<=r.length||(t=t.slice(r.length).replace(/^[\s·\-\/_]+/,""))};return n(i?.sectionLabel),n(Y(i)),t}var ba=require("@seatlayer/core/core/seatConfidence");function ma(i,e){i.querySelector(".sl-view3d-unavailable")?.remove();let{tf:t}=e,n=e.status==="held"?{title:t("picker.temporarilyHeld","Temporarily held"),message:t("picker.heldSeatExplanation","Another buyer is holding this seat. It may become available again.")}:e.status==="booked"?{title:t("picker.sold","Sold"),message:t("picker.soldSeatExplanation","This seat has already been booked.")}:{title:t("picker.notForSale","Not for sale"),message:t("picker.notForSaleExplanation","This seat is not included in the current sale.")},r=document.createElement("div");r.className="sl-view3d-unavailable",r.dataset.state=e.visualState,r.setAttribute("role","status"),r.setAttribute("aria-live","polite");let s=document.createElement("span");s.className="sl-view3d-unavailable-eyebrow",s.textContent=e.location;let o=document.createElement("strong");o.textContent=n.title;let a=document.createElement("div");a.className="sl-view3d-unavailable-copy",a.append(s,o);let l=document.createElement("button");l.type="button",l.setAttribute("aria-label",t("picker.closeSeatStatus","Close seat status")),l.textContent="\xD7";let c=document.createElement("p");c.textContent=n.message,r.append(a,l,c),l.addEventListener("click",()=>mr(i)),i.appendChild(r),Bi(r,e.anchor??null)}function mr(i){let e=i?.querySelector(".sl-view3d-unavailable:not([data-leaving])");e&&(e.dataset.leaving="true",Mt(e))}function ya(i){return i.buyerView}function va(i,e,t){if(e==="map"){i.exit3d();return}let n=t?.flyToSeatId;if(i.buyerView==="venue3d"){n?(i.opts.onBuyerViewChange?.({view:"venue3d",seatId:n}),i.view3dHandle?.flyToSeat(n)):t?.resetView&&i.view3dHandle?.focusOverview();return}i.enter3d(n)}function wa(i,e){switch(i.controller.getStatus(e.id)){case"held":return"held";case"booked":return"sold";case"not_for_sale":return"dimmed";default:break}return i.priceBandKeys!=null&&!i.priceBandKeys.has(e.categoryKey)||i.controller.accessibilityFilterDims?.(e)||i.limitedViewFilter&&(e.commercial?.restrictedView||e.commercial?.obstructedView)?"dimmed":"available"}function xa(i){if(!i.view3dHandle)return;let e=i.allSeats().map(t=>({seatId:t.id,state:i.seatState3dFor(t)}));i.view3dHandle.setAvailability(e)}function ka(i){i.view3dHandle&&i.view3dHandle.setSelection(i.controller.getSelection().map(e=>e.id))}async function Sa(i,e){let t=i.allSeats().find(n=>n.id===e);if(!t)return null;if(t.viewUrl)try{let n=t.viewMeta?.previewUrl,r=!!n&&n!==t.viewUrl,s=r?await i.buyerAssetUrls.resolve(n):null,o=r?t.viewUrl:await i.buyerAssetUrls.resolve(t.viewUrl);return!o||r&&!s?null:{url:o,...s?{previewUrl:s}:{},...r?{resolveUrl:a=>i.buyerAssetUrls.resolve(a)}:{},...t.viewMeta?.sourceWidth!==void 0?{sourceWidth:t.viewMeta.sourceWidth}:{},...t.viewMeta?.sourceHeight!==void 0?{sourceHeight:t.viewMeta.sourceHeight}:{},...t.viewMeta?.previewWidth!==void 0?{previewWidth:t.viewMeta.previewWidth}:{},...t.viewMeta?.previewHeight!==void 0?{previewHeight:t.viewMeta.previewHeight}:{},...t.viewMeta?.variants?.length?{variants:t.viewMeta.variants}:{},...t.viewMeta?.initialBearingDeg!==void 0?{initialBearingDeg:t.viewMeta.initialBearingDeg}:{},...t.viewMeta?.initialPitchDeg!==void 0?{initialPitchDeg:t.viewMeta.initialPitchDeg}:{},...t.viewMeta?.coverage?{coverage:t.viewMeta.coverage}:{},...t.viewMeta?.capturedAt?{capturedAt:t.viewMeta.capturedAt}:{},...t.viewMeta?.sourceLabel?{sourceLabel:t.viewMeta.sourceLabel}:{}}}catch(n){return i.opts.onError?.(n),null}return{url:"",generated:!0,mediaKind:"model",coverage:"exact-seat",sourceLabel:i.tf("picker.chartDerivedModel","Chart-derived model")}}function Ta(i,e){if(i.salesClosed){i.toast(i.tf("picker.salesClosedToast","Sales are closed for this event."),"warning"),i.syncSelectionTo3d();return}let t=i.allSeats().find(a=>a.id===e);if(!t)return;let n=i.controller.tableSelection(e);if(i.committedSelection().some(a=>n?a.label===n.label:a.id===e)){i.controller.deselect([e]),i.dismissConfirm(),i.syncSelectionTo3d();return}let s=i.controller.getStatus(t.id);if(s==="held"||s==="booked"||s==="not_for_sale"){i.showUnavailable3dSeat(t,i.seatState3dFor(t),s),i.syncSelectionTo3d();return}if(i.dismissUnavailable3dSeat(),!i.controller.select([e]).length){i.syncSelectionTo3d(),i.dismissConfirm();return}if(i.opts.onBuyerViewChange?.({view:"venue3d",seatId:e}),i.flashPickedSeat(e),n){i.showTableDialog(n,!1),i.syncSelectionTo3d();return}i.opts.confirmSelection!==!1?i.showConfirm(t):i.syncTray(),i.syncSelectionTo3d()}function Ca(i,e){let t=i.allSeats().find(n=>n.id===e);return ua(i.controller.seatDetails(e),t?.displayLabel??t?.label??e,i.tf("picker.viewFromYourSeat","view from your seat"),{narrow:i.root?.dataset.layout==="narrow",shortTail:i.tf("picker.fromYourSeat","from your seat")})}function Ea(i,e,t,n){let r=i.view3dEl;if(!r)return;let s=i.controller.seatDetails(e.id),o=s?.displayLabel??e.displayLabel??e.label,a=Y(s);ma(r,{status:n,visualState:t,location:[s?.sectionLabel,a?(0,fa.t)("picker.rowLabel",{label:a}):null,o].filter(Boolean).join(" \xB7 ")||o,tf:(l,c)=>i.tf(l,c)}),i.announceSeat(e)}function Aa(i){mr(i.view3dEl)}function Pa(i,e){if(i.buyerView!=="venue3d")return;let t=i.view3dCompareSeatIds;t.includes(e.id)||(i.view3dCompareSeatIds=t.length===0?[e.id]:[t[0],e.id]),i.confirmSeat?.id===e.id&&(i.controller.deselect([e.id]),i.dismissConfirm(),i.syncSelectionTo3d(),i.syncTray()),i.view3dCompareChip.sync(),i.emit3dAnalytics("3d_comparison_saved",{seatId:e.id,count:i.view3dCompareSeatIds.length}),i.view3dCompareSeatIds.length>1?i.openView3dComparison():i.toast(i.tf("picker.chooseAnotherToCompare","Seat saved. Choose another seat to compare."),"success")}function Ma(i){i.closeView3dComparison(!1),i.view3dCompareSeatIds=[],i.view3dCompareChip.remove(),i.emit3dAnalytics("3d_comparison_cleared")}function La(i,e){let t=i.allSeats().find(h=>h.id===e);if(!t)return null;let n=i.controller.seatDetails(t.id),r=i.controller.doc?.categories.find(h=>h.key===t.categoryKey),s=n?.price??(r?.tiers?.length?r.tiers[0].price:r?.price),o=s!=null?i.paidPrice(t.categoryKey,n?.tierId??r?.tiers?.[0]?.id??null,s,t.label):void 0,a=i.controller.getStatus(t.id),l=a==="held"?i.tf("picker.temporarilyHeld","Temporarily held"):a==="booked"?i.tf("picker.sold","Sold"):a==="not_for_sale"?i.tf("picker.notForSale","Not for sale"):i.tf("picker.available","Available"),c=t.viewUrl?(0,ga.seatViewDisclosure)({url:t.viewUrl,...t.viewMeta?.coverage?{coverage:t.viewMeta.coverage}:{},...t.viewMeta?.capturedAt?{capturedAt:t.viewMeta.capturedAt}:{},...t.viewMeta?.sourceLabel?{sourceLabel:t.viewMeta.sourceLabel}:{}}):i.tf("picker.chartDerivedSeatEye","Live 3D \xB7 chart-derived seat-eye \xB7 not surveyed"),d=Ie(t.commercial)||i.tf("picker.noAuthoredRestriction","No organizer-authored restriction"),p=n?.wheelchairSpaceType?`${Dt(n.wheelchairSpaceType)} \xB7 metadata, not access certification`:i.tf("picker.noAccessibilityMetadata","No accessibility metadata supplied"),u=(0,ba.seatConfidenceDisclosure)(t.confidenceEvidence);return{seat:t,label:n?.displayLabel??t.displayLabel??t.label,section:n?.sectionLabel??t.sectionId??"\u2014",row:Y(n)??n?.rowLabel??"\u2014",category:n?.categoryLabel??r?.label??t.categoryKey,price:i.suppressPricing||o==null?"":i.money(o),availability:l,selectable:a==null||a==="free",viewSource:c,limited:d,accessibility:p,confidence:u}}async function Ha(i,e){if(i.view3dEl||!i.canOffer3d()||!i.els.map)return;let t=i.controller.doc;if(!t)return;i.buyerView="venue3d",i.view3dTargetSeatId=null,i.opts.onBuyerViewChange?.({view:"venue3d",...e?{seatId:e}:{}}),i.root?.setAttribute("data-view3d","on"),i.dismissConfirm(),i.syncProjection(),i.syncTray();let n=document.createElement("div");n.className="sl-view3d sl-mo-zoom",n.setAttribute("role","group"),n.setAttribute("aria-label",i.tf("picker.interactive3dVenueView","Interactive 3D venue view"));let r=document.createElement("button");r.type="button",r.className="sl-view3d-back",r.innerHTML=`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M15 18l-6-6 6-6"/></svg><span>${i.tf("picker.backToMap","Back to map")}</span>`;let s=r.querySelector("span"),o=c=>{i.view3dTargetSeatId=c;let d=!!c;n.classList.toggle("is-seat-focused",d),i.root&&(i.root.dataset.view3dSeat=d?"on":"off");let p=d?i.tf("picker.backToVenue","Back to venue"):i.tf("picker.backToMap","Back to map");s&&(s.textContent=p),r.setAttribute("aria-label",p)};if(r.addEventListener("click",()=>{if(i.view3dTargetSeatId&&i.view3dHandle){i.view3dHandle.focusOverview();return}i.exit3d()}),i.regions["top-left"]?.prepend(r),i.view3dBack=r,i.publish3dTopInset(),Zo(i.root)){let c=document.createElement("button");c.type="button",c.className="sl-view3d-fs",c.textContent="\u26F6",c.setAttribute("aria-label",i.tf("picker.fullScreen","Full screen")),c.setAttribute("aria-pressed",String(!!document.fullscreenElement||i.fsFallback||i.framedFs)),c.addEventListener("click",()=>i.toggleFullscreen()),n.appendChild(c)}let a=document.createElement("div");a.className="sl-view3d-loading",a.setAttribute("role","status"),a.setAttribute("aria-live","polite"),a.textContent=i.tf("picker.loading3d","Building the 3D venue\u2026"),n.appendChild(a),i.els.map.appendChild(n),i.view3dEl=n,i.view3dCompareChip.sync(),requestAnimationFrame(()=>{n.style.opacity="1"});let l=++i.view3dGen;try{let c=i.allSeats(),[d,p]=await Promise.all([oi(),i.controller.loadEventConfiguration()]),u=p?await qi(p,v=>i.buyerAssetUrls.resolve(v)):null,h=t.theme?.venue3d?.shellAssetUrl,g=await Ki(h,v=>i.buyerAssetUrls.resolve(v));if(l!==i.view3dGen||i.buyerView!=="venue3d"||i.view3dEl!==n)return;let y={doc:t,seats:c,...u?{eventConfigurationId:u.id,eventConfiguration:u}:{},...g?{registeredShellGlb:g}:{}};a.textContent=i.tf("picker.building3d","Building venue geometry\u2026");let S=await d.prepareVenue3D(y);if(l!==i.view3dGen||i.buyerView!=="venue3d"||i.view3dEl!==n)return;let k=d.mountVenue3D(n,{...y,prepared:S},{portraitOverviewCrop:!0,arriveAtSeatEye:!0,lookAroundHint:et(),seatViewActionLabel:v=>i.allSeats().find(f=>f.id===v)?.viewUrl?i.tf("picker.openAuthored360","Open venue 360\xB0"):i.tf("picker.lookAroundLive3d","Look around in live 3D"),seatViewCaption:v=>i.seatViewCaption(v),onSeatViewStopChange:v=>i.view3dSeatViewChrome?.onStopChange(v),onSeatPick:v=>i.onView3dSeatPick(v),onSeatInspect:v=>i.onView3dSeatPick(v),onSectionFocusChange:v=>{let f=n.querySelector('select[data-locator="section"]'),P=v??"";!f||f.value===P||(f.value=P,f.dispatchEvent(new Event("change")))},onViewTargetChange:v=>{n.querySelector(".sl-view3d-nav")?.classList.toggle("is-seat-focused",!!v),o(v),i.opts.onBuyerViewChange?.({view:"venue3d",...v?{seatId:v}:{}})},...i.seatViewEnabled()?{getSeatView:v=>new Promise((f,P)=>{let B=()=>{i.seatViewFor3d(v).then(O=>{O?f(O):P(new Error("seat_view_unavailable"))})},E=globalThis.requestIdleCallback;typeof E=="function"?E(B,{timeout:1500}):setTimeout(B,50)})}:{},onAnalytics:(v,f)=>i.emit3dAnalytics(v,f)});i.view3dHandle=k,i.view3dSeatViewChrome=ha(n,{handle:()=>i.view3dHandle}),requestAnimationFrame(()=>a.remove()),i.pushAvailabilityTo3d(),i.syncSelectionTo3d(),i.view3dNav=Qo(i.regions["bottom-left"]??n,k),e&&k.flyToSeat(e)}catch(c){if(l!==i.view3dGen||i.buyerView!=="venue3d"||i.view3dEl!==n)return;i.opts.onError?.(c),i.toast(i.tf("picker.unavailable3d","3D could not start. The seat map is still available."),"warning"),i.exit3d()}}function Ra(i){let e=i.regions["top-left"];if(!i.root||!e)return;let t=()=>{!i.root||i.root.dataset.view3d!=="on"||i.root.style.setProperty("--sl-3d-top-inset",`${Math.max(44,Math.ceil(e.offsetHeight))}px`)};t(),typeof requestAnimationFrame=="function"&&requestAnimationFrame(t)}function Ia(i){if(i.buyerView!=="venue3d"&&!i.view3dEl)return;i.view3dGen++,i.buyerView="map",i.view3dTargetSeatId=null,i.opts.onBuyerViewChange?.({view:"map"}),i.root?.removeAttribute("data-view3d"),i.closeSeatConfidencePassport(!1),i.closeView3dComparison(!1),i.view3dCompareChip.remove(),i.view3dSeatViewChrome?.dispose(),i.view3dSeatViewChrome=null,i.view3dBack?.remove(),i.view3dBack=null,i.view3dNav?.remove(),i.view3dNav=null,i.root?.removeAttribute("data-view3d-seat"),i.root?.style.removeProperty("--sl-3d-top-inset");try{i.view3dHandle?.dispose()}catch{}i.view3dHandle=null;let e=i.view3dEl;i.view3dEl=null,e&&(e.style.opacity="0",setTimeout(()=>e.remove(),320)),i.syncProjection(),i.syncTray();let t=i.view3dReturnSeat;i.view3dReturnSeat=null,t&&i.committedSelection().some(n=>n.id===t.id)&&i.opts.confirmSelection!==!1&&i.showConfirm(t)}var Fa=require("@seatlayer/core");var mi=require("@seatlayer/core");function Oa(i){return Array.isArray(i)?i.reduce((e,t)=>t.type==="minimumSelectedPlaces"?Math.max(e,t.minimum):e,0):0}function wn(i,e,t=!1){let n=i.violations[0];return n==="numberOfPlacesToSelect"?i.remaining>0?(0,mi.t)("picker.selectExactMore",{count:i.remaining}):(0,mi.t)("picker.selectExactCount",{count:i.required}):n==="minimumSelectedPlaces"?(0,mi.t)("picker.selectMinimumMore",{count:i.remaining}):t?e("picker.adjustSeatSelection","Adjust seat selection"):n==="consecutiveSeats"?e("picker.selectSeatsTogether","Choose seats together in the same row and ticket category."):(0,mi.t)("picker.orphanHint")}var Ue=require("@seatlayer/core");function fi(i){let e=Math.max(0,i),t=Math.floor(e/6e4),n=String(Math.floor(e%6e4/1e3)).padStart(2,"0");return`${t}:${n}`}function _a(i){let e=i.performanceLabel?`<div class="sl-chip-when">${D(i.performanceLabel)}</div>`:"",t=i.performanceDates?.labels.length?`<div class="sl-chip-dates"><span class="sl-chip-dates-summary">${D(i.performanceDates.summary)}</span><span class="sl-chip-date-list">${i.performanceDates.labels.map(n=>`<span class="sl-chip-date">${D(n)}</span>`).join("")}</span></div>`:"";return e+bp(i)+t}function bp(i){let{d:e,area:t,label:n,objectType:r,quantity:s=1,identity:o}=i,a=f=>String(f??"\u2014").replace(/[&<>"]/g,P=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[P]),l=r==="ga"?"ga":e?.objectType??r,c=o?.displayType?.trim()||e?.displayType?.trim()||t?.displayType?.trim()||(l==="table"?b("picker.table","Table"):l==="booth"?b("picker.booth","Booth"):l==="ga"?b("picker.generalAdmission","General admission"):b("picker.row","Row")),d=o?.rowLabel??o?.displayLabel??e?.rowLabel??e?.displayLabel??t?.label??n,p=i.categoryLabel?.trim()??"",u="",h=[];l==="table"&&o?.bookingMode?(u=`${c} ${d}`,h.push([b("picker.guests","Guests"),String(s)])):l==="ga"?(u=String(t?.displayLabel??d),s>1&&h.push([b("picker.tickets","Tickets"),String(s)])):l==="booth"?(u=e?.sectionLabel??`${c} ${d}`,e?.sectionLabel&&h.push([c,String(d)])):!e?.sectionLabel&&!e?.rowLabel&&!e?.seatNumber?u=String(d):(u=e.sectionLabel??"",e.rowLabel&&h.push([c,String(Y(e)??e.rowLabel)]),e.seatNumber&&h.push([b("picker.seat","Seat"),String(e.seatNumber)]));let g=!u&&!!p,y=u||p||String(d),S=!!p&&!g&&p!==y,k=h.map(([f,P])=>`<span class="sl-chip-seg" data-fit-seg><span class="w">${a(f)}</span> <b>${a(P)}</b></span>`);S&&k.push(`<span class="sl-chip-seg" data-fit-seg data-fit-type><span class="w">${a(p)}</span></span>`);let v=[y,...h.map(([f,P])=>`${f} ${P}`),S?p:""].filter(Boolean).join(" \xB7 ");return`<div class="sl-chip-id"><span class="sl-sr">${a(v)}</span><span class="sl-chip-name" aria-hidden="true">${a(y)}</span>`+(k.length?`<span class="sl-chip-pos" aria-hidden="true">${k.join("<i>\xB7</i>")}</span>`:"")+"</div>"}function fr(i,e){let t=D(i),n=e?D(e):"";return'<div class="sl-chip-rail">'+(e?`<button type="button" class="view" data-view-label="${n}" aria-label="${D((0,Ue.t)("picker.viewFromSeat",{label:e}))}"><svg viewBox="0 0 24 24"><path d="M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z"/><circle cx="12" cy="12" r="3"/></svg></button>`:"")+`<button type="button" class="rm" aria-label="${t}"><svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></button></div>`}function Da({count:i,total:e,pendingCount:t,ctaPhase:n,hasHold:r,salesClosed:s,suppressPricing:o=!1,fromPrice:a,offerFind:l=!1,holdTime:c,money:d}){if(i&&n==="holding")return`<span>${b("picker.securingSeats","Securing your seats\u2026")}</span>`;if(i&&n==="checkout")return o?`<span>${b("picker.seatsSecuredOpeningCheckout","Seats secured. Opening checkout\u2026")}</span>`:`<span>${(0,Ue.t)("picker.peekSecured",{count:i,total:d(e)})}</span>`;if(i)return`<span class="sl-peek-sum">${(0,Ue.tCount)("picker.ticketsCount",i)}</span><button type="button" class="go sl-sheet-go" data-act="checkout">${r&&t?b("picker.secureMore","Secure more"):b("picker.continue","Continue")}`+(o?"":`<span class="sl-peek-total">${d(e)}</span>`)+(r&&c?`<span class="sl-peek-time" aria-hidden="true">${c}</span>`:"")+"</button>";if(s)return`<span>${b("picker.salesClosedPill","Sales are closed")}</span>`;let p=!o&&a!=null?d(a):null;return`<span class="sl-peek-sum">${p!=null?(0,Ue.t)("picker.peekFromPrice",{price:p}).replace(p,`<b class="sl-peek-price">${p}</b>`):b("picker.pickYourSeats","Pick your seats")}</span>`+(l?`<button type="button" class="go sl-sheet-go sl-sheet-find" data-act="find"><span class="sl-peek-spark" aria-hidden="true">\u2726</span>${b("picker.findSeats","Find seats")}</button>`:"")}function Na(i){return i.confirming?`<div class="sl-ba" role="alert"><div class="sl-ba-title"><span class="spark" aria-hidden="true">\u2726</span>${b("picker.replaceCurrentChoices","Replace your current choices?")}</div><div class="sl-ba-replace"><b>${(0,Ue.t)("picker.willFindSeatsTogether",{count:i.quantity})}</b><span>${b("picker.manualTicketsRemovedNote","Your manually selected tickets will be removed only after a new group is secured.")}</span></div><div class="sl-ba-actions"><button type="button" data-ba-cancel>${b("picker.keepMine","Keep mine")}</button><button type="button" class="replace" data-ba-replace>${b("picker.findNewSeats","Find new seats")}</button></div></div>`:`<div class="sl-ba"><div class="sl-ba-title"><span class="spark" aria-hidden="true">\u2726</span>${b("picker.findClosestSeatsTogether","Find the closest seats together")}</div><div class="sl-ba-copy">${b("picker.closestGroupChosenInstantly","Closest available group, chosen instantly.")}</div>`+(i.offerPremium?`<button type="button" class="sl-ba-premium${i.premium?" on":""}" data-ba-premium aria-pressed="${i.premium?"true":"false"}"><span class="star" aria-hidden="true">\u2605</span>${b("picker.bestSeatsPremium","Best seats")}</button>`:"")+`<div class="sl-ba-qty"><button type="button" data-ba="-1" aria-label="${b("picker.fewerSeats","Fewer seats")}">\u2212</button><span>${i.quantity}</span><button type="button" data-ba="1" aria-label="${b("picker.moreSeats","More seats")}">+</button></div>`+(i.categories.length>1?`<select class="sl-ba-cat" aria-label="${D(b("picker.preferredTicketType","Preferred ticket type"))}" data-ba-cat><option value="">${D(b("picker.anyTicketType","Any ticket type"))}</option>`+i.categories.map(e=>`<option value="${D(e.key)}"${i.selectedCategory===e.key?" selected":""}>${D(e.label)}</option>`).join("")+"</select>":'<span class="sl-ba-cat" aria-hidden="true"></span>')+(i.zones.length?`<select class="sl-ba-zone" aria-label="${b("picker.preferredVenueZone","Preferred venue zone")}" data-ba-zone><option value="">${b("picker.anyVenueZone","Any venue zone")}</option>`+i.zones.map(e=>`<option value="${D(e.id)}"${i.selectedZone===e.id?" selected":""}>${D(e.label)}</option>`).join("")+"</select>":"")+`<button type="button" class="sl-ba-go${i.busy?" sl-busy":""}"${i.busy?" disabled":""}>`+(i.busy?`<span class="sl-ba-spin" aria-hidden="true"></span>${b("picker.findingBestSeats","Finding the best seats\u2026")}`:(0,Ue.tCount)("picker.findBestSeatsCount",i.quantity))+"</button>"+(i.reopened?`<button type="button" class="sl-ba-back" data-ba-close>${b("picker.keepMyPicks","Keep my picks")}</button>`:"")+"</div>"}function Ba(i){if(i.salesClosed&&!i.hasPicks){let e=i.whenText?`<span class="when">${D(i.whenText)}</span>`:"";return`<div class="sl-closed-note" role="status"><b>${b("picker.salesClosedPill","Sales are closed")}</b><span>${b("picker.salesClosedCopy","Ticket sales for this event have ended.")}${e}</span></div>`}return i.hasPicks?"":i.hasGaAreas?`<div class="sl-tray-hint">${i.seated?i.venue3d?b("picker.trayHintChoose3dOrStanding","Choose a seat in the 3D venue \u2014 or grab standing tickets below."):b("picker.trayHintTapOrStanding","Tap a seat on the map \u2014 or grab standing tickets below."):i.venue3d?b("picker.gaTrayHintChoose3dArea","Choose an area in the 3D venue to select tickets."):b("picker.gaTrayHintTapArea","Tap an area on the map to choose tickets.")}</div>`:`<div class="sl-tray-hint">${i.groupMode==="per_performance"?b("picker.groupPerPerformanceTrayHint","Choose seats for this performance, then complete every date above."):i.groupMode?b("picker.groupTrayHint","Choose seats once \u2014 the same seats will be held for every performance."):i.venue3d?b("picker.trayHintChoose3dOrBest","Choose a seat in the 3D venue, or let us pick the best available for you."):b("picker.trayHintTapOrBest","Tap a seat on the map, or let us pick the best available for you.")}</div>`}var gr=6e4,Va=5*6e4,yp=String(Math.round(Va/6e4));function $a(i){let e=document.createElement("div");e.className="sl-extend",e.dataset.dock="map",e.setAttribute("role","status"),e.innerHTML='<button type="button" class="sl-extend-btn" data-ref="extendBtn"></button><button type="button" class="sl-extend-x" data-ref="extendDismiss" aria-label=""><svg viewBox="0 0 16 16" width="12" height="12" aria-hidden="true" focusable="false"><path d="M3.5 3.5 12.5 12.5M12.5 3.5 3.5 12.5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></button>',(i.regions["bottom-center"]??i.els.map).appendChild(e),i.extendEl=e,i.els.extendBtn=e.querySelector('[data-ref="extendBtn"]'),i.els.extendDismiss=e.querySelector('[data-ref="extendDismiss"]'),i.els.extendBtn.textContent=za(i),i.els.extendDismiss.setAttribute("aria-label",i.tf("picker.close","Close")),i.els.extendBtn.addEventListener("click",()=>{i.handleExtend()}),i.els.extendDismiss.addEventListener("click",()=>{i.extendDismissed=!0,i.setExtendPrompt(!1,0)})}function za(i){return i.tf("picker.addMinutes","+{count} min").replace("{count}",yp)}function ja(i){let e=i.hold?.items??[],t=new Set(e.map(r=>r.label));return i.committedSelection().filter(r=>!t.has(r.label)).reduce((r,s)=>r+(s.quantity??1),0)+Ve(i.gaQty,i.hold?.items??[])}function Ua(i){return(i.hold?.items??[]).reduce((e,t)=>e+(t.quantity??1),0)}function Ga(i){let e=new Set((i.hold?.items??[]).map(n=>n.label)),t=i.committedSelection().filter(n=>!e.has(n.label)).reduce((n,r)=>n+(r.quantity??1),0);return i.heldTicketCount()+t+Ve(i.gaQty,i.hold?.items??[])}function qa(i){let e=new Set((i.hold?.items??[]).map(r=>r.label)),t=i.committedSelection().filter(r=>e.has(r.label)).reduce((r,s)=>r+(s.quantity??1),0),n=Math.max(0,i.maxTickets-i.heldTicketCount()-Ve(i.gaQty,i.hold?.items??[]));i.controller.setMaxSelection(t+n)}function Ka(i,e=i.lastTrayCount,t=i.pendingSelectionCount()){let n=i.els.cta;if(!n)return;if(i.salesClosed){n.disabled=!0,n.textContent=i.tf("picker.salesClosedCta","Sales closed");return}if(i.confirmSeat||i.tableDialog&&!i.tableDialogHeld){n.disabled=!0,n.textContent=i.tableDialog?i.tf("picker.confirmYourTable","Confirm your table"):i.tf("picker.confirmOrCancelSeat","Confirm or cancel this seat");return}if(i.ctaPhase==="holding"){n.disabled=!0,n.innerHTML=`<span class="sl-cta-spin" aria-hidden="true"></span>${i.tf("picker.securingSeats","Securing your seats\u2026")}`;return}if(i.ctaPhase==="checkout"){n.disabled=!0,n.innerHTML=`<span class="sl-cta-spin" aria-hidden="true"></span>${i.tf("picker.openingCheckout","Opening secure checkout\u2026")}`;return}let r=!i.hold&&i.performanceGroup?.selectionMode==="per_performance"?i.performanceGroup.submissionState?.():null;if(r&&!r.ready){n.disabled=!0,n.textContent=i.tf("picker.completeAllPerformances","Complete all performances ({complete}/{total})").replace("{complete}",String(r.complete)).replace("{total}",String(r.total));return}let s=i.controller.getSelectionValidity(e);if(s&&!s.isValid){n.disabled=!0,n.textContent=wn(s,(o,a)=>i.tf(o,a),!0);return}n.disabled=e===0,n.textContent=i.hold?t?(0,Fa.t)("picker.secureMoreAndCheckout",{count:t}):i.tf("picker.continueToCheckout","Continue to checkout"):e?i.performanceGroup?i.tf("picker.holdSeatsForAllPerformances","Hold seats for all {count} performances").replace("{count}",String(i.performanceGroup.performanceCount)):i.tf("picker.holdSeatsAndCheckout","Hold seats & checkout"):i.tf("picker.selectSeats","Select seats")}function Wa(i,e){i.ctaPhase=e,i.syncCta(),i.renderPeek(i.lastTrayCount,i.lastTrayTotal,i.pendingSelectionCount())}async function Ya(i,e,t){i.setCtaPhase("checkout");try{await i.checkoutHandoff(e,t)}finally{i.ctaPhase==="checkout"&&!i.bookedShown&&i.setCtaPhase("idle")}}function Xa(i){return`@seatlayer/hold/v1/${encodeURIComponent(i.apiBase)}/${encodeURIComponent(i.opts.event)}`}function Qa(i){if(i.opts.initialHoldId)return i.opts.initialHoldId;if(i.opts.restoreHold===!1||typeof window>"u")return null;try{return window.sessionStorage.getItem(i.holdStorageKey())}catch{return null}}function Za(i,e){if(!(i.opts.restoreHold===!1||typeof window>"u"))try{window.sessionStorage.setItem(i.holdStorageKey(),e.holdId)}catch{}}function Ja(i){if(!(typeof window>"u"))try{window.sessionStorage.removeItem(i.holdStorageKey())}catch{}}async function el(i,e){try{let t=await i.controller.resumeHold(e);if(!t||i.destroyed)return null;let n={holdId:t.holdId,expiresAt:t.expiresAt,seats:t.seats,items:t.items};return i.hold=n,i.handedOff=!0,i.bookedShown=!1,i.ctaPhase="idle",i.startHoldTimer(n.expiresAt),i.rememberHold(n),i.syncTray(),i.emitHoldChange(),i.opts.onHoldRestored?.(n,n.seats??[],i.buildHandoff(n)),n}catch(t){let n=t?.status;return n===404||n===409?i.forgetHold():i.opts.onError?.(t),null}}async function tl(i){let e=i.rememberedHoldId();e&&await i.resumeHoldFromServer(e)}function il(i,e){i.stopHoldTimer(),i.holdExpiresAt=e,i.extendDismissed=!1,i.extendUsed=!1,i.hold&&i.rememberHold(i.hold);let t=i.els.hold;t.innerHTML=`<span class="sl-hold-dot" aria-hidden="true"></span><span>${i.tf("picker.held","Held")}</span><span class="sl-hold-time" data-ref="holdTime"></span>`;let n=t.querySelector('[data-ref="holdTime"]'),r=()=>{let s=Math.max(0,i.holdExpiresAt-Date.now());n&&(n.textContent=fi(s));let o=i.els.peek?.querySelector(".sl-peek-time");o&&(o.textContent=fi(s)),t.classList.add("on"),t.classList.toggle("is-expiring",s>0&&s<=gr),i.setExtendPrompt(s>0&&s<=gr,s),(s<=0||!i.controller.currentHold())&&i.stopHoldTimer()};i.holdTimer=setInterval(r,500),r()}function nl(i){i.holdTimer&&clearInterval(i.holdTimer),i.holdTimer=null,i.els.hold?.classList.remove("on","is-expiring"),i.root&&delete i.root.dataset.peekClock,i.setExtendPrompt(!1,0)}function rl(i,e,t){if(!i.extendEl)return;let n=e&&t>0&&i.root?.dataset.layout!=="narrow"&&!i.extendDismissed&&!i.extendUsed&&!!i.controller.currentHold()&&!i.bookedShown;i.extendEl.classList.toggle("on",n)}function sl(i){if(!i.holdTimer)return;let e=Math.max(0,i.holdExpiresAt-Date.now());i.setExtendPrompt(e>0&&e<=gr,e)}async function ol(i){let e=i.els.extendBtn,t=i.controller.currentHold();if(!(!t||!i.api.extend||i.extendUsed)){e.disabled=!0,e.textContent=i.tf("picker.addingEllipsis","Adding\u2026");try{let n=await i.api.extend(i.controller.key,t.holdId,Va);if(i.controller.currentHold()?.holdId!==t.holdId)return;i.controller.setHold({holdId:t.holdId,labels:t.labels,expiresAt:n.expiresAt,items:t.items});let r=i.controller.currentHold();if(!r)return;i.hold={holdId:r.holdId,expiresAt:r.expiresAt,seats:r.seats,items:r.items},i.holdExpiresAt=r.expiresAt,i.extendUsed=!0,i.extendEl?.classList.remove("on"),i.rememberHold(i.hold),i.emitHoldChange(),i.toast(i.tf("picker.moreTimeAdded","More time added \u2014 your seats are still held."),"success")}catch(n){if(n?.reason==="extend_limit"){i.extendUsed=!0,i.setExtendPrompt(!1,0);return}i.opts.onError?.(n),i.toast(i.tf("picker.couldNotAddMoreTime","Couldn't add more time \u2014 please head to checkout now."),"warning")}finally{e.disabled=!1,e.textContent=za(i)}}}var gi=require("@seatlayer/core");function al(i){return i?.previousPrice!=null&&i.previousPrice>i.price?i.previousPrice:null}function ll(i){return wp(i)+(i.moreLabel?`<button type="button" class="sl-price-more" aria-expanded="${!i.collapsed}">${i.esc(i.moreLabel)}</button>`:"")+xp(i.status)}function wp(i){let{esc:e,money:t}=i;return i.categories.map(n=>{let r=i.priceOf(n),s=i.rangeOf(n),o=i.offerOf(n.key),a=al(o),l=i.activeKey===n.key;return`<div class="sl-price-row${i.bandKeys!=null&&!i.bandKeys.has(n.key)?" sl-dim":""}${l?" sl-active":""}" data-cat="${e(n.key)}" role="button" tabindex="0" aria-pressed="${l}" title="${e(i.titleFor(n,l))}"><span class="sl-dot" style="--sl-cat-dot:${e(i.colorOf(n))}"></span><span class="sl-price-label">${e(n.label)}`+(o?.offerName?`<small class="sl-price-offer">${e(o.offerName)}</small>`:"")+`</span><span class="sl-price-left">${e(i.leftCount(i.left[n.key]??0))}</span>`+(a!=null?`<span class="sl-price-was">${e(t(a))}</span>`:"")+(s!=null?`<span class="sl-price-amt">${s.min===s.max?e(t(s.min)):`${e(t(s.min))}\u2013${e(t(s.max))}`}</span>`:r!=null?`<span class="sl-price-amt">${e(t(r))}</span>`:"")+"</div>"}).join("")}function xp(i){let e=t=>t.replace(/[&<>"']/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[n]);return`<div class="sl-status-key" aria-label="${e(i.legend)}"><span class="sl-status-item"><i class="sl-status-icon held" aria-hidden="true"><svg viewBox="0 0 24 24"><rect x="5" y="10" width="14" height="10" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3"/></svg></i>${e(i.held)}</span><span class="sl-status-item"><i class="sl-status-icon sold" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M7 17L17 7"/></svg></i>${e(i.sold)}</span></div>`}function br(i){let e=Math.abs(i.scrollLeft),t=e>2,n=e+i.clientWidth<i.scrollWidth-2;return i.dataset.fadeStart=String(t),i.dataset.fadeEnd=String(n),{start:t,end:n}}function cl(i){let{esc:e,money:t}=i;return`<button type="button" class="sl-rc sl-rc-all" data-rail-all aria-pressed="${i.allActive}" title="${e(i.allWord)}"><span class="sl-rc-t">${e(i.allWord)}</span></button>`+i.categories.map(r=>{let s=i.rangeOf(r),o=i.priceOf(r),a=s?s.min===s.max?t(s.min):`${t(s.min)}+`:o!=null?t(o):null,l=Object.prototype.hasOwnProperty.call(i.left,r.key)&&i.left[r.key]<=0,c=al(i.offerOf(r.key)),d=a?`${r.label} \u2014 ${a}${l?` (${i.soldOutWord})`:""}`:r.label;return`<button type="button" class="sl-rc" data-cat="${e(r.key)}" aria-pressed="${i.activeKey===r.key}" aria-label="${e(d)}" title="${e(d)}"${l?" disabled":""}><i class="sl-rc-dot" style="--sl-cat-dot:${e(i.colorOf(r))}"></i>`+(c!=null?`<span class="sl-rc-was">${e(t(c))}</span>`:"")+`<span class="sl-rc-t">${e(a??r.label)}</span></button>`}).join("")}function dl(i,e){let t=i.map(a=>({key:a.key,range:e.rangeOf(a)})).filter(a=>a.range!=null);if(!t.length)return[];let n=[...new Map(t.map(a=>[`${a.range.min}:${a.range.max}`,a.range])).values()].sort((a,l)=>a.min-l.min||a.max-l.max);if(n.length<=5)return n.map(a=>({id:`p${a.min}-${a.max}`,label:a.min===a.max?e.money(a.min):`${e.money(a.min)}\u2013${e.money(a.max)}`,keys:t.filter(l=>l.range.min===a.min&&l.range.max===a.max).map(l=>l.key),min:a.min,max:a.max}));let r=[...t].sort((a,l)=>a.range.min-l.range.min||a.range.max-l.range.max),s=Math.ceil(r.length/4),o=[];for(let a=0;a<r.length;a+=s){let l=r.slice(a,a+s),c=Math.min(...l.map(p=>p.range.min)),d=Math.max(...l.map(p=>p.range.max));o.push({id:`b${a}`,label:c===d?e.money(c):`${e.money(c)}\u2013${e.money(d)}`,keys:l.map(p=>p.key),min:c,max:d})}return o}function pl(i){if(i.suppressPricing||!i.els.prices||!i.els.pricesSec)return;let e=dl(i.controller.doc?.categories??[],i.legendDeps());if(e.length<2)return;let t=document.createElement("select");t.className="sl-price-select",t.setAttribute("aria-label",i.tf("picker.filterAndFocusByPrice","Filter and focus seats by price"));let n=document.createElement("option");n.value="all",n.textContent=i.tf("picker.allPrices","All prices"),t.appendChild(n);for(let r of e){let s=document.createElement("option");s.value=r.id,s.textContent=r.label,t.appendChild(s)}i.els.pricesSec.appendChild(t),i.priceSelect=t,t.addEventListener("change",()=>{i.applyPriceBand(e.find(r=>r.id===t.value)?.keys??null)})}function hl(i,e){if(i.focusedCatKey=null,i.priceBandKeys=e?new Set(e):null,i.priceSelect){let t=e?i.priceSelect.value:"all";i.priceSelect.value!==t&&(i.priceSelect.value=t)}i.controller.setCategoryFilter(e),i.controller.focusCategoryFilter(e),i.pushAvailabilityTo3d(),i.syncFloors(),i.syncRung(),i.minimap?.refreshMinimap(),i.syncPrices(),i.lastSection&&i.showSectionCard(i.lastSection)}function ul(i){return{colorOf:e=>i.controller.getRenderer()?.categoryDisplayColor?.(e.key)??e.color,rangeOf:e=>i.catPriceRange(e),priceOf:e=>i.catPrice(e),offerOf:e=>i.offerPrice(e),money:e=>i.money(e),esc:D}}function ml(i,e,t,n=i.legendDeps()){let r=i.els.railScroll,s=e.length>1;if(i.els.rail?.classList.toggle("has",s),!r)return;r.innerHTML=s?cl({...n,categories:e,left:t,activeKey:i.focusedCatKey,soldOutWord:i.tf("picker.soldOut","Sold out"),allWord:i.tf("picker.allPrices","All prices"),allActive:!i.focusedCatKey&&!i.priceBandKeys}):"";let o=e.map(a=>a.key).join("|");i.lastRailSignature!==o&&(i.lastRailSignature=o,r.scrollLeft=0),r.querySelectorAll(".sl-rc").forEach(a=>{a.addEventListener("click",()=>{if(a.hasAttribute("data-rail-all")){i.applyPriceBand(null);return}i.focusCategory(a.dataset.cat??"")})}),i.railEdgesBound||(i.railEdgesBound=!0,r.addEventListener("scroll",()=>br(r),{passive:!0})),requestAnimationFrame(()=>br(r))}function fl(i){let e=i.controller.doc;if(!e||!i.els.prices)return;let t=i.controller.categoryAvailability(),n=e.categories.filter(p=>!p.notForSale);i.syncSoldout(n,t);let r=i.legendDeps(),s=i.suppressPricing,o=s?{...r,priceOf:()=>{},rangeOf:()=>{},offerOf:()=>null}:r;s&&(i.els.pricesSec?.querySelector("span")?.replaceChildren(i.tf("picker.seatCategories","Seat categories")),i.els.pricesHint?.remove()),i.syncPriceRail(n,t,o);let a=5,l=n.length-a,c=l>1&&!i.pricesExpanded,d=c?n.slice(0,a):n;i.els.prices.classList.toggle("sl-expanded",l>1&&i.pricesExpanded),i.els.prices.innerHTML=ll({...o,categories:d,left:t,collapsed:c,activeKey:i.focusedCatKey,bandKeys:i.priceBandKeys,leftCount:p=>(0,gi.tCount)("picker.leftCount",p),titleFor:(p,u)=>u?i.tf("picker.showAllSeats","Show all seats"):(0,gi.t)("picker.showLabelSeatsOnMap",{label:p.label}),moreLabel:l>1?c?s?i.tf("picker.showAllCategories","Show all categories"):(0,gi.t)("picker.showAllTicketTypes",{count:n.length}):i.tf("picker.showFewer","Show fewer"):null,status:{legend:i.tf("picker.seatStatusLegend","Seat status legend"),held:i.tf("picker.temporarilyHeld","Temporarily held"),sold:i.tf("picker.sold","Sold")}}),i.els.prices.querySelectorAll(".sl-price-row").forEach(p=>{p.addEventListener("mouseenter",()=>i.controller.getRenderer()?.setCategoryHighlight?.(p.dataset.cat??null)),p.addEventListener("mouseleave",()=>i.controller.getRenderer()?.setCategoryHighlight?.(null));let u=()=>i.focusCategory(p.dataset.cat??"");p.addEventListener("click",u),p.addEventListener("keydown",h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),u())})}),i.els.prices.querySelector(".sl-price-more")?.addEventListener("click",()=>{i.pricesExpanded=!i.pricesExpanded,i.syncPrices()})}function gl(i,e){if(!e)return;let t=i.focusedCatKey===e?null:e;i.focusedCatKey=t,i.priceBandKeys=t?new Set([t]):null;let n=i.els.pricesSec?.querySelector(".sl-price-select");n&&(n.value="all"),i.controller.setCategoryFilter(t?[t]:null),i.controller.focusCategoryFilter(t?[t]:null),i.pushAvailabilityTo3d(),i.syncFloors(),i.syncRung(),i.minimap?.refreshMinimap(),i.syncPrices(),i.lastSection&&i.showSectionCard(i.lastSection)}var Bt=require("@seatlayer/core");function fe(i,e,t){let n=(0,Bt.t)(i,t);return n&&n!==i?n:t?e.replace(/\{(\w+)\}/g,(r,s)=>s in t?String(t[s]):r):e}function Sp(i){let e=(0,Bt.tCount)("picker.seatCount",i);return e.includes("picker.seatCount")?`${i} ${i===1?"seat":"seats"}`:e}function Tp(i){try{let e=Intl.ListFormat;if(e)return new e(void 0,{style:"long",type:"conjunction"}).format(i)}catch{}return i.join(", ")}function Cp(i){if(i.length<2)return!1;let e=[...i].sort((t,n)=>t-n);return new Set(e).size!==e.length?!1:e[e.length-1]-e[0]===e.length-1}function Ep(i){let e=i.filter(r=>r.objectType==="ga"),t=i.filter(r=>r.objectType!=="ga"),n=[];if(t.length){let r=Sp(t.length),s=[...new Set(t.map(l=>l.sectionLabel).filter(Boolean))],o=[...new Set(t.map(l=>l.rowLabel).filter(Boolean))],a=t.map(l=>Number(l.seatNumber)).filter(l=>Number.isFinite(l));if(s.length===1&&o.length===1&&a.length===t.length){let l=t.length===1?fe("picker.releasedSeatPlace","Section {section}, Row {row}, Seat {seat}",{section:s[0],row:o[0],seat:String(t[0].seatNumber??"")}):Cp(a)?fe("picker.releasedSeatRange","Section {section}, Row {row}, Seats {from}\u2013{to}",{section:s[0],row:o[0],from:Math.min(...a),to:Math.max(...a)}):"";n.push(l?fe("picker.releasedPair","{first} \xB7 {second}",{first:r,second:l}):fe("picker.releasedInSection","{seats} in Section {section}",{seats:r,section:s[0]}))}else s.length===1?n.push(fe("picker.releasedInSection","{seats} in Section {section}",{seats:r,section:s[0]})):s.length>1?n.push(fe("picker.releasedInSections","{seats} in Sections {sections}",{seats:r,sections:Tp(s)})):n.push(r)}for(let r of e)n.push(fe("picker.releasedGa","{quantity} \xD7 {area}",{quantity:r.quantity??1,area:r.label}));return n.length?n.reduce((r,s)=>fe("picker.releasedPair","{first} \xB7 {second}",{first:r,second:s})):""}function bl(i){if(!i)return[];let e=new Map((i.seats??[]).map(r=>[r.label,r])),t=i.items??[];return(t.length?t.map(r=>({label:r.label,objectType:r.objectType,quantity:r.quantity})):[...e.keys()].map(r=>({label:r}))).map(r=>{let s=e.get(r.label);return{label:r.label,...r.objectType?{objectType:r.objectType}:{},...r.quantity==null?{}:{quantity:r.quantity},...s?.sectionLabel?{sectionLabel:s.sectionLabel}:{},...s?.rowLabel?{rowLabel:Y(s)??s.rowLabel}:{},...s?.seatNumber?{seatNumber:s.seatNumber}:{}}})}function yl(i,e){if(!i.reducedMotion)for(let t of e.slice(0,10)){if(t.objectType==="ga")continue;let n=i.seatByLabel(t.label);!n||i.statusOf(n.id)!=="free"||i.flash(n.id,i.accent)}}function vl(i,e){if(!e.recoverable.length||!i.isConnected)return;let t=i.querySelector(".sl-hold-expired-next");t&&(e.taken.length?t.textContent=e.taken.slice(0,3).map(o=>(0,Bt.t)("picker.seatJustTakenByAnother",{label:o})).join(" "):t.remove());let n=i.querySelector(".sl-interrupt-actions"),r=n?.querySelector(".sl-interrupt-act");if(!n||!r)return;r.classList.add("sl-interrupt-act-secondary");let s=document.createElement("button");s.type="button",s.className="sl-interrupt-act sl-hold-expired-recover",s.textContent=(0,Bt.tCount)("picker.holdLapsedSelectAgain",e.recoverable.length),s.addEventListener("click",()=>e.onRecover([...e.recoverable])),n.insertBefore(s,r),i.classList.add("has-recovery"),s.focus()}function wl(i,e=[]){let t=document.createElement("div");t.className="sl-interrupt sl-hold-expired sl-mo-scrim",t.setAttribute("role","alertdialog"),t.setAttribute("aria-modal","true");let n=document.createElement("div");n.className="sl-interrupt-card sl-mo-in";let r=document.createElement("div");r.className="sl-interrupt-title",r.id="sl-hold-expired-title";let s=document.createElement("span");s.className="sl-interrupt-glyph",s.setAttribute("aria-hidden","true"),s.textContent="\u23F1";let o=document.createElement("span");o.textContent=fe("picker.holdExpiredTitle","Your seats were released"),r.append(s,o);let a=document.createElement("div");a.className="sl-interrupt-body",a.id="sl-hold-expired-body",a.textContent=fe("picker.holdExpiredBody","Your hold time ran out and the seats went back on sale."),n.append(r,a);let l=Ep(e);if(l){let u=document.createElement("div");u.className="sl-interrupt-body sl-interrupt-fact sl-hold-expired-seats",u.textContent=l,n.appendChild(u)}let c=document.createElement("div");c.className="sl-interrupt-body sl-hold-expired-next",c.textContent=fe("picker.holdExpiredPickAgain","Pick your seats again to continue \u2014 they may already be taken."),n.appendChild(c),t.setAttribute("aria-labelledby",r.id),t.setAttribute("aria-describedby",a.id);let d=document.createElement("div");d.className="sl-interrupt-actions";let p=document.createElement("button");return p.type="button",p.className="sl-interrupt-act sl-hold-expired-restart",p.textContent=fe("picker.holdExpiredRestart","Choose seats again"),p.addEventListener("click",()=>i.restart()),d.appendChild(p),n.appendChild(d),t.appendChild(n),t.addEventListener("pointerdown",u=>{u.target===t&&i.restart()}),t}var Ft=require("@seatlayer/core");var yr=4,Ap=6;function Pp(i){let e=i.trim();return/^[0-9]{1,4}$/.test(e)?Number(e):null}function xl(i){return[i.held?"h":"s",i.section,i.rowLabel,i.categoryLabel,i.amountText].join(" ")}function Mp(i){if(i.length===1)return i[0];let e=i.map(Pp);if(e.every(n=>n!==null)){let n=[...e].sort((o,a)=>o-a);if(n.every((o,a)=>a===0||o===n[a-1]+1))return`${n[0]}\u2013${n[n.length-1]}`;let s=n.slice(0,3).join(", ");return n.length>3?`${s} +${n.length-3}`:s}let t=i.slice(0,3).join(", ");return i.length>3?`${t} +${i.length-3}`:t}function Lp(i){let e=[];for(let t of i){let n=e[e.length-1];!!n&&t.groupable&&n.members[0].groupable&&xl(n.members[0])===xl(t)?n.members.push(t):e.push({members:[t],seatsLabel:""})}for(let t of e)t.seatsLabel=Mp(t.members.map(n=>n.seatLabel));return e}function Sl(i,e,t,n){let r=D;return` data-key="${r(i)}"`+(t.length?` data-held="${r(encodeURIComponent(t.join(`
2841
- `)))}"`:"")+(e.length?` data-seat="${r(e.join(" "))}"`:"")+(n?` data-locate="${r(n)}"`:"")}function Tl(i){let e=D;return`<div class="sl-chip${i.held?" sl-held":""}${i.fresh?" sl-enter":""}"`+Sl(i.key,i.seatIds,i.heldLabels,i.locateId)+">"+(i.held?i.stateHtml:`<span class="sl-chip-dot" style="background:${C(i.categoryColor)}" aria-hidden="true"></span>`)+`<div class="sl-chip-main">${i.identityHtml}`+(i.extrasHtml?`<div class="sl-chip-sub">${i.extrasHtml}</div>`:"")+`${i.noteHtml}</div>`+(i.amountText?`<span class="amt">${e(i.amountText)}</span>`:"")+i.railHtml+"</div>"}function kl(i,e,t,n,r){let s=D,o=e?.members.length??1,a=o>1,l=e?e.seatsLabel:i.seatLabel,c=e?e.members.reduce((u,h)=>u+h.amount,0):i.amount,d=e?e.members.flatMap(u=>u.seatIds):i.seatIds,p=e?e.members.flatMap(u=>u.heldLabels):i.heldLabels;return`<div class="sl-chip sl-tline${i.held?" sl-held":""}${i.fresh?" sl-enter":""}${e?"":" sl-tsub"}"${n?' data-overflow="true"':""}`+(e?` data-run="${t}"`:` data-run-of="${t}"`)+Sl(i.key,d,p,i.locateId)+">"+(a?`<button type="button" class="sl-trun-toggle" aria-expanded="false" aria-label="${s((0,Ft.tCount)("picker.seatsSelectedCount",o))}"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M9 6l6 6-6 6"/></svg></button>`:i.held?i.stateHtml:`<span class="sl-tline-dot" style="background:${C(i.categoryColor)}" aria-hidden="true"></span>`)+`<span class="sl-sr">${s(i.categoryLabel)}</span><span class="sl-tline-id"><b>${s(i.section||i.seatLabel)}</b>`+(i.rowLabel?`<i>\xB7</i><span>${s(i.rowLabel)}</span>`:"")+(i.section&&l?`<i>\xB7</i><span>${s(l)}</span>`:"")+"</span>"+i.extrasHtml+(r.suppressPricing||!i.amountText?"":(a?`<span class="sl-tline-mult">${o}\xD7</span>`:"")+`<span class="amt">${s(r.money(c))}</span>`)+(i.railHtml?`<button type="button" class="rm" aria-label="${s(a?(0,Ft.t)("picker.removeSeatLabel",{label:[i.section,i.rowLabel,l].filter(Boolean).join(" \xB7 ")}):i.removeAria)}"><svg viewBox="0 0 24 24" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></button>`:"")+"</div>"}function Cl(i,e){if(!i.length)return"";let t=Lp(i),n=[b("picker.section","Section"),b("picker.row","Row"),b("picker.seat","Seat")].join(" \xB7 "),r=t.length>=Ap,s=t.map((a,l)=>{let c=r&&l>=yr;return kl(a.members[0],a,l,c,e)+(a.members.length>1?a.members.map(d=>kl(d,null,l,c,e)).join(""):"")}).join(""),o=r?`<button type="button" class="sl-tmore" data-tmore aria-expanded="false" data-more="${D((0,Ft.t)("picker.moreCount",{count:t.length-yr}))}" data-less="${D(b("picker.showLess","Show less"))}"><span>${D((0,Ft.t)("picker.moreCount",{count:t.length-yr}))}</span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg></button>`:"";return`<div class="sl-tlist"${r?' data-collapsed="true"':""}><div class="sl-tlist-head sl-sr">${D(n)}</div>${s}${o}</div>`}function El(i){i.dataset.denseWired!=="true"&&(i.dataset.denseWired="true",i.addEventListener("click",e=>{let t=e.target,n=t.closest("[data-tmore]");if(n){let l=n.closest(".sl-tlist"),c=l?.getAttribute("data-collapsed")==="true";l?.setAttribute("data-collapsed",c?"false":"true"),n.setAttribute("aria-expanded",c?"true":"false");let d=n.querySelector("span");d&&(d.textContent=(c?n.dataset.less:n.dataset.more)??d.textContent);return}let r=t.closest(".sl-trun-toggle");if(!r)return;e.stopPropagation();let s=r.closest(".sl-tline"),o=s?.dataset.run;if(!s||o===void 0)return;let a=r.getAttribute("aria-expanded")!=="true";r.setAttribute("aria-expanded",a?"true":"false"),s.setAttribute("data-open",a?"true":"false"),s.parentElement?.querySelectorAll(`.sl-tsub[data-run-of="${o}"]`).forEach(l=>l.setAttribute("data-open",a?"true":"false"))}))}var st=require("@seatlayer/core");var Hp='<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="13" cy="4.4" r="1.9"/><path d="M11 8.2v5.1h5.1"/><path d="M16.6 13.3l1.9 6.3"/><path d="M15.4 14.9a5.6 5.6 0 1 1-5.9-3.4"/></svg>',Rp='<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="8.4"/><circle cx="8.6" cy="10.2" r="1.15"/><circle cx="12" cy="8.2" r="1.15"/><circle cx="15.4" cy="10.2" r="1.15"/><path d="M12 20.4a2.6 2.6 0 0 1 0-5.2 2.2 2.2 0 0 0 0-4.4"/></svg>',xn=class{constructor(e,t){this.active=new Set;this.deps=t,this.root=document.createElement("div"),this.root.className="sl-a11y",this.button=document.createElement("button"),this.button.type="button",this.button.className="sl-a11ybtn",this.button.setAttribute("aria-haspopup","true"),this.button.setAttribute("aria-expanded","false");let n=this.offered().length>0;this.button.setAttribute("aria-label",n?t.tf("picker.accessibilityOptions","Accessibility and colour options"):t.tf("picker.displayOptions","Display options")),this.button.innerHTML=n?Hp:Rp,this.menu=document.createElement("div"),this.menu.className="sl-a11ymenu",this.menu.hidden=!0;for(let r of this.stored())this.offeredFree().has(r)&&this.active.add(r);if(this.menu.innerHTML=yo(this.rows()),this.root.append(this.menu,this.button),e.appendChild(this.root),this.button.addEventListener("click",r=>{r.stopPropagation(),this.open(this.menu.hidden)}),this.menu.addEventListener("pointerdown",r=>r.stopPropagation()),this.menu.addEventListener("click",r=>r.stopPropagation()),this.dismiss=()=>this.open(!1),this.escape=r=>{r.key==="Escape"&&this.open(!1)},document.addEventListener("pointerdown",this.dismiss),document.addEventListener("keydown",this.escape),this.promoteCounts(),this.wire(),this.active.size){this.applyFilter({focus:!1});let r=()=>this.deps.focusSeatsForFilter();typeof requestAnimationFrame=="function"?requestAnimationFrame(r):r()}}colorblindRow(){return this.menu.querySelector(".sl-cbbtn")}syncCounts(){let e=new Map(this.offered().map(({key:n,count:r})=>[n,r])),t=!1;for(let n of this.menu.querySelectorAll("[data-a11y-row]")){let r=n.dataset.a11yRow??"";if(!r.startsWith("a11y:"))continue;let s=r.slice(5),o=e.get(s);if(o===void 0)continue;let a=this.countNode(n),l=o==null?"":o>0?(0,st.t)("picker.accessFreeCount",{count:o}):this.deps.tf("picker.accessNoneLeft","None left");a&&(a.textContent=l);let c=o===0;a instanceof HTMLButtonElement&&(a.disabled=c,a.setAttribute("aria-label",this.jumpLabel(s,l))),n.disabled=c,c?n.setAttribute("aria-disabled","true"):n.removeAttribute("aria-disabled"),c&&this.active.delete(s)&&(this.paint(n,!1),t=!0)}t&&this.applyFilter()}syncAccessibilityFilter(e){this.active.clear();for(let t of e??[])this.active.add(t);this.remember(e&&e.length?e:null);for(let t of this.menu.querySelectorAll("[data-a11y-row]")){let n=t.dataset.a11yRow??"";n.startsWith("a11y:")&&this.paint(t,this.active.has(n.slice(5)))}}destroy(){document.removeEventListener("pointerdown",this.dismiss),document.removeEventListener("keydown",this.escape),this.root.remove()}open(e){if(e===!this.menu.hidden)return;if(this.button.setAttribute("aria-expanded",String(e)),!e){this.menu.hidden=!0,this.menu.classList.remove("sl-mo-in","sl-mo-stagger");return}this.menu.hidden=!1;let t=this.button.getBoundingClientRect();Dn(this.menu,{x:t.left+t.width/2,y:t.top}),Jr(this.menu),Bi(this.menu)}rows(){return[...this.filterRows(),...this.deps.hasLimitedView?[{key:"limited",icon:"\u25D0",label:this.deps.tf("picker.hideLimitedView","Hide limited-view seats"),on:this.deps.isLimitedViewHidden()}]:[],{key:"colorblind",icon:"\u25D0",className:"sl-cbbtn",label:this.deps.tf("picker.colorblindColors","Colourblind-friendly colours"),on:this.deps.isColorblindSafe()}]}offered(){let e=this.deps.needs?.();if(e)return e.map(({key:n,count:r})=>({key:n,count:r}));let t=this.deps.present;return t?st.ACCESSIBILITY_TYPES.filter(({key:n})=>t.has(n)).map(({key:n})=>({key:n,count:null})):[]}offeredKeys(){return new Set(this.offered().map(({key:e})=>e))}offeredFree(){return new Set(this.offered().filter(({count:e})=>e!==0).map(({key:e})=>e))}filterRows(){let e=this.offeredKeys(),t=new Map(st.ACCESSIBILITY_TYPES.map(n=>[n.key,n]));return this.offered().flatMap(({key:n,count:r})=>{let s=t.get(n);return s?[{key:`a11y:${n}`,icon:s.icon,label:s.label,...n==="wheelchair"&&e.has("companion")?{note:this.deps.tf("picker.companionSeatsNote","Companion places beside them stay selectable")}:{},...r==null?{}:{count:r>0?(0,st.t)("picker.accessFreeCount",{count:r}):this.deps.tf("picker.accessNoneLeft","None left"),disabled:r===0},on:this.active.has(n)}]:[]})}wire(){for(let e of this.menu.querySelectorAll("[data-a11y-row]"))e.addEventListener("click",()=>{let t=e.dataset.a11yRow??"";if(t==="colorblind"){let s=!this.deps.isColorblindSafe();this.deps.setColorblindSafe(s),this.paint(e,s);return}if(t==="limited"){let s=!this.deps.isLimitedViewHidden();this.deps.setLimitedViewHidden(s),s&&this.deps.focusSeatsForFilter(),this.paint(e,s);return}let n=t.slice(5),r=!this.active.has(n);r?this.active.add(n):this.active.delete(n),this.paint(e,r),this.applyFilter()})}promoteCounts(){if(this.deps.stepToAccessibleSection)for(let e of this.menu.querySelectorAll('[data-a11y-row^="a11y:"]')){let t=e.querySelector(".sl-a11yrow-c");if(!t)continue;let n=(e.dataset.a11yRow??"").slice(5),r=document.createElement("div");r.className="sl-a11yrow-w",e.replaceWith(r);let s=document.createElement("button");s.type="button",s.className="sl-a11yrow-c sl-a11yjump",s.dataset.a11yJump=n,s.textContent=t.textContent,s.disabled=e.disabled,s.setAttribute("aria-label",this.jumpLabel(n,t.textContent??"")),t.remove(),e.setAttribute("aria-label",this.rowLabel(n,s.textContent??"")),r.append(e,s),s.addEventListener("click",o=>{o.stopPropagation(),this.active.has(n)||(this.active.add(n),this.paint(e,!0),this.applyFilter({focus:!1}));let a=this.deps.stepToAccessibleSection?.(n);a&&s.setAttribute("aria-label",this.jumpLabel(n,s.textContent??"",a.label))})}}countNode(e){return e.querySelector(".sl-a11yrow-c")??e.parentElement?.querySelector(".sl-a11yrow-c")??null}typeLabel(e){return st.ACCESSIBILITY_TYPES.find(t=>t.key===e)?.label??e}jumpLabel(e,t,n){return[this.deps.tf("picker.jumpToSection","Jump to section"),this.typeLabel(e),t,...n?[`${this.deps.tf("picker.section","Section")} ${n}`]:[]].filter(Boolean).join(" \xB7 ")}rowLabel(e,t){return[this.typeLabel(e),t].filter(Boolean).join(" \xB7 ")}paint(e,t){e.classList.toggle("on",t),e.setAttribute("aria-checked",String(t)),e.setAttribute("aria-pressed",String(t))}applyFilter(e={}){let t=this.active.size?[...this.active]:null;this.deps.applyAccessibilityFilter(t),this.remember(t),t&&e.focus!==!1&&this.deps.focusSeatsForFilter()}key(){let e=this.deps.chart?.();return`seatmap.a11y.filter.${this.deps.event}${e?`.${e}`:""}`}stored(){try{let e=window.sessionStorage.getItem(this.key()),t=e?JSON.parse(e):null;return Array.isArray(t)?t:[]}catch{return[]}}remember(e){try{e&&e.length?window.sessionStorage.setItem(this.key(),JSON.stringify(e)):window.sessionStorage.removeItem(this.key())}catch{}}};var Al=require("@seatlayer/core"),Ip=250;function Pl(i,e=Ip){let t=null,n=()=>{t===null&&(t=setTimeout(()=>{t=null,i()},e))},r=(0,Al.attachVisibilityCatchUp)(n),s=typeof window<"u"&&typeof window.addEventListener=="function";return s&&window.addEventListener("focus",n),()=>{t!==null&&(clearTimeout(t),t=null),r(),s&&window.removeEventListener("focus",n)}}var ot=require("@seatlayer/core");var kn=class{constructor(e){this.note=null;this.told=!1;this.deps=e}deferExpiryToast(e){this.told=!1,queueMicrotask(()=>{this.told||e()})}handle(e){if(!e.holdLapsed)return;this.told=!0;let t=(0,ot.holdRecoveryShape)(e),n=e.lapsedLabels.length,r=n-e.recoverable.length,s=t==="all"?(0,ot.tCount)("picker.holdLapsedStillFree",n):t==="partial"?(0,ot.tCount)("picker.holdLapsedSomeTaken",r):(0,ot.tCount)("picker.holdLapsedAllTaken",n);this.note={message:s,recoverable:t==="none"?[]:[...e.recoverable]},this.deps.toast(s,t==="none"?"error":"warning",t==="none"?void 0:{label:this.actionLabel(),onClick:()=>this.recover()}),this.deps.syncTray()}noteHtml(){if(!this.note)return"";let e=this.note.recoverable.length?`<button type="button" data-lapse-again>${D(this.actionLabel())}</button>`:"";return`<div class="sl-lapse-note" role="status"><span>${D(this.note.message)}</span>${e}</div>`}wire(e){e?.querySelector("[data-lapse-again]")?.addEventListener("click",()=>this.recover())}clear(){this.note&&(this.note=null,this.deps.syncTray())}actionLabel(){return(0,ot.tCount)("picker.holdLapsedSelectAgain",this.note?.recoverable.length??0)}recover(){let e=this.note?.recoverable??[];this.note=null,this.deps.syncTray(),e.length&&this.deps.reselect(e)}};var Ml=Symbol("seatlayer.performance-group-picker");function Sn(i,e){return Object.defineProperty(i,Ml,{configurable:!1,enumerable:!1,value:Object.freeze({...e})}),i}function Ll(i){return i[Ml]??null}var Hl="@seatlayer/pending-checkout/v1";function Op(i){return typeof i=="string"&&i.length<=160&&/^ord_[A-Za-z0-9_-]+$/.test(i)}function Tn(i){if(typeof location>"u")return null;let e=new URLSearchParams(location.search),t=e.get("seatlayer_checkout");if(t!=="success"&&t!=="cancelled")return null;let n=null;try{let r=window.sessionStorage.getItem(Hl);if(r){let s=null;try{s=JSON.parse(r)}catch{}if(s&&Op(s.orderId)){let o=Date.now()-Number(s.storedAt);if(o>=0&&o<=144e5){if(s.eventKey&&s.eventKey!==i)return null;n=s.orderId}}}window.sessionStorage.removeItem(Hl)}catch{}e.delete("seatlayer_checkout");try{let r=e.toString();history.replaceState(history.state,"",`${location.pathname}${r?`?${r}`:""}${location.hash}`)}catch{}return{outcome:t,orderId:n}}function Rl(i){if(!i.framed)return null;let e=i.ancestorOrigins?.length?i.ancestorOrigins[0]:null;for(let t of[e,i.referrer])if(t)try{return new URL(t).origin}catch{}return null}var _p="https://api.seatlayer.io",Dp=10,Np=250,Il=6e4,Ol=4,Bp=10,Fp=40,Vp=220,_l="seatmap.a11y.cb";function $p(){try{if(typeof window>"u")return null;let i=window.localStorage.getItem(_l);return i==null?null:i==="1"}catch{return null}}function zp(i){try{window.localStorage.setItem(_l,i?"1":"0")}catch{}}var Ge=class i{constructor(e){this.realtime=null;this.accessEl=null;this.lastSelectionValidity=null;this.root=null;this.mapHost=null;this.rendered=!1;this.destroyed=!1;this.renderInfo=null;this.webMcp=null;this.localeGeneration=0;this.els={};this.regions={};this.ro=null;this.holdTimer=null;this.toastTimer=null;this.offerReadInFlight=null;this.offerReadSettledAt=0;this.offerRefreshTimer=null;this.offerBoundaryTimer=null;this.offerVisibilityHandler=null;this.motionTimers=new Set;this.currency="USD";this.eventTimezone=null;this.eventWhenText=null;this.offerAvailability=null;this.channelByObject=new Map;this.pricesByChannel=new Map;this.hold=null;this.holdExpiresAt=0;this.handedOff=!1;this.bookedShown=!1;this.holdConflicted=!1;this.paymentOptions=null;this.checkoutPanel=null;this.extendEl=null;this.extendDismissed=!1;this.extendUsed=!1;this.bookedEl=null;this.holdExpiredEl=null;this.holdExpiredFresh=!1;this.holdExpiredUnits=[];this.gaQty=new Map;this.gaPromptEl=null;this.gaPromptReturnFocus=null;this.gaAreasExpanded=!1;this.lastMapPoint=null;this.tipEl=null;this.tipPos={x:0,y:0};this.tipPinned=!1;this.tipMarkedHoverLabel=null;this.lastPointerType="mouse";this.themeMode=null;this.colorSchemeStop=null;this.seatsRevealed=!1;this.seatsRevealedReport=null;this.confirmCardCache=null;this.suppressConfirmationSeatId=null;this.tableDialogEl=null;this.tableDialog=null;this.tableDialogHeld=!1;this.tableDialogReturnFocus=null;this.srEl=null;this.baQty=2;this.baCat="";this.baZone="";this.baPremium=!1;this.bestAvailableConfirm=!1;this.salesClosed=!1;this.soldOut=!1;this.soldoutEl=null;this.cbSafe=!1;this.rungsEl=null;this.projectionEl=null;this.buyerView="map";this.view3dEl=null;this.view3dHandle=null;this.view3dGen=0;this.view3dReturnSeat=null;this.view3dTargetSeatId=null;this.view3dCompareSeatIds=[];this.view3dCompareChip=new fn({overlay:()=>this.view3dEl,savedSeatIds:()=>this.view3dCompareSeatIds,openComparison:()=>this.openView3dComparison(),clearComparison:()=>this.clearView3dComparison(),toast:(e,t)=>this.toast(e,t)});this.view3dCompareEl=null;this.view3dCompareCleanup=null;this.view3dSeatViewChrome=null;this.view3dPassportEl=null;this.view3dPassportCleanup=null;this.floorsEl=null;this.viewEl=null;this.viewCleanup=null;this.seatViewGen=0;this.allSeatsCache=null;this.view3dBack=null;this.view3dNav=null;this.lastRailSignature="";this.priceSelect=null;this.minimap=null;this.pickerLayoutSize={width:0,height:0};this.priceBandKeys=null;this.focusedCatKey=null;this.limitedViewFilter=!1;this.pricesExpanded=!1;this.sectionCardCache=null;this.lastTrayCount=0;this.langSel=null;this.lastTrayTotal=0;this.lastTrayKeys=new Set;this.bestAvailableBusy=!1;this.releasingLabels=new Set;this.holdingLabels=new Set;this.ctaPhase="idle";this.a11yMenu=null;this.detachAttention=null;this.lapse=new kn({toast:(e,t,n)=>this.toast(e,t,n),reselect:e=>{this.controller.select(e),this.handleCta()},syncTray:()=>this.syncTray()});this.railEdgesBound=!1;this.fsFallback=!1;this.fsChangeHandler=null;this.fsEscHandler=null;this.eventDetailsHidden=!1;this.sideCollapsed=!1;this.sideToggleEl=null;this.framedFs=!1;this.lastPostedHeight=0;this.cbEl=null;this.modalScrim=null;this.prevFocus=null;this.escHandler=null;this.closeModal=null;this.fitScheduled=!1;this.perspectiveWarned=!1;if(!e||typeof e!="object")throw new Error("seatmap: options object is required");if(!e.event||typeof e.event!="string")throw new Error("seatmap: `event` key is required");if(!e.container)throw new Error("seatmap: `container` is required (or use SeatPicker.open())");this.performanceGroup=Ll(e),this.suppressPricing=!!this.performanceGroup?.suppressPricing,this.opts={...e,confirmSelection:e.confirmSelection??!0},this.eventDetailsHidden=!!e.hideEventDetails,this.hostPricing=e.pricing,this.apiBase=(e.apiBase??_p).replace(/\/+$/,"");let t={onExpired:a=>{this.opts.onAccessExpired?.(a),a.refreshed||this.showAccessPanel({reason:"no_token",retryable:!1})},onUnavailable:a=>{this.opts.onAccessUnavailable?.(a),this.showAccessPanel(a)}},n=!e.transport&&e.publicKey&&!e.buyerAccessTokenProvider&&!e.buyerAccessToken?_i({base:this.apiBase,event:e.event,publicKey:e.publicKey,accessHooks:t,apiOptions:{referral:e.referral,onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)}}):null;this.access=e.transport?null:n?.access??Pt(e,t),this.pubApi=e.transport?null:n?.api??new Be(this.apiBase,{access:this.access??void 0,referral:e.referral,onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)}),this.api=e.transport??this.pubApi,this.buyerAssetUrls=new Rt(e.event,this.api.asset?(a,l)=>this.api.asset(a,l):void 0),e.checkout==="hosted"&&!this.pubApi&&console.warn('seatlayer: checkout: "hosted" needs the widget\'s own transport \u2014 a custom `transport` owns its backend, so the picker is staying on onCheckout for this mount.'),this.checkoutMode=e.checkout==="hosted"&&this.pubApi?"hosted":"handoff";let r=e.numberOfPlacesToSelect;if(r!=null&&(!Number.isInteger(r)||r<1))throw new Error("seatmap: `numberOfPlacesToSelect` must be a positive integer");this.exactTickets=r??null;let s=Oa(e.selectionValidators);if(this.exactTickets!=null&&s>this.exactTickets)throw new Error("seatmap: `minimumSelectedPlaces.minimum` cannot exceed `numberOfPlacesToSelect`");let o=Math.max(1,Math.floor(e.maxSelection??this.exactTickets??Math.max(Dp,s)));if(this.exactTickets!=null&&o<this.exactTickets)throw new Error("seatmap: `maxSelection` cannot be lower than `numberOfPlacesToSelect`");if(e.maxSelection!=null&&o<s)throw new Error("seatmap: `maxSelection` cannot be lower than `minimumSelectedPlaces.minimum`");this.maxTickets=this.exactTickets??o,this.cbSafe=$p()??!!e.colorblindSafe,this.controller=this.wireController(e)}get confirmEl(){return this.confirmCard.element}set confirmEl(e){this.confirmCard.element=e}get confirmSeat(){return this.confirmCard.candidate}set confirmSeat(e){this.confirmCard.candidate=e}get lastSection(){return this.sectionCard.summary}set lastSection(e){this.sectionCard.adopt(e)}deliverableViewReference(e){return _t(e)}isFramed(){return typeof window<"u"&&window.parent!==window}postToHost(e){if(!this.isFramed())return;let t=Rl({framed:!0,ancestorOrigins:window.location.ancestorOrigins,referrer:document.referrer});if(t)try{window.parent.postMessage(e,t)}catch{}}measureFramedHeight(){let e=this.root;if(!e)return 0;let t=e.clientWidth||(typeof window<"u"?window.innerWidth:0)||0;if(t<=0)return 0;let n=t<640?1.2:.62;return Math.max(420,Math.round(t*n))}reportFramedHeight(){if(!this.isFramed())return;let e=this.measureFramedHeight();e<=0||e===this.lastPostedHeight||(this.lastPostedHeight=e,this.postToHost({type:"seatlayer:height",px:e}))}toggleFullscreen(){let e=this.root;if(!e)return;!!document.fullscreenElement||this.fsFallback||this.framedFs?document.fullscreenElement?document.exitFullscreen().catch(()=>{}):this.framedFs?this.setFramedFs(!1):this.setFsFallback(!1):e.requestFullscreen?e.requestFullscreen().catch(()=>this.enterFsFallback()):this.enterFsFallback()}fillsViewport(){let e=this.root;if(!e||typeof window>"u")return!1;let t=e.getBoundingClientRect();return t.height>=window.innerHeight-Ol&&t.width>=window.innerWidth-Ol}syncFullscreenAffordance(){let e=this.els.zfs;if(!e)return;let n=!(!!document.fullscreenElement||this.fsFallback||this.framedFs)&&this.root?.dataset.layout==="narrow"&&this.fillsViewport();e.hidden=n,e.tabIndex=n?-1:0,e.setAttribute("aria-hidden",String(n))}syncFullscreenButtons(){let e=!!document.fullscreenElement||this.fsFallback||this.framedFs,t=this.eventDetailsHidden&&!e;this.root?.setAttribute("data-event-details-hidden",String(t)),this.root?.setAttribute("data-fs",String(e)),this.els.zfs?.setAttribute("aria-pressed",String(e)),this.els.zfs?.setAttribute("title",e?this.tf("picker.exitFullScreen","Exit full screen"):this.tf("picker.fullScreen","Full screen"));let n=this.els.zfs?.querySelector(".sl-zfs-lbl");n&&(n.textContent=e?this.tf("picker.exitFullScreen","Exit full screen"):this.tf("picker.fullScreen","Full screen")),this.view3dEl?.querySelector(".sl-view3d-fs")?.setAttribute("aria-pressed",String(e)),this.syncFullscreenAffordance()}enterFsFallback(){this.isFramed()?this.setFramedFs(!0):this.setFsFallback(!0)}setFramedFs(e){this.framedFs!==e&&(this.framedFs=e,this.syncFullscreenButtons(),this.postToHost({type:"seatlayer:fullscreen",on:e,background:this.cssVar("--sl-bg")||void 0}),e&&!this.fsEscHandler?(this.fsEscHandler=t=>{t.key==="Escape"&&!document.fullscreenElement&&this.setFramedFs(!1)},window.addEventListener("keydown",this.fsEscHandler)):!e&&this.fsEscHandler&&(window.removeEventListener("keydown",this.fsEscHandler),this.fsEscHandler=null),requestAnimationFrame(()=>this.controller.refitCurrentView()))}setFsFallback(e){this.fsFallback!==e&&(this.fsFallback=e,this.root?.classList.toggle("sl-fs",e),this.syncFullscreenButtons(),e&&!this.fsEscHandler?(this.fsEscHandler=t=>{t.key==="Escape"&&!document.fullscreenElement&&this.setFsFallback(!1)},window.addEventListener("keydown",this.fsEscHandler)):!e&&this.fsEscHandler&&(window.removeEventListener("keydown",this.fsEscHandler),this.fsEscHandler=null),requestAnimationFrame(()=>this.controller.refitCurrentView()))}close(){this.closeModal?this.closeModal():this.destroy()}static async open(e){It();let t=document.activeElement instanceof HTMLElement?document.activeElement:null,n=document.createElement("div");n.className="sl-modal-scrim";let r=document.createElement("div");r.className="sl-modal-frame",r.style.setProperty("--sl-bg",kt(void 0,e.theme)["--sl-bg"]),r.setAttribute("role","dialog"),r.setAttribute("aria-modal","true"),r.setAttribute("aria-label",b("picker.seatSelection","Seat selection")),r.tabIndex=-1,n.appendChild(r),document.body.appendChild(n);let s=document.body.style.overflow;document.body.style.overflow="hidden";let o=new i({...e,container:r});o.modalScrim=n,o.prevFocus=t;let a=["a[href]","area[href]","button","input","select","textarea","iframe","object","embed","summary","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"[tabindex]"].join(","),l=()=>{let g=[...r.querySelectorAll('[role="dialog"][aria-modal="true"]')].filter(y=>y.isConnected&&!y.closest('[hidden], [aria-hidden="true"], [inert]'));return g[g.length-1]??r},c=(g,y)=>{let S=g;for(;S;){let k=window.getComputedStyle(S);if(S.hidden||S.getAttribute("aria-hidden")==="true"||S.hasAttribute("inert")||k.display==="none"||k.visibility==="hidden"||k.visibility==="collapse")return!0;if(S===y)return!1;S=S.parentElement}return!0},d=g=>[...g.querySelectorAll(a)].filter(y=>y.tabIndex>=0&&!y.matches(":disabled")&&!c(y,g)),p=(g,y)=>{let S=d(g),k=y?S[S.length-1]:S[0];k?k.focus({preventScroll:!0}):(g.hasAttribute("tabindex")||(g.tabIndex=-1),g.focus({preventScroll:!0}))},u=!1,h=()=>{if(u)return;u=!0,document.body.style.overflow=s,o.escHandler&&document.removeEventListener("keydown",o.escHandler),n.remove(),o.modalScrim=null;let g=o.prevFocus;o.prevFocus=null,g?.isConnected&&g.focus({preventScroll:!0});let y=()=>{o.destroy(),e.onClose?.()};o.hold&&!o.handedOff?o.release().finally(y):y()};return o.closeModal=h,n.addEventListener("mousedown",g=>{g.target===n&&h()}),o.escHandler=g=>{if(g.key==="Tab"){if(g.defaultPrevented)return;let y=l(),S=d(y),k=S[0],v=S[S.length-1],f=document.activeElement;!k||!v?(g.preventDefault(),p(y,g.shiftKey)):f===y||!f||!y.contains(f)?(g.preventDefault(),(g.shiftKey?v:k).focus({preventScroll:!0})):g.shiftKey&&f===k?(g.preventDefault(),v.focus({preventScroll:!0})):!g.shiftKey&&f===v&&(g.preventDefault(),k.focus({preventScroll:!0}));return}g.key==="Escape"&&(o.tableDialog?(g.preventDefault(),o.cancelTableDialog()):o.confirmSeat?(g.preventDefault(),o.cancelConfirm()):o.bestAvailableConfirm?(g.preventDefault(),o.bestAvailableConfirm=!1,o.syncTray()):(g.preventDefault(),h()))},document.addEventListener("keydown",o.escHandler),await o.render(),o.els.close?.classList.add("on"),o.els.close?.addEventListener("click",h),p(l(),!1),o}wireController(e){return new R.PickerController({transport:this.api,eventKey:e.event,maxSelection:this.maxTickets,selectedObjects:e.selectedObjects,selectableObjects:e.selectableObjects,numberOfPlacesToSelect:e.numberOfPlacesToSelect,selectionValidators:e.selectionValidators,currency:e.currency,flashOnLiveChange:!0,colorblindSafe:this.cbSafe,...e.loadingReveal?{loadingReveal:e.loadingReveal}:{},mapTheme:xt(e.theme),onSeatsRevealed:()=>{this.seatsRevealed=!0,e.onSeatsRevealed?.(),this.seatsRevealedReport?.()},onGAClick:t=>{let n=this.controller.getGAAreas().find(r=>r.id===t);n&&(this.collapseSheet(),Fn(this,n,this.lastMapPoint))},onSelectionChange:()=>{this.syncTray(),this.minimap?.refreshMinimap(),this.committedSelection().length&&this.collapseSectionCard(),this.syncSelectionTo3d()},onStatusChange:(t=>{this.syncSeatMarks(),this.syncPrices(),this.a11yMenu?.syncCounts(),Xs(t)&&this.scheduleOfferRefresh(!0),this.evictTakenSelections(),this.detectBooked(),this.minimap?.refreshMinimap(),this.pushAvailabilityTo3d()}),onHoldExpired:()=>{let t=this.handedOff,n=this.holdConflicted;this.holdExpiredUnits=bl(this.hold),this.hold=null,this.forgetHold(),this.handedOff=!1,this.bookedShown=!1,this.holdConflicted=!1,this.ctaPhase="idle",this.stopHoldTimer(),this.gaQty.clear(),this.lapse.deferExpiryToast(()=>{if(t||n){this.toast((0,R.t)("picker.holdExpired",void 0)||"Your hold expired \u2014 seats released. Pick again.","warning");return}this.showHoldExpired()}),this.syncTray(),this.emitHoldChange(),this.opts.onHoldExpired?.()},onAvailabilityRefresh:t=>this.lapse.handle(t),confirmSelection:this.opts.confirmSelection,onSelect:t=>{if(this.salesClosed){this.controller.deselect([t.id]),this.toast(this.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}this.controller.tableSelection(t.id)||(this.collapseSheet(),this.flashPickedSeat(t.id),this.opts.confirmSelection&&this.suppressConfirmationSeatId!==t.id&&this.showConfirm(t))},onTableSelectionRequest:t=>{if(this.salesClosed){this.controller.deselect(t.physicalSeatIds),this.toast(this.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}this.showTableDialog(t,!1)},onDeselect:t=>{if(this.controller.currentHold()?.labels.includes(t.label)){this.removeHeldLabels([t.label]);return}if(this.confirmSeat?.id===t.id){this.dismissConfirm();return}if(this.tableDialog?.physicalSeatIds.includes(t.id)){this.dismissTableDialog();return}this.opts.confirmSelection===!1||this.salesClosed||this.controller.tableSelection(t.id)||(this.controller.select([t.id]),this.showConfirm(t,"remove"))},onSelectionLimit:()=>{this.toast((0,R.t)("picker.maxTicketsForOrder",{count:this.maxTickets}),"warning"),this.opts.onSelectionLimit?.(this.maxTickets)},onViewChange:()=>{this.reanchorConfirm(),this.syncRung(),this.syncProjection(),this.minimap?.drawMinimapRect(),this.sectionCardOnView()},onSectionFocus:t=>this.showSectionCard(t),onDeckTap:()=>{this.showSectionCard(null),this.syncFloors(),this.syncRung(),this.minimap?.refreshMinimap()},onFocusSeat:t=>this.announceSeat(t),onSeatHover:t=>this.updateTooltip(t),hostCardOpen:()=>this.tipPinned||!!this.confirmSeat,onHint:t=>{t&&this.toast(t)},onSalesClosed:()=>this.setSalesClosed(!0),onError:t=>this.opts.onError?.(t)})}async render(){if(this.rendered)return this;let e=performance.now(),t={},n=A=>Math.round((performance.now()-A)*100)/100;this.rendered=!0,It();let r=performance.now(),s=Ri(this.opts.locale,this.opts.messages),o=this.localeGeneration+=1;this.checkoutMode==="hosted"&&(this.paymentOptions=this.pubApi.paymentOptions(this.opts.event));let a=performance.now(),l=Cs(this.opts.container),{root:c,els:d,mapHost:p}=Kr(l,(A,N)=>this.tf(A,N),this.opts.theme);this.root=c,this.els=d,this.mapHost=p,Ii(c,s,A=>{t.loadLocale=n(r),this.destroyed||this.applyActiveLocale(A,o)}),ta(c,()=>[{open:()=>!!this.holdExpiredEl,close:()=>this.restartAfterHoldExpiry()},{open:()=>this.tipPinned,close:()=>this.unpinTooltip()},{open:()=>!!this.tableDialog,close:()=>this.cancelTableDialog()},{open:()=>!!this.confirmSeat,close:()=>this.cancelConfirm()},{open:()=>this.bestAvailableConfirm,close:()=>{this.bestAvailableConfirm=!1,this.syncTray()}}]),this.syncFullscreenButtons(),this.wireBuyerShell(c);let u=document.createElement("div");u.style.cssText="position:absolute;inset:0",this.mapHost.appendChild(u),t.mountBuyerShell=n(a),t.skeletonPaint=n(e),this.startRealtime();let h=await this.loadChart(u,t,n);if(!h)return this.realtime?.stop(),this.realtime=null,this;t.shellsPaint=n(e);let g=performance.now();if(this.salesClosed=!!h.salesClosed||!!this.opts.readOnly,c.dataset.eventMode=h.mode==="test"?"test":"live",!this.opts.locale&&h.locale&&this.setLocale(h.locale),this.controller.setViewMode(this.normalizeInitialView(this.opts.initialView)),this.buildRegions(),this.regions["bottom-right"].appendChild(this.els.zoom),this.regions["bottom-center"].appendChild(this.els.toast),h.mode==="test"){let A=document.createElement("div");A.className="sl-testbadge",A.textContent=Ts((0,R.t)("picker.testMode"),(0,R.getLocale)()),A.setAttribute("aria-label",(0,R.t)("picker.testMode")),A.title=this.tf("picker.testModeExplained","Bookings here are not real and no card is charged"),this.regions["top-left"].appendChild(A)}let y=this.controller.doc?.theme;this.themeMode=this.opts.theme?.mode??null,this.applyThemeTokens(c),this.watchThemeMode(),this.currency=h.currency??this.opts.currency??"USD",this.eventTimezone=h.timezone??null,Es(this.els.logo,[this.opts.theme?.logoUrl,y?.logoUrl,h.posterUrl],this.opts.theme?.brandName??y?.brandName??h.eventName??"?"),this.els.name.textContent=h.eventName??"";let S=h.startsAt?Gi(h.startsAt,h.timezone??null,this.opts.locale):"";this.eventWhenText=S||null,this.els.meta.textContent=[h.venue,S].filter(Boolean).join(" \xB7 "),this.syncProjection(),this.buildBadge(y);let k=!!this.controller.doc&&this.controller.getExpandedSeats().some(A=>A.commercial?.restrictedView||A.commercial?.obstructedView);this.buildAccessibilityMenu(k),this.buildLanguageSwitcher(this.els.zoom??this.regions["bottom-right"]),this.srEl=document.createElement("div"),this.srEl.className="sl-sr",this.srEl.setAttribute("aria-live","polite"),c.appendChild(this.srEl),this.buildArenaChrome(),this.buildMinimap(),this.buildPriceFilter(),this.buildExtendPrompt(),this.buildBookedOverlay(),this.buildSoldoutOverlay(),this.buildPanelToggle(),this.opts.panelCollapsed&&this.setPanelCollapsed(!0),this.dockLayoutChrome(),t.buildBuyerControls=n(g);let v=performance.now();if(await this.restoreRememberedHold(),t.restoreHold=n(v),this.destroyed)return this;this.dismissSkeleton(),this.salesClosed&&this.applySalesClosed(),this.syncPrices(),this.syncTray(),this.resumeHostedOrder();let f=this.controller.doc,P=Zi(this.opts.event),B=this.performanceGroup?.surface??(this.performanceGroup?"performance_group":null),E=B??"event",O={apiBase:this.apiBase,eventKey:this.opts.event,metricScope:E,surface:B==="season"?"season_picker":B==="performance_group"?"performance_group_picker":"seat_picker",ms:n(e),performanceProfile:t,chartDelivery:h.chartDelivery,seatCount:this.allSeats().length,objectCount:f?.objects.length??0,sectionCount:f?.objects.filter(A=>A.type==="section").length??0,floorCount:this.controller.getFloors().length,chartName:f?.name,view:this.buyerView,load:P,transport:this.opts.transport?"custom":"pubapi"};aa(O,(A,N)=>this.emitAnalytics(A,N));let M=h.performanceProfile;return this.seatsRevealedReport=()=>this.emitAnalytics("chart_seats_revealed",pr({...O,performanceProfile:{...O.performanceProfile,...M}})),this.seatsRevealed&&this.seatsRevealedReport(),this.renderInfo=h,await this.registerAgentTools(),this}registerAgentTools(){return oa(this)}webMcpHost(e){return dr(this,e)}wireBuyerShell(e){this.refreshOfferAvailability(!1),this.api.availability&&(this.offerVisibilityHandler=()=>{!document.hidden&&!this.destroyed&&this.refreshOfferAvailability(!1)},document.addEventListener("visibilitychange",this.offerVisibilityHandler)),this.detachAttention=Pl(()=>{this.destroyed||this.controller.refreshAvailability()}),this.observeLayout(e),this.els.zin.addEventListener("click",()=>this.controller.zoomIn()),this.els.zout.addEventListener("click",()=>this.controller.zoomOut()),this.els.zfs.addEventListener("click",()=>this.toggleFullscreen()),this.fsChangeHandler=()=>{document.fullscreenElement||this.setFsFallback(!1),this.syncFullscreenButtons(),requestAnimationFrame(()=>this.controller.refitCurrentView())},document.addEventListener("fullscreenchange",this.fsChangeHandler);let t=this.els.sheetHead;if(t){let r=this.els.sheetToggle,s=c=>{e.dataset.sheet=c?"open":"peek",r?.setAttribute("aria-expanded",String(c)),r?.setAttribute("aria-label",c?this.tf("picker.collapseTicketPanel","Collapse ticket panel"):this.tf("picker.openTicketPanel","Open ticket panel"))};s(e.dataset.sheet==="open"),r?.addEventListener("click",c=>{c.stopPropagation(),s(e.dataset.sheet!=="open")}),this.els.peek?.addEventListener("click",c=>{let d=c.target.closest(".sl-sheet-go");d&&(c.stopPropagation(),d.dataset.act==="checkout"?this.handleCta():d.dataset.act==="find"?(s(!0),this.els.tray?.querySelector(".sl-ba")?.scrollIntoView({block:"nearest",behavior:this.reducedMotion()?"auto":"smooth"}),this.els.tray?.querySelector(".sl-ba-go")?.focus()):s(!0))});let o=0,a=!1,l=!1;t.addEventListener("pointerdown",c=>{if(c.target.closest?.(".sl-seccard,.sl-sheet-toggle,.sl-sheet-go")){l=!1;return}l=!0,a=!1,o=c.clientY,t.setPointerCapture?.(c.pointerId)}),t.addEventListener("pointermove",c=>{if(!l||a)return;let d=c.clientY-o;d<-18?(s(!0),a=!0):d>18&&(s(!1),a=!0)}),t.addEventListener("pointerup",c=>{l&&!a&&Math.abs(c.clientY-o)<6&&s(e.dataset.sheet!=="open"),l=!1,t.releasePointerCapture?.(c.pointerId)})}let n=()=>{if(this.root?.dataset.layout!=="narrow")return;let r=this.root.getAttribute("data-prices-open")==="true";if(this.root.setAttribute("data-prices-open",String(!r)),this.els.pricesSec?.setAttribute("aria-expanded",String(!r)),!r&&this.root.dataset.sheet!=="open"){this.root.dataset.sheet="open";let s=this.els.sheetToggle;s?.setAttribute("aria-expanded","true"),s?.setAttribute("aria-label","Collapse ticket panel")}};this.els.pricesSec?.addEventListener("click",r=>{r.target.closest("select,button")||n()}),this.els.pricesSec?.addEventListener("keydown",r=>{r.key!=="Enter"&&r.key!==" "||r.target.closest("select,button")||(r.preventDefault(),n())}),this.tipEl=document.createElement("div"),this.tipEl.setAttribute("role","tooltip"),this.tipEl.className="sl-tip",this.els.map.appendChild(this.tipEl),this.els.map.addEventListener("pointerdown",r=>{this.handleMapPointerDown(r)},!0),this.els.map.addEventListener("mousemove",r=>{if(this.tipPinned)return;let s=this.els.map.getBoundingClientRect();this.tipPos={x:r.clientX-s.left,y:r.clientY-s.top},this.tipEl&&this.tipEl.style.display!=="none"&&this.placeTooltip()}),this.els.cta.addEventListener("click",()=>{this.handleCta()})}collapseSheet(){let e=this.root;!e||e.dataset.layout!=="narrow"||e.dataset.sheet!=="open"||(e.dataset.sheet="peek",this.els.sheetToggle?.setAttribute("aria-expanded","false"),this.els.sheetToggle?.setAttribute("aria-label",this.tf("picker.openTicketPanel","Open ticket panel")))}observeLayout(e){let t=()=>{let n=e.clientWidth;if(n<=0)return;let r=e.clientHeight,s=n!==this.pickerLayoutSize.width||r!==this.pickerLayoutSize.height;this.pickerLayoutSize={width:n,height:r},this.reportFramedHeight();let o=n<640?"narrow":"wide",a=r<560?"compact":"comfortable";(e.dataset.layout!==o||e.dataset.density!==a)&&(e.dataset.layout=o,e.dataset.density=a,this.controller.getRenderer()?.setSectionFocusDim?.(o!=="narrow"),o==="narrow"&&!e.dataset.sheet&&(e.dataset.sheet="peek"),this.dockLayoutChrome(),this.syncMinimapForLayout(),this.lastTrayKeys.size&&this.syncTray(),this.syncMapStepBack(),this.refreshExtendPrompt()),this.syncFullscreenAffordance(),s&&(this.minimap?.refreshMinimap(),this.scheduleFit())};this.ro=new ResizeObserver(t),this.ro.observe(e),t(),requestAnimationFrame(t)}async loadChart(e,t,n){let r=performance.now(),s=await this.controller.render(e);return t.loadChartAndStatuses=n(r),this.destroyed?null:s?(Object.assign(t,s.performanceProfile),s):(Re({apiBase:this.apiBase,event:this.opts.event,scope:this.performanceGroup?.surface??(this.performanceGroup?"performance_group":"event"),surface:this.performanceGroup?.surface==="season"?"season_picker":this.performanceGroup?"performance_group_picker":"seat_picker",outcome:"failure",stage:"load_chart",ms:t.loadChartAndStatuses,performanceProfile:t,view:"map",load:ze(this.opts.event),transport:this.opts.transport?"custom":"pubapi"}),this.els.boot.innerHTML=`<div class="sl-boot-title">${this.tf("picker.mapDidNotLoad","The seat map didn\u2019t load")}</div><div>${this.tf("picker.checkConnection","Check your connection and try again.")}</div><button type="button" class="sl-boot-retry">${this.tf("picker.accessRetry","Try again")}</button>`,this.els.boot.querySelector("button").addEventListener("click",()=>{let o=this.opts.container,a=this.opts;this.destroy(),new i({...a,container:o}).render()}),null)}resumeHostedOrder(){if(this.checkoutMode!=="hosted")return;let e=Tn(this.opts.event);e?.outcome!=="success"||!e.orderId||this.openCheckoutPanel({kind:"resume",orderId:e.orderId})}buildPanelToggle(){if(!this.regions["top-right"])return;let e=document.createElement("button");e.type="button",e.className="sl-side-toggle",e.addEventListener("click",()=>this.setPanelCollapsed(!this.sideCollapsed)),this.sideToggleEl=e,this.regions["top-right"].appendChild(e),this.syncPanelToggle()}syncPanelToggle(){let e=this.sideToggleEl;if(!e)return;let t=this.sideCollapsed;e.setAttribute("aria-expanded",String(!t)),e.setAttribute("aria-label",t?this.tf("picker.showTicketPanel","Show the ticket panel"):this.tf("picker.hideTicketPanel","Hide the ticket panel")),e.title=t?this.tf("picker.showTicketPanel","Show the ticket panel"):this.tf("picker.hideTicketPanel","Hide the ticket panel"),e.innerHTML=t?`<svg viewBox="0 0 24 24"><path d="M15 6l-6 6 6 6"/></svg><span>${this.tf("picker.tickets","Tickets")}</span>`:'<svg viewBox="0 0 24 24"><path d="M9 6l6 6-6 6"/></svg>'}setPanelCollapsed(e){this.destroyed||(this.sideCollapsed=e,this.applyPanelCollapsed(),this.scheduleMotion(()=>this.controller.refitCurrentView(),340))}applyPanelCollapsed(){let e=this.root?.dataset.layout!=="narrow";this.root?.setAttribute("data-side-collapsed",String(this.sideCollapsed)),this.els.side?.toggleAttribute("inert",this.sideCollapsed&&e),this.syncPanelToggle()}buildAccessibilityMenu(e){let t=this.regions["bottom-left"]??this.els.map;t&&(this.a11yMenu=new xn(t,{event:String(this.opts.event),chart:()=>this.controller.doc?.name??null,needs:()=>this.controller.getAccessNeeds(),hasLimitedView:e,tf:(n,r)=>this.tf(n,r),isColorblindSafe:()=>this.cbSafe,setColorblindSafe:n=>this.setColorblindSafe(n),isLimitedViewHidden:()=>this.limitedViewFilter,setLimitedViewHidden:n=>{this.limitedViewFilter=n,this.controller.setCommercialLimitedFilter(n),this.pushAvailabilityTo3d()},applyAccessibilityFilter:n=>this.applyAccessibilityFilter(n),focusSeatsForFilter:()=>this.focusSeatsForFilter(),stepToAccessibleSection:n=>this.controller.focusNextAccessibleSection?.([n])??null}),this.cbEl=this.a11yMenu.colorblindRow())}focusSeatsForFilter(){if(this.controller.focusAccessibilityFilter?.()){this.explainAccessibilitySpread();return}this.rungsEl&&this.controller.getRung()!=="seats"&&(this.controller.setRung("seats"),this.collapseSectionCard(),this.syncRung())}explainAccessibilitySpread(){let e=this.controller.accessibilitySpread?.();!e?.wholeVenue||e.sections.length<2||this.toast((0,R.t)("picker.accessSpreadHint",{count:e.spaces,sections:e.sections.length}),"neutral")}applyAccessibilityFilter(e){this.controller.setAccessibilityFilter(e),this.syncPrices(),this.minimap?.refreshMinimap(),this.pushAvailabilityTo3d()}setAccessibilityFilter(e){this.applyAccessibilityFilter(e),this.a11yMenu?.syncAccessibilityFilter(e),e?.length&&this.focusSeatsForFilter()}focusAccessibilityFilter(){this.focusSeatsForFilter()}dockLayoutChrome(){let e=this.root?.dataset.layout==="narrow";this.applyPanelCollapsed();let t=this.els.zfs,n=this.els.headInfo?.parentElement;t&&n&&t.parentElement!==n&&(t.classList.add("sl-fs-pill"),n.insertBefore(t,this.els.hold??null));let r=this.extendEl;if(r){let o=e?this.regions["bottom-center"]??this.els.map:n;o&&r.parentElement!==o&&(r.dataset.dock=e?"map":"head",o===n?o.insertBefore(r,this.els.close??null):o.appendChild(r))}let s=this.els.pricesSec;s&&(e?(s.setAttribute("role","button"),s.tabIndex=0,s.setAttribute("aria-expanded",String(this.root?.getAttribute("data-prices-open")==="true"))):(s.removeAttribute("role"),s.removeAttribute("aria-expanded"),s.tabIndex=-1)),this.lastSection&&this.renderSectionCard(this.lastSection)}buildExtendPrompt(){$a(this)}buildBookedOverlay(){let e=document.createElement("div");e.className="sl-booked",e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.innerHTML=`<div class="sl-booked-badge"><svg viewBox="0 0 24 24"><path d="M20 6L9 17l-5-5"/></svg></div><div class="sl-booked-title">${this.tf("picker.allSetTitle","You're all set")}</div><div class="sl-booked-sub" data-ref="bookedSub"></div><ul class="sl-booked-list" data-ref="bookedList"></ul><button type="button" class="sl-booked-back" data-ref="bookedBack"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M15 18l-6-6 6-6"/></svg><span>${D(this.tf("picker.backToMap","Back to map"))}</span></button>`,this.root.appendChild(e),this.bookedEl=e,this.els.bookedSub=e.querySelector('[data-ref="bookedSub"]'),this.els.bookedList=e.querySelector('[data-ref="bookedList"]'),e.querySelector('[data-ref="bookedBack"]')?.addEventListener("click",()=>this.dismissBooked())}get onGAPromptHook(){return this.opts.onGAPrompt}tf(e,t){return b(e,t)}buildSoldoutOverlay(){if(!this.els.map)return;let e=document.createElement("div");e.className="sl-soldout",e.setAttribute("role","status");let t=(this.controller.doc?.theme?.brandName??this.opts.theme?.brandName??this.els.name?.textContent??this.tf("picker.soldOutEyebrow","This event")).toUpperCase(),n=document.createElement("div");n.className="sl-soldout-eyebrow",n.textContent=t;let r=document.createElement("div");r.className="sl-soldout-title",r.textContent=this.tf("picker.soldOutTitle","Sold out");let s=document.createElement("p");s.className="sl-soldout-copy",s.textContent=this.tf("picker.soldOutCopy","No reserved seats are currently available for this event."),e.append(n,r,s),this.els.map.appendChild(e),this.soldoutEl=e}syncSoldout(e,t){let n=this.controller.getGAAreas().length>0,r=this.isSoldOut(e,t,n);r!==this.soldOut&&(this.soldOut=r,this.soldoutEl?.classList.toggle("on",r))}isSoldOut(e,t,n){return!n&&e.length>0&&e.every(r=>(t[r.key]??0)===0)}setSalesClosed(e){let t=e||!!this.opts.readOnly;this.salesClosed!==t&&(this.salesClosed=t,this.applySalesClosed())}applySalesClosed(){this.salesClosed&&this.tableDialog&&!this.tableDialogHeld&&this.cancelTableDialog();let e=this.els.closedPill;if(e){e.classList.toggle("on",this.salesClosed);let t=this.els.closedPillText??e;t.textContent=this.tf("picker.salesClosedPill","Sales are closed")}this.root?.setAttribute("data-sales-closed",String(this.salesClosed)),this.salesClosed&&this.srEl&&(this.srEl.textContent=this.tf("picker.salesClosedToast","Sales are closed for this event.")),this.syncCta(),this.syncTray()}badgeHidden(e){return!!e?.hideBadge}buildBadge(e){if(this.badgeHidden(e))return;let t=this.els.foot;if(!t)return;let n=document.createElement("a");n.className="sl-powered",n.href="https://seatlayer.io/?ref=picker",n.target="_blank",n.rel="noopener noreferrer",n.setAttribute("aria-label",this.tf("picker.poweredBy","Powered by SeatLayer"));let r=document.createElement("span");r.className="sl-powered-mark",r.setAttribute("aria-hidden","true"),r.innerHTML=Vi;let s=document.createElement("span");s.textContent=this.tf("picker.poweredBy","Powered by SeatLayer"),n.append(r,s),t.appendChild(n)}buildRegions(){if(!this.els.map)return;let e=["top-left","top-center","top-right","left-rail","bottom-left","bottom-center","bottom-right"];for(let t of e){let n=document.createElement("div");n.className="sl-anchor",n.dataset.region=t,this.els.map.appendChild(n),this.regions[t]=n}}cssVar(e){return this.root?getComputedStyle(this.root).getPropertyValue(e).trim():""}reducedMotion(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}scheduleMotion(e,t){let n=setTimeout(()=>{this.motionTimers.delete(n),this.destroyed||e()},t);this.motionTimers.add(n)}animateOnce(e,t,n=600){!e||this.reducedMotion()||(e.classList.remove(t),e.offsetWidth,e.classList.add(t),this.scheduleMotion(()=>e.classList.remove(t),n))}flashPickedSeat(e){this.reducedMotion()||this.controller.flashSeat(e,this.cssVar("--sl-accent")||"#f4b740")}flashHeldSeats(e){let t=this.reducedMotion(),n=(e.items??[]).filter(r=>r.objectType!=="ga").slice(0,10).map(r=>this.controller.seatByLabel(r.label)).filter(r=>!!r);Os({regions:this.els,categories:this.controller.doc?.categories,pop:r=>this.controller.flashSeat(r,this.cssVar("--sl-accent")||"#f4b740"),focus:(r,s)=>this.controller.focusSection(r,s),focusSeats:r=>this.controller.focusSeats?.(r,{animate:!t})===!0,reducedMotion:t,screenPoint:r=>this.controller.worldToScreen(r),schedule:(r,s)=>this.scheduleMotion(r,s)},n)}committedSelection(){let e=this.confirmSeat?.id,t=this.tableDialog&&!this.tableDialogHeld?this.tableDialog.id:null;return this.controller.getSelection().filter(n=>n.id!==e&&n.id!==t)}pendingSelectionCount(){return ja(this)}heldTicketCount(){return Ua(this)}totalTicketCount(){return Ga(this)}updateSelectionCapacity(){qa(this)}syncCta(e=this.lastTrayCount,t=this.pendingSelectionCount()){Ka(this,e,t)}setCtaPhase(e){Wa(this,e)}runCheckoutHandoff(e,t){return Ya(this,e,t)}holdStorageKey(){return Xa(this)}rememberedHoldId(){return Qa(this)}rememberHold(e){Za(this,e)}forgetHold(){Ja(this)}resumeHoldFromServer(e){return el(this,e)}restoreRememberedHold(){return tl(this)}activeFloorObjects(){let e=this.controller.doc;if(!e)return[];let t=e.floors;if(t?.length){let n=this.controller.getActiveFloorId();return(t.find(r=>r.id===n)??t[0]).objects??[]}return e.objects??[]}buildMinimap(){!this.els.map||this.root?.dataset.layout==="narrow"||(this.minimap=Xo({controller:this.controller,root:()=>this.root,cssVar:e=>this.cssVar(e),focusedSectionLabel:()=>this.lastSection?.label},this.regions["bottom-left"]??this.els.map))}syncMinimapForLayout(){let e=this.root?.dataset.layout==="narrow";if(e&&this.minimap){this.minimap.dispose(),this.minimap=null;return}!e&&!this.minimap&&this.buildMinimap()}catPrice(e){return bn(this,e)}catPriceRange(e){return yn(this,e)}buildPriceFilter(){pl(this)}applyPriceBand(e){hl(this,e)}buildArenaChrome(){let e=this.controller.doc;if(!e||!this.els.map)return;let t=e.objects.some(n=>n.type==="section")||(e.floors??[]).some(n=>n.objects.some(r=>r.type==="section"));if(this.canOffer3d()){let n=document.createElement("div");n.className="sl-projection",n.setAttribute("role","group"),n.setAttribute("aria-label",this.tf("picker.venueView","Venue view")),n.innerHTML=`<button type="button" data-view="map" aria-pressed="true" title="${this.tf("picker.flat2dMap","Flat 2D map")}">${this.tf("picker.map","Map")}</button><button type="button" data-view="venue3d" aria-pressed="false" title="${this.tf("picker.interactive3dVenueView","Interactive 3D venue view")}">3D</button>`,n.querySelectorAll("button").forEach(r=>{if(r.dataset.view==="venue3d")for(let s of["pointerenter","focus","pointerdown"])r.addEventListener(s,zi,{once:!0});r.addEventListener("click",()=>{this.setBuyerView(r.dataset.view)})}),this.regions["top-right"].appendChild(n),this.projectionEl=n,this.syncProjection()}if(t){let n=[...e.objects,...(e.floors??[]).flatMap(d=>d.objects)],r=new Set((e.zones??[]).map(d=>d.id)),o=n.some(d=>d.type==="section"&&typeof d.zone=="string"&&r.has(d.zone))?["zones","sections","seats"]:["sections","seats"],a=document.createElement("div");a.className="sl-rungs on sl-mo-indicator",a.setAttribute("role","group"),a.setAttribute("aria-label",(0,R.t)("picker.zoomLevel"));let l={zones:(0,R.t)("picker.rungLabel.zones"),sections:(0,R.t)("picker.rungLabel.sections"),seats:(0,R.t)("picker.rungLabel.seats")},c={zones:(0,R.t)("picker.rungTip.zones"),sections:(0,R.t)("picker.rungTip.sections"),seats:(0,R.t)("picker.rungTip.seats")};a.innerHTML=o.map(d=>`<button type="button" data-rung="${d}" title="${c[d]}" aria-pressed="false">${l[d]}</button>`).join(""),a.querySelectorAll("button").forEach(d=>{d.addEventListener("click",()=>{let p=d.dataset.rung;this.controller.setRung(p),p==="seats"&&this.collapseSectionCard()})}),this.regions["top-center"].appendChild(a),this.rungsEl=a,this.syncRung()}if(this.controller.isMultiFloor()){let n=vo({floors:this.controller.getFloors(),tf:(r,s)=>this.tf(r,s),onChoose:r=>{r===""?this.controller.setFloorOverview(!0):this.controller.setFloor(r),this.showSectionCard(null),this.syncFloors(),this.syncRung(),this.minimap?.refreshMinimap()}});this.regions["left-rail"].appendChild(n),this.floorsEl=n,this.syncFloors()}}syncRung(){let e=this.controller.getRung(),t=this.controller.seatsRevealed?.()??(e==="seats"||!!this.controller.getFocusedSection?.());this.root&&(this.root.dataset.zoomed=String(t)),this.syncMapStepBack(),this.minimap?.setAutoOpen(!1),this.rungsEl&&this.rungsEl.querySelectorAll("button").forEach(n=>{let r=n.dataset.rung===e;n.classList.toggle("on",r),n.setAttribute("aria-pressed",String(r))})}syncMapStepBack(){let e=this.els?.zout;if(!(!e||!this.root)){if(this.root.dataset.layout!=="narrow"){e.disabled&&(e.disabled=!1);return}e.disabled=Zs({focusedSection:this.controller.getFocusedSection?.()??null,seatsRevealed:this.controller.seatsRevealed?.()??!0})==="none"}}syncProjection(){this.els.pricesHint&&(this.els.pricesHint.textContent=this.buyerView==="venue3d"?this.tf("picker.priceHint3d","Colours in the venue are ticket types \u2014 choose one below to show just those seats."):this.tf("picker.priceHint","Colours on the map are ticket types \u2014 tap one below to show just those seats.")),this.projectionEl&&this.projectionEl.querySelectorAll("button").forEach(e=>{let t=e.dataset.view===this.buyerView;e.classList.toggle("on",t),e.setAttribute("aria-pressed",String(t))})}canOffer3d(){return this.opts.enable3D===!1||!this.controller.doc||!$i()?!1:this.allSeats().length<=this.max3dSeats()}max3dSeats(){let e=this.opts.max3DSeats;if(typeof e=="number"&&e>0)return e;let t=globalThis.navigator;return(t?.hardwareConcurrency??8)<=4||(t?.deviceMemory??8)<=4||(globalThis.matchMedia?.("(pointer: coarse)").matches??!1)?Il/2:Il}syncFloors(){wo(this.floorsEl,this.controller.getActiveFloorId(),this.controller.isFloorOverview())}get sectionCard(){return this.sectionCardCache||(this.sectionCardCache=new cn({controller:this.controller,map:()=>this.els.map,root:()=>this.root,collapseSheet:()=>this.collapseSheet(),region:e=>this.regions[e],refreshMinimap:()=>this.minimap?.refreshMinimap(),activeFloorObjects:()=>this.activeFloorObjects(),sectionNeighbours:e=>this.sectionNeighbours(e),catPriceRange:e=>this.catPriceRange(e),money:e=>this.money(e),suppressPricing:()=>this.suppressPricing,priceBandKeys:()=>this.priceBandKeys})),this.sectionCardCache}showSectionCard(e){this.sectionCard.show(e)}renderSectionCard(e){this.sectionCard.render(e)}collapseSectionCard(){this.sectionCard.collapse()}sectionCardOnView(){this.sectionCard.onView()}sectionNeighbours(e){let t=this.activeFloorObjects().filter(r=>r.type==="section"&&!this.controller.isSectionClosed(r.id)&&this.controller.getSectionSeatCount(r.id)>0);if(t.length<2)return null;let n=t.findIndex(r=>r.id===e);return n<0?null:{previous:t[(n-1+t.length)%t.length],next:t[(n+1)%t.length]}}markedSeatAnnouncement(e){let t=rr(this.controller.getRenderer()?.getSeatMark?.(e.id),this.performanceGroup?.nights?.());return Lo(t,e.displayLabel??e.label,this.opts.locale)}announceSeat(e){if(!this.srEl)return;if(!e){this.srEl.textContent="";return}let t=this.markedSeatAnnouncement(e);if(t){this.srEl.textContent=t;return}let n=this.controller.doc?.categories.find(h=>h.key===e.categoryKey),r=this.controller.getStatus(e.id)??"free",s=r==="free"?this.tf("picker.statusAvailable","available"):r==="held"?this.tf("picker.statusOnHold","on hold"):this.tf("picker.statusTaken2","taken"),o=n?this.catPriceRange(n):void 0,a=!this.suppressPricing&&o?o.min===o.max?this.money(o.min):`${this.money(o.min)}\u2013${this.money(o.max)}`:void 0,l=this.controller.tableSelection(e.id),c=l??this.controller.seatDetails(e.id),d=it(c),p=c?.rowLabel??c?.displayLabel??e.displayLabel??e.label,u=l?`${d} ${p}, ${l.bookingMode==="variable"?(0,R.t)("picker.minToMaxGuests",{min:l.minOccupancy,max:l.maxOccupancy}):(0,R.t)("picker.capacityGuests",{count:l.capacity})}`:c?.objectType==="booth"?`${d} ${p}`:c?.objectType==="table"?`${d} ${p}, ${(0,R.t)("picker.seatNumberLower",{label:c.seatNumber??e.label})}`:(0,R.t)("picker.seatLabel",{label:c?.displayLabel??e.displayLabel??e.label});this.srEl.textContent=`${u}, ${n?.label??e.categoryKey}${a?`, ${a}`:""}, ${s}`}showTableDialog(e,t,n){this.dismissTableDialog(!1),this.tableDialog={...e},this.tableDialogHeld=t,this.tableDialogReturnFocus=n??document.activeElement;let r=this.controller.doc?.categories.find(a=>a.key===e.categoryKey),s=e.bookingMode==="variable",o=document.createElement("div");o.className="sl-table-scrim",o.innerHTML=go(e,{variable:s,held:t,typeWord:it(e),categoryLabel:r?.label??e.categoryKey,suppressPricing:this.suppressPricing,unitPrice:this.money(this.paidPrice(e.categoryKey,e.tierId??null,e.price,e.label))}),this.root.appendChild(o),this.tableDialogEl=o,this.renderTableDialogState(),o.querySelectorAll("[data-table-step]").forEach(a=>{a.addEventListener("click",()=>{if(!this.tableDialog)return;let l=Math.max(this.tableDialog.minOccupancy,Math.min(this.tableDialog.maxOccupancy,this.tableDialog.quantity+Number(a.dataset.tableStep)));this.tableDialog={...this.tableDialog,quantity:l},this.renderTableDialogState()})}),o.querySelector(".sl-table-cancel").addEventListener("click",()=>this.cancelTableDialog()),o.querySelector(".sl-table-confirm").addEventListener("click",()=>{this.confirmTableDialog()}),o.addEventListener("mousedown",a=>{a.target===o&&this.cancelTableDialog()}),o.addEventListener("keydown",a=>{if(a.key!=="Tab")return;let l=[...o.querySelectorAll('button:not(:disabled),[tabindex]:not([tabindex="-1"])')];if(!l.length)return;let c=l[0],d=l[l.length-1];a.shiftKey&&document.activeElement===c?(a.preventDefault(),d.focus()):!a.shiftKey&&document.activeElement===d&&(a.preventDefault(),c.focus())}),requestAnimationFrame(()=>o.querySelector(s?'[data-table-step="-1"]':".sl-table-confirm")?.focus())}renderTableDialogState(){let e=this.tableDialog,t=this.tableDialogEl;if(!e||!t)return;let n=t.querySelector("output[data-table-qty]");n&&(n.value=String(e.quantity));let r=t.querySelector("input[data-table-qty]");r&&(r.value=String(e.quantity)),t.querySelectorAll("[data-table-step]").forEach(a=>{let l=Number(a.dataset.tableStep);a.disabled=l<0?e.quantity<=e.minOccupancy:e.quantity>=e.maxOccupancy});let s=this.paidPrice(e.categoryKey,e.tierId??null,e.price,e.label),o=t.querySelector("[data-table-total]");o&&(o.textContent=this.money(s*e.quantity))}async confirmTableDialog(){let e=this.tableDialog,t=this.tableDialogHeld;if(!e)return;let n=this.tableDialogEl?.querySelector(".sl-table-confirm");if(n&&(n.disabled=!0,n.textContent=t?this.tf("picker.updatingEllipsis","Updating\u2026"):this.tf("picker.selectingEllipsis","Selecting\u2026")),t){try{let r=await this.controller.replaceTableQuantity(e.label,e.quantity,this.opts.holdTtlMs);if(!r){this.toast(this.tf("picker.guestCountCouldNotBeSecured","That guest count could not be secured. Your current table hold is unchanged."),"warning"),this.renderTableDialogState(),n&&(n.disabled=!1,n.textContent=this.tf("picker.updateTable","Update table"));return}this.hold={holdId:r.holdId,expiresAt:r.expiresAt,seats:r.seats,items:r.items},this.startHoldTimer(r.expiresAt),this.dismissTableDialog(),this.syncTray(),this.emitHoldChange(),this.toast((0,R.t)("picker.tableUpdatedForGuests",{label:e.label,count:e.quantity}),"success")}catch(r){this.opts.onError?.(r),this.toast(this.tf("picker.guestCountNoLongerAvailable","That guest count is no longer available. Your current hold is unchanged."),"error"),n&&(n.disabled=!1,n.textContent=this.tf("picker.updateTable","Update table"))}return}if(!this.controller.setTableQuantity(e.label,e.quantity)){n&&(n.disabled=!1,n.textContent=e.bookingMode==="variable"?this.tf("picker.selectTable","Select table"):this.tf("picker.selectWholeTable","Select whole table"));return}this.dismissTableDialog(),this.collapseSectionCard(),this.syncTray()}cancelTableDialog(){let e=this.tableDialog,t=this.tableDialogHeld;this.dismissTableDialog(),e&&!t&&this.controller.deselect(e.physicalSeatIds)}dismissTableDialog(e=!0){let t=this.tableDialogReturnFocus;this.tableDialogEl?.remove(),this.tableDialogEl=null,this.tableDialog=null,this.tableDialogHeld=!1,this.tableDialogReturnFocus=null,e&&requestAnimationFrame(()=>(t?.isConnected?t:this.root)?.focus())}get confirmCard(){return this.confirmCardCache||(this.confirmCardCache=new un({controller:this.controller,root:()=>this.root,els:()=>this.els,regions:()=>this.regions,hideTooltip:()=>{this.tipEl&&(this.tipEl.style.display="none")},tf:(e,t)=>this.tf(e,t),money:e=>this.money(e),paidPrice:(e,t,n,r)=>this.paidPrice(e,t,n,r),suppressPricing:()=>this.suppressPricing,reducedMotion:()=>this.reducedMotion(),scheduleMotion:(e,t)=>this.scheduleMotion(e,t),canOffer3d:()=>this.canOffer3d(),buyerView:()=>this.buyerView,view3dHandle:()=>this.view3dHandle,view3dCompareSeatIds:()=>this.view3dCompareSeatIds,rememberView3dReturnSeat:e=>{this.view3dReturnSeat=e},enter3d:e=>{this.enter3d(e)},performanceGroup:()=>this.performanceGroup,seatViewEnabled:()=>this.seatViewEnabled(),openSeatView:e=>{this.openSeatView(e)},openSeatConfidencePassport:(e,t)=>this.openSeatConfidencePassport(e,t),saveView3dComparisonSeat:e=>this.saveView3dComparisonSeat(e),resolveAssetUrl:e=>this.buyerAssetUrls.resolve(e),onError:e=>this.opts.onError?.(e),liftToastOverConfirm:()=>this.liftToastOverConfirm(),fitTranslatedRows:()=>this.fitTranslatedRows(),syncTray:()=>this.syncTray(),syncSelectionTo3d:()=>this.syncSelectionTo3d(),collapseSectionCard:()=>this.collapseSectionCard(),applyPanelCollapsed:()=>this.applyPanelCollapsed(),dismiss:()=>this.dismissConfirm(),reanchor:()=>this.reanchorConfirm(),inviteCommit:(e,t)=>this.inviteCommit(e,t),addSeatLabel:e=>this.addSeatLabel(e)})),this.confirmCardCache}showConfirm(e,t="add"){this.confirmCard.show(e,t)}reanchorConfirm(){this.confirmCard.reanchor()}dismissConfirm(){this.confirmCard.dismiss()}async commitConfirm(){await this.confirmCard.commit()}cancelConfirm(){this.confirmCard.cancel()}closeConfirm(){this.dismissConfirm()}inviteCommit(e,t){Ko(e,t,this.reducedMotion())}addSeatLabel(e){return Wo(e,(t,n)=>this.tf(t,n))}seatViewEnabled(){return this.opts.seatView!==!1}allSeats(){return this.allSeatsCache||(this.allSeatsCache=[...this.controller.getExpandedSeats()]),this.allSeatsCache}async openSeatView(e){if(!this.root||!this.seatViewEnabled())return;let t=++this.seatViewGen,n=this.controller.doc,r=this.controller.getActiveFloorId(),s=e.focalPoint??n?.floors?.find(p=>p.id===r)?.focalPoint??n?.focalPoint??{x:0,y:0},o,a,l=!1;if(e.viewUrl){let p,u=null;try{let g=e.viewMeta?.previewUrl;g&&g!==e.viewUrl?(u=await this.buyerAssetUrls.resolve(g),p=e.viewUrl):p=await this.buyerAssetUrls.resolve(e.viewUrl)}catch(g){t===this.seatViewGen&&this.opts.onError?.(g);return}if(t!==this.seatViewGen||!p||e.viewMeta?.previewUrl&&e.viewMeta.previewUrl!==e.viewUrl&&!u||!this.root||!this.seatViewEnabled())return;let h={url:p,...u?{previewUrl:u}:{},...e.viewMeta?.sourceWidth!==void 0?{sourceWidth:e.viewMeta.sourceWidth}:{},...e.viewMeta?.sourceHeight!==void 0?{sourceHeight:e.viewMeta.sourceHeight}:{},...e.viewMeta?.previewWidth!==void 0?{previewWidth:e.viewMeta.previewWidth}:{},...e.viewMeta?.previewHeight!==void 0?{previewHeight:e.viewMeta.previewHeight}:{},...e.viewMeta?.variants?.length?{variants:e.viewMeta.variants}:{},...e.viewMeta?.coverage?{coverage:e.viewMeta.coverage}:{},...e.viewMeta?.capturedAt?{capturedAt:e.viewMeta.capturedAt}:{},...e.viewMeta?.sourceLabel?{sourceLabel:e.viewMeta.sourceLabel}:{}};o=h,a=(0,Cn.seatViewDisclosure)(h),l=(0,Cn.isAuthoredSeatView)(h)}else{let p;try{let{generateSeatPanorama:u}=await ji();p=u(e,s,this.allSeats())}catch(u){t===this.seatViewGen&&this.opts.onError?.(u);return}if(t!==this.seatViewGen||!this.root||!this.seatViewEnabled())return;o={url:p.url,generated:!0},a=(0,R.t)("picker.illustrationCaption",{m:p.distanceM})}this.closeSeatView(!1);let c=(0,R.t)("picker.viewFromSeat",{label:e.label}),d=Wi({root:this.root,source:o,caption:a,real:l,closeLabel:this.tf("picker.close","Close"),dragHint:et(),viewFromSeatLabel:c,real360Label:(0,R.t)("picker.real360"),previewLabel:(0,R.t)("picker.preview"),resolveAsset:p=>this.buyerAssetUrls.resolve(p),onClose:()=>this.closeSeatView()});this.viewEl=d.element,this.viewCleanup=()=>d.dispose()}closeSeatView(e=!0){e&&(this.seatViewGen+=1),this.viewCleanup?.(),this.viewCleanup=null,this.viewEl?.remove(),this.viewEl=null}money(e){let t=this.opts.pricing?.formatter;if(t)return t(e,this.currency);let n=Number.isInteger(e);return(0,R.formatMoney)(e,this.currency,{locale:this.opts.locale,fallback:(r,s)=>`${r} ${s}`,...n?{minimumFractionDigits:0,maximumFractionDigits:0}:{}})}scheduleOfferBoundary(e){if(this.offerBoundaryTimer&&clearTimeout(this.offerBoundaryTimer),this.offerBoundaryTimer=null,!this.api.availability||this.destroyed)return;let t=Date.now(),n=Qs(e,t);if(n==null)return;let r=6*36e5,s=Math.min(Math.max(n-t+1e3,1e3),r);this.offerBoundaryTimer=setTimeout(()=>{this.offerBoundaryTimer=null,!document.hidden&&this.refreshOfferAvailability(!1)},s)}offerReadIsCurrent(){return!!this.offerReadInFlight||Date.now()-this.offerReadSettledAt<Np}scheduleOfferRefresh(e){!this.api.availability||this.destroyed||this.offerReadIsCurrent()||(this.offerRefreshTimer&&clearTimeout(this.offerRefreshTimer),this.offerRefreshTimer=setTimeout(()=>{this.offerRefreshTimer=null,this.refreshOfferAvailability(e)},e?180:0))}refreshOfferAvailability(e){if(!this.api.availability||this.destroyed)return Promise.resolve();if(this.offerReadInFlight)return this.offerReadInFlight;if(this.offerReadIsCurrent())return Promise.resolve();let t=this.readOfferAvailability(e).finally(()=>{this.offerReadInFlight===t&&(this.offerReadInFlight=null)});return this.offerReadInFlight=t,t}async readOfferAvailability(e){if(!(!this.api.availability||this.destroyed))try{let t=await this.api.availability(this.opts.event,e);if(this.destroyed)return;this.offerReadSettledAt=Date.now();let n=an(t);if(!n)return;this.offerAvailability=n,this.applyChannelPricing(n.channelPricing),this.scheduleOfferBoundary(n);let r=ln(n),s={...this.hostPricing?.prices??{},...r},o=Object.keys(s).length>0||this.hostPricing?.formatter?{prices:s,...this.hostPricing?.formatter?{formatter:this.hostPricing.formatter}:{}}:void 0;this.setPricing(o),this.syncOffer(),this.opts.onOfferAvailabilityChange?.(n)}catch{!this.destroyed&&!this.offerBoundaryTimer&&!document.hidden&&(this.offerBoundaryTimer=setTimeout(()=>{this.offerBoundaryTimer=null,!document.hidden&&this.refreshOfferAvailability(!1)},3e4))}}offerPrice(e){return e?this.offerAvailability?.prices.find(t=>t.categoryKey===e)??null:null}applyChannelPricing(e){this.channelByObject.clear(),this.pricesByChannel.clear();for(let t of e?.channels??[])this.pricesByChannel.set(t.channelId,t.priceOverrides);for(let t of e?.objects??[])this.pricesByChannel.has(t.channelId)&&this.channelByObject.set(t.label,t.channelId)}syncOffer(){let e=this.els.offer;if(!e)return;if(this.suppressPricing){e.classList.remove("has"),e.replaceChildren();return}let t=this.offerAvailability,n=t?.release??null,r=n?null:t?.upcoming??null;if(!t||t.state==="closed"||t.state==="sold-out"||!n&&!r){e.classList.remove("has"),e.replaceChildren();return}let s=n??r,o=document.createElement("div");o.className="sl-offer-main";let a=document.createElement("div");a.className="sl-offer-copy";let l=document.createElement("span");l.className="sl-offer-kicker",l.textContent=n?this.tf("picker.currentTicketOffer","Current ticket offer"):this.tf("picker.upcomingTicketOffer","Upcoming ticket offer");let c=document.createElement("strong");c.className="sl-offer-name",c.textContent=s.name||(n?this.tf("picker.currentOffer","Current offer"):this.tf("picker.scheduledOffer","Scheduled offer"));let d=document.createElement("span");d.className="sl-offer-line";let p=[];n&&t.fromPrice!=null&&p.push(this.money(t.fromPrice/100)),n&&s.remaining!=null&&p.push((0,R.t)("picker.offerRemainingAvailable",{count:s.remaining})),n&&s.endsAt!=null&&p.push((0,R.t)("picker.offerUntil",{time:Gi(s.endsAt,this.eventTimezone,this.opts.locale)})),r?.startsAt!=null&&p.push((0,R.t)("picker.offerStarts",{time:Gi(r.startsAt,this.eventTimezone,this.opts.locale)})),d.textContent=p.join(" \xB7 "),a.append(l,c,d);let u=document.createElement("details");u.className="sl-offer-info";let h=document.createElement("summary");h.setAttribute("aria-label",(0,R.t)("picker.howOfferWorks",{name:c.textContent??""})),h.textContent="i";let g=document.createElement("div");g.className="sl-offer-detail",g.textContent=n?this.tf("picker.offerDetailActive","This price applies automatically to eligible seats. Tickets in active carts temporarily reduce the available quantity; released or expired holds return it. When the offer ends, the next matching offer or normal ticket price takes over."):this.tf("picker.offerDetailUpcoming","Tickets are available at their normal price now. This scheduled offer will apply automatically to eligible seats when it starts."),u.append(h,g),o.append(a,u),e.replaceChildren(o),e.classList.add("has")}paidPrice(e,t,n,r){let s=r?this.channelByObject.get(r):void 0;if(s&&e){let a=this.pricesByChannel.get(s)?.find(l=>l.categoryKey===e&&l.tierId===(t??null));if(a)return a.price}let o=e?this.opts.pricing?.prices?.[e]:void 0;return o===void 0?n:typeof o=="number"?o:t&&o.tiers?.[t]!==void 0?o.tiers[t]:o.base??n}legendDeps(){return ul(this)}syncPriceRail(e,t,n=this.legendDeps()){ml(this,e,t,n)}syncPrices(){fl(this)}focusCategory(e){gl(this,e)}evictTakenSelections(){let e=new Set([...this.controller.currentHold()?.labels??[],...this.holdingLabels]),t=this.controller.getSelection().filter(n=>!e.has(n.label)&&(this.controller.getStatus(n.id)??"free")!=="free");t.length&&(this.controller.deselect(t.map(n=>n.id)),this.toast((0,R.t)("picker.seatJustTakenByAnother",{label:t[0].label}),"error"))}syncTray(){if(!this.els.tray)return;this.updateSelectionCapacity();let{seats:e,gaAreas:t,heldItems:n,heldLabels:r,total:s,count:o}=gn(this),a=[],l=new Set;if(!this.salesClosed){let f=this.performanceGroup?.nightSummary?.()??[];f.length&&a.push(To(f,{title:this.tf("picker.group.yourSeatsByNight","Your seats by night"),empty:this.tf("picker.group.noSeatsChosenYet","No seats yet")}));let P=this.performanceGroup?.selectionModeSwitch;P&&a.push(`<button type="button" class="sl-pg-switch" data-pg-switch-mode>${D(P.label)}</button>`)}a.push(Ba({salesClosed:this.salesClosed,hasPicks:e.length>0||n.length>0,hasGaAreas:t.length>0,groupMode:this.performanceGroup?this.performanceGroup.selectionMode??"same_seat":null,seated:!!this.controller.doc?.objects?.some(f=>f.type!=="gaArea"),venue3d:this.buyerView==="venue3d",whenText:this.eventWhenText?String(this.eventWhenText):void 0}));let c=!e.length&&!n.length&&!Ve(this.gaQty,this.hold?.items??[]);if(!this.performanceGroup&&!this.salesClosed&&!this.hold&&(c||this.bestAvailableBusy||this.bestAvailableConfirm)){let f=(this.controller.doc?.categories??[]).filter(B=>!B.notForSale),P=this.controller.getBestAvailableZones();this.baZone&&!P.some(B=>B.id===this.baZone)&&(this.baZone=""),a.push(Na({confirming:this.bestAvailableConfirm,busy:this.bestAvailableBusy,reopened:!1,quantity:this.baQty,premium:this.baPremium,offerPremium:this.controller.hasPremiumSeats(),categories:f,zones:P,selectedCategory:this.baCat,selectedZone:this.baZone}))}let d=(f,P,B,E=1,O,M,A)=>_a({categoryLabel:A,d:f?this.controller.seatDetails(f):null,area:B==="ga"?t.find(N=>N.id===O):void 0,label:P,objectType:B,quantity:E,identity:M,performanceLabel:this.performanceGroup?.activePerformanceLabel?.(),performanceDates:this.performanceGroup?.selectedPerformanceDates?.()}),p=D,u=[];for(let f of ss(n)){let P=f.objectType==="ga"?`held:ga:${f.objectId}:${f.tierId??""}`:`held:${f.label}`;l.add(P);let B=this.controller.doc?.categories.find(q=>q.key===f.categoryKey),E=f.tierId?B?.tiers?.find(q=>q.id===f.tierId)?.name:void 0,O=f.objectType!=="ga"?this.controller.seatByLabel(f.label):null,M=f.objectType==="table"?this.controller.tableSelection(f.label):null,A=O?this.controller.seatDetails(O.id):null,N=this.seatViewEnabled()&&!!O&&f.objectType!=="table"&&!!this.deliverableViewReference(O),_=p(this.tf("picker.heldForYou","Held for you")),V=(M?.bookingMode==="variable"?`<button type="button" class="sl-table-edit" data-table-edit="${p(encodeURIComponent(f.label))}">${p((0,R.t)("picker.guestsCountEdit",{count:f.quantity??1}))}</button>`:"")+pi(O?.wheelchairSpaceType)+er(O?.commercial),Z=this.paidPrice(f.categoryKey,f.tierId,f.unitPrice,f.label)*(f.quantity??1);u.push({key:P,fresh:!this.lastTrayKeys.has(P),held:!0,seatIds:[],heldLabels:f.labels,removeAria:(0,R.t)("picker.removeHeldTicketLabel",{label:Bn(f,t)}),locateId:O?.id??null,section:A?.sectionLabel??"",rowLabel:A&&Y(A)||"",seatLabel:A?.seatNumber??f.label,categoryLabel:`${B?.label??f.categoryKey}${E?` \xB7 ${E}`:""}`,categoryColor:this.controller.getRenderer?.()?.categoryDisplayColor?.(f.categoryKey)??B?.color??"",identityHtml:d(O?.id??null,f.label,f.objectType,f.quantity??1,f.objectId,M??void 0,`${B?.label??f.categoryKey}${E?` \xB7 ${E}`:""}`),stateHtml:`<span class="sl-ticket-state held" aria-label="${_}" title="${_}"><svg viewBox="0 0 24 24"><rect x="5" y="10" width="14" height="10" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3"/></svg></span>`,extrasHtml:V,amount:Z,amountText:this.suppressPricing?"":this.money(Z),noteHtml:tr(O?.commercial),railHtml:this.performanceGroup?"":fr((0,R.t)("picker.removeHeldTicketLabel",{label:Bn(f,t)}),N?f.label:null),groupable:!V&&!!A?.sectionLabel&&!this.performanceGroup})}let h=this.seatViewEnabled();for(let f of e.filter(P=>!r.has(P.label))){let P=`seat:${f.id}`;l.add(P);let B=this.controller.doc?.categories.find(q=>q.key===f.categoryKey),E=f.tiers&&f.tiers.length&&!this.suppressPricing?`<select class="tier" data-tier="${p(f.id)}" aria-label="${p((0,R.t)("picker.ticketTierFor",{label:f.label}))}">`+f.tiers.map(q=>`<option value="${p(q.id)}"${q.id===f.tierId?" selected":""}>${p(q.name)} \xB7 ${p(this.money(this.paidPrice(f.categoryKey,q.id,q.price,f.label)))}</option>`).join("")+"</select>":"",O=f.tiers?.find(q=>q.id===f.tierId)??f.tiers?.[0],M=O?.buyerMessage?.trim()||(O?.restriction==="companion"?this.tf("picker.companionRequiresWheelchair","Requires the adjacent wheelchair place"):""),A=this.controller.seatDetails(f.id),N=p(this.tf("picker.selected","Selected")),_=(0,R.t)("picker.removeSeatLabel",{label:f.label}),V=(f.objectType==="table"&&f.bookingMode==="variable"?`<button type="button" class="sl-table-edit" data-table-edit="${p(encodeURIComponent(f.label))}">${p((0,R.t)("picker.guestsCountEdit",{count:f.quantity??1}))}</button>`:"")+pi(f.wheelchairSpaceType)+er(f.commercial)+E,Z=this.paidPrice(f.categoryKey,f.tierId??null,f.price,f.label)*(f.quantity??1);u.push({key:P,fresh:!this.lastTrayKeys.has(P),held:!1,seatIds:[f.id],heldLabels:[],locateId:f.id,section:A?.sectionLabel??"",rowLabel:A&&Y(A)||"",seatLabel:A?.seatNumber??f.label,categoryLabel:B?.label??f.categoryKey,identityHtml:d(f.id,f.label,f.objectType,f.quantity??1,f.objectId,f,B?.label??f.categoryKey),categoryColor:this.controller.getRenderer?.()?.categoryDisplayColor?.(f.categoryKey)??B?.color??"",stateHtml:`<span class="sl-ticket-state" aria-label="${N}" title="${N}"><svg viewBox="0 0 24 24"><path d="M5 12l4 4L19 6"/></svg></span>`,extrasHtml:V,amount:Z,amountText:this.suppressPricing?"":this.money(Z),removeAria:_,noteHtml:tr(f.commercial)+(M?`<small class="sl-tier-note">${p(M)}</small>`:""),railHtml:fr(_,h&&f.objectType!=="table"&&this.deliverableViewReference(this.controller.seatByLabel(f.label)??{})?f.label:null),groupable:!V&&!M&&!!A?.sectionLabel&&!this.performanceGroup})}u.length&&a.push(this.root?.dataset.layout==="narrow"?Cl(u,{money:f=>this.money(f),suppressPricing:this.suppressPricing}):u.map(Tl).join("")),t.length&&a.push(ds(this,t,n)),this.els.tray.innerHTML=a.join("")+(this.salesClosed?"":this.lapse.noteHtml()),this.lastTrayKeys=l,El(this.els.tray),this.lapse.wire(this.els.tray),this.els.tray.querySelector("[data-pg-switch-mode]")?.addEventListener("click",()=>this.performanceGroup?.selectionModeSwitch?.activate());let g=this.performanceGroup?.selectNight;g&&_o(this.els.tray,f=>g(f)),this.els.tray.querySelectorAll("[data-ba]").forEach(f=>{f.addEventListener("click",()=>{this.baQty=Math.max(1,Math.min(this.maxTickets,this.baQty+Number(f.dataset.ba))),this.syncTray()})}),this.els.tray.querySelector("[data-ba-cat]")?.addEventListener("change",f=>{this.baCat=f.target.value}),this.els.tray.querySelector("[data-ba-zone]")?.addEventListener("change",f=>{this.baZone=f.target.value}),this.els.tray.querySelector("[data-ba-premium]")?.addEventListener("click",()=>{this.baPremium=!this.baPremium,this.syncTray()}),this.els.tray.querySelector(".sl-ba-go")?.addEventListener("click",()=>{if(this.pendingSelectionCount()>0){this.bestAvailableConfirm=!0,this.syncTray(),this.els.tray.querySelector("[data-ba-replace]")?.focus();return}this.bestAvailable(this.baQty,this.baCat||void 0,{preferPremium:this.baPremium,zoneId:this.baZone||void 0})}),this.els.tray.querySelector("[data-ba-cancel]")?.addEventListener("click",()=>{this.bestAvailableConfirm=!1,this.syncTray(),this.els.tray.querySelector(".sl-ba-go")?.focus()}),this.els.tray.querySelector("[data-ba-replace]")?.addEventListener("click",()=>{this.bestAvailableConfirm=!1,this.bestAvailable(this.baQty,this.baCat||void 0,{preferPremium:this.baPremium,zoneId:this.baZone||void 0})}),this.els.tray.querySelectorAll(".sl-chip .rm").forEach(f=>{f.addEventListener("click",()=>{let P=f.closest(".sl-chip");if(P.dataset.held){this.removeHeldLabels(decodeURIComponent(P.dataset.held).split(`
2842
- `),P);return}let B=P.dataset.seat.split(" "),E=()=>{this.controller.deselect(B)};if(this.reducedMotion()){E();return}P.classList.remove("sl-enter"),P.classList.add("sl-leave","sl-mo-collapse"),this.scheduleMotion(E,J.collapse)})}),this.els.tray.querySelectorAll("[data-table-edit]").forEach(f=>{f.addEventListener("click",P=>{P.stopPropagation();let B=decodeURIComponent(f.dataset.tableEdit??""),E=this.controller.tableSelection(B);if(!E)return;let O=n.find(M=>M.label===B&&M.objectType==="table");this.showTableDialog({...E,quantity:O?.quantity??E.quantity},!!O,f)})}),this.els.tray.querySelectorAll(".sl-chip .tier").forEach(f=>{f.addEventListener("change",()=>this.controller.setSeatTier(f.dataset.tier,f.value||null))}),this.els.tray.querySelectorAll(".sl-chip .view[data-view-label]").forEach(f=>{f.addEventListener("click",()=>{let P=this.controller.seatByLabel(f.dataset.viewLabel);P&&this.openSeatView(P)})}),this.els.tray.querySelectorAll(".sl-chip[data-locate]").forEach(f=>{let P=()=>this.controller.flashSeat(f.dataset.locate,this.cssVar("--sl-accent")||"#f4b740");f.addEventListener("mouseenter",P),f.addEventListener("focusin",P)}),ps(this,this.els.tray,t),this.controller.setGASelection(is(this.gaQty)),this.salesClosed&&this.els.tray.querySelectorAll(".sl-ba-go,[data-ba],[data-ba-cat],[data-ba-zone],[data-ba-replace],.sl-ga button").forEach(f=>{f.disabled=!0});let y=this.pendingSelectionCount(),S=this.lastTrayCount,k=this.lastTrayTotal,v=Oo(this.performanceGroup?.groupSelectionSummary?.(),this.performanceGroup?.selectionMode??"same_seat");this.els.count.textContent=v||(o?(0,R.tCount)("picker.ticketsCount",o):this.tf("picker.noSeatsSelected","No seats selected")),this.els.total.textContent=o&&!this.suppressPricing?this.money(s):"",this.root?.setAttribute("data-has-selection",String(o>0)),this.root?.setAttribute("data-ba-active",String(this.bestAvailableConfirm||this.bestAvailableBusy)),this.els.foot?.classList.toggle("empty",o===0),this.els.seatSummary&&(this.els.seatSummary.textContent=v||(o?(0,R.tCount)("picker.seatsSelectedCount",o):"")),this.syncCta(o,y),o!==S&&this.animateOnce(this.els.count,"sl-value-pop",380),s!==k&&this.animateOnce(this.els.total,"sl-value-pop",380),S===0&&o>0&&(this.animateOnce(this.els.cta,"sl-ready",520),this.sideCollapsed&&this.root?.dataset.layout!=="narrow"&&this.setPanelCollapsed(!1)),this.renderPeek(o,s,y,o>S),this.lastTrayCount=o,this.lastTrayTotal=s,this.opts.onSelectionChange?.(e),this.emitSelectionValidity(o,e),this.scheduleFit()}scheduleFit(){if(this.fitScheduled||this.destroyed)return;this.fitScheduled=!0;let e=()=>{this.fitScheduled=!1,this.destroyed||this.fitTranslatedRows()};typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()}fitTranslatedRows(){qs(this.confirmEl?.querySelector(".sl-confirm-row")),this.els.tray?.querySelectorAll(".sl-chip-pos").forEach(Ks),this.els.tray?.querySelectorAll(".sl-ba-go").forEach(Zn),this.els.peek?.querySelectorAll(".sl-sheet-go").forEach(Zn)}emitSelectionValidity(e,t){let n=this.controller.getSelectionValidity(e);n&&(n.seats=t,this.opts.onSelectionValidityChange?.(n),n.isValid?this.lastSelectionValidity!==!0&&this.opts.onSelectionValid?.(t):this.lastSelectionValidity!==!1&&this.opts.onSelectionInvalid?.(n),this.lastSelectionValidity=n.isValid)}renderPeek(e,t,n,r=!1){if(!this.els.peek)return;let s=(this.controller.doc?.categories??[]).map(o=>this.catPrice(o)).filter(o=>o!=null);this.els.peek.innerHTML=Da({count:e,total:t,pendingCount:n,ctaPhase:this.ctaPhase,hasHold:!!this.hold,salesClosed:this.salesClosed,suppressPricing:this.suppressPricing,fromPrice:s.length?Math.min(...s):null,offerFind:!this.performanceGroup&&!this.salesClosed&&!this.hold,holdTime:this.hold&&this.holdTimer?fi(Math.max(0,this.holdExpiresAt-Date.now())):null,money:o=>this.money(o)}),this.root&&(this.root.dataset.peekClock=String(!!this.els.peek.querySelector(".sl-peek-time"))),r&&this.animateOnce(this.els.peek.querySelector(".sl-peek-sum")??void 0,"sl-peek-bump",240),this.scheduleFit()}async removeHeldLabels(e,t){let n=e.filter(o=>o&&!this.releasingLabels.has(o));if(!n.length)return!1;let r=n[0];n.forEach(o=>this.releasingLabels.add(o)),t?.setAttribute("aria-busy","true");let s=t?.querySelector(".rm");s&&(s.disabled=!0);try{let o=this.handedOff;if(!await this.controller.releaseLabels(n))return this.toast((0,R.t)("picker.couldNotRemoveLabel",{label:r}),"error"),!1;os(this.gaQty,this.hold?.items??[],n);let l=this.controller.currentHold();return this.hold=l?{holdId:l.holdId,expiresAt:l.expiresAt,seats:l.seats,items:l.items}:null,this.handedOff=!!this.hold&&o,this.bookedShown=!1,this.ctaPhase="idle",this.hold?this.startHoldTimer(this.hold.expiresAt):(this.stopHoldTimer(),this.forgetHold()),this.syncTray(),this.emitHoldChange(),!0}finally{n.forEach(o=>this.releasingLabels.delete(o)),t?.removeAttribute("aria-busy"),s?.isConnected&&(s.disabled=!1)}}async handleCta(){if(this.salesClosed)return;let e=this.controller.getSelectionValidity(this.totalTicketCount());if(e&&!e.isValid){this.toast(wn(e,(n,r)=>this.tf(n,r)),"warning");return}if(this.totalTicketCount()>this.maxTickets){this.toast((0,R.t)("picker.removeTicketsUntilOrFewer",{count:this.maxTickets}),"warning");return}let t=this.committedSelection();if(this.hold&&!t.some(n=>!(this.hold.items??[]).some(r=>r.label===n.label))){let n=this.hold.seats??t;this.handedOff=!0,this.holdConflicted=!1,await this.runCheckoutHandoff(this.hold,n);return}this.holdingLabels=new Set(t.map(n=>n.label)),this.setCtaPhase("holding");try{let n=null,r=ts(this.gaQty),s=this.committedSelection();if(s.length){let o=await this.controller.hold(void 0,this.opts.holdTtlMs);n=o?{holdId:o.holdId,expiresAt:o.expiresAt,seats:o.seats,items:o.items}:null}for(let{areaId:o,tierId:a,qty:l}of r){let c=await this.controller.holdGA(o,l,{tierId:a,ttlMs:this.opts.holdTtlMs});n=c?{holdId:c.holdId,expiresAt:c.expiresAt,seats:c.seats,items:c.items}:n}if(!n){this.raiseHoldConflict(this.tf("picker.seatsJustTaken","One or more seats were just taken. Please pick again.")),this.setCtaPhase("idle"),this.syncTray();return}this.hold=n,this.holdConflicted=!1,this.handedOff=!this.performanceGroup,this.startHoldTimer(n.expiresAt),this.flashHeldSeats(n),this.emitHoldChange(),this.performanceGroup?this.setCtaPhase("idle"):await this.runCheckoutHandoff(n,n.seats??s)}catch(n){this.opts.onError?.(n);let r=n,s=(r.conflicts??[]).map(a=>a.label).filter(Boolean).slice(0,3);r.reason==="event_closed"&&this.setSalesClosed(!0);let o=r.reason==="event_closed"?this.tf("picker.seatSalesClosedForEvent","Seat sales have closed for this event."):r.reason==="companion_pair_required"?this.tf("picker.companionPairRequired","Select the adjacent wheelchair place with each companion ticket."):r.reason==="ticket_option_not_applicable"?this.tf("picker.ticketOptionNotApplicable","That ticket choice is not available for the selected seat."):s.length?s.length===1?(0,R.t)("picker.labelsNoLongerAvailable.one",{labels:s.join(", ")}):(0,R.t)("picker.labelsNoLongerAvailable.other",{labels:s.join(", ")}):this.tf("picker.seatsJustTaken","One or more seats were just taken. Please pick again.");this.raiseHoldConflict(o),this.setCtaPhase("idle")}finally{this.holdingLabels.clear(),this.ctaPhase==="holding"&&(this.ctaPhase="idle"),this.syncTray()}}startHoldTimer(e){il(this,e)}stopHoldTimer(){nl(this)}setExtendPrompt(e,t){rl(this,e,t)}refreshExtendPrompt(){sl(this)}handleExtend(){return ol(this)}detectBooked(){this.bookedShown||!this.handedOff||!this.hold||this.controller.currentHold()===null&&(this.holdConflicted||this.showBooked())}raiseHoldConflict(e){this.holdConflicted=!0,this.bookedShown&&(this.bookedShown=!1,this.bookedEl?.classList.remove("on")),this.toast(e,"error")}showBooked(){if(this.bookedShown||!this.hold||this.holdConflicted)return;this.bookedShown=!0;let e=this.buildHandoff(this.hold);this.stopHoldTimer(),this.forgetHold();let t=e.lineItems.reduce((r,s)=>r+s.quantity,0),n=this.performanceGroup?.groupSelectionSummary?.();this.els.bookedSub&&(this.els.bookedSub.innerHTML=n?.seats?`<span class="sl-booked-seats">${(0,R.tCount)("picker.group.ticketsConfirmedAcross",n.seats,{performances:n.performances})}</span>`:`<span class="sl-booked-seats">${(0,R.tCount)("picker.ticketsCount",t)}</span> ${this.tf("picker.confirmedAndOnWay","confirmed. A confirmation is on its way.")}`),this.els.bookedList&&(this.els.bookedList.innerHTML=e.lineItems.map(r=>{let o=[r.sectionLabel,r.rowLabel&&`${this.tf("picker.row","Row")} ${r.rowLabel}`,r.seatNumber&&`${this.tf("picker.seat","Seat")} ${r.seatNumber}`].filter(Boolean).join(" \xB7 ")||r.displayLabel||r.label,a=r.quantity>1?` <span class="sl-booked-qty">\xD7${r.quantity}</span>`:"";return`<li>${D(o)}${a}</li>`}).join(""),this.els.bookedList.hidden=e.lineItems.length===0),this.bookedEl?.classList.add("on"),requestAnimationFrame(()=>this.bookedEl?.querySelector(".sl-booked-back")?.focus()),this.opts.onBooked?.(e)}dismissBooked(){this.bookedEl?.classList.remove("on"),this.root?.focus({preventScroll:!0})}notifyGroupSettled(e){e==="booked"?this.showBooked():this.dismissConfirm(),this.hold=null,this.handedOff=!1,this.ctaPhase="idle",this.stopHoldTimer(),this.forgetHold(),this.syncTray(),this.syncCta()}async checkoutHandoff(e,t){if(this.checkoutMode==="hosted"){await this.startHostedCheckout(e,t);return}await this.opts.onCheckout?.(e,t,this.buildHandoff(e))}async startHostedCheckout(e,t){let n=this.buildHandoff(e),r=null;try{r=await(this.paymentOptions??=this.pubApi.paymentOptions(this.opts.event))}catch(o){this.opts.onError?.(o)}if(this.destroyed)return;let s=r?.providers?.[0];if(!s){let o=As(r?.reason),a=!!this.opts.onCheckoutUnavailable||!!this.opts.onCheckout;this.opts.onCheckoutUnavailable?.({reason:o,handoff:n}),this.opts.onCheckout?.(e,t,n),a||this.openCheckoutPanel({kind:"unavailable",reason:o,seatCount:n.lineItems.reduce((l,c)=>l+c.quantity,0)});return}await this.openCheckoutPanel({kind:"pay",provider:s,order:{holdId:n.holdId,expiresAt:n.expiresAt,currency:n.currency,total:n.total,labels:n.lineItems.map(o=>o.displayLabel??o.label)}})}async openCheckoutPanel(e){let t;try{({mountCheckout:t}=await Ui())}catch(n){this.opts.onError?.(n),this.toast(this.tf("picker.checkoutCouldNotBeOpened","Checkout could not be opened. Your seats are still held \u2014 please try again."),"error"),this.setCtaPhase("idle");return}this.destroyed||!this.root||(this.closeCheckoutPanel(),this.checkoutPanel=t({root:this.root,state:e,eventKey:this.opts.event,formatMoney:n=>this.money(n),startSession:n=>this.pubApi.startCheckout(this.opts.event,{...n,...this.opts.returnUrl?{returnUrl:this.opts.returnUrl}:{}}),orderStatus:n=>this.pubApi.orderStatus(n),onCancel:()=>{this.checkoutPanel=null,this.hold||this.setCtaPhase("idle")},onConfirmed:n=>{this.opts.onOrderConfirmed?.(n),this.controller.refresh()},onError:n=>this.opts.onError?.(n)}))}closeCheckoutPanel(){this.checkoutPanel?.destroy(),this.checkoutPanel=null}buildHandoff(e){let n=(e.items??[]).map(o=>{let a=this.controller.lineItemDisplay(o);return{label:o.label,...a.displayLabel?{displayLabel:a.displayLabel}:{},...a.displayType?{displayType:a.displayType}:{},objectId:o.objectId,objectType:o.objectType,categoryKey:o.categoryKey,tierId:o.tierId,unitPrice:this.paidPrice(o.categoryKey,o.tierId,o.unitPrice,o.label),currency:o.currency??this.currency,quantity:o.quantity??1}}),r=n[0]?.currency??this.currency,s=n.reduce((o,a)=>o+a.unitPrice*a.quantity,0);return{holdId:e.holdId,expiresAt:e.expiresAt,currency:r,lineItems:n,total:s}}emitHoldChange(){let e=this.hold;this.scheduleOfferRefresh(!0),this.opts.onHoldChange?.(e,e?.seats??[],e?this.buildHandoff(e):null)}toast(e,t="neutral",n){let r=this.els.toast;if(!r)return;r.replaceChildren();let s=document.createElement("span");if(s.textContent=e,r.appendChild(s),r.classList.toggle("has-action",!!n),n){let o=document.createElement("button");o.type="button",o.className="sl-toast-action",o.textContent=n.label,o.addEventListener("click",n.onClick,{once:!0}),r.appendChild(o)}r.dataset.tone=t,r.classList.add("on","sl-mo-rise"),this.liftToastOverConfirmSoon(),this.toastTimer&&clearTimeout(this.toastTimer),this.toastTimer=setTimeout(()=>{r.classList.remove("on","sl-mo-rise"),r.classList.remove("has-action"),r.dataset.tone="neutral",this.liftToastOverConfirm()},4200)}liftToastOverConfirm(){let e=this.regions["bottom-center"];if(!e)return;let t=this.els.toast?.classList.contains("on")||this.extendEl?.classList.contains("on"),n=this.confirmEl;if(!t||!n?.isConnected){e.style.removeProperty("bottom");return}let r=this.els.map.clientHeight;if(r<=0)return;let s=n.getBoundingClientRect(),o=s.height||n.offsetHeight||Vp,a=s.height?s.top-this.els.map.getBoundingClientRect().top:r-or-o,l=Math.round(r-a+Bp);if(l+Fp>r){e.style.removeProperty("bottom");return}e.style.bottom=`${l}px`}liftToastOverConfirmSoon(){this.liftToastOverConfirm(),typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{this.destroyed||this.liftToastOverConfirm()})}dismissSkeleton(){ea({boot:this.els.boot,map:this.els.map,rail:this.els.rail,root:this.root,reducedMotion:this.reducedMotion()})}placeTooltip(){if(!this.tipEl)return;let e={width:this.els.map.clientWidth,height:this.els.map.clientHeight},t={width:this.tipEl.offsetWidth,height:this.tipEl.offsetHeight},n=this.tipPinned?Fo(this.tipPos,e,t):null,r=n??Bo(this.tipPos,e.width,e.height,t);this.tipEl.style.left=`${r.left}px`,this.tipEl.style.top=`${r.top}px`,n?this.tipEl.dataset.placement=n.placement:delete this.tipEl.dataset.placement}nightStripFor(e,t){let n=this.performanceGroup,r=rr(e.mark,n?.nights?.()),s=r?.states.filter(o=>o.free).length??0;return Co(r,{locale:this.opts.locale,switchLabel:n?.selectionModeSwitch?.label??null,selectPartialLabel:n?.partialSeatSelection?.label(s)??null,pinned:t})}unavailableReason(e){return!e.unavailable||e.mark?.kind==="partial"?"":e.status==="held"?this.tf("picker.heldByOther","Held by another buyer \u2014 may become available"):e.status==="not_for_sale"?this.tf("picker.notForSaleExplanation","This seat is not included in the current sale."):e.status==="free"?"":this.tf("picker.soldSeatExplanation","This seat has already been booked.")}unpinTooltip(){this.tipPinned&&(this.tipPinned=!1,this.tipEl?.classList.remove("sl-tip-pinned"),this.tipEl&&(this.tipEl.style.display="none"))}handleMapPointerDown(e){if(this.tipEl?.contains(e.target))return;this.lastMapPoint={x:e.clientX,y:e.clientY},this.lastPointerType=e.pointerType||"mouse";let t=this.els.map.getBoundingClientRect();this.tipPos={x:e.clientX-t.left,y:e.clientY-t.top},this.unpinTooltip()}updateTooltip(e){if(!this.tipEl)return;if(this.confirmSeat){this.tipEl.style.display="none";return}if(this.tipPinned&&e?.interaction!=="press")return;if(!e){this.tipPinned||(this.tipEl.style.display="none",this.tipMarkedHoverLabel=null);return}let t=e.mark?.kind==="partial"&&this.tipMarkedHoverLabel===e.label;if(e.interaction!=="press"&&this.lastPointerType==="mouse"&&!e.mark&&!this.tipPinned){this.tipEl.style.display="none",this.tipMarkedHoverLabel=null;return}if(e.unavailable&&e.status==="free"&&e.interaction==="press"){this.toast(this.tf("picker.turnOffAccessibilityFilter","Turn off the wheelchair filter to pick this seat"),"neutral"),this.tipEl.style.display="none";return}let n=this.unavailableReason(e),r=e.mark?.kind==="partial"&&(e.interaction==="press"||this.lastPointerType!=="mouse"||t)||!!n&&e.interaction==="press";this.tipMarkedHoverLabel=e.mark?.kind==="partial"?e.label:null;let s=this.nightStripFor(e,r);this.tipEl.style.setProperty("--sl-cat",e.categoryColor),this.tipEl.innerHTML=No(e,{price:this.suppressPricing?"":this.money(this.paidPrice(e.categoryKey,e.tierId??null,e.price,e.label)),priceNote:this.suppressPricing?this.performanceGroup?.surface==="season"?this.tf("picker.season.includedInPackage","Included in the Season package"):this.tf("picker.group.pricesPerPerformance","Prices shown per performance"):"",rowTypeWord:it(e),reason:n,extra:s+(r?`<button type="button" class="sl-tip-close" data-pg-tip-close aria-label="${D(this.tf("picker.group.closeSeatDetails","Close seat details"))}">\xD7</button>`:"")}),this.tipPinned=r,this.tipEl.classList.toggle("sl-tip-pinned",r),this.tipEl.querySelector("[data-pg-tip-close]")?.addEventListener("click",()=>this.unpinTooltip()),this.tipEl.querySelector("[data-pg-switch-mode]")?.addEventListener("click",()=>{this.unpinTooltip(),this.performanceGroup?.selectionModeSwitch?.activate()}),zo(this.tipEl,this.performanceGroup?.partialSeatSelection?.label,o=>{this.unpinTooltip(),this.performanceGroup?.partialSeatSelection?.activate(e.id,o)}),this.tipEl.style.display="block",this.placeTooltip()}syncSeatMarks(){let e=this.performanceGroup?.seatMarks,t=this.controller.getRenderer();if(!e||!t?.setSeatMarks)return;let n={};for(let[r,s]of Object.entries(e())){let o=this.controller.idForLabel(r);o&&(n[o]=s)}Object.keys(n).length&&t.setSeatMarks(n)}getSelection(){return this.committedSelection()}selectObjects(e){return this.controller.select(e)}selectObjectsWithoutConfirmation(e){let t=new Set(e),n=this.controller.getSelection().filter(r=>t.has(r.id)||t.has(r.label));if(n.length===t.size)return n;this.suppressConfirmationSeatId=e[0]??null;try{return this.controller.select(e)}finally{this.suppressConfirmationSeatId=null}}deselectObjects(e){this.controller.deselect(e)}clearSelection(){this.dismissConfirm(),this.dismissTableDialog(),this.controller.clearSelection()}categoryLegendColor(){let e=(this.controller.doc?.categories??[]).find(t=>!t.notForSale);return(e?this.controller.getRenderer()?.categoryDisplayColor?.(e.key):null)||e?.color||"#2563eb"}async refreshAvailability(){await this.controller.refresh(),this.syncSeatMarks(),this.syncTray()}refreshPerformanceGroupComposition(){this.syncTray()}async adoptRestoredHold(e){!e||this.hold||await this.resumeHoldFromServer(e)}selectCategories(e){return this.controller.selectCategories(e)}deselectCategories(e){this.controller.deselectCategories(e)}setSelectableObjects(e){this.controller.setSelectableObjects(e)}setMaxSelection(e){this.maxTickets=Math.max(this.exactTickets??1,Math.floor(e)),this.controller.setMaxSelection(this.maxTickets),this.updateSelectionCapacity(),this.syncTray()}getSelectionValidity(){let e=this.controller.getSelectionValidity(this.totalTicketCount());return e&&(e.seats=this.committedSelection()),e}setMapTheme(e){this.destroyed||(this.opts.theme={...this.opts.theme??{},map:e??void 0},this.controller.setMapTheme(e),this.applyMapChromeTokens(),this.minimap?.refreshMinimap())}applyThemeTokens(e){let t=Jt(this.themeMode),n=kt(this.controller.doc?.theme,this.opts.theme,t);for(let[r,s]of Object.entries(n))e.style.setProperty(r,s);t?e.dataset.theme=t:delete e.dataset.theme,this.applyMapChromeTokens()}watchThemeMode(){this.colorSchemeStop?.(),this.colorSchemeStop=null,this.themeMode==="auto"&&(this.colorSchemeStop=Hi(()=>{this.destroyed||this.repaintForThemeMode()}))}repaintForThemeMode(){this.root&&(this.applyThemeTokens(this.root),this.controller.setMapTheme(xt(this.opts.theme,this.themeMode)),this.applyMapChromeTokens(),this.minimap?.refreshMinimap(),this.syncPrices())}setThemeMode(e){this.destroyed||e===this.themeMode||(this.themeMode=e,this.opts.theme={...this.opts.theme??{},...e?{mode:e}:{mode:void 0}},this.watchThemeMode(),this.repaintForThemeMode(),this.emitAnalytics("theme_mode_changed",{mode:e,resolved:Jt(e)??null}))}getThemeMode(){return this.themeMode}applyMapChromeTokens(){let e=this.els.map?.parentElement;if(!e||!this.root)return;let t=Jt(this.themeMode),n=kt(this.controller.doc?.theme,this.opts.theme,t),r=xt(this.opts.theme,this.themeMode)?.background??this.controller.doc?.theme?.background??void 0,s=Gr(n,r);for(let o of Ur)s?e.style.setProperty(o,s[o]):e.style.removeProperty(o)}setEventDetailsHidden(e){this.eventDetailsHidden=e,this.syncFullscreenButtons()}setPricing(e){let t=JSON.stringify(this.opts.pricing??null),n=JSON.stringify(e??null);t!==n&&(this.opts.pricing=e,!(this.destroyed||!this.els.prices)&&(this.els.pricesSec?.querySelector(".sl-price-select")?.remove(),this.buildPriceFilter(),this.syncPrices(),this.syncTray(),this.lastSection&&this.showSectionCard(this.lastSection)))}buildLanguageSwitcher(e){this.langSel=Yr(e,{languages:this.opts.languages,label:this.tf("picker.preferredTicketType","Language"),onChange:t=>{this.setLocale(t)}})}async setLocale(e){let t=(0,R.getLocale)(),n=this.localeGeneration+=1,r=await(0,R.loadLocale)(e);return this.opts.messages&&(0,R.setStringOverrides)(this.opts.messages),r===t||this.applyActiveLocale(r,n),r}applyActiveLocale(e,t){t===this.localeGeneration&&this.root&&(Xr(e,{root:this.root,painters:[()=>this.syncTray(),()=>this.syncPrices(),()=>this.syncOffer(),()=>this.syncRung(),()=>this.syncFloors(),()=>this.syncPanelToggle(),()=>this.syncFullscreenButtons()],refreshMapCopy:()=>this.controller.refreshMapCopy(),languageSelect:this.langSel}),this.scheduleFit())}isColorblindSafe(){return this.cbSafe}setColorblindSafe(e){e!==this.cbSafe&&(this.cbSafe=e,this.cbEl?.setAttribute("aria-pressed",String(e)),this.controller.setColorblindSafe(e),this.syncPrices(),this.minimap?.refreshMinimap(),zp(e))}setViewMode(e){this.controller.setViewMode(this.normalizeInitialView(e)),this.syncProjection(),this.dismissConfirm()}getViewMode(){return this.controller.getViewMode()}normalizeInitialView(e){return e==="perspective"?(this.perspectiveWarned||(this.perspectiveWarned=!0,console.warn("[seatlayer] initialView:'perspective' (2.5D) is deprecated for the buyer picker and was coerced to 'flat'. Use the Map | 3D control for the immersive view.")),"flat"):e??"flat"}emitAnalytics(e,t){try{this.opts.onAnalytics?.(e,t??{})}catch{}}emit3dAnalytics(e,t){this.emitAnalytics(e,t)}getBuyerView(){return ya(this)}setBuyerView(e,t){va(this,e,t)}seatState3dFor(e){return wa(this,e)}pushAvailabilityTo3d(){xa(this)}syncSelectionTo3d(){ka(this)}seatViewFor3d(e){return Sa(this,e)}onView3dSeatPick(e){Ta(this,e)}seatViewCaption(e){return Ca(this,e)}showUnavailable3dSeat(e,t,n){Ea(this,e,t,n)}dismissUnavailable3dSeat(){Aa(this)}saveView3dComparisonSeat(e){Pa(this,e)}clearView3dComparison(){Ma(this)}view3dComparisonSnapshot(e){return La(this,e)}enter3d(e){return Ha(this,e)}publish3dTopInset(){Ra(this)}exit3d(){Ia(this)}openSeatConfidencePassport(e,t=null){hr(this,e,t)}closeSeatConfidencePassport(e=!0){ui(this,e)}openView3dComparison(){pa(this)}closeView3dComparison(e=!0){rt(this,e)}getCurrentHold(){return this.hold}async resumeHold(e){return this.resumeHoldFromServer(e)}async removeHeldTicket(e){return this.removeHeldLabels([e])}async bestAvailable(e,t,n={}){if(this.salesClosed||this.bestAvailableBusy)return null;e=Math.max(1,Math.min(this.maxTickets,Math.floor(e)));try{return await this.bestAvailableOrThrow(e,t,n)}catch(r){this.opts.onError?.(r);let s=r?.reason,o=s==="not_enough_together"?(0,R.t)("picker.couldNotFindSeatsTogether",{count:e}):s==="companion_pair_required"?this.tf("picker.companionPairRequired","Select the adjacent wheelchair place with each companion ticket."):s==="ticket_option_not_applicable"?this.tf("picker.ticketOptionNotApplicable","That ticket choice is not available for the selected seat."):s==="sold_out"?this.tf("picker.ticketTypeSoldOut","That ticket type is sold out. Try another ticket type."):s==="event_closed"?this.tf("picker.seatSalesClosedForEvent","Seat sales have closed for this event."):this.tf("picker.seatsNoLongerAvailableTryAnother","Those seats are no longer available. Try another quantity or ticket type.");return this.toast(o,"error"),null}}async bestAvailableOrThrow(e,t,n={}){if(this.salesClosed)throw new Error("seatlayer: seat sales are closed");if(this.bestAvailableBusy)throw new Error("seatlayer: Best Available is already in progress");if(!Number.isInteger(e)||e<1)throw new Error("seatlayer: Best Available quantity must be a positive integer");this.confirmSeat&&this.cancelConfirm(),this.bestAvailableConfirm=!1,this.bestAvailableBusy=!0;let r=this.els.tray?.querySelector(".sl-ba-go");r&&(r.disabled=!0,r.classList.add("sl-busy"),r.innerHTML=`<span class="sl-ba-spin" aria-hidden="true"></span>${this.tf("picker.findingEllipsis","Finding\u2026")}`);try{let s=await this.controller.bestAvailable(e,t,{...n,ttlMs:this.opts.holdTtlMs});return s?(this.hold={holdId:s.holdId,expiresAt:s.expiresAt,seats:s.seats,items:s.items},this.handedOff=!1,this.bookedShown=!1,this.gaQty.clear(),this.startHoldTimer(s.expiresAt),this.flashHeldSeats(this.hold),this.syncTray(),this.emitHoldChange(),n.preferPremium&&s.seats.length&&!s.seats.every(o=>o.commercial?.premium)&&this.toast((0,R.t)("picker.premiumFallbackNote",{count:e}),"neutral"),this.hold):null}finally{this.bestAvailableBusy=!1,this.syncTray()}}async release(){let e=this.hold,t=this.controller.currentHold(),n=!0;if(t)n=await this.controller.release();else if(e){let r=[...new Set([...(e.items??[]).map(s=>s.label),...(e.seats??[]).map(s=>s.label)])];if(r.length)try{await this.api.release(this.opts.event,r,e.holdId)}catch(s){this.opts.onError?.(s),n=!1}}if(!n){this.toast(this.tf("picker.couldNotReleaseTickets","Couldn't release your tickets. Your hold is unchanged."),"error");return}this.hold=null,this.forgetHold(),this.handedOff=!1,this.bookedShown=!1,this.ctaPhase="idle",this.stopHoldTimer(),this.gaQty.clear(),this.syncTray(),this.emitHoldChange()}startRealtime(){if(!this.access?.configured||!this.pubApi||this.realtime)return;let e=this.opts.event;this.realtime=new xe({url:this.pubApi.subscribeUrl(e),mintTicket:()=>this.pubApi.subscribeTicket(e),onAccessUnavailable:t=>{this.opts.onAccessUnavailable?.(t),this.showAccessPanel(t)},sink:wt(this.controller,{flashOnLiveChange:!0,ownLabels:()=>this.holdingLabels,onStatusChange:()=>{this.syncPrices(),this.scheduleOfferRefresh(!0),this.detectBooked(),this.minimap?.refreshMinimap(),this.pushAvailabilityTo3d()},onSelectedObjectUnavailable:(t,n)=>{this.opts.onSelectedObjectUnavailable?.({labels:t,reason:n}),this.syncTray(),this.toast(n==="ineligible"?this.tf("picker.seatNoLongerYours","Some seats are no longer available to you. They have been removed from your order."):this.tf("picker.seatTaken","Someone else took a seat you had picked. It has been removed from your order."),"warning")}})}),this.realtime.start()}async refreshAccess(){return!this.access?.configured||!await this.access.refresh("manual")?!1:(this.dismissAccessPanel(),await this.controller.refresh(),this.realtime?this.realtime.restart():this.startRealtime(),!0)}clearDecisionSurfaces(){this.dismissConfirm(),this.dismissTableDialog(!1),ke(this,!1)}showAccessPanel(e){if(this.destroyed||!this.root)return;this.dismissAccessPanel(),this.clearDecisionSurfaces();let t=bo(e.reason,()=>this.recoverAccess());(this.root.querySelector(".sl-body")??this.root).appendChild(t),this.accessEl=t}async recoverAccess(){return await this.refreshAccess()?!0:(this.opts.onAccessUnavailable||typeof window>"u"||window.location.reload(),!1)}dismissAccessPanel(){this.accessEl?.remove(),this.accessEl=null}showHoldExpired(){if(this.destroyed||!this.root||this.holdExpiredEl)return;this.clearDecisionSurfaces();let e=wl({restart:()=>this.restartAfterHoldExpiry()},this.holdExpiredUnits);this.root.appendChild(e),this.holdExpiredEl=e,requestAnimationFrame(()=>e.querySelector(".sl-interrupt-act")?.focus());let t=this.holdExpiredUnits;this.holdExpiredFresh=!1,this.refreshAvailability().then(()=>{if(this.destroyed||this.holdExpiredEl!==e)return;this.holdExpiredFresh=!0;let n=t.filter(o=>o.objectType!=="ga"),r=[],s=[];for(let o of n){let a=this.controller.seatByLabel(o.label);(a&&this.controller.getStatus(a.id)==="free"?r:s).push(o.label)}vl(e,{recoverable:r,taken:s,onRecover:o=>this.recoverAfterHoldExpiry(o)})}).catch(()=>{})}recoverAfterHoldExpiry(e){this.holdExpiredUnits=[],this.dismissHoldExpired(),this.lapse.clear(),this.clearSelection(),this.controller.select(e),this.syncTray(),this.handleCta()}dismissHoldExpired(){this.holdExpiredEl?.remove(),this.holdExpiredEl=null}restartAfterHoldExpiry(){let e=this.holdExpiredUnits;this.holdExpiredUnits=[],this.dismissHoldExpired(),this.lapse.clear(),this.clearSelection(),this.controller.overview(),this.syncTray(),this.syncCta(),this.root?.focus({preventScroll:!0});let t=this.holdExpiredFresh;this.holdExpiredFresh=!1,(t?Promise.resolve():this.refreshAvailability()).then(()=>{this.destroyed||yl({reducedMotion:this.reducedMotion(),accent:this.cssVar("--sl-accent")||"#f4b740",seatByLabel:n=>this.controller.seatByLabel(n),statusOf:n=>this.controller.getStatus(n),flash:(n,r)=>this.controller.flashSeat(n,r)},e)}).catch(()=>{})}destroy(){this.destroyed=!0,cr(this),this.colorSchemeStop?.(),this.colorSchemeStop=null,this.realtime?.stop(),this.realtime=null,this.dismissAccessPanel(),this.dismissHoldExpired(),this.access?.clear(),this.hold&&!this.handedOff&&this.controller.release(),this.closeConfirm(),this.dismissTableDialog(!1),ke(this,!1),this.closeSeatView(),this.closeCheckoutPanel(),this.exit3d(),this.buyerAssetUrls.dispose(),this.stopHoldTimer(),this.detachAttention?.(),this.toastTimer&&clearTimeout(this.toastTimer),this.offerRefreshTimer&&clearTimeout(this.offerRefreshTimer),this.offerBoundaryTimer&&clearTimeout(this.offerBoundaryTimer),this.offerRefreshTimer=null,this.offerBoundaryTimer=null,this.offerVisibilityHandler&&(document.removeEventListener("visibilitychange",this.offerVisibilityHandler),this.offerVisibilityHandler=null);for(let e of this.motionTimers)clearTimeout(e);this.motionTimers.clear(),this.ro?.disconnect(),this.ro=null,this.framedFs&&this.setFramedFs(!1),this.escHandler&&document.removeEventListener("keydown",this.escHandler),this.fsChangeHandler&&document.removeEventListener("fullscreenchange",this.fsChangeHandler),this.fsEscHandler&&window.removeEventListener("keydown",this.fsEscHandler),this.controller.destroy(),this.projectionEl=null,this.root?.remove(),this.root=null,this.modalScrim&&(this.modalScrim.remove(),this.modalScrim=null,this.prevFocus?.isConnected&&this.prevFocus.focus({preventScroll:!0}),this.prevFocus=null)}};var qe=require("@seatlayer/core");var Dl="seatlayer-performance-group-picker-style";function Nl(){if(document.getElementById(Dl))return;let i=document.createElement("style");i.id=Dl,i.textContent=`
2919
+ }`,e.append(t);let n="linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.10) 37%, rgba(255,255,255,0.04) 63%)",o=document.createElement("div");Object.assign(o.style,{position:"absolute",inset:"0",display:"flex",flexDirection:"column",padding:"16px",gap:"14px",opacity:"0.9"});let r=c=>{let d=document.createElement("div");return d.className="sl-shimmer",Object.assign(d.style,{background:n,borderRadius:"8px"}),Object.assign(d.style,c),d};o.append(r({height:"40px",width:"100%",flex:"0 0 auto"}));let s=document.createElement("div");Object.assign(s.style,{display:"flex",gap:"14px",flex:"1 1 auto",minHeight:"0"}),s.append(r({width:"220px",height:"100%",flex:"0 0 auto"})),s.append(r({flex:"1 1 auto",height:"100%"})),o.append(s),e.append(o);let a=document.createElement("div");Object.assign(a.style,{position:"relative",zIndex:"1",display:"flex",alignItems:"center",gap:"10px",padding:"10px 16px",borderRadius:"999px",background:"rgba(16, 22, 37, 0.72)",fontSize:"13px",fontWeight:"500",letterSpacing:"0.01em"});let l=document.createElement("span");l.className="sl-shimmer",Object.assign(l.style,{width:"9px",height:"9px",borderRadius:"50%",background:n,flex:"0 0 auto"}),a.append(l),a.append(document.createTextNode("Loading designer\u2026")),e.append(a)}buildErrorCard(e,t){let n=yd[t],o=document.createElement("div");Object.assign(o.style,{maxWidth:"420px",margin:"0 24px",padding:"28px",textAlign:"center",background:"rgba(255, 255, 255, 0.03)",border:"1px solid rgba(255, 255, 255, 0.08)",borderRadius:"16px",boxShadow:"0 12px 40px rgba(0, 0, 0, 0.35)"});let r=document.createElement("h2");r.textContent=n.title,Object.assign(r.style,{margin:"0 0 8px",fontSize:"17px",fontWeight:"600",color:"#f4f7ff"});let s=document.createElement("p");s.textContent=n.body,Object.assign(s.style,{margin:"0 0 20px",fontSize:"13.5px",lineHeight:"1.5",color:"#aab4c8"});let a=document.createElement("button");a.type="button",a.textContent="Try again",Object.assign(a.style,{appearance:"none",cursor:"pointer",border:"0",borderRadius:"10px",padding:"10px 22px",fontSize:"14px",fontWeight:"600",color:"#101625",background:"#7aa2ff"}),a.addEventListener("click",()=>this.handleTryAgain()),o.append(r,s,a),e.append(o)}};var I=require("@seatlayer/core"),Sn=require("@seatlayer/core/view3d/crossfade/panorama");function as(i){return!!i&&i.clientWidth>0&&i.scrollWidth>i.clientWidth+1}function vd(i){return i.some(e=>as(e))}var nn="data-fit-gone",wd=12;function Zn(i,e,t=as){if(!i)return 0;for(let n of e)i.classList.remove(n.cls);if(i.querySelectorAll(`[${nn}]`).forEach(n=>{n.removeAttribute(nn),n.hidden=!1}),i.dataset.fit="0",i.clientWidth<=0||!t(i))return 0;for(let n=0;n<e.length;n+=1){let o=e[n];n>0&&i.classList.remove(e[n-1].cls),i.classList.add(o.cls),i.dataset.fit=String(n+1);let r=o.give?o.give(i):!0;if(!t(i))return n+1;if(o.repeat&&o.give){for(let s=1;r&&s<wd;s+=1)if(r=o.give(i),!t(i))return n+1}}return e.length}function xd(i,e="[data-fit-seg]"){let t=[...i.querySelectorAll(e)].filter(n=>!n.hidden);return t.length<2?!1:ls(t[t.length-1])}function Sd(i,e){let t=i.querySelector(e);return t&&!t.hidden?ls(t):!1}function ls(i){let e=i.previousElementSibling;return e instanceof HTMLElement&&e.tagName==="I"&&(e.setAttribute(nn,""),e.hidden=!0),i.setAttribute(nn,""),i.hidden=!0,!0}function kd(i){if(!i)return!1;let e=(i.getAttribute("aria-label")||i.textContent||"").trim();return e?(i.setAttribute("aria-label",e),i.setAttribute("title",e),!0):!1}function cs(i){if(!i)return 0;let e=i.querySelector(".sl-confirm-cancel"),t=i.querySelector(".sl-confirm-add-t");return Zn(i,[{cls:"sl-fit-track"},{cls:"sl-fit-type"},{cls:"sl-fit-icon",give:()=>kd(e)}],()=>vd([e,t]))}function ds(i){return Zn(i,[{cls:"sl-fit-notype",give:e=>Sd(e,"[data-fit-type]")},{cls:"sl-fit-short",give:e=>xd(e),repeat:!0}])}function ps(i){return i?(i.classList.add("sl-fitpill"),Zn(i,[{cls:"sl-fit-p1"},{cls:"sl-fit-p2"},{cls:"sl-fit-p3"}])):0}var Td=["on-sale","low","sold-out","presale","closed"];function si(i){return i==null?null:typeof i=="number"&&Number.isFinite(i)&&i>=0?i:void 0}function us(i){return i==null?null:typeof i=="number"&&Number.isFinite(i)&&i>=0?i:void 0}function hs(i){if(i==null)return null;if(typeof i!="object"||Array.isArray(i))return;let e=i,t=e.count,n=e.index;if(typeof n!="number"||!Number.isInteger(n)||n<1||typeof t!="number"||!Number.isInteger(t)||t<n)return;let o=e.remaining;if(o!=null&&(typeof o!="number"||!Number.isInteger(o)||o<0))return;let r={index:n,count:t,remaining:o??null};if(e.id!==void 0){if(typeof e.id!="string"||!e.id.trim())return;r.id=e.id.trim()}if(e.name!==void 0){if(typeof e.name!="string"||!e.name.trim())return;r.name=e.name.trim()}if(e.categoryKey!==void 0){if(e.categoryKey!==null&&(typeof e.categoryKey!="string"||!e.categoryKey.trim()))return;r.categoryKey=e.categoryKey==null?null:e.categoryKey.trim()}for(let s of["startsAt","endsAt"]){if(e[s]===void 0)continue;let a=us(e[s]);if(a===void 0)return;r[s]=a}return r}function Ed(i){if(i==null)return null;if(typeof i!="object"||Array.isArray(i))return;let e=i;if(!Number.isInteger(e.assignmentVersion)||e.assignmentVersion<0||!Array.isArray(e.channels)||!Array.isArray(e.objects))return;let t=[],n=new Set;for(let s of e.channels){if(!s||typeof s!="object"||Array.isArray(s))return;let a=s,l=typeof a.channelId=="string"?a.channelId.trim():"";if(!l||n.has(l)||!Number.isInteger(a.pricingVersion)||a.pricingVersion<0||!Array.isArray(a.priceOverrides))return;let c=[],d=new Set;for(let p of a.priceOverrides){if(!p||typeof p!="object"||Array.isArray(p))return;let u=p,h=typeof u.categoryKey=="string"?u.categoryKey.trim():"",f=u.tierId===null?null:typeof u.tierId=="string"&&u.tierId.trim()?u.tierId.trim():void 0,b=si(u.price);if(!h||f===void 0||b===void 0||b===null)return;let k=`${h}\0${f??""}`;if(d.has(k))return;d.add(k),c.push({categoryKey:h,tierId:f,price:b})}n.add(l),t.push({channelId:l,pricingVersion:a.pricingVersion,priceOverrides:c})}let o=[],r=new Set;for(let s of e.objects){if(!s||typeof s!="object"||Array.isArray(s))return;let a=s,l=typeof a.label=="string"?a.label.trim():"",c=typeof a.channelId=="string"?a.channelId.trim():"";if(!l||r.has(l)||!n.has(c))return;r.add(l),o.push({label:l,channelId:c})}return{assignmentVersion:e.assignmentVersion,channels:t,objects:o}}function on(i){if(!i||typeof i!="object"||Array.isArray(i))return null;let e=i,t=Td.find(d=>d===e.state);if(!t)return null;let n=si(e.fromPrice),o=si(e.previousPrice);if(n===void 0||o===void 0)return null;let r=e.currency==null?null:typeof e.currency=="string"&&e.currency.trim()?e.currency.trim():void 0;if(r===void 0)return null;let s=hs(e.release);if(s===void 0)return null;let a=e.upcoming===void 0?null:hs(e.upcoming);if(a===void 0)return null;let l=[];if(e.prices!=null){if(!Array.isArray(e.prices))return null;let d=[];for(let p of e.prices){if(!p||typeof p!="object"||Array.isArray(p))return null;let u=p,h=typeof u.categoryKey=="string"?u.categoryKey.trim():"";if(!h)return null;let f=si(u.price),b=si(u.previousPrice);if(f==null||b===void 0)return null;let k={categoryKey:h,price:f,previousPrice:b};if(u.offerId!==void 0){if(typeof u.offerId!="string"||!u.offerId.trim())return null;k.offerId=u.offerId.trim()}if(u.offerName!==void 0){if(typeof u.offerName!="string"||!u.offerName.trim())return null;k.offerName=u.offerName.trim()}if(u.remaining!==void 0){if(u.remaining!==null&&(typeof u.remaining!="number"||!Number.isInteger(u.remaining)||u.remaining<0))return null;k.remaining=u.remaining==null?null:u.remaining}for(let S of["startsAt","endsAt"]){if(u[S]===void 0)continue;let v=us(u[S]);if(v===void 0)return null;k[S]=v}d.push(k)}l=d}let c=Ed(e.channelPricing);return c===void 0?null:{state:t,fromPrice:n,previousPrice:o,currency:r,release:s,upcoming:a,prices:l,channelPricing:c}}function ms(i){return i?.changed!==!1}function fs(i,e){if(!i)return null;let t=null,n=o=>{o!=null&&o>e&&(t===null||o<t)&&(t=o)};for(let o of[i.release,i.upcoming])n(o?.startsAt),n(o?.endsAt);for(let o of i.prices)n(o.startsAt),n(o.endsAt);return t}function rn(i){let e={};for(let t of i?.prices??[])e[t.categoryKey]=t.price;return e}function gs(i){return i.focusedSection!==null?i.deeperThanSectionFrame===!1?"venue":"section":i.atVenueFit!==void 0?i.atVenueFit?"none":"venue":i.seatsRevealed?"venue":"none"}function bs(i){let e=document.createElement("div");e.className="sl-floors on",e.setAttribute("role","group"),e.setAttribute("aria-label",i.tf("picker.chooseLevel","Choose level"));let t=[{id:"",name:i.tf("picker.allFloors","All floors")},...i.floors.map(r=>({id:r.id,name:r.name}))];for(let r of t){let s=document.createElement("button");s.type="button",s.dataset.floor=r.id,s.textContent=r.name,s.setAttribute("aria-pressed","false"),s.addEventListener("click",()=>i.onChoose(r.id)),e.appendChild(s)}let n=document.createElement("button");n.type="button",n.className="sl-floor-info",n.textContent="i";let o=i.tf("picker.floorHelp","All floors shows the complete venue. Choose one level to inspect and select its seats.");return n.setAttribute("aria-label",o),n.title=o,e.appendChild(n),e}function ys(i,e,t){if(!i)return;let n=t?"":e;i.querySelectorAll("button[data-floor]").forEach(o=>{o.setAttribute("aria-pressed",String(o.dataset.floor===n))})}var Ee=require("@seatlayer/core");var sn=class{constructor(e){this.el=null;this.current=null;this.collapsed=!1;this.shownAt=0;this.host=e}get summary(){return this.current}adopt(e){this.current=e}get element(){return this.el}show(e){if(e&&e.id!==this.current?.id&&this.host.collapseSheet(),this.current=e,!e){this.el?.remove(),this.el=null,this.host.refreshMinimap();return}this.collapsed=this.host.controller.getRung()==="seats",this.shownAt=Date.now(),this.render(e),this.host.refreshMinimap()}wireNavigation(e){e.querySelectorAll("[data-section-nav]").forEach(t=>{t.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation();let o=t.dataset.sectionNav;o&&this.host.controller.focusSection(o)})})}render(e){let t=this.host.map();if(!t)return;if(this.host.root()?.dataset.layout==="narrow"){this.el?.remove(),this.el=null;return}let n=e.categories.length?e.categories.map(h=>{let f=this.host.controller.doc?.categories.find(b=>b.key===h.key);return f?this.host.catPriceRange(f):{min:h.priceMin,max:h.priceMax}}).filter(h=>h!=null):[{min:e.priceMin,max:e.priceMax}],o=Math.min(...n.map(h=>h.min)),r=Math.max(...n.map(h=>h.max)),s=o===r?this.host.money(o):`${this.host.money(o)}\u2013${this.host.money(r)}`,a=(0,Ee.tCount)("picker.seatsLeftInSection",e.seatsLeft),l=(0,Ee.t)("picker.seatsLeftShort",{count:e.seatsLeft}),c=`<button type="button" class="sl-seccard-x" aria-label="${(0,Ee.t)("picker.closeSectionSummary")}">\u2715</button>`,d=Zo(this.host.sectionNeighbours(e.id)),p={label:e.label,color:e.color,leftLabel:a,leftShortLabel:l,nav:d,close:c};this.el?.remove();let u=document.createElement("div");if(this.collapsed)u.className="sl-seccard mini on",u.setAttribute("role","button"),u.setAttribute("aria-label",(0,Ee.t)("picker.sectionSummaryAria",{label:e.label})),u.innerHTML=rr(p),this.wireNavigation(u),u.addEventListener("click",h=>{h.target.closest(".sl-seccard-x")||(this.collapsed=!1,this.shownAt=Date.now(),this.render(e))}),u.querySelector(".sl-seccard-x").addEventListener("click",()=>this.host.controller.overview()),(this.host.region("top-center")??t).appendChild(u);else{u.className="sl-seccard on",u.setAttribute("role","dialog"),u.setAttribute("aria-label",(0,Ee.t)("picker.sectionSummaryAria",{label:e.label}));let h=this.host.priceBandKeys(),f=this.host.suppressPricing(),b=e.categories.map(k=>{let S=this.host.controller.doc?.categories.find(P=>P.key===k.key),v=S?this.host.catPriceRange(S):{min:k.priceMin,max:k.priceMax};return ar({label:k.label,color:k.color,dim:h!=null&&!h.has(k.key),rangeLabel:f?"":v&&v.min!==v.max?`${this.host.money(v.min)}\u2013${this.host.money(v.max)}`:this.host.money(v?.min??k.price)})}).join("");u.innerHTML=sr({...p,priceLabel:s,showPrice:!f&&e.categories.length>0,zoneLabel:e.zoneLabel,entrance:e.entrance?`${(0,Ee.t)("picker.entrance")} ${e.entrance}`:void 0,mix:b,overviewLabel:(0,Ee.t)("picker.overview"),hint:(0,Ee.t)("picker.tapSeatHint")}),this.wireNavigation(u),u.querySelector(".sl-seccard-x").addEventListener("click",()=>this.host.controller.overview()),u.querySelector(".sl-seccard-overview").addEventListener("click",()=>this.host.controller.overview()),(this.host.region("top-center")??t).appendChild(u)}this.el=u}collapse(){!this.el||this.collapsed||!this.current||(this.collapsed=!0,this.render(this.current))}onView(){if(!(!this.el||this.collapsed||!this.current)){if(this.host.controller.getRung()==="seats"){this.collapse();return}if(Date.now()-this.shownAt<1400){this.coverage()>.25&&this.collapse();return}this.collapse()}}coverage(){let e=this.el,t=this.current,n=this.host.map();if(!e||!t||!n)return 0;let o=this.host.activeFloorObjects().find(v=>v.type==="section"&&v.id===t.id)?.outline;if(!o||o.length<3)return 0;let r=o.map(v=>this.host.controller.worldToScreen(v)),s=r.map(v=>v.x),a=r.map(v=>v.y),l=Math.min(...s),c=Math.min(...a),d=Math.max(...s)-l,p=Math.max(...a)-c;if(d<=0||p<=0)return 0;let u=n.getBoundingClientRect(),h=e.getBoundingClientRect(),f=h.left-u.left,b=h.top-u.top,k=Math.max(0,Math.min(f+h.width,l+d)-Math.max(f,l)),S=Math.max(0,Math.min(b+h.height,c+p)-Math.max(b,c));return k*S/(d*p)}};var ot=require("@seatlayer/core"),Gs=require("@seatlayer/core/core/color");var je=require("@seatlayer/core");function Qn(i,e,t){try{return new Intl.DateTimeFormat(e,{...t,...i.timezone?{timeZone:i.timezone}:{}}).format(new Date(i.startsAt))}catch{return new Date(i.startsAt).toLocaleString(e)}}var an=(i,e)=>Qn(i,e,{dateStyle:"medium"}),ln=(i,e)=>Qn(i,e,{timeStyle:"short"}),cn=(i,e)=>Qn(i,e,{weekday:"short",day:"numeric",month:"short"});function vs(i,e,t,n){return!i.length||i.length>=e?null:{summary:n,labels:i.map(o=>`${an(o,t)} \xB7 ${ln(o,t)}`)}}function Cd(i,e){let t=new Set(e);return i.map(n=>({...n,free:!t.has(n.eventKey)}))}function ws(i,e){let t=[...i];if(t.length<=1)return t[0]??"";try{return new Intl.ListFormat(e,{style:"long",type:"conjunction"}).format(t)}catch{return t.join(", ")}}function Ad(i,e,t="",n=!1){if(!i.length)return"";let o=i.map(r=>{let s=r.free?e.free:e.blocked,a=n&&r.free?`<input class="sl-night-choice" type="checkbox" data-pg-event-key="${E(r.eventKey)}" aria-label="${E(`${r.shortDate}: ${s}`)}" checked>`:"";return`<li class="sl-night${r.free?" ok":" no"}" aria-label="${E(`${r.shortDate}: ${s}`)}">`+a+`<i class="sl-night-dot" aria-hidden="true"></i><span class="d">${E(r.shortDate)}</span><span class="st">${E(s)}</span></li>`}).join("");return`<div class="sl-tip-nights"><div class="sl-tip-nights-title">${E(e.title)}</div><ul class="sl-nightstrip">${o}</ul><p class="sl-tip-nights-note">${E(e.notAvailableOn)}</p>`+t+"</div>"}function Pd(i){return i.selectPartialLabel&&i.pinned?`<button type="button" class="sl-tip-switch" data-pg-select-partial>${E(i.selectPartialLabel)}</button>`:i.switchLabel&&i.pinned?`<button type="button" class="sl-tip-switch" data-pg-switch-mode>${E(i.switchLabel)}</button>`:i.switchLabel||i.selectPartialLabel?"":`<p class="sl-tip-advice">${E(i.advice)}</p>`}function Md(i){return Number(i.available)+Number(i.selected)+Number(i.partial)+Number(i.unavailable)}function xs(i,e,t){if(Md(i)<2)return"";let n=(r,s,a="")=>`<li class="sl-pg-legend-item"><i class="sl-pg-sw ${r}"${a}></i>${E(s)}</li>`,o=[];return i.available&&o.push(n("sl-pg-sw-free",e.available,` style="background:${E(t)}"`)),i.selected&&o.push(n("sl-pg-sw-sel",e.selected)),i.partial&&o.push(n("sl-pg-sw-split",e.partial,` style="--sl-pg-sw-cat:${E(t)}"`)),i.unavailable&&o.push(n("sl-pg-sw-off",e.unavailable)),`<ul class="sl-pg-legend-list" aria-label="${E(e.title)}">${o.join("")}</ul>`}function Ss(i,e){if(!i.length)return"";let t=i.map(n=>{let o=n.labels.length?n.labels.join(", "):e.empty;return`<li class="sl-pg-night-row${n.labels.length?"":" empty"}${n.active?" active":""}" role="button" tabindex="0"${n.active?' aria-current="true"':""} data-event-key="${E(n.eventKey)}"><span class="n">${E(n.name)}</span><span class="s">${E(o)}</span></li>`}).join("");return`<div class="sl-pg-nights" role="group" aria-label="${E(e.title)}"><div class="sl-pg-nights-title">${E(e.title)}</div><ul class="sl-pg-nights-list">${t}</ul></div>`}function Jn(i,e){if(i?.kind!=="partial"||!e?.length)return null;let t=i.data?.blockedEventKeys??[],n=Cd(e,t);return{states:n,missing:n.filter(o=>!o.free).map(o=>o.shortDate)}}function ks(i,e){return i?Ad(i.states,{title:g("picker.group.partlyAvailableTitle","Free on some nights only"),free:g("picker.group.nightFree","Free"),blocked:g("picker.group.nightBlocked","Not available"),notAvailableOn:(0,je.t)("picker.group.notAvailableOn",{dates:ws(i.missing,e.locale)})},Pd({switchLabel:e.switchLabel??null,selectPartialLabel:e.selectPartialLabel??null,pinned:e.pinned,advice:g("picker.group.pickSeatFreeEveryNight","Pick a seat that is free every night.")}),!!e.selectPartialLabel&&!!e.pinned):""}function Ld(i,e,t,n){if(!i.length)return"";let o=new Set(e),r=new Set(t),s=i.map(a=>{let l=o.has(a.eventKey);return`<li class="sl-confirm-date${l?"":" blocked"}"><label><input type="checkbox" data-pg-confirm-event-key="${E(a.eventKey)}" aria-label="${E(`${a.shortDate}: ${l?n.available:n.unavailable}`)}"${l&&r.has(a.eventKey)?" checked":""}${l?"":" disabled"}><span class="sl-confirm-date-label">${E(a.shortDate)}</span><span class="sl-confirm-date-state">${E(l?n.available:n.unavailable)}</span></label></li>`}).join("");return`<fieldset class="sl-confirm-dates" data-pg-confirm-dates><legend>${E(n.title)}</legend><p class="sl-confirm-dates-copy">${E(n.copy)}</p><label class="sl-confirm-date-all"><input type="checkbox" data-pg-confirm-all><span>${E(n.selectAll)}</span></label><ul>${s}</ul><p class="sl-confirm-dates-summary" data-pg-confirm-summary aria-live="polite"></p></fieldset>`}function Ts(i,e,t,n){let o=e.availableEventKeys(t);return Ld(i,o,e.includedEventKeys(),{title:n("picker.group.confirmDatesTitle","Choose performance dates"),copy:o.length===i.length?n("picker.group.confirmAllDatesCopy","This seat is available for all {count} dates. Keep all selected, or remove dates you do not want.").replace("{count}",String(i.length)):n("picker.group.confirmPartialDatesCopy","This seat is available for {available} of {total} dates. Choose one date or keep every available date.").replace("{available}",String(o.length)).replace("{total}",String(i.length)),selectAll:n("picker.group.confirmSelectAll","Select all available dates"),available:n("picker.group.nightFree","Available"),unavailable:n("picker.group.nightBlocked","Unavailable")})}function Es(i){return[...i.querySelectorAll("[data-pg-confirm-event-key]")].filter(e=>e.checked&&!e.disabled).map(e=>e.dataset.pgConfirmEventKey).filter(Boolean)}function Cs(i,e,t,n){let o=[...i.querySelectorAll("[data-pg-confirm-event-key]")];if(!e||!o.length)return;let r=i.querySelector(".sl-confirm-add"),s=i.querySelector("[data-pg-confirm-all]"),a=()=>{let l=o.filter(p=>!p.disabled),c=Es(i).length;s&&(s.checked=c===l.length,s.indeterminate=c>0&&c<l.length);let d=i.querySelector("[data-pg-confirm-summary]");d&&(d.textContent=c===l.length?t("picker.group.confirmAllSelected","All {count} available dates are selected.").replace("{count}",String(c)):t("picker.group.confirmSelectedOfAvailable","{selected} of {available} available dates selected.").replace("{selected}",String(c)).replace("{available}",String(l.length))),r.disabled=c===0,r.textContent=c?e.label(c):t("picker.group.confirmChooseOne","Choose at least 1 date"),n()};o.forEach(l=>l.addEventListener("change",a)),s?.addEventListener("change",()=>{o.filter(l=>!l.disabled).forEach(l=>{l.checked=s.checked}),a()}),a()}async function As(i,e,t){if(!i||!t||!i.querySelector("[data-pg-confirm-event-key]"))return!0;let n=Es(i);if(!n.length)return!1;let o=i.querySelector(".sl-confirm-add");return o?.setAttribute("aria-busy","true"),o&&(o.disabled=!0),await t.apply(e,n)?!0:(o?.removeAttribute("aria-busy"),o?.isConnected&&(o.disabled=!1),!1)}function Ps(i,e,t){return i?(0,je.t)("picker.group.seatPartlyAvailable",{label:e,free:i.states.length-i.missing.length,total:i.states.length,dates:ws(i.missing,t)}):""}function Ms(i,e){let t=i.map((n,o)=>{let r=n.state==="done"?e.done:n.state==="current"?e.current:e.upcoming;return`<li class="sl-pg-step-item" data-step="${E(n.id)}" data-state="${E(n.state)}"${n.state==="current"?' aria-current="step"':""}><span class="i" aria-hidden="true">${n.state==="done"?"\u2713":String(o+1)}</span><span class="l">${E(n.label)}</span><span class="sl-pg-sr">${E(r)}</span></li>`}).join("");return`<ol class="sl-pg-steps" aria-label="${E(e.label)}">${t}</ol>`}function eo(i,e){return`<ul class="sl-pg-cards">${i.map(n=>`<li class="sl-pg-card" data-event-key="${E(n.eventKey)}"><span class="n">${E(n.name)}</span><time datetime="${E(n.iso)}"><span class="d">${E(n.date)}</span><span class="t">${E(n.time)}</span></time></li>`).join("")}</ul><p class="sl-pg-included">${E(e)}</p>`}function Ls(i){let e=i.rows.map(t=>`<li class="sl-pg-pane-row${t.labels.length?"":" empty"}" data-event-key="${E(t.eventKey)}"><span class="n">${E(t.name)}</span><span class="s">${E(t.labels.length?t.labels.join(", "):i.empty)}</span></li>`).join("");return`<div class="sl-pg-pane-title">${E(i.title)}</div><ul class="sl-pg-pane-list">${e}</ul>`+(i.note?`<p class="sl-pg-pane-note">${E(i.note)}</p>`:"")+(i.total?`<div class="sl-pg-pane-total"><span>${E(i.total.label)}</span><b>${E(i.total.amount)}</b></div>`:"")+(i.holdStatus?`<p class="sl-pg-hold-status" role="status">${E(i.holdStatus)}</p>`:"")}function Hs(i){let e=Math.max(0,i);return`${Math.floor(e/6e4)}:${String(Math.floor(e/1e3)%60).padStart(2,"0")}`}function Rs(i,e){if(!i||i.seats<=0)return"";if(e==="same_seat"){let t=i.perPerformance??i.seats;return i.totalPerformances&&i.performances<i.totalPerformances?(0,je.tCount)("picker.group.performancesChosenOf",t,{chosen:i.performances,total:i.totalPerformances}):(0,je.tCount)("picker.group.seatsEveryPerformance",t)}return i.perPerformance!=null&&i.performancesChosen===i.performances?(0,je.tCount)("picker.group.seatsPerPerformance",i.seats,{per:i.perPerformance}):(0,je.tCount)("picker.group.performancesChosenOf",i.seats,{chosen:i.performancesChosen,total:i.performances})}function Is(i,e){i.querySelectorAll(".sl-pg-night-row[data-event-key]").forEach(t=>{let n=()=>e(t.dataset.eventKey);t.addEventListener("click",n),t.addEventListener("keydown",o=>{o.key!=="Enter"&&o.key!==" "||(o.preventDefault(),n())})})}var Os=require("@seatlayer/core");function Ge(i){return String(i??"\u2014").replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[e])}function Hd(i,e){let t=i.objectType==="table"&&!!i.bookingMode,n=i.objectType==="booth",o=t||n||!i.seatNumber,r=o?i.rowLabel??i.displayLabel??i.label:i.seatNumber,s=t?`${g("picker.guests","Guests")} ${i.bookingMode==="variable"?`${i.minOccupancy}\u2013${i.maxOccupancy}`:i.capacity}`:!n&&i.rowLabel?`${e} ${X(i)??""}`.trim():"";return`<div class="sl-tip-head"><div class="sl-tip-id"><span class="sl-tip-seat${o?" name":""}">${Ge(r)}</span>`+(s?`<span class="sl-tip-row">${Ge(s)}</span>`:"")+"</div>"+(i.sectionLabel?`<div class="sl-tip-sec"><span class="sl-tip-eyebrow">${g("picker.section","Section")}</span><span class="sl-tip-secname">${Ge(i.sectionLabel)}</span></div>`:"")+"</div>"}function _s(i,e){let t=i.status==="not_for_sale",n=i.mark?.kind==="partial",o=i.status==="free"||n?"":`<span class="sl-tip-tag">${t?g("picker.notAvailable","Not available"):i.status==="held"?(0,Os.t)("map.statusHeld"):g("picker.sold","Sold")}</span>`,r=t?"":e.price,s=r?`<span class="sl-tip-amt">${Ge(r)}</span>`:"",a=!r&&e.priceNote?`<div class="sl-tip-note">${Ge(e.priceNote)}</div>`:"",l=Je(i,{compact:!0}),c=e.reason?`<div class="sl-tip-reason">${Ge(e.reason)}</div>`:"";return'<i class="sl-tip-rail" aria-hidden="true"></i>'+Hd(i,e.rowTypeWord)+`<div class="sl-tip-cat"><span class="sl-tip-dot" style="background:${Ge(i.categoryColor)}"></span><span class="sl-tip-name">${Ge(i.categoryLabel)}</span>`+o+s+"</div>"+a+c+l+(e.extra??"")}function Ns(i,e,t,n){let o=i.x+14,r=i.y-n.height-12,s=i.y+18,a=r;o+n.width>e-8&&(o=i.x-n.width-14),r<8&&s+n.height<=t-8&&(a=s);let l=Math.max(8,t-n.height-8);return{left:Math.max(8,Math.min(o,Math.max(8,e-n.width-8))),top:Math.max(8,Math.min(a,l))}}function Ds(i,e,t,n=22){let o=Math.max(8,Math.min(i.x-t.width/2,Math.max(8,e.width-t.width-8))),r=i.y-n-t.height,s=i.y+n;return r>=8?{left:o,top:r,placement:"above"}:s+t.height<=e.height-8?{left:o,top:s,placement:"below"}:{left:o,top:Math.max(8,Math.min(r<8?s:r,Math.max(8,e.height-t.height-8))),placement:r<8?"below":"above"}}var to=14,Rd=12,Id=12,Od=8;function Bs(i,e,t,n=Rd){let o=e.height-to-t.height,r=Id,s=o-n;if(s<=r)return{placement:"sheet",nudgeY:0};let a=(r+s)/2-i;return Math.abs(a)<=Od?{placement:"sheet",nudgeY:0}:{placement:"sheet",nudgeY:Math.round(a)}}function Fs(i,e,t,n,o=0){let r=t.width/2+12,s=Math.max(r,Math.min(e.width-r,i.x)),a=i.y+o+t.height+24<=e.height,l=i.y-o<t.height+24&&a?"below":"above",c=l==="above"?i.y-o:i.y+o,d=n&&l==="above"?Math.max(t.height+24,c):c;return{left:s,top:Math.max(8,Math.min(e.height-8,d)),placement:l}}function Vs(i,e,t){let n=i.querySelector("[data-pg-select-partial]"),o=[...i.querySelectorAll("[data-pg-event-key]")],r=()=>o.filter(a=>a.checked).map(a=>a.dataset.pgEventKey).filter(Boolean),s=()=>{if(!n)return;let a=r().length;n.disabled=a===0,n.textContent=e?.(a)??n.textContent};o.forEach(a=>{a.addEventListener("change",s);let l=a.closest(".sl-night");l?.classList.add("selectable"),l?.addEventListener("click",c=>{c.target!==a&&(a.checked=!a.checked,s())})}),n?.addEventListener("click",()=>{let a=r();a.length&&t?.(a)})}function nt(i){let e=i?.displayType?.trim()||i?.rowType?.trim();return e||(i?.objectType==="table"?g("picker.table","Table"):i?.objectType==="booth"?g("picker.booth","Booth"):g("picker.row","Row"))}var _d="sl-confirm-scrim",Nd="--sl-scrim-mask";function Dd(i){let e=Math.round(i.x),t=Math.round(i.y);return`radial-gradient(circle at ${e}px ${t}px, transparent 0 56px, #000 88px)`}function $s(i,e,t,n){let o=i??document.createElement("div");return i||(o.className=_d),o.style.setProperty(Nd,Dd(n)),t.parentNode===e?o.nextSibling!==t&&e.insertBefore(o,t):o.parentNode!==e&&e.appendChild(o),o}function io(i){return i?.remove(),null}var Bd=360,Fd=160,Vd=700,zs=450;function js(){try{return globalThis.matchMedia?.("(pointer: coarse)").matches??!1}catch{return!1}}function $d(i){return(0,Gs.contrastRatio)("#ffffff",i)>=3?"#ffffff":"#0b0f19"}var dn=class{constructor(e){this.el=null;this.seat=null;this.outsideTap=null;this.scrim=null;this.shownAt=0;this.lift=null;this.framing=null;this.mode="add";this.host=e}get element(){return this.el}set element(e){this.el=e}get candidate(){return this.seat}set candidate(e){this.seat=e}thumbHtml(e){let t=this.host.controller.doc;if(!t)return"";let n=Ot(e)?e.viewUrl??"":"",o=Qi(t);if(!n&&!o)return"";let r=n?null:Ji(e,e.focalPoint??t.focalPoint);if(!n&&r==null)return"";let s=o&&r!=null?`<div class="sl-confirm-sight">${B((0,ot.t)("picker.sightline",{m:r}))}</div>`:"";if(!n)return s;let a=B((0,ot.t)("picker.viewFromSeat",{label:e.label})),l=B(this.host.tf("picker.viewFromHere","View from here"));return`<button type="button" class="sl-confirm-view sl-confirm-thumbwrap" aria-label="${a}"><img class="sl-confirm-thumb" alt="" /><span class="sl-confirm-thumb-badge">\u{1F52D} ${l}</span></button>`+s}show(e,t="add"){let n=this.host;this.mode=t;let o=this.seat?.id;this.el?.remove(),this.el=null,this.seat=e,n.root()?.setAttribute("data-confirming","true"),n.els().side?.toggleAttribute("inert",!0),Object.values(n.regions()).forEach(M=>M.toggleAttribute("inert",!0)),n.controller.setSelectionFocus(e.id),o&&o!==e.id&&n.controller.deselect([o]),n.hideTooltip();let r=n.controller.seatDetails(e.id),s=n.controller.doc?.categories.find(M=>M.key===e.categoryKey),a=r?.price??(s?.tiers?.length?s.tiers[0].price:s?.price),l=a!=null?n.paidPrice(e.categoryKey,r?.tierId??s?.tiers?.[0]?.id??null,a,e.label):void 0,c=er(r,e.displayLabel??e.label,nt(r)),d=r?.tiers??s?.tiers??[],p=r?.tierId??d[0]?.id,u=n.suppressPricing()?"":or(d,p,M=>n.money(n.paidPrice(e.categoryKey,M.id,M.price,e.label))),h=n.buyerView()==="venue3d",f=n.performanceGroup()?.confirmDateSelection??void 0,b=f?n.performanceGroup()?.nights?.()??[]:[],k=f?Ts(b,f,e.id,(M,A)=>n.tf(M,A)):"";this.shownAt=performance.now();let S=document.createElement("div");S.className="sl-confirm sl-mo-in",t==="remove"&&S.classList.add("sl-confirm-removing"),k&&S.classList.add("sl-confirm-group-dates"),S.setAttribute("role","dialog"),S.setAttribute("aria-label",(0,ot.t)("picker.confirmSeatLabel",{label:e.label}));let v=n.controller.getRenderer?.()?.categoryDisplayColor?.(e.categoryKey)??s?.color??"#6e7bff";S.style.setProperty("--sl-cat",v),S.style.setProperty("--sl-cat-ink",$d(v));let P=String(r?.categoryLabel??s?.label??e.categoryKey),y=n.controller.categoryAvailability()[e.categoryKey],H=typeof y=="number"&&y>0?(0,ot.tCount)("picker.leftCount",y):"";S.innerHTML=lr({identityFields:c,identity:tr(r,e.displayLabel??e.label,nt(r)),marker:Xo({...r?.wheelchairSpaceType?{wheelchairSpaceType:r.wheelchairSpaceType}:{}}),see3dPill:ir(n.canOffer3d(),h),categoryColor:v,categoryLabel:P,priceLabel:!n.suppressPricing()&&l!=null?n.money(l):"",categoryLeftLabel:H,tierChoices:u,groupDates:k,wheelchair:"",commercial:Je({...e.accessibility?.length?{accessibility:e.accessibility}:{},...r?.wheelchairSpaceType?{wheelchairSpaceType:r.wheelchairSpaceType}:{},...e.commercial?{commercial:e.commercial}:{}}),thumb:n.seatViewEnabled()&&n.buyerView()!=="venue3d"?this.thumbHtml(e):"",inspect:h?`<div class="sl-confirm-inspect-row">${Jo(e,n.suppressPricing()?`${r?.displayLabel??e.displayLabel??e.label}`:`${r?.displayLabel??e.displayLabel??e.label} \xB7 ${l==null?n.tf("picker.priceNotSupplied","Price not supplied"):n.money(l)}`,h)}${Qo(e,h?n.view3dCompareSeatIds():null)}${In(n.canOffer3d(),h)}</div>`:In(n.canOffer3d(),h),see3dRow:nr(n.canOffer3d(),h),cancelLabel:(0,ot.t)("common.cancel"),selectLabel:t==="remove"?n.tf("picker.removeSeat","Remove seat"):n.addSeatLabel(r?.objectType)}),t==="remove"&&S.querySelector(".sl-confirm-add svg path")?.setAttribute("d","M6 6l12 12M18 6L6 18"),n.els().map.appendChild(S),this.el=S;let C=S.querySelector(".sl-confirm-thumb"),N=C?.closest(".sl-confirm-thumbwrap")??null;if(C&&N){let M=!1,A=()=>{if(M||!N.isConnected)return;M=!0;let D=()=>{N.remove(),this.el===S&&n.reanchor()};if(n.reducedMotion()||typeof requestAnimationFrame!="function"){D();return}N.style.height=`${N.offsetHeight}px`,N.classList.add("sl-confirm-thumb-out"),requestAnimationFrame(()=>{N.style.height="0px",N.style.opacity="0"}),setTimeout(D,Fd)};C.addEventListener("error",A),C.addEventListener("load",()=>{C.naturalWidth||A()});let _=e.viewMeta?.previewUrl??e.viewUrl;_?n.resolveAssetUrl(_).then(D=>{if(!(!S.isConnected||this.el!==S)){if(!D){A();return}C.src=D}}).catch(D=>{A(),n.onError(D)}):A()}n.reanchor(),this.liftSeatClearOfSheet(e),S.querySelector(".sl-confirm-view")?.addEventListener("click",()=>{n.openSeatView(e)}),S.querySelector(".sl-confirm-confidence")?.addEventListener("click",M=>{n.openSeatConfidencePassport(e,M.currentTarget instanceof HTMLElement?M.currentTarget:null)}),S.querySelector(".sl-confirm-compare")?.addEventListener("click",()=>n.saveView3dComparisonSeat(e)),S.querySelectorAll("[data-confirm-tier]").forEach(M=>{M.addEventListener("click",()=>{let A=M.dataset.confirmTier,_=d.find(V=>V.id===A);if(!_)return;n.controller.setSeatTier(e.id,_.id),S.querySelectorAll("[data-confirm-tier]").forEach(V=>{V.setAttribute("aria-pressed",String(V===M))});let D=S.querySelector(".sl-confirm-price");D&&(D.textContent=n.money(n.paidPrice(e.categoryKey,_.id,_.price,e.label))),n.reanchor()})}),S.querySelectorAll(".sl-confirm-3d,.sl-confirm-3dpill,.sl-confirm-3drow").forEach(M=>{M.addEventListener("pointerdown",Ti,{once:!0}),M.addEventListener("click",()=>{n.buyerView()==="venue3d"?(n.dismiss(),n.view3dHandle()?.flyToSeat(e.id)):(n.rememberView3dReturnSeat(e),n.dismiss(),n.enter3d(e.id))})}),Cs(S,f,(M,A)=>n.tf(M,A),()=>n.reanchor()),S.querySelector(".sl-confirm-add").addEventListener("click",()=>{if(!this.ghostActivation()){if(this.mode==="remove"){this.removeCommitted();return}this.commit()}}),S.querySelector(".sl-confirm-cancel").addEventListener("click",()=>{this.ghostActivation()||this.cancel()}),this.armOutsideTap(S),requestAnimationFrame(()=>{let M=S.querySelector(".sl-confirm-add");M?.focus(),n.liftToastOverConfirm(),n.fitTranslatedRows(),n.inviteCommit(S,M)})}liftSeatClearOfSheet(e){let t=this.host.controller.getRenderer();this.framing={gestures:t?.getCameraGestureCount?.()??0,quietUntil:0},this.frameSeatForSheet(e)}frameSeatForSheet(e){let t=this.host,n=t.root();if(!this.el||n?.dataset.layout!=="narrow"||n?.dataset.view3d==="on")return;let o=t.els().map;if(!o)return;let r=t.controller.worldToScreen({x:e.x,y:e.y}),s=t.controller.getRenderer(),a=s?.getCameraGestureCount?.()??0,{nudgeY:l}=Bs(r.y,{height:o.clientHeight},{height:this.el.offsetHeight||230}),c=this.lift&&this.lift.gestures===a?this.lift.dy:0;if(!l){this.lift=c?{dy:c,gestures:a}:null;return}let d=!t.reducedMotion();s?.panScreenBy?.({x:0,y:l},{animate:d}),this.lift={dy:c+l,gestures:a},this.framing&&(this.framing.gestures=a,this.framing.quietUntil=d?this.now()+Vd:0)}reframeSeatForSheet(){let e=this.framing,t=this.seat;!e||!t||e.quietUntil&&this.now()<e.quietUntil||(this.host.controller.getRenderer()?.getCameraGestureCount?.()??e.gestures)!==e.gestures||this.frameSeatForSheet(t)}now(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}settleLift(){let e=this.lift;if(this.lift=null,this.framing=null,!e)return;let t=this.host.controller.getRenderer();(t?.getCameraGestureCount?.()??e.gestures)===e.gestures&&t?.panScreenBy?.({x:0,y:-e.dy},{animate:!this.host.reducedMotion()})}reanchor(){let e=this.host;if(!this.el||!this.seat||e.root()?.dataset.view3d==="on")return;let t=e.controller.worldToScreen({x:this.seat.x,y:this.seat.y}),n=e.els().map;if(e.root()?.dataset.layout==="narrow"){this.el.removeAttribute("data-placement"),this.el.style.removeProperty("bottom"),this.scrim=$s(this.scrim,n,this.el,t),Tr(this.el,t,n),e.liftToastOverConfirm(),this.reframeSeatForSheet();return}this.scrim=io(this.scrim);let o=n.clientWidth,r=n.clientHeight,s=this.el.offsetWidth||276,a=this.el.offsetHeight||230,l=this.el.classList.contains("sl-confirm-group-dates"),c=e.controller.seatScreenRadius()*1.5,d=Fs(t,{width:o,height:r},{width:s,height:a},l,c);this.el.dataset.placement=d.placement,this.el.style.left=`${d.left}px`,this.el.style.top=`${d.top}px`,Bi(this.el,t,{left:d.left,top:d.top,width:s,height:a})}ghostActivation(){return js()?performance.now()-this.shownAt<zs:!1}armOutsideTap(e){this.disarmOutsideTap();let t=this.host,n=r=>{if(this.el!==e){this.disarmOutsideTap();return}let s=r.target;!s||e.contains(s)||t.els().tray?.contains(s)||this.cancel()};this.outsideTap=n;let o=t.root();setTimeout(()=>{this.outsideTap===n&&(o??document).addEventListener("pointerdown",n,!0)},js()?zs:0)}disarmOutsideTap(){if(!this.outsideTap)return;let e=this.outsideTap;this.outsideTap=null,(this.host.root()??document).removeEventListener("pointerdown",e,!0),document.removeEventListener("pointerdown",e,!0)}dismiss(){let e=this.host;this.disarmOutsideTap(),this.scrim=io(this.scrim),this.settleLift(),this.el&&Fi(this.el),this.el=null,this.seat=null,e.liftToastOverConfirm(),e.root()?.removeAttribute("data-confirming"),Object.values(e.regions()).forEach(t=>t.toggleAttribute("inert",!1)),e.applyPanelCollapsed(),e.controller.setSelectionFocus(null)}async commit(){let e=this.host,t=this.seat;if(!t)return;let o=this.el?.querySelector(".sl-confirm-add")??null;if(o?.classList.contains("is-adding")||!await As(this.el,t.id,e.performanceGroup()?.confirmDateSelection??void 0))return;e.collapseSectionCard(),this.seat=null,e.syncTray(),e.syncSelectionTo3d();let r=()=>{e.dismiss(),Un(e.els(),e.controller.worldToScreen(t),t,e.controller.doc?.categories)};if(!o||e.reducedMotion()){r();return}o.classList.remove("sl-confirm-add-invite"),o.classList.add("is-adding"),o.setAttribute("aria-disabled","true");let s=o.querySelector(".sl-confirm-add-t");s&&(s.textContent=e.tf("picker.added","Added")),e.scheduleMotion(r,Bd)}cancel(){let e=this.host,t=this.seat;t&&(this.mode!=="remove"&&e.controller.deselect([t.id]),this.seat&&e.dismiss(),e.syncSelectionTo3d(),e.root()?.focus({preventScroll:!0}))}removeCommitted(){let e=this.host,t=this.seat;t&&(e.controller.deselect([t.id]),e.dismiss(),e.syncTray(),e.syncSelectionTo3d(),e.root()?.focus({preventScroll:!0}))}};function Us(i,e,t){if(!e||t||i.classList.contains("sl-confirm-removing"))return;e.classList.add("sl-confirm-add-invite");let n=()=>e.classList.remove("sl-confirm-add-invite");i.addEventListener("pointerdown",n,{once:!0}),i.addEventListener("keydown",n,{once:!0}),e.addEventListener("focus",n,{once:!0})}function qs(i,e){return i&&i!=="seat"?e("picker.select","Select"):e("picker.addSeat","Add seat")}var Ks=require("@seatlayer/core"),_t=require("@seatlayer/core/picker/minimapGeometry");function zd(i,e){return i.x<=e.x&&i.y<=e.y&&i.x+i.width>=e.x+e.width&&i.y+i.height>=e.y+e.height}function Ws(i,e){let t=new no(i);return t.build(e),t}var no=class{constructor(e){this.host=e;this.miniCanvas=null;this.miniBase=null;this.miniWrap=null;this.miniToggle=null;this.miniLabel=null;this.miniTf=null;this.miniDrag=null;this.miniSuppressClick=!1;this.userClosed=!1}dispose(){this.miniToggle?.remove(),this.miniWrap?.remove(),this.miniToggle=null,this.miniWrap=null,this.miniCanvas=null,this.miniBase=null,this.miniLabel=null,this.miniTf=null,this.miniDrag=null,this.host.root()?.removeAttribute("data-minimap-open")}build(e){if(!this.host.controller.getViewport())return;let n=document.createElement("button");n.type="button",n.className="sl-minimap-toggle",n.setAttribute("aria-label",g("picker.openVenueMap","Open venue overview map")),n.setAttribute("aria-expanded","false"),n.innerHTML='<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 6l5-2 8 3 5-2v13l-5 2-8-3-5 2zM8 4v13M16 7v13"/></svg>',e.appendChild(n),this.miniToggle=n;let o=document.createElement("div");o.className="sl-minimap",o.setAttribute("role","group");let r=document.createElement("div");r.className="sl-minimap-bar";let s=document.createElement("span");s.className="sl-minimap-label";let a=document.createElement("span");a.className="sl-minimap-key",a.setAttribute("aria-label",g("picker.minimapStateKey","Focused, selected, available, and inactive sections")),a.innerHTML='<i class="focused" title="Focused"></i><i class="selected" title="Selected"></i><i title="Available"></i><i class="inactive" title="Inactive"></i>';let l=document.createElement("button");l.type="button",l.className="sl-minimap-close",l.setAttribute("aria-label",g("picker.closeVenueMap","Close venue overview map")),l.textContent="\xD7",r.append(s,a,l);let c=document.createElement("canvas");c.tabIndex=0,c.setAttribute("role","application"),c.setAttribute("aria-label",g("picker.venueMapInstructions","Venue overview map. Drag the viewport, click a section, or use arrow keys to pan.")),o.append(r,c),e.appendChild(o),this.miniWrap=o,this.miniLabel=s,this.miniCanvas=c;let d=document.createElement("canvas");this.miniBase=d,n.addEventListener("click",()=>{let p=this.host.root()?.dataset.minimapOpen==="true";this.userClosed=p,this.setMinimapOpen(!p)}),l.addEventListener("click",()=>{this.userClosed=!0,this.setMinimapOpen(!1)}),c.addEventListener("click",p=>{if(this.miniSuppressClick){this.miniSuppressClick=!1;return}this.minimapJump(p)}),c.addEventListener("pointerdown",p=>this.minimapPointerDown(p)),c.addEventListener("pointermove",p=>this.minimapPointerMove(p)),c.addEventListener("pointerup",p=>this.minimapPointerUp(p)),c.addEventListener("pointercancel",p=>this.minimapPointerUp(p)),c.addEventListener("keydown",p=>this.minimapKeydown(p)),this.layoutMinimap(),this.syncMinimapLabel(),this.drawMinimapStatic(),this.drawMinimapRect()}setAutoOpen(e){if(this.miniWrap){if(!e){this.userClosed=!1,this.host.root()?.dataset.minimapOpen==="true"&&this.setMinimapOpen(!1,!1);return}this.userClosed||this.host.root()?.dataset.minimapOpen==="true"||this.setMinimapOpen(!0,!1)}}setMinimapOpen(e,t=!0){this.host.root()?.setAttribute("data-minimap-open",String(e)),this.miniToggle?.setAttribute("aria-expanded",String(e)),t&&(e?this.miniCanvas?.focus():this.miniToggle?.focus())}layoutMinimap(){let e=this.miniCanvas,t=this.miniBase,n=this.host.controller.getViewport()?.bounds;if(!e||!t||!n||!(n.width>0&&n.height>0))return;let o=196,r=146,s=6,a=n.width/Math.max(1,n.height),l=o,c=Math.round(o/a);c>r&&(c=r,l=Math.round(r*a)),l=Math.max(64,l),c=Math.max(48,c);let d=Math.min(2,window.devicePixelRatio||1);e.width=Math.round(l*d),e.height=Math.round(c*d),e.style.width=`${l}px`,e.style.height=`${c}px`,t.width=e.width,t.height=e.height,this.miniTf=(0,_t.createMinimapTransform)(n,e.width,e.height,d,s)}syncMinimapLabel(){if(!this.miniLabel||!this.miniWrap)return;let e=this.host.controller.getFloors(),t=this.host.controller.isFloorOverview()?g("picker.allFloors","All floors"):e.find(d=>d.id===this.host.controller.getActiveFloorId())?.name??g("picker.venueOverview","Venue overview"),n=this.host.controller.getMinimapSnapshot().sections,r=n.find(d=>d.active)?.label??this.host.focusedSectionLabel(),s=r?`${t} \xB7 ${r}`:t;this.miniLabel.textContent=s;let a=n.filter(d=>d.state==="selected").length,l=n.filter(d=>d.state==="available").length,c=n.filter(d=>d.state==="inactive").length;this.miniWrap.setAttribute("aria-label",n.length?`${s}. ${a} selected, ${l} available, ${c} inactive sections.`:s),this.miniCanvas?.setAttribute("aria-label",n.length?`${s}. ${a} selected, ${l} available, ${c} inactive sections. ${g("picker.venueMapInstructions","The outlined region is the visible map area. Drag it, click a section, or use arrow keys to pan.")}`:`${s}. ${g("picker.venueMapInstructions","The outlined region is the visible map area. Drag it, click elsewhere, or use arrow keys to pan.")}`)}refreshMinimap(){this.miniBase&&(this.layoutMinimap(),this.syncMinimapLabel(),this.drawMinimapStatic(),this.drawMinimapRect())}drawMinimapStatic(){let e=this.miniBase,t=this.miniTf;if(!e||!t)return;let n=e.getContext("2d");if(!n)return;n.clearRect(0,0,e.width,e.height);let o=p=>p*t.scale+t.offX,r=p=>p*t.scale+t.offY,s=this.host.cssVar("--sl-line")||"rgba(139,147,167,.5)",a=this.host.cssVar("--sl-muted")||"#8b93a7",l=this.host.cssVar("--sl-accent")||"#6e7bff",c=this.host.cssVar("--sl-success")||"#22a06b",d=this.host.controller.getMinimapSnapshot();for(let p of d.sections){if(p.outline.length<3)continue;n.beginPath(),p.outline.forEach((h,f)=>f===0?n.moveTo(o(h.x),r(h.y)):n.lineTo(o(h.x),r(h.y))),n.closePath();let u=p.paint;if(n.globalAlpha=p.state==="inactive"?.5:.92,u?n.fillStyle=u.fill:(n.globalAlpha=p.state==="inactive"?.18:p.state==="selected"?.72:.34,n.fillStyle=p.state==="inactive"?a:p.state==="selected"?l:c),n.fill(),n.globalAlpha=.82,n.lineWidth=Math.max(1,t.dpr),n.strokeStyle=u?.stroke||s,n.stroke(),p.owned){n.globalAlpha=1,n.lineWidth=Math.max(2,t.dpr*1.5),n.strokeStyle=l,n.stroke();let h=p.outline.reduce((f,b)=>({x:f.x+b.x,y:f.y+b.y}),{x:0,y:0});n.beginPath(),n.arc(o(h.x/p.outline.length),r(h.y/p.outline.length),Math.max(1.5,t.dpr*1.6),0,Math.PI*2),n.fillStyle=l,n.fill(),n.beginPath(),p.outline.forEach((f,b)=>b===0?n.moveTo(o(f.x),r(f.y)):n.lineTo(o(f.x),r(f.y))),n.closePath()}p.active&&(n.globalAlpha=1,n.lineJoin="round",n.lineWidth=Math.max(4,t.dpr*3.5),n.strokeStyle=this.host.cssVar("--sl-surface")||"#fff",n.stroke(),n.lineWidth=Math.max(2,t.dpr*1.75),n.strokeStyle=l,n.stroke())}if(n.globalAlpha=1,!d.sections.length){let p=Math.max(1,t.dpr),u=this.host.controller.getRenderer?.(),h=new Map,f=b=>{let k=h.get(b);if(k)return k;let S=u?.categoryDisplayColor?.(b)||c;return h.set(b,S),S};for(let b of d.seats)n.globalAlpha=b.state==="inactive"?.22:.78,n.fillStyle=b.state==="inactive"?a:b.state==="selected"?l:f(b.categoryKey),n.beginPath(),n.arc(o(b.x),r(b.y),p,0,Math.PI*2),n.fill();n.globalAlpha=1}}drawMinimapRect(){let e=this.miniCanvas,t=this.miniBase,n=this.miniTf;if(!e||!t||!n)return;let o=e.getContext("2d");if(!o)return;o.clearRect(0,0,e.width,e.height),o.drawImage(t,0,0);let r=this.host.controller.getViewport();if(!r||zd(r.visible,r.bounds))return;let s=(0,_t.minimapViewportPlan)(r.visible,n,e.width,e.height,Math.max(2,n.dpr*2)),a=this.host.cssVar("--sl-text")||"#12151c",l=this.host.cssVar("--sl-surface")||"#fff";o.save(),o.globalAlpha=.1,o.fillStyle=a,o.fillRect(s.raw.x,s.raw.y,s.raw.width,s.raw.height),o.globalAlpha=.9,o.lineJoin="round",o.lineWidth=Math.max(4,n.dpr*3.25),o.strokeStyle=l,o.strokeRect(s.raw.x,s.raw.y,s.raw.width,s.raw.height),o.globalAlpha=1,o.lineWidth=Math.max(2,n.dpr*1.75),o.strokeStyle=a,o.strokeRect(s.raw.x,s.raw.y,s.raw.width,s.raw.height),s.clipped&&Object.values(s.clippedEdges).some(Boolean)&&(o.setLineDash([Math.max(3,n.dpr*3),Math.max(2,n.dpr*2)]),o.strokeRect(s.clipped.x,s.clipped.y,s.clipped.width,s.clipped.height)),o.restore()}minimapWorldPoint(e){let t=this.miniCanvas,n=this.miniTf;if(!t||!n)return null;let o=t.getBoundingClientRect(),r=(e.clientX-o.left)*(t.width/Math.max(1,o.width)),s=(e.clientY-o.top)*(t.height/Math.max(1,o.height));return{...(0,_t.minimapPointToWorld)({x:r,y:s},n),px:r,py:s}}minimapPointerDown(e){let t=this.minimapWorldPoint(e),n=this.host.controller.getViewport()?.visible;!t||!n||!(t.x>=n.x&&t.x<=n.x+n.width&&t.y>=n.y&&t.y<=n.y+n.height)||(this.miniDrag={pointerId:e.pointerId,offsetX:t.x-(n.x+n.width/2),offsetY:t.y-(n.y+n.height/2),startX:e.clientX,startY:e.clientY,moved:!1},this.miniCanvas?.setPointerCapture(e.pointerId),this.miniCanvas?.classList.add("sl-dragging"),e.preventDefault())}minimapPointerMove(e){let t=this.miniDrag;if(!t||t.pointerId!==e.pointerId)return;let n=this.minimapWorldPoint(e);n&&(!t.moved&&Math.hypot(e.clientX-t.startX,e.clientY-t.startY)>2&&(t.moved=!0,this.host.controller.clearSectionFocus()),this.host.controller.panToWorld({x:n.x-t.offsetX,y:n.y-t.offsetY}),e.preventDefault())}minimapPointerUp(e){let t=this.miniDrag;!t||t.pointerId!==e.pointerId||(this.miniSuppressClick=t.moved,this.miniDrag=null,this.miniCanvas?.classList.remove("sl-dragging"),this.miniCanvas?.hasPointerCapture(e.pointerId)&&this.miniCanvas.releasePointerCapture(e.pointerId))}minimapKeydown(e){let t=this.host.controller.getViewport()?.visible;if(!t)return;if(e.key==="Home"){this.host.controller.overview(),e.preventDefault();return}let n=e.key==="ArrowLeft"?-t.width*.2:e.key==="ArrowRight"?t.width*.2:0,o=e.key==="ArrowUp"?-t.height*.2:e.key==="ArrowDown"?t.height*.2:0;!n&&!o||(this.host.controller.clearSectionFocus(),this.host.controller.panToWorld({x:t.x+t.width/2+n,y:t.y+t.height/2+o}),e.preventDefault())}minimapJump(e){let t=this.minimapWorldPoint(e);if(t){for(let n of this.host.controller.getMinimapSnapshot().sections)if(!(n.state==="inactive"||n.outline.length<3)&&(0,Ks.pointInPolygon)(t,n.outline)){this.host.controller.focusSection(n.id);return}this.host.controller.clearSectionFocus(),this.host.controller.panToWorld(t)}}};var pn=require("@seatlayer/core");var jd=12;function Ys(i,e){let t=e.floors(),n=new Set(t.map(C=>C.label.trim().toLocaleLowerCase())),o=e.zones().filter(C=>C.seatCount>0&&!n.has(C.label.trim().toLocaleLowerCase())),r=e.sections().filter(C=>C.seatCount>0&&!n.has(C.label.trim().toLocaleLowerCase())),s=o.length>1?[]:r,a=t.length>1,l=o.length>1,c=s.length>1;if(!a&&!l&&!c)return null;let d=document.createElement("div");d.className="sl-view3d-nav";let p=null,u=document.createElement("button");u.type="button",u.className="sl-view3d-nav-toggle",u.setAttribute("aria-expanded","false");let h='<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M15.5 8.5l-2 5-5 2 2-5z"/></svg>',f=document.createElement("span");u.innerHTML=h,u.appendChild(f);let b=()=>{for(let C of d.querySelectorAll(":scope > div")){let N=C.querySelector('[aria-pressed="true"]');!N||C.scrollWidth<=C.clientWidth||N.scrollIntoView({block:"nearest",inline:"nearest"})}},k=()=>{if(p)return p;for(let C of d.querySelectorAll(":scope > div")){let N=C.querySelector('button[aria-pressed="true"]'),M=N?.textContent?.trim();if(M&&N?.dataset.floor!=="")return M}return a&&(l||c)?g("picker.levelsAndAreas","Levels & areas"):a?g("picker.levels","Levels"):g("picker.areas","Areas")},S=C=>{d.classList.toggle("is-open",C),u.setAttribute("aria-expanded",String(C)),C&&typeof requestAnimationFrame=="function"&&requestAnimationFrame(b),f.textContent=k()};u.addEventListener("click",()=>S(!d.classList.contains("is-open"))),d.addEventListener("keydown",C=>{C.key!=="Escape"||!d.classList.contains("is-open")||(C.preventDefault(),C.stopPropagation(),S(!1),u.focus())});let v=document.createElement("button");v.type="button",v.className="sl-view3d-nav-close",v.innerHTML='<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M18 6L6 18M6 6l12 12"/></svg>';let P=g("picker.closeVenueNavigation","Close venue navigation");v.setAttribute("aria-label",P),v.title=P,v.addEventListener("click",()=>{S(!1),u.focus()}),S(!1),d.appendChild(u);let y=C=>{},H=C=>{};if(a){let C=document.createElement("div");C.setAttribute("role","group"),C.setAttribute("aria-label",g("picker.levels","Levels"));let N=[];H=_=>{N.forEach(D=>{D.setAttribute("aria-pressed",String((D.dataset.floor===""?null:Number(D.dataset.floor))===_))})};let M=_=>{e.focusFloor(_)&&(H(_),y(_))},A=(_,D)=>{let V=document.createElement("button");V.type="button",V.textContent=_,V.dataset.floor=D===null?"":String(D),V.setAttribute("aria-pressed",String(D===null)),V.addEventListener("click",()=>{M(D),S(!1)}),N.push(V),C.appendChild(V)};A(g("picker.allLevels","All levels"),null);for(let _ of t)A(_.label||(0,pn.t)("picker.levelNumber",{number:_.index+1}),_.index);d.appendChild(C)}if(l||c){let C=document.createElement("div");C.setAttribute("role","group"),C.setAttribute("aria-label",g("picker.areas","Areas"));let N=l?o.map(A=>({id:A.id,label:A.label||A.id,go:()=>{e.focusZone(A.id)}})):s.map(A=>({id:A.id,label:A.label||A.id,floorIndex:A.floorIndex,go:()=>{e.focusSection(A.id),Number.isFinite(A.floorIndex)&&H(A.floorIndex)}})),M=A=>{let _=l||A===null?N:N.filter(D=>D.floorIndex===void 0||D.floorIndex===A);if(C.replaceChildren(),!_.length){C.remove();return}if(C.isConnected||d.insertBefore(C,v.isConnected?v:null),!l&&_.length>jd){let D=document.createElement("select");D.setAttribute("aria-label",g("picker.jumpToSection","Jump to section"));let V=document.createElement("option");V.value="",V.textContent=g("picker.jumpToSection","Jump to section"),D.appendChild(V);for(let ne of _){let ee=document.createElement("option");ee.value=ne.id,ee.textContent=ne.label,D.appendChild(ee)}D.addEventListener("change",()=>{_.find(ne=>ne.id===D.value)?.go()}),C.appendChild(D);return}for(let D of _){let V=document.createElement("button");V.type="button",V.textContent=D.label,V.dataset.area=D.id,V.addEventListener("click",()=>{p=D.label,D.go(),S(!1)}),C.appendChild(V)}};y=M,M(null)}return d.appendChild(v),i.appendChild(d),d}var hn=class{constructor(e){this.host=e;this.chip=null}sync(){let e=this.host.overlay();if(!e||this.host.savedSeatIds().length===0){this.chip?.remove(),this.chip=null;return}let t=this.chip;if(!t){t=document.createElement("div"),t.className="sl-view3d-compare-saved",t.setAttribute("role","group"),t.setAttribute("aria-label",g("picker.savedSeatComparison","Saved seat comparison"));let r=document.createElement("button");r.type="button",r.className="main",r.addEventListener("click",()=>{this.host.savedSeatIds().length>1?this.host.openComparison():this.host.toast(g("picker.chooseAnotherToCompare","Choose another seat to compare."),"neutral")});let s=document.createElement("button");s.type="button",s.className="clear",s.textContent="\xD7",s.setAttribute("aria-label",g("picker.clearSavedSeatComparison","Clear saved seat comparison")),s.addEventListener("click",()=>this.host.clearComparison()),t.append(r,s),e.appendChild(t),this.chip=t}let n=this.host.savedSeatIds().length,o=t.querySelector(".main");o&&(o.textContent=n>1?(0,pn.t)("picker.compareCount",{count:n}):g("picker.oneSeatSaved","1 seat saved"),o.setAttribute("aria-label",n>1?(0,pn.t)("picker.openComparisonOfSeats",{count:n}):g("picker.oneSeatSavedChooseAnother","One seat saved; choose another to compare")))}remove(){this.chip?.remove(),this.chip=null}mainButton(){return this.chip?.querySelector(".main")??null}};function Xs(i){return!i?.querySelector('[data-ref="zfs"]')}var Zs="sl:sheet-hint";function Qs(i){let e=i.boot;if(!e?.isConnected)return;if(i.reducedMotion){e.remove();return}e.classList.add("is-going"),setTimeout(()=>e.remove(),200);let t=document.createElement("div");t.className="sl-shells-in",t.setAttribute("aria-hidden","true"),i.map?.appendChild(t),setTimeout(()=>t.remove(),650),i.rail?.classList.add("is-in"),i.root?.classList.add("is-arriving"),setTimeout(()=>{i.rail?.classList.remove("is-in"),i.root?.classList.remove("is-arriving"),Gd(i.root)},900)}function Gd(i){if(!i||i.dataset.layout!=="narrow")return;try{if(window.sessionStorage.getItem(Zs))return;window.sessionStorage.setItem(Zs,"1")}catch{}let e=i.querySelector(".sl-sheet-toggle");e&&(e.classList.add("sl-mo-hint"),e.addEventListener("animationend",()=>e.classList.remove("sl-mo-hint"),{once:!0}))}function Js(i,e){i.addEventListener("keydown",t=>{if(t.key==="Escape"){for(let n of e())if(n.open()){t.preventDefault(),t.stopPropagation(),n.close();return}}})}function un(i){let e=i.committedSelection(),t=i.controller.getGAAreas(),n=i.hold?.items??[],o=new Set(n.map(u=>u.label)),r=Hr(i,t,n),s=Ve(i.gaQty,n),a=n.reduce((u,h)=>u+i.paidPrice(h.categoryKey,h.tierId,h.unitPrice,h.label)*(h.quantity??1),0),l=n.reduce((u,h)=>u+(h.quantity??1),0),c=e.filter(u=>!o.has(u.label)),d=c.reduce((u,h)=>u+i.paidPrice(h.categoryKey,h.tierId??null,h.price,h.label)*(h.quantity??1),0)+r+a,p=c.reduce((u,h)=>u+(h.quantity??1),0)+s+l;return{seats:e,freshSeats:c,gaAreas:t,heldItems:n,heldLabels:o,heldCount:l,total:d,count:p}}function mn(i,e){let t=e.tiers?.length?e.tiers[0].price:e.price;return t===void 0||!e.key?t:i.paidPrice(e.key,e.tiers?.[0]?.id??null,t)}function fn(i,e){let t=e.tiers?.length?e.tiers.map(n=>i.paidPrice(e.key,n.id??null,n.price)):e.price==null?[]:[i.paidPrice(e.key,null,e.price)];if(e.key)for(let n of i.pricesByChannel.values())for(let o of n)o.categoryKey===e.key&&t.push(o.price);return t.length?{min:Math.min(...t),max:Math.max(...t)}:void 0}var ai="seatlayer_";function Ud(){let i=globalThis;return i.document?.modelContext??i.navigator?.modelContext??null}function ge(i,e){return e?{ok:!1,reason:i,message:e}:{ok:!1,reason:i}}function qd(i){return Array.isArray(i)?i.filter(e=>typeof e=="string"&&!!e):[]}function Kd(i,e){let t=i.event();if(!t)return ge("not_loaded","The seat map has not finished loading.");let n=i.selectionLimits();return{ok:!0,event:t,selection:{max:n.max,...n.required!=null?{required:n.required}:{}},categories:i.categories(),zones:i.zones(),hasPremiumSeats:i.hasPremiumSeats(),holdsAllowed:e}}function ea(i,e){let t=o=>!!o&&o.toLowerCase()===e.toLowerCase(),n=i.find(o=>t(o.key??o.id))??i.find(o=>t(o.label));return n?.key??n?.id??null}function ta(i,e){let t=e.map(n=>i.describeSeat(n.id));return{seatIds:e.map(n=>n.id),labels:e.map(n=>n.label),section:t[0]?.section??"",row:t[0]?.row??"",seats:e.map((n,o)=>t[o]?.seat||n.label),category:t[0]?.category??e[0].categoryKey,unitPrice:e[0].price,total:e.reduce((n,o)=>n+o.price,0)}}function Wd(i,e,t){let n=new Map;for(let r of e){let s=n.get(r.rowKey);s?s.push(r):n.set(r.rowKey,[r])}let o=[];for(let r of n.values()){let s=[...r].sort((l,c)=>l.index-c.index),a=0;for(let l=1;l<=s.length;l++)if(l===s.length||s[l].index!==s[l-1].index+1||s[l].categoryKey!==s[l-1].categoryKey){for(let d=a;d+t<=l;d+=t)o.push(ta(i,s.slice(d,d+t)));a=l}}return o}function Yd(i,e,t){let n=new Map;for(let r of e){let s=n.get(r.sectionKey);s?s.push(r):n.set(r.sectionKey,[r])}let o=[];for(let r of n.values()){if(r.length<t)continue;let s=[...r].sort((a,l)=>a.price!==l.price?l.price-a.price:a.rowKey.localeCompare(l.rowKey)||a.index-l.index);o.push(ta(i,s.slice(0,t)))}return o}function Xd(i,e){if(!i.event())return ge("not_loaded","The seat map has not finished loading.");let n=i.selectionLimits(),o=Math.floor(Number(e.count));if(!Number.isInteger(o)||o<1||o>n.max)return ge("bad_count",`count must be a whole number between 1 and ${n.max}.`);let r=Number.isInteger(Number(e.limit))?Math.max(1,Math.min(20,Number(e.limit))):5,s=e.together===void 0?!0:!!e.together,a=typeof e.max_price=="number"&&Number.isFinite(e.max_price)?e.max_price:null,l=typeof e.category=="string"&&e.category?e.category:null,c=typeof e.zone=="string"&&e.zone?e.zone:null,d=l?ea(i.categories(),l):null;if(l&&!d)return ge("no_match",`No ticket type called "${l}".`);let p=c?ea(i.zones(),c):null;if(c&&!p)return ge("no_match",`No zone called "${c}".`);let u=i.seats().filter(b=>b.available);if(!u.length)return ge("sold_out");let h=u.filter(b=>(!d||b.categoryKey===d)&&(!p||b.zoneId===p)&&(a==null||b.price<=a));if(!h.length)return ge("no_match");let f=s?Wd(i,h,o):Yd(i,h,o);return f.length?(f.sort((b,k)=>k.unitPrice!==b.unitPrice?k.unitPrice-b.unitPrice:b.row.localeCompare(k.row)||b.labels[0].localeCompare(k.labels[0])),{ok:!0,groups:f.slice(0,r),searched:{count:o,filters:{...a!=null?{max_price:a}:{},...d?{category:d}:{},...p?{zone:p}:{},together:s}}}):ge(s?"not_enough_together":"no_match")}function ia(i){return{ok:!0,...i.selection()}}function Zd(i,e){let t=i.event();if(!t)return ge("not_loaded","The seat map has not finished loading.");if(t.salesClosed)return ge("event_closed","Sales are closed for this event.");let n=qd(e.seat_ids);return n.length?(i.clearSelection(),i.selectObjects(n),ia(i)):ge("nothing_requested","Pass one or more seat ids or labels in seat_ids.")}function Qd(i,e){let t=async o=>{try{return await o()}catch(r){return ge("error",r instanceof Error?r.message:String(r))}},n=[{name:`${ai}describe_event`,title:"Describe this seated event",description:"Read the event, its ticket types with live availability and prices, its zones, and how many seats this buyer may select. Call this first.",inputSchema:{type:"object",properties:{},additionalProperties:!1},annotations:{readOnlyHint:!0,untrustedContentHint:!0},execute:()=>t(()=>Kd(i,e))},{name:`${ai}find_seats`,title:"Find available seats",description:"Search the seat map for groups of available seats. Read-only: it never selects, holds or reserves anything. Returns candidate groups with their seat ids, prices and location.",inputSchema:{type:"object",properties:{count:{type:"integer",minimum:1,description:"How many seats are needed."},max_price:{type:"number",description:"Highest acceptable price per seat."},category:{type:"string",description:"Ticket type key or label to restrict the search to."},zone:{type:"string",description:"Zone id or label to restrict the search to."},together:{type:"boolean",description:"Require the seats to be side by side in one row (default true)."},limit:{type:"integer",minimum:1,maximum:20,description:"How many candidate groups to return (default 5)."}},required:["count"],additionalProperties:!1},annotations:{readOnlyHint:!0,untrustedContentHint:!0},execute:o=>t(()=>Xd(i,o))},{name:`${ai}select_seats`,title:"Select seats on the map",description:"Replace the current selection with the given seats, exactly as tapping them would. The buyer sees the seats light up and the basket update. No reservation is made.",inputSchema:{type:"object",properties:{seat_ids:{type:"array",items:{type:"string"},description:"Seat ids or labels, e.g. from find_seats."}},required:["seat_ids"],additionalProperties:!1},annotations:{readOnlyHint:!1,untrustedContentHint:!0},execute:o=>t(()=>Zd(i,o))},{name:`${ai}get_selection`,title:"Read the current selection",description:"Read the seats currently selected in the basket, their total, any open reservation, and whether the selection satisfies this event\u2019s rules.",inputSchema:{type:"object",properties:{},additionalProperties:!1},annotations:{readOnlyHint:!0,untrustedContentHint:!0},execute:()=>t(()=>ia(i))}];return e&&n.push({name:`${ai}hold_selection`,title:"Reserve the selected seats",description:"Reserve the currently selected seats for this buyer for a limited time, exactly as pressing the checkout button would. Confirm with the buyer before calling this.",inputSchema:{type:"object",properties:{},additionalProperties:!1},annotations:{readOnlyHint:!1,untrustedContentHint:!0},execute:()=>t(()=>i.hold())}),n}async function na(i,e={}){let t=Ud();if(!t||typeof t.registerTool!="function")return null;let n=new AbortController,o=Qd(i,!!e.holds),r=[],s=e.exposedTo?.length?[...new Set(e.exposedTo)]:void 0;try{for(let a of o)await t.registerTool(a,{signal:n.signal,...s?{exposedTo:s}:{}}),r.push(a.name)}catch(a){console.warn("seatmap: WebMCP tools could not be registered",a)}return r.length?{names:r,dispose:()=>{if(n.abort(),typeof t.unregisterTool=="function")for(let a of r)try{t.unregisterTool(a)}catch{}}}:null}async function oa(i){let e=i.opts.webMcp;if(!e||i.destroyed)return;let t=typeof e=="object"&&!!e.holds,n=typeof e=="object"?e.exposedTo:void 0;try{i.webMcp=await na(ro(i,t),{holds:t,exposedTo:n}),i.destroyed&&oo(i)}catch(o){console.warn("seatmap: WebMCP registration failed",o)}}function oo(i){i.webMcp?.dispose(),i.webMcp=null}function ro(i,e){let t=(n,o)=>{if(Number.isInteger(n.logicalSeatIndex))return n.logicalSeatIndex;let r=n.id.lastIndexOf(":"),s=r<0?NaN:Number(n.id.slice(r+1));return Number.isFinite(s)?s:o};return{event:()=>{let n=i.renderInfo;return n?{name:n.eventName??"",venue:n.venue??null,startsAt:n.startsAt??null,timezone:n.timezone??null,currency:i.currency,salesClosed:i.salesClosed}:null},selectionLimits:()=>({max:i.maxTickets,required:i.exactTickets}),categories:()=>{let n=i.controller.categoryAvailability();return(i.controller.doc?.categories??[]).filter(o=>!o.notForSale).map(o=>{let r=fn(i,o),s=mn(i,o);return{key:o.key,label:o.label??o.key,...s===void 0?{}:{price:s},...r&&r.min!==r.max?{priceRange:r}:{},available:n[o.key]??0}})},zones:()=>i.controller.getBestAvailableZones(),hasPremiumSeats:()=>i.controller.hasPremiumSeats(),seats:()=>{let n=i.controller.getActiveFloorId(),o=[];return i.allSeats().forEach((r,s)=>{if(r.floorId&&n&&r.floorId!==n)return;let a=i.controller.getStatus(r.id)??"free",l=i.controller.doc?.categories.find(d=>d.key===r.categoryKey),c=l?.tiers?.length?l.tiers[0].price:l?.price??0;o.push({id:r.id,label:r.label,rowKey:r.logicalRowId??r.rowId,sectionKey:r.sectionId??r.rowId,index:t(r,s),categoryKey:r.categoryKey,price:i.paidPrice(r.categoryKey,l?.tiers?.[0]?.id??null,c,r.label),...r.zoneId?{zoneId:r.zoneId}:{},available:a==="free"&&!l?.notForSale})}),o},describeSeat:n=>{let o=i.controller.seatDetails(n);return o?{section:o.sectionLabel??"",row:X(o)??"",seat:o.seatNumber??o.label,category:o.categoryLabel??o.categoryKey}:null},selection:()=>{let{freshSeats:n,total:o,count:r}=un(i);return{seats:n.map(s=>({id:s.id,label:s.label,section:s.sectionLabel??"",row:X(s)??"",seat:s.seatNumber??s.label,category:s.categoryKey,price:i.paidPrice(s.categoryKey,s.tierId??null,s.price,s.label)})),count:r,total:o,currency:i.currency,hold:i.hold?{id:i.hold.holdId,expiresAt:i.hold.expiresAt}:null,validity:i.getSelectionValidity()}},clearSelection:()=>i.clearSelection(),selectObjects:n=>{i.selectObjects(n)},hold:()=>e?Jd(i):Promise.resolve({ok:!1,reason:"not_allowed"})}}async function Jd(i){if(i.salesClosed)return{ok:!1,reason:"event_closed"};if(!i.totalTicketCount())return{ok:!1,reason:"nothing_selected"};let e=i.controller.getSelectionValidity(i.totalTicketCount());return e&&!e.isValid?{ok:!1,reason:"invalid_selection"}:(await i.handleCta(),i.hold?{ok:!0,hold:{id:i.hold.holdId,expiresAt:i.hold.expiresAt}}:{ok:!1,reason:"hold_failed"})}function so(i){return{renderingTimeMillis:i.ms,performanceProfile:i.performanceProfile,seatCount:i.seatCount,objectCount:i.objectCount,sectionCount:i.sectionCount,view:i.view,eventKey:i.eventKey,chartName:i.chartName,floorCount:i.floorCount,transport:i.transport,load:i.load,metricScope:i.metricScope,operationalTelemetryReporter:"sdk"}}function ra(i,e){Re({apiBase:i.apiBase,event:i.eventKey,scope:i.metricScope,surface:i.surface,outcome:"success",ms:i.ms,performanceProfile:i.performanceProfile,chartDelivery:i.chartDelivery,seats:i.seatCount,floors:i.floorCount,view:i.view,load:i.load,transport:i.transport}),e("chart_rendered",so(i))}var sa=require("@seatlayer/core/core/seatConfidence");function se(i){return String(i??"").replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}function aa(i){let e=(0,sa.seatConfidenceDisclosure)(i.seat.confidenceEvidence),t=i.seat.confidenceEvidence,n=e.limitations.length?`<h4>Known limits</h4><ul>${e.limitations.map(c=>`<li>${se(c)}</li>`).join("")}</ul>`:"",o=e.modeledTarget?`<div><dt>Modeled target</dt><dd>${se(e.modeledTarget)}</dd></div>`:"",r=t?`<div><dt>Evidence ID</dt><dd>${se(t.evidenceId)}</dd></div><div><dt>Model version</dt><dd>${se(t.modelVersion)}</dd></div><div><dt>Event configuration</dt><dd>${se(t.eventConfigurationId??"Not configuration-specific")}</dd></div><div><dt>Approval</dt><dd>${se(t.approvedByRole??"No external approval supplied")}</dd></div>`+(t.validUntil?`<div><dt>Valid until</dt><dd>${se(t.validUntil.slice(0,10))}</dd></div>`:""):"<div><dt>Evidence ID</dt><dd>None supplied</dd></div>",s=Pi(i.seat.commercial).join(" \xB7 ")||i.restrictionFallback,a=`<div><dt>View restriction</dt><dd>${se(s)}</dd></div>`+(i.seat.commercial?.note?`<div><dt>Organizer note</dt><dd>${se(i.seat.commercial.note)}</dd></div>`:""),l=i.canReport?'<button type="button" data-report>Report this view</button><p data-report-status role="status" aria-live="polite"></p>':"";return`<div class="sl-view3d-passport-scrim" aria-hidden="true"></div><section class="sl-view3d-passport" role="dialog" aria-modal="true" aria-labelledby="sl-view3d-passport-title"><header><div><span>Seat confidence passport</span><strong id="sl-view3d-passport-title">${se(i.title)}</strong></div><button type="button" data-close aria-label="Close seat confidence passport">\xD7</button></header><div class="sl-view3d-passport-summary"><strong>${se(e.headline)}</strong><span>${se(e.coverage)} \xB7 ${se(e.freshness)}</span></div><dl><div><dt>Model status</dt><dd>${se(e.model)}</dd></div><div><dt>Reality evidence</dt><dd>${se(e.reality)}</dd></div><div><dt>Source</dt><dd>${se(e.provenance)}</dd></div>`+a+o+r+`</dl>${n}<p class="sl-view3d-passport-note">This passport describes supplied evidence and known limits. It does not guarantee that every temporary obstruction or real-world condition is knowable before the event build.</p>`+l+"</section>"}function la(i){return i?i.closest("[data-report]")?"report":i.closest("[data-close]")||i.classList.contains("sl-view3d-passport-scrim")?"close":null:null}function gn(i,e,t){let n=i?.querySelector("[data-report]"),o=i?.querySelector("[data-report-status]");n&&(n.disabled=e!=="failed",n.textContent=e==="received"?"Report received":"Report this view"),o&&(o.setAttribute("role",e==="failed"?"alert":"status"),o.textContent=e==="sending"?"Sending report\u2026":e==="received"?`Report received. Reference ${t??""}.`:"The report could not be sent. Please try again.")}function ao(i,e,t=null){let n=i.view3dEl;if(!n)return;li(i,!1);let o=e.confidenceEvidence,r=i.controller.seatDetails(e.id),s=document.createElement("div");s.className="sl-view3d-passport-shell",s.innerHTML=aa({seat:e,title:r?.displayLabel??e.displayLabel??e.label,restrictionFallback:i.tf("picker.noAuthoredRestriction","No organizer-authored restriction"),canReport:typeof i.api.reportViewEvidence=="function"});let a=[...new Set([...n.children,...[...i.els.map.children].filter(u=>u!==n)])].filter(u=>u instanceof HTMLElement),l=a.map(u=>({element:u,inert:u.inert,ariaHidden:u.getAttribute("aria-hidden")}));for(let u of a)u.inert=!0,u.setAttribute("aria-hidden","true");n.appendChild(s),n.classList.add("has-passport"),i.view3dPassportEl=s;let c=s.querySelector(".sl-view3d-passport"),d=()=>[...c.querySelectorAll('button:not(:disabled),[href],[tabindex]:not([tabindex="-1"])')],p=u=>{if(u.key==="Escape"){u.preventDefault(),u.stopPropagation(),u.stopImmediatePropagation(),li(i);return}if(u.key!=="Tab")return;let h=d();if(!h.length)return;let f=h[0],b=h[h.length-1];u.shiftKey&&document.activeElement===f?(u.preventDefault(),b.focus()):!u.shiftKey&&document.activeElement===b&&(u.preventDefault(),f.focus())};window.addEventListener("keydown",p,!0),i.view3dPassportCleanup=()=>{window.removeEventListener("keydown",p,!0);for(let b of l)b.element.inert=b.inert,b.ariaHidden===null?b.element.removeAttribute("aria-hidden"):b.element.setAttribute("aria-hidden",b.ariaHidden);let u=t?.isConnected?t:i.confirmEl?.querySelector(".sl-confirm-confidence")??i.view3dCompareEl?.querySelector("[data-passport-seat]")??null,h=u?.closest(".sl-confirm,.sl-view3d-compare");h?.isConnected&&(h.inert=!1,h.removeAttribute("aria-hidden")),s.remove(),n.classList.remove("has-passport"),i.view3dPassportEl===s&&(i.view3dPassportEl=null);let f=u??i.view3dCompareEl?.querySelector("[data-passport-seat]")??i.confirmEl?.querySelector(".sl-confirm-confidence")??i.view3dCompareChip.mainButton();(t?.isConnected?t:f)?.focus()},s.addEventListener("click",u=>{let h=la(u.target instanceof HTMLElement?u.target:null);h==="close"&&li(i),h==="report"&&ep(i,e)}),requestAnimationFrame(()=>d()[0]?.focus()),i.emit3dAnalytics("3d_confidence_passport_opened",{seatId:e.id,evidenceId:o?.evidenceId??null,eventConfigurationId:o?.eventConfigurationId??null,modelLevel:o?.modelLevel??"unverified",realityLevel:o?.realityLevel??"none"})}async function ep(i,e){if(i.api.reportViewEvidence){gn(i.view3dPassportEl,"sending");try{let t=await i.api.reportViewEvidence(i.opts.event,{seatId:e.id,evidenceId:e.confidenceEvidence?.evidenceId});i.emit3dAnalytics("3d_confidence_view_reported",{seatId:e.id,evidenceId:e.confidenceEvidence?.evidenceId??null}),gn(i.view3dPassportEl,"received",t.report.id)}catch{gn(i.view3dPassportEl,"failed")}}}function li(i,e=!0){let t=i.view3dPassportCleanup;if(i.view3dPassportCleanup=null,!t){i.view3dPassportEl?.remove(),i.view3dPassportEl=null,i.view3dEl?.classList.remove("has-passport");return}e||(document.activeElement instanceof HTMLElement?document.activeElement:null)?.blur(),t(),e||i.root?.focus({preventScroll:!0})}function ca(i){let e=i.view3dEl;if(!e||i.view3dCompareSeatIds.length<2)return;rt(i,!1);let t=i.view3dCompareSeatIds.map(h=>i.view3dComparisonSnapshot(h)).filter(h=>!!h);if(t.length<2){i.clearView3dComparison();return}let n=h=>E(h),o=t.some(h=>!!h.price),r=document.createElement("div");r.className="sl-view3d-compare-shell";let s=t.map((h,f)=>`<article><span>Seat ${f===0?"A":"B"}</span><strong>${n(h.label)}</strong><small>Section ${n(h.section)} \xB7 Row ${n(h.row)}</small><dl>`+(o?`<div><dt>Current price</dt><dd>${n(h.price)}</dd></div>`:"")+`<div><dt>Ticket type</dt><dd>${n(h.category)}</dd></div><div><dt>Availability</dt><dd>${n(h.availability)}</dd></div><div><dt>View source</dt><dd>${n(h.viewSource)}</dd></div><div><dt>View restriction</dt><dd>${n(h.limited)}</dd></div><div><dt>Seat confidence</dt><dd>${n(h.confidence.headline)}</dd></div><div><dt>Reality check</dt><dd>${n(h.confidence.reality)}</dd></div><div><dt>Accessibility</dt><dd>${n(h.accessibility)}</dd></div></dl><div class="sl-view3d-compare-actions"><button type="button" data-passport-seat="${n(h.seat.id)}">Passport</button><button type="button" data-view-seat="${n(h.seat.id)}">View seat</button><button type="button" class="select" data-select-seat="${n(h.seat.id)}"${h.selectable?"":" disabled"}>Select seat</button></div></article>`).join("");r.innerHTML=`<div class="sl-view3d-compare-scrim" aria-hidden="true"></div><section class="sl-view3d-compare" role="dialog" aria-modal="true" aria-labelledby="sl-view3d-compare-title"><header><div><span>Seat inspection</span><strong id="sl-view3d-compare-title">Compare disclosed attributes</strong></div><button type="button" data-close aria-label="Close seat comparison">\xD7</button></header><p class="sl-view3d-compare-note">${o?"Current price and availability":"Availability"} comes from this picker. Modeled views are chart-derived unless organizer media is labeled.</p><div class="sl-view3d-compare-grid">${s}</div></section>`;let a=document.activeElement instanceof HTMLElement?document.activeElement:null,l=[...e.children].filter(h=>h instanceof HTMLElement),c=l.map(h=>({element:h,inert:h.inert,ariaHidden:h.getAttribute("aria-hidden")}));for(let h of l)h.inert=!0,h.setAttribute("aria-hidden","true");e.appendChild(r),e.classList.add("has-comparison"),i.view3dCompareEl=r;let d=r.querySelector(".sl-view3d-compare"),p=()=>[...d.querySelectorAll('button:not(:disabled),[href],[tabindex]:not([tabindex="-1"])')],u=h=>{if(h.key==="Escape"){h.preventDefault(),rt(i);return}if(h.key!=="Tab")return;let f=p();if(!f.length)return;let b=f[0],k=f[f.length-1];h.shiftKey&&document.activeElement===b?(h.preventDefault(),k.focus()):!h.shiftKey&&document.activeElement===k&&(h.preventDefault(),b.focus())};window.addEventListener("keydown",u),i.view3dCompareCleanup=()=>{window.removeEventListener("keydown",u);for(let h of c)h.element.inert=h.inert,h.ariaHidden===null?h.element.removeAttribute("aria-hidden"):h.element.setAttribute("aria-hidden",h.ariaHidden);r.remove(),e.classList.remove("has-comparison"),i.view3dCompareEl===r&&(i.view3dCompareEl=null),a?.isConnected?a.focus():i.view3dCompareChip.mainButton()?.focus()},r.querySelector("[data-close]")?.addEventListener("click",()=>rt(i)),r.querySelectorAll("[data-passport-seat]").forEach(h=>h.addEventListener("click",()=>{let f=h.dataset.passportSeat,b=f?i.allSeats().find(k=>k.id===f):void 0;b&&ao(i,b,h)})),r.querySelectorAll("[data-view-seat]").forEach(h=>h.addEventListener("click",()=>{let f=h.dataset.viewSeat;rt(i,!1),f&&i.view3dHandle?.flyToSeat(f)})),r.querySelectorAll("[data-select-seat]").forEach(h=>h.addEventListener("click",()=>{let f=h.dataset.selectSeat;f&&tp(i,f)})),requestAnimationFrame(()=>p()[0]?.focus()),i.emit3dAnalytics("3d_comparison_opened",{seatIds:i.view3dCompareSeatIds.slice()})}function rt(i,e=!0){let t=i.view3dCompareCleanup;if(i.view3dCompareCleanup=null,!t){i.view3dCompareEl?.remove(),i.view3dCompareEl=null,i.view3dEl?.classList.remove("has-comparison");return}e||(document.activeElement instanceof HTMLElement?document.activeElement:null)?.blur(),t(),e||i.root?.focus({preventScroll:!0})}function tp(i,e){if(i.salesClosed){i.toast(i.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}let t=i.allSeats().find(o=>o.id===e);if(!t)return;if(rt(i,!1),!i.controller.select([e]).length){i.syncSelectionTo3d(),i.toast(i.tf("picker.seatNoLongerAvailable","That seat is no longer available."),"warning");return}i.syncSelectionTo3d(),i.showConfirm(t),i.emit3dAnalytics("3d_comparison_selected",{seatId:e})}var ha=require("@seatlayer/core/view3d/crossfade/panorama");var lo=require("@seatlayer/core");var ip=900,np=450;function op(i){switch(i){case"seat":return g("picker.stopYourSeat","Your seat");case"row":return g("picker.stopYourRow","Your row");case"section":return g("picker.stopYourSection","Your section");default:return g("picker.stopWholeVenue","Whole venue")}}function da(i,e){let t=document.createElement("button");t.type="button",t.className="sl-view3d-recentre sl-mo-rotate-in",t.textContent="\u25CE";let n=g("picker.recentreOnStage","Recentre on the stage");t.setAttribute("aria-label",n),t.title=n,t.addEventListener("click",()=>{e.handle()?.recentreSeatView()});let o=document.createElement("div");o.className="sl-view3d-stop",o.setAttribute("role","status"),o.setAttribute("aria-live","polite"),i.append(t,o);let r=null,s=null;return{onStopChange(a){if(r&&(clearTimeout(r),r=null),s&&(clearTimeout(s),s=null),!a){o.classList.remove("is-shown"),o.textContent="",s=setTimeout(()=>{s=null,i.classList.remove("is-seat-view")},np);return}i.classList.add("is-seat-view"),o.textContent=op(a),o.classList.add("is-shown"),r=setTimeout(()=>{r=null,o.classList.remove("is-shown")},ip)},dispose(){r&&(clearTimeout(r),r=null),s&&(clearTimeout(s),s=null),t.remove(),o.remove(),i.classList.remove("is-seat-view")}}}var rp=44,sp=92;function pa(i,e,t,n={}){let o=i?.sectionLabel,r=X(i),s=ap(i,e),a=[o,r?(0,lo.t)("picker.rowLabel",{label:r}):null,s?(0,lo.t)("picker.seatLabel",{label:s}):null].filter(Boolean).join(" \xB7 "),l=n.maxChars??(n.narrow?rp:sp);for(let c of[t,n.shortTail??t,null]){let d=[a,c].filter(Boolean).join(" \xB7 ");if(d.length<=l||c==null)return d}return a}function ap(i,e){if(i?.seatNumber)return i.seatNumber;let t=i?.displayLabel??e,n=o=>{!o||!t.startsWith(o)||t.length<=o.length||(t=t.slice(o.length).replace(/^[\s·\-\/_]+/,""))};return n(i?.sectionLabel),n(X(i)),t}var ua=require("@seatlayer/core/core/seatConfidence");function ma(i){return i.buyerView}function fa(i,e,t){if(e==="map"){i.exit3d();return}let n=t?.flyToSeatId;if(i.buyerView==="venue3d"){n?(i.opts.onBuyerViewChange?.({view:"venue3d",seatId:n}),i.view3dHandle?.flyToSeat(n)):t?.resetView&&i.view3dHandle?.focusOverview();return}i.enter3d(n)}function ga(i,e){switch(i.controller.getStatus(e.id)){case"held":return"held";case"booked":return"sold";case"not_for_sale":return"dimmed";default:break}return i.priceBandKeys!=null&&!i.priceBandKeys.has(e.categoryKey)||i.controller.accessibilityFilterDims?.(e)||i.limitedViewFilter&&(e.commercial?.restrictedView||e.commercial?.obstructedView)?"dimmed":"available"}function ba(i){if(!i.view3dHandle)return;let e=i.allSeats().map(t=>({seatId:t.id,state:i.seatState3dFor(t)}));i.view3dHandle.setAvailability(e)}function ya(i){i.view3dHandle&&i.view3dHandle.setSelection(i.controller.getSelection().map(e=>e.id))}async function va(i,e){let t=i.allSeats().find(n=>n.id===e);if(!t)return null;if(t.viewUrl)try{let n=t.viewMeta?.previewUrl,o=!!n&&n!==t.viewUrl,r=o?await i.buyerAssetUrls.resolve(n):null,s=o?t.viewUrl:await i.buyerAssetUrls.resolve(t.viewUrl);return!s||o&&!r?null:{url:s,...r?{previewUrl:r}:{},...o?{resolveUrl:a=>i.buyerAssetUrls.resolve(a)}:{},...t.viewMeta?.sourceWidth!==void 0?{sourceWidth:t.viewMeta.sourceWidth}:{},...t.viewMeta?.sourceHeight!==void 0?{sourceHeight:t.viewMeta.sourceHeight}:{},...t.viewMeta?.previewWidth!==void 0?{previewWidth:t.viewMeta.previewWidth}:{},...t.viewMeta?.previewHeight!==void 0?{previewHeight:t.viewMeta.previewHeight}:{},...t.viewMeta?.variants?.length?{variants:t.viewMeta.variants}:{},...t.viewMeta?.initialBearingDeg!==void 0?{initialBearingDeg:t.viewMeta.initialBearingDeg}:{},...t.viewMeta?.initialPitchDeg!==void 0?{initialPitchDeg:t.viewMeta.initialPitchDeg}:{},...t.viewMeta?.coverage?{coverage:t.viewMeta.coverage}:{},...t.viewMeta?.capturedAt?{capturedAt:t.viewMeta.capturedAt}:{},...t.viewMeta?.sourceLabel?{sourceLabel:t.viewMeta.sourceLabel}:{}}}catch(n){return i.opts.onError?.(n),null}return{url:"",generated:!0,mediaKind:"model",coverage:"exact-seat",sourceLabel:i.tf("picker.chartDerivedModel","Chart-derived model")}}function wa(i,e){if(i.salesClosed){i.toast(i.tf("picker.salesClosedToast","Sales are closed for this event."),"warning"),i.syncSelectionTo3d();return}let t=i.allSeats().find(a=>a.id===e);if(!t)return;let n=i.controller.tableSelection(e);if(i.committedSelection().some(a=>n?a.label===n.label:a.id===e)){i.controller.deselect([e]),i.dismissConfirm(),i.syncSelectionTo3d();return}let r=i.controller.getStatus(t.id);if(r==="held"||r==="booked"||r==="not_for_sale"){i.syncSelectionTo3d();return}if(!i.controller.select([e]).length){i.syncSelectionTo3d(),i.dismissConfirm();return}if(i.opts.onBuyerViewChange?.({view:"venue3d",seatId:e}),i.flashPickedSeat(e),n){i.showTableDialog(n,!1),i.syncSelectionTo3d();return}i.opts.confirmSelection!==!1?i.showConfirm(t):i.syncTray(),i.syncSelectionTo3d()}function xa(i,e){let t=i.allSeats().find(n=>n.id===e);return pa(i.controller.seatDetails(e),t?.displayLabel??t?.label??e,i.tf("picker.viewFromYourSeat","view from your seat"),{narrow:i.root?.dataset.layout==="narrow",shortTail:i.tf("picker.fromYourSeat","from your seat")})}function Sa(i,e){if(i.buyerView!=="venue3d")return;let t=i.view3dCompareSeatIds;t.includes(e.id)||(i.view3dCompareSeatIds=t.length===0?[e.id]:[t[0],e.id]),i.confirmSeat?.id===e.id&&(i.controller.deselect([e.id]),i.dismissConfirm(),i.syncSelectionTo3d(),i.syncTray()),i.view3dCompareChip.sync(),i.emit3dAnalytics("3d_comparison_saved",{seatId:e.id,count:i.view3dCompareSeatIds.length}),i.view3dCompareSeatIds.length>1?i.openView3dComparison():i.toast(i.tf("picker.chooseAnotherToCompare","Seat saved. Choose another seat to compare."),"success")}function ka(i){i.closeView3dComparison(!1),i.view3dCompareSeatIds=[],i.view3dCompareChip.remove(),i.emit3dAnalytics("3d_comparison_cleared")}function Ta(i,e){let t=i.allSeats().find(f=>f.id===e);if(!t)return null;let n=i.controller.seatDetails(t.id),o=i.controller.doc?.categories.find(f=>f.key===t.categoryKey),r=n?.price??(o?.tiers?.length?o.tiers[0].price:o?.price),s=r!=null?i.paidPrice(t.categoryKey,n?.tierId??o?.tiers?.[0]?.id??null,r,t.label):void 0,a=i.controller.getStatus(t.id),l=a==="held"?i.tf("picker.temporarilyHeld","Temporarily held"):a==="booked"?i.tf("picker.sold","Sold"):a==="not_for_sale"?i.tf("picker.notForSale","Not for sale"):i.tf("picker.available","Available"),c=t.viewUrl?(0,ha.seatViewDisclosure)({url:t.viewUrl,...t.viewMeta?.coverage?{coverage:t.viewMeta.coverage}:{},...t.viewMeta?.capturedAt?{capturedAt:t.viewMeta.capturedAt}:{},...t.viewMeta?.sourceLabel?{sourceLabel:t.viewMeta.sourceLabel}:{}}):i.tf("picker.chartDerivedSeatEye","Live 3D \xB7 chart-derived seat-eye \xB7 not surveyed"),d=Pi(t.commercial).join(" \xB7 ")||i.tf("picker.noAuthoredRestriction","No organizer-authored restriction"),p=Yo({...t.accessibility?.length?{accessibility:t.accessibility}:{},...n?.wheelchairSpaceType?{wheelchairSpaceType:n.wheelchairSpaceType}:{}}),u=p.length?`${p.join(" \xB7 ")} \xB7 metadata, not access certification`:i.tf("picker.noAccessibilityMetadata","No accessibility metadata supplied"),h=(0,ua.seatConfidenceDisclosure)(t.confidenceEvidence);return{seat:t,label:n?.displayLabel??t.displayLabel??t.label,section:n?.sectionLabel??t.sectionId??"\u2014",row:X(n)??n?.rowLabel??"\u2014",category:n?.categoryLabel??o?.label??t.categoryKey,price:i.suppressPricing||s==null?"":i.money(s),availability:l,selectable:a==null||a==="free",viewSource:c,limited:d,accessibility:u,confidence:h}}async function Ea(i,e){if(i.view3dEl||!i.canOffer3d()||!i.els.map)return;let t=i.controller.doc;if(!t)return;i.buyerView="venue3d",i.view3dTargetSeatId=null,i.opts.onBuyerViewChange?.({view:"venue3d",...e?{seatId:e}:{}}),i.root?.setAttribute("data-view3d","on"),i.dismissConfirm(),i.syncProjection(),i.syncTray();let n=document.createElement("div");n.className="sl-view3d sl-mo-zoom",n.setAttribute("role","group"),n.setAttribute("aria-label",i.tf("picker.interactive3dVenueView","Interactive 3D venue view"));let o=document.createElement("button");o.type="button",o.className="sl-view3d-back",o.innerHTML=`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M15 18l-6-6 6-6"/></svg><span>${i.tf("picker.backToMap","Back to map")}</span>`;let r=o.querySelector("span"),s=c=>{i.view3dTargetSeatId=c;let d=!!c;n.classList.toggle("is-seat-focused",d),i.root&&(i.root.dataset.view3dSeat=d?"on":"off");let p=d?i.tf("picker.backToVenue","Back to venue"):i.tf("picker.backToMap","Back to map");r&&(r.textContent=p),o.setAttribute("aria-label",p)};if(o.addEventListener("click",()=>{if(i.view3dTargetSeatId&&i.view3dHandle){i.view3dHandle.focusOverview();return}i.exit3d()}),i.regions["top-left"]?.prepend(o),i.view3dBack=o,i.publish3dTopInset(),Xs(i.root)){let c=document.createElement("button");c.type="button",c.className="sl-view3d-fs",c.textContent="\u26F6";let d=i.tf("picker.fullScreen","Full screen");c.setAttribute("aria-label",d),c.title=d,c.setAttribute("aria-pressed",String(!!document.fullscreenElement||i.fsFallback||i.framedFs)),c.addEventListener("click",()=>i.toggleFullscreen()),n.appendChild(c)}let a=document.createElement("div");a.className="sl-view3d-loading",a.setAttribute("role","status"),a.setAttribute("aria-live","polite"),a.textContent=i.tf("picker.loading3d","Building the 3D venue\u2026"),n.appendChild(a),i.els.map.appendChild(n),i.view3dEl=n,i.view3dCompareChip.sync(),requestAnimationFrame(()=>{n.style.opacity="1"});let l=++i.view3dGen;try{let c=i.allSeats(),[d,p]=await Promise.all([Zt(),i.controller.loadEventConfiguration()]),u=p?await zi(p,v=>i.buyerAssetUrls.resolve(v)):null,h=t.theme?.venue3d?.shellAssetUrl,f=await ji(h,v=>i.buyerAssetUrls.resolve(v));if(l!==i.view3dGen||i.buyerView!=="venue3d"||i.view3dEl!==n)return;let b={doc:t,seats:c,...u?{eventConfigurationId:u.id,eventConfiguration:u}:{},...f?{registeredShellGlb:f}:{}};a.textContent=i.tf("picker.building3d","Building venue geometry\u2026");let k=await d.prepareVenue3D(b);if(l!==i.view3dGen||i.buyerView!=="venue3d"||i.view3dEl!==n)return;let S=d.mountVenue3D(n,{...b,prepared:k},{portraitOverviewCrop:!0,arriveAtSeatEye:!0,lookAroundHint:Qe(),navLabels:Si(),seatViewActionLabel:v=>i.allSeats().find(P=>P.id===v)?.viewUrl?i.tf("picker.openAuthored360","Open venue 360\xB0"):i.tf("picker.lookAroundLive3d","Look around in live 3D"),seatViewCaption:v=>i.seatViewCaption(v),onSeatViewStopChange:v=>i.view3dSeatViewChrome?.onStopChange(v),onSeatPick:v=>i.onView3dSeatPick(v),onSeatInspect:v=>i.onView3dSeatPick(v),onSectionFocusChange:v=>{let P=n.querySelector('select[data-locator="section"]'),y=v??"";!P||P.value===y||(P.value=y,P.dispatchEvent(new Event("change")))},onViewTargetChange:v=>{n.querySelector(".sl-view3d-nav")?.classList.toggle("is-seat-focused",!!v),s(v),i.opts.onBuyerViewChange?.({view:"venue3d",...v?{seatId:v}:{}})},...i.seatViewEnabled()?{getSeatView:v=>new Promise((P,y)=>{let H=()=>{i.seatViewFor3d(v).then(N=>{N?P(N):y(new Error("seat_view_unavailable"))})},C=globalThis.requestIdleCallback;typeof C=="function"?C(H,{timeout:1500}):setTimeout(H,50)})}:{},onAnalytics:(v,P)=>i.emit3dAnalytics(v,P)});i.view3dHandle=S,i.view3dSeatViewChrome=da(n,{handle:()=>i.view3dHandle}),requestAnimationFrame(()=>a.remove()),i.pushAvailabilityTo3d(),i.syncSelectionTo3d(),i.view3dNav=Ys(i.regions["bottom-left"]??n,S),e&&S.flyToSeat(e)}catch(c){if(l!==i.view3dGen||i.buyerView!=="venue3d"||i.view3dEl!==n)return;i.opts.onError?.(c),i.toast(i.tf("picker.unavailable3d","3D could not start. The seat map is still available."),"warning"),i.exit3d()}}function Ca(i){let e=i.regions["top-left"];if(!i.root||!e)return;let t=()=>{!i.root||i.root.dataset.view3d!=="on"||i.root.style.setProperty("--sl-3d-top-inset",`${Math.max(44,Math.ceil(e.offsetHeight))}px`)};t(),typeof requestAnimationFrame=="function"&&requestAnimationFrame(t)}function Aa(i){if(i.buyerView!=="venue3d"&&!i.view3dEl)return;i.view3dGen++,i.buyerView="map",i.view3dTargetSeatId=null,i.opts.onBuyerViewChange?.({view:"map"}),i.root?.removeAttribute("data-view3d"),i.closeSeatConfidencePassport(!1),i.closeView3dComparison(!1),i.view3dCompareChip.remove(),i.view3dSeatViewChrome?.dispose(),i.view3dSeatViewChrome=null,i.view3dBack?.remove(),i.view3dBack=null,i.view3dNav?.remove(),i.view3dNav=null,i.root?.removeAttribute("data-view3d-seat"),i.root?.style.removeProperty("--sl-3d-top-inset");try{i.view3dHandle?.dispose()}catch{}i.view3dHandle=null;let e=i.view3dEl;i.view3dEl=null,e&&(e.style.opacity="0",setTimeout(()=>e.remove(),320)),i.syncProjection(),i.syncTray();let t=i.view3dReturnSeat;i.view3dReturnSeat=null,t&&i.committedSelection().some(n=>n.id===t.id)&&i.opts.confirmSelection!==!1&&i.showConfirm(t)}var _a=require("@seatlayer/core");var ci=require("@seatlayer/core");function Pa(i){return Array.isArray(i)?i.reduce((e,t)=>t.type==="minimumSelectedPlaces"?Math.max(e,t.minimum):e,0):0}function bn(i,e,t=!1){let n=i.violations[0];return n==="numberOfPlacesToSelect"?i.remaining>0?(0,ci.t)("picker.selectExactMore",{count:i.remaining}):(0,ci.t)("picker.selectExactCount",{count:i.required}):n==="minimumSelectedPlaces"?(0,ci.t)("picker.selectMinimumMore",{count:i.remaining}):t?e("picker.adjustSeatSelection","Adjust seat selection"):n==="consecutiveSeats"?e("picker.selectSeatsTogether","Choose seats together in the same row and ticket category."):(0,ci.t)("picker.orphanHint")}var di=require("@seatlayer/core");function Ma(i){let e=Math.max(0,i),t=Math.floor(e/6e4),n=String(Math.floor(e%6e4/1e3)).padStart(2,"0");return`${t}:${n}`}function La(i){let e=i.performanceLabel?`<div class="sl-chip-when">${B(i.performanceLabel)}</div>`:"",t=i.performanceDates?.labels.length?`<div class="sl-chip-dates"><span class="sl-chip-dates-summary">${B(i.performanceDates.summary)}</span><span class="sl-chip-date-list">${i.performanceDates.labels.map(n=>`<span class="sl-chip-date">${B(n)}</span>`).join("")}</span></div>`:"";return e+cp(i)+t}function cp(i){let{d:e,area:t,label:n,objectType:o,quantity:r=1,identity:s}=i,a=P=>String(P??"\u2014").replace(/[&<>"]/g,y=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[y]),l=o==="ga"?"ga":e?.objectType??o,c=s?.displayType?.trim()||e?.displayType?.trim()||t?.displayType?.trim()||(l==="table"?g("picker.table","Table"):l==="booth"?g("picker.booth","Booth"):l==="ga"?g("picker.generalAdmission","General admission"):g("picker.row","Row")),d=s?.rowLabel??s?.displayLabel??e?.rowLabel??e?.displayLabel??t?.label??n,p=i.categoryLabel?.trim()??"",u="",h=[];l==="table"&&s?.bookingMode?(u=`${c} ${d}`,h.push([g("picker.guests","Guests"),String(r)])):l==="ga"?(u=String(t?.displayLabel??d),r>1&&h.push([g("picker.tickets","Tickets"),String(r)])):l==="booth"?(u=e?.sectionLabel??`${c} ${d}`,e?.sectionLabel&&h.push([c,String(d)])):!e?.sectionLabel&&!e?.rowLabel&&!e?.seatNumber?u=String(d):(u=e.sectionLabel??"",e.rowLabel&&h.push([c,String(X(e)??e.rowLabel)]),e.seatNumber&&h.push([g("picker.seat","Seat"),String(e.seatNumber)]));let f=!u&&!!p,b=u||p||String(d),k=!!p&&!f&&p!==b,S=h.map(([P,y])=>`<span class="sl-chip-seg" data-fit-seg><span class="w">${a(P)}</span> <b>${a(y)}</b></span>`);k&&S.push(`<span class="sl-chip-seg" data-fit-seg data-fit-type><span class="w">${a(p)}</span></span>`);let v=[b,...h.map(([P,y])=>`${P} ${y}`),k?p:""].filter(Boolean).join(" \xB7 ");return`<div class="sl-chip-id"><span class="sl-sr">${a(v)}</span><span class="sl-chip-name" aria-hidden="true">${a(b)}</span>`+(S.length?`<span class="sl-chip-pos" aria-hidden="true">${S.join("<i>\xB7</i>")}</span>`:"")+"</div>"}function dp(i){let e=B;return` data-key="${e(i.key)}"`+(i.heldLabels.length?` data-held="${e(encodeURIComponent(i.heldLabels.join(`
2920
+ `)))}"`:"")+(i.seatIds.length?` data-seat="${e(i.seatIds.join(" "))}"`:"")+(i.locateId?` data-locate="${e(i.locateId)}"`:"")}function Ha(i){let e=B;return`<div class="sl-chip${i.held?" sl-held":""}${i.fresh?" sl-enter":""}"`+dp(i)+">"+(i.held?i.stateHtml:`<span class="sl-chip-dot" style="background:${E(i.categoryColor)}" aria-hidden="true"></span>`)+`<div class="sl-chip-main">${i.identityHtml}`+(i.extrasHtml?`<div class="sl-chip-sub">${i.extrasHtml}</div>`:"")+`${i.noteHtml}</div>`+(i.amountText?`<span class="amt">${e(i.amountText)}</span>`:"")+i.railHtml+"</div>"}function co(i,e){let t=B(i),n=e?B(e):"";return'<div class="sl-chip-rail">'+(e?`<button type="button" class="view" data-view-label="${n}" aria-label="${B((0,di.t)("picker.viewFromSeat",{label:e}))}"><svg viewBox="0 0 24 24"><path d="M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z"/><circle cx="12" cy="12" r="3"/></svg></button>`:"")+`<button type="button" class="rm" aria-label="${t}"><svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></button></div>`}function Ra(i){return i.confirming?`<div class="sl-ba" role="alert"><div class="sl-ba-title"><span class="spark" aria-hidden="true">\u2726</span>${g("picker.replaceCurrentChoices","Replace your current choices?")}</div><div class="sl-ba-replace"><b>${(0,di.t)("picker.willFindSeatsTogether",{count:i.quantity})}</b><span>${g("picker.manualTicketsRemovedNote","Your manually selected tickets will be removed only after a new group is secured.")}</span></div><div class="sl-ba-actions"><button type="button" data-ba-cancel>${g("picker.keepMine","Keep mine")}</button><button type="button" class="replace" data-ba-replace>${g("picker.findNewSeats","Find new seats")}</button></div></div>`:`<div class="sl-ba"><div class="sl-ba-title"><span class="sl-ba-title-t">${g("picker.findSeatsTogether","Find seats together")}</span>`+St({id:"sl-info-best-seats",label:g("picker.aboutBestSeats","About finding seats together"),text:g("picker.closestGroupChosenInstantly","Closest available group, chosen instantly.")})+(i.offerPremium?`<button type="button" class="sl-ba-premium${i.premium?" on":""}" data-ba-premium aria-pressed="${i.premium?"true":"false"}"><span class="star" aria-hidden="true">\u2605</span>${g("picker.bestSeatsPremium","Best seats")}</button>`:"")+`</div><div class="sl-ba-qty"><button type="button" data-ba="-1" aria-label="${g("picker.fewerSeats","Fewer seats")}">\u2212</button><span>${i.quantity}</span><button type="button" data-ba="1" aria-label="${g("picker.moreSeats","More seats")}">+</button></div>`+(i.categories.length>1?`<select class="sl-ba-cat" aria-label="${B(g("picker.preferredTicketType","Preferred ticket type"))}" data-ba-cat><option value="">${B(g("picker.anyTicketType","Any ticket type"))}</option>`+i.categories.map(e=>`<option value="${B(e.key)}"${i.selectedCategory===e.key?" selected":""}>${B(e.label)}</option>`).join("")+"</select>":'<span class="sl-ba-cat" aria-hidden="true"></span>')+(i.zones.length?`<select class="sl-ba-zone" aria-label="${g("picker.preferredVenueZone","Preferred venue zone")}" data-ba-zone><option value="">${g("picker.anyVenueZone","Any venue zone")}</option>`+i.zones.map(e=>`<option value="${B(e.id)}"${i.selectedZone===e.id?" selected":""}>${B(e.label)}</option>`).join("")+"</select>":"")+`<button type="button" class="sl-ba-go${i.busy?" sl-busy":""}"${i.busy?" disabled":""}>`+(i.busy?`<span class="sl-ba-spin" aria-hidden="true"></span>${g("picker.findingBestSeats","Finding the best seats\u2026")}`:(0,di.tCount)("picker.findBestSeatsCount",i.quantity))+"</button>"+(i.reopened?`<button type="button" class="sl-ba-back" data-ba-close>${g("picker.keepMyPicks","Keep my picks")}</button>`:"")+"</div>"}function Ia(i){if(i.salesClosed&&!i.hasPicks){let e=i.whenText?`<span class="when">${B(i.whenText)}</span>`:"";return`<div class="sl-closed-note" role="status"><b>${g("picker.salesClosedPill","Sales are closed")}</b><span>${g("picker.salesClosedCopy","Ticket sales for this event have ended.")}${e}</span></div>`}return""}function Oa(i){return i.hasGaAreas?i.seated?i.venue3d?g("picker.trayHintChoose3dOrStanding","Choose a seat in the 3D venue \u2014 or grab standing tickets below."):g("picker.trayHintTapOrStanding","Tap a seat on the map \u2014 or grab standing tickets below."):i.venue3d?g("picker.gaTrayHintChoose3dArea","Choose an area in the 3D venue to select tickets."):g("picker.gaTrayHintTapArea","Tap an area on the map to choose tickets."):i.groupMode==="per_performance"?g("picker.groupPerPerformanceTrayHint","Choose seats for this performance, then complete every date above."):i.groupMode?g("picker.groupTrayHint","Choose seats once \u2014 the same seats will be held for every performance."):i.venue3d?g("picker.trayHintChoose3dOrBest","Choose a seat in the 3D venue, or let us pick the best available for you."):g("picker.trayHintTapOrBest","Tap a seat on the map, or let us pick the best available for you.")}var po=6e4,Na=5*6e4,pp=String(Math.round(Na/6e4));function Da(i){let e=document.createElement("div");e.className="sl-extend",e.dataset.dock="map",e.setAttribute("role","status"),e.innerHTML='<button type="button" class="sl-extend-btn" data-ref="extendBtn"></button><button type="button" class="sl-extend-x" data-ref="extendDismiss" aria-label=""><svg viewBox="0 0 16 16" width="12" height="12" aria-hidden="true" focusable="false"><path d="M3.5 3.5 12.5 12.5M12.5 3.5 3.5 12.5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></button>',(i.regions["bottom-center"]??i.els.map).appendChild(e),i.extendEl=e,i.els.extendBtn=e.querySelector('[data-ref="extendBtn"]'),i.els.extendDismiss=e.querySelector('[data-ref="extendDismiss"]'),i.els.extendBtn.textContent=Ba(i),i.els.extendDismiss.setAttribute("aria-label",i.tf("picker.close","Close")),i.els.extendBtn.addEventListener("click",()=>{i.handleExtend()}),i.els.extendDismiss.addEventListener("click",()=>{i.extendDismissed=!0,i.setExtendPrompt(!1,0)})}function Ba(i){return i.tf("picker.addMinutes","+{count} min").replace("{count}",pp)}function Fa(i){let e=i.hold?.items??[],t=new Set(e.map(o=>o.label));return i.committedSelection().filter(o=>!t.has(o.label)).reduce((o,r)=>o+(r.quantity??1),0)+Ve(i.gaQty,i.hold?.items??[])}function Va(i){return(i.hold?.items??[]).reduce((e,t)=>e+(t.quantity??1),0)}function $a(i){let e=new Set((i.hold?.items??[]).map(n=>n.label)),t=i.committedSelection().filter(n=>!e.has(n.label)).reduce((n,o)=>n+(o.quantity??1),0);return i.heldTicketCount()+t+Ve(i.gaQty,i.hold?.items??[])}function za(i){let e=new Set((i.hold?.items??[]).map(o=>o.label)),t=i.committedSelection().filter(o=>e.has(o.label)).reduce((o,r)=>o+(r.quantity??1),0),n=Math.max(0,i.maxTickets-i.heldTicketCount()-Ve(i.gaQty,i.hold?.items??[]));i.controller.setMaxSelection(t+n)}function ja(i,e=i.lastTrayCount,t=i.pendingSelectionCount()){let n=i.els.cta;if(!n)return;if(delete n.dataset.act,i.salesClosed){n.disabled=!0,n.textContent=i.tf("picker.salesClosedCta","Sales closed");return}if(i.confirmSeat||i.tableDialog&&!i.tableDialogHeld){n.disabled=!0,n.textContent=i.tableDialog?i.tf("picker.confirmYourTable","Confirm your table"):i.tf("picker.confirmOrCancelSeat","Confirm or cancel this seat");return}if(i.ctaPhase==="holding"){n.disabled=!0,n.innerHTML=`<span class="sl-cta-spin" aria-hidden="true"></span>${i.tf("picker.securingSeats","Securing your seats\u2026")}`;return}if(i.ctaPhase==="checkout"){n.disabled=!0,n.innerHTML=`<span class="sl-cta-spin" aria-hidden="true"></span>${i.tf("picker.openingCheckout","Opening secure checkout\u2026")}`;return}let o=!i.hold&&i.performanceGroup?.selectionMode==="per_performance"?i.performanceGroup.submissionState?.():null;if(o&&!o.ready){n.disabled=!0,n.textContent=i.tf("picker.completeAllPerformances","Complete all performances ({complete}/{total})").replace("{complete}",String(o.complete)).replace("{total}",String(o.total));return}let r=i.controller.getSelectionValidity(e);if(r&&!r.isValid){n.disabled=!0,n.textContent=bn(r,(s,a)=>i.tf(s,a),!0);return}if(!e&&i.root?.dataset.layout==="narrow"&&!i.performanceGroup&&!i.hold){n.disabled=!1,n.dataset.act="find",n.textContent=i.tf("picker.findBestSeats","Find best seats");return}n.disabled=e===0,n.textContent=i.hold?t?(0,_a.t)("picker.secureMoreAndCheckout",{count:t}):i.tf("picker.continueToCheckout","Continue to checkout"):e?i.performanceGroup?i.tf("picker.holdSeatsForAllPerformances","Hold seats for all {count} performances").replace("{count}",String(i.performanceGroup.performanceCount)):i.tf("picker.holdSeatsAndCheckout","Hold seats & checkout"):i.tf("picker.selectSeats","Select seats")}function Ga(i,e){i.ctaPhase=e,i.syncCta()}async function Ua(i,e,t){i.setCtaPhase("checkout");try{await i.checkoutHandoff(e,t)}finally{i.ctaPhase==="checkout"&&!i.bookedShown&&i.setCtaPhase("idle")}}function qa(i){return`@seatlayer/hold/v1/${encodeURIComponent(i.apiBase)}/${encodeURIComponent(i.opts.event)}`}function Ka(i){if(i.opts.initialHoldId)return i.opts.initialHoldId;if(i.opts.restoreHold===!1||typeof window>"u")return null;try{return window.sessionStorage.getItem(i.holdStorageKey())}catch{return null}}function Wa(i,e){if(!(i.opts.restoreHold===!1||typeof window>"u"))try{window.sessionStorage.setItem(i.holdStorageKey(),e.holdId)}catch{}}function Ya(i){if(!(typeof window>"u"))try{window.sessionStorage.removeItem(i.holdStorageKey())}catch{}}async function Xa(i,e){try{let t=await i.controller.resumeHold(e);if(!t||i.destroyed)return null;let n={holdId:t.holdId,expiresAt:t.expiresAt,seats:t.seats,items:t.items};return i.hold=n,i.handedOff=!0,i.bookedShown=!1,i.ctaPhase="idle",i.startHoldTimer(n.expiresAt),i.rememberHold(n),i.syncTray(),i.emitHoldChange(),i.opts.onHoldRestored?.(n,n.seats??[],i.buildHandoff(n)),n}catch(t){let n=t?.status;return n===404||n===409?i.forgetHold():i.opts.onError?.(t),null}}async function Za(i){let e=i.rememberedHoldId();e&&await i.resumeHoldFromServer(e)}function Qa(i,e){i.stopHoldTimer(),i.holdExpiresAt=e,i.extendDismissed=!1,i.extendUsed=!1,i.hold&&i.rememberHold(i.hold);let t=i.els.hold;t.innerHTML=`<span class="sl-hold-dot" aria-hidden="true"></span><span>${i.tf("picker.held","Held")}</span><span class="sl-hold-time" data-ref="holdTime"></span>`;let n=t.querySelector('[data-ref="holdTime"]'),o=()=>{let r=Math.max(0,i.holdExpiresAt-Date.now());n&&(n.textContent=Ma(r)),t.classList.add("on"),t.classList.toggle("is-expiring",r>0&&r<=po),i.setExtendPrompt(r>0&&r<=po,r),(r<=0||!i.controller.currentHold())&&i.stopHoldTimer()};i.holdTimer=setInterval(o,500),o()}function Ja(i){i.holdTimer&&clearInterval(i.holdTimer),i.holdTimer=null,i.els.hold?.classList.remove("on","is-expiring"),i.setExtendPrompt(!1,0)}function el(i,e,t){if(!i.extendEl)return;let n=e&&t>0&&i.root?.dataset.layout!=="narrow"&&!i.extendDismissed&&!i.extendUsed&&!!i.controller.currentHold()&&!i.bookedShown;i.extendEl.classList.toggle("on",n)}function tl(i){if(!i.holdTimer)return;let e=Math.max(0,i.holdExpiresAt-Date.now());i.setExtendPrompt(e>0&&e<=po,e)}async function il(i){let e=i.els.extendBtn,t=i.controller.currentHold();if(!(!t||!i.api.extend||i.extendUsed)){e.disabled=!0,e.textContent=i.tf("picker.addingEllipsis","Adding\u2026");try{let n=await i.api.extend(i.controller.key,t.holdId,Na);if(i.controller.currentHold()?.holdId!==t.holdId)return;i.controller.setHold({holdId:t.holdId,labels:t.labels,expiresAt:n.expiresAt,items:t.items});let o=i.controller.currentHold();if(!o)return;i.hold={holdId:o.holdId,expiresAt:o.expiresAt,seats:o.seats,items:o.items},i.holdExpiresAt=o.expiresAt,i.extendUsed=!0,i.extendEl?.classList.remove("on"),i.rememberHold(i.hold),i.emitHoldChange(),i.toast(i.tf("picker.moreTimeAdded","More time added \u2014 your seats are still held."),"success")}catch(n){if(n?.reason==="extend_limit"){i.extendUsed=!0,i.setExtendPrompt(!1,0);return}i.opts.onError?.(n),i.toast(i.tf("picker.couldNotAddMoreTime","Couldn't add more time \u2014 please head to checkout now."),"warning")}finally{e.disabled=!1,e.textContent=Ba(i)}}}var uo=require("@seatlayer/core");function nl(i){return i?.previousPrice!=null&&i.previousPrice>i.price?i.previousPrice:null}function ol(i){return up(i)+(i.moreLabel?`<button type="button" class="sl-price-more" aria-expanded="${!i.collapsed}">${i.esc(i.moreLabel)}</button>`:"")+mp(i.status)}function up(i){let{esc:e,money:t}=i;return i.categories.map(n=>{let o=i.priceOf(n),r=i.rangeOf(n),s=i.offerOf(n.key),a=nl(s),l=i.activeKey===n.key;return`<div class="sl-price-row${i.bandKeys!=null&&!i.bandKeys.has(n.key)?" sl-dim":""}${l?" sl-active":""}" data-cat="${e(n.key)}" role="button" tabindex="0" aria-pressed="${l}" title="${e(i.titleFor(n,l))}"><span class="sl-dot" style="--sl-cat-dot:${e(i.colorOf(n))}"></span><span class="sl-price-label">${e(n.label)}`+(s?.offerName?`<small class="sl-price-offer">${e(s.offerName)}</small>`:"")+"</span>"+(a!=null?`<span class="sl-price-was">${e(t(a))}</span>`:"")+(r!=null?`<span class="sl-price-amt">${r.min===r.max?e(t(r.min)):`${e(t(r.min))}\u2013${e(t(r.max))}`}</span>`:o!=null?`<span class="sl-price-amt">${e(t(o))}</span>`:"")+"</div>"}).join("")}function mp(i){let e=t=>t.replace(/[&<>"']/g,n=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[n]);return`<div class="sl-status-key" aria-label="${e(i.legend)}"><span class="sl-status-item"><i class="sl-status-icon unavailable" aria-hidden="true"></i>${e(i.unavailable)}</span></div>`}function ho(i){let e=Math.abs(i.scrollLeft),t=e>2,n=e+i.clientWidth<i.scrollWidth-2;return i.dataset.fadeStart=String(t),i.dataset.fadeEnd=String(n),{start:t,end:n}}function rl(i){let{esc:e,money:t}=i;return`<button type="button" class="sl-rc sl-rc-all" data-rail-all aria-pressed="${i.allActive}" title="${e(i.allWord)}"><span class="sl-rc-t">${e(i.allWord)}</span></button>`+i.categories.map(o=>{let r=i.rangeOf(o),s=i.priceOf(o),a=r?r.min===r.max?t(r.min):`${t(r.min)}+`:s!=null?t(s):null,l=Object.prototype.hasOwnProperty.call(i.left,o.key)&&i.left[o.key]<=0,c=nl(i.offerOf(o.key)),d=a?`${o.label} \u2014 ${a}${l?` (${i.soldOutWord})`:""}`:o.label;return`<button type="button" class="sl-rc" data-cat="${e(o.key)}" aria-pressed="${i.activeKey===o.key}" aria-label="${e(d)}" title="${e(d)}"${l?" disabled":""}><i class="sl-rc-dot" style="--sl-cat-dot:${e(i.colorOf(o))}"></i>`+(c!=null?`<span class="sl-rc-was">${e(t(c))}</span>`:"")+`<span class="sl-rc-t">${e(a??o.label)}</span></button>`}).join("")}function sl(i,e){let t=i.map(a=>({key:a.key,range:e.rangeOf(a)})).filter(a=>a.range!=null);if(!t.length)return[];let n=[...new Map(t.map(a=>[`${a.range.min}:${a.range.max}`,a.range])).values()].sort((a,l)=>a.min-l.min||a.max-l.max);if(n.length<=5)return n.map(a=>({id:`p${a.min}-${a.max}`,label:a.min===a.max?e.money(a.min):`${e.money(a.min)}\u2013${e.money(a.max)}`,keys:t.filter(l=>l.range.min===a.min&&l.range.max===a.max).map(l=>l.key),min:a.min,max:a.max}));let o=[...t].sort((a,l)=>a.range.min-l.range.min||a.range.max-l.range.max),r=Math.ceil(o.length/4),s=[];for(let a=0;a<o.length;a+=r){let l=o.slice(a,a+r),c=Math.min(...l.map(p=>p.range.min)),d=Math.max(...l.map(p=>p.range.max));s.push({id:`b${a}`,label:c===d?e.money(c):`${e.money(c)}\u2013${e.money(d)}`,keys:l.map(p=>p.key),min:c,max:d})}return s}function al(i){if(i.suppressPricing||!i.els.prices||!i.els.pricesSec)return;let e=sl(i.controller.doc?.categories??[],i.legendDeps());if(e.length<2)return;let t=document.createElement("select");t.className="sl-price-select",t.setAttribute("aria-label",i.tf("picker.filterAndFocusByPrice","Filter and focus seats by price"));let n=document.createElement("option");n.value="all",n.textContent=i.tf("picker.allPrices","All prices"),t.appendChild(n);for(let o of e){let r=document.createElement("option");r.value=o.id,r.textContent=o.label,t.appendChild(r)}i.els.pricesSec.appendChild(t),i.priceSelect=t,t.addEventListener("change",()=>{i.applyPriceBand(e.find(o=>o.id===t.value)?.keys??null)})}function ll(i,e){if(i.focusedCatKey=null,i.priceBandKeys=e?new Set(e):null,i.priceSelect){let t=e?i.priceSelect.value:"all";i.priceSelect.value!==t&&(i.priceSelect.value=t)}i.controller.setCategoryFilter(e),i.controller.focusCategoryFilter(e),i.pushAvailabilityTo3d(),i.syncFloors(),i.syncRung(),i.minimap?.refreshMinimap(),i.syncPrices(),i.lastSection&&i.showSectionCard(i.lastSection)}function cl(i){return{colorOf:e=>i.controller.getRenderer()?.categoryDisplayColor?.(e.key)??e.color,rangeOf:e=>i.catPriceRange(e),priceOf:e=>i.catPrice(e),offerOf:e=>i.offerPrice(e),money:e=>i.money(e),esc:B}}function dl(i,e,t,n=i.legendDeps()){let o=i.els.railScroll,r=e.length>1;if(i.els.rail?.classList.toggle("has",r),!o)return;o.innerHTML=r?rl({...n,categories:e,left:t,activeKey:i.focusedCatKey,soldOutWord:i.tf("picker.soldOut","Sold out"),allWord:i.tf("picker.allPrices","All prices"),allActive:!i.focusedCatKey&&!i.priceBandKeys}):"";let s=e.map(a=>a.key).join("|");i.lastRailSignature!==s&&(i.lastRailSignature=s,o.scrollLeft=0),o.querySelectorAll(".sl-rc").forEach(a=>{a.addEventListener("click",()=>{if(a.hasAttribute("data-rail-all")){i.applyPriceBand(null);return}i.focusCategory(a.dataset.cat??"")})}),i.railEdgesBound||(i.railEdgesBound=!0,o.addEventListener("scroll",()=>ho(o),{passive:!0})),requestAnimationFrame(()=>ho(o))}function pl(i){let e=i.controller.doc;if(!e||!i.els.prices)return;let t=i.controller.categoryAvailability(),n=e.categories.filter(p=>!p.notForSale);i.syncSoldout(n,t);let o=i.legendDeps(),r=i.suppressPricing,s=r?{...o,priceOf:()=>{},rangeOf:()=>{},offerOf:()=>null}:o;r&&(i.els.pricesSec?.querySelector("span")?.replaceChildren(i.tf("picker.seatCategories","Seat categories")),i.els.pricesInfo?.remove()),i.syncPriceRail(n,t,s);let a=5,l=n.length-a,c=l>1&&!i.pricesExpanded,d=c?n.slice(0,a):n;i.els.prices.classList.toggle("sl-expanded",l>1&&i.pricesExpanded),i.els.prices.innerHTML=ol({...s,categories:d,left:t,collapsed:c,activeKey:i.focusedCatKey,bandKeys:i.priceBandKeys,titleFor:(p,u)=>u?i.tf("picker.showAllSeats","Show all seats"):(0,uo.t)("picker.showLabelSeatsOnMap",{label:p.label}),moreLabel:l>1?c?r?i.tf("picker.showAllCategories","Show all categories"):(0,uo.t)("picker.showAllTicketTypes",{count:n.length}):i.tf("picker.showFewer","Show fewer"):null,status:{legend:i.tf("picker.seatStatusLegend","Seat status legend"),unavailable:i.tf("picker.notAvailable","Not available")}}),i.els.prices.querySelectorAll(".sl-price-row").forEach(p=>{p.addEventListener("mouseenter",()=>i.controller.getRenderer()?.setCategoryHighlight?.(p.dataset.cat??null)),p.addEventListener("mouseleave",()=>i.controller.getRenderer()?.setCategoryHighlight?.(null));let u=()=>i.focusCategory(p.dataset.cat??"");p.addEventListener("click",u),p.addEventListener("keydown",h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),u())})}),i.els.prices.querySelector(".sl-price-more")?.addEventListener("click",()=>{i.pricesExpanded=!i.pricesExpanded,i.syncPrices()})}function hl(i,e){if(!e)return;let t=i.focusedCatKey===e?null:e;i.focusedCatKey=t,i.priceBandKeys=t?new Set([t]):null;let n=i.els.pricesSec?.querySelector(".sl-price-select");n&&(n.value="all"),i.controller.setCategoryFilter(t?[t]:null),i.controller.focusCategoryFilter(t?[t]:null),i.pushAvailabilityTo3d(),i.syncFloors(),i.syncRung(),i.minimap?.refreshMinimap(),i.syncPrices(),i.lastSection&&i.showSectionCard(i.lastSection)}var Nt=require("@seatlayer/core");function be(i,e,t){let n=(0,Nt.t)(i,t);return n&&n!==i?n:t?e.replace(/\{(\w+)\}/g,(o,r)=>r in t?String(t[r]):o):e}function gp(i){let e=(0,Nt.tCount)("picker.seatCount",i);return e.includes("picker.seatCount")?`${i} ${i===1?"seat":"seats"}`:e}function bp(i){try{let e=Intl.ListFormat;if(e)return new e(void 0,{style:"long",type:"conjunction"}).format(i)}catch{}return i.join(", ")}function yp(i){if(i.length<2)return!1;let e=[...i].sort((t,n)=>t-n);return new Set(e).size!==e.length?!1:e[e.length-1]-e[0]===e.length-1}function vp(i){let e=i.filter(o=>o.objectType==="ga"),t=i.filter(o=>o.objectType!=="ga"),n=[];if(t.length){let o=gp(t.length),r=[...new Set(t.map(l=>l.sectionLabel).filter(Boolean))],s=[...new Set(t.map(l=>l.rowLabel).filter(Boolean))],a=t.map(l=>Number(l.seatNumber)).filter(l=>Number.isFinite(l));if(r.length===1&&s.length===1&&a.length===t.length){let l=t.length===1?be("picker.releasedSeatPlace","Section {section}, Row {row}, Seat {seat}",{section:r[0],row:s[0],seat:String(t[0].seatNumber??"")}):yp(a)?be("picker.releasedSeatRange","Section {section}, Row {row}, Seats {from}\u2013{to}",{section:r[0],row:s[0],from:Math.min(...a),to:Math.max(...a)}):"";n.push(l?be("picker.releasedPair","{first} \xB7 {second}",{first:o,second:l}):be("picker.releasedInSection","{seats} in Section {section}",{seats:o,section:r[0]}))}else r.length===1?n.push(be("picker.releasedInSection","{seats} in Section {section}",{seats:o,section:r[0]})):r.length>1?n.push(be("picker.releasedInSections","{seats} in Sections {sections}",{seats:o,sections:bp(r)})):n.push(o)}for(let o of e)n.push(be("picker.releasedGa","{quantity} \xD7 {area}",{quantity:o.quantity??1,area:o.label}));return n.length?n.reduce((o,r)=>be("picker.releasedPair","{first} \xB7 {second}",{first:o,second:r})):""}function ul(i){if(!i)return[];let e=new Map((i.seats??[]).map(o=>[o.label,o])),t=i.items??[];return(t.length?t.map(o=>({label:o.label,objectType:o.objectType,quantity:o.quantity})):[...e.keys()].map(o=>({label:o}))).map(o=>{let r=e.get(o.label);return{label:o.label,...o.objectType?{objectType:o.objectType}:{},...o.quantity==null?{}:{quantity:o.quantity},...r?.sectionLabel?{sectionLabel:r.sectionLabel}:{},...r?.rowLabel?{rowLabel:X(r)??r.rowLabel}:{},...r?.seatNumber?{seatNumber:r.seatNumber}:{}}})}function ml(i,e){if(!i.reducedMotion)for(let t of e.slice(0,10)){if(t.objectType==="ga")continue;let n=i.seatByLabel(t.label);!n||i.statusOf(n.id)!=="free"||i.flash(n.id,i.accent)}}function fl(i,e){if(!e.recoverable.length||!i.isConnected)return;let t=i.querySelector(".sl-hold-expired-next");t&&(e.taken.length?t.textContent=e.taken.slice(0,3).map(s=>(0,Nt.t)("picker.seatJustTakenByAnother",{label:s})).join(" "):t.remove());let n=i.querySelector(".sl-interrupt-actions"),o=n?.querySelector(".sl-interrupt-act");if(!n||!o)return;o.classList.add("sl-interrupt-act-secondary");let r=document.createElement("button");r.type="button",r.className="sl-interrupt-act sl-hold-expired-recover",r.textContent=(0,Nt.tCount)("picker.holdLapsedSelectAgain",e.recoverable.length),r.addEventListener("click",()=>e.onRecover([...e.recoverable])),n.insertBefore(r,o),i.classList.add("has-recovery"),r.focus()}function gl(i,e=[]){let t=document.createElement("div");t.className="sl-interrupt sl-hold-expired sl-mo-scrim",t.setAttribute("role","alertdialog"),t.setAttribute("aria-modal","true");let n=document.createElement("div");n.className="sl-interrupt-card sl-mo-in";let o=document.createElement("div");o.className="sl-interrupt-title",o.id="sl-hold-expired-title";let r=document.createElement("span");r.className="sl-interrupt-glyph",r.setAttribute("aria-hidden","true"),r.textContent="\u23F1";let s=document.createElement("span");s.textContent=be("picker.holdExpiredTitle","Your seats were released"),o.append(r,s);let a=document.createElement("div");a.className="sl-interrupt-body",a.id="sl-hold-expired-body",a.textContent=be("picker.holdExpiredBody","Your hold time ran out and the seats went back on sale."),n.append(o,a);let l=vp(e);if(l){let u=document.createElement("div");u.className="sl-interrupt-body sl-interrupt-fact sl-hold-expired-seats",u.textContent=l,n.appendChild(u)}let c=document.createElement("div");c.className="sl-interrupt-body sl-hold-expired-next",c.textContent=be("picker.holdExpiredPickAgain","Pick your seats again to continue \u2014 they may already be taken."),n.appendChild(c),t.setAttribute("aria-labelledby",o.id),t.setAttribute("aria-describedby",a.id);let d=document.createElement("div");d.className="sl-interrupt-actions";let p=document.createElement("button");return p.type="button",p.className="sl-interrupt-act sl-hold-expired-restart",p.textContent=be("picker.holdExpiredRestart","Choose seats again"),p.addEventListener("click",()=>i.restart()),d.appendChild(p),n.appendChild(d),t.appendChild(n),t.addEventListener("pointerdown",u=>{u.target===t&&i.restart()}),t}var Ie=require("@seatlayer/core");var bl={wheelchair:"Wheelchair space",companion:"Companion seat","semi-ambulatory":"Limited mobility","designated-aisle":"Aisle / transfer","step-free":"Step-free",hearing:"Assistive listening",cart:"Live captions","sign-language":"Sign language","low-vision":"Low vision","sensory-friendly":"Sensory-friendly","plus-size":"Plus-size","lift-armrest":"Lift-up armrest"},wp='<svg viewBox="0 0 20 20" width="17" height="17" fill="none" stroke="currentColor" stroke-width="1.45" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="10" cy="10" r="7.5" /><path d="M10 2.5a7.5 7.5 0 0 1 0 15Z" fill="currentColor" stroke="none" /></svg>',xp='<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="13" cy="4.4" r="1.9"/><path d="M11 8.2v5.1h5.1"/><path d="M16.6 13.3l1.9 6.3"/><path d="M15.4 14.9a5.6 5.6 0 1 1-5.9-3.4"/></svg>',Sp='<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="8.4"/><circle cx="8.6" cy="10.2" r="1.15"/><circle cx="12" cy="8.2" r="1.15"/><circle cx="15.4" cy="10.2" r="1.15"/><path d="M12 20.4a2.6 2.6 0 0 1 0-5.2 2.2 2.2 0 0 0 0-4.4"/></svg>',kp=8,Tp=8,Ep=88;function Cp(i){let e=i.gap??kp,t=i.margin??Tp,n=i.min??Ep,o=Math.max(i.boundsTop,0);return Math.max(Math.round(i.buttonTop-o-e-t),n)}var yn=class{constructor(e,t){this.active=new Set;this.deps=t,this.root=document.createElement("div"),this.root.className="sl-a11y",this.button=document.createElement("button"),this.button.type="button",this.button.className="sl-a11ybtn",this.button.setAttribute("aria-haspopup","true"),this.button.setAttribute("aria-expanded","false");let n=this.offered().length>0,o=n?t.tf("picker.accessibilityOptions","Accessibility and colour options"):t.tf("picker.displayOptions","Display options");this.button.setAttribute("aria-label",o),this.button.innerHTML=n?xp:Sp,this.menu=document.createElement("div"),this.menu.className="sl-a11ymenu",this.menu.hidden=!0;for(let r of this.stored())this.offeredFree().has(r)&&this.active.add(r);if(this.menu.innerHTML=pr(o,t.tf("picker.close","Close"))+hr(this.rows()),this.root.append(this.menu,this.button),e.prepend(this.root),this.button.addEventListener("pointerdown",r=>r.stopPropagation()),this.button.addEventListener("click",r=>{r.stopPropagation(),this.open(this.menu.hidden)}),this.menu.querySelector("[data-a11y-close]")?.addEventListener("click",r=>{r.stopPropagation(),this.open(!1),this.button.focus({preventScroll:!0})}),this.menu.addEventListener("pointerdown",r=>r.stopPropagation()),this.menu.addEventListener("click",r=>r.stopPropagation()),this.menu.addEventListener("focusin",r=>{let s=r.target;s&&typeof s.scrollIntoView=="function"&&s.scrollIntoView({block:"nearest"})}),this.dismiss=()=>this.open(!1),this.escape=r=>{r.key==="Escape"&&this.open(!1)},this.reflow=()=>{this.menu.hidden||this.fit()},document.addEventListener("pointerdown",this.dismiss),document.addEventListener("keydown",this.escape),window.addEventListener("resize",this.reflow),this.promoteCounts(),this.wire(),this.active.size){this.applyFilter({focus:!1});let r=()=>this.deps.focusSeatsForFilter();typeof requestAnimationFrame=="function"?requestAnimationFrame(r):r()}}colorblindRow(){return this.menu.querySelector(".sl-cbbtn")}syncCounts(){let e=new Map(this.offered().map(({key:n,count:o})=>[n,o])),t=!1;for(let n of this.menu.querySelectorAll("[data-a11y-row]")){let o=n.dataset.a11yRow??"";if(!o.startsWith("a11y:"))continue;let r=o.slice(5),s=e.get(r);if(s===void 0)continue;let a=this.countNode(n),l=s==null?"":this.countText(s);a&&(a.textContent=l);let c=s===0;a instanceof HTMLButtonElement&&(a.disabled=c,a.setAttribute("aria-label",this.jumpLabel(r,l))),n.disabled=c,c?n.setAttribute("aria-disabled","true"):n.removeAttribute("aria-disabled"),c&&this.active.delete(r)&&(this.paint(n,!1),t=!0)}t&&this.applyFilter()}syncAccessibilityFilter(e){this.active.clear();for(let t of e??[])this.active.add(t);this.remember(e&&e.length?e:null);for(let t of this.menu.querySelectorAll("[data-a11y-row]")){let n=t.dataset.a11yRow??"";n.startsWith("a11y:")&&this.paint(t,this.active.has(n.slice(5)))}}destroy(){document.removeEventListener("pointerdown",this.dismiss),document.removeEventListener("keydown",this.escape),window.removeEventListener("resize",this.reflow),this.root.remove()}fit(){this.menu.style.setProperty("--sl-a11ymenu-max",`${Cp({boundsTop:this.boundsTop(),buttonTop:this.button.getBoundingClientRect().top})}px`)}boundsTop(){let e=this.root.closest(".sl-map")??this.root.closest(".sl-picker");return e instanceof HTMLElement?e.getBoundingClientRect().top:0}open(e){if(e===!this.menu.hidden)return;if(this.button.setAttribute("aria-expanded",String(e)),!e){this.menu.hidden=!0,this.menu.classList.remove("sl-mo-in","sl-mo-stagger");return}this.menu.hidden=!1,this.fit(),this.menu.scrollTop=0;let t=this.button.getBoundingClientRect();Bn(this.menu,{x:t.left+t.width/2,y:t.top}),Cr(this.menu),Er(this.menu)}rows(){return[...this.filterRows(),...this.deps.hasLimitedView?[{key:"limited",iconHtml:(0,Ie.seatTypeIconSvg)("restrictedView",{size:17}),label:this.deps.tf("picker.hideLimitedView","Hide limited-view seats"),on:this.deps.isLimitedViewHidden()}]:[],{key:"colorblind",iconHtml:wp,className:"sl-cbbtn",label:this.deps.tf("picker.colorblindColors","Colourblind-friendly colours"),on:this.deps.isColorblindSafe()}]}offered(){let e=this.deps.needs?.();if(e)return e.map(({key:n,count:o})=>({key:n,count:o}));let t=this.deps.present;return t?Ie.ACCESSIBILITY_TYPES.filter(({key:n})=>t.has(n)).map(({key:n})=>({key:n,count:null})):[]}offeredKeys(){return new Set(this.offered().map(({key:e})=>e))}offeredFree(){return new Set(this.offered().filter(({count:e})=>e!==0).map(({key:e})=>e))}filterRows(){let e=this.offeredKeys(),t=new Map(Ie.ACCESSIBILITY_TYPES.map(n=>[n.key,n]));return this.offered().flatMap(({key:n,count:o})=>{let r=t.get(n);return r?[{key:`a11y:${n}`,iconHtml:(0,Ie.seatTypeIconSvg)(n,{size:17}),label:this.deps.tf(`picker.accessShort.${n}`,bl[n]??r.label),...n==="wheelchair"&&e.has("companion")?{note:this.deps.tf("picker.companionSeatsNote","Companion places beside them stay selectable")}:{},...o==null?{}:{count:this.countText(o),disabled:o===0},on:this.active.has(n)}]:[]})}wire(){for(let e of this.menu.querySelectorAll("[data-sl-info]"))e.addEventListener("click",()=>{let t=e.closest(".sl-info"),n=!t?.classList.contains("open");for(let o of this.menu.querySelectorAll(".sl-info.open"))o.classList.remove("open"),o.querySelector("[data-sl-info]")?.setAttribute("aria-expanded","false");t?.classList.toggle("open",n),e.setAttribute("aria-expanded",String(n))});for(let e of this.menu.querySelectorAll("[data-a11y-row]"))e.addEventListener("click",()=>{let t=e.dataset.a11yRow??"";if(t==="colorblind"){let r=!this.deps.isColorblindSafe();this.deps.setColorblindSafe(r),this.paint(e,r);return}if(t==="limited"){let r=!this.deps.isLimitedViewHidden();this.deps.setLimitedViewHidden(r),r&&this.deps.focusSeatsForFilter(),this.paint(e,r);return}let n=t.slice(5),o=!this.active.has(n);o?this.active.add(n):this.active.delete(n),this.paint(e,o),this.applyFilter()})}promoteCounts(){if(this.deps.stepToAccessibleSection)for(let e of this.menu.querySelectorAll('[data-a11y-row^="a11y:"]')){let t=e.querySelector(".sl-a11yrow-c");if(!t)continue;let n=(e.dataset.a11yRow??"").slice(5),o=e.parentElement;o?.classList.contains("sl-a11yrow-w")||(o=document.createElement("div"),o.className="sl-a11yrow-w",e.replaceWith(o),o.appendChild(e));let r=document.createElement("button");r.type="button",r.className="sl-a11yrow-c sl-a11yjump",r.dataset.a11yJump=n,r.textContent=t.textContent,r.disabled=e.disabled,r.setAttribute("aria-label",this.jumpLabel(n,t.textContent??"")),t.remove(),e.setAttribute("aria-label",this.rowLabel(n,r.textContent??"")),e.after(r),r.addEventListener("click",s=>{s.stopPropagation(),this.active.has(n)||(this.active.add(n),this.paint(e,!0),this.applyFilter({focus:!1}));let a=this.deps.stepToAccessibleSection?.(n);a&&r.setAttribute("aria-label",this.jumpLabel(n,r.textContent??"",a.label))})}}countText(e){return e>0?(0,Ie.t)("picker.accessFreeCount",{count:e}):"0"}countNode(e){return e.querySelector(".sl-a11yrow-c")??e.parentElement?.querySelector(".sl-a11yrow-c")??null}typeLabel(e){let t=bl[e]??Ie.ACCESSIBILITY_TYPES.find(n=>n.key===e)?.label??e;return this.deps.tf(`picker.accessShort.${e}`,t)}jumpLabel(e,t,n){return[this.deps.tf("picker.jumpToSection","Jump to section"),this.typeLabel(e),t,...n?[`${this.deps.tf("picker.section","Section")} ${n}`]:[]].filter(Boolean).join(" \xB7 ")}rowLabel(e,t){return[this.typeLabel(e),t].filter(Boolean).join(" \xB7 ")}paint(e,t){e.classList.toggle("on",t),e.setAttribute("aria-checked",String(t)),e.setAttribute("aria-pressed",String(t))}applyFilter(e={}){let t=this.active.size?[...this.active]:null;this.deps.applyAccessibilityFilter(t),this.remember(t),t&&e.focus!==!1&&this.deps.focusSeatsForFilter()}key(){let e=this.deps.chart?.();return`seatmap.a11y.filter.${this.deps.event}${e?`.${e}`:""}`}stored(){try{let e=window.sessionStorage.getItem(this.key()),t=e?JSON.parse(e):null;return Array.isArray(t)?t:[]}catch{return[]}}remember(e){try{e&&e.length?window.sessionStorage.setItem(this.key(),JSON.stringify(e)):window.sessionStorage.removeItem(this.key())}catch{}}};var yl=require("@seatlayer/core"),Ap=250;function vl(i,e=Ap){let t=null,n=()=>{t===null&&(t=setTimeout(()=>{t=null,i()},e))},o=(0,yl.attachVisibilityCatchUp)(n),r=typeof window<"u"&&typeof window.addEventListener=="function";return r&&window.addEventListener("focus",n),()=>{t!==null&&(clearTimeout(t),t=null),o(),r&&window.removeEventListener("focus",n)}}var st=require("@seatlayer/core");var vn=class{constructor(e){this.note=null;this.told=!1;this.deps=e}deferExpiryToast(e){this.told=!1,queueMicrotask(()=>{this.told||e()})}handle(e){if(!e.holdLapsed)return;this.told=!0;let t=(0,st.holdRecoveryShape)(e),n=e.lapsedLabels.length,o=n-e.recoverable.length,r=t==="all"?(0,st.tCount)("picker.holdLapsedStillFree",n):t==="partial"?(0,st.tCount)("picker.holdLapsedSomeTaken",o):(0,st.tCount)("picker.holdLapsedAllTaken",n);this.note={message:r,recoverable:t==="none"?[]:[...e.recoverable]},this.deps.toast(r,t==="none"?"error":"warning",t==="none"?void 0:{label:this.actionLabel(),onClick:()=>this.recover()}),this.deps.syncTray()}noteHtml(){if(!this.note)return"";let e=this.note.recoverable.length?`<button type="button" data-lapse-again>${B(this.actionLabel())}</button>`:"";return`<div class="sl-lapse-note" role="status"><span>${B(this.note.message)}</span>${e}</div>`}wire(e){e?.querySelector("[data-lapse-again]")?.addEventListener("click",()=>this.recover())}clear(){this.note&&(this.note=null,this.deps.syncTray())}actionLabel(){return(0,st.tCount)("picker.holdLapsedSelectAgain",this.note?.recoverable.length??0)}recover(){let e=this.note?.recoverable??[];this.note=null,this.deps.syncTray(),e.length&&this.deps.reselect(e)}};var wl=Symbol("seatlayer.performance-group-picker");function wn(i,e){return Object.defineProperty(i,wl,{configurable:!1,enumerable:!1,value:Object.freeze({...e})}),i}function xl(i){return i[wl]??null}var Sl="@seatlayer/pending-checkout/v1";function Pp(i){return typeof i=="string"&&i.length<=160&&/^ord_[A-Za-z0-9_-]+$/.test(i)}function xn(i){if(typeof location>"u")return null;let e=new URLSearchParams(location.search),t=e.get("seatlayer_checkout");if(t!=="success"&&t!=="cancelled")return null;let n=null;try{let o=window.sessionStorage.getItem(Sl);if(o){let r=null;try{r=JSON.parse(o)}catch{}if(r&&Pp(r.orderId)){let s=Date.now()-Number(r.storedAt);if(s>=0&&s<=144e5){if(r.eventKey&&r.eventKey!==i)return null;n=r.orderId}}}window.sessionStorage.removeItem(Sl)}catch{}e.delete("seatlayer_checkout");try{let o=e.toString();history.replaceState(history.state,"",`${location.pathname}${o?`?${o}`:""}${location.hash}`)}catch{}return{outcome:t,orderId:n}}function kl(i){if(!i.framed)return null;let e=i.ancestorOrigins?.length?i.ancestorOrigins[0]:null;for(let t of[e,i.referrer])if(t)try{return new URL(t).origin}catch{}return null}var Mp="https://api.seatlayer.io",Lp=10,Hp=250,Tl=6e4,El=4,Rp=10,Ip=40,Op=220,Cl="seatmap.a11y.cb";function _p(){try{if(typeof window>"u")return null;let i=window.localStorage.getItem(Cl);return i==null?null:i==="1"}catch{return null}}function Np(i){try{window.localStorage.setItem(Cl,i?"1":"0")}catch{}}var Ue=class i{constructor(e){this.realtime=null;this.accessEl=null;this.lastSelectionValidity=null;this.root=null;this.mapHost=null;this.rendered=!1;this.destroyed=!1;this.renderInfo=null;this.webMcp=null;this.localeGeneration=0;this.els={};this.regions={};this.ro=null;this.holdTimer=null;this.toastTimer=null;this.offerReadInFlight=null;this.offerReadSettledAt=0;this.offerRefreshTimer=null;this.offerBoundaryTimer=null;this.offerVisibilityHandler=null;this.motionTimers=new Set;this.currency="USD";this.eventTimezone=null;this.eventWhenText=null;this.offerAvailability=null;this.channelByObject=new Map;this.pricesByChannel=new Map;this.hold=null;this.holdExpiresAt=0;this.handedOff=!1;this.bookedShown=!1;this.holdConflicted=!1;this.paymentOptions=null;this.checkoutPanel=null;this.extendEl=null;this.extendDismissed=!1;this.extendUsed=!1;this.bookedEl=null;this.holdExpiredEl=null;this.holdExpiredFresh=!1;this.holdExpiredUnits=[];this.gaQty=new Map;this.gaPromptEl=null;this.gaPromptReturnFocus=null;this.gaAreasExpanded=!1;this.lastMapPoint=null;this.tipEl=null;this.tipPos={x:0,y:0};this.tipPinned=!1;this.tipMarkedHoverLabel=null;this.lastPointerType="mouse";this.themeMode=null;this.colorSchemeStop=null;this.seatsRevealed=!1;this.seatsRevealedReport=null;this.confirmCardCache=null;this.suppressConfirmationSeatId=null;this.tableDialogEl=null;this.tableDialog=null;this.tableDialogHeld=!1;this.tableDialogReturnFocus=null;this.srEl=null;this.baQty=2;this.baCat="";this.baZone="";this.baPremium=!1;this.bestAvailableConfirm=!1;this.salesClosed=!1;this.soldOut=!1;this.soldoutEl=null;this.cbSafe=!1;this.rungsEl=null;this.projectionEl=null;this.buyerView="map";this.view3dEl=null;this.view3dHandle=null;this.view3dGen=0;this.view3dReturnSeat=null;this.view3dTargetSeatId=null;this.view3dCompareSeatIds=[];this.view3dCompareChip=new hn({overlay:()=>this.view3dEl,savedSeatIds:()=>this.view3dCompareSeatIds,openComparison:()=>this.openView3dComparison(),clearComparison:()=>this.clearView3dComparison(),toast:(e,t)=>this.toast(e,t)});this.view3dCompareEl=null;this.view3dCompareCleanup=null;this.view3dSeatViewChrome=null;this.view3dPassportEl=null;this.view3dPassportCleanup=null;this.floorsEl=null;this.viewEl=null;this.viewCleanup=null;this.seatViewGen=0;this.allSeatsCache=null;this.view3dBack=null;this.view3dNav=null;this.lastRailSignature="";this.priceSelect=null;this.minimap=null;this.pickerLayoutSize={width:0,height:0};this.priceBandKeys=null;this.focusedCatKey=null;this.limitedViewFilter=!1;this.pricesExpanded=!1;this.sectionCardCache=null;this.lastTrayCount=0;this.langSel=null;this.lastTrayTotal=0;this.lastTrayKeys=new Set;this.bestAvailableBusy=!1;this.releasingLabels=new Set;this.holdingLabels=new Set;this.ctaPhase="idle";this.a11yMenu=null;this.detachAttention=null;this.lapse=new vn({toast:(e,t,n)=>this.toast(e,t,n),reselect:e=>{this.controller.select(e),this.handleCta()},syncTray:()=>this.syncTray()});this.railEdgesBound=!1;this.fsFallback=!1;this.fsChangeHandler=null;this.fsEscHandler=null;this.eventDetailsHidden=!1;this.sideCollapsed=!1;this.sideToggleEl=null;this.framedFs=!1;this.lastPostedHeight=0;this.cbEl=null;this.modalScrim=null;this.prevFocus=null;this.escHandler=null;this.closeModal=null;this.fitScheduled=!1;this.perspectiveWarned=!1;if(!e||typeof e!="object")throw new Error("seatmap: options object is required");if(!e.event||typeof e.event!="string")throw new Error("seatmap: `event` key is required");if(!e.container)throw new Error("seatmap: `container` is required (or use SeatPicker.open())");this.performanceGroup=xl(e),this.suppressPricing=!!this.performanceGroup?.suppressPricing,this.opts={...e,confirmSelection:e.confirmSelection??!0},this.eventDetailsHidden=!!e.hideEventDetails,this.hostPricing=e.pricing,this.apiBase=(e.apiBase??Mp).replace(/\/+$/,"");let t={onExpired:a=>{this.opts.onAccessExpired?.(a),a.refreshed||this.showAccessPanel({reason:"no_token",retryable:!1})},onUnavailable:a=>{this.opts.onAccessUnavailable?.(a),this.showAccessPanel(a)}},n=!e.transport&&e.publicKey&&!e.buyerAccessTokenProvider&&!e.buyerAccessToken?Ni({base:this.apiBase,event:e.event,publicKey:e.publicKey,accessHooks:t,apiOptions:{referral:e.referral,onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)}}):null;this.access=e.transport?null:n?.access??Lt(e,t),this.pubApi=e.transport?null:n?.api??new Be(this.apiBase,{access:this.access??void 0,referral:e.referral,onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)}),this.api=e.transport??this.pubApi,this.buyerAssetUrls=new Rt(e.event,this.api.asset?(a,l)=>this.api.asset(a,l):void 0),e.checkout==="hosted"&&!this.pubApi&&console.warn('seatlayer: checkout: "hosted" needs the widget\'s own transport \u2014 a custom `transport` owns its backend, so the picker is staying on onCheckout for this mount.'),this.checkoutMode=e.checkout==="hosted"&&this.pubApi?"hosted":"handoff";let o=e.numberOfPlacesToSelect;if(o!=null&&(!Number.isInteger(o)||o<1))throw new Error("seatmap: `numberOfPlacesToSelect` must be a positive integer");this.exactTickets=o??null;let r=Pa(e.selectionValidators);if(this.exactTickets!=null&&r>this.exactTickets)throw new Error("seatmap: `minimumSelectedPlaces.minimum` cannot exceed `numberOfPlacesToSelect`");let s=Math.max(1,Math.floor(e.maxSelection??this.exactTickets??Math.max(Lp,r)));if(this.exactTickets!=null&&s<this.exactTickets)throw new Error("seatmap: `maxSelection` cannot be lower than `numberOfPlacesToSelect`");if(e.maxSelection!=null&&s<r)throw new Error("seatmap: `maxSelection` cannot be lower than `minimumSelectedPlaces.minimum`");this.maxTickets=this.exactTickets??s,this.cbSafe=_p()??!!e.colorblindSafe,this.controller=this.wireController(e)}get confirmEl(){return this.confirmCard.element}set confirmEl(e){this.confirmCard.element=e}get confirmSeat(){return this.confirmCard.candidate}set confirmSeat(e){this.confirmCard.candidate=e}get lastSection(){return this.sectionCard.summary}set lastSection(e){this.sectionCard.adopt(e)}deliverableViewReference(e){return Ot(e)}isFramed(){return typeof window<"u"&&window.parent!==window}postToHost(e){if(!this.isFramed())return;let t=kl({framed:!0,ancestorOrigins:window.location.ancestorOrigins,referrer:document.referrer});if(t)try{window.parent.postMessage(e,t)}catch{}}measureFramedHeight(){let e=this.root;if(!e)return 0;let t=e.clientWidth||(typeof window<"u"?window.innerWidth:0)||0;if(t<=0)return 0;let n=t<640?1.2:.62;return Math.max(420,Math.round(t*n))}reportFramedHeight(){if(!this.isFramed())return;let e=this.measureFramedHeight();e<=0||e===this.lastPostedHeight||(this.lastPostedHeight=e,this.postToHost({type:"seatlayer:height",px:e}))}toggleFullscreen(){let e=this.root;if(!e)return;!!document.fullscreenElement||this.fsFallback||this.framedFs?document.fullscreenElement?document.exitFullscreen().catch(()=>{}):this.framedFs?this.setFramedFs(!1):this.setFsFallback(!1):e.requestFullscreen?e.requestFullscreen().catch(()=>this.enterFsFallback()):this.enterFsFallback()}fillsViewport(){let e=this.root;if(!e||typeof window>"u")return!1;let t=e.getBoundingClientRect();return t.height>=window.innerHeight-El&&t.width>=window.innerWidth-El}syncFullscreenAffordance(){let e=this.els.zfs;if(!e)return;let n=!(!!document.fullscreenElement||this.fsFallback||this.framedFs)&&this.root?.dataset.layout==="narrow"&&this.fillsViewport();e.hidden=n,e.tabIndex=n?-1:0,e.setAttribute("aria-hidden",String(n))}syncFullscreenButtons(){let e=!!document.fullscreenElement||this.fsFallback||this.framedFs,t=this.eventDetailsHidden&&!e;this.root?.setAttribute("data-event-details-hidden",String(t)),this.root?.setAttribute("data-fs",String(e)),this.els.zfs?.setAttribute("aria-pressed",String(e)),this.els.zfs?.setAttribute("title",e?this.tf("picker.exitFullScreen","Exit full screen"):this.tf("picker.fullScreen","Full screen"));let n=this.els.zfs?.querySelector(".sl-zfs-lbl");n&&(n.textContent=e?this.tf("picker.exitFullScreen","Exit full screen"):this.tf("picker.fullScreen","Full screen")),this.view3dEl?.querySelector(".sl-view3d-fs")?.setAttribute("aria-pressed",String(e)),this.syncFullscreenAffordance()}enterFsFallback(){this.isFramed()?this.setFramedFs(!0):this.setFsFallback(!0)}setFramedFs(e){this.framedFs!==e&&(this.framedFs=e,this.syncFullscreenButtons(),this.postToHost({type:"seatlayer:fullscreen",on:e,background:this.cssVar("--sl-bg")||void 0}),e&&!this.fsEscHandler?(this.fsEscHandler=t=>{t.key==="Escape"&&!document.fullscreenElement&&this.setFramedFs(!1)},window.addEventListener("keydown",this.fsEscHandler)):!e&&this.fsEscHandler&&(window.removeEventListener("keydown",this.fsEscHandler),this.fsEscHandler=null),requestAnimationFrame(()=>this.controller.refitCurrentView()))}setFsFallback(e){this.fsFallback!==e&&(this.fsFallback=e,this.root?.classList.toggle("sl-fs",e),this.syncFullscreenButtons(),e&&!this.fsEscHandler?(this.fsEscHandler=t=>{t.key==="Escape"&&!document.fullscreenElement&&this.setFsFallback(!1)},window.addEventListener("keydown",this.fsEscHandler)):!e&&this.fsEscHandler&&(window.removeEventListener("keydown",this.fsEscHandler),this.fsEscHandler=null),requestAnimationFrame(()=>this.controller.refitCurrentView()))}close(){this.closeModal?this.closeModal():this.destroy()}static async open(e){It();let t=document.activeElement instanceof HTMLElement?document.activeElement:null,n=document.createElement("div");n.className="sl-modal-scrim";let o=document.createElement("div");o.className="sl-modal-frame",o.style.setProperty("--sl-bg",Tt(void 0,e.theme)["--sl-bg"]),o.setAttribute("role","dialog"),o.setAttribute("aria-modal","true"),o.setAttribute("aria-label",g("picker.seatSelection","Seat selection")),o.tabIndex=-1,n.appendChild(o),document.body.appendChild(n);let r=document.body.style.overflow;document.body.style.overflow="hidden";let s=new i({...e,container:o});s.modalScrim=n,s.prevFocus=t;let a=["a[href]","area[href]","button","input","select","textarea","iframe","object","embed","summary","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"[tabindex]"].join(","),l=()=>{let f=[...o.querySelectorAll('[role="dialog"][aria-modal="true"]')].filter(b=>b.isConnected&&!b.closest('[hidden], [aria-hidden="true"], [inert]'));return f[f.length-1]??o},c=(f,b)=>{let k=f;for(;k;){let S=window.getComputedStyle(k);if(k.hidden||k.getAttribute("aria-hidden")==="true"||k.hasAttribute("inert")||S.display==="none"||S.visibility==="hidden"||S.visibility==="collapse")return!0;if(k===b)return!1;k=k.parentElement}return!0},d=f=>[...f.querySelectorAll(a)].filter(b=>b.tabIndex>=0&&!b.matches(":disabled")&&!c(b,f)),p=(f,b)=>{let k=d(f),S=b?k[k.length-1]:k[0];S?S.focus({preventScroll:!0}):(f.hasAttribute("tabindex")||(f.tabIndex=-1),f.focus({preventScroll:!0}))},u=!1,h=()=>{if(u)return;u=!0,document.body.style.overflow=r,s.escHandler&&document.removeEventListener("keydown",s.escHandler),n.remove(),s.modalScrim=null;let f=s.prevFocus;s.prevFocus=null,f?.isConnected&&f.focus({preventScroll:!0});let b=()=>{s.destroy(),e.onClose?.()};s.hold&&!s.handedOff?s.release().finally(b):b()};return s.closeModal=h,n.addEventListener("mousedown",f=>{f.target===n&&h()}),s.escHandler=f=>{if(f.key==="Tab"){if(f.defaultPrevented)return;let b=l(),k=d(b),S=k[0],v=k[k.length-1],P=document.activeElement;!S||!v?(f.preventDefault(),p(b,f.shiftKey)):P===b||!P||!b.contains(P)?(f.preventDefault(),(f.shiftKey?v:S).focus({preventScroll:!0})):f.shiftKey&&P===S?(f.preventDefault(),v.focus({preventScroll:!0})):!f.shiftKey&&P===v&&(f.preventDefault(),S.focus({preventScroll:!0}));return}f.key==="Escape"&&(s.tableDialog?(f.preventDefault(),s.cancelTableDialog()):s.confirmSeat?(f.preventDefault(),s.cancelConfirm()):s.bestAvailableConfirm?(f.preventDefault(),s.bestAvailableConfirm=!1,s.syncTray()):(f.preventDefault(),h()))},document.addEventListener("keydown",s.escHandler),await s.render(),s.els.close?.classList.add("on"),s.els.close?.addEventListener("click",h),p(l(),!1),s}wireController(e){return new I.PickerController({transport:this.api,eventKey:e.event,maxSelection:this.maxTickets,selectedObjects:e.selectedObjects,selectableObjects:e.selectableObjects,numberOfPlacesToSelect:e.numberOfPlacesToSelect,selectionValidators:e.selectionValidators,currency:e.currency,flashOnLiveChange:!0,colorblindSafe:this.cbSafe,...e.loadingReveal?{loadingReveal:e.loadingReveal}:{},mapTheme:kt(e.theme),onSeatsRevealed:()=>{this.seatsRevealed=!0,e.onSeatsRevealed?.(),this.seatsRevealedReport?.()},onGAClick:t=>{let n=this.controller.getGAAreas().find(o=>o.id===t);n&&(this.collapseSheet(),$n(this,n,this.lastMapPoint))},onSelectionChange:()=>{this.syncTray(),this.minimap?.refreshMinimap(),this.committedSelection().length&&this.collapseSectionCard(),this.syncSelectionTo3d()},onStatusChange:(t=>{this.syncSeatMarks(),this.syncPrices(),this.a11yMenu?.syncCounts(),ms(t)&&this.scheduleOfferRefresh(!0),this.evictTakenSelections(),this.detectBooked(),this.minimap?.refreshMinimap(),this.pushAvailabilityTo3d()}),onHoldExpired:()=>{let t=this.handedOff,n=this.holdConflicted;this.holdExpiredUnits=ul(this.hold),this.hold=null,this.forgetHold(),this.handedOff=!1,this.bookedShown=!1,this.holdConflicted=!1,this.ctaPhase="idle",this.stopHoldTimer(),this.gaQty.clear(),this.lapse.deferExpiryToast(()=>{if(t||n){this.toast((0,I.t)("picker.holdExpired",void 0)||"Your hold expired \u2014 seats released. Pick again.","warning");return}this.showHoldExpired()}),this.syncTray(),this.emitHoldChange(),this.opts.onHoldExpired?.()},onAvailabilityRefresh:t=>this.lapse.handle(t),confirmSelection:this.opts.confirmSelection,onSelect:t=>{if(this.salesClosed){this.controller.deselect([t.id]),this.toast(this.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}this.controller.tableSelection(t.id)||(this.collapseSheet(),this.flashPickedSeat(t.id),this.opts.confirmSelection&&this.suppressConfirmationSeatId!==t.id&&this.showConfirm(t))},onTableSelectionRequest:t=>{if(this.salesClosed){this.controller.deselect(t.physicalSeatIds),this.toast(this.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}this.showTableDialog(t,!1)},onDeselect:t=>{if(this.controller.currentHold()?.labels.includes(t.label)){this.removeHeldLabels([t.label]);return}if(this.confirmSeat?.id===t.id){this.dismissConfirm();return}if(this.tableDialog?.physicalSeatIds.includes(t.id)){this.dismissTableDialog();return}this.opts.confirmSelection===!1||this.salesClosed||this.controller.tableSelection(t.id)||(this.controller.select([t.id]),this.showConfirm(t,"remove"))},onSelectionLimit:()=>{this.toast((0,I.t)("picker.maxTicketsForOrder",{count:this.maxTickets}),"warning"),this.opts.onSelectionLimit?.(this.maxTickets)},onViewChange:()=>{this.reanchorConfirm(),this.syncRung(),this.syncProjection(),this.minimap?.drawMinimapRect(),this.sectionCardOnView()},onSectionFocus:t=>this.showSectionCard(t),onDeckTap:()=>{this.showSectionCard(null),this.syncFloors(),this.syncRung(),this.minimap?.refreshMinimap()},onFocusSeat:t=>this.announceSeat(t),onSeatHover:t=>this.updateTooltip(t),hostCardOpen:()=>this.tipPinned||!!this.confirmSeat,onHint:t=>{t&&this.toast(t)},onSalesClosed:()=>this.setSalesClosed(!0),onError:t=>this.opts.onError?.(t)})}async render(){if(this.rendered)return this;let e=performance.now(),t={},n=A=>Math.round((performance.now()-A)*100)/100;this.rendered=!0,It();let o=performance.now(),r=Ii(this.opts.locale,this.opts.messages),s=this.localeGeneration+=1;this.checkoutMode==="hosted"&&(this.paymentOptions=this.pubApi.paymentOptions(this.opts.event));let a=performance.now(),l=Go(this.opts.container),{root:c,els:d,mapHost:p}=vr(l,(A,_)=>this.tf(A,_),this.opts.theme);this.root=c,this.els=d,this.mapHost=p,Oi(c,r,A=>{t.loadLocale=n(o),this.destroyed||this.applyActiveLocale(A,s)}),Js(c,()=>[{open:()=>!!this.holdExpiredEl,close:()=>this.restartAfterHoldExpiry()},{open:()=>this.tipPinned,close:()=>this.unpinTooltip()},{open:()=>!!this.tableDialog,close:()=>this.cancelTableDialog()},{open:()=>!!this.confirmSeat,close:()=>this.cancelConfirm()},{open:()=>this.bestAvailableConfirm,close:()=>{this.bestAvailableConfirm=!1,this.syncTray()}}]),this.syncFullscreenButtons(),this.wireBuyerShell(c);let u=document.createElement("div");u.style.cssText="position:absolute;inset:0",this.mapHost.appendChild(u),t.mountBuyerShell=n(a),t.skeletonPaint=n(e),this.startRealtime();let h=await this.loadChart(u,t,n);if(!h)return this.realtime?.stop(),this.realtime=null,this;t.shellsPaint=n(e);let f=performance.now();if(this.salesClosed=!!h.salesClosed||!!this.opts.readOnly,c.dataset.eventMode=h.mode==="test"?"test":"live",!this.opts.locale&&h.locale&&this.setLocale(h.locale),this.controller.setViewMode(this.normalizeInitialView(this.opts.initialView)),this.buildRegions(),this.regions["bottom-right"].appendChild(this.els.zoom),this.regions["bottom-center"].appendChild(this.els.toast),h.mode==="test"){let A=document.createElement("div");A.className="sl-testbadge",A.textContent=jo((0,I.t)("picker.testMode"),(0,I.getLocale)()),A.setAttribute("aria-label",(0,I.t)("picker.testMode")),A.title=this.tf("picker.testModeExplained","Bookings here are not real and no card is charged"),this.regions["top-left"].appendChild(A)}let b=this.controller.doc?.theme;this.themeMode=this.opts.theme?.mode??null,this.applyThemeTokens(c),this.watchThemeMode(),this.currency=h.currency??this.opts.currency??"USD",this.eventTimezone=h.timezone??null,Uo(this.els.logo,[this.opts.theme?.logoUrl,b?.logoUrl,h.posterUrl],this.opts.theme?.brandName??b?.brandName??h.eventName??"?"),this.els.name.textContent=h.eventName??"";let k=h.startsAt?Ai(h.startsAt,h.timezone??null,this.opts.locale):"";this.eventWhenText=k||null,this.els.meta.textContent=[h.venue,k].filter(Boolean).join(" \xB7 "),this.syncProjection(),this.buildBadge(b);let S=!!this.controller.doc&&this.controller.getExpandedSeats().some(A=>A.commercial?.restrictedView||A.commercial?.obstructedView);this.buildAccessibilityMenu(S),this.buildLanguageSwitcher(this.els.zoom??this.regions["bottom-right"]),this.srEl=document.createElement("div"),this.srEl.className="sl-sr",this.srEl.setAttribute("aria-live","polite"),c.appendChild(this.srEl),this.buildArenaChrome(),this.buildMinimap(),this.buildPriceFilter(),this.buildExtendPrompt(),this.buildBookedOverlay(),this.buildSoldoutOverlay(),this.buildPanelToggle(),this.opts.panelCollapsed&&this.setPanelCollapsed(!0),this.dockLayoutChrome(),t.buildBuyerControls=n(f);let v=performance.now();if(await this.restoreRememberedHold(),t.restoreHold=n(v),this.destroyed)return this;this.dismissSkeleton(),this.salesClosed&&this.applySalesClosed(),this.syncPrices(),this.syncTray(),this.resumeHostedOrder();let P=this.controller.doc,y=Wi(this.opts.event),H=this.performanceGroup?.surface??(this.performanceGroup?"performance_group":null),C=H??"event",N={apiBase:this.apiBase,eventKey:this.opts.event,metricScope:C,surface:H==="season"?"season_picker":H==="performance_group"?"performance_group_picker":"seat_picker",ms:n(e),performanceProfile:t,chartDelivery:h.chartDelivery,seatCount:this.allSeats().length,objectCount:P?.objects.length??0,sectionCount:P?.objects.filter(A=>A.type==="section").length??0,floorCount:this.controller.getFloors().length,chartName:P?.name,view:this.buyerView,load:y,transport:this.opts.transport?"custom":"pubapi"};ra(N,(A,_)=>this.emitAnalytics(A,_));let M=h.performanceProfile;return this.seatsRevealedReport=()=>this.emitAnalytics("chart_seats_revealed",so({...N,performanceProfile:{...N.performanceProfile,...M}})),this.seatsRevealed&&this.seatsRevealedReport(),this.renderInfo=h,await this.registerAgentTools(),this}registerAgentTools(){return oa(this)}webMcpHost(e){return ro(this,e)}wireBuyerShell(e){this.refreshOfferAvailability(!1),this.api.availability&&(this.offerVisibilityHandler=()=>{!document.hidden&&!this.destroyed&&this.refreshOfferAvailability(!1)},document.addEventListener("visibilitychange",this.offerVisibilityHandler)),this.detachAttention=vl(()=>{this.destroyed||this.controller.refreshAvailability()}),this.observeLayout(e),this.els.zin.addEventListener("click",()=>this.controller.zoomIn()),this.els.zout.addEventListener("click",()=>this.controller.zoomOut()),this.els.zfit?.addEventListener("click",()=>this.controller.overview()),this.els.zfs.addEventListener("click",()=>this.toggleFullscreen()),this.fsChangeHandler=()=>{document.fullscreenElement||this.setFsFallback(!1),this.syncFullscreenButtons(),requestAnimationFrame(()=>this.controller.refitCurrentView())},document.addEventListener("fullscreenchange",this.fsChangeHandler);let t=this.els.sheetHead;if(t){let o=this.els.sheetToggle,r=d=>this.setSheetOpen(d);r(e.dataset.sheet==="open");let s=0,a=!1,l=!1,c=!1;o?.addEventListener("click",d=>{d.stopPropagation(),!a&&r(e.dataset.sheet!=="open")}),t.addEventListener("pointerdown",d=>{if(d.target.closest?.(".sl-seccard")){l=!1;return}c=!!d.target.closest?.(".sl-sheet-toggle"),l=!0,a=!1,s=d.clientY,t.setPointerCapture?.(d.pointerId)}),t.addEventListener("pointermove",d=>{if(!l||a)return;let p=d.clientY-s;p<-18?(r(!0),a=!0):p>18&&(r(!1),a=!0)}),t.addEventListener("pointerup",d=>{l&&!a&&!c&&Math.abs(d.clientY-s)<6&&r(e.dataset.sheet!=="open"),l=!1,c=!1,t.releasePointerCapture?.(d.pointerId)})}let n=()=>{if(this.root?.dataset.layout!=="narrow")return;let o=this.root.getAttribute("data-prices-open")==="true";this.root.setAttribute("data-prices-open",String(!o)),this.els.pricesSec?.setAttribute("aria-expanded",String(!o)),!o&&this.root.dataset.sheet!=="open"&&this.setSheetOpen(!0)};this.els.pricesSec?.addEventListener("click",o=>{o.target.closest("select,button")||n()}),this.els.pricesSec?.addEventListener("keydown",o=>{o.key!=="Enter"&&o.key!==" "||o.target.closest("select,button")||(o.preventDefault(),n())}),e.addEventListener("click",o=>{let r=o.target.closest("[data-sl-info]");if(!r||!e.contains(r))return;o.stopPropagation();let s=r.closest(".sl-info"),a=!s?.classList.contains("open");this.closeInfoPops(s),s?.classList.toggle("open",a),r.setAttribute("aria-expanded",String(a))}),e.addEventListener("pointerdown",o=>{o.target.closest(".sl-info")||this.closeInfoPops()}),this.tipEl=document.createElement("div"),this.tipEl.setAttribute("role","tooltip"),this.tipEl.className="sl-tip",this.els.map.appendChild(this.tipEl),this.els.map.addEventListener("pointerdown",o=>{this.handleMapPointerDown(o)},!0),this.els.map.addEventListener("mousemove",o=>{if(this.tipPinned)return;let r=this.els.map.getBoundingClientRect();this.tipPos={x:o.clientX-r.left,y:o.clientY-r.top},this.tipEl&&this.tipEl.style.display!=="none"&&this.placeTooltip()}),this.els.cta.addEventListener("click",()=>{this.els.cta.dataset.act==="find"?this.openBestSeatsForm():this.handleCta()})}setSheetOpen(e){let t=this.root;if(!t)return;t.dataset.sheet=e?"open":"peek";let n=this.els.sheetToggle;n?.setAttribute("aria-expanded",String(e)),n?.setAttribute("aria-label",e?this.tf("picker.collapseTicketPanel","Collapse ticket panel"):this.tf("picker.openTicketPanel","Open ticket panel"))}openBestSeatsForm(){this.setSheetOpen(!0),this.els.tray?.querySelector(".sl-ba")?.scrollIntoView({block:"nearest",behavior:this.reducedMotion()?"auto":"smooth"}),this.els.tray?.querySelector(".sl-ba-go")?.focus()}collapseSheet(){let e=this.root;!e||e.dataset.layout!=="narrow"||e.dataset.sheet!=="open"||(e.dataset.sheet="peek",this.els.sheetToggle?.setAttribute("aria-expanded","false"),this.els.sheetToggle?.setAttribute("aria-label",this.tf("picker.openTicketPanel","Open ticket panel")))}observeLayout(e){let t=()=>{let n=e.clientWidth;if(n<=0)return;let o=e.clientHeight,r=n!==this.pickerLayoutSize.width||o!==this.pickerLayoutSize.height;this.pickerLayoutSize={width:n,height:o},this.reportFramedHeight();let s=n<640?"narrow":"wide",a=o<560?"compact":"comfortable";(e.dataset.layout!==s||e.dataset.density!==a)&&(e.dataset.layout=s,e.dataset.density=a,this.controller.getRenderer()?.setSectionFocusDim?.(s!=="narrow"),s==="narrow"&&!e.dataset.sheet&&(e.dataset.sheet="peek"),this.dockLayoutChrome(),this.syncMinimapForLayout(),this.lastTrayKeys.size&&this.syncTray(),this.syncMapStepBack(),this.refreshExtendPrompt()),this.syncFullscreenAffordance(),r&&(this.minimap?.refreshMinimap(),this.scheduleFit())};this.ro=new ResizeObserver(t),this.ro.observe(e),t(),requestAnimationFrame(t)}async loadChart(e,t,n){let o=performance.now(),r=await this.controller.render(e);return t.loadChartAndStatuses=n(o),this.destroyed?null:r?(Object.assign(t,r.performanceProfile),r):(Re({apiBase:this.apiBase,event:this.opts.event,scope:this.performanceGroup?.surface??(this.performanceGroup?"performance_group":"event"),surface:this.performanceGroup?.surface==="season"?"season_picker":this.performanceGroup?"performance_group_picker":"seat_picker",outcome:"failure",stage:"load_chart",ms:t.loadChartAndStatuses,performanceProfile:t,view:"map",load:ze(this.opts.event),transport:this.opts.transport?"custom":"pubapi"}),this.els.boot.innerHTML=`<div class="sl-boot-title">${this.tf("picker.mapDidNotLoad","The seat map didn\u2019t load")}</div><div>${this.tf("picker.checkConnection","Check your connection and try again.")}</div><button type="button" class="sl-boot-retry">${this.tf("picker.accessRetry","Try again")}</button>`,this.els.boot.querySelector("button").addEventListener("click",()=>{let s=this.opts.container,a=this.opts;this.destroy(),new i({...a,container:s}).render()}),null)}resumeHostedOrder(){if(this.checkoutMode!=="hosted")return;let e=xn(this.opts.event);e?.outcome!=="success"||!e.orderId||this.openCheckoutPanel({kind:"resume",orderId:e.orderId})}buildPanelToggle(){if(!this.regions["top-right"])return;let e=document.createElement("button");e.type="button",e.className="sl-side-toggle",e.addEventListener("click",()=>this.setPanelCollapsed(!this.sideCollapsed)),this.sideToggleEl=e,this.regions["top-right"].appendChild(e),this.syncPanelToggle()}syncPanelToggle(){let e=this.sideToggleEl;if(!e)return;let t=this.sideCollapsed;e.setAttribute("aria-expanded",String(!t)),e.setAttribute("aria-label",t?this.tf("picker.showTicketPanel","Show the ticket panel"):this.tf("picker.hideTicketPanel","Hide the ticket panel")),e.title=t?this.tf("picker.showTicketPanel","Show the ticket panel"):this.tf("picker.hideTicketPanel","Hide the ticket panel"),e.innerHTML=t?`<svg viewBox="0 0 24 24"><path d="M15 6l-6 6 6 6"/></svg><span>${this.tf("picker.tickets","Tickets")}</span>`:'<svg viewBox="0 0 24 24"><path d="M9 6l6 6-6 6"/></svg>'}setPanelCollapsed(e){this.destroyed||(this.sideCollapsed=e,this.applyPanelCollapsed(),this.scheduleMotion(()=>this.controller.refitCurrentView(),340))}applyPanelCollapsed(){let e=this.root?.dataset.layout!=="narrow";this.root?.setAttribute("data-side-collapsed",String(this.sideCollapsed)),this.els.side?.toggleAttribute("inert",this.sideCollapsed&&e),this.syncPanelToggle()}buildAccessibilityMenu(e){let t=this.els.zoom??this.regions["bottom-right"]??this.els.map;t&&(this.a11yMenu=new yn(t,{event:String(this.opts.event),chart:()=>this.controller.doc?.name??null,needs:()=>this.controller.getAccessNeeds(),hasLimitedView:e,tf:(n,o)=>this.tf(n,o),isColorblindSafe:()=>this.cbSafe,setColorblindSafe:n=>this.setColorblindSafe(n),isLimitedViewHidden:()=>this.limitedViewFilter,setLimitedViewHidden:n=>{this.limitedViewFilter=n,this.controller.setCommercialLimitedFilter(n),this.pushAvailabilityTo3d()},applyAccessibilityFilter:n=>this.applyAccessibilityFilter(n),focusSeatsForFilter:()=>this.focusSeatsForFilter(),stepToAccessibleSection:n=>this.controller.focusNextAccessibleSection?.([n])??null}),this.cbEl=this.a11yMenu.colorblindRow())}focusSeatsForFilter(){if(this.controller.focusAccessibilityFilter?.()){this.explainAccessibilitySpread();return}this.rungsEl&&this.controller.getRung()!=="seats"&&(this.controller.setRung("seats"),this.collapseSectionCard(),this.syncRung())}explainAccessibilitySpread(){let e=this.controller.accessibilitySpread?.();!e?.wholeVenue||e.sections.length<2||this.toast((0,I.t)("picker.accessSpreadHint",{count:e.spaces,sections:e.sections.length}),"neutral")}applyAccessibilityFilter(e){this.controller.setAccessibilityFilter(e),this.syncPrices(),this.minimap?.refreshMinimap(),this.pushAvailabilityTo3d()}setAccessibilityFilter(e){this.applyAccessibilityFilter(e),this.a11yMenu?.syncAccessibilityFilter(e),e?.length&&this.focusSeatsForFilter()}focusAccessibilityFilter(){this.focusSeatsForFilter()}dockLayoutChrome(){let e=this.root?.dataset.layout==="narrow";this.applyPanelCollapsed();let t=this.els.zfs,n=this.els.headInfo?.parentElement;t&&n&&t.parentElement!==n&&(t.classList.add("sl-fs-pill"),n.insertBefore(t,this.els.hold??null));let o=this.extendEl;if(o){let s=e?this.regions["bottom-center"]??this.els.map:n;s&&o.parentElement!==s&&(o.dataset.dock=e?"map":"head",s===n?s.insertBefore(o,this.els.close??null):s.appendChild(o))}let r=this.els.pricesSec;r&&(e?(r.setAttribute("role","button"),r.tabIndex=0,r.setAttribute("aria-expanded",String(this.root?.getAttribute("data-prices-open")==="true"))):(r.removeAttribute("role"),r.removeAttribute("aria-expanded"),r.tabIndex=-1)),this.lastSection&&this.renderSectionCard(this.lastSection)}buildExtendPrompt(){Da(this)}buildBookedOverlay(){let e=document.createElement("div");e.className="sl-booked",e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.innerHTML=`<div class="sl-booked-badge"><svg viewBox="0 0 24 24"><path d="M20 6L9 17l-5-5"/></svg></div><div class="sl-booked-title">${this.tf("picker.allSetTitle","You're all set")}</div><div class="sl-booked-sub" data-ref="bookedSub"></div><ul class="sl-booked-list" data-ref="bookedList"></ul><button type="button" class="sl-booked-back" data-ref="bookedBack"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M15 18l-6-6 6-6"/></svg><span>${B(this.tf("picker.backToMap","Back to map"))}</span></button>`,this.root.appendChild(e),this.bookedEl=e,this.els.bookedSub=e.querySelector('[data-ref="bookedSub"]'),this.els.bookedList=e.querySelector('[data-ref="bookedList"]'),e.querySelector('[data-ref="bookedBack"]')?.addEventListener("click",()=>this.dismissBooked())}get onGAPromptHook(){return this.opts.onGAPrompt}tf(e,t){return g(e,t)}buildSoldoutOverlay(){if(!this.els.map)return;let e=document.createElement("div");e.className="sl-soldout",e.setAttribute("role","status");let t=(this.controller.doc?.theme?.brandName??this.opts.theme?.brandName??this.els.name?.textContent??this.tf("picker.soldOutEyebrow","This event")).toUpperCase(),n=document.createElement("div");n.className="sl-soldout-eyebrow",n.textContent=t;let o=document.createElement("div");o.className="sl-soldout-title",o.textContent=this.tf("picker.soldOutTitle","Sold out");let r=document.createElement("p");r.className="sl-soldout-copy",r.textContent=this.tf("picker.soldOutCopy","No reserved seats are currently available for this event."),e.append(n,o,r),this.els.map.appendChild(e),this.soldoutEl=e}syncSoldout(e,t){let n=this.controller.getGAAreas().length>0,o=this.isSoldOut(e,t,n);o!==this.soldOut&&(this.soldOut=o,this.soldoutEl?.classList.toggle("on",o))}isSoldOut(e,t,n){return!n&&e.length>0&&e.every(o=>(t[o.key]??0)===0)}setSalesClosed(e){let t=e||!!this.opts.readOnly;this.salesClosed!==t&&(this.salesClosed=t,this.applySalesClosed())}applySalesClosed(){this.salesClosed&&this.tableDialog&&!this.tableDialogHeld&&this.cancelTableDialog();let e=this.els.closedPill;if(e){e.classList.toggle("on",this.salesClosed);let t=this.els.closedPillText??e;t.textContent=this.tf("picker.salesClosedPill","Sales are closed")}this.root?.setAttribute("data-sales-closed",String(this.salesClosed)),this.salesClosed&&this.srEl&&(this.srEl.textContent=this.tf("picker.salesClosedToast","Sales are closed for this event.")),this.syncCta(),this.syncTray()}badgeHidden(e){return!!e?.hideBadge}buildBadge(e){if(this.badgeHidden(e))return;let t=this.els.foot;if(!t)return;let n=document.createElement("a");n.className="sl-powered",n.href="https://seatlayer.io/?ref=picker",n.target="_blank",n.rel="noopener noreferrer",n.setAttribute("aria-label",this.tf("picker.poweredBy","Powered by SeatLayer"));let o=document.createElement("span");o.className="sl-powered-mark",o.setAttribute("aria-hidden","true"),o.innerHTML=$i;let r=document.createElement("span");r.textContent=this.tf("picker.poweredBy","Powered by SeatLayer"),n.append(o,r),t.appendChild(n)}buildRegions(){if(!this.els.map)return;let e=["top-left","top-center","top-right","left-rail","bottom-left","bottom-center","bottom-right"];for(let t of e){let n=document.createElement("div");n.className="sl-anchor",n.dataset.region=t,this.els.map.appendChild(n),this.regions[t]=n}}cssVar(e){return this.root?getComputedStyle(this.root).getPropertyValue(e).trim():""}reducedMotion(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}scheduleMotion(e,t){let n=setTimeout(()=>{this.motionTimers.delete(n),this.destroyed||e()},t);this.motionTimers.add(n)}animateOnce(e,t,n=600){!e||this.reducedMotion()||(e.classList.remove(t),e.offsetWidth,e.classList.add(t),this.scheduleMotion(()=>e.classList.remove(t),n))}flashPickedSeat(e){this.reducedMotion()||this.controller.flashSeat(e,this.cssVar("--sl-accent")||"#f4b740")}flashHeldSeats(e){let t=this.reducedMotion(),n=(e.items??[]).filter(o=>o.objectType!=="ga").slice(0,10).map(o=>this.controller.seatByLabel(o.label)).filter(o=>!!o);Zr({regions:this.els,categories:this.controller.doc?.categories,pop:o=>this.controller.flashSeat(o,this.cssVar("--sl-accent")||"#f4b740"),focus:(o,r)=>this.controller.focusSection(o,r),focusSeats:o=>this.controller.focusSeats?.(o,{animate:!t})===!0,reducedMotion:t,screenPoint:o=>this.controller.worldToScreen(o),schedule:(o,r)=>this.scheduleMotion(o,r)},n)}committedSelection(){let e=this.confirmSeat?.id,t=this.tableDialog&&!this.tableDialogHeld?this.tableDialog.id:null;return this.controller.getSelection().filter(n=>n.id!==e&&n.id!==t)}pendingSelectionCount(){return Fa(this)}heldTicketCount(){return Va(this)}totalTicketCount(){return $a(this)}updateSelectionCapacity(){za(this)}syncCta(e=this.lastTrayCount,t=this.pendingSelectionCount()){ja(this,e,t)}setCtaPhase(e){Ga(this,e)}runCheckoutHandoff(e,t){return Ua(this,e,t)}holdStorageKey(){return qa(this)}rememberedHoldId(){return Ka(this)}rememberHold(e){Wa(this,e)}forgetHold(){Ya(this)}resumeHoldFromServer(e){return Xa(this,e)}restoreRememberedHold(){return Za(this)}activeFloorObjects(){let e=this.controller.doc;if(!e)return[];let t=e.floors;if(t?.length){let n=this.controller.getActiveFloorId();return(t.find(o=>o.id===n)??t[0]).objects??[]}return e.objects??[]}buildMinimap(){!this.els.map||this.root?.dataset.layout==="narrow"||(this.minimap=Ws({controller:this.controller,root:()=>this.root,cssVar:e=>this.cssVar(e),focusedSectionLabel:()=>this.lastSection?.label},this.regions["bottom-left"]??this.els.map))}syncMinimapForLayout(){let e=this.root?.dataset.layout==="narrow";if(e&&this.minimap){this.minimap.dispose(),this.minimap=null;return}!e&&!this.minimap&&this.buildMinimap()}catPrice(e){return mn(this,e)}catPriceRange(e){return fn(this,e)}buildPriceFilter(){al(this)}applyPriceBand(e){ll(this,e)}buildArenaChrome(){let e=this.controller.doc;if(!e||!this.els.map)return;let t=e.objects.some(n=>n.type==="section")||(e.floors??[]).some(n=>n.objects.some(o=>o.type==="section"));if(this.canOffer3d()){let n=document.createElement("div");n.className="sl-projection",n.setAttribute("role","group"),n.setAttribute("aria-label",this.tf("picker.venueView","Venue view")),n.innerHTML=`<button type="button" data-view="map" aria-pressed="true" title="${this.tf("picker.flat2dMap","Flat 2D map")}">${this.tf("picker.map","Map")}</button><button type="button" data-view="venue3d" aria-pressed="false" title="${this.tf("picker.interactive3dVenueView","Interactive 3D venue view")}">3D</button>`,n.querySelectorAll("button").forEach(o=>{if(o.dataset.view==="venue3d")for(let r of["pointerenter","focus","pointerdown"])o.addEventListener(r,Ti,{once:!0});o.addEventListener("click",()=>{this.setBuyerView(o.dataset.view)})}),this.regions["top-right"].appendChild(n),this.projectionEl=n,this.syncProjection()}if(t){let n=[...e.objects,...(e.floors??[]).flatMap(d=>d.objects)],o=new Set((e.zones??[]).map(d=>d.id)),s=n.some(d=>d.type==="section"&&typeof d.zone=="string"&&o.has(d.zone))?["zones","sections","seats"]:["sections","seats"],a=document.createElement("div");a.className="sl-rungs on sl-mo-indicator",a.setAttribute("role","group"),a.setAttribute("aria-label",(0,I.t)("picker.zoomLevel"));let l={zones:(0,I.t)("picker.rungLabel.zones"),sections:(0,I.t)("picker.rungLabel.sections"),seats:(0,I.t)("picker.rungLabel.seats")},c={zones:(0,I.t)("picker.rungTip.zones"),sections:(0,I.t)("picker.rungTip.sections"),seats:(0,I.t)("picker.rungTip.seats")};a.innerHTML=s.map(d=>`<button type="button" data-rung="${d}" title="${c[d]}" aria-pressed="false">${l[d]}</button>`).join(""),a.querySelectorAll("button").forEach(d=>{d.addEventListener("click",()=>{let p=d.dataset.rung;this.controller.setRung(p),p==="seats"&&this.collapseSectionCard()})}),this.regions["top-center"].appendChild(a),this.rungsEl=a,this.syncRung()}if(this.controller.isMultiFloor()){let n=bs({floors:this.controller.getFloors(),tf:(o,r)=>this.tf(o,r),onChoose:o=>{o===""?this.controller.setFloorOverview(!0):this.controller.setFloor(o),this.showSectionCard(null),this.syncFloors(),this.syncRung(),this.minimap?.refreshMinimap()}});this.regions["left-rail"].appendChild(n),this.floorsEl=n,this.syncFloors()}}syncRung(){let e=this.controller.getRung(),t=this.controller.seatsRevealed?.()??(e==="seats"||!!this.controller.getFocusedSection?.());this.root&&(this.root.dataset.zoomed=String(t)),this.syncMapStepBack(),this.minimap?.setAutoOpen(!1),this.rungsEl&&this.rungsEl.querySelectorAll("button").forEach(n=>{let o=n.dataset.rung===e;n.classList.toggle("on",o),n.setAttribute("aria-pressed",String(o))})}syncMapStepBack(){let e=this.els?.zout,t=this.els?.zfit;if(!e||!this.root)return;if(this.root.dataset.layout!=="narrow"){e.disabled&&(e.disabled=!1),t?.disabled&&(t.disabled=!1);return}let n=gs({focusedSection:this.controller.getFocusedSection?.()??null,seatsRevealed:this.controller.seatsRevealed?.()??!0,atVenueFit:this.controller.atVenueFit?.()})==="none";e.disabled=n,t&&(t.disabled=n)}syncProjection(){this.els.pricesHint&&(this.els.pricesHint.textContent=this.buyerView==="venue3d"?this.tf("picker.priceHint3d","Colours in the venue are ticket types \u2014 choose one below to show just those seats."):this.tf("picker.priceHint","Colours on the map are ticket types \u2014 tap one below to show just those seats.")),this.projectionEl&&this.projectionEl.querySelectorAll("button").forEach(e=>{let t=e.dataset.view===this.buyerView;e.classList.toggle("on",t),e.setAttribute("aria-pressed",String(t))})}canOffer3d(){return this.opts.enable3D===!1||!this.controller.doc||!ki()?!1:this.allSeats().length<=this.max3dSeats()}max3dSeats(){let e=this.opts.max3DSeats;if(typeof e=="number"&&e>0)return e;let t=globalThis.navigator;return(t?.hardwareConcurrency??8)<=4||(t?.deviceMemory??8)<=4||(globalThis.matchMedia?.("(pointer: coarse)").matches??!1)?Tl/2:Tl}syncFloors(){ys(this.floorsEl,this.controller.getActiveFloorId(),this.controller.isFloorOverview())}get sectionCard(){return this.sectionCardCache||(this.sectionCardCache=new sn({controller:this.controller,map:()=>this.els.map,root:()=>this.root,collapseSheet:()=>this.collapseSheet(),region:e=>this.regions[e],refreshMinimap:()=>this.minimap?.refreshMinimap(),activeFloorObjects:()=>this.activeFloorObjects(),sectionNeighbours:e=>this.sectionNeighbours(e),catPriceRange:e=>this.catPriceRange(e),money:e=>this.money(e),suppressPricing:()=>this.suppressPricing,priceBandKeys:()=>this.priceBandKeys})),this.sectionCardCache}showSectionCard(e){this.sectionCard.show(e)}renderSectionCard(e){this.sectionCard.render(e)}collapseSectionCard(){this.sectionCard.collapse()}sectionCardOnView(){this.sectionCard.onView()}sectionNeighbours(e){let t=this.activeFloorObjects().filter(o=>o.type==="section"&&!this.controller.isSectionClosed(o.id)&&this.controller.getSectionSeatCount(o.id)>0);if(t.length<2)return null;let n=t.findIndex(o=>o.id===e);return n<0?null:{previous:t[(n-1+t.length)%t.length],next:t[(n+1)%t.length]}}markedSeatAnnouncement(e){let t=Jn(this.controller.getRenderer()?.getSeatMark?.(e.id),this.performanceGroup?.nights?.());return Ps(t,e.displayLabel??e.label,this.opts.locale)}announceSeat(e){if(!this.srEl)return;if(!e){this.srEl.textContent="";return}let t=this.markedSeatAnnouncement(e);if(t){this.srEl.textContent=t;return}let n=this.controller.doc?.categories.find(h=>h.key===e.categoryKey),o=this.controller.getStatus(e.id)??"free",r=o==="free"?this.tf("picker.statusAvailable","available"):o==="held"?this.tf("picker.statusOnHold","on hold"):this.tf("picker.statusTaken2","taken"),s=n?this.catPriceRange(n):void 0,a=!this.suppressPricing&&s?s.min===s.max?this.money(s.min):`${this.money(s.min)}\u2013${this.money(s.max)}`:void 0,l=this.controller.tableSelection(e.id),c=l??this.controller.seatDetails(e.id),d=nt(c),p=c?.rowLabel??c?.displayLabel??e.displayLabel??e.label,u=l?`${d} ${p}, ${l.bookingMode==="variable"?(0,I.t)("picker.minToMaxGuests",{min:l.minOccupancy,max:l.maxOccupancy}):(0,I.t)("picker.capacityGuests",{count:l.capacity})}`:c?.objectType==="booth"?`${d} ${p}`:c?.objectType==="table"?`${d} ${p}, ${(0,I.t)("picker.seatNumberLower",{label:c.seatNumber??e.label})}`:(0,I.t)("picker.seatLabel",{label:c?.displayLabel??e.displayLabel??e.label});this.srEl.textContent=`${u}, ${n?.label??e.categoryKey}${a?`, ${a}`:""}, ${r}`}showTableDialog(e,t,n){this.dismissTableDialog(!1),this.tableDialog={...e},this.tableDialogHeld=t,this.tableDialogReturnFocus=n??document.activeElement;let o=this.controller.doc?.categories.find(a=>a.key===e.categoryKey),r=e.bookingMode==="variable",s=document.createElement("div");s.className="sl-table-scrim",s.innerHTML=cr(e,{variable:r,held:t,typeWord:nt(e),categoryLabel:o?.label??e.categoryKey,suppressPricing:this.suppressPricing,unitPrice:this.money(this.paidPrice(e.categoryKey,e.tierId??null,e.price,e.label))}),this.root.appendChild(s),this.tableDialogEl=s,this.renderTableDialogState(),s.querySelectorAll("[data-table-step]").forEach(a=>{a.addEventListener("click",()=>{if(!this.tableDialog)return;let l=Math.max(this.tableDialog.minOccupancy,Math.min(this.tableDialog.maxOccupancy,this.tableDialog.quantity+Number(a.dataset.tableStep)));this.tableDialog={...this.tableDialog,quantity:l},this.renderTableDialogState()})}),s.querySelector(".sl-table-cancel").addEventListener("click",()=>this.cancelTableDialog()),s.querySelector(".sl-table-confirm").addEventListener("click",()=>{this.confirmTableDialog()}),s.addEventListener("mousedown",a=>{a.target===s&&this.cancelTableDialog()}),s.addEventListener("keydown",a=>{if(a.key!=="Tab")return;let l=[...s.querySelectorAll('button:not(:disabled),[tabindex]:not([tabindex="-1"])')];if(!l.length)return;let c=l[0],d=l[l.length-1];a.shiftKey&&document.activeElement===c?(a.preventDefault(),d.focus()):!a.shiftKey&&document.activeElement===d&&(a.preventDefault(),c.focus())}),requestAnimationFrame(()=>s.querySelector(r?'[data-table-step="-1"]':".sl-table-confirm")?.focus())}renderTableDialogState(){let e=this.tableDialog,t=this.tableDialogEl;if(!e||!t)return;let n=t.querySelector("output[data-table-qty]");n&&(n.value=String(e.quantity));let o=t.querySelector("input[data-table-qty]");o&&(o.value=String(e.quantity)),t.querySelectorAll("[data-table-step]").forEach(a=>{let l=Number(a.dataset.tableStep);a.disabled=l<0?e.quantity<=e.minOccupancy:e.quantity>=e.maxOccupancy});let r=this.paidPrice(e.categoryKey,e.tierId??null,e.price,e.label),s=t.querySelector("[data-table-total]");s&&(s.textContent=this.money(r*e.quantity))}async confirmTableDialog(){let e=this.tableDialog,t=this.tableDialogHeld;if(!e)return;let n=this.tableDialogEl?.querySelector(".sl-table-confirm");if(n&&(n.disabled=!0,n.textContent=t?this.tf("picker.updatingEllipsis","Updating\u2026"):this.tf("picker.selectingEllipsis","Selecting\u2026")),t){try{let o=await this.controller.replaceTableQuantity(e.label,e.quantity,this.opts.holdTtlMs);if(!o){this.toast(this.tf("picker.guestCountCouldNotBeSecured","That guest count could not be secured. Your current table hold is unchanged."),"warning"),this.renderTableDialogState(),n&&(n.disabled=!1,n.textContent=this.tf("picker.updateTable","Update table"));return}this.hold={holdId:o.holdId,expiresAt:o.expiresAt,seats:o.seats,items:o.items},this.startHoldTimer(o.expiresAt),this.dismissTableDialog(),this.syncTray(),this.emitHoldChange(),this.toast((0,I.t)("picker.tableUpdatedForGuests",{label:e.label,count:e.quantity}),"success")}catch(o){this.opts.onError?.(o),this.toast(this.tf("picker.guestCountNoLongerAvailable","That guest count is no longer available. Your current hold is unchanged."),"error"),n&&(n.disabled=!1,n.textContent=this.tf("picker.updateTable","Update table"))}return}if(!this.controller.setTableQuantity(e.label,e.quantity)){n&&(n.disabled=!1,n.textContent=e.bookingMode==="variable"?this.tf("picker.selectTable","Select table"):this.tf("picker.selectWholeTable","Select whole table"));return}this.dismissTableDialog(),this.collapseSectionCard(),this.syncTray()}cancelTableDialog(){let e=this.tableDialog,t=this.tableDialogHeld;this.dismissTableDialog(),e&&!t&&this.controller.deselect(e.physicalSeatIds)}dismissTableDialog(e=!0){let t=this.tableDialogReturnFocus;this.tableDialogEl?.remove(),this.tableDialogEl=null,this.tableDialog=null,this.tableDialogHeld=!1,this.tableDialogReturnFocus=null,e&&requestAnimationFrame(()=>(t?.isConnected?t:this.root)?.focus())}get confirmCard(){return this.confirmCardCache||(this.confirmCardCache=new dn({controller:this.controller,root:()=>this.root,els:()=>this.els,regions:()=>this.regions,hideTooltip:()=>{this.tipEl&&(this.tipEl.style.display="none")},tf:(e,t)=>this.tf(e,t),money:e=>this.money(e),paidPrice:(e,t,n,o)=>this.paidPrice(e,t,n,o),suppressPricing:()=>this.suppressPricing,reducedMotion:()=>this.reducedMotion(),scheduleMotion:(e,t)=>this.scheduleMotion(e,t),canOffer3d:()=>this.canOffer3d(),buyerView:()=>this.buyerView,view3dHandle:()=>this.view3dHandle,view3dCompareSeatIds:()=>this.view3dCompareSeatIds,rememberView3dReturnSeat:e=>{this.view3dReturnSeat=e},enter3d:e=>{this.enter3d(e)},performanceGroup:()=>this.performanceGroup,seatViewEnabled:()=>this.seatViewEnabled(),openSeatView:e=>{this.openSeatView(e)},openSeatConfidencePassport:(e,t)=>this.openSeatConfidencePassport(e,t),saveView3dComparisonSeat:e=>this.saveView3dComparisonSeat(e),resolveAssetUrl:e=>this.buyerAssetUrls.resolve(e),onError:e=>this.opts.onError?.(e),liftToastOverConfirm:()=>this.liftToastOverConfirm(),fitTranslatedRows:()=>this.fitTranslatedRows(),syncTray:()=>this.syncTray(),syncSelectionTo3d:()=>this.syncSelectionTo3d(),collapseSectionCard:()=>this.collapseSectionCard(),applyPanelCollapsed:()=>this.applyPanelCollapsed(),dismiss:()=>this.dismissConfirm(),reanchor:()=>this.reanchorConfirm(),inviteCommit:(e,t)=>this.inviteCommit(e,t),addSeatLabel:e=>this.addSeatLabel(e)})),this.confirmCardCache}showConfirm(e,t="add"){this.confirmCard.show(e,t)}reanchorConfirm(){this.confirmCard.reanchor()}dismissConfirm(){this.confirmCard.dismiss()}async commitConfirm(){await this.confirmCard.commit()}cancelConfirm(){this.confirmCard.cancel()}closeConfirm(){this.dismissConfirm()}inviteCommit(e,t){Us(e,t,this.reducedMotion())}addSeatLabel(e){return qs(e,(t,n)=>this.tf(t,n))}seatViewEnabled(){return this.opts.seatView!==!1}allSeats(){return this.allSeatsCache||(this.allSeatsCache=[...this.controller.getExpandedSeats()]),this.allSeatsCache}async openSeatView(e){if(!this.root||!this.seatViewEnabled())return;let t=++this.seatViewGen,n=this.controller.doc,o=this.controller.getActiveFloorId(),r=e.focalPoint??n?.floors?.find(p=>p.id===o)?.focalPoint??n?.focalPoint??{x:0,y:0},s,a,l=!1;if(e.viewUrl){let p,u=null;try{let f=e.viewMeta?.previewUrl;f&&f!==e.viewUrl?(u=await this.buyerAssetUrls.resolve(f),p=e.viewUrl):p=await this.buyerAssetUrls.resolve(e.viewUrl)}catch(f){t===this.seatViewGen&&this.opts.onError?.(f);return}if(t!==this.seatViewGen||!p||e.viewMeta?.previewUrl&&e.viewMeta.previewUrl!==e.viewUrl&&!u||!this.root||!this.seatViewEnabled())return;let h={url:p,...u?{previewUrl:u}:{},...e.viewMeta?.sourceWidth!==void 0?{sourceWidth:e.viewMeta.sourceWidth}:{},...e.viewMeta?.sourceHeight!==void 0?{sourceHeight:e.viewMeta.sourceHeight}:{},...e.viewMeta?.previewWidth!==void 0?{previewWidth:e.viewMeta.previewWidth}:{},...e.viewMeta?.previewHeight!==void 0?{previewHeight:e.viewMeta.previewHeight}:{},...e.viewMeta?.variants?.length?{variants:e.viewMeta.variants}:{},...e.viewMeta?.coverage?{coverage:e.viewMeta.coverage}:{},...e.viewMeta?.capturedAt?{capturedAt:e.viewMeta.capturedAt}:{},...e.viewMeta?.sourceLabel?{sourceLabel:e.viewMeta.sourceLabel}:{}};s=h,a=(0,Sn.seatViewDisclosure)(h),l=(0,Sn.isAuthoredSeatView)(h)}else{let p;try{let{generateSeatPanorama:u}=await Ei();p=u(e,r,this.allSeats())}catch(u){t===this.seatViewGen&&this.opts.onError?.(u);return}if(t!==this.seatViewGen||!this.root||!this.seatViewEnabled())return;s={url:p.url,generated:!0},a=(0,I.t)("picker.illustrationCaption",{m:p.distanceM})}this.closeSeatView(!1);let c=(0,I.t)("picker.viewFromSeat",{label:e.label}),d=Gi({root:this.root,source:s,caption:a,real:l,closeLabel:this.tf("picker.close","Close"),dragHint:Qe(),viewFromSeatLabel:c,real360Label:(0,I.t)("picker.real360"),previewLabel:(0,I.t)("picker.preview"),resolveAsset:p=>this.buyerAssetUrls.resolve(p),onClose:()=>this.closeSeatView()});this.viewEl=d.element,this.viewCleanup=()=>d.dispose()}closeSeatView(e=!0){e&&(this.seatViewGen+=1),this.viewCleanup?.(),this.viewCleanup=null,this.viewEl?.remove(),this.viewEl=null}money(e){let t=this.opts.pricing?.formatter;if(t)return t(e,this.currency);let n=Number.isInteger(e);return(0,I.formatMoney)(e,this.currency,{locale:this.opts.locale,fallback:(o,r)=>`${o} ${r}`,...n?{minimumFractionDigits:0,maximumFractionDigits:0}:{}})}scheduleOfferBoundary(e){if(this.offerBoundaryTimer&&clearTimeout(this.offerBoundaryTimer),this.offerBoundaryTimer=null,!this.api.availability||this.destroyed)return;let t=Date.now(),n=fs(e,t);if(n==null)return;let o=6*36e5,r=Math.min(Math.max(n-t+1e3,1e3),o);this.offerBoundaryTimer=setTimeout(()=>{this.offerBoundaryTimer=null,!document.hidden&&this.refreshOfferAvailability(!1)},r)}offerReadIsCurrent(){return!!this.offerReadInFlight||Date.now()-this.offerReadSettledAt<Hp}scheduleOfferRefresh(e){!this.api.availability||this.destroyed||this.offerReadIsCurrent()||(this.offerRefreshTimer&&clearTimeout(this.offerRefreshTimer),this.offerRefreshTimer=setTimeout(()=>{this.offerRefreshTimer=null,this.refreshOfferAvailability(e)},e?180:0))}refreshOfferAvailability(e){if(!this.api.availability||this.destroyed)return Promise.resolve();if(this.offerReadInFlight)return this.offerReadInFlight;if(this.offerReadIsCurrent())return Promise.resolve();let t=this.readOfferAvailability(e).finally(()=>{this.offerReadInFlight===t&&(this.offerReadInFlight=null)});return this.offerReadInFlight=t,t}async readOfferAvailability(e){if(!(!this.api.availability||this.destroyed))try{let t=await this.api.availability(this.opts.event,e);if(this.destroyed)return;this.offerReadSettledAt=Date.now();let n=on(t);if(!n)return;this.offerAvailability=n,this.applyChannelPricing(n.channelPricing),this.scheduleOfferBoundary(n);let o=rn(n),r={...this.hostPricing?.prices??{},...o},s=Object.keys(r).length>0||this.hostPricing?.formatter?{prices:r,...this.hostPricing?.formatter?{formatter:this.hostPricing.formatter}:{}}:void 0;this.setPricing(s),this.syncOffer(),this.opts.onOfferAvailabilityChange?.(n)}catch{!this.destroyed&&!this.offerBoundaryTimer&&!document.hidden&&(this.offerBoundaryTimer=setTimeout(()=>{this.offerBoundaryTimer=null,!document.hidden&&this.refreshOfferAvailability(!1)},3e4))}}offerPrice(e){return e?this.offerAvailability?.prices.find(t=>t.categoryKey===e)??null:null}applyChannelPricing(e){this.channelByObject.clear(),this.pricesByChannel.clear();for(let t of e?.channels??[])this.pricesByChannel.set(t.channelId,t.priceOverrides);for(let t of e?.objects??[])this.pricesByChannel.has(t.channelId)&&this.channelByObject.set(t.label,t.channelId)}syncOffer(){let e=this.els.offer;if(!e)return;if(this.suppressPricing){e.classList.remove("has"),e.replaceChildren();return}let t=this.offerAvailability,n=t?.release??null,o=n?null:t?.upcoming??null;if(!t||t.state==="closed"||t.state==="sold-out"||!n&&!o){e.classList.remove("has"),e.replaceChildren();return}let r=n??o,s=document.createElement("div");s.className="sl-offer-main";let a=document.createElement("div");a.className="sl-offer-copy";let l=document.createElement("span");l.className="sl-offer-kicker",l.textContent=n?this.tf("picker.currentTicketOffer","Current ticket offer"):this.tf("picker.upcomingTicketOffer","Upcoming ticket offer");let c=document.createElement("strong");c.className="sl-offer-name",c.textContent=r.name||(n?this.tf("picker.currentOffer","Current offer"):this.tf("picker.scheduledOffer","Scheduled offer"));let d=document.createElement("span");d.className="sl-offer-line";let p=[];n&&t.fromPrice!=null&&p.push(this.money(t.fromPrice/100)),n&&r.remaining!=null&&p.push((0,I.t)("picker.offerRemainingAvailable",{count:r.remaining})),n&&r.endsAt!=null&&p.push((0,I.t)("picker.offerUntil",{time:Ai(r.endsAt,this.eventTimezone,this.opts.locale)})),o?.startsAt!=null&&p.push((0,I.t)("picker.offerStarts",{time:Ai(o.startsAt,this.eventTimezone,this.opts.locale)})),d.textContent=p.join(" \xB7 "),a.append(l,c,d);let u=document.createElement("details");u.className="sl-offer-info";let h=document.createElement("summary");h.setAttribute("aria-label",(0,I.t)("picker.howOfferWorks",{name:c.textContent??""})),h.textContent="i";let f=document.createElement("div");f.className="sl-offer-detail",f.textContent=n?this.tf("picker.offerDetailActive","This price applies automatically to eligible seats. Tickets in active carts temporarily reduce the available quantity; released or expired holds return it. When the offer ends, the next matching offer or normal ticket price takes over."):this.tf("picker.offerDetailUpcoming","Tickets are available at their normal price now. This scheduled offer will apply automatically to eligible seats when it starts."),u.append(h,f),s.append(a,u),e.replaceChildren(s),e.classList.add("has")}paidPrice(e,t,n,o){let r=o?this.channelByObject.get(o):void 0;if(r&&e){let a=this.pricesByChannel.get(r)?.find(l=>l.categoryKey===e&&l.tierId===(t??null));if(a)return a.price}let s=e?this.opts.pricing?.prices?.[e]:void 0;return s===void 0?n:typeof s=="number"?s:t&&s.tiers?.[t]!==void 0?s.tiers[t]:s.base??n}legendDeps(){return cl(this)}syncPriceRail(e,t,n=this.legendDeps()){dl(this,e,t,n)}syncPrices(){pl(this)}focusCategory(e){hl(this,e)}evictTakenSelections(){let e=new Set([...this.controller.currentHold()?.labels??[],...this.holdingLabels]),t=this.controller.getSelection().filter(n=>!e.has(n.label)&&(this.controller.getStatus(n.id)??"free")!=="free");t.length&&(this.controller.deselect(t.map(n=>n.id)),this.toast((0,I.t)("picker.seatJustTakenByAnother",{label:t[0].label}),"error"))}syncTray(){if(!this.els.tray)return;this.updateSelectionCapacity();let{seats:e,gaAreas:t,heldItems:n,heldLabels:o,total:r,count:s}=un(this),a=[],l=new Set;if(!this.salesClosed){let y=this.performanceGroup?.nightSummary?.()??[];y.length&&a.push(Ss(y,{title:this.tf("picker.group.yourSeatsByNight","Your seats by night"),empty:this.tf("picker.group.noSeatsChosenYet","No seats yet")}));let H=this.performanceGroup?.selectionModeSwitch;H&&a.push(`<button type="button" class="sl-pg-switch" data-pg-switch-mode>${B(H.label)}</button>`)}let c={salesClosed:this.salesClosed,hasPicks:e.length>0||n.length>0,hasGaAreas:t.length>0,groupMode:this.performanceGroup?this.performanceGroup.selectionMode??"same_seat":null,seated:!!this.controller.doc?.objects?.some(y=>y.type!=="gaArea"),venue3d:this.buyerView==="venue3d",whenText:this.eventWhenText?String(this.eventWhenText):void 0};a.push(Ia(c)),this.els.trayHint&&(this.els.trayHint.textContent=Oa(c)),this.els.seatsInfo&&(this.els.seatsInfo.hidden=this.salesClosed);let d=!e.length&&!n.length&&!Ve(this.gaQty,this.hold?.items??[]);if(!this.performanceGroup&&!this.salesClosed&&!this.hold&&(d||this.bestAvailableBusy||this.bestAvailableConfirm)){let y=(this.controller.doc?.categories??[]).filter(C=>!C.notForSale),H=this.controller.getBestAvailableZones();this.baZone&&!H.some(C=>C.id===this.baZone)&&(this.baZone=""),a.push(Ra({confirming:this.bestAvailableConfirm,busy:this.bestAvailableBusy,reopened:!1,quantity:this.baQty,premium:this.baPremium,offerPremium:this.controller.hasPremiumSeats(),categories:y,zones:H,selectedCategory:this.baCat,selectedZone:this.baZone}))}let p=(y,H,C,N=1,M,A,_)=>La({categoryLabel:_,d:y?this.controller.seatDetails(y):null,area:C==="ga"?t.find(D=>D.id===M):void 0,label:H,objectType:C,quantity:N,identity:A,performanceLabel:this.performanceGroup?.activePerformanceLabel?.(),performanceDates:this.performanceGroup?.selectedPerformanceDates?.()}),u=B,h=[];for(let y of Rr(n)){let H=y.objectType==="ga"?`held:ga:${y.objectId}:${y.tierId??""}`:`held:${y.label}`;l.add(H);let C=this.controller.doc?.categories.find(W=>W.key===y.categoryKey),N=y.tierId?C?.tiers?.find(W=>W.id===y.tierId)?.name:void 0,M=y.objectType!=="ga"?this.controller.seatByLabel(y.label):null,A=y.objectType==="table"?this.controller.tableSelection(y.label):null,_=M?this.controller.seatDetails(M.id):null,D=this.seatViewEnabled()&&!!M&&y.objectType!=="table"&&!!this.deliverableViewReference(M),V=u(this.tf("picker.heldForYou","Held for you")),ne=A?.bookingMode==="variable"?`<button type="button" class="sl-table-edit" data-table-edit="${u(encodeURIComponent(y.label))}">${u((0,I.t)("picker.guestsCountEdit",{count:y.quantity??1}))}</button>`:"",ee=this.paidPrice(y.categoryKey,y.tierId,y.unitPrice,y.label)*(y.quantity??1);h.push({key:H,fresh:!this.lastTrayKeys.has(H),held:!0,seatIds:[],heldLabels:y.labels,removeAria:(0,I.t)("picker.removeHeldTicketLabel",{label:Vn(y,t)}),locateId:M?.id??null,section:_?.sectionLabel??"",rowLabel:_&&X(_)||"",seatLabel:_?.seatNumber??y.label,categoryLabel:`${C?.label??y.categoryKey}${N?` \xB7 ${N}`:""}`,categoryColor:this.controller.getRenderer?.()?.categoryDisplayColor?.(y.categoryKey)??C?.color??"",identityHtml:p(M?.id??null,y.label,y.objectType,y.quantity??1,y.objectId,A??void 0,`${C?.label??y.categoryKey}${N?` \xB7 ${N}`:""}`),stateHtml:`<span class="sl-ticket-state held" aria-label="${V}" title="${V}"><svg viewBox="0 0 24 24"><rect x="5" y="10" width="14" height="10" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3"/></svg></span>`,extrasHtml:ne,amount:ee,amountText:this.suppressPricing?"":this.money(ee),noteHtml:Je(M??void 0),railHtml:this.performanceGroup?"":co((0,I.t)("picker.removeHeldTicketLabel",{label:Vn(y,t)}),D?y.label:null)})}let f=this.seatViewEnabled();for(let y of e.filter(H=>!o.has(H.label))){let H=`seat:${y.id}`;l.add(H);let C=this.controller.doc?.categories.find(W=>W.key===y.categoryKey),N=y.tiers&&y.tiers.length&&!this.suppressPricing?`<select class="tier" data-tier="${u(y.id)}" aria-label="${u((0,I.t)("picker.ticketTierFor",{label:y.label}))}">`+y.tiers.map(W=>`<option value="${u(W.id)}"${W.id===y.tierId?" selected":""}>${u(W.name)} \xB7 ${u(this.money(this.paidPrice(y.categoryKey,W.id,W.price,y.label)))}</option>`).join("")+"</select>":"",M=y.tiers?.find(W=>W.id===y.tierId)??y.tiers?.[0],A=M?.buyerMessage?.trim()||(M?.restriction==="companion"?this.tf("picker.companionRequiresWheelchair","Requires the adjacent wheelchair place"):""),_=this.controller.seatDetails(y.id),D=u(this.tf("picker.selected","Selected")),V=(0,I.t)("picker.removeSeatLabel",{label:y.label}),ne=(y.objectType==="table"&&y.bookingMode==="variable"?`<button type="button" class="sl-table-edit" data-table-edit="${u(encodeURIComponent(y.label))}">${u((0,I.t)("picker.guestsCountEdit",{count:y.quantity??1}))}</button>`:"")+N,ee=this.paidPrice(y.categoryKey,y.tierId??null,y.price,y.label)*(y.quantity??1);h.push({key:H,fresh:!this.lastTrayKeys.has(H),held:!1,seatIds:[y.id],heldLabels:[],locateId:y.id,section:_?.sectionLabel??"",rowLabel:_&&X(_)||"",seatLabel:_?.seatNumber??y.label,categoryLabel:C?.label??y.categoryKey,identityHtml:p(y.id,y.label,y.objectType,y.quantity??1,y.objectId,y,C?.label??y.categoryKey),categoryColor:this.controller.getRenderer?.()?.categoryDisplayColor?.(y.categoryKey)??C?.color??"",stateHtml:`<span class="sl-ticket-state" aria-label="${D}" title="${D}"><svg viewBox="0 0 24 24"><path d="M5 12l4 4L19 6"/></svg></span>`,extrasHtml:ne,amount:ee,amountText:this.suppressPricing?"":this.money(ee),removeAria:V,noteHtml:Je(y)+(A?`<small class="sl-tier-note">${u(A)}</small>`:""),railHtml:co(V,f&&y.objectType!=="table"&&this.deliverableViewReference(this.controller.seatByLabel(y.label)??{})?y.label:null)})}h.length&&a.push(h.map(Ha).join("")),t.length&&a.push(Dr(this,t,n)),this.els.tray.innerHTML=a.join("")+(this.salesClosed?"":this.lapse.noteHtml()),this.lastTrayKeys=l,this.lapse.wire(this.els.tray),this.els.tray.querySelector("[data-pg-switch-mode]")?.addEventListener("click",()=>this.performanceGroup?.selectionModeSwitch?.activate());let b=this.performanceGroup?.selectNight;b&&Is(this.els.tray,y=>b(y)),this.els.tray.querySelectorAll("[data-ba]").forEach(y=>{y.addEventListener("click",()=>{this.baQty=Math.max(1,Math.min(this.maxTickets,this.baQty+Number(y.dataset.ba))),this.syncTray()})}),this.els.tray.querySelector("[data-ba-cat]")?.addEventListener("change",y=>{this.baCat=y.target.value}),this.els.tray.querySelector("[data-ba-zone]")?.addEventListener("change",y=>{this.baZone=y.target.value}),this.els.tray.querySelector("[data-ba-premium]")?.addEventListener("click",()=>{this.baPremium=!this.baPremium,this.syncTray()}),this.els.tray.querySelector(".sl-ba-go")?.addEventListener("click",()=>{if(this.pendingSelectionCount()>0){this.bestAvailableConfirm=!0,this.syncTray(),this.els.tray.querySelector("[data-ba-replace]")?.focus();return}this.bestAvailable(this.baQty,this.baCat||void 0,{preferPremium:this.baPremium,zoneId:this.baZone||void 0})}),this.els.tray.querySelector("[data-ba-cancel]")?.addEventListener("click",()=>{this.bestAvailableConfirm=!1,this.syncTray(),this.els.tray.querySelector(".sl-ba-go")?.focus()}),this.els.tray.querySelector("[data-ba-replace]")?.addEventListener("click",()=>{this.bestAvailableConfirm=!1,this.bestAvailable(this.baQty,this.baCat||void 0,{preferPremium:this.baPremium,zoneId:this.baZone||void 0})}),this.els.tray.querySelectorAll(".sl-chip .rm").forEach(y=>{y.addEventListener("click",()=>{let H=y.closest(".sl-chip");if(H.dataset.held){this.removeHeldLabels(decodeURIComponent(H.dataset.held).split(`
2921
+ `),H);return}let C=H.dataset.seat.split(" "),N=()=>{this.controller.deselect(C)};if(this.reducedMotion()){N();return}H.classList.remove("sl-enter"),H.classList.add("sl-leave","sl-mo-collapse"),this.scheduleMotion(N,Q.collapse)})}),this.els.tray.querySelectorAll("[data-table-edit]").forEach(y=>{y.addEventListener("click",H=>{H.stopPropagation();let C=decodeURIComponent(y.dataset.tableEdit??""),N=this.controller.tableSelection(C);if(!N)return;let M=n.find(A=>A.label===C&&A.objectType==="table");this.showTableDialog({...N,quantity:M?.quantity??N.quantity},!!M,y)})}),this.els.tray.querySelectorAll(".sl-chip .tier").forEach(y=>{y.addEventListener("change",()=>this.controller.setSeatTier(y.dataset.tier,y.value||null))}),this.els.tray.querySelectorAll(".sl-chip .view[data-view-label]").forEach(y=>{y.addEventListener("click",()=>{let H=this.controller.seatByLabel(y.dataset.viewLabel);H&&this.openSeatView(H)})}),this.els.tray.querySelectorAll(".sl-chip[data-locate]").forEach(y=>{let H=()=>this.controller.flashSeat(y.dataset.locate,this.cssVar("--sl-accent")||"#f4b740");y.addEventListener("mouseenter",H),y.addEventListener("focusin",H)}),Br(this,this.els.tray,t),this.controller.setGASelection(Mr(this.gaQty)),this.salesClosed&&this.els.tray.querySelectorAll(".sl-ba-go,[data-ba],[data-ba-cat],[data-ba-zone],[data-ba-replace],.sl-ga button").forEach(y=>{y.disabled=!0});let k=this.pendingSelectionCount(),S=this.lastTrayCount,v=this.lastTrayTotal,P=Rs(this.performanceGroup?.groupSelectionSummary?.(),this.performanceGroup?.selectionMode??"same_seat");this.els.count.textContent=P||(s?(0,I.tCount)("picker.ticketsCount",s):this.tf("picker.noSeatsSelected","No seats selected")),this.els.total.textContent=s&&!this.suppressPricing?this.money(r):"",this.root?.setAttribute("data-has-selection",String(s>0)),this.root?.setAttribute("data-ba-active",String(this.bestAvailableConfirm||this.bestAvailableBusy)),this.els.seatSummary&&(this.els.seatSummary.textContent=P||(s?(0,I.tCount)("picker.seatsSelectedCount",s):"")),this.syncCta(s,k),s!==S&&this.animateOnce(this.els.count,"sl-value-pop",380),r!==v&&this.animateOnce(this.els.total,"sl-value-pop",380),S===0&&s>0&&(this.animateOnce(this.els.cta,"sl-ready",520),this.sideCollapsed&&this.root?.dataset.layout!=="narrow"&&this.setPanelCollapsed(!1)),this.lastTrayCount=s,this.lastTrayTotal=r,this.opts.onSelectionChange?.(e),this.emitSelectionValidity(s,e),this.scheduleFit()}scheduleFit(){if(this.fitScheduled||this.destroyed)return;this.fitScheduled=!0;let e=()=>{this.fitScheduled=!1,this.destroyed||this.fitTranslatedRows()};typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()}fitTranslatedRows(){cs(this.confirmEl?.querySelector(".sl-confirm-row")),this.els.tray?.querySelectorAll(".sl-chip-pos").forEach(ds),this.els.tray?.querySelectorAll(".sl-ba-go").forEach(ps)}emitSelectionValidity(e,t){let n=this.controller.getSelectionValidity(e);n&&(n.seats=t,this.opts.onSelectionValidityChange?.(n),n.isValid?this.lastSelectionValidity!==!0&&this.opts.onSelectionValid?.(t):this.lastSelectionValidity!==!1&&this.opts.onSelectionInvalid?.(n),this.lastSelectionValidity=n.isValid)}async removeHeldLabels(e,t){let n=e.filter(s=>s&&!this.releasingLabels.has(s));if(!n.length)return!1;let o=n[0];n.forEach(s=>this.releasingLabels.add(s)),t?.setAttribute("aria-busy","true");let r=t?.querySelector(".rm");r&&(r.disabled=!0);try{let s=this.handedOff;if(!await this.controller.releaseLabels(n))return this.toast((0,I.t)("picker.couldNotRemoveLabel",{label:o}),"error"),!1;Ir(this.gaQty,this.hold?.items??[],n);let l=this.controller.currentHold();return this.hold=l?{holdId:l.holdId,expiresAt:l.expiresAt,seats:l.seats,items:l.items}:null,this.handedOff=!!this.hold&&s,this.bookedShown=!1,this.ctaPhase="idle",this.hold?this.startHoldTimer(this.hold.expiresAt):(this.stopHoldTimer(),this.forgetHold()),this.syncTray(),this.emitHoldChange(),!0}finally{n.forEach(s=>this.releasingLabels.delete(s)),t?.removeAttribute("aria-busy"),r?.isConnected&&(r.disabled=!1)}}async handleCta(){if(this.salesClosed)return;let e=this.controller.getSelectionValidity(this.totalTicketCount());if(e&&!e.isValid){this.toast(bn(e,(n,o)=>this.tf(n,o)),"warning");return}if(this.totalTicketCount()>this.maxTickets){this.toast((0,I.t)("picker.removeTicketsUntilOrFewer",{count:this.maxTickets}),"warning");return}let t=this.committedSelection();if(this.hold&&!t.some(n=>!(this.hold.items??[]).some(o=>o.label===n.label))){let n=this.hold.seats??t;this.handedOff=!0,this.holdConflicted=!1,await this.runCheckoutHandoff(this.hold,n);return}this.holdingLabels=new Set(t.map(n=>n.label)),this.setCtaPhase("holding");try{let n=null,o=Pr(this.gaQty),r=this.committedSelection();if(r.length){let s=await this.controller.hold(void 0,this.opts.holdTtlMs);n=s?{holdId:s.holdId,expiresAt:s.expiresAt,seats:s.seats,items:s.items}:null}for(let{areaId:s,tierId:a,qty:l}of o){let c=await this.controller.holdGA(s,l,{tierId:a,ttlMs:this.opts.holdTtlMs});n=c?{holdId:c.holdId,expiresAt:c.expiresAt,seats:c.seats,items:c.items}:n}if(!n){this.raiseHoldConflict(this.tf("picker.seatsJustTaken","One or more seats were just taken. Please pick again.")),this.setCtaPhase("idle"),this.syncTray();return}this.hold=n,this.holdConflicted=!1,this.handedOff=!this.performanceGroup,this.startHoldTimer(n.expiresAt),this.flashHeldSeats(n),this.emitHoldChange(),this.performanceGroup?this.setCtaPhase("idle"):await this.runCheckoutHandoff(n,n.seats??r)}catch(n){this.opts.onError?.(n);let o=n,r=(o.conflicts??[]).map(a=>a.label).filter(Boolean).slice(0,3);o.reason==="event_closed"&&this.setSalesClosed(!0);let s=o.reason==="event_closed"?this.tf("picker.seatSalesClosedForEvent","Seat sales have closed for this event."):o.reason==="companion_pair_required"?this.tf("picker.companionPairRequired","Select the adjacent wheelchair place with each companion ticket."):o.reason==="ticket_option_not_applicable"?this.tf("picker.ticketOptionNotApplicable","That ticket choice is not available for the selected seat."):r.length?r.length===1?(0,I.t)("picker.labelsNoLongerAvailable.one",{labels:r.join(", ")}):(0,I.t)("picker.labelsNoLongerAvailable.other",{labels:r.join(", ")}):this.tf("picker.seatsJustTaken","One or more seats were just taken. Please pick again.");this.raiseHoldConflict(s),this.setCtaPhase("idle")}finally{this.holdingLabels.clear(),this.ctaPhase==="holding"&&(this.ctaPhase="idle"),this.syncTray()}}startHoldTimer(e){Qa(this,e)}stopHoldTimer(){Ja(this)}setExtendPrompt(e,t){el(this,e,t)}refreshExtendPrompt(){tl(this)}handleExtend(){return il(this)}detectBooked(){this.bookedShown||!this.handedOff||!this.hold||this.controller.currentHold()===null&&(this.holdConflicted||this.showBooked())}raiseHoldConflict(e){this.holdConflicted=!0,this.bookedShown&&(this.bookedShown=!1,this.bookedEl?.classList.remove("on")),this.toast(e,"error")}showBooked(){if(this.bookedShown||!this.hold||this.holdConflicted)return;this.bookedShown=!0;let e=this.buildHandoff(this.hold);this.stopHoldTimer(),this.forgetHold();let t=e.lineItems.reduce((o,r)=>o+r.quantity,0),n=this.performanceGroup?.groupSelectionSummary?.();this.els.bookedSub&&(this.els.bookedSub.innerHTML=n?.seats?`<span class="sl-booked-seats">${(0,I.tCount)("picker.group.ticketsConfirmedAcross",n.seats,{performances:n.performances})}</span>`:`<span class="sl-booked-seats">${(0,I.tCount)("picker.ticketsCount",t)}</span> ${this.tf("picker.confirmedAndOnWay","confirmed. A confirmation is on its way.")}`),this.els.bookedList&&(this.els.bookedList.innerHTML=e.lineItems.map(o=>{let s=[o.sectionLabel,o.rowLabel&&`${this.tf("picker.row","Row")} ${o.rowLabel}`,o.seatNumber&&`${this.tf("picker.seat","Seat")} ${o.seatNumber}`].filter(Boolean).join(" \xB7 ")||o.displayLabel||o.label,a=o.quantity>1?` <span class="sl-booked-qty">\xD7${o.quantity}</span>`:"";return`<li>${B(s)}${a}</li>`}).join(""),this.els.bookedList.hidden=e.lineItems.length===0),this.bookedEl?.classList.add("on"),requestAnimationFrame(()=>this.bookedEl?.querySelector(".sl-booked-back")?.focus()),this.opts.onBooked?.(e)}dismissBooked(){this.bookedEl?.classList.remove("on"),this.resetAfterBooking(),this.root?.focus({preventScroll:!0})}resetAfterBooking(){this.bookedShown=!1,this.hold=null,this.handedOff=!1,this.holdConflicted=!1,this.holdingLabels.clear(),this.gaQty.clear(),this.stopHoldTimer(),this.forgetHold(),this.clearSelection(),this.setCtaPhase("idle"),this.setSheetOpen(!1),this.syncTray(),this.syncCta(),this.emitHoldChange()}notifyGroupSettled(e){e==="booked"?this.showBooked():this.dismissConfirm(),this.hold=null,this.handedOff=!1,this.ctaPhase="idle",this.stopHoldTimer(),this.forgetHold(),this.syncTray(),this.syncCta()}async checkoutHandoff(e,t){if(this.checkoutMode==="hosted"){await this.startHostedCheckout(e,t);return}await this.opts.onCheckout?.(e,t,this.buildHandoff(e))}async startHostedCheckout(e,t){let n=this.buildHandoff(e),o=null;try{o=await(this.paymentOptions??=this.pubApi.paymentOptions(this.opts.event))}catch(s){this.opts.onError?.(s)}if(this.destroyed)return;let r=o?.providers?.[0];if(!r){let s=qo(o?.reason),a=!!this.opts.onCheckoutUnavailable||!!this.opts.onCheckout;this.opts.onCheckoutUnavailable?.({reason:s,handoff:n}),this.opts.onCheckout?.(e,t,n),a||this.openCheckoutPanel({kind:"unavailable",reason:s,seatCount:n.lineItems.reduce((l,c)=>l+c.quantity,0)});return}await this.openCheckoutPanel({kind:"pay",provider:r,order:{holdId:n.holdId,expiresAt:n.expiresAt,currency:n.currency,total:n.total,labels:n.lineItems.map(s=>s.displayLabel??s.label)}})}async openCheckoutPanel(e){let t;try{({mountCheckout:t}=await Ci())}catch(n){this.opts.onError?.(n),this.toast(this.tf("picker.checkoutCouldNotBeOpened","Checkout could not be opened. Your seats are still held \u2014 please try again."),"error"),this.setCtaPhase("idle");return}this.destroyed||!this.root||(this.closeCheckoutPanel(),this.checkoutPanel=t({root:this.root,state:e,eventKey:this.opts.event,formatMoney:n=>this.money(n),startSession:n=>this.pubApi.startCheckout(this.opts.event,{...n,...this.opts.returnUrl?{returnUrl:this.opts.returnUrl}:{}}),orderStatus:n=>this.pubApi.orderStatus(n),onCancel:()=>{this.checkoutPanel=null,this.hold||this.setCtaPhase("idle")},onConfirmed:n=>{this.opts.onOrderConfirmed?.(n),this.controller.refresh()},onError:n=>this.opts.onError?.(n)}))}closeCheckoutPanel(){this.checkoutPanel?.destroy(),this.checkoutPanel=null}buildHandoff(e){let n=(e.items??[]).map(s=>{let a=this.controller.lineItemDisplay(s);return{label:s.label,...a.displayLabel?{displayLabel:a.displayLabel}:{},...a.displayType?{displayType:a.displayType}:{},objectId:s.objectId,objectType:s.objectType,categoryKey:s.categoryKey,tierId:s.tierId,unitPrice:this.paidPrice(s.categoryKey,s.tierId,s.unitPrice,s.label),currency:s.currency??this.currency,quantity:s.quantity??1}}),o=n[0]?.currency??this.currency,r=n.reduce((s,a)=>s+a.unitPrice*a.quantity,0);return{holdId:e.holdId,expiresAt:e.expiresAt,currency:o,lineItems:n,total:r}}emitHoldChange(){let e=this.hold;this.scheduleOfferRefresh(!0),this.opts.onHoldChange?.(e,e?.seats??[],e?this.buildHandoff(e):null)}toast(e,t="neutral",n){let o=this.els.toast;if(!o)return;o.replaceChildren();let r=document.createElement("span");if(r.textContent=e,o.appendChild(r),o.classList.toggle("has-action",!!n),n){let s=document.createElement("button");s.type="button",s.className="sl-toast-action",s.textContent=n.label,s.addEventListener("click",n.onClick,{once:!0}),o.appendChild(s)}o.dataset.tone=t,o.classList.add("on","sl-mo-rise"),this.liftToastOverConfirmSoon(),this.toastTimer&&clearTimeout(this.toastTimer),this.toastTimer=setTimeout(()=>{o.classList.remove("on","sl-mo-rise"),o.classList.remove("has-action"),o.dataset.tone="neutral",this.liftToastOverConfirm()},4200)}liftToastOverConfirm(){let e=this.regions["bottom-center"];if(!e)return;let t=this.els.toast?.classList.contains("on")||this.extendEl?.classList.contains("on"),n=this.confirmEl;if(!t||!n?.isConnected){e.style.removeProperty("bottom");return}let o=this.els.map.clientHeight;if(o<=0)return;let r=n.getBoundingClientRect(),s=r.height||n.offsetHeight||Op,a=r.height?r.top-this.els.map.getBoundingClientRect().top:o-to-s,l=Math.round(o-a+Rp);if(l+Ip>o){e.style.removeProperty("bottom");return}e.style.bottom=`${l}px`}liftToastOverConfirmSoon(){this.liftToastOverConfirm(),typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{this.destroyed||this.liftToastOverConfirm()})}dismissSkeleton(){Qs({boot:this.els.boot,map:this.els.map,rail:this.els.rail,root:this.root,reducedMotion:this.reducedMotion()})}placeTooltip(){if(!this.tipEl)return;let e={width:this.els.map.clientWidth,height:this.els.map.clientHeight},t={width:this.tipEl.offsetWidth,height:this.tipEl.offsetHeight},n=this.tipPinned?Ds(this.tipPos,e,t):null,o=n??Ns(this.tipPos,e.width,e.height,t);this.tipEl.style.left=`${o.left}px`,this.tipEl.style.top=`${o.top}px`,n?this.tipEl.dataset.placement=n.placement:delete this.tipEl.dataset.placement}nightStripFor(e,t){let n=this.performanceGroup,o=Jn(e.mark,n?.nights?.()),r=o?.states.filter(s=>s.free).length??0;return ks(o,{locale:this.opts.locale,switchLabel:n?.selectionModeSwitch?.label??null,selectPartialLabel:n?.partialSeatSelection?.label(r)??null,pinned:t})}unpinTooltip(){this.tipPinned&&(this.tipPinned=!1,this.tipEl?.classList.remove("sl-tip-pinned"),this.tipEl&&(this.tipEl.style.display="none"))}handleMapPointerDown(e){if(this.tipEl?.contains(e.target))return;this.lastMapPoint={x:e.clientX,y:e.clientY},this.lastPointerType=e.pointerType||"mouse";let t=this.els.map.getBoundingClientRect();this.tipPos={x:e.clientX-t.left,y:e.clientY-t.top},this.unpinTooltip()}closeInfoPops(e){this.root?.querySelectorAll(".sl-info.open").forEach(t=>{t!==e&&(t.classList.remove("open"),t.querySelector("[data-sl-info]")?.setAttribute("aria-expanded","false"))})}updateTooltip(e){if(!this.tipEl)return;if(this.confirmSeat){this.tipEl.style.display="none";return}if(this.tipPinned&&e?.interaction!=="press")return;if(!e){this.tipPinned||(this.tipEl.style.display="none",this.tipMarkedHoverLabel=null);return}let t=e.mark?.kind==="partial"&&this.tipMarkedHoverLabel===e.label;if(e.interaction!=="press"&&this.lastPointerType==="mouse"&&!e.mark&&!this.tipPinned){this.tipEl.style.display="none",this.tipMarkedHoverLabel=null;return}if(e.unavailable&&e.status==="free"&&e.interaction==="press"){this.toast(this.tf("picker.turnOffAccessibilityFilter","Turn off the wheelchair filter to pick this seat"),"neutral"),this.tipEl.style.display="none";return}if(e.unavailable&&!e.mark){this.tipEl.style.display="none",this.tipMarkedHoverLabel=null;return}let n=e.mark?.kind==="partial"&&(e.interaction==="press"||this.lastPointerType!=="mouse"||t);this.tipMarkedHoverLabel=e.mark?.kind==="partial"?e.label:null;let o=this.nightStripFor(e,n);this.tipEl.style.setProperty("--sl-cat",e.categoryColor),this.tipEl.innerHTML=_s(e,{price:this.suppressPricing?"":this.money(this.paidPrice(e.categoryKey,e.tierId??null,e.price,e.label)),priceNote:this.suppressPricing?this.performanceGroup?.surface==="season"?this.tf("picker.season.includedInPackage","Included in the Season package"):this.tf("picker.group.pricesPerPerformance","Prices shown per performance"):"",rowTypeWord:nt(e),extra:o+(n?`<button type="button" class="sl-tip-close" data-pg-tip-close aria-label="${B(this.tf("picker.group.closeSeatDetails","Close seat details"))}">\xD7</button>`:"")}),this.tipPinned=n,this.tipEl.classList.toggle("sl-tip-pinned",n),this.tipEl.querySelector("[data-pg-tip-close]")?.addEventListener("click",()=>this.unpinTooltip()),this.tipEl.querySelector("[data-pg-switch-mode]")?.addEventListener("click",()=>{this.unpinTooltip(),this.performanceGroup?.selectionModeSwitch?.activate()}),Vs(this.tipEl,this.performanceGroup?.partialSeatSelection?.label,r=>{this.unpinTooltip(),this.performanceGroup?.partialSeatSelection?.activate(e.id,r)}),this.tipEl.style.display="block",this.placeTooltip()}syncSeatMarks(){let e=this.performanceGroup?.seatMarks,t=this.controller.getRenderer();if(!e||!t?.setSeatMarks)return;let n={};for(let[o,r]of Object.entries(e())){let s=this.controller.idForLabel(o);s&&(n[s]=r)}Object.keys(n).length&&t.setSeatMarks(n)}getSelection(){return this.committedSelection()}selectObjects(e){return this.controller.select(e)}selectObjectsWithoutConfirmation(e){let t=new Set(e),n=this.controller.getSelection().filter(o=>t.has(o.id)||t.has(o.label));if(n.length===t.size)return n;this.suppressConfirmationSeatId=e[0]??null;try{return this.controller.select(e)}finally{this.suppressConfirmationSeatId=null}}deselectObjects(e){this.controller.deselect(e)}clearSelection(){this.dismissConfirm(),this.dismissTableDialog(),this.controller.clearSelection()}categoryLegendColor(){let e=(this.controller.doc?.categories??[]).find(t=>!t.notForSale);return(e?this.controller.getRenderer()?.categoryDisplayColor?.(e.key):null)||e?.color||"#2563eb"}async refreshAvailability(){await this.controller.refresh(),this.syncSeatMarks(),this.syncTray()}refreshPerformanceGroupComposition(){this.syncTray()}async adoptRestoredHold(e){!e||this.hold||await this.resumeHoldFromServer(e)}selectCategories(e){return this.controller.selectCategories(e)}deselectCategories(e){this.controller.deselectCategories(e)}setSelectableObjects(e){this.controller.setSelectableObjects(e)}setMaxSelection(e){this.maxTickets=Math.max(this.exactTickets??1,Math.floor(e)),this.controller.setMaxSelection(this.maxTickets),this.updateSelectionCapacity(),this.syncTray()}getSelectionValidity(){let e=this.controller.getSelectionValidity(this.totalTicketCount());return e&&(e.seats=this.committedSelection()),e}setMapTheme(e){this.destroyed||(this.opts.theme={...this.opts.theme??{},map:e??void 0},this.controller.setMapTheme(e),this.applyMapChromeTokens(),this.minimap?.refreshMinimap())}applyThemeTokens(e){let t=Qt(this.themeMode),n=Tt(this.controller.doc?.theme,this.opts.theme,t);for(let[o,r]of Object.entries(n))e.style.setProperty(o,r);t?e.dataset.theme=t:delete e.dataset.theme,this.applyMapChromeTokens()}watchThemeMode(){this.colorSchemeStop?.(),this.colorSchemeStop=null,this.themeMode==="auto"&&(this.colorSchemeStop=Ri(()=>{this.destroyed||this.repaintForThemeMode()}))}repaintForThemeMode(){this.root&&(this.applyThemeTokens(this.root),this.controller.setMapTheme(kt(this.opts.theme,this.themeMode)),this.applyMapChromeTokens(),this.minimap?.refreshMinimap(),this.syncPrices())}setThemeMode(e){this.destroyed||e===this.themeMode||(this.themeMode=e,this.opts.theme={...this.opts.theme??{},...e?{mode:e}:{mode:void 0}},this.watchThemeMode(),this.repaintForThemeMode(),this.emitAnalytics("theme_mode_changed",{mode:e,resolved:Qt(e)??null}))}getThemeMode(){return this.themeMode}applyMapChromeTokens(){let e=this.els.map?.parentElement;if(!e||!this.root)return;let t=Qt(this.themeMode),n=Tt(this.controller.doc?.theme,this.opts.theme,t),o=kt(this.opts.theme,this.themeMode)?.background??this.controller.doc?.theme?.background??void 0,r=br(n,o);for(let s of gr)r?e.style.setProperty(s,r[s]):e.style.removeProperty(s)}setEventDetailsHidden(e){this.eventDetailsHidden=e,this.syncFullscreenButtons()}setPricing(e){let t=JSON.stringify(this.opts.pricing??null),n=JSON.stringify(e??null);t!==n&&(this.opts.pricing=e,!(this.destroyed||!this.els.prices)&&(this.els.pricesSec?.querySelector(".sl-price-select")?.remove(),this.buildPriceFilter(),this.syncPrices(),this.syncTray(),this.lastSection&&this.showSectionCard(this.lastSection)))}buildLanguageSwitcher(e){this.langSel=xr(e,{languages:this.opts.languages,label:this.tf("picker.preferredTicketType","Language"),onChange:t=>{this.setLocale(t)}})}async setLocale(e){let t=(0,I.getLocale)(),n=this.localeGeneration+=1,o=await(0,I.loadLocale)(e);return this.opts.messages&&(0,I.setStringOverrides)(this.opts.messages),o===t||this.applyActiveLocale(o,n),o}applyActiveLocale(e,t){t===this.localeGeneration&&this.root&&(Sr(e,{root:this.root,painters:[()=>this.syncTray(),()=>this.syncPrices(),()=>this.syncOffer(),()=>this.syncRung(),()=>this.syncFloors(),()=>this.syncPanelToggle(),()=>this.syncFullscreenButtons()],refreshMapCopy:()=>this.controller.refreshMapCopy(),languageSelect:this.langSel}),this.scheduleFit())}isColorblindSafe(){return this.cbSafe}setColorblindSafe(e){e!==this.cbSafe&&(this.cbSafe=e,this.cbEl?.setAttribute("aria-pressed",String(e)),this.controller.setColorblindSafe(e),this.syncPrices(),this.minimap?.refreshMinimap(),Np(e))}setViewMode(e){this.controller.setViewMode(this.normalizeInitialView(e)),this.syncProjection(),this.dismissConfirm()}getViewMode(){return this.controller.getViewMode()}normalizeInitialView(e){return e==="perspective"?(this.perspectiveWarned||(this.perspectiveWarned=!0,console.warn("[seatlayer] initialView:'perspective' (2.5D) is deprecated for the buyer picker and was coerced to 'flat'. Use the Map | 3D control for the immersive view.")),"flat"):e??"flat"}emitAnalytics(e,t){try{this.opts.onAnalytics?.(e,t??{})}catch{}}emit3dAnalytics(e,t){this.emitAnalytics(e,t)}getBuyerView(){return ma(this)}setBuyerView(e,t){fa(this,e,t)}seatState3dFor(e){return ga(this,e)}pushAvailabilityTo3d(){ba(this)}syncSelectionTo3d(){ya(this)}seatViewFor3d(e){return va(this,e)}onView3dSeatPick(e){wa(this,e)}seatViewCaption(e){return xa(this,e)}saveView3dComparisonSeat(e){Sa(this,e)}clearView3dComparison(){ka(this)}view3dComparisonSnapshot(e){return Ta(this,e)}enter3d(e){return Ea(this,e)}publish3dTopInset(){Ca(this)}exit3d(){Aa(this)}openSeatConfidencePassport(e,t=null){ao(this,e,t)}closeSeatConfidencePassport(e=!0){li(this,e)}openView3dComparison(){ca(this)}closeView3dComparison(e=!0){rt(this,e)}getCurrentHold(){return this.hold}async resumeHold(e){return this.resumeHoldFromServer(e)}async removeHeldTicket(e){return this.removeHeldLabels([e])}async bestAvailable(e,t,n={}){if(this.salesClosed||this.bestAvailableBusy)return null;e=Math.max(1,Math.min(this.maxTickets,Math.floor(e)));try{return await this.bestAvailableOrThrow(e,t,n)}catch(o){this.opts.onError?.(o);let r=o?.reason,s=r==="not_enough_together"?(0,I.t)("picker.couldNotFindSeatsTogether",{count:e}):r==="companion_pair_required"?this.tf("picker.companionPairRequired","Select the adjacent wheelchair place with each companion ticket."):r==="ticket_option_not_applicable"?this.tf("picker.ticketOptionNotApplicable","That ticket choice is not available for the selected seat."):r==="sold_out"?this.tf("picker.ticketTypeSoldOut","That ticket type is sold out. Try another ticket type."):r==="event_closed"?this.tf("picker.seatSalesClosedForEvent","Seat sales have closed for this event."):this.tf("picker.seatsNoLongerAvailableTryAnother","Those seats are no longer available. Try another quantity or ticket type.");return this.toast(s,"error"),null}}async bestAvailableOrThrow(e,t,n={}){if(this.salesClosed)throw new Error("seatlayer: seat sales are closed");if(this.bestAvailableBusy)throw new Error("seatlayer: Best Available is already in progress");if(!Number.isInteger(e)||e<1)throw new Error("seatlayer: Best Available quantity must be a positive integer");this.confirmSeat&&this.cancelConfirm(),this.bestAvailableConfirm=!1,this.bestAvailableBusy=!0;let o=this.els.tray?.querySelector(".sl-ba-go");o&&(o.disabled=!0,o.classList.add("sl-busy"),o.innerHTML=`<span class="sl-ba-spin" aria-hidden="true"></span>${this.tf("picker.findingEllipsis","Finding\u2026")}`);try{let r=await this.controller.bestAvailable(e,t,{...n,ttlMs:this.opts.holdTtlMs});return r?(this.hold={holdId:r.holdId,expiresAt:r.expiresAt,seats:r.seats,items:r.items},this.handedOff=!1,this.bookedShown=!1,this.gaQty.clear(),this.startHoldTimer(r.expiresAt),this.flashHeldSeats(this.hold),this.syncTray(),this.emitHoldChange(),n.preferPremium&&r.seats.length&&!r.seats.every(s=>s.commercial?.premium)&&this.toast((0,I.t)("picker.premiumFallbackNote",{count:e}),"neutral"),this.hold):null}finally{this.bestAvailableBusy=!1,this.syncTray()}}async release(){let e=this.hold,t=this.controller.currentHold(),n=!0;if(t)n=await this.controller.release();else if(e){let o=[...new Set([...(e.items??[]).map(r=>r.label),...(e.seats??[]).map(r=>r.label)])];if(o.length)try{await this.api.release(this.opts.event,o,e.holdId)}catch(r){this.opts.onError?.(r),n=!1}}if(!n){this.toast(this.tf("picker.couldNotReleaseTickets","Couldn't release your tickets. Your hold is unchanged."),"error");return}this.hold=null,this.forgetHold(),this.handedOff=!1,this.bookedShown=!1,this.ctaPhase="idle",this.stopHoldTimer(),this.gaQty.clear(),this.syncTray(),this.emitHoldChange()}startRealtime(){if(!this.access?.configured||!this.pubApi||this.realtime)return;let e=this.opts.event;this.realtime=new ke({url:this.pubApi.subscribeUrl(e),mintTicket:()=>this.pubApi.subscribeTicket(e),onAccessUnavailable:t=>{this.opts.onAccessUnavailable?.(t),this.showAccessPanel(t)},sink:vt(this.controller,{flashOnLiveChange:!0,ownLabels:()=>this.holdingLabels,onStatusChange:()=>{this.syncPrices(),this.scheduleOfferRefresh(!0),this.detectBooked(),this.minimap?.refreshMinimap(),this.pushAvailabilityTo3d()},onSelectedObjectUnavailable:(t,n)=>{this.opts.onSelectedObjectUnavailable?.({labels:t,reason:n}),this.syncTray(),this.toast(n==="ineligible"?this.tf("picker.seatNoLongerYours","Some seats are no longer available to you. They have been removed from your order."):this.tf("picker.seatTaken","Someone else took a seat you had picked. It has been removed from your order."),"warning")}})}),this.realtime.start()}async refreshAccess(){return!this.access?.configured||!await this.access.refresh("manual")?!1:(this.dismissAccessPanel(),await this.controller.refresh(),this.realtime?this.realtime.restart():this.startRealtime(),!0)}clearDecisionSurfaces(){this.dismissConfirm(),this.dismissTableDialog(!1),Te(this,!1)}showAccessPanel(e){if(this.destroyed||!this.root)return;this.dismissAccessPanel(),this.clearDecisionSurfaces();let t=dr(e.reason,()=>this.recoverAccess());(this.root.querySelector(".sl-body")??this.root).appendChild(t),this.accessEl=t}async recoverAccess(){return await this.refreshAccess()?!0:(this.opts.onAccessUnavailable||typeof window>"u"||window.location.reload(),!1)}dismissAccessPanel(){this.accessEl?.remove(),this.accessEl=null}showHoldExpired(){if(this.destroyed||!this.root||this.holdExpiredEl)return;this.clearDecisionSurfaces();let e=gl({restart:()=>this.restartAfterHoldExpiry()},this.holdExpiredUnits);this.root.appendChild(e),this.holdExpiredEl=e,requestAnimationFrame(()=>e.querySelector(".sl-interrupt-act")?.focus());let t=this.holdExpiredUnits;this.holdExpiredFresh=!1,this.refreshAvailability().then(()=>{if(this.destroyed||this.holdExpiredEl!==e)return;this.holdExpiredFresh=!0;let n=t.filter(s=>s.objectType!=="ga"),o=[],r=[];for(let s of n){let a=this.controller.seatByLabel(s.label);(a&&this.controller.getStatus(a.id)==="free"?o:r).push(s.label)}fl(e,{recoverable:o,taken:r,onRecover:s=>this.recoverAfterHoldExpiry(s)})}).catch(()=>{})}recoverAfterHoldExpiry(e){this.holdExpiredUnits=[],this.dismissHoldExpired(),this.lapse.clear(),this.clearSelection(),this.controller.select(e),this.syncTray(),this.handleCta()}dismissHoldExpired(){this.holdExpiredEl?.remove(),this.holdExpiredEl=null}restartAfterHoldExpiry(){let e=this.holdExpiredUnits;this.holdExpiredUnits=[],this.dismissHoldExpired(),this.lapse.clear(),this.clearSelection(),this.controller.overview(),this.syncTray(),this.syncCta(),this.root?.focus({preventScroll:!0});let t=this.holdExpiredFresh;this.holdExpiredFresh=!1,(t?Promise.resolve():this.refreshAvailability()).then(()=>{this.destroyed||ml({reducedMotion:this.reducedMotion(),accent:this.cssVar("--sl-accent")||"#f4b740",seatByLabel:n=>this.controller.seatByLabel(n),statusOf:n=>this.controller.getStatus(n),flash:(n,o)=>this.controller.flashSeat(n,o)},e)}).catch(()=>{})}destroy(){this.destroyed=!0,oo(this),this.colorSchemeStop?.(),this.colorSchemeStop=null,this.realtime?.stop(),this.realtime=null,this.dismissAccessPanel(),this.dismissHoldExpired(),this.access?.clear(),this.hold&&!this.handedOff&&this.controller.release(),this.closeConfirm(),this.dismissTableDialog(!1),Te(this,!1),this.closeSeatView(),this.closeCheckoutPanel(),this.exit3d(),this.buyerAssetUrls.dispose(),this.stopHoldTimer(),this.detachAttention?.(),this.toastTimer&&clearTimeout(this.toastTimer),this.offerRefreshTimer&&clearTimeout(this.offerRefreshTimer),this.offerBoundaryTimer&&clearTimeout(this.offerBoundaryTimer),this.offerRefreshTimer=null,this.offerBoundaryTimer=null,this.offerVisibilityHandler&&(document.removeEventListener("visibilitychange",this.offerVisibilityHandler),this.offerVisibilityHandler=null);for(let e of this.motionTimers)clearTimeout(e);this.motionTimers.clear(),this.ro?.disconnect(),this.ro=null,this.framedFs&&this.setFramedFs(!1),this.escHandler&&document.removeEventListener("keydown",this.escHandler),this.fsChangeHandler&&document.removeEventListener("fullscreenchange",this.fsChangeHandler),this.fsEscHandler&&window.removeEventListener("keydown",this.fsEscHandler),this.controller.destroy(),this.projectionEl=null,this.root?.remove(),this.root=null,this.modalScrim&&(this.modalScrim.remove(),this.modalScrim=null,this.prevFocus?.isConnected&&this.prevFocus.focus({preventScroll:!0}),this.prevFocus=null)}};var qe=require("@seatlayer/core");var Al="seatlayer-performance-group-picker-style";function Pl(){if(document.getElementById(Al))return;let i=document.createElement("style");i.id=Al,i.textContent=`
2843
2922
  .sl-pg-root{display:grid;gap:12px;min-width:0;color:var(--sl-text,#18202b);font-family:var(--sl-font,Inter,system-ui,sans-serif)}
2844
2923
  .sl-pg-head{display:grid;gap:8px;padding:16px 18px;border:1px solid var(--sl-line,#dde3ea);border-radius:14px;background:var(--sl-surface,#fff)}
2845
2924
  .sl-pg-head h2{font:700 20px/1.25 inherit;margin:0}.sl-pg-summary{margin:0;color:var(--sl-muted,#627081);font-size:14px}
@@ -2899,7 +2978,7 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
2899
2978
  @media(min-width:900px){.sl-pg-legend-list{justify-content:flex-start}}
2900
2979
  .sl-pg-live{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
2901
2980
  @media(max-width:640px){.sl-pg-head{padding:13px 14px}.sl-pg-head h2{font-size:18px}.sl-pg-inner{min-height:590px}}
2902
- `,document.head.appendChild(i)}var jp="https://api.seatlayer.io",Up=6e4,Gp=2e3,qp=1e3,Kp=36e5,Wp=5e3,Yp=5e3,Xp=15e3,Qp=12e4,Zp=new Set(["preparing","commit_pending","abort_pending","expire_pending"]),Q=class extends Error{constructor(){super("performance_group_destroyed"),this.name="PerformanceGroupDestroyedError"}};function Jp(i){return new Promise(e=>setTimeout(e,i))}function vr(i){let e=Number(i.headers.get("Retry-After")??"1");return Number.isFinite(e)?Math.max(50,Math.min(Wp,e*1e3)):1e3}function Vt(i,e){return`/pub/performance-groups/${encodeURIComponent(i)}/operations/${encodeURIComponent(e)}`}function $t(i){return i.replace(/^pghop_/,"").replace(/-/g,"").slice(-8).toUpperCase()}var wr=class{constructor(e,t,n){this.api=e;this.sink=t;this.intervalMs=n;this.stopped=!0;this.timer=null;this.prior=new Map}start(){this.stopped&&(this.stopped=!1,this.tick())}stop(){this.stopped=!0,this.timer&&clearTimeout(this.timer),this.timer=null}async tick(){try{let e=await this.api.objects(this.api.groupKey);if(this.stopped)return;let t=new Map(Object.entries(e.seats)),r=[...new Set([...this.prior.keys(),...t.keys()])].filter(s=>this.prior.get(s)!==t.get(s)).map(s=>({label:s,status:t.get(s)??"blocked"}));this.prior=t,r.length&&this.sink.applyStatuses(r),this.sink.onSections?.(e.hidden??[],e.closed??[])}catch(e){if(e instanceof Q){this.stop();return}this.stopped||await this.sink.resync()}finally{this.stopped||(this.timer=setTimeout(()=>{this.tick()},this.intervalMs))}}},En=class{constructor(e,t){this.descriptorCache=null;this.chartRequest=null;this.objectsCache=null;this.activePerformanceKey=null;this.includedEventKeys=new Set;this.reuseObjectsCacheOnce=!1;this.selectionsByEvent=new Map;this.allocationsByHold=new Map;this.pendingOperationId=null;this.operationByHold=new Map;this.knownRevision=null;this.destroyed=!1;this.aborter=new AbortController;this.adoptFailure=null;this.settleTimer=null;this.settleOperationId=null;this.settleStartedAt=0;this.settleState=null;this.settleVisibility=null;this.lastRecovery={kind:"idle"};if(!e)throw new Error("seatlayer: `performanceGroup` key is required");this.groupKey=e,this.base=(t.apiBase??jp).replace(/\/+$/,""),this.access=t.access,this.fetcher=t.fetch??globalThis.fetch.bind(globalThis),this.recoveryTimeoutMs=t.recoveryTimeoutMs??Up,this.realtimePollMs=Math.max(500,t.realtimePollMs??Gp),this.selectionMode=t.selectionMode??"same_seat",this.partySize=t.partySize??null,this.onOperationState=t.onOperationState,this.onRecoveryState=t.onRecoveryState,this.onAvailability=t.onAvailability,this.access.onRenewed(r=>this.adoptSession(r));let n=this.readOperationRecord();n&&this.storedIsUndecided(n)&&(this.pendingOperationId=n.operationId)}get pendingOperation(){return this.pendingOperationId}get holdBlocked(){return!!this.adoptFailure||!!this.pendingOperationId&&this.lastRecovery.kind!=="idle"}async descriptor(){let e=await this.json(`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/descriptor`);return this.descriptorCache=e.performanceGroup,this.includedEventKeys.size||(this.includedEventKeys=new Set(e.performanceGroup.performances.map(t=>t.eventKey))),e.performanceGroup.revision&&(this.knownRevision=e.performanceGroup.revision),this.activePerformanceKey??=e.performanceGroup.performances[0]?.eventKey??null,e.performanceGroup}async chart(e){this.chartRequest??=this.json(`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/chart`).catch(r=>{throw this.chartRequest=null,r});let[t,n]=await Promise.all([this.descriptorCache?Promise.resolve(this.descriptorCache):this.descriptor(),this.chartRequest]);return{doc:n,event:{key:t.key,name:t.name,salesClosed:t.state!=="active",venue:t.venue,startsAt:t.performances[0]?.startsAt??null,timezone:t.timezone,currency:t.currency,mode:t.mode,inventoryModelVersion:2}}}asset(e,t){return/^[a-zA-Z0-9._-]+$/.test(t)?this.blob(`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/assets/${encodeURIComponent(t)}`):Promise.reject(new U(404,"not_found","not_found"))}async objects(e){let t=this.descriptorCache?.inclusionMode==="flexible_dates",n=`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/objects`+(this.selectionMode==="per_performance"||t?"?view=per-performance":"");if(this.reuseObjectsCacheOnce&&this.objectsCache)this.reuseObjectsCacheOnce=!1;else{let o=await this.authorized(n,this.objectsCache?.revision?{headers:{"If-None-Match":`"${this.objectsCache.revision}"`}}:{});if(o.status!==304){if(!o.ok)return this.throwResponse(o);this.objectsCache=await this.responseJson(o)}}if(!this.objectsCache)throw new U(502,"group_projection_unavailable","group_projection_unavailable");if(this.selectionMode==="same_seat"&&!t){let o=this.objectsCache;return this.noteAvailability(o,o.salesClosed,o),o}let r=this.objectsCache;if(this.selectionMode==="same_seat"){let o=r.performances.filter(p=>this.includedEventKeys.has(p.eventKey));if(!o.length)throw new U(409,"group_selection_incomplete","group_selection_incomplete");let a=Object.keys(o[0]?.seats??{}),l=Object.fromEntries(a.map(p=>[p,o.every(u=>u.seats[p]==="free")?"free":"blocked"])),c=Object.fromEntries(a.flatMap(p=>{let u=o.filter(h=>h.seats[p]!=="free").map(h=>h.eventKey);return u.length>0&&u.length<o.length?[[p,u]]:[]})),d={seats:l,partial:c,hidden:[...new Set(o.flatMap(p=>p.hidden??[]))],closed:[...new Set(o.flatMap(p=>p.closed??[]))],revision:r.revision,state:r.state,salesClosed:o.some(p=>p.salesClosed)};return this.noteAvailability(r,d.salesClosed,d),d}let s=r.performances.find(o=>o.eventKey===this.activePerformanceKey);if(!s)throw new U(409,"group_performance_unavailable","group_performance_unavailable");return this.noteAvailability(r,r.salesClosed||r.performances.some(o=>o.salesClosed),s),s}setSelectionMode(e,t){if(this.pendingOperationId||this.holdBlocked)throw new U(409,"group_operation_pending","group_operation_pending");e!==this.selectionMode&&(this.selectionMode=e,t!=null&&(this.partySize=t),this.objectsCache=null,this.selectionsByEvent.clear(),this.activePerformanceKey=this.descriptorCache?.performances[0]?.eventKey??this.activePerformanceKey)}setActivePerformance(e){if(this.descriptorCache&&!this.descriptorCache.performances.some(t=>t.eventKey===e))throw new U(404,"group_performance_not_found","group_performance_not_found");this.activePerformanceKey=e}setIncludedEventKeys(e){let t=new Set(this.descriptorCache?.performances.map(n=>n.eventKey)??[]);if(!e.length||new Set(e).size!==e.length||e.some(n=>!t.has(n)))throw new U(422,"invalid_event_keys","invalid_event_keys");this.includedEventKeys=new Set(e),this.reuseObjectsCacheOnce=!!this.objectsCache}includedPerformanceKeys(){return(this.descriptorCache?.performances??[]).map(e=>e.eventKey).filter(e=>this.includedEventKeys.has(e))}setPerformanceSelections(e,t){this.selectionsByEvent.set(e,t.map(n=>({...n})))}allocationsForHold(e){return(this.allocationsByHold.get(e)??[]).map(t=>({eventKey:t.eventKey,items:t.items.map(n=>({...n}))}))}async hold(e,t,n,r){if(this.assertUsable(),r)throw new U(409,"group_hold_replace_unsupported","group_hold_replace_unsupported");let s=t.map(c=>c.label),o={labels:s};if(this.descriptorCache?.inclusionMode==="flexible_dates"&&(o.eventKeys=this.includedPerformanceKeys()),this.selectionMode==="per_performance"){if(!this.activePerformanceKey||!this.descriptorCache||!this.partySize)throw new U(409,"group_selection_incomplete","group_selection_incomplete");this.setPerformanceSelections(this.activePerformanceKey,t);let c=this.descriptorCache.performances.filter(d=>this.includedEventKeys.has(d.eventKey)).map(d=>({eventKey:d.eventKey,selections:this.selectionsByEvent.get(d.eventKey)??[]}));if(c.some(d=>d.selections.length!==this.partySize))throw new U(409,"group_selection_incomplete","group_selection_incomplete");o={selectionMode:"per_performance",allocations:c,...this.descriptorCache.inclusionMode==="flexible_dates"?{eventKeys:this.includedPerformanceKeys()}:{}}}let a=this.pendingOperationId??`pghop_${crypto.randomUUID()}`;this.beginOperation(a),this.onOperationState?.({operationId:a,state:"preparing",decision:null});let l;try{l=await this.authorized(`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/hold`,{method:"POST",body:JSON.stringify({operationId:a,...o,...n?{ttlMs:n}:{}})})}catch(c){if(c instanceof Q)throw c;if(c instanceof re)throw this.failOperation(a),c;return this.recover(a,s,Date.now()+this.recoveryTimeoutMs)}if(l.status===201||l.status===202||l.status===504){let c=await this.responseJson(l);return this.emit(c.operation),l.status===201?this.complete(c.operation):this.recover(a,s,Date.now()+this.recoveryTimeoutMs,vr(l))}if(l.status===503){let c=await l.clone().json().catch(()=>null);if((c?.code??c?.error)==="performance_group_abort_pending"){let d=c?.operation?.operationId??a;return this.beginOperation(d),c?.operation&&this.emit(c.operation),this.recover(d,s,Date.now()+this.recoveryTimeoutMs,vr(l))}}try{return await this.throwResponse(l,s)}catch(c){throw this.failOperation(a),c}}async release(e,t,n){this.assertUsable();let r=this.operationForHold(n),s=await this.json(`${Vt(this.groupKey,r)}/release`,{method:"POST",body:"{}"});return this.operationByHold.delete(n),this.allocationsByHold.delete(n),this.clearOperationRecord(),s}async resume(e,t){this.assertUsable();let n=this.operationForHold(t),r=await this.json(Vt(this.groupKey,n));return this.complete(r.operation)}async extend(e,t,n=12e4){this.assertUsable();let r=this.operationForHold(t),s=Math.max(qp,Math.min(Kp,Math.round(n))),o=await this.json(`${Vt(this.groupKey,r)}/extend`,{method:"POST",body:JSON.stringify({ttlMs:s})}),a=this.complete(o.operation);return{holdId:a.holdId,expiresAt:a.expiresAt}}bestAvailable(){return Promise.reject(new U(400,"group_best_available_unsupported","group_best_available_unsupported"))}socketUrl(){return""}createRealtime(e,t){return new wr(this,t,this.realtimePollMs)}operationIdForHold(e){return this.operationByHold.get(e)??this.readMapping(e)}rememberOperation(e,t){!e||!t||(this.operationByHold.set(e,t),this.writeMapping(e,t))}async restoreOperation(){let e=this.readOperationRecord();if(!e)return null;if(!this.storedIsUndecided(e)&&e.state!=="committed"&&e.state!=="booked")return this.clearOperationRecord(),null;this.pendingOperationId=e.operationId,this.emitRecovery({kind:"pending",operationId:e.operationId,phase:e.state==="undecided"?"unknown":e.state,longRunning:!1,reference:$t(e.operationId)});let t;try{t=await this.authorized(Vt(this.groupKey,e.operationId))}catch(s){return s instanceof Q||this.recoveryFailed(e.operationId,"request_failed"),null}if(t.status===404)return this.failOperation(e.operationId),null;if(!t.ok)return this.recoveryFailed(e.operationId,"request_failed"),null;let n=await this.responseJson(t);this.emit(n.operation);let r=n.operation.state;return r==="committed"||r==="booked"?(this.emitRecovery({kind:"idle"}),this.complete(n.operation)):r==="aborted"||r==="expired"?(this.failOperation(e.operationId),null):this.recover(e.operationId,[],Date.now()+this.recoveryTimeoutMs)}async retryRecovery(){this.assertUsable();let e=this.pendingOperationId??this.readOperationRecord()?.operationId??null;return e?(this.pendingOperationId=e,this.recover(e,[],Date.now()+this.recoveryTimeoutMs)):null}watchSettlement(e){if(this.destroyed)return;let t=this.operationIdForHold(e);!t||t===this.settleOperationId||(this.stopSettlementWatch(),this.settleOperationId=t,this.settleStartedAt=Date.now(),this.settleState="committed",typeof document<"u"&&(this.settleVisibility=()=>{document.hidden||!this.settleOperationId||this.pollSettlement()},document.addEventListener("visibilitychange",this.settleVisibility)),this.scheduleSettlementPoll())}stopSettlementWatch(){this.settleTimer&&clearTimeout(this.settleTimer),this.settleTimer=null,this.settleOperationId=null,this.settleState=null,this.settleVisibility&&typeof document<"u"&&document.removeEventListener("visibilitychange",this.settleVisibility),this.settleVisibility=null}scheduleSettlementPoll(){if(this.destroyed||!this.settleOperationId)return;if(this.settleTimer&&clearTimeout(this.settleTimer),typeof document<"u"&&document.hidden){this.settleTimer=null;return}let t=Date.now()-this.settleStartedAt>=Qp?Xp:Yp;this.settleTimer=setTimeout(()=>{this.pollSettlement()},t)}settled(e){return e==="booked"||e==="expired"||e==="aborted"}async pollSettlement(){let e=this.settleOperationId;if(this.destroyed||!e)return;if(typeof document<"u"&&document.hidden){this.settleTimer&&clearTimeout(this.settleTimer),this.settleTimer=null;return}let t;try{let r=await this.authorized(Vt(this.groupKey,e));if(!r.ok)return this.scheduleSettlementPoll();t=(await this.responseJson(r)).operation}catch(r){return r instanceof Q?this.stopSettlementWatch():this.scheduleSettlementPoll()}if(this.destroyed||this.settleOperationId!==e)return;let n=t.state!==this.settleState;if(this.settleState=t.state,n&&this.noteOperationState(e,t.state),this.settled(t.state)){this.stopSettlementWatch(),t.state!=="booked"&&this.clearOperationRecord(),this.emit(t);return}n&&this.emit(t),this.scheduleSettlementPoll()}destroy(){if(!this.destroyed){this.destroyed=!0,this.stopSettlementWatch(),this.access.onRenewed(void 0);try{this.aborter.abort()}catch{}}}operationRecordKey(){return`@seatlayer/performance-group-operation/v1/${encodeURIComponent(this.base)}/${encodeURIComponent(this.groupKey)}`}readOperationRecord(){try{let e=window.sessionStorage.getItem(this.operationRecordKey());if(!e)return null;let t=JSON.parse(e);return!t?.operationId||t.groupKey!==this.groupKey?null:t}catch{return null}}storedIsUndecided(e){return e.state==="undecided"||Zp.has(e.state)}writeOperationRecord(e){try{window.sessionStorage.setItem(this.operationRecordKey(),JSON.stringify(e))}catch{}}clearOperationRecord(){try{window.sessionStorage.removeItem(this.operationRecordKey())}catch{}}beginOperation(e){this.pendingOperationId=e;let t=this.readOperationRecord();this.writeOperationRecord({operationId:e,groupKey:this.groupKey,state:"undecided",createdAt:t?.operationId===e?t.createdAt:Date.now()})}noteOperationState(e,t){let n=this.readOperationRecord();!n||n.operationId!==e||this.writeOperationRecord({...n,state:t})}failOperation(e){this.pendingOperationId=null,this.clearOperationRecord(),this.emitRecovery({kind:"idle"}),this.onOperationState?.({operationId:e,state:"aborted",decision:"abort"})}async adoptSession(e){if(this.destroyed)return;let t=`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/session/adopt`;for(let r=0;r<2;r++){if(this.destroyed)return;try{if((await this.fetcher(`${this.base}${t}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.token}`},body:JSON.stringify({previousToken:e.previousToken}),credentials:"omit",signal:this.aborter.signal})).ok){this.adoptFailure=null;return}}catch{}}if(this.destroyed)return;this.adoptFailure=new U(409,"performance_group_session_adopt_failed","performance_group_session_adopt_failed");let n=this.pendingOperationId??"";throw this.emitRecovery({kind:"failed",operationId:n,reference:n?$t(n):"",reason:"session_adopt_failed",retryable:!1}),this.adoptFailure}async recover(e,t,n,r=100){let s=r,o=Date.now()+Math.min(8e3,Math.max(500,this.recoveryTimeoutMs/2)),a="unknown";for(;Date.now()<=n;){if(this.destroyed)throw new Q;if(this.emitRecovery({kind:"pending",operationId:e,phase:a,longRunning:Date.now()>=o,reference:$t(e)}),await Jp(s),this.destroyed)throw new Q;let l;try{l=await this.authorized(Vt(this.groupKey,e))}catch(p){if(p instanceof Q)throw p;if(p instanceof re)throw this.recoveryFailed(e,"request_failed"),p;s=Math.min(2e3,Math.max(100,s*2));continue}if(l.status===404){s=Math.min(1e3,Math.max(100,s*2));continue}if(!l.ok){this.recoveryFailed(e,"request_failed");try{return await this.throwResponse(l,t)}finally{this.pendingOperationId=null,this.clearOperationRecord()}}let d=(await this.responseJson(l)).operation;if(a=d.state,this.noteOperationState(e,d.state),this.emit(d),d.state==="committed"||d.state==="booked")return this.emitRecovery({kind:"idle"}),this.complete(d);if(d.state==="aborted"||d.state==="expired")throw this.failOperation(e),new U(409,"conflict","conflict",t.map(p=>({label:p,status:"held"})));s=vr(l)}throw this.recoveryFailed(e,"deadline"),new U(504,"performance_group_outcome_unknown","performance_group_outcome_unknown")}recoveryFailed(e,t){this.emitRecovery({kind:"failed",operationId:e,reference:$t(e),reason:t,retryable:!0})}emitRecovery(e){if(this.destroyed)return;let t=this.lastRecovery.kind===e.kind&&JSON.stringify(this.lastRecovery)===JSON.stringify(e);this.lastRecovery=e,t||this.onRecoveryState?.(e)}noteAvailability(e,t,n){if(this.destroyed||!this.onAvailability)return;let r=e.state??this.descriptorCache?.state??"active",s=e.revision??null,o=!!s&&!!this.knownRevision&&s!==this.knownRevision;s&&!this.knownRevision&&(this.knownRevision=s);let a=n?.partial??{},l=Object.values(n?.seats??{});this.onAvailability({partial:a,freeCount:l.filter(c=>c==="free").length,blockedCount:Object.keys(n?.seats??{}).filter(c=>n.seats[c]!=="free"&&!(c in a)).length,state:r,salesClosed:!!t||r!=="active",revision:s,revisionChanged:o})}acceptRevision(e){this.knownRevision=e}complete(e){if(!e.hold||e.hold.expiresAt==null)throw new U(409,"group_hold_not_active","group_hold_not_active");this.pendingOperationId=null,this.noteOperationState(e.operationId,e.state),this.operationByHold.set(e.hold.id,e.operationId),this.writeMapping(e.hold.id,e.operationId);let t=e.hold.allocations??[];this.allocationsByHold.set(e.hold.id,t);let n=t.find(r=>r.eventKey===this.activePerformanceKey)?.items;return{holdId:e.hold.id,expiresAt:e.hold.expiresAt,items:n??e.hold.items??[]}}emit(e){this.destroyed||this.onOperationState?.({operationId:e.operationId,state:e.state,decision:e.decision})}operationForHold(e){let t=this.operationIdForHold(e);if(!t)throw new U(404,"group_hold_not_found","group_hold_not_found");return t}mappingKey(e){return`@seatlayer/performance-group-hold/v1/${encodeURIComponent(this.base)}/${encodeURIComponent(this.groupKey)}/${encodeURIComponent(e)}`}readMapping(e){try{return window.sessionStorage.getItem(this.mappingKey(e))}catch{return null}}writeMapping(e,t){try{window.sessionStorage.setItem(this.mappingKey(e),t)}catch{}}assertUsable(){if(this.destroyed)throw new Q;if(this.adoptFailure)throw this.adoptFailure}async authorized(e,t={},n=!1){if(this.destroyed)throw new Q;if(this.adoptFailure)throw this.adoptFailure;let r={...t.headers};t.body!==void 0&&(r["Content-Type"]="application/json");let s=await this.access.authorization(n?"unauthorized":"initial");if(this.destroyed)throw new Q;if(this.adoptFailure)throw this.adoptFailure;if(!s)throw new Error("performance_group_buyer_access_required");r.Authorization=s;let o=await this.fetcher(`${this.base}${e}`,{method:t.method??"GET",headers:r,body:t.body,credentials:"omit",signal:this.aborter.signal});if(!n&&(o.status===401||o.status===403||o.status===422)){let a=await o.clone().json().catch(()=>null);if(await this.access.handleFailure(o.status,a?.code??a?.error))return this.authorized(e,t,!0)}return o}async json(e,t={}){let n=await this.authorized(e,t);return n.ok?this.responseJson(n):this.throwResponse(n)}async blob(e){let t=await this.authorized(e);return t.ok?t.blob():this.throwResponse(t)}async responseJson(e){return e.json()}async throwResponse(e,t=[]){let r=await e.json().catch(()=>null)??{},s=r.code??r.error??`request_failed_${e.status}`;throw e.status===409&&!r.conflicts?.length&&t.length&&(r.conflicts=t.map(o=>({label:o,status:"held"}))),new U(e.status,r.error??s,s,r.conflicts)}};var eh="https://api.seatlayer.io";function Bl(i){let e=typeof i=="string"?document.querySelector(i):i;if(!e)throw new Error("seatlayer: Performance Group picker container was not found");return e}var An=class{constructor(e){this.descriptorValue=null;this.picker=null;this.root=null;this.innerHost=null;this.tabsHost=null;this.prevButton=null;this.nextButton=null;this.heldSummary=null;this.live=null;this.statusHost=null;this.statusCopy=null;this.statusAction=null;this.rendered=!1;this.destroyed=!1;this.continued=!1;this.switchingPerformance=!1;this.operationPending=!1;this.recovery={kind:"idle"};this.availability=null;this.activePerformanceKey=null;this.selectionsByEvent=new Map;this.validByEvent=new Map;this.refreshingComposition=!1;this.activeHandoff=null;this.selectionModeValue="same_seat";this.progressHost=null;this.legendHost=null;this.paneHost=null;this.datesSummaryHost=null;this.datesCardsHost=null;this.resettingFlexibleSelection=!1;this.selectingPartialSeat=!1;this.partialSeatDates=new Map;this.markedLabels=new Set;this.holdTicker=null;this.switchingMode=!1;this.booked=!1;if(!e||typeof e!="object")throw new Error("seatlayer: options object is required");if(!e.performanceGroup)throw new Error("seatlayer: `performanceGroup` key is required");if(!e.container)throw new Error("seatlayer: `container` is required");if(!e.buyerAccessToken&&!e.buyerAccessTokenProvider)throw new Error("seatlayer: Performance Group buyer access is required");if(!!e.initialHoldId!=!!e.initialOperationId)throw new Error("seatlayer: `initialHoldId` and `initialOperationId` must be supplied together");if((e.selectionMode==="per_performance"||e.allowSelectionModeSwitch)&&(!Number.isSafeInteger(e.numberOfPlacesToSelect)||(e.numberOfPlacesToSelect??0)<1))throw new Error("seatlayer: `numberOfPlacesToSelect` is required for per-performance selection");this.selectionModeValue=e.selectionMode??"same_seat",this.options=e,this.panelId=`sl-pg-panel-${e.performanceGroup}`,this.access=new pe({provider:e.buyerAccessTokenProvider,token:e.buyerAccessToken,onExpired:e.onAccessExpired,onUnavailable:e.onAccessUnavailable}),this.api=new En(e.performanceGroup,{apiBase:e.apiBase,access:this.access,selectionMode:e.selectionMode,partySize:e.selectionMode==="per_performance"?e.numberOfPlacesToSelect:void 0,onOperationState:t=>this.operationChanged(t),onRecoveryState:t=>this.recoveryChanged(t),onAvailability:t=>this.availabilityChanged(t)}),e.initialHoldId&&e.initialOperationId&&this.api.rememberOperation(e.initialHoldId,e.initialOperationId)}get mode(){return this.selectionModeValue}get selectionMode(){return this.selectionModeValue}get descriptor(){return this.descriptorValue}get currentHold(){return this.activeHandoff}async render(){if(this.rendered)return this;let e=performance.now();if(this.rendered=!0,Nl(),await(0,qe.loadLocale)(this.options.locale),this.options.messages&&(0,qe.setStringOverrides)(this.options.messages),this.destroyed)return this;let t;try{t=await this.api.descriptor()}catch(n){throw Re({apiBase:this.options.apiBase??eh,event:this.options.performanceGroup,scope:"performance_group",surface:"performance_group_picker",outcome:"failure",stage:"group_descriptor",ms:performance.now()-e,load:ze(this.options.performanceGroup),transport:"pubapi"}),n}return this.destroyed?this:(this.descriptorValue=t,this.activePerformanceKey=t.performances[0]?.eventKey??null,this.buildChrome(Bl(this.options.container),t),this.announce(this.copy("picker.group.checkingAvailability")),await this.mountPicker(t),this.destroyed?this:(await this.restoreOperation(),this))}buildChrome(e,t){e.replaceChildren();let n=document.createElement("div");n.className="sl-pg-root",n.dataset.performanceGroup=t.key,n.dataset.selectionMode=this.mode;let r=document.createElement("div");r.className="sl-pg-progress";let s=document.createElement("section");s.className="sl-pg-head",s.setAttribute("aria-labelledby",`sl-pg-title-${t.key}`);let o=document.createElement("h2");o.id=`sl-pg-title-${t.key}`,o.textContent=t.name;let a=document.createElement("p");a.className="sl-pg-summary",a.textContent=this.copy(this.mode==="per_performance"?"picker.group.perPerformanceSummary":"picker.group.sameSeatSummary",{count:t.performanceCount});let l=document.createElement("p");l.className="sl-pg-help",l.textContent=this.copy(this.mode==="per_performance"?"picker.group.perPerformanceMapHelp":"picker.group.sameSeatMapHelp");let c=document.createElement("details");c.className="sl-pg-dates",c.open=t.performanceCount<=3;let d=document.createElement("summary");d.textContent=this.copy(t.inclusionMode==="flexible_dates"?"picker.group.flexibleDatesInView":"picker.group.allDates",{count:t.performanceCount});let p=document.createElement("div");p.innerHTML=sr(this.performanceCards(t),this.copy(t.inclusionMode==="flexible_dates"?"picker.group.flexibleDatesNote":"picker.group.includedNote",{count:t.performanceCount})),c.append(d,p);let u=document.createElement("div");u.className="sl-pg-held-summary",u.hidden=!0,s.append(o,a,l,c,u);let h=document.createElement("div");h.className="sl-pg-legend";let g=document.createElement("div");g.className="sl-pg-pane",g.setAttribute("role","group"),g.setAttribute("aria-label",this.copy("picker.group.yourSelection")),g.hidden=!0;let y=this.mode==="per_performance"?this.performanceTabs(t):null,S=document.createElement("div");S.className="sl-pg-inner",S.id=this.panelId,S.setAttribute("aria-busy","false"),S.dataset.locked="false",this.mode==="per_performance"&&(S.setAttribute("role","tabpanel"),S.tabIndex=-1);let k=document.createElement("div");k.className="sl-pg-status",k.setAttribute("role","status"),k.setAttribute("aria-live","polite"),k.hidden=!0;let v=document.createElement("p"),f=document.createElement("button");f.type="button",f.hidden=!0,f.textContent=this.copy("picker.group.retry"),f.addEventListener("click",()=>{this.retryRecovery()}),k.append(v,f),S.appendChild(k);let P=document.createElement("div");P.className="sl-pg-live",P.setAttribute("role","status"),P.setAttribute("aria-live","polite"),n.append(r,s),y&&n.append(y),n.append(h,S,g,P),e.appendChild(n),this.root=n,this.progressHost=r,this.legendHost=h,this.paneHost=g,this.datesSummaryHost=d,this.datesCardsHost=p,this.innerHost=S,this.heldSummary=u,this.live=P,this.statusHost=k,this.statusCopy=v,this.statusAction=f,this.syncProgress(),this.syncLegend(),this.syncPane()}async mountPicker(e){let t=new Ge(Sn({container:this.innerHost,event:e.key,apiBase:this.options.apiBase,transport:this.api,hideEventDetails:!0,maxSelection:this.options.maxSelection,selectedObjects:this.options.selectedObjects,selectableObjects:this.options.selectableObjects,numberOfPlacesToSelect:this.options.numberOfPlacesToSelect,selectionValidators:this.options.selectionValidators,locale:this.options.locale,messages:this.options.messages,languages:this.options.languages,colorblindSafe:this.options.colorblindSafe,initialView:this.options.initialView,enable3D:this.options.enable3D,max3DSeats:this.options.max3DSeats,onBuyerViewChange:this.options.onBuyerViewChange,onAnalytics:(n,r)=>{try{this.options.onAnalytics?.(n,{...r,metricScope:"performance_group",performanceGroupKey:e.key,performanceCount:e.performanceCount,selectionMode:this.mode})}catch{}},hideBadge:this.options.hideBadge,theme:this.options.theme,holdTtlMs:this.options.holdTtlMs,initialHoldId:this.options.initialHoldId,restoreHold:this.options.restoreHold,confirmSelection:this.options.confirmSelection,seatView:this.options.seatView,onSelectionChange:n=>this.selectionChanged(n),onSelectionValidityChange:n=>this.selectionValidityChanged(n),onSelectionValid:this.options.onSelectionValid,onSelectionInvalid:this.options.onSelectionInvalid,onSelectionLimit:this.options.onSelectionLimit,onHoldChange:(n,r)=>this.holdChanged(n,r),onCheckout:(n,r)=>this.checkout(n,r),onHoldExpired:()=>{this.activeHandoff=null,this.api.stopSettlementWatch(),this.resetPerPerformanceSelection(),this.syncProgress(),this.syncPane(),this.syncHoldTicker(),this.options.onHoldChange?.(null),this.options.onHoldExpired?.()},onError:this.options.onError},{performanceCount:e.performanceCount,selectionMode:this.mode,submissionState:()=>this.submissionState(),suppressPricing:!0,nights:()=>this.nights(),seatMarks:()=>this.seatMarks(),nightSummary:()=>this.nightSummary(),groupSelectionSummary:()=>this.groupSelectionSummary(),activePerformanceLabel:()=>this.activePerformanceLabel(),selectedPerformanceDates:()=>this.mode==="same_seat"&&e.inclusionMode==="flexible_dates"?xo(this.includedPerformances(),e.performanceCount,this.options.locale,this.copy("picker.group.flexibleSelectedNote",{count:this.includedPerformances().length})):null,selectNight:n=>{this.switchPerformance(n)},selectionModeSwitch:this.options.allowSelectionModeSwitch&&this.mode==="same_seat"?{label:this.copy("picker.group.chooseNightByNight"),activate:()=>{this.switchSelectionMode("per_performance")}}:null,partialSeatSelection:e.inclusionMode==="flexible_dates"&&this.mode==="same_seat"?{label:n=>this.copy("picker.group.selectAvailableDates",{count:n}),activate:(n,r)=>{this.selectPartialSeat(n,r)}}:null,confirmDateSelection:e.inclusionMode==="flexible_dates"&&this.mode==="same_seat"?{includedEventKeys:()=>this.api.includedPerformanceKeys(),availableEventKeys:n=>this.partialSeatDates.get(n)??this.nights().map(r=>r.eventKey),label:n=>this.copy("picker.group.selectAvailableDates",{count:n}),apply:(n,r)=>this.applySeatDates(n,r,!0)}:null}));this.picker=t,await t.render(),!this.destroyed&&this.updateTabs()}performanceCards(e){return e.performances.map(t=>({eventKey:t.eventKey,name:t.name,iso:new Date(t.startsAt).toISOString(),date:dn(t,this.options.locale),time:pn(t,this.options.locale)}))}nights(){return(this.descriptorValue?.performances??[]).map(e=>({eventKey:e.eventKey,name:e.name,shortDate:hn(e,this.options.locale)}))}seatMarks(){let e=this.descriptorValue?.performanceCount??0,t=this.availability,n=!!t?.salesClosed||!!t&&t.state!=="active",r=this.mode==="same_seat"&&!n?t?.partial??{}:{},s={};for(let o of this.markedLabels)s[o]=null;if(this.markedLabels.clear(),e>0)for(let[o,a]of Object.entries(r))!a.length||a.length>=e||(s[o]={kind:"partial",fraction:(e-a.length)/e,data:{blockedEventKeys:[...a]}},this.markedLabels.add(o));return s}activePerformanceLabel(){if(this.mode!=="per_performance")return null;let e=this.descriptorValue?.performances.find(r=>r.eventKey===this.activePerformanceKey);if(!e)return null;let t=hn(e,this.options.locale),n=e.name?.trim();return n&&n!==t?`${n} \xB7 ${t}`:t}nightSummary(){return this.mode!=="per_performance"?[]:(this.descriptorValue?.performances??[]).map(e=>({eventKey:e.eventKey,name:hn(e,this.options.locale),labels:(this.selectionsByEvent.get(e.eventKey)??[]).map(t=>t.label),active:e.eventKey===this.activePerformanceKey}))}groupSelectionSummary(){let e=this.includedPerformances();if(!e.length)return null;if(this.mode==="same_seat"){let s=this.activeHandoff?.seatLabels.length??this.picker?.getSelection().length??0;return{seats:s*e.length,performances:e.length,totalPerformances:this.descriptorValue?.performanceCount??e.length,performancesChosen:s?e.length:0,perPerformance:s}}let t=e.map(s=>this.selectionsByEvent.get(s.eventKey)?.length??0),n=t.filter(s=>s>0),r=n.length===t.length&&n.every(s=>s===n[0]);return{seats:t.reduce((s,o)=>s+o,0),performances:e.length,totalPerformances:this.descriptorValue?.performanceCount??e.length,performancesChosen:n.length,perPerformance:r&&n.length?n[0]:null}}syncProgress(){if(!this.progressHost)return;let e=!!this.activeHandoff,t=[{id:"performances",label:this.copy("picker.group.stepPerformances"),state:"done"},{id:"seats",label:this.copy("picker.group.stepSeats"),state:e?"done":"current"},{id:"review",label:this.copy("picker.group.stepReview"),state:this.booked?"done":e?"current":"upcoming"}];this.progressHost.innerHTML=Ho(t,{label:this.copy("picker.group.progressLabel"),done:this.copy("picker.group.stepDone"),current:this.copy("picker.group.stepCurrent"),upcoming:this.copy("picker.group.notStarted")})}syncLegend(){if(!this.legendHost)return;let e=this.availability,t=!!e?.salesClosed||e&&e.state!=="active";if(!e||t){this.legendHost.replaceChildren();return}this.legendHost.innerHTML=So({available:e.freeCount>0,selected:(this.picker?.getSelection().length??0)>0,partial:Object.keys(e.partial).length>0,unavailable:e.blockedCount>0},{title:this.copy("picker.group.legendTitle"),available:this.copy("picker.group.legendAvailable"),selected:this.copy("picker.group.legendSelected"),partial:this.copy("picker.group.legendNotEveryDate"),unavailable:this.copy("picker.group.legendUnavailable")},this.categoryColor())}categoryColor(){return this.picker?.categoryLegendColor()??"#2563eb"}syncPane(){let e=this.paneHost;if(!e)return;let t=this.includedPerformances();if(this.mode!=="same_seat"||!t.length){e.hidden=!0,e.replaceChildren();return}let n=this.activeHandoff?.seatLabels??this.picker?.getSelection().map(s=>s.label)??[],r=this.heldTotal();e.hidden=!1,e.innerHTML=Ro({title:this.copy("picker.group.yourSelection"),rows:t.map(s=>({eventKey:s.eventKey,name:`${dn(s,this.options.locale)} ${pn(s,this.options.locale)}`,labels:n})),empty:this.copy("picker.group.noSeatsChosenYet"),note:r?null:this.copy("picker.group.pricesPerPerformance"),total:r?{label:this.copy("picker.group.total"),amount:r}:null,holdStatus:this.booked?this.copy("picker.group.bookedAll",{count:t.length}):this.activeHandoff?this.copy("picker.group.heldTogether",{count:t.length,time:Io(this.activeHandoff.expiresAt-Date.now())}):null})}heldTotal(){let e=this.activeHandoff,t=this.descriptorValue;if(!e||!t)return null;let r=this.api.allocationsForHold(e.holdId).flatMap(a=>a.items);if(!r.length)return null;let s=r.reduce((a,l)=>a+l.unitPrice*(l.quantity??1),0),o=r[0]?.currency??t.currency;try{return(0,qe.formatMoney)(s,o,void 0,this.options.locale)}catch{return`${o} ${s.toFixed(2)}`}}includedPerformances(){let e=this.descriptorValue?.performances??[];if(this.descriptorValue?.inclusionMode!=="flexible_dates")return e;let t=new Set(this.api.includedPerformanceKeys());return e.filter(n=>t.has(n.eventKey))}syncIncludedDates(){let e=this.descriptorValue;if(!e||!this.datesSummaryHost||!this.datesCardsHost)return;let t=this.includedPerformances(),n=e.inclusionMode==="flexible_dates";this.datesSummaryHost.textContent=n&&t.length<e.performanceCount?this.copy("picker.group.flexibleDatesSelected",{selected:t.length,total:e.performanceCount}):this.copy(n?"picker.group.flexibleDatesInView":"picker.group.allDates",{count:e.performanceCount}),this.datesCardsHost.innerHTML=sr(this.performanceCards({...e,performances:t}),this.copy(n&&t.length<e.performanceCount?"picker.group.flexibleSelectedNote":n?"picker.group.flexibleDatesNote":"picker.group.includedNote",{count:t.length}))}async selectPartialSeat(e,t){if(!(this.destroyed||this.holdBlocked()||this.activeHandoff||!t.length)){if((this.picker?.getSelection().length??0)>0){this.announce(this.copy("picker.group.clearBeforePartial"));return}this.partialSeatDates.set(e,[...t]),await this.applySeatDates(e,t,!1)}}async applySeatDates(e,t,n){if(this.destroyed||this.holdBlocked()||this.activeHandoff||!t.length)return!1;let r=this.api.includedPerformanceKeys();if(r.length===t.length&&r.every(s=>t.includes(s)))return!0;this.selectingPartialSeat=!0;try{if(this.api.setIncludedEventKeys(t),this.syncIncludedDates(),await this.picker?.refreshAvailability(),!(n?this.picker?.selectObjectsWithoutConfirmation([e])??[]:this.picker?.selectObjects([e])??[]).length)throw new Error("performance_group_partial_seat_unavailable");return this.announce(this.copy("picker.group.selectedAvailableDates",{count:t.length})),this.syncPane(),this.syncLegend(),!0}catch(s){return r.length&&(this.api.setIncludedEventKeys(r),this.syncIncludedDates(),await this.picker?.refreshAvailability().catch(()=>{})),this.options.onError?.(s),!1}finally{this.selectingPartialSeat=!1}}syncHoldTicker(){this.booked||(this.activeHandoff&&!this.holdTicker?this.holdTicker=setInterval(()=>this.syncPane(),1e3):!this.activeHandoff&&this.holdTicker&&(clearInterval(this.holdTicker),this.holdTicker=null))}async switchSelectionMode(e){if(!(this.destroyed||this.switchingMode||e===this.mode)&&!(this.activeHandoff||this.holdBlocked())){this.switchingMode=!0;try{this.api.setSelectionMode(e,this.options.numberOfPlacesToSelect),this.selectionModeValue=e,this.picker?.destroy(),this.picker=null,this.selectionsByEvent.clear(),this.validByEvent.clear(),this.markedLabels.clear(),this.availability=null;let t=this.descriptorValue;if(this.activePerformanceKey=t.performances[0]?.eventKey??null,this.buildChrome(Bl(this.options.container),t),await this.mountPicker(t),this.destroyed)return;this.announce(this.copy("picker.group.nightByNightStarted")),this.options.onSelectionModeChange?.(e)}catch(t){if(t instanceof Q)return;this.options.onError?.(t)}finally{this.switchingMode=!1}}}async release(){await this.picker?.release()}close(){this.destroy()}destroy(){if(this.destroyed)return;this.destroyed=!0,this.api.destroy(),this.holdTicker&&clearInterval(this.holdTicker),this.holdTicker=null;let e=this.picker;this.root?.setAttribute("hidden","");let t=()=>{e?.destroy(),this.access.clear(),this.root?.remove(),this.root=null,this.picker=null,this.innerHost=null,this.tabsHost=null,this.statusHost=null,this.statusCopy=null,this.statusAction=null,this.live=null};e?.getCurrentHold()&&!this.continued?e.release().catch(()=>{}).finally(t):t()}copy(e,t){let n=this.options.messages?.[e];return n!==void 0?t?n.replace(/\{(\w+)\}/g,(r,s)=>String(t[s]??`{${s}}`)):n:(0,qe.t)(e,t)}performanceTabs(e){let t=document.createElement("div");t.className="sl-pg-tabsbar";let n=document.createElement("button");n.type="button",n.className="sl-pg-step",n.dataset.step="previous",n.setAttribute("aria-label",this.copy("picker.group.previousPerformance")),n.textContent="\u2039",n.addEventListener("click",()=>{this.stepPerformance(-1)});let r=document.createElement("button");r.type="button",r.className="sl-pg-step",r.dataset.step="next",r.setAttribute("aria-label",this.copy("picker.group.nextPerformance")),r.textContent="\u203A",r.addEventListener("click",()=>{this.stepPerformance(1)});let s=document.createElement("div");return s.className="sl-pg-tabs",s.setAttribute("role","tablist"),s.setAttribute("aria-label",this.copy("picker.group.performances")),e.performances.forEach((o,a)=>{let l=document.createElement("button");l.type="button",l.className="sl-pg-tab",l.id=`sl-pg-tab-${e.key}-${o.eventKey}`,l.dataset.eventKey=o.eventKey,l.dataset.state="not-started",l.setAttribute("role","tab"),l.setAttribute("aria-selected",String(a===0)),l.setAttribute("aria-controls",this.panelId),l.tabIndex=a===0?0:-1;let c=document.createElement("span");c.className="sl-pg-tab-name",c.textContent=o.name;let d=document.createElement("span");d.className="sl-pg-tab-state",d.textContent=this.copy("picker.group.stillNeedsSeat");let p=document.createElement("span");p.className="sl-pg-tab-badge",p.textContent=this.copy("picker.group.chosenOfTotal",{chosen:0,total:this.options.numberOfPlacesToSelect??1}),l.append(c,p,d),l.addEventListener("click",()=>{this.switchPerformance(o.eventKey)}),l.addEventListener("keydown",u=>this.tabKeydown(u)),s.appendChild(l)}),t.append(n,s,r),this.tabsHost=s,this.prevButton=n,this.nextButton=r,t}tabButtons(){return[...this.tabsHost?.querySelectorAll(".sl-pg-tab")??[]]}tabKeydown(e){let t=this.tabButtons(),n=t.findIndex(a=>a===e.target);if(n<0)return;let r=getComputedStyle(this.tabsHost??document.body).direction==="rtl",s=-1;switch(e.key){case"ArrowRight":s=n+(r?-1:1);break;case"ArrowLeft":s=n+(r?1:-1);break;case"ArrowDown":s=n+1;break;case"ArrowUp":s=n-1;break;case"Home":s=0;break;case"End":s=t.length-1;break;default:return}if(s<0||s>=t.length)return;e.preventDefault();let o=t[s];o.focus({preventScroll:!0}),o.disabled||this.switchPerformance(o.dataset.eventKey)}stepPerformance(e){let t=this.tabButtons(),n=t.findIndex(s=>s.dataset.eventKey===this.activePerformanceKey),r=t[n+e];!r||r.disabled||(r.focus({preventScroll:!0}),this.switchPerformance(r.dataset.eventKey))}submissionState(){let e=this.descriptorValue?.performances??[];if(this.mode!=="per_performance"){let r=!this.holdBlocked();return{complete:e.length,total:e.length,ready:r}}let t=this.options.numberOfPlacesToSelect,n=e.filter(r=>this.selectionsByEvent.get(r.eventKey)?.length===t&&this.validByEvent.get(r.eventKey)!==!1).length;return{complete:n,total:e.length,ready:n===e.length&&!this.holdBlocked()}}holdBlocked(){return this.operationPending||this.recovery.kind!=="idle"||!!this.availability?.salesClosed}selectionChanged(e){if(this.mode!=="per_performance"){this.options.onSelectionChange?.(e),this.syncPane(),this.syncLegend(),!e.length&&!this.activeHandoff&&!this.resettingFlexibleSelection&&!this.selectingPartialSeat&&this.descriptorValue?.inclusionMode==="flexible_dates"&&this.api.includedPerformanceKeys().length<this.descriptorValue.performanceCount&&(this.resettingFlexibleSelection=!0,this.api.setIncludedEventKeys(this.descriptorValue.performances.map(n=>n.eventKey)),this.syncIncludedDates(),this.picker?.refreshAvailability().catch(n=>this.options.onError?.(n)).finally(()=>{this.resettingFlexibleSelection=!1}));return}if(this.refreshingComposition||this.switchingPerformance||!this.activePerformanceKey)return;let t=e.map(n=>({...n}));this.selectionsByEvent.set(this.activePerformanceKey,t),this.api.setPerformanceSelections(this.activePerformanceKey,t.map(n=>({label:n.label}))),t.length!==this.options.numberOfPlacesToSelect?this.validByEvent.set(this.activePerformanceKey,!1):this.validByEvent.has(this.activePerformanceKey)||this.validByEvent.set(this.activePerformanceKey,!0),this.updateTabs(),this.options.onSelectionChange?.(e),this.refreshComposition(),this.syncLegend()}selectionValidityChanged(e){if(this.mode==="per_performance"&&!this.switchingPerformance&&this.activePerformanceKey){let t=this.validByEvent.get(this.activePerformanceKey);this.validByEvent.set(this.activePerformanceKey,e.isValid),this.updateTabs(),!this.refreshingComposition&&t!==e.isValid&&this.refreshComposition()}this.options.onSelectionValidityChange?.(e)}refreshComposition(){if(this.refreshingComposition||!this.picker)return;let e=this.submissionState();this.refreshingComposition=!0;try{this.picker.refreshPerformanceGroupComposition();let t=this.submissionState();(e.complete!==t.complete||e.ready!==t.ready)&&this.picker.refreshPerformanceGroupComposition()}finally{this.refreshingComposition=!1}}tabState(e){let t=this.options.numberOfPlacesToSelect??1,n=(this.selectionsByEvent.get(e)??[]).map(s=>s.label),r=this.copy("picker.group.chosenOfTotal",{chosen:n.length,total:t});return n.length===0?{key:"not-started",label:this.copy("picker.group.stillNeedsSeat"),badge:r}:n.length===t&&this.validByEvent.get(e)!==!1?{key:"complete",label:this.copy("picker.group.completeWithSeats",{seats:n.join(", ")}),badge:r}:n.length===t?{key:"needs-attention",label:this.copy("picker.group.needsAttention"),badge:r}:{key:"in-progress",label:this.copy("picker.group.needsMoreSeats",{count:t-n.length}),badge:r}}updateTabs(){let e=this.tabButtons(),t=this.switchingPerformance||this.operationPending||this.recovery.kind!=="idle"||!!this.activeHandoff;e.forEach(r=>{let s=r.dataset.eventKey,o=this.tabState(s),a=s===this.activePerformanceKey;r.dataset.state=o.key,r.disabled=t,r.setAttribute("aria-selected",String(a)),r.tabIndex=a?0:-1;let l=r.querySelector(".sl-pg-tab-state");l&&(l.textContent=o.label);let c=r.querySelector(".sl-pg-tab-badge");c&&(c.textContent=o.badge);let d=r.querySelector(".sl-pg-tab-name")?.textContent??s;r.setAttribute("aria-label",`${d}: ${o.badge} \xB7 ${o.label}`),a&&this.innerHost?.setAttribute("aria-labelledby",r.id)});let n=e.findIndex(r=>r.dataset.eventKey===this.activePerformanceKey);this.prevButton&&(this.prevButton.disabled=t||n<=0),this.nextButton&&(this.nextButton.disabled=t||n<0||n>=e.length-1)}async switchPerformance(e){if(this.mode!=="per_performance"||this.switchingPerformance||this.holdBlocked()||this.activeHandoff||e===this.activePerformanceKey||!this.picker)return;this.activePerformanceKey&&this.selectionChanged(this.picker.getSelection());let t=this.selectionsByEvent.get(e)?.map(n=>n.label)??[];this.switchingPerformance=!0,this.activePerformanceKey=e,this.updateTabs(),this.setInteractionLocked(!0);try{this.picker.clearSelection(),this.api.setActivePerformance(e),await this.picker.refreshAvailability();let n=this.picker.selectObjects(t);this.switchingPerformance=!1,this.selectionChanged(n),n.length!==t.length&&this.validByEvent.set(e,!1),this.options.onSelectionChange?.(n);let r=this.descriptorValue?.performances.find(s=>s.eventKey===e);r&&this.announce(this.copy("picker.group.performanceOpened",{performance:r.name}))}catch(n){this.options.onError?.(n)}finally{this.switchingPerformance=!1,!this.operationPending&&this.recovery.kind==="idle"&&this.setInteractionLocked(!1),this.updateTabs(),this.picker.refreshPerformanceGroupComposition()}}setInteractionLocked(e){let t=this.innerHost;t&&(t.dataset.locked=String(e),t.setAttribute("aria-busy",String(e)),t.setAttribute("aria-disabled",String(e)))}announce(e){this.live&&(this.live.textContent=e)}showStatus(e,t,n={}){this.statusHost&&this.statusCopy&&this.statusAction&&(this.statusCopy.textContent=t,this.statusHost.hidden=!t,this.statusAction.hidden=!n.retry),this.announce(t),this.options.onStatusChange?.({kind:e,message:t,...n.reference?{reference:n.reference}:{}})}clearStatus(){this.statusHost&&(this.statusHost.hidden=!0),this.statusAction&&(this.statusAction.hidden=!0),this.options.onStatusChange?.({kind:"idle",message:""})}operationChanged(e){if(this.destroyed)return;let t=e.state==="preparing"||e.state==="commit_pending"||e.state==="abort_pending"||e.state==="expire_pending";if(this.operationPending=t,this.setInteractionLocked(t||this.recovery.kind!=="idle"),this.updateTabs(),t){this.showStatus("pending",this.copy(e.state==="commit_pending"?"picker.group.commitPending":e.state==="abort_pending"||e.state==="expire_pending"?"picker.group.abortPending":"picker.group.securing"));return}if(e.state==="booked"){this.bookingSettled();return}if(e.state==="expired"||e.state==="aborted"){this.activeHandoff&&this.holdLost();return}if(e.state==="committed"){this.clearStatus(),this.announce(this.copy("picker.group.secured")),queueMicrotask(()=>this.innerHost?.querySelector('[data-ref="cta"]')?.focus({preventScroll:!0}));return}e.decision==="abort"&&this.recovery.kind==="idle"&&(this.clearStatus(),this.announce(this.copy("picker.group.notSecured")))}bookingSettled(){if(this.booked)return;this.booked=!0,this.root&&(this.root.dataset.booking="booked"),this.clearStatus(),this.holdTicker&&clearInterval(this.holdTicker),this.holdTicker=null;let e=this.activeHandoff?{...this.activeHandoff,bookingState:"booked"}:null;e&&(this.activeHandoff=e),this.syncProgress(),this.syncPane(),this.updateTabs(),this.picker?.notifyGroupSettled("booked"),this.announce(this.copy("picker.group.bookedAll",{count:this.descriptorValue?.performanceCount??0})),e&&this.options.onBooked?.(e)}holdLost(){this.activeHandoff=null,this.api.stopSettlementWatch(),this.resetPerPerformanceSelection(),this.syncProgress(),this.syncPane(),this.syncHoldTicker(),this.picker?.notifyGroupSettled("lost"),this.announce(this.copy("picker.group.notSecured")),this.options.onHoldChange?.(null),this.options.onHoldExpired?.()}recoveryChanged(e){if(!this.destroyed){if(this.recovery=e,this.setInteractionLocked(this.operationPending||e.kind!=="idle"),this.updateTabs(),this.refreshComposition(),e.kind==="idle"){this.operationPending||this.clearStatus();return}if(e.kind==="pending"){this.showStatus("pending",e.longRunning?this.copy("picker.group.longRunning",{reference:e.reference}):this.copy("picker.group.outcomeUnknown"),{reference:e.reference});return}this.showStatus("recovery_failed",this.copy("picker.group.longRunning",{reference:e.reference}),{retry:e.retryable,reference:e.reference}),this.setInteractionLocked(!1)}}async retryRecovery(){if(!(this.destroyed||this.recovery.kind!=="failed"||!this.recovery.retryable))try{await this.api.retryRecovery()}catch(e){if(e instanceof Q)return;this.options.onError?.(e)}}async restoreOperation(){try{let e=await this.api.restoreOperation();e&&!this.destroyed&&await this.picker?.adoptRestoredHold(e.holdId)}catch(e){if(e instanceof Q)return;this.options.onError?.(e)}}availabilityChanged(e){if(this.destroyed)return;let t=this.availability;if(this.availability=e,e.revisionChanged){this.showStatus("revision_changed",this.copy("picker.group.revisionChanged")),this.reloadDescriptor(e.revision);return}e.salesClosed?this.showStatus("sales_closed",this.copy("picker.group.salesClosed")):t?.salesClosed&&this.clearStatus(),this.updateTabs(),this.refreshComposition(),this.syncLegend()}async reloadDescriptor(e){this.api.acceptRevision(e);try{let t=await this.api.descriptor();if(this.destroyed)return;this.descriptorValue=t,await this.picker?.refreshAvailability()}catch(t){if(t instanceof Q)return;this.options.onError?.(t)}}handoff(e,t){let n=this.descriptorValue,r=this.api.operationIdForHold(e.holdId);if(!n||!r)throw new Error("seatlayer: Performance Group hold identity is unavailable");let s=this.api.allocationsForHold(e.holdId);return{operationId:r,holdId:e.holdId,expiresAt:e.expiresAt,performanceGroup:n,selectionMode:this.mode,performanceKeys:s.map(o=>o.eventKey),bookingState:this.booked?"booked":"held",seatLabels:t.map(o=>o.label),...this.mode==="per_performance"?{allocations:s.map(o=>({eventKey:o.eventKey,seatLabels:o.items.map(a=>a.label)}))}:{}}}renderHeldAllocations(e){if(!(!this.heldSummary||this.mode!=="per_performance")){this.heldSummary.replaceChildren();for(let t of e){let n=this.descriptorValue?.performances.find(o=>o.eventKey===t.eventKey),r=document.createElement("p"),s=document.createElement("strong");s.textContent=n?.name??t.eventKey,r.append(s,document.createTextNode(t.items.map(o=>o.label).join(", "))),this.heldSummary.appendChild(r)}this.heldSummary.hidden=e.length===0}}resetPerPerformanceSelection(){this.mode==="per_performance"&&(this.selectionsByEvent.clear(),this.validByEvent.clear(),this.heldSummary?.replaceChildren(),this.heldSummary&&(this.heldSummary.hidden=!0),this.updateTabs(),this.picker?.refreshPerformanceGroupComposition())}holdChanged(e,t){if(!e){this.activeHandoff=null,this.api.stopSettlementWatch(),this.resetPerPerformanceSelection(),this.syncProgress(),this.syncPane(),this.syncHoldTicker(),this.options.onHoldChange?.(null);return}let n=this.handoff(e,t),r=this.activeHandoff?.holdId!==n.holdId;this.activeHandoff=n,this.renderHeldAllocations(this.api.allocationsForHold(e.holdId)),this.updateTabs(),this.api.watchSettlement(e.holdId),this.syncProgress(),this.syncPane(),this.syncHoldTicker(),r&&this.options.onHold?.(n),this.options.onHoldChange?.(n)}checkout(e,t){let n=this.handoff(e,t);this.continued=!0,this.activeHandoff=n,this.options.onCheckout?.(n)}};var Xt=require("@seatlayer/core");var Fl="seatlayer-season-picker-style";function Vl(){if(document.getElementById(Fl))return;let i=document.createElement("style");i.id=Fl,i.textContent=`
2981
+ `,document.head.appendChild(i)}var Dp="https://api.seatlayer.io",Bp=6e4,Fp=2e3,Vp=1e3,$p=36e5,zp=5e3,jp=5e3,Gp=15e3,Up=12e4,qp=new Set(["preparing","commit_pending","abort_pending","expire_pending"]),Z=class extends Error{constructor(){super("performance_group_destroyed"),this.name="PerformanceGroupDestroyedError"}};function Kp(i){return new Promise(e=>setTimeout(e,i))}function mo(i){let e=Number(i.headers.get("Retry-After")??"1");return Number.isFinite(e)?Math.max(50,Math.min(zp,e*1e3)):1e3}function Dt(i,e){return`/pub/performance-groups/${encodeURIComponent(i)}/operations/${encodeURIComponent(e)}`}function Bt(i){return i.replace(/^pghop_/,"").replace(/-/g,"").slice(-8).toUpperCase()}var fo=class{constructor(e,t,n){this.api=e;this.sink=t;this.intervalMs=n;this.stopped=!0;this.timer=null;this.prior=new Map}start(){this.stopped&&(this.stopped=!1,this.tick())}stop(){this.stopped=!0,this.timer&&clearTimeout(this.timer),this.timer=null}async tick(){try{let e=await this.api.objects(this.api.groupKey);if(this.stopped)return;let t=new Map(Object.entries(e.seats)),o=[...new Set([...this.prior.keys(),...t.keys()])].filter(r=>this.prior.get(r)!==t.get(r)).map(r=>({label:r,status:t.get(r)??"blocked"}));this.prior=t,o.length&&this.sink.applyStatuses(o),this.sink.onSections?.(e.hidden??[],e.closed??[])}catch(e){if(e instanceof Z){this.stop();return}this.stopped||await this.sink.resync()}finally{this.stopped||(this.timer=setTimeout(()=>{this.tick()},this.intervalMs))}}},kn=class{constructor(e,t){this.descriptorCache=null;this.chartRequest=null;this.objectsCache=null;this.activePerformanceKey=null;this.includedEventKeys=new Set;this.reuseObjectsCacheOnce=!1;this.selectionsByEvent=new Map;this.allocationsByHold=new Map;this.pendingOperationId=null;this.operationByHold=new Map;this.knownRevision=null;this.destroyed=!1;this.aborter=new AbortController;this.adoptFailure=null;this.settleTimer=null;this.settleOperationId=null;this.settleStartedAt=0;this.settleState=null;this.settleVisibility=null;this.lastRecovery={kind:"idle"};if(!e)throw new Error("seatlayer: `performanceGroup` key is required");this.groupKey=e,this.base=(t.apiBase??Dp).replace(/\/+$/,""),this.access=t.access,this.fetcher=t.fetch??globalThis.fetch.bind(globalThis),this.recoveryTimeoutMs=t.recoveryTimeoutMs??Bp,this.realtimePollMs=Math.max(500,t.realtimePollMs??Fp),this.selectionMode=t.selectionMode??"same_seat",this.partySize=t.partySize??null,this.onOperationState=t.onOperationState,this.onRecoveryState=t.onRecoveryState,this.onAvailability=t.onAvailability,this.access.onRenewed(o=>this.adoptSession(o));let n=this.readOperationRecord();n&&this.storedIsUndecided(n)&&(this.pendingOperationId=n.operationId)}get pendingOperation(){return this.pendingOperationId}get holdBlocked(){return!!this.adoptFailure||!!this.pendingOperationId&&this.lastRecovery.kind!=="idle"}async descriptor(){let e=await this.json(`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/descriptor`);return this.descriptorCache=e.performanceGroup,this.includedEventKeys.size||(this.includedEventKeys=new Set(e.performanceGroup.performances.map(t=>t.eventKey))),e.performanceGroup.revision&&(this.knownRevision=e.performanceGroup.revision),this.activePerformanceKey??=e.performanceGroup.performances[0]?.eventKey??null,e.performanceGroup}async chart(e){this.chartRequest??=this.json(`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/chart`).catch(o=>{throw this.chartRequest=null,o});let[t,n]=await Promise.all([this.descriptorCache?Promise.resolve(this.descriptorCache):this.descriptor(),this.chartRequest]);return{doc:n,event:{key:t.key,name:t.name,salesClosed:t.state!=="active",venue:t.venue,startsAt:t.performances[0]?.startsAt??null,timezone:t.timezone,currency:t.currency,mode:t.mode,inventoryModelVersion:2}}}asset(e,t){return/^[a-zA-Z0-9._-]+$/.test(t)?this.blob(`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/assets/${encodeURIComponent(t)}`):Promise.reject(new G(404,"not_found","not_found"))}async objects(e){let t=this.descriptorCache?.inclusionMode==="flexible_dates",n=`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/objects`+(this.selectionMode==="per_performance"||t?"?view=per-performance":"");if(this.reuseObjectsCacheOnce&&this.objectsCache)this.reuseObjectsCacheOnce=!1;else{let s=await this.authorized(n,this.objectsCache?.revision?{headers:{"If-None-Match":`"${this.objectsCache.revision}"`}}:{});if(s.status!==304){if(!s.ok)return this.throwResponse(s);this.objectsCache=await this.responseJson(s)}}if(!this.objectsCache)throw new G(502,"group_projection_unavailable","group_projection_unavailable");if(this.selectionMode==="same_seat"&&!t){let s=this.objectsCache;return this.noteAvailability(s,s.salesClosed,s),s}let o=this.objectsCache;if(this.selectionMode==="same_seat"){let s=o.performances.filter(p=>this.includedEventKeys.has(p.eventKey));if(!s.length)throw new G(409,"group_selection_incomplete","group_selection_incomplete");let a=Object.keys(s[0]?.seats??{}),l=Object.fromEntries(a.map(p=>[p,s.every(u=>u.seats[p]==="free")?"free":"blocked"])),c=Object.fromEntries(a.flatMap(p=>{let u=s.filter(h=>h.seats[p]!=="free").map(h=>h.eventKey);return u.length>0&&u.length<s.length?[[p,u]]:[]})),d={seats:l,partial:c,hidden:[...new Set(s.flatMap(p=>p.hidden??[]))],closed:[...new Set(s.flatMap(p=>p.closed??[]))],revision:o.revision,state:o.state,salesClosed:s.some(p=>p.salesClosed)};return this.noteAvailability(o,d.salesClosed,d),d}let r=o.performances.find(s=>s.eventKey===this.activePerformanceKey);if(!r)throw new G(409,"group_performance_unavailable","group_performance_unavailable");return this.noteAvailability(o,o.salesClosed||o.performances.some(s=>s.salesClosed),r),r}setSelectionMode(e,t){if(this.pendingOperationId||this.holdBlocked)throw new G(409,"group_operation_pending","group_operation_pending");e!==this.selectionMode&&(this.selectionMode=e,t!=null&&(this.partySize=t),this.objectsCache=null,this.selectionsByEvent.clear(),this.activePerformanceKey=this.descriptorCache?.performances[0]?.eventKey??this.activePerformanceKey)}setActivePerformance(e){if(this.descriptorCache&&!this.descriptorCache.performances.some(t=>t.eventKey===e))throw new G(404,"group_performance_not_found","group_performance_not_found");this.activePerformanceKey=e}setIncludedEventKeys(e){let t=new Set(this.descriptorCache?.performances.map(n=>n.eventKey)??[]);if(!e.length||new Set(e).size!==e.length||e.some(n=>!t.has(n)))throw new G(422,"invalid_event_keys","invalid_event_keys");this.includedEventKeys=new Set(e),this.reuseObjectsCacheOnce=!!this.objectsCache}includedPerformanceKeys(){return(this.descriptorCache?.performances??[]).map(e=>e.eventKey).filter(e=>this.includedEventKeys.has(e))}setPerformanceSelections(e,t){this.selectionsByEvent.set(e,t.map(n=>({...n})))}allocationsForHold(e){return(this.allocationsByHold.get(e)??[]).map(t=>({eventKey:t.eventKey,items:t.items.map(n=>({...n}))}))}async hold(e,t,n,o){if(this.assertUsable(),o)throw new G(409,"group_hold_replace_unsupported","group_hold_replace_unsupported");let r=t.map(c=>c.label),s={labels:r};if(this.descriptorCache?.inclusionMode==="flexible_dates"&&(s.eventKeys=this.includedPerformanceKeys()),this.selectionMode==="per_performance"){if(!this.activePerformanceKey||!this.descriptorCache||!this.partySize)throw new G(409,"group_selection_incomplete","group_selection_incomplete");this.setPerformanceSelections(this.activePerformanceKey,t);let c=this.descriptorCache.performances.filter(d=>this.includedEventKeys.has(d.eventKey)).map(d=>({eventKey:d.eventKey,selections:this.selectionsByEvent.get(d.eventKey)??[]}));if(c.some(d=>d.selections.length!==this.partySize))throw new G(409,"group_selection_incomplete","group_selection_incomplete");s={selectionMode:"per_performance",allocations:c,...this.descriptorCache.inclusionMode==="flexible_dates"?{eventKeys:this.includedPerformanceKeys()}:{}}}let a=this.pendingOperationId??`pghop_${crypto.randomUUID()}`;this.beginOperation(a),this.onOperationState?.({operationId:a,state:"preparing",decision:null});let l;try{l=await this.authorized(`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/hold`,{method:"POST",body:JSON.stringify({operationId:a,...s,...n?{ttlMs:n}:{}})})}catch(c){if(c instanceof Z)throw c;if(c instanceof re)throw this.failOperation(a),c;return this.recover(a,r,Date.now()+this.recoveryTimeoutMs)}if(l.status===201||l.status===202||l.status===504){let c=await this.responseJson(l);return this.emit(c.operation),l.status===201?this.complete(c.operation):this.recover(a,r,Date.now()+this.recoveryTimeoutMs,mo(l))}if(l.status===503){let c=await l.clone().json().catch(()=>null);if((c?.code??c?.error)==="performance_group_abort_pending"){let d=c?.operation?.operationId??a;return this.beginOperation(d),c?.operation&&this.emit(c.operation),this.recover(d,r,Date.now()+this.recoveryTimeoutMs,mo(l))}}try{return await this.throwResponse(l,r)}catch(c){throw this.failOperation(a),c}}async release(e,t,n){this.assertUsable();let o=this.operationForHold(n),r=await this.json(`${Dt(this.groupKey,o)}/release`,{method:"POST",body:"{}"});return this.operationByHold.delete(n),this.allocationsByHold.delete(n),this.clearOperationRecord(),r}async resume(e,t){this.assertUsable();let n=this.operationForHold(t),o=await this.json(Dt(this.groupKey,n));return this.complete(o.operation)}async extend(e,t,n=12e4){this.assertUsable();let o=this.operationForHold(t),r=Math.max(Vp,Math.min($p,Math.round(n))),s=await this.json(`${Dt(this.groupKey,o)}/extend`,{method:"POST",body:JSON.stringify({ttlMs:r})}),a=this.complete(s.operation);return{holdId:a.holdId,expiresAt:a.expiresAt}}bestAvailable(){return Promise.reject(new G(400,"group_best_available_unsupported","group_best_available_unsupported"))}socketUrl(){return""}createRealtime(e,t){return new fo(this,t,this.realtimePollMs)}operationIdForHold(e){return this.operationByHold.get(e)??this.readMapping(e)}rememberOperation(e,t){!e||!t||(this.operationByHold.set(e,t),this.writeMapping(e,t))}async restoreOperation(){let e=this.readOperationRecord();if(!e)return null;if(!this.storedIsUndecided(e)&&e.state!=="committed"&&e.state!=="booked")return this.clearOperationRecord(),null;this.pendingOperationId=e.operationId,this.emitRecovery({kind:"pending",operationId:e.operationId,phase:e.state==="undecided"?"unknown":e.state,longRunning:!1,reference:Bt(e.operationId)});let t;try{t=await this.authorized(Dt(this.groupKey,e.operationId))}catch(r){return r instanceof Z||this.recoveryFailed(e.operationId,"request_failed"),null}if(t.status===404)return this.failOperation(e.operationId),null;if(!t.ok)return this.recoveryFailed(e.operationId,"request_failed"),null;let n=await this.responseJson(t);this.emit(n.operation);let o=n.operation.state;return o==="committed"||o==="booked"?(this.emitRecovery({kind:"idle"}),this.complete(n.operation)):o==="aborted"||o==="expired"?(this.failOperation(e.operationId),null):this.recover(e.operationId,[],Date.now()+this.recoveryTimeoutMs)}async retryRecovery(){this.assertUsable();let e=this.pendingOperationId??this.readOperationRecord()?.operationId??null;return e?(this.pendingOperationId=e,this.recover(e,[],Date.now()+this.recoveryTimeoutMs)):null}watchSettlement(e){if(this.destroyed)return;let t=this.operationIdForHold(e);!t||t===this.settleOperationId||(this.stopSettlementWatch(),this.settleOperationId=t,this.settleStartedAt=Date.now(),this.settleState="committed",typeof document<"u"&&(this.settleVisibility=()=>{document.hidden||!this.settleOperationId||this.pollSettlement()},document.addEventListener("visibilitychange",this.settleVisibility)),this.scheduleSettlementPoll())}stopSettlementWatch(){this.settleTimer&&clearTimeout(this.settleTimer),this.settleTimer=null,this.settleOperationId=null,this.settleState=null,this.settleVisibility&&typeof document<"u"&&document.removeEventListener("visibilitychange",this.settleVisibility),this.settleVisibility=null}scheduleSettlementPoll(){if(this.destroyed||!this.settleOperationId)return;if(this.settleTimer&&clearTimeout(this.settleTimer),typeof document<"u"&&document.hidden){this.settleTimer=null;return}let t=Date.now()-this.settleStartedAt>=Up?Gp:jp;this.settleTimer=setTimeout(()=>{this.pollSettlement()},t)}settled(e){return e==="booked"||e==="expired"||e==="aborted"}async pollSettlement(){let e=this.settleOperationId;if(this.destroyed||!e)return;if(typeof document<"u"&&document.hidden){this.settleTimer&&clearTimeout(this.settleTimer),this.settleTimer=null;return}let t;try{let o=await this.authorized(Dt(this.groupKey,e));if(!o.ok)return this.scheduleSettlementPoll();t=(await this.responseJson(o)).operation}catch(o){return o instanceof Z?this.stopSettlementWatch():this.scheduleSettlementPoll()}if(this.destroyed||this.settleOperationId!==e)return;let n=t.state!==this.settleState;if(this.settleState=t.state,n&&this.noteOperationState(e,t.state),this.settled(t.state)){this.stopSettlementWatch(),t.state!=="booked"&&this.clearOperationRecord(),this.emit(t);return}n&&this.emit(t),this.scheduleSettlementPoll()}destroy(){if(!this.destroyed){this.destroyed=!0,this.stopSettlementWatch(),this.access.onRenewed(void 0);try{this.aborter.abort()}catch{}}}operationRecordKey(){return`@seatlayer/performance-group-operation/v1/${encodeURIComponent(this.base)}/${encodeURIComponent(this.groupKey)}`}readOperationRecord(){try{let e=window.sessionStorage.getItem(this.operationRecordKey());if(!e)return null;let t=JSON.parse(e);return!t?.operationId||t.groupKey!==this.groupKey?null:t}catch{return null}}storedIsUndecided(e){return e.state==="undecided"||qp.has(e.state)}writeOperationRecord(e){try{window.sessionStorage.setItem(this.operationRecordKey(),JSON.stringify(e))}catch{}}clearOperationRecord(){try{window.sessionStorage.removeItem(this.operationRecordKey())}catch{}}beginOperation(e){this.pendingOperationId=e;let t=this.readOperationRecord();this.writeOperationRecord({operationId:e,groupKey:this.groupKey,state:"undecided",createdAt:t?.operationId===e?t.createdAt:Date.now()})}noteOperationState(e,t){let n=this.readOperationRecord();!n||n.operationId!==e||this.writeOperationRecord({...n,state:t})}failOperation(e){this.pendingOperationId=null,this.clearOperationRecord(),this.emitRecovery({kind:"idle"}),this.onOperationState?.({operationId:e,state:"aborted",decision:"abort"})}async adoptSession(e){if(this.destroyed)return;let t=`/pub/performance-groups/${encodeURIComponent(this.groupKey)}/session/adopt`;for(let o=0;o<2;o++){if(this.destroyed)return;try{if((await this.fetcher(`${this.base}${t}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.token}`},body:JSON.stringify({previousToken:e.previousToken}),credentials:"omit",signal:this.aborter.signal})).ok){this.adoptFailure=null;return}}catch{}}if(this.destroyed)return;this.adoptFailure=new G(409,"performance_group_session_adopt_failed","performance_group_session_adopt_failed");let n=this.pendingOperationId??"";throw this.emitRecovery({kind:"failed",operationId:n,reference:n?Bt(n):"",reason:"session_adopt_failed",retryable:!1}),this.adoptFailure}async recover(e,t,n,o=100){let r=o,s=Date.now()+Math.min(8e3,Math.max(500,this.recoveryTimeoutMs/2)),a="unknown";for(;Date.now()<=n;){if(this.destroyed)throw new Z;if(this.emitRecovery({kind:"pending",operationId:e,phase:a,longRunning:Date.now()>=s,reference:Bt(e)}),await Kp(r),this.destroyed)throw new Z;let l;try{l=await this.authorized(Dt(this.groupKey,e))}catch(p){if(p instanceof Z)throw p;if(p instanceof re)throw this.recoveryFailed(e,"request_failed"),p;r=Math.min(2e3,Math.max(100,r*2));continue}if(l.status===404){r=Math.min(1e3,Math.max(100,r*2));continue}if(!l.ok){this.recoveryFailed(e,"request_failed");try{return await this.throwResponse(l,t)}finally{this.pendingOperationId=null,this.clearOperationRecord()}}let d=(await this.responseJson(l)).operation;if(a=d.state,this.noteOperationState(e,d.state),this.emit(d),d.state==="committed"||d.state==="booked")return this.emitRecovery({kind:"idle"}),this.complete(d);if(d.state==="aborted"||d.state==="expired")throw this.failOperation(e),new G(409,"conflict","conflict",t.map(p=>({label:p,status:"held"})));r=mo(l)}throw this.recoveryFailed(e,"deadline"),new G(504,"performance_group_outcome_unknown","performance_group_outcome_unknown")}recoveryFailed(e,t){this.emitRecovery({kind:"failed",operationId:e,reference:Bt(e),reason:t,retryable:!0})}emitRecovery(e){if(this.destroyed)return;let t=this.lastRecovery.kind===e.kind&&JSON.stringify(this.lastRecovery)===JSON.stringify(e);this.lastRecovery=e,t||this.onRecoveryState?.(e)}noteAvailability(e,t,n){if(this.destroyed||!this.onAvailability)return;let o=e.state??this.descriptorCache?.state??"active",r=e.revision??null,s=!!r&&!!this.knownRevision&&r!==this.knownRevision;r&&!this.knownRevision&&(this.knownRevision=r);let a=n?.partial??{},l=Object.values(n?.seats??{});this.onAvailability({partial:a,freeCount:l.filter(c=>c==="free").length,blockedCount:Object.keys(n?.seats??{}).filter(c=>n.seats[c]!=="free"&&!(c in a)).length,state:o,salesClosed:!!t||o!=="active",revision:r,revisionChanged:s})}acceptRevision(e){this.knownRevision=e}complete(e){if(!e.hold||e.hold.expiresAt==null)throw new G(409,"group_hold_not_active","group_hold_not_active");this.pendingOperationId=null,this.noteOperationState(e.operationId,e.state),this.operationByHold.set(e.hold.id,e.operationId),this.writeMapping(e.hold.id,e.operationId);let t=e.hold.allocations??[];this.allocationsByHold.set(e.hold.id,t);let n=t.find(o=>o.eventKey===this.activePerformanceKey)?.items;return{holdId:e.hold.id,expiresAt:e.hold.expiresAt,items:n??e.hold.items??[]}}emit(e){this.destroyed||this.onOperationState?.({operationId:e.operationId,state:e.state,decision:e.decision})}operationForHold(e){let t=this.operationIdForHold(e);if(!t)throw new G(404,"group_hold_not_found","group_hold_not_found");return t}mappingKey(e){return`@seatlayer/performance-group-hold/v1/${encodeURIComponent(this.base)}/${encodeURIComponent(this.groupKey)}/${encodeURIComponent(e)}`}readMapping(e){try{return window.sessionStorage.getItem(this.mappingKey(e))}catch{return null}}writeMapping(e,t){try{window.sessionStorage.setItem(this.mappingKey(e),t)}catch{}}assertUsable(){if(this.destroyed)throw new Z;if(this.adoptFailure)throw this.adoptFailure}async authorized(e,t={},n=!1){if(this.destroyed)throw new Z;if(this.adoptFailure)throw this.adoptFailure;let o={...t.headers};t.body!==void 0&&(o["Content-Type"]="application/json");let r=await this.access.authorization(n?"unauthorized":"initial");if(this.destroyed)throw new Z;if(this.adoptFailure)throw this.adoptFailure;if(!r)throw new Error("performance_group_buyer_access_required");o.Authorization=r;let s=await this.fetcher(`${this.base}${e}`,{method:t.method??"GET",headers:o,body:t.body,credentials:"omit",signal:this.aborter.signal});if(!n&&(s.status===401||s.status===403||s.status===422)){let a=await s.clone().json().catch(()=>null);if(await this.access.handleFailure(s.status,a?.code??a?.error))return this.authorized(e,t,!0)}return s}async json(e,t={}){let n=await this.authorized(e,t);return n.ok?this.responseJson(n):this.throwResponse(n)}async blob(e){let t=await this.authorized(e);return t.ok?t.blob():this.throwResponse(t)}async responseJson(e){return e.json()}async throwResponse(e,t=[]){let o=await e.json().catch(()=>null)??{},r=o.code??o.error??`request_failed_${e.status}`;throw e.status===409&&!o.conflicts?.length&&t.length&&(o.conflicts=t.map(s=>({label:s,status:"held"}))),new G(e.status,o.error??r,r,o.conflicts)}};var Wp="https://api.seatlayer.io";function Ml(i){let e=typeof i=="string"?document.querySelector(i):i;if(!e)throw new Error("seatlayer: Performance Group picker container was not found");return e}var Tn=class{constructor(e){this.descriptorValue=null;this.picker=null;this.root=null;this.innerHost=null;this.tabsHost=null;this.prevButton=null;this.nextButton=null;this.heldSummary=null;this.live=null;this.statusHost=null;this.statusCopy=null;this.statusAction=null;this.rendered=!1;this.destroyed=!1;this.continued=!1;this.switchingPerformance=!1;this.operationPending=!1;this.recovery={kind:"idle"};this.availability=null;this.activePerformanceKey=null;this.selectionsByEvent=new Map;this.validByEvent=new Map;this.refreshingComposition=!1;this.activeHandoff=null;this.selectionModeValue="same_seat";this.progressHost=null;this.legendHost=null;this.paneHost=null;this.datesSummaryHost=null;this.datesCardsHost=null;this.resettingFlexibleSelection=!1;this.selectingPartialSeat=!1;this.partialSeatDates=new Map;this.markedLabels=new Set;this.holdTicker=null;this.switchingMode=!1;this.booked=!1;if(!e||typeof e!="object")throw new Error("seatlayer: options object is required");if(!e.performanceGroup)throw new Error("seatlayer: `performanceGroup` key is required");if(!e.container)throw new Error("seatlayer: `container` is required");if(!e.buyerAccessToken&&!e.buyerAccessTokenProvider)throw new Error("seatlayer: Performance Group buyer access is required");if(!!e.initialHoldId!=!!e.initialOperationId)throw new Error("seatlayer: `initialHoldId` and `initialOperationId` must be supplied together");if((e.selectionMode==="per_performance"||e.allowSelectionModeSwitch)&&(!Number.isSafeInteger(e.numberOfPlacesToSelect)||(e.numberOfPlacesToSelect??0)<1))throw new Error("seatlayer: `numberOfPlacesToSelect` is required for per-performance selection");this.selectionModeValue=e.selectionMode??"same_seat",this.options=e,this.panelId=`sl-pg-panel-${e.performanceGroup}`,this.access=new ue({provider:e.buyerAccessTokenProvider,token:e.buyerAccessToken,onExpired:e.onAccessExpired,onUnavailable:e.onAccessUnavailable}),this.api=new kn(e.performanceGroup,{apiBase:e.apiBase,access:this.access,selectionMode:e.selectionMode,partySize:e.selectionMode==="per_performance"?e.numberOfPlacesToSelect:void 0,onOperationState:t=>this.operationChanged(t),onRecoveryState:t=>this.recoveryChanged(t),onAvailability:t=>this.availabilityChanged(t)}),e.initialHoldId&&e.initialOperationId&&this.api.rememberOperation(e.initialHoldId,e.initialOperationId)}get mode(){return this.selectionModeValue}get selectionMode(){return this.selectionModeValue}get descriptor(){return this.descriptorValue}get currentHold(){return this.activeHandoff}async render(){if(this.rendered)return this;let e=performance.now();if(this.rendered=!0,Pl(),await(0,qe.loadLocale)(this.options.locale),this.options.messages&&(0,qe.setStringOverrides)(this.options.messages),this.destroyed)return this;let t;try{t=await this.api.descriptor()}catch(n){throw Re({apiBase:this.options.apiBase??Wp,event:this.options.performanceGroup,scope:"performance_group",surface:"performance_group_picker",outcome:"failure",stage:"group_descriptor",ms:performance.now()-e,load:ze(this.options.performanceGroup),transport:"pubapi"}),n}return this.destroyed?this:(this.descriptorValue=t,this.activePerformanceKey=t.performances[0]?.eventKey??null,this.buildChrome(Ml(this.options.container),t),this.announce(this.copy("picker.group.checkingAvailability")),await this.mountPicker(t),this.destroyed?this:(await this.restoreOperation(),this))}buildChrome(e,t){e.replaceChildren();let n=document.createElement("div");n.className="sl-pg-root",n.dataset.performanceGroup=t.key,n.dataset.selectionMode=this.mode;let o=document.createElement("div");o.className="sl-pg-progress";let r=document.createElement("section");r.className="sl-pg-head",r.setAttribute("aria-labelledby",`sl-pg-title-${t.key}`);let s=document.createElement("h2");s.id=`sl-pg-title-${t.key}`,s.textContent=t.name;let a=document.createElement("p");a.className="sl-pg-summary",a.textContent=this.copy(this.mode==="per_performance"?"picker.group.perPerformanceSummary":"picker.group.sameSeatSummary",{count:t.performanceCount});let l=document.createElement("p");l.className="sl-pg-help",l.textContent=this.copy(this.mode==="per_performance"?"picker.group.perPerformanceMapHelp":"picker.group.sameSeatMapHelp");let c=document.createElement("details");c.className="sl-pg-dates",c.open=t.performanceCount<=3;let d=document.createElement("summary");d.textContent=this.copy(t.inclusionMode==="flexible_dates"?"picker.group.flexibleDatesInView":"picker.group.allDates",{count:t.performanceCount});let p=document.createElement("div");p.innerHTML=eo(this.performanceCards(t),this.copy(t.inclusionMode==="flexible_dates"?"picker.group.flexibleDatesNote":"picker.group.includedNote",{count:t.performanceCount})),c.append(d,p);let u=document.createElement("div");u.className="sl-pg-held-summary",u.hidden=!0,r.append(s,a,l,c,u);let h=document.createElement("div");h.className="sl-pg-legend";let f=document.createElement("div");f.className="sl-pg-pane",f.setAttribute("role","group"),f.setAttribute("aria-label",this.copy("picker.group.yourSelection")),f.hidden=!0;let b=this.mode==="per_performance"?this.performanceTabs(t):null,k=document.createElement("div");k.className="sl-pg-inner",k.id=this.panelId,k.setAttribute("aria-busy","false"),k.dataset.locked="false",this.mode==="per_performance"&&(k.setAttribute("role","tabpanel"),k.tabIndex=-1);let S=document.createElement("div");S.className="sl-pg-status",S.setAttribute("role","status"),S.setAttribute("aria-live","polite"),S.hidden=!0;let v=document.createElement("p"),P=document.createElement("button");P.type="button",P.hidden=!0,P.textContent=this.copy("picker.group.retry"),P.addEventListener("click",()=>{this.retryRecovery()}),S.append(v,P),k.appendChild(S);let y=document.createElement("div");y.className="sl-pg-live",y.setAttribute("role","status"),y.setAttribute("aria-live","polite"),n.append(o,r),b&&n.append(b),n.append(h,k,f,y),e.appendChild(n),this.root=n,this.progressHost=o,this.legendHost=h,this.paneHost=f,this.datesSummaryHost=d,this.datesCardsHost=p,this.innerHost=k,this.heldSummary=u,this.live=y,this.statusHost=S,this.statusCopy=v,this.statusAction=P,this.syncProgress(),this.syncLegend(),this.syncPane()}async mountPicker(e){let t=new Ue(wn({container:this.innerHost,event:e.key,apiBase:this.options.apiBase,transport:this.api,hideEventDetails:!0,maxSelection:this.options.maxSelection,selectedObjects:this.options.selectedObjects,selectableObjects:this.options.selectableObjects,numberOfPlacesToSelect:this.options.numberOfPlacesToSelect,selectionValidators:this.options.selectionValidators,locale:this.options.locale,messages:this.options.messages,languages:this.options.languages,colorblindSafe:this.options.colorblindSafe,initialView:this.options.initialView,enable3D:this.options.enable3D,max3DSeats:this.options.max3DSeats,onBuyerViewChange:this.options.onBuyerViewChange,onAnalytics:(n,o)=>{try{this.options.onAnalytics?.(n,{...o,metricScope:"performance_group",performanceGroupKey:e.key,performanceCount:e.performanceCount,selectionMode:this.mode})}catch{}},hideBadge:this.options.hideBadge,theme:this.options.theme,holdTtlMs:this.options.holdTtlMs,initialHoldId:this.options.initialHoldId,restoreHold:this.options.restoreHold,confirmSelection:this.options.confirmSelection,seatView:this.options.seatView,onSelectionChange:n=>this.selectionChanged(n),onSelectionValidityChange:n=>this.selectionValidityChanged(n),onSelectionValid:this.options.onSelectionValid,onSelectionInvalid:this.options.onSelectionInvalid,onSelectionLimit:this.options.onSelectionLimit,onHoldChange:(n,o)=>this.holdChanged(n,o),onCheckout:(n,o)=>this.checkout(n,o),onHoldExpired:()=>{this.activeHandoff=null,this.api.stopSettlementWatch(),this.resetPerPerformanceSelection(),this.syncProgress(),this.syncPane(),this.syncHoldTicker(),this.options.onHoldChange?.(null),this.options.onHoldExpired?.()},onError:this.options.onError},{performanceCount:e.performanceCount,selectionMode:this.mode,submissionState:()=>this.submissionState(),suppressPricing:!0,nights:()=>this.nights(),seatMarks:()=>this.seatMarks(),nightSummary:()=>this.nightSummary(),groupSelectionSummary:()=>this.groupSelectionSummary(),activePerformanceLabel:()=>this.activePerformanceLabel(),selectedPerformanceDates:()=>this.mode==="same_seat"&&e.inclusionMode==="flexible_dates"?vs(this.includedPerformances(),e.performanceCount,this.options.locale,this.copy("picker.group.flexibleSelectedNote",{count:this.includedPerformances().length})):null,selectNight:n=>{this.switchPerformance(n)},selectionModeSwitch:this.options.allowSelectionModeSwitch&&this.mode==="same_seat"?{label:this.copy("picker.group.chooseNightByNight"),activate:()=>{this.switchSelectionMode("per_performance")}}:null,partialSeatSelection:e.inclusionMode==="flexible_dates"&&this.mode==="same_seat"?{label:n=>this.copy("picker.group.selectAvailableDates",{count:n}),activate:(n,o)=>{this.selectPartialSeat(n,o)}}:null,confirmDateSelection:e.inclusionMode==="flexible_dates"&&this.mode==="same_seat"?{includedEventKeys:()=>this.api.includedPerformanceKeys(),availableEventKeys:n=>this.partialSeatDates.get(n)??this.nights().map(o=>o.eventKey),label:n=>this.copy("picker.group.selectAvailableDates",{count:n}),apply:(n,o)=>this.applySeatDates(n,o,!0)}:null}));this.picker=t,await t.render(),!this.destroyed&&this.updateTabs()}performanceCards(e){return e.performances.map(t=>({eventKey:t.eventKey,name:t.name,iso:new Date(t.startsAt).toISOString(),date:an(t,this.options.locale),time:ln(t,this.options.locale)}))}nights(){return(this.descriptorValue?.performances??[]).map(e=>({eventKey:e.eventKey,name:e.name,shortDate:cn(e,this.options.locale)}))}seatMarks(){let e=this.descriptorValue?.performanceCount??0,t=this.availability,n=!!t?.salesClosed||!!t&&t.state!=="active",o=this.mode==="same_seat"&&!n?t?.partial??{}:{},r={};for(let s of this.markedLabels)r[s]=null;if(this.markedLabels.clear(),e>0)for(let[s,a]of Object.entries(o))!a.length||a.length>=e||(r[s]={kind:"partial",fraction:(e-a.length)/e,data:{blockedEventKeys:[...a]}},this.markedLabels.add(s));return r}activePerformanceLabel(){if(this.mode!=="per_performance")return null;let e=this.descriptorValue?.performances.find(o=>o.eventKey===this.activePerformanceKey);if(!e)return null;let t=cn(e,this.options.locale),n=e.name?.trim();return n&&n!==t?`${n} \xB7 ${t}`:t}nightSummary(){return this.mode!=="per_performance"?[]:(this.descriptorValue?.performances??[]).map(e=>({eventKey:e.eventKey,name:cn(e,this.options.locale),labels:(this.selectionsByEvent.get(e.eventKey)??[]).map(t=>t.label),active:e.eventKey===this.activePerformanceKey}))}groupSelectionSummary(){let e=this.includedPerformances();if(!e.length)return null;if(this.mode==="same_seat"){let r=this.activeHandoff?.seatLabels.length??this.picker?.getSelection().length??0;return{seats:r*e.length,performances:e.length,totalPerformances:this.descriptorValue?.performanceCount??e.length,performancesChosen:r?e.length:0,perPerformance:r}}let t=e.map(r=>this.selectionsByEvent.get(r.eventKey)?.length??0),n=t.filter(r=>r>0),o=n.length===t.length&&n.every(r=>r===n[0]);return{seats:t.reduce((r,s)=>r+s,0),performances:e.length,totalPerformances:this.descriptorValue?.performanceCount??e.length,performancesChosen:n.length,perPerformance:o&&n.length?n[0]:null}}syncProgress(){if(!this.progressHost)return;let e=!!this.activeHandoff,t=[{id:"performances",label:this.copy("picker.group.stepPerformances"),state:"done"},{id:"seats",label:this.copy("picker.group.stepSeats"),state:e?"done":"current"},{id:"review",label:this.copy("picker.group.stepReview"),state:this.booked?"done":e?"current":"upcoming"}];this.progressHost.innerHTML=Ms(t,{label:this.copy("picker.group.progressLabel"),done:this.copy("picker.group.stepDone"),current:this.copy("picker.group.stepCurrent"),upcoming:this.copy("picker.group.notStarted")})}syncLegend(){if(!this.legendHost)return;let e=this.availability,t=!!e?.salesClosed||e&&e.state!=="active";if(!e||t){this.legendHost.replaceChildren();return}this.legendHost.innerHTML=xs({available:e.freeCount>0,selected:(this.picker?.getSelection().length??0)>0,partial:Object.keys(e.partial).length>0,unavailable:e.blockedCount>0},{title:this.copy("picker.group.legendTitle"),available:this.copy("picker.group.legendAvailable"),selected:this.copy("picker.group.legendSelected"),partial:this.copy("picker.group.legendNotEveryDate"),unavailable:this.copy("picker.group.legendUnavailable")},this.categoryColor())}categoryColor(){return this.picker?.categoryLegendColor()??"#2563eb"}syncPane(){let e=this.paneHost;if(!e)return;let t=this.includedPerformances();if(this.mode!=="same_seat"||!t.length){e.hidden=!0,e.replaceChildren();return}let n=this.activeHandoff?.seatLabels??this.picker?.getSelection().map(r=>r.label)??[],o=this.heldTotal();e.hidden=!1,e.innerHTML=Ls({title:this.copy("picker.group.yourSelection"),rows:t.map(r=>({eventKey:r.eventKey,name:`${an(r,this.options.locale)} ${ln(r,this.options.locale)}`,labels:n})),empty:this.copy("picker.group.noSeatsChosenYet"),note:o?null:this.copy("picker.group.pricesPerPerformance"),total:o?{label:this.copy("picker.group.total"),amount:o}:null,holdStatus:this.booked?this.copy("picker.group.bookedAll",{count:t.length}):this.activeHandoff?this.copy("picker.group.heldTogether",{count:t.length,time:Hs(this.activeHandoff.expiresAt-Date.now())}):null})}heldTotal(){let e=this.activeHandoff,t=this.descriptorValue;if(!e||!t)return null;let o=this.api.allocationsForHold(e.holdId).flatMap(a=>a.items);if(!o.length)return null;let r=o.reduce((a,l)=>a+l.unitPrice*(l.quantity??1),0),s=o[0]?.currency??t.currency;try{return(0,qe.formatMoney)(r,s,void 0,this.options.locale)}catch{return`${s} ${r.toFixed(2)}`}}includedPerformances(){let e=this.descriptorValue?.performances??[];if(this.descriptorValue?.inclusionMode!=="flexible_dates")return e;let t=new Set(this.api.includedPerformanceKeys());return e.filter(n=>t.has(n.eventKey))}syncIncludedDates(){let e=this.descriptorValue;if(!e||!this.datesSummaryHost||!this.datesCardsHost)return;let t=this.includedPerformances(),n=e.inclusionMode==="flexible_dates";this.datesSummaryHost.textContent=n&&t.length<e.performanceCount?this.copy("picker.group.flexibleDatesSelected",{selected:t.length,total:e.performanceCount}):this.copy(n?"picker.group.flexibleDatesInView":"picker.group.allDates",{count:e.performanceCount}),this.datesCardsHost.innerHTML=eo(this.performanceCards({...e,performances:t}),this.copy(n&&t.length<e.performanceCount?"picker.group.flexibleSelectedNote":n?"picker.group.flexibleDatesNote":"picker.group.includedNote",{count:t.length}))}async selectPartialSeat(e,t){if(!(this.destroyed||this.holdBlocked()||this.activeHandoff||!t.length)){if((this.picker?.getSelection().length??0)>0){this.announce(this.copy("picker.group.clearBeforePartial"));return}this.partialSeatDates.set(e,[...t]),await this.applySeatDates(e,t,!1)}}async applySeatDates(e,t,n){if(this.destroyed||this.holdBlocked()||this.activeHandoff||!t.length)return!1;let o=this.api.includedPerformanceKeys();if(o.length===t.length&&o.every(r=>t.includes(r)))return!0;this.selectingPartialSeat=!0;try{if(this.api.setIncludedEventKeys(t),this.syncIncludedDates(),await this.picker?.refreshAvailability(),!(n?this.picker?.selectObjectsWithoutConfirmation([e])??[]:this.picker?.selectObjects([e])??[]).length)throw new Error("performance_group_partial_seat_unavailable");return this.announce(this.copy("picker.group.selectedAvailableDates",{count:t.length})),this.syncPane(),this.syncLegend(),!0}catch(r){return o.length&&(this.api.setIncludedEventKeys(o),this.syncIncludedDates(),await this.picker?.refreshAvailability().catch(()=>{})),this.options.onError?.(r),!1}finally{this.selectingPartialSeat=!1}}syncHoldTicker(){this.booked||(this.activeHandoff&&!this.holdTicker?this.holdTicker=setInterval(()=>this.syncPane(),1e3):!this.activeHandoff&&this.holdTicker&&(clearInterval(this.holdTicker),this.holdTicker=null))}async switchSelectionMode(e){if(!(this.destroyed||this.switchingMode||e===this.mode)&&!(this.activeHandoff||this.holdBlocked())){this.switchingMode=!0;try{this.api.setSelectionMode(e,this.options.numberOfPlacesToSelect),this.selectionModeValue=e,this.picker?.destroy(),this.picker=null,this.selectionsByEvent.clear(),this.validByEvent.clear(),this.markedLabels.clear(),this.availability=null;let t=this.descriptorValue;if(this.activePerformanceKey=t.performances[0]?.eventKey??null,this.buildChrome(Ml(this.options.container),t),await this.mountPicker(t),this.destroyed)return;this.announce(this.copy("picker.group.nightByNightStarted")),this.options.onSelectionModeChange?.(e)}catch(t){if(t instanceof Z)return;this.options.onError?.(t)}finally{this.switchingMode=!1}}}async release(){await this.picker?.release()}close(){this.destroy()}destroy(){if(this.destroyed)return;this.destroyed=!0,this.api.destroy(),this.holdTicker&&clearInterval(this.holdTicker),this.holdTicker=null;let e=this.picker;this.root?.setAttribute("hidden","");let t=()=>{e?.destroy(),this.access.clear(),this.root?.remove(),this.root=null,this.picker=null,this.innerHost=null,this.tabsHost=null,this.statusHost=null,this.statusCopy=null,this.statusAction=null,this.live=null};e?.getCurrentHold()&&!this.continued?e.release().catch(()=>{}).finally(t):t()}copy(e,t){let n=this.options.messages?.[e];return n!==void 0?t?n.replace(/\{(\w+)\}/g,(o,r)=>String(t[r]??`{${r}}`)):n:(0,qe.t)(e,t)}performanceTabs(e){let t=document.createElement("div");t.className="sl-pg-tabsbar";let n=document.createElement("button");n.type="button",n.className="sl-pg-step",n.dataset.step="previous",n.setAttribute("aria-label",this.copy("picker.group.previousPerformance")),n.textContent="\u2039",n.addEventListener("click",()=>{this.stepPerformance(-1)});let o=document.createElement("button");o.type="button",o.className="sl-pg-step",o.dataset.step="next",o.setAttribute("aria-label",this.copy("picker.group.nextPerformance")),o.textContent="\u203A",o.addEventListener("click",()=>{this.stepPerformance(1)});let r=document.createElement("div");return r.className="sl-pg-tabs",r.setAttribute("role","tablist"),r.setAttribute("aria-label",this.copy("picker.group.performances")),e.performances.forEach((s,a)=>{let l=document.createElement("button");l.type="button",l.className="sl-pg-tab",l.id=`sl-pg-tab-${e.key}-${s.eventKey}`,l.dataset.eventKey=s.eventKey,l.dataset.state="not-started",l.setAttribute("role","tab"),l.setAttribute("aria-selected",String(a===0)),l.setAttribute("aria-controls",this.panelId),l.tabIndex=a===0?0:-1;let c=document.createElement("span");c.className="sl-pg-tab-name",c.textContent=s.name;let d=document.createElement("span");d.className="sl-pg-tab-state",d.textContent=this.copy("picker.group.stillNeedsSeat");let p=document.createElement("span");p.className="sl-pg-tab-badge",p.textContent=this.copy("picker.group.chosenOfTotal",{chosen:0,total:this.options.numberOfPlacesToSelect??1}),l.append(c,p,d),l.addEventListener("click",()=>{this.switchPerformance(s.eventKey)}),l.addEventListener("keydown",u=>this.tabKeydown(u)),r.appendChild(l)}),t.append(n,r,o),this.tabsHost=r,this.prevButton=n,this.nextButton=o,t}tabButtons(){return[...this.tabsHost?.querySelectorAll(".sl-pg-tab")??[]]}tabKeydown(e){let t=this.tabButtons(),n=t.findIndex(a=>a===e.target);if(n<0)return;let o=getComputedStyle(this.tabsHost??document.body).direction==="rtl",r=-1;switch(e.key){case"ArrowRight":r=n+(o?-1:1);break;case"ArrowLeft":r=n+(o?1:-1);break;case"ArrowDown":r=n+1;break;case"ArrowUp":r=n-1;break;case"Home":r=0;break;case"End":r=t.length-1;break;default:return}if(r<0||r>=t.length)return;e.preventDefault();let s=t[r];s.focus({preventScroll:!0}),s.disabled||this.switchPerformance(s.dataset.eventKey)}stepPerformance(e){let t=this.tabButtons(),n=t.findIndex(r=>r.dataset.eventKey===this.activePerformanceKey),o=t[n+e];!o||o.disabled||(o.focus({preventScroll:!0}),this.switchPerformance(o.dataset.eventKey))}submissionState(){let e=this.descriptorValue?.performances??[];if(this.mode!=="per_performance"){let o=!this.holdBlocked();return{complete:e.length,total:e.length,ready:o}}let t=this.options.numberOfPlacesToSelect,n=e.filter(o=>this.selectionsByEvent.get(o.eventKey)?.length===t&&this.validByEvent.get(o.eventKey)!==!1).length;return{complete:n,total:e.length,ready:n===e.length&&!this.holdBlocked()}}holdBlocked(){return this.operationPending||this.recovery.kind!=="idle"||!!this.availability?.salesClosed}selectionChanged(e){if(this.mode!=="per_performance"){this.options.onSelectionChange?.(e),this.syncPane(),this.syncLegend(),!e.length&&!this.activeHandoff&&!this.resettingFlexibleSelection&&!this.selectingPartialSeat&&this.descriptorValue?.inclusionMode==="flexible_dates"&&this.api.includedPerformanceKeys().length<this.descriptorValue.performanceCount&&(this.resettingFlexibleSelection=!0,this.api.setIncludedEventKeys(this.descriptorValue.performances.map(n=>n.eventKey)),this.syncIncludedDates(),this.picker?.refreshAvailability().catch(n=>this.options.onError?.(n)).finally(()=>{this.resettingFlexibleSelection=!1}));return}if(this.refreshingComposition||this.switchingPerformance||!this.activePerformanceKey)return;let t=e.map(n=>({...n}));this.selectionsByEvent.set(this.activePerformanceKey,t),this.api.setPerformanceSelections(this.activePerformanceKey,t.map(n=>({label:n.label}))),t.length!==this.options.numberOfPlacesToSelect?this.validByEvent.set(this.activePerformanceKey,!1):this.validByEvent.has(this.activePerformanceKey)||this.validByEvent.set(this.activePerformanceKey,!0),this.updateTabs(),this.options.onSelectionChange?.(e),this.refreshComposition(),this.syncLegend()}selectionValidityChanged(e){if(this.mode==="per_performance"&&!this.switchingPerformance&&this.activePerformanceKey){let t=this.validByEvent.get(this.activePerformanceKey);this.validByEvent.set(this.activePerformanceKey,e.isValid),this.updateTabs(),!this.refreshingComposition&&t!==e.isValid&&this.refreshComposition()}this.options.onSelectionValidityChange?.(e)}refreshComposition(){if(this.refreshingComposition||!this.picker)return;let e=this.submissionState();this.refreshingComposition=!0;try{this.picker.refreshPerformanceGroupComposition();let t=this.submissionState();(e.complete!==t.complete||e.ready!==t.ready)&&this.picker.refreshPerformanceGroupComposition()}finally{this.refreshingComposition=!1}}tabState(e){let t=this.options.numberOfPlacesToSelect??1,n=(this.selectionsByEvent.get(e)??[]).map(r=>r.label),o=this.copy("picker.group.chosenOfTotal",{chosen:n.length,total:t});return n.length===0?{key:"not-started",label:this.copy("picker.group.stillNeedsSeat"),badge:o}:n.length===t&&this.validByEvent.get(e)!==!1?{key:"complete",label:this.copy("picker.group.completeWithSeats",{seats:n.join(", ")}),badge:o}:n.length===t?{key:"needs-attention",label:this.copy("picker.group.needsAttention"),badge:o}:{key:"in-progress",label:this.copy("picker.group.needsMoreSeats",{count:t-n.length}),badge:o}}updateTabs(){let e=this.tabButtons(),t=this.switchingPerformance||this.operationPending||this.recovery.kind!=="idle"||!!this.activeHandoff;e.forEach(o=>{let r=o.dataset.eventKey,s=this.tabState(r),a=r===this.activePerformanceKey;o.dataset.state=s.key,o.disabled=t,o.setAttribute("aria-selected",String(a)),o.tabIndex=a?0:-1;let l=o.querySelector(".sl-pg-tab-state");l&&(l.textContent=s.label);let c=o.querySelector(".sl-pg-tab-badge");c&&(c.textContent=s.badge);let d=o.querySelector(".sl-pg-tab-name")?.textContent??r;o.setAttribute("aria-label",`${d}: ${s.badge} \xB7 ${s.label}`),a&&this.innerHost?.setAttribute("aria-labelledby",o.id)});let n=e.findIndex(o=>o.dataset.eventKey===this.activePerformanceKey);this.prevButton&&(this.prevButton.disabled=t||n<=0),this.nextButton&&(this.nextButton.disabled=t||n<0||n>=e.length-1)}async switchPerformance(e){if(this.mode!=="per_performance"||this.switchingPerformance||this.holdBlocked()||this.activeHandoff||e===this.activePerformanceKey||!this.picker)return;this.activePerformanceKey&&this.selectionChanged(this.picker.getSelection());let t=this.selectionsByEvent.get(e)?.map(n=>n.label)??[];this.switchingPerformance=!0,this.activePerformanceKey=e,this.updateTabs(),this.setInteractionLocked(!0);try{this.picker.clearSelection(),this.api.setActivePerformance(e),await this.picker.refreshAvailability();let n=this.picker.selectObjects(t);this.switchingPerformance=!1,this.selectionChanged(n),n.length!==t.length&&this.validByEvent.set(e,!1),this.options.onSelectionChange?.(n);let o=this.descriptorValue?.performances.find(r=>r.eventKey===e);o&&this.announce(this.copy("picker.group.performanceOpened",{performance:o.name}))}catch(n){this.options.onError?.(n)}finally{this.switchingPerformance=!1,!this.operationPending&&this.recovery.kind==="idle"&&this.setInteractionLocked(!1),this.updateTabs(),this.picker.refreshPerformanceGroupComposition()}}setInteractionLocked(e){let t=this.innerHost;t&&(t.dataset.locked=String(e),t.setAttribute("aria-busy",String(e)),t.setAttribute("aria-disabled",String(e)))}announce(e){this.live&&(this.live.textContent=e)}showStatus(e,t,n={}){this.statusHost&&this.statusCopy&&this.statusAction&&(this.statusCopy.textContent=t,this.statusHost.hidden=!t,this.statusAction.hidden=!n.retry),this.announce(t),this.options.onStatusChange?.({kind:e,message:t,...n.reference?{reference:n.reference}:{}})}clearStatus(){this.statusHost&&(this.statusHost.hidden=!0),this.statusAction&&(this.statusAction.hidden=!0),this.options.onStatusChange?.({kind:"idle",message:""})}operationChanged(e){if(this.destroyed)return;let t=e.state==="preparing"||e.state==="commit_pending"||e.state==="abort_pending"||e.state==="expire_pending";if(this.operationPending=t,this.setInteractionLocked(t||this.recovery.kind!=="idle"),this.updateTabs(),t){this.showStatus("pending",this.copy(e.state==="commit_pending"?"picker.group.commitPending":e.state==="abort_pending"||e.state==="expire_pending"?"picker.group.abortPending":"picker.group.securing"));return}if(e.state==="booked"){this.bookingSettled();return}if(e.state==="expired"||e.state==="aborted"){this.activeHandoff&&this.holdLost();return}if(e.state==="committed"){this.clearStatus(),this.announce(this.copy("picker.group.secured")),queueMicrotask(()=>this.innerHost?.querySelector('[data-ref="cta"]')?.focus({preventScroll:!0}));return}e.decision==="abort"&&this.recovery.kind==="idle"&&(this.clearStatus(),this.announce(this.copy("picker.group.notSecured")))}bookingSettled(){if(this.booked)return;this.booked=!0,this.root&&(this.root.dataset.booking="booked"),this.clearStatus(),this.holdTicker&&clearInterval(this.holdTicker),this.holdTicker=null;let e=this.activeHandoff?{...this.activeHandoff,bookingState:"booked"}:null;e&&(this.activeHandoff=e),this.syncProgress(),this.syncPane(),this.updateTabs(),this.picker?.notifyGroupSettled("booked"),this.announce(this.copy("picker.group.bookedAll",{count:this.descriptorValue?.performanceCount??0})),e&&this.options.onBooked?.(e)}holdLost(){this.activeHandoff=null,this.api.stopSettlementWatch(),this.resetPerPerformanceSelection(),this.syncProgress(),this.syncPane(),this.syncHoldTicker(),this.picker?.notifyGroupSettled("lost"),this.announce(this.copy("picker.group.notSecured")),this.options.onHoldChange?.(null),this.options.onHoldExpired?.()}recoveryChanged(e){if(!this.destroyed){if(this.recovery=e,this.setInteractionLocked(this.operationPending||e.kind!=="idle"),this.updateTabs(),this.refreshComposition(),e.kind==="idle"){this.operationPending||this.clearStatus();return}if(e.kind==="pending"){this.showStatus("pending",e.longRunning?this.copy("picker.group.longRunning",{reference:e.reference}):this.copy("picker.group.outcomeUnknown"),{reference:e.reference});return}this.showStatus("recovery_failed",this.copy("picker.group.longRunning",{reference:e.reference}),{retry:e.retryable,reference:e.reference}),this.setInteractionLocked(!1)}}async retryRecovery(){if(!(this.destroyed||this.recovery.kind!=="failed"||!this.recovery.retryable))try{await this.api.retryRecovery()}catch(e){if(e instanceof Z)return;this.options.onError?.(e)}}async restoreOperation(){try{let e=await this.api.restoreOperation();e&&!this.destroyed&&await this.picker?.adoptRestoredHold(e.holdId)}catch(e){if(e instanceof Z)return;this.options.onError?.(e)}}availabilityChanged(e){if(this.destroyed)return;let t=this.availability;if(this.availability=e,e.revisionChanged){this.showStatus("revision_changed",this.copy("picker.group.revisionChanged")),this.reloadDescriptor(e.revision);return}e.salesClosed?this.showStatus("sales_closed",this.copy("picker.group.salesClosed")):t?.salesClosed&&this.clearStatus(),this.updateTabs(),this.refreshComposition(),this.syncLegend()}async reloadDescriptor(e){this.api.acceptRevision(e);try{let t=await this.api.descriptor();if(this.destroyed)return;this.descriptorValue=t,await this.picker?.refreshAvailability()}catch(t){if(t instanceof Z)return;this.options.onError?.(t)}}handoff(e,t){let n=this.descriptorValue,o=this.api.operationIdForHold(e.holdId);if(!n||!o)throw new Error("seatlayer: Performance Group hold identity is unavailable");let r=this.api.allocationsForHold(e.holdId);return{operationId:o,holdId:e.holdId,expiresAt:e.expiresAt,performanceGroup:n,selectionMode:this.mode,performanceKeys:r.map(s=>s.eventKey),bookingState:this.booked?"booked":"held",seatLabels:t.map(s=>s.label),...this.mode==="per_performance"?{allocations:r.map(s=>({eventKey:s.eventKey,seatLabels:s.items.map(a=>a.label)}))}:{}}}renderHeldAllocations(e){if(!(!this.heldSummary||this.mode!=="per_performance")){this.heldSummary.replaceChildren();for(let t of e){let n=this.descriptorValue?.performances.find(s=>s.eventKey===t.eventKey),o=document.createElement("p"),r=document.createElement("strong");r.textContent=n?.name??t.eventKey,o.append(r,document.createTextNode(t.items.map(s=>s.label).join(", "))),this.heldSummary.appendChild(o)}this.heldSummary.hidden=e.length===0}}resetPerPerformanceSelection(){this.mode==="per_performance"&&(this.selectionsByEvent.clear(),this.validByEvent.clear(),this.heldSummary?.replaceChildren(),this.heldSummary&&(this.heldSummary.hidden=!0),this.updateTabs(),this.picker?.refreshPerformanceGroupComposition())}holdChanged(e,t){if(!e){this.activeHandoff=null,this.api.stopSettlementWatch(),this.resetPerPerformanceSelection(),this.syncProgress(),this.syncPane(),this.syncHoldTicker(),this.options.onHoldChange?.(null);return}let n=this.handoff(e,t),o=this.activeHandoff?.holdId!==n.holdId;this.activeHandoff=n,this.renderHeldAllocations(this.api.allocationsForHold(e.holdId)),this.updateTabs(),this.api.watchSettlement(e.holdId),this.syncProgress(),this.syncPane(),this.syncHoldTicker(),o&&this.options.onHold?.(n),this.options.onHoldChange?.(n)}checkout(e,t){let n=this.handoff(e,t);this.continued=!0,this.activeHandoff=n,this.options.onCheckout?.(n)}};var Kt=require("@seatlayer/core");var Ll="seatlayer-season-picker-style";function Hl(){if(document.getElementById(Ll))return;let i=document.createElement("style");i.id=Ll,i.textContent=`
2903
2982
  .sl-season-root{--sl-season-accent:var(--sl-accent,#7357d8);box-sizing:border-box;display:grid;gap:12px;min-width:0;max-width:100%;color:var(--sl-text,#18202b);font-family:var(--sl-font,Inter,system-ui,sans-serif)}
2904
2983
  .sl-season-root *{box-sizing:border-box}.sl-season-root button,.sl-season-root summary{font:inherit}
2905
2984
  .sl-season-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;padding:20px;border:1px solid var(--sl-line,#dde3ea);border-radius:18px;background:linear-gradient(135deg,color-mix(in srgb,var(--sl-season-accent) 10%,var(--sl-surface,#fff)),var(--sl-surface,#fff) 58%);box-shadow:0 10px 30px #18202b0a}
@@ -2915,4 +2994,4 @@ button.sl-a11yrow-c[disabled]{opacity:.58;cursor:default}
2915
2994
  .sl-season-status{min-height:20px;margin:0;padding:0 4px;color:var(--sl-muted,#627081);font-size:13px}.sl-season-status[data-kind=ready]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sl-season-status[data-kind=failed],.sl-season-status[data-kind=partial_terminal]{position:static;width:auto;height:auto;margin:0;padding:10px 12px;overflow:visible;clip:auto;border-radius:10px;background:#fff1f0;color:var(--sl-danger,#b42318);font-weight:700}.sl-season-root[data-busy=true] .sl-season-map{opacity:.82;pointer-events:none}
2916
2995
  @media(max-width:820px){.sl-season-stage{grid-template-columns:1fr}.sl-season-summary-card{position:static;order:-1}.sl-season-map{min-height:590px}}
2917
2996
  @media(max-width:560px){.sl-season-root{gap:9px}.sl-season-hero{grid-template-columns:1fr;padding:15px;border-radius:14px}.sl-season-offer{min-width:0}.sl-season-progress{grid-template-columns:1fr}.sl-season-progress li+li{border-inline-start:0;border-top:1px solid var(--sl-line,#dde3ea)}.sl-season-progress li[data-state=upcoming]{display:none}.sl-season-date-list{grid-template-columns:1fr}.sl-season-map{min-height:560px}.sl-season-summary-card{padding:13px}.sl-season-benefits{display:grid;grid-template-columns:1fr}}
2918
- `,document.head.appendChild(i)}var th=new Set(["audience_not_public","sales_not_open","origin_not_allowed"]),ih=3e4;function nh(i,e){if(!i||typeof i!="object"||Array.isArray(i))return!1;let t=i;return typeof t.token=="string"&&t.token.length>0&&typeof t.expiresAt=="number"&&Number.isFinite(t.expiresAt)&&t.expiresAt>Date.now()&&t.seasonKey===e&&Array.isArray(t.planActivationIds)&&t.planActivationIds.every(n=>typeof n=="string"&&!!n)}var bi=class extends Error{constructor(t,n){super(`season_public_session_refused:${t}`);this.reason=t;this.status=n;this.name="SeasonPublicSessionRefused"}},Oe,Ke,yi,zt,xr=class{constructor(e){this.options=e;L(this,Oe,null);L(this,Ke,null);L(this,yi);L(this,zt);T(this,yi,e.fetch??globalThis.fetch.bind(globalThis)),T(this,zt,e.origin??(typeof location>"u"?void 0:location.origin))}get session(){return m(this,Oe)}async mint(e=!1){if(e&&T(this,Oe,null),m(this,Oe)&&m(this,Oe).expiresAt-ih>Date.now())return m(this,Oe);if(m(this,Ke))return m(this,Ke);let t=(async()=>{let n=await m(this,yi).call(this,`${this.options.base}/pub/seasons/${encodeURIComponent(this.options.season)}/sessions`,{method:"POST",body:JSON.stringify(m(this,zt)?{origin:m(this,zt)}:{}),credentials:"omit"}),r=await n.json().catch(()=>null);if(!n.ok){let s=r?.code??r?.error;if(n.status===403&&s&&th.has(s)){let o=s;throw this.options.onRefused?.({reason:o,code:s,status:n.status,retryable:o==="sales_not_open"}),new bi(o,n.status)}throw new Error(`season_public_session_failed_${n.status}`)}if(!nh(r,this.options.season))throw new Error("season_public_session_invalid");return T(this,Oe,r),r})();T(this,Ke,t);try{return await t}finally{m(this,Ke)===t&&T(this,Ke,null)}}async token(e){let t=e==="expiring"||e==="expired"||e==="unauthorized"||e==="manual",n=await this.mint(t);return{token:n.token,expiresAt:n.expiresAt}}};Oe=new WeakMap,Ke=new WeakMap,yi=new WeakMap,zt=new WeakMap;function $l(i){let e=new xr(i);return{access:new pe({provider:({reason:n})=>e.token(n),...i.accessHooks}),loader:e}}var rh="https://api.seatlayer.io",sh=6e4,oh=5e3,z=class extends Error{constructor(t,n){super(`season_request_failed:${t}`);this.code=t;this.status=n;this.name="SeasonApiError"}},wi=class extends Error{constructor(t){super(`season_operation_timeout:${t}`);this.operationId=t;this.name="SeasonRecoveryTimeoutError"}};function ah(i,e){let t=Number(i.headers.get("Retry-After")),n=Number.isFinite(t)&&t>=0?t:e.retryAfterSeconds;return Math.max(0,Math.min(oh,n*1e3))}function lh(i,e){return e?.aborted?Promise.reject(e.reason??new DOMException("Aborted","AbortError")):new Promise((t,n)=>{let r=setTimeout(t,i);e?.addEventListener("abort",()=>{clearTimeout(r),n(e.reason??new DOMException("Aborted","AbortError"))},{once:!0})})}function zl(i){if(!i||typeof i!="object")return"unknown";let e=i;return typeof e.code=="string"?e.code:typeof e.error=="string"?e.error:"unknown"}var ch=/^shc_[a-f0-9]{40}$/,dh=/^shh_[a-f0-9]{40}$/,ph=new Set(["preparing","commit_pending","committed","expire_pending","booking_pending","abort_pending","aborted","partial_terminal","expired","booked"]),hh=new Set(["pending","prepared","refused","applied","expired","booked","aborted"]);function kr(i){return Array.isArray(i)?i.some(kr):!i||typeof i!="object"?!1:Object.entries(i).some(([e,t])=>e==="childHoldId"||e==="child_hold_id"||e==="holdId"&&typeof t=="string"&&ch.test(t)||kr(t))}function vi(i,e,t="invalid_operation_response"){if(!i||typeof i!="object"||Array.isArray(i))throw new z(t,502);if(kr(i))throw new z("unsafe_operation_response",502);let n=i,r=n.allocations,s=new Set,o=Array.isArray(r)&&r.length>0&&r.every(p=>{if(!p||typeof p!="object")return!1;let u=p.eventId,h=p.state;return typeof u!="string"||!u||typeof h!="string"||!hh.has(h)||s.has(u)?!1:(s.add(u),!0)}),a=n.bookingRef===null||typeof n.bookingRef=="string"&&n.bookingRef.length>0,l=n.state!=="booked"||typeof n.bookingRef=="string"&&o&&r.every(p=>p.state==="booked"),c=n.state!=="booking_pending"||typeof n.bookingRef=="string"&&o&&r.some(p=>p.state!=="booked"),d=n.state!=="committed"||n.bookingRef===null;if(n.operationId!==e.operationId||n.seasonId!==e.seasonId||n.kind!=="HOLD"||typeof n.holdId!="string"||!dh.test(n.holdId)||n.policy!=="fixed_inclusion_same_seat"||typeof n.state!="string"||!ph.has(n.state)||typeof n.expiresAt!="number"||!Number.isFinite(n.expiresAt)||n.expiresAt<0||!a||typeof n.location!="string"||!n.location||typeof n.retryAfterSeconds!="number"||!Number.isFinite(n.retryAfterSeconds)||n.retryAfterSeconds<0||!o||!l||!c||!d||n.pricingAuthority!==void 0&&n.pricingAuthority!=="host"||n.authoritativeAmountIncluded!==void 0&&n.authoritativeAmountIncluded!==!1)throw new z(t,502);return{operationId:n.operationId,seasonId:n.seasonId,kind:n.kind,holdId:n.holdId,expiresAt:n.expiresAt,policy:n.policy,pricingAuthority:"host",authoritativeAmountIncluded:!1,state:n.state,bookingRef:n.bookingRef,location:n.location,retryAfterSeconds:n.retryAfterSeconds,allocations:r.map(p=>({eventId:p.eventId,state:p.state}))}}function uh(i,e,t){if(!Array.isArray(i)||i.length!==t||i.some(o=>typeof o!="string"||!o)||new Set(i).size!==i.length||!Array.isArray(e)||e.length!==i.length)throw new z("invalid_best_available_response",502);let n=i,r=new Set(n),s=new Map;for(let o of e){if(!o||typeof o!="object")throw new z("invalid_best_available_response",502);let a=o;if(typeof a.label!="string"||!r.has(a.label)||s.has(a.label)||typeof a.objectId!="string"||!a.objectId||a.objectType!=="seat"||typeof a.categoryKey!="string"||!a.categoryKey||a.tierId!==null&&(typeof a.tierId!="string"||!a.tierId)||a.quantity!==void 0&&a.quantity!==1)throw new z("invalid_best_available_response",502);s.set(a.label,{label:a.label,objectId:a.objectId,objectType:"seat",categoryKey:a.categoryKey,tierId:a.tierId,...a.quantity===void 0?{}:{quantity:a.quantity}})}return{labels:n,items:n.map(o=>s.get(o))}}function mh(i){if(!i||typeof i!="object"||Array.isArray(i))return null;let e=i;if(typeof e.currency!="string"||!e.currency||!Array.isArray(e.packages))return null;let t=[];for(let n of e.packages){if(!n||typeof n!="object")continue;let r=n;if(typeof r.planKey!="string"||!r.planKey||!Array.isArray(r.prices))continue;let s=[],o=new Set;for(let a of r.prices){if(!a||typeof a!="object")continue;let l=a;typeof l.categoryKey!="string"||!l.categoryKey||o.has(l.categoryKey)||typeof l.unitPrice!="number"||!Number.isInteger(l.unitPrice)||l.unitPrice<0||(o.add(l.categoryKey),s.push({categoryKey:l.categoryKey,unitPrice:l.unitPrice}))}s.length&&t.push({planKey:r.planKey,name:typeof r.name=="string"&&r.name?r.name:r.planKey,prices:s})}return t.length?{currency:e.currency,packages:t}:null}function fh(i){if(!i||typeof i!="object"||Array.isArray(i))throw new z("invalid_checkout_response",502);let e=i,t=typeof e.redirectUrl=="string"&&!!e.redirectUrl,n=!!e.clientPayload&&typeof e.clientPayload=="object"&&!Array.isArray(e.clientPayload);if(typeof e.orderId!="string"||!e.orderId||typeof e.currency!="string"||!e.currency||typeof e.totalMinor!="number"||!Number.isFinite(e.totalMinor)||typeof e.expiresAt!="number"||!Number.isFinite(e.expiresAt)||t===n)throw new z("invalid_checkout_response",502);return{orderId:e.orderId,totalMinor:e.totalMinor,currency:e.currency,expiresAt:e.expiresAt,...t?{redirectUrl:e.redirectUrl}:{},...n?{clientPayload:e.clientPayload}:{}}}function jl(i,e){return{seasonKey:i.key,planActivationId:i.planActivationId,operationId:e.operationId,holdId:e.holdId,expiresAt:e.expiresAt,policy:e.policy,pricingAuthority:"host",authoritativeAmountIncluded:!1,state:e.state,allocations:e.allocations.map(({eventId:t,state:n})=>({eventKey:t,state:n}))}}var ve,at,Ee,lt,xi,Ae,Pe,oe,ge,Ul,Pn=class{constructor(e,t){L(this,oe);L(this,ve);L(this,at);L(this,Ee);L(this,lt);L(this,xi);L(this,Ae,!1);L(this,Pe,null);T(this,ve,e),T(this,at,(t.apiBase??rh).replace(/\/$/,"")),T(this,Ee,t.access),T(this,lt,t.fetch??globalThis.fetch.bind(globalThis)),T(this,xi,t.recoveryTimeoutMs??sh),m(this,Ee).onRenewed(n=>x(this,oe,Ul).call(this,n))}async descriptor(){let{body:e}=await x(this,oe,ge).call(this,"GET","");return e.season}async chart(){let{body:e}=await x(this,oe,ge).call(this,"GET","/chart");return e}async availability(){let{body:e}=await x(this,oe,ge).call(this,"GET","/availability"),t=Object.values(e.seats??{});return{...e,freeCount:t.filter(n=>n==="free").length,blockedCount:t.filter(n=>n!=="free").length}}async hold(e,t){let{body:n,response:r}=await x(this,oe,ge).call(this,"POST","/holds",{operationId:t,labels:[...e]});return{operation:vi(n.operation,{seasonId:m(this,ve),operationId:t}),response:r}}async bestAvailable(e){let{body:t,response:n}=await x(this,oe,ge).call(this,"POST","/best-available",{operationId:e.operationId,qty:e.qty,...e.categoryKey?{categoryKey:e.categoryKey}:{},...e.zoneId?{zoneId:e.zoneId}:{},...e.accessibility?.length?{accessibility:[...e.accessibility]}:{},...e.requireContiguous===!0?{requireContiguous:!0}:{}}),r=vi(t.operation,{seasonId:m(this,ve),operationId:e.operationId},"invalid_best_available_response"),{labels:s,items:o}=uh(t.labels,t.items,e.qty);return{operation:r,labels:s,items:o,response:n}}async operation(e){let{body:t,response:n}=await x(this,oe,ge).call(this,"GET",`/operations/${encodeURIComponent(e)}`);return{operation:vi(t.operation,{seasonId:m(this,ve),operationId:e}),response:n}}async release(e,t){let{body:n,response:r}=await x(this,oe,ge).call(this,"POST",`/holds/${encodeURIComponent(e)}/release`,{releaseActionId:t});return{operation:vi(n.operation,{seasonId:m(this,ve),operationId:e}),response:r}}async prices(){let e;try{({body:e}=await x(this,oe,ge).call(this,"GET","/prices"))}catch(t){if(t instanceof z&&t.status===404)return null;throw t}return mh(e)}async checkout(e){let{body:t}=await x(this,oe,ge).call(this,"POST","/checkout",{operationId:e.operationId,buyerEmail:e.buyerEmail,...e.buyerName?{buyerName:e.buyerName}:{},...e.provider?{provider:e.provider}:{},...e.returnUrl?{returnUrl:e.returnUrl}:{}});return fh(t)}async orderStatus(e){let t=await m(this,lt).call(this,`${m(this,at)}/pub/orders/${encodeURIComponent(e)}/status`,{method:"GET",credentials:"omit"}),n=await t.json().catch(()=>null);if(!t.ok)throw new z(zl(n),t.status);if(n===null)throw new z("invalid_json_response",502);return n}async renewalIntent(e){let{body:t}=await x(this,oe,ge).call(this,"POST","/renewal-intents",{offerId:e}),n=t.intent;if(!n||n.offerId!==e||n.state!=="intent_received"||!n.intentId||!Number.isFinite(n.receivedAt))throw new z("invalid_renewal_intent_response",502);return n}async waitForTerminal(e,t,n){let r=Date.now(),s=t?{operation:vi(t.operation,{seasonId:m(this,ve),operationId:e}),response:t.response}:await this.operation(e);for(;s.operation.state==="preparing"||s.operation.state==="commit_pending"||s.operation.state==="expire_pending"||s.operation.state==="booking_pending"||s.operation.state==="abort_pending";){if(Date.now()-r>=m(this,xi))throw new wi(e);await lh(ah(s.response,s.operation),n),s=await this.operation(e)}return s.operation}destroy(){m(this,Ae)||(T(this,Ae,!0),m(this,Ee).onRenewed(void 0),m(this,Ee).clear())}};ve=new WeakMap,at=new WeakMap,Ee=new WeakMap,lt=new WeakMap,xi=new WeakMap,Ae=new WeakMap,Pe=new WeakMap,oe=new WeakSet,ge=async function(e,t,n,r=!0){if(m(this,Ae))throw new z("season_api_destroyed",409);if(m(this,Pe))throw m(this,Pe);let s=await m(this,Ee).authorization();if(m(this,Ae))throw new z("season_api_destroyed",409);if(m(this,Pe))throw m(this,Pe);if(!s)throw new re({reason:"no_token",retryable:!1});let o=await m(this,lt).call(this,`${m(this,at)}/pub/seasons/${encodeURIComponent(m(this,ve))}${t}`,{method:e,headers:{Authorization:s,...n===void 0?{}:{"Content-Type":"application/json"}},body:n===void 0?void 0:JSON.stringify(n)}),a=await o.json().catch(()=>null);if(!o.ok){let l=zl(a);if(r&&await m(this,Ee).handleFailure(o.status,l))return x(this,oe,ge).call(this,e,t,n,!1);let c=m(this,Ee).unavailable;throw c?new re(c):new z(l,o.status)}if(a===null)throw new z("invalid_json_response",502);return{body:a,response:o}},Ul=async function(e){if(m(this,Ae))return;let t=`/pub/seasons/${encodeURIComponent(m(this,ve))}/session/adopt`;for(let n=0;n<2;n++){if(m(this,Ae))return;try{if((await m(this,lt).call(this,`${m(this,at)}${t}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.token}`},body:JSON.stringify({previousToken:e.previousToken}),credentials:"omit"})).ok){T(this,Pe,null);return}}catch{}}if(!m(this,Ae))throw T(this,Pe,new z("season_session_adopt_failed",409)),m(this,Pe)};var gh=2500;function bh(i){let e=typeof i=="string"?document.querySelector(i):i;if(!e)throw new Error("seatlayer: Season picker container was not found");return e}function yh(i,e,t){if(i.startsAt==null)return{date:"Date to be announced",time:null};try{let n=new Date(i.startsAt),r=e?{timeZone:e}:{};return{date:new Intl.DateTimeFormat(t,{dateStyle:"medium",...r}).format(n),time:new Intl.DateTimeFormat(t,{timeStyle:"short",...r}).format(n)}}catch{return{date:"Date to be announced",time:null}}}function Gl(i){return i.state==="committed"||i.state==="booked"}var Sr=class{constructor(e,t,n){this.transport=e;this.sink=t;this.intervalMs=n;this.timer=null;this.stopped=!0;this.prior={}}start(){this.stopped&&(this.stopped=!1,this.timer=setTimeout(()=>{this.tick()},this.intervalMs))}stop(){this.stopped=!0,this.timer&&clearTimeout(this.timer),this.timer=null}async tick(){if(!this.stopped)try{let e=await this.transport.objects(""),t=Object.entries(e.seats).filter(([n,r])=>this.prior[n]!==r).map(([n,r])=>({label:n,status:r}));this.prior={...e.seats},t.length&&this.sink.applyStatuses(t)}catch{this.stopped||await this.sink.resync()}finally{this.stopped||(this.timer=setTimeout(()=>{this.tick()},this.intervalMs))}}},Tr=class{constructor(e,t){this.api=e;this.realtimePollMs=t;this.descriptorValue=null;this.availabilityValue=null;this.categoryLabels=new Map;this.reuseAvailabilityOnce=!1;this.nextOperationId=null;this.nextBestAvailable=null;this.nextReleaseActionId=null;this.operationByHold=new Map}prime(e,t){this.descriptorValue=e,this.availabilityValue=t,this.reuseAvailabilityOnce=!0}queueOperation(e){this.nextOperationId=e}queueBestAvailable(e,t){if(this.nextBestAvailable)throw new z("season_best_available_in_progress",409);let n={operationId:e,...t.accessibility?.length?{accessibility:[...t.accessibility]}:{},...t.requireContiguous===!0?{requireContiguous:!0}:{}};return this.nextBestAvailable=n,n}clearBestAvailable(e){this.nextBestAvailable===e&&(this.nextBestAvailable=null)}queueRelease(e){this.nextReleaseActionId=e}operationForHold(e){return this.operationByHold.get(e)??null}remember(e){this.operationByHold.set(e.holdId,e)}forget(e){this.operationByHold.delete(e)}async chart(e){let[t,n]=await Promise.all([this.descriptorValue?Promise.resolve(this.descriptorValue):this.api.descriptor(),this.api.chart()]);this.descriptorValue=t;for(let r of n.categories??[])typeof r?.key=="string"&&typeof r.label=="string"&&this.categoryLabels.set(r.key,r.label);return{doc:n,event:{key:t.key,name:t.name,venue:t.venue,startsAt:t.occurrences[0]?.startsAt??null,timezone:t.timezone,currency:t.currency,mode:t.mode,inventoryModelVersion:2}}}async objects(e){let t;return this.reuseAvailabilityOnce&&this.availabilityValue?(this.reuseAvailabilityOnce=!1,t=this.availabilityValue):(t=await this.api.availability(),this.availabilityValue=t),{seats:{...t.seats}}}async hold(e,t,n,r){if(r)throw new z("season_hold_replace_unsupported",409);let s=this.nextOperationId??`sop_${crypto.randomUUID()}`;this.nextOperationId=null;let o=await this.api.hold(t.map(l=>l.label),s),a=await this.api.waitForTerminal(s,o);if(!Gl(a))throw new z(`season_operation_${a.state}`,409);return this.remember(a),{holdId:a.holdId,expiresAt:a.expiresAt,items:t.map(l=>({label:l.label,objectId:l.label,objectType:"seat",categoryKey:"",tierId:l.tierId??null,unitPrice:0,currency:this.descriptorValue?.currency??"USD",...l.quantity==null?{}:{quantity:l.quantity}}))}}async release(e,t,n){let r=this.operationForHold(n);if(!r)throw new z("season_hold_not_found",404);let s=this.nextReleaseActionId??`sra_${crypto.randomUUID()}`;this.nextReleaseActionId=null;let o=await this.api.release(r.operationId,s),a=await this.api.waitForTerminal(r.operationId,o);if(a.state==="partial_terminal")throw this.remember(a),new z("season_operation_partial_terminal",409);this.forget(n)}async bestAvailable(e,t,n,r){let s=this.nextBestAvailable;this.nextBestAvailable=null;let o=s?.operationId??`sop_${crypto.randomUUID()}`,a=await this.api.bestAvailable({operationId:o,qty:t,...n?{categoryKey:n}:{},...r?{zoneId:r}:{},...s?.accessibility?.length?{accessibility:s.accessibility}:{},...s?.requireContiguous===!0?{requireContiguous:!0}:{}}),l=await this.api.waitForTerminal(o,a);if(!Gl(l))throw new z(`season_operation_${l.state}`,409);this.remember(l);let c=new Map(a.items.map(d=>[d.label,d]));return{holdId:l.holdId,expiresAt:l.expiresAt,labels:[...a.labels],items:a.labels.map(d=>{let p=c.get(d);return{label:d,objectId:p?.objectId??d,objectType:"seat",categoryKey:p?.categoryKey??n??"",tierId:p?.tierId??null,unitPrice:0,currency:this.descriptorValue?.currency??"USD",...p?.quantity==null?{}:{quantity:p.quantity}}})}}categoryLabel(e){return this.categoryLabels.get(e)??e}socketUrl(){return""}createRealtime(e,t){return new Sr(this,t,this.realtimePollMs)}},I,pt,Ut,he,te,Si,ie,De,W,ae,we,Gt,We,Ne,ht,be,Ti,Me,qt,Kt,ut,Wt,Ye,mt,ft,Yt,w,ql,Kl,Cr,Er,Ar,Pr,Mn,ct,Wl,Yl,_e,ki,Xl,Ql,Mr,Lr,Zl,Jl,ec,Hr,Rr,K,dt,Ir,jt,Ln=class{constructor(e){L(this,w);L(this,I);L(this,pt);L(this,Ut);L(this,he);L(this,te);L(this,Si,new AbortController);L(this,ie,null);L(this,De,null);L(this,W,null);L(this,ae,null);L(this,we,null);L(this,Gt,null);L(this,We,null);L(this,Ne,null);L(this,ht,null);L(this,be,[]);L(this,Ti,new Map);L(this,Me,!1);L(this,qt,!1);L(this,Kt);L(this,ut,null);L(this,Wt,null);L(this,Ye,null);L(this,mt,"handoff");L(this,ft,null);L(this,Yt,!1);if(!e?.season)throw new Error("seatlayer: `season` key is required");if(!e.container)throw new Error("seatlayer: `container` is required");if("event"in e||"performanceGroup"in e)throw new Error("seatlayer: SeasonPicker is not SeatPicker or PerformanceGroupPicker");T(this,I,e),T(this,pt,bh(e.container));let t={onExpired:r=>e.onAccessExpired?.(r),onUnavailable:r=>{let s=m(this,ut)&&r.reason==="provider_failed"?m(this,ut):r;T(this,ut,null),T(this,Wt,s.reason==="provider_failed"?null:s),e.onAccessUnavailable?.(s),x(this,w,Zl).call(this,s)}};if(!e.buyerAccessToken&&!e.buyerAccessTokenProvider){let{access:r,loader:s}=$l({base:(e.apiBase??"https://api.seatlayer.io").replace(/\/$/,""),season:e.season,fetch:e.fetch,onRefused:o=>{T(this,ut,o)},accessHooks:t});T(this,Ut,r),T(this,Kt,s)}else T(this,Kt,null),T(this,Ut,new pe({token:e.buyerAccessToken,provider:e.buyerAccessTokenProvider,...t}));T(this,he,new Pn(e.season,{apiBase:e.apiBase,access:m(this,Ut),fetch:e.fetch,recoveryTimeoutMs:e.recoveryTimeoutMs})),T(this,te,new Tr(m(this,he),Math.max(750,e.realtimePollMs??gh)))}async render(){x(this,w,Ir).call(this),Vl(),x(this,w,Kl).call(this),x(this,w,K).call(this,{kind:"loading",message:"Loading Season seats available for every performance."},!0);try{let[e,t,n]=await Promise.all([m(this,he).descriptor(),m(this,he).availability(),m(this,he).prices().catch(()=>null)]);return m(this,Me)?this:(T(this,ie,e),T(this,De,t),T(this,Ye,n),T(this,mt,m(this,I).checkout==="hosted"&&e.checkoutMode!=="server"&&n?"hosted":"handoff"),m(this,te).prime(e,t),x(this,w,Cr).call(this),await x(this,w,ql).call(this,e),m(this,Me)?this:(n&&x(this,w,Cr).call(this),x(this,w,ec).call(this),x(this,w,K).call(this,{kind:"ready",message:`${t.freeCount} seat${t.freeCount===1?"":"s"} available for every included performance.`}),m(this,I).initialOperationId&&await this.restoreOperation(m(this,I).initialOperationId),this))}catch(e){if(m(this,Me))return this;throw x(this,w,dt).call(this,e)}}async holdSameSeat(e,t){if(x(this,w,jt).call(this),!t.startsWith("sop_"))throw new Error("seatlayer: caller-stable Season operation id is required");if(!e.length)throw new Error("seatlayer: select at least one seat");if(m(this,te).queueOperation(t),m(this,ae).selectObjectsWithoutConfirmation([...e]),x(this,w,K).call(this,{kind:"pending",message:"Holding the same seats for every performance.",operationId:t},!0),await m(this,ae).handleCta(),!m(this,W))throw new z("season_hold_not_created",409);return m(this,W)}async holdBestAvailable(e,t,n={}){if(x(this,w,jt).call(this),!t.startsWith("sop_"))throw new Error("seatlayer: caller-stable Season operation id is required");if(!Number.isInteger(e)||e<1)throw new Error("seatlayer: positive Best Available quantity is required");let r=m(this,ae).maxTickets;if(e>r)throw new Error(`seatlayer: Best Available quantity cannot exceed the configured maximum (${r})`);if(m(this,qt))throw new z("season_best_available_in_progress",409);T(this,qt,!0);let s=null;try{if(s=m(this,te).queueBestAvailable(t,n),x(this,w,K).call(this,{kind:"pending",message:`Finding ${e} Season seat${e===1?"":"s"} available for every performance.`,operationId:t},!0),!await m(this,ae).bestAvailableOrThrow(e,n.categoryKey,{zoneId:n.zoneId})||!m(this,W))throw new z("season_hold_not_created",409);return m(this,W)}catch(o){throw x(this,w,dt).call(this,o,t)}finally{s&&m(this,te).clearBestAvailable(s),T(this,qt,!1)}}async restoreOperation(e){x(this,w,jt).call(this),x(this,w,K).call(this,{kind:"pending",message:"Restoring your Season selection.",operationId:e},!0);try{let t=await m(this,he).waitForTerminal(e,void 0,m(this,Si).signal);return t.state==="aborted"||t.state==="expired"?(T(this,W,null),m(this,I).onHoldChange?.(null),x(this,w,K).call(this,{kind:"released",message:"The previous Season selection is no longer held.",operationId:e}),null):(m(this,te).remember(t),x(this,w,Pr).call(this,t,!1))}catch(t){throw x(this,w,dt).call(this,t,e)}}async release(e){x(this,w,jt).call(this);let t=m(this,W);if(t){if(!e)throw new Error("seatlayer: caller-stable release action id is required");m(this,te).queueRelease(e),x(this,w,K).call(this,{kind:"pending",message:"Releasing the Season seats.",operationId:t.operationId},!0);try{m(this,ae)?.getCurrentHold()?.holdId===t.holdId?await m(this,ae).release():(await m(this,te).release("",[],t.holdId),x(this,w,Mn).call(this)),x(this,w,K).call(this,{kind:"released",message:"The Season seats were released.",operationId:t.operationId})}catch(n){throw x(this,w,dt).call(this,n,t.operationId)}}}async createRenewalIntent(e){if(x(this,w,jt).call(this),!e.startsWith("sro_"))throw new Error("seatlayer: Season renewal offer id is required");x(this,w,K).call(this,{kind:"pending",message:"Recording renewal intent. No purchase is made in the browser."},!0);try{let t=await m(this,he).renewalIntent(e);return x(this,w,K).call(this,{kind:"renewal_intent",message:"Renewal intent recorded. Your ticketing platform will confirm price, payment, and renewal."}),m(this,I).onRenewalIntent?.(t),t}catch(t){throw x(this,w,dt).call(this,t)}}getDescriptor(){return m(this,ie)}getAvailability(){return m(this,De)}getHandoff(){return m(this,W)}destroy(){m(this,Me)||(T(this,Me,!0),m(this,Si).abort(),x(this,w,Rr).call(this),m(this,ae)?.destroy(),m(this,he).destroy(),m(this,pt).replaceChildren(),T(this,we,null),T(this,Gt,null),T(this,We,null),T(this,Ne,null),T(this,ht,null),T(this,ie,null),T(this,De,null),T(this,W,null))}};I=new WeakMap,pt=new WeakMap,Ut=new WeakMap,he=new WeakMap,te=new WeakMap,Si=new WeakMap,ie=new WeakMap,De=new WeakMap,W=new WeakMap,ae=new WeakMap,we=new WeakMap,Gt=new WeakMap,We=new WeakMap,Ne=new WeakMap,ht=new WeakMap,be=new WeakMap,Ti=new WeakMap,Me=new WeakMap,qt=new WeakMap,Kt=new WeakMap,ut=new WeakMap,Wt=new WeakMap,Ye=new WeakMap,mt=new WeakMap,ft=new WeakMap,Yt=new WeakMap,w=new WeakSet,ql=async function(e){let t=new Ge(Sn({container:m(this,Gt),event:e.key,apiBase:m(this,I).apiBase,transport:m(this,te),hideEventDetails:!0,maxSelection:m(this,I).maxSelection,selectedObjects:m(this,I).selectedObjects,selectableObjects:m(this,I).selectableObjects,numberOfPlacesToSelect:m(this,I).numberOfPlacesToSelect,selectionValidators:m(this,I).selectionValidators,locale:m(this,I).locale,messages:m(this,I).messages,languages:m(this,I).languages,colorblindSafe:m(this,I).colorblindSafe,initialView:m(this,I).initialView,enable3D:m(this,I).enable3D,max3DSeats:m(this,I).max3DSeats,hideBadge:m(this,I).hideBadge,theme:m(this,I).theme,confirmSelection:m(this,I).confirmSelection,seatView:m(this,I).seatView,onBuyerViewChange:m(this,I).onBuyerViewChange,onAnalytics:(n,r)=>{try{m(this,I).onAnalytics?.(n,{...r,metricScope:"season",seasonKey:e.key,planActivationId:e.planActivationId,performanceCount:e.occurrenceCount})}catch{}},onSelectionChange:n=>{T(this,be,n.map(r=>r.label)),T(this,Ti,new Map(n.filter(r=>!!r.categoryKey).map(r=>[r.label,r.categoryKey]))),x(this,w,ct).call(this),m(this,I).onSelectionChange?.(n)},onSelectionValidityChange:m(this,I).onSelectionValidityChange,onHoldChange:n=>{if(!n){x(this,w,Mn).call(this);return}let r=m(this,te).operationForHold(n.holdId);r&&x(this,w,Pr).call(this,r,!0)},onCheckout:()=>{m(this,W)&&(x(this,w,_e).call(this,"checkout"),m(this,I).onContinue?.(m(this,W)),m(this,mt)==="hosted"&&x(this,w,Jl).call(this,m(this,W)))},onHoldExpired:()=>{x(this,w,Mn).call(this),x(this,w,K).call(this,{kind:"released",message:"The Season hold expired. Choose seats again."}),m(this,I).onHoldExpired?.()},onError:n=>x(this,w,dt).call(this,n)},{surface:"season",performanceCount:e.occurrenceCount,selectionMode:"same_seat",suppressPricing:!0,groupSelectionSummary:()=>{let n=m(this,be).length;return n?{seats:n,performances:e.occurrenceCount,performancesChosen:e.occurrenceCount,perPerformance:n}:null}}));T(this,ae,t),await t.render()},Kl=function(){m(this,pt).replaceChildren();let e=document.createElement("section");e.className="sl-season-root",e.setAttribute("aria-label","Season ticket selection");let t=document.createElement("header");t.className="sl-season-hero";let n=document.createElement("ol");n.className="sl-season-progress",n.setAttribute("aria-label","Season checkout progress");for(let[y,S]of["Choose seats","Review package","Checkout"].entries()){let k=document.createElement("li");k.dataset.state=y===0?"current":"upcoming";let v=document.createElement("span");v.textContent=String(y+1),k.append(v,S),n.append(k)}let r=document.createElement("div");r.className="sl-season-stage";let s=document.createElement("div");s.className="sl-season-map";let o=document.createElement("aside");o.className="sl-season-summary-card",o.setAttribute("aria-label","Your Season selection");let a=document.createElement("h3");a.textContent="Your Season seats";let l=document.createElement("p");l.className="sl-season-selection",l.textContent="Choose a seat on the map.";let c=document.createElement("p");c.className="sl-season-rule";let d=document.createElement("i");d.textContent="1\xD7";let p=document.createElement("span");p.textContent="Each seat you choose is reserved for every included performance.",c.append(d,p);let u=document.createElement("p");u.className="sl-season-availability";let h=document.createElement("p");h.className="sl-season-checkout-note",h.textContent="Your ticketing platform confirms package price, payment, admission passes, and member benefits.",o.append(a,l,c,u,h),r.append(s,o);let g=document.createElement("p");g.className="sl-season-status",g.setAttribute("role","status"),g.setAttribute("aria-live","polite"),e.append(t,n,r,g),m(this,pt).append(e),T(this,we,e),T(this,Gt,s),T(this,We,g),T(this,Ne,l),T(this,ht,u)},Cr=function(){let e=m(this,ie),t=m(this,I).offer,n=m(this,we).querySelector(".sl-season-hero");n.replaceChildren();let r=document.createElement("div");r.className="sl-season-copy";let s=document.createElement("p");s.className="sl-season-eyebrow",s.textContent=t?.eyebrow??"Season ticket";let o=document.createElement("h2");o.textContent=e.edition?`${e.name} \xB7 ${e.edition}`:e.name;let a=document.createElement("p");a.className="sl-season-promise",a.textContent=`Choose once and keep the same seat for all ${e.occurrenceCount} included performances.`;let l=document.createElement("div");l.className="sl-season-facts";for(let h of[`${e.occurrenceCount} performances`,e.venue,t?.renewalLabel??"Same-seat package"].filter(Boolean)){let g=document.createElement("span");g.className="sl-season-fact",g.textContent=h,l.append(g)}r.append(s,o,a,l),n.append(r);let c=document.createElement("div");c.className="sl-season-offer";let d=document.createElement("span");d.className="sl-season-offer-label";let p=x(this,w,ki).call(this);if(p){d.textContent=b("season.packagePriceLabel","Package price"),c.append(d,x(this,w,Ql).call(this,p,e.occurrenceCount));let h=document.createElement("span");h.className="sl-season-price-note",h.textContent=b("season.packagePricePerSeat","Per seat, for the whole package."),c.append(h),n.append(c),x(this,w,Er).call(this,n,t),x(this,w,Ar).call(this,n,e),x(this,w,ct).call(this);return}d.textContent=t?.priceLabel?"Season package":"Package price";let u=document.createElement(t?.priceLabel?"strong":"span");if(u.className=t?.priceLabel?"sl-season-price":"sl-season-price-note",u.textContent=t?.priceLabel??"Confirmed by your ticketing platform at checkout",c.append(d,u),t?.compareAtPriceLabel){let h=document.createElement("span");h.className="sl-season-was",h.textContent=t.compareAtPriceLabel,c.append(h)}if(t?.savingsLabel){let h=document.createElement("span");h.className="sl-season-saving",h.textContent=t.savingsLabel,c.append(h)}if(t?.priceNote){let h=document.createElement("span");h.className="sl-season-price-note",h.textContent=t.priceNote,c.append(h)}n.append(c),x(this,w,Er).call(this,n,t),x(this,w,Ar).call(this,n,e),x(this,w,ct).call(this)},Er=function(e,t){if(!t?.benefits?.length)return;let n=document.createElement("ul");n.className="sl-season-benefits";for(let r of t.benefits.slice(0,6)){let s=document.createElement("li");s.textContent=r,n.append(s)}e.append(n)},Ar=function(e,t){let n=document.createElement("details");n.className="sl-season-dates";let r=document.createElement("summary");r.textContent=`All ${t.occurrenceCount} performances included`;let s=document.createElement("ol");s.className="sl-season-date-list";for(let o of t.occurrences){let a=document.createElement("li");a.className="sl-season-date";let l=document.createElement("b");l.textContent=o.name;let c=yh(o,t.timezone,m(this,I).locale),d=document.createElement("time");o.startsAt!=null&&(d.dateTime=new Date(o.startsAt).toISOString()),d.textContent=c.time?`${c.date} \xB7 ${c.time}`:c.date,a.append(l,d),s.append(a)}n.append(r,s),e.append(n)},Pr=function(e,t){if(e.state==="booked")return T(this,W,null),m(this,te).forget(e.holdId),m(this,ae)?.notifyGroupSettled("booked"),x(this,w,_e).call(this,"complete"),x(this,w,K).call(this,{kind:"booked",message:`Your Season booking is complete for all ${m(this,ie).occurrenceCount} performances. No further checkout action is needed.`,operationId:e.operationId}),m(this,I).onHoldChange?.(null),null;if(e.state==="partial_terminal")return T(this,W,null),T(this,be,[]),m(this,te).forget(e.holdId),m(this,ae)?.notifyGroupSettled("lost"),x(this,w,ct).call(this),x(this,w,_e).call(this,"review"),x(this,w,K).call(this,{kind:"partial_terminal",message:"This Season selection needs organizer review. Do not try another selection.",operationId:e.operationId}),m(this,I).onHoldChange?.(null),null;if(e.state!=="committed")return T(this,W,null),m(this,te).forget(e.holdId),m(this,ae)?.notifyGroupSettled("lost"),x(this,w,K).call(this,{kind:"failed",message:"The Season selection could not be completed.",operationId:e.operationId}),m(this,I).onHoldChange?.(null),null;let n=jl(m(this,ie),e),r=m(this,W)?.holdId!==n.holdId;return T(this,W,n),x(this,w,ct).call(this),x(this,w,_e).call(this,"review"),m(this,I).onHoldChange?.(n),x(this,w,K).call(this,{kind:"held",message:`Your seats are held for all ${m(this,ie).occurrenceCount} performances. Review and continue to checkout.`,operationId:e.operationId}),r&&t&&m(this,I).onHold?.(n),n},Mn=function(){T(this,W,null),T(this,be,[]),x(this,w,ct).call(this),x(this,w,_e).call(this,"choose"),m(this,I).onHoldChange?.(null)},ct=function(){if(!m(this,Ne))return;let e=m(this,be).length;if(!e)m(this,Ne).textContent="Choose a seat on the map. Unavailable seats are already booked on at least one included performance.";else{m(this,Ne).replaceChildren();let t=document.createElement("strong");t.textContent=m(this,be).join(", "),m(this,Ne).append(t,` \xB7 ${e} Season seat${e===1?"":"s"} across all ${m(this,ie)?.occurrenceCount??0} performances`)}m(this,ht)&&m(this,De)&&(m(this,ht).textContent=`${m(this,De).freeCount} seat${m(this,De).freeCount===1?"":"s"} currently available for the complete Season`),x(this,w,Wl).call(this),x(this,w,Yl).call(this)},Wl=function(){let e=m(this,we)?.querySelector(".sl-season-summary-card");if(!e)return;e.querySelector(".sl-season-package-total")?.remove();let t=x(this,w,Mr).call(this);if(t==null)return;let n=m(this,Ye)?.currency??m(this,ie)?.currency??"USD",r=m(this,ie)?.occurrenceCount??0,s=document.createElement("p");s.className="sl-season-package-total";let o=document.createElement("span");o.textContent=b("season.packageTotal","Package total");let a=document.createElement("strong");a.textContent=x(this,w,Lr).call(this,t,n);let l=document.createElement("span");l.className="sl-season-package-total-scope",l.textContent=b("season.priceForAllDates","for all {count} dates").replace("{count}",String(r)),s.append(o,a,l);let c=e.querySelector(".sl-season-checkout-note");c?e.insertBefore(s,c):e.append(s)},Yl=function(){let e=m(this,we)?.querySelector(".sl-season-checkout-note");if(e){if(m(this,mt)==="hosted"){e.textContent=b("season.hostedCheckoutNote","You pay for the whole package here. Your tickets for every performance arrive by email.");return}if(x(this,w,ki).call(this)){e.textContent=b("season.serverCheckoutPricedNote","Payment and admission passes are completed in the checkout on this page.");return}e.textContent="Your ticketing platform confirms package price, payment, admission passes, and member benefits."}},_e=function(e){let t=e==="choose"?0:e==="review"?1:e==="checkout"?2:3;m(this,we)?.querySelectorAll(".sl-season-progress li").forEach((n,r)=>{n.dataset.state=r<t?"done":r===t?"current":"upcoming";let s=n.querySelector("span");s&&(s.textContent=r<t?"\u2713":String(r+1))})},ki=function(){let e=m(this,Ye)?.packages;if(!e?.length)return null;let t=m(this,ie)?.planActivationId,n=e.find(o=>o.planKey===t);if(n)return n;let r=m(this,Kt)?.session?.planActivationIds;return(r?.length?e.filter(o=>r.includes(o.planKey)):[])[0]??e[0]},Xl=function(e){let t=x(this,w,ki).call(this)?.prices.find(n=>n.categoryKey===e);return t?t.unitPrice:null},Ql=function(e,t){let n=document.createElement("ul");n.className="sl-season-price-lines";let r=m(this,Ye)?.currency??m(this,ie)?.currency??"USD";for(let s of e.prices){let o=document.createElement("li"),a=document.createElement("span");a.className="sl-season-price-category",a.textContent=m(this,te).categoryLabel(s.categoryKey);let l=document.createElement("strong");l.className="sl-season-price",l.textContent=x(this,w,Lr).call(this,s.unitPrice,r);let c=document.createElement("span");c.className="sl-season-price-scope",c.textContent=b("season.priceForAllDates","for all {count} dates").replace("{count}",String(t)),o.append(a,l,c),n.append(o)}return n},Mr=function(){if(!m(this,be).length||!x(this,w,ki).call(this))return null;let e=0;for(let t of m(this,be)){let n=m(this,Ti).get(t),r=n?x(this,w,Xl).call(this,n):null;if(r==null)return null;e+=r}return e},Lr=function(e,t){let n=(0,Xt.fromMinorUnits)(e,t),r=Number.isInteger(n);return(0,Xt.formatMoney)(n,t,{locale:m(this,I).locale,fallback:(s,o)=>`${s} ${o}`,...r?{minimumFractionDigits:0,maximumFractionDigits:0}:{}})},Zl=function(e){let t=e.reason==="audience_not_public"?b("season.accessNotPublic","This season isn't open for online booking yet."):e.reason==="sales_not_open"?b("season.accessSalesNotOpen","Season tickets aren't on sale right now. Check back when sales open."):e.reason==="origin_not_allowed"?b("season.accessOriginNotAllowed","This season can't be booked from this page."):b("season.accessUnavailable","Season tickets can't be loaded right now. Please try again later.");x(this,w,K).call(this,{kind:"failed",message:t})},Jl=async function(e){if(!m(this,Yt)){T(this,Yt,!0);try{let t=m(this,Ye)?.currency??m(this,ie)?.currency??"USD",n=x(this,w,Mr).call(this);if(n==null){x(this,w,K).call(this,{kind:"failed",message:b("season.checkoutNotPriced","We can\u2019t price this package here. Your seats are still held \u2014 please continue in the checkout on this page."),operationId:e.operationId});return}await x(this,w,Hr).call(this,{kind:"pay",provider:null,order:{holdId:e.operationId,expiresAt:e.expiresAt,currency:t,total:(0,Xt.fromMinorUnits)(n,t),labels:[...m(this,be)]}})}finally{T(this,Yt,!1)}}},ec=function(){if(m(this,mt)!=="hosted")return;let e=Tn(m(this,I).season);e?.outcome!=="success"||!e.orderId||(x(this,w,_e).call(this,"checkout"),x(this,w,Hr).call(this,{kind:"resume",orderId:e.orderId}))},Hr=async function(e){let t;try{({mountCheckout:t}=await Ui())}catch(r){m(this,I).onError?.(r),x(this,w,K).call(this,{kind:"failed",message:b("season.checkoutCouldNotBeOpened","Checkout could not be opened. Your seats are still held \u2014 please try again.")});return}let n=m(this,ae)?.root;m(this,Me)||!n||(x(this,w,Rr).call(this),T(this,ft,t({root:n,state:e,eventKey:m(this,I).season,formatMoney:(r,s)=>(0,Xt.formatMoney)(r,s,{locale:m(this,I).locale,fallback:(o,a)=>`${o} ${a}`,...Number.isInteger(r)?{minimumFractionDigits:0,maximumFractionDigits:0}:{}}),startSession:r=>m(this,he).checkout({operationId:r.holdId,buyerEmail:r.buyerEmail,...r.buyerName?{buyerName:r.buyerName}:{},...m(this,I).returnUrl?{returnUrl:m(this,I).returnUrl}:{}}),orderStatus:r=>m(this,he).orderStatus(r),onCancel:()=>{T(this,ft,null),m(this,W)&&x(this,w,_e).call(this,"review")},onConfirmed:r=>{m(this,I).onOrderConfirmed?.(r),x(this,w,_e).call(this,"complete"),x(this,w,K).call(this,{kind:"booked",message:b("season.orderConfirmed","Your season tickets are confirmed for every included performance.")})},onError:r=>m(this,I).onError?.(r)})))},Rr=function(){m(this,ft)?.destroy(),T(this,ft,null)},K=function(e,t=!1){m(this,We)&&(m(this,We).textContent=e.message,m(this,We).dataset.kind=e.kind),m(this,we)&&(m(this,we).dataset.busy=String(t)),m(this,I).onStatusChange?.(e)},dt=function(e,t){let n=e instanceof re&&e.reason==="provider_failed"&&m(this,Wt)?new re(m(this,Wt)):e;if(n instanceof re)return m(this,I).onError?.(n),n;let r=n instanceof z?`Season selection unavailable (${n.code}).`:"Season selection could not be completed.";return x(this,w,K).call(this,{kind:"failed",message:r,operationId:t}),m(this,I).onError?.(n),n},Ir=function(){if(m(this,Me))throw new Error("seatlayer: SeasonPicker was destroyed")},jt=function(){if(x(this,w,Ir).call(this),!m(this,ie)||!m(this,ae))throw new Error("seatlayer: render SeasonPicker before using it")};function tc(i,e={}){let t=e.origin??"";if(!t)try{t=new URL(i.src,window.location.href).origin}catch{t=""}let n=!1,r=null,s=null,o=null,a="",l=null,c="",d=()=>{if(n)return;n=!0,r=i.getAttribute("style"),Object.assign(i.style,{position:"fixed",inset:"0",margin:"0",border:"0",zIndex:"2147483000",background:c||"transparent"}),i.style.width="100vw",i.style.height="100vh",i.style.width="100dvw",i.style.height="100dvh";let h=document.documentElement;s=h.style.overflow,h.style.overflow="hidden",document.body&&(o=document.body.style.overflow,document.body.style.overflow="hidden"),l=g=>{g.key==="Escape"&&p()},window.addEventListener("keydown",l)},p=()=>{n&&(n=!1,r===null?i.removeAttribute("style"):i.setAttribute("style",r),r=null,a&&(i.style.height=a),s!==null&&(document.documentElement.style.overflow=s,s=null),o!==null&&document.body&&(document.body.style.overflow=o,o=null),l&&(window.removeEventListener("keydown",l),l=null))},u=h=>{if(h.source!==i.contentWindow||t&&h.origin!==t||!h.data||typeof h.data!="object")return;let g=h.data;if(g.type==="seatlayer:height"){typeof g.px=="number"&&Number.isFinite(g.px)&&g.px>0&&(a=`${Math.round(g.px)}px`,n||(i.style.height=a));return}g.type==="seatlayer:fullscreen"&&(typeof g.background=="string"&&/^[#a-zA-Z0-9(),.%\s-]{1,64}$/.test(g.background)&&(c=g.background,n&&(i.style.background=c)),g.on===!0?d():g.on===!1&&p())};return window.addEventListener("message",u),()=>{window.removeEventListener("message",u),p()}}0&&(module.exports={ApiError,BuyerAccessContext,BuyerAccessUnavailableError,BuyerRealtimeClient,EmbeddedDesigner,PerformanceGroupDestroyedError,PerformanceGroupPicker,SEATING_CHART_CALLBACK_PROPS,SEATING_CHART_HANDLE_METHODS,SEATING_CHART_IDENTITY_PROPS,SEATING_CHART_VALUE_PROPS,SeasonApiError,SeasonPicker,SeasonPublicSessionRefused,SeasonRecoveryTimeoutError,SeatPicker,SeatingChart,attachPickerFrame,bindSeatingChartHandle,buildSeatingChartOptions,createBuyerAccessContext,createControllerSink,parseTicketOfferAvailability,shortOperationReference,ticketOfferPrices});
2997
+ `,document.head.appendChild(i)}var Yp=new Set(["audience_not_public","sales_not_open","origin_not_allowed"]),Xp=3e4;function Zp(i,e){if(!i||typeof i!="object"||Array.isArray(i))return!1;let t=i;return typeof t.token=="string"&&t.token.length>0&&typeof t.expiresAt=="number"&&Number.isFinite(t.expiresAt)&&t.expiresAt>Date.now()&&t.seasonKey===e&&Array.isArray(t.planActivationIds)&&t.planActivationIds.every(n=>typeof n=="string"&&!!n)}var pi=class extends Error{constructor(t,n){super(`season_public_session_refused:${t}`);this.reason=t;this.status=n;this.name="SeasonPublicSessionRefused"}},Oe,Ke,hi,Ft,go=class{constructor(e){this.options=e;L(this,Oe,null);L(this,Ke,null);L(this,hi);L(this,Ft);T(this,hi,e.fetch??globalThis.fetch.bind(globalThis)),T(this,Ft,e.origin??(typeof location>"u"?void 0:location.origin))}get session(){return m(this,Oe)}async mint(e=!1){if(e&&T(this,Oe,null),m(this,Oe)&&m(this,Oe).expiresAt-Xp>Date.now())return m(this,Oe);if(m(this,Ke))return m(this,Ke);let t=(async()=>{let n=await m(this,hi).call(this,`${this.options.base}/pub/seasons/${encodeURIComponent(this.options.season)}/sessions`,{method:"POST",body:JSON.stringify(m(this,Ft)?{origin:m(this,Ft)}:{}),credentials:"omit"}),o=await n.json().catch(()=>null);if(!n.ok){let r=o?.code??o?.error;if(n.status===403&&r&&Yp.has(r)){let s=r;throw this.options.onRefused?.({reason:s,code:r,status:n.status,retryable:s==="sales_not_open"}),new pi(s,n.status)}throw new Error(`season_public_session_failed_${n.status}`)}if(!Zp(o,this.options.season))throw new Error("season_public_session_invalid");return T(this,Oe,o),o})();T(this,Ke,t);try{return await t}finally{m(this,Ke)===t&&T(this,Ke,null)}}async token(e){let t=e==="expiring"||e==="expired"||e==="unauthorized"||e==="manual",n=await this.mint(t);return{token:n.token,expiresAt:n.expiresAt}}};Oe=new WeakMap,Ke=new WeakMap,hi=new WeakMap,Ft=new WeakMap;function Rl(i){let e=new go(i);return{access:new ue({provider:({reason:n})=>e.token(n),...i.accessHooks}),loader:e}}var Qp="https://api.seatlayer.io",Jp=6e4,eh=5e3,z=class extends Error{constructor(t,n){super(`season_request_failed:${t}`);this.code=t;this.status=n;this.name="SeasonApiError"}},mi=class extends Error{constructor(t){super(`season_operation_timeout:${t}`);this.operationId=t;this.name="SeasonRecoveryTimeoutError"}};function th(i,e){let t=Number(i.headers.get("Retry-After")),n=Number.isFinite(t)&&t>=0?t:e.retryAfterSeconds;return Math.max(0,Math.min(eh,n*1e3))}function ih(i,e){return e?.aborted?Promise.reject(e.reason??new DOMException("Aborted","AbortError")):new Promise((t,n)=>{let o=setTimeout(t,i);e?.addEventListener("abort",()=>{clearTimeout(o),n(e.reason??new DOMException("Aborted","AbortError"))},{once:!0})})}function Il(i){if(!i||typeof i!="object")return"unknown";let e=i;return typeof e.code=="string"?e.code:typeof e.error=="string"?e.error:"unknown"}var nh=/^shc_[a-f0-9]{40}$/,oh=/^shh_[a-f0-9]{40}$/,rh=new Set(["preparing","commit_pending","committed","expire_pending","booking_pending","abort_pending","aborted","partial_terminal","expired","booked"]),sh=new Set(["pending","prepared","refused","applied","expired","booked","aborted"]);function bo(i){return Array.isArray(i)?i.some(bo):!i||typeof i!="object"?!1:Object.entries(i).some(([e,t])=>e==="childHoldId"||e==="child_hold_id"||e==="holdId"&&typeof t=="string"&&nh.test(t)||bo(t))}function ui(i,e,t="invalid_operation_response"){if(!i||typeof i!="object"||Array.isArray(i))throw new z(t,502);if(bo(i))throw new z("unsafe_operation_response",502);let n=i,o=n.allocations,r=new Set,s=Array.isArray(o)&&o.length>0&&o.every(p=>{if(!p||typeof p!="object")return!1;let u=p.eventId,h=p.state;return typeof u!="string"||!u||typeof h!="string"||!sh.has(h)||r.has(u)?!1:(r.add(u),!0)}),a=n.bookingRef===null||typeof n.bookingRef=="string"&&n.bookingRef.length>0,l=n.state!=="booked"||typeof n.bookingRef=="string"&&s&&o.every(p=>p.state==="booked"),c=n.state!=="booking_pending"||typeof n.bookingRef=="string"&&s&&o.some(p=>p.state!=="booked"),d=n.state!=="committed"||n.bookingRef===null;if(n.operationId!==e.operationId||n.seasonId!==e.seasonId||n.kind!=="HOLD"||typeof n.holdId!="string"||!oh.test(n.holdId)||n.policy!=="fixed_inclusion_same_seat"||typeof n.state!="string"||!rh.has(n.state)||typeof n.expiresAt!="number"||!Number.isFinite(n.expiresAt)||n.expiresAt<0||!a||typeof n.location!="string"||!n.location||typeof n.retryAfterSeconds!="number"||!Number.isFinite(n.retryAfterSeconds)||n.retryAfterSeconds<0||!s||!l||!c||!d||n.pricingAuthority!==void 0&&n.pricingAuthority!=="host"||n.authoritativeAmountIncluded!==void 0&&n.authoritativeAmountIncluded!==!1)throw new z(t,502);return{operationId:n.operationId,seasonId:n.seasonId,kind:n.kind,holdId:n.holdId,expiresAt:n.expiresAt,policy:n.policy,pricingAuthority:"host",authoritativeAmountIncluded:!1,state:n.state,bookingRef:n.bookingRef,location:n.location,retryAfterSeconds:n.retryAfterSeconds,allocations:o.map(p=>({eventId:p.eventId,state:p.state}))}}function ah(i,e,t){if(!Array.isArray(i)||i.length!==t||i.some(s=>typeof s!="string"||!s)||new Set(i).size!==i.length||!Array.isArray(e)||e.length!==i.length)throw new z("invalid_best_available_response",502);let n=i,o=new Set(n),r=new Map;for(let s of e){if(!s||typeof s!="object")throw new z("invalid_best_available_response",502);let a=s;if(typeof a.label!="string"||!o.has(a.label)||r.has(a.label)||typeof a.objectId!="string"||!a.objectId||a.objectType!=="seat"||typeof a.categoryKey!="string"||!a.categoryKey||a.tierId!==null&&(typeof a.tierId!="string"||!a.tierId)||a.quantity!==void 0&&a.quantity!==1)throw new z("invalid_best_available_response",502);r.set(a.label,{label:a.label,objectId:a.objectId,objectType:"seat",categoryKey:a.categoryKey,tierId:a.tierId,...a.quantity===void 0?{}:{quantity:a.quantity}})}return{labels:n,items:n.map(s=>r.get(s))}}function lh(i){if(!i||typeof i!="object"||Array.isArray(i))return null;let e=i;if(typeof e.currency!="string"||!e.currency||!Array.isArray(e.packages))return null;let t=[];for(let n of e.packages){if(!n||typeof n!="object")continue;let o=n;if(typeof o.planKey!="string"||!o.planKey||!Array.isArray(o.prices))continue;let r=[],s=new Set;for(let a of o.prices){if(!a||typeof a!="object")continue;let l=a;typeof l.categoryKey!="string"||!l.categoryKey||s.has(l.categoryKey)||typeof l.unitPrice!="number"||!Number.isInteger(l.unitPrice)||l.unitPrice<0||(s.add(l.categoryKey),r.push({categoryKey:l.categoryKey,unitPrice:l.unitPrice}))}r.length&&t.push({planKey:o.planKey,name:typeof o.name=="string"&&o.name?o.name:o.planKey,prices:r})}return t.length?{currency:e.currency,packages:t}:null}function ch(i){if(!i||typeof i!="object"||Array.isArray(i))throw new z("invalid_checkout_response",502);let e=i,t=typeof e.redirectUrl=="string"&&!!e.redirectUrl,n=!!e.clientPayload&&typeof e.clientPayload=="object"&&!Array.isArray(e.clientPayload);if(typeof e.orderId!="string"||!e.orderId||typeof e.currency!="string"||!e.currency||typeof e.totalMinor!="number"||!Number.isFinite(e.totalMinor)||typeof e.expiresAt!="number"||!Number.isFinite(e.expiresAt)||t===n)throw new z("invalid_checkout_response",502);return{orderId:e.orderId,totalMinor:e.totalMinor,currency:e.currency,expiresAt:e.expiresAt,...t?{redirectUrl:e.redirectUrl}:{},...n?{clientPayload:e.clientPayload}:{}}}function Ol(i,e){return{seasonKey:i.key,planActivationId:i.planActivationId,operationId:e.operationId,holdId:e.holdId,expiresAt:e.expiresAt,policy:e.policy,pricingAuthority:"host",authoritativeAmountIncluded:!1,state:e.state,allocations:e.allocations.map(({eventId:t,state:n})=>({eventKey:t,state:n}))}}var xe,at,Ce,lt,fi,Ae,Pe,ae,ye,_l,En=class{constructor(e,t){L(this,ae);L(this,xe);L(this,at);L(this,Ce);L(this,lt);L(this,fi);L(this,Ae,!1);L(this,Pe,null);T(this,xe,e),T(this,at,(t.apiBase??Qp).replace(/\/$/,"")),T(this,Ce,t.access),T(this,lt,t.fetch??globalThis.fetch.bind(globalThis)),T(this,fi,t.recoveryTimeoutMs??Jp),m(this,Ce).onRenewed(n=>x(this,ae,_l).call(this,n))}async descriptor(){let{body:e}=await x(this,ae,ye).call(this,"GET","");return e.season}async chart(){let{body:e}=await x(this,ae,ye).call(this,"GET","/chart");return e}async availability(){let{body:e}=await x(this,ae,ye).call(this,"GET","/availability"),t=Object.values(e.seats??{});return{...e,freeCount:t.filter(n=>n==="free").length,blockedCount:t.filter(n=>n!=="free").length}}async hold(e,t){let{body:n,response:o}=await x(this,ae,ye).call(this,"POST","/holds",{operationId:t,labels:[...e]});return{operation:ui(n.operation,{seasonId:m(this,xe),operationId:t}),response:o}}async bestAvailable(e){let{body:t,response:n}=await x(this,ae,ye).call(this,"POST","/best-available",{operationId:e.operationId,qty:e.qty,...e.categoryKey?{categoryKey:e.categoryKey}:{},...e.zoneId?{zoneId:e.zoneId}:{},...e.accessibility?.length?{accessibility:[...e.accessibility]}:{},...e.requireContiguous===!0?{requireContiguous:!0}:{}}),o=ui(t.operation,{seasonId:m(this,xe),operationId:e.operationId},"invalid_best_available_response"),{labels:r,items:s}=ah(t.labels,t.items,e.qty);return{operation:o,labels:r,items:s,response:n}}async operation(e){let{body:t,response:n}=await x(this,ae,ye).call(this,"GET",`/operations/${encodeURIComponent(e)}`);return{operation:ui(t.operation,{seasonId:m(this,xe),operationId:e}),response:n}}async release(e,t){let{body:n,response:o}=await x(this,ae,ye).call(this,"POST",`/holds/${encodeURIComponent(e)}/release`,{releaseActionId:t});return{operation:ui(n.operation,{seasonId:m(this,xe),operationId:e}),response:o}}async prices(){let e;try{({body:e}=await x(this,ae,ye).call(this,"GET","/prices"))}catch(t){if(t instanceof z&&t.status===404)return null;throw t}return lh(e)}async checkout(e){let{body:t}=await x(this,ae,ye).call(this,"POST","/checkout",{operationId:e.operationId,buyerEmail:e.buyerEmail,...e.buyerName?{buyerName:e.buyerName}:{},...e.provider?{provider:e.provider}:{},...e.returnUrl?{returnUrl:e.returnUrl}:{}});return ch(t)}async orderStatus(e){let t=await m(this,lt).call(this,`${m(this,at)}/pub/orders/${encodeURIComponent(e)}/status`,{method:"GET",credentials:"omit"}),n=await t.json().catch(()=>null);if(!t.ok)throw new z(Il(n),t.status);if(n===null)throw new z("invalid_json_response",502);return n}async renewalIntent(e){let{body:t}=await x(this,ae,ye).call(this,"POST","/renewal-intents",{offerId:e}),n=t.intent;if(!n||n.offerId!==e||n.state!=="intent_received"||!n.intentId||!Number.isFinite(n.receivedAt))throw new z("invalid_renewal_intent_response",502);return n}async waitForTerminal(e,t,n){let o=Date.now(),r=t?{operation:ui(t.operation,{seasonId:m(this,xe),operationId:e}),response:t.response}:await this.operation(e);for(;r.operation.state==="preparing"||r.operation.state==="commit_pending"||r.operation.state==="expire_pending"||r.operation.state==="booking_pending"||r.operation.state==="abort_pending";){if(Date.now()-o>=m(this,fi))throw new mi(e);await ih(th(r.response,r.operation),n),r=await this.operation(e)}return r.operation}destroy(){m(this,Ae)||(T(this,Ae,!0),m(this,Ce).onRenewed(void 0),m(this,Ce).clear())}};xe=new WeakMap,at=new WeakMap,Ce=new WeakMap,lt=new WeakMap,fi=new WeakMap,Ae=new WeakMap,Pe=new WeakMap,ae=new WeakSet,ye=async function(e,t,n,o=!0){if(m(this,Ae))throw new z("season_api_destroyed",409);if(m(this,Pe))throw m(this,Pe);let r=await m(this,Ce).authorization();if(m(this,Ae))throw new z("season_api_destroyed",409);if(m(this,Pe))throw m(this,Pe);if(!r)throw new re({reason:"no_token",retryable:!1});let s=await m(this,lt).call(this,`${m(this,at)}/pub/seasons/${encodeURIComponent(m(this,xe))}${t}`,{method:e,headers:{Authorization:r,...n===void 0?{}:{"Content-Type":"application/json"}},body:n===void 0?void 0:JSON.stringify(n)}),a=await s.json().catch(()=>null);if(!s.ok){let l=Il(a);if(o&&await m(this,Ce).handleFailure(s.status,l))return x(this,ae,ye).call(this,e,t,n,!1);let c=m(this,Ce).unavailable;throw c?new re(c):new z(l,s.status)}if(a===null)throw new z("invalid_json_response",502);return{body:a,response:s}},_l=async function(e){if(m(this,Ae))return;let t=`/pub/seasons/${encodeURIComponent(m(this,xe))}/session/adopt`;for(let n=0;n<2;n++){if(m(this,Ae))return;try{if((await m(this,lt).call(this,`${m(this,at)}${t}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.token}`},body:JSON.stringify({previousToken:e.previousToken}),credentials:"omit"})).ok){T(this,Pe,null);return}}catch{}}if(!m(this,Ae))throw T(this,Pe,new z("season_session_adopt_failed",409)),m(this,Pe)};var dh=2500;function ph(i){let e=typeof i=="string"?document.querySelector(i):i;if(!e)throw new Error("seatlayer: Season picker container was not found");return e}function hh(i,e,t){if(i.startsAt==null)return{date:"Date to be announced",time:null};try{let n=new Date(i.startsAt),o=e?{timeZone:e}:{};return{date:new Intl.DateTimeFormat(t,{dateStyle:"medium",...o}).format(n),time:new Intl.DateTimeFormat(t,{timeStyle:"short",...o}).format(n)}}catch{return{date:"Date to be announced",time:null}}}function Nl(i){return i.state==="committed"||i.state==="booked"}var yo=class{constructor(e,t,n){this.transport=e;this.sink=t;this.intervalMs=n;this.timer=null;this.stopped=!0;this.prior={}}start(){this.stopped&&(this.stopped=!1,this.timer=setTimeout(()=>{this.tick()},this.intervalMs))}stop(){this.stopped=!0,this.timer&&clearTimeout(this.timer),this.timer=null}async tick(){if(!this.stopped)try{let e=await this.transport.objects(""),t=Object.entries(e.seats).filter(([n,o])=>this.prior[n]!==o).map(([n,o])=>({label:n,status:o}));this.prior={...e.seats},t.length&&this.sink.applyStatuses(t)}catch{this.stopped||await this.sink.resync()}finally{this.stopped||(this.timer=setTimeout(()=>{this.tick()},this.intervalMs))}}},vo=class{constructor(e,t){this.api=e;this.realtimePollMs=t;this.descriptorValue=null;this.availabilityValue=null;this.categoryLabels=new Map;this.reuseAvailabilityOnce=!1;this.nextOperationId=null;this.nextBestAvailable=null;this.nextReleaseActionId=null;this.operationByHold=new Map}prime(e,t){this.descriptorValue=e,this.availabilityValue=t,this.reuseAvailabilityOnce=!0}queueOperation(e){this.nextOperationId=e}queueBestAvailable(e,t){if(this.nextBestAvailable)throw new z("season_best_available_in_progress",409);let n={operationId:e,...t.accessibility?.length?{accessibility:[...t.accessibility]}:{},...t.requireContiguous===!0?{requireContiguous:!0}:{}};return this.nextBestAvailable=n,n}clearBestAvailable(e){this.nextBestAvailable===e&&(this.nextBestAvailable=null)}queueRelease(e){this.nextReleaseActionId=e}operationForHold(e){return this.operationByHold.get(e)??null}remember(e){this.operationByHold.set(e.holdId,e)}forget(e){this.operationByHold.delete(e)}async chart(e){let[t,n]=await Promise.all([this.descriptorValue?Promise.resolve(this.descriptorValue):this.api.descriptor(),this.api.chart()]);this.descriptorValue=t;for(let o of n.categories??[])typeof o?.key=="string"&&typeof o.label=="string"&&this.categoryLabels.set(o.key,o.label);return{doc:n,event:{key:t.key,name:t.name,venue:t.venue,startsAt:t.occurrences[0]?.startsAt??null,timezone:t.timezone,currency:t.currency,mode:t.mode,inventoryModelVersion:2}}}async objects(e){let t;return this.reuseAvailabilityOnce&&this.availabilityValue?(this.reuseAvailabilityOnce=!1,t=this.availabilityValue):(t=await this.api.availability(),this.availabilityValue=t),{seats:{...t.seats}}}async hold(e,t,n,o){if(o)throw new z("season_hold_replace_unsupported",409);let r=this.nextOperationId??`sop_${crypto.randomUUID()}`;this.nextOperationId=null;let s=await this.api.hold(t.map(l=>l.label),r),a=await this.api.waitForTerminal(r,s);if(!Nl(a))throw new z(`season_operation_${a.state}`,409);return this.remember(a),{holdId:a.holdId,expiresAt:a.expiresAt,items:t.map(l=>({label:l.label,objectId:l.label,objectType:"seat",categoryKey:"",tierId:l.tierId??null,unitPrice:0,currency:this.descriptorValue?.currency??"USD",...l.quantity==null?{}:{quantity:l.quantity}}))}}async release(e,t,n){let o=this.operationForHold(n);if(!o)throw new z("season_hold_not_found",404);let r=this.nextReleaseActionId??`sra_${crypto.randomUUID()}`;this.nextReleaseActionId=null;let s=await this.api.release(o.operationId,r),a=await this.api.waitForTerminal(o.operationId,s);if(a.state==="partial_terminal")throw this.remember(a),new z("season_operation_partial_terminal",409);this.forget(n)}async bestAvailable(e,t,n,o){let r=this.nextBestAvailable;this.nextBestAvailable=null;let s=r?.operationId??`sop_${crypto.randomUUID()}`,a=await this.api.bestAvailable({operationId:s,qty:t,...n?{categoryKey:n}:{},...o?{zoneId:o}:{},...r?.accessibility?.length?{accessibility:r.accessibility}:{},...r?.requireContiguous===!0?{requireContiguous:!0}:{}}),l=await this.api.waitForTerminal(s,a);if(!Nl(l))throw new z(`season_operation_${l.state}`,409);this.remember(l);let c=new Map(a.items.map(d=>[d.label,d]));return{holdId:l.holdId,expiresAt:l.expiresAt,labels:[...a.labels],items:a.labels.map(d=>{let p=c.get(d);return{label:d,objectId:p?.objectId??d,objectType:"seat",categoryKey:p?.categoryKey??n??"",tierId:p?.tierId??null,unitPrice:0,currency:this.descriptorValue?.currency??"USD",...p?.quantity==null?{}:{quantity:p.quantity}}})}}categoryLabel(e){return this.categoryLabels.get(e)??e}socketUrl(){return""}createRealtime(e,t){return new yo(this,t,this.realtimePollMs)}},O,pt,$t,me,te,bi,ie,Ne,K,le,Se,zt,We,De,ht,ve,yi,Me,jt,Gt,ut,Ut,Ye,mt,ft,qt,w,Dl,Bl,wo,xo,So,ko,Cn,ct,Fl,Vl,_e,gi,$l,zl,To,Eo,jl,Gl,Ul,Co,Ao,q,dt,Po,Vt,An=class{constructor(e){L(this,w);L(this,O);L(this,pt);L(this,$t);L(this,me);L(this,te);L(this,bi,new AbortController);L(this,ie,null);L(this,Ne,null);L(this,K,null);L(this,le,null);L(this,Se,null);L(this,zt,null);L(this,We,null);L(this,De,null);L(this,ht,null);L(this,ve,[]);L(this,yi,new Map);L(this,Me,!1);L(this,jt,!1);L(this,Gt);L(this,ut,null);L(this,Ut,null);L(this,Ye,null);L(this,mt,"handoff");L(this,ft,null);L(this,qt,!1);if(!e?.season)throw new Error("seatlayer: `season` key is required");if(!e.container)throw new Error("seatlayer: `container` is required");if("event"in e||"performanceGroup"in e)throw new Error("seatlayer: SeasonPicker is not SeatPicker or PerformanceGroupPicker");T(this,O,e),T(this,pt,ph(e.container));let t={onExpired:o=>e.onAccessExpired?.(o),onUnavailable:o=>{let r=m(this,ut)&&o.reason==="provider_failed"?m(this,ut):o;T(this,ut,null),T(this,Ut,r.reason==="provider_failed"?null:r),e.onAccessUnavailable?.(r),x(this,w,jl).call(this,r)}};if(!e.buyerAccessToken&&!e.buyerAccessTokenProvider){let{access:o,loader:r}=Rl({base:(e.apiBase??"https://api.seatlayer.io").replace(/\/$/,""),season:e.season,fetch:e.fetch,onRefused:s=>{T(this,ut,s)},accessHooks:t});T(this,$t,o),T(this,Gt,r)}else T(this,Gt,null),T(this,$t,new ue({token:e.buyerAccessToken,provider:e.buyerAccessTokenProvider,...t}));T(this,me,new En(e.season,{apiBase:e.apiBase,access:m(this,$t),fetch:e.fetch,recoveryTimeoutMs:e.recoveryTimeoutMs})),T(this,te,new vo(m(this,me),Math.max(750,e.realtimePollMs??dh)))}async render(){x(this,w,Po).call(this),Hl(),x(this,w,Bl).call(this),x(this,w,q).call(this,{kind:"loading",message:"Loading Season seats available for every performance."},!0);try{let[e,t,n]=await Promise.all([m(this,me).descriptor(),m(this,me).availability(),m(this,me).prices().catch(()=>null)]);return m(this,Me)?this:(T(this,ie,e),T(this,Ne,t),T(this,Ye,n),T(this,mt,m(this,O).checkout==="hosted"&&e.checkoutMode!=="server"&&n?"hosted":"handoff"),m(this,te).prime(e,t),x(this,w,wo).call(this),await x(this,w,Dl).call(this,e),m(this,Me)?this:(n&&x(this,w,wo).call(this),x(this,w,Ul).call(this),x(this,w,q).call(this,{kind:"ready",message:`${t.freeCount} seat${t.freeCount===1?"":"s"} available for every included performance.`}),m(this,O).initialOperationId&&await this.restoreOperation(m(this,O).initialOperationId),this))}catch(e){if(m(this,Me))return this;throw x(this,w,dt).call(this,e)}}async holdSameSeat(e,t){if(x(this,w,Vt).call(this),!t.startsWith("sop_"))throw new Error("seatlayer: caller-stable Season operation id is required");if(!e.length)throw new Error("seatlayer: select at least one seat");if(m(this,te).queueOperation(t),m(this,le).selectObjectsWithoutConfirmation([...e]),x(this,w,q).call(this,{kind:"pending",message:"Holding the same seats for every performance.",operationId:t},!0),await m(this,le).handleCta(),!m(this,K))throw new z("season_hold_not_created",409);return m(this,K)}async holdBestAvailable(e,t,n={}){if(x(this,w,Vt).call(this),!t.startsWith("sop_"))throw new Error("seatlayer: caller-stable Season operation id is required");if(!Number.isInteger(e)||e<1)throw new Error("seatlayer: positive Best Available quantity is required");let o=m(this,le).maxTickets;if(e>o)throw new Error(`seatlayer: Best Available quantity cannot exceed the configured maximum (${o})`);if(m(this,jt))throw new z("season_best_available_in_progress",409);T(this,jt,!0);let r=null;try{if(r=m(this,te).queueBestAvailable(t,n),x(this,w,q).call(this,{kind:"pending",message:`Finding ${e} Season seat${e===1?"":"s"} available for every performance.`,operationId:t},!0),!await m(this,le).bestAvailableOrThrow(e,n.categoryKey,{zoneId:n.zoneId})||!m(this,K))throw new z("season_hold_not_created",409);return m(this,K)}catch(s){throw x(this,w,dt).call(this,s,t)}finally{r&&m(this,te).clearBestAvailable(r),T(this,jt,!1)}}async restoreOperation(e){x(this,w,Vt).call(this),x(this,w,q).call(this,{kind:"pending",message:"Restoring your Season selection.",operationId:e},!0);try{let t=await m(this,me).waitForTerminal(e,void 0,m(this,bi).signal);return t.state==="aborted"||t.state==="expired"?(T(this,K,null),m(this,O).onHoldChange?.(null),x(this,w,q).call(this,{kind:"released",message:"The previous Season selection is no longer held.",operationId:e}),null):(m(this,te).remember(t),x(this,w,ko).call(this,t,!1))}catch(t){throw x(this,w,dt).call(this,t,e)}}async release(e){x(this,w,Vt).call(this);let t=m(this,K);if(t){if(!e)throw new Error("seatlayer: caller-stable release action id is required");m(this,te).queueRelease(e),x(this,w,q).call(this,{kind:"pending",message:"Releasing the Season seats.",operationId:t.operationId},!0);try{m(this,le)?.getCurrentHold()?.holdId===t.holdId?await m(this,le).release():(await m(this,te).release("",[],t.holdId),x(this,w,Cn).call(this)),x(this,w,q).call(this,{kind:"released",message:"The Season seats were released.",operationId:t.operationId})}catch(n){throw x(this,w,dt).call(this,n,t.operationId)}}}async createRenewalIntent(e){if(x(this,w,Vt).call(this),!e.startsWith("sro_"))throw new Error("seatlayer: Season renewal offer id is required");x(this,w,q).call(this,{kind:"pending",message:"Recording renewal intent. No purchase is made in the browser."},!0);try{let t=await m(this,me).renewalIntent(e);return x(this,w,q).call(this,{kind:"renewal_intent",message:"Renewal intent recorded. Your ticketing platform will confirm price, payment, and renewal."}),m(this,O).onRenewalIntent?.(t),t}catch(t){throw x(this,w,dt).call(this,t)}}getDescriptor(){return m(this,ie)}getAvailability(){return m(this,Ne)}getHandoff(){return m(this,K)}destroy(){m(this,Me)||(T(this,Me,!0),m(this,bi).abort(),x(this,w,Ao).call(this),m(this,le)?.destroy(),m(this,me).destroy(),m(this,pt).replaceChildren(),T(this,Se,null),T(this,zt,null),T(this,We,null),T(this,De,null),T(this,ht,null),T(this,ie,null),T(this,Ne,null),T(this,K,null))}};O=new WeakMap,pt=new WeakMap,$t=new WeakMap,me=new WeakMap,te=new WeakMap,bi=new WeakMap,ie=new WeakMap,Ne=new WeakMap,K=new WeakMap,le=new WeakMap,Se=new WeakMap,zt=new WeakMap,We=new WeakMap,De=new WeakMap,ht=new WeakMap,ve=new WeakMap,yi=new WeakMap,Me=new WeakMap,jt=new WeakMap,Gt=new WeakMap,ut=new WeakMap,Ut=new WeakMap,Ye=new WeakMap,mt=new WeakMap,ft=new WeakMap,qt=new WeakMap,w=new WeakSet,Dl=async function(e){let t=new Ue(wn({container:m(this,zt),event:e.key,apiBase:m(this,O).apiBase,transport:m(this,te),hideEventDetails:!0,maxSelection:m(this,O).maxSelection,selectedObjects:m(this,O).selectedObjects,selectableObjects:m(this,O).selectableObjects,numberOfPlacesToSelect:m(this,O).numberOfPlacesToSelect,selectionValidators:m(this,O).selectionValidators,locale:m(this,O).locale,messages:m(this,O).messages,languages:m(this,O).languages,colorblindSafe:m(this,O).colorblindSafe,initialView:m(this,O).initialView,enable3D:m(this,O).enable3D,max3DSeats:m(this,O).max3DSeats,hideBadge:m(this,O).hideBadge,theme:m(this,O).theme,confirmSelection:m(this,O).confirmSelection,seatView:m(this,O).seatView,onBuyerViewChange:m(this,O).onBuyerViewChange,onAnalytics:(n,o)=>{try{m(this,O).onAnalytics?.(n,{...o,metricScope:"season",seasonKey:e.key,planActivationId:e.planActivationId,performanceCount:e.occurrenceCount})}catch{}},onSelectionChange:n=>{T(this,ve,n.map(o=>o.label)),T(this,yi,new Map(n.filter(o=>!!o.categoryKey).map(o=>[o.label,o.categoryKey]))),x(this,w,ct).call(this),m(this,O).onSelectionChange?.(n)},onSelectionValidityChange:m(this,O).onSelectionValidityChange,onHoldChange:n=>{if(!n){x(this,w,Cn).call(this);return}let o=m(this,te).operationForHold(n.holdId);o&&x(this,w,ko).call(this,o,!0)},onCheckout:()=>{m(this,K)&&(x(this,w,_e).call(this,"checkout"),m(this,O).onContinue?.(m(this,K)),m(this,mt)==="hosted"&&x(this,w,Gl).call(this,m(this,K)))},onHoldExpired:()=>{x(this,w,Cn).call(this),x(this,w,q).call(this,{kind:"released",message:"The Season hold expired. Choose seats again."}),m(this,O).onHoldExpired?.()},onError:n=>x(this,w,dt).call(this,n)},{surface:"season",performanceCount:e.occurrenceCount,selectionMode:"same_seat",suppressPricing:!0,groupSelectionSummary:()=>{let n=m(this,ve).length;return n?{seats:n,performances:e.occurrenceCount,performancesChosen:e.occurrenceCount,perPerformance:n}:null}}));T(this,le,t),await t.render()},Bl=function(){m(this,pt).replaceChildren();let e=document.createElement("section");e.className="sl-season-root",e.setAttribute("aria-label","Season ticket selection");let t=document.createElement("header");t.className="sl-season-hero";let n=document.createElement("ol");n.className="sl-season-progress",n.setAttribute("aria-label","Season checkout progress");for(let[b,k]of["Choose seats","Review package","Checkout"].entries()){let S=document.createElement("li");S.dataset.state=b===0?"current":"upcoming";let v=document.createElement("span");v.textContent=String(b+1),S.append(v,k),n.append(S)}let o=document.createElement("div");o.className="sl-season-stage";let r=document.createElement("div");r.className="sl-season-map";let s=document.createElement("aside");s.className="sl-season-summary-card",s.setAttribute("aria-label","Your Season selection");let a=document.createElement("h3");a.textContent="Your Season seats";let l=document.createElement("p");l.className="sl-season-selection",l.textContent="Choose a seat on the map.";let c=document.createElement("p");c.className="sl-season-rule";let d=document.createElement("i");d.textContent="1\xD7";let p=document.createElement("span");p.textContent="Each seat you choose is reserved for every included performance.",c.append(d,p);let u=document.createElement("p");u.className="sl-season-availability";let h=document.createElement("p");h.className="sl-season-checkout-note",h.textContent="Your ticketing platform confirms package price, payment, admission passes, and member benefits.",s.append(a,l,c,u,h),o.append(r,s);let f=document.createElement("p");f.className="sl-season-status",f.setAttribute("role","status"),f.setAttribute("aria-live","polite"),e.append(t,n,o,f),m(this,pt).append(e),T(this,Se,e),T(this,zt,r),T(this,We,f),T(this,De,l),T(this,ht,u)},wo=function(){let e=m(this,ie),t=m(this,O).offer,n=m(this,Se).querySelector(".sl-season-hero");n.replaceChildren();let o=document.createElement("div");o.className="sl-season-copy";let r=document.createElement("p");r.className="sl-season-eyebrow",r.textContent=t?.eyebrow??"Season ticket";let s=document.createElement("h2");s.textContent=e.edition?`${e.name} \xB7 ${e.edition}`:e.name;let a=document.createElement("p");a.className="sl-season-promise",a.textContent=`Choose once and keep the same seat for all ${e.occurrenceCount} included performances.`;let l=document.createElement("div");l.className="sl-season-facts";for(let h of[`${e.occurrenceCount} performances`,e.venue,t?.renewalLabel??"Same-seat package"].filter(Boolean)){let f=document.createElement("span");f.className="sl-season-fact",f.textContent=h,l.append(f)}o.append(r,s,a,l),n.append(o);let c=document.createElement("div");c.className="sl-season-offer";let d=document.createElement("span");d.className="sl-season-offer-label";let p=x(this,w,gi).call(this);if(p){d.textContent=g("season.packagePriceLabel","Package price"),c.append(d,x(this,w,zl).call(this,p,e.occurrenceCount));let h=document.createElement("span");h.className="sl-season-price-note",h.textContent=g("season.packagePricePerSeat","Per seat, for the whole package."),c.append(h),n.append(c),x(this,w,xo).call(this,n,t),x(this,w,So).call(this,n,e),x(this,w,ct).call(this);return}d.textContent=t?.priceLabel?"Season package":"Package price";let u=document.createElement(t?.priceLabel?"strong":"span");if(u.className=t?.priceLabel?"sl-season-price":"sl-season-price-note",u.textContent=t?.priceLabel??"Confirmed by your ticketing platform at checkout",c.append(d,u),t?.compareAtPriceLabel){let h=document.createElement("span");h.className="sl-season-was",h.textContent=t.compareAtPriceLabel,c.append(h)}if(t?.savingsLabel){let h=document.createElement("span");h.className="sl-season-saving",h.textContent=t.savingsLabel,c.append(h)}if(t?.priceNote){let h=document.createElement("span");h.className="sl-season-price-note",h.textContent=t.priceNote,c.append(h)}n.append(c),x(this,w,xo).call(this,n,t),x(this,w,So).call(this,n,e),x(this,w,ct).call(this)},xo=function(e,t){if(!t?.benefits?.length)return;let n=document.createElement("ul");n.className="sl-season-benefits";for(let o of t.benefits.slice(0,6)){let r=document.createElement("li");r.textContent=o,n.append(r)}e.append(n)},So=function(e,t){let n=document.createElement("details");n.className="sl-season-dates";let o=document.createElement("summary");o.textContent=`All ${t.occurrenceCount} performances included`;let r=document.createElement("ol");r.className="sl-season-date-list";for(let s of t.occurrences){let a=document.createElement("li");a.className="sl-season-date";let l=document.createElement("b");l.textContent=s.name;let c=hh(s,t.timezone,m(this,O).locale),d=document.createElement("time");s.startsAt!=null&&(d.dateTime=new Date(s.startsAt).toISOString()),d.textContent=c.time?`${c.date} \xB7 ${c.time}`:c.date,a.append(l,d),r.append(a)}n.append(o,r),e.append(n)},ko=function(e,t){if(e.state==="booked")return T(this,K,null),m(this,te).forget(e.holdId),m(this,le)?.notifyGroupSettled("booked"),x(this,w,_e).call(this,"complete"),x(this,w,q).call(this,{kind:"booked",message:`Your Season booking is complete for all ${m(this,ie).occurrenceCount} performances. No further checkout action is needed.`,operationId:e.operationId}),m(this,O).onHoldChange?.(null),null;if(e.state==="partial_terminal")return T(this,K,null),T(this,ve,[]),m(this,te).forget(e.holdId),m(this,le)?.notifyGroupSettled("lost"),x(this,w,ct).call(this),x(this,w,_e).call(this,"review"),x(this,w,q).call(this,{kind:"partial_terminal",message:"This Season selection needs organizer review. Do not try another selection.",operationId:e.operationId}),m(this,O).onHoldChange?.(null),null;if(e.state!=="committed")return T(this,K,null),m(this,te).forget(e.holdId),m(this,le)?.notifyGroupSettled("lost"),x(this,w,q).call(this,{kind:"failed",message:"The Season selection could not be completed.",operationId:e.operationId}),m(this,O).onHoldChange?.(null),null;let n=Ol(m(this,ie),e),o=m(this,K)?.holdId!==n.holdId;return T(this,K,n),x(this,w,ct).call(this),x(this,w,_e).call(this,"review"),m(this,O).onHoldChange?.(n),x(this,w,q).call(this,{kind:"held",message:`Your seats are held for all ${m(this,ie).occurrenceCount} performances. Review and continue to checkout.`,operationId:e.operationId}),o&&t&&m(this,O).onHold?.(n),n},Cn=function(){T(this,K,null),T(this,ve,[]),x(this,w,ct).call(this),x(this,w,_e).call(this,"choose"),m(this,O).onHoldChange?.(null)},ct=function(){if(!m(this,De))return;let e=m(this,ve).length;if(!e)m(this,De).textContent="Choose a seat on the map. Unavailable seats are already booked on at least one included performance.";else{m(this,De).replaceChildren();let t=document.createElement("strong");t.textContent=m(this,ve).join(", "),m(this,De).append(t,` \xB7 ${e} Season seat${e===1?"":"s"} across all ${m(this,ie)?.occurrenceCount??0} performances`)}m(this,ht)&&m(this,Ne)&&(m(this,ht).textContent=`${m(this,Ne).freeCount} seat${m(this,Ne).freeCount===1?"":"s"} currently available for the complete Season`),x(this,w,Fl).call(this),x(this,w,Vl).call(this)},Fl=function(){let e=m(this,Se)?.querySelector(".sl-season-summary-card");if(!e)return;e.querySelector(".sl-season-package-total")?.remove();let t=x(this,w,To).call(this);if(t==null)return;let n=m(this,Ye)?.currency??m(this,ie)?.currency??"USD",o=m(this,ie)?.occurrenceCount??0,r=document.createElement("p");r.className="sl-season-package-total";let s=document.createElement("span");s.textContent=g("season.packageTotal","Package total");let a=document.createElement("strong");a.textContent=x(this,w,Eo).call(this,t,n);let l=document.createElement("span");l.className="sl-season-package-total-scope",l.textContent=g("season.priceForAllDates","for all {count} dates").replace("{count}",String(o)),r.append(s,a,l);let c=e.querySelector(".sl-season-checkout-note");c?e.insertBefore(r,c):e.append(r)},Vl=function(){let e=m(this,Se)?.querySelector(".sl-season-checkout-note");if(e){if(m(this,mt)==="hosted"){e.textContent=g("season.hostedCheckoutNote","You pay for the whole package here. Your tickets for every performance arrive by email.");return}if(x(this,w,gi).call(this)){e.textContent=g("season.serverCheckoutPricedNote","Payment and admission passes are completed in the checkout on this page.");return}e.textContent="Your ticketing platform confirms package price, payment, admission passes, and member benefits."}},_e=function(e){let t=e==="choose"?0:e==="review"?1:e==="checkout"?2:3;m(this,Se)?.querySelectorAll(".sl-season-progress li").forEach((n,o)=>{n.dataset.state=o<t?"done":o===t?"current":"upcoming";let r=n.querySelector("span");r&&(r.textContent=o<t?"\u2713":String(o+1))})},gi=function(){let e=m(this,Ye)?.packages;if(!e?.length)return null;let t=m(this,ie)?.planActivationId,n=e.find(s=>s.planKey===t);if(n)return n;let o=m(this,Gt)?.session?.planActivationIds;return(o?.length?e.filter(s=>o.includes(s.planKey)):[])[0]??e[0]},$l=function(e){let t=x(this,w,gi).call(this)?.prices.find(n=>n.categoryKey===e);return t?t.unitPrice:null},zl=function(e,t){let n=document.createElement("ul");n.className="sl-season-price-lines";let o=m(this,Ye)?.currency??m(this,ie)?.currency??"USD";for(let r of e.prices){let s=document.createElement("li"),a=document.createElement("span");a.className="sl-season-price-category",a.textContent=m(this,te).categoryLabel(r.categoryKey);let l=document.createElement("strong");l.className="sl-season-price",l.textContent=x(this,w,Eo).call(this,r.unitPrice,o);let c=document.createElement("span");c.className="sl-season-price-scope",c.textContent=g("season.priceForAllDates","for all {count} dates").replace("{count}",String(t)),s.append(a,l,c),n.append(s)}return n},To=function(){if(!m(this,ve).length||!x(this,w,gi).call(this))return null;let e=0;for(let t of m(this,ve)){let n=m(this,yi).get(t),o=n?x(this,w,$l).call(this,n):null;if(o==null)return null;e+=o}return e},Eo=function(e,t){let n=(0,Kt.fromMinorUnits)(e,t),o=Number.isInteger(n);return(0,Kt.formatMoney)(n,t,{locale:m(this,O).locale,fallback:(r,s)=>`${r} ${s}`,...o?{minimumFractionDigits:0,maximumFractionDigits:0}:{}})},jl=function(e){let t=e.reason==="audience_not_public"?g("season.accessNotPublic","This season isn't open for online booking yet."):e.reason==="sales_not_open"?g("season.accessSalesNotOpen","Season tickets aren't on sale right now. Check back when sales open."):e.reason==="origin_not_allowed"?g("season.accessOriginNotAllowed","This season can't be booked from this page."):g("season.accessUnavailable","Season tickets can't be loaded right now. Please try again later.");x(this,w,q).call(this,{kind:"failed",message:t})},Gl=async function(e){if(!m(this,qt)){T(this,qt,!0);try{let t=m(this,Ye)?.currency??m(this,ie)?.currency??"USD",n=x(this,w,To).call(this);if(n==null){x(this,w,q).call(this,{kind:"failed",message:g("season.checkoutNotPriced","We can\u2019t price this package here. Your seats are still held \u2014 please continue in the checkout on this page."),operationId:e.operationId});return}await x(this,w,Co).call(this,{kind:"pay",provider:null,order:{holdId:e.operationId,expiresAt:e.expiresAt,currency:t,total:(0,Kt.fromMinorUnits)(n,t),labels:[...m(this,ve)]}})}finally{T(this,qt,!1)}}},Ul=function(){if(m(this,mt)!=="hosted")return;let e=xn(m(this,O).season);e?.outcome!=="success"||!e.orderId||(x(this,w,_e).call(this,"checkout"),x(this,w,Co).call(this,{kind:"resume",orderId:e.orderId}))},Co=async function(e){let t;try{({mountCheckout:t}=await Ci())}catch(o){m(this,O).onError?.(o),x(this,w,q).call(this,{kind:"failed",message:g("season.checkoutCouldNotBeOpened","Checkout could not be opened. Your seats are still held \u2014 please try again.")});return}let n=m(this,le)?.root;m(this,Me)||!n||(x(this,w,Ao).call(this),T(this,ft,t({root:n,state:e,eventKey:m(this,O).season,formatMoney:(o,r)=>(0,Kt.formatMoney)(o,r,{locale:m(this,O).locale,fallback:(s,a)=>`${s} ${a}`,...Number.isInteger(o)?{minimumFractionDigits:0,maximumFractionDigits:0}:{}}),startSession:o=>m(this,me).checkout({operationId:o.holdId,buyerEmail:o.buyerEmail,...o.buyerName?{buyerName:o.buyerName}:{},...m(this,O).returnUrl?{returnUrl:m(this,O).returnUrl}:{}}),orderStatus:o=>m(this,me).orderStatus(o),onCancel:()=>{T(this,ft,null),m(this,K)&&x(this,w,_e).call(this,"review")},onConfirmed:o=>{m(this,O).onOrderConfirmed?.(o),x(this,w,_e).call(this,"complete"),x(this,w,q).call(this,{kind:"booked",message:g("season.orderConfirmed","Your season tickets are confirmed for every included performance.")})},onError:o=>m(this,O).onError?.(o)})))},Ao=function(){m(this,ft)?.destroy(),T(this,ft,null)},q=function(e,t=!1){m(this,We)&&(m(this,We).textContent=e.message,m(this,We).dataset.kind=e.kind),m(this,Se)&&(m(this,Se).dataset.busy=String(t)),m(this,O).onStatusChange?.(e)},dt=function(e,t){let n=e instanceof re&&e.reason==="provider_failed"&&m(this,Ut)?new re(m(this,Ut)):e;if(n instanceof re)return m(this,O).onError?.(n),n;let o=n instanceof z?`Season selection unavailable (${n.code}).`:"Season selection could not be completed.";return x(this,w,q).call(this,{kind:"failed",message:o,operationId:t}),m(this,O).onError?.(n),n},Po=function(){if(m(this,Me))throw new Error("seatlayer: SeasonPicker was destroyed")},Vt=function(){if(x(this,w,Po).call(this),!m(this,ie)||!m(this,le))throw new Error("seatlayer: render SeasonPicker before using it")};function ql(i,e={}){let t=e.origin??"";if(!t)try{t=new URL(i.src,window.location.href).origin}catch{t=""}let n=!1,o=null,r=null,s=null,a="",l=null,c="",d=()=>{if(n)return;n=!0,o=i.getAttribute("style"),Object.assign(i.style,{position:"fixed",inset:"0",margin:"0",border:"0",zIndex:"2147483000",background:c||"transparent"}),i.style.width="100vw",i.style.height="100vh",i.style.width="100dvw",i.style.height="100dvh";let h=document.documentElement;r=h.style.overflow,h.style.overflow="hidden",document.body&&(s=document.body.style.overflow,document.body.style.overflow="hidden"),l=f=>{f.key==="Escape"&&p()},window.addEventListener("keydown",l)},p=()=>{n&&(n=!1,o===null?i.removeAttribute("style"):i.setAttribute("style",o),o=null,a&&(i.style.height=a),r!==null&&(document.documentElement.style.overflow=r,r=null),s!==null&&document.body&&(document.body.style.overflow=s,s=null),l&&(window.removeEventListener("keydown",l),l=null))},u=h=>{if(h.source!==i.contentWindow||t&&h.origin!==t||!h.data||typeof h.data!="object")return;let f=h.data;if(f.type==="seatlayer:height"){typeof f.px=="number"&&Number.isFinite(f.px)&&f.px>0&&(a=`${Math.round(f.px)}px`,n||(i.style.height=a));return}f.type==="seatlayer:fullscreen"&&(typeof f.background=="string"&&/^[#a-zA-Z0-9(),.%\s-]{1,64}$/.test(f.background)&&(c=f.background,n&&(i.style.background=c)),f.on===!0?d():f.on===!1&&p())};return window.addEventListener("message",u),()=>{window.removeEventListener("message",u),p()}}0&&(module.exports={ApiError,BuyerAccessContext,BuyerAccessUnavailableError,BuyerRealtimeClient,EmbeddedDesigner,PerformanceGroupDestroyedError,PerformanceGroupPicker,SEATING_CHART_CALLBACK_PROPS,SEATING_CHART_HANDLE_METHODS,SEATING_CHART_IDENTITY_PROPS,SEATING_CHART_VALUE_PROPS,SeasonApiError,SeasonPicker,SeasonPublicSessionRefused,SeasonRecoveryTimeoutError,SeatPicker,SeatingChart,attachPickerFrame,bindSeatingChartHandle,buildSeatingChartOptions,createBuyerAccessContext,createControllerSink,parseTicketOfferAvailability,shortOperationReference,ticketOfferPrices});