@seatlayer/js 0.74.0 → 0.75.2

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.js CHANGED
@@ -1,4 +1,82 @@
1
- import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESIJ3PK.js";import{a as f,b as I,c as T,d as C}from"./chunk-OSZ7DOEH.js";import{PickerController as ca,formatMoney as da,getLocale as Oi,loadLocale as sr,localeDirection as rr,LOCALE_NAMES as pa,resolveLocale as ha,setStringOverrides as nr,t as re}from"@seatlayer/core";var Oe="seatlayer.v1";function bo(s){let e=typeof s.default=="string"?s.default:"free",t={};if(s.seats&&typeof s.seats=="object")for(let[i,r]of Object.entries(s.seats))typeof r=="string"&&r!==e&&(t[i]=r);return{default:e,exceptions:t}}function vo(s,e){if(!s||s.default!==e.default)return null;let t=[];for(let[i,r]of Object.entries(e.exceptions))s.exceptions[i]!==r&&t.push({label:i,status:r});for(let i of Object.keys(s.exceptions))i in e.exceptions||t.push({label:i,status:e.default});return t}function yo(s,e){for(let t of e)t.status===s.default?delete s.exceptions[t.label]:s.exceptions[t.label]=t.status}function Ts(s){if(/(?:^|[?&#])(?:token|access_token|bearer|authorization|ticket|tkt|bse)=/i.test(s))throw new Error("seatlayer: refusing to open a socket with a credential in the URL");if(/\bbse_[A-Za-z0-9._-]+/.test(s))throw new Error("seatlayer: refusing to open a socket with a credential in the URL")}var ge=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,Ts(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=[Oe];if(this.opts.mintTicket){let n;try{n=await this.opts.mintTicket()}catch(o){this.reportIfAccessError(o),this.scheduleReconnect();return}if(this.stopped)return;n?.protocols?.length?(e=[...n.protocols],e.includes(Oe)||e.unshift(Oe)):n?.ticket&&(e=[Oe,`tkt.${n.ticket}`])}let t=this.version!==null;t&&e.push(`sv.${this.version}`);let i=this.useQueryMarker?`${this.opts.url}${this.opts.url.includes("?")?"&":"?"}pv=1`:this.opts.url;Ts(i);let r;try{r=(this.opts.socketFactory??((o,a)=>new WebSocket(o,a)))(i,e)}catch{this.scheduleReconnect();return}this.ws=r,r.onopen=()=>{this.ws===r&&(this.attempt=0,this.v1=r.protocol===Oe,this.v1||(this.useQueryMarker=!0),this.startKeepalive(r),t?this.resumeTimer=setTimeout(()=>{this.resumeTimer=null,this.opts.sink.resync()},5e3):this.opts.sink.resync())},r.onmessage=n=>{if(this.ws!==r)return;let o;try{o=JSON.parse(typeof n.data=="string"?n.data:"")}catch{return}!o||typeof o!="object"||this.handleFrame(o)},r.onclose=n=>{if(this.ws===r){if(this.ws=null,this.clearTimers(),n?.code===4401){if(n.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 i=Array.isArray(e.hidden)?e.hidden:[],r=Array.isArray(e.closed)?e.closed:[],n=i.join("\0"),o=r.join("\0");(n!==this.hidden||o!==this.closedSections)&&(this.hidden=n,this.closedSections=o,this.opts.sink.onSections?.(i,r))}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 i=bo(e),r=vo(this.projection,i);this.projection=i,r===null?this.opts.sink.applyProjection?this.opts.sink.applyProjection(i):this.opts.sink.resync():r.length&&this.opts.sink.applyStatuses(r);return}if(t==="delta"&&Array.isArray(e.changes)){this.answered();let i=e.changes.filter(r=>typeof r?.label=="string"&&typeof r?.status=="string").map(r=>({label:r.label,status:r.status}));if(!i.length)return;this.projection&&yo(this.projection,i),this.opts.sink.applyStatuses(i)}}}}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),i=Math.random()*t;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},i)}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 xo(s){return s==="blocked"?"not_for_sale":s==="held"||s==="booked"||s==="free"||s==="not_for_sale"?s:"free"}function mt(s,e={}){let t=i=>{let r=s.tableSelection(i);if(r)return r.physicalSeatIds;let n=s.idForLabel(i);return n?[n]:[]};return{applyStatuses(i){let r=s.currentHold()?.labels??[],n={free:[],held:[],booked:[],not_for_sale:[]},o=[],a=[],l=new Map(s.getSelection().map(c=>[c.label,c.id]));for(let c of i){let p=t(c.label);if(!p.length)continue;let d=xo(c.status);if(n[d].push(...p),e.flashOnLiveChange&&d!=="free"&&!r.includes(c.label)&&p.some(m=>s.getStatus(m)==="free")){let m=d==="held"?"#f4b740":"#f43f5e";for(let u of p)o.push({id:u,color:m})}d!=="free"&&!r.includes(c.label)&&l.has(c.label)&&a.push(c.label)}for(let c of["free","held","booked","not_for_sale"])n[c].length&&s.setStatus(n[c],c);for(let c of o)s.flashSeat(c.id,c.color);if(a.length){let c=a.flatMap(d=>t(d));c.length&&s.deselect(c);let p=i.some(d=>d.status==="blocked"&&a.includes(d.label));e.onSelectedObjectUnavailable?.(a,p?"ineligible":"taken")}e.onStatusChange?.()},async resync(){await s.refresh()},onSections(i,r){s.refresh(),e.onSections?.(i,r)}}}var B=class extends Error{constructor(e,t,i,r,n,o){super(t),this.name="ApiError",this.status=e,this.code=i,this.conflicts=r,this.reason=n,this.retryAfterS=o}},Cs=10,Es=1;function $t(s,e){let t=(s??"").trim();if(t){let i=Number(t);if(Number.isFinite(i)&&i>=0)return Math.ceil(i);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 wo={seat_conflict:"taken",conflict:"taken",channel_assignment_conflict:"ineligible",allocation_exhausted:"exhausted"},Pe=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 i=t.referral?.trim();this.referral=i?i.slice(0,120):void 0}get accessScoped(){return!!this.access?.configured}async request(e,t={},i={}){let r=t.method??"GET",n={},o;t.body!==void 0&&(n["Content-Type"]="application/json",o=JSON.stringify(t.body));let a=await this.access?.authorization(i.auth?"unauthorized":"initial");a&&(n.Authorization=a);let l=await fetch(`${this.base}${e}`,{method:r,headers:n,body:o,credentials:"omit"}),p=(l.headers.get("content-type")??"").includes("application/json")?await l.json().catch(()=>null):null;if(!l.ok){let d=p,m=d?.code??d?.error;if(this.access?.configured&&(l.status===401||l.status===403||l.status===422)&&await this.access.handleFailure(l.status,m)&&!i.auth)return this.request(e,t,{...i,auth:!0});if(l.status===409){let b=m?wo[m]:void 0,h=d?.conflicts?.map(y=>y.label)??t.labels??[];b&&this.onObjectUnavailable?.({labels:h,reason:b,code:m})}let u;if(l.status===429&&(u=$t(l.headers.get("Retry-After"),d?.retryAfterSeconds)??Es,r==="GET"&&!i.rateLimit&&u<=Cs))return await new Promise(b=>setTimeout(b,u*1e3)),this.request(e,t,{...i,rateLimit:!0});throw new B(l.status,d?.error??`request_failed_${l.status}`,m,d?.conflicts,d?.reason,u)}return p}async requestBlob(e,t={}){let i={},r=await this.access?.authorization(t.auth?"unauthorized":"initial");r&&(i.Authorization=r);let n=await fetch(`${this.base}${e}`,{method:"GET",headers:i,credentials:"omit"});if(n.ok)return n.blob();let a=(n.headers.get("content-type")??"").includes("application/json")?await n.json().catch(()=>null):null,l=a?.code??a?.error;if(this.access?.configured&&(n.status===401||n.status===403||n.status===422)&&await this.access.handleFailure(n.status,l)&&!t.auth)return this.requestBlob(e,{...t,auth:!0});let c;if(n.status===429&&(c=$t(n.headers.get("Retry-After"),a?.retryAfterSeconds)??Es,!t.rateLimit&&c<=Cs))return await new Promise(p=>setTimeout(p,c*1e3)),this.requestBlob(e,{...t,rateLimit:!0});throw new B(n.status,a?.error??`request_failed_${n.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 B(404,"not_found","not_found"))}objects(e){return this.request(`/pub/events/${encodeURIComponent(e)}/objects?compact=1`)}hold(e,t,i,r){return this.request(`/pub/events/${encodeURIComponent(e)}/hold`,{method:"POST",body:{selections:t,...i?{ttlMs:i}:{},...r?{replaceHoldId:r}:{},...this.referral?{referral:this.referral}:{}},labels:t.map(n=>n.label)})}bestAvailable(e,t,i,r,n){return this.request(`/pub/events/${encodeURIComponent(e)}/best-available`,{method:"POST",body:{qty:t,...i?{categoryKey:i}:{},...r?{zoneId:r}:{},...n?{ttlMs:n}:{},...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,i){return this.request(`/pub/events/${encodeURIComponent(e)}/release`,{method:"POST",body:{labels:t,holdId:i}})}extend(e,t,i){return this.request(`/pub/events/${encodeURIComponent(e)}/extend`,{method:"POST",body:{holdId:t,...i?{ttlMs:i}:{}}})}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"),i=new URLSearchParams({surface:"picker",viewerId:this.viewerId});return`${t}/pub/events/${encodeURIComponent(e)}/subscribe?${i}`}socketUrl(e){return this.accessScoped?"":this.subscribeUrl(e)}socketProtocols(e){return this.accessScoped?[]:[Oe]}createRealtime(e,t){return this.accessScoped?null:new ge({url:this.subscribeUrl(e),sink:t})}};var se=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}},ko=new Set(["buyer_access_expired"]),So=new Set(["paused","provider_failed","channel_denied"]);function To(s,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";default:break}return s===401?"invalid":null}function Co(s,e){return s===401&&!!e&&ko.has(e)}var Eo=3e4,Q,X,Ue,We,ft,Me,be,Ye,gt,bt,vt,_e,Z,ki,Vt,Ke,ae=class{constructor(e){I(this,Z);I(this,Q,null);I(this,X,0);I(this,Ue,null);I(this,We);I(this,ft);I(this,Me,null);I(this,be,null);I(this,Ye,null);I(this,gt);I(this,bt);I(this,vt,!1);I(this,_e);if(T(this,We,e.provider),T(this,ft,e.skewMs??Eo),T(this,gt,e.onExpired),T(this,bt,e.onUnavailable),e.token){let t=typeof e.token=="string"?{token:e.token}:e.token;C(this,Z,ki).call(this,t)}T(this,vt,!!f(this,We)||!!f(this,Q))}get configured(){return f(this,vt)}onRenewed(e){T(this,_e,e)}get unavailable(){return f(this,be)}get hasToken(){return!!f(this,Q)&&(f(this,X)===0||f(this,X)>Date.now())}get expiresAt(){return f(this,X)}async authorization(e="initial"){if(!this.configured)return null;if(f(this,be))throw new se(f(this,be));let t=Date.now();if(!f(this,Q)||f(this,X)>0&&f(this,X)-f(this,ft)<=t){let r=!!f(this,Q)&&f(this,X)>0&&f(this,X)<=t,n=f(this,Q)?r?"expired":"expiring":e,o=await C(this,Z,Vt).call(this,n);if(!o)throw new se(f(this,be)??f(this,Ye)??C(this,Z,Ke).call(this,"provider_failed"));return`Bearer ${o}`}return`Bearer ${f(this,Q)}`}async handleFailure(e,t){var r;if(!this.configured)return!1;if(Co(e,t)){T(this,Q,null),T(this,X,0);let n=await C(this,Z,Vt).call(this,"unauthorized",t);return(r=f(this,gt))==null||r.call(this,{reason:"unauthorized",code:t,refreshed:!!n}),!!n}let i=To(e,t);return i&&C(this,Z,Ke).call(this,i,t,e),!1}async refresh(e="manual"){return T(this,be,null),T(this,Ye,null),T(this,Q,null),T(this,X,0),!!await C(this,Z,Vt).call(this,e)}clear(){T(this,Q,null),T(this,Ue,null),T(this,X,0),T(this,Me,null),T(this,_e,void 0)}toJSON(){return{configured:this.configured,hasToken:this.hasToken}}toString(){return"[BuyerAccessContext redacted]"}};Q=new WeakMap,X=new WeakMap,Ue=new WeakMap,We=new WeakMap,ft=new WeakMap,Me=new WeakMap,be=new WeakMap,Ye=new WeakMap,gt=new WeakMap,bt=new WeakMap,vt=new WeakMap,_e=new WeakMap,Z=new WeakSet,ki=function(e){return!e||typeof e.token!="string"||!e.token?null:(T(this,Ue,e.token),T(this,Q,e.token),T(this,X,typeof e.expiresAt=="number"?e.expiresAt:0),f(this,Q))},Vt=function(e,t){if(f(this,Me))return f(this,Me);let i=f(this,We);if(!i)return C(this,Z,Ke).call(this,"no_token",t),Promise.resolve(null);let r=f(this,Ue),n=(async()=>{try{let o=await i({reason:e}),a=C(this,Z,ki).call(this,o);if(!a)return C(this,Z,Ke).call(this,"provider_failed",t),null;if(r&&r!==a&&f(this,_e))try{await f(this,_e).call(this,{previousToken:r,token:a,reason:e})}catch{}return a}catch{return C(this,Z,Ke).call(this,"provider_failed",t),null}finally{T(this,Me,null)}})();return T(this,Me,n),n},Ke=function(e,t,i){var n;let r={reason:e,code:t,status:i,retryable:e==="paused"||e==="channel_denied"};return T(this,Ye,r),So.has(e)||(T(this,be,r),T(this,Q,null),T(this,X,0)),(n=f(this,bt))==null||n.call(this,r),r};function yt(s,e={}){return!s.buyerAccessTokenProvider&&!s.buyerAccessToken?null:new ae({provider:s.buyerAccessTokenProvider,token:s.buyerAccessToken,...e})}var Ao=3e4;function Po(s){if(!s||typeof s!="object"||Array.isArray(s))return!1;let e=s;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 Si=class{constructor(e,t,i){this.base=e;this.event=t;this.publicKey=i;this.value=null;this.inflight=null}async load(e=!1){if(e&&(this.value=null),this.value&&this.value.expiresAt-Ao>Date.now())return this.value;if(this.inflight)return this.inflight;let t=(async()=>{let i=await fetch(`${this.base}/pub/events/${encodeURIComponent(this.event)}/bootstrap`,{method:"POST",body:JSON.stringify({publicKey:this.publicKey}),credentials:"omit"}),r=await i.json().catch(()=>null);if(!i.ok){let n=i.status===429?$t(i.headers.get("Retry-After"),r?.retryAfterSeconds):void 0;throw new B(i.status,r?.error??`request_failed_${i.status}`,r?.code??r?.error,void 0,void 0,n)}if(!Po(r))throw new B(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",i=await this.load(t);return{token:i.token,expiresAt:i.expiresAt}}},Ti=class extends Pe{constructor(t,i,r,n,o){super(t,{...o,access:n});this.event=i;this.loader=r;this.bootstrapAccess=n;this.initialChartDelivered=!1;this.initialObjectsDelivered=!1}assertEvent(t){if(t!==this.event)throw new B(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 i=await this.bundle(t);return this.initialChartDelivered=!0,{event:i.event,doc:i.doc,chartDelivery:i.chartDelivery}}async objects(t){if(this.assertEvent(t),this.initialObjectsDelivered)return super.objects(t);let i=await this.bundle(t);return this.initialObjectsDelivered=!0,i.objects}};function Nt(s){let e=new Si(s.base,s.event,s.publicKey),t=new ae({provider:({reason:i})=>e.token(i),...s.accessHooks});return{access:t,api:new Ti(s.base,s.event,e,t,s.apiOptions??{})}}import{t as ye,tCount as De}from"@seatlayer/core";var F={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 Mo=`.sl-picker,.sl-modal-scrim,.sl-mo-host{--sl-dur-enter:${F.enter}ms;--sl-dur-exit:${F.exit}ms;--sl-dur-spring:${F.spring}ms;--sl-dur-flight:${F.flight}ms;--sl-dur-stagger:${F.stagger}ms;--sl-dur-xfade:${F.crossfade}ms;--sl-dur-collapse:${F.collapse}ms;--sl-dur-rung:${F.rung}ms;--sl-ease-enter:${F.easeEnter};--sl-ease-exit:${F.easeExit};--sl-ease-spring:${F.easeSpring};--sl-mo-ox:50%;--sl-mo-oy:50%}`,Lo=`@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:${F.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:${F.reducedFade}ms;animation-delay:0ms}.sl-mo-hint,.sl-mo-rotate-in,.sl-mo-fly,.sl-mo-collapse{animation:none}.sl-mo-indicator{transition:none}}`,As=Mo+`
1
+ import{a as Es,c as Bt,d as Ke,e as Nt,f as mt}from"./chunk-ZE36NABM.js";import{a as f,b as R,c as C,d as E}from"./chunk-OSZ7DOEH.js";import{PickerController as ya,formatMoney as xa,getLocale as Bi,loadLocale as wa,localeDirection as ka,LOCALE_NAMES as Sa,resolveLocale as Ta,setStringOverrides as Ca,t as le}from"@seatlayer/core";var Re="seatlayer.v1";function vo(s){let e=typeof s.default=="string"?s.default:"free",t={};if(s.seats&&typeof s.seats=="object")for(let[i,n]of Object.entries(s.seats))typeof n=="string"&&n!==e&&(t[i]=n);return{default:e,exceptions:t}}function yo(s,e){if(!s||s.default!==e.default)return null;let t=[];for(let[i,n]of Object.entries(e.exceptions))s.exceptions[i]!==n&&t.push({label:i,status:n});for(let i of Object.keys(s.exceptions))i in e.exceptions||t.push({label:i,status:e.default});return t}function xo(s,e){for(let t of e)t.status===s.default?delete s.exceptions[t.label]:s.exceptions[t.label]=t.status}function As(s){if(/(?:^|[?&#])(?:token|access_token|bearer|authorization|ticket|tkt|bse)=/i.test(s))throw new Error("seatlayer: refusing to open a socket with a credential in the URL");if(/\bbse_[A-Za-z0-9._-]+/.test(s))throw new Error("seatlayer: refusing to open a socket with a credential in the URL")}var ve=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,As(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=[Re];if(this.opts.mintTicket){let r;try{r=await this.opts.mintTicket()}catch(o){this.reportIfAccessError(o),this.scheduleReconnect();return}if(this.stopped)return;r?.protocols?.length?(e=[...r.protocols],e.includes(Re)||e.unshift(Re)):r?.ticket&&(e=[Re,`tkt.${r.ticket}`])}let t=this.version!==null;t&&e.push(`sv.${this.version}`);let i=this.useQueryMarker?`${this.opts.url}${this.opts.url.includes("?")?"&":"?"}pv=1`:this.opts.url;As(i);let n;try{n=(this.opts.socketFactory??((o,a)=>new WebSocket(o,a)))(i,e)}catch{this.scheduleReconnect();return}this.ws=n,n.onopen=()=>{this.ws===n&&(this.attempt=0,this.v1=n.protocol===Re,this.v1||(this.useQueryMarker=!0),this.startKeepalive(n),t?this.resumeTimer=setTimeout(()=>{this.resumeTimer=null,this.opts.sink.resync()},5e3):this.opts.sink.resync())},n.onmessage=r=>{if(this.ws!==n)return;let o;try{o=JSON.parse(typeof r.data=="string"?r.data:"")}catch{return}!o||typeof o!="object"||this.handleFrame(o)},n.onclose=r=>{if(this.ws===n){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()}},n.onerror=()=>{try{n.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 i=Array.isArray(e.hidden)?e.hidden:[],n=Array.isArray(e.closed)?e.closed:[],r=i.join("\0"),o=n.join("\0");(r!==this.hidden||o!==this.closedSections)&&(this.hidden=r,this.closedSections=o,this.opts.sink.onSections?.(i,n))}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 i=vo(e),n=yo(this.projection,i);this.projection=i,n===null?this.opts.sink.applyProjection?this.opts.sink.applyProjection(i):this.opts.sink.resync():n.length&&this.opts.sink.applyStatuses(n);return}if(t==="delta"&&Array.isArray(e.changes)){this.answered();let i=e.changes.filter(n=>typeof n?.label=="string"&&typeof n?.status=="string").map(n=>({label:n.label,status:n.status}));if(!i.length)return;this.projection&&xo(this.projection,i),this.opts.sink.applyStatuses(i)}}}}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),i=Math.random()*t;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},i)}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 wo(s){return s==="blocked"?"not_for_sale":s==="held"||s==="booked"||s==="free"||s==="not_for_sale"?s:"free"}function ft(s,e={}){let t=i=>{let n=s.tableSelection(i);if(n)return n.physicalSeatIds;let r=s.idForLabel(i);return r?[r]:[]};return{applyStatuses(i){let n=s.currentHold()?.labels??[],r={free:[],held:[],booked:[],not_for_sale:[]},o=[],a=[],l=new Map(s.getSelection().map(c=>[c.label,c.id]));for(let c of i){let p=t(c.label);if(!p.length)continue;let d=wo(c.status);if(r[d].push(...p),e.flashOnLiveChange&&d!=="free"&&!n.includes(c.label)&&p.some(u=>s.getStatus(u)==="free")){let u=d==="held"?"#f4b740":"#f43f5e";for(let h of p)o.push({id:h,color:u})}d!=="free"&&!n.includes(c.label)&&l.has(c.label)&&a.push(c.label)}for(let c of["free","held","booked","not_for_sale"])r[c].length&&s.setStatus(r[c],c);for(let c of o)s.flashSeat(c.id,c.color);if(a.length){let c=a.flatMap(d=>t(d));c.length&&s.deselect(c);let p=i.some(d=>d.status==="blocked"&&a.includes(d.label));e.onSelectedObjectUnavailable?.(a,p?"ineligible":"taken")}e.onStatusChange?.()},async resync(){await s.refresh()},onSections(i,n){s.refresh(),e.onSections?.(i,n)}}}var $=class extends Error{constructor(e,t,i,n,r,o){super(t),this.name="ApiError",this.status=e,this.code=i,this.conflicts=n,this.reason=r,this.retryAfterS=o}},Ps=10,Ls=1;function $t(s,e){let t=(s??"").trim();if(t){let i=Number(t);if(Number.isFinite(i)&&i>=0)return Math.ceil(i);let n=Date.parse(t);if(Number.isFinite(n))return Math.max(0,Math.ceil((n-Date.now())/1e3))}if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return Math.ceil(e)}var ko={seat_conflict:"taken",conflict:"taken",channel_assignment_conflict:"ineligible",allocation_exhausted:"exhausted"},Pe=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 i=t.referral?.trim();this.referral=i?i.slice(0,120):void 0}get accessScoped(){return!!this.access?.configured}async request(e,t={},i={}){let n=t.method??"GET",r={},o;t.body!==void 0&&(r["Content-Type"]="application/json",o=JSON.stringify(t.body));let a=await this.access?.authorization(i.auth?"unauthorized":"initial");a&&(r.Authorization=a);let l=await fetch(`${this.base}${e}`,{method:n,headers:r,body:o,credentials:"omit"}),p=(l.headers.get("content-type")??"").includes("application/json")?await l.json().catch(()=>null):null;if(!l.ok){let d=p,u=d?.code??d?.error;if(this.access?.configured&&(l.status===401||l.status===403||l.status===422)&&await this.access.handleFailure(l.status,u)&&!i.auth)return this.request(e,t,{...i,auth:!0});if(l.status===409){let g=u?ko[u]:void 0,m=d?.conflicts?.map(v=>v.label)??t.labels??[];g&&this.onObjectUnavailable?.({labels:m,reason:g,code:u})}let h;if(l.status===429&&(h=$t(l.headers.get("Retry-After"),d?.retryAfterSeconds)??Ls,n==="GET"&&!i.rateLimit&&h<=Ps))return await new Promise(g=>setTimeout(g,h*1e3)),this.request(e,t,{...i,rateLimit:!0});throw new $(l.status,d?.error??`request_failed_${l.status}`,u,d?.conflicts,d?.reason,h)}return p}async requestBlob(e,t={}){let i={},n=await this.access?.authorization(t.auth?"unauthorized":"initial");n&&(i.Authorization=n);let r=await fetch(`${this.base}${e}`,{method:"GET",headers:i,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=$t(r.headers.get("Retry-After"),a?.retryAfterSeconds)??Ls,!t.rateLimit&&c<=Ps))return await new Promise(p=>setTimeout(p,c*1e3)),this.requestBlob(e,{...t,rateLimit:!0});throw new $(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 $(404,"not_found","not_found"))}objects(e){return this.request(`/pub/events/${encodeURIComponent(e)}/objects?compact=1`)}hold(e,t,i,n){return this.request(`/pub/events/${encodeURIComponent(e)}/hold`,{method:"POST",body:{selections:t,...i?{ttlMs:i}:{},...n?{replaceHoldId:n}:{},...this.referral?{referral:this.referral}:{}},labels:t.map(r=>r.label)})}bestAvailable(e,t,i,n,r){return this.request(`/pub/events/${encodeURIComponent(e)}/best-available`,{method:"POST",body:{qty:t,...i?{categoryKey:i}:{},...n?{zoneId:n}:{},...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,i){return this.request(`/pub/events/${encodeURIComponent(e)}/release`,{method:"POST",body:{labels:t,holdId:i}})}extend(e,t,i){return this.request(`/pub/events/${encodeURIComponent(e)}/extend`,{method:"POST",body:{holdId:t,...i?{ttlMs:i}:{}}})}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"),i=new URLSearchParams({surface:"picker",viewerId:this.viewerId});return`${t}/pub/events/${encodeURIComponent(e)}/subscribe?${i}`}socketUrl(e){return this.accessScoped?"":this.subscribeUrl(e)}socketProtocols(e){return this.accessScoped?[]:[Re]}createRealtime(e,t){return this.accessScoped?null:new ve({url:this.subscribeUrl(e),sink:t})}};import{getLocale as Ao,loadLocale as Po,LOCALE_NAMES as Lo,localeDirection as Is,resolveLocale as Os,setStringOverrides as Mo,TRANSLATED_LOCALES as Ho}from"@seatlayer/core";import{getLocale as So,localeDirection as To,t as Co}from"@seatlayer/core";function Eo(){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 Ms(s,e,t){let i=document.createElement("div");i.className="sl-picker",i.tabIndex=-1,i.lang=So(),i.dir=To(),s.appendChild(i),Object.entries(mt(void 0,t)).forEach(([r,o])=>i.style.setProperty(r,o)),i.innerHTML=`
2
+ <div class="sl-head">
3
+ <div class="sl-logo" data-ref="logo"></div>
4
+ <div class="sl-head-info" data-ref="headInfo">
5
+ <div class="sl-head-name" data-ref="name"></div>
6
+ <div class="sl-head-meta" data-ref="meta"></div>
7
+ </div>
8
+ <span class="sl-hold-pill" data-ref="hold"></span>
9
+ <span class="sl-closed-pill" data-ref="closedPill" role="status">
10
+ <svg viewBox="0 0 24 24" aria-hidden="true"><rect x="5" y="11" width="14" height="9" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg>
11
+ <span data-ref="closedPillText"></span>
12
+ </span>
13
+ <button type="button" class="sl-close" data-ref="close" data-sl-a="picker.close" aria-label="${e("picker.close","Close")}">
14
+ <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>
15
+ </button>
16
+ </div>
17
+ <div class="sl-rail" data-ref="rail" role="group" data-sl-a="picker.ticketPrices" aria-label="${e("picker.ticketPrices","Ticket prices")}">
18
+ <div class="sl-rail-scroll" data-ref="railScroll"></div>
19
+ </div>
20
+ <div class="sl-body">
21
+ <div class="sl-map">
22
+ <div class="sl-map-host" data-ref="map"></div>
23
+ <div class="sl-zoom" data-ref="zoom">
24
+ <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>
25
+ <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>
26
+ <button type="button" data-sl-a="picker.fitToScreen" aria-label="${e("picker.fitToScreen","Fit to screen")}" data-sl-ti="picker.fitToScreen" title="${e("picker.fitToScreen","Fit to screen")}" data-ref="zfit">
27
+ <svg viewBox="0 0 24 24"><path d="M8 3H5a2 2 0 0 0-2 2v3M16 3h3a2 2 0 0 0 2 2v3M8 21H5a2 2 0 0 0-2-2v-3M16 21h3a2 2 0 0 0 2-2v-3"/></svg>
28
+ </button>
29
+ <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">
30
+ <svg viewBox="0 0 24 24"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg>
31
+ <span class="sl-zfs-lbl" data-sl-t="picker.fullScreen" aria-hidden="true">${e("picker.fullScreen","Full screen")}</span>
32
+ </button>
33
+ </div>
34
+ <div class="sl-boot" data-ref="boot">
35
+ <div class="sl-boot-bar" aria-hidden="true"></div>
36
+ ${Eo()}
37
+ <span class="sl-boot-say" role="status" aria-live="polite" data-sl-t="picker.loadingSeatMap">${e("picker.loadingSeatMap","Loading seat map\u2026")}</span>
38
+ </div>
39
+ <div class="sl-toast" data-ref="toast" role="status" aria-live="polite"></div>
40
+ </div>
41
+ <div class="sl-side" data-ref="side">
42
+ <div class="sl-sheet-head" data-ref="sheetHead">
43
+ <div class="sl-sheet-grab"></div>
44
+ <div class="sl-sheet-bar">
45
+ <div class="sl-sheet-peek" data-ref="peek"></div>
46
+ <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">
47
+ <svg viewBox="0 0 24 24"><path d="M6 15l6-6 6 6"/></svg>
48
+ </button>
49
+ </div>
50
+ </div>
51
+ <div class="sl-sec sl-filtersec" data-ref="filtersSec" data-sl-t="picker.filters">${e("picker.filters","Filters")}</div>
52
+ <div class="sl-filters" data-ref="filters"></div>
53
+ <div class="sl-offer" data-ref="offer" role="status" aria-live="polite"></div>
54
+ <div class="sl-sec sl-prices-sec" data-ref="pricesSec"><span data-sl-t="picker.ticketPrices">${e("picker.ticketPrices","Ticket prices")}</span></div>
55
+ <div class="sl-prices-hint" data-ref="pricesHint"></div>
56
+ <div class="sl-prices" data-ref="prices"></div>
57
+ <div class="sl-live" data-ref="live" role="status" aria-live="polite">
58
+ <span class="dot" aria-hidden="true"></span>
59
+ <span data-ref="liveText" data-sl-t="picker.liveAvailability">${e("picker.liveAvailability","Live availability \u2014 seats update in real time")}</span>
60
+ </div>
61
+ <div class="sl-sec sl-seats-sec">
62
+ <span data-sl-t="picker.yourSeats">${e("picker.yourSeats","Your seats")}</span>
63
+ <span class="sl-seat-summary" data-ref="seatSummary"></span>
64
+ </div>
65
+ <div class="sl-tray" data-ref="tray"></div>
66
+ <div class="sl-foot" data-ref="foot">
67
+ <div class="sl-hold-note" data-ref="holdNote" role="status" aria-live="polite">
68
+ <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M20 6L9 17l-5-5"/></svg>
69
+ <span>
70
+ <b data-ref="holdTitle" data-sl-t="picker.seatsSecured">${e("picker.seatsSecured","Seats secured")}</b>
71
+ <span class="sl-hold-copy" data-ref="holdCopy" data-sl-t="picker.notChargedYet">${e("picker.notChargedYet","You won\u2019t be charged yet.")}</span>
72
+ </span>
73
+ <button type="button" class="sl-hold-change" data-ref="holdChange" data-sl-a="picker.releaseHeldTickets" data-sl-t="picker.change" aria-label="${e("picker.releaseHeldTickets","Release held tickets and choose different seats")}">${e("picker.change","Change")}</button>
74
+ </div>
75
+ <div class="sl-total"><span data-ref="count"></span><b data-ref="total"></b></div>
76
+ <button type="button" class="sl-cta" data-ref="cta" disabled></button>
77
+ </div>
78
+ </div>
79
+ </div>`;let n={};return i.querySelectorAll("[data-ref]").forEach(r=>{n[r.dataset.ref]=r}),{root:i,mapHost:n.map,els:n}}function Hs(s){let e=(t,i)=>{for(let n of s.querySelectorAll(`[${t}]`)){let r=n.getAttribute(t);if(!r)continue;let o=Co(r);o!==r&&i(n,o)}};e("data-sl-t",(t,i)=>{t.textContent=i}),e("data-sl-a",(t,i)=>{t.setAttribute("aria-label",i)}),e("data-sl-ti",(t,i)=>{t.setAttribute("title",i)})}function Vt(s,e){let t=Os(s),i=Ho.includes(t)?t:"en";return e&&Mo(e),{locale:i,direction:Is(i),ready:Po(s)}}function Ft(s,e,t){s.lang=e.locale,s.dir=e.direction,e.ready.then(t)}function Rs(s,e){if(!s)return null;let t=(e.languages??[]).map(n=>Os(n)).filter((n,r,o)=>o.indexOf(n)===r);if(t.length<2)return null;let i=document.createElement("select");i.className="sl-langsel",i.setAttribute("aria-label",e.label);for(let n of t){let r=document.createElement("option");r.value=n,r.textContent=Lo[n]??n,r.selected=n===Ao(),i.appendChild(r)}return i.addEventListener("change",()=>e.onChange(i.value)),s.appendChild(i),i}function _s(s,e){e.root.lang=s,e.root.dir=Is(s),Hs(e.root);for(let i of e.painters)try{i()}catch{}e.refreshMapCopy();let t=e.languageSelect;t&&t.value!==s&&(t.value=s)}var ae=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}},Io=new Set(["buyer_access_expired"]),Oo=new Set(["paused","provider_failed","channel_denied"]);function Ro(s,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";default:break}return s===401?"invalid":null}function _o(s,e){return s===401&&!!e&&Io.has(e)}var Do=3e4,Z,J,We,Ye,gt,Le,ye,Qe,bt,vt,yt,_e,ee,Ci,zt,Ue,pe=class{constructor(e){R(this,ee);R(this,Z,null);R(this,J,0);R(this,We,null);R(this,Ye);R(this,gt);R(this,Le,null);R(this,ye,null);R(this,Qe,null);R(this,bt);R(this,vt);R(this,yt,!1);R(this,_e);if(C(this,Ye,e.provider),C(this,gt,e.skewMs??Do),C(this,bt,e.onExpired),C(this,vt,e.onUnavailable),e.token){let t=typeof e.token=="string"?{token:e.token}:e.token;E(this,ee,Ci).call(this,t)}C(this,yt,!!f(this,Ye)||!!f(this,Z))}get configured(){return f(this,yt)}onRenewed(e){C(this,_e,e)}get unavailable(){return f(this,ye)}get hasToken(){return!!f(this,Z)&&(f(this,J)===0||f(this,J)>Date.now())}get expiresAt(){return f(this,J)}async authorization(e="initial"){if(!this.configured)return null;if(f(this,ye))throw new ae(f(this,ye));let t=Date.now();if(!f(this,Z)||f(this,J)>0&&f(this,J)-f(this,gt)<=t){let n=!!f(this,Z)&&f(this,J)>0&&f(this,J)<=t,r=f(this,Z)?n?"expired":"expiring":e,o=await E(this,ee,zt).call(this,r);if(!o)throw new ae(f(this,ye)??f(this,Qe)??E(this,ee,Ue).call(this,"provider_failed"));return`Bearer ${o}`}return`Bearer ${f(this,Z)}`}async handleFailure(e,t){var n;if(!this.configured)return!1;if(_o(e,t)){C(this,Z,null),C(this,J,0);let r=await E(this,ee,zt).call(this,"unauthorized",t);return(n=f(this,bt))==null||n.call(this,{reason:"unauthorized",code:t,refreshed:!!r}),!!r}let i=Ro(e,t);return i&&E(this,ee,Ue).call(this,i,t,e),!1}async refresh(e="manual"){return C(this,ye,null),C(this,Qe,null),C(this,Z,null),C(this,J,0),!!await E(this,ee,zt).call(this,e)}clear(){C(this,Z,null),C(this,We,null),C(this,J,0),C(this,Le,null),C(this,_e,void 0)}toJSON(){return{configured:this.configured,hasToken:this.hasToken}}toString(){return"[BuyerAccessContext redacted]"}};Z=new WeakMap,J=new WeakMap,We=new WeakMap,Ye=new WeakMap,gt=new WeakMap,Le=new WeakMap,ye=new WeakMap,Qe=new WeakMap,bt=new WeakMap,vt=new WeakMap,yt=new WeakMap,_e=new WeakMap,ee=new WeakSet,Ci=function(e){return!e||typeof e.token!="string"||!e.token?null:(C(this,We,e.token),C(this,Z,e.token),C(this,J,typeof e.expiresAt=="number"?e.expiresAt:0),f(this,Z))},zt=function(e,t){if(f(this,Le))return f(this,Le);let i=f(this,Ye);if(!i)return E(this,ee,Ue).call(this,"no_token",t),Promise.resolve(null);let n=f(this,We),r=(async()=>{try{let o=await i({reason:e}),a=E(this,ee,Ci).call(this,o);if(!a)return E(this,ee,Ue).call(this,"provider_failed",t),null;if(n&&n!==a&&f(this,_e))try{await f(this,_e).call(this,{previousToken:n,token:a,reason:e})}catch{}return a}catch{return E(this,ee,Ue).call(this,"provider_failed",t),null}finally{C(this,Le,null)}})();return C(this,Le,r),r},Ue=function(e,t,i){var r;let n={reason:e,code:t,status:i,retryable:e==="paused"||e==="channel_denied"};return C(this,Qe,n),Oo.has(e)||(C(this,ye,n),C(this,Z,null),C(this,J,0)),(r=f(this,vt))==null||r.call(this,n),n};function xt(s,e={}){return!s.buyerAccessTokenProvider&&!s.buyerAccessToken?null:new pe({provider:s.buyerAccessTokenProvider,token:s.buyerAccessToken,...e})}var Bo=3e4;function No(s){if(!s||typeof s!="object"||Array.isArray(s))return!1;let e=s;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 Ei=class{constructor(e,t,i){this.base=e;this.event=t;this.publicKey=i;this.value=null;this.inflight=null}async load(e=!1){if(e&&(this.value=null),this.value&&this.value.expiresAt-Bo>Date.now())return this.value;if(this.inflight)return this.inflight;let t=(async()=>{let i=await fetch(`${this.base}/pub/events/${encodeURIComponent(this.event)}/bootstrap`,{method:"POST",body:JSON.stringify({publicKey:this.publicKey}),credentials:"omit"}),n=await i.json().catch(()=>null);if(!i.ok){let r=i.status===429?$t(i.headers.get("Retry-After"),n?.retryAfterSeconds):void 0;throw new $(i.status,n?.error??`request_failed_${i.status}`,n?.code??n?.error,void 0,void 0,r)}if(!No(n))throw new $(502,"invalid_bootstrap_response","invalid_bootstrap_response");return this.value=n,n})();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",i=await this.load(t);return{token:i.token,expiresAt:i.expiresAt}}},Ai=class extends Pe{constructor(t,i,n,r,o){super(t,{...o,access:r});this.event=i;this.loader=n;this.bootstrapAccess=r;this.initialChartDelivered=!1;this.initialObjectsDelivered=!1}assertEvent(t){if(t!==this.event)throw new $(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 i=await this.bundle(t);return this.initialChartDelivered=!0,{event:i.event,doc:i.doc,chartDelivery:i.chartDelivery}}async objects(t){if(this.assertEvent(t),this.initialObjectsDelivered)return super.objects(t);let i=await this.bundle(t);return this.initialObjectsDelivered=!0,i.objects}};function jt(s){let e=new Ei(s.base,s.event,s.publicKey),t=new pe({provider:({reason:i})=>e.token(i),...s.accessHooks});return{access:t,api:new Ai(s.base,s.event,e,t,s.apiOptions??{})}}import{t as we,tCount as De}from"@seatlayer/core";var G={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 $o=`.sl-picker,.sl-modal-scrim,.sl-mo-host{--sl-dur-enter:${G.enter}ms;--sl-dur-exit:${G.exit}ms;--sl-dur-spring:${G.spring}ms;--sl-dur-flight:${G.flight}ms;--sl-dur-stagger:${G.stagger}ms;--sl-dur-xfade:${G.crossfade}ms;--sl-dur-collapse:${G.collapse}ms;--sl-dur-rung:${G.rung}ms;--sl-ease-enter:${G.easeEnter};--sl-ease-exit:${G.easeExit};--sl-ease-spring:${G.easeSpring};--sl-mo-ox:50%;--sl-mo-oy:50%}`,Vo=`@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:${G.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:${G.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}}`,Ds=$o+`
2
80
  /* Anchored open/close. The translate is 8px TOWARD the anchor, which is what
3
81
  makes the card look attached to the seat rather than dropped on the map. */
4
82
  .sl-mo-in{transform-origin:var(--sl-mo-ox) var(--sl-mo-oy);
@@ -65,34 +143,354 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
65
143
  @keyframes slMoZoom{from{opacity:0;transform:scale(1.02)}to{opacity:1;transform:none}}
66
144
  .sl-mo-rotate-in{animation:slMoSpin var(--sl-dur-spring) var(--sl-ease-spring) 1 both}
67
145
  @keyframes slMoSpin{from{opacity:0;transform:rotate(-140deg) scale(.8)}to{opacity:1;transform:none}}
68
- `+Lo;function Ps(){try{return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches===!0}catch{return!1}}function Ci(s,e){if(!e){s.style.removeProperty("--sl-mo-ox"),s.style.removeProperty("--sl-mo-oy");return}zt(s,e,s.getBoundingClientRect())}function zt(s,e,t){let i=t.width||1,r=t.height||1,n=o=>Math.max(0,Math.min(100,o));s.style.setProperty("--sl-mo-ox",`${n((e.x-t.left)/i*100).toFixed(1)}%`),s.style.setProperty("--sl-mo-oy",`${n((e.y-t.top)/r*100).toFixed(1)}%`)}function Ms(s,e,t){let i=s.getBoundingClientRect(),r=t.getBoundingClientRect();zt(s,e,{left:i.left-r.left,top:i.top-r.top,width:i.width,height:i.height})}function Ft(s,e){s.classList.remove("sl-mo-out"),e!==void 0&&Ci(s,e),s.classList.remove("sl-mo-in"),s.offsetWidth,s.classList.add("sl-mo-in")}function Ls(s){s.classList.add("sl-mo-stagger");let e=0;for(let t of Array.from(s.children))t.style.setProperty("--sl-mo-i",String(e)),e+=1}function Le(s,e,t={className:"sl-mo-out",duration:F.exit}){let i=()=>{r||(r=!0,window.clearTimeout(n),s.removeEventListener("animationend",i),e?e():s.remove())},r=!1;s.classList.remove("sl-mo-in","sl-mo-slide-up","sl-mo-spring","sl-mo-zoom","sl-mo-rise"),s.classList.add(t.className),s.addEventListener("animationend",i);let n=window.setTimeout(i,Ps()?0:t.duration+60)}var Hs={className:"sl-mo-slide-down",duration:F.exit};function Ei(s,e){s.textContent!==e&&(s.textContent=e,s.classList.remove("sl-mo-xfade"),s.offsetWidth,s.classList.add("sl-mo-xfade"))}function Is(s){if(Ps())return s.onArrive?.(),null;let e=document.createElement("div");e.className="sl-mo-fly sl-mo-host",e.setAttribute("aria-hidden","true"),e.textContent=s.label??"",e.style.left=`${s.from.x}px`,e.style.top=`${s.from.y}px`,e.style.background=s.color??"var(--sl-accent,#6e7bff)",e.style.color=s.ink??"#fff",e.style.setProperty("--sl-fly-dx",`${Math.round(s.to.x-s.from.x)}px`),e.style.setProperty("--sl-fly-dy",`${Math.round(s.to.y-s.from.y)}px`),document.body.appendChild(e);let t=!1,i=()=>{t||(t=!0,window.clearTimeout(r),e.remove(),s.onArrive?.())};e.addEventListener("animationend",i);let r=window.setTimeout(i,F.flight+80);return e}var $=s=>String(s??"").replace(/[&<>"']/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[e]);function Qe(s,e){let t=0;for(let i of s.get(e)?.values()??[])t+=i;return t}function Rs(s){let e=[];for(let[t,i]of s)for(let[r,n]of i)n>0&&e.push({areaId:t,tierId:r,qty:n});return e}function Os(s){let e=new Map;for(let t of s.keys())e.set(t,Qe(s,t));return e}function xt(s,e,t,i){let r=s.get(e)??new Map;i>0?r.set(t,i):r.delete(t),r.size?s.set(e,r):s.delete(e)}function _s(s){let e=new Map;for(let t of s)t.objectType!=="ga"||!t.objectId||e.set(t.objectId,(e.get(t.objectId)??0)+(t.quantity??1));return e}function Be(s,e){let t=_s(e),i=0;for(let r of s.keys())i+=Math.max(0,Qe(s,r)-(t.get(r)??0));return i}function Ds(s,e,t){let i=_s(t),r=0;for(let n of e){let o=s.gaQty.get(n.id);if(!o)continue;let a=i.get(n.id)??0;for(let[l,c]of o){let p=Math.max(0,c-a);a=Math.max(0,a-c),r+=p*s.paidPrice(n.categoryKey,l,Ho(n,l),n.id)}}return r}function Ho(s,e){return e?s.tiers?.find(t=>t.id===e)?.price??s.price:s.price}function Bs(s){let e=[],t=new Map;for(let i of s){if(i.objectType!=="ga"||!i.objectId){e.push({...i,labels:[i.label]});continue}let r=`${i.objectId}\0${i.tierId??""}`,n=t.get(r);if(n){n.quantity=(n.quantity??0)+(i.quantity??1),n.labels.push(i.label);continue}let o={...i,quantity:i.quantity??1,labels:[i.label]};t.set(r,o),e.push(o)}return e}function $s(s,e,t){let i=new Set(t);for(let r of e)r.objectType==="ga"&&r.objectId&&i.has(r.label)&&xt(s,r.objectId,r.tierId??null,0)}function Pi(s,e){if(s.objectType!=="ga")return s.label;let t=e.find(i=>i.id===s.objectId);return t?.displayLabel??t?.label??s.label}function Io(s){let e=new Map;for(let t of s){if(t.objectType!=="ga"||!t.objectId)continue;let i=`${t.objectId}\0${t.tierId??""}`;e.set(i,(e.get(i)??0)+(t.quantity??1))}return e}function jt(s){let e=s.tiers??[];return e.length>1?e.map(t=>({id:t.id,label:t.name||t.id,price:t.price})):[{id:null,label:s.displayType??ye("picker.generalAdmission"),price:s.price}]}function Vs(s,e){let t=s.totalTicketCount()-Qe(s.gaQty,e.id);return Math.max(0,Math.min(e.available,s.maxTickets-t))}function Mi(s,e,t,i){if(ve(s,!1),s.salesClosed){s.toast(s.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}let r=jt(e),n=s.gaQty.get(e.id),o=Qe(s.gaQty,e.id)>0,a=Vs(s,e);if(a<=0&&!o){s.toast(e.available>0?ye("picker.maxTicketsForOrder",{count:s.maxTickets}):s.tf("picker.soldOutTitle","Sold out"),"warning");return}if(s.onGAPromptHook){let m={};for(let[b,h]of n??[])m[b??""]=h;if(s.onGAPromptHook({area:e,selected:m,min:0,max:a,tiers:r,confirm:b=>{Do(s,e,r,b,a)},cancel:()=>ve(s)})===!0)return}let l=new Map;for(let m of r)l.set(m.id,n?.get(m.id)??0);!o&&a>0&&l.set(r[0].id,1);let c={area:e,tiers:r,draft:l,max:a,reopened:o},p=s.root?.dataset.layout==="narrow",d=document.createElement("div");d.className=p?"sl-ga-scrim sl-mo-scrim":"sl-ga-pop-layer",d.innerHTML=Ro(s,c,p),s.root?.appendChild(d),s.gaPromptEl=d,s.gaPromptReturnFocus=i??document.activeElement,p||Bo(s,d,t),s.reducedMotion()&&(d.dataset.motion="reduced"),zs(s,c),Oo(s,d,c),requestAnimationFrame(()=>d.querySelector('[data-ga-step="1"]')?.focus())}function Ro(s,e,t){let{area:i,tiers:r}=e,n=r.length>1,o=i.displayLabel??i.label,a=r.map(l=>`<div class="sl-ga-prompt-row" data-ga-tier="${$(l.id??"")}"><div class="sl-ga-prompt-label"><span>${$(n?l.label:s.tf("picker.gaChooseTickets","How many tickets?"))}</span>`+(n?`<small>${$(s.money(s.paidPrice(i.categoryKey,l.id,l.price,i.id)))}</small>`:"")+`</div><div class="sl-ga-stepper" role="group" aria-label="${$(n?l.label:o)}"><button type="button" data-ga-step="-1" aria-label="${$(s.tf("picker.fewer","Fewer"))}">\u2212</button><output data-ga-qty aria-live="polite">0</output><button type="button" data-ga-step="1" aria-label="${$(s.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="${$(ye("picker.gaChooseForArea",{area:o}))}"><div class="sl-ga-prompt-head"><div class="sl-ga-prompt-eyebrow">${$(i.displayType??s.tf("picker.generalAdmission","General admission"))}</div><h2 class="sl-ga-prompt-title">${$(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="${$(ye("common.close"))}">\xD7</button></div><div class="sl-ga-prompt-body">${a}`+(r.length>1?`<div class="sl-ga-prompt-total"><span>${$(s.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>${$(s.tf("picker.gaRemove","Remove"))}</button>`:`<button type="button" class="sl-ga-prompt-remove" data-ga-cancel>${$(ye("common.cancel"))}</button>`)+'<button type="button" class="sl-ga-prompt-confirm" data-ga-confirm></button></div></section>'}function Li(s){let e=0;for(let t of s.draft.values())e+=t;return e}function Ns(s,e){let t=0;for(let i of e.tiers)t+=(e.draft.get(i.id)??0)*s.paidPrice(e.area.categoryKey,i.id,i.price,e.area.id);return t}function zs(s,e){let t=s.gaPromptEl;if(!t)return;let i=Li(e),r=Ns(s,e);t.querySelectorAll("[data-ga-tier]").forEach(c=>{let p=c.dataset.gaTier?c.dataset.gaTier:null,d=e.draft.get(p)??0,m=c.querySelector("[data-ga-qty]");m&&(m.value=String(d)),c.querySelectorAll("[data-ga-step]").forEach(u=>{u.disabled=Number(u.dataset.gaStep)<0?d<=0:i>=e.max})});let n=t.querySelector("[data-ga-sub]");n&&(n.textContent=`${s.money(s.paidPrice(e.area.categoryKey,e.tiers[0].id,e.tiers[0].price,e.area.id))} \xB7 ${De("picker.leftCount",e.area.available)}`);let o=t.querySelector("[data-ga-total]");o&&(o.textContent=s.money(r));let a=t.querySelector("[data-ga-hint]");a&&(a.textContent=i>=e.max&&e.max>0?e.area.available<=e.max?De("picker.leftCount",e.area.available):ye("picker.maxTicketsForOrder",{count:s.maxTickets}):"");let l=t.querySelector("[data-ga-confirm]");l&&(l.textContent=e.reopened?De("picker.gaUpdate",i,{count:i}):De("picker.gaAdd",i,{count:i,price:s.money(r)}),l.disabled=i<=0&&!e.reopened)}function Oo(s,e,t){e.querySelectorAll("[data-ga-step]").forEach(i=>{i.addEventListener("click",()=>{let r=i.closest("[data-ga-tier]");if(!r)return;let n=r.dataset.gaTier?r.dataset.gaTier:null,o=Number(i.dataset.gaStep),a=t.draft.get(n)??0,l=t.max-Li(t);t.draft.set(n,Math.max(0,a+(o>0?Math.min(1,l):-1))),zs(s,t)})}),e.querySelectorAll("[data-ga-cancel]").forEach(i=>i.addEventListener("click",()=>ve(s))),e.querySelector("[data-ga-remove]")?.addEventListener("click",()=>{s.gaQty.delete(t.area.id),ve(s),s.syncTray(),Ai(s,ye("picker.gaRemoved",{area:t.area.displayLabel??t.area.label}))}),e.querySelector("[data-ga-confirm]")?.addEventListener("click",()=>{_o(s,t)}),e.addEventListener("mousedown",i=>{i.target===e&&ve(s)}),e.addEventListener("keydown",i=>{if(i.key==="Escape"){i.stopPropagation(),ve(s);return}if(i.key!=="Tab")return;let r=[...e.querySelectorAll('button:not(:disabled),[tabindex]:not([tabindex="-1"])')];if(!r.length)return;let n=r[0],o=r[r.length-1];i.shiftKey&&document.activeElement===n?(i.preventDefault(),o.focus()):!i.shiftKey&&document.activeElement===o&&(i.preventDefault(),n.focus())})}function _o(s,e){let t=Li(e),i=Ns(s,e);for(let n of e.tiers)xt(s.gaQty,e.area.id,n.id,e.draft.get(n.id)??0);ve(s),s.syncTray();let r=e.area.displayLabel??e.area.label;t>0?Ai(s,De("picker.gaAdded",t,{count:t,area:r,price:s.money(i)})):Ai(s,ye("picker.gaRemoved",{area:r}))}function Do(s,e,t,i,r){if(typeof i=="number")xt(s.gaQty,e.id,t[0].id,Math.max(0,Math.min(r,Math.floor(i))));else{s.gaQty.delete(e.id);let n=r;for(let o of t){let a=Math.max(0,Math.floor(i[o.id??""]??0)),l=Math.min(a,n);n-=l,xt(s.gaQty,e.id,o.id,l)}}s.syncTray()}function ve(s,e=!0){let t=s.gaPromptReturnFocus;s.gaPromptEl&&Le(s.gaPromptEl),s.gaPromptEl=null,s.gaPromptReturnFocus=null,e&&t&&requestAnimationFrame(()=>(t.isConnected?t:s.root)?.focus())}function Bo(s,e,t){let i=s.root,r=e.querySelector(".sl-ga-pop");if(!i||!r||!t)return;let n=i.getBoundingClientRect(),o=t.x-n.left,a=t.y-n.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,p=Math.max(8,Math.min(n.width-l-8,o-l/2)),d=a-c-14,m=d>=8?d:Math.min(n.height-c-8,a+14);r.style.left=`${p}px`,r.style.top=`${Math.max(8,m)}px`,r.dataset.side=d>=8?"above":"below",r.style.setProperty("--sl-ga-arrow-x",`${Math.max(12,Math.min(l-12,o-p))}px`)})}function Ai(s,e){s.srEl&&(s.srEl.textContent=e)}function Fs(s,e,t=[]){let i=[],r=Io(t);for(let o of e){let a=s.gaQty.get(o.id);if(!a)continue;let l=jt(o);for(let c of l){let p=(a.get(c.id)??0)-(r.get(`${o.id}\0${c.id??""}`)??0);if(p<=0)continue;let d=s.paidPrice(o.categoryKey,c.id,c.price,o.id);i.push(`<div class="sl-ga" data-ga="${$(o.id)}" data-ga-row-tier="${$(c.id??"")}"><div class="sl-ga-info"><div class="sl-ga-name">${$(o.displayLabel??o.label)}</div><div class="sl-ga-sub">${$(l.length>1?c.label:o.displayType??s.tf("picker.generalAdmission","General admission"))} \xB7 ${$(s.money(d))} \xB7 ${$(De("picker.leftCount",o.available))}</div></div><div class="sl-ga-qty"><button type="button" data-d="-1" aria-label="${$(s.tf("picker.fewer","Fewer"))}">\u2212</button><span>${p}</span><button type="button" data-d="1" aria-label="${$(s.tf("picker.more","More"))}">+</button></div></div>`)}}let n=e.filter(o=>Qe(s.gaQty,o.id)<=0&&!t.some(a=>a.objectId===o.id));return n.length&&i.push(`<div class="sl-ga-areas" data-ga-areas><button type="button" class="sl-ga-areas-toggle" data-ga-areas-toggle aria-expanded="${s.gaAreasExpanded}"><span>${$(s.tf("picker.gaAreasHeading","Areas"))}</span><small>${n.length}</small></button>`+(s.gaAreasExpanded?`<div class="sl-ga-areas-list">${n.map(o=>`<button type="button" class="sl-ga-area-open" data-ga-open="${$(o.id)}"${o.available<=0?" disabled":""}><span class="name">${$(o.displayLabel??o.label)}<small>${$(o.displayType??s.tf("picker.generalAdmission","General admission"))}</small></span><span class="meta">${$(s.money(s.paidPrice(o.categoryKey,null,o.price,o.id)))} \xB7 ${$(o.available>0?De("picker.leftCount",o.available):s.tf("picker.soldOutTitle","Sold out"))}</span></button>`).join("")}</div>`:"")+"</div>"),i.join("")}function js(s,e,t){e.querySelectorAll(".sl-ga .sl-ga-qty button").forEach(i=>{i.addEventListener("click",()=>{let r=i.closest(".sl-ga");if(!r?.dataset.ga)return;let n=t.find(c=>c.id===r.dataset.ga);if(!n)return;let o=r.dataset.gaRowTier?r.dataset.gaRowTier:null,a=Number(i.dataset.d),l=s.gaQty.get(n.id)?.get(o)??0;if(a>0&&Vs(s,n)-Qe(s.gaQty,n.id)<=0){s.toast(ye("picker.maxTicketsForOrder",{count:s.maxTickets}),"warning");return}xt(s.gaQty,n.id,o,Math.max(0,l+a)),s.syncTray()})}),e.querySelector("[data-ga-areas-toggle]")?.addEventListener("click",()=>{s.gaAreasExpanded=!s.gaAreasExpanded,s.syncTray()}),e.querySelectorAll("[data-ga-open]").forEach(i=>{i.addEventListener("click",()=>{let r=t.find(n=>n.id===i.dataset.gaOpen);r&&Mi(s,r,null,i)})})}var Gt='<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 $o=/^data:image\/(?:png|jpe?g|webp|gif|avif);base64,[a-z0-9+/]+={0,2}$/i,Vo=/[\s"'<>`\\]/;function No(s){return s.startsWith("//")?!1:s.startsWith("/")||s.startsWith("./")||s.startsWith("../")}function zo(){try{let s=typeof location>"u"?"":location.origin;return s&&s!=="null"?s:null}catch{return null}}function Xe(s){if(typeof s!="string"||!s||s.length>2e6||s!==s.trim())return!1;if(s.startsWith("data:"))return $o.test(s);if(Vo.test(s))return!1;let e=zo();if(No(s)){if(!e)return!1;try{let t=new URL(s,e);return t.origin===e&&!t.username&&!t.password}catch{return!1}}try{let t=new URL(s);return t.username||t.password?!1:t.protocol==="https:"||e!=null&&t.origin===e}catch{return!1}}var Fo=/^[a-zA-Z0-9._-]+$/;function Hi(s){let e;try{e=new URL(s,"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 i=decodeURIComponent(t[1]),r=decodeURIComponent(t[2]);return!i||!Fo.test(r)?null:{eventKey:i,asset:r}}catch{return null}}function jo(s){try{return/^\/pub\/events\/[^/]+\/assets(?:\/|$)/.test(new URL(s,"https://seatlayer.invalid").pathname)}catch{return!1}}var Ze=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=Hi(e);if(!t)return Promise.resolve(jo(e)||!Xe(e)?null:e);if(t.eventKey!==this.eventKey||!this.load||this.disposed)return Promise.resolve(null);let i=this.pending.get(e);if(i)return i;let r=this.load(this.eventKey,t.asset).then(n=>{let o=URL.createObjectURL(n);return this.disposed?(URL.revokeObjectURL(o),null):(this.created.add(o),o)}).catch(n=>{throw this.pending.delete(e),n});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()}}};import{t as tt}from"@seatlayer/core";import{isAuthoredSeatView as Xo,seatViewDisclosure as Zo}from"@seatlayer/core/view3d/crossfade/panorama";var Gs=`
69
- /* TEST MODE is environment context, not an action. A small squared chip that
70
- flows FIRST in the top-left anchor region: the old rotated corner ribbon sat
71
- at a negative offset and was clipped by the widget root's rounded
72
- overflow:hidden (its ends cut mid-word), and its accent fill made an
73
- environment flag wear the same gold as "buy". Amber warning tone, dashed
74
- border \u2014 reads as a tag, never as a control; the a11y chips wrap beside it
75
- in the same region, so no displacement hack is needed. */
76
- .sl-testbadge{display:inline-flex;align-items:center;padding:5px 10px;border-radius:7px;pointer-events:none;
77
- font-size:10px;font-weight:850;letter-spacing:.13em;line-height:1.2;text-transform:uppercase;white-space:nowrap;
78
- color:var(--sl-warn-text);background:color-mix(in srgb,var(--sl-warn) 13%,var(--sl-surface));
79
- border:1px dashed color-mix(in srgb,var(--sl-warn) 55%,transparent)}
146
+ `+Vo;function Bs(){try{return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches===!0}catch{return!1}}function Pi(s,e){if(!e){s.style.removeProperty("--sl-mo-ox"),s.style.removeProperty("--sl-mo-oy");return}Gt(s,e,s.getBoundingClientRect())}function Gt(s,e,t){let i=t.width||1,n=t.height||1,r=o=>Math.max(0,Math.min(100,o));s.style.setProperty("--sl-mo-ox",`${r((e.x-t.left)/i*100).toFixed(1)}%`),s.style.setProperty("--sl-mo-oy",`${r((e.y-t.top)/n*100).toFixed(1)}%`)}function Ns(s,e,t){let i=s.getBoundingClientRect(),n=t.getBoundingClientRect();Gt(s,e,{left:i.left-n.left,top:i.top-n.top,width:i.width,height:i.height})}function qt(s,e){s.classList.remove("sl-mo-out"),e!==void 0&&Pi(s,e),s.classList.remove("sl-mo-in"),s.offsetWidth,s.classList.add("sl-mo-in")}function $s(s){s.classList.add("sl-mo-stagger");let e=0;for(let t of Array.from(s.children))t.style.setProperty("--sl-mo-i",String(e)),e+=1}function Me(s,e,t={className:"sl-mo-out",duration:G.exit}){let i=()=>{n||(n=!0,window.clearTimeout(r),s.removeEventListener("animationend",i),e?e():s.remove())},n=!1;s.classList.remove("sl-mo-in","sl-mo-slide-up","sl-mo-spring","sl-mo-zoom","sl-mo-rise"),s.classList.add(t.className),s.addEventListener("animationend",i);let r=window.setTimeout(i,Bs()?0:t.duration+60)}var Vs={className:"sl-mo-slide-down",duration:G.exit};function Li(s,e){s.textContent!==e&&(s.textContent=e,s.classList.remove("sl-mo-xfade"),s.offsetWidth,s.classList.add("sl-mo-xfade"))}function Fs(s){if(Bs())return s.onArrive?.(),null;let e=document.createElement("div");e.className="sl-mo-fly sl-mo-host",e.setAttribute("aria-hidden","true"),e.textContent=s.label??"",e.style.left=`${s.from.x}px`,e.style.top=`${s.from.y}px`,e.style.background=s.color??"var(--sl-accent,#6e7bff)",e.style.color=s.ink??"#fff",e.style.setProperty("--sl-fly-dx",`${Math.round(s.to.x-s.from.x)}px`),e.style.setProperty("--sl-fly-dy",`${Math.round(s.to.y-s.from.y)}px`),document.body.appendChild(e);let t=!1,i=()=>{t||(t=!0,window.clearTimeout(n),e.remove(),s.onArrive?.())};e.addEventListener("animationend",i);let n=window.setTimeout(i,G.flight+80);return e}var F=s=>String(s??"").replace(/[&<>"']/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[e]);function Xe(s,e){let t=0;for(let i of s.get(e)?.values()??[])t+=i;return t}function zs(s){let e=[];for(let[t,i]of s)for(let[n,r]of i)r>0&&e.push({areaId:t,tierId:n,qty:r});return e}function js(s){let e=new Map;for(let t of s.keys())e.set(t,Xe(s,t));return e}function wt(s,e,t,i){let n=s.get(e)??new Map;i>0?n.set(t,i):n.delete(t),n.size?s.set(e,n):s.delete(e)}function Gs(s){let e=new Map;for(let t of s)t.objectType!=="ga"||!t.objectId||e.set(t.objectId,(e.get(t.objectId)??0)+(t.quantity??1));return e}function Be(s,e){let t=Gs(e),i=0;for(let n of s.keys())i+=Math.max(0,Xe(s,n)-(t.get(n)??0));return i}function qs(s,e,t){let i=Gs(t),n=0;for(let r of e){let o=s.gaQty.get(r.id);if(!o)continue;let a=i.get(r.id)??0;for(let[l,c]of o){let p=Math.max(0,c-a);a=Math.max(0,a-c),n+=p*s.paidPrice(r.categoryKey,l,Fo(r,l),r.id)}}return n}function Fo(s,e){return e?s.tiers?.find(t=>t.id===e)?.price??s.price:s.price}function Ks(s){let e=[],t=new Map;for(let i of s){if(i.objectType!=="ga"||!i.objectId){e.push({...i,labels:[i.label]});continue}let n=`${i.objectId}\0${i.tierId??""}`,r=t.get(n);if(r){r.quantity=(r.quantity??0)+(i.quantity??1),r.labels.push(i.label);continue}let o={...i,quantity:i.quantity??1,labels:[i.label]};t.set(n,o),e.push(o)}return e}function Us(s,e,t){let i=new Set(t);for(let n of e)n.objectType==="ga"&&n.objectId&&i.has(n.label)&&wt(s,n.objectId,n.tierId??null,0)}function Hi(s,e){if(s.objectType!=="ga")return s.label;let t=e.find(i=>i.id===s.objectId);return t?.displayLabel??t?.label??s.label}function zo(s){let e=new Map;for(let t of s){if(t.objectType!=="ga"||!t.objectId)continue;let i=`${t.objectId}\0${t.tierId??""}`;e.set(i,(e.get(i)??0)+(t.quantity??1))}return e}function Kt(s){let e=s.tiers??[];return e.length>1?e.map(t=>({id:t.id,label:t.name||t.id,price:t.price})):[{id:null,label:s.displayType??we("picker.generalAdmission"),price:s.price}]}function Ws(s,e){let t=s.totalTicketCount()-Xe(s.gaQty,e.id);return Math.max(0,Math.min(e.available,s.maxTickets-t))}function Ii(s,e,t,i){if(xe(s,!1),s.salesClosed){s.toast(s.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}let n=Kt(e),r=s.gaQty.get(e.id),o=Xe(s.gaQty,e.id)>0,a=Ws(s,e);if(a<=0&&!o){s.toast(e.available>0?we("picker.maxTicketsForOrder",{count:s.maxTickets}):s.tf("picker.soldOutTitle","Sold out"),"warning");return}if(s.onGAPromptHook){let u={};for(let[g,m]of r??[])u[g??""]=m;if(s.onGAPromptHook({area:e,selected:u,min:0,max:a,tiers:n,confirm:g=>{Ko(s,e,n,g,a)},cancel:()=>xe(s)})===!0)return}let l=new Map;for(let u of n)l.set(u.id,r?.get(u.id)??0);!o&&a>0&&l.set(n[0].id,1);let c={area:e,tiers:n,draft:l,max:a,reopened:o},p=s.root?.dataset.layout==="narrow",d=document.createElement("div");d.className=p?"sl-ga-scrim sl-mo-scrim":"sl-ga-pop-layer",d.innerHTML=jo(s,c,p),s.root?.appendChild(d),s.gaPromptEl=d,s.gaPromptReturnFocus=i??document.activeElement,p||Uo(s,d,t),s.reducedMotion()&&(d.dataset.motion="reduced"),Qs(s,c),Go(s,d,c),requestAnimationFrame(()=>d.querySelector('[data-ga-step="1"]')?.focus())}function jo(s,e,t){let{area:i,tiers:n}=e,r=n.length>1,o=i.displayLabel??i.label,a=n.map(l=>`<div class="sl-ga-prompt-row" data-ga-tier="${F(l.id??"")}"><div class="sl-ga-prompt-label"><span>${F(r?l.label:s.tf("picker.gaChooseTickets","How many tickets?"))}</span>`+(r?`<small>${F(s.money(s.paidPrice(i.categoryKey,l.id,l.price,i.id)))}</small>`:"")+`</div><div class="sl-ga-stepper" role="group" aria-label="${F(r?l.label:o)}"><button type="button" data-ga-step="-1" aria-label="${F(s.tf("picker.fewer","Fewer"))}">\u2212</button><output data-ga-qty aria-live="polite">0</output><button type="button" data-ga-step="1" aria-label="${F(s.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="${F(we("picker.gaChooseForArea",{area:o}))}"><div class="sl-ga-prompt-head"><div class="sl-ga-prompt-eyebrow">${F(i.displayType??s.tf("picker.generalAdmission","General admission"))}</div><h2 class="sl-ga-prompt-title">${F(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="${F(we("common.close"))}">\xD7</button></div><div class="sl-ga-prompt-body">${a}`+(n.length>1?`<div class="sl-ga-prompt-total"><span>${F(s.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>${F(s.tf("picker.gaRemove","Remove"))}</button>`:`<button type="button" class="sl-ga-prompt-remove" data-ga-cancel>${F(we("common.cancel"))}</button>`)+'<button type="button" class="sl-ga-prompt-confirm" data-ga-confirm></button></div></section>'}function Oi(s){let e=0;for(let t of s.draft.values())e+=t;return e}function Ys(s,e){let t=0;for(let i of e.tiers)t+=(e.draft.get(i.id)??0)*s.paidPrice(e.area.categoryKey,i.id,i.price,e.area.id);return t}function Qs(s,e){let t=s.gaPromptEl;if(!t)return;let i=Oi(e),n=Ys(s,e);t.querySelectorAll("[data-ga-tier]").forEach(c=>{let p=c.dataset.gaTier?c.dataset.gaTier:null,d=e.draft.get(p)??0,u=c.querySelector("[data-ga-qty]");u&&(u.value=String(d)),c.querySelectorAll("[data-ga-step]").forEach(h=>{h.disabled=Number(h.dataset.gaStep)<0?d<=0:i>=e.max})});let r=t.querySelector("[data-ga-sub]");r&&(r.textContent=`${s.money(s.paidPrice(e.area.categoryKey,e.tiers[0].id,e.tiers[0].price,e.area.id))} \xB7 ${De("picker.leftCount",e.area.available)}`);let o=t.querySelector("[data-ga-total]");o&&(o.textContent=s.money(n));let a=t.querySelector("[data-ga-hint]");a&&(a.textContent=i>=e.max&&e.max>0?e.area.available<=e.max?De("picker.leftCount",e.area.available):we("picker.maxTicketsForOrder",{count:s.maxTickets}):"");let l=t.querySelector("[data-ga-confirm]");l&&(l.textContent=e.reopened?De("picker.gaUpdate",i,{count:i}):De("picker.gaAdd",i,{count:i,price:s.money(n)}),l.disabled=i<=0&&!e.reopened)}function Go(s,e,t){e.querySelectorAll("[data-ga-step]").forEach(i=>{i.addEventListener("click",()=>{let n=i.closest("[data-ga-tier]");if(!n)return;let r=n.dataset.gaTier?n.dataset.gaTier:null,o=Number(i.dataset.gaStep),a=t.draft.get(r)??0,l=t.max-Oi(t);t.draft.set(r,Math.max(0,a+(o>0?Math.min(1,l):-1))),Qs(s,t)})}),e.querySelectorAll("[data-ga-cancel]").forEach(i=>i.addEventListener("click",()=>xe(s))),e.querySelector("[data-ga-remove]")?.addEventListener("click",()=>{s.gaQty.delete(t.area.id),xe(s),s.syncTray(),Mi(s,we("picker.gaRemoved",{area:t.area.displayLabel??t.area.label}))}),e.querySelector("[data-ga-confirm]")?.addEventListener("click",()=>{qo(s,t)}),e.addEventListener("mousedown",i=>{i.target===e&&xe(s)}),e.addEventListener("keydown",i=>{if(i.key==="Escape"){i.stopPropagation(),xe(s);return}if(i.key!=="Tab")return;let n=[...e.querySelectorAll('button:not(:disabled),[tabindex]:not([tabindex="-1"])')];if(!n.length)return;let r=n[0],o=n[n.length-1];i.shiftKey&&document.activeElement===r?(i.preventDefault(),o.focus()):!i.shiftKey&&document.activeElement===o&&(i.preventDefault(),r.focus())})}function qo(s,e){let t=Oi(e),i=Ys(s,e);for(let r of e.tiers)wt(s.gaQty,e.area.id,r.id,e.draft.get(r.id)??0);xe(s),s.syncTray();let n=e.area.displayLabel??e.area.label;t>0?Mi(s,De("picker.gaAdded",t,{count:t,area:n,price:s.money(i)})):Mi(s,we("picker.gaRemoved",{area:n}))}function Ko(s,e,t,i,n){if(typeof i=="number")wt(s.gaQty,e.id,t[0].id,Math.max(0,Math.min(n,Math.floor(i))));else{s.gaQty.delete(e.id);let r=n;for(let o of t){let a=Math.max(0,Math.floor(i[o.id??""]??0)),l=Math.min(a,r);r-=l,wt(s.gaQty,e.id,o.id,l)}}s.syncTray()}function xe(s,e=!0){let t=s.gaPromptReturnFocus;s.gaPromptEl&&Me(s.gaPromptEl),s.gaPromptEl=null,s.gaPromptReturnFocus=null,e&&t&&requestAnimationFrame(()=>(t.isConnected?t:s.root)?.focus())}function Uo(s,e,t){let i=s.root,n=e.querySelector(".sl-ga-pop");if(!i||!n||!t)return;let r=i.getBoundingClientRect(),o=t.x-r.left,a=t.y-r.top;e.style.setProperty("--sl-ga-anchor-x",`${o}px`),e.style.setProperty("--sl-ga-anchor-y",`${a}px`),requestAnimationFrame(()=>{let l=n.offsetWidth||260,c=n.offsetHeight||220,p=Math.max(8,Math.min(r.width-l-8,o-l/2)),d=a-c-14,u=d>=8?d:Math.min(r.height-c-8,a+14);n.style.left=`${p}px`,n.style.top=`${Math.max(8,u)}px`,n.dataset.side=d>=8?"above":"below",n.style.setProperty("--sl-ga-arrow-x",`${Math.max(12,Math.min(l-12,o-p))}px`)})}function Mi(s,e){s.srEl&&(s.srEl.textContent=e)}function Xs(s,e,t=[]){let i=[],n=zo(t);for(let o of e){let a=s.gaQty.get(o.id);if(!a)continue;let l=Kt(o);for(let c of l){let p=(a.get(c.id)??0)-(n.get(`${o.id}\0${c.id??""}`)??0);if(p<=0)continue;let d=s.paidPrice(o.categoryKey,c.id,c.price,o.id);i.push(`<div class="sl-ga" data-ga="${F(o.id)}" data-ga-row-tier="${F(c.id??"")}"><div class="sl-ga-info"><div class="sl-ga-name">${F(o.displayLabel??o.label)}</div><div class="sl-ga-sub">${F(l.length>1?c.label:o.displayType??s.tf("picker.generalAdmission","General admission"))} \xB7 ${F(s.money(d))} \xB7 ${F(De("picker.leftCount",o.available))}</div></div><div class="sl-ga-qty"><button type="button" data-d="-1" aria-label="${F(s.tf("picker.fewer","Fewer"))}">\u2212</button><span>${p}</span><button type="button" data-d="1" aria-label="${F(s.tf("picker.more","More"))}">+</button></div></div>`)}}let r=e.filter(o=>Xe(s.gaQty,o.id)<=0&&!t.some(a=>a.objectId===o.id));return r.length&&i.push(`<div class="sl-ga-areas" data-ga-areas><button type="button" class="sl-ga-areas-toggle" data-ga-areas-toggle aria-expanded="${s.gaAreasExpanded}"><span>${F(s.tf("picker.gaAreasHeading","Areas"))}</span><small>${r.length}</small></button>`+(s.gaAreasExpanded?`<div class="sl-ga-areas-list">${r.map(o=>`<button type="button" class="sl-ga-area-open" data-ga-open="${F(o.id)}"${o.available<=0?" disabled":""}><span class="name">${F(o.displayLabel??o.label)}<small>${F(o.displayType??s.tf("picker.generalAdmission","General admission"))}</small></span><span class="meta">${F(s.money(s.paidPrice(o.categoryKey,null,o.price,o.id)))} \xB7 ${F(o.available>0?De("picker.leftCount",o.available):s.tf("picker.soldOutTitle","Sold out"))}</span></button>`).join("")}</div>`:"")+"</div>"),i.join("")}function Zs(s,e,t){e.querySelectorAll(".sl-ga .sl-ga-qty button").forEach(i=>{i.addEventListener("click",()=>{let n=i.closest(".sl-ga");if(!n?.dataset.ga)return;let r=t.find(c=>c.id===n.dataset.ga);if(!r)return;let o=n.dataset.gaRowTier?n.dataset.gaRowTier:null,a=Number(i.dataset.d),l=s.gaQty.get(r.id)?.get(o)??0;if(a>0&&Ws(s,r)-Xe(s.gaQty,r.id)<=0){s.toast(we("picker.maxTicketsForOrder",{count:s.maxTickets}),"warning");return}wt(s.gaQty,r.id,o,Math.max(0,l+a)),s.syncTray()})}),e.querySelector("[data-ga-areas-toggle]")?.addEventListener("click",()=>{s.gaAreasExpanded=!s.gaAreasExpanded,s.syncTray()}),e.querySelectorAll("[data-ga-open]").forEach(i=>{i.addEventListener("click",()=>{let n=t.find(r=>r.id===i.dataset.gaOpen);n&&Ii(s,n,null,i)})})}var Ut='<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 Wo=/^data:image\/(?:png|jpe?g|webp|gif|avif);base64,[a-z0-9+/]+={0,2}$/i,Yo=/[\s"'<>`\\]/;function Qo(s){return s.startsWith("//")?!1:s.startsWith("/")||s.startsWith("./")||s.startsWith("../")}function Xo(){try{let s=typeof location>"u"?"":location.origin;return s&&s!=="null"?s:null}catch{return null}}function Ze(s){if(typeof s!="string"||!s||s.length>2e6||s!==s.trim())return!1;if(s.startsWith("data:"))return Wo.test(s);if(Yo.test(s))return!1;let e=Xo();if(Qo(s)){if(!e)return!1;try{let t=new URL(s,e);return t.origin===e&&!t.username&&!t.password}catch{return!1}}try{let t=new URL(s);return t.username||t.password?!1:t.protocol==="https:"||e!=null&&t.origin===e}catch{return!1}}var Zo=/^[a-zA-Z0-9._-]+$/;function Ri(s){let e;try{e=new URL(s,"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 i=decodeURIComponent(t[1]),n=decodeURIComponent(t[2]);return!i||!Zo.test(n)?null:{eventKey:i,asset:n}}catch{return null}}function Jo(s){try{return/^\/pub\/events\/[^/]+\/assets(?:\/|$)/.test(new URL(s,"https://seatlayer.invalid").pathname)}catch{return!1}}var Je=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=Ri(e);if(!t)return Promise.resolve(Jo(e)||!Ze(e)?null:e);if(t.eventKey!==this.eventKey||!this.load||this.disposed)return Promise.resolve(null);let i=this.pending.get(e);if(i)return i;let n=this.load(this.eventKey,t.asset).then(r=>{let o=URL.createObjectURL(r);return this.disposed?(URL.revokeObjectURL(o),null):(this.created.add(o),o)}).catch(r=>{throw this.pending.delete(e),r});return this.pending.set(e,n),n}dispose(){if(!this.disposed){this.disposed=!0;for(let e of this.created)URL.revokeObjectURL(e);this.created.clear(),this.pending.clear()}}};import{t as st}from"@seatlayer/core";import{isAuthoredSeatView as aa,seatViewDisclosure as la}from"@seatlayer/core/view3d/crossfade/panorama";var Js=`
147
+ /* confirm card: a candidate is not in the tray until Select. Map gestures and
148
+ floating chrome pause while the card owns focus, keeping the camera stable. */
149
+ .sl-picker[data-confirming="true"] .sl-map-host>:not(.sl-confirm){pointer-events:none}
150
+ .sl-picker[data-confirming="true"] .sl-anchor{pointer-events:none;opacity:.28;transition:opacity .16s}
151
+ /* EXCEPT THE ONE THAT ANSWERS THE TAP. Dimming every anchored region while a
152
+ card is up is right for chrome and wrong for the toast: "that seat has just
153
+ been taken" is the REPLY to the tap the card is asking about, and it was
154
+ being told at 28% opacity, behind the card, in a strip that clipped it to
155
+ one ellipsised line. It comes forward instead \u2014 above the card, at full
156
+ opacity, and allowed to wrap. */
157
+ .sl-picker[data-confirming="true"] .sl-anchor[data-region="bottom-center"]{opacity:1;z-index:11}
158
+ /* AND IT NEVER TAKES A TAP FROM THE CARD. The widget lifts this region above
159
+ the card's top edge (see liftToastOverConfirm), but a message that overlaps
160
+ by a pixel must still not be the thing a finger lands on: the two buttons
161
+ underneath are the decision, and the toast is only telling. */
162
+ .sl-picker[data-confirming="true"] .sl-toast,
163
+ .sl-picker[data-confirming="true"] .sl-toast.has-action{pointer-events:none}
164
+ .sl-picker[data-confirming="true"] .sl-side{pointer-events:none;opacity:.58;transition:opacity .16s}
165
+ .sl-confirm{position:absolute;z-index:10;width:276px;max-width:calc(100% - 24px);overflow:hidden;pointer-events:auto;
166
+ background:var(--sl-surface);border:1px solid color-mix(in srgb,var(--sl-line) 70%,var(--sl-text));
167
+ border-radius:15px;box-shadow:0 24px 64px -18px rgba(0,0,0,.72);transform:translate(-50%,calc(-100% - 16px))}
168
+ /* Entrance and exit are the shared anchored moments (.sl-mo-in/.sl-mo-out),
169
+ which animate scale+translate and therefore leave this placement transform
170
+ alone. The card had two private keyframes here; they differed from the
171
+ vocabulary only in being 240ms instead of 260, and one of them was silently
172
+ beating the exit the widget had asked for. */
173
+ .sl-confirm[data-placement="below"]{transform:translate(-50%,16px)}
174
+ .sl-confirm-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(52px,auto) minmax(52px,auto);border-bottom:1px solid var(--sl-line)}
175
+ /* A SEAT WITH NO SECTION GETS THE WHOLE GRID. The builder already drops the
176
+ cell, but the three-column track left Row and Seat squeezed into the right
177
+ third with an empty 1fr of nothing in front of them \u2014 the two facts the
178
+ buyer is checking against the map, rendered smallest. With no section cell
179
+ present the grid is two EQUAL columns and both are centred, so Row and Seat
180
+ read as the identity rather than as an afterthought. */
181
+ .sl-confirm-grid:not(:has(.sl-confirm-sec)){grid-template-columns:1fr 1fr}
182
+ .sl-confirm-grid:not(:has(.sl-confirm-sec)) .sl-confirm-field{text-align:center}
183
+ .sl-confirm-field{min-width:0;padding:12px 11px 10px;border-right:1px solid var(--sl-line)}
184
+ .sl-confirm-field:last-child{border-right:0;text-align:center}
185
+ .sl-confirm-field:nth-child(2){text-align:center}
186
+ .sl-confirm-key{display:block;font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--sl-muted);font-weight:800}
187
+ .sl-confirm-value{display:block;margin-top:4px;color:var(--sl-text);font-size:17px;line-height:1.1;font-weight:850;
188
+ white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
189
+ /* Long venue section names must read in full: smaller type + up to two lines
190
+ beats an ellipsis at identity-confirmation time. Row/seat stay big \u2014 they're
191
+ short and they're what the buyer double-checks against the map. */
192
+ .sl-confirm-sec .sl-confirm-value{font-size:13.5px;line-height:1.25;white-space:normal;
193
+ display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
194
+ /* THE BAND IS A TINT WITH A RAIL, NOT A FILL. A 76% wash of an authored
195
+ category colour is a surface nobody chose: the widget then had to PICK an
196
+ ink for it, and that pick is what decided whether the price was legible \u2014
197
+ per chart, per theme, per category, with no way for a host to correct it.
198
+ An 11% tint keeps the surface the theme's own, so the name and the price
199
+ stay in the theme's own text ink and read in light and dark by construction; the colour
200
+ does its whole job as a 3px rail and a 9px dot, which is how the legend and
201
+ the map already speak it. No ink picking, and no manufactured ink token. */
202
+ .sl-confirm-cat{display:flex;align-items:center;gap:8px;padding:10px 12px;
203
+ background:color-mix(in srgb,var(--sl-cat) 11%,var(--sl-surface));box-shadow:inset 3px 0 0 var(--sl-cat)}
204
+ /* A HAIRLINE, SO A PALE CATEGORY STILL READS. The band is an 11% tint of the
205
+ very colour this dot carries, so a pale or grey category (an arena's "Upper
206
+ Tier") painted a light disc onto a near-identical light ground and simply
207
+ disappeared. The ring is the theme's own ink at 22% rather than a second
208
+ colour: it separates the dot from whatever is behind it in both themes
209
+ without competing with the category for the eye. Border-box keeps the dot
210
+ 9px overall, so nothing around it moves. */
211
+ .sl-confirm-cat .sl-dot{width:9px;height:9px;border:1px solid color-mix(in srgb,var(--sl-text) 22%,transparent)}
212
+ .sl-confirm-cat-name{font-size:13.5px;font-weight:800;color:var(--sl-text);flex:none;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
213
+ /* "112 left" beside the name, never in place of it, and absent when the count
214
+ has not arrived \u2014 a remaining count the buyer cannot trust is worse than no
215
+ count. It is the flexible cell so the name keeps its full width first. */
216
+ .sl-confirm-left{flex:1;min-width:0;color:var(--sl-muted);font-size:11px;font-weight:700;
217
+ white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
218
+ .sl-confirm-cat:not(:has(.sl-confirm-left)) .sl-confirm-cat-name{flex:1}
219
+ .sl-confirm-price{font-size:17px;font-weight:850;color:var(--sl-text);font-variant-numeric:tabular-nums}
220
+ /* The PHONE's identity line and the strip wrapper are in every card's DOM and
221
+ invisible at desktop width. Desktop keeps the eyebrow grid and the colour
222
+ band it has the room for (owner call 2026-08-27); display:contents leaves
223
+ the thumb block laid out in the body exactly where it has always been, so
224
+ the desktop card is byte-for-byte the card it was. */
225
+ .sl-confirm-id{display:none}
226
+ .sl-confirm-strip{display:contents}
227
+ .sl-confirm-pills{display:none}
228
+ .sl-confirm-body{padding:11px 12px 12px}
229
+ .sl-confirm-tiers{display:grid;gap:6px;margin:0 0 9px;padding:0;border:0}
230
+ .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}
231
+ .sl-confirm-tier{display:flex;align-items:center;gap:9px;width:100%;min-height:40px;padding:8px 10px;border:1px solid var(--sl-line);
232
+ border-radius:9px;color:var(--sl-text);background:color-mix(in srgb,var(--sl-bg) 72%,var(--sl-surface));text-align:left}
233
+ .sl-confirm-tier:hover{border-color:color-mix(in srgb,var(--sl-accent) 58%,var(--sl-line))}
234
+ .sl-confirm-tier[aria-pressed="true"]{border-color:var(--sl-accent);background:color-mix(in srgb,var(--sl-accent) 13%,var(--sl-surface));
235
+ box-shadow:inset 3px 0 0 var(--sl-accent)}
236
+ .sl-confirm-tier-copy{min-width:0;flex:1;display:grid;gap:2px}
237
+ .sl-confirm-tier-name{min-width:0;font-size:12.5px;font-weight:800}
238
+ .sl-confirm-tier-note,.sl-tier-note{color:var(--sl-muted);font-size:10.5px;line-height:1.3}
239
+ .sl-confirm-tier[aria-pressed="true"] .sl-confirm-tier-note{color:var(--sl-text)}
240
+ .sl-confirm-tier-price{font-size:13px;font-weight:850;font-variant-numeric:tabular-nums}
241
+ /* THE TWO BUTTONS ARE NOT EQUALS, AND THE ROW SHOULD NOT PRETEND THEY ARE.
242
+ An even split gave the same weight to the decision and to the way out of it.
243
+ Cancel is a third of the row and a quiet ghost; the commit button takes the
244
+ rest. Neither may wrap: a two-line button beside a one-line button reads as
245
+ a layout accident, and on a 310px phone card there is no width to recover
246
+ from it \u2014 which is also why the price stays in the band above rather than on
247
+ the button (owner call 2026-09-02). */
248
+ .sl-confirm-row{display:flex;gap:8px;margin-top:10px}
249
+ .sl-confirm-row button{min-width:0;min-height:44px;padding:9px 12px;border-radius:9px;font-weight:800;font-size:13px;
250
+ line-height:1.15;white-space:nowrap}
251
+ .sl-confirm-cancel{flex:0 0 34%}
252
+ .sl-confirm-add{flex:1 1 auto}
253
+ .sl-confirm-add{position:relative;overflow:hidden;background:var(--sl-accent)!important;color:var(--sl-accent-ink)!important;display:flex;align-items:center;justify-content:center;gap:7px}
254
+ .sl-confirm-add svg{width:16px;height:16px;stroke:currentColor;stroke-width:2.8;fill:none;stroke-linecap:round;stroke-linejoin:round}
255
+ /* THE PRESS IS A MOMENT, NOT A DISAPPEARANCE. Committing used to remove the
256
+ card on the click, so the one control that decides the purchase gave no
257
+ answer at all \u2014 the card was simply gone and something moved somewhere else.
258
+ The button now fills left to right in its own ink while the tick draws and
259
+ the word turns to "Added"; the card leaves after that, not during it (see
260
+ CONFIRM_ADD_SWEEP_MS, which owns the same duration on the widget's side).
261
+
262
+ The sweep is a scaleX of an overlay, so it composites on one layer and never
263
+ touches layout; the content sits above it on its own stacking level rather
264
+ than being repainted under a moving background. */
265
+ .sl-confirm-add>*{position:relative;z-index:1}
266
+ .sl-confirm-add svg{flex:none}
267
+ .sl-confirm-add-t{min-width:0}
268
+ .sl-confirm-add::before{content:'';position:absolute;inset:0;z-index:0;transform:scaleX(0);transform-origin:left center;
269
+ background:color-mix(in srgb,var(--sl-accent-ink) 20%,transparent)}
270
+ .sl-confirm-add.is-adding{pointer-events:none}
271
+ .sl-confirm-add.is-adding::before{animation:slAddSweep 360ms var(--slm-mo-out) both}
272
+ .sl-confirm-add.is-adding svg{stroke-dasharray:24;animation:slAddCheck 360ms var(--slm-mo-out) both}
273
+ @keyframes slAddSweep{from{transform:scaleX(0)}to{transform:scaleX(1)}}
274
+ @keyframes slAddCheck{from{stroke-dashoffset:24}to{stroke-dashoffset:0}}
275
+ /* THE INVITATION. A confirm card arrives with two buttons and no indication
276
+ which one carries the decision \u2014 on a phone, over a map the buyer is still
277
+ reading, the commit button is easy to leave sitting there. So it asks once:
278
+ a highlight travels across it shortly after the card lands, and then it
279
+ breathes, quietly, until the card is touched at all.
280
+
281
+ It STOPS at the first sign of a human (see showConfirm) rather than running
282
+ for a fixed time, because an invitation that keeps being made after it has
283
+ been received is nagging. The glow is a box-shadow, which the button's own
284
+ overflow clip does not touch \u2014 that clips its CONTENT, not its shadow \u2014 and
285
+ the 6px spread still fits inside the card body's own padding. */
286
+ .sl-confirm-add-invite{animation:slAddBreathe 2.4s var(--slm-mo-inout) 1s infinite}
287
+ .sl-confirm-add-invite::after{content:'';position:absolute;inset:0;z-index:0;pointer-events:none;
288
+ background:linear-gradient(100deg,transparent 32%,color-mix(in srgb,var(--sl-accent-ink) 24%,transparent) 50%,transparent 68%);
289
+ transform:translateX(-100%);animation:slAddShimmer 700ms var(--slm-mo-out) 300ms both}
290
+ @keyframes slAddShimmer{from{transform:translateX(-100%)}to{transform:translateX(100%)}}
291
+ @keyframes slAddBreathe{
292
+ 0%,100%{box-shadow:0 0 0 0 color-mix(in srgb,var(--sl-accent) 35%,transparent);transform:scale(1)}
293
+ 50%{box-shadow:0 0 0 6px color-mix(in srgb,var(--sl-accent) 35%,transparent);transform:scale(1.02)}}
294
+ /* The press supersedes the invitation the instant it happens \u2014 the sweep and a
295
+ breath running together would read as two different answers to one tap. */
296
+ .sl-confirm-add.is-adding::after{animation:none;opacity:0}
297
+ /* Reduced motion still gets the STATE \u2014 filled, ticked, "Added" \u2014 with none of
298
+ the travel. The widget also skips the wait entirely on this setting, so this
299
+ only has to be correct for the frame it exists. */
300
+ @media (prefers-reduced-motion:reduce){
301
+ .sl-confirm-add.is-adding::before{animation:none;transform:scaleX(1)}
302
+ .sl-confirm-add.is-adding svg{animation:none;stroke-dasharray:none}
303
+ .sl-confirm-add-invite,.sl-confirm-add-invite::after{animation:none}
304
+ .sl-confirm-add-invite::after{opacity:0}
305
+ }
306
+ .sl-confirm-cancel{background:color-mix(in srgb,var(--sl-line) 44%,transparent)!important;border:1px solid var(--sl-line)!important;color:var(--sl-muted)!important}
307
+ .sl-confirm-cancel:hover{color:var(--sl-text)}
308
+ .sl-picker[data-layout="narrow"] .sl-confirm{left:50%!important;top:auto!important;bottom:14px;width:min(310px,calc(100% - 24px));
309
+ transform:translateX(-50%);animation:slConfirmMobileIn .24s cubic-bezier(.2,.8,.2,1) both}
310
+ /* THE CARD MUST NEVER COVER THE SEAT IT IS ASKING ABOUT, AND MUST NOT ABANDON
311
+ IT EITHER. The phone card rests on the bottom edge, so a tap low on the map
312
+ put a 213px card straight over the seat at y=700 \u2014 the buyer was asked to
313
+ confirm a seat the confirmation had just hidden. Pinning it to the top of
314
+ the map instead only traded that for a card at the opposite end of the
315
+ screen from the seat it describes.
316
+
317
+ So in this state the card HUGS the seat: reanchorConfirm writes an inline
318
+ bottom offset that puts the card's lower edge a gap above the seat's screen
319
+ point, clamped so the card's top never rises past the map's inset. No rule
320
+ is needed here for the geometry \u2014 the attribute is the state, the widget
321
+ owns the number, and that is the property this card already sits on, so
322
+ nothing has to change which edge owns it. See narrowConfirmPlacement. */
323
+ /* THE PHONE CONFIRMATION MUST BE CHECKABLE (owner review 2026-09-01). Packing
324
+ category, section, row and seat into one sentence made every fact compete
325
+ for the same ellipsis \u2014 exactly when the buyer is verifying the tap. Normal
326
+ phone layouts now reuse the desktop hierarchy: three labelled identity
327
+ cells, then a separate category + price strip. Tighter phone spacing keeps
328
+ the hierarchy to roughly one extra row rather than restoring the old tall
329
+ card. Only a genuinely short compact host falls back to the ticket-stub
330
+ line below, where preserving the two decision buttons is the harder limit. */
331
+ .sl-picker[data-layout="narrow"] .sl-confirm-grid{display:grid;
332
+ grid-template-columns:minmax(0,1.12fr) minmax(0,1fr) minmax(52px,.58fr)}
333
+ /* The phone's three-cell track is more specific than the section-less rule
334
+ above, so it has to be answered at the same specificity or a phone keeps
335
+ building a grid for a cell that is not there. */
336
+ .sl-picker[data-layout="narrow"] .sl-confirm-grid:not(:has(.sl-confirm-sec)){grid-template-columns:1fr 1fr}
337
+ .sl-picker[data-layout="narrow"] .sl-confirm-field{padding:7px 8px 6px}
338
+ .sl-picker[data-layout="narrow"] .sl-confirm-key{font-size:8.5px;letter-spacing:.1em}
339
+ .sl-picker[data-layout="narrow"] .sl-confirm-value{margin-top:2px;font-size:15px}
340
+ .sl-picker[data-layout="narrow"] .sl-confirm-sec .sl-confirm-value{font-size:12.5px;line-height:1.2}
341
+ .sl-picker[data-layout="narrow"] .sl-confirm-cat{display:flex;padding:7px 10px}
342
+ .sl-picker[data-layout="narrow"] .sl-confirm-cat-name{font-size:12.5px}
343
+ .sl-picker[data-layout="narrow"] .sl-confirm-price{font-size:15px}
344
+ .sl-picker[data-layout="narrow"] .sl-confirm-id{display:none;align-items:center;gap:7px;padding:10px 10px 0;min-height:28px}
345
+ .sl-picker[data-layout="narrow"][data-density="compact"] .sl-confirm-grid,
346
+ .sl-picker[data-layout="narrow"][data-density="compact"] .sl-confirm-cat{display:none}
347
+ .sl-picker[data-layout="narrow"][data-density="compact"] .sl-confirm-id{display:flex}
348
+ .sl-confirm-dot{flex:none;width:10px;height:10px;border-radius:50%;
349
+ box-shadow:0 0 0 2px color-mix(in srgb,var(--sl-surface) 70%,transparent),0 0 0 3px color-mix(in srgb,var(--sl-line) 80%,transparent)}
350
+ .sl-confirm-who{flex:1;min-width:0;overflow:hidden;display:flex;align-items:baseline;font-size:14px;font-weight:600;
351
+ line-height:1.25;color:var(--sl-text);white-space:nowrap}
352
+ /* WHAT GIVES GROUND, and it is not the venue's name. "Upper Grand Circle
353
+ Balcony Left Wing \xB7 Row A \xB7 Seat 1" does not fit beside a price at 310px, and
354
+ letting the only shrinkable item absorb all of it ellipsized the section name
355
+ to NOTHING \u2014 the card opened with a bare "\xB7 Row A \xB7 Seat 1". So the order is
356
+ explicit: row, seat and the price never move, because those are what the
357
+ buyer matches against the seat under their finger and against their wallet;
358
+ the section name is the one thing that ellipsizes, and only after it has kept
359
+ a floor wide enough to still read as a name. */
360
+ .sl-confirm-place{flex:0 1 auto;min-width:5.5em;overflow:hidden;text-overflow:ellipsis}
361
+ .sl-confirm-pos{flex:none;white-space:pre}
362
+ .sl-confirm-idprice{flex:none;font-size:15px;font-weight:800;color:var(--sl-text);font-variant-numeric:tabular-nums}
363
+ .sl-confirm-id .sl-cx-mark{flex:none}
364
+ /* The strip: full-bleed inside the card radius. A bordered, inset thumbnail
365
+ read as a widget pasted into the card; the same picture edge to edge reads as
366
+ the card being about that seat. */
367
+ /* THE SCRIM IS THE TOKEN HERE, and deliberately not a theme colour.
368
+ What sits behind these pills is the ORGANIZER'S PHOTOGRAPH, not the widget's
369
+ surface, so --sl-surface/--sl-text say nothing about whether the label will
370
+ be readable: a light theme over a night-time auditorium shot would put dark
371
+ ink on a dark picture. The plate is therefore its own scrim, named once
372
+ here and spent by every pill below, and it is dark in both themes because a
373
+ photo can be anything. Measured against the worst case \u2014 a pure white
374
+ photograph \u2014 the composite is rgb(78,81,87) and white ink on it is 7.5:1.
375
+ Everything that is NOT over a photo (the identity line, the price, the
376
+ no-photo rail) uses the theme tokens, which is where they belong. */
377
+ .sl-picker[data-layout="narrow"] .sl-confirm-strip{position:relative;display:block;margin:0;
378
+ --sl-pill-plate:rgba(10,14,22,.72);--sl-pill-ink:#fff}
379
+ .sl-picker[data-layout="narrow"] .sl-confirm-thumbwrap{height:64px;margin:0;border:0;border-radius:0}
380
+ .sl-picker[data-layout="narrow"] .sl-confirm-pills{position:absolute;right:6px;bottom:6px;display:flex;align-items:center;gap:6px}
381
+ /* The badge IS the phone's view pill \u2014 the desktop element restyled rather
382
+ than a second control saying the same thing. With no photo the whole rail is
383
+ muted and the pills move left, because a right-aligned pair floating on
384
+ nothing has no anchor. */
385
+ .sl-picker[data-layout="narrow"] .sl-confirm-thumb-badge,
386
+ .sl-picker[data-layout="narrow"] .sl-confirm-viewbtn{position:absolute;left:6px;bottom:6px;top:auto;right:auto;
387
+ width:auto;margin:0;display:inline-flex;align-items:center;gap:5px;min-height:28px;padding:5px 10px;
388
+ border:1px solid transparent;border-radius:999px;font-size:11px;font-weight:800;
389
+ color:var(--sl-pill-ink);background:var(--sl-pill-plate);backdrop-filter:blur(3px);white-space:nowrap}
390
+ .sl-picker[data-layout="narrow"] .sl-confirm-viewbtn{position:relative;left:auto;bottom:auto}
391
+ .sl-picker[data-layout="narrow"] .sl-confirm-strip:not(:has(.sl-confirm-thumbwrap)){
392
+ display:flex;align-items:center;gap:6px;height:44px;padding:0 6px;
393
+ background:color-mix(in srgb,var(--sl-line) 26%,transparent)}
394
+ .sl-picker[data-layout="narrow"] .sl-confirm-strip:not(:has(.sl-confirm-thumbwrap)) .sl-confirm-pills{
395
+ position:relative;right:auto;bottom:auto}
396
+ .sl-picker[data-layout="narrow"] .sl-confirm-strip:not(:has(.sl-confirm-thumbwrap)) .sl-confirm-viewbtn,
397
+ .sl-picker[data-layout="narrow"] .sl-confirm-strip:not(:has(.sl-confirm-thumbwrap)) .sl-confirm-pill{
398
+ color:var(--sl-text)!important;background:var(--sl-surface)!important;border-color:var(--sl-line)!important;backdrop-filter:none}
399
+ /* One pill shape for the 3D action, carrying its own dark plate so it stays
400
+ legible over any photograph. */
401
+ .sl-picker[data-layout="narrow"] .sl-confirm-pills{display:flex}
402
+ .sl-confirm-pill{display:inline-flex;align-items:center;gap:5px;min-height:28px;padding:5px 10px!important;
403
+ border:1px solid transparent!important;border-radius:999px!important;font-size:11px;font-weight:800;
404
+ color:var(--sl-pill-ink,#fff)!important;background:var(--sl-pill-plate,rgba(10,14,22,.72))!important;
405
+ backdrop-filter:blur(3px);white-space:nowrap}
406
+ .sl-confirm-pill svg{width:13px;height:13px;stroke:currentColor;stroke-width:1.9;fill:none;stroke-linecap:round;stroke-linejoin:round}
407
+ /* Distance stays \u2014 it is geometric and defensible \u2014 as a caption beside the
408
+ pills rather than a line of its own under them. */
409
+ .sl-picker[data-layout="narrow"] .sl-confirm-sight{position:absolute;right:6px;top:6px;margin:0;
410
+ font-size:10px;font-weight:700;color:var(--sl-pill-ink);background:var(--sl-pill-plate);border-radius:999px;padding:3px 8px}
411
+ /* The full-width 3D button is the pill's desktop half; only one of them is
412
+ ever visible. */
413
+ .sl-picker[data-layout="narrow"] .sl-confirm-3d{display:none}
414
+ /* CLEAR AIR ABOVE THE BUTTONS. Hiding the full-width 3D button took its 9px
415
+ top margin with it, and the photo is now full-bleed \u2014 so the picture ran
416
+ straight into Cancel/Select with only the body padding between them, and the
417
+ two committing buttons read as part of the photo block. 12px of body padding
418
+ restores the separation, and a row that follows tier choices or a caution
419
+ note keeps its own 10px so the gap never depends on what is above it. The
420
+ strip carries no margin of its own \u2014 the body's padding IS the gap under the
421
+ identity line, and having both stacked 20px of air above the photo. */
422
+ .sl-picker[data-layout="narrow"] .sl-confirm-body{padding:8px 10px 10px}
423
+ .sl-picker[data-layout="narrow"] .sl-confirm-tier{min-height:38px;padding:7px 9px}
424
+ .sl-picker[data-layout="narrow"] .sl-confirm-row{margin-top:0}
425
+ .sl-picker[data-layout="narrow"] .sl-confirm-row:not(:first-child){margin-top:10px}
426
+ .sl-picker[data-layout="narrow"] .sl-confirm-row button{min-height:44px}
80
427
 
81
- /* "Need more time?" extend prompt (flows in the bottom-center region, above the toast) */
82
- .sl-extend{transform:translateY(6px);
83
- display:none;align-items:center;gap:12px;max-width:100%;background:var(--sl-surface);border:1px solid var(--sl-line);
84
- color:var(--sl-text);border-radius:14px;padding:10px 12px 10px 16px;box-shadow:0 18px 50px -18px rgba(0,0,0,.6);
85
- opacity:0;transition:opacity .2s,transform .2s}
86
- .sl-extend.on{display:flex;opacity:1;transform:translateY(0)}
87
- .sl-extend-txt{font-size:12.5px;font-weight:600;line-height:1.35}
88
- .sl-extend-txt b{font-variant-numeric:tabular-nums}
89
- .sl-extend-btn{flex:none;padding:8px 14px;border-radius:999px;font-weight:800;font-size:12.5px;
90
- background:var(--sl-accent);color:var(--sl-accent-ink);transition:filter .15s,opacity .15s}
91
- .sl-extend-btn:hover{filter:brightness(1.08)}
92
- .sl-extend-btn:disabled{opacity:.62;cursor:not-allowed}
428
+ /* Plain "View from here" action shown when no real photo exists (the synthetic
429
+ thumb is suppressed at card size \u2014 full-screen is where it earns its keep). */
430
+ .sl-confirm-viewbtn{width:100%;margin-top:9px;padding:8px;border-radius:8px;border:1px solid var(--sl-line);
431
+ display:flex;align-items:center;justify-content:center;gap:7px;font-size:12px;font-weight:800;
432
+ color:var(--sl-text);background:transparent;transition:border-color .15s,background .15s}
433
+ .sl-confirm-viewbtn:hover,.sl-confirm-viewbtn:focus-visible{border-color:var(--sl-accent);background:color-mix(in srgb,var(--sl-accent) 10%,transparent)}
434
+ /* confirm-card "See it in 3D" / "View from this seat" action \u2014 the purchase-
435
+ moment bridge into the cinematic. Styled like the view-from-seat button. */
436
+ .sl-confirm-3d{width:100%;margin-top:9px;padding:8px;border-radius:8px;border:1px solid var(--sl-line);
437
+ display:flex;align-items:center;justify-content:center;gap:7px;font-size:12px;font-weight:800;
438
+ color:var(--sl-text);background:color-mix(in srgb,var(--sl-accent) 12%,transparent);transition:border-color .15s,background .15s}
439
+ .sl-confirm-3d:hover,.sl-confirm-3d:focus-visible{border-color:var(--sl-accent);background:color-mix(in srgb,var(--sl-accent) 20%,transparent)}
440
+ .sl-confirm-3d svg{width:15px;height:15px;stroke:currentColor;stroke-width:1.9;fill:none;stroke-linecap:round;stroke-linejoin:round}
93
441
 
94
- /* booked confirmation overlay (covers the widget once the held seats are sold) */
95
- .sl-booked{position:absolute;inset:0;z-index:11;display:flex;flex-direction:column;align-items:center;
442
+ /* view-from-seat button on the confirm popover */
443
+ /* Eager sightline preview inside the confirm card */
444
+ .sl-confirm-thumbwrap{position:relative;display:block;width:100%;height:74px;margin:0 0 8px;padding:0!important;
445
+ border-radius:9px;overflow:hidden;border:1px solid var(--sl-line);cursor:pointer}
446
+ .sl-confirm-thumb{display:block;width:100%;height:100%;object-fit:cover}
447
+ /* The thumbnail leaving the card when its image never arrives: height and
448
+ opacity only, so the card resizes rather than jumping. Reduced motion skips
449
+ the transition entirely \u2014 the block is simply removed. */
450
+ .sl-confirm-thumb-out{overflow:hidden;transition:height 160ms ease,opacity 160ms ease}
451
+ @media (prefers-reduced-motion:reduce){.sl-confirm-thumb-out{transition:none}}
452
+ .sl-confirm-thumb-badge{position:absolute;right:7px;top:7px;display:inline-flex;align-items:center;gap:5px;
453
+ font-size:10px;font-weight:700;color:#fff;background:rgba(10,14,22,0.72);border-radius:12px;padding:4px 9px;backdrop-filter:blur(3px)}
454
+ .sl-confirm-sight{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--sl-muted);margin-bottom:2px}
455
+ .sl-confirm-view{width:100%;margin-top:9px;padding:8px;border-radius:8px;border:1px solid var(--sl-line);
456
+ color:var(--sl-text);font-weight:700;font-size:12px;display:flex;align-items:center;justify-content:center;gap:7px}
457
+ .sl-confirm-view:hover{border-color:var(--sl-muted)}
458
+ .sl-confirm-view svg{width:14px;height:14px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
459
+ `;var en=`
460
+ /* Test mode is environment context, not an action. The chip flows in the
461
+ top-left anchor region: the old rotated corner ribbon sat at a negative
462
+ offset and was clipped by the widget root's rounded overflow:hidden (its
463
+ ends cut mid-word), and its accent fill made an environment flag wear the
464
+ same gold as "buy". Amber warning tone, never the accent; the a11y chips
465
+ wrap beside it in the same region, so no displacement hack is needed. */
466
+ .sl-testbadge{display:inline-flex;align-items:center;gap:7px;height:26px;padding:0 10px 0 8px;border-radius:999px;
467
+ font-size:11px;font-weight:700;letter-spacing:.01em;line-height:1;text-transform:none;white-space:nowrap;
468
+ color:var(--sl-warn-text);background:color-mix(in srgb,var(--sl-warn) 16%,var(--sl-surface));
469
+ border:1px solid color-mix(in srgb,var(--sl-warn) 50%,transparent)}
470
+ /* A SOLID PILL, NOT A SHOUT. Tracked-out capitals in a broken outline read as
471
+ a warning sticker slapped over the venue; this is an environment flag, and
472
+ the tone it wants is the one a status dot has. Every colour is mixed from
473
+ --sl-warn, so a host that retones its warning colour retones this with it \u2014
474
+ which is also why the amber survives both themes without a second rule.
475
+ The label's case is decided in TypeScript, not here: see sentenceCaseShout. */
476
+ .sl-testbadge::before{content:'';flex:none;width:7px;height:7px;border-radius:50%;
477
+ background:var(--sl-warn);box-shadow:0 0 0 3px color-mix(in srgb,var(--sl-warn) 22%,transparent)}
478
+
479
+ /* "Need more time?" extend prompt (flows in the bottom-center region, above the toast) */
480
+ .sl-extend{transform:translateY(6px);
481
+ display:none;align-items:center;gap:12px;max-width:100%;background:var(--sl-surface);border:1px solid var(--sl-line);
482
+ color:var(--sl-text);border-radius:14px;padding:10px 12px 10px 16px;box-shadow:0 18px 50px -18px rgba(0,0,0,.6);
483
+ opacity:0;transition:opacity .2s,transform .2s}
484
+ .sl-extend.on{display:flex;opacity:1;transform:translateY(0)}
485
+ .sl-extend-txt{font-size:12.5px;font-weight:600;line-height:1.35}
486
+ .sl-extend-txt b{font-variant-numeric:tabular-nums}
487
+ .sl-extend-btn{flex:none;padding:8px 14px;border-radius:999px;font-weight:800;font-size:12.5px;
488
+ background:var(--sl-accent);color:var(--sl-accent-ink);transition:filter .15s,opacity .15s}
489
+ .sl-extend-btn:hover{filter:brightness(1.08)}
490
+ .sl-extend-btn:disabled{opacity:.62;cursor:not-allowed}
491
+
492
+ /* booked confirmation overlay (covers the widget once the held seats are sold) */
493
+ .sl-booked{position:absolute;inset:0;z-index:11;display:flex;flex-direction:column;align-items:center;
96
494
  justify-content:center;gap:12px;text-align:center;padding:28px;background:var(--sl-bg);opacity:0;visibility:hidden;
97
495
  pointer-events:none;transition:opacity .34s ease,visibility 0s linear .34s}
98
496
  .sl-booked.on{opacity:1;visibility:visible;pointer-events:auto;transition:opacity .34s ease,visibility 0s}
@@ -105,9 +503,27 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
105
503
  .sl-booked-title{font-weight:800;font-size:19px;color:var(--sl-text)}
106
504
  .sl-booked-sub{font-size:13px;color:var(--sl-muted);line-height:1.5;max-width:320px}
107
505
  .sl-booked-seats{font-weight:700;color:var(--sl-text)}
506
+ /* WHICH SEATS, AND A WAY BACK. The overlay covers the whole widget, so the map
507
+ the buyer would otherwise glance at is gone \u2014 the seats have to be named
508
+ here, and there has to be a control on an overlay that owns the screen. */
509
+ .sl-booked-list{list-style:none;display:flex;flex-direction:column;gap:4px;max-width:320px;
510
+ max-height:132px;overflow-y:auto;font-size:12.5px;font-weight:600;color:var(--sl-text)}
511
+ .sl-booked-list:empty{display:none}
512
+ .sl-booked-list li{padding:5px 12px;border-radius:999px;background:color-mix(in srgb,var(--sl-line) 32%,transparent);
513
+ white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
514
+ .sl-booked-qty{color:var(--sl-muted);font-weight:700;font-variant-numeric:tabular-nums}
515
+ .sl-booked-back{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 16px 0 12px;border-radius:999px;
516
+ border:1px solid var(--sl-line);color:var(--sl-text);background:var(--sl-surface);font-size:12.5px;font-weight:750;
517
+ transition:border-color .15s,background .15s}
518
+ .sl-booked-back:hover,.sl-booked-back:focus-visible{border-color:var(--sl-accent);
519
+ background:color-mix(in srgb,var(--sl-accent) 8%,transparent)}
520
+ .sl-booked-back svg{width:14px;height:14px;stroke:currentColor;stroke-width:2.4;fill:none;stroke-linecap:round;stroke-linejoin:round}
108
521
  .sl-booked.on .sl-booked-title,.sl-booked.on .sl-booked-sub{animation:slCopyRise .42s ease-out both}
522
+ .sl-booked.on .sl-booked-list,.sl-booked.on .sl-booked-back{animation:slCopyRise .42s ease-out both}
109
523
  .sl-booked.on .sl-booked-title{animation-delay:.22s}
110
524
  .sl-booked.on .sl-booked-sub{animation-delay:.3s}
525
+ .sl-booked.on .sl-booked-list{animation-delay:.36s}
526
+ .sl-booked.on .sl-booked-back{animation-delay:.42s}
111
527
 
112
528
  /* sold-out overlay \u2014 every SEATED category's live availability is 0. This is
113
529
  informational only: no waitlist workflow exists. Suppressed when GA areas
@@ -272,7 +688,7 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
272
688
  .sl-pg-switch:hover{border-style:solid;color:var(--sl-text);border-color:var(--sl-accent)}
273
689
  @media(prefers-reduced-motion:reduce){.sl-tip{animation:none!important}.sl-tip,.sl-tip-switch,.sl-pg-switch{transition:none!important}}
274
690
  @media(max-width:639px){.sl-confirm-group-dates{width:min(340px,calc(100% - 20px))}.sl-confirm-date{min-height:32px}}
275
- `;var qs=`
691
+ `;var tn=`
276
692
  /* 3D venue overlay \u2014 mounts over the (paused) Konva stage inside the map host.
277
693
  Carries its own gradient so it paints instantly before the scene builds, and
278
694
  cross-fades on enter/exit via a compositor-only opacity transition. Sits below
@@ -293,14 +709,23 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
293
709
  .sl-view3d-loading::before{content:"";width:18px;height:18px;border-radius:50%;
294
710
  border:2px solid rgba(217,226,242,.28);border-top-color:#d9e2f2;animation:slSpin .8s linear infinite}
295
711
  [data-view3d=on] .sl-chips,[data-view3d=on] .sl-rungs{display:none}
296
- .sl-view3d-back{position:absolute;top:12px;left:12px;z-index:2;display:inline-flex;align-items:center;gap:6px;
712
+ /* Region chrome, not an absolutely positioned overlay child. It used to sit at
713
+ top:12px/left:12px INSIDE the 3D overlay, which is exactly where the
714
+ picker's own top-left anchor region already is \u2014 so it landed on top of the
715
+ test-mode chip. It keeps its dark glass, because it floats over a rendered
716
+ venue rather than over the picker's surface and has to read the same in a
717
+ light and a dark host. */
718
+ .sl-view3d-back{display:inline-flex;align-items:center;gap:6px;
297
719
  min-height:44px;padding:7px 13px 7px 9px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.03em;
298
720
  color:#e6edf3;background:rgba(10,14,20,.62);border:1px solid rgba(255,255,255,.22);backdrop-filter:blur(6px)}
299
721
  .sl-view3d-back:hover,.sl-view3d-back:focus-visible{background:rgba(16,22,30,.82);border-color:rgba(255,255,255,.4)}
300
722
  .sl-view3d-back svg{width:15px;height:15px;stroke:currentColor;stroke-width:2.4;fill:none;stroke-linecap:round;stroke-linejoin:round}
301
723
  /* Map|3D already exits an overview to the 2D map. Reserve Back for the one
302
- state where it adds meaning: returning from an exact seat to the venue. */
303
- .sl-view3d:not(.is-seat-focused) .sl-view3d-back{display:none}
724
+ state where it adds meaning: returning from an exact seat to the venue.
725
+ The state is read off the ROOT now: the button no longer descends from the
726
+ overlay that used to carry the class, and the root is the ancestor the
727
+ overlay and the chrome regions share. */
728
+ .sl-picker:not([data-view3d-seat="on"]) .sl-view3d-back{display:none}
304
729
  /* Only rendered when the host has suppressed the picker's own zoom stack, and
305
730
  then it belongs with the floating map controls at the bottom-right - the
306
731
  top-right is the panel chevron's corner. */
@@ -309,59 +734,99 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
309
734
  border:1px solid rgba(255,255,255,.22);backdrop-filter:blur(6px)}
310
735
  .sl-view3d-fs:hover,.sl-view3d-fs:focus-visible{background:rgba(16,22,30,.82);border-color:rgba(255,255,255,.4)}
311
736
  /* Venue navigation inside 3D: levels (isolate a floor) and areas (fly to a zone).
312
- Bottom-LEFT, clear of the module's own chips (Overview bottom-right, 360
313
- bottom-centre) and of the bottom-sheeted confirm card. Horizontally scrollable
314
- so a venue with many zones never pushes the rail off a phone screen.
315
-
316
- EVERY WIDTH HERE IS RELATIVE TO THE RAIL, NEVER TO THE WINDOW. These three
317
- rules used to size off 100vw, which contradicts the one contract this widget
318
- states about itself: it adapts to a full-screen takeover, an inline div in a
319
- content page, or a popup, and its breakpoints key off the CONTAINER, never the
320
- viewport. A 390 px picker embedded in a 1400 px page asked for
321
- calc(100vw - 180px) = 1220 inside a 390 px rail.
322
-
323
- MEASURED, IT DID NOT OVERFLOW: the scroll parent is a flex container, so the
324
- over-large declaration was shrunk back to the rail and both the old and new
325
- rules resolve to 364 px in situ. So this is a latent correctness fix, not a
326
- visible bug -- the numbers were wrong and were being covered for by a
327
- flex-shrink one level up. Left as 100% because the next person to change that
328
- parent's display should not inherit a rule that only works by accident. */
329
- .sl-view3d-nav{position:absolute;left:12px;bottom:16px;z-index:3;display:flex;flex-direction:column;gap:6px;
330
- max-width:calc(100% - 150px);pointer-events:none}
331
- .sl-view3d-nav > div{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;pointer-events:auto;
332
- padding:1px;-webkit-overflow-scrolling:touch}
737
+ Horizontally scrollable so a venue with many zones never pushes the rail off
738
+ a phone screen.
739
+
740
+ IT HAS NO ORIGIN OF ITS OWN ANY MORE. The rail used to be
741
+ position:absolute;left:12px;bottom:16px inside the 3D overlay -- and the
742
+ picker's bottom-left anchor region is position:absolute;left:12px;bottom:12px
743
+ over the same map. Two absolute origins aimed at one corner: at 1280x900 the
744
+ accessibility menu was painted over the first pill and "Arena" read as "na".
745
+ The rail now flows IN that region, under the accessibility button and nearest
746
+ the map's bottom edge (see buildView3dNav), so the region's 12px gap keeps
747
+ them apart at every width instead of the two numbers agreeing by luck.
748
+
749
+ EVERY WIDTH IS RELATIVE TO THE MAP, NEVER TO THE WINDOW. The width budget
750
+ moved up to the region with the positioning, and it stays a percentage for
751
+ the reason it always did: this widget adapts to a full-screen takeover, an
752
+ inline div in a content page, or a popup, and its breakpoints key off the
753
+ CONTAINER. These rules once sized off 100vw, so a 390px picker embedded in a
754
+ 1400px page asked for calc(100vw - 180px) = 1220 inside a 390px rail. */
755
+ /* ONE ROW OF CHIPS OVER THE VENUE, IN THE BACK BUTTON'S OWN CLOTHES.
756
+ The expanded rail used to be a framed panel: a full-width "Close" bar with a
757
+ compass on it, over chips dressed as primary buttons. That is a dialog, and
758
+ it read as one \u2014 on a phone it took a third of the screen to offer four
759
+ zone names. There is no panel now, the chips wear the same dark glass as the
760
+ Back control beside them, and the close is a round \u2715 at the END of the row
761
+ rather than a bar above it. */
762
+ .sl-view3d-nav{display:flex;flex-direction:row;align-items:center;gap:6px;max-width:100%;
763
+ overflow-x:auto;scrollbar-width:none}
764
+ .sl-view3d-nav::-webkit-scrollbar{display:none}
765
+ .sl-view3d-nav > div{display:flex;align-items:center;gap:6px;flex:0 1 auto;min-width:0;
766
+ overflow-x:auto;scrollbar-width:none;pointer-events:auto;padding:1px;-webkit-overflow-scrolling:touch}
333
767
  .sl-view3d-nav > div::-webkit-scrollbar{display:none}
334
- .sl-view3d-nav button{flex:0 0 auto;min-height:32px;padding:7px 12px;border-radius:999px;white-space:nowrap;
335
- font-size:11.5px;font-weight:700;color:#c9d4ea;background:rgba(12,18,32,.72);
336
- border:1px solid rgba(150,165,205,.35);backdrop-filter:blur(6px);cursor:pointer}
337
- .sl-view3d-nav button:hover,.sl-view3d-nav button:focus-visible{color:#eef1f8;border-color:rgba(190,205,240,.6)}
768
+ /* The same recipe as .sl-view3d-back: these float over a rendered venue, not
769
+ over the picker's surface, so they must read the same in a light and a dark
770
+ host and must not borrow the accent, which means "buy" everywhere else. */
771
+ .sl-view3d-nav button{flex:0 0 auto;height:32px;min-height:32px;padding:0 12px;border-radius:999px;white-space:nowrap;
772
+ font-size:12.5px;font-weight:700;color:#e6edf3;background:rgba(10,14,20,.62);
773
+ border:1px solid rgba(255,255,255,.22);backdrop-filter:blur(6px);cursor:pointer}
774
+ .sl-view3d-nav button:hover,.sl-view3d-nav button:focus-visible{background:rgba(16,22,30,.82);border-color:rgba(255,255,255,.4)}
338
775
  .sl-view3d-nav button[aria-pressed="true"]{background:var(--sl-accent);color:var(--sl-accent-ink);border-color:transparent}
339
776
  .sl-view3d-nav button:disabled{opacity:.6;cursor:not-allowed}
340
- .sl-view3d-nav-toggle{display:none!important}
777
+ /* The closed pill: a compass and where you are. Same 32px as every chip, so
778
+ opening the rail changes what is on it and not how tall the row is. */
779
+ .sl-view3d-nav-toggle{display:inline-flex;align-items:center;gap:6px;padding:0 12px 0 9px}
780
+ .sl-view3d-nav.is-open .sl-view3d-nav-toggle{display:none}
781
+ /* The close is a circle, not a bar: it ends the row rather than heading it. */
782
+ .sl-view3d-nav-close{display:none;flex:0 0 auto;width:32px;height:32px;min-height:32px;padding:0;
783
+ border-radius:999px;align-items:center;justify-content:center}
784
+ .sl-view3d-nav.is-open .sl-view3d-nav-close{display:inline-flex}
785
+ .sl-view3d-nav-close svg{width:14px;height:14px;stroke:currentColor;stroke-width:2.2;fill:none;stroke-linecap:round}
786
+ /* 32px of ink, 44px of target, the same way every other small control in the
787
+ widget reaches the floor. */
788
+ @media (pointer:coarse){
789
+ .sl-view3d-nav button{position:relative}
790
+ .sl-view3d-nav button::before{content:'';position:absolute;top:50%;left:50%;
791
+ width:max(100%,44px);height:44px;transform:translate(-50%,-50%)}
792
+ }
341
793
  .sl-view3d-nav select{min-height:38px;max-width:100%;padding:7px 34px 7px 12px;
342
794
  border-radius:999px;font:700 11.5px/1 inherit;color:#eef1f8;background:rgba(12,18,32,.86);
343
795
  border:1px solid rgba(150,165,205,.45);backdrop-filter:blur(6px);cursor:pointer}
344
796
  .sl-view3d-nav select:focus-visible{outline:2px solid var(--sl-accent);outline-offset:2px}
345
- /* On phones the library owns the bottom edge for seat/panorama/overview actions.
346
- Keep venue navigation in a separate top rail so those control families never
347
- stack over one another. */
348
- .sl-picker[data-layout="narrow"] .sl-view3d-nav{left:12px;top:12px;bottom:auto;max-width:calc(100% - 132px)}
349
- /* The closed toggle is one more 36px pill in the phone's control rhythm, at
350
- the top-left corner nothing else owns in 3D (the Back pill takes that spot
351
- only at seat-eye, when this rail is hidden). Icon + word, not the word alone. */
352
- .sl-picker[data-layout="narrow"] .sl-view3d-nav-toggle{display:inline-flex!important;align-items:center;gap:6px;pointer-events:auto;
353
- min-height:36px;padding:0 12px 0 9px;font-size:11.5px}
797
+ /* The rail is the same shape at every width now \u2014 one row of 32px chips over
798
+ the venue \u2014 so the phone needs no rules of its own beyond the width cap
799
+ below. It used to be a different control there: a 36px toggle over a framed
800
+ panel, which is why these rules existed at all. */
354
801
  .sl-view3d-nav-toggle svg{width:15px;height:15px;stroke:currentColor;stroke-width:1.9;fill:none;stroke-linejoin:round;flex:none}
355
- .sl-picker[data-layout="narrow"] .sl-view3d-nav button:not(.sl-view3d-nav-toggle){min-height:36px}
356
- .sl-picker[data-layout="narrow"] .sl-view3d-nav:not(.is-open)>div{display:none!important}
357
- .sl-picker[data-layout="narrow"] .sl-view3d-nav.is-open{left:12px;top:12px;max-width:calc(100% - 24px);padding:8px;
358
- border:1px solid rgba(150,165,205,.35);border-radius:14px;background:rgba(8,12,22,.9);backdrop-filter:blur(10px)}
359
- .sl-picker[data-layout="narrow"] .sl-view3d-nav.is-open>div{display:flex}
802
+ .sl-view3d-nav:not(.is-open)>div{display:none!important}
803
+ /* THE OPEN RAIL HAS TO FIT THE PHONE. It sizes to its content inside a region
804
+ that does not constrain it, so on a venue with several levels the last chip
805
+ landed at x 310-398 on a 375px screen \u2014 off the map entirely, unreachable
806
+ and unscrollable, because the row's own overflow never engaged inside a box
807
+ that had already grown past the viewport.
808
+ The 132px is the bottom-right control cluster's own column: this panel opens
809
+ from the bottom-LEFT and must not run under the zoom stack. The row inside
810
+ already scrolls; capping the panel is what lets it. */
811
+ /* The cap goes on the REGION, not on the rail. The rail's own percentage
812
+ resolves against that region, and the region is a shrink-to-fit column \u2014 so
813
+ a percentage cap there is circular and collapsed the rail to nothing.
814
+ The region is positioned against the map, where the percentage means what it
815
+ says. */
816
+ .sl-picker[data-layout="narrow"][data-view3d="on"] .sl-anchor[data-region="bottom-left"]{max-width:calc(100% - 132px)}
817
+ .sl-picker[data-layout="narrow"] .sl-view3d-nav{max-width:100%}
818
+ .sl-view3d-nav.is-open>div{display:flex;max-width:100%}
819
+ /* Room for a chip's rounded end when it is scrolled to, rather than flush
820
+ against the edge. */
821
+ .sl-view3d-nav>div{scroll-padding-inline:4px}
360
822
  /* Seat-eye is a decision state, not another venue-navigation state. Once the
361
823
  buyer arrives, clear the floor/area/locator rails and the module's duplicate
362
824
  Overview action. The picker-owned Back button becomes the one predictable
363
825
  escape: seat -> venue -> 2D map. */
364
- .sl-view3d.is-seat-focused .sl-view3d-nav,
826
+ /* Gated from the ROOT, like the back control: the rail is region chrome now
827
+ and the overlay is no longer its ancestor, so .sl-view3d.is-seat-focused
828
+ can never reach it again. */
829
+ .sl-picker[data-view3d-seat="on"] .sl-view3d-nav{display:none!important}
365
830
  .sl-view3d.is-seat-focused .sl-3d-overview-control,
366
831
  .sl-view3d.is-seat-focused .sl-view3d-compare-saved{display:none!important}
367
832
  /* While immersed, the 2D-only chrome is meaningless \u2014 hide it, keep Map|3D. */
@@ -369,7 +834,25 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
369
834
  .sl-picker[data-view3d="on"] .sl-floors,
370
835
  .sl-picker[data-view3d="on"] .sl-zoom,
371
836
  .sl-picker[data-view3d="on"] .sl-seccard,
837
+ /* The overview toggle went with the overview: 3D frames itself, and the panel
838
+ it opens is already hidden by the line above \u2014 leaving the button was
839
+ leaving a control that does nothing in the buyer's only left-hand column. */
840
+ .sl-picker[data-view3d="on"] .sl-minimap-toggle,
372
841
  .sl-picker[data-view3d="on"] .sl-minimap{display:none!important}
842
+ /* Immersed, the left-hand column carries the accessibility menu and the 3D
843
+ navigation next to each other over a moving render. Six pixels between two
844
+ 44px targets is a mis-tap; twelve is the same spacing the bottom-right zoom
845
+ cluster uses. */
846
+ .sl-picker[data-view3d="on"] .sl-anchor[data-region="bottom-left"],
847
+ .sl-picker[data-view3d="on"] .sl-anchor[data-region="left-rail"]{gap:12px}
848
+ /* Room kept clear on the right for the module's own Overview chip. Measured
849
+ against the MAP, which is the region's containing block -- never the window,
850
+ for the reason the removed rail rules spell out below. */
851
+ .sl-picker[data-view3d="on"] .sl-anchor[data-region="bottom-left"]{max-width:calc(100% - 150px)}
852
+ .sl-picker[data-layout="narrow"][data-view3d="on"] .sl-anchor[data-region="bottom-left"]{max-width:calc(100% - 132px)}
853
+ /* The chips keep 32px of INK at every width and reach the touch floor through
854
+ the coarse-pointer box above, the same as the price rail's. Growing the ink
855
+ to 44 on a phone was what made this rail a panel in the first place. */
373
856
  /* The confirm card bottom-sheets over 3D (no 2D screen anchor to track). */
374
857
  .sl-picker[data-view3d="on"] .sl-confirm{left:50%!important;top:auto!important;bottom:16px;
375
858
  transform:translateX(-50%);width:min(342px,calc(100% - 24px))}
@@ -524,7 +1007,7 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
524
1007
  .sl-view3d-passport-shell{padding:max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom))}
525
1008
  .sl-view3d-passport{width:100%;max-height:100%;padding:14px 14px max(24px,calc(14px + env(safe-area-inset-bottom)));border-radius:15px}
526
1009
  }
527
- `;var Ks=`
1010
+ `;var sn=`
528
1011
  /* THE PHONE TICKET LIST (owner 2026-08-27: "on mobile the cards take lots of
529
1012
  space, lots of white space on each card"). The desktop card spends ~72px per
530
1013
  ticket on SECTION/ROW/SEAT eyebrows, a category line and a 34px icon rail \u2014
@@ -546,7 +1029,11 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
546
1029
  .sl-picker[data-layout="narrow"] .sl-tray{min-height:64px}
547
1030
  .sl-tlist{display:flex;flex-direction:column;overflow:hidden;background:var(--sl-surface);
548
1031
  border:1px solid var(--sl-line);border-radius:var(--sl-r-sm)}
549
- .sl-picker[data-layout="narrow"] .sl-tline{display:flex;align-items:center;gap:7px;min-height:40px;
1032
+ /* 44px, NOT 40. The remove button's target box was nominally 44 and measured
1033
+ 41x39: a 32px button with a -6px inset cannot reach the floor inside a 40px
1034
+ line, because the line above and below it own those pixels. Four pixels a
1035
+ line is what a reachable destructive control costs. */
1036
+ .sl-picker[data-layout="narrow"] .sl-tline{display:flex;align-items:center;gap:7px;min-height:44px;
550
1037
  padding:0 4px 0 9px;border:0;border-radius:0;background:transparent;box-shadow:none;font-size:13px}
551
1038
  .sl-picker[data-layout="narrow"] .sl-tline+.sl-tline{border-top:1px solid color-mix(in srgb,var(--sl-line) 70%,transparent)}
552
1039
  .sl-picker[data-layout="narrow"] .sl-tline.sl-held{background:color-mix(in srgb,var(--sl-accent) 7%,transparent);
@@ -561,9 +1048,12 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
561
1048
  .sl-picker[data-layout="narrow"] .sl-tline .amt{flex:none;font-weight:700;font-variant-numeric:tabular-nums}
562
1049
  /* 32px of ink, 44px of target \u2014 the same grow-the-target-not-the-ink pattern
563
1050
  the price rail uses. */
564
- .sl-picker[data-layout="narrow"] .sl-tline .rm{position:relative;flex:none;width:32px;height:32px;min-height:32px;
1051
+ /* Above the price beside it, so the box is the full 44 across and not clipped
1052
+ to 41 by a run of text that is not a control anyway. */
1053
+ .sl-picker[data-layout="narrow"] .sl-tline .rm{position:relative;z-index:1;flex:none;width:32px;height:32px;min-height:32px;
565
1054
  border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--sl-muted)}
566
- .sl-picker[data-layout="narrow"] .sl-tline .rm::before{content:'';position:absolute;inset:-6px}
1055
+ .sl-picker[data-layout="narrow"] .sl-tline .rm::before{content:'';position:absolute;top:50%;left:50%;
1056
+ width:44px;height:44px;transform:translate(-50%,-50%)}
567
1057
  .sl-picker[data-layout="narrow"] .sl-tline .rm svg{width:12px;height:12px;stroke:currentColor;stroke-width:2.4;fill:none;stroke-linecap:round}
568
1058
  /* The selected tick shrinks to the category-coloured dot the legend already
569
1059
  taught; the held lock keeps its glyph, because a lock is not a colour. */
@@ -576,7 +1066,13 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
576
1066
  .sl-picker[data-layout="narrow"] .sl-tline .sl-table-edit{margin:0}
577
1067
  /* A folded run trades the dot for the chevron that opens it \u2014 one control per
578
1068
  line, never two competing affordances in 8px. */
579
- .sl-trun-toggle{flex:none;width:18px;height:32px;margin-left:-4px;display:flex;align-items:center;justify-content:center;color:var(--sl-muted)}
1069
+ /* 18px WAS NOT A TARGET. This chevron is the only way into a folded run \u2014 the
1070
+ control a buyer reaches for to drop one seat out of six \u2014 and it was half the
1071
+ width of the \u2715 beside it. The ink stays small so the line still reads as a
1072
+ line; the box around it reaches the touch floor, the same way the price
1073
+ chips and the remove button do. */
1074
+ .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)}
1075
+ .sl-trun-toggle::before{content:'';position:absolute;top:50%;left:50%;width:44px;height:44px;transform:translate(-50%,-50%)}
580
1076
  .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}
581
1077
  .sl-trun-toggle[aria-expanded="true"] svg{transform:rotate(90deg)}
582
1078
  /* These carry the SAME narrow prefix as the line rule above on purpose: a bare
@@ -601,6 +1097,8 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
601
1097
  .sl-picker[data-layout="narrow"][data-sheet="open"] .sl-sheet-grab{top:4px}
602
1098
  .sl-picker[data-layout="narrow"][data-sheet="open"] .sl-sheet-bar{min-height:36px}
603
1099
  .sl-picker[data-layout="narrow"][data-sheet="open"] .sl-sheet-peek{font-size:14px;font-weight:700}
1100
+ /* 28px of INK while the panel is open \u2014 the head has no height to spare there
1101
+ \u2014 over the 44px pseudo-target the coarse-pointer block now gives it. */
604
1102
  .sl-picker[data-layout="narrow"][data-sheet="open"] .sl-sheet-toggle{width:28px;height:28px}
605
1103
  /* THE FOOT SAYS IT ONCE. "Secure 6 more & checkout" already counts the
606
1104
  pending seats, so the caption under it never repeats them (see
@@ -632,7 +1130,15 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
632
1130
  sub-line under the title, two full-width selects and a button \u2014 240px to say
633
1131
  "pick some seats". The button already says what the card is for, so the title
634
1132
  and its echo go, the selects share a row, and the spark moves onto the CTA. */
635
- .sl-picker[data-layout="narrow"] .sl-ba{grid-template-columns:1fr 1fr;gap:6px;padding:8px;border-radius:11px}
1133
+ /* THREE FULL ROWS, NOT THREE RAGGED ONES. Inside the phone sheet the card was
1134
+ reading as: a stepper alone on row one, two half-width selects on row two,
1135
+ and the CTA pushed right on row three \u2014 three different rhythms and three
1136
+ different right edges in 240px.
1137
+ It is one column of decisions now: what kind of ticket, then where in the
1138
+ venue, then how many and go. The DOM keeps ONE order for both widths and
1139
+ the order property does the rearranging, so the desktop card never moves and
1140
+ the tab order still follows the page. */
1141
+ .sl-picker[data-layout="narrow"] .sl-ba{grid-template-columns:auto minmax(0,1fr);gap:6px;padding:8px;border-radius:11px}
636
1142
  .sl-picker[data-layout="narrow"] .sl-ba::after{display:none}
637
1143
  /* The card's own button already says what the card does, so the title and the
638
1144
  sentence under it go \u2014 but NOT on the confirm face, which is a question the
@@ -640,18 +1146,46 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
640
1146
  .sl-picker[data-layout="narrow"] .sl-ba:not([role="alert"]) .sl-ba-title,
641
1147
  .sl-picker[data-layout="narrow"] .sl-ba-copy{display:none}
642
1148
  .sl-picker[data-layout="narrow"] .sl-ba select{min-height:34px;padding:0 24px 0 9px;font-size:12.5px}
643
- /* Ticket type and zone share the row; a chart with no zones gives the whole
644
- row to ticket type rather than leaving a hole beside it. */
645
- .sl-picker[data-layout="narrow"] .sl-ba [data-ba-cat]{grid-column:1}
646
- .sl-picker[data-layout="narrow"] .sl-ba [data-ba-zone]{grid-column:2}
647
- .sl-picker[data-layout="narrow"] .sl-ba:not(:has([data-ba-zone])) [data-ba-cat]{grid-column:1/-1}
1149
+ /* Row 1 and row 2: one decision each, the full width of the card. Two selects
1150
+ sharing a row at 375px is a listbox you open by aiming \u2014 and a zone name is
1151
+ the longest string on the card. */
1152
+ .sl-picker[data-layout="narrow"] .sl-ba-premium{order:1}
1153
+ .sl-picker[data-layout="narrow"] .sl-ba-cat{order:2;grid-column:1/-1}
1154
+ .sl-picker[data-layout="narrow"] .sl-ba-zone{order:3;grid-column:1/-1}
1155
+ /* An absent zone select leaves no gap: it is simply not in the DOM, and the
1156
+ empty placeholder that stands in for an absent TICKET-TYPE select takes no
1157
+ row either. */
648
1158
  .sl-picker[data-layout="narrow"] .sl-ba>span[aria-hidden="true"]:empty{display:none}
649
- /* 28px of ink, 44px of target \u2014 the stepper is the smallest thing on the card. */
650
- .sl-picker[data-layout="narrow"] .sl-ba-qty{grid-column:1;justify-self:start;width:110px;justify-content:space-between;padding:2px;gap:0}
651
- .sl-picker[data-layout="narrow"] .sl-ba-qty button{position:relative;width:30px;height:30px}
652
- .sl-picker[data-layout="narrow"] .sl-ba-qty button::after{content:'';position:absolute;inset:-7px}
653
- .sl-picker[data-layout="narrow"] .sl-ba-go{grid-column:2;width:auto;min-height:36px;padding:0 10px;font-size:12.5px;box-shadow:none}
1159
+ /* Row 3: how many, and go. The stepper is a fixed box so the CTA beside it
1160
+ starts at the same x on every chart, and both clear the touch floor. */
1161
+ .sl-picker[data-layout="narrow"] .sl-ba-qty{order:4;grid-column:1;justify-self:start;
1162
+ width:112px;height:44px;justify-content:space-between;padding:2px;gap:0}
1163
+ .sl-picker[data-layout="narrow"] .sl-ba-qty button{position:relative;width:34px;height:34px}
1164
+ /* SAME SHAPE AS THE COARSE-POINTER BOX, DELIBERATELY. Writing this one as
1165
+ an inset box while the shared rule writes it as top/left + translate(-50%,-50%)
1166
+ left the translate in force over inset coordinates, so the pseudo-box was
1167
+ displaced by half its own size and the target measured 34x34 \u2014 the button
1168
+ and nothing more. Restating the whole shape is what keeps the two rules from
1169
+ half-overriding each other.
1170
+ 44px centred on a 34px button reaches 5px inward on each side, into a 40px
1171
+ gap the number sits in: the two boxes never meet, and the number is a span
1172
+ with nothing to tap. */
1173
+ .sl-picker[data-layout="narrow"] .sl-ba-qty button::after{content:'';position:absolute;
1174
+ top:50%;left:50%;right:auto;bottom:auto;width:44px;height:44px;transform:translate(-50%,-50%)}
1175
+ /* ONE RULE OWNS THIS BUTTON'S HEIGHT. The base sheet asks for 44px on narrow
1176
+ and this line quietly took it back to 36 \u2014 the CTA of the whole
1177
+ best-available card, under the touch floor, because it sits in a row with
1178
+ the stepper and 36 looked tighter. It matches the stepper beside it at 44
1179
+ instead; the row is no taller, because the stepper already is. */
1180
+ .sl-picker[data-layout="narrow"] .sl-ba-go{order:5;grid-column:2;width:auto;min-height:44px;height:44px;
1181
+ padding:0 10px;font-size:12.5px;white-space:nowrap;box-shadow:none}
654
1182
  .sl-picker[data-layout="narrow"] .sl-ba-go:not(.sl-busy)::before{content:'\u2726';font-size:13px;line-height:1}
1183
+ /* The two faces the card can wear on a phone that are NOT the finder \u2014 the
1184
+ replace confirmation and its pair of buttons \u2014 keep the full width they
1185
+ were written for rather than inheriting row three's two-column split. */
1186
+ .sl-picker[data-layout="narrow"] .sl-ba-replace,
1187
+ .sl-picker[data-layout="narrow"] .sl-ba-actions,
1188
+ .sl-picker[data-layout="narrow"] .sl-ba-back{grid-column:1/-1}
655
1189
 
656
1190
  /* \u2500\u2500\u2500 THE LAPSED-HOLD LINE, and the \u267F menu's free counts \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
657
1191
  Both belong to the base sheet by subject, and neither can live there: it is
@@ -689,7 +1223,7 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
689
1223
  .sl-chip-cx-tag.limited{color:var(--sl-text);background:color-mix(in srgb,#f4b740 11%,var(--sl-surface));
690
1224
  border:1px solid color-mix(in srgb,#f4b740 32%,var(--sl-line))}
691
1225
  .sl-chip-cx-note{font-size:10.5px;line-height:1.35;color:var(--sl-muted)}
692
- `;var Us="seatlayer-picker-style",Go=`
1226
+ `;var nn="seatlayer-picker-style",ea=`
693
1227
  .sl-picker{position:relative;display:flex;flex-direction:column;width:100%;height:100%;min-height:420px;overflow:hidden;
694
1228
  background:var(--sl-bg);color:var(--sl-text);font-family:var(--sl-font);border-radius:var(--sl-radius);
695
1229
  --sl-r-sm:calc(var(--sl-radius) * .55);
@@ -700,7 +1234,7 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
700
1234
  \u2014 the widget has one motion system, and a surface animating on its own
701
1235
  curve is exactly what made it read as assembled rather than designed. */
702
1236
  --slm-mo-instant:80ms;--slm-mo-quick:140ms;--slm-mo-base:200ms;--slm-mo-slow:var(--sl-dur-spring);
703
- --slm-mo-out:var(--sl-ease-enter);--slm-mo-exit:var(--sl-ease-exit);
1237
+ --slm-mo-out:var(--sl-ease-enter);--slm-mo-exit:var(--sl-ease-exit);--slm-mo-inout:cubic-bezier(.4,0,.6,1);
704
1238
  /* Semantic palette tokens, defined here (not resolveTokens) because they are
705
1239
  the WIDGET's meanings, not an org's brand: premium gold, environment
706
1240
  warning, danger, success. Hosts can still override them with CSS. */
@@ -832,6 +1366,13 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
832
1366
  gives way when the cap is reached, down to its 96px floor. */
833
1367
  .sl-picker[data-layout="narrow"] .sl-tray{flex:1 1 auto;min-height:96px;overflow-y:auto;overscroll-behavior:contain}
834
1368
  .sl-picker[data-layout="narrow"][data-prices-open="true"] .sl-tray{min-height:48px}
1369
+ /* AN EMPTY CART STILL HAS A PANEL FULL OF THINGS. With no seats picked the
1370
+ tray carries the whole best-available card, and the 96px floor above stopped
1371
+ it shrinking inside the sheet's cap \u2014 so the bottom of the card, CTA
1372
+ included, was simply clipped off rather than scrolled to. There are no
1373
+ tickets to protect from being crushed in this state, so the floor lifts and
1374
+ the tray scrolls like any other overflowing list. */
1375
+ .sl-picker[data-layout="narrow"][data-has-selection="false"] .sl-tray{min-height:0}
835
1376
  .sl-picker[data-layout="narrow"] .sl-prices{max-height:150px;overflow-y:auto;overscroll-behavior:contain}
836
1377
  .sl-picker[data-layout="narrow"] .sl-foot{position:static;background:var(--sl-bg)}
837
1378
  /* NARROW FOOT SAYS EVERYTHING ONCE: the sheet head carries the count and total
@@ -885,8 +1426,14 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
885
1426
  painted on the map, and a phone buyer is matching a colour to a number.
886
1427
  Chips scroll rather than truncate \u2014 a legend that hides a ticket type is
887
1428
  worse than one that has to be swiped. */
888
- .sl-rail{display:none;align-items:center;gap:6px;padding:3px 10px;flex:none;
1429
+ /* 44px OF RAIL, 24px OF CHIP. The chip's invisible ::before already reached
1430
+ for the full touch floor, but the rail it lives in was only ~30px tall, so
1431
+ the scroller clipped the target back to about a third under the ideal. The
1432
+ strip carries the height now and the chips stay small inside it \u2014 the ink
1433
+ is a legend, the box is a target. */
1434
+ .sl-rail{display:none;align-items:center;gap:6px;padding:0 10px;min-height:44px;flex:none;
889
1435
  background:var(--sl-surface);border-bottom:1px solid var(--sl-line)}
1436
+ .sl-rail-scroll{align-self:stretch}
890
1437
  .sl-picker[data-layout="narrow"] .sl-rail.has{display:flex}
891
1438
  /* 3D frames itself; focusCategory drives the 2D map, so the rail has nothing
892
1439
  to act on there \u2014 and the 3D nav wants this strip. */
@@ -897,9 +1444,14 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
897
1444
  padding-right:6px;margin-right:1px;border-right:1px solid var(--sl-line)}
898
1445
  .sl-picker[data-layout="narrow"] .sl-rail .sl-chip-f{padding:0 9px;min-height:24px;font-size:11px}
899
1446
  .sl-picker[data-layout="narrow"] .sl-rail .sl-chip-f svg{width:12px;height:12px}
1447
+ /* NO SNAP. Proximity snapping re-resolves a target every time the chips are
1448
+ rewritten, and on a rail one chip wider than the phone it kept resolving to
1449
+ the END \u2014 so the legend opened with the cheapest price already tucked behind
1450
+ the pinned escape chip, before anyone had touched it. Five short chips gain
1451
+ nothing from snapping; landing on the first price is worth more than a tidy
1452
+ swipe. */
900
1453
  .sl-rail-scroll{display:flex;align-items:center;gap:5px;flex:1;min-width:0;
901
- overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch;
902
- scroll-snap-type:x proximity;padding:1px}
1454
+ overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding:1px}
903
1455
  /* Fade ONLY a clipping edge, so a hidden sixth chip reads as "more" and a
904
1456
  rail that fits keeps every rounded end intact (syncRailEdges sets these).
905
1457
  "start" is the left edge in LTR and the right edge in RTL, so the gradient
@@ -917,13 +1469,24 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
917
1469
  .sl-rc{position:relative;display:inline-flex;align-items:center;gap:5px;flex:none;min-height:24px;padding:0 9px 0 7px;
918
1470
  border-radius:999px;background:var(--sl-bg);border:1px solid var(--sl-line);color:var(--sl-text);
919
1471
  font-size:11px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap;
920
- scroll-snap-align:start;transition:border-color .15s,background .15s}
1472
+ transition:border-color .15s,background .15s}
921
1473
  .sl-rc::before{content:'';position:absolute;top:50%;left:0;right:0;height:44px;transform:translateY(-50%)}
922
1474
  .sl-rc:hover,.sl-rc:focus-visible{border-color:var(--sl-muted)}
923
1475
  .sl-rc-dot{width:7px;height:7px;border-radius:50%;flex:none;background:var(--sl-cat-dot,var(--sl-accent))}
924
1476
  /* On the filled (pinned) chip the dot would vanish into an accent of the
925
1477
  same hue \u2014 ring it in ink so the colour key survives the highlight. */
926
1478
  .sl-rc[aria-pressed="true"] .sl-rc-dot{box-shadow:0 0 0 1.5px var(--sl-accent-ink)}
1479
+ /* THE WAY BACK IS A CHIP, NOT A SCROLL AWAY. The rail's chips narrow the map
1480
+ to one price; on a phone the panel's "All prices" select is two gestures
1481
+ behind a collapsed sheet, so a buyer who pinned a category had no visible
1482
+ escape from it. This chip is always the first thing on the rail and it
1483
+ clears both the band filter and any pinned category \u2014 the same reset the
1484
+ select's "All prices" option performs. */
1485
+ .sl-rc-all{position:sticky;left:0;z-index:1;font-weight:750;background:var(--sl-surface)}
1486
+ /* The halo that hides a price chip sliding under this one is only wanted while
1487
+ a chip actually IS sliding under it. At rest it just ate four pixels off the
1488
+ first price's rounded end (syncRailEdges owns the flag). */
1489
+ .sl-rail-scroll[data-fade-start="true"] .sl-rc-all{box-shadow:0 0 0 6px var(--sl-surface)}
927
1490
  .sl-rc-was{color:var(--sl-muted);font-weight:500;text-decoration:line-through}
928
1491
  /* Pinned = this category is framed on the map. The state lives on the control
929
1492
  the buyer used, so there is never a second place to go and clear it. */
@@ -938,17 +1501,46 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
938
1501
  head is the tap/swipe toggle target (min 44px), so it reads as one control. */
939
1502
  .sl-sheet-head{display:none;flex-direction:column;justify-content:center;padding:6px 12px 8px;min-height:56px;
940
1503
  cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none;flex:none}
941
- .sl-picker[data-layout="narrow"] .sl-sheet-head{display:flex;position:relative;min-height:50px;padding:0 6px 0 12px}
1504
+ /* THE COLLAPSED SHEET IS THE LAST 50px OF THE SCREEN, which on a phone with a
1505
+ home indicator is the strip the OS also claims. The head is the whole peek
1506
+ state, so it carries the inset itself rather than relying on the panel's
1507
+ padding \u2014 a gesture bar over the Continue pill is a tap that pays for
1508
+ nothing. A max() keeps the ordinary spacing on hardware with no inset. */
1509
+ .sl-picker[data-layout="narrow"] .sl-sheet-head{display:flex;position:relative;min-height:50px;
1510
+ padding:0 6px 0 12px;padding-bottom:max(0px,var(--sl-safe-b))}
1511
+ .sl-picker[data-layout="narrow"][data-sheet="peek"] .sl-side{padding-bottom:0}
942
1512
  .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}
943
- .sl-picker[data-layout="narrow"] .sl-sheet-bar{min-height:50px;gap:6px}
1513
+ .sl-picker[data-layout="narrow"] .sl-sheet-bar{min-height:50px;gap:10px}
944
1514
  .sl-picker[data-layout="narrow"] .sl-sheet-peek{font-size:12.5px}
945
- .sl-picker[data-layout="narrow"] .sl-sheet-peek .go{min-height:34px;padding:0 14px;font-size:12.5px}
1515
+ /* The pay button on the collapsed sheet is the single most-pressed control on
1516
+ a phone; 34px was under the touch floor and it sat six pixels from the
1517
+ chevron that opens the panel, so a miss on one hit the other. */
1518
+ .sl-picker[data-layout="narrow"] .sl-sheet-peek .go{min-height:44px;padding:0 14px;font-size:12.5px}
946
1519
  .sl-picker[data-layout="narrow"] .sl-sheet-peek .go.ghost{padding:0 10px}
947
- .sl-picker[data-layout="narrow"] .sl-sheet-toggle{width:36px;height:36px;margin:0}
1520
+ .sl-picker[data-layout="narrow"] .sl-sheet-toggle{width:44px;height:44px;margin:0}
948
1521
  /* The hold clock rides INSIDE the Continue pill while the sheet is collapsed
949
1522
  (that pill is the way to pay from the peek), so the header pill can go
950
1523
  quiet: one live clock on screen, not two. The open sheet hides the peek
951
1524
  pill, so the header pill comes back there. */
1525
+ /* The empty bar's one door. Accent-filled, because with nothing in the cart it
1526
+ is not competing with a Continue \u2014 it IS the primary action, and the chevron
1527
+ beside it keeps its own job of opening the panel to browse.
1528
+
1529
+ SMALLER INK THAN THE PILL IT REPLACES. At the peek bar's full 44px it read
1530
+ as a checkout button on a bar with nothing to check out, and it crowded the
1531
+ line it shares with the price. Thirty-six pixels of pill carries the same
1532
+ weight as the Continue pill's type without claiming a decision that has not
1533
+ been made yet; the target underneath it is still 44, reached the same way
1534
+ the price chips reach theirs. */
1535
+ .sl-picker[data-layout="narrow"] .sl-sheet-peek .go.sl-sheet-find{position:relative;align-self:center;
1536
+ min-height:36px;height:36px;padding:0 12px;gap:5px;border-radius:999px;font-size:12.5px;font-weight:750}
1537
+ .sl-sheet-find::before{content:'';position:absolute;top:50%;left:0;right:0;height:44px;transform:translateY(-50%)}
1538
+ /* The line the pill sits on clips its own overflow (that is what ellipsises a
1539
+ long summary), so it has to be at least as tall as the target it contains \u2014
1540
+ otherwise the four pixels of reach above and below the 36px pill are simply
1541
+ cut off and the smaller ink becomes a smaller button after all. */
1542
+ .sl-picker[data-layout="narrow"] .sl-sheet-peek{min-height:44px}
1543
+ .sl-peek-spark{font-size:12px;line-height:1}
952
1544
  .sl-peek-time{opacity:.72;font-weight:700;font-variant-numeric:tabular-nums;margin-inline-start:6px}
953
1545
  .sl-picker[data-layout="narrow"][data-sheet="peek"][data-peek-clock="true"] .sl-hold-pill.on:not(.is-expiring){display:none}
954
1546
  /* OPEN sheet: the head is context, not controls \u2014 the pill it carries at peek
@@ -971,7 +1563,7 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
971
1563
  /* The add-more accelerator sits beside the primary pill and must not compete
972
1564
  with it: outlined, not filled. Only the first .go claims the auto margin, so
973
1565
  the pair stays together at the right edge rather than splitting apart. */
974
- .sl-sheet-peek .go.ghost{background:transparent;color:var(--sl-text);border:1px solid var(--sl-line);font-weight:750}
1566
+ .sl-sheet-peek .go.ghost{gap:5px;background:transparent;color:var(--sl-text);border:1px solid var(--sl-line);font-weight:750}
975
1567
  .sl-sheet-peek .go.ghost:hover,.sl-sheet-peek .go.ghost:focus-visible{border-color:var(--sl-accent);color:var(--sl-accent-text)}
976
1568
  .sl-sheet-peek .go.ghost + .go{margin-left:0}
977
1569
  /* state chevron: points UP while peeking, rotates to point DOWN when open.
@@ -1020,9 +1612,15 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
1020
1612
  .sl-a11ybtn{width:36px;height:36px;border-radius:999px;display:grid;place-items:center;
1021
1613
  background:var(--sl-surface);border:1px solid var(--sl-line);color:var(--sl-text);
1022
1614
  font-size:17px;line-height:1;cursor:pointer;box-shadow:0 8px 20px -12px rgba(0,0,0,.5)}
1615
+ /* Drawn, not typed: the mark is strokes in the widget's own ink, so it sits at
1616
+ the same weight as every other control in this corner instead of arriving in
1617
+ whatever colour and baseline the host's emoji font decides. */
1618
+ .sl-a11ybtn svg{width:19px;height:19px;stroke:currentColor;stroke-width:1.7;fill:none;
1619
+ stroke-linecap:round;stroke-linejoin:round}
1023
1620
  .sl-a11ybtn:hover{border-color:var(--sl-muted)}
1024
1621
  .sl-a11ybtn:focus-visible{outline:2px solid var(--sl-accent);outline-offset:2px}
1025
- .sl-picker[data-layout="narrow"] .sl-a11ybtn{width:44px;height:44px;font-size:19px}
1622
+ .sl-picker[data-layout="narrow"] .sl-a11ybtn{width:44px;height:44px}
1623
+ .sl-picker[data-layout="narrow"] .sl-a11ybtn svg{width:21px;height:21px}
1026
1624
  .sl-a11ymenu{position:absolute;bottom:calc(100% + 8px);left:0;z-index:8;
1027
1625
  min-width:236px;max-width:min(300px,calc(100vw - 32px));padding:4px;
1028
1626
  border:1px solid var(--sl-line);border-radius:12px;background:var(--sl-surface);
@@ -1082,8 +1680,16 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
1082
1680
  .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)}
1083
1681
  .sl-sec{padding:14px 14px 4px;font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--sl-muted);font-weight:700}
1084
1682
  .sl-prices-sec{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:13px}
1085
- .sl-price-select{min-height:32px;max-width:130px;padding:5px 28px 5px 9px;border:1px solid var(--sl-line);border-radius:9px;
1683
+ /* A PILL, NOT A FORM CONTROL. It stays a <select> \u2014 the native listbox is the
1684
+ only picker that works on every phone, with a keyboard and with a screen
1685
+ reader \u2014 but it wears the same rounded shape and the same chevron as the
1686
+ widget's own controls, so a buyer scanning the panel sees one vocabulary
1687
+ instead of the browser's default arrow parked among our chips. The chevron
1688
+ below is drawn by us for the same reason: the platform's own is a different
1689
+ weight, colour and size in every engine. */
1690
+ .sl-price-select{min-height:30px;max-width:130px;padding:0 26px 0 11px;border:1px solid var(--sl-line);border-radius:999px;
1086
1691
  background-color:var(--sl-surface);color:var(--sl-text);font:inherit;font-size:11px;font-weight:750;letter-spacing:0;text-transform:none}
1692
+ .sl-price-select:hover{border-color:var(--sl-muted)}
1087
1693
  /* One sentence that teaches the whole colour code \u2014 a first-time buyer sees
1088
1694
  "Head Tables \xB7 $165" and coloured dots with nothing connecting them. Gone
1089
1695
  the moment they have seats (they've learned it) and while sales are closed. */
@@ -1129,48 +1735,66 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
1129
1735
  .sl-tray{flex:1;padding:10px 14px 14px;display:flex;flex-direction:column;gap:7px;min-height:0;overflow-y:auto;
1130
1736
  overscroll-behavior:contain;scrollbar-gutter:stable}
1131
1737
  .sl-tray-hint{font-size:12.5px;color:var(--sl-muted);line-height:1.5}
1132
- .sl-chip{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 34px;align-items:stretch;
1133
- flex:none;min-height:53px;border:1px solid var(--sl-line);border-radius:var(--sl-r-sm);overflow:hidden;
1738
+ /* ONE ROW PER TICKET. The card was a two-column grid with a bordered icon
1739
+ column down its right edge \u2014 a second box drawn inside every ticket, holding
1740
+ two 26px buttons on a card one line tall. It is a row now: dot, name over a
1741
+ grey position line, price, actions. Everything the row needs sits on one
1742
+ baseline, so its right edge lands on the panel's own 14px gutter with every
1743
+ other row's. */
1744
+ .sl-chip{position:relative;display:flex;align-items:center;gap:10px;
1745
+ flex:none;min-height:48px;padding:9px 6px 9px 12px;border:1px solid var(--sl-line);border-radius:12px;
1134
1746
  background:var(--sl-surface);font-size:13px;transform-origin:center;transition:border-color .15s,background .15s}
1747
+ /* The category's own colour, the one the seat is painted in on the map. The
1748
+ held lock keeps its glyph instead \u2014 "temporarily yours" is not a hue.
1749
+ Same hairline as the confirm card's band dot, for the same reason: a pale
1750
+ category on the panel's own surface is otherwise a disc you cannot find. */
1751
+ .sl-chip-dot{flex:none;width:9px;height:9px;border-radius:50%;align-self:center;
1752
+ border:1px solid color-mix(in srgb,var(--sl-text) 22%,transparent)}
1135
1753
  .sl-chip:hover{border-color:color-mix(in srgb,var(--sl-accent) 38%,var(--sl-line))}
1136
1754
  .sl-chip.sl-enter{animation:slChipIn .38s cubic-bezier(.2,.8,.2,1) both}
1137
1755
  /* The collapse is the shared moment (.sl-mo-collapse); this rule only owns
1138
1756
  the "it can no longer be tapped" half. One class per idea, and the timing
1139
1757
  comes from the vocabulary rather than from a literal .16s ease-in. */
1140
1758
  .sl-chip.sl-leave{pointer-events:none}
1141
- .sl-chip.sl-held{border-color:var(--sl-line);background:color-mix(in srgb,var(--sl-accent) 7%,var(--sl-surface));
1142
- box-shadow:inset 3px 0 0 color-mix(in srgb,var(--sl-accent) 72%,transparent)}
1759
+ .sl-chip.sl-held{border-color:color-mix(in srgb,var(--sl-accent) 45%,var(--sl-line));
1760
+ background:color-mix(in srgb,var(--sl-accent) 7%,var(--sl-surface))}
1143
1761
  .sl-ticket-state{width:17px;height:17px;border-radius:999px;flex:none;display:flex;align-items:center;justify-content:center;
1144
1762
  background:var(--sl-accent);color:var(--sl-accent-ink)}
1145
1763
  .sl-ticket-state.held{background:color-mix(in srgb,var(--sl-accent) 18%,var(--sl-surface));color:var(--sl-accent-text)}
1146
1764
  .sl-ticket-state svg{width:10px;height:10px;stroke:currentColor;stroke-width:2.6;fill:none;stroke-linecap:round;stroke-linejoin:round}
1147
- .sl-chip-main{min-width:0;padding:8px 10px 8px 11px;display:flex;flex-direction:column;justify-content:center;gap:5px}
1148
- .sl-chip-id{display:flex;gap:12px;min-width:0}
1149
- .sl-chip-id .fld{min-width:0}
1150
- .sl-chip-id .fld.sec{flex:1}
1151
- .sl-chip-id .fld.mid{flex:none;text-align:center}
1152
- .sl-chip-eb{display:block;font-size:10px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--sl-muted);margin-bottom:1px}
1765
+ .sl-chip-main{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:2px}
1766
+ .sl-chip-id{display:flex;flex-direction:column;gap:1px;min-width:0}
1767
+ /* The name ellipsizes \u2014 a long venue section is the one fact here that can be
1768
+ longer than the panel. Everything under it is short by construction. */
1769
+ .sl-chip-name{min-width:0;font-size:13px;font-weight:700;line-height:1.25;
1770
+ white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
1771
+ /* Grey WORDS, ink VALUES. "Row 7 \xB7 Seat 16" is two labels and two numbers, and
1772
+ the numbers are the half the buyer checks against the map. */
1773
+ .sl-chip-pos{display:flex;align-items:baseline;gap:4px;min-width:0;font-size:11.5px;line-height:1.3;
1774
+ white-space:nowrap;overflow:hidden;color:var(--sl-muted);font-variant-numeric:tabular-nums}
1775
+ .sl-chip-pos .w{flex:none}
1776
+ .sl-chip-pos b{flex:none;font-weight:600;color:var(--sl-text)}
1777
+ .sl-chip-pos i{flex:none;font-style:normal;opacity:.6}
1153
1778
  /* Which night this ticket is for. Sits ABOVE the SECTION eyebrow and reads as
1154
1779
  the card's dateline, not as a fourth identity field. */
1155
1780
  .sl-chip-when{font-size:10.5px;font-weight:750;color:var(--sl-accent);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
1156
- .sl-chip-id .val{display:block;font-weight:600;font-size:13px;line-height:1.25;white-space:nowrap}
1157
- .sl-chip-id .fld.sec .val{overflow:hidden;text-overflow:ellipsis}
1158
1781
  .sl-chip-dates{margin-top:2px;padding-top:6px;border-top:1px solid var(--sl-line);display:grid;gap:5px}
1159
1782
  .sl-chip-dates-summary{font-size:10.5px;line-height:1.35;color:var(--sl-muted)}
1160
1783
  .sl-chip-date-list{display:flex;flex-wrap:wrap;gap:4px}
1161
1784
  .sl-chip-date{padding:3px 6px;border-radius:999px;background:color-mix(in srgb,var(--sl-accent) 13%,var(--sl-surface));
1162
1785
  color:var(--sl-accent-text);font-size:10.5px;font-weight:700;line-height:1.25;white-space:nowrap}
1163
- .sl-chip-sub{display:flex;align-items:center;gap:6px;min-width:0}
1164
- .sl-chip .cat{color:var(--sl-muted);font-size:10.5px;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
1165
- .sl-chip .amt{font-weight:700;font-variant-numeric:tabular-nums;flex:none;white-space:nowrap}
1166
- .sl-chip-rail{display:flex;flex-direction:column;border-left:1px solid var(--sl-line)}
1167
- .sl-chip .rm,.sl-chip .view{flex:1;min-height:26px;border-radius:0;display:flex;align-items:center;justify-content:center;
1786
+ .sl-chip-sub{display:flex;align-items:center;gap:6px;min-width:0;margin-top:3px}
1787
+ .sl-chip .amt{font-size:13px;font-weight:800;font-variant-numeric:tabular-nums;flex:none;white-space:nowrap}
1788
+ /* A HORIZONTAL PAIR, NOT A BORDERED COLUMN. The rail used to draw its own
1789
+ left border and stack two 26px buttons inside it; on a one-line row that is
1790
+ a box inside a box, and neither button reached a comfortable target. */
1791
+ .sl-chip-rail{display:flex;align-items:center;gap:2px;flex:none}
1792
+ .sl-chip .rm,.sl-chip .view{flex:none;width:30px;height:30px;min-height:30px;border-radius:8px;display:flex;align-items:center;justify-content:center;
1168
1793
  color:var(--sl-muted);transition:color .15s,background .15s}
1169
- .sl-chip .view{border-top:1px solid var(--sl-line)}
1170
1794
  .sl-chip .rm:hover,.sl-chip .rm:focus-visible{color:var(--sl-danger);background:color-mix(in srgb,var(--sl-danger) 9%,transparent)}
1171
1795
  .sl-chip .view:hover,.sl-chip .view:focus-visible{color:var(--sl-text);background:color-mix(in srgb,var(--sl-accent) 10%,transparent)}
1172
- .sl-chip .rm svg{width:11px;height:11px;stroke:currentColor;stroke-width:2.4;fill:none;stroke-linecap:round}
1173
- .sl-chip .view svg{width:13px;height:13px;stroke:currentColor;stroke-width:1.8;fill:none}
1796
+ .sl-chip .rm svg{width:13px;height:13px;stroke:currentColor;stroke-width:2.4;fill:none;stroke-linecap:round}
1797
+ .sl-chip .view svg{width:14px;height:14px;stroke:currentColor;stroke-width:1.8;fill:none}
1174
1798
  /* live-activity strip \u2014 narrates WS availability deltas (social proof + urgency).
1175
1799
  Hidden until a delta actually happens: a static "seats update in real time"
1176
1800
  banner is dead vertical space, a "2 seats just taken" flash is a signal. */
@@ -1343,320 +1967,172 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
1343
1967
  framed-host paths) but hid as the 4th unlabelled glyph in a corner stack \u2014
1344
1968
  even the owner could not pick it out. dockLayoutChrome docks the SAME
1345
1969
  button into the top-right region beside Map|3D on EVERY layout and this
1346
- class dresses it as a labelled pill. */
1347
- .sl-zfs-lbl{display:none}
1348
- .sl-fs-pill.sl-fs-pill{display:inline-flex;align-items:center;justify-content:center;width:auto;min-height:40px;height:auto;
1349
- padding:0 13px;gap:6px;border-radius:999px;font-size:11px;font-weight:800;
1350
- background:var(--sl-surface);border:1px solid var(--sl-line);color:var(--sl-text);transition:border-color .15s}
1351
- .sl-fs-pill.sl-fs-pill:hover{border-color:var(--sl-muted)}
1352
- .sl-fs-pill svg{width:14px;height:14px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
1353
- .sl-fs-pill .sl-zfs-lbl{display:inline;letter-spacing:.02em;white-space:nowrap}
1354
- /* In the header, icons carry it (owner call): square Full screen glyph. The
1355
- price-tag toggle beside it is gone \u2014 it existed only to reach a legend the
1356
- narrow layout had hidden, and the rail is that legend now, already in view. */
1357
- .sl-head .sl-fs-pill{min-height:34px;min-width:34px;width:34px;padding:0;flex:none}
1358
- .sl-head .sl-fs-pill .sl-zfs-lbl{display:none}
1359
- /* NARROW HEADER IS ONE 38px LINE. On a phone the host page (or the popup)
1360
- already names the event above the picker, so identity demotes to the
1361
- thumb + name density that data-event-details-hidden already defined, and
1362
- the hold clock becomes a quiet tinted pill: it must stay legible, not
1363
- compete with the Continue pill that actually takes the money. Every token
1364
- is theme-relative (accent-text is contrast-checked against bg AND surface
1365
- in resolvePickerTokens), so light org themes get a readable pill too. */
1366
- .sl-picker[data-layout="narrow"] .sl-head{gap:8px;padding:6px 10px 6px 12px;min-height:38px}
1367
- .sl-picker[data-layout="narrow"] .sl-logo{width:22px;height:22px;border-radius:6px;font-size:11px}
1368
- .sl-picker[data-layout="narrow"] .sl-head-name{font-size:12.5px}
1369
- .sl-picker[data-layout="narrow"] .sl-head-meta{display:none}
1370
- .sl-picker[data-layout="narrow"] .sl-head .sl-fs-pill{min-height:26px;min-width:26px;width:26px;color:var(--sl-muted)}
1371
- .sl-picker[data-layout="narrow"] .sl-head .sl-fs-pill svg{width:12px;height:12px}
1372
- .sl-picker[data-layout="narrow"] .sl-hold-pill{padding:4px 9px;font-size:11px;gap:5px;
1373
- background:color-mix(in srgb,var(--sl-accent) 14%,var(--sl-surface));color:var(--sl-accent-text)}
1374
- .sl-picker[data-layout="narrow"] .sl-hold-pill.is-expiring{background:var(--sl-accent);color:var(--sl-accent-ink)}
1375
- .sl-picker[data-layout="narrow"] .sl-closed-pill{padding:4px 9px;font-size:11px}
1376
- .sl-picker[data-layout="narrow"] .sl-close{width:26px;height:26px}
1377
- .sl-picker[data-layout="narrow"] .sl-close svg{width:12px;height:12px}
1378
- /* ON-MAP CONTROLS SHARE ONE SIZE ON A PHONE: 36px round (zoom column, minimap
1379
- toggle), 28px pills for level/mode groups. Every one of them sits over seats,
1380
- so the smaller they read the more map survives; the 44px coarse-pointer floor
1381
- still applies through the ::after targets below.
1382
-
1383
- THE COLOUR-BLIND CONTROL IS NO LONGER ONE OF THEM. It is a row inside the
1384
- accessibility menu, and this phone rule outranked the row geometry
1385
- (.sl-a11yrow.sl-cbbtn) because the layout attribute adds specificity: the
1386
- row computed to 36px inside a 236px menu, putting the glyph outside the
1387
- popover and collapsing its label to nothing. Nothing on the map wears
1388
- .sl-cbbtn any more, so the rule is gone rather than re-scoped to a stack it
1389
- has left. */
1390
- .sl-picker[data-layout="narrow"] .sl-minimap-toggle{width:36px;height:36px;border-radius:999px}
1391
- .sl-picker[data-layout="narrow"] .sl-minimap-toggle svg{width:16px;height:16px}
1392
- /* One control size on phones \u2014 match the 36px round rhythm the rest of the
1393
- zoom column uses, but keep width for the language name to be readable. */
1394
- .sl-picker[data-layout="narrow"] .sl-langsel{height:36px;max-width:112px;font-size:11.5px}
1395
- .sl-picker[data-layout="narrow"] .sl-floors{padding:3px;gap:1px}
1396
- .sl-picker[data-layout="narrow"] .sl-floors button[data-floor]{min-height:28px;padding:4px 10px;font-size:10.5px}
1397
- .sl-picker[data-layout="narrow"] .sl-floor-info{flex-basis:26px;width:26px;height:26px;font-size:11px}
1398
-
1399
- /* toast + boot states (toast flows in the bottom-center region) */
1400
- .sl-toast{transform:translateY(6px) scale(.98);max-width:100%;
1401
- background:var(--sl-surface);border:1px solid var(--sl-line);color:var(--sl-text);border-radius:999px;padding:9px 16px;
1402
- font-size:12.5px;font-weight:600;opacity:0;pointer-events:none;transition:opacity .22s,transform .22s;white-space:nowrap;
1403
- overflow:hidden;text-overflow:ellipsis}
1404
- .sl-toast.on{opacity:1;transform:translateY(0) scale(1)}
1405
- .sl-toast.has-action{pointer-events:auto;display:flex;align-items:center;gap:12px;padding-right:8px}
1406
- .sl-toast-action{min-height:30px;padding:5px 10px;border-radius:999px;background:var(--sl-accent);color:var(--sl-accent-ink);
1407
- font:inherit;font-weight:800}
1408
- .sl-toast[data-tone="error"]{border-color:var(--sl-danger)}
1409
- .sl-toast[data-tone="warning"]{border-color:var(--sl-accent)}
1410
- .sl-toast[data-tone="success"]{border-color:var(--sl-success)}
1411
- .sl-toast.on[data-tone="error"]{animation:slToastNudge .32s ease-out}
1412
- /* THE LOADING STATE IS A VENUE, NOT A WORD.
1413
-
1414
- A spinner over "Loading seat map..." said only that the buyer was waiting.
1415
- A faint silhouette of concentric shells around a stage says what is coming
1416
- and roughly where its parts will be, so the real chart reads as an arrival
1417
- rather than a replacement. The sentence stays for screen readers, which get
1418
- nothing from scenery. */
1419
- .sl-boot{position:absolute;inset:0;z-index:6;display:flex;align-items:center;justify-content:center;
1420
- background:var(--sl-bg);transition:opacity 180ms ease}
1421
- .sl-boot.is-going{opacity:0}
1422
- .sl-boot-venue{width:min(78%,420px);max-height:72%;overflow:visible;
1423
- -webkit-mask-image:linear-gradient(105deg,#000 32%,rgba(0,0,0,.45) 50%,#000 68%);
1424
- mask-image:linear-gradient(105deg,#000 32%,rgba(0,0,0,.45) 50%,#000 68%);
1425
- -webkit-mask-size:260% 100%;mask-size:260% 100%;
1426
- animation:slBootSweep 1.6s ease-in-out infinite}
1427
- .sl-boot-shells path,.sl-boot-stage{fill:color-mix(in srgb,var(--sl-accent) 12%,transparent)}
1428
- .sl-boot-stage{fill:color-mix(in srgb,var(--sl-accent) 20%,transparent)}
1429
- @keyframes slBootSweep{from{-webkit-mask-position:160% 0;mask-position:160% 0}
1430
- to{-webkit-mask-position:-60% 0;mask-position:-60% 0}}
1431
- /* The 2px line under the header: indeterminate on purpose. Nothing here knows
1432
- what fraction of a chart has arrived, and a fake percentage is a lie the
1433
- buyer can time. */
1434
- .sl-boot-bar{position:absolute;top:0;left:0;right:0;height:2px;overflow:hidden;
1435
- background:color-mix(in srgb,var(--sl-accent) 12%,transparent)}
1436
- .sl-boot-bar::after{content:"";position:absolute;top:0;bottom:0;width:38%;
1437
- background:var(--sl-accent);animation:slBootBar 1.6s ease-in-out infinite}
1438
- @keyframes slBootBar{from{inset-inline-start:-40%}to{inset-inline-start:100%}}
1439
- /* The sentence the silhouette replaced: still said, just not shown. */
1440
- .sl-boot-say{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
1441
- clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
1442
- /* One sweep across the REAL shells as they land, then it removes itself. */
1443
- .sl-shells-in{position:absolute;inset:0;z-index:5;pointer-events:none;
1444
- background:linear-gradient(105deg,transparent 34%,color-mix(in srgb,var(--sl-accent) 14%,transparent) 50%,transparent 66%);
1445
- background-size:260% 100%;animation:slShellSweep 600ms ease-out 1}
1446
- @keyframes slShellSweep{from{background-position:160% 0}to{background-position:-60% 0}}
1447
- /* Price chips arrive in order, then the sheet's peek bar comes up last. */
1448
- .sl-rail.is-in .sl-rc{animation:slRailIn 200ms ease-out both}
1449
- .sl-rail.is-in .sl-rc:nth-child(2){animation-delay:40ms}
1450
- .sl-rail.is-in .sl-rc:nth-child(3){animation-delay:80ms}
1451
- .sl-rail.is-in .sl-rc:nth-child(4){animation-delay:120ms}
1452
- .sl-rail.is-in .sl-rc:nth-child(n+5){animation-delay:160ms}
1453
- @keyframes slRailIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
1454
- .sl-picker.is-arriving .sl-sheet-head{animation:slPeekIn 240ms ease-out both;animation-delay:200ms}
1455
- @keyframes slPeekIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
1456
- @media(prefers-reduced-motion:reduce){
1457
- .sl-boot,.sl-boot-venue,.sl-boot-bar::after,.sl-shells-in,
1458
- .sl-rail.is-in .sl-rc,.sl-picker.is-arriving .sl-sheet-head{animation:none;transition:none}
1459
- .sl-boot-venue{-webkit-mask-image:none;mask-image:none}
1460
- }
1461
- .sl-boot-spin{width:24px;height:24px;border-radius:50%;border:3px solid var(--sl-line);border-top-color:var(--sl-accent);
1462
- animation:slspin .8s linear infinite}
1463
- @keyframes slspin{to{transform:rotate(360deg)}}
1464
- /* The failure state replaces the silhouette with words, so it takes the
1465
- column layout the boot element no longer has by default. */
1466
- .sl-boot:has(.sl-boot-title){flex-direction:column;gap:10px;
1467
- font-size:13px;font-weight:600;color:var(--sl-muted)}
1468
- .sl-boot-title{font-weight:800;font-size:15px;color:var(--sl-text)}
1469
- .sl-boot-retry{margin-top:4px;padding:9px 20px;border-radius:var(--sl-r-sm);background:var(--sl-accent);
1470
- color:var(--sl-accent-ink);font-weight:700;font-size:13px}
1471
-
1472
- /* sales-closed pill (header) \u2014 persistent read-only state when the event's sales
1473
- window is closed at load or closes live mid-session. Neutral (not accent) so it
1474
- reads as "unavailable", distinct from the accent hold pill next to it. */
1475
- .sl-closed-pill{display:none;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;flex:none;
1476
- background:color-mix(in srgb,var(--sl-text) 12%,var(--sl-surface));color:var(--sl-text);
1477
- font-weight:700;font-size:12px;white-space:nowrap}
1478
- .sl-closed-pill.on{display:inline-flex}
1479
- .sl-closed-pill svg{width:13px;height:13px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
1480
-
1481
- /* "Powered by SeatLayer" attribution badge (side-panel foot) \u2014 the canonical
1482
- Layered Rows mark + wordmark. Hidden when the host opts out or the org's paid
1483
- theme sets hideBadge. */
1484
- .sl-powered{display:flex;align-items:center;justify-content:center;gap:5px;margin-top:2px;
1485
- font-size:11px;font-weight:600;letter-spacing:.02em;color:var(--sl-text);opacity:.72;
1486
- text-decoration:none;padding:2px 8px;border-radius:999px;width:fit-content;margin-inline:auto;
1487
- transition:opacity .15s ease,background-color .15s ease}
1488
- .sl-powered:hover{opacity:1;background:color-mix(in srgb,var(--sl-text) 8%,transparent)}
1489
- .sl-powered:focus-visible{opacity:1;outline:2px solid var(--sl-accent);outline-offset:2px}
1490
- .sl-powered-mark{width:16px;height:16px;border-radius:4px;flex:none;display:flex;align-items:center;justify-content:center;
1491
- background:#0c1220;color:#fcf7ee}
1492
- .sl-powered-mark svg{width:12px;height:11px}
1493
-
1494
- /* a11y filter chips (flow within the top-left region) */
1495
- .sl-chips{display:flex;gap:6px;flex-wrap:wrap}
1496
- .sl-chip-f{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border-radius:999px;font-size:12px;font-weight:700;
1497
- background:var(--sl-surface);border:1px solid var(--sl-line);color:var(--sl-muted);transition:color .15s,border-color .15s}
1498
- .sl-chip-f:hover{color:var(--sl-text)}
1499
- .sl-chip-f.on{background:var(--sl-accent);color:var(--sl-accent-ink);border-color:transparent}
1500
-
1501
- /* confirm card: a candidate is not in the tray until Select. Map gestures and
1502
- floating chrome pause while the card owns focus, keeping the camera stable. */
1503
- .sl-picker[data-confirming="true"] .sl-map-host>:not(.sl-confirm){pointer-events:none}
1504
- .sl-picker[data-confirming="true"] .sl-anchor{pointer-events:none;opacity:.28;transition:opacity .16s}
1505
- .sl-picker[data-confirming="true"] .sl-side{pointer-events:none;opacity:.58;transition:opacity .16s}
1506
- .sl-confirm{position:absolute;z-index:10;width:276px;max-width:calc(100% - 24px);overflow:hidden;pointer-events:auto;
1507
- background:var(--sl-surface);border:1px solid color-mix(in srgb,var(--sl-line) 70%,var(--sl-text));
1508
- border-radius:15px;box-shadow:0 24px 64px -18px rgba(0,0,0,.72);transform:translate(-50%,calc(-100% - 16px))}
1509
- /* Entrance and exit are the shared anchored moments (.sl-mo-in/.sl-mo-out),
1510
- which animate scale+translate and therefore leave this placement transform
1511
- alone. The card had two private keyframes here; they differed from the
1512
- vocabulary only in being 240ms instead of 260, and one of them was silently
1513
- beating the exit the widget had asked for. */
1514
- .sl-confirm[data-placement="below"]{transform:translate(-50%,16px)}
1515
- .sl-confirm-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(52px,auto) minmax(52px,auto);border-bottom:1px solid var(--sl-line)}
1516
- .sl-confirm-field{min-width:0;padding:12px 11px 10px;border-right:1px solid var(--sl-line)}
1517
- .sl-confirm-field:last-child{border-right:0;text-align:center}
1518
- .sl-confirm-field:nth-child(2){text-align:center}
1519
- .sl-confirm-key{display:block;font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--sl-muted);font-weight:800}
1520
- .sl-confirm-value{display:block;margin-top:4px;color:var(--sl-text);font-size:17px;line-height:1.1;font-weight:850;
1521
- white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
1522
- /* Long venue section names must read in full: smaller type + up to two lines
1523
- beats an ellipsis at identity-confirmation time. Row/seat stay big \u2014 they're
1524
- short and they're what the buyer double-checks against the map. */
1525
- .sl-confirm-field:first-child .sl-confirm-value{font-size:13.5px;line-height:1.25;white-space:normal;
1526
- display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
1527
- .sl-confirm-cat{display:flex;align-items:center;gap:8px;padding:10px 12px;background:color-mix(in srgb,var(--sl-cat) 76%,var(--sl-surface))}
1528
- .sl-confirm-cat .sl-dot{border:2px solid color-mix(in srgb,var(--sl-cat-ink) 78%,transparent);width:11px;height:11px}
1529
- .sl-confirm-cat-name{font-size:13.5px;font-weight:800;color:var(--sl-cat-ink);flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
1530
- .sl-confirm-price{font-size:17px;font-weight:850;color:var(--sl-cat-ink);font-variant-numeric:tabular-nums}
1531
- /* The PHONE's identity line and the strip wrapper are in every card's DOM and
1532
- invisible at desktop width. Desktop keeps the eyebrow grid and the colour
1533
- band it has the room for (owner call 2026-08-27); display:contents leaves
1534
- the thumb block laid out in the body exactly where it has always been, so
1535
- the desktop card is byte-for-byte the card it was. */
1536
- .sl-confirm-id{display:none}
1537
- .sl-confirm-strip{display:contents}
1538
- .sl-confirm-pills{display:none}
1539
- .sl-confirm-body{padding:11px 12px 12px}
1540
- .sl-confirm-tiers{display:grid;gap:6px;margin:0 0 9px;padding:0;border:0}
1541
- .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}
1542
- .sl-confirm-tier{display:flex;align-items:center;gap:9px;width:100%;min-height:40px;padding:8px 10px;border:1px solid var(--sl-line);
1543
- border-radius:9px;color:var(--sl-text);background:color-mix(in srgb,var(--sl-bg) 72%,var(--sl-surface));text-align:left}
1544
- .sl-confirm-tier:hover{border-color:color-mix(in srgb,var(--sl-accent) 58%,var(--sl-line))}
1545
- .sl-confirm-tier[aria-pressed="true"]{border-color:var(--sl-accent);background:color-mix(in srgb,var(--sl-accent) 13%,var(--sl-surface));
1546
- box-shadow:inset 3px 0 0 var(--sl-accent)}
1547
- .sl-confirm-tier-copy{min-width:0;flex:1;display:grid;gap:2px}
1548
- .sl-confirm-tier-name{min-width:0;font-size:12.5px;font-weight:800}
1549
- .sl-confirm-tier-note,.sl-tier-note{color:var(--sl-muted);font-size:10.5px;line-height:1.3}
1550
- .sl-confirm-tier[aria-pressed="true"] .sl-confirm-tier-note{color:var(--sl-text)}
1551
- .sl-confirm-tier-price{font-size:13px;font-weight:850;font-variant-numeric:tabular-nums}
1552
- .sl-confirm-row{display:flex;gap:8px;margin-top:10px}
1553
- .sl-confirm-row button{flex:1;min-height:44px;padding:9px 12px;border-radius:9px;font-weight:800;font-size:13px}
1554
- .sl-confirm-add{background:var(--sl-accent)!important;color:var(--sl-accent-ink)!important;display:flex;align-items:center;justify-content:center;gap:7px}
1555
- .sl-confirm-add svg{width:16px;height:16px;stroke:currentColor;stroke-width:2.8;fill:none;stroke-linecap:round;stroke-linejoin:round}
1556
- .sl-confirm-cancel{background:color-mix(in srgb,var(--sl-line) 44%,transparent)!important;border:1px solid var(--sl-line)!important;color:var(--sl-muted)!important}
1557
- .sl-confirm-cancel:hover{color:var(--sl-text)}
1558
- .sl-picker[data-layout="narrow"] .sl-confirm{left:50%!important;top:auto!important;bottom:14px;width:min(310px,calc(100% - 24px));
1559
- transform:translateX(-50%);animation:slConfirmMobileIn .24s cubic-bezier(.2,.8,.2,1) both}
1560
- /* THE PHONE CONFIRMATION MUST BE CHECKABLE (owner review 2026-09-01). Packing
1561
- category, section, row and seat into one sentence made every fact compete
1562
- for the same ellipsis \u2014 exactly when the buyer is verifying the tap. Normal
1563
- phone layouts now reuse the desktop hierarchy: three labelled identity
1564
- cells, then a separate category + price strip. Tighter phone spacing keeps
1565
- the hierarchy to roughly one extra row rather than restoring the old tall
1566
- card. Only a genuinely short compact host falls back to the ticket-stub
1567
- line below, where preserving the two decision buttons is the harder limit. */
1568
- .sl-picker[data-layout="narrow"] .sl-confirm-grid{display:grid;
1569
- grid-template-columns:minmax(0,1.12fr) minmax(0,1fr) minmax(52px,.58fr)}
1570
- .sl-picker[data-layout="narrow"] .sl-confirm-field{padding:7px 8px 6px}
1571
- .sl-picker[data-layout="narrow"] .sl-confirm-key{font-size:8.5px;letter-spacing:.1em}
1572
- .sl-picker[data-layout="narrow"] .sl-confirm-value{margin-top:2px;font-size:15px}
1573
- .sl-picker[data-layout="narrow"] .sl-confirm-field:first-child .sl-confirm-value{font-size:12.5px;line-height:1.2}
1574
- .sl-picker[data-layout="narrow"] .sl-confirm-cat{display:flex;padding:7px 10px}
1575
- .sl-picker[data-layout="narrow"] .sl-confirm-cat-name{font-size:12.5px}
1576
- .sl-picker[data-layout="narrow"] .sl-confirm-price{font-size:15px}
1577
- .sl-picker[data-layout="narrow"] .sl-confirm-id{display:none;align-items:center;gap:7px;padding:10px 10px 0;min-height:28px}
1578
- .sl-picker[data-layout="narrow"][data-density="compact"] .sl-confirm-grid,
1579
- .sl-picker[data-layout="narrow"][data-density="compact"] .sl-confirm-cat{display:none}
1580
- .sl-picker[data-layout="narrow"][data-density="compact"] .sl-confirm-id{display:flex}
1581
- .sl-confirm-dot{flex:none;width:10px;height:10px;border-radius:50%;
1582
- box-shadow:0 0 0 2px color-mix(in srgb,var(--sl-surface) 70%,transparent),0 0 0 3px color-mix(in srgb,var(--sl-line) 80%,transparent)}
1583
- .sl-confirm-who{flex:1;min-width:0;overflow:hidden;display:flex;align-items:baseline;font-size:14px;font-weight:600;
1584
- line-height:1.25;color:var(--sl-text);white-space:nowrap}
1585
- /* WHAT GIVES GROUND, and it is not the venue's name. "Upper Grand Circle
1586
- Balcony Left Wing \xB7 Row A \xB7 Seat 1" does not fit beside a price at 310px, and
1587
- letting the only shrinkable item absorb all of it ellipsized the section name
1588
- to NOTHING \u2014 the card opened with a bare "\xB7 Row A \xB7 Seat 1". So the order is
1589
- explicit: row, seat and the price never move, because those are what the
1590
- buyer matches against the seat under their finger and against their wallet;
1591
- the section name is the one thing that ellipsizes, and only after it has kept
1592
- a floor wide enough to still read as a name. */
1593
- .sl-confirm-place{flex:0 1 auto;min-width:5.5em;overflow:hidden;text-overflow:ellipsis}
1594
- .sl-confirm-pos{flex:none;white-space:pre}
1595
- .sl-confirm-idprice{flex:none;font-size:15px;font-weight:800;color:var(--sl-text);font-variant-numeric:tabular-nums}
1596
- .sl-confirm-id .sl-cx-mark{flex:none}
1597
- /* The strip: full-bleed inside the card radius. A bordered, inset thumbnail
1598
- read as a widget pasted into the card; the same picture edge to edge reads as
1599
- the card being about that seat. */
1600
- /* THE SCRIM IS THE TOKEN HERE, and deliberately not a theme colour.
1601
- What sits behind these pills is the ORGANIZER'S PHOTOGRAPH, not the widget's
1602
- surface, so --sl-surface/--sl-text say nothing about whether the label will
1603
- be readable: a light theme over a night-time auditorium shot would put dark
1604
- ink on a dark picture. The plate is therefore its own scrim, named once
1605
- here and spent by every pill below, and it is dark in both themes because a
1606
- photo can be anything. Measured against the worst case \u2014 a pure white
1607
- photograph \u2014 the composite is rgb(78,81,87) and white ink on it is 7.5:1.
1608
- Everything that is NOT over a photo (the identity line, the price, the
1609
- no-photo rail) uses the theme tokens, which is where they belong. */
1610
- .sl-picker[data-layout="narrow"] .sl-confirm-strip{position:relative;display:block;margin:0;
1611
- --sl-pill-plate:rgba(10,14,22,.72);--sl-pill-ink:#fff}
1612
- .sl-picker[data-layout="narrow"] .sl-confirm-thumbwrap{height:64px;margin:0;border:0;border-radius:0}
1613
- .sl-picker[data-layout="narrow"] .sl-confirm-pills{position:absolute;right:6px;bottom:6px;display:flex;align-items:center;gap:6px}
1614
- /* The badge IS the phone's view pill \u2014 the desktop element restyled rather
1615
- than a second control saying the same thing. With no photo the whole rail is
1616
- muted and the pills move left, because a right-aligned pair floating on
1617
- nothing has no anchor. */
1618
- .sl-picker[data-layout="narrow"] .sl-confirm-thumb-badge,
1619
- .sl-picker[data-layout="narrow"] .sl-confirm-viewbtn{position:absolute;left:6px;bottom:6px;top:auto;right:auto;
1620
- width:auto;margin:0;display:inline-flex;align-items:center;gap:5px;min-height:28px;padding:5px 10px;
1621
- border:1px solid transparent;border-radius:999px;font-size:11px;font-weight:800;
1622
- color:var(--sl-pill-ink);background:var(--sl-pill-plate);backdrop-filter:blur(3px);white-space:nowrap}
1623
- .sl-picker[data-layout="narrow"] .sl-confirm-viewbtn{position:relative;left:auto;bottom:auto}
1624
- .sl-picker[data-layout="narrow"] .sl-confirm-strip:not(:has(.sl-confirm-thumbwrap)){
1625
- display:flex;align-items:center;gap:6px;height:44px;padding:0 6px;
1626
- background:color-mix(in srgb,var(--sl-line) 26%,transparent)}
1627
- .sl-picker[data-layout="narrow"] .sl-confirm-strip:not(:has(.sl-confirm-thumbwrap)) .sl-confirm-pills{
1628
- position:relative;right:auto;bottom:auto}
1629
- .sl-picker[data-layout="narrow"] .sl-confirm-strip:not(:has(.sl-confirm-thumbwrap)) .sl-confirm-viewbtn,
1630
- .sl-picker[data-layout="narrow"] .sl-confirm-strip:not(:has(.sl-confirm-thumbwrap)) .sl-confirm-pill{
1631
- color:var(--sl-text)!important;background:var(--sl-surface)!important;border-color:var(--sl-line)!important;backdrop-filter:none}
1632
- /* One pill shape for the 3D action, carrying its own dark plate so it stays
1633
- legible over any photograph. */
1634
- .sl-picker[data-layout="narrow"] .sl-confirm-pills{display:flex}
1635
- .sl-confirm-pill{display:inline-flex;align-items:center;gap:5px;min-height:28px;padding:5px 10px!important;
1636
- border:1px solid transparent!important;border-radius:999px!important;font-size:11px;font-weight:800;
1637
- color:var(--sl-pill-ink,#fff)!important;background:var(--sl-pill-plate,rgba(10,14,22,.72))!important;
1638
- backdrop-filter:blur(3px);white-space:nowrap}
1639
- .sl-confirm-pill svg{width:13px;height:13px;stroke:currentColor;stroke-width:1.9;fill:none;stroke-linecap:round;stroke-linejoin:round}
1640
- /* Distance stays \u2014 it is geometric and defensible \u2014 as a caption beside the
1641
- pills rather than a line of its own under them. */
1642
- .sl-picker[data-layout="narrow"] .sl-confirm-sight{position:absolute;right:6px;top:6px;margin:0;
1643
- font-size:10px;font-weight:700;color:var(--sl-pill-ink);background:var(--sl-pill-plate);border-radius:999px;padding:3px 8px}
1644
- /* The full-width 3D button is the pill's desktop half; only one of them is
1645
- ever visible. */
1646
- .sl-picker[data-layout="narrow"] .sl-confirm-3d{display:none}
1647
- /* CLEAR AIR ABOVE THE BUTTONS. Hiding the full-width 3D button took its 9px
1648
- top margin with it, and the photo is now full-bleed \u2014 so the picture ran
1649
- straight into Cancel/Select with only the body padding between them, and the
1650
- two committing buttons read as part of the photo block. 12px of body padding
1651
- restores the separation, and a row that follows tier choices or a caution
1652
- note keeps its own 10px so the gap never depends on what is above it. The
1653
- strip carries no margin of its own \u2014 the body's padding IS the gap under the
1654
- identity line, and having both stacked 20px of air above the photo. */
1655
- .sl-picker[data-layout="narrow"] .sl-confirm-body{padding:8px 10px 10px}
1656
- .sl-picker[data-layout="narrow"] .sl-confirm-tier{min-height:38px;padding:7px 9px}
1657
- .sl-picker[data-layout="narrow"] .sl-confirm-row{margin-top:0}
1658
- .sl-picker[data-layout="narrow"] .sl-confirm-row:not(:first-child){margin-top:10px}
1659
- .sl-picker[data-layout="narrow"] .sl-confirm-row button{min-height:44px}
1970
+ class dresses it as a labelled pill. */
1971
+ .sl-zfs-lbl{display:none}
1972
+ .sl-fs-pill.sl-fs-pill{display:inline-flex;align-items:center;justify-content:center;width:auto;min-height:40px;height:auto;
1973
+ padding:0 13px;gap:6px;border-radius:999px;font-size:11px;font-weight:800;
1974
+ background:var(--sl-surface);border:1px solid var(--sl-line);color:var(--sl-text);transition:border-color .15s}
1975
+ .sl-fs-pill.sl-fs-pill:hover{border-color:var(--sl-muted)}
1976
+ .sl-fs-pill svg{width:14px;height:14px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
1977
+ .sl-fs-pill .sl-zfs-lbl{display:inline;letter-spacing:.02em;white-space:nowrap}
1978
+ /* In the header, icons carry it (owner call): square Full screen glyph. The
1979
+ price-tag toggle beside it is gone \u2014 it existed only to reach a legend the
1980
+ narrow layout had hidden, and the rail is that legend now, already in view. */
1981
+ .sl-head .sl-fs-pill{min-height:34px;min-width:34px;width:34px;padding:0;flex:none}
1982
+ .sl-head .sl-fs-pill .sl-zfs-lbl{display:none}
1983
+ /* NARROW HEADER IS ONE 38px LINE. On a phone the host page (or the popup)
1984
+ already names the event above the picker, so identity demotes to the
1985
+ thumb + name density that data-event-details-hidden already defined, and
1986
+ the hold clock becomes a quiet tinted pill: it must stay legible, not
1987
+ compete with the Continue pill that actually takes the money. Every token
1988
+ is theme-relative (accent-text is contrast-checked against bg AND surface
1989
+ in resolvePickerTokens), so light org themes get a readable pill too. */
1990
+ .sl-picker[data-layout="narrow"] .sl-head{gap:8px;padding:6px 10px 6px 12px;min-height:38px}
1991
+ .sl-picker[data-layout="narrow"] .sl-logo{width:22px;height:22px;border-radius:6px;font-size:11px}
1992
+ .sl-picker[data-layout="narrow"] .sl-head-name{font-size:12.5px}
1993
+ .sl-picker[data-layout="narrow"] .sl-head-meta{display:none}
1994
+ /* 26px of ink in a header row that has no more height to give, and a 44px
1995
+ target reached the same way the price chips reach theirs. */
1996
+ .sl-picker[data-layout="narrow"] .sl-head .sl-fs-pill{position:relative;min-height:26px;min-width:26px;width:26px;color:var(--sl-muted)}
1997
+ .sl-picker[data-layout="narrow"] .sl-head .sl-fs-pill::after{content:'';position:absolute;top:50%;left:50%;
1998
+ width:44px;height:44px;transform:translate(-50%,-50%)}
1999
+ /* The box is taller than the header row, so it reaches into the price rail
2000
+ below. The header has to win that overlap or the target is decorative \u2014 and
2001
+ it costs the rail nothing, because the rail's own chips start at the far
2002
+ opposite end of the strip. */
2003
+ .sl-picker[data-layout="narrow"] .sl-head{position:relative;z-index:1}
2004
+ .sl-picker[data-layout="narrow"] .sl-head .sl-fs-pill svg{width:12px;height:12px}
2005
+ .sl-picker[data-layout="narrow"] .sl-hold-pill{padding:4px 9px;font-size:11px;gap:5px;
2006
+ background:color-mix(in srgb,var(--sl-accent) 14%,var(--sl-surface));color:var(--sl-accent-text)}
2007
+ .sl-picker[data-layout="narrow"] .sl-hold-pill.is-expiring{background:var(--sl-accent);color:var(--sl-accent-ink)}
2008
+ .sl-picker[data-layout="narrow"] .sl-closed-pill{padding:4px 9px;font-size:11px}
2009
+ .sl-picker[data-layout="narrow"] .sl-close{width:26px;height:26px}
2010
+ .sl-picker[data-layout="narrow"] .sl-close svg{width:12px;height:12px}
2011
+ /* ON-MAP CONTROLS SHARE ONE SIZE ON A PHONE: 36px round (zoom column, minimap
2012
+ toggle), 28px pills for level/mode groups. Every one of them sits over seats,
2013
+ so the smaller they read the more map survives; the 44px coarse-pointer floor
2014
+ still applies through the ::after targets below.
2015
+
2016
+ THE COLOUR-BLIND CONTROL IS NO LONGER ONE OF THEM. It is a row inside the
2017
+ accessibility menu, and this phone rule outranked the row geometry
2018
+ (.sl-a11yrow.sl-cbbtn) because the layout attribute adds specificity: the
2019
+ row computed to 36px inside a 236px menu, putting the glyph outside the
2020
+ popover and collapsing its label to nothing. Nothing on the map wears
2021
+ .sl-cbbtn any more, so the rule is gone rather than re-scoped to a stack it
2022
+ has left. */
2023
+ /* One control size on phones \u2014 match the 36px round rhythm the rest of the
2024
+ zoom column uses, but keep width for the language name to be readable. */
2025
+ .sl-picker[data-layout="narrow"] .sl-langsel{height:36px;max-width:112px;font-size:11.5px}
2026
+ .sl-picker[data-layout="narrow"] .sl-floors{padding:3px;gap:1px}
2027
+ .sl-picker[data-layout="narrow"] .sl-floors button[data-floor]{min-height:28px;padding:4px 10px;font-size:10.5px}
2028
+ .sl-picker[data-layout="narrow"] .sl-floor-info{flex-basis:26px;width:26px;height:26px;font-size:11px}
2029
+
2030
+ /* toast + boot states (toast flows in the bottom-center region) */
2031
+ /* A toast is a SENTENCE, not a chip. It used to be a nowrap line with
2032
+ an ellipsis, so the half of "That seat has just been taken - pick another"
2033
+ that says what to do next was the half that got cut. Two lines is a cheap
2034
+ price for a message that only appears when something went wrong. */
2035
+ .sl-toast{transform:translateY(6px) scale(.98);max-width:100%;
2036
+ background:var(--sl-surface);border:1px solid var(--sl-line);color:var(--sl-text);border-radius:16px;padding:9px 16px;
2037
+ font-size:12.5px;font-weight:600;line-height:1.35;opacity:0;pointer-events:none;transition:opacity .22s,transform .22s;
2038
+ text-wrap:pretty}
2039
+ .sl-toast.on{opacity:1;transform:translateY(0) scale(1)}
2040
+ .sl-toast.has-action{pointer-events:auto;display:flex;align-items:center;gap:12px;padding-right:8px}
2041
+ .sl-toast-action{min-height:30px;padding:5px 10px;border-radius:999px;background:var(--sl-accent);color:var(--sl-accent-ink);
2042
+ font:inherit;font-weight:800}
2043
+ .sl-toast[data-tone="error"]{border-color:var(--sl-danger)}
2044
+ .sl-toast[data-tone="warning"]{border-color:var(--sl-accent)}
2045
+ .sl-toast[data-tone="success"]{border-color:var(--sl-success)}
2046
+ .sl-toast.on[data-tone="error"]{animation:slToastNudge .32s ease-out}
2047
+ /* THE LOADING STATE IS A VENUE, NOT A WORD.
2048
+
2049
+ A spinner over "Loading seat map..." said only that the buyer was waiting.
2050
+ A faint silhouette of concentric shells around a stage says what is coming
2051
+ and roughly where its parts will be, so the real chart reads as an arrival
2052
+ rather than a replacement. The sentence stays for screen readers, which get
2053
+ nothing from scenery. */
2054
+ .sl-boot{position:absolute;inset:0;z-index:6;display:flex;align-items:center;justify-content:center;
2055
+ background:var(--sl-bg);transition:opacity 180ms ease}
2056
+ .sl-boot.is-going{opacity:0}
2057
+ .sl-boot-venue{width:min(78%,420px);max-height:72%;overflow:visible;
2058
+ -webkit-mask-image:linear-gradient(105deg,#000 32%,rgba(0,0,0,.45) 50%,#000 68%);
2059
+ mask-image:linear-gradient(105deg,#000 32%,rgba(0,0,0,.45) 50%,#000 68%);
2060
+ -webkit-mask-size:260% 100%;mask-size:260% 100%;
2061
+ animation:slBootSweep 1.6s ease-in-out infinite}
2062
+ .sl-boot-shells path,.sl-boot-stage{fill:color-mix(in srgb,var(--sl-accent) 12%,transparent)}
2063
+ .sl-boot-stage{fill:color-mix(in srgb,var(--sl-accent) 20%,transparent)}
2064
+ @keyframes slBootSweep{from{-webkit-mask-position:160% 0;mask-position:160% 0}
2065
+ to{-webkit-mask-position:-60% 0;mask-position:-60% 0}}
2066
+ /* The 2px line under the header: indeterminate on purpose. Nothing here knows
2067
+ what fraction of a chart has arrived, and a fake percentage is a lie the
2068
+ buyer can time. */
2069
+ .sl-boot-bar{position:absolute;top:0;left:0;right:0;height:2px;overflow:hidden;
2070
+ background:color-mix(in srgb,var(--sl-accent) 12%,transparent)}
2071
+ .sl-boot-bar::after{content:"";position:absolute;top:0;bottom:0;width:38%;
2072
+ background:var(--sl-accent);animation:slBootBar 1.6s ease-in-out infinite}
2073
+ @keyframes slBootBar{from{inset-inline-start:-40%}to{inset-inline-start:100%}}
2074
+ /* The sentence the silhouette replaced: still said, just not shown. */
2075
+ .sl-boot-say{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
2076
+ clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
2077
+ /* One sweep across the REAL shells as they land, then it removes itself. */
2078
+ .sl-shells-in{position:absolute;inset:0;z-index:5;pointer-events:none;
2079
+ background:linear-gradient(105deg,transparent 34%,color-mix(in srgb,var(--sl-accent) 14%,transparent) 50%,transparent 66%);
2080
+ background-size:260% 100%;animation:slShellSweep 600ms ease-out 1}
2081
+ @keyframes slShellSweep{from{background-position:160% 0}to{background-position:-60% 0}}
2082
+ /* Price chips arrive in order, then the sheet's peek bar comes up last. */
2083
+ .sl-rail.is-in .sl-rc{animation:slRailIn 200ms ease-out both}
2084
+ .sl-rail.is-in .sl-rc:nth-child(2){animation-delay:40ms}
2085
+ .sl-rail.is-in .sl-rc:nth-child(3){animation-delay:80ms}
2086
+ .sl-rail.is-in .sl-rc:nth-child(4){animation-delay:120ms}
2087
+ .sl-rail.is-in .sl-rc:nth-child(n+5){animation-delay:160ms}
2088
+ @keyframes slRailIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
2089
+ .sl-picker.is-arriving .sl-sheet-head{animation:slPeekIn 240ms ease-out both;animation-delay:200ms}
2090
+ @keyframes slPeekIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
2091
+ @media(prefers-reduced-motion:reduce){
2092
+ .sl-boot,.sl-boot-venue,.sl-boot-bar::after,.sl-shells-in,
2093
+ .sl-rail.is-in .sl-rc,.sl-picker.is-arriving .sl-sheet-head{animation:none;transition:none}
2094
+ .sl-boot-venue{-webkit-mask-image:none;mask-image:none}
2095
+ }
2096
+ .sl-boot-spin{width:24px;height:24px;border-radius:50%;border:3px solid var(--sl-line);border-top-color:var(--sl-accent);
2097
+ animation:slspin .8s linear infinite}
2098
+ @keyframes slspin{to{transform:rotate(360deg)}}
2099
+ /* The failure state replaces the silhouette with words, so it takes the
2100
+ column layout the boot element no longer has by default. */
2101
+ .sl-boot:has(.sl-boot-title){flex-direction:column;gap:10px;
2102
+ font-size:13px;font-weight:600;color:var(--sl-muted)}
2103
+ .sl-boot-title{font-weight:800;font-size:15px;color:var(--sl-text)}
2104
+ .sl-boot-retry{margin-top:4px;padding:9px 20px;border-radius:var(--sl-r-sm);background:var(--sl-accent);
2105
+ color:var(--sl-accent-ink);font-weight:700;font-size:13px}
2106
+
2107
+ /* sales-closed pill (header) \u2014 persistent read-only state when the event's sales
2108
+ window is closed at load or closes live mid-session. Neutral (not accent) so it
2109
+ reads as "unavailable", distinct from the accent hold pill next to it. */
2110
+ .sl-closed-pill{display:none;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;flex:none;
2111
+ background:color-mix(in srgb,var(--sl-text) 12%,var(--sl-surface));color:var(--sl-text);
2112
+ font-weight:700;font-size:12px;white-space:nowrap}
2113
+ .sl-closed-pill.on{display:inline-flex}
2114
+ .sl-closed-pill svg{width:13px;height:13px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
2115
+
2116
+ /* "Powered by SeatLayer" attribution badge (side-panel foot) \u2014 the canonical
2117
+ Layered Rows mark + wordmark. Hidden when the host opts out or the org's paid
2118
+ theme sets hideBadge. */
2119
+ .sl-powered{display:flex;align-items:center;justify-content:center;gap:5px;margin-top:2px;
2120
+ font-size:11px;font-weight:600;letter-spacing:.02em;color:var(--sl-text);opacity:.72;
2121
+ text-decoration:none;padding:2px 8px;border-radius:999px;width:fit-content;margin-inline:auto;
2122
+ transition:opacity .15s ease,background-color .15s ease}
2123
+ .sl-powered:hover{opacity:1;background:color-mix(in srgb,var(--sl-text) 8%,transparent)}
2124
+ .sl-powered:focus-visible{opacity:1;outline:2px solid var(--sl-accent);outline-offset:2px}
2125
+ .sl-powered-mark{width:16px;height:16px;border-radius:4px;flex:none;display:flex;align-items:center;justify-content:center;
2126
+ background:#0c1220;color:#fcf7ee}
2127
+ .sl-powered-mark svg{width:12px;height:11px}
2128
+
2129
+ /* a11y filter chips (flow within the top-left region) */
2130
+ .sl-chips{display:flex;gap:6px;flex-wrap:wrap}
2131
+ .sl-chip-f{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border-radius:999px;font-size:12px;font-weight:700;
2132
+ background:var(--sl-surface);border:1px solid var(--sl-line);color:var(--sl-muted);transition:color .15s,border-color .15s}
2133
+ .sl-chip-f:hover{color:var(--sl-text)}
2134
+ .sl-chip-f.on{background:var(--sl-accent);color:var(--sl-accent-ink);border-color:transparent}
2135
+
1660
2136
 
1661
2137
  /* Atomic whole/variable-table chooser. Lives inside the widget so the same
1662
2138
  accessible dialog works in inline, modal, desktop and 390px mobile hosts. */
@@ -1690,18 +2166,27 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
1690
2166
  .sl-picker[data-layout="narrow"] .sl-table-head{padding-top:22px}.sl-picker[data-layout="narrow"] .sl-table-body{padding-bottom:max(20px,env(safe-area-inset-bottom))}
1691
2167
 
1692
2168
  /* Best available is a first-class shortcut, not an anonymous utility row. */
1693
- .sl-ba{position:relative;flex:none;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:7px;
2169
+ /* ONE ROW OF CONTROLS, EVERY EDGE ON THE CARD'S GUTTER. The card grew by
2170
+ accretion \u2014 a premium chip, a category select, a zone select, a stepper and
2171
+ a CTA, each dropped into whatever cell the grid's auto-placement had left \u2014
2172
+ so its controls ended at three different right edges and, at 390px, two
2173
+ selects sat side by side at half a phone each. The track is explicit now:
2174
+ the stepper is a fixed box, the ticket type takes the rest of that row, and
2175
+ anything longer gets a row of its own.
2176
+
2177
+ The 42px \u2726 watermark went with it. It was decoration behind live controls
2178
+ that every one of them then needed a z-index to sit in front of. */
2179
+ .sl-ba{position:relative;flex:none;overflow:hidden;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;
1694
2180
  padding:13px;border:1px solid color-mix(in srgb,var(--sl-accent) 34%,var(--sl-line));border-radius:13px;
1695
2181
  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)))}
1696
- .sl-ba::after{content:'\u2726';position:absolute;right:10px;top:3px;color:color-mix(in srgb,var(--sl-accent) 20%,transparent);font-size:42px;line-height:1}
1697
- .sl-ba-title,.sl-ba-copy,.sl-ba select,.sl-ba-qty,.sl-ba-go{position:relative;z-index:1}
1698
2182
  .sl-ba-title{grid-column:1/-1;display:flex;align-items:center;gap:7px;font-size:13px;font-weight:850}
1699
2183
  .sl-ba-title .spark{color:var(--sl-accent-text);font-size:16px}
1700
- .sl-ba-copy{grid-column:1/-1;margin:-4px 0 2px 23px;color:var(--sl-muted);font-size:10.5px;line-height:1.35}
1701
- .sl-ba-copy .narrow{display:none}
2184
+ .sl-ba-copy{grid-column:1/-1;margin:-5px 0 2px 23px;color:var(--sl-muted);font-size:10.5px;line-height:1.35}
2185
+ .sl-ba-cat{grid-column:2}
2186
+ .sl-ba-zone{grid-column:1/-1}
1702
2187
  /* "\u2605 Best seats" premium quick-pick \u2014 gold accent echoing the \u2605 Premium pill on
1703
2188
  the confirm popover; deliberately distinct from the accent-toned qty/go. */
1704
- .sl-ba-premium{position:relative;z-index:1;grid-column:1/-1;justify-self:start;display:inline-flex;align-items:center;gap:6px;
2189
+ .sl-ba-premium{position:relative;grid-column:1/-1;justify-self:start;display:inline-flex;align-items:center;gap:6px;
1705
2190
  padding:6px 12px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.02em;cursor:pointer;
1706
2191
  color:var(--sl-premium-text);background:color-mix(in srgb,var(--sl-premium) 10%,var(--sl-surface));
1707
2192
  border:1px solid color-mix(in srgb,var(--sl-premium) 34%,var(--sl-line));transition:filter .15s,background .15s,color .15s}
@@ -1713,13 +2198,17 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
1713
2198
  .sl-ba select,.sl-price-select{appearance:none;-webkit-appearance:none;
1714
2199
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23949ca9' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
1715
2200
  background-repeat:no-repeat;background-position:right 10px center}
1716
- .sl-ba select{background-color:var(--sl-surface);color:var(--sl-text);border:1px solid var(--sl-line);border-radius:8px;
1717
- font:inherit;font-size:11px;padding:7px 26px 7px 8px;min-width:0;width:100%;max-width:none}
1718
- .sl-ba-qty{display:flex;align-items:center;gap:7px;padding:3px;border:1px solid var(--sl-line);border-radius:9px;background:var(--sl-surface)}
1719
- .sl-ba-qty button{width:25px;height:25px;border-radius:7px;background:color-mix(in srgb,var(--sl-line) 35%,transparent);border:0;
2201
+ .sl-price-select{background-size:11px 7px;background-position:right 9px center}
2202
+ .sl-ba select{background-color:var(--sl-surface);color:var(--sl-text);border:1px solid var(--sl-line);border-radius:9px;
2203
+ font:inherit;font-size:11.5px;height:34px;padding:0 26px 0 9px;min-width:0;width:100%;max-width:none}
2204
+ /* A fixed box, so the ticket type beside it starts at the same x on every
2205
+ chart \u2014 the stepper's width must not depend on whether the count is 1 or 12. */
2206
+ .sl-ba-qty{display:flex;align-items:center;justify-content:space-between;gap:2px;width:96px;height:34px;padding:0 3px;
2207
+ border:1px solid var(--sl-line);border-radius:9px;background:var(--sl-surface)}
2208
+ .sl-ba-qty button{flex:none;width:28px;height:28px;border-radius:7px;background:color-mix(in srgb,var(--sl-line) 35%,transparent);border:0;
1720
2209
  font-size:14px;font-weight:800;display:flex;align-items:center;justify-content:center}
1721
- .sl-ba-qty span{min-width:14px;text-align:center;font-weight:800}
1722
- .sl-picker .sl-ba-go{grid-column:1/-1;width:100%;min-height:37px;padding:7px 12px;border-radius:9px;background:var(--sl-accent);
2210
+ .sl-ba-qty span{flex:1;min-width:14px;text-align:center;font-weight:800;font-variant-numeric:tabular-nums}
2211
+ .sl-picker .sl-ba-go{grid-column:1/-1;width:100%;min-height:40px;padding:7px 12px;border-radius:9px;background:var(--sl-accent);
1723
2212
  color:var(--sl-accent-ink);font-weight:800;font-size:12px;transition:filter .15s,opacity .15s;display:flex;align-items:center;justify-content:center;gap:6px;
1724
2213
  box-shadow:0 8px 18px color-mix(in srgb,var(--sl-accent) 18%,transparent)}
1725
2214
  .sl-picker .sl-ba-go:hover{filter:brightness(1.06)}
@@ -1738,19 +2227,20 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
1738
2227
  .sl-ba-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:7px}
1739
2228
  .sl-ba-actions button{min-height:36px;border-radius:9px;border:1px solid var(--sl-line);font-size:11.5px;font-weight:800}
1740
2229
  .sl-ba-actions .replace{border-color:var(--sl-accent);background:var(--sl-accent);color:var(--sl-accent-ink)}
1741
- .sl-picker[data-layout="narrow"] .sl-ba{padding:9px;gap:6px}
1742
- .sl-picker[data-layout="narrow"] .sl-ba::after{display:none}
2230
+ .sl-picker[data-layout="narrow"] .sl-ba{padding:10px;gap:8px}
1743
2231
  .sl-picker[data-layout="narrow"] .sl-ba-title{font-size:12.5px}
1744
2232
  .sl-picker[data-layout="narrow"] .sl-ba-copy{display:none}
1745
- .sl-picker[data-layout="narrow"] .sl-ba-copy .wide{display:none}
1746
- .sl-picker[data-layout="narrow"] .sl-ba-copy .narrow{display:inline}
1747
- .sl-picker[data-layout="narrow"] .sl-ba{grid-template-columns:auto minmax(0,1fr)}
1748
- .sl-picker[data-layout="narrow"] .sl-ba select{grid-column:1/-1;min-height:38px}
1749
- .sl-picker[data-layout="narrow"] .sl-ba-qty button{width:30px;height:30px}
2233
+ /* NOTHING NARROWER THAN A THUMB SITS BESIDE ANYTHING ELSE. At 390px the
2234
+ category and zone selects shared a row at ~170px each, which is a listbox
2235
+ you open by aiming. Both take the full width here, and every control on this
2236
+ card clears 44px. */
2237
+ .sl-picker[data-layout="narrow"] .sl-ba select{grid-column:1/-1;height:44px;font-size:12.5px}
2238
+ .sl-picker[data-layout="narrow"] .sl-ba-qty{height:44px;width:112px}
2239
+ .sl-picker[data-layout="narrow"] .sl-ba-qty button{width:34px;height:34px}
1750
2240
  /* Quantity and Go share ONE row: a full-width row holding only "\u2212 2 +" was
1751
2241
  dead space, and the Find button still gets the lion's share. */
1752
2242
  .sl-picker[data-layout="narrow"] .sl-ba-qty{grid-column:1}
1753
- .sl-picker[data-layout="narrow"] .sl-ba-go{grid-column:2;min-height:40px}
2243
+ .sl-picker[data-layout="narrow"] .sl-ba-go{grid-column:2;min-height:44px}
1754
2244
  /* Re-entry to best-available once the cart has seats (the card yields its
1755
2245
  space to chips, but the accelerator must stay reachable) + the quiet way
1756
2246
  back out of a reopened card. */
@@ -1779,17 +2269,26 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
1779
2269
  (the cart chip's remove/view rail) instead get real height on narrow. */
1780
2270
  @media (pointer:coarse){
1781
2271
  .sl-zoom button,.sl-cbbtn,.sl-close,.sl-ga-qty button,.sl-ba-qty button,.sl-price-more,
1782
- .sl-hold-change,.sl-seccard-x,.sl-fs-pill,.sl-side-toggle,.sl-ba-reopen,.sl-minimap-toggle,.sl-floor-info{position:relative}
2272
+ .sl-hold-change,.sl-seccard-x,.sl-fs-pill,.sl-side-toggle,.sl-ba-reopen,.sl-minimap-toggle,.sl-floor-info,
2273
+ /* The sheet chevron shrinks to 28px of ink while the panel is open (there is
2274
+ no height to spare there) and was never on this list, so the one control
2275
+ that closes the panel was a 28px target. */
2276
+ .sl-sheet-toggle{position:relative}
1783
2277
  .sl-zoom button::after,.sl-cbbtn::after,.sl-close::after,.sl-ga-qty button::after,.sl-ba-qty button::after,
1784
2278
  .sl-price-more::after,.sl-hold-change::after,.sl-seccard-x::after,.sl-fs-pill::after,.sl-side-toggle::after,.sl-ba-reopen::after,
1785
- .sl-minimap-toggle::after,.sl-floor-info::after{
2279
+ .sl-minimap-toggle::after,.sl-floor-info::after,.sl-sheet-toggle::after{
1786
2280
  content:'';position:absolute;top:50%;left:50%;width:max(100%,44px);height:max(100%,44px);
1787
2281
  transform:translate(-50%,-50%)}
1788
- /* The chip rail stacks remove over view in ~53px \u2014 pseudo-targets would
1789
- overlap and make a destructive tap ambiguous. Give the pair real height. */
1790
- .sl-picker[data-layout="narrow"] .sl-chip{min-height:64px}
1791
- .sl-picker[data-layout="narrow"] .sl-chip .rm,
1792
- .sl-picker[data-layout="narrow"] .sl-chip .view{min-height:32px}
2282
+ /* THE 64px CHIP IS GONE, AND SO IS THE REASON FOR 32px BUTTONS. This block
2283
+ was written when a cart row stacked remove OVER view in a bordered 34px
2284
+ column: pseudo-targets would have overlapped inside ~53px, so the pair was
2285
+ given real height instead and 32px was the most the stack could spare. The
2286
+ row is one 48px line now with the two actions SIDE BY SIDE, so there is
2287
+ nothing to overlap and no reason to stop short of the floor.
2288
+ The phone's DENSE line is a different row and keeps its own small ink over
2289
+ a real box \u2014 see .sl-tline in the tray sheet. */
2290
+ .sl-chip:not(.sl-tline) .rm,
2291
+ .sl-chip:not(.sl-tline) .view{min-height:44px;height:44px;width:44px}
1793
2292
  }
1794
2293
 
1795
2294
  /* screen-reader live region */
@@ -1827,19 +2326,6 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
1827
2326
  /* 28px on a phone \u2014 the same pill height as the level rail (slim chrome). */
1828
2327
  .sl-picker[data-layout="narrow"] .sl-projection button{min-width:38px;min-height:28px;padding:4px 8px;font-size:9.5px}
1829
2328
 
1830
- /* Plain "View from here" action shown when no real photo exists (the synthetic
1831
- thumb is suppressed at card size \u2014 full-screen is where it earns its keep). */
1832
- .sl-confirm-viewbtn{width:100%;margin-top:9px;padding:8px;border-radius:8px;border:1px solid var(--sl-line);
1833
- display:flex;align-items:center;justify-content:center;gap:7px;font-size:12px;font-weight:800;
1834
- color:var(--sl-text);background:transparent;transition:border-color .15s,background .15s}
1835
- .sl-confirm-viewbtn:hover,.sl-confirm-viewbtn:focus-visible{border-color:var(--sl-accent);background:color-mix(in srgb,var(--sl-accent) 10%,transparent)}
1836
- /* confirm-card "See it in 3D" / "View from this seat" action \u2014 the purchase-
1837
- moment bridge into the cinematic. Styled like the view-from-seat button. */
1838
- .sl-confirm-3d{width:100%;margin-top:9px;padding:8px;border-radius:8px;border:1px solid var(--sl-line);
1839
- display:flex;align-items:center;justify-content:center;gap:7px;font-size:12px;font-weight:800;
1840
- color:var(--sl-text);background:color-mix(in srgb,var(--sl-accent) 12%,transparent);transition:border-color .15s,background .15s}
1841
- .sl-confirm-3d:hover,.sl-confirm-3d:focus-visible{border-color:var(--sl-accent);background:color-mix(in srgb,var(--sl-accent) 20%,transparent)}
1842
- .sl-confirm-3d svg{width:15px;height:15px;stroke:currentColor;stroke-width:1.9;fill:none;stroke-linecap:round;stroke-linejoin:round}
1843
2329
 
1844
2330
  /* One compact multi-floor selector (flows within the left-rail region). */
1845
2331
  .sl-floors{display:none;align-items:center;gap:2px;max-width:min(420px,100%);overflow-x:auto;
@@ -1961,23 +2447,6 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
1961
2447
  .sl-seccard-back:active{transform:scale(.96)}
1962
2448
  .sl-seccard-back-chev{font-size:18px;line-height:1;margin-top:-2px}
1963
2449
 
1964
- /* view-from-seat button on the confirm popover */
1965
- /* Eager sightline preview inside the confirm card */
1966
- .sl-confirm-thumbwrap{position:relative;display:block;width:100%;height:74px;margin:0 0 8px;padding:0!important;
1967
- border-radius:9px;overflow:hidden;border:1px solid var(--sl-line);cursor:pointer}
1968
- .sl-confirm-thumb{display:block;width:100%;height:100%;object-fit:cover}
1969
- /* The thumbnail leaving the card when its image never arrives: height and
1970
- opacity only, so the card resizes rather than jumping. Reduced motion skips
1971
- the transition entirely \u2014 the block is simply removed. */
1972
- .sl-confirm-thumb-out{overflow:hidden;transition:height 160ms ease,opacity 160ms ease}
1973
- @media (prefers-reduced-motion:reduce){.sl-confirm-thumb-out{transition:none}}
1974
- .sl-confirm-thumb-badge{position:absolute;right:7px;top:7px;display:inline-flex;align-items:center;gap:5px;
1975
- font-size:10px;font-weight:700;color:#fff;background:rgba(10,14,22,0.72);border-radius:12px;padding:4px 9px;backdrop-filter:blur(3px)}
1976
- .sl-confirm-sight{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--sl-muted);margin-bottom:2px}
1977
- .sl-confirm-view{width:100%;margin-top:9px;padding:8px;border-radius:8px;border:1px solid var(--sl-line);
1978
- color:var(--sl-text);font-weight:700;font-size:12px;display:flex;align-items:center;justify-content:center;gap:7px}
1979
- .sl-confirm-view:hover{border-color:var(--sl-muted)}
1980
- .sl-confirm-view svg{width:14px;height:14px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
1981
2450
 
1982
2451
  /* commercial seat flags \u2014 limited-view caution + premium tag. Amber tone,
1983
2452
  deliberately distinct from the red taken/held state; shown on the confirm
@@ -2042,11 +2511,10 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
2042
2511
  explained states the thumbnail already shows, and the close duplicated the
2043
2512
  toggle that opened it. All three go on narrow, the thumbnail shrinks, and
2044
2513
  what is left is the one thing worth the space: where you are looking. */
2045
- .sl-picker[data-layout="narrow"] .sl-minimap{display:none}
2046
- .sl-picker[data-layout="narrow"] .sl-minimap-toggle{display:flex}
2047
- .sl-picker[data-layout="narrow"][data-minimap-open="true"] .sl-minimap{display:block}
2048
- .sl-picker[data-layout="narrow"] .sl-minimap-bar{display:none}
2049
- .sl-picker[data-layout="narrow"] .sl-minimap canvas{width:min(112px,30vw)!important;height:auto!important}
2514
+ /* NO OVERVIEW ON A PHONE (owner call 2026-09-02). The narrow rules that used
2515
+ to shrink this into a 112px thumbnail behind a toggle are gone with them:
2516
+ the widget does not BUILD a minimap on a narrow layout at all, so a rule
2517
+ here could only ever describe something that is not on the page. */
2050
2518
  /* The toggle STAYS while open and becomes the way out \u2014 one control for both
2051
2519
  directions, which is why the panel no longer needs its own \u2715. */
2052
2520
  .sl-picker[data-layout="narrow"][data-minimap-open="true"] .sl-minimap-toggle{display:flex;
@@ -2163,7 +2631,7 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
2163
2631
  corners, and it is the frame. */
2164
2632
  .sl-modal-frame > .sl-picker{border-radius:0}
2165
2633
  @media(max-width:640px){.sl-modal-scrim{padding:0}.sl-modal-frame{width:100%;height:100%;border-radius:0}}
2166
- `;function Je(){if(document.getElementById(Us))return;let s=document.createElement("style");s.id=Us,s.textContent=Go+Ks+qs+Gs+As,document.head.appendChild(s)}import{t as qo}from"@seatlayer/core";import{cdnAssetUrl as Ko}from"@seatlayer/core/core/cdnAsset";import{SEATLAYER_MODULE_URL as td}from"@seatlayer/core/core/cdnAsset";function v(s,e){let t=qo(s);return t===s?e:t}function Ws(s){if(typeof s=="string"){let e=document.querySelector(s);if(!e)throw new Error(`seatmap: container "${s}" not found`);return e}if(!(s instanceof HTMLElement))throw new Error("seatmap: container must be a CSS selector or an HTMLElement");return s}function R(s){return String(s??"").replace(/[&<>"']/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[e])}function Ys(s,e,t){let i=e.find(n=>Xe(n))??null;if(s.replaceChildren(),!i)return s.textContent=t.slice(0,1).toUpperCase(),null;let r=document.createElement("img");return r.alt="",r.referrerPolicy="no-referrer",r.src=i,s.appendChild(r),i}var et=null;function qt(){if(et!==null)return et;try{if(typeof document>"u")return et=!1;et=!!document.createElement("canvas").getContext("webgl2")}catch{et=!1}return et}function Ii(s){return Ko(s)}var wt=null;function kt(){return wt||(wt=(typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?import(Ii("seatlayer-view3d.mjs")):import("@seatlayer/core/view3d")).catch(e=>{throw wt=null,e}),wt)}function Ri(){(typeof navigator>"u"?void 0:navigator.connection)?.saveData||kt().catch(()=>{})}async function Kt(){return typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?import(Ii("seatlayer-panorama.mjs")):import("@seatlayer/core")}async function Qs(){return typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?import(Ii("seatlayer-checkout.mjs")):import("./hostedCheckout-W7QZWSOQ.js")}function Xs(s){return s==="unavailable_for_event"||s==="payments_off_for_event"?s:"not_configured"}function Ut(s,e,t){let i={month:"short",day:"numeric",hour:"numeric",minute:"2-digit"},r=new Date(s);if(e)try{return r.toLocaleString(t,{...i,timeZone:e})}catch{}return r.toLocaleString(t,i)}async function Wt(s,e){let t=s.overlay.productionElements;if(!t?.some(r=>r.contentImageUrl))return s;let i=await Promise.all(t.map(async r=>{if(!r.contentImageUrl)return r;try{let n=await e(r.contentImageUrl);if(!n){let{contentImageUrl:o,...a}=r;return a}return{...r,runtimeContentImageUrl:n}}catch{let{contentImageUrl:n,...o}=r;return o}}));return{...s,overlay:{...s.overlay,productionElements:i}}}async function Yt(s,e){if(s)try{let t=await e(s);return t?await(await fetch(t)).arrayBuffer():void 0}catch{return}}import{browserPanoramaConstraints as Uo,loadPanoramaImage as Wo,planPanoramaDelivery as Yo,schedulePanoramaUpgrade as Qo}from"@seatlayer/core/view/panoramaDelivery";function Qt(s){let{root:e,source:t,caption:i,real:r,closeLabel:n,dragHint:o,viewFromSeatLabel:a,real360Label:l,previewLabel:c,resolveAsset:p,onClose:d}=s,m=s.chrome??{},u=document.createElement("div");u.className="sl-view sl-mo-zoom",u.setAttribute("role","dialog"),u.setAttribute("aria-label",a),u.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 b=D=>u.querySelector(D)?.remove();m.title===!1?b(".sl-view-title"):u.querySelector(".sl-view-title").textContent=a,m.caption===!1?b(".sl-view-cap"):u.querySelector(".sl-view-cap").textContent=i,u.querySelector(".sl-view-x").setAttribute("aria-label",n),m.badge===!1?b(".sl-view-badge"):u.querySelector(".sl-view-badge").textContent=r?l:c,u.querySelector(".sl-view-hint").textContent=o,e.appendChild(u);let h=u.querySelector(".sl-view-pano"),y=Yo(t,Uo()),x=new AbortController;h.style.backgroundImage=`url(${JSON.stringify(y.initialUrl)})`;let S=()=>{};y.upgradeUrl&&(S=Qo(()=>{p(y.upgradeUrl).then(D=>!D||x.signal.aborted?null:Wo(D,x.signal).then(()=>D)).then(D=>{!D||!u.isConnected||x.signal.aborted||(h.style.backgroundImage=`url(${JSON.stringify(D)})`)}).catch(()=>{})}));let A=70,g=35,w=1,E=h.clientHeight||1,L=h.clientWidth||1,_=-(E*(180/A)*2/2-L/2),H=0,N=()=>{let D=h.clientHeight||1,wi=D*(180/A)*w,ys=Math.max(0,wi-D),xs=Math.min(ys/2,g/180*wi);H=Math.min(xs,Math.max(-xs,H)),h.style.backgroundSize=`auto ${wi}px`,h.style.backgroundPosition=`${_}px ${H-ys/2}px`};N();let Ee=!1,me=0,fe=0,Ae=D=>{Ee=!0,me=D.clientX,fe=D.clientY,h.classList.add("drag"),h.setPointerCapture?.(D.pointerId)},U=D=>{Ee&&(_+=D.clientX-me,H+=D.clientY-fe,me=D.clientX,fe=D.clientY,N())},_t=D=>{Ee=!1,h.classList.remove("drag"),h.releasePointerCapture?.(D.pointerId)},bs=D=>{D.preventDefault(),w=Math.min(2.4,Math.max(1,w+(D.deltaY<0?.12:-.12))),N()};h.addEventListener("pointerdown",Ae),h.addEventListener("pointermove",U),h.addEventListener("pointerup",_t),h.addEventListener("pointercancel",_t),h.addEventListener("wheel",bs,{passive:!1});let xi=u.querySelector(".sl-view-x");xi.addEventListener("click",d);let vs=D=>{D.key==="Escape"&&(D.stopPropagation(),d())};return u.addEventListener("keydown",vs),xi.focus(),{element:u,dispose(){S(),x.abort(),h.removeEventListener("pointerdown",Ae),h.removeEventListener("pointermove",U),h.removeEventListener("pointerup",_t),h.removeEventListener("pointercancel",_t),h.removeEventListener("wheel",bs),u.removeEventListener("keydown",vs),xi.removeEventListener("click",d)}}}function Jo(s,e){if(!e)return{targetSeatId:null,previousSeatId:null,nextSeatId:null};let t=s.find(n=>n.id===e);if(!t?.rowId)return{targetSeatId:e,previousSeatId:null,nextSeatId:null};let i=s.filter(n=>n.rowId===t.rowId),r=i.findIndex(n=>n.id===e);return{targetSeatId:e,previousSeatId:r>0?i[r-1].id:null,nextSeatId:r>=0&&r+1<i.length?i[r+1].id:null}}var Zs=6e4,Xt=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 Jo(this.options.seats(),this.targetSeatId_)}get navigationMode(){return this.navigationMode_}canOffer3D(){return this.options.enable3D?this.handle&&this.overlay?!0:!this.options.doc()||!qt()?!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),i=this.options.host(),r=this.options.doc();if(!t||!i||!r)throw new Error("seat_view_unavailable");let n=++this.seatViewGeneration,o,a,l=!1;if(t.viewUrl){let b=t.viewMeta?.previewUrl,h=!!b&&b!==t.viewUrl,y=h?await this.options.resolveAsset(b):null,x=h?t.viewUrl:await this.options.resolveAsset(t.viewUrl);if(n!==this.seatViewGeneration||!x||h&&!y)return;o={url:x,...y?{previewUrl:y}:{},...h?{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=Zo(o),l=Xo(o)}else{if(!this.hasStage())throw new Error("seat_view_unavailable");let{generateSeatPanorama:b}=await Kt();if(n!==this.seatViewGeneration)return;let h=r.floors?.find(S=>S.objects.some(A=>A.type==="row"&&A.id===t.rowId)),y=t.focalPoint??h?.focalPoint??r.focalPoint,x=b(t,y,[...this.options.seats()]);o={url:x.url,generated:!0},a=tt("picker.illustrationCaption",{m:x.distanceM})}if(n!==this.seatViewGeneration)return;this.closeSeatView(!1),this.prepareHostTheme(i,r),Je();let c=this.options.chrome??{},p=v("picker.dragToLookAround","Drag to look around \xB7 pinch or scroll to zoom"),d=tt("picker.viewFromSeat",{label:t.displayLabel||t.label}),m=l?tt("picker.real360"):tt("picker.preview"),u=Qt({root:i,source:o,caption:a,real:l,closeLabel:v("picker.close","Close"),dragHint:p,viewFromSeatLabel:d,real360Label:tt("picker.real360"),previewLabel:tt("picker.preview"),chrome:{title:c.seatViewTitle,caption:c.seatViewCaption,badge:c.seatViewBadge},resolveAsset:this.options.resolveAsset,onClose:()=>this.closeSeatView(!0,!0)});this.seatViewElement=u.element,this.seatViewDispose=u.dispose,this.options.onSeatViewChange?.({seatId:t.id,title:d,caption:a,badge:m,real:l,generated:!!o.generated,dragHint:p})}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 i=t.floors.findIndex(r=>r.id===e);return i>=0&&this.handle.focusFloor(i)}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)?Zs/2:Zs}async enter3D(e){let t=this.options.host(),i=this.options.doc();if(!t||!i||this.overlay)throw new Error("venue_3d_unavailable");Je(),this.prepareHostTheme(t,i);let r=document.createElement("div");r.className="sl-view3d",r.setAttribute("role","group"),r.setAttribute("aria-label",v("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 n=document.createElement("div");n.className="sl-view3d-loading",n.setAttribute("role","status"),n.setAttribute("aria-live","polite"),n.textContent=v("picker.loading3d","Building the 3D venue\u2026"),r.appendChild(n),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([kt(),this.options.loadEventConfiguration()]),c=l?await Wt(l,this.options.resolveAsset):null,p=await Yt(i.theme?.venue3d?.shellAssetUrl,this.options.resolveAsset);if(o!==this.generation||this.overlay!==r)return;let d={doc:i,seats:[...this.options.seats()],...c?{eventConfigurationId:c.id,eventConfiguration:c}:{},...p?{registeredShellGlb:p}:{}};n.textContent=v("picker.building3d","Building venue geometry\u2026");let m=await a.prepareVenue3D(d);if(o!==this.generation||this.overlay!==r)return;let u=this.options.chrome??{},b=a.mountVenue3D(r,{...d,prepared:m},{portraitOverviewCrop:!0,arriveAtSeatEye:!0,...u.view3dCaption===!1||u.view3dSeatStepper===!1||u.view3dControlDock===!1?{chrome:{caption:u.view3dCaption!==!1,seatStepper:u.view3dSeatStepper!==!1,controlDock:u.view3dControlDock!==!1}}:{},seatViewActionLabel:h=>this.findSeat(h)?.viewUrl?v("picker.openAuthored360","Open venue 360\xB0"):v("picker.lookAroundLive3d","Look around in live 3D"),onSeatPick:h=>this.toggleSeat(h),onSeatInspect:h=>this.toggleSeat(h),onViewTargetChange:h=>{this.targetSeatId_=h,h&&(this.focusedSectionId_=this.findSeat(h)?.sectionId??null),this.options.onViewChange("venue3d",h)},onSectionFocusChange:h=>{this.focusedSectionId_=h,this.options.onViewChange("venue3d",this.targetSeatId_)},...this.options.enableSeatView?{getSeatView:h=>this.seatViewFor3D(h)}:{}});if(o!==this.generation||this.overlay!==r){b.dispose();return}this.handle=b,this.buyerView_="venue3d",this.targetSeatId_=e??null,this.focusedSectionId_=e?this.findSeat(e)?.sectionId??null:null,b.setNavigationMode(this.navigationMode_),requestAnimationFrame(()=>n.remove()),this.pushLiveState(),this.options.onViewChange("venue3d",this.targetSeatId_),e&&await b.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 i=this.handle,r=this.overlay;if(this.options.restoreMap(),t&&i&&r){r.style.pointerEvents="none";let n=()=>{this.buyerView_!=="map"||this.overlay!==r||(r.style.visibility="hidden",this.options.restoreMap())};!e||this.reducedMotion()?(r.style.opacity="0",n()):(requestAnimationFrame(()=>{r.style.opacity="0"}),setTimeout(n,280));return}if(this.handle=null,this.overlay=null,!r){try{i?.dispose()}catch{}this.options.restoreMap();return}if(!e||this.reducedMotion()){try{i?.dispose()}catch{}r.remove(),this.options.restoreMap();return}r.style.pointerEvents="none",requestAnimationFrame(()=>{r.style.opacity="0"}),setTimeout(()=>{try{i?.dispose()}catch{}r.remove(),this.options.restoreMap()},280)}async restore3D(e){let t=this.overlay,i=this.handle;if(!t||!i)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"}),i.resize(),i.setNavigationMode(this.navigationMode_),this.pushLiveState(),this.options.onViewChange("venue3d",this.targetSeatId_),e.flyToSeatId?await i.flyToSeat(e.flyToSeatId):e.resetView&&i.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 i=t.viewMeta?.previewUrl,r=!!i&&i!==t.viewUrl,n=r?await this.options.resolveAsset(i):null,o=r?t.viewUrl:await this.options.resolveAsset(t.viewUrl);if(!o||r&&!n)throw new Error("seat_view_unavailable");return{url:o,...n?{previewUrl:n}:{},...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:v("picker.chartDerivedModel","Chart-derived model")}}closeSeatView(e=!0,t=!1){e&&(this.seatViewGeneration+=1);let i=this.seatViewElement;if(this.seatViewDispose?.(),this.seatViewDispose=null,this.seatViewElement=null,!!i){if(this.options.onSeatViewChange?.(null),!t||this.reducedMotion()){i.remove();return}i.classList.add("is-leaving"),setTimeout(()=>i.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(i=>i.objects)??e.objects).some(i=>i.type==="shape"&&(i.role==="stage"||!!i.stageKind)):!1}prepareHostTheme(e,t){getComputedStyle(e).position==="static"&&(e.style.position="relative");let i=t.theme;e.style.setProperty("--sl-bg",i?.background??"#f6f7fb"),e.style.setProperty("--sl-surface","#ffffff"),e.style.setProperty("--sl-text",i?.textColor??"#10162a"),e.style.setProperty("--sl-muted","#697386"),e.style.setProperty("--sl-line","#d9deea"),e.style.setProperty("--sl-accent",i?.accent??"#ef4056"),e.style.setProperty("--sl-accent-ink",i?.accentInk??"#ffffff")}reducedMotion(){return globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}};var ea={host:"web",platform:"web",bundle:"",protocol:0,chromeOwner:"web"},ta={...ea},Zt=null,Js=null;function ia(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():0}function sa(){let s=e=>Math.max(0,Math.round(e*100)/100);return{bootMs:s(ia()),documentMs:Zt==null?0:s(Zt),handshakeMs:Zt==null||Js==null?0:s(Js-Zt)}}function er(){let{host:s,platform:e,bundle:t,protocol:i,chromeOwner:r}=ta,n=sa();return{host:s,platform:e,...t?{bundle:t}:{},...i?{protocol:i}:{},chromeOwner:r,bootMs:n.bootMs,documentMs:n.documentMs,handshakeMs:n.handshakeMs}}var tr=new Set;function He(s){return tr.has(s)?"repeat":"cold"}function Jt(s){let e=He(s);return tr.add(s),e}function G(s){return typeof s=="number"&&Number.isFinite(s)&&s>=0?Math.round(s):0}function ra(){return typeof location>"u"?!1:/^(localhost|127\.0\.0\.1|\[::1\])$/i.test(location.hostname)}function na(s){if(!/^[A-Za-z0-9_-]{1,80}$/.test(s.event))return null;let e=s.performanceProfile??{};return{event:s.event,scope:s.scope,surface:s.surface,outcome:s.outcome,stage:s.stage?.slice(0,32)??"",ms:G(s.ms),api:G(e.loadChartAndStatuses)||G(e.loadChart),scene:G(e.buildScene),panel:G(e.buildBuyerControls),paint:G(e.firstPaint),normalize:G(e.normalizeBuyerModel),renderer:G(e.createRenderer),seats:G(s.seats),floors:G(s.floors),view:s.view??"map",load:s.load??He(s.event),transport:s.transport??"pubapi",chartBytes:G(s.chartDelivery?.bytes),chartCache:s.chartDelivery?.cache??"",server:G(s.chartDelivery?.serverMs),r2Head:G(s.chartDelivery?.r2HeadMs),cacheLookup:G(s.chartDelivery?.cacheLookupMs),r2Get:G(s.chartDelivery?.r2GetMs),transform:G(s.chartDelivery?.transformMs),...er(),availabilityMs:G(e.loadStatuses)}}var oa=new Set;function xe(s){let e=na(s);if(e){for(let t of oa)try{t(e)}catch{}typeof fetch>"u"||ra()||fetch(`${s.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(()=>{})}}var St=class s{constructor(e,t=null){this.seams=e;this.watch=null;this.mode=t,this.watchMode()}themeMode(){return this.mode}setThemeMode(e,t){let i=t!==void 0&&"mapTheme"in t;e===this.mode&&!i||(i&&this.seams.setHostMapTheme(t.mapTheme??void 0),this.mode=e,this.watchMode(),this.applyThemeMode())}static groundFor(e){return qe(null,e)}applyThemeMode(){let e=this.seams.mapTheme()??s.groundFor(this.mode);this.seams.applyMapTheme(e??null)&&this.seams.changed()}watchMode(){this.watch?.(),this.watch=null,this.mode==="auto"&&(this.watch=Bt(()=>this.applyThemeMode()))}setViewportInsets(e){this.seams.applyViewportInsets(e),this.seams.changed()}viewportInsets(){return this.seams.readViewportInsets()}dispose(){this.watch?.(),this.watch=null}};import{getLocale as aa}from"@seatlayer/core";function Tt(s){return s.getFocusedSection()!==null||s.seatsRevealed()}function la(s,e){return{accessibilityFilter:s.length>0,limitedViewFilter:e.some(t=>t.commercial?.restrictedView||t.commercial?.obstructedView)}}function ir(s,e,t){let i=s.doc,r=i?.theme??{},n=s.categoryAvailability(),o=s.getGAAreas(),a=s.getFloors(),l=s.getExpandedSeats(),c=s.getAccessNeeds(),p=la(c,l),d=e.seatPosition,m=d.targetSeatId?s.seatDetails(d.targetSeatId):null,u=i?.floors?.flatMap(h=>h.objects)??i?.objects??[],b=new Map;for(let h of u)h.type==="section"&&b.set(h.id,{id:h.id,label:h.label,...h.displayLabel?{displayLabel:h.displayLabel}:{},...h.zone?{zoneId:h.zone}:{}});return{event:{key:t.event,name:t.eventInfo?.name??i?.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:aa()||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:!!i?.categories.some(h=>h.tiers?.length),floors:a.length>1,zones:!!i?.zones?.length,sections:b.size>0,bestAvailable:!0,...p,venue3d:e.canOffer3D(),seatView:e.canOfferSeatView()},catalog:{categories:(i?.categories??[]).filter(h=>!h.notForSale).map(h=>({key:h.key,label:h.label,color:h.color,price:h.price??h.tiers?.[0]?.price??0,available:n[h.key]??0,tiers:(h.tiers??[]).map(y=>({id:y.id,name:y.name,price:y.price,...y.currency?{currency:y.currency}:{}}))})),zones:(i?.zones??[]).map(h=>({id:h.id,label:h.label,...h.color?{color:h.color}:{}})),sections:[...b.values()],gaAreas:o,bestAvailableZones:s.getBestAvailableZones()},map:{floors:a,activeFloorId:s.getActiveFloorId()||a[0]?.id||null,floorMode:s.isFloorOverview()?"all":"single",floorLabelStyle:s.getRenderer()?.getFloorLabelStyle?.()??"number",rung:s.getRung(),canZoomOut:Tt(s)||t.focusedSection_!==null,focusedSectionId:s.getFocusedSection(),focusedSection:t.focusedSection_,viewMode:s.getViewMode(),buyerView:e.buyerView,view3dTargetSeatId:d.targetSeatId,view3dTargetSeat:m,view3dPreviousSeatId:d.previousSeatId,view3dNextSeatId:d.nextSeatId,view3dFocusedSectionId:e.focusedSectionId,view3dNavigationMode:e.navigationMode,colorblindSafe:t.colorblindSafe_,viewportInsets:s.getViewportInsets(),categoryFilter:t.categoryFilter_?[...t.categoryFilter_]:null,accessibilityFilter:t.accessibilityFilter_?[...t.accessibilityFilter_]:null,hideLimitedView:t.hideLimitedView_,accessNeeds:c},selection:{seats:s.getSelection(),validity:s.getSelectionValidity(),maxSelection:t.maxSelection_},access:{...t.accessState_}}}var ua="https://api.seatlayer.io",or=10;function ma(s){if(typeof s=="string"){let e=document.querySelector(s);if(!e)throw new Error(`seatmap: container "${s}" not found`);return e}if(!(s instanceof HTMLElement))throw new Error("seatmap: container must be a CSS selector or an HTMLElement");return s}var _i=class{constructor(e){this.mount=null;this.hostEl=null;this.interactionEnabled_=!0;this.eventLocale=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.realtime=null;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??or,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 i={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??ua).replace(/\/+$/,"");this.apiBase=r;let n=e.publicKey&&!e.buyerAccessTokenProvider&&!e.buyerAccessToken?Nt({base:r,event:e.event,publicKey:e.publicKey,accessHooks:i,apiOptions:{onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)}}):null;this.access=n?.access??yt(e,i);let o=n?.api??new Pe(r,{access:this.access??void 0,onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)});this.api=o,this.controller=new ca({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])},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??or)-this.controller.getSelection().length)),tiers:jt(l),confirm:c=>{let p=typeof c=="number"?c:Object.values(c).reduce((d,m)=>d+m,0);this.holdGA(l.id,p)},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??St.groundFor(e.theme?.mode)??null}),this.hostSurface=new St({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 Ze(e.event,(a,l)=>o.asset(a,l)),this.immersive=new Xt({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_=Tt(this.controller)}handleViewChange(){this.opts.onViewChange?.();let e=this.controller.getRung(),t=Tt(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_=Tt(this.controller),this.opts.onMapStateChange?.()}async render(){if(this.rendered)return this;let e=performance.now();this.rendered=!0,await sr(this.opts.locale),this.opts.messages&&nr(this.opts.messages),this.mount=ma(this.opts.container);let t=document.createElement("div");t.lang=Oi(),t.dir=rr(),t.style.width="100%",t.style.height="100%",t.style.position="relative",this.mount.appendChild(t),this.hostEl=t,this.applyInteractionState();let i=await this.controller.render(t);if(!i)return xe({apiBase:this.apiBase,event:this.opts.event,scope:"event",surface:"seating_chart",outcome:"failure",stage:"load_chart",ms:performance.now()-e,load:He(this.opts.event),transport:"pubapi"}),this.rendered=!1,this.opts.errorDisplay!=="none"&&this.showLoadFailure(t),this;if(this.eventLocale=i.locale??null,!this.opts.locale&&this.eventLocale&&await this.setLocale(this.eventLocale),this.buildLanguageSwitcher(t),this.controller.setViewMode(this.opts.initialView??"flat"),this.opts.floorLabelStyle&&this.setFloorLabelStyle(this.opts.floorLabelStyle),this.startRealtime(),this.mode_=i.mode==="test"?"test":"live",this.eventInfo={name:i.eventName,venue:i.venue??null,startsAt:i.startsAt??null,timezone:i.timezone??null,currency:i.currency??this.opts.currency??"USD",posterUrl:i.posterUrl??null,salesClosed:i.salesClosed},this.opts.seatTooltip!==!1){let r=document.createElement("div");r.setAttribute("role","tooltip"),r.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);',t.appendChild(r),this.tipEl=r,this.onTipMove=n=>{let o=t.getBoundingClientRect();this.tipPos={x:n.clientX-o.left,y:n.clientY-o.top},this.tipEl&&this.tipEl.style.display!=="none"&&this.placeTooltip()},t.addEventListener("mousemove",this.onTipMove)}if(i.mode==="test"&&this.opts.showTestModeIndicator!==!1){t.style.overflow="hidden";let r=document.createElement("div");r.dataset.slI18n="testMode",r.textContent=re("picker.testMode"),r.setAttribute("aria-label",re("picker.testMode")),r.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;",t.appendChild(r)}return this.opts.showAttribution!==!1&&this.buildBadge(t),xe({apiBase:this.apiBase,event:this.opts.event,scope:"event",surface:"seating_chart",outcome:"success",ms:performance.now()-e,performanceProfile:i.performanceProfile,chartDelivery:i.chartDelivery,seats:this.controller.getExpandedSeats().length,floors:this.controller.getFloors().length,view:"map",load:Jt(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",re("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 i=document.createElement("span");i.setAttribute("aria-hidden","true"),i.style.cssText="width:16px;height:16px;border-radius:4px;flex:none;display:flex;align-items:center;justify-content:center;background:#0c1220;color:#fcf7ee",i.innerHTML=Gt;let r=document.createElement("span");r.textContent=re("picker.poweredBy"),t.append(i,r),e.appendChild(t)}placeTooltip(){if(!this.tipEl||!this.hostEl)return;let e=this.hostEl.clientWidth,t=this.tipEl.offsetWidth,i=this.tipEl.offsetHeight,r=this.tipPos.x+14,n=this.tipPos.y-i-12;r+t>e-8&&(r=this.tipPos.x-t-14),n<8&&(n=this.tipPos.y+18),this.tipEl.style.left=`${Math.max(8,r)}px`,this.tipEl.style.top=`${Math.max(8,n)}px`}updateTooltip(e){if(!this.tipEl)return;if(!e){this.tipEl.style.display="none";return}let t=da(e.price,e.currency,{...Number.isInteger(e.price)?{minimumFractionDigits:0,maximumFractionDigits:0}:{},locale:this.opts.locale,fallback:(l,c)=>`${l} ${c}`}),i=document.createElement("div");i.style.cssText="font-weight:700;font-size:13px",i.textContent=e.label;let r=document.createElement("div");r.style.cssText="display:flex;align-items:center;gap:6px;margin-top:4px;color:#c7cddc";let n=document.createElement("span");n.style.cssText="width:9px;height:9px;border-radius:50%;flex:none",n.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(n,o,a),this.tipEl.replaceChildren(i,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"?re("map.statusHeld"):re("map.statusTaken"),this.tipEl.appendChild(l)}this.tipEl.style.display="block",this.placeTooltip()}buildLanguageSwitcher(e){let t=(this.opts.languages??[]).map(r=>ha(r)).filter((r,n,o)=>o.indexOf(r)===n);if(t.length<2)return;let i=document.createElement("select");i.setAttribute("aria-label",re("picker.preferredTicketType")),i.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 n=document.createElement("option");n.value=r,n.textContent=pa[r]??r,n.selected=r===Oi(),i.appendChild(n)}i.addEventListener("change",()=>{this.setLocale(i.value)}),e.appendChild(i)}async setLocale(e){let t=Oi(),i=await sr(e);if(this.opts.messages&&nr(this.opts.messages),i===t)return i;if(this.hostEl){this.hostEl.lang=i,this.hostEl.dir=rr();for(let r of this.hostEl.querySelectorAll("[data-sl-i18n]"))if(r.dataset.slI18n==="testMode")r.textContent=re("picker.testMode"),r.setAttribute("aria-label",re("picker.testMode"));else if(r.dataset.slI18n==="badge"){r.setAttribute("aria-label",re("picker.poweredBy"));let n=r.querySelector("span:last-child");n&&(n.textContent=re("picker.poweredBy"))}}return this.controller.refreshMapCopy(),i}getMode(){return this.mode_}getPickerState(){return ir(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()}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 r=t.violations.includes("numberOfPlacesToSelect");throw Object.assign(new Error(r?`seatmap: select exactly ${t.required} places before holding`:"seatmap: adjust the ticket selection before holding"),{code:r?"selection_count_mismatch":"selection_invalid",selection:t})}let i=await this.controller.hold(void 0,e.ttlMs);return i?{holdId:i.holdId,expiresAt:i.expiresAt,seats:i.seats,items:i.items}:null}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,i={}){try{return await this.holdGAOrThrow(e,t,i)}catch(r){return this.opts.onError?.(r),null}}async holdGAOrThrow(e,t,i={}){let r=await this.controller.holdGA(e,t,i);return r?{holdId:r.holdId,expiresAt:r.expiresAt,seats:r.seats,items:r.items}:null}async bestAvailable(e,t,i={}){try{return await this.bestAvailableOrThrow(e,t,i)}catch(r){return this.opts.onError?.(r),null}}async bestAvailableOrThrow(e,t,i={}){let r=await this.controller.bestAvailable(e,t,i);return r?{holdId:r.holdId,expiresAt:r.expiresAt,labels:r.labels,seats:r.seats,items:r.items,...i.zoneId?{zoneId:i.zoneId}:{}}:null}setSeatTier(e,t){this.controller.setSeatTier(e,t)}setTableQuantity(e,t){return this.controller.setTableQuantity(e,t)}async replaceTableQuantity(e,t,i){try{return await this.replaceTableQuantityOrThrow(e,t,i)}catch(r){return this.opts.onError?.(r),null}}async replaceTableQuantityOrThrow(e,t,i){let r=await this.controller.replaceTableQuantity(e,t,i);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()}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 ge({url:this.api.subscribeUrl(this.opts.event),mintTicket:()=>this.api.subscribeTicket(this.opts.event),onAccessUnavailable:e=>this.opts.onAccessUnavailable?.(e),sink:mt(this.controller,{flashOnLiveChange:!0,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 i=document.createElement("div");i.textContent="The seat map didn\u2019t load.",t.appendChild(i);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(n=>this.opts.onError?.(n))}),t.appendChild(r),e.appendChild(t)}destroy(){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.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 ar=["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"],fa={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 ga(s){let e={};for(let t of ar)e[t]=(...i)=>{let r=s();return r?r[t](...i):fa[t]()};return e}var lr=["event","apiBase","maxSelection","numberOfPlacesToSelect","selectionValidators","publicKey","locale","currency","colorblindSafe","initialView","errorDisplay"],cr=[...lr,"selectedObjects","selectableObjects","messages","seatTooltip","buyerAccessTokenProvider","buyerAccessToken"],dr=["onSelectionChange","onSelectionValidityChange","onSelectionValid","onSelectionInvalid","onSelectionLimit","onHold","onHoldRestored","onHoldExpired","onGAClick","onGAPrompt","onError","onDeckTap","onHint","onSeatHover","onAccessExpired","onAccessUnavailable","onSelectedObjectUnavailable"];function ba(s,e,t){let i={container:s};for(let r of cr)i[r]=e[r];for(let r of dr)i[r]=t[r];return i}var va=new Set(["seatlayer.designer.ready","seatlayer.designer.saved","seatlayer.designer.published","seatlayer.designer.close","seatlayer.designer.error"]),ya=2e4,xa=480,wa=180*1e3,ka=900*1e3,Sa=.8,Ta=30*1e3,Ca=1e5,Ea=4,Aa=50;function Di(s){if(typeof s!="string")return s;let e=document.querySelector(s);if(!e)throw new Error(`EmbeddedDesigner container not found: ${s}`);return e}function Pa(s){let e=(s??"").toLowerCase();return e.includes("expire")||e.includes("revoke")||e==="401"?"expired":e.includes("mismatch")?"mismatch":e.includes("timeout")?"timeout":"load"}var Ma={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."}},Bi=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"||!va.has(t.type))return;let i={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||i.type==="seatlayer.designer.ready"||i.type==="seatlayer.designer.saved"||i.type==="seatlayer.designer.published"||i.type==="seatlayer.designer.close",n=this.options.expectedChartId!==void 0&&i.chartId!==this.options.expectedChartId&&(r||i.chartId!==void 0),o=this.options.expectedWorkspaceId!==void 0&&i.workspaceId!==this.options.expectedWorkspaceId&&(r||i.workspaceId!==void 0);if(n||o){this.showError("mismatch");return}switch(i.type){case"seatlayer.designer.ready":this.identityEstablished=!0,this.sessionExpiresAt=i.expiresAt,this.phase="ready",this.clearTimeoutTimer(),this.removeOverlay(),this.autoRecoverUsed=!1,this.scheduleRenewal(i.expiresAt),this.options.onReady?.(i);break;case"seatlayer.designer.saved":this.options.onSaved?.(i);break;case"seatlayer.designer.published":this.options.onPublished?.(i);break;case"seatlayer.designer.close":this.options.onClose?.(i);break;case"seatlayer.designer.error":{let a=Pa(i.code);if(a==="expired"&&this.autoRenewEnabled()&&!this.autoRecoverUsed){this.autoRecoverUsed=!0,this.clearRenewTimer(),this.options.onRequestRelaunch();return}(typeof i.fatal=="boolean"?i.fatal:a!=="load"||this.phase!=="ready")&&this.showError(a),this.options.onError?.(i);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 i=Di(this.options.container);if(this.containerEl=i,window.addEventListener("message",this.handleMessage),i.append(t),this.frame=t,this.fillEnabled()&&this.startFill(),this.phase="loading",this.loadingStateEnabled()){this.ensureContainerPositioned(i),this.renderOverlay(i,"loading");let r=this.options.loadingTimeoutMs??ya;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 i=()=>e.getBoundingClientRect().height,r=t.style.getPropertyValue("height"),n=t.style.getPropertyPriority("height");t.style.setProperty("height","0px","important");let o=i();t.style.setProperty("height",`${Ca}px`,"important");let a=i();return r?t.style.setProperty("height",r,n):t.style.removeProperty("height"),!(a-o>Ea)&&o>=Aa?"container":"viewport"}applyFill(){if(!this.frame||this.pinned)return;let e=this.options.minHeight??xa;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,i=Math.max(e,Math.round(window.innerHeight-t));this.setFrameHeight(`${i}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[i,r]of Object.entries(e))this.frame.style.setProperty(i,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=i=>{i.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 i=t<ka?t*Sa:t-wa,r=Math.max(Ta,i);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{Di(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=Di(this.options.container)}catch{return}this.renderOverlay(t,"error",e)}handleTryAgain(){if(this.options.onRequestRelaunch){this.options.onRequestRelaunch();return}this.mount()}renderOverlay(e,t,i){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,i??"load"),e.append(r),this.overlay=r}buildSkeleton(e){let t=document.createElement("style");t.textContent=`
2634
+ `;function et(){if(document.getElementById(nn))return;let s=document.createElement("style");s.id=nn,s.textContent=ea+Js+sn+tn+en+Ds,document.head.appendChild(s)}import{t as ta}from"@seatlayer/core";import{cdnAssetUrl as ia}from"@seatlayer/core/core/cdnAsset";import{SEATLAYER_MODULE_URL as wd}from"@seatlayer/core/core/cdnAsset";function y(s,e){let t=ta(s);return t===s?e:t}function it(){return globalThis.matchMedia?.("(pointer: coarse)").matches??!1?y("picker.dragToLookTouch","Drag to look \xB7 pinch to zoom \xB7 tap \u2715 to close"):y("picker.dragToLookMouse","Drag to look \xB7 pinch or scroll to zoom \xB7 Esc to close")}function rn(s,e){let t=e?s.toLocaleUpperCase(e):s.toLocaleUpperCase(),i=e?s.toLocaleLowerCase(e):s.toLocaleLowerCase();if(s!==t||t===i)return s;let n=[...i][0]??"";return(e?n.toLocaleUpperCase(e):n.toLocaleUpperCase())+i.slice(n.length)}function on(s){if(typeof s=="string"){let e=document.querySelector(s);if(!e)throw new Error(`seatmap: container "${s}" not found`);return e}if(!(s instanceof HTMLElement))throw new Error("seatmap: container must be a CSS selector or an HTMLElement");return s}function I(s){return String(s??"").replace(/[&<>"']/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[e])}function an(s,e,t){let i=e.find(r=>Ze(r))??null;if(s.replaceChildren(),!i)return s.textContent=t.slice(0,1).toUpperCase(),null;let n=document.createElement("img");return n.alt="",n.referrerPolicy="no-referrer",n.src=i,s.appendChild(n),i}var tt=null;function Wt(){if(tt!==null)return tt;try{if(typeof document>"u")return tt=!1;tt=!!document.createElement("canvas").getContext("webgl2")}catch{tt=!1}return tt}function _i(s){return ia(s)}var kt=null;function St(){return kt||(kt=(typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?import(_i("seatlayer-view3d.mjs")):import("@seatlayer/core/view3d")).catch(e=>{throw kt=null,e}),kt)}function Di(){(typeof navigator>"u"?void 0:navigator.connection)?.saveData||St().catch(()=>{})}async function Yt(){return typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?import(_i("seatlayer-panorama.mjs")):import("@seatlayer/core")}async function ln(){return typeof __SEATLAYER_CDN__<"u"&&__SEATLAYER_CDN__?import(_i("seatlayer-checkout.mjs")):import("./hostedCheckout-W7QZWSOQ.js")}function cn(s){return s==="unavailable_for_event"||s==="payments_off_for_event"?s:"not_configured"}function Qt(s,e,t){let i={month:"short",day:"numeric",hour:"numeric",minute:"2-digit"},n=new Date(s);if(e)try{return n.toLocaleString(t,{...i,timeZone:e})}catch{}return n.toLocaleString(t,i)}async function Xt(s,e){let t=s.overlay.productionElements;if(!t?.some(n=>n.contentImageUrl))return s;let i=await Promise.all(t.map(async n=>{if(!n.contentImageUrl)return n;try{let r=await e(n.contentImageUrl);if(!r){let{contentImageUrl:o,...a}=n;return a}return{...n,runtimeContentImageUrl:r}}catch{let{contentImageUrl:r,...o}=n;return o}}));return{...s,overlay:{...s.overlay,productionElements:i}}}async function Zt(s,e){if(s)try{let t=await e(s);return t?await(await fetch(t)).arrayBuffer():void 0}catch{return}}import{browserPanoramaConstraints as sa,loadPanoramaImage as na,planPanoramaDelivery as ra,schedulePanoramaUpgrade as oa}from"@seatlayer/core/view/panoramaDelivery";function Jt(s){let{root:e,source:t,caption:i,real:n,closeLabel:r,dragHint:o,viewFromSeatLabel:a,real360Label:l,previewLabel:c,resolveAsset:p,onClose:d}=s,u=s.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=N=>h.querySelector(N)?.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=i,h.querySelector(".sl-view-x").setAttribute("aria-label",r),u.badge===!1?g(".sl-view-badge"):h.querySelector(".sl-view-badge").textContent=n?l:c,h.querySelector(".sl-view-hint").textContent=o,e.appendChild(h);let m=h.querySelector(".sl-view-pano"),v=ra(t,sa()),k=new AbortController;m.style.backgroundImage=`url(${JSON.stringify(v.initialUrl)})`;let S=()=>{};v.upgradeUrl&&(S=oa(()=>{p(v.upgradeUrl).then(N=>!N||k.signal.aborted?null:na(N,k.signal).then(()=>N)).then(N=>{!N||!h.isConnected||k.signal.aborted||(m.style.backgroundImage=`url(${JSON.stringify(N)})`)}).catch(()=>{})}));let L=70,b=35,A=1,x=m.clientHeight||1,H=m.clientWidth||1,_=-(x*(180/L)*2/2-H/2),T=0,O=()=>{let N=m.clientHeight||1,Ti=N*(180/L)*A,Ts=Math.max(0,Ti-N),Cs=Math.min(Ts/2,b/180*Ti);T=Math.min(Cs,Math.max(-Cs,T)),m.style.backgroundSize=`auto ${Ti}px`,m.style.backgroundPosition=`${_}px ${T-Ts/2}px`};O();let B=!1,V=0,ie=0,ne=N=>{B=!0,V=N.clientX,ie=N.clientY,m.classList.add("drag"),m.setPointerCapture?.(N.pointerId)},Y=N=>{B&&(_+=N.clientX-V,T+=N.clientY-ie,V=N.clientX,ie=N.clientY,O())},Dt=N=>{B=!1,m.classList.remove("drag"),m.releasePointerCapture?.(N.pointerId)},ks=N=>{N.preventDefault(),A=Math.min(2.4,Math.max(1,A+(N.deltaY<0?.12:-.12))),O()};m.addEventListener("pointerdown",ne),m.addEventListener("pointermove",Y),m.addEventListener("pointerup",Dt),m.addEventListener("pointercancel",Dt),m.addEventListener("wheel",ks,{passive:!1});let Si=h.querySelector(".sl-view-x");Si.addEventListener("click",d);let Ss=N=>{N.key==="Escape"&&(N.stopPropagation(),d())};return h.addEventListener("keydown",Ss),Si.focus(),{element:h,dispose(){S(),k.abort(),m.removeEventListener("pointerdown",ne),m.removeEventListener("pointermove",Y),m.removeEventListener("pointerup",Dt),m.removeEventListener("pointercancel",Dt),m.removeEventListener("wheel",ks),h.removeEventListener("keydown",Ss),Si.removeEventListener("click",d)}}}function ca(s,e){if(!e)return{targetSeatId:null,previousSeatId:null,nextSeatId:null};let t=s.find(r=>r.id===e);if(!t?.rowId)return{targetSeatId:e,previousSeatId:null,nextSeatId:null};let i=s.filter(r=>r.rowId===t.rowId),n=i.findIndex(r=>r.id===e);return{targetSeatId:e,previousSeatId:n>0?i[n-1].id:null,nextSeatId:n>=0&&n+1<i.length?i[n+1].id:null}}var dn=6e4,ei=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 ca(this.options.seats(),this.targetSeatId_)}get navigationMode(){return this.navigationMode_}canOffer3D(){return this.options.enable3D?this.handle&&this.overlay?!0:!this.options.doc()||!Wt()?!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),i=this.options.host(),n=this.options.doc();if(!t||!i||!n)throw new Error("seat_view_unavailable");let r=++this.seatViewGeneration,o,a,l=!1;if(t.viewUrl){let g=t.viewMeta?.previewUrl,m=!!g&&g!==t.viewUrl,v=m?await this.options.resolveAsset(g):null,k=m?t.viewUrl:await this.options.resolveAsset(t.viewUrl);if(r!==this.seatViewGeneration||!k||m&&!v)return;o={url:k,...v?{previewUrl:v}:{},...m?{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=la(o),l=aa(o)}else{if(!this.hasStage())throw new Error("seat_view_unavailable");let{generateSeatPanorama:g}=await Yt();if(r!==this.seatViewGeneration)return;let m=n.floors?.find(S=>S.objects.some(L=>L.type==="row"&&L.id===t.rowId)),v=t.focalPoint??m?.focalPoint??n.focalPoint,k=g(t,v,[...this.options.seats()]);o={url:k.url,generated:!0},a=st("picker.illustrationCaption",{m:k.distanceM})}if(r!==this.seatViewGeneration)return;this.closeSeatView(!1),this.prepareHostTheme(i,n),et();let c=this.options.chrome??{},p=it(),d=st("picker.viewFromSeat",{label:t.displayLabel||t.label}),u=l?st("picker.real360"):st("picker.preview"),h=Jt({root:i,source:o,caption:a,real:l,closeLabel:y("picker.close","Close"),dragHint:p,viewFromSeatLabel:d,real360Label:st("picker.real360"),previewLabel:st("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:d,caption:a,badge:u,real:l,generated:!!o.generated,dragHint:p})}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 i=t.floors.findIndex(n=>n.id===e);return i>=0&&this.handle.focusFloor(i)}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)?dn/2:dn}async enter3D(e){let t=this.options.host(),i=this.options.doc();if(!t||!i||this.overlay)throw new Error("venue_3d_unavailable");et(),this.prepareHostTheme(t,i);let n=document.createElement("div");n.className="sl-view3d",n.setAttribute("role","group"),n.setAttribute("aria-label",y("picker.interactive3dVenueView","Interactive 3D venue view")),Object.assign(n.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=y("picker.loading3d","Building the 3D venue\u2026"),n.appendChild(r),t.appendChild(n),this.overlay=n;let o=++this.generation;if(this.reducedMotion()?n.style.opacity="1":requestAnimationFrame(()=>{n.style.opacity="1"}),await this.nextPaint(),!(o!==this.generation||this.overlay!==n))try{let[a,l]=await Promise.all([St(),this.options.loadEventConfiguration()]),c=l?await Xt(l,this.options.resolveAsset):null,p=await Zt(i.theme?.venue3d?.shellAssetUrl,this.options.resolveAsset);if(o!==this.generation||this.overlay!==n)return;let d={doc:i,seats:[...this.options.seats()],...c?{eventConfigurationId:c.id,eventConfiguration:c}:{},...p?{registeredShellGlb:p}:{}};r.textContent=y("picker.building3d","Building venue geometry\u2026");let u=await a.prepareVenue3D(d);if(o!==this.generation||this.overlay!==n)return;let h=this.options.chrome??{},g=a.mountVenue3D(n,{...d,prepared:u},{portraitOverviewCrop:!0,arriveAtSeatEye:!0,lookAroundHint:it(),...h.view3dCaption===!1||h.view3dSeatStepper===!1||h.view3dControlDock===!1?{chrome:{caption:h.view3dCaption!==!1,seatStepper:h.view3dSeatStepper!==!1,controlDock:h.view3dControlDock!==!1}}:{},seatViewActionLabel:m=>this.findSeat(m)?.viewUrl?y("picker.openAuthored360","Open venue 360\xB0"):y("picker.lookAroundLive3d","Look around in live 3D"),onSeatPick:m=>this.toggleSeat(m),onSeatInspect:m=>this.toggleSeat(m),onViewTargetChange:m=>{this.targetSeatId_=m,m&&(this.focusedSectionId_=this.findSeat(m)?.sectionId??null),this.options.onViewChange("venue3d",m)},onSectionFocusChange:m=>{this.focusedSectionId_=m,this.options.onViewChange("venue3d",this.targetSeatId_)},...this.options.enableSeatView?{getSeatView:m=>this.seatViewFor3D(m)}:{}});if(o!==this.generation||this.overlay!==n){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(()=>r.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 i=this.handle,n=this.overlay;if(this.options.restoreMap(),t&&i&&n){n.style.pointerEvents="none";let r=()=>{this.buyerView_!=="map"||this.overlay!==n||(n.style.visibility="hidden",this.options.restoreMap())};!e||this.reducedMotion()?(n.style.opacity="0",r()):(requestAnimationFrame(()=>{n.style.opacity="0"}),setTimeout(r,280));return}if(this.handle=null,this.overlay=null,!n){try{i?.dispose()}catch{}this.options.restoreMap();return}if(!e||this.reducedMotion()){try{i?.dispose()}catch{}n.remove(),this.options.restoreMap();return}n.style.pointerEvents="none",requestAnimationFrame(()=>{n.style.opacity="0"}),setTimeout(()=>{try{i?.dispose()}catch{}n.remove(),this.options.restoreMap()},280)}async restore3D(e){let t=this.overlay,i=this.handle;if(!t||!i)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"}),i.resize(),i.setNavigationMode(this.navigationMode_),this.pushLiveState(),this.options.onViewChange("venue3d",this.targetSeatId_),e.flyToSeatId?await i.flyToSeat(e.flyToSeatId):e.resetView&&i.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(n=>n.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 i=t.viewMeta?.previewUrl,n=!!i&&i!==t.viewUrl,r=n?await this.options.resolveAsset(i):null,o=n?t.viewUrl:await this.options.resolveAsset(t.viewUrl);if(!o||n&&!r)throw new Error("seat_view_unavailable");return{url:o,...r?{previewUrl:r}:{},...n?{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:y("picker.chartDerivedModel","Chart-derived model")}}closeSeatView(e=!0,t=!1){e&&(this.seatViewGeneration+=1);let i=this.seatViewElement;if(this.seatViewDispose?.(),this.seatViewDispose=null,this.seatViewElement=null,!!i){if(this.options.onSeatViewChange?.(null),!t||this.reducedMotion()){i.remove();return}i.classList.add("is-leaving"),setTimeout(()=>i.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(i=>i.objects)??e.objects).some(i=>i.type==="shape"&&(i.role==="stage"||!!i.stageKind)):!1}prepareHostTheme(e,t){getComputedStyle(e).position==="static"&&(e.style.position="relative");let i=t.theme;e.style.setProperty("--sl-bg",i?.background??"#f6f7fb"),e.style.setProperty("--sl-surface","#ffffff"),e.style.setProperty("--sl-text",i?.textColor??"#10162a"),e.style.setProperty("--sl-muted","#697386"),e.style.setProperty("--sl-line","#d9deea"),e.style.setProperty("--sl-accent",i?.accent??"#ef4056"),e.style.setProperty("--sl-accent-ink",i?.accentInk??"#ffffff")}reducedMotion(){return globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}};var da={host:"web",platform:"web",bundle:"",protocol:0,chromeOwner:"web"},pa={...da},ti=null,pn=null;function ha(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():0}function ua(){let s=e=>Math.max(0,Math.round(e*100)/100);return{bootMs:s(ha()),documentMs:ti==null?0:s(ti),handshakeMs:ti==null||pn==null?0:s(pn-ti)}}function hn(){let{host:s,platform:e,bundle:t,protocol:i,chromeOwner:n}=pa,r=ua();return{host:s,platform:e,...t?{bundle:t}:{},...i?{protocol:i}:{},chromeOwner:n,bootMs:r.bootMs,documentMs:r.documentMs,handshakeMs:r.handshakeMs}}var un=new Set;function He(s){return un.has(s)?"repeat":"cold"}function ii(s){let e=He(s);return un.add(s),e}function K(s){return typeof s=="number"&&Number.isFinite(s)&&s>=0?Math.round(s):0}function ma(){return typeof location>"u"?!1:/^(localhost|127\.0\.0\.1|\[::1\])$/i.test(location.hostname)}function fa(s){if(!/^[A-Za-z0-9_-]{1,80}$/.test(s.event))return null;let e=s.performanceProfile??{};return{event:s.event,scope:s.scope,surface:s.surface,outcome:s.outcome,stage:s.stage?.slice(0,32)??"",ms:K(s.ms),api:K(e.loadChartAndStatuses)||K(e.loadChart),scene:K(e.buildScene),panel:K(e.buildBuyerControls),paint:K(e.firstPaint),normalize:K(e.normalizeBuyerModel),renderer:K(e.createRenderer),seats:K(s.seats),floors:K(s.floors),view:s.view??"map",load:s.load??He(s.event),transport:s.transport??"pubapi",chartBytes:K(s.chartDelivery?.bytes),chartCache:s.chartDelivery?.cache??"",server:K(s.chartDelivery?.serverMs),r2Head:K(s.chartDelivery?.r2HeadMs),cacheLookup:K(s.chartDelivery?.cacheLookupMs),r2Get:K(s.chartDelivery?.r2GetMs),transform:K(s.chartDelivery?.transformMs),...hn(),availabilityMs:K(e.loadStatuses)}}var ga=new Set;function ke(s){let e=fa(s);if(e){for(let t of ga)try{t(e)}catch{}typeof fetch>"u"||ma()||fetch(`${s.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(()=>{})}}var Tt=class s{constructor(e,t=null){this.seams=e;this.watch=null;this.mode=t,this.watchMode()}themeMode(){return this.mode}setThemeMode(e,t){let i=t!==void 0&&"mapTheme"in t;e===this.mode&&!i||(i&&this.seams.setHostMapTheme(t.mapTheme??void 0),this.mode=e,this.watchMode(),this.applyThemeMode())}static groundFor(e){return Ke(null,e)}applyThemeMode(){let e=this.seams.mapTheme()??s.groundFor(this.mode);this.seams.applyMapTheme(e??null)&&this.seams.changed()}watchMode(){this.watch?.(),this.watch=null,this.mode==="auto"&&(this.watch=Nt(()=>this.applyThemeMode()))}setViewportInsets(e){this.seams.applyViewportInsets(e),this.seams.changed()}viewportInsets(){return this.seams.readViewportInsets()}dispose(){this.watch?.(),this.watch=null}};import{getLocale as ba}from"@seatlayer/core";function Ct(s){return s.getFocusedSection()!==null||s.seatsRevealed()}function va(s,e){return{accessibilityFilter:s.length>0,limitedViewFilter:e.some(t=>t.commercial?.restrictedView||t.commercial?.obstructedView)}}function mn(s,e,t){let i=s.doc,n=i?.theme??{},r=s.categoryAvailability(),o=s.getGAAreas(),a=s.getFloors(),l=s.getExpandedSeats(),c=s.getAccessNeeds(),p=va(c,l),d=e.seatPosition,u=d.targetSeatId?s.seatDetails(d.targetSeatId):null,h=new Map(l.map(v=>[v.id,{x:v.x,y:v.y}])),g=i?.floors?.flatMap(v=>v.objects)??i?.objects??[],m=new Map;for(let v of g)v.type==="section"&&m.set(v.id,{id:v.id,label:v.label,...v.displayLabel?{displayLabel:v.displayLabel}:{},...v.zone?{zoneId:v.zone}:{}});return{event:{key:t.event,name:t.eventInfo?.name??i?.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:ba()||t.eventLocale,posterUrl:t.eventInfo?.posterUrl??null,mode:t.mode_??"live",salesClosed:t.eventInfo?.salesClosed??!1},branding:{...n.accent?{accent:n.accent}:{},...n.accentInk?{accentInk:n.accentInk}:{},...n.background?{background:n.background}:{},...n.textColor?{textColor:n.textColor}:{},...n.brandName?{brandName:n.brandName}:{},...n.logoUrl?{logoUrl:n.logoUrl}:{},attributionRequired:!n.hideBadge},features:{ga:o.length>0,tiers:!!i?.categories.some(v=>v.tiers?.length),floors:a.length>1,zones:!!i?.zones?.length,sections:m.size>0,bestAvailable:!0,...p,venue3d:e.canOffer3D(),seatView:e.canOfferSeatView()},catalog:{categories:(i?.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(k=>({id:k.id,name:k.name,price:k.price,...k.currency?{currency:k.currency}:{}}))})),zones:(i?.zones??[]).map(v=>({id:v.id,label:v.label,...v.color?{color:v.color}:{}})),sections:[...m.values()],gaAreas:o,bestAvailableZones:s.getBestAvailableZones()},map:{floors:a,activeFloorId:s.getActiveFloorId()||a[0]?.id||null,floorMode:s.isFloorOverview()?"all":"single",floorLabelStyle:s.getRenderer()?.getFloorLabelStyle?.()??"number",rung:s.getRung(),canZoomOut:Ct(s)||t.focusedSection_!==null,focusedSectionId:s.getFocusedSection(),focusedSection:t.focusedSection_,viewMode:s.getViewMode(),buyerView:e.buyerView,view3dTargetSeatId:d.targetSeatId,view3dTargetSeat:u,view3dPreviousSeatId:d.previousSeatId,view3dNextSeatId:d.nextSeatId,view3dFocusedSectionId:e.focusedSectionId,view3dNavigationMode:e.navigationMode,colorblindSafe:t.colorblindSafe_,viewportInsets:s.getViewportInsets(),categoryFilter:t.categoryFilter_?[...t.categoryFilter_]:null,accessibilityFilter:t.accessibilityFilter_?[...t.accessibilityFilter_]:null,hideLimitedView:t.hideLimitedView_,accessNeeds:c},selection:{seats:s.getSelection().map(v=>{let k=h.get(v.id);if(!k)return v;let S=s.worldToScreen(k);return{...v,screenPoint:{x:S.x,y:S.y}}}),validity:s.getSelectionValidity(),maxSelection:t.maxSelection_},access:{...t.accessState_}}}var Ea="https://api.seatlayer.io",fn=10;function Aa(s){if(typeof s=="string"){let e=document.querySelector(s);if(!e)throw new Error(`seatmap: container "${s}" not found`);return e}if(!(s instanceof HTMLElement))throw new Error("seatmap: container must be a CSS selector or an HTMLElement");return s}var Ni=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.realtime=null;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??fn,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 i={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()}},n=(e.apiBase??Ea).replace(/\/+$/,"");this.apiBase=n;let r=e.publicKey&&!e.buyerAccessTokenProvider&&!e.buyerAccessToken?jt({base:n,event:e.event,publicKey:e.publicKey,accessHooks:i,apiOptions:{onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)}}):null;this.access=r?.access??xt(e,i);let o=r?.api??new Pe(n,{access:this.access??void 0,onObjectUnavailable:a=>this.opts.onSelectedObjectUnavailable?.(a)});this.api=o,this.controller=new ya({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])},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??fn)-this.controller.getSelection().length)),tiers:Kt(l),confirm:c=>{let p=typeof c=="number"?c:Object.values(c).reduce((d,u)=>d+u,0);this.holdGA(l.id,p)},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??Tt.groundFor(e.theme?.mode)??null}),this.hostSurface=new Tt({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 Je(e.event,(a,l)=>o.asset(a,l)),this.immersive=new ei({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_=Ct(this.controller)}handleViewChange(){this.opts.onViewChange?.();let e=this.controller.getRung(),t=Ct(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_=Ct(this.controller),this.opts.onMapStateChange?.()}async render(){if(this.rendered)return this;let e=performance.now();this.rendered=!0;let t=Vt(this.opts.locale,this.opts.messages),i=this.localeGeneration+=1,n=Bi();this.mount=Aa(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,Ft(r,t,a=>{a!==n&&this.applyActiveLocale(a,i)}),this.applyInteractionState();let o=await this.controller.render(r);if(!o)return ke({apiBase:this.apiBase,event:this.opts.event,scope:"event",surface:"seating_chart",outcome:"failure",stage:"load_chart",ms:performance.now()-e,load:He(this.opts.event),transport:"pubapi"}),this.rendered=!1,this.opts.errorDisplay!=="none"&&this.showLoadFailure(r),this;if(this.eventLocale=o.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_=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);',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(o.mode==="test"&&this.opts.showTestModeIndicator!==!1){r.style.overflow="hidden";let a=document.createElement("div");a.dataset.slI18n="testMode",a.textContent=le("picker.testMode"),a.setAttribute("aria-label",le("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.opts.showAttribution!==!1&&this.buildBadge(r),ke({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:ii(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",le("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 i=document.createElement("span");i.setAttribute("aria-hidden","true"),i.style.cssText="width:16px;height:16px;border-radius:4px;flex:none;display:flex;align-items:center;justify-content:center;background:#0c1220;color:#fcf7ee",i.innerHTML=Ut;let n=document.createElement("span");n.textContent=le("picker.poweredBy"),t.append(i,n),e.appendChild(t)}placeTooltip(){if(!this.tipEl||!this.hostEl)return;let e=this.hostEl.clientWidth,t=this.tipEl.offsetWidth,i=this.tipEl.offsetHeight,n=this.tipPos.x+14,r=this.tipPos.y-i-12;n+t>e-8&&(n=this.tipPos.x-t-14),r<8&&(r=this.tipPos.y+18),this.tipEl.style.left=`${Math.max(8,n)}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=xa(e.price,e.currency,{...Number.isInteger(e.price)?{minimumFractionDigits:0,maximumFractionDigits:0}:{},locale:this.opts.locale,fallback:(l,c)=>`${l} ${c}`}),i=document.createElement("div");i.style.cssText="font-weight:700;font-size:13px",i.textContent=e.label;let n=document.createElement("div");n.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 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,n.append(r,o,a),this.tipEl.replaceChildren(i,n),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"?le("map.statusHeld"):le("map.statusTaken"),this.tipEl.appendChild(l)}this.tipEl.style.display="block",this.placeTooltip()}buildLanguageSwitcher(e){let t=(this.opts.languages??[]).map(n=>Ta(n)).filter((n,r,o)=>o.indexOf(n)===r);if(t.length<2)return;let i=document.createElement("select");i.setAttribute("aria-label",le("picker.preferredTicketType")),i.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 n of t){let r=document.createElement("option");r.value=n,r.textContent=Sa[n]??n,r.selected=n===Bi(),i.appendChild(r)}i.addEventListener("change",()=>{this.setLocale(i.value)}),e.appendChild(i),this.languageSelect=i}async setLocale(e){let t=Bi(),i=this.localeGeneration+=1,n=await wa(e);return this.opts.messages&&Ca(this.opts.messages),n===t||this.applyActiveLocale(n,i),n}applyActiveLocale(e,t){if(t!==this.localeGeneration)return;let i=this.hostEl;if(i){i.lang=e,i.dir=ka(e);for(let n of i.querySelectorAll("[data-sl-i18n]"))if(n.dataset.slI18n==="testMode")n.textContent=le("picker.testMode"),n.setAttribute("aria-label",le("picker.testMode"));else if(n.dataset.slI18n==="badge"){n.setAttribute("aria-label",le("picker.poweredBy"));let r=n.querySelector("span:last-child");r&&(r.textContent=le("picker.poweredBy"))}this.languageSelect&&this.languageSelect.value!==e&&(this.languageSelect.value=e),this.controller.refreshMapCopy()}}getMode(){return this.mode_}getPickerState(){return mn(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()}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})}let i=await this.controller.hold(void 0,e.ttlMs);return i?{holdId:i.holdId,expiresAt:i.expiresAt,seats:i.seats,items:i.items}:null}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,i={}){try{return await this.holdGAOrThrow(e,t,i)}catch(n){return this.opts.onError?.(n),null}}async holdGAOrThrow(e,t,i={}){let n=await this.controller.holdGA(e,t,i);return n?{holdId:n.holdId,expiresAt:n.expiresAt,seats:n.seats,items:n.items}:null}async bestAvailable(e,t,i={}){try{return await this.bestAvailableOrThrow(e,t,i)}catch(n){return this.opts.onError?.(n),null}}async bestAvailableOrThrow(e,t,i={}){let n=await this.controller.bestAvailable(e,t,i);return n?{holdId:n.holdId,expiresAt:n.expiresAt,labels:n.labels,seats:n.seats,items:n.items,...i.zoneId?{zoneId:i.zoneId}:{}}:null}setSeatTier(e,t){this.controller.setSeatTier(e,t)}setTableQuantity(e,t){return this.controller.setTableQuantity(e,t)}async replaceTableQuantity(e,t,i){try{return await this.replaceTableQuantityOrThrow(e,t,i)}catch(n){return this.opts.onError?.(n),null}}async replaceTableQuantityOrThrow(e,t,i){let n=await this.controller.replaceTableQuantity(e,t,i);return n?{holdId:n.holdId,expiresAt:n.expiresAt,seats:n.seats,items:n.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()}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 ve({url:this.api.subscribeUrl(this.opts.event),mintTicket:()=>this.api.subscribeTicket(this.opts.event),onAccessUnavailable:e=>this.opts.onAccessUnavailable?.(e),sink:ft(this.controller,{flashOnLiveChange:!0,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 i=document.createElement("div");i.textContent="The seat map didn\u2019t load.",t.appendChild(i);let n=document.createElement("button");n.type="button",n.textContent="Try again",n.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;",n.addEventListener("click",()=>{this.destroy(),this.render().catch(r=>this.opts.onError?.(r))}),t.appendChild(n),e.appendChild(t)}destroy(){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 gn=["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"],Pa={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 La(s){let e={};for(let t of gn)e[t]=(...i)=>{let n=s();return n?n[t](...i):Pa[t]()};return e}var bn=["event","apiBase","maxSelection","numberOfPlacesToSelect","selectionValidators","publicKey","locale","currency","colorblindSafe","initialView","errorDisplay"],vn=[...bn,"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 Ma(s,e,t){let i={container:s};for(let n of vn)i[n]=e[n];for(let n of yn)i[n]=t[n];return i}var Ha=new Set(["seatlayer.designer.ready","seatlayer.designer.saved","seatlayer.designer.published","seatlayer.designer.close","seatlayer.designer.error"]),Ia=2e4,Oa=480,Ra=180*1e3,_a=900*1e3,Da=.8,Ba=30*1e3,Na=1e5,$a=4,Va=50;function $i(s){if(typeof s!="string")return s;let e=document.querySelector(s);if(!e)throw new Error(`EmbeddedDesigner container not found: ${s}`);return e}function Fa(s){let e=(s??"").toLowerCase();return e.includes("expire")||e.includes("revoke")||e==="401"?"expired":e.includes("mismatch")?"mismatch":e.includes("timeout")?"timeout":"load"}var za={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."}},Vi=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"||!Ha.has(t.type))return;let i={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},n=this.identityEstablished||i.type==="seatlayer.designer.ready"||i.type==="seatlayer.designer.saved"||i.type==="seatlayer.designer.published"||i.type==="seatlayer.designer.close",r=this.options.expectedChartId!==void 0&&i.chartId!==this.options.expectedChartId&&(n||i.chartId!==void 0),o=this.options.expectedWorkspaceId!==void 0&&i.workspaceId!==this.options.expectedWorkspaceId&&(n||i.workspaceId!==void 0);if(r||o){this.showError("mismatch");return}switch(i.type){case"seatlayer.designer.ready":this.identityEstablished=!0,this.sessionExpiresAt=i.expiresAt,this.phase="ready",this.clearTimeoutTimer(),this.removeOverlay(),this.autoRecoverUsed=!1,this.scheduleRenewal(i.expiresAt),this.options.onReady?.(i);break;case"seatlayer.designer.saved":this.options.onSaved?.(i);break;case"seatlayer.designer.published":this.options.onPublished?.(i);break;case"seatlayer.designer.close":this.options.onClose?.(i);break;case"seatlayer.designer.error":{let a=Fa(i.code);if(a==="expired"&&this.autoRenewEnabled()&&!this.autoRecoverUsed){this.autoRecoverUsed=!0,this.clearRenewTimer(),this.options.onRequestRelaunch();return}(typeof i.fatal=="boolean"?i.fatal:a!=="load"||this.phase!=="ready")&&this.showError(a),this.options.onError?.(i);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 i=$i(this.options.container);if(this.containerEl=i,window.addEventListener("message",this.handleMessage),i.append(t),this.frame=t,this.fillEnabled()&&this.startFill(),this.phase="loading",this.loadingStateEnabled()){this.ensureContainerPositioned(i),this.renderOverlay(i,"loading");let n=this.options.loadingTimeoutMs??Ia;n>0&&Number.isFinite(n)&&(this.timeoutTimer=setTimeout(()=>{this.phase==="loading"&&this.showError("timeout")},n))}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 i=()=>e.getBoundingClientRect().height,n=t.style.getPropertyValue("height"),r=t.style.getPropertyPriority("height");t.style.setProperty("height","0px","important");let o=i();t.style.setProperty("height",`${Na}px`,"important");let a=i();return n?t.style.setProperty("height",n,r):t.style.removeProperty("height"),!(a-o>$a)&&o>=Va?"container":"viewport"}applyFill(){if(!this.frame||this.pinned)return;let e=this.options.minHeight??Oa;if(this.fillMode==="container"&&this.containerEl){let n=Math.max(e,Math.round(this.containerEl.getBoundingClientRect().height));this.setFrameHeight(`${n}px`);return}let t=this.frame.getBoundingClientRect().top,i=Math.max(e,Math.round(window.innerHeight-t));this.setFrameHeight(`${i}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[i,n]of Object.entries(e))this.frame.style.setProperty(i,n,"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=i=>{i.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 i=t<_a?t*Da:t-Ra,n=Math.max(Ba,i);this.renewTimer=setTimeout(()=>{this.renewTimer=null,this.autoRenewEnabled()&&this.options.onRequestRelaunch()},n)}ensureContainerPositioned(e){getComputedStyle(e).position==="static"&&(this.restoreContainerPosition=e.style.position,e.style.position="relative")}restoreContainerStyle(){if(this.restoreContainerPosition!==null){try{$i(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=$i(this.options.container)}catch{return}this.renderOverlay(t,"error",e)}handleTryAgain(){if(this.options.onRequestRelaunch){this.options.onRequestRelaunch();return}this.mount()}renderOverlay(e,t,i){this.removeOverlay();let n=document.createElement("div");n.setAttribute("data-seatlayer-designer-overlay",t),n.setAttribute("role",t==="error"?"alert":"status"),n.setAttribute("aria-live","polite"),Object.assign(n.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(n):this.buildErrorCard(n,i??"load"),e.append(n),this.overlay=n}buildSkeleton(e){let t=document.createElement("style");t.textContent=`
2167
2635
  @media (prefers-reduced-motion: no-preference) {
2168
2636
  @keyframes seatlayer-designer-shimmer {
2169
2637
  0% { background-position: -320px 0; }
@@ -2173,87 +2641,9 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
2173
2641
  animation: seatlayer-designer-shimmer 1.25s ease-in-out infinite;
2174
2642
  background-size: 640px 100%;
2175
2643
  }
2176
- }`,e.append(t);let i="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 n=c=>{let p=document.createElement("div");return p.className="sl-shimmer",Object.assign(p.style,{background:i,borderRadius:"8px"}),Object.assign(p.style,c),p};r.append(n({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(n({width:"220px",height:"100%",flex:"0 0 auto"})),o.append(n({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:i,flex:"0 0 auto"}),a.append(l),a.append(document.createTextNode("Loading designer\u2026")),e.append(a)}buildErrorCard(e,t){let i=Ma[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 n=document.createElement("h2");n.textContent=i.title,Object.assign(n.style,{margin:"0 0 8px",fontSize:"17px",fontWeight:"600",color:"#f4f7ff"});let o=document.createElement("p");o.textContent=i.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(n,o,a),e.append(r)}};import{PickerController as Dl,formatMoney as Bl,generateSeatThumb as $l,getLocale as Vl,loadLocale as Nl,setStringOverrides as zl,t as M,tCount as rt}from"@seatlayer/core";import{isAuthoredSeatView as Fl,seatViewDisclosure as to}from"@seatlayer/core/view3d/crossfade/panorama";import{seatConfidenceDisclosure as jl}from"@seatlayer/core/core/seatConfidence";function pr(s){return s?.previousPrice!=null&&s.previousPrice>s.price?s.previousPrice:null}function hr(s){return La(s)+(s.moreLabel?`<button type="button" class="sl-price-more" aria-expanded="${!s.collapsed}">${s.esc(s.moreLabel)}</button>`:"")+Ha(s.status)}function La(s){let{esc:e,money:t}=s;return s.categories.map(i=>{let r=s.priceOf(i),n=s.rangeOf(i),o=s.offerOf(i.key),a=pr(o),l=s.activeKey===i.key;return`<div class="sl-price-row${s.bandKeys!=null&&!s.bandKeys.has(i.key)?" sl-dim":""}${l?" sl-active":""}" data-cat="${e(i.key)}" role="button" tabindex="0" aria-pressed="${l}" title="${e(s.titleFor(i,l))}"><span class="sl-dot" style="--sl-cat-dot:${e(s.colorOf(i))}"></span><span class="sl-price-label">${e(i.label)}`+(o?.offerName?`<small class="sl-price-offer">${e(o.offerName)}</small>`:"")+`</span><span class="sl-price-left">${e(s.leftCount(s.left[i.key]??0))}</span>`+(a!=null?`<span class="sl-price-was">${e(t(a))}</span>`:"")+(n!=null?`<span class="sl-price-amt">${n.min===n.max?e(t(n.min)):`${e(t(n.min))}\u2013${e(t(n.max))}`}</span>`:r!=null?`<span class="sl-price-amt">${e(t(r))}</span>`:"")+"</div>"}).join("")}function Ha(s){let e=t=>t.replace(/[&<>"']/g,i=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[i]);return`<div class="sl-status-key" aria-label="${e(s.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(s.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(s.sold)}</span></div>`}function $i(s){let e=Math.abs(s.scrollLeft),t=e>2,i=e+s.clientWidth<s.scrollWidth-2;return s.dataset.fadeStart=String(t),s.dataset.fadeEnd=String(i),{start:t,end:i}}function ur(s){let{esc:e,money:t}=s;return s.categories.map(i=>{let r=s.rangeOf(i),n=s.priceOf(i),o=r?r.min===r.max?t(r.min):`${t(r.min)}+`:n!=null?t(n):null,a=Object.prototype.hasOwnProperty.call(s.left,i.key)&&s.left[i.key]<=0,l=pr(s.offerOf(i.key)),c=o?`${i.label} \u2014 ${o}${a?` (${s.soldOutWord})`:""}`:i.label;return`<button type="button" class="sl-rc" data-cat="${e(i.key)}" aria-pressed="${s.activeKey===i.key}" aria-label="${e(c)}" title="${e(c)}"${a?" disabled":""}><i class="sl-rc-dot" style="--sl-cat-dot:${e(s.colorOf(i))}"></i>`+(l!=null?`<span class="sl-rc-was">${e(t(l))}</span>`:"")+`<span class="sl-rc-t">${e(o??i.label)}</span></button>`}).join("")}function mr(s,e){let t=s.map(a=>({key:a.key,range:e.rangeOf(a)})).filter(a=>a.range!=null);if(!t.length)return[];let i=[...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(i.length<=5)return i.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),n=Math.ceil(r.length/4),o=[];for(let a=0;a<r.length;a+=n){let l=r.slice(a,a+n),c=Math.min(...l.map(d=>d.range.min)),p=Math.max(...l.map(d=>d.range.max));o.push({id:`b${a}`,label:c===p?e.money(c):`${e.money(c)}\u2013${e.money(p)}`,keys:l.map(d=>d.key),min:c,max:p})}return o}var Ia=["on-sale","low","sold-out","presale","closed"];function Ct(s){return s==null?null:typeof s=="number"&&Number.isFinite(s)&&s>=0?s:void 0}function gr(s){return s==null?null:typeof s=="number"&&Number.isFinite(s)&&s>=0?s:void 0}function fr(s){if(s==null)return null;if(typeof s!="object"||Array.isArray(s))return;let e=s,t=e.count,i=e.index;if(typeof i!="number"||!Number.isInteger(i)||i<1||typeof t!="number"||!Number.isInteger(t)||t<i)return;let r=e.remaining;if(r!=null&&(typeof r!="number"||!Number.isInteger(r)||r<0))return;let n={index:i,count:t,remaining:r??null};if(e.id!==void 0){if(typeof e.id!="string"||!e.id.trim())return;n.id=e.id.trim()}if(e.name!==void 0){if(typeof e.name!="string"||!e.name.trim())return;n.name=e.name.trim()}if(e.categoryKey!==void 0){if(e.categoryKey!==null&&(typeof e.categoryKey!="string"||!e.categoryKey.trim()))return;n.categoryKey=e.categoryKey==null?null:e.categoryKey.trim()}for(let o of["startsAt","endsAt"]){if(e[o]===void 0)continue;let a=gr(e[o]);if(a===void 0)return;n[o]=a}return n}function Ra(s){if(s==null)return null;if(typeof s!="object"||Array.isArray(s))return;let e=s;if(!Number.isInteger(e.assignmentVersion)||e.assignmentVersion<0||!Array.isArray(e.channels)||!Array.isArray(e.objects))return;let t=[],i=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||i.has(l)||!Number.isInteger(a.pricingVersion)||a.pricingVersion<0||!Array.isArray(a.priceOverrides))return;let c=[],p=new Set;for(let d of a.priceOverrides){if(!d||typeof d!="object"||Array.isArray(d))return;let m=d,u=typeof m.categoryKey=="string"?m.categoryKey.trim():"",b=m.tierId===null?null:typeof m.tierId=="string"&&m.tierId.trim()?m.tierId.trim():void 0,h=Ct(m.price);if(!u||b===void 0||h===void 0||h===null)return;let y=`${u}\0${b??""}`;if(p.has(y))return;p.add(y),c.push({categoryKey:u,tierId:b,price:h})}i.add(l),t.push({channelId:l,pricingVersion:a.pricingVersion,priceOverrides:c})}let r=[],n=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||n.has(l)||!i.has(c))return;n.add(l),r.push({label:l,channelId:c})}return{assignmentVersion:e.assignmentVersion,channels:t,objects:r}}function Vi(s){if(!s||typeof s!="object"||Array.isArray(s))return null;let e=s,t=Ia.find(p=>p===e.state);if(!t)return null;let i=Ct(e.fromPrice),r=Ct(e.previousPrice);if(i===void 0||r===void 0)return null;let n=e.currency==null?null:typeof e.currency=="string"&&e.currency.trim()?e.currency.trim():void 0;if(n===void 0)return null;let o=fr(e.release);if(o===void 0)return null;let a=e.upcoming===void 0?null:fr(e.upcoming);if(a===void 0)return null;let l=[];if(e.prices!=null){if(!Array.isArray(e.prices))return null;let p=[];for(let d of e.prices){if(!d||typeof d!="object"||Array.isArray(d))return null;let m=d,u=typeof m.categoryKey=="string"?m.categoryKey.trim():"";if(!u)return null;let b=Ct(m.price),h=Ct(m.previousPrice);if(b==null||h===void 0)return null;let y={categoryKey:u,price:b,previousPrice:h};if(m.offerId!==void 0){if(typeof m.offerId!="string"||!m.offerId.trim())return null;y.offerId=m.offerId.trim()}if(m.offerName!==void 0){if(typeof m.offerName!="string"||!m.offerName.trim())return null;y.offerName=m.offerName.trim()}if(m.remaining!==void 0){if(m.remaining!==null&&(typeof m.remaining!="number"||!Number.isInteger(m.remaining)||m.remaining<0))return null;y.remaining=m.remaining==null?null:m.remaining}for(let x of["startsAt","endsAt"]){if(m[x]===void 0)continue;let S=gr(m[x]);if(S===void 0)return null;y[x]=S}p.push(y)}l=p}let c=Ra(e.channelPricing);return c===void 0?null:{state:t,fromPrice:i,previousPrice:r,currency:n,release:o,upcoming:a,prices:l,channelPricing:c}}function br(s,e){if(!s)return null;let t=null,i=r=>{r!=null&&r>e&&(t===null||r<t)&&(t=r)};for(let r of[s.release,s.upcoming])i(r?.startsAt),i(r?.endsAt);for(let r of s.prices)i(r.startsAt),i(r.endsAt);return t}function Ni(s){let e={};for(let t of s?.prices??[])e[t.categoryKey]=t.price;return e}import{getLocale as Oa,localeDirection as _a,t as Da}from"@seatlayer/core";function Ba(){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(s,e,t){let i=document.createElement("div");i.className="sl-picker",i.tabIndex=-1,i.lang=Oa(),i.dir=_a(),s.appendChild(i),Object.entries(ut(void 0,t)).forEach(([n,o])=>i.style.setProperty(n,o)),i.innerHTML=`
2177
- <div class="sl-head">
2178
- <div class="sl-logo" data-ref="logo"></div>
2179
- <div class="sl-head-info" data-ref="headInfo">
2180
- <div class="sl-head-name" data-ref="name"></div>
2181
- <div class="sl-head-meta" data-ref="meta"></div>
2182
- </div>
2183
- <span class="sl-hold-pill" data-ref="hold"></span>
2184
- <span class="sl-closed-pill" data-ref="closedPill" role="status">
2185
- <svg viewBox="0 0 24 24" aria-hidden="true"><rect x="5" y="11" width="14" height="9" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg>
2186
- <span data-ref="closedPillText"></span>
2187
- </span>
2188
- <button type="button" class="sl-close" data-ref="close" data-sl-a="picker.close" aria-label="${e("picker.close","Close")}">
2189
- <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>
2190
- </button>
2191
- </div>
2192
- <div class="sl-rail" data-ref="rail" role="group" data-sl-a="picker.ticketPrices" aria-label="${e("picker.ticketPrices","Ticket prices")}">
2193
- <div class="sl-rail-scroll" data-ref="railScroll"></div>
2194
- </div>
2195
- <div class="sl-body">
2196
- <div class="sl-map">
2197
- <div class="sl-map-host" data-ref="map"></div>
2198
- <div class="sl-zoom" data-ref="zoom">
2199
- <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>
2200
- <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>
2201
- <button type="button" data-sl-a="picker.fitToScreen" aria-label="${e("picker.fitToScreen","Fit to screen")}" data-sl-ti="picker.fitToScreen" title="${e("picker.fitToScreen","Fit to screen")}" data-ref="zfit">
2202
- <svg viewBox="0 0 24 24"><path d="M8 3H5a2 2 0 0 0-2 2v3M16 3h3a2 2 0 0 0 2 2v3M8 21H5a2 2 0 0 0-2-2v-3M16 21h3a2 2 0 0 0 2-2v-3"/></svg>
2203
- </button>
2204
- <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">
2205
- <svg viewBox="0 0 24 24"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg>
2206
- <span class="sl-zfs-lbl" data-sl-t="picker.fullScreen" aria-hidden="true">${e("picker.fullScreen","Full screen")}</span>
2207
- </button>
2208
- </div>
2209
- <div class="sl-boot" data-ref="boot">
2210
- <div class="sl-boot-bar" aria-hidden="true"></div>
2211
- ${Ba()}
2212
- <span class="sl-boot-say" role="status" aria-live="polite" data-sl-t="picker.loadingSeatMap">${e("picker.loadingSeatMap","Loading seat map\u2026")}</span>
2213
- </div>
2214
- <div class="sl-toast" data-ref="toast" role="status" aria-live="polite"></div>
2215
- </div>
2216
- <div class="sl-side" data-ref="side">
2217
- <div class="sl-sheet-head" data-ref="sheetHead">
2218
- <div class="sl-sheet-grab"></div>
2219
- <div class="sl-sheet-bar">
2220
- <div class="sl-sheet-peek" data-ref="peek"></div>
2221
- <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">
2222
- <svg viewBox="0 0 24 24"><path d="M6 15l6-6 6 6"/></svg>
2223
- </button>
2224
- </div>
2225
- </div>
2226
- <div class="sl-sec sl-filtersec" data-ref="filtersSec" data-sl-t="picker.filters">${e("picker.filters","Filters")}</div>
2227
- <div class="sl-filters" data-ref="filters"></div>
2228
- <div class="sl-offer" data-ref="offer" role="status" aria-live="polite"></div>
2229
- <div class="sl-sec sl-prices-sec" data-ref="pricesSec"><span data-sl-t="picker.ticketPrices">${e("picker.ticketPrices","Ticket prices")}</span></div>
2230
- <div class="sl-prices-hint" data-ref="pricesHint"></div>
2231
- <div class="sl-prices" data-ref="prices"></div>
2232
- <div class="sl-live" data-ref="live" role="status" aria-live="polite">
2233
- <span class="dot" aria-hidden="true"></span>
2234
- <span data-ref="liveText" data-sl-t="picker.liveAvailability">${e("picker.liveAvailability","Live availability \u2014 seats update in real time")}</span>
2235
- </div>
2236
- <div class="sl-sec sl-seats-sec">
2237
- <span data-sl-t="picker.yourSeats">${e("picker.yourSeats","Your seats")}</span>
2238
- <span class="sl-seat-summary" data-ref="seatSummary"></span>
2239
- </div>
2240
- <div class="sl-tray" data-ref="tray"></div>
2241
- <div class="sl-foot" data-ref="foot">
2242
- <div class="sl-hold-note" data-ref="holdNote" role="status" aria-live="polite">
2243
- <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M20 6L9 17l-5-5"/></svg>
2244
- <span>
2245
- <b data-ref="holdTitle" data-sl-t="picker.seatsSecured">${e("picker.seatsSecured","Seats secured")}</b>
2246
- <span class="sl-hold-copy" data-ref="holdCopy" data-sl-t="picker.notChargedYet">${e("picker.notChargedYet","You won\u2019t be charged yet.")}</span>
2247
- </span>
2248
- <button type="button" class="sl-hold-change" data-ref="holdChange" data-sl-a="picker.releaseHeldTickets" data-sl-t="picker.change" aria-label="${e("picker.releaseHeldTickets","Release held tickets and choose different seats")}">${e("picker.change","Change")}</button>
2249
- </div>
2250
- <div class="sl-total"><span data-ref="count"></span><b data-ref="total"></b></div>
2251
- <button type="button" class="sl-cta" data-ref="cta" disabled></button>
2252
- </div>
2253
- </div>
2254
- </div>`;let r={};return i.querySelectorAll("[data-ref]").forEach(n=>{r[n.dataset.ref]=n}),{root:i,mapHost:r.map,els:r}}function yr(s){let e=(t,i)=>{for(let r of s.querySelectorAll(`[${t}]`)){let n=r.getAttribute(t);if(!n)continue;let o=Da(n);o!==n&&i(r,o)}};e("data-sl-t",(t,i)=>{t.textContent=i}),e("data-sl-a",(t,i)=>{t.setAttribute("aria-label",i)}),e("data-sl-ti",(t,i)=>{t.setAttribute("title",i)})}import{getLocale as $a,loadLocale as Va,LOCALE_NAMES as Na,localeDirection as xr,resolveLocale as wr,setStringOverrides as za,TRANSLATED_LOCALES as Fa}from"@seatlayer/core";function kr(s,e){let t=wr(s),i=Fa.includes(t)?t:"en";return e&&za(e),{locale:i,direction:xr(i),ready:Va(s)}}function Sr(s,e,t){s.lang=e.locale,s.dir=e.direction,e.ready.then(t)}function Tr(s,e){if(!s)return null;let t=(e.languages??[]).map(r=>wr(r)).filter((r,n,o)=>o.indexOf(r)===n);if(t.length<2)return null;let i=document.createElement("select");i.className="sl-langsel",i.setAttribute("aria-label",e.label);for(let r of t){let n=document.createElement("option");n.value=r,n.textContent=Na[r]??r,n.selected=r===$a(),i.appendChild(n)}return i.addEventListener("change",()=>e.onChange(i.value)),s.appendChild(i),i}function Cr(s,e){e.root.lang=s,e.root.dir=xr(s),yr(e.root);for(let i of e.painters)try{i()}catch{}e.refreshMapCopy();let t=e.languageSelect;t&&t.value!==s&&(t.value=s)}import{compactRowLabel as ja,t as $e}from"@seatlayer/core";import{seatConfidenceDisclosure as Ga}from"@seatlayer/core/core/seatConfidence";function zi(s){return String(s??"\u2014").replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[e])}function k(s){return String(s??"").replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[e])}function we(s){return s?.restrictedView?v("picker.restrictedView","Restricted view"):s?.obstructedView?v("picker.obstructedView","Obstructed view"):""}function Ar(s){if(!s)return"";let e=[];s.premium&&e.push(`<div class="sl-cx-premium"><span class="sl-cx-star" aria-hidden="true">\u2605</span>${v("picker.premiumSeat","Premium seat")}</div>`);let t=we(s);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>${s.note?`<span class="sl-cx-note">${k(s.note)}</span>`:""}</span></div>`):s.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">${k(s.note)}</span></span></div>`),e.length?`<div class="sl-cx">${e.join("")}</div>`:""}function Fi(s){if(!s)return"";let e=[];if(s.premium){let i=k(v("picker.premiumSeat","Premium seat"));e.push(`<span class="sl-cx-mark sl-cx-mark-premium" role="img" aria-label="${i}" title="${i}">\u2605</span>`)}let t=we(s);if(t){let i=k(s.note?`${t}: ${s.note}`:t);e.push(`<span class="sl-cx-mark sl-cx-mark-limited" role="img" aria-label="${i}" title="${i}">\u25D0</span>`)}else if(s.note){let i=k(s.note);e.push(`<span class="sl-cx-mark sl-cx-mark-info" role="img" aria-label="${i}" title="${i}">\u2139</span>`)}return e.join("")}function ji(s){if(!s)return"";let e=[];s.premium&&e.push(`<span class="sl-chip-cx-tag premium"><span aria-hidden="true">\u2605</span>${v("picker.premiumSeat","Premium seat")}</span>`);let t=we(s);return t&&e.push(`<span class="sl-chip-cx-tag limited"><span aria-hidden="true">\u25D0</span>${k(t)}</span>`),!e.length&&!s.note?"":'<div class="sl-chip-cx">'+(e.length?`<div class="sl-chip-cx-tags">${e.join("")}</div>`:"")+(s.note?`<div class="sl-chip-cx-note">${k(s.note)}</div>`:"")+"</div>"}function it(s){return s==="no-seat"?v("picker.emptyWheelchairSpace","Empty wheelchair space"):s==="seat-present"?v("picker.accessiblePhysicalSeat","Accessible physical seat"):""}function Pr(s){let e=it(s);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 ei(s){let e=it(s);return e?`<span class="sl-cx-mark" role="img" aria-label="${e}" title="${e}">\u267F</span>`:""}function Gi(s,e){if(!s)return"";let t=e?v("picker.viewFromThisSeat","View from this seat"):v("picker.seeItIn3d","See it in 3D");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>${t}</span></button>`}function Mr(s){if(!s)return"";let e=s.previous.label||s.previous.id,t=s.next.label||s.next.id;return`<span class="sl-seccard-nav" aria-label="${v("picker.browseSections","Browse sections")}"><button type="button" data-section-nav="${R(s.previous.id)}" aria-label="${v("picker.previousSection","Previous section")}: ${R(e)}" title="${R(e)}">\u2190</button><button type="button" data-section-nav="${R(s.next.id)}" aria-label="${v("picker.nextSection","Next section")}: ${R(t)}" title="${R(t)}">\u2192</button></span>`}function Lr(s,e){if(!e)return"";let t=e,i=t.includes(s.id),r=i?t.length>1?v("picker.openComparison","Open comparison"):v("picker.savedForComparison","Saved for comparison"):t.length?v("picker.compareWithSaved","Compare with saved"):v("picker.saveToCompare","Save to compare");return`<button type="button" class="sl-confirm-compare"${i&&t.length===1?" disabled":""}><span aria-hidden="true">\u21C4</span><span>${k(r)}</span></button>`}function Hr(s,e,t){if(!t)return"";let i=Ga(s.confidenceEvidence),r=i.modeledTarget??i.reality;return`<button type="button" class="sl-confirm-confidence" aria-label="Open seat confidence passport for ${k(s.displayLabel??s.label)}"><span><em>${k(e)}</em><strong>${k(i.headline)}</strong><small>${k(r)}</small></span><b>Passport</b></button>`}function q(s){let e=s?.rowLabel,t=s?.sectionLabel;if(!e||!t)return e;for(let i of["-"," ","\xB7","/","_"]){let r=`${t}${i}`;if(e.startsWith(r)&&e.length>r.length)return e.slice(r.length)}return ja(e,t)}function qa(s){switch(s){case"paused":return{title:v("picker.accessPausedTitle","These seats are on hold right now"),body:v("picker.accessPausedBody","The organizer has paused this selection. Try again in a few minutes."),action:v("picker.accessRetry","Try again")};case"revoked":return{title:v("picker.accessRevokedTitle","This access link is no longer active"),body:v("picker.accessRevokedBody","Ask whoever sent you here for a new link to keep booking these seats.")};case"no_token":case"provider_failed":return{title:v("picker.accessExpiredTitle","Your seat session has expired"),body:v("picker.accessExpiredBody","Reload the seat map to continue. Seats already in your cart stay held until the timer ends."),action:v("picker.accessRetry","Reload seat map")};default:return{title:v("picker.accessInvalidTitle","We couldn\u2019t verify your access"),body:v("picker.accessInvalidBody","You can still book anything shown as available. Contact whoever sent you here for access to the rest.")}}}function Ir(s,e,t){let i=zi;return[s?.sectionLabel?`<div class="sl-confirm-field"><span class="sl-confirm-key">${v("picker.section","Section")}</span><span class="sl-confirm-value">${i(s.sectionLabel)}</span></div>`:"",s?.rowLabel||s?.objectType==="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${i(t)}</span><span class="sl-confirm-value">${i(q(s)??s?.displayLabel??e)}</span></div>`:"",s?.objectType!=="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${v("picker.seat","Seat")}</span><span class="sl-confirm-value">${i(s?.seatNumber??s?.displayLabel??e)}</span></div>`:""].filter(Boolean).join("")}function Rr(s,e,t){let i=zi,r=s?.objectType==="booth",n=s?.objectType==="table"&&!!s?.bookingMode,o=r||n||!s?.seatNumber,a=s?.sectionLabel??(o?void 0:s?.displayLabel),l=n?`${v("picker.guests","Guests")} ${s?.bookingMode==="variable"?`${s?.minOccupancy}\u2013${s?.maxOccupancy}`:s?.capacity}`:void 0,p=(o?[l,a?s?.rowLabel??s?.displayLabel:void 0]:[s?.rowLabel?`${t} ${q(s)??""}`.trim():void 0,`${v("picker.seat","Seat")} ${s?.seatNumber??e}`]).filter(Boolean).join(" \xB7 ");return(a?`<span class="sl-confirm-place">${i(a)}</span>`:"")+(p?`<span class="sl-confirm-pos">${a?" \xB7 ":""}${i(p)}</span>`:"")+(a||p?"":`<span class="sl-confirm-pos">${i(e)}</span>`)}function Or(s,e){if(!s)return"";let t=e?v("picker.viewFromThisSeat","View from this seat"):v("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 Er(s){return s.buyerMessage?.trim()||(s.restriction==="companion"?v("picker.companionRequiresWheelchair","Requires the adjacent wheelchair place"):void 0)}function _r(s,e,t){let i=zi;if(s.length>1)return`<fieldset class="sl-confirm-tiers"><legend>${v("picker.ticketType","Ticket type")}</legend>`+s.map(o=>{let a=Er(o);return`<button type="button" class="sl-confirm-tier" data-confirm-tier="${i(o.id)}" aria-pressed="${o.id===e}"><span class="sl-confirm-tier-copy"><span class="sl-confirm-tier-name">${i(o.name)}</span>`+(a?`<small class="sl-confirm-tier-note">${i(a)}</small>`:"")+`</span><span class="sl-confirm-tier-price">${i(t(o))}</span></button>`}).join("")+"</fieldset>";let r=s[0],n=r?Er(r):void 0;return n?`<p class="sl-confirm-tier-note">${i(n)}</p>`:""}function qi(s){return`<span class="sl-seccard-dot" style="background:${k(s.color)}"></span><span class="sl-seccard-name">${k(s.label)}</span><span class="sl-seccard-left" data-full="${k(s.leftLabel)}" data-short="${k(s.leftShortLabel??s.leftLabel)}">${k(s.leftLabel)}</span>`+s.nav+s.close}function Dr(s){return`<div class="sl-seccard-head"><span class="sl-seccard-dot" style="background:${k(s.color)}"></span><span class="sl-seccard-name">${k(s.label)}</span>`+(s.showPrice?`<span class="sl-seccard-price">${k(s.priceLabel)}</span>`:"")+s.close+`</div><div class="sl-seccard-zone">${s.zoneLabel?`${k(s.zoneLabel)} \xB7 `:""}<span class="sl-seccard-left">${k(s.leftLabel)}</span></div>`+(s.entrance?`<div class="sl-seccard-entrance">${k(s.entrance)}</div>`:"")+(s.mix?`<div class="sl-seccard-mix">${s.mix}</div>`:"")+`<div class="sl-seccard-foot"><button type="button" class="sl-seccard-overview">\u2190 ${k(s.overviewLabel)}</button>`+s.nav+`<span class="sl-seccard-hint">${k(s.hint)}</span></div>`}function Br(s){return`<span class="sl-seccard-mix-item${s.dim?" sl-dim":""}"><span class="sl-seccard-mix-dot" style="background:${k(s.color)}"></span>${k(s.label)} <span class="sl-seccard-mix-price">${k(s.rangeLabel)}</span></span>`}function $r(s){return'<div class="sl-confirm-grid">'+s.identityFields+`</div><div class="sl-confirm-cat"><span class="sl-dot" style="background:${k(s.categoryColor)}"></span><span class="sl-confirm-cat-name">${k(s.categoryLabel)}</span>`+(s.priceLabel?`<span class="sl-confirm-price">${k(s.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-id">'+s.marker+`<span class="sl-confirm-dot" style="background:${k(s.categoryColor)}" aria-hidden="true"></span><span class="sl-sr">${k(s.categoryLabel)}</span><span class="sl-confirm-who">`+s.identity+"</span>"+(s.priceLabel?`<span class="sl-confirm-idprice">${k(s.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-body">'+s.tierChoices+s.groupDates+s.wheelchair+s.commercial+(s.thumb||s.see3dPill?`<div class="sl-confirm-strip">${s.thumb}<span class="sl-confirm-pills">${s.see3dPill}</span></div>`:"")+s.inspect+`<div class="sl-confirm-row"><button type="button" class="sl-confirm-cancel">${k(s.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>${k(s.selectLabel)}</button></div></div>`}function Vr(s,e){let t=R,{variable:i}=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(i?$e("picker.flexiblePartyTypeWord",{typeWord:e.typeWord}):$e("picker.wholeTypeWord",{typeWord:e.typeWord}))}</div><h2 class="sl-table-title" id="sl-table-title">${t(s.displayLabel??s.label)}</h2><p class="sl-table-copy" id="sl-table-copy">${t(i?v("picker.chooseGuestsCopy","Choose how many guests will sit together. This table is held exclusively for your party."):$e("picker.allPlacesBookedTogether",{count:s.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($e("picker.perGuestPrice",{price:e.unitPrice}))}</b>`)+`<span class="muted">${t(v("picker.tableCapacity","Table capacity"))}</span><span>${t($e("picker.guestsCount",{count:s.capacity}))}</span>`+(e.suppressPricing?"":`<span class="muted">${t(v("picker.total","Total"))}</span><b data-table-total></b>`)+"</div>"+(i?`<label class="sl-table-qtylabel" id="sl-table-qty-label">${t(v("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(v("picker.fewerGuests","Fewer guests"))}">\u2212</button><output aria-live="polite" data-table-qty>${s.quantity}</output><button type="button" data-table-step="1" aria-label="${t(v("picker.moreGuests","More guests"))}">+</button></div><div class="sl-table-range">${t($e("picker.chooseMinMaxGuests",{min:s.minOccupancy,max:s.maxOccupancy}))}</div>`:`<input type="hidden" data-table-qty value="${s.capacity}">`)+`<div class="sl-table-actions"><button type="button" class="sl-table-cancel">${t($e("common.cancel"))}</button><button type="button" class="sl-table-confirm">${t(e.held?v("picker.updateTable","Update table"):i?v("picker.selectTable","Select table"):v("picker.selectWholeTable","Select whole table"))}</button></div></div></section>`}function Nr(s,e){let t=qa(s),i=document.createElement("div");i.className="sl-access",i.setAttribute("role","status"),i.setAttribute("aria-live","polite");let r=document.createElement("div");r.className="sl-access-card";let n=document.createElement("span");n.className="sl-access-icon",n.setAttribute("aria-hidden","true"),n.textContent="\u21BB";let o=document.createElement("div");o.className="sl-access-copy";let a=document.createElement("div");a.className="sl-access-title",a.textContent=t.title;let l=document.createElement("div");if(l.className="sl-access-body",l.textContent=t.body,o.append(a,l),t.action){let c=document.createElement("button");c.type="button",c.className="sl-access-act";let p=document.createElement("span");p.className="sl-access-act-icon",p.setAttribute("aria-hidden","true"),p.textContent="\u21BB";let d=document.createElement("span");d.textContent=t.action,c.append(p,d),c.addEventListener("click",async()=>{i.classList.add("is-reloading"),c.disabled=!0;try{await e()}catch{}finally{i.isConnected&&(i.classList.remove("is-reloading"),c.disabled=!1)}}),o.appendChild(c)}return r.append(n,o),i.appendChild(r),i}function zr(s){return s.map(e=>`<button type="button" role="switch" class="sl-a11yrow${e.className?` ${e.className}`:""}${e.on?" on":""}" data-a11y-row="${k(e.key)}" aria-checked="${e.on}" aria-pressed="${e.on}"`+(e.disabled?' disabled aria-disabled="true"':"")+`><span class="sl-a11yrow-i" aria-hidden="true">${k(e.icon)}</span><span class="sl-a11yrow-t"><span class="sl-a11yrow-l">${k(e.label)}</span>`+(e.note?`<span class="sl-a11yrow-n">${k(e.note)}</span>`:"")+"</span>"+(e.count?`<span class="sl-a11yrow-c">${k(e.count)}</span>`:"")+'<span class="sl-a11yrow-s" aria-hidden="true"></span></button>').join("")}function Fr(s){let e=document.createElement("div");e.className="sl-floors on",e.setAttribute("role","group"),e.setAttribute("aria-label",s.tf("picker.chooseLevel","Choose level"));let t=[{id:"",name:s.tf("picker.allFloors","All floors")},...s.floors.map(n=>({id:n.id,name:n.name}))];for(let n of t){let o=document.createElement("button");o.type="button",o.dataset.floor=n.id,o.textContent=n.name,o.setAttribute("aria-pressed","false"),o.addEventListener("click",()=>s.onChoose(n.id)),e.appendChild(o)}let i=document.createElement("button");i.type="button",i.className="sl-floor-info",i.textContent="i";let r=s.tf("picker.floorHelp","All floors shows the complete venue. Choose one level to inspect and select its seats.");return i.setAttribute("aria-label",r),i.title=r,e.appendChild(i),e}function jr(s,e,t){if(!s)return;let i=t?"":e;s.querySelectorAll("button[data-floor]").forEach(r=>{r.setAttribute("aria-pressed",String(r.dataset.floor===i))})}import{t as ne,tCount as Ka}from"@seatlayer/core";var ti=class{constructor(e){this.el=null;this.stripObserver=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?.classList.contains("strip")?Le(this.el,void 0,Hs):this.el?.remove(),this.el=null,this.syncLocatorDock(),this.host.refreshMinimap();return}this.collapsed=this.host.controller.getRung()==="seats",this.shownAt=Date.now(),this.render(e),this.host.refreshMinimap()}updateDockInPlace(e,t){let i=this.el;if(!i)return;let r=i.querySelector(".sl-seccard-dot");r&&(r.style.background=e.color);let n=i.querySelector(".sl-seccard-name");n&&Ei(n,e.label);let o=i.querySelector(".sl-seccard-left");o&&(o.dataset.full=t.leftLabel,o.dataset.short=t.leftShortLabel,Ei(o,t.leftLabel));let a=i.querySelector(".sl-seccard-nav");t.nav?(a?a.outerHTML=t.nav:i.querySelector(".sl-seccard-x")?.insertAdjacentHTML("beforebegin",t.nav),this.wireNavigation(i)):a&&a.remove(),i.setAttribute("aria-label",`${ne("picker.sectionSummaryAria",{label:e.label})}, ${t.leftLabel}`),this.fitStripCount()}wireNavigation(e){e.querySelectorAll("[data-section-nav]").forEach(t=>{t.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation();let r=t.dataset.sectionNav;r&&this.host.controller.focusSection(r)})})}render(e){let t=this.host.map();if(!t)return;let i=this.el?.classList.contains("strip")===!0&&this.el.isConnected,r=e.categories.length?e.categories.map(y=>{let x=this.host.controller.doc?.categories.find(S=>S.key===y.key);return x?this.host.catPriceRange(x):{min:y.priceMin,max:y.priceMax}}).filter(y=>y!=null):[{min:e.priceMin,max:e.priceMax}],n=Math.min(...r.map(y=>y.min)),o=Math.max(...r.map(y=>y.max)),a=n===o?this.host.money(n):`${this.host.money(n)}\u2013${this.host.money(o)}`,l=Ka("picker.seatsLeftInSection",e.seatsLeft),c=ne("picker.seatsLeftShort",{count:e.seatsLeft}),p=`<button type="button" class="sl-seccard-x" aria-label="${ne("picker.closeSectionSummary")}">\u2715</button>`,d=`<button type="button" class="sl-seccard-x sl-seccard-back" aria-label="${ne("picker.closeSectionSummary")}"><span class="sl-seccard-back-chev" aria-hidden="true">\u2039</span>${R(ne("picker.overview"))}</button>`,m=Mr(this.host.sectionNeighbours(e.id)),u=this.host.root()?.dataset.layout==="narrow",b={label:e.label,color:e.color,leftLabel:l,leftShortLabel:c,nav:m,close:p};if(u&&i&&this.el){this.updateDockInPlace(e,{leftLabel:l,leftShortLabel:c,nav:m});return}this.el?.remove();let h=document.createElement("div");if(u){if(h.className=i?"sl-seccard strip on":"sl-seccard strip on sl-mo-slide-up",h.setAttribute("role","group"),h.setAttribute("aria-label",`${ne("picker.sectionSummaryAria",{label:e.label})}, ${l}`),h.innerHTML=qi({...b,close:d}),i)for(let y of h.querySelectorAll(".sl-seccard-name,.sl-seccard-left"))y.classList.add("sl-mo-xfade");this.wireNavigation(h),h.querySelector(".sl-seccard-x").addEventListener("click",()=>this.host.controller.overview()),t.appendChild(h),this.fitStripCount()}else if(this.collapsed)h.className="sl-seccard mini on",h.setAttribute("role","button"),h.setAttribute("aria-label",ne("picker.sectionSummaryAria",{label:e.label})),h.innerHTML=qi(b),this.wireNavigation(h),h.addEventListener("click",y=>{y.target.closest(".sl-seccard-x")||(this.collapsed=!1,this.shownAt=Date.now(),this.render(e))}),h.querySelector(".sl-seccard-x").addEventListener("click",()=>this.host.controller.overview()),(this.host.region("top-center")??t).appendChild(h);else{h.className="sl-seccard on",h.setAttribute("role","dialog"),h.setAttribute("aria-label",ne("picker.sectionSummaryAria",{label:e.label}));let y=this.host.priceBandKeys(),x=this.host.suppressPricing(),S=e.categories.map(A=>{let g=this.host.controller.doc?.categories.find(E=>E.key===A.key),w=g?this.host.catPriceRange(g):{min:A.priceMin,max:A.priceMax};return Br({label:A.label,color:A.color,dim:y!=null&&!y.has(A.key),rangeLabel:x?"":w&&w.min!==w.max?`${this.host.money(w.min)}\u2013${this.host.money(w.max)}`:this.host.money(w?.min??A.price)})}).join("");h.innerHTML=Dr({...b,priceLabel:a,showPrice:!x&&e.categories.length>0,zoneLabel:e.zoneLabel,entrance:e.entrance?`${ne("picker.entrance")} ${e.entrance}`:void 0,mix:S,overviewLabel:ne("picker.overview"),hint:ne("picker.tapSeatHint")}),this.wireNavigation(h),h.querySelector(".sl-seccard-x").addEventListener("click",()=>this.host.controller.overview()),h.querySelector(".sl-seccard-overview").addEventListener("click",()=>this.host.controller.overview()),(this.host.region("top-center")??t).appendChild(h)}this.el=h,u&&this.watchStrip(h),this.syncLocatorDock()}syncLocatorDock(){let e=this.host.root();e&&(this.el?.classList.contains("strip")?e.dataset.locator="true":delete e.dataset.locator)}fitStripCount(){let e=this.el;if(!e||!e.classList.contains("strip"))return;let t=e.querySelector(".sl-seccard-left");if(!t)return;let i=e.querySelector(".sl-seccard-name"),r=c=>c!=null&&c.clientWidth>0&&c.scrollWidth>c.clientWidth+1,n=()=>{let c=e.clientWidth;if(c<=0)return!0;let p=typeof getComputedStyle=="function"?getComputedStyle(e):null,d=h=>{let y=Number.parseFloat(h??"");return Number.isFinite(y)?y:0},m=[...e.children].filter(h=>h instanceof HTMLElement&&!h.hidden),u=d(p?.columnGap)||d(p?.gap);return m.reduce((h,y)=>h+Math.max(y.scrollWidth,y.getBoundingClientRect().width),0)+u*Math.max(0,m.length-1)+d(p?.paddingLeft)+d(p?.paddingRight)<=c+1},o=()=>t.hidden||!r(t)&&n(),a=c=>{if(t.hidden=c==="hidden",c==="hidden")return;let p=t.dataset.full??"";t.textContent=c==="full"?p:t.dataset.short??p},l=["full","short","hidden"];for(let c of l)if(a(c),o()&&!r(i))return;for(let c of l)if(a(c),o())return;a("hidden")}watchStrip(e){this.stripObserver?.disconnect(),this.stripObserver=null,typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{this.el===e&&this.fitStripCount()}),typeof ResizeObserver=="function"&&(this.stripObserver=new ResizeObserver(()=>{this.el===e&&this.fitStripCount()}),this.stripObserver.observe(e))}collapse(){!this.el||this.collapsed||!this.current||this.host.root()?.dataset.layout!=="narrow"&&(this.collapsed=!0,this.render(this.current))}onView(){if(!(!this.el||this.collapsed||!this.current)&&this.host.root()?.dataset.layout!=="narrow"){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,i=this.host.map();if(!e||!t||!i)return 0;let r=this.host.activeFloorObjects().find(S=>S.type==="section"&&S.id===t.id)?.outline;if(!r||r.length<3)return 0;let n=r.map(S=>this.host.controller.worldToScreen(S)),o=n.map(S=>S.x),a=n.map(S=>S.y),l=Math.min(...o),c=Math.min(...a),p=Math.max(...o)-l,d=Math.max(...a)-c;if(p<=0||d<=0)return 0;let m=i.getBoundingClientRect(),u=e.getBoundingClientRect(),b=u.left-m.left,h=u.top-m.top,y=Math.max(0,Math.min(b+u.width,l+p)-Math.max(b,l)),x=Math.max(0,Math.min(h+u.height,c+d)-Math.max(h,c));return y*x/(p*d)}};import{pointInPolygon as Ua}from"@seatlayer/core";import{createMinimapTransform as Wa,minimapPointToWorld as Ya,minimapViewportPlan as Qa}from"@seatlayer/core/picker/minimapGeometry";function Gr(s,e){let t=new Ki(s);return t.build(e),t}var Ki=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}build(e){if(!this.host.controller.getViewport())return;let i=document.createElement("button");i.type="button",i.className="sl-minimap-toggle",i.setAttribute("aria-label",v("picker.openVenueMap","Open venue overview map")),i.setAttribute("aria-expanded","false"),i.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(i),this.miniToggle=i;let r=document.createElement("div");r.className="sl-minimap",r.setAttribute("role","group");let n=document.createElement("div");n.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",v("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",v("picker.closeVenueMap","Close venue overview map")),l.textContent="\xD7",n.append(o,a,l);let c=document.createElement("canvas");c.tabIndex=0,c.setAttribute("role","application"),c.setAttribute("aria-label",v("picker.venueMapInstructions","Venue overview map. Drag the viewport, click a section, or use arrow keys to pan.")),r.append(n,c),e.appendChild(r),this.miniWrap=r,this.miniLabel=o,this.miniCanvas=c;let p=document.createElement("canvas");this.miniBase=p,i.addEventListener("click",()=>{let d=this.host.root()?.dataset.minimapOpen==="true";this.userClosed=d,this.setMinimapOpen(!d)}),l.addEventListener("click",()=>{this.userClosed=!0,this.setMinimapOpen(!1)}),c.addEventListener("click",d=>{if(this.miniSuppressClick){this.miniSuppressClick=!1;return}this.minimapJump(d)}),c.addEventListener("pointerdown",d=>this.minimapPointerDown(d)),c.addEventListener("pointermove",d=>this.minimapPointerMove(d)),c.addEventListener("pointerup",d=>this.minimapPointerUp(d)),c.addEventListener("pointercancel",d=>this.minimapPointerUp(d)),c.addEventListener("keydown",d=>this.minimapKeydown(d)),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,i=this.host.controller.getViewport()?.bounds;if(!e||!t||!i||!(i.width>0&&i.height>0))return;let r=196,n=146,o=6,a=i.width/Math.max(1,i.height),l=r,c=Math.round(r/a);c>n&&(c=n,l=Math.round(n*a)),l=Math.max(64,l),c=Math.max(48,c);let p=Math.min(2,window.devicePixelRatio||1);e.width=Math.round(l*p),e.height=Math.round(c*p),e.style.width=`${l}px`,e.style.height=`${c}px`,t.width=e.width,t.height=e.height,this.miniTf=Wa(i,e.width,e.height,p,o)}syncMinimapLabel(){if(!this.miniLabel||!this.miniWrap)return;let e=this.host.controller.getFloors(),t=this.host.controller.isFloorOverview()?v("picker.allFloors","All floors"):e.find(p=>p.id===this.host.controller.getActiveFloorId())?.name??v("picker.venueOverview","Venue overview"),i=this.host.controller.getMinimapSnapshot().sections,n=i.find(p=>p.active)?.label??this.host.focusedSectionLabel(),o=n?`${t} \xB7 ${n}`:t;this.miniLabel.textContent=o;let a=i.filter(p=>p.state==="selected").length,l=i.filter(p=>p.state==="available").length,c=i.filter(p=>p.state==="inactive").length;this.miniWrap.setAttribute("aria-label",i.length?`${o}. ${a} selected, ${l} available, ${c} inactive sections.`:o),this.miniCanvas?.setAttribute("aria-label",i.length?`${o}. ${a} selected, ${l} available, ${c} inactive sections. ${v("picker.venueMapInstructions","The outlined region is the visible map area. Drag it, click a section, or use arrow keys to pan.")}`:`${o}. ${v("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 i=e.getContext("2d");if(!i)return;i.clearRect(0,0,e.width,e.height);let r=d=>d*t.scale+t.offX,n=d=>d*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",p=this.host.controller.getMinimapSnapshot();for(let d of p.sections){if(d.outline.length<3)continue;i.beginPath(),d.outline.forEach((u,b)=>b===0?i.moveTo(r(u.x),n(u.y)):i.lineTo(r(u.x),n(u.y))),i.closePath();let m=d.paint;if(i.globalAlpha=d.state==="inactive"?.5:.92,m?i.fillStyle=m.fill:(i.globalAlpha=d.state==="inactive"?.18:d.state==="selected"?.72:.34,i.fillStyle=d.state==="inactive"?a:d.state==="selected"?l:c),i.fill(),i.globalAlpha=.82,i.lineWidth=Math.max(1,t.dpr),i.strokeStyle=m?.stroke||o,i.stroke(),d.owned){i.globalAlpha=1,i.lineWidth=Math.max(2,t.dpr*1.5),i.strokeStyle=l,i.stroke();let u=d.outline.reduce((b,h)=>({x:b.x+h.x,y:b.y+h.y}),{x:0,y:0});i.beginPath(),i.arc(r(u.x/d.outline.length),n(u.y/d.outline.length),Math.max(1.5,t.dpr*1.6),0,Math.PI*2),i.fillStyle=l,i.fill(),i.beginPath(),d.outline.forEach((b,h)=>h===0?i.moveTo(r(b.x),n(b.y)):i.lineTo(r(b.x),n(b.y))),i.closePath()}d.active&&(i.globalAlpha=1,i.lineJoin="round",i.lineWidth=Math.max(4,t.dpr*3.5),i.strokeStyle=this.host.cssVar("--sl-surface")||"#fff",i.stroke(),i.lineWidth=Math.max(2,t.dpr*1.75),i.strokeStyle=l,i.stroke())}if(i.globalAlpha=1,!p.sections.length){let d=Math.max(1,t.dpr),m=this.host.controller.getRenderer?.(),u=new Map,b=h=>{let y=u.get(h);if(y)return y;let x=m?.categoryDisplayColor?.(h)||c;return u.set(h,x),x};for(let h of p.seats)i.globalAlpha=h.state==="inactive"?.22:.78,i.fillStyle=h.state==="inactive"?a:h.state==="selected"?l:b(h.categoryKey),i.beginPath(),i.arc(r(h.x),n(h.y),d,0,Math.PI*2),i.fill();i.globalAlpha=1}}drawMinimapRect(){let e=this.miniCanvas,t=this.miniBase,i=this.miniTf;if(!e||!t||!i)return;let r=e.getContext("2d");if(!r)return;r.clearRect(0,0,e.width,e.height),r.drawImage(t,0,0);let n=this.host.controller.getViewport();if(!n)return;let o=Qa(n.visible,i,e.width,e.height,Math.max(2,i.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,i.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,i.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,i.dpr*3),Math.max(2,i.dpr*2)]),r.strokeRect(o.clipped.x,o.clipped.y,o.clipped.width,o.clipped.height)),r.restore()}minimapWorldPoint(e){let t=this.miniCanvas,i=this.miniTf;if(!t||!i)return null;let r=t.getBoundingClientRect(),n=(e.clientX-r.left)*(t.width/Math.max(1,r.width)),o=(e.clientY-r.top)*(t.height/Math.max(1,r.height));return{...Ya({x:n,y:o},i),px:n,py:o}}minimapPointerDown(e){let t=this.minimapWorldPoint(e),i=this.host.controller.getViewport()?.visible;!t||!i||!(t.x>=i.x&&t.x<=i.x+i.width&&t.y>=i.y&&t.y<=i.y+i.height)||(this.miniDrag={pointerId:e.pointerId,offsetX:t.x-(i.x+i.width/2),offsetY:t.y-(i.y+i.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 i=this.minimapWorldPoint(e);i&&(!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:i.x-t.offsetX,y:i.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 i=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;!i&&!r||(this.host.controller.clearSectionFocus(),this.host.controller.panToWorld({x:t.x+t.width/2+i,y:t.y+t.height/2+r}),e.preventDefault())}minimapJump(e){let t=this.minimapWorldPoint(e);if(t){for(let i of this.host.controller.getMinimapSnapshot().sections)if(!(i.state==="inactive"||i.outline.length<3)&&Ua(t,i.outline)){this.host.controller.focusSection(i.id);return}this.host.controller.clearSectionFocus(),this.host.controller.panToWorld(t)}}};import{t as Ui}from"@seatlayer/core";var Xa=12;function qr(s,e){let t=e.floors(),i=new Set(t.map(x=>x.label.trim().toLocaleLowerCase())),r=e.zones().filter(x=>x.seatCount>0&&!i.has(x.label.trim().toLocaleLowerCase())),n=e.sections().filter(x=>x.seatCount>0&&!i.has(x.label.trim().toLocaleLowerCase())),o=r.length>1?[]:n,a=t.length>1,l=r.length>1,c=o.length>1;if(!a&&!l&&!c)return;let p=document.createElement("div");p.className="sl-view3d-nav";let d=document.createElement("button");d.type="button",d.className="sl-view3d-nav-toggle",d.setAttribute("aria-expanded","false");let m='<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>',u=document.createElement("span");d.innerHTML=m,d.appendChild(u);let b=x=>{p.classList.toggle("is-open",x),d.setAttribute("aria-expanded",String(x)),u.textContent=x?v("picker.closeVenueNav","Close"):a&&(l||c)?v("picker.levelsAndAreas","Levels & areas"):a?v("picker.levels","Levels"):v("picker.areas","Areas")};d.addEventListener("click",()=>b(!p.classList.contains("is-open"))),p.addEventListener("keydown",x=>{x.key!=="Escape"||!p.classList.contains("is-open")||(x.preventDefault(),x.stopPropagation(),b(!1),d.focus())}),b(!1),p.appendChild(d);let h=x=>{},y=x=>{};if(a){let x=document.createElement("div");x.setAttribute("role","group"),x.setAttribute("aria-label",v("picker.levels","Levels"));let S=[];y=w=>{S.forEach(E=>{E.setAttribute("aria-pressed",String((E.dataset.floor===""?null:Number(E.dataset.floor))===w))})};let A=w=>{e.focusFloor(w)&&(y(w),h(w))},g=(w,E)=>{let L=document.createElement("button");L.type="button",L.textContent=w,L.dataset.floor=E===null?"":String(E),L.setAttribute("aria-pressed",String(E===null)),L.addEventListener("click",()=>{A(E),b(!1)}),S.push(L),x.appendChild(L)};g(v("picker.allLevels","All levels"),null);for(let w of t)g(w.label||Ui("picker.levelNumber",{number:w.index+1}),w.index);p.appendChild(x)}if(l||c){let x=document.createElement("div");x.setAttribute("role","group"),x.setAttribute("aria-label",v("picker.areas","Areas"));let S=l?r.map(g=>({id:g.id,label:g.label||g.id,go:()=>{e.focusZone(g.id)}})):o.map(g=>({id:g.id,label:g.label||g.id,floorIndex:g.floorIndex,go:()=>{e.focusSection(g.id),Number.isFinite(g.floorIndex)&&y(g.floorIndex)}})),A=g=>{let w=l||g===null?S:S.filter(E=>E.floorIndex===void 0||E.floorIndex===g);if(x.replaceChildren(),!w.length){x.remove();return}if(x.isConnected||p.appendChild(x),!l&&w.length>Xa){let E=document.createElement("select");E.setAttribute("aria-label",v("picker.jumpToSection","Jump to section"));let L=document.createElement("option");L.value="",L.textContent=v("picker.jumpToSection","Jump to section"),E.appendChild(L);for(let _ of w){let H=document.createElement("option");H.value=_.id,H.textContent=_.label,E.appendChild(H)}E.addEventListener("change",()=>{w.find(_=>_.id===E.value)?.go()}),x.appendChild(E);return}for(let E of w){let L=document.createElement("button");L.type="button",L.textContent=E.label,L.addEventListener("click",()=>{E.go(),b(!1)}),x.appendChild(L)}};h=A,A(null)}s.appendChild(p)}var ii=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",v("picker.savedSeatComparison","Saved seat comparison"));let n=document.createElement("button");n.type="button",n.className="main",n.addEventListener("click",()=>{this.host.savedSeatIds().length>1?this.host.openComparison():this.host.toast(v("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",v("picker.clearSavedSeatComparison","Clear saved seat comparison")),o.addEventListener("click",()=>this.host.clearComparison()),t.append(n,o),e.appendChild(t),this.chip=t}let i=this.host.savedSeatIds().length,r=t.querySelector(".main");r&&(r.textContent=i>1?Ui("picker.compareCount",{count:i}):v("picker.oneSeatSaved","1 seat saved"),r.setAttribute("aria-label",i>1?Ui("picker.openComparisonOfSeats",{count:i}):v("picker.oneSeatSavedChooseAnother","One seat saved; choose another to compare")))}remove(){this.chip?.remove(),this.chip=null}mainButton(){return this.chip?.querySelector(".main")??null}};function Kr(s){return!s?.querySelector('[data-ref="zfs"]')}import{t as Ur}from"@seatlayer/core";var Za=900,Ja=450;function el(s){switch(s){case"seat":return v("picker.stopYourSeat","Your seat");case"row":return v("picker.stopYourRow","Your row");case"section":return v("picker.stopYourSection","Your section");default:return v("picker.stopWholeVenue","Whole venue")}}function Wr(s,e){let t=document.createElement("button");t.type="button",t.className="sl-view3d-recentre sl-mo-rotate-in",t.textContent="\u25CE";let i=v("picker.recentreOnStage","Recentre on the stage");t.setAttribute("aria-label",i),t.title=i,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"),s.append(t,r);let n=null,o=null;return{onStopChange(a){if(n&&(clearTimeout(n),n=null),o&&(clearTimeout(o),o=null),!a){r.classList.remove("is-shown"),r.textContent="",o=setTimeout(()=>{o=null,s.classList.remove("is-seat-view")},Ja);return}s.classList.add("is-seat-view"),r.textContent=el(a),r.classList.add("is-shown"),n=setTimeout(()=>{n=null,r.classList.remove("is-shown")},Za)},dispose(){n&&(clearTimeout(n),n=null),o&&(clearTimeout(o),o=null),t.remove(),r.remove(),s.classList.remove("is-seat-view")}}}var tl=44,il=92;function Yr(s,e,t,i={}){let r=s?.sectionLabel,n=q(s),o=sl(s,e),a=[r,n?Ur("picker.rowLabel",{label:n}):null,o?Ur("picker.seatLabel",{label:o}):null].filter(Boolean).join(" \xB7 "),l=i.maxChars??(i.narrow?tl:il);for(let c of[t,i.shortTail??t,null]){let p=[a,c].filter(Boolean).join(" \xB7 ");if(p.length<=l||c==null)return p}return a}function sl(s,e){if(s?.seatNumber)return s.seatNumber;let t=s?.displayLabel??e,i=r=>{!r||!t.startsWith(r)||t.length<=r.length||(t=t.slice(r.length).replace(/^[\s·\-\/_]+/,""))};return i(s?.sectionLabel),i(q(s)),t}var Qr="sl:sheet-hint";function Xr(s){let e=s.boot;if(!e?.isConnected)return;if(s.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"),s.map?.appendChild(t),setTimeout(()=>t.remove(),650),s.rail?.classList.add("is-in"),s.root?.classList.add("is-arriving"),setTimeout(()=>{s.rail?.classList.remove("is-in"),s.root?.classList.remove("is-arriving"),rl(s.root)},900)}function rl(s){if(!s||s.dataset.layout!=="narrow")return;try{if(window.sessionStorage.getItem(Qr))return;window.sessionStorage.setItem(Qr,"1")}catch{}let e=s.querySelector(".sl-sheet-grab");e&&(e.classList.add("sl-mo-hint"),e.addEventListener("animationend",()=>e.classList.remove("sl-mo-hint"),{once:!0}))}function Zr(s,e){s.addEventListener("keydown",t=>{if(t.key==="Escape"){for(let i of e())if(i.open()){t.preventDefault(),t.stopPropagation(),i.close();return}}})}function si(s){let e=s.committedSelection(),t=s.controller.getGAAreas(),i=s.hold?.items??[],r=new Set(i.map(m=>m.label)),n=Ds(s,t,i),o=Be(s.gaQty,i),a=i.reduce((m,u)=>m+s.paidPrice(u.categoryKey,u.tierId,u.unitPrice,u.label)*(u.quantity??1),0),l=i.reduce((m,u)=>m+(u.quantity??1),0),c=e.filter(m=>!r.has(m.label)),p=c.reduce((m,u)=>m+s.paidPrice(u.categoryKey,u.tierId??null,u.price,u.label)*(u.quantity??1),0)+n+a,d=c.reduce((m,u)=>m+(u.quantity??1),0)+o+l;return{seats:e,freshSeats:c,gaAreas:t,heldItems:i,heldLabels:r,heldCount:l,total:p,count:d}}function ri(s,e){let t=e.tiers?.length?e.tiers[0].price:e.price;return t===void 0||!e.key?t:s.paidPrice(e.key,e.tiers?.[0]?.id??null,t)}function ni(s,e){let t=e.tiers?.length?e.tiers.map(i=>s.paidPrice(e.key,i.id??null,i.price)):e.price==null?[]:[s.paidPrice(e.key,null,e.price)];if(e.key)for(let i of s.pricesByChannel.values())for(let r of i)r.categoryKey===e.key&&t.push(r.price);return t.length?{min:Math.min(...t),max:Math.max(...t)}:void 0}var Et="seatlayer_";function nl(){let s=globalThis;return s.document?.modelContext??s.navigator?.modelContext??null}function te(s,e){return e?{ok:!1,reason:s,message:e}:{ok:!1,reason:s}}function ol(s){return Array.isArray(s)?s.filter(e=>typeof e=="string"&&!!e):[]}function al(s,e){let t=s.event();if(!t)return te("not_loaded","The seat map has not finished loading.");let i=s.selectionLimits();return{ok:!0,event:t,selection:{max:i.max,...i.required!=null?{required:i.required}:{}},categories:s.categories(),zones:s.zones(),hasPremiumSeats:s.hasPremiumSeats(),holdsAllowed:e}}function Jr(s,e){let t=r=>!!r&&r.toLowerCase()===e.toLowerCase(),i=s.find(r=>t(r.key??r.id))??s.find(r=>t(r.label));return i?.key??i?.id??null}function en(s,e){let t=e.map(i=>s.describeSeat(i.id));return{seatIds:e.map(i=>i.id),labels:e.map(i=>i.label),section:t[0]?.section??"",row:t[0]?.row??"",seats:e.map((i,r)=>t[r]?.seat||i.label),category:t[0]?.category??e[0].categoryKey,unitPrice:e[0].price,total:e.reduce((i,r)=>i+r.price,0)}}function ll(s,e,t){let i=new Map;for(let n of e){let o=i.get(n.rowKey);o?o.push(n):i.set(n.rowKey,[n])}let r=[];for(let n of i.values()){let o=[...n].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 p=a;p+t<=l;p+=t)r.push(en(s,o.slice(p,p+t)));a=l}}return r}function cl(s,e,t){let i=new Map;for(let n of e){let o=i.get(n.sectionKey);o?o.push(n):i.set(n.sectionKey,[n])}let r=[];for(let n of i.values()){if(n.length<t)continue;let o=[...n].sort((a,l)=>a.price!==l.price?l.price-a.price:a.rowKey.localeCompare(l.rowKey)||a.index-l.index);r.push(en(s,o.slice(0,t)))}return r}function dl(s,e){if(!s.event())return te("not_loaded","The seat map has not finished loading.");let i=s.selectionLimits(),r=Math.floor(Number(e.count));if(!Number.isInteger(r)||r<1||r>i.max)return te("bad_count",`count must be a whole number between 1 and ${i.max}.`);let n=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,p=l?Jr(s.categories(),l):null;if(l&&!p)return te("no_match",`No ticket type called "${l}".`);let d=c?Jr(s.zones(),c):null;if(c&&!d)return te("no_match",`No zone called "${c}".`);let m=s.seats().filter(h=>h.available);if(!m.length)return te("sold_out");let u=m.filter(h=>(!p||h.categoryKey===p)&&(!d||h.zoneId===d)&&(a==null||h.price<=a));if(!u.length)return te("no_match");let b=o?ll(s,u,r):cl(s,u,r);return b.length?(b.sort((h,y)=>y.unitPrice!==h.unitPrice?y.unitPrice-h.unitPrice:h.row.localeCompare(y.row)||h.labels[0].localeCompare(y.labels[0])),{ok:!0,groups:b.slice(0,n),searched:{count:r,filters:{...a!=null?{max_price:a}:{},...p?{category:p}:{},...d?{zone:d}:{},together:o}}}):te(o?"not_enough_together":"no_match")}function tn(s){return{ok:!0,...s.selection()}}function pl(s,e){let t=s.event();if(!t)return te("not_loaded","The seat map has not finished loading.");if(t.salesClosed)return te("event_closed","Sales are closed for this event.");let i=ol(e.seat_ids);return i.length?(s.clearSelection(),s.selectObjects(i),tn(s)):te("nothing_requested","Pass one or more seat ids or labels in seat_ids.")}function hl(s,e){let t=async r=>{try{return await r()}catch(n){return te("error",n instanceof Error?n.message:String(n))}},i=[{name:`${Et}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(()=>al(s,e))},{name:`${Et}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(()=>dl(s,r))},{name:`${Et}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(()=>pl(s,r))},{name:`${Et}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(()=>tn(s))}];return e&&i.push({name:`${Et}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(()=>s.hold())}),i}async function sn(s,e={}){let t=nl();if(!t||typeof t.registerTool!="function")return null;let i=new AbortController,r=hl(s,!!e.holds),n=[],o=e.exposedTo?.length?[...new Set(e.exposedTo)]:void 0;try{for(let a of r)await t.registerTool(a,{signal:i.signal,...o?{exposedTo:o}:{}}),n.push(a.name)}catch(a){console.warn("seatmap: WebMCP tools could not be registered",a)}return n.length?{names:n,dispose:()=>{if(i.abort(),typeof t.unregisterTool=="function")for(let a of n)try{t.unregisterTool(a)}catch{}}}:null}async function rn(s){let e=s.opts.webMcp;if(!e||s.destroyed)return;let t=typeof e=="object"&&!!e.holds,i=typeof e=="object"?e.exposedTo:void 0;try{s.webMcp=await sn(Yi(s,t),{holds:t,exposedTo:i}),s.destroyed&&Wi(s)}catch(r){console.warn("seatmap: WebMCP registration failed",r)}}function Wi(s){s.webMcp?.dispose(),s.webMcp=null}function Yi(s,e){let t=(i,r)=>{if(Number.isInteger(i.logicalSeatIndex))return i.logicalSeatIndex;let n=i.id.lastIndexOf(":"),o=n<0?NaN:Number(i.id.slice(n+1));return Number.isFinite(o)?o:r};return{event:()=>{let i=s.renderInfo;return i?{name:i.eventName??"",venue:i.venue??null,startsAt:i.startsAt??null,timezone:i.timezone??null,currency:s.currency,salesClosed:s.salesClosed}:null},selectionLimits:()=>({max:s.maxTickets,required:s.exactTickets}),categories:()=>{let i=s.controller.categoryAvailability();return(s.controller.doc?.categories??[]).filter(r=>!r.notForSale).map(r=>{let n=ni(s,r),o=ri(s,r);return{key:r.key,label:r.label??r.key,...o===void 0?{}:{price:o},...n&&n.min!==n.max?{priceRange:n}:{},available:i[r.key]??0}})},zones:()=>s.controller.getBestAvailableZones(),hasPremiumSeats:()=>s.controller.hasPremiumSeats(),seats:()=>{let i=s.controller.getActiveFloorId(),r=[];return s.allSeats().forEach((n,o)=>{if(n.floorId&&i&&n.floorId!==i)return;let a=s.controller.getStatus(n.id)??"free",l=s.controller.doc?.categories.find(p=>p.key===n.categoryKey),c=l?.tiers?.length?l.tiers[0].price:l?.price??0;r.push({id:n.id,label:n.label,rowKey:n.logicalRowId??n.rowId,sectionKey:n.sectionId??n.rowId,index:t(n,o),categoryKey:n.categoryKey,price:s.paidPrice(n.categoryKey,l?.tiers?.[0]?.id??null,c,n.label),...n.zoneId?{zoneId:n.zoneId}:{},available:a==="free"&&!l?.notForSale})}),r},describeSeat:i=>{let r=s.controller.seatDetails(i);return r?{section:r.sectionLabel??"",row:q(r)??"",seat:r.seatNumber??r.label,category:r.categoryLabel??r.categoryKey}:null},selection:()=>{let{freshSeats:i,total:r,count:n}=si(s);return{seats:i.map(o=>({id:o.id,label:o.label,section:o.sectionLabel??"",row:q(o)??"",seat:o.seatNumber??o.label,category:o.categoryKey,price:s.paidPrice(o.categoryKey,o.tierId??null,o.price,o.label)})),count:n,total:r,currency:s.currency,hold:s.hold?{id:s.hold.holdId,expiresAt:s.hold.expiresAt}:null,validity:s.getSelectionValidity()}},clearSelection:()=>s.clearSelection(),selectObjects:i=>{s.selectObjects(i)},hold:()=>e?ul(s):Promise.resolve({ok:!1,reason:"not_allowed"})}}async function ul(s){if(s.salesClosed)return{ok:!1,reason:"event_closed"};if(!s.totalTicketCount())return{ok:!1,reason:"nothing_selected"};let e=s.controller.getSelectionValidity(s.totalTicketCount());return e&&!e.isValid?{ok:!1,reason:"invalid_selection"}:(await s.handleCta(),s.hold?{ok:!0,hold:{id:s.hold.holdId,expiresAt:s.hold.expiresAt}}:{ok:!1,reason:"hold_failed"})}function At(s){if(!s)return null;let e=s.getBoundingClientRect();return e.width>0&&e.height>0?e:null}function ml(s){return At(s.peek?.querySelector(".sl-peek-sum"))??At(s.foot?.querySelector(".sl-total"))??At(s.tray)??At(s.sheetHead)}function Xi(s,e,t,i){let r=s,n=r.map;if(!n||!e)return;let o=n.getBoundingClientRect(),a={x:o.left+e.x,y:o.top+e.y},l=t.displayLabel??t.label,c=i?.find(d=>d.key===t.categoryKey)?.color,p=()=>{let d=ml(r);d&&Is({from:a,to:{x:d.left+d.width/2,y:d.top+d.height/2},label:l,color:c})};At(r.peek)?requestAnimationFrame(p):p()}var Qi=60,fl=650;function nn(s,e){if(!e.length)return;e.forEach((n,o)=>{s.schedule(()=>s.pop(n.id),o*Qi)});let t=e.length*Qi,i=e.find(n=>n.sectionId)?.sectionId;if(i){let n=e.filter(a=>a.sectionId===i),o={x:n.reduce((a,l)=>a+l.x,0)/n.length,y:n.reduce((a,l)=>a+l.y,0)/n.length};s.schedule(()=>s.focus(i,o),t)}let r=t+(i?fl:0);e.forEach((n,o)=>{s.schedule(()=>Xi(s.regions,s.screenPoint(n),n,s.categories),r+o*Qi)})}function Zi(s){return{renderingTimeMillis:s.ms,performanceProfile:s.performanceProfile,seatCount:s.seatCount,objectCount:s.objectCount,sectionCount:s.sectionCount,view:s.view,eventKey:s.eventKey,chartName:s.chartName,floorCount:s.floorCount,transport:s.transport,load:s.load,metricScope:s.metricScope,operationalTelemetryReporter:"sdk"}}function on(s,e){xe({apiBase:s.apiBase,event:s.eventKey,scope:s.metricScope,surface:s.surface,outcome:"success",ms:s.ms,performanceProfile:s.performanceProfile,chartDelivery:s.chartDelivery,seats:s.seatCount,floors:s.floorCount,view:s.view,load:s.load,transport:s.transport}),e("chart_rendered",Zi(s))}import{seatConfidenceDisclosure as gl}from"@seatlayer/core/core/seatConfidence";function W(s){return String(s??"").replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}function an(s){let e=gl(s.seat.confidenceEvidence),t=s.seat.confidenceEvidence,i=e.limitations.length?`<h4>Known limits</h4><ul>${e.limitations.map(c=>`<li>${W(c)}</li>`).join("")}</ul>`:"",r=e.modeledTarget?`<div><dt>Modeled target</dt><dd>${W(e.modeledTarget)}</dd></div>`:"",n=t?`<div><dt>Evidence ID</dt><dd>${W(t.evidenceId)}</dd></div><div><dt>Model version</dt><dd>${W(t.modelVersion)}</dd></div><div><dt>Event configuration</dt><dd>${W(t.eventConfigurationId??"Not configuration-specific")}</dd></div><div><dt>Approval</dt><dd>${W(t.approvedByRole??"No external approval supplied")}</dd></div>`+(t.validUntil?`<div><dt>Valid until</dt><dd>${W(t.validUntil.slice(0,10))}</dd></div>`:""):"<div><dt>Evidence ID</dt><dd>None supplied</dd></div>",o=we(s.seat.commercial)||s.restrictionFallback,a=`<div><dt>View restriction</dt><dd>${W(o)}</dd></div>`+(s.seat.commercial?.note?`<div><dt>Organizer note</dt><dd>${W(s.seat.commercial.note)}</dd></div>`:""),l=s.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">${W(s.title)}</strong></div><button type="button" data-close aria-label="Close seat confidence passport">\xD7</button></header><div class="sl-view3d-passport-summary"><strong>${W(e.headline)}</strong><span>${W(e.coverage)} \xB7 ${W(e.freshness)}</span></div><dl><div><dt>Model status</dt><dd>${W(e.model)}</dd></div><div><dt>Reality evidence</dt><dd>${W(e.reality)}</dd></div><div><dt>Source</dt><dd>${W(e.provenance)}</dd></div>`+a+r+n+`</dl>${i}<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 ln(s){return s?s.closest("[data-report]")?"report":s.closest("[data-close]")||s.classList.contains("sl-view3d-passport-scrim")?"close":null:null}function oi(s,e,t){let i=s?.querySelector("[data-report]"),r=s?.querySelector("[data-report-status]");i&&(i.disabled=e!=="failed",i.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 Ji(s,e,t=null){let i=s.view3dEl;if(!i)return;Pt(s,!1);let r=e.confidenceEvidence,n=s.controller.seatDetails(e.id),o=document.createElement("div");o.className="sl-view3d-passport-shell",o.innerHTML=an({seat:e,title:n?.displayLabel??e.displayLabel??e.label,restrictionFallback:s.tf("picker.noAuthoredRestriction","No organizer-authored restriction"),canReport:typeof s.api.reportViewEvidence=="function"});let a=[...new Set([...i.children,...[...s.els.map.children].filter(m=>m!==i)])].filter(m=>m instanceof HTMLElement),l=a.map(m=>({element:m,inert:m.inert,ariaHidden:m.getAttribute("aria-hidden")}));for(let m of a)m.inert=!0,m.setAttribute("aria-hidden","true");i.appendChild(o),i.classList.add("has-passport"),s.view3dPassportEl=o;let c=o.querySelector(".sl-view3d-passport"),p=()=>[...c.querySelectorAll('button:not(:disabled),[href],[tabindex]:not([tabindex="-1"])')],d=m=>{if(m.key==="Escape"){m.preventDefault(),m.stopPropagation(),m.stopImmediatePropagation(),Pt(s);return}if(m.key!=="Tab")return;let u=p();if(!u.length)return;let b=u[0],h=u[u.length-1];m.shiftKey&&document.activeElement===b?(m.preventDefault(),h.focus()):!m.shiftKey&&document.activeElement===h&&(m.preventDefault(),b.focus())};window.addEventListener("keydown",d,!0),s.view3dPassportCleanup=()=>{window.removeEventListener("keydown",d,!0);for(let h of l)h.element.inert=h.inert,h.ariaHidden===null?h.element.removeAttribute("aria-hidden"):h.element.setAttribute("aria-hidden",h.ariaHidden);let m=t?.isConnected?t:s.confirmEl?.querySelector(".sl-confirm-confidence")??s.view3dCompareEl?.querySelector("[data-passport-seat]")??null,u=m?.closest(".sl-confirm,.sl-view3d-compare");u?.isConnected&&(u.inert=!1,u.removeAttribute("aria-hidden")),o.remove(),i.classList.remove("has-passport"),s.view3dPassportEl===o&&(s.view3dPassportEl=null);let b=m??s.view3dCompareEl?.querySelector("[data-passport-seat]")??s.confirmEl?.querySelector(".sl-confirm-confidence")??s.view3dCompareChip.mainButton();(t?.isConnected?t:b)?.focus()},o.addEventListener("click",m=>{let u=ln(m.target instanceof HTMLElement?m.target:null);u==="close"&&Pt(s),u==="report"&&bl(s,e)}),requestAnimationFrame(()=>p()[0]?.focus()),s.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 bl(s,e){if(s.api.reportViewEvidence){oi(s.view3dPassportEl,"sending");try{let t=await s.api.reportViewEvidence(s.opts.event,{seatId:e.id,evidenceId:e.confidenceEvidence?.evidenceId});s.emit3dAnalytics("3d_confidence_view_reported",{seatId:e.id,evidenceId:e.confidenceEvidence?.evidenceId??null}),oi(s.view3dPassportEl,"received",t.report.id)}catch{oi(s.view3dPassportEl,"failed")}}}function Pt(s,e=!0){let t=s.view3dPassportCleanup;if(s.view3dPassportCleanup=null,!t){s.view3dPassportEl?.remove(),s.view3dPassportEl=null,s.view3dEl?.classList.remove("has-passport");return}e||(document.activeElement instanceof HTMLElement?document.activeElement:null)?.blur(),t(),e||s.root?.focus({preventScroll:!0})}function cn(s){let e=s.view3dEl;if(!e||s.view3dCompareSeatIds.length<2)return;Ve(s,!1);let t=s.view3dCompareSeatIds.map(u=>s.view3dComparisonSnapshot(u)).filter(u=>!!u);if(t.length<2){s.clearView3dComparison();return}let i=u=>k(u),r=t.some(u=>!!u.price),n=document.createElement("div");n.className="sl-view3d-compare-shell";let o=t.map((u,b)=>`<article><span>Seat ${b===0?"A":"B"}</span><strong>${i(u.label)}</strong><small>Section ${i(u.section)} \xB7 Row ${i(u.row)}</small><dl>`+(r?`<div><dt>Current price</dt><dd>${i(u.price)}</dd></div>`:"")+`<div><dt>Ticket type</dt><dd>${i(u.category)}</dd></div><div><dt>Availability</dt><dd>${i(u.availability)}</dd></div><div><dt>View source</dt><dd>${i(u.viewSource)}</dd></div><div><dt>View restriction</dt><dd>${i(u.limited)}</dd></div><div><dt>Seat confidence</dt><dd>${i(u.confidence.headline)}</dd></div><div><dt>Reality check</dt><dd>${i(u.confidence.reality)}</dd></div><div><dt>Accessibility</dt><dd>${i(u.accessibility)}</dd></div></dl><div class="sl-view3d-compare-actions"><button type="button" data-passport-seat="${i(u.seat.id)}">Passport</button><button type="button" data-view-seat="${i(u.seat.id)}">View seat</button><button type="button" class="select" data-select-seat="${i(u.seat.id)}"${u.selectable?"":" disabled"}>Select seat</button></div></article>`).join("");n.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(u=>u instanceof HTMLElement),c=l.map(u=>({element:u,inert:u.inert,ariaHidden:u.getAttribute("aria-hidden")}));for(let u of l)u.inert=!0,u.setAttribute("aria-hidden","true");e.appendChild(n),e.classList.add("has-comparison"),s.view3dCompareEl=n;let p=n.querySelector(".sl-view3d-compare"),d=()=>[...p.querySelectorAll('button:not(:disabled),[href],[tabindex]:not([tabindex="-1"])')],m=u=>{if(u.key==="Escape"){u.preventDefault(),Ve(s);return}if(u.key!=="Tab")return;let b=d();if(!b.length)return;let h=b[0],y=b[b.length-1];u.shiftKey&&document.activeElement===h?(u.preventDefault(),y.focus()):!u.shiftKey&&document.activeElement===y&&(u.preventDefault(),h.focus())};window.addEventListener("keydown",m),s.view3dCompareCleanup=()=>{window.removeEventListener("keydown",m);for(let u of c)u.element.inert=u.inert,u.ariaHidden===null?u.element.removeAttribute("aria-hidden"):u.element.setAttribute("aria-hidden",u.ariaHidden);n.remove(),e.classList.remove("has-comparison"),s.view3dCompareEl===n&&(s.view3dCompareEl=null),a?.isConnected?a.focus():s.view3dCompareChip.mainButton()?.focus()},n.querySelector("[data-close]")?.addEventListener("click",()=>Ve(s)),n.querySelectorAll("[data-passport-seat]").forEach(u=>u.addEventListener("click",()=>{let b=u.dataset.passportSeat,h=b?s.allSeats().find(y=>y.id===b):void 0;h&&Ji(s,h,u)})),n.querySelectorAll("[data-view-seat]").forEach(u=>u.addEventListener("click",()=>{let b=u.dataset.viewSeat;Ve(s,!1),b&&s.view3dHandle?.flyToSeat(b)})),n.querySelectorAll("[data-select-seat]").forEach(u=>u.addEventListener("click",()=>{let b=u.dataset.selectSeat;b&&vl(s,b)})),requestAnimationFrame(()=>d()[0]?.focus()),s.emit3dAnalytics("3d_comparison_opened",{seatIds:s.view3dCompareSeatIds.slice()})}function Ve(s,e=!0){let t=s.view3dCompareCleanup;if(s.view3dCompareCleanup=null,!t){s.view3dCompareEl?.remove(),s.view3dCompareEl=null,s.view3dEl?.classList.remove("has-comparison");return}e||(document.activeElement instanceof HTMLElement?document.activeElement:null)?.blur(),t(),e||s.root?.focus({preventScroll:!0})}function vl(s,e){if(s.salesClosed){s.toast(s.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}let t=s.allSeats().find(r=>r.id===e);if(!t)return;if(Ve(s,!1),!s.controller.select([e]).length){s.syncSelectionTo3d(),s.toast(s.tf("picker.seatNoLongerAvailable","That seat is no longer available."),"warning");return}s.syncSelectionTo3d(),s.showConfirm(t),s.emit3dAnalytics("3d_comparison_selected",{seatId:e})}function dn(s,e){s.querySelector(".sl-view3d-unavailable")?.remove();let{tf:t}=e,i=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 n=document.createElement("span");n.className="sl-view3d-unavailable-eyebrow",n.textContent=e.location;let o=document.createElement("strong");o.textContent=i.title;let a=document.createElement("div");a.className="sl-view3d-unavailable-copy",a.append(n,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=i.message,r.append(a,l,c),l.addEventListener("click",()=>es(s)),s.appendChild(r),Ft(r,e.anchor??null)}function es(s){let e=s?.querySelector(".sl-view3d-unavailable:not([data-leaving])");e&&(e.dataset.leaving="true",Le(e))}import{t as ai}from"@seatlayer/core";function pn(s){return Array.isArray(s)?s.reduce((e,t)=>t.type==="minimumSelectedPlaces"?Math.max(e,t.minimum):e,0):0}function ts(s,e,t=!1){let i=s.violations[0];return i==="numberOfPlacesToSelect"?s.remaining>0?ai("picker.selectExactMore",{count:s.remaining}):ai("picker.selectExactCount",{count:s.required}):i==="minimumSelectedPlaces"?ai("picker.selectMinimumMore",{count:s.remaining}):t?e("picker.adjustSeatSelection","Adjust seat selection"):i==="consecutiveSeats"?e("picker.selectSeatsTogether","Choose seats together in the same row and ticket category."):ai("picker.orphanHint")}import{t as Ne,tCount as hn}from"@seatlayer/core";function Mt(s){let e=Math.max(0,s),t=Math.floor(e/6e4),i=String(Math.floor(e%6e4/1e3)).padStart(2,"0");return`${t}:${i}`}function un(s){let e=s.performanceLabel?`<div class="sl-chip-when">${R(s.performanceLabel)}</div>`:"",t=s.performanceDates?.labels.length?`<div class="sl-chip-dates"><span class="sl-chip-dates-summary">${R(s.performanceDates.summary)}</span><span class="sl-chip-date-list">${s.performanceDates.labels.map(i=>`<span class="sl-chip-date">${R(i)}</span>`).join("")}</span></div>`:"";return e+yl(s)+t}function yl({d:s,area:e,label:t,objectType:i,quantity:r=1,identity:n}){let o=p=>String(p??"\u2014").replace(/[&<>"]/g,d=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[d]),a=i==="ga"?"ga":s?.objectType??i,l=n?.displayType?.trim()||s?.displayType?.trim()||e?.displayType?.trim()||(a==="table"?v("picker.table","Table"):a==="booth"?v("picker.booth","Booth"):a==="ga"?v("picker.generalAdmission","General admission"):v("picker.row","Row")),c=n?.rowLabel??n?.displayLabel??s?.rowLabel??s?.displayLabel??e?.displayLabel??e?.label??t;return a==="table"&&n?.bookingMode?`<div class="sl-chip-id"><span class="fld sec"><span class="sl-chip-eb">${o(l)}</span><span class="val">${o(c)}</span></span><span class="fld mid"><span class="sl-chip-eb">${v("picker.guests","Guests")}</span><span class="val">${r}</span></span></div>`:a==="ga"?`<div class="sl-chip-id"><span class="fld sec"><span class="sl-chip-eb">${o(l)}</span><span class="val">${o(c)}</span></span>`+(r>1?`<span class="fld mid"><span class="sl-chip-eb">${v("picker.tickets","Tickets")}</span><span class="val">${r}</span></span>`:"")+"</div>":a==="booth"?'<div class="sl-chip-id">'+(s?.sectionLabel?`<span class="fld sec"><span class="sl-chip-eb">${v("picker.section","Section")}</span><span class="val">${o(s.sectionLabel)}</span></span>`:"")+`<span class="fld mid"><span class="sl-chip-eb">${o(l)}</span><span class="val">${o(c)}</span></span></div>`:!s?.sectionLabel&&!s?.rowLabel&&!s?.seatNumber?`<div class="sl-chip-id"><span class="fld sec"><span class="sl-chip-eb">${v("picker.seat","Seat")}</span><span class="val">${o(c)}</span></span></div>`:'<div class="sl-chip-id">'+(s.sectionLabel?`<span class="fld sec"><span class="sl-chip-eb">${v("picker.section","Section")}</span><span class="val">${o(s.sectionLabel)}</span></span>`:"")+(s.rowLabel?`<span class="fld mid"><span class="sl-chip-eb">${o(l)}</span><span class="val">${o(q(s))}</span></span>`:"")+(s.seatNumber?`<span class="fld mid"><span class="sl-chip-eb">${v("picker.seat","Seat")}</span><span class="val">${o(s.seatNumber)}</span></span>`:"")+"</div>"}function is(s,e){let t=R(s),i=e?R(e):"";return`<div class="sl-chip-rail"><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>`+(e?`<button type="button" class="view" data-view-label="${i}" aria-label="${R(Ne("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>`:"")+"</div>"}function mn(s){return s.salesClosed||s.hasHold||s.ctaPhase!=="idle"||s.formOpen||s.room<=0?null:Math.max(1,Math.min(s.wanted,s.room))}function fn({count:s,total:e,pendingCount:t,ctaPhase:i,hasHold:r,salesClosed:n,suppressPricing:o=!1,fromPrice:a,addMore:l,holdTime:c,money:p}){return s&&i==="holding"?`<span>${v("picker.securingSeats","Securing your seats\u2026")}</span>`:s&&i==="checkout"?o?`<span>${v("picker.seatsSecuredOpeningCheckout","Seats secured. Opening checkout\u2026")}</span>`:`<span>${Ne("picker.peekSecured",{count:s,total:p(e)})}</span>`:s?`<span class="sl-peek-sum">${hn("picker.ticketsCount",s)}</span>`+(l&&!o?`<button type="button" class="go ghost sl-sheet-go sl-sheet-best" data-act="best" aria-label="${v("picker.findTogetherInstead","Find seats together instead")}">\u2726</button>`:"")+`<button type="button" class="go sl-sheet-go" data-act="checkout">${r&&t?v("picker.secureMore","Secure more"):v("picker.continue","Continue")}`+(o?"":`<span class="sl-peek-total">${p(e)}</span>`)+(r&&c?`<span class="sl-peek-time" aria-hidden="true">${c}</span>`:"")+"</button>":n?`<span>${v("picker.salesClosedPill","Sales are closed")}</span>`:!o&&a!=null?`<span>${Ne("picker.peekFromPrice",{price:p(a)})}</span>`:`<span>${v("picker.pickYourSeats","Pick your seats")}</span>`}function ss(s,e=Date.now()){return Ne("picker.holdReassurance",{time:Mt(s-e)})}function gn(s){return s.confirming?`<div class="sl-ba" role="alert"><div class="sl-ba-title"><span class="spark" aria-hidden="true">\u2726</span>${v("picker.replaceCurrentChoices","Replace your current choices?")}</div><div class="sl-ba-replace"><b>${Ne("picker.willFindSeatsTogether",{count:s.quantity})}</b><span>${v("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>${v("picker.keepMine","Keep mine")}</button><button type="button" class="replace" data-ba-replace>${v("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>${v("picker.findBestSeatsTogether","Find the best seats together")}</div><div class="sl-ba-copy"><span class="wide">${v("picker.willChooseClosestGroup","We\u2019ll choose the closest available group for you.")}</span><span class="narrow">${v("picker.closestGroupChosenInstantly","Closest available group, chosen instantly.")}</span></div>`+(s.offerPremium?`<button type="button" class="sl-ba-premium${s.premium?" on":""}" data-ba-premium aria-pressed="${s.premium?"true":"false"}"><span class="star" aria-hidden="true">\u2605</span>${v("picker.bestSeatsPremium","Best seats")}</button>`:"")+(s.categories.length>1?`<select aria-label="${R(v("picker.preferredTicketType","Preferred ticket type"))}" data-ba-cat><option value="">${R(v("picker.anyTicketType","Any ticket type"))}</option>`+s.categories.map(e=>`<option value="${R(e.key)}"${s.selectedCategory===e.key?" selected":""}>${R(e.label)}</option>`).join("")+"</select>":'<span aria-hidden="true"></span>')+(s.zones.length?`<select aria-label="${v("picker.preferredVenueZone","Preferred venue zone")}" data-ba-zone><option value="">${v("picker.anyVenueZone","Any venue zone")}</option>`+s.zones.map(e=>`<option value="${R(e.id)}"${s.selectedZone===e.id?" selected":""}>${R(e.label)}</option>`).join("")+"</select>":"")+`<div class="sl-ba-qty"><button type="button" data-ba="-1" aria-label="${v("picker.fewerSeats","Fewer seats")}">\u2212</button><span>${s.quantity}</span><button type="button" data-ba="1" aria-label="${v("picker.moreSeats","More seats")}">+</button></div><button type="button" class="sl-ba-go${s.busy?" sl-busy":""}"${s.busy?" disabled":""}>`+(s.busy?`<span class="sl-ba-spin" aria-hidden="true"></span>${v("picker.findingBestSeats","Finding the best seats\u2026")}`:hn("picker.findBestSeatsCount",s.quantity))+"</button>"+(s.reopened?`<button type="button" class="sl-ba-back" data-ba-close>${v("picker.keepMyPicks","Keep my picks")}</button>`:"")+"</div>"}function bn(s){if(s.salesClosed&&!s.hasPicks){let e=s.whenText?`<span class="when">${R(s.whenText)}</span>`:"";return`<div class="sl-closed-note" role="status"><b>${v("picker.salesClosedPill","Sales are closed")}</b><span>${v("picker.salesClosedCopy","Ticket sales for this event have ended.")}${e}</span></div>`}return s.hasPicks?"":s.hasGaAreas?`<div class="sl-tray-hint">${s.seated?s.venue3d?v("picker.trayHintChoose3dOrStanding","Choose a seat in the 3D venue \u2014 or grab standing tickets below."):v("picker.trayHintTapOrStanding","Tap a seat on the map \u2014 or grab standing tickets below."):s.venue3d?v("picker.gaTrayHintChoose3dArea","Choose an area in the 3D venue to select tickets."):v("picker.gaTrayHintTapArea","Tap an area on the map to choose tickets.")}</div>`:`<div class="sl-tray-hint">${s.groupMode==="per_performance"?v("picker.groupPerPerformanceTrayHint","Choose seats for this performance, then complete every date above."):s.groupMode?v("picker.groupTrayHint","Choose seats once \u2014 the same seats will be held for every performance."):s.venue3d?v("picker.trayHintChoose3dOrBest","Choose a seat in the 3D venue, or let us pick the best available for you."):v("picker.trayHintTapOrBest","Tap a seat on the map, or let us pick the best available for you.")}</div>`}function vn(s){return{title:Ne("picker.securedCount",{count:s.secured}),copy:s.pendingCount?Ne("picker.moreSelectedCount",{count:s.pendingCount}):ss(s.expiresAt),change:s.releasing?v("picker.releasingEllipsis","Releasing\u2026"):v("picker.change","Change")}}import{t as yn,tCount as xl}from"@seatlayer/core";var rs=4,wl=6;function kl(s){let e=s.trim();return/^[0-9]{1,4}$/.test(e)?Number(e):null}function xn(s){return[s.held?"h":"s",s.section,s.rowLabel,s.categoryLabel,s.amountText].join(" ")}function Sl(s){if(s.length===1)return s[0];let e=s.map(kl);if(e.every(i=>i!==null)){let i=[...e].sort((o,a)=>o-a);if(i.every((o,a)=>a===0||o===i[a-1]+1))return`${i[0]}\u2013${i[i.length-1]}`;let n=i.slice(0,3).join(", ");return i.length>3?`${n} +${i.length-3}`:n}let t=s.slice(0,3).join(", ");return s.length>3?`${t} +${s.length-3}`:t}function Tl(s){let e=[];for(let t of s){let i=e[e.length-1];!!i&&t.groupable&&i.members[0].groupable&&xn(i.members[0])===xn(t)?i.members.push(t):e.push({members:[t],seatsLabel:""})}for(let t of e)t.seatsLabel=Sl(t.members.map(i=>i.seatLabel));return e}function kn(s,e,t,i){let r=R;return` data-key="${r(s)}"`+(t.length?` data-held="${r(encodeURIComponent(t.join(`
2255
- `)))}"`:"")+(e.length?` data-seat="${r(e.join(" "))}"`:"")+(i?` data-locate="${r(i)}"`:"")}function Sn(s){let e=R;return`<div class="sl-chip${s.held?" sl-held":""}${s.fresh?" sl-enter":""}"`+kn(s.key,s.seatIds,s.heldLabels,s.locateId)+`><div class="sl-chip-main">${s.identityHtml}<div class="sl-chip-sub">${s.stateHtml}<span class="cat">${e(s.categoryLabel)}</span>${s.extrasHtml}`+(s.amountText?`<span class="amt">${e(s.amountText)}</span>`:"")+`</div>${s.noteHtml}</div>${s.railHtml}</div>`}function wn(s,e,t,i,r){let n=R,o=e?.members.length??1,a=o>1,l=e?e.seatsLabel:s.seatLabel,c=e?e.members.reduce((m,u)=>m+u.amount,0):s.amount,p=e?e.members.flatMap(m=>m.seatIds):s.seatIds,d=e?e.members.flatMap(m=>m.heldLabels):s.heldLabels;return`<div class="sl-chip sl-tline${s.held?" sl-held":""}${s.fresh?" sl-enter":""}${e?"":" sl-tsub"}"${i?' data-overflow="true"':""}`+(e?` data-run="${t}"`:` data-run-of="${t}"`)+kn(s.key,p,d,s.locateId)+">"+(a?`<button type="button" class="sl-trun-toggle" aria-expanded="false" aria-label="${n(xl("picker.seatsSelectedCount",o))}"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M9 6l6 6-6 6"/></svg></button>`:s.held?s.stateHtml:`<span class="sl-tline-dot" style="background:${k(s.categoryColor)}" aria-hidden="true"></span>`)+`<span class="sl-sr">${n(s.categoryLabel)}</span><span class="sl-tline-id"><b>${n(s.section||s.seatLabel)}</b>`+(s.rowLabel?`<i>\xB7</i><span>${n(s.rowLabel)}</span>`:"")+(s.section&&l?`<i>\xB7</i><span>${n(l)}</span>`:"")+"</span>"+s.extrasHtml+(r.suppressPricing||!s.amountText?"":(a?`<span class="sl-tline-mult">${o}\xD7</span>`:"")+`<span class="amt">${n(r.money(c))}</span>`)+(s.railHtml?`<button type="button" class="rm" aria-label="${n(s.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 Tn(s,e){if(!s.length)return"";let t=Tl(s),i=[v("picker.section","Section"),v("picker.row","Row"),v("picker.seat","Seat")].join(" \xB7 "),r=t.length>=wl,n=t.map((a,l)=>{let c=r&&l>=rs;return wn(a.members[0],a,l,c,e)+(a.members.length>1?a.members.map(p=>wn(p,null,l,c,e)).join(""):"")}).join(""),o=r?`<button type="button" class="sl-tmore" data-tmore aria-expanded="false" data-more="${R(yn("picker.moreCount",{count:t.length-rs}))}" data-less="${R(v("picker.showLess","Show less"))}"><span>${R(yn("picker.moreCount",{count:t.length-rs}))}</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">${R(i)}</div>${n}${o}</div>`}function Cn(s){s.dataset.denseWired!=="true"&&(s.dataset.denseWired="true",s.addEventListener("click",e=>{let t=e.target,i=t.closest("[data-tmore]");if(i){let l=i.closest(".sl-tlist"),c=l?.getAttribute("data-collapsed")==="true";l?.setAttribute("data-collapsed",c?"false":"true"),i.setAttribute("aria-expanded",c?"true":"false");let p=i.querySelector("span");p&&(p.textContent=(c?i.dataset.less:i.dataset.more)??p.textContent);return}let r=t.closest(".sl-trun-toggle");if(!r)return;e.stopPropagation();let n=r.closest(".sl-tline"),o=n?.dataset.run;if(!n||o===void 0)return;let a=r.getAttribute("aria-expanded")!=="true";r.setAttribute("aria-expanded",a?"true":"false"),n.setAttribute("data-open",a?"true":"false"),n.parentElement?.querySelectorAll(`.sl-tsub[data-run-of="${o}"]`).forEach(l=>l.setAttribute("data-open",a?"true":"false"))}))}import{ACCESSIBILITY_TYPES as En,t as An}from"@seatlayer/core";var li=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"),this.button.setAttribute("aria-label",t.tf("picker.accessibilityOptions","Accessibility and colour options")),this.button.innerHTML='<span aria-hidden="true">\u267F</span>',this.menu=document.createElement("div"),this.menu.className="sl-a11ymenu",this.menu.hidden=!0;for(let i of this.stored())this.offeredFree().has(i)&&this.active.add(i);this.menu.innerHTML=zr(this.rows()),this.root.append(this.menu,this.button),e.appendChild(this.root),this.button.addEventListener("click",i=>{i.stopPropagation(),this.open(this.menu.hidden)}),this.menu.addEventListener("pointerdown",i=>i.stopPropagation()),this.menu.addEventListener("click",i=>i.stopPropagation()),this.dismiss=()=>this.open(!1),this.escape=i=>{i.key==="Escape"&&this.open(!1)},document.addEventListener("pointerdown",this.dismiss),document.addEventListener("keydown",this.escape),this.wire(),this.active.size&&this.applyFilter()}colorblindRow(){return this.menu.querySelector(".sl-cbbtn")}syncCounts(){let e=new Map(this.offered().map(({key:i,count:r})=>[i,r])),t=!1;for(let i of this.menu.querySelectorAll("[data-a11y-row]")){let r=i.dataset.a11yRow??"";if(!r.startsWith("a11y:"))continue;let n=r.slice(5),o=e.get(n);if(o===void 0)continue;let a=i.querySelector(".sl-a11yrow-c");a&&(a.textContent=o==null?"":o>0?An("picker.accessFreeCount",{count:o}):this.deps.tf("picker.accessNoneLeft","None left"));let l=o===0;i.disabled=l,l?i.setAttribute("aria-disabled","true"):i.removeAttribute("aria-disabled"),l&&this.active.delete(n)&&(this.paint(i,!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 i=t.dataset.a11yRow??"";i.startsWith("a11y:")&&this.paint(t,this.active.has(i.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();Ci(this.menu,{x:t.left+t.width/2,y:t.top}),Ls(this.menu),Ft(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:i,count:r})=>({key:i,count:r}));let t=this.deps.present;return t?En.filter(({key:i})=>t.has(i)).map(({key:i})=>({key:i,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(En.map(i=>[i.key,i]));return this.offered().flatMap(({key:i,count:r})=>{let n=t.get(i);return n?[{key:`a11y:${i}`,icon:n.icon,label:n.label,...i==="wheelchair"&&e.has("companion")?{note:this.deps.tf("picker.companionSeatsNote","Companion places beside them stay selectable")}:{},...r==null?{}:{count:r>0?An("picker.accessFreeCount",{count:r}):this.deps.tf("picker.accessNoneLeft","None left"),disabled:r===0},on:this.active.has(i)}]:[]})}wire(){for(let e of this.menu.querySelectorAll("[data-a11y-row]"))e.addEventListener("click",()=>{let t=e.dataset.a11yRow??"";if(t==="colorblind"){let n=!this.deps.isColorblindSafe();this.deps.setColorblindSafe(n),this.paint(e,n);return}if(t==="limited"){let n=!this.deps.isLimitedViewHidden();this.deps.setLimitedViewHidden(n),n&&this.deps.focusSeatsForFilter(),this.paint(e,n);return}let i=t.slice(5),r=!this.active.has(i);r?this.active.add(i):this.active.delete(i),this.paint(e,r),this.applyFilter()})}paint(e,t){e.classList.toggle("on",t),e.setAttribute("aria-checked",String(t)),e.setAttribute("aria-pressed",String(t))}applyFilter(){let e=this.active.size?[...this.active]:null;this.deps.applyAccessibilityFilter(e),this.remember(e),e&&this.deps.focusSeatsForFilter()}key(){return`seatmap.a11y.filter.${this.deps.event}`}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{}}};import{attachVisibilityCatchUp as Cl}from"@seatlayer/core";var El=250;function Pn(s,e=El){let t=null,i=()=>{t===null&&(t=setTimeout(()=>{t=null,s()},e))},r=Cl(i),n=typeof window<"u"&&typeof window.addEventListener=="function";return n&&window.addEventListener("focus",i),()=>{t!==null&&(clearTimeout(t),t=null),r(),n&&window.removeEventListener("focus",i)}}import{holdRecoveryShape as Al,tCount as ci}from"@seatlayer/core";var di=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=Al(e),i=e.lapsedLabels.length,r=i-e.recoverable.length,n=t==="all"?ci("picker.holdLapsedStillFree",i):t==="partial"?ci("picker.holdLapsedSomeTaken",r):ci("picker.holdLapsedAllTaken",i);this.note={message:n,recoverable:t==="none"?[]:[...e.recoverable]},this.deps.toast(n,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>${R(this.actionLabel())}</button>`:"";return`<div class="sl-lapse-note" role="status"><span>${R(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 ci("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 Mn=Symbol("seatlayer.performance-group-picker");function pi(s,e){return Object.defineProperty(s,Mn,{configurable:!1,enumerable:!1,value:Object.freeze({...e})}),s}function Ln(s){return s[Mn]??null}import{t as Hn,tCount as hi}from"@seatlayer/core";function ns(s,e,t){try{return new Intl.DateTimeFormat(e,{...t,...s.timezone?{timeZone:s.timezone}:{}}).format(new Date(s.startsAt))}catch{return new Date(s.startsAt).toLocaleString(e)}}var ui=(s,e)=>ns(s,e,{dateStyle:"medium"}),mi=(s,e)=>ns(s,e,{timeStyle:"short"}),fi=(s,e)=>ns(s,e,{weekday:"short",day:"numeric",month:"short"});function In(s,e,t,i){return!s.length||s.length>=e?null:{summary:i,labels:s.map(r=>`${ui(r,t)} \xB7 ${mi(r,t)}`)}}function Pl(s,e){let t=new Set(e);return s.map(i=>({...i,free:!t.has(i.eventKey)}))}function Rn(s,e){let t=[...s];if(t.length<=1)return t[0]??"";try{return new Intl.ListFormat(e,{style:"long",type:"conjunction"}).format(t)}catch{return t.join(", ")}}function Ml(s,e,t="",i=!1){if(!s.length)return"";let r=s.map(n=>{let o=n.free?e.free:e.blocked,a=i&&n.free?`<input class="sl-night-choice" type="checkbox" data-pg-event-key="${k(n.eventKey)}" aria-label="${k(`${n.shortDate}: ${o}`)}" checked>`:"";return`<li class="sl-night${n.free?" ok":" no"}" aria-label="${k(`${n.shortDate}: ${o}`)}">`+a+`<i class="sl-night-dot" aria-hidden="true"></i><span class="d">${k(n.shortDate)}</span><span class="st">${k(o)}</span></li>`}).join("");return`<div class="sl-tip-nights"><div class="sl-tip-nights-title">${k(e.title)}</div><ul class="sl-nightstrip">${r}</ul><p class="sl-tip-nights-note">${k(e.notAvailableOn)}</p>`+t+"</div>"}function Ll(s){return s.selectPartialLabel&&s.pinned?`<button type="button" class="sl-tip-switch" data-pg-select-partial>${k(s.selectPartialLabel)}</button>`:s.switchLabel&&s.pinned?`<button type="button" class="sl-tip-switch" data-pg-switch-mode>${k(s.switchLabel)}</button>`:s.switchLabel||s.selectPartialLabel?"":`<p class="sl-tip-advice">${k(s.advice)}</p>`}function Hl(s){return Number(s.available)+Number(s.selected)+Number(s.partial)+Number(s.unavailable)}function On(s,e,t){if(Hl(s)<2)return"";let i=(n,o,a="")=>`<li class="sl-pg-legend-item"><i class="sl-pg-sw ${n}"${a}></i>${k(o)}</li>`,r=[];return s.available&&r.push(i("sl-pg-sw-free",e.available,` style="background:${k(t)}"`)),s.selected&&r.push(i("sl-pg-sw-sel",e.selected)),s.partial&&r.push(i("sl-pg-sw-split",e.partial,` style="--sl-pg-sw-cat:${k(t)}"`)),s.unavailable&&r.push(i("sl-pg-sw-off",e.unavailable)),`<ul class="sl-pg-legend-list" aria-label="${k(e.title)}">${r.join("")}</ul>`}function _n(s,e){if(!s.length)return"";let t=s.map(i=>{let r=i.labels.length?i.labels.join(", "):e.empty;return`<li class="sl-pg-night-row${i.labels.length?"":" empty"}${i.active?" active":""}" role="button" tabindex="0"${i.active?' aria-current="true"':""} data-event-key="${k(i.eventKey)}"><span class="n">${k(i.name)}</span><span class="s">${k(r)}</span></li>`}).join("");return`<div class="sl-pg-nights" role="group" aria-label="${k(e.title)}"><div class="sl-pg-nights-title">${k(e.title)}</div><ul class="sl-pg-nights-list">${t}</ul></div>`}function os(s,e){if(s?.kind!=="partial"||!e?.length)return null;let t=s.data?.blockedEventKeys??[],i=Pl(e,t);return{states:i,missing:i.filter(r=>!r.free).map(r=>r.shortDate)}}function Dn(s,e){return s?Ml(s.states,{title:v("picker.group.partlyAvailableTitle","Free on some nights only"),free:v("picker.group.nightFree","Free"),blocked:v("picker.group.nightBlocked","Not available"),notAvailableOn:Hn("picker.group.notAvailableOn",{dates:Rn(s.missing,e.locale)})},Ll({switchLabel:e.switchLabel??null,selectPartialLabel:e.selectPartialLabel??null,pinned:e.pinned,advice:v("picker.group.pickSeatFreeEveryNight","Pick a seat that is free every night.")}),!!e.selectPartialLabel&&!!e.pinned):""}function Il(s,e,t,i){if(!s.length)return"";let r=new Set(e),n=new Set(t),o=s.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="${k(a.eventKey)}" aria-label="${k(`${a.shortDate}: ${l?i.available:i.unavailable}`)}"${l&&n.has(a.eventKey)?" checked":""}${l?"":" disabled"}><span class="sl-confirm-date-label">${k(a.shortDate)}</span><span class="sl-confirm-date-state">${k(l?i.available:i.unavailable)}</span></label></li>`}).join("");return`<fieldset class="sl-confirm-dates" data-pg-confirm-dates><legend>${k(i.title)}</legend><p class="sl-confirm-dates-copy">${k(i.copy)}</p><label class="sl-confirm-date-all"><input type="checkbox" data-pg-confirm-all><span>${k(i.selectAll)}</span></label><ul>${o}</ul><p class="sl-confirm-dates-summary" data-pg-confirm-summary aria-live="polite"></p></fieldset>`}function Bn(s,e,t,i){let r=e.availableEventKeys(t);return Il(s,r,e.includedEventKeys(),{title:i("picker.group.confirmDatesTitle","Choose performance dates"),copy:r.length===s.length?i("picker.group.confirmAllDatesCopy","This seat is available for all {count} dates. Keep all selected, or remove dates you do not want.").replace("{count}",String(s.length)):i("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(s.length)),selectAll:i("picker.group.confirmSelectAll","Select all available dates"),available:i("picker.group.nightFree","Available"),unavailable:i("picker.group.nightBlocked","Unavailable")})}function $n(s){return[...s.querySelectorAll("[data-pg-confirm-event-key]")].filter(e=>e.checked&&!e.disabled).map(e=>e.dataset.pgConfirmEventKey).filter(Boolean)}function Vn(s,e,t,i){let r=[...s.querySelectorAll("[data-pg-confirm-event-key]")];if(!e||!r.length)return;let n=s.querySelector(".sl-confirm-add"),o=s.querySelector("[data-pg-confirm-all]"),a=()=>{let l=r.filter(d=>!d.disabled),c=$n(s).length;o&&(o.checked=c===l.length,o.indeterminate=c>0&&c<l.length);let p=s.querySelector("[data-pg-confirm-summary]");p&&(p.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))),n.disabled=c===0,n.textContent=c?e.label(c):t("picker.group.confirmChooseOne","Choose at least 1 date"),i()};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 Nn(s,e,t){if(!s||!t||!s.querySelector("[data-pg-confirm-event-key]"))return!0;let i=$n(s);if(!i.length)return!1;let r=s.querySelector(".sl-confirm-add");return r?.setAttribute("aria-busy","true"),r&&(r.disabled=!0),await t.apply(e,i)?!0:(r?.removeAttribute("aria-busy"),r?.isConnected&&(r.disabled=!1),!1)}function zn(s,e,t){return s?Hn("picker.group.seatPartlyAvailable",{label:e,free:s.states.length-s.missing.length,total:s.states.length,dates:Rn(s.missing,t)}):""}function Fn(s,e){let t=s.map((i,r)=>{let n=i.state==="done"?e.done:i.state==="current"?e.current:e.upcoming;return`<li class="sl-pg-step-item" data-step="${k(i.id)}" data-state="${k(i.state)}"${i.state==="current"?' aria-current="step"':""}><span class="i" aria-hidden="true">${i.state==="done"?"\u2713":String(r+1)}</span><span class="l">${k(i.label)}</span><span class="sl-pg-sr">${k(n)}</span></li>`}).join("");return`<ol class="sl-pg-steps" aria-label="${k(e.label)}">${t}</ol>`}function as(s,e){return`<ul class="sl-pg-cards">${s.map(i=>`<li class="sl-pg-card" data-event-key="${k(i.eventKey)}"><span class="n">${k(i.name)}</span><time datetime="${k(i.iso)}"><span class="d">${k(i.date)}</span><span class="t">${k(i.time)}</span></time></li>`).join("")}</ul><p class="sl-pg-included">${k(e)}</p>`}function jn(s){let e=s.rows.map(t=>`<li class="sl-pg-pane-row${t.labels.length?"":" empty"}" data-event-key="${k(t.eventKey)}"><span class="n">${k(t.name)}</span><span class="s">${k(t.labels.length?t.labels.join(", "):s.empty)}</span></li>`).join("");return`<div class="sl-pg-pane-title">${k(s.title)}</div><ul class="sl-pg-pane-list">${e}</ul>`+(s.note?`<p class="sl-pg-pane-note">${k(s.note)}</p>`:"")+(s.total?`<div class="sl-pg-pane-total"><span>${k(s.total.label)}</span><b>${k(s.total.amount)}</b></div>`:"")+(s.holdStatus?`<p class="sl-pg-hold-status" role="status">${k(s.holdStatus)}</p>`:"")}function Gn(s){let e=Math.max(0,s);return`${Math.floor(e/6e4)}:${String(Math.floor(e/1e3)%60).padStart(2,"0")}`}function qn(s,e){if(!s||s.seats<=0)return"";if(e==="same_seat"){let t=s.perPerformance??s.seats;return s.totalPerformances&&s.performances<s.totalPerformances?hi("picker.group.performancesChosenOf",t,{chosen:s.performances,total:s.totalPerformances}):hi("picker.group.seatsEveryPerformance",t)}return s.perPerformance!=null&&s.performancesChosen===s.performances?hi("picker.group.seatsPerPerformance",s.seats,{per:s.perPerformance}):hi("picker.group.performancesChosenOf",s.seats,{chosen:s.performancesChosen,total:s.performances})}function Kn(s,e){s.querySelectorAll(".sl-pg-night-row[data-event-key]").forEach(t=>{let i=()=>e(t.dataset.eventKey);t.addEventListener("click",i),t.addEventListener("keydown",r=>{r.key!=="Enter"&&r.key!==" "||(r.preventDefault(),i())})})}import{t as Rl}from"@seatlayer/core";function le(s){return String(s??"\u2014").replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[e])}function Ol(s,e){let t=s.objectType==="table"&&!!s.bookingMode,i=s.objectType==="booth",r=t||i||!s.seatNumber,n=r?s.rowLabel??s.displayLabel??s.label:s.seatNumber,o=t?`${v("picker.guests","Guests")} ${s.bookingMode==="variable"?`${s.minOccupancy}\u2013${s.maxOccupancy}`:s.capacity}`:!i&&s.rowLabel?`${e} ${q(s)??""}`.trim():"";return`<div class="sl-tip-head"><div class="sl-tip-id"><span class="sl-tip-seat${r?" name":""}">${le(n)}</span>`+(o?`<span class="sl-tip-row">${le(o)}</span>`:"")+"</div>"+(s.sectionLabel?`<div class="sl-tip-sec"><span class="sl-tip-eyebrow">${v("picker.section","Section")}</span><span class="sl-tip-secname">${le(s.sectionLabel)}</span></div>`:"")+"</div>"}function Un(s,e){let t=s.status==="not_for_sale",i=s.mark?.kind==="partial",r=s.status==="free"||i?"":`<span class="sl-tip-tag">${t?v("picker.notAvailable","Not available"):s.status==="held"?Rl("map.statusHeld"):v("picker.sold","Sold")}</span>`,n=t?"":e.price,o=n?`<span class="sl-tip-amt">${le(n)}</span>`:"",a=!n&&e.priceNote?`<div class="sl-tip-note">${le(e.priceNote)}</div>`:"",l=we(s.commercial),c=l?`<div class="sl-tip-cx"><span class="g" aria-hidden="true">\u25D0</span>${le(l)}</div>`:"",p=it(s.wheelchairSpaceType),d=p?`<div class="sl-tip-cx"><span class="g" aria-hidden="true">\u267F</span>${le(p)}</div>`:"",m=e.reason?`<div class="sl-tip-reason">${le(e.reason)}</div>`:"";return'<i class="sl-tip-rail" aria-hidden="true"></i>'+Ol(s,e.rowTypeWord)+`<div class="sl-tip-cat"><span class="sl-tip-dot" style="background:${le(s.categoryColor)}"></span><span class="sl-tip-name">${le(s.categoryLabel)}</span>`+r+o+"</div>"+a+m+d+c+(e.extra??"")}function Wn(s,e,t,i){let r=s.x+14,n=s.y-i.height-12,o=s.y+18,a=n;r+i.width>e-8&&(r=s.x-i.width-14),n<8&&o+i.height<=t-8&&(a=o);let l=Math.max(8,t-i.height-8);return{left:Math.max(8,Math.min(r,Math.max(8,e-i.width-8))),top:Math.max(8,Math.min(a,l))}}function Yn(s,e,t,i=22){let r=Math.max(8,Math.min(s.x-t.width/2,Math.max(8,e.width-t.width-8))),n=s.y-i-t.height,o=s.y+i;return n>=8?{left:r,top:n,placement:"above"}:o+t.height<=e.height-8?{left:r,top:o,placement:"below"}:{left:r,top:Math.max(8,Math.min(n<8?o:n,Math.max(8,e.height-t.height-8))),placement:n<8?"below":"above"}}function Qn(s,e,t,i){let r=t.width/2+12,n=Math.max(r,Math.min(e.width-r,s.x)),o=s.y+t.height+24<=e.height,a=s.y<t.height+24&&o?"below":"above",l=i&&a==="above"?Math.max(t.height+24,s.y):s.y;return{left:n,top:Math.max(8,Math.min(e.height-8,l)),placement:a}}function Xn(s,e,t){let i=s.querySelector("[data-pg-select-partial]"),r=[...s.querySelectorAll("[data-pg-event-key]")],n=()=>r.filter(a=>a.checked).map(a=>a.dataset.pgEventKey).filter(Boolean),o=()=>{if(!i)return;let a=n().length;i.disabled=a===0,i.textContent=e?.(a)??i.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())})}),i?.addEventListener("click",()=>{let a=n();a.length&&t?.(a)})}function st(s){let e=s?.displayType?.trim()||s?.rowType?.trim();return e||(s?.objectType==="table"?v("picker.table","Table"):s?.objectType==="booth"?v("picker.booth","Booth"):v("picker.row","Row"))}var Zn="@seatlayer/pending-checkout/v1";function _l(s){return typeof s=="string"&&s.length<=160&&/^ord_[A-Za-z0-9_-]+$/.test(s)}function Jn(s){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 i=null;try{let r=window.sessionStorage.getItem(Zn);if(r){let n=null;try{n=JSON.parse(r)}catch{}if(n&&_l(n.orderId)){let o=Date.now()-Number(n.storedAt);if(o>=0&&o<=144e5){if(n.eventKey&&n.eventKey!==s)return null;i=n.orderId}}}window.sessionStorage.removeItem(Zn)}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:i}}function eo(s){if(!s.framed)return null;let e=s.ancestorOrigins?.length?s.ancestorOrigins[0]:null;for(let t of[e,s.referrer])if(t)try{return new URL(t).origin}catch{}return null}var Gl="https://api.seatlayer.io",ql=10,io=6e4,so=6e4,Kl=160,ro="seatmap.a11y.cb";function Ul(){try{if(typeof window>"u")return null;let s=window.localStorage.getItem(ro);return s==null?null:s==="1"}catch{return null}}function Wl(s){try{window.localStorage.setItem(ro,s?"1":"0")}catch{}}var ze=class s{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.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.paymentOptions=null;this.checkoutPanel=null;this.extendEl=null;this.bookedEl=null;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.confirmEl=null;this.themeMode=null;this.colorSchemeStop=null;this.seatsRevealed=!1;this.seatsRevealedReport=null;this.confirmSeat=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.baReopen=!1;this.bestAvailableConfirm=!1;this.releasingHold=!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 ii({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.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 di({toast:(e,t,i)=>this.toast(e,t,i),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.holdCopyPending=!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.lastCatAvail=null;this.lastAvailFloorId="";this.availQuietUntil=0;this.liveTimer=null;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=Ln(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??Gl).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)}},i=!e.transport&&e.publicKey&&!e.buyerAccessTokenProvider&&!e.buyerAccessToken?Nt({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:i?.access??yt(e,t),this.pubApi=e.transport?null:i?.api??new Pe(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 Ze(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 n=pn(e.selectionValidators);if(this.exactTickets!=null&&n>this.exactTickets)throw new Error("seatmap: `minimumSelectedPlaces.minimum` cannot exceed `numberOfPlacesToSelect`");let o=Math.max(1,Math.floor(e.maxSelection??this.exactTickets??Math.max(ql,n)));if(this.exactTickets!=null&&o<this.exactTickets)throw new Error("seatmap: `maxSelection` cannot be lower than `numberOfPlacesToSelect`");if(e.maxSelection!=null&&o<n)throw new Error("seatmap: `maxSelection` cannot be lower than `minimumSelectedPlaces.minimum`");this.maxTickets=this.exactTickets??o,this.cbSafe=Ul()??!!e.colorblindSafe,this.controller=this.wireController(e)}get lastSection(){return this.sectionCard.summary}set lastSection(e){this.sectionCard.adopt(e)}chartHasStage(){let e=this.controller.doc;if(!e)return!1;let t=e.floors?.length?e.floors.map(i=>i.objects??[]):[e.objects??[]];for(let i of t)for(let r of i)if(r.type==="shape"&&(r.role==="stage"||r.stageKind))return!0;return!1}confirmThumbHtml(e){let t=this.controller.doc;if(!t)return"";let i=this.deliverableViewReference(e)?e.viewUrl??"":"",r=this.chartHasStage();if(!i&&!r)return"";let n=null;if(!i)try{n=$l(e,e.focalPoint??t.focalPoint).distanceM??null}catch{return""}let o=r&&n!=null?`<div class="sl-confirm-sight">${R(M("picker.sightline",{m:n}))}</div>`:"",a=R(M("picker.viewFromSeat",{label:e.label})),l=R(this.tf("picker.viewFromHere","View from here"));return(i?`<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>`:`<button type="button" class="sl-confirm-view sl-confirm-viewbtn" aria-label="${a}"><span aria-hidden="true">\u{1F52D}</span><span>${l}</span></button>`)+o}deliverableViewReference(e){let t=e.viewMeta?.previewUrl??e.viewUrl;return t&&(Hi(t)||Xe(t))?t:null}isFramed(){return typeof window<"u"&&window.parent!==window}postToHost(e){if(!this.isFramed())return;let t=eo({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 i=t<640?1.2:.62;return Math.max(420,Math.round(t*i))}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()}syncFullscreenButtons(){let e=!!document.fullscreenElement||this.fsFallback||this.framedFs,t=this.eventDetailsHidden&&!e;this.root?.setAttribute("data-event-details-hidden",String(t)),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 i=this.els.zfs?.querySelector(".sl-zfs-lbl");i&&(i.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))}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}),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){Je();let t=document.activeElement instanceof HTMLElement?document.activeElement:null,i=document.createElement("div");i.className="sl-modal-scrim";let r=document.createElement("div");r.className="sl-modal-frame",r.setAttribute("role","dialog"),r.setAttribute("aria-modal","true"),r.setAttribute("aria-label",v("picker.seatSelection","Seat selection")),r.tabIndex=-1,i.appendChild(r),document.body.appendChild(i);let n=document.body.style.overflow;document.body.style.overflow="hidden";let o=new s({...e,container:r});o.modalScrim=i,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 b=[...r.querySelectorAll('[role="dialog"][aria-modal="true"]')].filter(h=>h.isConnected&&!h.closest('[hidden], [aria-hidden="true"], [inert]'));return b[b.length-1]??r},c=(b,h)=>{let y=b;for(;y;){let x=window.getComputedStyle(y);if(y.hidden||y.getAttribute("aria-hidden")==="true"||y.hasAttribute("inert")||x.display==="none"||x.visibility==="hidden"||x.visibility==="collapse")return!0;if(y===h)return!1;y=y.parentElement}return!0},p=b=>[...b.querySelectorAll(a)].filter(h=>h.tabIndex>=0&&!h.matches(":disabled")&&!c(h,b)),d=(b,h)=>{let y=p(b),x=h?y[y.length-1]:y[0];x?x.focus({preventScroll:!0}):(b.hasAttribute("tabindex")||(b.tabIndex=-1),b.focus({preventScroll:!0}))},m=!1,u=()=>{if(m)return;m=!0,document.body.style.overflow=n,o.escHandler&&document.removeEventListener("keydown",o.escHandler),i.remove(),o.modalScrim=null;let b=o.prevFocus;o.prevFocus=null,b?.isConnected&&b.focus({preventScroll:!0});let h=()=>{o.destroy(),e.onClose?.()};o.hold&&!o.handedOff?o.release().finally(h):h()};return o.closeModal=u,i.addEventListener("mousedown",b=>{b.target===i&&u()}),o.escHandler=b=>{if(b.key==="Tab"){if(b.defaultPrevented)return;let h=l(),y=p(h),x=y[0],S=y[y.length-1],A=document.activeElement;!x||!S?(b.preventDefault(),d(h,b.shiftKey)):A===h||!A||!h.contains(A)?(b.preventDefault(),(b.shiftKey?S:x).focus({preventScroll:!0})):b.shiftKey&&A===x?(b.preventDefault(),S.focus({preventScroll:!0})):!b.shiftKey&&A===S&&(b.preventDefault(),x.focus({preventScroll:!0}));return}b.key==="Escape"&&(o.tableDialog?(b.preventDefault(),o.cancelTableDialog()):o.confirmSeat?(b.preventDefault(),o.cancelConfirm()):o.bestAvailableConfirm?(b.preventDefault(),o.bestAvailableConfirm=!1,o.syncTray()):(b.preventDefault(),u()))},document.addEventListener("keydown",o.escHandler),await o.render(),o.els.close?.classList.add("on"),o.els.close?.addEventListener("click",u),d(l(),!1),o}wireController(e){return new Dl({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:qe(e.theme),onSeatsRevealed:()=>{this.seatsRevealed=!0,e.onSeatsRevealed?.(),this.seatsRevealedReport?.()},onGAClick:t=>{let i=this.controller.getGAAreas().find(r=>r.id===t);i&&(this.collapseSheet(),Mi(this,i,this.lastMapPoint))},onSelectionChange:()=>{this.syncTray(),this.minimap?.refreshMinimap(),this.committedSelection().length&&this.collapseSectionCard(),this.syncSelectionTo3d()},onStatusChange:()=>{this.syncSeatMarks(),this.syncPrices(),this.a11yMenu?.syncCounts(),this.scheduleOfferRefresh(!0),this.evictTakenSelections(),this.detectBooked(),this.minimap?.refreshMinimap(),this.pushAvailabilityTo3d()},onHoldExpired:()=>{this.hold=null,this.forgetHold(),this.handedOff=!1,this.bookedShown=!1,this.ctaPhase="idle",this.stopHoldTimer(),this.gaQty.clear(),this.lapse.deferExpiryToast(()=>this.toast(M("picker.holdExpired",void 0)||"Your hold expired \u2014 seats released. Pick again.","warning")),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}this.confirmSeat?.id===t.id&&this.dismissConfirm(),this.tableDialog?.physicalSeatIds.includes(t.id)&&this.dismissTableDialog()},onSelectionLimit:()=>{this.toast(M("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),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={},i=H=>Math.round((performance.now()-H)*100)/100;this.rendered=!0,Je();let r=performance.now(),n=kr(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=Ws(this.opts.container),{root:c,els:p,mapHost:d}=vr(l,(H,N)=>this.tf(H,N),this.opts.theme);this.root=c,this.els=p,this.mapHost=d,Sr(c,n,H=>{t.loadLocale=i(r),this.destroyed||this.applyActiveLocale(H,o)}),Zr(c,()=>[{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 m=document.createElement("div");m.style.cssText="position:absolute;inset:0",this.mapHost.appendChild(m),t.mountBuyerShell=i(a),t.skeletonPaint=i(e);let u=await this.loadChart(m,t,i);if(!u)return this;t.shellsPaint=i(e);let b=performance.now();if(this.startRealtime(),this.salesClosed=!!u.salesClosed||!!this.opts.readOnly,c.dataset.eventMode=u.mode==="test"?"test":"live",!this.opts.locale&&u.locale&&this.setLocale(u.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),u.mode==="test"){let H=document.createElement("div");H.className="sl-testbadge",H.textContent=M("picker.testMode"),H.setAttribute("aria-label",M("picker.testMode")),this.regions["top-left"].appendChild(H)}let h=this.controller.doc?.theme;this.themeMode=this.opts.theme?.mode??null,this.applyThemeTokens(c),this.watchThemeMode(),this.currency=u.currency??this.opts.currency??"USD",this.eventTimezone=u.timezone??null,Ys(this.els.logo,[this.opts.theme?.logoUrl,h?.logoUrl,u.posterUrl],this.opts.theme?.brandName??h?.brandName??u.eventName??"?"),this.els.name.textContent=u.eventName??"";let y=u.startsAt?Ut(u.startsAt,u.timezone??null,this.opts.locale):"";this.eventWhenText=y||null,this.els.meta.textContent=[u.venue,y].filter(Boolean).join(" \xB7 "),this.syncProjection(),this.buildBadge(h);let x=!!this.controller.doc&&this.controller.getExpandedSeats().some(H=>H.commercial?.restrictedView||H.commercial?.obstructedView);this.buildAccessibilityMenu(x),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=i(b);let S=performance.now();if(await this.restoreRememberedHold(),t.restoreHold=i(S),this.destroyed)return this;this.dismissSkeleton(),this.salesClosed&&this.applySalesClosed(),this.syncPrices(),this.syncTray(),this.resumeHostedOrder();let A=this.controller.doc,g=Jt(this.opts.event),w=this.performanceGroup?.surface??(this.performanceGroup?"performance_group":null),E=w??"event",L={apiBase:this.apiBase,eventKey:this.opts.event,metricScope:E,surface:w==="season"?"season_picker":w==="performance_group"?"performance_group_picker":"seat_picker",ms:i(e),performanceProfile:t,chartDelivery:u.chartDelivery,seatCount:this.allSeats().length,objectCount:A?.objects.length??0,sectionCount:A?.objects.filter(H=>H.type==="section").length??0,floorCount:this.controller.getFloors().length,chartName:A?.name,view:this.buyerView,load:g,transport:this.opts.transport?"custom":"pubapi"};on(L,(H,N)=>this.emitAnalytics(H,N));let _=u.performanceProfile;return this.seatsRevealedReport=()=>this.emitAnalytics("chart_seats_revealed",Zi({...L,performanceProfile:{...L.performanceProfile,..._}})),this.seatsRevealed&&this.seatsRevealedReport(),this.renderInfo=u,await this.registerAgentTools(),this}registerAgentTools(){return rn(this)}webMcpHost(e){return Yi(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=Pn(()=>{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.zoomToFit()),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,n=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"))};n(e.dataset.sheet==="open"),r?.addEventListener("click",c=>{c.stopPropagation(),n(e.dataset.sheet!=="open")}),this.els.peek?.addEventListener("click",c=>{let p=c.target.closest(".sl-sheet-go");p&&(c.stopPropagation(),p.dataset.act==="checkout"?this.handleCta():p.dataset.act==="best"?(this.baReopen=!0,this.baQty=Math.max(1,Math.min(this.baQty,this.maxTickets-this.totalTicketCount())),this.syncTray(),n(!0),this.els.tray?.querySelector(".sl-ba-go")?.focus()):n(!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 p=c.clientY-o;p<-18?(n(!0),a=!0):p>18&&(n(!1),a=!0)}),t.addEventListener("pointerup",c=>{l&&!a&&Math.abs(c.clientY-o)<6&&n(e.dataset.sheet!=="open"),l=!1,t.releasePointerCapture?.(c.pointerId)})}let i=()=>{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 n=this.els.sheetToggle;n?.setAttribute("aria-expanded","true"),n?.setAttribute("aria-label","Collapse ticket panel")}};this.els.pricesSec?.addEventListener("click",r=>{r.target.closest("select,button")||i()}),this.els.pricesSec?.addEventListener("keydown",r=>{r.key!=="Enter"&&r.key!==" "||r.target.closest("select,button")||(r.preventDefault(),i())}),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 n=this.els.map.getBoundingClientRect();this.tipPos={x:r.clientX-n.left,y:r.clientY-n.top},this.tipEl&&this.tipEl.style.display!=="none"&&this.placeTooltip()}),this.els.cta.addEventListener("click",()=>{this.handleCta()}),this.els.holdChange?.addEventListener("click",()=>{this.handleChangeSeats()})}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 i=e.clientWidth;if(i<=0)return;let r=e.clientHeight,n=i!==this.pickerLayoutSize.width||r!==this.pickerLayoutSize.height;this.pickerLayoutSize={width:i,height:r},this.reportFramedHeight();let o=i<640?"narrow":"wide",a=r<560?"compact":"comfortable";(e.dataset.layout!==o||e.dataset.density!==a)&&(e.dataset.layout=o,e.dataset.density=a,o==="narrow"&&!e.dataset.sheet&&(e.dataset.sheet="peek"),this.dockLayoutChrome(),this.lastTrayKeys.size&&this.syncTray()),n&&(this.minimap?.refreshMinimap(),this.fitSectionStripCount())};this.ro=new ResizeObserver(t),this.ro.observe(e),t(),requestAnimationFrame(t)}async loadChart(e,t,i){let r=performance.now(),n=await this.controller.render(e);return t.loadChartAndStatuses=i(r),this.destroyed?null:n?(Object.assign(t,n.performanceProfile),n):(xe({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:He(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 s({...a,container:o}).render()}),null)}resumeHostedOrder(){if(this.checkoutMode!=="hosted")return;let e=Jn(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 li(t,{event:String(this.opts.event),needs:()=>this.controller.getAccessNeeds(),hasLimitedView:e,tf:(i,r)=>this.tf(i,r),isColorblindSafe:()=>this.cbSafe,setColorblindSafe:i=>this.setColorblindSafe(i),isLimitedViewHidden:()=>this.limitedViewFilter,setLimitedViewHidden:i=>{this.limitedViewFilter=i,this.controller.setCommercialLimitedFilter(i),this.pushAvailabilityTo3d()},applyAccessibilityFilter:i=>{this.controller.setAccessibilityFilter(i),this.syncPrices(),this.minimap?.refreshMinimap()},focusSeatsForFilter:()=>this.focusSeatsForFilter()}),this.cbEl=this.a11yMenu.colorblindRow())}focusSeatsForFilter(){this.rungsEl&&this.controller.getRung()!=="seats"&&(this.controller.setRung("seats"),this.collapseSectionCard(),this.syncRung())}setAccessibilityFilter(e){this.controller.setAccessibilityFilter(e),this.a11yMenu?.syncAccessibilityFilter(e)}dockLayoutChrome(){let e=this.root?.dataset.layout==="narrow";this.applyPanelCollapsed();let t=this.els.zfs,i=this.els.headInfo?.parentElement;t&&i&&t.parentElement!==i&&(t.classList.add("sl-fs-pill"),i.insertBefore(t,this.els.hold??null));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(){let e=document.createElement("div");e.className="sl-extend",e.setAttribute("role","status"),e.innerHTML='<span class="sl-extend-txt" data-ref="extendTxt"></span><button type="button" class="sl-extend-btn" data-ref="extendBtn"></button>',(this.regions["bottom-center"]??this.els.map).appendChild(e),this.extendEl=e,this.els.extendTxt=e.querySelector('[data-ref="extendTxt"]'),this.els.extendBtn=e.querySelector('[data-ref="extendBtn"]'),this.els.extendBtn.textContent=this.tf("picker.addTime","Add time"),this.els.extendBtn.addEventListener("click",()=>{this.handleExtend()})}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>`,this.root.appendChild(e),this.bookedEl=e,this.els.bookedSub=e.querySelector('[data-ref="bookedSub"]')}get onGAPromptHook(){return this.opts.onGAPrompt}tf(e,t){return v(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(),i=document.createElement("div");i.className="sl-soldout-eyebrow",i.textContent=t;let r=document.createElement("div");r.className="sl-soldout-title",r.textContent=this.tf("picker.soldOutTitle","Sold out");let n=document.createElement("p");n.className="sl-soldout-copy",n.textContent=this.tf("picker.soldOutCopy","No reserved seats are currently available for this event."),e.append(i,r,n),this.els.map.appendChild(e),this.soldoutEl=e}syncSoldout(e,t){let i=this.controller.getGAAreas().length>0,r=this.isSoldOut(e,t,i);r!==this.soldOut&&(this.soldOut=r,this.soldoutEl?.classList.toggle("on",r))}isSoldOut(e,t,i){return!i&&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!!(this.opts.hideBadge||e?.hideBadge)}buildBadge(e){if(this.badgeHidden(e))return;let t=this.els.foot;if(!t)return;let i=document.createElement("a");i.className="sl-powered",i.href="https://seatlayer.io/?ref=picker",i.target="_blank",i.rel="noopener noreferrer",i.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=Gt;let n=document.createElement("span");n.textContent=this.tf("picker.poweredBy","Powered by SeatLayer"),i.append(r,n),t.appendChild(i)}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 i=document.createElement("div");i.className="sl-anchor",i.dataset.region=t,this.els.map.appendChild(i),this.regions[t]=i}}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 i=setTimeout(()=>{this.motionTimers.delete(i),this.destroyed||e()},t);this.motionTimers.add(i)}animateOnce(e,t,i=600){!e||this.reducedMotion()||(e.classList.remove(t),e.offsetWidth,e.classList.add(t),this.scheduleMotion(()=>e.classList.remove(t),i))}flashPickedSeat(e){this.reducedMotion()||this.controller.flashSeat(e,this.cssVar("--sl-accent")||"#f4b740")}flashHeldSeats(e){if(this.reducedMotion())return;let t=(e.items??[]).filter(i=>i.objectType!=="ga").slice(0,10).map(i=>this.controller.seatByLabel(i.label)).filter(i=>!!i);nn({regions:this.els,categories:this.controller.doc?.categories,pop:i=>this.controller.flashSeat(i,this.cssVar("--sl-accent")||"#f4b740"),focus:(i,r)=>this.controller.focusSection(i,r),screenPoint:i=>this.controller.worldToScreen(i),schedule:(i,r)=>this.scheduleMotion(i,r)},t)}committedSelection(){let e=this.confirmSeat?.id,t=this.tableDialog&&!this.tableDialogHeld?this.tableDialog.id:null;return this.controller.getSelection().filter(i=>i.id!==e&&i.id!==t)}pendingSelectionCount(){let e=this.hold?.items??[],t=new Set(e.map(r=>r.label));return this.committedSelection().filter(r=>!t.has(r.label)).reduce((r,n)=>r+(n.quantity??1),0)+Be(this.gaQty,this.hold?.items??[])}heldTicketCount(){return(this.hold?.items??[]).reduce((e,t)=>e+(t.quantity??1),0)}totalTicketCount(){let e=new Set((this.hold?.items??[]).map(i=>i.label)),t=this.committedSelection().filter(i=>!e.has(i.label)).reduce((i,r)=>i+(r.quantity??1),0);return this.heldTicketCount()+t+Be(this.gaQty,this.hold?.items??[])}updateSelectionCapacity(){let e=new Set((this.hold?.items??[]).map(r=>r.label)),t=this.committedSelection().filter(r=>e.has(r.label)).reduce((r,n)=>r+(n.quantity??1),0),i=Math.max(0,this.maxTickets-this.heldTicketCount()-Be(this.gaQty,this.hold?.items??[]));this.controller.setMaxSelection(t+i)}syncCta(e=this.lastTrayCount,t=this.pendingSelectionCount()){let i=this.els.cta;if(!i)return;if(this.salesClosed){i.disabled=!0,i.textContent=this.tf("picker.salesClosedCta","Sales closed");return}if(this.confirmSeat||this.tableDialog&&!this.tableDialogHeld){i.disabled=!0,i.textContent=this.tableDialog?this.tf("picker.confirmYourTable","Confirm your table"):this.tf("picker.confirmOrCancelSeat","Confirm or cancel this seat");return}if(this.ctaPhase==="holding"){i.disabled=!0,i.innerHTML=`<span class="sl-cta-spin" aria-hidden="true"></span>${this.tf("picker.securingSeats","Securing your seats\u2026")}`;return}if(this.ctaPhase==="checkout"){i.disabled=!0,i.innerHTML=`<span class="sl-cta-spin" aria-hidden="true"></span>${this.tf("picker.openingCheckout","Opening secure checkout\u2026")}`;return}let r=!this.hold&&this.performanceGroup?.selectionMode==="per_performance"?this.performanceGroup.submissionState?.():null;if(r&&!r.ready){i.disabled=!0,i.textContent=this.tf("picker.completeAllPerformances","Complete all performances ({complete}/{total})").replace("{complete}",String(r.complete)).replace("{total}",String(r.total));return}let n=this.controller.getSelectionValidity(e);if(n&&!n.isValid){i.disabled=!0,i.textContent=ts(n,(o,a)=>this.tf(o,a),!0);return}i.disabled=e===0,i.textContent=this.hold?t?M("picker.secureMoreAndCheckout",{count:t}):this.tf("picker.continueToCheckout","Continue to checkout"):e?this.performanceGroup?this.tf("picker.holdSeatsForAllPerformances","Hold seats for all {count} performances").replace("{count}",String(this.performanceGroup.performanceCount)):this.tf("picker.holdSeatsAndCheckout","Hold seats & checkout"):this.tf("picker.selectSeats","Select seats")}setCtaPhase(e){this.ctaPhase=e,this.syncCta(),this.renderPeek(this.lastTrayCount,this.lastTrayTotal,this.pendingSelectionCount()),e==="checkout"&&this.scheduleMotion(()=>{this.ctaPhase==="checkout"&&(this.ctaPhase="idle",this.syncCta(),this.renderPeek(this.lastTrayCount,this.lastTrayTotal,this.pendingSelectionCount()))},1100)}holdStorageKey(){return`@seatlayer/hold/v1/${encodeURIComponent(this.apiBase)}/${encodeURIComponent(this.opts.event)}`}rememberedHoldId(){if(this.opts.initialHoldId)return this.opts.initialHoldId;if(this.opts.restoreHold===!1||typeof window>"u")return null;try{return window.sessionStorage.getItem(this.holdStorageKey())}catch{return null}}rememberHold(e){if(!(this.opts.restoreHold===!1||typeof window>"u"))try{window.sessionStorage.setItem(this.holdStorageKey(),e.holdId)}catch{}}forgetHold(){if(!(typeof window>"u"))try{window.sessionStorage.removeItem(this.holdStorageKey())}catch{}}async resumeHoldFromServer(e,t){try{let i=await this.controller.resumeHold(e);if(!i||this.destroyed)return null;let r={holdId:i.holdId,expiresAt:i.expiresAt,seats:i.seats,items:i.items};return this.hold=r,this.handedOff=!0,this.bookedShown=!1,this.ctaPhase="idle",this.startHoldTimer(r.expiresAt),this.rememberHold(r),this.syncTray(),this.emitHoldChange(),this.opts.onHoldRestored?.(r,r.seats??[],this.buildHandoff(r)),t&&this.toast(this.tf("picker.heldTicketsRestored","Your held tickets have been restored."),"success"),r}catch(i){let r=i?.status;return r===404||r===409?this.forgetHold():this.opts.onError?.(i),null}}async restoreRememberedHold(){let e=this.rememberedHoldId();e&&await this.resumeHoldFromServer(e,!0)}activeFloorObjects(){let e=this.controller.doc;if(!e)return[];let t=e.floors;if(t?.length){let i=this.controller.getActiveFloorId();return(t.find(r=>r.id===i)??t[0]).objects??[]}return e.objects??[]}buildMinimap(){this.els.map&&(this.minimap=Gr({controller:this.controller,root:()=>this.root,cssVar:e=>this.cssVar(e),focusedSectionLabel:()=>this.lastSection?.label},this.regions["bottom-left"]??this.els.map))}catPrice(e){return ri(this,e)}catPriceRange(e){return ni(this,e)}buildPriceFilter(){if(this.suppressPricing||!this.els.prices||!this.els.pricesSec)return;let e=mr(this.controller.doc?.categories??[],this.legendDeps());if(e.length<2)return;let t=document.createElement("select");t.className="sl-price-select",t.setAttribute("aria-label",this.tf("picker.filterAndFocusByPrice","Filter and focus seats by price"));let i=document.createElement("option");i.value="all",i.textContent=this.tf("picker.allPrices","All prices"),t.appendChild(i);for(let r of e){let n=document.createElement("option");n.value=r.id,n.textContent=r.label,t.appendChild(n)}this.els.pricesSec.appendChild(t),t.addEventListener("change",()=>{let n=e.find(o=>o.id===t.value)?.keys??null;this.focusedCatKey=null,this.priceBandKeys=n?new Set(n):null,this.controller.setCategoryFilter(n),this.controller.focusCategoryFilter(n),this.pushAvailabilityTo3d(),this.syncFloors(),this.syncRung(),this.minimap?.refreshMinimap(),this.syncPrices(),this.lastSection&&this.showSectionCard(this.lastSection)})}buildArenaChrome(){let e=this.controller.doc;if(!e||!this.els.map)return;let t=e.objects.some(i=>i.type==="section")||(e.floors??[]).some(i=>i.objects.some(r=>r.type==="section"));if(this.canOffer3d()){let i=document.createElement("div");i.className="sl-projection",i.setAttribute("role","group"),i.setAttribute("aria-label",this.tf("picker.venueView","Venue view")),i.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>`,i.querySelectorAll("button").forEach(r=>{if(r.dataset.view==="venue3d")for(let n of["pointerenter","focus","pointerdown"])r.addEventListener(n,Ri,{once:!0});r.addEventListener("click",()=>{this.setBuyerView(r.dataset.view)})}),this.regions["top-right"].appendChild(i),this.projectionEl=i,this.syncProjection()}if(t){let i=[...e.objects,...(e.floors??[]).flatMap(p=>p.objects)],r=new Set((e.zones??[]).map(p=>p.id)),o=i.some(p=>p.type==="section"&&typeof p.zone=="string"&&r.has(p.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",M("picker.zoomLevel"));let l={zones:M("picker.rungLabel.zones"),sections:M("picker.rungLabel.sections"),seats:M("picker.rungLabel.seats")},c={zones:M("picker.rungTip.zones"),sections:M("picker.rungTip.sections"),seats:M("picker.rungTip.seats")};a.innerHTML=o.map(p=>`<button type="button" data-rung="${p}" title="${c[p]}" aria-pressed="false">${l[p]}</button>`).join(""),a.querySelectorAll("button").forEach(p=>{p.addEventListener("click",()=>{let d=p.dataset.rung;this.controller.setRung(d),d==="seats"&&this.collapseSectionCard()})}),this.regions["top-center"].appendChild(a),this.rungsEl=a,this.syncRung()}if(this.controller.isMultiFloor()){let i=Fr({floors:this.controller.getFloors(),tf:(r,n)=>this.tf(r,n),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(i),this.floorsEl=i,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.minimap?.setAutoOpen(!1),this.rungsEl&&this.rungsEl.querySelectorAll("button").forEach(i=>{let r=i.dataset.rung===e;i.classList.toggle("on",r),i.setAttribute("aria-pressed",String(r))})}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||!qt()?!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)?so/2:so}syncFloors(){jr(this.floorsEl,this.controller.getActiveFloorId(),this.controller.isFloorOverview())}get sectionCard(){return this.sectionCardCache||(this.sectionCardCache=new ti({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()}fitSectionStripCount(){this.sectionCard.fitStripCount()}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 i=t.findIndex(r=>r.id===e);return i<0?null:{previous:t[(i-1+t.length)%t.length],next:t[(i+1)%t.length]}}markedSeatAnnouncement(e){let t=os(this.controller.getRenderer()?.getSeatMark?.(e.id),this.performanceGroup?.nights?.());return zn(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 i=this.controller.doc?.categories.find(u=>u.key===e.categoryKey),r=this.controller.getStatus(e.id)??"free",n=r==="free"?this.tf("picker.statusAvailable","available"):r==="held"?this.tf("picker.statusOnHold","on hold"):this.tf("picker.statusTaken2","taken"),o=i?this.catPriceRange(i):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),p=st(c),d=c?.rowLabel??c?.displayLabel??e.displayLabel??e.label,m=l?`${p} ${d}, ${l.bookingMode==="variable"?M("picker.minToMaxGuests",{min:l.minOccupancy,max:l.maxOccupancy}):M("picker.capacityGuests",{count:l.capacity})}`:c?.objectType==="booth"?`${p} ${d}`:c?.objectType==="table"?`${p} ${d}, ${M("picker.seatNumberLower",{label:c.seatNumber??e.label})}`:M("picker.seatLabel",{label:c?.displayLabel??e.displayLabel??e.label});this.srEl.textContent=`${m}, ${i?.label??e.categoryKey}${a?`, ${a}`:""}, ${n}`}showTableDialog(e,t,i){this.dismissTableDialog(!1),this.tableDialog={...e},this.tableDialogHeld=t,this.tableDialogReturnFocus=i??document.activeElement;let r=this.controller.doc?.categories.find(a=>a.key===e.categoryKey),n=e.bookingMode==="variable",o=document.createElement("div");o.className="sl-table-scrim",o.innerHTML=Vr(e,{variable:n,held:t,typeWord:st(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],p=l[l.length-1];a.shiftKey&&document.activeElement===c?(a.preventDefault(),p.focus()):!a.shiftKey&&document.activeElement===p&&(a.preventDefault(),c.focus())}),requestAnimationFrame(()=>o.querySelector(n?'[data-table-step="-1"]':".sl-table-confirm")?.focus())}renderTableDialogState(){let e=this.tableDialog,t=this.tableDialogEl;if(!e||!t)return;let i=t.querySelector("output[data-table-qty]");i&&(i.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 n=this.paidPrice(e.categoryKey,e.tierId??null,e.price,e.label),o=t.querySelector("[data-table-total]");o&&(o.textContent=this.money(n*e.quantity))}async confirmTableDialog(){let e=this.tableDialog,t=this.tableDialogHeld;if(!e)return;let i=this.tableDialogEl?.querySelector(".sl-table-confirm");if(i&&(i.disabled=!0,i.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(),i&&(i.disabled=!1,i.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(M("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"),i&&(i.disabled=!1,i.textContent=this.tf("picker.updateTable","Update table"))}return}if(!this.controller.setTableQuantity(e.label,e.quantity)){i&&(i.disabled=!1,i.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())}showConfirm(e){let t=this.confirmSeat?.id;this.confirmEl?.remove(),this.confirmEl=null,this.confirmSeat=e,this.root?.setAttribute("data-confirming","true"),this.els.side?.toggleAttribute("inert",!0),Object.values(this.regions).forEach(w=>w.toggleAttribute("inert",!0)),this.controller.setSelectionFocus(e.id),t&&t!==e.id&&this.controller.deselect([t]),this.tipEl&&(this.tipEl.style.display="none");let i=this.controller.seatDetails(e.id),r=this.controller.doc?.categories.find(w=>w.key===e.categoryKey),n=i?.price??(r?.tiers?.length?r.tiers[0].price:r?.price),o=n!=null?this.paidPrice(e.categoryKey,i?.tierId??r?.tiers?.[0]?.id??null,n,e.label):void 0,a=Ir(i,e.displayLabel??e.label,st(i)),l=i?.tiers??r?.tiers??[],c=i?.tierId??l[0]?.id,p=this.suppressPricing?"":_r(l,c,w=>this.money(this.paidPrice(e.categoryKey,w.id,w.price,e.label))),d=this.buyerView==="venue3d",m=this.performanceGroup?.confirmDateSelection??void 0,u=m?this.performanceGroup?.nights?.()??[]:[],b=m?Bn(u,m,e.id,(w,E)=>this.tf(w,E)):"",h=document.createElement("div");h.className="sl-confirm sl-mo-in",b&&h.classList.add("sl-confirm-group-dates"),h.setAttribute("role","dialog"),h.setAttribute("aria-label",M("picker.confirmSeatLabel",{label:e.label}));let y=r?.color??"#6e7bff",x=ks(y,this.cssVar("--sl-surface")||"#1a2234",.76)??y;h.style.setProperty("--sl-cat",y),h.style.setProperty("--sl-cat-ink",ws(x,"#172033","#ffffff"));let S=String(i?.categoryLabel??r?.label??e.categoryKey);h.innerHTML=$r({identityFields:a,identity:Rr(i,e.displayLabel??e.label,st(i)),marker:ei(i?.wheelchairSpaceType),see3dPill:Or(this.canOffer3d(),d),categoryColor:r?.color??"#6e7bff",categoryLabel:S,priceLabel:!this.suppressPricing&&o!=null?this.money(o):"",tierChoices:p,groupDates:b,wheelchair:Pr(i?.wheelchairSpaceType),commercial:Ar(e.commercial),thumb:this.seatViewEnabled()&&this.buyerView!=="venue3d"?this.confirmThumbHtml(e):"",inspect:d?`${Hr(e,this.suppressPricing?`${i?.displayLabel??e.displayLabel??e.label}`:`${i?.displayLabel??e.displayLabel??e.label} \xB7 ${o==null?this.tf("picker.priceNotSupplied","Price not supplied"):this.money(o)}`,d)}<div class="sl-confirm-inspect-row">${Lr(e,d?this.view3dCompareSeatIds:null)}${Gi(this.canOffer3d(),d)}</div>`:Gi(this.canOffer3d(),d),cancelLabel:M("common.cancel"),selectLabel:this.tf("picker.select","Select")}),this.els.map.appendChild(h),this.confirmEl=h;let A=h.querySelector(".sl-confirm-thumb"),g=A?.closest(".sl-confirm-thumbwrap")??null;if(A&&g){let w=!1,E=()=>{if(w||!g.isConnected)return;w=!0;let _=()=>{g.remove(),this.confirmEl===h&&this.reanchorConfirm()};if(this.reducedMotion()||typeof requestAnimationFrame!="function"){_();return}g.style.height=`${g.offsetHeight}px`,g.classList.add("sl-confirm-thumb-out"),requestAnimationFrame(()=>{g.style.height="0px",g.style.opacity="0"}),setTimeout(_,Kl)};A.addEventListener("error",E),A.addEventListener("load",()=>{A.naturalWidth||E()});let L=e.viewMeta?.previewUrl??e.viewUrl;L?this.buyerAssetUrls.resolve(L).then(_=>{if(!(!h.isConnected||this.confirmEl!==h)){if(!_){E();return}A.src=_}}).catch(_=>{E(),this.opts.onError?.(_)}):E()}this.reanchorConfirm(),h.querySelector(".sl-confirm-view")?.addEventListener("click",()=>{this.openSeatView(e)}),h.querySelector(".sl-confirm-confidence")?.addEventListener("click",w=>{this.openSeatConfidencePassport(e,w.currentTarget instanceof HTMLElement?w.currentTarget:null)}),h.querySelector(".sl-confirm-compare")?.addEventListener("click",()=>this.saveView3dComparisonSeat(e)),h.querySelectorAll("[data-confirm-tier]").forEach(w=>{w.addEventListener("click",()=>{let E=w.dataset.confirmTier,L=l.find(H=>H.id===E);if(!L)return;this.controller.setSeatTier(e.id,L.id),h.querySelectorAll("[data-confirm-tier]").forEach(H=>{H.setAttribute("aria-pressed",String(H===w))});let _=h.querySelector(".sl-confirm-price");_&&(_.textContent=this.money(this.paidPrice(e.categoryKey,L.id,L.price,e.label))),this.reanchorConfirm()})}),h.querySelectorAll(".sl-confirm-3d,.sl-confirm-3dpill").forEach(w=>{w.addEventListener("pointerdown",Ri,{once:!0}),w.addEventListener("click",()=>{this.buyerView==="venue3d"?(this.dismissConfirm(),this.view3dHandle?.flyToSeat(e.id)):(this.view3dReturnSeat=e,this.dismissConfirm(),this.enter3d(e.id))})}),Vn(h,m,(w,E)=>this.tf(w,E),()=>this.reanchorConfirm()),h.querySelector(".sl-confirm-add").addEventListener("click",()=>{this.commitConfirm()}),h.querySelector(".sl-confirm-cancel").addEventListener("click",()=>this.cancelConfirm()),requestAnimationFrame(()=>h.querySelector(".sl-confirm-add")?.focus())}reanchorConfirm(){if(!this.confirmEl||!this.confirmSeat||this.root?.dataset.view3d==="on")return;let e=this.controller.worldToScreen({x:this.confirmSeat.x,y:this.confirmSeat.y});if(this.root?.dataset.layout==="narrow"){Ms(this.confirmEl,e,this.els.map);return}let t=this.els.map.clientWidth,i=this.els.map.clientHeight,r=this.confirmEl.offsetWidth||276,n=this.confirmEl.offsetHeight||230,o=this.confirmEl.classList.contains("sl-confirm-group-dates"),a=Qn(e,{width:t,height:i},{width:r,height:n},o);this.confirmEl.dataset.placement=a.placement,this.confirmEl.style.left=`${a.left}px`,this.confirmEl.style.top=`${a.top}px`,zt(this.confirmEl,e,{left:a.left,top:a.top,width:r,height:n})}dismissConfirm(){this.confirmEl&&Le(this.confirmEl),this.confirmEl=null,this.confirmSeat=null,this.root?.removeAttribute("data-confirming"),Object.values(this.regions).forEach(e=>e.toggleAttribute("inert",!1)),this.applyPanelCollapsed(),this.controller.setSelectionFocus(null)}async commitConfirm(){let e=this.confirmSeat;e&&await Nn(this.confirmEl,e.id,this.performanceGroup?.confirmDateSelection??void 0)&&(this.confirmSeat&&this.dismissConfirm(),this.collapseSectionCard(),Xi(this.els,this.controller.worldToScreen(e),e,this.controller.doc?.categories),this.syncTray(),this.syncSelectionTo3d())}cancelConfirm(){let e=this.confirmSeat;e&&(this.controller.deselect([e.id]),this.confirmSeat&&this.dismissConfirm(),this.syncSelectionTo3d(),this.root?.focus({preventScroll:!0}))}closeConfirm(){this.dismissConfirm()}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,i=this.controller.doc,r=this.controller.getActiveFloorId(),n=e.focalPoint??i?.floors?.find(d=>d.id===r)?.focalPoint??i?.focalPoint??{x:0,y:0},o,a,l=!1;if(e.viewUrl){let d,m=null;try{let b=e.viewMeta?.previewUrl;b&&b!==e.viewUrl?(m=await this.buyerAssetUrls.resolve(b),d=e.viewUrl):d=await this.buyerAssetUrls.resolve(e.viewUrl)}catch(b){t===this.seatViewGen&&this.opts.onError?.(b);return}if(t!==this.seatViewGen||!d||e.viewMeta?.previewUrl&&e.viewMeta.previewUrl!==e.viewUrl&&!m||!this.root||!this.seatViewEnabled())return;let u={url:d,...m?{previewUrl:m}:{},...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=u,a=to(u),l=Fl(u)}else{let d;try{let{generateSeatPanorama:m}=await Kt();d=m(e,n,this.allSeats())}catch(m){t===this.seatViewGen&&this.opts.onError?.(m);return}if(t!==this.seatViewGen||!this.root||!this.seatViewEnabled())return;o={url:d.url,generated:!0},a=M("picker.illustrationCaption",{m:d.distanceM})}this.closeSeatView(!1);let c=M("picker.viewFromSeat",{label:e.label}),p=Qt({root:this.root,source:o,caption:a,real:l,closeLabel:this.tf("picker.close","Close"),dragHint:this.tf("picker.dragToLookAround","Drag to look around \xB7 scroll to zoom"),viewFromSeatLabel:c,real360Label:M("picker.real360"),previewLabel:M("picker.preview"),resolveAsset:d=>this.buyerAssetUrls.resolve(d),onClose:()=>this.closeSeatView()});this.viewEl=p.element,this.viewCleanup=()=>p.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 i=Number.isInteger(e);return Bl(e,this.currency,{locale:this.opts.locale,fallback:(r,n)=>`${r} ${n}`,...i?{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(),i=br(e,t);if(i==null)return;let r=6*36e5,n=Math.min(Math.max(i-t+1e3,1e3),r);this.offerBoundaryTimer=setTimeout(()=>{this.offerBoundaryTimer=null,!document.hidden&&this.refreshOfferAvailability(!1)},n)}scheduleOfferRefresh(e){!this.api.availability||this.destroyed||(this.offerRefreshTimer&&clearTimeout(this.offerRefreshTimer),this.offerRefreshTimer=setTimeout(()=>{this.offerRefreshTimer=null,this.refreshOfferAvailability(e)},e?180:0))}async refreshOfferAvailability(e){if(!(!this.api.availability||this.destroyed))try{let t=await this.api.availability(this.opts.event,e);if(this.destroyed)return;let i=Vi(t);if(!i)return;this.offerAvailability=i,this.applyChannelPricing(i.channelPricing),this.scheduleOfferBoundary(i);let r=Ni(i),n={...this.hostPricing?.prices??{},...r},o=Object.keys(n).length>0||this.hostPricing?.formatter?{prices:n,...this.hostPricing?.formatter?{formatter:this.hostPricing.formatter}:{}}:void 0;this.setPricing(o),this.syncOffer(),this.opts.onOfferAvailabilityChange?.(i)}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,i=t?.release??null,r=i?null:t?.upcoming??null;if(!t||t.state==="closed"||t.state==="sold-out"||!i&&!r){e.classList.remove("has"),e.replaceChildren();return}let n=i??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=i?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=n.name||(i?this.tf("picker.currentOffer","Current offer"):this.tf("picker.scheduledOffer","Scheduled offer"));let p=document.createElement("span");p.className="sl-offer-line";let d=[];i&&t.fromPrice!=null&&d.push(this.money(t.fromPrice/100)),i&&n.remaining!=null&&d.push(M("picker.offerRemainingAvailable",{count:n.remaining})),i&&n.endsAt!=null&&d.push(M("picker.offerUntil",{time:Ut(n.endsAt,this.eventTimezone,this.opts.locale)})),r?.startsAt!=null&&d.push(M("picker.offerStarts",{time:Ut(r.startsAt,this.eventTimezone,this.opts.locale)})),p.textContent=d.join(" \xB7 "),a.append(l,c,p);let m=document.createElement("details");m.className="sl-offer-info";let u=document.createElement("summary");u.setAttribute("aria-label",M("picker.howOfferWorks",{name:c.textContent??""})),u.textContent="i";let b=document.createElement("div");b.className="sl-offer-detail",b.textContent=i?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."),m.append(u,b),o.append(a,m),e.replaceChildren(o),e.classList.add("has")}paidPrice(e,t,i,r){let n=r?this.channelByObject.get(r):void 0;if(n&&e){let a=this.pricesByChannel.get(n)?.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?i:typeof o=="number"?o:t&&o.tiers?.[t]!==void 0?o.tiers[t]:o.base??i}legendDeps(){return{colorOf:e=>this.controller.getRenderer()?.categoryDisplayColor?.(e.key)??e.color,rangeOf:e=>this.catPriceRange(e),priceOf:e=>this.catPrice(e),offerOf:e=>this.offerPrice(e),money:e=>this.money(e),esc:R}}syncPriceRail(e,t,i=this.legendDeps()){let r=this.els.railScroll,n=e.length>1;this.els.rail?.classList.toggle("has",n),r&&(r.innerHTML=n?ur({...i,categories:e,left:t,activeKey:this.focusedCatKey,soldOutWord:this.tf("picker.soldOut","Sold out")}):"",r.querySelectorAll(".sl-rc").forEach(o=>{o.addEventListener("click",()=>this.focusCategory(o.dataset.cat??""))}),this.railEdgesBound||(this.railEdgesBound=!0,r.addEventListener("scroll",()=>$i(r),{passive:!0})),requestAnimationFrame(()=>$i(r)))}syncPrices(){let e=this.controller.doc;if(!e||!this.els.prices)return;let t=this.controller.categoryAvailability(),i=e.categories.filter(d=>!d.notForSale);this.narrateAvailability(i,t),this.syncSoldout(i,t);let r=this.legendDeps(),n=this.suppressPricing,o=n?{...r,priceOf:()=>{},rangeOf:()=>{},offerOf:()=>null}:r;n&&(this.els.pricesSec?.querySelector("span")?.replaceChildren(this.tf("picker.seatCategories","Seat categories")),this.els.pricesHint?.remove()),this.syncPriceRail(i,t,o);let a=5,l=i.length-a,c=l>1&&!this.pricesExpanded,p=c?i.slice(0,a):i;this.els.prices.classList.toggle("sl-expanded",l>1&&this.pricesExpanded),this.els.prices.innerHTML=hr({...o,categories:p,left:t,collapsed:c,activeKey:this.focusedCatKey,bandKeys:this.priceBandKeys,leftCount:d=>rt("picker.leftCount",d),titleFor:(d,m)=>m?this.tf("picker.showAllSeats","Show all seats"):M("picker.showLabelSeatsOnMap",{label:d.label}),moreLabel:l>1?c?n?this.tf("picker.showAllCategories","Show all categories"):M("picker.showAllTicketTypes",{count:i.length}):this.tf("picker.showFewer","Show fewer"):null,status:{legend:this.tf("picker.seatStatusLegend","Seat status legend"),held:this.tf("picker.temporarilyHeld","Temporarily held"),sold:this.tf("picker.sold","Sold")}}),this.els.prices.querySelectorAll(".sl-price-row").forEach(d=>{d.addEventListener("mouseenter",()=>this.controller.getRenderer()?.setCategoryHighlight?.(d.dataset.cat??null)),d.addEventListener("mouseleave",()=>this.controller.getRenderer()?.setCategoryHighlight?.(null));let m=()=>this.focusCategory(d.dataset.cat??"");d.addEventListener("click",m),d.addEventListener("keydown",u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),m())})}),this.els.prices.querySelector(".sl-price-more")?.addEventListener("click",()=>{this.pricesExpanded=!this.pricesExpanded,this.syncPrices()})}focusCategory(e){if(!e)return;let t=this.focusedCatKey===e?null:e;this.focusedCatKey=t,this.priceBandKeys=t?new Set([t]):null;let i=this.els.pricesSec?.querySelector(".sl-price-select");i&&(i.value="all"),this.controller.setCategoryFilter(t?[t]:null),this.controller.focusCategoryFilter(t?[t]:null),this.pushAvailabilityTo3d(),this.syncFloors(),this.syncRung(),this.minimap?.refreshMinimap(),this.syncPrices(),this.lastSection&&this.showSectionCard(this.lastSection)}narrateAvailability(e,t){let i=this.els.liveText,r=this.lastCatAvail;this.lastCatAvail={...t};let n=this.controller.getActiveFloorId();if(n!==this.lastAvailFloorId&&(this.lastAvailFloorId=n,this.availQuietUntil=performance.now()+2e3),!(!i||!r||performance.now()<this.availQuietUntil))for(let o of e){let a=r[o.key],l=t[o.key]??0;if(a===void 0||l>=a)continue;let c=a-l;i.textContent=rt("picker.seatsJustTakenInCategory",c,{label:o.label,left:l}),this.els.live?.classList.remove("on"),this.els.live?.offsetWidth,this.els.live?.classList.add("on"),this.liveTimer&&clearTimeout(this.liveTimer),this.liveTimer=setTimeout(()=>this.els.live?.classList.remove("on"),8e3);return}}evictTakenSelections(){let e=new Set([...this.controller.currentHold()?.labels??[],...this.holdingLabels]),t=this.controller.getSelection().filter(i=>!e.has(i.label)&&(this.controller.getStatus(i.id)??"free")!=="free");t.length&&(this.controller.deselect(t.map(i=>i.id)),this.toast(M("picker.seatJustTakenByAnother",{label:t[0].label}),"error"))}syncTray(){if(!this.els.tray)return;this.updateSelectionCapacity();let{seats:e,gaAreas:t,heldItems:i,heldLabels:r,heldCount:n,total:o,count:a}=si(this),l=[],c=new Set;if(!this.salesClosed){let g=this.performanceGroup?.nightSummary?.()??[];g.length&&l.push(_n(g,{title:this.tf("picker.group.yourSeatsByNight","Your seats by night"),empty:this.tf("picker.group.noSeatsChosenYet","No seats yet")}));let w=this.performanceGroup?.selectionModeSwitch;w&&l.push(`<button type="button" class="sl-pg-switch" data-pg-switch-mode>${R(w.label)}</button>`)}l.push(bn({salesClosed:this.salesClosed,hasPicks:e.length>0||i.length>0,hasGaAreas:t.length>0,groupMode:this.performanceGroup?this.performanceGroup.selectionMode??"same_seat":null,seated:!!this.controller.doc?.objects?.some(g=>g.type!=="gaArea"),venue3d:this.buyerView==="venue3d",whenText:this.eventWhenText?String(this.eventWhenText):void 0}));let p=!e.length&&!i.length&&!Be(this.gaQty,this.hold?.items??[]);if((p||this.root?.dataset.layout==="narrow")&&(this.baReopen=!1),!this.performanceGroup&&!this.salesClosed&&!this.hold&&(p||this.baReopen||this.bestAvailableBusy||this.bestAvailableConfirm)){let g=(this.controller.doc?.categories??[]).filter(E=>!E.notForSale),w=this.controller.getBestAvailableZones();this.baZone&&!w.some(E=>E.id===this.baZone)&&(this.baZone=""),l.push(gn({confirming:this.bestAvailableConfirm,busy:this.bestAvailableBusy,reopened:this.baReopen,quantity:this.baQty,premium:this.baPremium,offerPremium:this.controller.hasPremiumSeats(),categories:g,zones:w,selectedCategory:this.baCat,selectedZone:this.baZone}))}let d=(g,w,E,L=1,_,H)=>un({d:g?this.controller.seatDetails(g):null,area:E==="ga"?t.find(N=>N.id===_):void 0,label:w,objectType:E,quantity:L,identity:H,performanceLabel:this.performanceGroup?.activePerformanceLabel?.(),performanceDates:this.performanceGroup?.selectedPerformanceDates?.()}),m=R,u=[];for(let g of Bs(i)){let w=g.objectType==="ga"?`held:ga:${g.objectId}:${g.tierId??""}`:`held:${g.label}`;c.add(w);let E=this.controller.doc?.categories.find(U=>U.key===g.categoryKey),L=g.tierId?E?.tiers?.find(U=>U.id===g.tierId)?.name:void 0,_=g.objectType!=="ga"?this.controller.seatByLabel(g.label):null,H=g.objectType==="table"?this.controller.tableSelection(g.label):null,N=_?this.controller.seatDetails(_.id):null,Ee=this.seatViewEnabled()&&!!_&&g.objectType!=="table",me=m(this.tf("picker.heldForYou","Held for you")),fe=(H?.bookingMode==="variable"?`<button type="button" class="sl-table-edit" data-table-edit="${m(encodeURIComponent(g.label))}">${m(M("picker.guestsCountEdit",{count:g.quantity??1}))}</button>`:"")+ei(_?.wheelchairSpaceType)+Fi(_?.commercial),Ae=this.paidPrice(g.categoryKey,g.tierId,g.unitPrice,g.label)*(g.quantity??1);u.push({key:w,fresh:!this.lastTrayKeys.has(w),held:!0,seatIds:[],heldLabels:g.labels,removeAria:M("picker.removeHeldTicketLabel",{label:Pi(g,t)}),locateId:_?.id??null,section:N?.sectionLabel??"",rowLabel:N&&q(N)||"",seatLabel:N?.seatNumber??g.label,categoryLabel:`${E?.label??g.categoryKey}${L?` \xB7 ${L}`:""}`,categoryColor:this.controller.getRenderer?.()?.categoryDisplayColor?.(g.categoryKey)??E?.color??"",identityHtml:d(_?.id??null,g.label,g.objectType,g.quantity??1,g.objectId,H??void 0),stateHtml:`<span class="sl-ticket-state held" aria-label="${me}" title="${me}"><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:fe,amount:Ae,amountText:this.suppressPricing?"":this.money(Ae),noteHtml:ji(_?.commercial),railHtml:this.performanceGroup?"":is(M("picker.removeHeldTicketLabel",{label:Pi(g,t)}),Ee?g.label:null),groupable:!fe&&!!N?.sectionLabel&&!this.performanceGroup})}let b=this.seatViewEnabled();for(let g of e.filter(w=>!r.has(w.label))){let w=`seat:${g.id}`;c.add(w);let E=this.controller.doc?.categories.find(U=>U.key===g.categoryKey),L=g.tiers&&g.tiers.length&&!this.suppressPricing?`<select class="tier" data-tier="${m(g.id)}" aria-label="${m(M("picker.ticketTierFor",{label:g.label}))}">`+g.tiers.map(U=>`<option value="${m(U.id)}"${U.id===g.tierId?" selected":""}>${m(U.name)} \xB7 ${m(this.money(this.paidPrice(g.categoryKey,U.id,U.price,g.label)))}</option>`).join("")+"</select>":"",_=g.tiers?.find(U=>U.id===g.tierId)??g.tiers?.[0],H=_?.buyerMessage?.trim()||(_?.restriction==="companion"?this.tf("picker.companionRequiresWheelchair","Requires the adjacent wheelchair place"):""),N=this.controller.seatDetails(g.id),Ee=m(this.tf("picker.selected","Selected")),me=M("picker.removeSeatLabel",{label:g.label}),fe=(g.objectType==="table"&&g.bookingMode==="variable"?`<button type="button" class="sl-table-edit" data-table-edit="${m(encodeURIComponent(g.label))}">${m(M("picker.guestsCountEdit",{count:g.quantity??1}))}</button>`:"")+ei(g.wheelchairSpaceType)+Fi(g.commercial)+L,Ae=this.paidPrice(g.categoryKey,g.tierId??null,g.price,g.label)*(g.quantity??1);u.push({key:w,fresh:!this.lastTrayKeys.has(w),held:!1,seatIds:[g.id],heldLabels:[],locateId:g.id,section:N?.sectionLabel??"",rowLabel:N&&q(N)||"",seatLabel:N?.seatNumber??g.label,categoryLabel:E?.label??g.categoryKey,identityHtml:d(g.id,g.label,g.objectType,g.quantity??1,g.objectId,g),categoryColor:this.controller.getRenderer?.()?.categoryDisplayColor?.(g.categoryKey)??E?.color??"",stateHtml:`<span class="sl-ticket-state" aria-label="${Ee}" title="${Ee}"><svg viewBox="0 0 24 24"><path d="M5 12l4 4L19 6"/></svg></span>`,extrasHtml:fe,amount:Ae,amountText:this.suppressPricing?"":this.money(Ae),removeAria:me,noteHtml:ji(g.commercial)+(H?`<small class="sl-tier-note">${m(H)}</small>`:""),railHtml:is(me,b&&g.objectType!=="table"?g.label:null),groupable:!fe&&!H&&!!N?.sectionLabel&&!this.performanceGroup})}u.length&&l.push(this.root?.dataset.layout==="narrow"?Tn(u,{money:g=>this.money(g),suppressPricing:this.suppressPricing}):u.map(Sn).join("")),t.length&&l.push(Fs(this,t,i)),!this.performanceGroup&&!this.salesClosed&&!this.hold&&!p&&!this.baReopen&&!this.bestAvailableBusy&&!this.bestAvailableConfirm&&l.push(`<button type="button" class="sl-ba-reopen" data-ba-reopen><span aria-hidden="true">\u2726</span>${m(this.tf("picker.findTogetherInstead","Find seats together instead"))}</button>`),this.els.tray.innerHTML=l.join("")+(this.salesClosed?"":this.lapse.noteHtml()),this.lastTrayKeys=c,Cn(this.els.tray),this.lapse.wire(this.els.tray),this.els.tray.querySelector("[data-pg-switch-mode]")?.addEventListener("click",()=>this.performanceGroup?.selectionModeSwitch?.activate());let h=this.performanceGroup?.selectNight;h&&Kn(this.els.tray,g=>h(g)),this.els.tray.querySelectorAll("[data-ba]").forEach(g=>{g.addEventListener("click",()=>{this.baQty=Math.max(1,Math.min(this.maxTickets,this.baQty+Number(g.dataset.ba))),this.syncTray()})}),this.els.tray.querySelector("[data-ba-cat]")?.addEventListener("change",g=>{this.baCat=g.target.value}),this.els.tray.querySelector("[data-ba-zone]")?.addEventListener("change",g=>{this.baZone=g.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-reopen]")?.addEventListener("click",()=>{this.baReopen=!0,this.syncTray(),this.els.tray.querySelector(".sl-ba-go")?.focus()}),this.els.tray.querySelector("[data-ba-close]")?.addEventListener("click",()=>{this.baReopen=!1,this.syncTray(),this.els.tray.querySelector("[data-ba-reopen]")?.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(g=>{g.addEventListener("click",()=>{let w=g.closest(".sl-chip");if(w.dataset.held){this.removeHeldLabels(decodeURIComponent(w.dataset.held).split(`
2256
- `),w);return}let E=w.dataset.seat.split(" "),L=this.controller.getSelection().find(H=>H.id===E[0])?.label??this.tf("picker.seat","Seat"),_=()=>{this.controller.deselect(E),this.toast(M("picker.labelRemoved",{label:L}),"neutral",{label:this.tf("picker.undo","Undo"),onClick:()=>{let H=this.controller.select(E);this.toast(H.length?M("picker.labelRestored",{label:L}):M("picker.labelNoLongerAvailable",{label:L}),H.length?"success":"warning")}})};if(this.reducedMotion()){_();return}w.classList.remove("sl-enter"),w.classList.add("sl-leave","sl-mo-collapse"),this.scheduleMotion(_,F.collapse)})}),this.els.tray.querySelectorAll("[data-table-edit]").forEach(g=>{g.addEventListener("click",w=>{w.stopPropagation();let E=decodeURIComponent(g.dataset.tableEdit??""),L=this.controller.tableSelection(E);if(!L)return;let _=i.find(H=>H.label===E&&H.objectType==="table");this.showTableDialog({...L,quantity:_?.quantity??L.quantity},!!_,g)})}),this.els.tray.querySelectorAll(".sl-chip .tier").forEach(g=>{g.addEventListener("change",()=>this.controller.setSeatTier(g.dataset.tier,g.value||null))}),this.els.tray.querySelectorAll(".sl-chip .view[data-view-label]").forEach(g=>{g.addEventListener("click",()=>{let w=this.controller.seatByLabel(g.dataset.viewLabel);w&&this.openSeatView(w)})}),this.els.tray.querySelectorAll(".sl-chip[data-locate]").forEach(g=>{let w=()=>this.controller.flashSeat(g.dataset.locate,this.cssVar("--sl-accent")||"#f4b740");g.addEventListener("mouseenter",w),g.addEventListener("focusin",w)}),js(this,this.els.tray,t),this.controller.setGASelection(Os(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(g=>{g.disabled=!0});let y=this.pendingSelectionCount(),x=this.lastTrayCount,S=this.lastTrayTotal,A=qn(this.performanceGroup?.groupSelectionSummary?.(),this.performanceGroup?.selectionMode??"same_seat");if(this.els.count.textContent=A||(a?rt("picker.ticketsCount",a):this.tf("picker.noSeatsSelected","No seats selected")),this.els.total.textContent=a&&!this.suppressPricing?this.money(o):"",this.root?.setAttribute("data-has-selection",String(a>0)),this.root?.setAttribute("data-ba-active",String(this.bestAvailableConfirm||this.bestAvailableBusy||this.baReopen)),this.els.foot?.classList.toggle("empty",a===0),this.els.seatSummary&&(this.els.seatSummary.textContent=A||(a?rt("picker.seatsSelectedCount",a):"")),this.syncCta(a,y),this.hold){this.holdCopyPending=y>0;let g=vn({secured:n||this.hold.seats?.length||0,pendingCount:y,expiresAt:this.holdExpiresAt,releasing:this.releasingHold});this.els.holdTitle&&(this.els.holdTitle.textContent=g.title),this.els.holdCopy&&(this.els.holdCopy.textContent=g.copy);let w=this.els.holdChange;w&&(w.disabled=this.releasingHold,w.textContent=g.change)}a!==x&&this.animateOnce(this.els.count,"sl-value-pop",380),o!==S&&this.animateOnce(this.els.total,"sl-value-pop",380),x===0&&a>0&&(this.animateOnce(this.els.cta,"sl-ready",520),this.sideCollapsed&&this.root?.dataset.layout!=="narrow"&&this.setPanelCollapsed(!1)),this.renderPeek(a,o,y,a>x),this.lastTrayCount=a,this.lastTrayTotal=o,this.opts.onSelectionChange?.(e),this.emitSelectionValidity(a,e)}emitSelectionValidity(e,t){let i=this.controller.getSelectionValidity(e);i&&(i.seats=t,this.opts.onSelectionValidityChange?.(i),i.isValid?this.lastSelectionValidity!==!0&&this.opts.onSelectionValid?.(t):this.lastSelectionValidity!==!1&&this.opts.onSelectionInvalid?.(i),this.lastSelectionValidity=i.isValid)}renderPeek(e,t,i,r=!1){if(!this.els.peek)return;let n=(this.controller.doc?.categories??[]).map(o=>this.catPrice(o)).filter(o=>o!=null);this.els.peek.innerHTML=fn({count:e,total:t,pendingCount:i,ctaPhase:this.ctaPhase,hasHold:!!this.hold,salesClosed:this.salesClosed,suppressPricing:this.suppressPricing,fromPrice:n.length?Math.min(...n):null,addMore:this.root?.dataset.layout==="narrow"?null:mn({salesClosed:this.salesClosed,hasHold:!!this.hold,ctaPhase:this.ctaPhase,formOpen:this.baReopen||this.bestAvailableBusy||this.bestAvailableConfirm,room:this.maxTickets-this.totalTicketCount(),wanted:this.baQty}),holdTime:this.hold&&this.holdTimer?Mt(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)}async removeHeldLabels(e,t){let i=e.filter(o=>o&&!this.releasingLabels.has(o));if(!i.length)return!1;let r=i[0];i.forEach(o=>this.releasingLabels.add(o)),t?.setAttribute("aria-busy","true");let n=t?.querySelector(".rm");n&&(n.disabled=!0);try{let o=this.handedOff;if(!await this.controller.releaseLabels(i))return this.toast(M("picker.couldNotRemoveLabel",{label:r}),"error"),!1;$s(this.gaQty,this.hold?.items??[],i);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(),this.toast(M("picker.labelRemovedFromHold",{label:r}),"success"),!0}finally{i.forEach(o=>this.releasingLabels.delete(o)),t?.removeAttribute("aria-busy"),n?.isConnected&&(n.disabled=!1)}}async handleChangeSeats(){if(!this.hold||this.releasingHold)return;this.releasingHold=!0;let e=this.els.holdChange;e&&(e.disabled=!0,e.textContent=this.tf("picker.releasingEllipsis","Releasing\u2026"));try{await this.release(),this.hold||this.toast(this.tf("picker.heldTicketsReleased","Held tickets released. Choose your new seats."),"success")}finally{this.releasingHold=!1,e?.isConnected&&(e.disabled=!1,e.textContent=this.tf("picker.change","Change"))}}async handleCta(){if(this.salesClosed)return;let e=this.controller.getSelectionValidity(this.totalTicketCount());if(e&&!e.isValid){this.toast(ts(e,(i,r)=>this.tf(i,r)),"warning");return}if(this.totalTicketCount()>this.maxTickets){this.toast(M("picker.removeTicketsUntilOrFewer",{count:this.maxTickets}),"warning");return}let t=this.committedSelection();if(this.hold&&!t.some(i=>!(this.hold.items??[]).some(r=>r.label===i.label))){let i=this.hold.seats??t;this.handedOff=!0,this.setCtaPhase("checkout"),this.checkoutHandoff(this.hold,i);return}this.holdingLabels=new Set(t.map(i=>i.label)),this.setCtaPhase("holding");try{let i=null,r=Rs(this.gaQty),n=this.committedSelection();if(n.length){let o=await this.controller.hold(void 0,this.opts.holdTtlMs);i=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});i=c?{holdId:c.holdId,expiresAt:c.expiresAt,seats:c.seats,items:c.items}:i}if(!i){this.toast(this.tf("picker.seatsJustTaken","One or more seats were just taken. Please pick again."),"error"),this.setCtaPhase("idle"),this.syncTray();return}this.hold=i,this.handedOff=!this.performanceGroup,this.startHoldTimer(i.expiresAt),this.flashHeldSeats(i),this.setCtaPhase(this.performanceGroup?"idle":"checkout"),this.emitHoldChange(),this.performanceGroup||this.checkoutHandoff(i,i.seats??n)}catch(i){this.opts.onError?.(i);let r=i,n=(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."):n.length?n.length===1?M("picker.labelsNoLongerAvailable.one",{labels:n.join(", ")}):M("picker.labelsNoLongerAvailable.other",{labels:n.join(", ")}):this.tf("picker.seatsJustTaken","One or more seats were just taken. Please pick again.");this.toast(o,"error"),this.setCtaPhase("idle")}finally{this.holdingLabels.clear(),this.ctaPhase==="holding"&&(this.ctaPhase="idle"),this.syncTray()}}startHoldTimer(e){this.stopHoldTimer(),this.holdExpiresAt=e,this.hold&&this.rememberHold(this.hold);let t=this.els.hold;t.innerHTML=`<span class="sl-hold-dot" aria-hidden="true"></span><span>${this.tf("picker.held","Held")}</span><span class="sl-hold-time" data-ref="holdTime"></span>`;let i=t.querySelector('[data-ref="holdTime"]');this.els.holdNote?.classList.add("on");let r=()=>{let n=Math.max(0,this.holdExpiresAt-Date.now());i&&(i.textContent=Mt(n));let o=this.els.peek?.querySelector(".sl-peek-time");o&&(o.textContent=Mt(n)),!this.holdCopyPending&&this.els.holdCopy&&this.root?.dataset.layout!=="narrow"&&(this.els.holdCopy.textContent=ss(this.holdExpiresAt)),t.classList.add("on"),t.classList.toggle("is-expiring",n>0&&n<=io),this.setExtendPrompt(n>0&&n<=io,n),(n<=0||!this.controller.currentHold())&&this.stopHoldTimer()};this.holdTimer=setInterval(r,500),r()}stopHoldTimer(){this.holdTimer&&clearInterval(this.holdTimer),this.holdTimer=null,this.els.hold?.classList.remove("on","is-expiring"),this.els.holdNote?.classList.remove("on"),this.root&&delete this.root.dataset.peekClock,this.setExtendPrompt(!1,0)}setExtendPrompt(e,t){if(this.extendEl)if(e&&this.controller.currentHold()&&!this.bookedShown){let i=Math.ceil(t/1e3),r=Math.floor(i/60),n=String(i%60).padStart(2,"0");this.els.extendTxt.innerHTML=M("picker.seatsHeldForNeedMoreTime",{time:`${r}:${n}`}),this.extendEl.classList.add("on")}else this.extendEl.classList.remove("on")}async handleExtend(){let e=this.els.extendBtn;e.disabled=!0;let t=e.textContent;e.textContent=this.tf("picker.addingEllipsis","Adding\u2026");try{let i=await this.controller.extendHold(this.opts.holdTtlMs);i?(this.hold={holdId:i.holdId,expiresAt:i.expiresAt,seats:i.seats,items:i.items},this.holdExpiresAt=i.expiresAt,this.extendEl?.classList.remove("on"),this.rememberHold(this.hold),this.emitHoldChange(),this.toast(this.tf("picker.moreTimeAdded","More time added \u2014 your seats are still held."),"success")):this.toast(this.tf("picker.couldNotAddMoreTime","Couldn't add more time \u2014 please head to checkout now."),"warning")}catch(i){this.opts.onError?.(i),this.toast(this.tf("picker.couldNotAddMoreTime","Couldn't add more time \u2014 please head to checkout now."),"warning")}finally{e.disabled=!1,e.textContent=t}}detectBooked(){this.bookedShown||!this.handedOff||!this.hold||this.controller.currentHold()===null&&this.showBooked()}showBooked(){if(this.bookedShown||!this.hold)return;this.bookedShown=!0;let e=this.buildHandoff(this.hold);this.stopHoldTimer(),this.forgetHold();let t=e.lineItems.reduce((r,n)=>r+n.quantity,0),i=this.performanceGroup?.groupSelectionSummary?.();this.els.bookedSub&&(this.els.bookedSub.innerHTML=i?.seats?`<span class="sl-booked-seats">${rt("picker.group.ticketsConfirmedAcross",i.seats,{performances:i.performances})}</span>`:`<span class="sl-booked-seats">${rt("picker.ticketsCount",t)}</span> ${this.tf("picker.confirmedAndOnWay","confirmed. A confirmation is on its way.")}`),this.bookedEl?.classList.add("on"),this.opts.onBooked?.(e)}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()}checkoutHandoff(e,t){if(this.checkoutMode==="hosted"){this.startHostedCheckout(e,t);return}this.opts.onCheckout?.(e,t,this.buildHandoff(e))}async startHostedCheckout(e,t){let i=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 n=r?.providers?.[0];if(!n){let o=Xs(r?.reason),a=!!this.opts.onCheckoutUnavailable||!!this.opts.onCheckout;this.opts.onCheckoutUnavailable?.({reason:o,handoff:i}),this.opts.onCheckout?.(e,t,i),a||this.openCheckoutPanel({kind:"unavailable",reason:o,seatCount:i.lineItems.reduce((l,c)=>l+c.quantity,0)});return}await this.openCheckoutPanel({kind:"pay",provider:n,order:{holdId:i.holdId,expiresAt:i.expiresAt,currency:i.currency,total:i.total,labels:i.lineItems.map(o=>o.displayLabel??o.label)}})}async openCheckoutPanel(e){let t;try{({mountCheckout:t}=await Qs())}catch(i){this.opts.onError?.(i),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:i=>this.money(i),startSession:i=>this.pubApi.startCheckout(this.opts.event,{...i,...this.opts.returnUrl?{returnUrl:this.opts.returnUrl}:{}}),orderStatus:i=>this.pubApi.orderStatus(i),onCancel:()=>{this.checkoutPanel=null,this.hold||this.setCtaPhase("idle")},onConfirmed:i=>{this.opts.onOrderConfirmed?.(i),this.controller.refresh()},onError:i=>this.opts.onError?.(i)}))}closeCheckoutPanel(){this.checkoutPanel?.destroy(),this.checkoutPanel=null}buildHandoff(e){let i=(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=i[0]?.currency??this.currency,n=i.reduce((o,a)=>o+a.unitPrice*a.quantity,0);return{holdId:e.holdId,expiresAt:e.expiresAt,currency:r,lineItems:i,total:n}}emitHoldChange(){let e=this.hold;this.scheduleOfferRefresh(!0),this.opts.onHoldChange?.(e,e?.seats??[],e?this.buildHandoff(e):null)}toast(e,t="neutral",i){let r=this.els.toast;if(!r)return;r.replaceChildren();let n=document.createElement("span");if(n.textContent=e,r.appendChild(n),r.classList.toggle("has-action",!!i),i){let o=document.createElement("button");o.type="button",o.className="sl-toast-action",o.textContent=i.label,o.addEventListener("click",i.onClick,{once:!0}),r.appendChild(o)}r.dataset.tone=t,r.classList.add("on","sl-mo-rise"),this.toastTimer&&clearTimeout(this.toastTimer),this.toastTimer=setTimeout(()=>{r.classList.remove("on","sl-mo-rise"),r.classList.remove("has-action"),r.dataset.tone="neutral"},4200)}dismissSkeleton(){Xr({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},i=this.tipPinned?Yn(this.tipPos,e,t):null,r=i??Wn(this.tipPos,e.width,e.height,t);this.tipEl.style.left=`${r.left}px`,this.tipEl.style.top=`${r.top}px`,i?this.tipEl.dataset.placement=i.placement:delete this.tipEl.dataset.placement}nightStripFor(e,t){let i=this.performanceGroup,r=os(e.mark,i?.nights?.()),n=r?.states.filter(o=>o.free).length??0;return Dn(r,{locale:this.opts.locale,switchLabel:i?.selectionModeSwitch?.label??null,selectPartialLabel:i?.partialSeatSelection?.label(n)??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.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 i=this.unavailableReason(e),r=e.mark?.kind==="partial"&&(e.interaction==="press"||this.lastPointerType!=="mouse"||t)||!!i&&e.interaction==="press";this.tipMarkedHoverLabel=e.mark?.kind==="partial"?e.label:null;let n=this.nightStripFor(e,r);this.tipEl.style.setProperty("--sl-cat",e.categoryColor),this.tipEl.innerHTML=Un(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:st(e),reason:i,extra:n+(r?`<button type="button" class="sl-tip-close" data-pg-tip-close aria-label="${R(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()}),Xn(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 i={};for(let[r,n]of Object.entries(e())){let o=this.controller.idForLabel(r);o&&(i[o]=n)}Object.keys(i).length&&t.setSeatMarks(i)}getSelection(){return this.committedSelection()}selectObjects(e){return this.controller.select(e)}selectObjectsWithoutConfirmation(e){let t=new Set(e),i=this.controller.getSelection().filter(r=>t.has(r.id)||t.has(r.label));if(i.length===t.size)return i;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,!1)}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=Dt(this.themeMode),i=ut(this.controller.doc?.theme,this.opts.theme,t);for(let[r,n]of Object.entries(i))e.style.setProperty(r,n);t?e.dataset.theme=t:delete e.dataset.theme,this.applyMapChromeTokens()}watchThemeMode(){this.colorSchemeStop?.(),this.colorSchemeStop=null,this.themeMode==="auto"&&(this.colorSchemeStop=Bt(()=>{this.destroyed||this.repaintForThemeMode()}))}repaintForThemeMode(){this.root&&(this.applyThemeTokens(this.root),this.controller.setMapTheme(qe(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:Dt(e)??null}))}getThemeMode(){return this.themeMode}applyMapChromeTokens(){let e=this.els.map?.parentElement;if(!e||!this.root)return;let t=Dt(this.themeMode),i=ut(this.controller.doc?.theme,this.opts.theme,t),r=qe(this.opts.theme,this.themeMode)?.background??this.controller.doc?.theme?.background??void 0,n=Ss(i,r);for(let o of["--sl-bg","--sl-surface","--sl-text","--sl-muted","--sl-line","--sl-accent-text"])n?e.style.setProperty(o,n[o]):e.style.removeProperty(o)}setEventDetailsHidden(e){this.eventDetailsHidden=e,this.syncFullscreenButtons()}setPricing(e){let t=JSON.stringify(this.opts.pricing??null),i=JSON.stringify(e??null);t!==i&&(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=Tr(e,{languages:this.opts.languages,label:this.tf("picker.preferredTicketType","Language"),onChange:t=>{this.setLocale(t)}})}async setLocale(e){let t=Vl(),i=this.localeGeneration+=1,r=await Nl(e);return this.opts.messages&&zl(this.opts.messages),r===t||this.applyActiveLocale(r,i),r}applyActiveLocale(e,t){t===this.localeGeneration&&this.root&&Cr(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})}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(),Wl(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"}getBuyerView(){return this.buyerView}setBuyerView(e,t){if(e==="map"){this.exit3d();return}let i=t?.flyToSeatId;if(this.buyerView==="venue3d"){i?(this.opts.onBuyerViewChange?.({view:"venue3d",seatId:i}),this.view3dHandle?.flyToSeat(i)):t?.resetView&&this.view3dHandle?.focusOverview();return}this.enter3d(i)}seatState3dFor(e){switch(this.controller.getStatus(e.id)){case"held":return"held";case"booked":return"sold";case"not_for_sale":return"dimmed";default:break}return this.priceBandKeys!=null&&!this.priceBandKeys.has(e.categoryKey)||this.limitedViewFilter&&(e.commercial?.restrictedView||e.commercial?.obstructedView)?"dimmed":"available"}pushAvailabilityTo3d(){if(!this.view3dHandle)return;let e=this.allSeats().map(t=>({seatId:t.id,state:this.seatState3dFor(t)}));this.view3dHandle.setAvailability(e)}syncSelectionTo3d(){this.view3dHandle&&this.view3dHandle.setSelection(this.controller.getSelection().map(e=>e.id))}async seatViewFor3d(e){let t=this.allSeats().find(i=>i.id===e);if(!t)return null;if(t.viewUrl)try{let i=t.viewMeta?.previewUrl,r=!!i&&i!==t.viewUrl,n=r?await this.buyerAssetUrls.resolve(i):null,o=r?t.viewUrl:await this.buyerAssetUrls.resolve(t.viewUrl);return!o||r&&!n?null:{url:o,...n?{previewUrl:n}:{},...r?{resolveUrl:a=>this.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(i){return this.opts.onError?.(i),null}return{url:"",generated:!0,mediaKind:"model",coverage:"exact-seat",sourceLabel:this.tf("picker.chartDerivedModel","Chart-derived model")}}emitAnalytics(e,t){try{this.opts.onAnalytics?.(e,{...t,surface:"buyer"})}catch{}}emit3dAnalytics(e,t){this.emitAnalytics(e,t)}onView3dSeatPick(e){if(this.salesClosed){this.toast(this.tf("picker.salesClosedToast","Sales are closed for this event."),"warning"),this.syncSelectionTo3d();return}let t=this.allSeats().find(a=>a.id===e);if(!t)return;let i=this.controller.tableSelection(e);if(this.committedSelection().some(a=>i?a.label===i.label:a.id===e)){this.controller.deselect([e]),this.dismissConfirm(),this.syncSelectionTo3d();return}let n=this.controller.getStatus(t.id);if(n==="held"||n==="booked"||n==="not_for_sale"){this.showUnavailable3dSeat(t,this.seatState3dFor(t),n),this.syncSelectionTo3d();return}if(this.dismissUnavailable3dSeat(),!this.controller.select([e]).length){this.syncSelectionTo3d(),this.dismissConfirm();return}if(this.opts.onBuyerViewChange?.({view:"venue3d",seatId:e}),this.flashPickedSeat(e),i){this.showTableDialog(i,!1),this.syncSelectionTo3d();return}this.opts.confirmSelection!==!1?this.showConfirm(t):this.syncTray(),this.syncSelectionTo3d()}seatViewCaption(e){let t=this.allSeats().find(i=>i.id===e);return Yr(this.controller.seatDetails(e),t?.displayLabel??t?.label??e,this.tf("picker.viewFromYourSeat","view from your seat"),{narrow:this.root?.dataset.layout==="narrow",shortTail:this.tf("picker.fromYourSeat","from your seat")})}showUnavailable3dSeat(e,t,i){let r=this.view3dEl;if(!r)return;let n=this.controller.seatDetails(e.id),o=n?.displayLabel??e.displayLabel??e.label,a=q(n);dn(r,{status:i,visualState:t,location:[n?.sectionLabel,a?M("picker.rowLabel",{label:a}):null,o].filter(Boolean).join(" \xB7 ")||o,tf:(l,c)=>this.tf(l,c)}),this.announceSeat(e)}dismissUnavailable3dSeat(){es(this.view3dEl)}saveView3dComparisonSeat(e){if(this.buyerView!=="venue3d")return;let t=this.view3dCompareSeatIds;t.includes(e.id)||(this.view3dCompareSeatIds=t.length===0?[e.id]:[t[0],e.id]),this.confirmSeat?.id===e.id&&(this.controller.deselect([e.id]),this.dismissConfirm(),this.syncSelectionTo3d(),this.syncTray()),this.view3dCompareChip.sync(),this.emit3dAnalytics("3d_comparison_saved",{seatId:e.id,count:this.view3dCompareSeatIds.length}),this.view3dCompareSeatIds.length>1?this.openView3dComparison():this.toast(this.tf("picker.chooseAnotherToCompare","Seat saved. Choose another seat to compare."),"success")}clearView3dComparison(){this.closeView3dComparison(!1),this.view3dCompareSeatIds=[],this.view3dCompareChip.remove(),this.emit3dAnalytics("3d_comparison_cleared")}view3dComparisonSnapshot(e){let t=this.allSeats().find(u=>u.id===e);if(!t)return null;let i=this.controller.seatDetails(t.id),r=this.controller.doc?.categories.find(u=>u.key===t.categoryKey),n=i?.price??(r?.tiers?.length?r.tiers[0].price:r?.price),o=n!=null?this.paidPrice(t.categoryKey,i?.tierId??r?.tiers?.[0]?.id??null,n,t.label):void 0,a=this.controller.getStatus(t.id),l=a==="held"?this.tf("picker.temporarilyHeld","Temporarily held"):a==="booked"?this.tf("picker.sold","Sold"):a==="not_for_sale"?this.tf("picker.notForSale","Not for sale"):this.tf("picker.available","Available"),c=t.viewUrl?to({url:t.viewUrl,...t.viewMeta?.coverage?{coverage:t.viewMeta.coverage}:{},...t.viewMeta?.capturedAt?{capturedAt:t.viewMeta.capturedAt}:{},...t.viewMeta?.sourceLabel?{sourceLabel:t.viewMeta.sourceLabel}:{}}):this.tf("picker.chartDerivedSeatEye","Live 3D \xB7 chart-derived seat-eye \xB7 not surveyed"),p=we(t.commercial)||this.tf("picker.noAuthoredRestriction","No organizer-authored restriction"),d=i?.wheelchairSpaceType?`${it(i.wheelchairSpaceType)} \xB7 metadata, not access certification`:this.tf("picker.noAccessibilityMetadata","No accessibility metadata supplied"),m=jl(t.confidenceEvidence);return{seat:t,label:i?.displayLabel??t.displayLabel??t.label,section:i?.sectionLabel??t.sectionId??"\u2014",row:q(i)??i?.rowLabel??"\u2014",category:i?.categoryLabel??r?.label??t.categoryKey,price:this.suppressPricing||o==null?"":this.money(o),availability:l,selectable:a==null||a==="free",viewSource:c,limited:p,accessibility:d,confidence:m}}openSeatConfidencePassport(e,t=null){Ji(this,e,t)}closeSeatConfidencePassport(e=!0){Pt(this,e)}openView3dComparison(){cn(this)}closeView3dComparison(e=!0){Ve(this,e)}async enter3d(e){if(this.view3dEl||!this.canOffer3d()||!this.els.map)return;let t=this.controller.doc;if(!t)return;this.buyerView="venue3d",this.view3dTargetSeatId=null,this.opts.onBuyerViewChange?.({view:"venue3d",...e?{seatId:e}:{}}),this.root?.setAttribute("data-view3d","on"),this.dismissConfirm(),this.syncProjection(),this.syncTray();let i=document.createElement("div");i.className="sl-view3d sl-mo-zoom",i.setAttribute("role","group"),i.setAttribute("aria-label",this.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>${this.tf("picker.backToMap","Back to map")}</span>`;let n=r.querySelector("span"),o=c=>{this.view3dTargetSeatId=c;let p=!!c;i.classList.toggle("is-seat-focused",p);let d=p?this.tf("picker.backToVenue","Back to venue"):this.tf("picker.backToMap","Back to map");n&&(n.textContent=d),r.setAttribute("aria-label",d)};if(r.addEventListener("click",()=>{if(this.view3dTargetSeatId&&this.view3dHandle){this.view3dHandle.focusOverview();return}this.exit3d()}),i.appendChild(r),Kr(this.root)){let c=document.createElement("button");c.type="button",c.className="sl-view3d-fs",c.textContent="\u26F6",c.setAttribute("aria-label",this.tf("picker.fullScreen","Full screen")),c.setAttribute("aria-pressed",String(!!document.fullscreenElement||this.fsFallback||this.framedFs)),c.addEventListener("click",()=>this.toggleFullscreen()),i.appendChild(c)}let a=document.createElement("div");a.className="sl-view3d-loading",a.setAttribute("role","status"),a.setAttribute("aria-live","polite"),a.textContent=this.tf("picker.loading3d","Building the 3D venue\u2026"),i.appendChild(a),this.els.map.appendChild(i),this.view3dEl=i,this.view3dCompareChip.sync(),requestAnimationFrame(()=>{i.style.opacity="1"});let l=++this.view3dGen;try{let c=this.allSeats(),[p,d]=await Promise.all([kt(),this.controller.loadEventConfiguration()]),m=d?await Wt(d,S=>this.buyerAssetUrls.resolve(S)):null,u=t.theme?.venue3d?.shellAssetUrl,b=await Yt(u,S=>this.buyerAssetUrls.resolve(S));if(l!==this.view3dGen||this.buyerView!=="venue3d"||this.view3dEl!==i)return;let h={doc:t,seats:c,...m?{eventConfigurationId:m.id,eventConfiguration:m}:{},...b?{registeredShellGlb:b}:{}};a.textContent=this.tf("picker.building3d","Building venue geometry\u2026");let y=await p.prepareVenue3D(h);if(l!==this.view3dGen||this.buyerView!=="venue3d"||this.view3dEl!==i)return;let x=p.mountVenue3D(i,{...h,prepared:y},{portraitOverviewCrop:!0,arriveAtSeatEye:!0,seatViewActionLabel:S=>this.allSeats().find(A=>A.id===S)?.viewUrl?this.tf("picker.openAuthored360","Open venue 360\xB0"):this.tf("picker.lookAroundLive3d","Look around in live 3D"),seatViewCaption:S=>this.seatViewCaption(S),onSeatViewStopChange:S=>this.view3dSeatViewChrome?.onStopChange(S),onSeatPick:S=>this.onView3dSeatPick(S),onSeatInspect:S=>this.onView3dSeatPick(S),onSectionFocusChange:S=>{let A=i.querySelector('select[data-locator="section"]'),g=S??"";!A||A.value===g||(A.value=g,A.dispatchEvent(new Event("change")))},onViewTargetChange:S=>{i.querySelector(".sl-view3d-nav")?.classList.toggle("is-seat-focused",!!S),o(S),this.opts.onBuyerViewChange?.({view:"venue3d",...S?{seatId:S}:{}})},...this.seatViewEnabled()?{getSeatView:S=>new Promise((A,g)=>{let w=()=>{this.seatViewFor3d(S).then(L=>{L?A(L):g(new Error("seat_view_unavailable"))})},E=globalThis.requestIdleCallback;typeof E=="function"?E(w,{timeout:1500}):setTimeout(w,50)})}:{},onAnalytics:(S,A)=>this.emit3dAnalytics(S,A)});this.view3dHandle=x,this.view3dSeatViewChrome=Wr(i,{handle:()=>this.view3dHandle}),requestAnimationFrame(()=>a.remove()),this.pushAvailabilityTo3d(),this.syncSelectionTo3d(),qr(i,x),e&&x.flyToSeat(e)}catch(c){if(l!==this.view3dGen||this.buyerView!=="venue3d"||this.view3dEl!==i)return;this.opts.onError?.(c),this.toast(this.tf("picker.unavailable3d","3D could not start. The seat map is still available."),"warning"),this.exit3d()}}exit3d(){if(this.buyerView!=="venue3d"&&!this.view3dEl)return;this.view3dGen++,this.buyerView="map",this.view3dTargetSeatId=null,this.opts.onBuyerViewChange?.({view:"map"}),this.root?.removeAttribute("data-view3d"),this.closeSeatConfidencePassport(!1),this.closeView3dComparison(!1),this.view3dCompareChip.remove(),this.view3dSeatViewChrome?.dispose(),this.view3dSeatViewChrome=null;try{this.view3dHandle?.dispose()}catch{}this.view3dHandle=null;let e=this.view3dEl;this.view3dEl=null,e&&(e.style.opacity="0",setTimeout(()=>e.remove(),320)),this.syncProjection(),this.syncTray();let t=this.view3dReturnSeat;this.view3dReturnSeat=null,t&&this.committedSelection().some(i=>i.id===t.id)&&this.opts.confirmSelection!==!1&&this.showConfirm(t)}getCurrentHold(){return this.hold}async resumeHold(e){return this.resumeHoldFromServer(e,!1)}async removeHeldTicket(e){return this.removeHeldLabels([e])}async bestAvailable(e,t,i={}){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,i)}catch(r){this.opts.onError?.(r);let n=r?.reason,o=n==="not_enough_together"?M("picker.couldNotFindSeatsTogether",{count:e}):n==="companion_pair_required"?this.tf("picker.companionPairRequired","Select the adjacent wheelchair place with each companion ticket."):n==="ticket_option_not_applicable"?this.tf("picker.ticketOptionNotApplicable","That ticket choice is not available for the selected seat."):n==="sold_out"?this.tf("picker.ticketTypeSoldOut","That ticket type is sold out. Try another ticket type."):n==="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,i={}){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 n=await this.controller.bestAvailable(e,t,{...i,ttlMs:this.opts.holdTtlMs});return n?(this.hold={holdId:n.holdId,expiresAt:n.expiresAt,seats:n.seats,items:n.items},this.handedOff=!1,this.bookedShown=!1,this.gaQty.clear(),this.startHoldTimer(n.expiresAt),this.flashHeldSeats(this.hold),this.syncTray(),this.emitHoldChange(),i.preferPremium&&n.seats.length&&!n.seats.every(o=>o.commercial?.premium)&&this.toast(M("picker.premiumFallbackNote",{count:e}),"neutral"),this.hold):null}finally{this.bestAvailableBusy=!1,this.syncTray()}}async release(){let e=this.hold,t=this.controller.currentHold(),i=!0;if(t)i=await this.controller.release();else if(e){let r=[...new Set([...(e.items??[]).map(n=>n.label),...(e.seats??[]).map(n=>n.label)])];if(r.length)try{await this.api.release(this.opts.event,r,e.holdId)}catch(n){this.opts.onError?.(n),i=!1}}if(!i){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 ge({url:this.pubApi.subscribeUrl(e),mintTicket:()=>this.pubApi.subscribeTicket(e),onAccessUnavailable:t=>{this.opts.onAccessUnavailable?.(t),this.showAccessPanel(t)},sink:mt(this.controller,{flashOnLiveChange:!0,onStatusChange:()=>{this.syncPrices(),this.scheduleOfferRefresh(!0),this.detectBooked(),this.minimap?.refreshMinimap(),this.pushAvailabilityTo3d()},onSelectedObjectUnavailable:(t,i)=>{this.opts.onSelectedObjectUnavailable?.({labels:t,reason:i}),this.syncTray(),this.toast(i==="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)}showAccessPanel(e){if(this.destroyed||!this.root)return;this.dismissAccessPanel();let t=Nr(e.reason,()=>this.refreshAccess());(this.root.querySelector(".sl-body")??this.root).appendChild(t),this.accessEl=t}dismissAccessPanel(){this.accessEl?.remove(),this.accessEl=null}destroy(){this.destroyed=!0,Wi(this),this.colorSchemeStop?.(),this.colorSchemeStop=null,this.realtime?.stop(),this.realtime=null,this.dismissAccessPanel(),this.access?.clear(),this.hold&&!this.handedOff&&this.controller.release(),this.closeConfirm(),this.dismissTableDialog(!1),ve(this,!1),this.closeSeatView(),this.closeCheckoutPanel(),this.exit3d(),this.buyerAssetUrls.dispose(),this.stopHoldTimer(),this.detachAttention?.(),this.toastTimer&&clearTimeout(this.toastTimer),this.liveTimer&&clearTimeout(this.liveTimer),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)}};import{formatMoney as oc,loadLocale as ac,setStringOverrides as lc,t as cc}from"@seatlayer/core";var no="seatlayer-performance-group-picker-style";function oo(){if(document.getElementById(no))return;let s=document.createElement("style");s.id=no,s.textContent=`
2644
+ }`,e.append(t);let i="linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.10) 37%, rgba(255,255,255,0.04) 63%)",n=document.createElement("div");Object.assign(n.style,{position:"absolute",inset:"0",display:"flex",flexDirection:"column",padding:"16px",gap:"14px",opacity:"0.9"});let r=c=>{let p=document.createElement("div");return p.className="sl-shimmer",Object.assign(p.style,{background:i,borderRadius:"8px"}),Object.assign(p.style,c),p};n.append(r({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(r({width:"220px",height:"100%",flex:"0 0 auto"})),o.append(r({flex:"1 1 auto",height:"100%"})),n.append(o),e.append(n);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:i,flex:"0 0 auto"}),a.append(l),a.append(document.createTextNode("Loading designer\u2026")),e.append(a)}buildErrorCard(e,t){let i=za[t],n=document.createElement("div");Object.assign(n.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=i.title,Object.assign(r.style,{margin:"0 0 8px",fontSize:"17px",fontWeight:"600",color:"#f4f7ff"});let o=document.createElement("p");o.textContent=i.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()),n.append(r,o,a),e.append(n)}};import{PickerController as ql,formatMoney as Kl,generateSeatThumb as Ul,getLocale as to,loadLocale as Wl,setStringOverrides as Yl,t as M,tCount as Fe}from"@seatlayer/core";import{isAuthoredSeatView as Ql,seatViewDisclosure as io}from"@seatlayer/core/view3d/crossfade/panorama";import{seatConfidenceDisclosure as Xl}from"@seatlayer/core/core/seatConfidence";function xn(s){return s?.previousPrice!=null&&s.previousPrice>s.price?s.previousPrice:null}function wn(s){return ja(s)+(s.moreLabel?`<button type="button" class="sl-price-more" aria-expanded="${!s.collapsed}">${s.esc(s.moreLabel)}</button>`:"")+Ga(s.status)}function ja(s){let{esc:e,money:t}=s;return s.categories.map(i=>{let n=s.priceOf(i),r=s.rangeOf(i),o=s.offerOf(i.key),a=xn(o),l=s.activeKey===i.key;return`<div class="sl-price-row${s.bandKeys!=null&&!s.bandKeys.has(i.key)?" sl-dim":""}${l?" sl-active":""}" data-cat="${e(i.key)}" role="button" tabindex="0" aria-pressed="${l}" title="${e(s.titleFor(i,l))}"><span class="sl-dot" style="--sl-cat-dot:${e(s.colorOf(i))}"></span><span class="sl-price-label">${e(i.label)}`+(o?.offerName?`<small class="sl-price-offer">${e(o.offerName)}</small>`:"")+`</span><span class="sl-price-left">${e(s.leftCount(s.left[i.key]??0))}</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>`:n!=null?`<span class="sl-price-amt">${e(t(n))}</span>`:"")+"</div>"}).join("")}function Ga(s){let e=t=>t.replace(/[&<>"']/g,i=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[i]);return`<div class="sl-status-key" aria-label="${e(s.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(s.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(s.sold)}</span></div>`}function Fi(s){let e=Math.abs(s.scrollLeft),t=e>2,i=e+s.clientWidth<s.scrollWidth-2;return s.dataset.fadeStart=String(t),s.dataset.fadeEnd=String(i),{start:t,end:i}}function kn(s){let{esc:e,money:t}=s;return`<button type="button" class="sl-rc sl-rc-all" data-rail-all aria-pressed="${s.allActive}" title="${e(s.allWord)}"><span class="sl-rc-t">${e(s.allWord)}</span></button>`+s.categories.map(n=>{let r=s.rangeOf(n),o=s.priceOf(n),a=r?r.min===r.max?t(r.min):`${t(r.min)}+`:o!=null?t(o):null,l=Object.prototype.hasOwnProperty.call(s.left,n.key)&&s.left[n.key]<=0,c=xn(s.offerOf(n.key)),p=a?`${n.label} \u2014 ${a}${l?` (${s.soldOutWord})`:""}`:n.label;return`<button type="button" class="sl-rc" data-cat="${e(n.key)}" aria-pressed="${s.activeKey===n.key}" aria-label="${e(p)}" title="${e(p)}"${l?" disabled":""}><i class="sl-rc-dot" style="--sl-cat-dot:${e(s.colorOf(n))}"></i>`+(c!=null?`<span class="sl-rc-was">${e(t(c))}</span>`:"")+`<span class="sl-rc-t">${e(a??n.label)}</span></button>`}).join("")}function Sn(s,e){let t=s.map(a=>({key:a.key,range:e.rangeOf(a)})).filter(a=>a.range!=null);if(!t.length)return[];let i=[...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(i.length<=5)return i.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 n=[...t].sort((a,l)=>a.range.min-l.range.min||a.range.max-l.range.max),r=Math.ceil(n.length/4),o=[];for(let a=0;a<n.length;a+=r){let l=n.slice(a,a+r),c=Math.min(...l.map(d=>d.range.min)),p=Math.max(...l.map(d=>d.range.max));o.push({id:`b${a}`,label:c===p?e.money(c):`${e.money(c)}\u2013${e.money(p)}`,keys:l.map(d=>d.key),min:c,max:p})}return o}var qa=["on-sale","low","sold-out","presale","closed"];function Et(s){return s==null?null:typeof s=="number"&&Number.isFinite(s)&&s>=0?s:void 0}function Cn(s){return s==null?null:typeof s=="number"&&Number.isFinite(s)&&s>=0?s:void 0}function Tn(s){if(s==null)return null;if(typeof s!="object"||Array.isArray(s))return;let e=s,t=e.count,i=e.index;if(typeof i!="number"||!Number.isInteger(i)||i<1||typeof t!="number"||!Number.isInteger(t)||t<i)return;let n=e.remaining;if(n!=null&&(typeof n!="number"||!Number.isInteger(n)||n<0))return;let r={index:i,count:t,remaining:n??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 o of["startsAt","endsAt"]){if(e[o]===void 0)continue;let a=Cn(e[o]);if(a===void 0)return;r[o]=a}return r}function Ka(s){if(s==null)return null;if(typeof s!="object"||Array.isArray(s))return;let e=s;if(!Number.isInteger(e.assignmentVersion)||e.assignmentVersion<0||!Array.isArray(e.channels)||!Array.isArray(e.objects))return;let t=[],i=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||i.has(l)||!Number.isInteger(a.pricingVersion)||a.pricingVersion<0||!Array.isArray(a.priceOverrides))return;let c=[],p=new Set;for(let d of a.priceOverrides){if(!d||typeof d!="object"||Array.isArray(d))return;let u=d,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,m=Et(u.price);if(!h||g===void 0||m===void 0||m===null)return;let v=`${h}\0${g??""}`;if(p.has(v))return;p.add(v),c.push({categoryKey:h,tierId:g,price:m})}i.add(l),t.push({channelId:l,pricingVersion:a.pricingVersion,priceOverrides:c})}let n=[],r=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||r.has(l)||!i.has(c))return;r.add(l),n.push({label:l,channelId:c})}return{assignmentVersion:e.assignmentVersion,channels:t,objects:n}}function zi(s){if(!s||typeof s!="object"||Array.isArray(s))return null;let e=s,t=qa.find(p=>p===e.state);if(!t)return null;let i=Et(e.fromPrice),n=Et(e.previousPrice);if(i===void 0||n===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 o=Tn(e.release);if(o===void 0)return null;let a=e.upcoming===void 0?null:Tn(e.upcoming);if(a===void 0)return null;let l=[];if(e.prices!=null){if(!Array.isArray(e.prices))return null;let p=[];for(let d of e.prices){if(!d||typeof d!="object"||Array.isArray(d))return null;let u=d,h=typeof u.categoryKey=="string"?u.categoryKey.trim():"";if(!h)return null;let g=Et(u.price),m=Et(u.previousPrice);if(g==null||m===void 0)return null;let v={categoryKey:h,price:g,previousPrice:m};if(u.offerId!==void 0){if(typeof u.offerId!="string"||!u.offerId.trim())return null;v.offerId=u.offerId.trim()}if(u.offerName!==void 0){if(typeof u.offerName!="string"||!u.offerName.trim())return null;v.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;v.remaining=u.remaining==null?null:u.remaining}for(let k of["startsAt","endsAt"]){if(u[k]===void 0)continue;let S=Cn(u[k]);if(S===void 0)return null;v[k]=S}p.push(v)}l=p}let c=Ka(e.channelPricing);return c===void 0?null:{state:t,fromPrice:i,previousPrice:n,currency:r,release:o,upcoming:a,prices:l,channelPricing:c}}function En(s,e){if(!s)return null;let t=null,i=n=>{n!=null&&n>e&&(t===null||n<t)&&(t=n)};for(let n of[s.release,s.upcoming])i(n?.startsAt),i(n?.endsAt);for(let n of s.prices)i(n.startsAt),i(n.endsAt);return t}function ji(s){let e={};for(let t of s?.prices??[])e[t.categoryKey]=t.price;return e}import{compactRowLabel as Ua,t as Ne}from"@seatlayer/core";import{seatConfidenceDisclosure as Wa}from"@seatlayer/core/core/seatConfidence";function Gi(s){return String(s??"\u2014").replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[e])}function w(s){return String(s??"").replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[e])}function Se(s){return s?.restrictedView?y("picker.restrictedView","Restricted view"):s?.obstructedView?y("picker.obstructedView","Obstructed view"):""}function Pn(s){if(!s)return"";let e=[];s.premium&&e.push(`<div class="sl-cx-premium"><span class="sl-cx-star" aria-hidden="true">\u2605</span>${y("picker.premiumSeat","Premium seat")}</div>`);let t=Se(s);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>${s.note?`<span class="sl-cx-note">${w(s.note)}</span>`:""}</span></div>`):s.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">${w(s.note)}</span></span></div>`),e.length?`<div class="sl-cx">${e.join("")}</div>`:""}function qi(s){if(!s)return"";let e=[];if(s.premium){let i=w(y("picker.premiumSeat","Premium seat"));e.push(`<span class="sl-cx-mark sl-cx-mark-premium" role="img" aria-label="${i}" title="${i}">\u2605</span>`)}let t=Se(s);if(t){let i=w(s.note?`${t}: ${s.note}`:t);e.push(`<span class="sl-cx-mark sl-cx-mark-limited" role="img" aria-label="${i}" title="${i}">\u25D0</span>`)}else if(s.note){let i=w(s.note);e.push(`<span class="sl-cx-mark sl-cx-mark-info" role="img" aria-label="${i}" title="${i}">\u2139</span>`)}return e.join("")}function Ki(s){if(!s)return"";let e=[];s.premium&&e.push(`<span class="sl-chip-cx-tag premium"><span aria-hidden="true">\u2605</span>${y("picker.premiumSeat","Premium seat")}</span>`);let t=Se(s);return t&&e.push(`<span class="sl-chip-cx-tag limited"><span aria-hidden="true">\u25D0</span>${w(t)}</span>`),!e.length&&!s.note?"":'<div class="sl-chip-cx">'+(e.length?`<div class="sl-chip-cx-tags">${e.join("")}</div>`:"")+(s.note?`<div class="sl-chip-cx-note">${w(s.note)}</div>`:"")+"</div>"}function nt(s){return s==="no-seat"?y("picker.emptyWheelchairSpace","Empty wheelchair space"):s==="seat-present"?y("picker.accessiblePhysicalSeat","Accessible physical seat"):""}function Ln(s){let e=nt(s);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 si(s){let e=nt(s);return e?`<span class="sl-cx-mark" role="img" aria-label="${e}" title="${e}">\u267F</span>`:""}function Ui(s,e){if(!s)return"";let t=e?y("picker.viewFromThisSeat","View from this seat"):y("picker.seeItIn3d","See it in 3D");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>${t}</span></button>`}function Mn(s){if(!s)return"";let e=s.previous.label||s.previous.id,t=s.next.label||s.next.id;return`<span class="sl-seccard-nav" aria-label="${y("picker.browseSections","Browse sections")}"><button type="button" data-section-nav="${I(s.previous.id)}" aria-label="${y("picker.previousSection","Previous section")}: ${I(e)}" title="${I(e)}">\u2190</button><button type="button" data-section-nav="${I(s.next.id)}" aria-label="${y("picker.nextSection","Next section")}: ${I(t)}" title="${I(t)}">\u2192</button></span>`}function Hn(s,e){if(!e)return"";let t=e,i=t.includes(s.id),n=i?t.length>1?y("picker.openComparison","Open comparison"):y("picker.savedForComparison","Saved for comparison"):t.length?y("picker.compareWithSaved","Compare with saved"):y("picker.saveToCompare","Save to compare");return`<button type="button" class="sl-confirm-compare"${i&&t.length===1?" disabled":""}><span aria-hidden="true">\u21C4</span><span>${w(n)}</span></button>`}function In(s,e,t){if(!t)return"";let i=Wa(s.confidenceEvidence),n=i.modeledTarget??i.reality;return`<button type="button" class="sl-confirm-confidence" aria-label="Open seat confidence passport for ${w(s.displayLabel??s.label)}"><span><em>${w(e)}</em><strong>${w(i.headline)}</strong><small>${w(n)}</small></span><b>Passport</b></button>`}function U(s){let e=s?.rowLabel,t=s?.sectionLabel;if(!e||!t)return e;for(let i of["-"," ","\xB7","/","_"]){let n=`${t}${i}`;if(e.startsWith(n)&&e.length>n.length)return e.slice(n.length)}return Ua(e,t)}function Ya(s){switch(s){case"paused":return{title:y("picker.accessPausedTitle","These seats are on hold right now"),body:y("picker.accessPausedBody","The organizer has paused this selection. Try again in a few minutes."),action:y("picker.accessRetry","Try again")};case"revoked":return{title:y("picker.accessRevokedTitle","This access link is no longer active"),body:y("picker.accessRevokedBody","Ask whoever sent you here for a new link to keep booking these seats.")};case"no_token":case"provider_failed":return{title:y("picker.accessExpiredTitle","Your seat session has expired"),body:y("picker.accessExpiredBody","Reload the seat map to continue. Seats already in your cart stay held until the timer ends."),action:y("picker.accessRetry","Reload seat map")};default:return{title:y("picker.accessInvalidTitle","We couldn\u2019t verify your access"),body:y("picker.accessInvalidBody","You can still book anything shown as available. Contact whoever sent you here for access to the rest.")}}}function On(s,e,t){let i=Gi;return[s?.sectionLabel?`<div class="sl-confirm-field sl-confirm-sec"><span class="sl-confirm-key">${y("picker.section","Section")}</span><span class="sl-confirm-value">${i(s.sectionLabel)}</span></div>`:"",s?.rowLabel||s?.objectType==="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${i(t)}</span><span class="sl-confirm-value">${i(U(s)??s?.displayLabel??e)}</span></div>`:"",s?.objectType!=="booth"?`<div class="sl-confirm-field"><span class="sl-confirm-key">${y("picker.seat","Seat")}</span><span class="sl-confirm-value">${i(s?.seatNumber??s?.displayLabel??e)}</span></div>`:""].filter(Boolean).join("")}function Rn(s,e,t){let i=Gi,n=s?.objectType==="booth",r=s?.objectType==="table"&&!!s?.bookingMode,o=n||r||!s?.seatNumber,a=s?.sectionLabel??(o?void 0:s?.displayLabel),l=r?`${y("picker.guests","Guests")} ${s?.bookingMode==="variable"?`${s?.minOccupancy}\u2013${s?.maxOccupancy}`:s?.capacity}`:void 0,p=(o?[l,a?s?.rowLabel??s?.displayLabel:void 0]:[s?.rowLabel?`${t} ${U(s)??""}`.trim():void 0,`${y("picker.seat","Seat")} ${s?.seatNumber??e}`]).filter(Boolean).join(" \xB7 ");return(a?`<span class="sl-confirm-place">${i(a)}</span>`:"")+(p?`<span class="sl-confirm-pos">${a?" \xB7 ":""}${i(p)}</span>`:"")+(a||p?"":`<span class="sl-confirm-pos">${i(e)}</span>`)}function _n(s,e){if(!s)return"";let t=e?y("picker.viewFromThisSeat","View from this seat"):y("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 An(s){return s.buyerMessage?.trim()||(s.restriction==="companion"?y("picker.companionRequiresWheelchair","Requires the adjacent wheelchair place"):void 0)}function Dn(s,e,t){let i=Gi;if(s.length>1)return`<fieldset class="sl-confirm-tiers"><legend>${y("picker.ticketType","Ticket type")}</legend>`+s.map(o=>{let a=An(o);return`<button type="button" class="sl-confirm-tier" data-confirm-tier="${i(o.id)}" aria-pressed="${o.id===e}"><span class="sl-confirm-tier-copy"><span class="sl-confirm-tier-name">${i(o.name)}</span>`+(a?`<small class="sl-confirm-tier-note">${i(a)}</small>`:"")+`</span><span class="sl-confirm-tier-price">${i(t(o))}</span></button>`}).join("")+"</fieldset>";let n=s[0],r=n?An(n):void 0;return r?`<p class="sl-confirm-tier-note">${i(r)}</p>`:""}function Wi(s){return`<span class="sl-seccard-dot" style="background:${w(s.color)}"></span><span class="sl-seccard-name">${w(s.label)}</span><span class="sl-seccard-left" data-full="${w(s.leftLabel)}" data-short="${w(s.leftShortLabel??s.leftLabel)}">${w(s.leftLabel)}</span>`+s.nav+s.close}function Bn(s){return`<div class="sl-seccard-head"><span class="sl-seccard-dot" style="background:${w(s.color)}"></span><span class="sl-seccard-name">${w(s.label)}</span>`+(s.showPrice?`<span class="sl-seccard-price">${w(s.priceLabel)}</span>`:"")+s.close+`</div><div class="sl-seccard-zone">${s.zoneLabel?`${w(s.zoneLabel)} \xB7 `:""}<span class="sl-seccard-left">${w(s.leftLabel)}</span></div>`+(s.entrance?`<div class="sl-seccard-entrance">${w(s.entrance)}</div>`:"")+(s.mix?`<div class="sl-seccard-mix">${s.mix}</div>`:"")+`<div class="sl-seccard-foot"><button type="button" class="sl-seccard-overview">\u2190 ${w(s.overviewLabel)}</button>`+s.nav+`<span class="sl-seccard-hint">${w(s.hint)}</span></div>`}function Nn(s){return`<span class="sl-seccard-mix-item${s.dim?" sl-dim":""}"><span class="sl-seccard-mix-dot" style="background:${w(s.color)}"></span>${w(s.label)} <span class="sl-seccard-mix-price">${w(s.rangeLabel)}</span></span>`}function $n(s){return'<div class="sl-confirm-grid">'+s.identityFields+`</div><div class="sl-confirm-cat"><span class="sl-dot" style="background:${w(s.categoryColor)}"></span><span class="sl-confirm-cat-name">${w(s.categoryLabel)}</span>`+(s.categoryLeftLabel?`<span class="sl-confirm-left">${w(s.categoryLeftLabel)}</span>`:"")+(s.priceLabel?`<span class="sl-confirm-price">${w(s.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-id">'+s.marker+`<span class="sl-confirm-dot" style="background:${w(s.categoryColor)}" aria-hidden="true"></span><span class="sl-sr">${w(s.categoryLabel)}</span><span class="sl-confirm-who">`+s.identity+"</span>"+(s.priceLabel?`<span class="sl-confirm-idprice">${w(s.priceLabel)}</span>`:"")+'</div><div class="sl-confirm-body">'+s.tierChoices+s.groupDates+s.wheelchair+s.commercial+(s.thumb||s.see3dPill?`<div class="sl-confirm-strip">${s.thumb}<span class="sl-confirm-pills">${s.see3dPill}</span></div>`:"")+s.inspect+`<div class="sl-confirm-row"><button type="button" class="sl-confirm-cancel">${w(s.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">${w(s.selectLabel)}</span></button></div></div>`}function Vn(s,e){let t=I,{variable:i}=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(i?Ne("picker.flexiblePartyTypeWord",{typeWord:e.typeWord}):Ne("picker.wholeTypeWord",{typeWord:e.typeWord}))}</div><h2 class="sl-table-title" id="sl-table-title">${t(s.displayLabel??s.label)}</h2><p class="sl-table-copy" id="sl-table-copy">${t(i?y("picker.chooseGuestsCopy","Choose how many guests will sit together. This table is held exclusively for your party."):Ne("picker.allPlacesBookedTogether",{count:s.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(Ne("picker.perGuestPrice",{price:e.unitPrice}))}</b>`)+`<span class="muted">${t(y("picker.tableCapacity","Table capacity"))}</span><span>${t(Ne("picker.guestsCount",{count:s.capacity}))}</span>`+(e.suppressPricing?"":`<span class="muted">${t(y("picker.total","Total"))}</span><b data-table-total></b>`)+"</div>"+(i?`<label class="sl-table-qtylabel" id="sl-table-qty-label">${t(y("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(y("picker.fewerGuests","Fewer guests"))}">\u2212</button><output aria-live="polite" data-table-qty>${s.quantity}</output><button type="button" data-table-step="1" aria-label="${t(y("picker.moreGuests","More guests"))}">+</button></div><div class="sl-table-range">${t(Ne("picker.chooseMinMaxGuests",{min:s.minOccupancy,max:s.maxOccupancy}))}</div>`:`<input type="hidden" data-table-qty value="${s.capacity}">`)+`<div class="sl-table-actions"><button type="button" class="sl-table-cancel">${t(Ne("common.cancel"))}</button><button type="button" class="sl-table-confirm">${t(e.held?y("picker.updateTable","Update table"):i?y("picker.selectTable","Select table"):y("picker.selectWholeTable","Select whole table"))}</button></div></div></section>`}function Fn(s,e){let t=Ya(s),i=document.createElement("div");i.className="sl-access",i.setAttribute("role","status"),i.setAttribute("aria-live","polite");let n=document.createElement("div");n.className="sl-access-card";let r=document.createElement("span");r.className="sl-access-icon",r.setAttribute("aria-hidden","true"),r.textContent="\u21BB";let o=document.createElement("div");o.className="sl-access-copy";let a=document.createElement("div");a.className="sl-access-title",a.textContent=t.title;let l=document.createElement("div");if(l.className="sl-access-body",l.textContent=t.body,o.append(a,l),t.action){let c=document.createElement("button");c.type="button",c.className="sl-access-act";let p=document.createElement("span");p.className="sl-access-act-icon",p.setAttribute("aria-hidden","true"),p.textContent="\u21BB";let d=document.createElement("span");d.textContent=t.action,c.append(p,d),c.addEventListener("click",async()=>{i.classList.add("is-reloading"),c.disabled=!0;try{await e()}catch{}finally{i.isConnected&&(i.classList.remove("is-reloading"),c.disabled=!1)}}),o.appendChild(c)}return n.append(r,o),i.appendChild(n),i}function zn(s){return s.map(e=>`<button type="button" role="switch" class="sl-a11yrow${e.className?` ${e.className}`:""}${e.on?" on":""}" data-a11y-row="${w(e.key)}" aria-checked="${e.on}" aria-pressed="${e.on}"`+(e.disabled?' disabled aria-disabled="true"':"")+`><span class="sl-a11yrow-i" aria-hidden="true">${w(e.icon)}</span><span class="sl-a11yrow-t"><span class="sl-a11yrow-l">${w(e.label)}</span>`+(e.note?`<span class="sl-a11yrow-n">${w(e.note)}</span>`:"")+"</span>"+(e.count?`<span class="sl-a11yrow-c">${w(e.count)}</span>`:"")+'<span class="sl-a11yrow-s" aria-hidden="true"></span></button>').join("")}function jn(s){let e=document.createElement("div");e.className="sl-floors on",e.setAttribute("role","group"),e.setAttribute("aria-label",s.tf("picker.chooseLevel","Choose level"));let t=[{id:"",name:s.tf("picker.allFloors","All floors")},...s.floors.map(r=>({id:r.id,name:r.name}))];for(let r of t){let o=document.createElement("button");o.type="button",o.dataset.floor=r.id,o.textContent=r.name,o.setAttribute("aria-pressed","false"),o.addEventListener("click",()=>s.onChoose(r.id)),e.appendChild(o)}let i=document.createElement("button");i.type="button",i.className="sl-floor-info",i.textContent="i";let n=s.tf("picker.floorHelp","All floors shows the complete venue. Choose one level to inspect and select its seats.");return i.setAttribute("aria-label",n),i.title=n,e.appendChild(i),e}function Gn(s,e,t){if(!s)return;let i=t?"":e;s.querySelectorAll("button[data-floor]").forEach(n=>{n.setAttribute("aria-pressed",String(n.dataset.floor===i))})}import{t as ce,tCount as Qa}from"@seatlayer/core";var ni=class{constructor(e){this.el=null;this.stripObserver=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?.classList.contains("strip")?Me(this.el,void 0,Vs):this.el?.remove(),this.el=null,this.syncLocatorDock(),this.host.refreshMinimap();return}this.collapsed=this.host.controller.getRung()==="seats",this.shownAt=Date.now(),this.render(e),this.host.refreshMinimap()}updateDockInPlace(e,t){let i=this.el;if(!i)return;let n=i.querySelector(".sl-seccard-dot");n&&(n.style.background=e.color);let r=i.querySelector(".sl-seccard-name");r&&Li(r,e.label);let o=i.querySelector(".sl-seccard-left");o&&(o.dataset.full=t.leftLabel,o.dataset.short=t.leftShortLabel,Li(o,t.leftLabel));let a=i.querySelector(".sl-seccard-nav");t.nav?(a?a.outerHTML=t.nav:i.querySelector(".sl-seccard-x")?.insertAdjacentHTML("beforebegin",t.nav),this.wireNavigation(i)):a&&a.remove(),i.setAttribute("aria-label",`${ce("picker.sectionSummaryAria",{label:e.label})}, ${t.leftLabel}`),this.fitStripCount()}wireNavigation(e){e.querySelectorAll("[data-section-nav]").forEach(t=>{t.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation();let n=t.dataset.sectionNav;n&&this.host.controller.focusSection(n)})})}render(e){let t=this.host.map();if(!t)return;let i=this.el?.classList.contains("strip")===!0&&this.el.isConnected,n=e.categories.length?e.categories.map(v=>{let k=this.host.controller.doc?.categories.find(S=>S.key===v.key);return k?this.host.catPriceRange(k):{min:v.priceMin,max:v.priceMax}}).filter(v=>v!=null):[{min:e.priceMin,max:e.priceMax}],r=Math.min(...n.map(v=>v.min)),o=Math.max(...n.map(v=>v.max)),a=r===o?this.host.money(r):`${this.host.money(r)}\u2013${this.host.money(o)}`,l=Qa("picker.seatsLeftInSection",e.seatsLeft),c=ce("picker.seatsLeftShort",{count:e.seatsLeft}),p=`<button type="button" class="sl-seccard-x" aria-label="${ce("picker.closeSectionSummary")}">\u2715</button>`,d=`<button type="button" class="sl-seccard-x sl-seccard-back" aria-label="${ce("picker.closeSectionSummary")}"><span class="sl-seccard-back-chev" aria-hidden="true">\u2039</span>${I(ce("picker.overview"))}</button>`,u=Mn(this.host.sectionNeighbours(e.id)),h=this.host.root()?.dataset.layout==="narrow",g={label:e.label,color:e.color,leftLabel:l,leftShortLabel:c,nav:u,close:p};if(h&&i&&this.el){this.updateDockInPlace(e,{leftLabel:l,leftShortLabel:c,nav:u});return}this.el?.remove();let m=document.createElement("div");if(h){if(m.className=i?"sl-seccard strip on":"sl-seccard strip on sl-mo-slide-up",m.setAttribute("role","group"),m.setAttribute("aria-label",`${ce("picker.sectionSummaryAria",{label:e.label})}, ${l}`),m.innerHTML=Wi({...g,close:d}),i)for(let v of m.querySelectorAll(".sl-seccard-name,.sl-seccard-left"))v.classList.add("sl-mo-xfade");this.wireNavigation(m),m.querySelector(".sl-seccard-x").addEventListener("click",()=>this.host.controller.overview()),t.appendChild(m),this.fitStripCount()}else if(this.collapsed)m.className="sl-seccard mini on",m.setAttribute("role","button"),m.setAttribute("aria-label",ce("picker.sectionSummaryAria",{label:e.label})),m.innerHTML=Wi(g),this.wireNavigation(m),m.addEventListener("click",v=>{v.target.closest(".sl-seccard-x")||(this.collapsed=!1,this.shownAt=Date.now(),this.render(e))}),m.querySelector(".sl-seccard-x").addEventListener("click",()=>this.host.controller.overview()),(this.host.region("top-center")??t).appendChild(m);else{m.className="sl-seccard on",m.setAttribute("role","dialog"),m.setAttribute("aria-label",ce("picker.sectionSummaryAria",{label:e.label}));let v=this.host.priceBandKeys(),k=this.host.suppressPricing(),S=e.categories.map(L=>{let b=this.host.controller.doc?.categories.find(x=>x.key===L.key),A=b?this.host.catPriceRange(b):{min:L.priceMin,max:L.priceMax};return Nn({label:L.label,color:L.color,dim:v!=null&&!v.has(L.key),rangeLabel:k?"":A&&A.min!==A.max?`${this.host.money(A.min)}\u2013${this.host.money(A.max)}`:this.host.money(A?.min??L.price)})}).join("");m.innerHTML=Bn({...g,priceLabel:a,showPrice:!k&&e.categories.length>0,zoneLabel:e.zoneLabel,entrance:e.entrance?`${ce("picker.entrance")} ${e.entrance}`:void 0,mix:S,overviewLabel:ce("picker.overview"),hint:ce("picker.tapSeatHint")}),this.wireNavigation(m),m.querySelector(".sl-seccard-x").addEventListener("click",()=>this.host.controller.overview()),m.querySelector(".sl-seccard-overview").addEventListener("click",()=>this.host.controller.overview()),(this.host.region("top-center")??t).appendChild(m)}this.el=m,h&&this.watchStrip(m),this.syncLocatorDock()}syncLocatorDock(){let e=this.host.root();e&&(this.el?.classList.contains("strip")?e.dataset.locator="true":delete e.dataset.locator)}fitStripCount(){let e=this.el;if(!e||!e.classList.contains("strip"))return;let t=e.querySelector(".sl-seccard-left");if(!t)return;let i=e.querySelector(".sl-seccard-name"),n=c=>c!=null&&c.clientWidth>0&&c.scrollWidth>c.clientWidth+1,r=()=>{let c=e.clientWidth;if(c<=0)return!0;let p=typeof getComputedStyle=="function"?getComputedStyle(e):null,d=m=>{let v=Number.parseFloat(m??"");return Number.isFinite(v)?v:0},u=[...e.children].filter(m=>m instanceof HTMLElement&&!m.hidden),h=d(p?.columnGap)||d(p?.gap);return u.reduce((m,v)=>m+Math.max(v.scrollWidth,v.getBoundingClientRect().width),0)+h*Math.max(0,u.length-1)+d(p?.paddingLeft)+d(p?.paddingRight)<=c+1},o=()=>t.hidden||!n(t)&&r(),a=c=>{if(t.hidden=c==="hidden",c==="hidden")return;let p=t.dataset.full??"";t.textContent=c==="full"?p:t.dataset.short??p},l=["full","short","hidden"];for(let c of l)if(a(c),o()&&!n(i))return;for(let c of l)if(a(c),o())return;a("hidden")}watchStrip(e){this.stripObserver?.disconnect(),this.stripObserver=null,typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{this.el===e&&this.fitStripCount()}),typeof ResizeObserver=="function"&&(this.stripObserver=new ResizeObserver(()=>{this.el===e&&this.fitStripCount()}),this.stripObserver.observe(e))}collapse(){!this.el||this.collapsed||!this.current||this.host.root()?.dataset.layout!=="narrow"&&(this.collapsed=!0,this.render(this.current))}onView(){if(!(!this.el||this.collapsed||!this.current)&&this.host.root()?.dataset.layout!=="narrow"){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,i=this.host.map();if(!e||!t||!i)return 0;let n=this.host.activeFloorObjects().find(S=>S.type==="section"&&S.id===t.id)?.outline;if(!n||n.length<3)return 0;let r=n.map(S=>this.host.controller.worldToScreen(S)),o=r.map(S=>S.x),a=r.map(S=>S.y),l=Math.min(...o),c=Math.min(...a),p=Math.max(...o)-l,d=Math.max(...a)-c;if(p<=0||d<=0)return 0;let u=i.getBoundingClientRect(),h=e.getBoundingClientRect(),g=h.left-u.left,m=h.top-u.top,v=Math.max(0,Math.min(g+h.width,l+p)-Math.max(g,l)),k=Math.max(0,Math.min(m+h.height,c+d)-Math.max(m,c));return v*k/(p*d)}};import{pointInPolygon as Xa}from"@seatlayer/core";import{createMinimapTransform as Za,minimapPointToWorld as Ja,minimapViewportPlan as el}from"@seatlayer/core/picker/minimapGeometry";function qn(s,e){let t=new Yi(s);return t.build(e),t}var Yi=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 i=document.createElement("button");i.type="button",i.className="sl-minimap-toggle",i.setAttribute("aria-label",y("picker.openVenueMap","Open venue overview map")),i.setAttribute("aria-expanded","false"),i.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(i),this.miniToggle=i;let n=document.createElement("div");n.className="sl-minimap",n.setAttribute("role","group");let r=document.createElement("div");r.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",y("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",y("picker.closeVenueMap","Close venue overview map")),l.textContent="\xD7",r.append(o,a,l);let c=document.createElement("canvas");c.tabIndex=0,c.setAttribute("role","application"),c.setAttribute("aria-label",y("picker.venueMapInstructions","Venue overview map. Drag the viewport, click a section, or use arrow keys to pan.")),n.append(r,c),e.appendChild(n),this.miniWrap=n,this.miniLabel=o,this.miniCanvas=c;let p=document.createElement("canvas");this.miniBase=p,i.addEventListener("click",()=>{let d=this.host.root()?.dataset.minimapOpen==="true";this.userClosed=d,this.setMinimapOpen(!d)}),l.addEventListener("click",()=>{this.userClosed=!0,this.setMinimapOpen(!1)}),c.addEventListener("click",d=>{if(this.miniSuppressClick){this.miniSuppressClick=!1;return}this.minimapJump(d)}),c.addEventListener("pointerdown",d=>this.minimapPointerDown(d)),c.addEventListener("pointermove",d=>this.minimapPointerMove(d)),c.addEventListener("pointerup",d=>this.minimapPointerUp(d)),c.addEventListener("pointercancel",d=>this.minimapPointerUp(d)),c.addEventListener("keydown",d=>this.minimapKeydown(d)),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,i=this.host.controller.getViewport()?.bounds;if(!e||!t||!i||!(i.width>0&&i.height>0))return;let n=196,r=146,o=6,a=i.width/Math.max(1,i.height),l=n,c=Math.round(n/a);c>r&&(c=r,l=Math.round(r*a)),l=Math.max(64,l),c=Math.max(48,c);let p=Math.min(2,window.devicePixelRatio||1);e.width=Math.round(l*p),e.height=Math.round(c*p),e.style.width=`${l}px`,e.style.height=`${c}px`,t.width=e.width,t.height=e.height,this.miniTf=Za(i,e.width,e.height,p,o)}syncMinimapLabel(){if(!this.miniLabel||!this.miniWrap)return;let e=this.host.controller.getFloors(),t=this.host.controller.isFloorOverview()?y("picker.allFloors","All floors"):e.find(p=>p.id===this.host.controller.getActiveFloorId())?.name??y("picker.venueOverview","Venue overview"),i=this.host.controller.getMinimapSnapshot().sections,r=i.find(p=>p.active)?.label??this.host.focusedSectionLabel(),o=r?`${t} \xB7 ${r}`:t;this.miniLabel.textContent=o;let a=i.filter(p=>p.state==="selected").length,l=i.filter(p=>p.state==="available").length,c=i.filter(p=>p.state==="inactive").length;this.miniWrap.setAttribute("aria-label",i.length?`${o}. ${a} selected, ${l} available, ${c} inactive sections.`:o),this.miniCanvas?.setAttribute("aria-label",i.length?`${o}. ${a} selected, ${l} available, ${c} inactive sections. ${y("picker.venueMapInstructions","The outlined region is the visible map area. Drag it, click a section, or use arrow keys to pan.")}`:`${o}. ${y("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 i=e.getContext("2d");if(!i)return;i.clearRect(0,0,e.width,e.height);let n=d=>d*t.scale+t.offX,r=d=>d*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",p=this.host.controller.getMinimapSnapshot();for(let d of p.sections){if(d.outline.length<3)continue;i.beginPath(),d.outline.forEach((h,g)=>g===0?i.moveTo(n(h.x),r(h.y)):i.lineTo(n(h.x),r(h.y))),i.closePath();let u=d.paint;if(i.globalAlpha=d.state==="inactive"?.5:.92,u?i.fillStyle=u.fill:(i.globalAlpha=d.state==="inactive"?.18:d.state==="selected"?.72:.34,i.fillStyle=d.state==="inactive"?a:d.state==="selected"?l:c),i.fill(),i.globalAlpha=.82,i.lineWidth=Math.max(1,t.dpr),i.strokeStyle=u?.stroke||o,i.stroke(),d.owned){i.globalAlpha=1,i.lineWidth=Math.max(2,t.dpr*1.5),i.strokeStyle=l,i.stroke();let h=d.outline.reduce((g,m)=>({x:g.x+m.x,y:g.y+m.y}),{x:0,y:0});i.beginPath(),i.arc(n(h.x/d.outline.length),r(h.y/d.outline.length),Math.max(1.5,t.dpr*1.6),0,Math.PI*2),i.fillStyle=l,i.fill(),i.beginPath(),d.outline.forEach((g,m)=>m===0?i.moveTo(n(g.x),r(g.y)):i.lineTo(n(g.x),r(g.y))),i.closePath()}d.active&&(i.globalAlpha=1,i.lineJoin="round",i.lineWidth=Math.max(4,t.dpr*3.5),i.strokeStyle=this.host.cssVar("--sl-surface")||"#fff",i.stroke(),i.lineWidth=Math.max(2,t.dpr*1.75),i.strokeStyle=l,i.stroke())}if(i.globalAlpha=1,!p.sections.length){let d=Math.max(1,t.dpr),u=this.host.controller.getRenderer?.(),h=new Map,g=m=>{let v=h.get(m);if(v)return v;let k=u?.categoryDisplayColor?.(m)||c;return h.set(m,k),k};for(let m of p.seats)i.globalAlpha=m.state==="inactive"?.22:.78,i.fillStyle=m.state==="inactive"?a:m.state==="selected"?l:g(m.categoryKey),i.beginPath(),i.arc(n(m.x),r(m.y),d,0,Math.PI*2),i.fill();i.globalAlpha=1}}drawMinimapRect(){let e=this.miniCanvas,t=this.miniBase,i=this.miniTf;if(!e||!t||!i)return;let n=e.getContext("2d");if(!n)return;n.clearRect(0,0,e.width,e.height),n.drawImage(t,0,0);let r=this.host.controller.getViewport();if(!r)return;let o=el(r.visible,i,e.width,e.height,Math.max(2,i.dpr*2)),a=this.host.cssVar("--sl-text")||"#12151c",l=this.host.cssVar("--sl-surface")||"#fff";n.save(),n.globalAlpha=.1,n.fillStyle=a,n.fillRect(o.raw.x,o.raw.y,o.raw.width,o.raw.height),n.globalAlpha=.9,n.lineJoin="round",n.lineWidth=Math.max(4,i.dpr*3.25),n.strokeStyle=l,n.strokeRect(o.raw.x,o.raw.y,o.raw.width,o.raw.height),n.globalAlpha=1,n.lineWidth=Math.max(2,i.dpr*1.75),n.strokeStyle=a,n.strokeRect(o.raw.x,o.raw.y,o.raw.width,o.raw.height),o.clipped&&Object.values(o.clippedEdges).some(Boolean)&&(n.setLineDash([Math.max(3,i.dpr*3),Math.max(2,i.dpr*2)]),n.strokeRect(o.clipped.x,o.clipped.y,o.clipped.width,o.clipped.height)),n.restore()}minimapWorldPoint(e){let t=this.miniCanvas,i=this.miniTf;if(!t||!i)return null;let n=t.getBoundingClientRect(),r=(e.clientX-n.left)*(t.width/Math.max(1,n.width)),o=(e.clientY-n.top)*(t.height/Math.max(1,n.height));return{...Ja({x:r,y:o},i),px:r,py:o}}minimapPointerDown(e){let t=this.minimapWorldPoint(e),i=this.host.controller.getViewport()?.visible;!t||!i||!(t.x>=i.x&&t.x<=i.x+i.width&&t.y>=i.y&&t.y<=i.y+i.height)||(this.miniDrag={pointerId:e.pointerId,offsetX:t.x-(i.x+i.width/2),offsetY:t.y-(i.y+i.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 i=this.minimapWorldPoint(e);i&&(!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:i.x-t.offsetX,y:i.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 i=e.key==="ArrowLeft"?-t.width*.2:e.key==="ArrowRight"?t.width*.2:0,n=e.key==="ArrowUp"?-t.height*.2:e.key==="ArrowDown"?t.height*.2:0;!i&&!n||(this.host.controller.clearSectionFocus(),this.host.controller.panToWorld({x:t.x+t.width/2+i,y:t.y+t.height/2+n}),e.preventDefault())}minimapJump(e){let t=this.minimapWorldPoint(e);if(t){for(let i of this.host.controller.getMinimapSnapshot().sections)if(!(i.state==="inactive"||i.outline.length<3)&&Xa(t,i.outline)){this.host.controller.focusSection(i.id);return}this.host.controller.clearSectionFocus(),this.host.controller.panToWorld(t)}}};import{t as Qi}from"@seatlayer/core";var tl=12;function Kn(s,e){let t=e.floors(),i=new Set(t.map(x=>x.label.trim().toLocaleLowerCase())),n=e.zones().filter(x=>x.seatCount>0&&!i.has(x.label.trim().toLocaleLowerCase())),r=e.sections().filter(x=>x.seatCount>0&&!i.has(x.label.trim().toLocaleLowerCase())),o=n.length>1?[]:r,a=t.length>1,l=n.length>1,c=o.length>1;if(!a&&!l&&!c)return null;let p=document.createElement("div");p.className="sl-view3d-nav";let d=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 m=()=>{for(let x of p.querySelectorAll(":scope > div")){let H=x.querySelector('[aria-pressed="true"]');!H||x.scrollWidth<=x.clientWidth||H.scrollIntoView({block:"nearest",inline:"nearest"})}},v=()=>{if(d)return d;for(let x of p.querySelectorAll(":scope > div")){let H=x.querySelector('button[aria-pressed="true"]'),_=H?.textContent?.trim();if(_&&H?.dataset.floor!=="")return _}return a&&(l||c)?y("picker.levelsAndAreas","Levels & areas"):a?y("picker.levels","Levels"):y("picker.areas","Areas")},k=x=>{p.classList.toggle("is-open",x),u.setAttribute("aria-expanded",String(x)),x&&typeof requestAnimationFrame=="function"&&requestAnimationFrame(m),g.textContent=v()};u.addEventListener("click",()=>k(!p.classList.contains("is-open"))),p.addEventListener("keydown",x=>{x.key!=="Escape"||!p.classList.contains("is-open")||(x.preventDefault(),x.stopPropagation(),k(!1),u.focus())});let S=document.createElement("button");S.type="button",S.className="sl-view3d-nav-close",S.innerHTML='<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M18 6L6 18M6 6l12 12"/></svg>';let L=y("picker.closeVenueNavigation","Close venue navigation");S.setAttribute("aria-label",L),S.title=L,S.addEventListener("click",()=>{k(!1),u.focus()}),k(!1),p.appendChild(u);let b=x=>{},A=x=>{};if(a){let x=document.createElement("div");x.setAttribute("role","group"),x.setAttribute("aria-label",y("picker.levels","Levels"));let H=[];A=O=>{H.forEach(B=>{B.setAttribute("aria-pressed",String((B.dataset.floor===""?null:Number(B.dataset.floor))===O))})};let _=O=>{e.focusFloor(O)&&(A(O),b(O))},T=(O,B)=>{let V=document.createElement("button");V.type="button",V.textContent=O,V.dataset.floor=B===null?"":String(B),V.setAttribute("aria-pressed",String(B===null)),V.addEventListener("click",()=>{_(B),k(!1)}),H.push(V),x.appendChild(V)};T(y("picker.allLevels","All levels"),null);for(let O of t)T(O.label||Qi("picker.levelNumber",{number:O.index+1}),O.index);p.appendChild(x)}if(l||c){let x=document.createElement("div");x.setAttribute("role","group"),x.setAttribute("aria-label",y("picker.areas","Areas"));let H=l?n.map(T=>({id:T.id,label:T.label||T.id,go:()=>{e.focusZone(T.id)}})):o.map(T=>({id:T.id,label:T.label||T.id,floorIndex:T.floorIndex,go:()=>{e.focusSection(T.id),Number.isFinite(T.floorIndex)&&A(T.floorIndex)}})),_=T=>{let O=l||T===null?H:H.filter(B=>B.floorIndex===void 0||B.floorIndex===T);if(x.replaceChildren(),!O.length){x.remove();return}if(x.isConnected||p.insertBefore(x,S.isConnected?S:null),!l&&O.length>tl){let B=document.createElement("select");B.setAttribute("aria-label",y("picker.jumpToSection","Jump to section"));let V=document.createElement("option");V.value="",V.textContent=y("picker.jumpToSection","Jump to section"),B.appendChild(V);for(let ie of O){let ne=document.createElement("option");ne.value=ie.id,ne.textContent=ie.label,B.appendChild(ne)}B.addEventListener("change",()=>{O.find(ie=>ie.id===B.value)?.go()}),x.appendChild(B);return}for(let B of O){let V=document.createElement("button");V.type="button",V.textContent=B.label,V.dataset.area=B.id,V.addEventListener("click",()=>{d=B.label,B.go(),k(!1)}),x.appendChild(V)}};b=_,_(null)}return p.appendChild(S),s.appendChild(p),p}var ri=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",y("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(y("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",y("picker.clearSavedSeatComparison","Clear saved seat comparison")),o.addEventListener("click",()=>this.host.clearComparison()),t.append(r,o),e.appendChild(t),this.chip=t}let i=this.host.savedSeatIds().length,n=t.querySelector(".main");n&&(n.textContent=i>1?Qi("picker.compareCount",{count:i}):y("picker.oneSeatSaved","1 seat saved"),n.setAttribute("aria-label",i>1?Qi("picker.openComparisonOfSeats",{count:i}):y("picker.oneSeatSavedChooseAnother","One seat saved; choose another to compare")))}remove(){this.chip?.remove(),this.chip=null}mainButton(){return this.chip?.querySelector(".main")??null}};function Un(s){return!s?.querySelector('[data-ref="zfs"]')}import{t as Wn}from"@seatlayer/core";var il=900,sl=450;function nl(s){switch(s){case"seat":return y("picker.stopYourSeat","Your seat");case"row":return y("picker.stopYourRow","Your row");case"section":return y("picker.stopYourSection","Your section");default:return y("picker.stopWholeVenue","Whole venue")}}function Yn(s,e){let t=document.createElement("button");t.type="button",t.className="sl-view3d-recentre sl-mo-rotate-in",t.textContent="\u25CE";let i=y("picker.recentreOnStage","Recentre on the stage");t.setAttribute("aria-label",i),t.title=i,t.addEventListener("click",()=>{e.handle()?.recentreSeatView()});let n=document.createElement("div");n.className="sl-view3d-stop",n.setAttribute("role","status"),n.setAttribute("aria-live","polite"),s.append(t,n);let r=null,o=null;return{onStopChange(a){if(r&&(clearTimeout(r),r=null),o&&(clearTimeout(o),o=null),!a){n.classList.remove("is-shown"),n.textContent="",o=setTimeout(()=>{o=null,s.classList.remove("is-seat-view")},sl);return}s.classList.add("is-seat-view"),n.textContent=nl(a),n.classList.add("is-shown"),r=setTimeout(()=>{r=null,n.classList.remove("is-shown")},il)},dispose(){r&&(clearTimeout(r),r=null),o&&(clearTimeout(o),o=null),t.remove(),n.remove(),s.classList.remove("is-seat-view")}}}var rl=44,ol=92;function Qn(s,e,t,i={}){let n=s?.sectionLabel,r=U(s),o=al(s,e),a=[n,r?Wn("picker.rowLabel",{label:r}):null,o?Wn("picker.seatLabel",{label:o}):null].filter(Boolean).join(" \xB7 "),l=i.maxChars??(i.narrow?rl:ol);for(let c of[t,i.shortTail??t,null]){let p=[a,c].filter(Boolean).join(" \xB7 ");if(p.length<=l||c==null)return p}return a}function al(s,e){if(s?.seatNumber)return s.seatNumber;let t=s?.displayLabel??e,i=n=>{!n||!t.startsWith(n)||t.length<=n.length||(t=t.slice(n.length).replace(/^[\s·\-\/_]+/,""))};return i(s?.sectionLabel),i(U(s)),t}var Xn="sl:sheet-hint";function Zn(s){let e=s.boot;if(!e?.isConnected)return;if(s.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"),s.map?.appendChild(t),setTimeout(()=>t.remove(),650),s.rail?.classList.add("is-in"),s.root?.classList.add("is-arriving"),setTimeout(()=>{s.rail?.classList.remove("is-in"),s.root?.classList.remove("is-arriving"),ll(s.root)},900)}function ll(s){if(!s||s.dataset.layout!=="narrow")return;try{if(window.sessionStorage.getItem(Xn))return;window.sessionStorage.setItem(Xn,"1")}catch{}let e=s.querySelector(".sl-sheet-grab");e&&(e.classList.add("sl-mo-hint"),e.addEventListener("animationend",()=>e.classList.remove("sl-mo-hint"),{once:!0}))}function Jn(s,e){s.addEventListener("keydown",t=>{if(t.key==="Escape"){for(let i of e())if(i.open()){t.preventDefault(),t.stopPropagation(),i.close();return}}})}function oi(s){let e=s.committedSelection(),t=s.controller.getGAAreas(),i=s.hold?.items??[],n=new Set(i.map(u=>u.label)),r=qs(s,t,i),o=Be(s.gaQty,i),a=i.reduce((u,h)=>u+s.paidPrice(h.categoryKey,h.tierId,h.unitPrice,h.label)*(h.quantity??1),0),l=i.reduce((u,h)=>u+(h.quantity??1),0),c=e.filter(u=>!n.has(u.label)),p=c.reduce((u,h)=>u+s.paidPrice(h.categoryKey,h.tierId??null,h.price,h.label)*(h.quantity??1),0)+r+a,d=c.reduce((u,h)=>u+(h.quantity??1),0)+o+l;return{seats:e,freshSeats:c,gaAreas:t,heldItems:i,heldLabels:n,heldCount:l,total:p,count:d}}function ai(s,e){let t=e.tiers?.length?e.tiers[0].price:e.price;return t===void 0||!e.key?t:s.paidPrice(e.key,e.tiers?.[0]?.id??null,t)}function li(s,e){let t=e.tiers?.length?e.tiers.map(i=>s.paidPrice(e.key,i.id??null,i.price)):e.price==null?[]:[s.paidPrice(e.key,null,e.price)];if(e.key)for(let i of s.pricesByChannel.values())for(let n of i)n.categoryKey===e.key&&t.push(n.price);return t.length?{min:Math.min(...t),max:Math.max(...t)}:void 0}var At="seatlayer_";function cl(){let s=globalThis;return s.document?.modelContext??s.navigator?.modelContext??null}function re(s,e){return e?{ok:!1,reason:s,message:e}:{ok:!1,reason:s}}function dl(s){return Array.isArray(s)?s.filter(e=>typeof e=="string"&&!!e):[]}function pl(s,e){let t=s.event();if(!t)return re("not_loaded","The seat map has not finished loading.");let i=s.selectionLimits();return{ok:!0,event:t,selection:{max:i.max,...i.required!=null?{required:i.required}:{}},categories:s.categories(),zones:s.zones(),hasPremiumSeats:s.hasPremiumSeats(),holdsAllowed:e}}function er(s,e){let t=n=>!!n&&n.toLowerCase()===e.toLowerCase(),i=s.find(n=>t(n.key??n.id))??s.find(n=>t(n.label));return i?.key??i?.id??null}function tr(s,e){let t=e.map(i=>s.describeSeat(i.id));return{seatIds:e.map(i=>i.id),labels:e.map(i=>i.label),section:t[0]?.section??"",row:t[0]?.row??"",seats:e.map((i,n)=>t[n]?.seat||i.label),category:t[0]?.category??e[0].categoryKey,unitPrice:e[0].price,total:e.reduce((i,n)=>i+n.price,0)}}function hl(s,e,t){let i=new Map;for(let r of e){let o=i.get(r.rowKey);o?o.push(r):i.set(r.rowKey,[r])}let n=[];for(let r of i.values()){let o=[...r].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 p=a;p+t<=l;p+=t)n.push(tr(s,o.slice(p,p+t)));a=l}}return n}function ul(s,e,t){let i=new Map;for(let r of e){let o=i.get(r.sectionKey);o?o.push(r):i.set(r.sectionKey,[r])}let n=[];for(let r of i.values()){if(r.length<t)continue;let o=[...r].sort((a,l)=>a.price!==l.price?l.price-a.price:a.rowKey.localeCompare(l.rowKey)||a.index-l.index);n.push(tr(s,o.slice(0,t)))}return n}function ml(s,e){if(!s.event())return re("not_loaded","The seat map has not finished loading.");let i=s.selectionLimits(),n=Math.floor(Number(e.count));if(!Number.isInteger(n)||n<1||n>i.max)return re("bad_count",`count must be a whole number between 1 and ${i.max}.`);let r=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,p=l?er(s.categories(),l):null;if(l&&!p)return re("no_match",`No ticket type called "${l}".`);let d=c?er(s.zones(),c):null;if(c&&!d)return re("no_match",`No zone called "${c}".`);let u=s.seats().filter(m=>m.available);if(!u.length)return re("sold_out");let h=u.filter(m=>(!p||m.categoryKey===p)&&(!d||m.zoneId===d)&&(a==null||m.price<=a));if(!h.length)return re("no_match");let g=o?hl(s,h,n):ul(s,h,n);return g.length?(g.sort((m,v)=>v.unitPrice!==m.unitPrice?v.unitPrice-m.unitPrice:m.row.localeCompare(v.row)||m.labels[0].localeCompare(v.labels[0])),{ok:!0,groups:g.slice(0,r),searched:{count:n,filters:{...a!=null?{max_price:a}:{},...p?{category:p}:{},...d?{zone:d}:{},together:o}}}):re(o?"not_enough_together":"no_match")}function ir(s){return{ok:!0,...s.selection()}}function fl(s,e){let t=s.event();if(!t)return re("not_loaded","The seat map has not finished loading.");if(t.salesClosed)return re("event_closed","Sales are closed for this event.");let i=dl(e.seat_ids);return i.length?(s.clearSelection(),s.selectObjects(i),ir(s)):re("nothing_requested","Pass one or more seat ids or labels in seat_ids.")}function gl(s,e){let t=async n=>{try{return await n()}catch(r){return re("error",r instanceof Error?r.message:String(r))}},i=[{name:`${At}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(()=>pl(s,e))},{name:`${At}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:n=>t(()=>ml(s,n))},{name:`${At}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:n=>t(()=>fl(s,n))},{name:`${At}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(()=>ir(s))}];return e&&i.push({name:`${At}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(()=>s.hold())}),i}async function sr(s,e={}){let t=cl();if(!t||typeof t.registerTool!="function")return null;let i=new AbortController,n=gl(s,!!e.holds),r=[],o=e.exposedTo?.length?[...new Set(e.exposedTo)]:void 0;try{for(let a of n)await t.registerTool(a,{signal:i.signal,...o?{exposedTo:o}:{}}),r.push(a.name)}catch(a){console.warn("seatmap: WebMCP tools could not be registered",a)}return r.length?{names:r,dispose:()=>{if(i.abort(),typeof t.unregisterTool=="function")for(let a of r)try{t.unregisterTool(a)}catch{}}}:null}async function nr(s){let e=s.opts.webMcp;if(!e||s.destroyed)return;let t=typeof e=="object"&&!!e.holds,i=typeof e=="object"?e.exposedTo:void 0;try{s.webMcp=await sr(Zi(s,t),{holds:t,exposedTo:i}),s.destroyed&&Xi(s)}catch(n){console.warn("seatmap: WebMCP registration failed",n)}}function Xi(s){s.webMcp?.dispose(),s.webMcp=null}function Zi(s,e){let t=(i,n)=>{if(Number.isInteger(i.logicalSeatIndex))return i.logicalSeatIndex;let r=i.id.lastIndexOf(":"),o=r<0?NaN:Number(i.id.slice(r+1));return Number.isFinite(o)?o:n};return{event:()=>{let i=s.renderInfo;return i?{name:i.eventName??"",venue:i.venue??null,startsAt:i.startsAt??null,timezone:i.timezone??null,currency:s.currency,salesClosed:s.salesClosed}:null},selectionLimits:()=>({max:s.maxTickets,required:s.exactTickets}),categories:()=>{let i=s.controller.categoryAvailability();return(s.controller.doc?.categories??[]).filter(n=>!n.notForSale).map(n=>{let r=li(s,n),o=ai(s,n);return{key:n.key,label:n.label??n.key,...o===void 0?{}:{price:o},...r&&r.min!==r.max?{priceRange:r}:{},available:i[n.key]??0}})},zones:()=>s.controller.getBestAvailableZones(),hasPremiumSeats:()=>s.controller.hasPremiumSeats(),seats:()=>{let i=s.controller.getActiveFloorId(),n=[];return s.allSeats().forEach((r,o)=>{if(r.floorId&&i&&r.floorId!==i)return;let a=s.controller.getStatus(r.id)??"free",l=s.controller.doc?.categories.find(p=>p.key===r.categoryKey),c=l?.tiers?.length?l.tiers[0].price:l?.price??0;n.push({id:r.id,label:r.label,rowKey:r.logicalRowId??r.rowId,sectionKey:r.sectionId??r.rowId,index:t(r,o),categoryKey:r.categoryKey,price:s.paidPrice(r.categoryKey,l?.tiers?.[0]?.id??null,c,r.label),...r.zoneId?{zoneId:r.zoneId}:{},available:a==="free"&&!l?.notForSale})}),n},describeSeat:i=>{let n=s.controller.seatDetails(i);return n?{section:n.sectionLabel??"",row:U(n)??"",seat:n.seatNumber??n.label,category:n.categoryLabel??n.categoryKey}:null},selection:()=>{let{freshSeats:i,total:n,count:r}=oi(s);return{seats:i.map(o=>({id:o.id,label:o.label,section:o.sectionLabel??"",row:U(o)??"",seat:o.seatNumber??o.label,category:o.categoryKey,price:s.paidPrice(o.categoryKey,o.tierId??null,o.price,o.label)})),count:r,total:n,currency:s.currency,hold:s.hold?{id:s.hold.holdId,expiresAt:s.hold.expiresAt}:null,validity:s.getSelectionValidity()}},clearSelection:()=>s.clearSelection(),selectObjects:i=>{s.selectObjects(i)},hold:()=>e?bl(s):Promise.resolve({ok:!1,reason:"not_allowed"})}}async function bl(s){if(s.salesClosed)return{ok:!1,reason:"event_closed"};if(!s.totalTicketCount())return{ok:!1,reason:"nothing_selected"};let e=s.controller.getSelectionValidity(s.totalTicketCount());return e&&!e.isValid?{ok:!1,reason:"invalid_selection"}:(await s.handleCta(),s.hold?{ok:!0,hold:{id:s.hold.holdId,expiresAt:s.hold.expiresAt}}:{ok:!1,reason:"hold_failed"})}function Pt(s){if(!s)return null;let e=s.getBoundingClientRect();return e.width>0&&e.height>0?e:null}function vl(s){return Pt(s.peek?.querySelector(".sl-peek-sum"))??Pt(s.foot?.querySelector(".sl-total"))??Pt(s.tray)??Pt(s.sheetHead)}function es(s,e,t,i){let n=s,r=n.map;if(!r||!e)return;let o=r.getBoundingClientRect(),a={x:o.left+e.x,y:o.top+e.y},l=t.displayLabel??t.label,c=i?.find(d=>d.key===t.categoryKey)?.color,p=()=>{let d=vl(n);d&&Fs({from:a,to:{x:d.left+d.width/2,y:d.top+d.height/2},label:l,color:c})};Pt(n.peek)?requestAnimationFrame(p):p()}var Ji=60,yl=650;function rr(s,e){if(!e.length)return;e.forEach((r,o)=>{s.schedule(()=>s.pop(r.id),o*Ji)});let t=e.length*Ji,i=e.find(r=>r.sectionId)?.sectionId;if(i){let r=e.filter(a=>a.sectionId===i),o={x:r.reduce((a,l)=>a+l.x,0)/r.length,y:r.reduce((a,l)=>a+l.y,0)/r.length};s.schedule(()=>s.focus(i,o),t)}let n=t+(i?yl:0);e.forEach((r,o)=>{s.schedule(()=>es(s.regions,s.screenPoint(r),r,s.categories),n+o*Ji)})}function ts(s){return{renderingTimeMillis:s.ms,performanceProfile:s.performanceProfile,seatCount:s.seatCount,objectCount:s.objectCount,sectionCount:s.sectionCount,view:s.view,eventKey:s.eventKey,chartName:s.chartName,floorCount:s.floorCount,transport:s.transport,load:s.load,metricScope:s.metricScope,operationalTelemetryReporter:"sdk"}}function or(s,e){ke({apiBase:s.apiBase,event:s.eventKey,scope:s.metricScope,surface:s.surface,outcome:"success",ms:s.ms,performanceProfile:s.performanceProfile,chartDelivery:s.chartDelivery,seats:s.seatCount,floors:s.floorCount,view:s.view,load:s.load,transport:s.transport}),e("chart_rendered",ts(s))}import{seatConfidenceDisclosure as xl}from"@seatlayer/core/core/seatConfidence";function Q(s){return String(s??"").replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}function ar(s){let e=xl(s.seat.confidenceEvidence),t=s.seat.confidenceEvidence,i=e.limitations.length?`<h4>Known limits</h4><ul>${e.limitations.map(c=>`<li>${Q(c)}</li>`).join("")}</ul>`:"",n=e.modeledTarget?`<div><dt>Modeled target</dt><dd>${Q(e.modeledTarget)}</dd></div>`:"",r=t?`<div><dt>Evidence ID</dt><dd>${Q(t.evidenceId)}</dd></div><div><dt>Model version</dt><dd>${Q(t.modelVersion)}</dd></div><div><dt>Event configuration</dt><dd>${Q(t.eventConfigurationId??"Not configuration-specific")}</dd></div><div><dt>Approval</dt><dd>${Q(t.approvedByRole??"No external approval supplied")}</dd></div>`+(t.validUntil?`<div><dt>Valid until</dt><dd>${Q(t.validUntil.slice(0,10))}</dd></div>`:""):"<div><dt>Evidence ID</dt><dd>None supplied</dd></div>",o=Se(s.seat.commercial)||s.restrictionFallback,a=`<div><dt>View restriction</dt><dd>${Q(o)}</dd></div>`+(s.seat.commercial?.note?`<div><dt>Organizer note</dt><dd>${Q(s.seat.commercial.note)}</dd></div>`:""),l=s.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">${Q(s.title)}</strong></div><button type="button" data-close aria-label="Close seat confidence passport">\xD7</button></header><div class="sl-view3d-passport-summary"><strong>${Q(e.headline)}</strong><span>${Q(e.coverage)} \xB7 ${Q(e.freshness)}</span></div><dl><div><dt>Model status</dt><dd>${Q(e.model)}</dd></div><div><dt>Reality evidence</dt><dd>${Q(e.reality)}</dd></div><div><dt>Source</dt><dd>${Q(e.provenance)}</dd></div>`+a+n+r+`</dl>${i}<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 lr(s){return s?s.closest("[data-report]")?"report":s.closest("[data-close]")||s.classList.contains("sl-view3d-passport-scrim")?"close":null:null}function ci(s,e,t){let i=s?.querySelector("[data-report]"),n=s?.querySelector("[data-report-status]");i&&(i.disabled=e!=="failed",i.textContent=e==="received"?"Report received":"Report this view"),n&&(n.setAttribute("role",e==="failed"?"alert":"status"),n.textContent=e==="sending"?"Sending report\u2026":e==="received"?`Report received. Reference ${t??""}.`:"The report could not be sent. Please try again.")}function is(s,e,t=null){let i=s.view3dEl;if(!i)return;Lt(s,!1);let n=e.confidenceEvidence,r=s.controller.seatDetails(e.id),o=document.createElement("div");o.className="sl-view3d-passport-shell",o.innerHTML=ar({seat:e,title:r?.displayLabel??e.displayLabel??e.label,restrictionFallback:s.tf("picker.noAuthoredRestriction","No organizer-authored restriction"),canReport:typeof s.api.reportViewEvidence=="function"});let a=[...new Set([...i.children,...[...s.els.map.children].filter(u=>u!==i)])].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");i.appendChild(o),i.classList.add("has-passport"),s.view3dPassportEl=o;let c=o.querySelector(".sl-view3d-passport"),p=()=>[...c.querySelectorAll('button:not(:disabled),[href],[tabindex]:not([tabindex="-1"])')],d=u=>{if(u.key==="Escape"){u.preventDefault(),u.stopPropagation(),u.stopImmediatePropagation(),Lt(s);return}if(u.key!=="Tab")return;let h=p();if(!h.length)return;let g=h[0],m=h[h.length-1];u.shiftKey&&document.activeElement===g?(u.preventDefault(),m.focus()):!u.shiftKey&&document.activeElement===m&&(u.preventDefault(),g.focus())};window.addEventListener("keydown",d,!0),s.view3dPassportCleanup=()=>{window.removeEventListener("keydown",d,!0);for(let m of l)m.element.inert=m.inert,m.ariaHidden===null?m.element.removeAttribute("aria-hidden"):m.element.setAttribute("aria-hidden",m.ariaHidden);let u=t?.isConnected?t:s.confirmEl?.querySelector(".sl-confirm-confidence")??s.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(),i.classList.remove("has-passport"),s.view3dPassportEl===o&&(s.view3dPassportEl=null);let g=u??s.view3dCompareEl?.querySelector("[data-passport-seat]")??s.confirmEl?.querySelector(".sl-confirm-confidence")??s.view3dCompareChip.mainButton();(t?.isConnected?t:g)?.focus()},o.addEventListener("click",u=>{let h=lr(u.target instanceof HTMLElement?u.target:null);h==="close"&&Lt(s),h==="report"&&wl(s,e)}),requestAnimationFrame(()=>p()[0]?.focus()),s.emit3dAnalytics("3d_confidence_passport_opened",{seatId:e.id,evidenceId:n?.evidenceId??null,eventConfigurationId:n?.eventConfigurationId??null,modelLevel:n?.modelLevel??"unverified",realityLevel:n?.realityLevel??"none"})}async function wl(s,e){if(s.api.reportViewEvidence){ci(s.view3dPassportEl,"sending");try{let t=await s.api.reportViewEvidence(s.opts.event,{seatId:e.id,evidenceId:e.confidenceEvidence?.evidenceId});s.emit3dAnalytics("3d_confidence_view_reported",{seatId:e.id,evidenceId:e.confidenceEvidence?.evidenceId??null}),ci(s.view3dPassportEl,"received",t.report.id)}catch{ci(s.view3dPassportEl,"failed")}}}function Lt(s,e=!0){let t=s.view3dPassportCleanup;if(s.view3dPassportCleanup=null,!t){s.view3dPassportEl?.remove(),s.view3dPassportEl=null,s.view3dEl?.classList.remove("has-passport");return}e||(document.activeElement instanceof HTMLElement?document.activeElement:null)?.blur(),t(),e||s.root?.focus({preventScroll:!0})}function cr(s){let e=s.view3dEl;if(!e||s.view3dCompareSeatIds.length<2)return;$e(s,!1);let t=s.view3dCompareSeatIds.map(h=>s.view3dComparisonSnapshot(h)).filter(h=>!!h);if(t.length<2){s.clearView3dComparison();return}let i=h=>w(h),n=t.some(h=>!!h.price),r=document.createElement("div");r.className="sl-view3d-compare-shell";let o=t.map((h,g)=>`<article><span>Seat ${g===0?"A":"B"}</span><strong>${i(h.label)}</strong><small>Section ${i(h.section)} \xB7 Row ${i(h.row)}</small><dl>`+(n?`<div><dt>Current price</dt><dd>${i(h.price)}</dd></div>`:"")+`<div><dt>Ticket type</dt><dd>${i(h.category)}</dd></div><div><dt>Availability</dt><dd>${i(h.availability)}</dd></div><div><dt>View source</dt><dd>${i(h.viewSource)}</dd></div><div><dt>View restriction</dt><dd>${i(h.limited)}</dd></div><div><dt>Seat confidence</dt><dd>${i(h.confidence.headline)}</dd></div><div><dt>Reality check</dt><dd>${i(h.confidence.reality)}</dd></div><div><dt>Accessibility</dt><dd>${i(h.accessibility)}</dd></div></dl><div class="sl-view3d-compare-actions"><button type="button" data-passport-seat="${i(h.seat.id)}">Passport</button><button type="button" data-view-seat="${i(h.seat.id)}">View seat</button><button type="button" class="select" data-select-seat="${i(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">${n?"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(r),e.classList.add("has-comparison"),s.view3dCompareEl=r;let p=r.querySelector(".sl-view3d-compare"),d=()=>[...p.querySelectorAll('button:not(:disabled),[href],[tabindex]:not([tabindex="-1"])')],u=h=>{if(h.key==="Escape"){h.preventDefault(),$e(s);return}if(h.key!=="Tab")return;let g=d();if(!g.length)return;let m=g[0],v=g[g.length-1];h.shiftKey&&document.activeElement===m?(h.preventDefault(),v.focus()):!h.shiftKey&&document.activeElement===v&&(h.preventDefault(),m.focus())};window.addEventListener("keydown",u),s.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"),s.view3dCompareEl===r&&(s.view3dCompareEl=null),a?.isConnected?a.focus():s.view3dCompareChip.mainButton()?.focus()},r.querySelector("[data-close]")?.addEventListener("click",()=>$e(s)),r.querySelectorAll("[data-passport-seat]").forEach(h=>h.addEventListener("click",()=>{let g=h.dataset.passportSeat,m=g?s.allSeats().find(v=>v.id===g):void 0;m&&is(s,m,h)})),r.querySelectorAll("[data-view-seat]").forEach(h=>h.addEventListener("click",()=>{let g=h.dataset.viewSeat;$e(s,!1),g&&s.view3dHandle?.flyToSeat(g)})),r.querySelectorAll("[data-select-seat]").forEach(h=>h.addEventListener("click",()=>{let g=h.dataset.selectSeat;g&&kl(s,g)})),requestAnimationFrame(()=>d()[0]?.focus()),s.emit3dAnalytics("3d_comparison_opened",{seatIds:s.view3dCompareSeatIds.slice()})}function $e(s,e=!0){let t=s.view3dCompareCleanup;if(s.view3dCompareCleanup=null,!t){s.view3dCompareEl?.remove(),s.view3dCompareEl=null,s.view3dEl?.classList.remove("has-comparison");return}e||(document.activeElement instanceof HTMLElement?document.activeElement:null)?.blur(),t(),e||s.root?.focus({preventScroll:!0})}function kl(s,e){if(s.salesClosed){s.toast(s.tf("picker.salesClosedToast","Sales are closed for this event."),"warning");return}let t=s.allSeats().find(n=>n.id===e);if(!t)return;if($e(s,!1),!s.controller.select([e]).length){s.syncSelectionTo3d(),s.toast(s.tf("picker.seatNoLongerAvailable","That seat is no longer available."),"warning");return}s.syncSelectionTo3d(),s.showConfirm(t),s.emit3dAnalytics("3d_comparison_selected",{seatId:e})}function dr(s,e){s.querySelector(".sl-view3d-unavailable")?.remove();let{tf:t}=e,i=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.")},n=document.createElement("div");n.className="sl-view3d-unavailable",n.dataset.state=e.visualState,n.setAttribute("role","status"),n.setAttribute("aria-live","polite");let r=document.createElement("span");r.className="sl-view3d-unavailable-eyebrow",r.textContent=e.location;let o=document.createElement("strong");o.textContent=i.title;let a=document.createElement("div");a.className="sl-view3d-unavailable-copy",a.append(r,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=i.message,n.append(a,l,c),l.addEventListener("click",()=>ss(s)),s.appendChild(n),qt(n,e.anchor??null)}function ss(s){let e=s?.querySelector(".sl-view3d-unavailable:not([data-leaving])");e&&(e.dataset.leaving="true",Me(e))}import{t as di}from"@seatlayer/core";function pr(s){return Array.isArray(s)?s.reduce((e,t)=>t.type==="minimumSelectedPlaces"?Math.max(e,t.minimum):e,0):0}function ns(s,e,t=!1){let i=s.violations[0];return i==="numberOfPlacesToSelect"?s.remaining>0?di("picker.selectExactMore",{count:s.remaining}):di("picker.selectExactCount",{count:s.required}):i==="minimumSelectedPlaces"?di("picker.selectMinimumMore",{count:s.remaining}):t?e("picker.adjustSeatSelection","Adjust seat selection"):i==="consecutiveSeats"?e("picker.selectSeatsTogether","Choose seats together in the same row and ticket category."):di("picker.orphanHint")}import{t as Ve,tCount as hr}from"@seatlayer/core";function Mt(s){let e=Math.max(0,s),t=Math.floor(e/6e4),i=String(Math.floor(e%6e4/1e3)).padStart(2,"0");return`${t}:${i}`}function ur(s){let e=s.performanceLabel?`<div class="sl-chip-when">${I(s.performanceLabel)}</div>`:"",t=s.performanceDates?.labels.length?`<div class="sl-chip-dates"><span class="sl-chip-dates-summary">${I(s.performanceDates.summary)}</span><span class="sl-chip-date-list">${s.performanceDates.labels.map(i=>`<span class="sl-chip-date">${I(i)}</span>`).join("")}</span></div>`:"";return e+Sl(s)+t}function Sl(s){let{d:e,area:t,label:i,objectType:n,quantity:r=1,identity:o}=s,a=L=>String(L??"\u2014").replace(/[&<>"]/g,b=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[b]),l=n==="ga"?"ga":e?.objectType??n,c=o?.displayType?.trim()||e?.displayType?.trim()||t?.displayType?.trim()||(l==="table"?y("picker.table","Table"):l==="booth"?y("picker.booth","Booth"):l==="ga"?y("picker.generalAdmission","General admission"):y("picker.row","Row")),p=o?.rowLabel??o?.displayLabel??e?.rowLabel??e?.displayLabel??t?.label??i,d=s.categoryLabel?.trim()??"",u="",h=[];l==="table"&&o?.bookingMode?(u=`${c} ${p}`,h.push([y("picker.guests","Guests"),String(r)])):l==="ga"?(u=String(t?.displayLabel??p),r>1&&h.push([y("picker.tickets","Tickets"),String(r)])):l==="booth"?(u=e?.sectionLabel??`${c} ${p}`,e?.sectionLabel&&h.push([c,String(p)])):!e?.sectionLabel&&!e?.rowLabel&&!e?.seatNumber?u=String(p):(u=e.sectionLabel??"",e.rowLabel&&h.push([c,String(U(e)??e.rowLabel)]),e.seatNumber&&h.push([y("picker.seat","Seat"),String(e.seatNumber)]));let g=!u&&!!d,m=u||d||String(p),v=!!d&&!g&&d!==m,k=h.map(([L,b])=>`<span class="w">${a(L)}</span> <b>${a(b)}</b>`);v&&k.push(`<span class="w">${a(d)}</span>`);let S=[m,...h.map(([L,b])=>`${L} ${b}`),v?d:""].filter(Boolean).join(" \xB7 ");return`<div class="sl-chip-id"><span class="sl-sr">${a(S)}</span><span class="sl-chip-name" aria-hidden="true">${a(m)}</span>`+(k.length?`<span class="sl-chip-pos" aria-hidden="true">${k.join("<i>\xB7</i>")}</span>`:"")+"</div>"}function rs(s,e){let t=I(s),i=e?I(e):"";return'<div class="sl-chip-rail">'+(e?`<button type="button" class="view" data-view-label="${i}" aria-label="${I(Ve("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 mr(s){return s.salesClosed||s.hasHold||s.ctaPhase!=="idle"||s.formOpen||s.room<=0?null:Math.max(1,Math.min(s.wanted,s.room))}function fr({count:s,total:e,pendingCount:t,ctaPhase:i,hasHold:n,salesClosed:r,suppressPricing:o=!1,fromPrice:a,addMore:l,offerFind:c=!1,holdTime:p,money:d}){return s&&i==="holding"?`<span>${y("picker.securingSeats","Securing your seats\u2026")}</span>`:s&&i==="checkout"?o?`<span>${y("picker.seatsSecuredOpeningCheckout","Seats secured. Opening checkout\u2026")}</span>`:`<span>${Ve("picker.peekSecured",{count:s,total:d(e)})}</span>`:s?`<span class="sl-peek-sum">${hr("picker.ticketsCount",s)}</span>`+(l&&!o?`<button type="button" class="go ghost sl-sheet-go sl-sheet-best" data-act="best" aria-label="${y("picker.findTogetherInstead","Find seats together instead")}"><span aria-hidden="true">\u2726</span>${y("picker.seatsTogether","Seats together")}</button>`:"")+`<button type="button" class="go sl-sheet-go" data-act="checkout">${n&&t?y("picker.secureMore","Secure more"):y("picker.continue","Continue")}`+(o?"":`<span class="sl-peek-total">${d(e)}</span>`)+(n&&p?`<span class="sl-peek-time" aria-hidden="true">${p}</span>`:"")+"</button>":r?`<span>${y("picker.salesClosedPill","Sales are closed")}</span>`:`<span class="sl-peek-sum">${!o&&a!=null?Ve("picker.peekFromPrice",{price:d(a)}):y("picker.pickYourSeats","Pick your seats")}</span>`+(c?`<button type="button" class="go sl-sheet-go sl-sheet-find" data-act="find"><span class="sl-peek-spark" aria-hidden="true">\u2726</span>${y("picker.findSeats","Find seats")}</button>`:"")}function os(s,e=Date.now()){return Ve("picker.holdReassurance",{time:Mt(s-e)})}function gr(s){return s.confirming?`<div class="sl-ba" role="alert"><div class="sl-ba-title"><span class="spark" aria-hidden="true">\u2726</span>${y("picker.replaceCurrentChoices","Replace your current choices?")}</div><div class="sl-ba-replace"><b>${Ve("picker.willFindSeatsTogether",{count:s.quantity})}</b><span>${y("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>${y("picker.keepMine","Keep mine")}</button><button type="button" class="replace" data-ba-replace>${y("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>${y("picker.findClosestSeatsTogether","Find the closest seats together")}</div><div class="sl-ba-copy">${y("picker.closestGroupChosenInstantly","Closest available group, chosen instantly.")}</div>`+(s.offerPremium?`<button type="button" class="sl-ba-premium${s.premium?" on":""}" data-ba-premium aria-pressed="${s.premium?"true":"false"}"><span class="star" aria-hidden="true">\u2605</span>${y("picker.bestSeatsPremium","Best seats")}</button>`:"")+`<div class="sl-ba-qty"><button type="button" data-ba="-1" aria-label="${y("picker.fewerSeats","Fewer seats")}">\u2212</button><span>${s.quantity}</span><button type="button" data-ba="1" aria-label="${y("picker.moreSeats","More seats")}">+</button></div>`+(s.categories.length>1?`<select class="sl-ba-cat" aria-label="${I(y("picker.preferredTicketType","Preferred ticket type"))}" data-ba-cat><option value="">${I(y("picker.anyTicketType","Any ticket type"))}</option>`+s.categories.map(e=>`<option value="${I(e.key)}"${s.selectedCategory===e.key?" selected":""}>${I(e.label)}</option>`).join("")+"</select>":'<span class="sl-ba-cat" aria-hidden="true"></span>')+(s.zones.length?`<select class="sl-ba-zone" aria-label="${y("picker.preferredVenueZone","Preferred venue zone")}" data-ba-zone><option value="">${y("picker.anyVenueZone","Any venue zone")}</option>`+s.zones.map(e=>`<option value="${I(e.id)}"${s.selectedZone===e.id?" selected":""}>${I(e.label)}</option>`).join("")+"</select>":"")+`<button type="button" class="sl-ba-go${s.busy?" sl-busy":""}"${s.busy?" disabled":""}>`+(s.busy?`<span class="sl-ba-spin" aria-hidden="true"></span>${y("picker.findingBestSeats","Finding the best seats\u2026")}`:hr("picker.findBestSeatsCount",s.quantity))+"</button>"+(s.reopened?`<button type="button" class="sl-ba-back" data-ba-close>${y("picker.keepMyPicks","Keep my picks")}</button>`:"")+"</div>"}function br(s){if(s.salesClosed&&!s.hasPicks){let e=s.whenText?`<span class="when">${I(s.whenText)}</span>`:"";return`<div class="sl-closed-note" role="status"><b>${y("picker.salesClosedPill","Sales are closed")}</b><span>${y("picker.salesClosedCopy","Ticket sales for this event have ended.")}${e}</span></div>`}return s.hasPicks?"":s.hasGaAreas?`<div class="sl-tray-hint">${s.seated?s.venue3d?y("picker.trayHintChoose3dOrStanding","Choose a seat in the 3D venue \u2014 or grab standing tickets below."):y("picker.trayHintTapOrStanding","Tap a seat on the map \u2014 or grab standing tickets below."):s.venue3d?y("picker.gaTrayHintChoose3dArea","Choose an area in the 3D venue to select tickets."):y("picker.gaTrayHintTapArea","Tap an area on the map to choose tickets.")}</div>`:`<div class="sl-tray-hint">${s.groupMode==="per_performance"?y("picker.groupPerPerformanceTrayHint","Choose seats for this performance, then complete every date above."):s.groupMode?y("picker.groupTrayHint","Choose seats once \u2014 the same seats will be held for every performance."):s.venue3d?y("picker.trayHintChoose3dOrBest","Choose a seat in the 3D venue, or let us pick the best available for you."):y("picker.trayHintTapOrBest","Tap a seat on the map, or let us pick the best available for you.")}</div>`}function vr(s){return{title:Ve("picker.securedCount",{count:s.secured}),copy:s.pendingCount?Ve("picker.moreSelectedCount",{count:s.pendingCount}):os(s.expiresAt),change:s.releasing?y("picker.releasingEllipsis","Releasing\u2026"):y("picker.change","Change")}}import{t as ls,tCount as Tl}from"@seatlayer/core";var as=4,Cl=6;function El(s){let e=s.trim();return/^[0-9]{1,4}$/.test(e)?Number(e):null}function yr(s){return[s.held?"h":"s",s.section,s.rowLabel,s.categoryLabel,s.amountText].join(" ")}function Al(s){if(s.length===1)return s[0];let e=s.map(El);if(e.every(i=>i!==null)){let i=[...e].sort((o,a)=>o-a);if(i.every((o,a)=>a===0||o===i[a-1]+1))return`${i[0]}\u2013${i[i.length-1]}`;let r=i.slice(0,3).join(", ");return i.length>3?`${r} +${i.length-3}`:r}let t=s.slice(0,3).join(", ");return s.length>3?`${t} +${s.length-3}`:t}function Pl(s){let e=[];for(let t of s){let i=e[e.length-1];!!i&&t.groupable&&i.members[0].groupable&&yr(i.members[0])===yr(t)?i.members.push(t):e.push({members:[t],seatsLabel:""})}for(let t of e)t.seatsLabel=Al(t.members.map(i=>i.seatLabel));return e}function wr(s,e,t,i){let n=I;return` data-key="${n(s)}"`+(t.length?` data-held="${n(encodeURIComponent(t.join(`
2645
+ `)))}"`:"")+(e.length?` data-seat="${n(e.join(" "))}"`:"")+(i?` data-locate="${n(i)}"`:"")}function kr(s){let e=I;return`<div class="sl-chip${s.held?" sl-held":""}${s.fresh?" sl-enter":""}"`+wr(s.key,s.seatIds,s.heldLabels,s.locateId)+">"+(s.held?s.stateHtml:`<span class="sl-chip-dot" style="background:${w(s.categoryColor)}" aria-hidden="true"></span>`)+`<div class="sl-chip-main">${s.identityHtml}`+(s.extrasHtml?`<div class="sl-chip-sub">${s.extrasHtml}</div>`:"")+`${s.noteHtml}</div>`+(s.amountText?`<span class="amt">${e(s.amountText)}</span>`:"")+s.railHtml+"</div>"}function xr(s,e,t,i,n){let r=I,o=e?.members.length??1,a=o>1,l=e?e.seatsLabel:s.seatLabel,c=e?e.members.reduce((u,h)=>u+h.amount,0):s.amount,p=e?e.members.flatMap(u=>u.seatIds):s.seatIds,d=e?e.members.flatMap(u=>u.heldLabels):s.heldLabels;return`<div class="sl-chip sl-tline${s.held?" sl-held":""}${s.fresh?" sl-enter":""}${e?"":" sl-tsub"}"${i?' data-overflow="true"':""}`+(e?` data-run="${t}"`:` data-run-of="${t}"`)+wr(s.key,p,d,s.locateId)+">"+(a?`<button type="button" class="sl-trun-toggle" aria-expanded="false" aria-label="${r(Tl("picker.seatsSelectedCount",o))}"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M9 6l6 6-6 6"/></svg></button>`:s.held?s.stateHtml:`<span class="sl-tline-dot" style="background:${w(s.categoryColor)}" aria-hidden="true"></span>`)+`<span class="sl-sr">${r(s.categoryLabel)}</span><span class="sl-tline-id"><b>${r(s.section||s.seatLabel)}</b>`+(s.rowLabel?`<i>\xB7</i><span>${r(s.rowLabel)}</span>`:"")+(s.section&&l?`<i>\xB7</i><span>${r(l)}</span>`:"")+"</span>"+s.extrasHtml+(n.suppressPricing||!s.amountText?"":(a?`<span class="sl-tline-mult">${o}\xD7</span>`:"")+`<span class="amt">${r(n.money(c))}</span>`)+(s.railHtml?`<button type="button" class="rm" aria-label="${r(a?ls("picker.removeSeatLabel",{label:[s.section,s.rowLabel,l].filter(Boolean).join(" \xB7 ")}):s.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 Sr(s,e){if(!s.length)return"";let t=Pl(s),i=[y("picker.section","Section"),y("picker.row","Row"),y("picker.seat","Seat")].join(" \xB7 "),n=t.length>=Cl,r=t.map((a,l)=>{let c=n&&l>=as;return xr(a.members[0],a,l,c,e)+(a.members.length>1?a.members.map(p=>xr(p,null,l,c,e)).join(""):"")}).join(""),o=n?`<button type="button" class="sl-tmore" data-tmore aria-expanded="false" data-more="${I(ls("picker.moreCount",{count:t.length-as}))}" data-less="${I(y("picker.showLess","Show less"))}"><span>${I(ls("picker.moreCount",{count:t.length-as}))}</span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg></button>`:"";return`<div class="sl-tlist"${n?' data-collapsed="true"':""}><div class="sl-tlist-head sl-sr">${I(i)}</div>${r}${o}</div>`}function Tr(s){s.dataset.denseWired!=="true"&&(s.dataset.denseWired="true",s.addEventListener("click",e=>{let t=e.target,i=t.closest("[data-tmore]");if(i){let l=i.closest(".sl-tlist"),c=l?.getAttribute("data-collapsed")==="true";l?.setAttribute("data-collapsed",c?"false":"true"),i.setAttribute("aria-expanded",c?"true":"false");let p=i.querySelector("span");p&&(p.textContent=(c?i.dataset.less:i.dataset.more)??p.textContent);return}let n=t.closest(".sl-trun-toggle");if(!n)return;e.stopPropagation();let r=n.closest(".sl-tline"),o=r?.dataset.run;if(!r||o===void 0)return;let a=n.getAttribute("aria-expanded")!=="true";n.setAttribute("aria-expanded",a?"true":"false"),r.setAttribute("data-open",a?"true":"false"),r.parentElement?.querySelectorAll(`.sl-tsub[data-run-of="${o}"]`).forEach(l=>l.setAttribute("data-open",a?"true":"false"))}))}import{ACCESSIBILITY_TYPES as Cr,t as Er}from"@seatlayer/core";var Ll='<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>',Ml='<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>',pi=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 i=this.offered().length>0;this.button.setAttribute("aria-label",i?t.tf("picker.accessibilityOptions","Accessibility and colour options"):t.tf("picker.displayOptions","Display options")),this.button.innerHTML=i?Ll:Ml,this.menu=document.createElement("div"),this.menu.className="sl-a11ymenu",this.menu.hidden=!0;for(let n of this.stored())this.offeredFree().has(n)&&this.active.add(n);if(this.menu.innerHTML=zn(this.rows()),this.root.append(this.menu,this.button),e.appendChild(this.root),this.button.addEventListener("click",n=>{n.stopPropagation(),this.open(this.menu.hidden)}),this.menu.addEventListener("pointerdown",n=>n.stopPropagation()),this.menu.addEventListener("click",n=>n.stopPropagation()),this.dismiss=()=>this.open(!1),this.escape=n=>{n.key==="Escape"&&this.open(!1)},document.addEventListener("pointerdown",this.dismiss),document.addEventListener("keydown",this.escape),this.wire(),this.active.size){this.applyFilter({focus:!1});let n=()=>this.deps.focusSeatsForFilter();typeof requestAnimationFrame=="function"?requestAnimationFrame(n):n()}}colorblindRow(){return this.menu.querySelector(".sl-cbbtn")}syncCounts(){let e=new Map(this.offered().map(({key:i,count:n})=>[i,n])),t=!1;for(let i of this.menu.querySelectorAll("[data-a11y-row]")){let n=i.dataset.a11yRow??"";if(!n.startsWith("a11y:"))continue;let r=n.slice(5),o=e.get(r);if(o===void 0)continue;let a=i.querySelector(".sl-a11yrow-c");a&&(a.textContent=o==null?"":o>0?Er("picker.accessFreeCount",{count:o}):this.deps.tf("picker.accessNoneLeft","None left"));let l=o===0;i.disabled=l,l?i.setAttribute("aria-disabled","true"):i.removeAttribute("aria-disabled"),l&&this.active.delete(r)&&(this.paint(i,!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 i=t.dataset.a11yRow??"";i.startsWith("a11y:")&&this.paint(t,this.active.has(i.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();Pi(this.menu,{x:t.left+t.width/2,y:t.top}),$s(this.menu),qt(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:i,count:n})=>({key:i,count:n}));let t=this.deps.present;return t?Cr.filter(({key:i})=>t.has(i)).map(({key:i})=>({key:i,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(Cr.map(i=>[i.key,i]));return this.offered().flatMap(({key:i,count:n})=>{let r=t.get(i);return r?[{key:`a11y:${i}`,icon:r.icon,label:r.label,...i==="wheelchair"&&e.has("companion")?{note:this.deps.tf("picker.companionSeatsNote","Companion places beside them stay selectable")}:{},...n==null?{}:{count:n>0?Er("picker.accessFreeCount",{count:n}):this.deps.tf("picker.accessNoneLeft","None left"),disabled:n===0},on:this.active.has(i)}]:[]})}wire(){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 i=t.slice(5),n=!this.active.has(i);n?this.active.add(i):this.active.delete(i),this.paint(e,n),this.applyFilter()})}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{}}};import{attachVisibilityCatchUp as Hl}from"@seatlayer/core";var Il=250;function Ar(s,e=Il){let t=null,i=()=>{t===null&&(t=setTimeout(()=>{t=null,s()},e))},n=Hl(i),r=typeof window<"u"&&typeof window.addEventListener=="function";return r&&window.addEventListener("focus",i),()=>{t!==null&&(clearTimeout(t),t=null),n(),r&&window.removeEventListener("focus",i)}}import{holdRecoveryShape as Ol,tCount as hi}from"@seatlayer/core";var ui=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=Ol(e),i=e.lapsedLabels.length,n=i-e.recoverable.length,r=t==="all"?hi("picker.holdLapsedStillFree",i):t==="partial"?hi("picker.holdLapsedSomeTaken",n):hi("picker.holdLapsedAllTaken",i);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>${I(this.actionLabel())}</button>`:"";return`<div class="sl-lapse-note" role="status"><span>${I(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 hi("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 Pr=Symbol("seatlayer.performance-group-picker");function mi(s,e){return Object.defineProperty(s,Pr,{configurable:!1,enumerable:!1,value:Object.freeze({...e})}),s}function Lr(s){return s[Pr]??null}import{t as Mr,tCount as fi}from"@seatlayer/core";function cs(s,e,t){try{return new Intl.DateTimeFormat(e,{...t,...s.timezone?{timeZone:s.timezone}:{}}).format(new Date(s.startsAt))}catch{return new Date(s.startsAt).toLocaleString(e)}}var gi=(s,e)=>cs(s,e,{dateStyle:"medium"}),bi=(s,e)=>cs(s,e,{timeStyle:"short"}),vi=(s,e)=>cs(s,e,{weekday:"short",day:"numeric",month:"short"});function Hr(s,e,t,i){return!s.length||s.length>=e?null:{summary:i,labels:s.map(n=>`${gi(n,t)} \xB7 ${bi(n,t)}`)}}function Rl(s,e){let t=new Set(e);return s.map(i=>({...i,free:!t.has(i.eventKey)}))}function Ir(s,e){let t=[...s];if(t.length<=1)return t[0]??"";try{return new Intl.ListFormat(e,{style:"long",type:"conjunction"}).format(t)}catch{return t.join(", ")}}function _l(s,e,t="",i=!1){if(!s.length)return"";let n=s.map(r=>{let o=r.free?e.free:e.blocked,a=i&&r.free?`<input class="sl-night-choice" type="checkbox" data-pg-event-key="${w(r.eventKey)}" aria-label="${w(`${r.shortDate}: ${o}`)}" checked>`:"";return`<li class="sl-night${r.free?" ok":" no"}" aria-label="${w(`${r.shortDate}: ${o}`)}">`+a+`<i class="sl-night-dot" aria-hidden="true"></i><span class="d">${w(r.shortDate)}</span><span class="st">${w(o)}</span></li>`}).join("");return`<div class="sl-tip-nights"><div class="sl-tip-nights-title">${w(e.title)}</div><ul class="sl-nightstrip">${n}</ul><p class="sl-tip-nights-note">${w(e.notAvailableOn)}</p>`+t+"</div>"}function Dl(s){return s.selectPartialLabel&&s.pinned?`<button type="button" class="sl-tip-switch" data-pg-select-partial>${w(s.selectPartialLabel)}</button>`:s.switchLabel&&s.pinned?`<button type="button" class="sl-tip-switch" data-pg-switch-mode>${w(s.switchLabel)}</button>`:s.switchLabel||s.selectPartialLabel?"":`<p class="sl-tip-advice">${w(s.advice)}</p>`}function Bl(s){return Number(s.available)+Number(s.selected)+Number(s.partial)+Number(s.unavailable)}function Or(s,e,t){if(Bl(s)<2)return"";let i=(r,o,a="")=>`<li class="sl-pg-legend-item"><i class="sl-pg-sw ${r}"${a}></i>${w(o)}</li>`,n=[];return s.available&&n.push(i("sl-pg-sw-free",e.available,` style="background:${w(t)}"`)),s.selected&&n.push(i("sl-pg-sw-sel",e.selected)),s.partial&&n.push(i("sl-pg-sw-split",e.partial,` style="--sl-pg-sw-cat:${w(t)}"`)),s.unavailable&&n.push(i("sl-pg-sw-off",e.unavailable)),`<ul class="sl-pg-legend-list" aria-label="${w(e.title)}">${n.join("")}</ul>`}function Rr(s,e){if(!s.length)return"";let t=s.map(i=>{let n=i.labels.length?i.labels.join(", "):e.empty;return`<li class="sl-pg-night-row${i.labels.length?"":" empty"}${i.active?" active":""}" role="button" tabindex="0"${i.active?' aria-current="true"':""} data-event-key="${w(i.eventKey)}"><span class="n">${w(i.name)}</span><span class="s">${w(n)}</span></li>`}).join("");return`<div class="sl-pg-nights" role="group" aria-label="${w(e.title)}"><div class="sl-pg-nights-title">${w(e.title)}</div><ul class="sl-pg-nights-list">${t}</ul></div>`}function ds(s,e){if(s?.kind!=="partial"||!e?.length)return null;let t=s.data?.blockedEventKeys??[],i=Rl(e,t);return{states:i,missing:i.filter(n=>!n.free).map(n=>n.shortDate)}}function _r(s,e){return s?_l(s.states,{title:y("picker.group.partlyAvailableTitle","Free on some nights only"),free:y("picker.group.nightFree","Free"),blocked:y("picker.group.nightBlocked","Not available"),notAvailableOn:Mr("picker.group.notAvailableOn",{dates:Ir(s.missing,e.locale)})},Dl({switchLabel:e.switchLabel??null,selectPartialLabel:e.selectPartialLabel??null,pinned:e.pinned,advice:y("picker.group.pickSeatFreeEveryNight","Pick a seat that is free every night.")}),!!e.selectPartialLabel&&!!e.pinned):""}function Nl(s,e,t,i){if(!s.length)return"";let n=new Set(e),r=new Set(t),o=s.map(a=>{let l=n.has(a.eventKey);return`<li class="sl-confirm-date${l?"":" blocked"}"><label><input type="checkbox" data-pg-confirm-event-key="${w(a.eventKey)}" aria-label="${w(`${a.shortDate}: ${l?i.available:i.unavailable}`)}"${l&&r.has(a.eventKey)?" checked":""}${l?"":" disabled"}><span class="sl-confirm-date-label">${w(a.shortDate)}</span><span class="sl-confirm-date-state">${w(l?i.available:i.unavailable)}</span></label></li>`}).join("");return`<fieldset class="sl-confirm-dates" data-pg-confirm-dates><legend>${w(i.title)}</legend><p class="sl-confirm-dates-copy">${w(i.copy)}</p><label class="sl-confirm-date-all"><input type="checkbox" data-pg-confirm-all><span>${w(i.selectAll)}</span></label><ul>${o}</ul><p class="sl-confirm-dates-summary" data-pg-confirm-summary aria-live="polite"></p></fieldset>`}function Dr(s,e,t,i){let n=e.availableEventKeys(t);return Nl(s,n,e.includedEventKeys(),{title:i("picker.group.confirmDatesTitle","Choose performance dates"),copy:n.length===s.length?i("picker.group.confirmAllDatesCopy","This seat is available for all {count} dates. Keep all selected, or remove dates you do not want.").replace("{count}",String(s.length)):i("picker.group.confirmPartialDatesCopy","This seat is available for {available} of {total} dates. Choose one date or keep every available date.").replace("{available}",String(n.length)).replace("{total}",String(s.length)),selectAll:i("picker.group.confirmSelectAll","Select all available dates"),available:i("picker.group.nightFree","Available"),unavailable:i("picker.group.nightBlocked","Unavailable")})}function Br(s){return[...s.querySelectorAll("[data-pg-confirm-event-key]")].filter(e=>e.checked&&!e.disabled).map(e=>e.dataset.pgConfirmEventKey).filter(Boolean)}function Nr(s,e,t,i){let n=[...s.querySelectorAll("[data-pg-confirm-event-key]")];if(!e||!n.length)return;let r=s.querySelector(".sl-confirm-add"),o=s.querySelector("[data-pg-confirm-all]"),a=()=>{let l=n.filter(d=>!d.disabled),c=Br(s).length;o&&(o.checked=c===l.length,o.indeterminate=c>0&&c<l.length);let p=s.querySelector("[data-pg-confirm-summary]");p&&(p.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"),i()};n.forEach(l=>l.addEventListener("change",a)),o?.addEventListener("change",()=>{n.filter(l=>!l.disabled).forEach(l=>{l.checked=o.checked}),a()}),a()}async function $r(s,e,t){if(!s||!t||!s.querySelector("[data-pg-confirm-event-key]"))return!0;let i=Br(s);if(!i.length)return!1;let n=s.querySelector(".sl-confirm-add");return n?.setAttribute("aria-busy","true"),n&&(n.disabled=!0),await t.apply(e,i)?!0:(n?.removeAttribute("aria-busy"),n?.isConnected&&(n.disabled=!1),!1)}function Vr(s,e,t){return s?Mr("picker.group.seatPartlyAvailable",{label:e,free:s.states.length-s.missing.length,total:s.states.length,dates:Ir(s.missing,t)}):""}function Fr(s,e){let t=s.map((i,n)=>{let r=i.state==="done"?e.done:i.state==="current"?e.current:e.upcoming;return`<li class="sl-pg-step-item" data-step="${w(i.id)}" data-state="${w(i.state)}"${i.state==="current"?' aria-current="step"':""}><span class="i" aria-hidden="true">${i.state==="done"?"\u2713":String(n+1)}</span><span class="l">${w(i.label)}</span><span class="sl-pg-sr">${w(r)}</span></li>`}).join("");return`<ol class="sl-pg-steps" aria-label="${w(e.label)}">${t}</ol>`}function ps(s,e){return`<ul class="sl-pg-cards">${s.map(i=>`<li class="sl-pg-card" data-event-key="${w(i.eventKey)}"><span class="n">${w(i.name)}</span><time datetime="${w(i.iso)}"><span class="d">${w(i.date)}</span><span class="t">${w(i.time)}</span></time></li>`).join("")}</ul><p class="sl-pg-included">${w(e)}</p>`}function zr(s){let e=s.rows.map(t=>`<li class="sl-pg-pane-row${t.labels.length?"":" empty"}" data-event-key="${w(t.eventKey)}"><span class="n">${w(t.name)}</span><span class="s">${w(t.labels.length?t.labels.join(", "):s.empty)}</span></li>`).join("");return`<div class="sl-pg-pane-title">${w(s.title)}</div><ul class="sl-pg-pane-list">${e}</ul>`+(s.note?`<p class="sl-pg-pane-note">${w(s.note)}</p>`:"")+(s.total?`<div class="sl-pg-pane-total"><span>${w(s.total.label)}</span><b>${w(s.total.amount)}</b></div>`:"")+(s.holdStatus?`<p class="sl-pg-hold-status" role="status">${w(s.holdStatus)}</p>`:"")}function jr(s){let e=Math.max(0,s);return`${Math.floor(e/6e4)}:${String(Math.floor(e/1e3)%60).padStart(2,"0")}`}function Gr(s,e){if(!s||s.seats<=0)return"";if(e==="same_seat"){let t=s.perPerformance??s.seats;return s.totalPerformances&&s.performances<s.totalPerformances?fi("picker.group.performancesChosenOf",t,{chosen:s.performances,total:s.totalPerformances}):fi("picker.group.seatsEveryPerformance",t)}return s.perPerformance!=null&&s.performancesChosen===s.performances?fi("picker.group.seatsPerPerformance",s.seats,{per:s.perPerformance}):fi("picker.group.performancesChosenOf",s.seats,{chosen:s.performancesChosen,total:s.performances})}function qr(s,e){s.querySelectorAll(".sl-pg-night-row[data-event-key]").forEach(t=>{let i=()=>e(t.dataset.eventKey);t.addEventListener("click",i),t.addEventListener("keydown",n=>{n.key!=="Enter"&&n.key!==" "||(n.preventDefault(),i())})})}import{t as $l}from"@seatlayer/core";function he(s){return String(s??"\u2014").replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[e])}function Vl(s,e){let t=s.objectType==="table"&&!!s.bookingMode,i=s.objectType==="booth",n=t||i||!s.seatNumber,r=n?s.rowLabel??s.displayLabel??s.label:s.seatNumber,o=t?`${y("picker.guests","Guests")} ${s.bookingMode==="variable"?`${s.minOccupancy}\u2013${s.maxOccupancy}`:s.capacity}`:!i&&s.rowLabel?`${e} ${U(s)??""}`.trim():"";return`<div class="sl-tip-head"><div class="sl-tip-id"><span class="sl-tip-seat${n?" name":""}">${he(r)}</span>`+(o?`<span class="sl-tip-row">${he(o)}</span>`:"")+"</div>"+(s.sectionLabel?`<div class="sl-tip-sec"><span class="sl-tip-eyebrow">${y("picker.section","Section")}</span><span class="sl-tip-secname">${he(s.sectionLabel)}</span></div>`:"")+"</div>"}function Kr(s,e){let t=s.status==="not_for_sale",i=s.mark?.kind==="partial",n=s.status==="free"||i?"":`<span class="sl-tip-tag">${t?y("picker.notAvailable","Not available"):s.status==="held"?$l("map.statusHeld"):y("picker.sold","Sold")}</span>`,r=t?"":e.price,o=r?`<span class="sl-tip-amt">${he(r)}</span>`:"",a=!r&&e.priceNote?`<div class="sl-tip-note">${he(e.priceNote)}</div>`:"",l=Se(s.commercial),c=l?`<div class="sl-tip-cx"><span class="g" aria-hidden="true">\u25D0</span>${he(l)}</div>`:"",p=nt(s.wheelchairSpaceType),d=p?`<div class="sl-tip-cx"><span class="g" aria-hidden="true">\u267F</span>${he(p)}</div>`:"",u=e.reason?`<div class="sl-tip-reason">${he(e.reason)}</div>`:"";return'<i class="sl-tip-rail" aria-hidden="true"></i>'+Vl(s,e.rowTypeWord)+`<div class="sl-tip-cat"><span class="sl-tip-dot" style="background:${he(s.categoryColor)}"></span><span class="sl-tip-name">${he(s.categoryLabel)}</span>`+n+o+"</div>"+a+u+d+c+(e.extra??"")}function Ur(s,e,t,i){let n=s.x+14,r=s.y-i.height-12,o=s.y+18,a=r;n+i.width>e-8&&(n=s.x-i.width-14),r<8&&o+i.height<=t-8&&(a=o);let l=Math.max(8,t-i.height-8);return{left:Math.max(8,Math.min(n,Math.max(8,e-i.width-8))),top:Math.max(8,Math.min(a,l))}}function Wr(s,e,t,i=22){let n=Math.max(8,Math.min(s.x-t.width/2,Math.max(8,e.width-t.width-8))),r=s.y-i-t.height,o=s.y+i;return r>=8?{left:n,top:r,placement:"above"}:o+t.height<=e.height-8?{left:n,top:o,placement:"below"}:{left:n,top:Math.max(8,Math.min(r<8?o:r,Math.max(8,e.height-t.height-8))),placement:r<8?"below":"above"}}var hs=14,Fl=12,zl=12,jl=18;function Yr(s,e,t,i=Fl){let n=hs;if(!(s>=e.height-n-t.height-jl))return{placement:"sheet",bottom:n};let o=e.height-s+i,a=e.height-zl-t.height;return{placement:"above",bottom:Math.max(0,Math.min(o,a))}}function Qr(s,e,t,i){let n=t.width/2+12,r=Math.max(n,Math.min(e.width-n,s.x)),o=s.y+t.height+24<=e.height,a=s.y<t.height+24&&o?"below":"above",l=i&&a==="above"?Math.max(t.height+24,s.y):s.y;return{left:r,top:Math.max(8,Math.min(e.height-8,l)),placement:a}}function Xr(s,e,t){let i=s.querySelector("[data-pg-select-partial]"),n=[...s.querySelectorAll("[data-pg-event-key]")],r=()=>n.filter(a=>a.checked).map(a=>a.dataset.pgEventKey).filter(Boolean),o=()=>{if(!i)return;let a=r().length;i.disabled=a===0,i.textContent=e?.(a)??i.textContent};n.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())})}),i?.addEventListener("click",()=>{let a=r();a.length&&t?.(a)})}function rt(s){let e=s?.displayType?.trim()||s?.rowType?.trim();return e||(s?.objectType==="table"?y("picker.table","Table"):s?.objectType==="booth"?y("picker.booth","Booth"):y("picker.row","Row"))}var Zr="@seatlayer/pending-checkout/v1";function Gl(s){return typeof s=="string"&&s.length<=160&&/^ord_[A-Za-z0-9_-]+$/.test(s)}function Jr(s){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 i=null;try{let n=window.sessionStorage.getItem(Zr);if(n){let r=null;try{r=JSON.parse(n)}catch{}if(r&&Gl(r.orderId)){let o=Date.now()-Number(r.storedAt);if(o>=0&&o<=144e5){if(r.eventKey&&r.eventKey!==s)return null;i=r.orderId}}}window.sessionStorage.removeItem(Zr)}catch{}e.delete("seatlayer_checkout");try{let n=e.toString();history.replaceState(history.state,"",`${location.pathname}${n?`?${n}`:""}${location.hash}`)}catch{}return{outcome:t,orderId:i}}function eo(s){if(!s.framed)return null;let e=s.ancestorOrigins?.length?s.ancestorOrigins[0]:null;for(let t of[e,s.referrer])if(t)try{return new URL(t).origin}catch{}return null}var Zl="https://api.seatlayer.io",Jl=10,so=6e4,no=6e4,ec=360,tc=10,ic=40,sc=220,nc=160,ro="seatmap.a11y.cb";function rc(){try{if(typeof window>"u")return null;let s=window.localStorage.getItem(ro);return s==null?null:s==="1"}catch{return null}}function oc(s){try{window.localStorage.setItem(ro,s?"1":"0")}catch{}}var ze=class s{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.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.bookedEl=null;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.confirmEl=null;this.themeMode=null;this.colorSchemeStop=null;this.seatsRevealed=!1;this.seatsRevealedReport=null;this.confirmSeat=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.baReopen=!1;this.bestAvailableConfirm=!1;this.releasingHold=!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 ri({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 ui({toast:(e,t,i)=>this.toast(e,t,i),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.holdCopyPending=!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.lastCatAvail=null;this.lastAvailFloorId="";this.availQuietUntil=0;this.liveTimer=null;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=Lr(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??Zl).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)}},i=!e.transport&&e.publicKey&&!e.buyerAccessTokenProvider&&!e.buyerAccessToken?jt({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:i?.access??xt(e,t),this.pubApi=e.transport?null:i?.api??new Pe(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 Je(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 n=e.numberOfPlacesToSelect;if(n!=null&&(!Number.isInteger(n)||n<1))throw new Error("seatmap: `numberOfPlacesToSelect` must be a positive integer");this.exactTickets=n??null;let r=pr(e.selectionValidators);if(this.exactTickets!=null&&r>this.exactTickets)throw new Error("seatmap: `minimumSelectedPlaces.minimum` cannot exceed `numberOfPlacesToSelect`");let o=Math.max(1,Math.floor(e.maxSelection??this.exactTickets??Math.max(Jl,r)));if(this.exactTickets!=null&&o<this.exactTickets)throw new Error("seatmap: `maxSelection` cannot be lower than `numberOfPlacesToSelect`");if(e.maxSelection!=null&&o<r)throw new Error("seatmap: `maxSelection` cannot be lower than `minimumSelectedPlaces.minimum`");this.maxTickets=this.exactTickets??o,this.cbSafe=rc()??!!e.colorblindSafe,this.controller=this.wireController(e)}get lastSection(){return this.sectionCard.summary}set lastSection(e){this.sectionCard.adopt(e)}chartHasStage(){let e=this.controller.doc;if(!e)return!1;let t=e.floors?.length?e.floors.map(i=>i.objects??[]):[e.objects??[]];for(let i of t)for(let n of i)if(n.type==="shape"&&(n.role==="stage"||n.stageKind))return!0;return!1}confirmThumbHtml(e){let t=this.controller.doc;if(!t)return"";let i=this.deliverableViewReference(e)?e.viewUrl??"":"",n=this.chartHasStage();if(!i&&!n)return"";let r=null;if(!i)try{r=Ul(e,e.focalPoint??t.focalPoint).distanceM??null}catch{return""}let o=n&&r!=null?`<div class="sl-confirm-sight">${I(M("picker.sightline",{m:r}))}</div>`:"";if(!i)return o;let a=I(M("picker.viewFromSeat",{label:e.label})),l=I(this.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}deliverableViewReference(e){let t=e.viewMeta?.previewUrl??e.viewUrl;return t&&(Ri(t)||Ze(t))?t:null}isFramed(){return typeof window<"u"&&window.parent!==window}postToHost(e){if(!this.isFramed())return;let t=eo({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 i=t<640?1.2:.62;return Math.max(420,Math.round(t*i))}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()}syncFullscreenButtons(){let e=!!document.fullscreenElement||this.fsFallback||this.framedFs,t=this.eventDetailsHidden&&!e;this.root?.setAttribute("data-event-details-hidden",String(t)),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 i=this.els.zfs?.querySelector(".sl-zfs-lbl");i&&(i.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))}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}),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){et();let t=document.activeElement instanceof HTMLElement?document.activeElement:null,i=document.createElement("div");i.className="sl-modal-scrim";let n=document.createElement("div");n.className="sl-modal-frame",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.setAttribute("aria-label",y("picker.seatSelection","Seat selection")),n.tabIndex=-1,i.appendChild(n),document.body.appendChild(i);let r=document.body.style.overflow;document.body.style.overflow="hidden";let o=new s({...e,container:n});o.modalScrim=i,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=[...n.querySelectorAll('[role="dialog"][aria-modal="true"]')].filter(m=>m.isConnected&&!m.closest('[hidden], [aria-hidden="true"], [inert]'));return g[g.length-1]??n},c=(g,m)=>{let v=g;for(;v;){let k=window.getComputedStyle(v);if(v.hidden||v.getAttribute("aria-hidden")==="true"||v.hasAttribute("inert")||k.display==="none"||k.visibility==="hidden"||k.visibility==="collapse")return!0;if(v===m)return!1;v=v.parentElement}return!0},p=g=>[...g.querySelectorAll(a)].filter(m=>m.tabIndex>=0&&!m.matches(":disabled")&&!c(m,g)),d=(g,m)=>{let v=p(g),k=m?v[v.length-1]:v[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=r,o.escHandler&&document.removeEventListener("keydown",o.escHandler),i.remove(),o.modalScrim=null;let g=o.prevFocus;o.prevFocus=null,g?.isConnected&&g.focus({preventScroll:!0});let m=()=>{o.destroy(),e.onClose?.()};o.hold&&!o.handedOff?o.release().finally(m):m()};return o.closeModal=h,i.addEventListener("mousedown",g=>{g.target===i&&h()}),o.escHandler=g=>{if(g.key==="Tab"){if(g.defaultPrevented)return;let m=l(),v=p(m),k=v[0],S=v[v.length-1],L=document.activeElement;!k||!S?(g.preventDefault(),d(m,g.shiftKey)):L===m||!L||!m.contains(L)?(g.preventDefault(),(g.shiftKey?S:k).focus({preventScroll:!0})):g.shiftKey&&L===k?(g.preventDefault(),S.focus({preventScroll:!0})):!g.shiftKey&&L===S&&(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),d(l(),!1),o}wireController(e){return new ql({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:Ke(e.theme),onSeatsRevealed:()=>{this.seatsRevealed=!0,e.onSeatsRevealed?.(),this.seatsRevealedReport?.()},onGAClick:t=>{let i=this.controller.getGAAreas().find(n=>n.id===t);i&&(this.collapseSheet(),Ii(this,i,this.lastMapPoint))},onSelectionChange:()=>{this.syncTray(),this.minimap?.refreshMinimap(),this.committedSelection().length&&this.collapseSectionCard(),this.syncSelectionTo3d()},onStatusChange:()=>{this.syncSeatMarks(),this.syncPrices(),this.a11yMenu?.syncCounts(),this.scheduleOfferRefresh(!0),this.evictTakenSelections(),this.detectBooked(),this.minimap?.refreshMinimap(),this.pushAvailabilityTo3d()},onHoldExpired:()=>{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(()=>this.toast(M("picker.holdExpired",void 0)||"Your hold expired \u2014 seats released. Pick again.","warning")),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}this.confirmSeat?.id===t.id&&this.dismissConfirm(),this.tableDialog?.physicalSeatIds.includes(t.id)&&this.dismissTableDialog()},onSelectionLimit:()=>{this.toast(M("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),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={},i=T=>Math.round((performance.now()-T)*100)/100;this.rendered=!0,et();let n=performance.now(),r=Vt(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=on(this.opts.container),{root:c,els:p,mapHost:d}=Ms(l,(T,O)=>this.tf(T,O),this.opts.theme);this.root=c,this.els=p,this.mapHost=d,Ft(c,r,T=>{t.loadLocale=i(n),this.destroyed||this.applyActiveLocale(T,o)}),Jn(c,()=>[{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=i(a),t.skeletonPaint=i(e);let h=await this.loadChart(u,t,i);if(!h)return this;t.shellsPaint=i(e);let g=performance.now();if(this.startRealtime(),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 T=document.createElement("div");T.className="sl-testbadge",T.textContent=rn(M("picker.testMode"),to()),T.setAttribute("aria-label",M("picker.testMode")),T.title=this.tf("picker.testModeExplained","Bookings here are not real and no card is charged"),this.regions["top-left"].appendChild(T)}let m=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,an(this.els.logo,[this.opts.theme?.logoUrl,m?.logoUrl,h.posterUrl],this.opts.theme?.brandName??m?.brandName??h.eventName??"?"),this.els.name.textContent=h.eventName??"";let v=h.startsAt?Qt(h.startsAt,h.timezone??null,this.opts.locale):"";this.eventWhenText=v||null,this.els.meta.textContent=[h.venue,v].filter(Boolean).join(" \xB7 "),this.syncProjection(),this.buildBadge(m);let k=!!this.controller.doc&&this.controller.getExpandedSeats().some(T=>T.commercial?.restrictedView||T.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=i(g);let S=performance.now();if(await this.restoreRememberedHold(),t.restoreHold=i(S),this.destroyed)return this;this.dismissSkeleton(),this.salesClosed&&this.applySalesClosed(),this.syncPrices(),this.syncTray(),this.resumeHostedOrder();let L=this.controller.doc,b=ii(this.opts.event),A=this.performanceGroup?.surface??(this.performanceGroup?"performance_group":null),x=A??"event",H={apiBase:this.apiBase,eventKey:this.opts.event,metricScope:x,surface:A==="season"?"season_picker":A==="performance_group"?"performance_group_picker":"seat_picker",ms:i(e),performanceProfile:t,chartDelivery:h.chartDelivery,seatCount:this.allSeats().length,objectCount:L?.objects.length??0,sectionCount:L?.objects.filter(T=>T.type==="section").length??0,floorCount:this.controller.getFloors().length,chartName:L?.name,view:this.buyerView,load:b,transport:this.opts.transport?"custom":"pubapi"};or(H,(T,O)=>this.emitAnalytics(T,O));let _=h.performanceProfile;return this.seatsRevealedReport=()=>this.emitAnalytics("chart_seats_revealed",ts({...H,performanceProfile:{...H.performanceProfile,..._}})),this.seatsRevealed&&this.seatsRevealedReport(),this.renderInfo=h,await this.registerAgentTools(),this}registerAgentTools(){return nr(this)}webMcpHost(e){return Zi(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=Ar(()=>{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.zoomToFit()),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 n=this.els.sheetToggle,r=c=>{e.dataset.sheet=c?"open":"peek",n?.setAttribute("aria-expanded",String(c)),n?.setAttribute("aria-label",c?this.tf("picker.collapseTicketPanel","Collapse ticket panel"):this.tf("picker.openTicketPanel","Open ticket panel"))};r(e.dataset.sheet==="open"),n?.addEventListener("click",c=>{c.stopPropagation(),r(e.dataset.sheet!=="open")}),this.els.peek?.addEventListener("click",c=>{let p=c.target.closest(".sl-sheet-go");p&&(c.stopPropagation(),p.dataset.act==="checkout"?this.handleCta():p.dataset.act==="best"||p.dataset.act==="find"?(p.dataset.act==="best"&&(this.baReopen=!0,this.baQty=Math.max(1,Math.min(this.baQty,this.maxTickets-this.totalTicketCount())),this.syncTray()),r(!0),this.els.tray?.querySelector(".sl-ba")?.scrollIntoView({block:"nearest",behavior:this.reducedMotion()?"auto":"smooth"}),this.els.tray?.querySelector(".sl-ba-go")?.focus()):r(!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 p=c.clientY-o;p<-18?(r(!0),a=!0):p>18&&(r(!1),a=!0)}),t.addEventListener("pointerup",c=>{l&&!a&&Math.abs(c.clientY-o)<6&&r(e.dataset.sheet!=="open"),l=!1,t.releasePointerCapture?.(c.pointerId)})}let i=()=>{if(this.root?.dataset.layout!=="narrow")return;let n=this.root.getAttribute("data-prices-open")==="true";if(this.root.setAttribute("data-prices-open",String(!n)),this.els.pricesSec?.setAttribute("aria-expanded",String(!n)),!n&&this.root.dataset.sheet!=="open"){this.root.dataset.sheet="open";let r=this.els.sheetToggle;r?.setAttribute("aria-expanded","true"),r?.setAttribute("aria-label","Collapse ticket panel")}};this.els.pricesSec?.addEventListener("click",n=>{n.target.closest("select,button")||i()}),this.els.pricesSec?.addEventListener("keydown",n=>{n.key!=="Enter"&&n.key!==" "||n.target.closest("select,button")||(n.preventDefault(),i())}),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",n=>{this.handleMapPointerDown(n)},!0),this.els.map.addEventListener("mousemove",n=>{if(this.tipPinned)return;let r=this.els.map.getBoundingClientRect();this.tipPos={x:n.clientX-r.left,y:n.clientY-r.top},this.tipEl&&this.tipEl.style.display!=="none"&&this.placeTooltip()}),this.els.cta.addEventListener("click",()=>{this.handleCta()}),this.els.holdChange?.addEventListener("click",()=>{this.handleChangeSeats()})}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 i=e.clientWidth;if(i<=0)return;let n=e.clientHeight,r=i!==this.pickerLayoutSize.width||n!==this.pickerLayoutSize.height;this.pickerLayoutSize={width:i,height:n},this.reportFramedHeight();let o=i<640?"narrow":"wide",a=n<560?"compact":"comfortable";(e.dataset.layout!==o||e.dataset.density!==a)&&(e.dataset.layout=o,e.dataset.density=a,o==="narrow"&&!e.dataset.sheet&&(e.dataset.sheet="peek"),this.dockLayoutChrome(),this.syncMinimapForLayout(),this.lastTrayKeys.size&&this.syncTray()),r&&(this.minimap?.refreshMinimap(),this.fitSectionStripCount())};this.ro=new ResizeObserver(t),this.ro.observe(e),t(),requestAnimationFrame(t)}async loadChart(e,t,i){let n=performance.now(),r=await this.controller.render(e);return t.loadChartAndStatuses=i(n),this.destroyed?null:r?(Object.assign(t,r.performanceProfile),r):(ke({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:He(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 s({...a,container:o}).render()}),null)}resumeHostedOrder(){if(this.checkoutMode!=="hosted")return;let e=Jr(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 pi(t,{event:String(this.opts.event),chart:()=>this.controller.doc?.name??null,needs:()=>this.controller.getAccessNeeds(),hasLimitedView:e,tf:(i,n)=>this.tf(i,n),isColorblindSafe:()=>this.cbSafe,setColorblindSafe:i=>this.setColorblindSafe(i),isLimitedViewHidden:()=>this.limitedViewFilter,setLimitedViewHidden:i=>{this.limitedViewFilter=i,this.controller.setCommercialLimitedFilter(i),this.pushAvailabilityTo3d()},applyAccessibilityFilter:i=>{this.controller.setAccessibilityFilter(i),this.syncPrices(),this.minimap?.refreshMinimap(),this.pushAvailabilityTo3d()},focusSeatsForFilter:()=>this.focusSeatsForFilter()}),this.cbEl=this.a11yMenu.colorblindRow())}focusSeatsForFilter(){this.controller.focusAccessibilityFilter?.()||this.rungsEl&&this.controller.getRung()!=="seats"&&(this.controller.setRung("seats"),this.collapseSectionCard(),this.syncRung())}setAccessibilityFilter(e){this.controller.setAccessibilityFilter(e),this.a11yMenu?.syncAccessibilityFilter(e),this.pushAvailabilityTo3d()}dockLayoutChrome(){let e=this.root?.dataset.layout==="narrow";this.applyPanelCollapsed();let t=this.els.zfs,i=this.els.headInfo?.parentElement;t&&i&&t.parentElement!==i&&(t.classList.add("sl-fs-pill"),i.insertBefore(t,this.els.hold??null));let n=this.els.pricesSec;n&&(e?(n.setAttribute("role","button"),n.tabIndex=0,n.setAttribute("aria-expanded",String(this.root?.getAttribute("data-prices-open")==="true"))):(n.removeAttribute("role"),n.removeAttribute("aria-expanded"),n.tabIndex=-1)),this.lastSection&&this.renderSectionCard(this.lastSection)}buildExtendPrompt(){let e=document.createElement("div");e.className="sl-extend",e.setAttribute("role","status"),e.innerHTML='<span class="sl-extend-txt" data-ref="extendTxt"></span><button type="button" class="sl-extend-btn" data-ref="extendBtn"></button>',(this.regions["bottom-center"]??this.els.map).appendChild(e),this.extendEl=e,this.els.extendTxt=e.querySelector('[data-ref="extendTxt"]'),this.els.extendBtn=e.querySelector('[data-ref="extendBtn"]'),this.els.extendBtn.textContent=this.tf("picker.addTime","Add time"),this.els.extendBtn.addEventListener("click",()=>{this.handleExtend()})}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>${I(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 y(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(),i=document.createElement("div");i.className="sl-soldout-eyebrow",i.textContent=t;let n=document.createElement("div");n.className="sl-soldout-title",n.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(i,n,r),this.els.map.appendChild(e),this.soldoutEl=e}syncSoldout(e,t){let i=this.controller.getGAAreas().length>0,n=this.isSoldOut(e,t,i);n!==this.soldOut&&(this.soldOut=n,this.soldoutEl?.classList.toggle("on",n))}isSoldOut(e,t,i){return!i&&e.length>0&&e.every(n=>(t[n.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!!(this.opts.hideBadge||e?.hideBadge)}buildBadge(e){if(this.badgeHidden(e))return;let t=this.els.foot;if(!t)return;let i=document.createElement("a");i.className="sl-powered",i.href="https://seatlayer.io/?ref=picker",i.target="_blank",i.rel="noopener noreferrer",i.setAttribute("aria-label",this.tf("picker.poweredBy","Powered by SeatLayer"));let n=document.createElement("span");n.className="sl-powered-mark",n.setAttribute("aria-hidden","true"),n.innerHTML=Ut;let r=document.createElement("span");r.textContent=this.tf("picker.poweredBy","Powered by SeatLayer"),i.append(n,r),t.appendChild(i)}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 i=document.createElement("div");i.className="sl-anchor",i.dataset.region=t,this.els.map.appendChild(i),this.regions[t]=i}}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 i=setTimeout(()=>{this.motionTimers.delete(i),this.destroyed||e()},t);this.motionTimers.add(i)}animateOnce(e,t,i=600){!e||this.reducedMotion()||(e.classList.remove(t),e.offsetWidth,e.classList.add(t),this.scheduleMotion(()=>e.classList.remove(t),i))}flashPickedSeat(e){this.reducedMotion()||this.controller.flashSeat(e,this.cssVar("--sl-accent")||"#f4b740")}flashHeldSeats(e){if(this.reducedMotion())return;let t=(e.items??[]).filter(i=>i.objectType!=="ga").slice(0,10).map(i=>this.controller.seatByLabel(i.label)).filter(i=>!!i);rr({regions:this.els,categories:this.controller.doc?.categories,pop:i=>this.controller.flashSeat(i,this.cssVar("--sl-accent")||"#f4b740"),focus:(i,n)=>this.controller.focusSection(i,n),screenPoint:i=>this.controller.worldToScreen(i),schedule:(i,n)=>this.scheduleMotion(i,n)},t)}committedSelection(){let e=this.confirmSeat?.id,t=this.tableDialog&&!this.tableDialogHeld?this.tableDialog.id:null;return this.controller.getSelection().filter(i=>i.id!==e&&i.id!==t)}pendingSelectionCount(){let e=this.hold?.items??[],t=new Set(e.map(n=>n.label));return this.committedSelection().filter(n=>!t.has(n.label)).reduce((n,r)=>n+(r.quantity??1),0)+Be(this.gaQty,this.hold?.items??[])}heldTicketCount(){return(this.hold?.items??[]).reduce((e,t)=>e+(t.quantity??1),0)}totalTicketCount(){let e=new Set((this.hold?.items??[]).map(i=>i.label)),t=this.committedSelection().filter(i=>!e.has(i.label)).reduce((i,n)=>i+(n.quantity??1),0);return this.heldTicketCount()+t+Be(this.gaQty,this.hold?.items??[])}updateSelectionCapacity(){let e=new Set((this.hold?.items??[]).map(n=>n.label)),t=this.committedSelection().filter(n=>e.has(n.label)).reduce((n,r)=>n+(r.quantity??1),0),i=Math.max(0,this.maxTickets-this.heldTicketCount()-Be(this.gaQty,this.hold?.items??[]));this.controller.setMaxSelection(t+i)}syncCta(e=this.lastTrayCount,t=this.pendingSelectionCount()){let i=this.els.cta;if(!i)return;if(this.salesClosed){i.disabled=!0,i.textContent=this.tf("picker.salesClosedCta","Sales closed");return}if(this.confirmSeat||this.tableDialog&&!this.tableDialogHeld){i.disabled=!0,i.textContent=this.tableDialog?this.tf("picker.confirmYourTable","Confirm your table"):this.tf("picker.confirmOrCancelSeat","Confirm or cancel this seat");return}if(this.ctaPhase==="holding"){i.disabled=!0,i.innerHTML=`<span class="sl-cta-spin" aria-hidden="true"></span>${this.tf("picker.securingSeats","Securing your seats\u2026")}`;return}if(this.ctaPhase==="checkout"){i.disabled=!0,i.innerHTML=`<span class="sl-cta-spin" aria-hidden="true"></span>${this.tf("picker.openingCheckout","Opening secure checkout\u2026")}`;return}let n=!this.hold&&this.performanceGroup?.selectionMode==="per_performance"?this.performanceGroup.submissionState?.():null;if(n&&!n.ready){i.disabled=!0,i.textContent=this.tf("picker.completeAllPerformances","Complete all performances ({complete}/{total})").replace("{complete}",String(n.complete)).replace("{total}",String(n.total));return}let r=this.controller.getSelectionValidity(e);if(r&&!r.isValid){i.disabled=!0,i.textContent=ns(r,(o,a)=>this.tf(o,a),!0);return}i.disabled=e===0,i.textContent=this.hold?t?M("picker.secureMoreAndCheckout",{count:t}):this.tf("picker.continueToCheckout","Continue to checkout"):e?this.performanceGroup?this.tf("picker.holdSeatsForAllPerformances","Hold seats for all {count} performances").replace("{count}",String(this.performanceGroup.performanceCount)):this.tf("picker.holdSeatsAndCheckout","Hold seats & checkout"):this.tf("picker.selectSeats","Select seats")}setCtaPhase(e){this.ctaPhase=e,this.syncCta(),this.renderPeek(this.lastTrayCount,this.lastTrayTotal,this.pendingSelectionCount())}async runCheckoutHandoff(e,t){this.setCtaPhase("checkout");try{await this.checkoutHandoff(e,t)}finally{this.ctaPhase==="checkout"&&!this.bookedShown&&this.setCtaPhase("idle")}}holdStorageKey(){return`@seatlayer/hold/v1/${encodeURIComponent(this.apiBase)}/${encodeURIComponent(this.opts.event)}`}rememberedHoldId(){if(this.opts.initialHoldId)return this.opts.initialHoldId;if(this.opts.restoreHold===!1||typeof window>"u")return null;try{return window.sessionStorage.getItem(this.holdStorageKey())}catch{return null}}rememberHold(e){if(!(this.opts.restoreHold===!1||typeof window>"u"))try{window.sessionStorage.setItem(this.holdStorageKey(),e.holdId)}catch{}}forgetHold(){if(!(typeof window>"u"))try{window.sessionStorage.removeItem(this.holdStorageKey())}catch{}}async resumeHoldFromServer(e,t){try{let i=await this.controller.resumeHold(e);if(!i||this.destroyed)return null;let n={holdId:i.holdId,expiresAt:i.expiresAt,seats:i.seats,items:i.items};return this.hold=n,this.handedOff=!0,this.bookedShown=!1,this.ctaPhase="idle",this.startHoldTimer(n.expiresAt),this.rememberHold(n),this.syncTray(),this.emitHoldChange(),this.opts.onHoldRestored?.(n,n.seats??[],this.buildHandoff(n)),t&&this.toast(this.tf("picker.heldTicketsRestored","Your held tickets have been restored."),"success"),n}catch(i){let n=i?.status;return n===404||n===409?this.forgetHold():this.opts.onError?.(i),null}}async restoreRememberedHold(){let e=this.rememberedHoldId();e&&await this.resumeHoldFromServer(e,!0)}activeFloorObjects(){let e=this.controller.doc;if(!e)return[];let t=e.floors;if(t?.length){let i=this.controller.getActiveFloorId();return(t.find(n=>n.id===i)??t[0]).objects??[]}return e.objects??[]}buildMinimap(){!this.els.map||this.root?.dataset.layout==="narrow"||(this.minimap=qn({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 ai(this,e)}catPriceRange(e){return li(this,e)}buildPriceFilter(){if(this.suppressPricing||!this.els.prices||!this.els.pricesSec)return;let e=Sn(this.controller.doc?.categories??[],this.legendDeps());if(e.length<2)return;let t=document.createElement("select");t.className="sl-price-select",t.setAttribute("aria-label",this.tf("picker.filterAndFocusByPrice","Filter and focus seats by price"));let i=document.createElement("option");i.value="all",i.textContent=this.tf("picker.allPrices","All prices"),t.appendChild(i);for(let n of e){let r=document.createElement("option");r.value=n.id,r.textContent=n.label,t.appendChild(r)}this.els.pricesSec.appendChild(t),this.priceSelect=t,t.addEventListener("change",()=>{this.applyPriceBand(e.find(n=>n.id===t.value)?.keys??null)})}applyPriceBand(e){if(this.focusedCatKey=null,this.priceBandKeys=e?new Set(e):null,this.priceSelect){let t=e?this.priceSelect.value:"all";this.priceSelect.value!==t&&(this.priceSelect.value=t)}this.controller.setCategoryFilter(e),this.controller.focusCategoryFilter(e),this.pushAvailabilityTo3d(),this.syncFloors(),this.syncRung(),this.minimap?.refreshMinimap(),this.syncPrices(),this.lastSection&&this.showSectionCard(this.lastSection)}buildArenaChrome(){let e=this.controller.doc;if(!e||!this.els.map)return;let t=e.objects.some(i=>i.type==="section")||(e.floors??[]).some(i=>i.objects.some(n=>n.type==="section"));if(this.canOffer3d()){let i=document.createElement("div");i.className="sl-projection",i.setAttribute("role","group"),i.setAttribute("aria-label",this.tf("picker.venueView","Venue view")),i.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>`,i.querySelectorAll("button").forEach(n=>{if(n.dataset.view==="venue3d")for(let r of["pointerenter","focus","pointerdown"])n.addEventListener(r,Di,{once:!0});n.addEventListener("click",()=>{this.setBuyerView(n.dataset.view)})}),this.regions["top-right"].appendChild(i),this.projectionEl=i,this.syncProjection()}if(t){let i=[...e.objects,...(e.floors??[]).flatMap(p=>p.objects)],n=new Set((e.zones??[]).map(p=>p.id)),o=i.some(p=>p.type==="section"&&typeof p.zone=="string"&&n.has(p.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",M("picker.zoomLevel"));let l={zones:M("picker.rungLabel.zones"),sections:M("picker.rungLabel.sections"),seats:M("picker.rungLabel.seats")},c={zones:M("picker.rungTip.zones"),sections:M("picker.rungTip.sections"),seats:M("picker.rungTip.seats")};a.innerHTML=o.map(p=>`<button type="button" data-rung="${p}" title="${c[p]}" aria-pressed="false">${l[p]}</button>`).join(""),a.querySelectorAll("button").forEach(p=>{p.addEventListener("click",()=>{let d=p.dataset.rung;this.controller.setRung(d),d==="seats"&&this.collapseSectionCard()})}),this.regions["top-center"].appendChild(a),this.rungsEl=a,this.syncRung()}if(this.controller.isMultiFloor()){let i=jn({floors:this.controller.getFloors(),tf:(n,r)=>this.tf(n,r),onChoose:n=>{n===""?this.controller.setFloorOverview(!0):this.controller.setFloor(n),this.showSectionCard(null),this.syncFloors(),this.syncRung(),this.minimap?.refreshMinimap()}});this.regions["left-rail"].appendChild(i),this.floorsEl=i,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.minimap?.setAutoOpen(!1),this.rungsEl&&this.rungsEl.querySelectorAll("button").forEach(i=>{let n=i.dataset.rung===e;i.classList.toggle("on",n),i.setAttribute("aria-pressed",String(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||!Wt()?!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)?no/2:no}syncFloors(){Gn(this.floorsEl,this.controller.getActiveFloorId(),this.controller.isFloorOverview())}get sectionCard(){return this.sectionCardCache||(this.sectionCardCache=new ni({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()}fitSectionStripCount(){this.sectionCard.fitStripCount()}sectionNeighbours(e){let t=this.activeFloorObjects().filter(n=>n.type==="section"&&!this.controller.isSectionClosed(n.id)&&this.controller.getSectionSeatCount(n.id)>0);if(t.length<2)return null;let i=t.findIndex(n=>n.id===e);return i<0?null:{previous:t[(i-1+t.length)%t.length],next:t[(i+1)%t.length]}}markedSeatAnnouncement(e){let t=ds(this.controller.getRenderer()?.getSeatMark?.(e.id),this.performanceGroup?.nights?.());return Vr(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 i=this.controller.doc?.categories.find(h=>h.key===e.categoryKey),n=this.controller.getStatus(e.id)??"free",r=n==="free"?this.tf("picker.statusAvailable","available"):n==="held"?this.tf("picker.statusOnHold","on hold"):this.tf("picker.statusTaken2","taken"),o=i?this.catPriceRange(i):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),p=rt(c),d=c?.rowLabel??c?.displayLabel??e.displayLabel??e.label,u=l?`${p} ${d}, ${l.bookingMode==="variable"?M("picker.minToMaxGuests",{min:l.minOccupancy,max:l.maxOccupancy}):M("picker.capacityGuests",{count:l.capacity})}`:c?.objectType==="booth"?`${p} ${d}`:c?.objectType==="table"?`${p} ${d}, ${M("picker.seatNumberLower",{label:c.seatNumber??e.label})}`:M("picker.seatLabel",{label:c?.displayLabel??e.displayLabel??e.label});this.srEl.textContent=`${u}, ${i?.label??e.categoryKey}${a?`, ${a}`:""}, ${r}`}showTableDialog(e,t,i){this.dismissTableDialog(!1),this.tableDialog={...e},this.tableDialogHeld=t,this.tableDialogReturnFocus=i??document.activeElement;let n=this.controller.doc?.categories.find(a=>a.key===e.categoryKey),r=e.bookingMode==="variable",o=document.createElement("div");o.className="sl-table-scrim",o.innerHTML=Vn(e,{variable:r,held:t,typeWord:rt(e),categoryLabel:n?.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],p=l[l.length-1];a.shiftKey&&document.activeElement===c?(a.preventDefault(),p.focus()):!a.shiftKey&&document.activeElement===p&&(a.preventDefault(),c.focus())}),requestAnimationFrame(()=>o.querySelector(r?'[data-table-step="-1"]':".sl-table-confirm")?.focus())}renderTableDialogState(){let e=this.tableDialog,t=this.tableDialogEl;if(!e||!t)return;let i=t.querySelector("output[data-table-qty]");i&&(i.value=String(e.quantity));let n=t.querySelector("input[data-table-qty]");n&&(n.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),o=t.querySelector("[data-table-total]");o&&(o.textContent=this.money(r*e.quantity))}async confirmTableDialog(){let e=this.tableDialog,t=this.tableDialogHeld;if(!e)return;let i=this.tableDialogEl?.querySelector(".sl-table-confirm");if(i&&(i.disabled=!0,i.textContent=t?this.tf("picker.updatingEllipsis","Updating\u2026"):this.tf("picker.selectingEllipsis","Selecting\u2026")),t){try{let n=await this.controller.replaceTableQuantity(e.label,e.quantity,this.opts.holdTtlMs);if(!n){this.toast(this.tf("picker.guestCountCouldNotBeSecured","That guest count could not be secured. Your current table hold is unchanged."),"warning"),this.renderTableDialogState(),i&&(i.disabled=!1,i.textContent=this.tf("picker.updateTable","Update table"));return}this.hold={holdId:n.holdId,expiresAt:n.expiresAt,seats:n.seats,items:n.items},this.startHoldTimer(n.expiresAt),this.dismissTableDialog(),this.syncTray(),this.emitHoldChange(),this.toast(M("picker.tableUpdatedForGuests",{label:e.label,count:e.quantity}),"success")}catch(n){this.opts.onError?.(n),this.toast(this.tf("picker.guestCountNoLongerAvailable","That guest count is no longer available. Your current hold is unchanged."),"error"),i&&(i.disabled=!1,i.textContent=this.tf("picker.updateTable","Update table"))}return}if(!this.controller.setTableQuantity(e.label,e.quantity)){i&&(i.disabled=!1,i.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())}showConfirm(e){let t=this.confirmSeat?.id;this.confirmEl?.remove(),this.confirmEl=null,this.confirmSeat=e,this.root?.setAttribute("data-confirming","true"),this.els.side?.toggleAttribute("inert",!0),Object.values(this.regions).forEach(x=>x.toggleAttribute("inert",!0)),this.controller.setSelectionFocus(e.id),t&&t!==e.id&&this.controller.deselect([t]),this.tipEl&&(this.tipEl.style.display="none");let i=this.controller.seatDetails(e.id),n=this.controller.doc?.categories.find(x=>x.key===e.categoryKey),r=i?.price??(n?.tiers?.length?n.tiers[0].price:n?.price),o=r!=null?this.paidPrice(e.categoryKey,i?.tierId??n?.tiers?.[0]?.id??null,r,e.label):void 0,a=On(i,e.displayLabel??e.label,rt(i)),l=i?.tiers??n?.tiers??[],c=i?.tierId??l[0]?.id,p=this.suppressPricing?"":Dn(l,c,x=>this.money(this.paidPrice(e.categoryKey,x.id,x.price,e.label))),d=this.buyerView==="venue3d",u=this.performanceGroup?.confirmDateSelection??void 0,h=u?this.performanceGroup?.nights?.()??[]:[],g=u?Dr(h,u,e.id,(x,H)=>this.tf(x,H)):"",m=document.createElement("div");m.className="sl-confirm sl-mo-in",g&&m.classList.add("sl-confirm-group-dates"),m.setAttribute("role","dialog"),m.setAttribute("aria-label",M("picker.confirmSeatLabel",{label:e.label}));let v=n?.color??"#6e7bff";m.style.setProperty("--sl-cat",v);let k=String(i?.categoryLabel??n?.label??e.categoryKey),S=this.controller.categoryAvailability()[e.categoryKey],L=typeof S=="number"&&S>0?Fe("picker.leftCount",S):"";m.innerHTML=$n({identityFields:a,identity:Rn(i,e.displayLabel??e.label,rt(i)),marker:si(i?.wheelchairSpaceType),see3dPill:_n(this.canOffer3d(),d),categoryColor:n?.color??"#6e7bff",categoryLabel:k,priceLabel:!this.suppressPricing&&o!=null?this.money(o):"",categoryLeftLabel:L,tierChoices:p,groupDates:g,wheelchair:Ln(i?.wheelchairSpaceType),commercial:Pn(e.commercial),thumb:this.seatViewEnabled()&&this.buyerView!=="venue3d"?this.confirmThumbHtml(e):"",inspect:d?`${In(e,this.suppressPricing?`${i?.displayLabel??e.displayLabel??e.label}`:`${i?.displayLabel??e.displayLabel??e.label} \xB7 ${o==null?this.tf("picker.priceNotSupplied","Price not supplied"):this.money(o)}`,d)}<div class="sl-confirm-inspect-row">${Hn(e,d?this.view3dCompareSeatIds:null)}${Ui(this.canOffer3d(),d)}</div>`:Ui(this.canOffer3d(),d),cancelLabel:M("common.cancel"),selectLabel:this.addSeatLabel(i?.objectType)}),this.els.map.appendChild(m),this.confirmEl=m;let b=m.querySelector(".sl-confirm-thumb"),A=b?.closest(".sl-confirm-thumbwrap")??null;if(b&&A){let x=!1,H=()=>{if(x||!A.isConnected)return;x=!0;let T=()=>{A.remove(),this.confirmEl===m&&this.reanchorConfirm()};if(this.reducedMotion()||typeof requestAnimationFrame!="function"){T();return}A.style.height=`${A.offsetHeight}px`,A.classList.add("sl-confirm-thumb-out"),requestAnimationFrame(()=>{A.style.height="0px",A.style.opacity="0"}),setTimeout(T,nc)};b.addEventListener("error",H),b.addEventListener("load",()=>{b.naturalWidth||H()});let _=e.viewMeta?.previewUrl??e.viewUrl;_?this.buyerAssetUrls.resolve(_).then(T=>{if(!(!m.isConnected||this.confirmEl!==m)){if(!T){H();return}b.src=T}}).catch(T=>{H(),this.opts.onError?.(T)}):H()}this.reanchorConfirm(),m.querySelector(".sl-confirm-view")?.addEventListener("click",()=>{this.openSeatView(e)}),m.querySelector(".sl-confirm-confidence")?.addEventListener("click",x=>{this.openSeatConfidencePassport(e,x.currentTarget instanceof HTMLElement?x.currentTarget:null)}),m.querySelector(".sl-confirm-compare")?.addEventListener("click",()=>this.saveView3dComparisonSeat(e)),m.querySelectorAll("[data-confirm-tier]").forEach(x=>{x.addEventListener("click",()=>{let H=x.dataset.confirmTier,_=l.find(O=>O.id===H);if(!_)return;this.controller.setSeatTier(e.id,_.id),m.querySelectorAll("[data-confirm-tier]").forEach(O=>{O.setAttribute("aria-pressed",String(O===x))});let T=m.querySelector(".sl-confirm-price");T&&(T.textContent=this.money(this.paidPrice(e.categoryKey,_.id,_.price,e.label))),this.reanchorConfirm()})}),m.querySelectorAll(".sl-confirm-3d,.sl-confirm-3dpill").forEach(x=>{x.addEventListener("pointerdown",Di,{once:!0}),x.addEventListener("click",()=>{this.buyerView==="venue3d"?(this.dismissConfirm(),this.view3dHandle?.flyToSeat(e.id)):(this.view3dReturnSeat=e,this.dismissConfirm(),this.enter3d(e.id))})}),Nr(m,u,(x,H)=>this.tf(x,H),()=>this.reanchorConfirm()),m.querySelector(".sl-confirm-add").addEventListener("click",()=>{this.commitConfirm()}),m.querySelector(".sl-confirm-cancel").addEventListener("click",()=>this.cancelConfirm()),requestAnimationFrame(()=>{let x=m.querySelector(".sl-confirm-add");x?.focus(),this.liftToastOverConfirm(),this.inviteCommit(m,x)})}inviteCommit(e,t){if(!t||this.reducedMotion())return;t.classList.add("sl-confirm-add-invite");let i=()=>t.classList.remove("sl-confirm-add-invite");e.addEventListener("pointerdown",i,{once:!0}),e.addEventListener("keydown",i,{once:!0}),t.addEventListener("focus",i,{once:!0})}addSeatLabel(e){return e&&e!=="seat"?this.tf("picker.select","Select"):this.tf("picker.addSeat","Add seat")}reanchorConfirm(){if(!this.confirmEl||!this.confirmSeat||this.root?.dataset.view3d==="on")return;let e=this.controller.worldToScreen({x:this.confirmSeat.x,y:this.confirmSeat.y});if(this.root?.dataset.layout==="narrow"){let l=Yr(e.y,{height:this.els.map.clientHeight},{height:this.confirmEl.offsetHeight||230});l.placement==="above"?(this.confirmEl.dataset.placement="above",this.confirmEl.style.bottom=`${l.bottom}px`):(this.confirmEl.removeAttribute("data-placement"),this.confirmEl.style.removeProperty("bottom")),Ns(this.confirmEl,e,this.els.map),this.liftToastOverConfirm();return}let t=this.els.map.clientWidth,i=this.els.map.clientHeight,n=this.confirmEl.offsetWidth||276,r=this.confirmEl.offsetHeight||230,o=this.confirmEl.classList.contains("sl-confirm-group-dates"),a=Qr(e,{width:t,height:i},{width:n,height:r},o);this.confirmEl.dataset.placement=a.placement,this.confirmEl.style.left=`${a.left}px`,this.confirmEl.style.top=`${a.top}px`,Gt(this.confirmEl,e,{left:a.left,top:a.top,width:n,height:r})}dismissConfirm(){this.confirmEl&&Me(this.confirmEl),this.confirmEl=null,this.confirmSeat=null,this.liftToastOverConfirm(),this.root?.removeAttribute("data-confirming"),Object.values(this.regions).forEach(e=>e.toggleAttribute("inert",!1)),this.applyPanelCollapsed(),this.controller.setSelectionFocus(null)}async commitConfirm(){let e=this.confirmSeat;if(!e)return;let i=this.confirmEl?.querySelector(".sl-confirm-add")??null;if(i?.classList.contains("is-adding")||!await $r(this.confirmEl,e.id,this.performanceGroup?.confirmDateSelection??void 0))return;this.collapseSectionCard(),this.confirmSeat=null,this.syncTray(),this.syncSelectionTo3d();let n=()=>{this.dismissConfirm(),es(this.els,this.controller.worldToScreen(e),e,this.controller.doc?.categories)};if(!i||this.reducedMotion()){n();return}i.classList.remove("sl-confirm-add-invite"),i.classList.add("is-adding"),i.setAttribute("aria-disabled","true");let r=i.querySelector(".sl-confirm-add-t");r&&(r.textContent=this.tf("picker.added","Added")),this.scheduleMotion(n,ec)}cancelConfirm(){let e=this.confirmSeat;e&&(this.controller.deselect([e.id]),this.confirmSeat&&this.dismissConfirm(),this.syncSelectionTo3d(),this.root?.focus({preventScroll:!0}))}closeConfirm(){this.dismissConfirm()}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,i=this.controller.doc,n=this.controller.getActiveFloorId(),r=e.focalPoint??i?.floors?.find(d=>d.id===n)?.focalPoint??i?.focalPoint??{x:0,y:0},o,a,l=!1;if(e.viewUrl){let d,u=null;try{let g=e.viewMeta?.previewUrl;g&&g!==e.viewUrl?(u=await this.buyerAssetUrls.resolve(g),d=e.viewUrl):d=await this.buyerAssetUrls.resolve(e.viewUrl)}catch(g){t===this.seatViewGen&&this.opts.onError?.(g);return}if(t!==this.seatViewGen||!d||e.viewMeta?.previewUrl&&e.viewMeta.previewUrl!==e.viewUrl&&!u||!this.root||!this.seatViewEnabled())return;let h={url:d,...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=io(h),l=Ql(h)}else{let d;try{let{generateSeatPanorama:u}=await Yt();d=u(e,r,this.allSeats())}catch(u){t===this.seatViewGen&&this.opts.onError?.(u);return}if(t!==this.seatViewGen||!this.root||!this.seatViewEnabled())return;o={url:d.url,generated:!0},a=M("picker.illustrationCaption",{m:d.distanceM})}this.closeSeatView(!1);let c=M("picker.viewFromSeat",{label:e.label}),p=Jt({root:this.root,source:o,caption:a,real:l,closeLabel:this.tf("picker.close","Close"),dragHint:it(),viewFromSeatLabel:c,real360Label:M("picker.real360"),previewLabel:M("picker.preview"),resolveAsset:d=>this.buyerAssetUrls.resolve(d),onClose:()=>this.closeSeatView()});this.viewEl=p.element,this.viewCleanup=()=>p.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 i=Number.isInteger(e);return Kl(e,this.currency,{locale:this.opts.locale,fallback:(n,r)=>`${n} ${r}`,...i?{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(),i=En(e,t);if(i==null)return;let n=6*36e5,r=Math.min(Math.max(i-t+1e3,1e3),n);this.offerBoundaryTimer=setTimeout(()=>{this.offerBoundaryTimer=null,!document.hidden&&this.refreshOfferAvailability(!1)},r)}scheduleOfferRefresh(e){!this.api.availability||this.destroyed||(this.offerRefreshTimer&&clearTimeout(this.offerRefreshTimer),this.offerRefreshTimer=setTimeout(()=>{this.offerRefreshTimer=null,this.refreshOfferAvailability(e)},e?180:0))}async refreshOfferAvailability(e){if(!(!this.api.availability||this.destroyed))try{let t=await this.api.availability(this.opts.event,e);if(this.destroyed)return;let i=zi(t);if(!i)return;this.offerAvailability=i,this.applyChannelPricing(i.channelPricing),this.scheduleOfferBoundary(i);let n=ji(i),r={...this.hostPricing?.prices??{},...n},o=Object.keys(r).length>0||this.hostPricing?.formatter?{prices:r,...this.hostPricing?.formatter?{formatter:this.hostPricing.formatter}:{}}:void 0;this.setPricing(o),this.syncOffer(),this.opts.onOfferAvailabilityChange?.(i)}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,i=t?.release??null,n=i?null:t?.upcoming??null;if(!t||t.state==="closed"||t.state==="sold-out"||!i&&!n){e.classList.remove("has"),e.replaceChildren();return}let r=i??n,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=i?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||(i?this.tf("picker.currentOffer","Current offer"):this.tf("picker.scheduledOffer","Scheduled offer"));let p=document.createElement("span");p.className="sl-offer-line";let d=[];i&&t.fromPrice!=null&&d.push(this.money(t.fromPrice/100)),i&&r.remaining!=null&&d.push(M("picker.offerRemainingAvailable",{count:r.remaining})),i&&r.endsAt!=null&&d.push(M("picker.offerUntil",{time:Qt(r.endsAt,this.eventTimezone,this.opts.locale)})),n?.startsAt!=null&&d.push(M("picker.offerStarts",{time:Qt(n.startsAt,this.eventTimezone,this.opts.locale)})),p.textContent=d.join(" \xB7 "),a.append(l,c,p);let u=document.createElement("details");u.className="sl-offer-info";let h=document.createElement("summary");h.setAttribute("aria-label",M("picker.howOfferWorks",{name:c.textContent??""})),h.textContent="i";let g=document.createElement("div");g.className="sl-offer-detail",g.textContent=i?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,i,n){let r=n?this.channelByObject.get(n):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 o=e?this.opts.pricing?.prices?.[e]:void 0;return o===void 0?i:typeof o=="number"?o:t&&o.tiers?.[t]!==void 0?o.tiers[t]:o.base??i}legendDeps(){return{colorOf:e=>this.controller.getRenderer()?.categoryDisplayColor?.(e.key)??e.color,rangeOf:e=>this.catPriceRange(e),priceOf:e=>this.catPrice(e),offerOf:e=>this.offerPrice(e),money:e=>this.money(e),esc:I}}syncPriceRail(e,t,i=this.legendDeps()){let n=this.els.railScroll,r=e.length>1;if(this.els.rail?.classList.toggle("has",r),!n)return;n.innerHTML=r?kn({...i,categories:e,left:t,activeKey:this.focusedCatKey,soldOutWord:this.tf("picker.soldOut","Sold out"),allWord:this.tf("picker.allPrices","All prices"),allActive:!this.focusedCatKey&&!this.priceBandKeys}):"";let o=e.map(a=>a.key).join("|");this.lastRailSignature!==o&&(this.lastRailSignature=o,n.scrollLeft=0),n.querySelectorAll(".sl-rc").forEach(a=>{a.addEventListener("click",()=>{if(a.hasAttribute("data-rail-all")){this.applyPriceBand(null);return}this.focusCategory(a.dataset.cat??"")})}),this.railEdgesBound||(this.railEdgesBound=!0,n.addEventListener("scroll",()=>Fi(n),{passive:!0})),requestAnimationFrame(()=>Fi(n))}syncPrices(){let e=this.controller.doc;if(!e||!this.els.prices)return;let t=this.controller.categoryAvailability(),i=e.categories.filter(d=>!d.notForSale);this.narrateAvailability(i,t),this.syncSoldout(i,t);let n=this.legendDeps(),r=this.suppressPricing,o=r?{...n,priceOf:()=>{},rangeOf:()=>{},offerOf:()=>null}:n;r&&(this.els.pricesSec?.querySelector("span")?.replaceChildren(this.tf("picker.seatCategories","Seat categories")),this.els.pricesHint?.remove()),this.syncPriceRail(i,t,o);let a=5,l=i.length-a,c=l>1&&!this.pricesExpanded,p=c?i.slice(0,a):i;this.els.prices.classList.toggle("sl-expanded",l>1&&this.pricesExpanded),this.els.prices.innerHTML=wn({...o,categories:p,left:t,collapsed:c,activeKey:this.focusedCatKey,bandKeys:this.priceBandKeys,leftCount:d=>Fe("picker.leftCount",d),titleFor:(d,u)=>u?this.tf("picker.showAllSeats","Show all seats"):M("picker.showLabelSeatsOnMap",{label:d.label}),moreLabel:l>1?c?r?this.tf("picker.showAllCategories","Show all categories"):M("picker.showAllTicketTypes",{count:i.length}):this.tf("picker.showFewer","Show fewer"):null,status:{legend:this.tf("picker.seatStatusLegend","Seat status legend"),held:this.tf("picker.temporarilyHeld","Temporarily held"),sold:this.tf("picker.sold","Sold")}}),this.els.prices.querySelectorAll(".sl-price-row").forEach(d=>{d.addEventListener("mouseenter",()=>this.controller.getRenderer()?.setCategoryHighlight?.(d.dataset.cat??null)),d.addEventListener("mouseleave",()=>this.controller.getRenderer()?.setCategoryHighlight?.(null));let u=()=>this.focusCategory(d.dataset.cat??"");d.addEventListener("click",u),d.addEventListener("keydown",h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),u())})}),this.els.prices.querySelector(".sl-price-more")?.addEventListener("click",()=>{this.pricesExpanded=!this.pricesExpanded,this.syncPrices()})}focusCategory(e){if(!e)return;let t=this.focusedCatKey===e?null:e;this.focusedCatKey=t,this.priceBandKeys=t?new Set([t]):null;let i=this.els.pricesSec?.querySelector(".sl-price-select");i&&(i.value="all"),this.controller.setCategoryFilter(t?[t]:null),this.controller.focusCategoryFilter(t?[t]:null),this.pushAvailabilityTo3d(),this.syncFloors(),this.syncRung(),this.minimap?.refreshMinimap(),this.syncPrices(),this.lastSection&&this.showSectionCard(this.lastSection)}narrateAvailability(e,t){let i=this.els.liveText,n=this.lastCatAvail;this.lastCatAvail={...t};let r=this.controller.getActiveFloorId();if(r!==this.lastAvailFloorId&&(this.lastAvailFloorId=r,this.availQuietUntil=performance.now()+2e3),!(!i||!n||performance.now()<this.availQuietUntil))for(let o of e){let a=n[o.key],l=t[o.key]??0;if(a===void 0||l>=a)continue;let c=a-l;i.textContent=Fe("picker.seatsJustTakenInCategory",c,{label:o.label,left:l}),this.els.live?.classList.remove("on"),this.els.live?.offsetWidth,this.els.live?.classList.add("on"),this.liveTimer&&clearTimeout(this.liveTimer),this.liveTimer=setTimeout(()=>this.els.live?.classList.remove("on"),8e3);return}}evictTakenSelections(){let e=new Set([...this.controller.currentHold()?.labels??[],...this.holdingLabels]),t=this.controller.getSelection().filter(i=>!e.has(i.label)&&(this.controller.getStatus(i.id)??"free")!=="free");t.length&&(this.controller.deselect(t.map(i=>i.id)),this.toast(M("picker.seatJustTakenByAnother",{label:t[0].label}),"error"))}syncTray(){if(!this.els.tray)return;this.updateSelectionCapacity();let{seats:e,gaAreas:t,heldItems:i,heldLabels:n,heldCount:r,total:o,count:a}=oi(this),l=[],c=new Set;if(!this.salesClosed){let b=this.performanceGroup?.nightSummary?.()??[];b.length&&l.push(Rr(b,{title:this.tf("picker.group.yourSeatsByNight","Your seats by night"),empty:this.tf("picker.group.noSeatsChosenYet","No seats yet")}));let A=this.performanceGroup?.selectionModeSwitch;A&&l.push(`<button type="button" class="sl-pg-switch" data-pg-switch-mode>${I(A.label)}</button>`)}l.push(br({salesClosed:this.salesClosed,hasPicks:e.length>0||i.length>0,hasGaAreas:t.length>0,groupMode:this.performanceGroup?this.performanceGroup.selectionMode??"same_seat":null,seated:!!this.controller.doc?.objects?.some(b=>b.type!=="gaArea"),venue3d:this.buyerView==="venue3d",whenText:this.eventWhenText?String(this.eventWhenText):void 0}));let p=!e.length&&!i.length&&!Be(this.gaQty,this.hold?.items??[]);if((p||this.root?.dataset.layout==="narrow")&&(this.baReopen=!1),!this.performanceGroup&&!this.salesClosed&&!this.hold&&(p||this.baReopen||this.bestAvailableBusy||this.bestAvailableConfirm)){let b=(this.controller.doc?.categories??[]).filter(x=>!x.notForSale),A=this.controller.getBestAvailableZones();this.baZone&&!A.some(x=>x.id===this.baZone)&&(this.baZone=""),l.push(gr({confirming:this.bestAvailableConfirm,busy:this.bestAvailableBusy,reopened:this.baReopen,quantity:this.baQty,premium:this.baPremium,offerPremium:this.controller.hasPremiumSeats(),categories:b,zones:A,selectedCategory:this.baCat,selectedZone:this.baZone}))}let d=(b,A,x,H=1,_,T,O)=>ur({categoryLabel:O,d:b?this.controller.seatDetails(b):null,area:x==="ga"?t.find(B=>B.id===_):void 0,label:A,objectType:x,quantity:H,identity:T,performanceLabel:this.performanceGroup?.activePerformanceLabel?.(),performanceDates:this.performanceGroup?.selectedPerformanceDates?.()}),u=I,h=[];for(let b of Ks(i)){let A=b.objectType==="ga"?`held:ga:${b.objectId}:${b.tierId??""}`:`held:${b.label}`;c.add(A);let x=this.controller.doc?.categories.find(Y=>Y.key===b.categoryKey),H=b.tierId?x?.tiers?.find(Y=>Y.id===b.tierId)?.name:void 0,_=b.objectType!=="ga"?this.controller.seatByLabel(b.label):null,T=b.objectType==="table"?this.controller.tableSelection(b.label):null,O=_?this.controller.seatDetails(_.id):null,B=this.seatViewEnabled()&&!!_&&b.objectType!=="table"&&!!this.deliverableViewReference(_),V=u(this.tf("picker.heldForYou","Held for you")),ie=(T?.bookingMode==="variable"?`<button type="button" class="sl-table-edit" data-table-edit="${u(encodeURIComponent(b.label))}">${u(M("picker.guestsCountEdit",{count:b.quantity??1}))}</button>`:"")+si(_?.wheelchairSpaceType)+qi(_?.commercial),ne=this.paidPrice(b.categoryKey,b.tierId,b.unitPrice,b.label)*(b.quantity??1);h.push({key:A,fresh:!this.lastTrayKeys.has(A),held:!0,seatIds:[],heldLabels:b.labels,removeAria:M("picker.removeHeldTicketLabel",{label:Hi(b,t)}),locateId:_?.id??null,section:O?.sectionLabel??"",rowLabel:O&&U(O)||"",seatLabel:O?.seatNumber??b.label,categoryLabel:`${x?.label??b.categoryKey}${H?` \xB7 ${H}`:""}`,categoryColor:this.controller.getRenderer?.()?.categoryDisplayColor?.(b.categoryKey)??x?.color??"",identityHtml:d(_?.id??null,b.label,b.objectType,b.quantity??1,b.objectId,T??void 0,`${x?.label??b.categoryKey}${H?` \xB7 ${H}`:""}`),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:ie,amount:ne,amountText:this.suppressPricing?"":this.money(ne),noteHtml:Ki(_?.commercial),railHtml:this.performanceGroup?"":rs(M("picker.removeHeldTicketLabel",{label:Hi(b,t)}),B?b.label:null),groupable:!ie&&!!O?.sectionLabel&&!this.performanceGroup})}let g=this.seatViewEnabled();for(let b of e.filter(A=>!n.has(A.label))){let A=`seat:${b.id}`;c.add(A);let x=this.controller.doc?.categories.find(Y=>Y.key===b.categoryKey),H=b.tiers&&b.tiers.length&&!this.suppressPricing?`<select class="tier" data-tier="${u(b.id)}" aria-label="${u(M("picker.ticketTierFor",{label:b.label}))}">`+b.tiers.map(Y=>`<option value="${u(Y.id)}"${Y.id===b.tierId?" selected":""}>${u(Y.name)} \xB7 ${u(this.money(this.paidPrice(b.categoryKey,Y.id,Y.price,b.label)))}</option>`).join("")+"</select>":"",_=b.tiers?.find(Y=>Y.id===b.tierId)??b.tiers?.[0],T=_?.buyerMessage?.trim()||(_?.restriction==="companion"?this.tf("picker.companionRequiresWheelchair","Requires the adjacent wheelchair place"):""),O=this.controller.seatDetails(b.id),B=u(this.tf("picker.selected","Selected")),V=M("picker.removeSeatLabel",{label:b.label}),ie=(b.objectType==="table"&&b.bookingMode==="variable"?`<button type="button" class="sl-table-edit" data-table-edit="${u(encodeURIComponent(b.label))}">${u(M("picker.guestsCountEdit",{count:b.quantity??1}))}</button>`:"")+si(b.wheelchairSpaceType)+qi(b.commercial)+H,ne=this.paidPrice(b.categoryKey,b.tierId??null,b.price,b.label)*(b.quantity??1);h.push({key:A,fresh:!this.lastTrayKeys.has(A),held:!1,seatIds:[b.id],heldLabels:[],locateId:b.id,section:O?.sectionLabel??"",rowLabel:O&&U(O)||"",seatLabel:O?.seatNumber??b.label,categoryLabel:x?.label??b.categoryKey,identityHtml:d(b.id,b.label,b.objectType,b.quantity??1,b.objectId,b,x?.label??b.categoryKey),categoryColor:this.controller.getRenderer?.()?.categoryDisplayColor?.(b.categoryKey)??x?.color??"",stateHtml:`<span class="sl-ticket-state" aria-label="${B}" title="${B}"><svg viewBox="0 0 24 24"><path d="M5 12l4 4L19 6"/></svg></span>`,extrasHtml:ie,amount:ne,amountText:this.suppressPricing?"":this.money(ne),removeAria:V,noteHtml:Ki(b.commercial)+(T?`<small class="sl-tier-note">${u(T)}</small>`:""),railHtml:rs(V,g&&b.objectType!=="table"&&this.deliverableViewReference(this.controller.seatByLabel(b.label)??{})?b.label:null),groupable:!ie&&!T&&!!O?.sectionLabel&&!this.performanceGroup})}h.length&&l.push(this.root?.dataset.layout==="narrow"?Sr(h,{money:b=>this.money(b),suppressPricing:this.suppressPricing}):h.map(kr).join("")),t.length&&l.push(Xs(this,t,i)),!this.performanceGroup&&!this.salesClosed&&!this.hold&&!p&&!this.baReopen&&!this.bestAvailableBusy&&!this.bestAvailableConfirm&&l.push(`<button type="button" class="sl-ba-reopen" data-ba-reopen><span aria-hidden="true">\u2726</span>${u(this.tf("picker.findTogetherInstead","Find seats together instead"))}</button>`),this.els.tray.innerHTML=l.join("")+(this.salesClosed?"":this.lapse.noteHtml()),this.lastTrayKeys=c,Tr(this.els.tray),this.lapse.wire(this.els.tray),this.els.tray.querySelector("[data-pg-switch-mode]")?.addEventListener("click",()=>this.performanceGroup?.selectionModeSwitch?.activate());let m=this.performanceGroup?.selectNight;m&&qr(this.els.tray,b=>m(b)),this.els.tray.querySelectorAll("[data-ba]").forEach(b=>{b.addEventListener("click",()=>{this.baQty=Math.max(1,Math.min(this.maxTickets,this.baQty+Number(b.dataset.ba))),this.syncTray()})}),this.els.tray.querySelector("[data-ba-cat]")?.addEventListener("change",b=>{this.baCat=b.target.value}),this.els.tray.querySelector("[data-ba-zone]")?.addEventListener("change",b=>{this.baZone=b.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-reopen]")?.addEventListener("click",()=>{this.baReopen=!0,this.syncTray(),this.els.tray.querySelector(".sl-ba-go")?.focus()}),this.els.tray.querySelector("[data-ba-close]")?.addEventListener("click",()=>{this.baReopen=!1,this.syncTray(),this.els.tray.querySelector("[data-ba-reopen]")?.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(b=>{b.addEventListener("click",()=>{let A=b.closest(".sl-chip");if(A.dataset.held){this.removeHeldLabels(decodeURIComponent(A.dataset.held).split(`
2646
+ `),A);return}let x=A.dataset.seat.split(" "),H=this.controller.getSelection().find(T=>T.id===x[0])?.label??this.tf("picker.seat","Seat"),_=()=>{this.controller.deselect(x),this.toast(M("picker.labelRemoved",{label:H}),"neutral",{label:this.tf("picker.undo","Undo"),onClick:()=>{let T=this.controller.select(x);this.toast(T.length?M("picker.labelRestored",{label:H}):M("picker.labelNoLongerAvailable",{label:H}),T.length?"success":"warning")}})};if(this.reducedMotion()){_();return}A.classList.remove("sl-enter"),A.classList.add("sl-leave","sl-mo-collapse"),this.scheduleMotion(_,G.collapse)})}),this.els.tray.querySelectorAll("[data-table-edit]").forEach(b=>{b.addEventListener("click",A=>{A.stopPropagation();let x=decodeURIComponent(b.dataset.tableEdit??""),H=this.controller.tableSelection(x);if(!H)return;let _=i.find(T=>T.label===x&&T.objectType==="table");this.showTableDialog({...H,quantity:_?.quantity??H.quantity},!!_,b)})}),this.els.tray.querySelectorAll(".sl-chip .tier").forEach(b=>{b.addEventListener("change",()=>this.controller.setSeatTier(b.dataset.tier,b.value||null))}),this.els.tray.querySelectorAll(".sl-chip .view[data-view-label]").forEach(b=>{b.addEventListener("click",()=>{let A=this.controller.seatByLabel(b.dataset.viewLabel);A&&this.openSeatView(A)})}),this.els.tray.querySelectorAll(".sl-chip[data-locate]").forEach(b=>{let A=()=>this.controller.flashSeat(b.dataset.locate,this.cssVar("--sl-accent")||"#f4b740");b.addEventListener("mouseenter",A),b.addEventListener("focusin",A)}),Zs(this,this.els.tray,t),this.controller.setGASelection(js(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(b=>{b.disabled=!0});let v=this.pendingSelectionCount(),k=this.lastTrayCount,S=this.lastTrayTotal,L=Gr(this.performanceGroup?.groupSelectionSummary?.(),this.performanceGroup?.selectionMode??"same_seat");if(this.els.count.textContent=L||(a?Fe("picker.ticketsCount",a):this.tf("picker.noSeatsSelected","No seats selected")),this.els.total.textContent=a&&!this.suppressPricing?this.money(o):"",this.root?.setAttribute("data-has-selection",String(a>0)),this.root?.setAttribute("data-ba-active",String(this.bestAvailableConfirm||this.bestAvailableBusy||this.baReopen)),this.els.foot?.classList.toggle("empty",a===0),this.els.seatSummary&&(this.els.seatSummary.textContent=L||(a?Fe("picker.seatsSelectedCount",a):"")),this.syncCta(a,v),this.hold){this.holdCopyPending=v>0;let b=vr({secured:r||this.hold.seats?.length||0,pendingCount:v,expiresAt:this.holdExpiresAt,releasing:this.releasingHold});this.els.holdTitle&&(this.els.holdTitle.textContent=b.title),this.els.holdCopy&&(this.els.holdCopy.textContent=b.copy);let A=this.els.holdChange;A&&(A.disabled=this.releasingHold,A.textContent=b.change)}a!==k&&this.animateOnce(this.els.count,"sl-value-pop",380),o!==S&&this.animateOnce(this.els.total,"sl-value-pop",380),k===0&&a>0&&(this.animateOnce(this.els.cta,"sl-ready",520),this.sideCollapsed&&this.root?.dataset.layout!=="narrow"&&this.setPanelCollapsed(!1)),this.renderPeek(a,o,v,a>k),this.lastTrayCount=a,this.lastTrayTotal=o,this.opts.onSelectionChange?.(e),this.emitSelectionValidity(a,e)}emitSelectionValidity(e,t){let i=this.controller.getSelectionValidity(e);i&&(i.seats=t,this.opts.onSelectionValidityChange?.(i),i.isValid?this.lastSelectionValidity!==!0&&this.opts.onSelectionValid?.(t):this.lastSelectionValidity!==!1&&this.opts.onSelectionInvalid?.(i),this.lastSelectionValidity=i.isValid)}renderPeek(e,t,i,n=!1){if(!this.els.peek)return;let r=(this.controller.doc?.categories??[]).map(o=>this.catPrice(o)).filter(o=>o!=null);this.els.peek.innerHTML=fr({count:e,total:t,pendingCount:i,ctaPhase:this.ctaPhase,hasHold:!!this.hold,salesClosed:this.salesClosed,suppressPricing:this.suppressPricing,fromPrice:r.length?Math.min(...r):null,addMore:this.root?.dataset.layout==="narrow"?null:mr({salesClosed:this.salesClosed,hasHold:!!this.hold,ctaPhase:this.ctaPhase,formOpen:this.baReopen||this.bestAvailableBusy||this.bestAvailableConfirm,room:this.maxTickets-this.totalTicketCount(),wanted:this.baQty}),offerFind:!this.performanceGroup&&!this.salesClosed&&!this.hold,holdTime:this.hold&&this.holdTimer?Mt(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"))),n&&this.animateOnce(this.els.peek.querySelector(".sl-peek-sum")??void 0,"sl-peek-bump",240)}async removeHeldLabels(e,t){let i=e.filter(o=>o&&!this.releasingLabels.has(o));if(!i.length)return!1;let n=i[0];i.forEach(o=>this.releasingLabels.add(o)),t?.setAttribute("aria-busy","true");let r=t?.querySelector(".rm");r&&(r.disabled=!0);try{let o=this.handedOff;if(!await this.controller.releaseLabels(i))return this.toast(M("picker.couldNotRemoveLabel",{label:n}),"error"),!1;Us(this.gaQty,this.hold?.items??[],i);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(),this.toast(M("picker.labelRemovedFromHold",{label:n}),"success"),!0}finally{i.forEach(o=>this.releasingLabels.delete(o)),t?.removeAttribute("aria-busy"),r?.isConnected&&(r.disabled=!1)}}async handleChangeSeats(){if(!this.hold||this.releasingHold)return;this.releasingHold=!0;let e=this.els.holdChange;e&&(e.disabled=!0,e.textContent=this.tf("picker.releasingEllipsis","Releasing\u2026"));try{await this.release(),this.hold||this.toast(this.tf("picker.heldTicketsReleased","Held tickets released. Choose your new seats."),"success")}finally{this.releasingHold=!1,e?.isConnected&&(e.disabled=!1,e.textContent=this.tf("picker.change","Change"))}}async handleCta(){if(this.salesClosed)return;let e=this.controller.getSelectionValidity(this.totalTicketCount());if(e&&!e.isValid){this.toast(ns(e,(i,n)=>this.tf(i,n)),"warning");return}if(this.totalTicketCount()>this.maxTickets){this.toast(M("picker.removeTicketsUntilOrFewer",{count:this.maxTickets}),"warning");return}let t=this.committedSelection();if(this.hold&&!t.some(i=>!(this.hold.items??[]).some(n=>n.label===i.label))){let i=this.hold.seats??t;this.handedOff=!0,this.holdConflicted=!1,await this.runCheckoutHandoff(this.hold,i);return}this.holdingLabels=new Set(t.map(i=>i.label)),this.setCtaPhase("holding");try{let i=null,n=zs(this.gaQty),r=this.committedSelection();if(r.length){let o=await this.controller.hold(void 0,this.opts.holdTtlMs);i=o?{holdId:o.holdId,expiresAt:o.expiresAt,seats:o.seats,items:o.items}:null}for(let{areaId:o,tierId:a,qty:l}of n){let c=await this.controller.holdGA(o,l,{tierId:a,ttlMs:this.opts.holdTtlMs});i=c?{holdId:c.holdId,expiresAt:c.expiresAt,seats:c.seats,items:c.items}:i}if(!i){this.raiseHoldConflict(this.tf("picker.seatsJustTaken","One or more seats were just taken. Please pick again.")),this.setCtaPhase("idle"),this.syncTray();return}this.hold=i,this.holdConflicted=!1,this.handedOff=!this.performanceGroup,this.startHoldTimer(i.expiresAt),this.flashHeldSeats(i),this.emitHoldChange(),this.performanceGroup?this.setCtaPhase("idle"):await this.runCheckoutHandoff(i,i.seats??r)}catch(i){this.opts.onError?.(i);let n=i,r=(n.conflicts??[]).map(a=>a.label).filter(Boolean).slice(0,3);n.reason==="event_closed"&&this.setSalesClosed(!0);let o=n.reason==="event_closed"?this.tf("picker.seatSalesClosedForEvent","Seat sales have closed for this event."):n.reason==="companion_pair_required"?this.tf("picker.companionPairRequired","Select the adjacent wheelchair place with each companion ticket."):n.reason==="ticket_option_not_applicable"?this.tf("picker.ticketOptionNotApplicable","That ticket choice is not available for the selected seat."):r.length?r.length===1?M("picker.labelsNoLongerAvailable.one",{labels:r.join(", ")}):M("picker.labelsNoLongerAvailable.other",{labels:r.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){this.stopHoldTimer(),this.holdExpiresAt=e,this.hold&&this.rememberHold(this.hold);let t=this.els.hold;t.innerHTML=`<span class="sl-hold-dot" aria-hidden="true"></span><span>${this.tf("picker.held","Held")}</span><span class="sl-hold-time" data-ref="holdTime"></span>`;let i=t.querySelector('[data-ref="holdTime"]');this.els.holdNote?.classList.add("on");let n=()=>{let r=Math.max(0,this.holdExpiresAt-Date.now());i&&(i.textContent=Mt(r));let o=this.els.peek?.querySelector(".sl-peek-time");o&&(o.textContent=Mt(r)),!this.holdCopyPending&&this.els.holdCopy&&this.root?.dataset.layout!=="narrow"&&(this.els.holdCopy.textContent=os(this.holdExpiresAt)),t.classList.add("on"),t.classList.toggle("is-expiring",r>0&&r<=so),this.setExtendPrompt(r>0&&r<=so,r),(r<=0||!this.controller.currentHold())&&this.stopHoldTimer()};this.holdTimer=setInterval(n,500),n()}stopHoldTimer(){this.holdTimer&&clearInterval(this.holdTimer),this.holdTimer=null,this.els.hold?.classList.remove("on","is-expiring"),this.els.holdNote?.classList.remove("on"),this.root&&delete this.root.dataset.peekClock,this.setExtendPrompt(!1,0)}setExtendPrompt(e,t){if(this.extendEl)if(e&&this.controller.currentHold()&&!this.bookedShown){let i=Math.ceil(t/1e3),n=Math.floor(i/60),r=String(i%60).padStart(2,"0");this.els.extendTxt.innerHTML=M("picker.seatsHeldForNeedMoreTime",{time:`${n}:${r}`}),this.extendEl.classList.add("on")}else this.extendEl.classList.remove("on")}async handleExtend(){let e=this.els.extendBtn;e.disabled=!0;let t=e.textContent;e.textContent=this.tf("picker.addingEllipsis","Adding\u2026");try{let i=await this.controller.extendHold(this.opts.holdTtlMs);i?(this.hold={holdId:i.holdId,expiresAt:i.expiresAt,seats:i.seats,items:i.items},this.holdExpiresAt=i.expiresAt,this.extendEl?.classList.remove("on"),this.rememberHold(this.hold),this.emitHoldChange(),this.toast(this.tf("picker.moreTimeAdded","More time added \u2014 your seats are still held."),"success")):this.toast(this.tf("picker.couldNotAddMoreTime","Couldn't add more time \u2014 please head to checkout now."),"warning")}catch(i){this.opts.onError?.(i),this.toast(this.tf("picker.couldNotAddMoreTime","Couldn't add more time \u2014 please head to checkout now."),"warning")}finally{e.disabled=!1,e.textContent=t}}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((n,r)=>n+r.quantity,0),i=this.performanceGroup?.groupSelectionSummary?.();this.els.bookedSub&&(this.els.bookedSub.innerHTML=i?.seats?`<span class="sl-booked-seats">${Fe("picker.group.ticketsConfirmedAcross",i.seats,{performances:i.performances})}</span>`:`<span class="sl-booked-seats">${Fe("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(n=>{let o=[n.sectionLabel,n.rowLabel&&`${this.tf("picker.row","Row")} ${n.rowLabel}`,n.seatNumber&&`${this.tf("picker.seat","Seat")} ${n.seatNumber}`].filter(Boolean).join(" \xB7 ")||n.displayLabel||n.label,a=n.quantity>1?` <span class="sl-booked-qty">\xD7${n.quantity}</span>`:"";return`<li>${I(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 i=this.buildHandoff(e),n=null;try{n=await(this.paymentOptions??=this.pubApi.paymentOptions(this.opts.event))}catch(o){this.opts.onError?.(o)}if(this.destroyed)return;let r=n?.providers?.[0];if(!r){let o=cn(n?.reason),a=!!this.opts.onCheckoutUnavailable||!!this.opts.onCheckout;this.opts.onCheckoutUnavailable?.({reason:o,handoff:i}),this.opts.onCheckout?.(e,t,i),a||this.openCheckoutPanel({kind:"unavailable",reason:o,seatCount:i.lineItems.reduce((l,c)=>l+c.quantity,0)});return}await this.openCheckoutPanel({kind:"pay",provider:r,order:{holdId:i.holdId,expiresAt:i.expiresAt,currency:i.currency,total:i.total,labels:i.lineItems.map(o=>o.displayLabel??o.label)}})}async openCheckoutPanel(e){let t;try{({mountCheckout:t}=await ln())}catch(i){this.opts.onError?.(i),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:i=>this.money(i),startSession:i=>this.pubApi.startCheckout(this.opts.event,{...i,...this.opts.returnUrl?{returnUrl:this.opts.returnUrl}:{}}),orderStatus:i=>this.pubApi.orderStatus(i),onCancel:()=>{this.checkoutPanel=null,this.hold||this.setCtaPhase("idle")},onConfirmed:i=>{this.opts.onOrderConfirmed?.(i),this.controller.refresh()},onError:i=>this.opts.onError?.(i)}))}closeCheckoutPanel(){this.checkoutPanel?.destroy(),this.checkoutPanel=null}buildHandoff(e){let i=(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}}),n=i[0]?.currency??this.currency,r=i.reduce((o,a)=>o+a.unitPrice*a.quantity,0);return{holdId:e.holdId,expiresAt:e.expiresAt,currency:n,lineItems:i,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",i){let n=this.els.toast;if(!n)return;n.replaceChildren();let r=document.createElement("span");if(r.textContent=e,n.appendChild(r),n.classList.toggle("has-action",!!i),i){let o=document.createElement("button");o.type="button",o.className="sl-toast-action",o.textContent=i.label,o.addEventListener("click",i.onClick,{once:!0}),n.appendChild(o)}n.dataset.tone=t,n.classList.add("on","sl-mo-rise"),this.liftToastOverConfirmSoon(),this.toastTimer&&clearTimeout(this.toastTimer),this.toastTimer=setTimeout(()=>{n.classList.remove("on","sl-mo-rise"),n.classList.remove("has-action"),n.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"),i=this.confirmEl;if(!t||!i?.isConnected){e.style.removeProperty("bottom");return}let n=this.els.map.clientHeight;if(n<=0)return;let r=i.getBoundingClientRect(),o=r.height||i.offsetHeight||sc,a=r.height?r.top-this.els.map.getBoundingClientRect().top:n-hs-o,l=Math.round(n-a+tc);if(l+ic>n){e.style.removeProperty("bottom");return}e.style.bottom=`${l}px`}liftToastOverConfirmSoon(){this.liftToastOverConfirm(),typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{this.destroyed||this.liftToastOverConfirm()})}dismissSkeleton(){Zn({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},i=this.tipPinned?Wr(this.tipPos,e,t):null,n=i??Ur(this.tipPos,e.width,e.height,t);this.tipEl.style.left=`${n.left}px`,this.tipEl.style.top=`${n.top}px`,i?this.tipEl.dataset.placement=i.placement:delete this.tipEl.dataset.placement}nightStripFor(e,t){let i=this.performanceGroup,n=ds(e.mark,i?.nights?.()),r=n?.states.filter(o=>o.free).length??0;return _r(n,{locale:this.opts.locale,switchLabel:i?.selectionModeSwitch?.label??null,selectPartialLabel:i?.partialSeatSelection?.label(r)??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.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 i=this.unavailableReason(e),n=e.mark?.kind==="partial"&&(e.interaction==="press"||this.lastPointerType!=="mouse"||t)||!!i&&e.interaction==="press";this.tipMarkedHoverLabel=e.mark?.kind==="partial"?e.label:null;let r=this.nightStripFor(e,n);this.tipEl.style.setProperty("--sl-cat",e.categoryColor),this.tipEl.innerHTML=Kr(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:rt(e),reason:i,extra:r+(n?`<button type="button" class="sl-tip-close" data-pg-tip-close aria-label="${I(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()}),Xr(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 i={};for(let[n,r]of Object.entries(e())){let o=this.controller.idForLabel(n);o&&(i[o]=r)}Object.keys(i).length&&t.setSeatMarks(i)}getSelection(){return this.committedSelection()}selectObjects(e){return this.controller.select(e)}selectObjectsWithoutConfirmation(e){let t=new Set(e),i=this.controller.getSelection().filter(n=>t.has(n.id)||t.has(n.label));if(i.length===t.size)return i;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,!1)}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=Bt(this.themeMode),i=mt(this.controller.doc?.theme,this.opts.theme,t);for(let[n,r]of Object.entries(i))e.style.setProperty(n,r);t?e.dataset.theme=t:delete e.dataset.theme,this.applyMapChromeTokens()}watchThemeMode(){this.colorSchemeStop?.(),this.colorSchemeStop=null,this.themeMode==="auto"&&(this.colorSchemeStop=Nt(()=>{this.destroyed||this.repaintForThemeMode()}))}repaintForThemeMode(){this.root&&(this.applyThemeTokens(this.root),this.controller.setMapTheme(Ke(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:Bt(e)??null}))}getThemeMode(){return this.themeMode}applyMapChromeTokens(){let e=this.els.map?.parentElement;if(!e||!this.root)return;let t=Bt(this.themeMode),i=mt(this.controller.doc?.theme,this.opts.theme,t),n=Ke(this.opts.theme,this.themeMode)?.background??this.controller.doc?.theme?.background??void 0,r=Es(i,n);for(let o of["--sl-bg","--sl-surface","--sl-text","--sl-muted","--sl-line","--sl-accent-text"])r?e.style.setProperty(o,r[o]):e.style.removeProperty(o)}setEventDetailsHidden(e){this.eventDetailsHidden=e,this.syncFullscreenButtons()}setPricing(e){let t=JSON.stringify(this.opts.pricing??null),i=JSON.stringify(e??null);t!==i&&(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=Rs(e,{languages:this.opts.languages,label:this.tf("picker.preferredTicketType","Language"),onChange:t=>{this.setLocale(t)}})}async setLocale(e){let t=to(),i=this.localeGeneration+=1,n=await Wl(e);return this.opts.messages&&Yl(this.opts.messages),n===t||this.applyActiveLocale(n,i),n}applyActiveLocale(e,t){t===this.localeGeneration&&this.root&&_s(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})}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(),oc(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"}getBuyerView(){return this.buyerView}setBuyerView(e,t){if(e==="map"){this.exit3d();return}let i=t?.flyToSeatId;if(this.buyerView==="venue3d"){i?(this.opts.onBuyerViewChange?.({view:"venue3d",seatId:i}),this.view3dHandle?.flyToSeat(i)):t?.resetView&&this.view3dHandle?.focusOverview();return}this.enter3d(i)}seatState3dFor(e){switch(this.controller.getStatus(e.id)){case"held":return"held";case"booked":return"sold";case"not_for_sale":return"dimmed";default:break}return this.priceBandKeys!=null&&!this.priceBandKeys.has(e.categoryKey)||this.controller.accessibilityFilterDims?.(e)||this.limitedViewFilter&&(e.commercial?.restrictedView||e.commercial?.obstructedView)?"dimmed":"available"}pushAvailabilityTo3d(){if(!this.view3dHandle)return;let e=this.allSeats().map(t=>({seatId:t.id,state:this.seatState3dFor(t)}));this.view3dHandle.setAvailability(e)}syncSelectionTo3d(){this.view3dHandle&&this.view3dHandle.setSelection(this.controller.getSelection().map(e=>e.id))}async seatViewFor3d(e){let t=this.allSeats().find(i=>i.id===e);if(!t)return null;if(t.viewUrl)try{let i=t.viewMeta?.previewUrl,n=!!i&&i!==t.viewUrl,r=n?await this.buyerAssetUrls.resolve(i):null,o=n?t.viewUrl:await this.buyerAssetUrls.resolve(t.viewUrl);return!o||n&&!r?null:{url:o,...r?{previewUrl:r}:{},...n?{resolveUrl:a=>this.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(i){return this.opts.onError?.(i),null}return{url:"",generated:!0,mediaKind:"model",coverage:"exact-seat",sourceLabel:this.tf("picker.chartDerivedModel","Chart-derived model")}}emitAnalytics(e,t){try{this.opts.onAnalytics?.(e,{...t,surface:"buyer"})}catch{}}emit3dAnalytics(e,t){this.emitAnalytics(e,t)}onView3dSeatPick(e){if(this.salesClosed){this.toast(this.tf("picker.salesClosedToast","Sales are closed for this event."),"warning"),this.syncSelectionTo3d();return}let t=this.allSeats().find(a=>a.id===e);if(!t)return;let i=this.controller.tableSelection(e);if(this.committedSelection().some(a=>i?a.label===i.label:a.id===e)){this.controller.deselect([e]),this.dismissConfirm(),this.syncSelectionTo3d();return}let r=this.controller.getStatus(t.id);if(r==="held"||r==="booked"||r==="not_for_sale"){this.showUnavailable3dSeat(t,this.seatState3dFor(t),r),this.syncSelectionTo3d();return}if(this.dismissUnavailable3dSeat(),!this.controller.select([e]).length){this.syncSelectionTo3d(),this.dismissConfirm();return}if(this.opts.onBuyerViewChange?.({view:"venue3d",seatId:e}),this.flashPickedSeat(e),i){this.showTableDialog(i,!1),this.syncSelectionTo3d();return}this.opts.confirmSelection!==!1?this.showConfirm(t):this.syncTray(),this.syncSelectionTo3d()}seatViewCaption(e){let t=this.allSeats().find(i=>i.id===e);return Qn(this.controller.seatDetails(e),t?.displayLabel??t?.label??e,this.tf("picker.viewFromYourSeat","view from your seat"),{narrow:this.root?.dataset.layout==="narrow",shortTail:this.tf("picker.fromYourSeat","from your seat")})}showUnavailable3dSeat(e,t,i){let n=this.view3dEl;if(!n)return;let r=this.controller.seatDetails(e.id),o=r?.displayLabel??e.displayLabel??e.label,a=U(r);dr(n,{status:i,visualState:t,location:[r?.sectionLabel,a?M("picker.rowLabel",{label:a}):null,o].filter(Boolean).join(" \xB7 ")||o,tf:(l,c)=>this.tf(l,c)}),this.announceSeat(e)}dismissUnavailable3dSeat(){ss(this.view3dEl)}saveView3dComparisonSeat(e){if(this.buyerView!=="venue3d")return;let t=this.view3dCompareSeatIds;t.includes(e.id)||(this.view3dCompareSeatIds=t.length===0?[e.id]:[t[0],e.id]),this.confirmSeat?.id===e.id&&(this.controller.deselect([e.id]),this.dismissConfirm(),this.syncSelectionTo3d(),this.syncTray()),this.view3dCompareChip.sync(),this.emit3dAnalytics("3d_comparison_saved",{seatId:e.id,count:this.view3dCompareSeatIds.length}),this.view3dCompareSeatIds.length>1?this.openView3dComparison():this.toast(this.tf("picker.chooseAnotherToCompare","Seat saved. Choose another seat to compare."),"success")}clearView3dComparison(){this.closeView3dComparison(!1),this.view3dCompareSeatIds=[],this.view3dCompareChip.remove(),this.emit3dAnalytics("3d_comparison_cleared")}view3dComparisonSnapshot(e){let t=this.allSeats().find(h=>h.id===e);if(!t)return null;let i=this.controller.seatDetails(t.id),n=this.controller.doc?.categories.find(h=>h.key===t.categoryKey),r=i?.price??(n?.tiers?.length?n.tiers[0].price:n?.price),o=r!=null?this.paidPrice(t.categoryKey,i?.tierId??n?.tiers?.[0]?.id??null,r,t.label):void 0,a=this.controller.getStatus(t.id),l=a==="held"?this.tf("picker.temporarilyHeld","Temporarily held"):a==="booked"?this.tf("picker.sold","Sold"):a==="not_for_sale"?this.tf("picker.notForSale","Not for sale"):this.tf("picker.available","Available"),c=t.viewUrl?io({url:t.viewUrl,...t.viewMeta?.coverage?{coverage:t.viewMeta.coverage}:{},...t.viewMeta?.capturedAt?{capturedAt:t.viewMeta.capturedAt}:{},...t.viewMeta?.sourceLabel?{sourceLabel:t.viewMeta.sourceLabel}:{}}):this.tf("picker.chartDerivedSeatEye","Live 3D \xB7 chart-derived seat-eye \xB7 not surveyed"),p=Se(t.commercial)||this.tf("picker.noAuthoredRestriction","No organizer-authored restriction"),d=i?.wheelchairSpaceType?`${nt(i.wheelchairSpaceType)} \xB7 metadata, not access certification`:this.tf("picker.noAccessibilityMetadata","No accessibility metadata supplied"),u=Xl(t.confidenceEvidence);return{seat:t,label:i?.displayLabel??t.displayLabel??t.label,section:i?.sectionLabel??t.sectionId??"\u2014",row:U(i)??i?.rowLabel??"\u2014",category:i?.categoryLabel??n?.label??t.categoryKey,price:this.suppressPricing||o==null?"":this.money(o),availability:l,selectable:a==null||a==="free",viewSource:c,limited:p,accessibility:d,confidence:u}}openSeatConfidencePassport(e,t=null){is(this,e,t)}closeSeatConfidencePassport(e=!0){Lt(this,e)}openView3dComparison(){cr(this)}closeView3dComparison(e=!0){$e(this,e)}async enter3d(e){if(this.view3dEl||!this.canOffer3d()||!this.els.map)return;let t=this.controller.doc;if(!t)return;this.buyerView="venue3d",this.view3dTargetSeatId=null,this.opts.onBuyerViewChange?.({view:"venue3d",...e?{seatId:e}:{}}),this.root?.setAttribute("data-view3d","on"),this.dismissConfirm(),this.syncProjection(),this.syncTray();let i=document.createElement("div");i.className="sl-view3d sl-mo-zoom",i.setAttribute("role","group"),i.setAttribute("aria-label",this.tf("picker.interactive3dVenueView","Interactive 3D venue view"));let n=document.createElement("button");n.type="button",n.className="sl-view3d-back",n.innerHTML=`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M15 18l-6-6 6-6"/></svg><span>${this.tf("picker.backToMap","Back to map")}</span>`;let r=n.querySelector("span"),o=c=>{this.view3dTargetSeatId=c;let p=!!c;i.classList.toggle("is-seat-focused",p),this.root&&(this.root.dataset.view3dSeat=p?"on":"off");let d=p?this.tf("picker.backToVenue","Back to venue"):this.tf("picker.backToMap","Back to map");r&&(r.textContent=d),n.setAttribute("aria-label",d)};if(n.addEventListener("click",()=>{if(this.view3dTargetSeatId&&this.view3dHandle){this.view3dHandle.focusOverview();return}this.exit3d()}),this.regions["top-left"]?.prepend(n),this.view3dBack=n,this.publish3dTopInset(),Un(this.root)){let c=document.createElement("button");c.type="button",c.className="sl-view3d-fs",c.textContent="\u26F6",c.setAttribute("aria-label",this.tf("picker.fullScreen","Full screen")),c.setAttribute("aria-pressed",String(!!document.fullscreenElement||this.fsFallback||this.framedFs)),c.addEventListener("click",()=>this.toggleFullscreen()),i.appendChild(c)}let a=document.createElement("div");a.className="sl-view3d-loading",a.setAttribute("role","status"),a.setAttribute("aria-live","polite"),a.textContent=this.tf("picker.loading3d","Building the 3D venue\u2026"),i.appendChild(a),this.els.map.appendChild(i),this.view3dEl=i,this.view3dCompareChip.sync(),requestAnimationFrame(()=>{i.style.opacity="1"});let l=++this.view3dGen;try{let c=this.allSeats(),[p,d]=await Promise.all([St(),this.controller.loadEventConfiguration()]),u=d?await Xt(d,S=>this.buyerAssetUrls.resolve(S)):null,h=t.theme?.venue3d?.shellAssetUrl,g=await Zt(h,S=>this.buyerAssetUrls.resolve(S));if(l!==this.view3dGen||this.buyerView!=="venue3d"||this.view3dEl!==i)return;let m={doc:t,seats:c,...u?{eventConfigurationId:u.id,eventConfiguration:u}:{},...g?{registeredShellGlb:g}:{}};a.textContent=this.tf("picker.building3d","Building venue geometry\u2026");let v=await p.prepareVenue3D(m);if(l!==this.view3dGen||this.buyerView!=="venue3d"||this.view3dEl!==i)return;let k=p.mountVenue3D(i,{...m,prepared:v},{portraitOverviewCrop:!0,arriveAtSeatEye:!0,lookAroundHint:it(),seatViewActionLabel:S=>this.allSeats().find(L=>L.id===S)?.viewUrl?this.tf("picker.openAuthored360","Open venue 360\xB0"):this.tf("picker.lookAroundLive3d","Look around in live 3D"),seatViewCaption:S=>this.seatViewCaption(S),onSeatViewStopChange:S=>this.view3dSeatViewChrome?.onStopChange(S),onSeatPick:S=>this.onView3dSeatPick(S),onSeatInspect:S=>this.onView3dSeatPick(S),onSectionFocusChange:S=>{let L=i.querySelector('select[data-locator="section"]'),b=S??"";!L||L.value===b||(L.value=b,L.dispatchEvent(new Event("change")))},onViewTargetChange:S=>{i.querySelector(".sl-view3d-nav")?.classList.toggle("is-seat-focused",!!S),o(S),this.opts.onBuyerViewChange?.({view:"venue3d",...S?{seatId:S}:{}})},...this.seatViewEnabled()?{getSeatView:S=>new Promise((L,b)=>{let A=()=>{this.seatViewFor3d(S).then(H=>{H?L(H):b(new Error("seat_view_unavailable"))})},x=globalThis.requestIdleCallback;typeof x=="function"?x(A,{timeout:1500}):setTimeout(A,50)})}:{},onAnalytics:(S,L)=>this.emit3dAnalytics(S,L)});this.view3dHandle=k,this.view3dSeatViewChrome=Yn(i,{handle:()=>this.view3dHandle}),requestAnimationFrame(()=>a.remove()),this.pushAvailabilityTo3d(),this.syncSelectionTo3d(),this.view3dNav=Kn(this.regions["bottom-left"]??i,k),e&&k.flyToSeat(e)}catch(c){if(l!==this.view3dGen||this.buyerView!=="venue3d"||this.view3dEl!==i)return;this.opts.onError?.(c),this.toast(this.tf("picker.unavailable3d","3D could not start. The seat map is still available."),"warning"),this.exit3d()}}publish3dTopInset(){let e=this.regions["top-left"];if(!this.root||!e)return;let t=()=>{!this.root||this.root.dataset.view3d!=="on"||this.root.style.setProperty("--sl-3d-top-inset",`${Math.max(44,Math.ceil(e.offsetHeight))}px`)};t(),typeof requestAnimationFrame=="function"&&requestAnimationFrame(t)}exit3d(){if(this.buyerView!=="venue3d"&&!this.view3dEl)return;this.view3dGen++,this.buyerView="map",this.view3dTargetSeatId=null,this.opts.onBuyerViewChange?.({view:"map"}),this.root?.removeAttribute("data-view3d"),this.closeSeatConfidencePassport(!1),this.closeView3dComparison(!1),this.view3dCompareChip.remove(),this.view3dSeatViewChrome?.dispose(),this.view3dSeatViewChrome=null,this.view3dBack?.remove(),this.view3dBack=null,this.view3dNav?.remove(),this.view3dNav=null,this.root?.removeAttribute("data-view3d-seat"),this.root?.style.removeProperty("--sl-3d-top-inset");try{this.view3dHandle?.dispose()}catch{}this.view3dHandle=null;let e=this.view3dEl;this.view3dEl=null,e&&(e.style.opacity="0",setTimeout(()=>e.remove(),320)),this.syncProjection(),this.syncTray();let t=this.view3dReturnSeat;this.view3dReturnSeat=null,t&&this.committedSelection().some(i=>i.id===t.id)&&this.opts.confirmSelection!==!1&&this.showConfirm(t)}getCurrentHold(){return this.hold}async resumeHold(e){return this.resumeHoldFromServer(e,!1)}async removeHeldTicket(e){return this.removeHeldLabels([e])}async bestAvailable(e,t,i={}){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,i)}catch(n){this.opts.onError?.(n);let r=n?.reason,o=r==="not_enough_together"?M("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(o,"error"),null}}async bestAvailableOrThrow(e,t,i={}){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 n=this.els.tray?.querySelector(".sl-ba-go");n&&(n.disabled=!0,n.classList.add("sl-busy"),n.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,{...i,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(),i.preferPremium&&r.seats.length&&!r.seats.every(o=>o.commercial?.premium)&&this.toast(M("picker.premiumFallbackNote",{count:e}),"neutral"),this.hold):null}finally{this.bestAvailableBusy=!1,this.syncTray()}}async release(){let e=this.hold,t=this.controller.currentHold(),i=!0;if(t)i=await this.controller.release();else if(e){let n=[...new Set([...(e.items??[]).map(r=>r.label),...(e.seats??[]).map(r=>r.label)])];if(n.length)try{await this.api.release(this.opts.event,n,e.holdId)}catch(r){this.opts.onError?.(r),i=!1}}if(!i){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 ve({url:this.pubApi.subscribeUrl(e),mintTicket:()=>this.pubApi.subscribeTicket(e),onAccessUnavailable:t=>{this.opts.onAccessUnavailable?.(t),this.showAccessPanel(t)},sink:ft(this.controller,{flashOnLiveChange:!0,onStatusChange:()=>{this.syncPrices(),this.scheduleOfferRefresh(!0),this.detectBooked(),this.minimap?.refreshMinimap(),this.pushAvailabilityTo3d()},onSelectedObjectUnavailable:(t,i)=>{this.opts.onSelectedObjectUnavailable?.({labels:t,reason:i}),this.syncTray(),this.toast(i==="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)}showAccessPanel(e){if(this.destroyed||!this.root)return;this.dismissAccessPanel();let t=Fn(e.reason,()=>this.refreshAccess());(this.root.querySelector(".sl-body")??this.root).appendChild(t),this.accessEl=t}dismissAccessPanel(){this.accessEl?.remove(),this.accessEl=null}destroy(){this.destroyed=!0,Xi(this),this.colorSchemeStop?.(),this.colorSchemeStop=null,this.realtime?.stop(),this.realtime=null,this.dismissAccessPanel(),this.access?.clear(),this.hold&&!this.handedOff&&this.controller.release(),this.closeConfirm(),this.dismissTableDialog(!1),xe(this,!1),this.closeSeatView(),this.closeCheckoutPanel(),this.exit3d(),this.buyerAssetUrls.dispose(),this.stopHoldTimer(),this.detachAttention?.(),this.toastTimer&&clearTimeout(this.toastTimer),this.liveTimer&&clearTimeout(this.liveTimer),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)}};import{formatMoney as vc,loadLocale as yc,setStringOverrides as xc,t as wc}from"@seatlayer/core";var oo="seatlayer-performance-group-picker-style";function ao(){if(document.getElementById(oo))return;let s=document.createElement("style");s.id=oo,s.textContent=`
2257
2647
  .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)}
2258
2648
  .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)}
2259
2649
  .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}
@@ -2313,7 +2703,7 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
2313
2703
  @media(min-width:900px){.sl-pg-legend-list{justify-content:flex-start}}
2314
2704
  .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}
2315
2705
  @media(max-width:640px){.sl-pg-head{padding:13px 14px}.sl-pg-head h2{font-size:18px}.sl-pg-inner{min-height:590px}}
2316
- `,document.head.appendChild(s)}var Yl="https://api.seatlayer.io",Ql=6e4,Xl=2e3,Zl=1e3,Jl=36e5,ec=5e3,tc=5e3,ic=15e3,sc=12e4,rc=new Set(["preparing","commit_pending","abort_pending","expire_pending"]),j=class extends Error{constructor(){super("performance_group_destroyed"),this.name="PerformanceGroupDestroyedError"}};function nc(s){return new Promise(e=>setTimeout(e,s))}function ls(s){let e=Number(s.headers.get("Retry-After")??"1");return Number.isFinite(e)?Math.max(50,Math.min(ec,e*1e3)):1e3}function nt(s,e){return`/pub/performance-groups/${encodeURIComponent(s)}/operations/${encodeURIComponent(e)}`}function Lt(s){return s.replace(/^pghop_/,"").replace(/-/g,"").slice(-8).toUpperCase()}var cs=class{constructor(e,t,i){this.api=e;this.sink=t;this.intervalMs=i;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(n=>this.prior.get(n)!==t.get(n)).map(n=>({label:n,status:t.get(n)??"blocked"}));this.prior=t,r.length&&this.sink.applyStatuses(r),this.sink.onSections?.(e.hidden??[],e.closed??[])}catch(e){if(e instanceof j){this.stop();return}this.stopped||await this.sink.resync()}finally{this.stopped||(this.timer=setTimeout(()=>{this.tick()},this.intervalMs))}}},gi=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??Yl).replace(/\/+$/,""),this.access=t.access,this.fetcher=t.fetch??globalThis.fetch.bind(globalThis),this.recoveryTimeoutMs=t.recoveryTimeoutMs??Ql,this.realtimePollMs=Math.max(500,t.realtimePollMs??Xl),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 i=this.readOperationRecord();i&&this.storedIsUndecided(i)&&(this.pendingOperationId=i.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,i]=await Promise.all([this.descriptorCache?Promise.resolve(this.descriptorCache):this.descriptor(),this.chartRequest]);return{doc:i,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 B(404,"not_found","not_found"))}async objects(e){let t=this.descriptorCache?.inclusionMode==="flexible_dates",i=`/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(i,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 B(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(d=>this.includedEventKeys.has(d.eventKey));if(!o.length)throw new B(409,"group_selection_incomplete","group_selection_incomplete");let a=Object.keys(o[0]?.seats??{}),l=Object.fromEntries(a.map(d=>[d,o.every(m=>m.seats[d]==="free")?"free":"blocked"])),c=Object.fromEntries(a.flatMap(d=>{let m=o.filter(u=>u.seats[d]!=="free").map(u=>u.eventKey);return m.length>0&&m.length<o.length?[[d,m]]:[]})),p={seats:l,partial:c,hidden:[...new Set(o.flatMap(d=>d.hidden??[]))],closed:[...new Set(o.flatMap(d=>d.closed??[]))],revision:r.revision,state:r.state,salesClosed:o.some(d=>d.salesClosed)};return this.noteAvailability(r,p.salesClosed,p),p}let n=r.performances.find(o=>o.eventKey===this.activePerformanceKey);if(!n)throw new B(409,"group_performance_unavailable","group_performance_unavailable");return this.noteAvailability(r,r.salesClosed||r.performances.some(o=>o.salesClosed),n),n}setSelectionMode(e,t){if(this.pendingOperationId||this.holdBlocked)throw new B(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 B(404,"group_performance_not_found","group_performance_not_found");this.activePerformanceKey=e}setIncludedEventKeys(e){let t=new Set(this.descriptorCache?.performances.map(i=>i.eventKey)??[]);if(!e.length||new Set(e).size!==e.length||e.some(i=>!t.has(i)))throw new B(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(i=>({...i})))}allocationsForHold(e){return(this.allocationsByHold.get(e)??[]).map(t=>({eventKey:t.eventKey,items:t.items.map(i=>({...i}))}))}async hold(e,t,i,r){if(this.assertUsable(),r)throw new B(409,"group_hold_replace_unsupported","group_hold_replace_unsupported");let n=t.map(c=>c.label),o={labels:n};if(this.descriptorCache?.inclusionMode==="flexible_dates"&&(o.eventKeys=this.includedPerformanceKeys()),this.selectionMode==="per_performance"){if(!this.activePerformanceKey||!this.descriptorCache||!this.partySize)throw new B(409,"group_selection_incomplete","group_selection_incomplete");this.setPerformanceSelections(this.activePerformanceKey,t);let c=this.descriptorCache.performances.filter(p=>this.includedEventKeys.has(p.eventKey)).map(p=>({eventKey:p.eventKey,selections:this.selectionsByEvent.get(p.eventKey)??[]}));if(c.some(p=>p.selections.length!==this.partySize))throw new B(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,...i?{ttlMs:i}:{}})})}catch(c){if(c instanceof j)throw c;if(c instanceof se)throw this.failOperation(a),c;return this.recover(a,n,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,n,Date.now()+this.recoveryTimeoutMs,ls(l))}if(l.status===503){let c=await l.clone().json().catch(()=>null);if((c?.code??c?.error)==="performance_group_abort_pending"){let p=c?.operation?.operationId??a;return this.beginOperation(p),c?.operation&&this.emit(c.operation),this.recover(p,n,Date.now()+this.recoveryTimeoutMs,ls(l))}}try{return await this.throwResponse(l,n)}catch(c){throw this.failOperation(a),c}}async release(e,t,i){this.assertUsable();let r=this.operationForHold(i),n=await this.json(`${nt(this.groupKey,r)}/release`,{method:"POST",body:"{}"});return this.operationByHold.delete(i),this.allocationsByHold.delete(i),this.clearOperationRecord(),n}async resume(e,t){this.assertUsable();let i=this.operationForHold(t),r=await this.json(nt(this.groupKey,i));return this.complete(r.operation)}async extend(e,t,i=12e4){this.assertUsable();let r=this.operationForHold(t),n=Math.max(Zl,Math.min(Jl,Math.round(i))),o=await this.json(`${nt(this.groupKey,r)}/extend`,{method:"POST",body:JSON.stringify({ttlMs:n})}),a=this.complete(o.operation);return{holdId:a.holdId,expiresAt:a.expiresAt}}bestAvailable(){return Promise.reject(new B(400,"group_best_available_unsupported","group_best_available_unsupported"))}socketUrl(){return""}createRealtime(e,t){return new cs(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:Lt(e.operationId)});let t;try{t=await this.authorized(nt(this.groupKey,e.operationId))}catch(n){return n instanceof j||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 i=await this.responseJson(t);this.emit(i.operation);let r=i.operation.state;return r==="committed"||r==="booked"?(this.emitRecovery({kind:"idle"}),this.complete(i.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>=sc?ic:tc;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(nt(this.groupKey,e));if(!r.ok)return this.scheduleSettlementPoll();t=(await this.responseJson(r)).operation}catch(r){return r instanceof j?this.stopSettlementWatch():this.scheduleSettlementPoll()}if(this.destroyed||this.settleOperationId!==e)return;let i=t.state!==this.settleState;if(this.settleState=t.state,i&&this.noteOperationState(e,t.state),this.settled(t.state)){this.stopSettlementWatch(),t.state!=="booked"&&this.clearOperationRecord(),this.emit(t);return}i&&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"||rc.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 i=this.readOperationRecord();!i||i.operationId!==e||this.writeOperationRecord({...i,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 B(409,"performance_group_session_adopt_failed","performance_group_session_adopt_failed");let i=this.pendingOperationId??"";throw this.emitRecovery({kind:"failed",operationId:i,reference:i?Lt(i):"",reason:"session_adopt_failed",retryable:!1}),this.adoptFailure}async recover(e,t,i,r=100){let n=r,o=Date.now()+Math.min(8e3,Math.max(500,this.recoveryTimeoutMs/2)),a="unknown";for(;Date.now()<=i;){if(this.destroyed)throw new j;if(this.emitRecovery({kind:"pending",operationId:e,phase:a,longRunning:Date.now()>=o,reference:Lt(e)}),await nc(n),this.destroyed)throw new j;let l;try{l=await this.authorized(nt(this.groupKey,e))}catch(d){if(d instanceof j)throw d;if(d instanceof se)throw this.recoveryFailed(e,"request_failed"),d;n=Math.min(2e3,Math.max(100,n*2));continue}if(l.status===404){n=Math.min(1e3,Math.max(100,n*2));continue}if(!l.ok){this.recoveryFailed(e,"request_failed");try{return await this.throwResponse(l,t)}finally{this.pendingOperationId=null,this.clearOperationRecord()}}let p=(await this.responseJson(l)).operation;if(a=p.state,this.noteOperationState(e,p.state),this.emit(p),p.state==="committed"||p.state==="booked")return this.emitRecovery({kind:"idle"}),this.complete(p);if(p.state==="aborted"||p.state==="expired")throw this.failOperation(e),new B(409,"conflict","conflict",t.map(d=>({label:d,status:"held"})));n=ls(l)}throw this.recoveryFailed(e,"deadline"),new B(504,"performance_group_outcome_unknown","performance_group_outcome_unknown")}recoveryFailed(e,t){this.emitRecovery({kind:"failed",operationId:e,reference:Lt(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,i){if(this.destroyed||!this.onAvailability)return;let r=e.state??this.descriptorCache?.state??"active",n=e.revision??null,o=!!n&&!!this.knownRevision&&n!==this.knownRevision;n&&!this.knownRevision&&(this.knownRevision=n);let a=i?.partial??{},l=Object.values(i?.seats??{});this.onAvailability({partial:a,freeCount:l.filter(c=>c==="free").length,blockedCount:Object.keys(i?.seats??{}).filter(c=>i.seats[c]!=="free"&&!(c in a)).length,state:r,salesClosed:!!t||r!=="active",revision:n,revisionChanged:o})}acceptRevision(e){this.knownRevision=e}complete(e){if(!e.hold||e.hold.expiresAt==null)throw new B(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 i=t.find(r=>r.eventKey===this.activePerformanceKey)?.items;return{holdId:e.hold.id,expiresAt:e.hold.expiresAt,items:i??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 B(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 j;if(this.adoptFailure)throw this.adoptFailure}async authorized(e,t={},i=!1){if(this.destroyed)throw new j;if(this.adoptFailure)throw this.adoptFailure;let r={...t.headers};t.body!==void 0&&(r["Content-Type"]="application/json");let n=await this.access.authorization(i?"unauthorized":"initial");if(this.destroyed)throw new j;if(this.adoptFailure)throw this.adoptFailure;if(!n)throw new Error("performance_group_buyer_access_required");r.Authorization=n;let o=await this.fetcher(`${this.base}${e}`,{method:t.method??"GET",headers:r,body:t.body,credentials:"omit",signal:this.aborter.signal});if(!i&&(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 i=await this.authorized(e,t);return i.ok?this.responseJson(i):this.throwResponse(i)}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)??{},n=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 B(e.status,r.error??n,n,r.conflicts)}};var dc="https://api.seatlayer.io";function ao(s){let e=typeof s=="string"?document.querySelector(s):s;if(!e)throw new Error("seatlayer: Performance Group picker container was not found");return e}var ds=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 ae({provider:e.buyerAccessTokenProvider,token:e.buyerAccessToken,onExpired:e.onAccessExpired,onUnavailable:e.onAccessUnavailable}),this.api=new gi(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,oo(),await ac(this.options.locale),this.options.messages&&lc(this.options.messages),this.destroyed)return this;let t;try{t=await this.api.descriptor()}catch(i){throw xe({apiBase:this.options.apiBase??dc,event:this.options.performanceGroup,scope:"performance_group",surface:"performance_group_picker",outcome:"failure",stage:"group_descriptor",ms:performance.now()-e,load:He(this.options.performanceGroup),transport:"pubapi"}),i}return this.destroyed?this:(this.descriptorValue=t,this.activePerformanceKey=t.performances[0]?.eventKey??null,this.buildChrome(ao(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 i=document.createElement("div");i.className="sl-pg-root",i.dataset.performanceGroup=t.key,i.dataset.selectionMode=this.mode;let r=document.createElement("div");r.className="sl-pg-progress";let n=document.createElement("section");n.className="sl-pg-head",n.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 p=document.createElement("summary");p.textContent=this.copy(t.inclusionMode==="flexible_dates"?"picker.group.flexibleDatesInView":"picker.group.allDates",{count:t.performanceCount});let d=document.createElement("div");d.innerHTML=as(this.performanceCards(t),this.copy(t.inclusionMode==="flexible_dates"?"picker.group.flexibleDatesNote":"picker.group.includedNote",{count:t.performanceCount})),c.append(p,d);let m=document.createElement("div");m.className="sl-pg-held-summary",m.hidden=!0,n.append(o,a,l,c,m);let u=document.createElement("div");u.className="sl-pg-legend";let b=document.createElement("div");b.className="sl-pg-pane",b.setAttribute("role","group"),b.setAttribute("aria-label",this.copy("picker.group.yourSelection")),b.hidden=!0;let h=this.mode==="per_performance"?this.performanceTabs(t):null,y=document.createElement("div");y.className="sl-pg-inner",y.id=this.panelId,y.setAttribute("aria-busy","false"),y.dataset.locked="false",this.mode==="per_performance"&&(y.setAttribute("role","tabpanel"),y.tabIndex=-1);let x=document.createElement("div");x.className="sl-pg-status",x.setAttribute("role","status"),x.setAttribute("aria-live","polite"),x.hidden=!0;let S=document.createElement("p"),A=document.createElement("button");A.type="button",A.hidden=!0,A.textContent=this.copy("picker.group.retry"),A.addEventListener("click",()=>{this.retryRecovery()}),x.append(S,A),y.appendChild(x);let g=document.createElement("div");g.className="sl-pg-live",g.setAttribute("role","status"),g.setAttribute("aria-live","polite"),i.append(r,n),h&&i.append(h),i.append(u,y,b,g),e.appendChild(i),this.root=i,this.progressHost=r,this.legendHost=u,this.paneHost=b,this.datesSummaryHost=p,this.datesCardsHost=d,this.innerHost=y,this.heldSummary=m,this.live=g,this.statusHost=x,this.statusCopy=S,this.statusAction=A,this.syncProgress(),this.syncLegend(),this.syncPane()}async mountPicker(e){let t=new ze(pi({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:(i,r)=>{try{this.options.onAnalytics?.(i,{...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:i=>this.selectionChanged(i),onSelectionValidityChange:i=>this.selectionValidityChanged(i),onSelectionValid:this.options.onSelectionValid,onSelectionInvalid:this.options.onSelectionInvalid,onSelectionLimit:this.options.onSelectionLimit,onHoldChange:(i,r)=>this.holdChanged(i,r),onCheckout:(i,r)=>this.checkout(i,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"?In(this.includedPerformances(),e.performanceCount,this.options.locale,this.copy("picker.group.flexibleSelectedNote",{count:this.includedPerformances().length})):null,selectNight:i=>{this.switchPerformance(i)},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:i=>this.copy("picker.group.selectAvailableDates",{count:i}),activate:(i,r)=>{this.selectPartialSeat(i,r)}}:null,confirmDateSelection:e.inclusionMode==="flexible_dates"&&this.mode==="same_seat"?{includedEventKeys:()=>this.api.includedPerformanceKeys(),availableEventKeys:i=>this.partialSeatDates.get(i)??this.nights().map(r=>r.eventKey),label:i=>this.copy("picker.group.selectAvailableDates",{count:i}),apply:(i,r)=>this.applySeatDates(i,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:ui(t,this.options.locale),time:mi(t,this.options.locale)}))}nights(){return(this.descriptorValue?.performances??[]).map(e=>({eventKey:e.eventKey,name:e.name,shortDate:fi(e,this.options.locale)}))}seatMarks(){let e=this.descriptorValue?.performanceCount??0,t=this.availability,i=!!t?.salesClosed||!!t&&t.state!=="active",r=this.mode==="same_seat"&&!i?t?.partial??{}:{},n={};for(let o of this.markedLabels)n[o]=null;if(this.markedLabels.clear(),e>0)for(let[o,a]of Object.entries(r))!a.length||a.length>=e||(n[o]={kind:"partial",fraction:(e-a.length)/e,data:{blockedEventKeys:[...a]}},this.markedLabels.add(o));return n}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=fi(e,this.options.locale),i=e.name?.trim();return i&&i!==t?`${i} \xB7 ${t}`:t}nightSummary(){return this.mode!=="per_performance"?[]:(this.descriptorValue?.performances??[]).map(e=>({eventKey:e.eventKey,name:fi(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 n=this.activeHandoff?.seatLabels.length??this.picker?.getSelection().length??0;return{seats:n*e.length,performances:e.length,totalPerformances:this.descriptorValue?.performanceCount??e.length,performancesChosen:n?e.length:0,perPerformance:n}}let t=e.map(n=>this.selectionsByEvent.get(n.eventKey)?.length??0),i=t.filter(n=>n>0),r=i.length===t.length&&i.every(n=>n===i[0]);return{seats:t.reduce((n,o)=>n+o,0),performances:e.length,totalPerformances:this.descriptorValue?.performanceCount??e.length,performancesChosen:i.length,perPerformance:r&&i.length?i[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=Fn(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=On({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 i=this.activeHandoff?.seatLabels??this.picker?.getSelection().map(n=>n.label)??[],r=this.heldTotal();e.hidden=!1,e.innerHTML=jn({title:this.copy("picker.group.yourSelection"),rows:t.map(n=>({eventKey:n.eventKey,name:`${ui(n,this.options.locale)} ${mi(n,this.options.locale)}`,labels:i})),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:Gn(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 n=r.reduce((a,l)=>a+l.unitPrice*(l.quantity??1),0),o=r[0]?.currency??t.currency;try{return oc(n,o,void 0,this.options.locale)}catch{return`${o} ${n.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(i=>t.has(i.eventKey))}syncIncludedDates(){let e=this.descriptorValue;if(!e||!this.datesSummaryHost||!this.datesCardsHost)return;let t=this.includedPerformances(),i=e.inclusionMode==="flexible_dates";this.datesSummaryHost.textContent=i&&t.length<e.performanceCount?this.copy("picker.group.flexibleDatesSelected",{selected:t.length,total:e.performanceCount}):this.copy(i?"picker.group.flexibleDatesInView":"picker.group.allDates",{count:e.performanceCount}),this.datesCardsHost.innerHTML=as(this.performanceCards({...e,performances:t}),this.copy(i&&t.length<e.performanceCount?"picker.group.flexibleSelectedNote":i?"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,i){if(this.destroyed||this.holdBlocked()||this.activeHandoff||!t.length)return!1;let r=this.api.includedPerformanceKeys();if(r.length===t.length&&r.every(n=>t.includes(n)))return!0;this.selectingPartialSeat=!0;try{if(this.api.setIncludedEventKeys(t),this.syncIncludedDates(),await this.picker?.refreshAvailability(),!(i?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(n){return r.length&&(this.api.setIncludedEventKeys(r),this.syncIncludedDates(),await this.picker?.refreshAvailability().catch(()=>{})),this.options.onError?.(n),!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(ao(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 j)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 i=this.options.messages?.[e];return i!==void 0?t?i.replace(/\{(\w+)\}/g,(r,n)=>String(t[n]??`{${n}}`)):i:cc(e,t)}performanceTabs(e){let t=document.createElement("div");t.className="sl-pg-tabsbar";let i=document.createElement("button");i.type="button",i.className="sl-pg-step",i.dataset.step="previous",i.setAttribute("aria-label",this.copy("picker.group.previousPerformance")),i.textContent="\u2039",i.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 n=document.createElement("div");return n.className="sl-pg-tabs",n.setAttribute("role","tablist"),n.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 p=document.createElement("span");p.className="sl-pg-tab-state",p.textContent=this.copy("picker.group.stillNeedsSeat");let d=document.createElement("span");d.className="sl-pg-tab-badge",d.textContent=this.copy("picker.group.chosenOfTotal",{chosen:0,total:this.options.numberOfPlacesToSelect??1}),l.append(c,d,p),l.addEventListener("click",()=>{this.switchPerformance(o.eventKey)}),l.addEventListener("keydown",m=>this.tabKeydown(m)),n.appendChild(l)}),t.append(i,n,r),this.tabsHost=n,this.prevButton=i,this.nextButton=r,t}tabButtons(){return[...this.tabsHost?.querySelectorAll(".sl-pg-tab")??[]]}tabKeydown(e){let t=this.tabButtons(),i=t.findIndex(a=>a===e.target);if(i<0)return;let r=getComputedStyle(this.tabsHost??document.body).direction==="rtl",n=-1;switch(e.key){case"ArrowRight":n=i+(r?-1:1);break;case"ArrowLeft":n=i+(r?1:-1);break;case"ArrowDown":n=i+1;break;case"ArrowUp":n=i-1;break;case"Home":n=0;break;case"End":n=t.length-1;break;default:return}if(n<0||n>=t.length)return;e.preventDefault();let o=t[n];o.focus({preventScroll:!0}),o.disabled||this.switchPerformance(o.dataset.eventKey)}stepPerformance(e){let t=this.tabButtons(),i=t.findIndex(n=>n.dataset.eventKey===this.activePerformanceKey),r=t[i+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,i=e.filter(r=>this.selectionsByEvent.get(r.eventKey)?.length===t&&this.validByEvent.get(r.eventKey)!==!1).length;return{complete:i,total:e.length,ready:i===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(i=>i.eventKey)),this.syncIncludedDates(),this.picker?.refreshAvailability().catch(i=>this.options.onError?.(i)).finally(()=>{this.resettingFlexibleSelection=!1}));return}if(this.refreshingComposition||this.switchingPerformance||!this.activePerformanceKey)return;let t=e.map(i=>({...i}));this.selectionsByEvent.set(this.activePerformanceKey,t),this.api.setPerformanceSelections(this.activePerformanceKey,t.map(i=>({label:i.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,i=(this.selectionsByEvent.get(e)??[]).map(n=>n.label),r=this.copy("picker.group.chosenOfTotal",{chosen:i.length,total:t});return i.length===0?{key:"not-started",label:this.copy("picker.group.stillNeedsSeat"),badge:r}:i.length===t&&this.validByEvent.get(e)!==!1?{key:"complete",label:this.copy("picker.group.completeWithSeats",{seats:i.join(", ")}),badge:r}:i.length===t?{key:"needs-attention",label:this.copy("picker.group.needsAttention"),badge:r}:{key:"in-progress",label:this.copy("picker.group.needsMoreSeats",{count:t-i.length}),badge:r}}updateTabs(){let e=this.tabButtons(),t=this.switchingPerformance||this.operationPending||this.recovery.kind!=="idle"||!!this.activeHandoff;e.forEach(r=>{let n=r.dataset.eventKey,o=this.tabState(n),a=n===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 p=r.querySelector(".sl-pg-tab-name")?.textContent??n;r.setAttribute("aria-label",`${p}: ${o.badge} \xB7 ${o.label}`),a&&this.innerHost?.setAttribute("aria-labelledby",r.id)});let i=e.findIndex(r=>r.dataset.eventKey===this.activePerformanceKey);this.prevButton&&(this.prevButton.disabled=t||i<=0),this.nextButton&&(this.nextButton.disabled=t||i<0||i>=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(i=>i.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 i=this.picker.selectObjects(t);this.switchingPerformance=!1,this.selectionChanged(i),i.length!==t.length&&this.validByEvent.set(e,!1),this.options.onSelectionChange?.(i);let r=this.descriptorValue?.performances.find(n=>n.eventKey===e);r&&this.announce(this.copy("picker.group.performanceOpened",{performance:r.name}))}catch(i){this.options.onError?.(i)}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,i={}){this.statusHost&&this.statusCopy&&this.statusAction&&(this.statusCopy.textContent=t,this.statusHost.hidden=!t,this.statusAction.hidden=!i.retry),this.announce(t),this.options.onStatusChange?.({kind:e,message:t,...i.reference?{reference:i.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 j)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 j)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 j)return;this.options.onError?.(t)}}handoff(e,t){let i=this.descriptorValue,r=this.api.operationIdForHold(e.holdId);if(!i||!r)throw new Error("seatlayer: Performance Group hold identity is unavailable");let n=this.api.allocationsForHold(e.holdId);return{operationId:r,holdId:e.holdId,expiresAt:e.expiresAt,performanceGroup:i,selectionMode:this.mode,performanceKeys:n.map(o=>o.eventKey),bookingState:this.booked?"booked":"held",seatLabels:t.map(o=>o.label),...this.mode==="per_performance"?{allocations:n.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 i=this.descriptorValue?.performances.find(o=>o.eventKey===t.eventKey),r=document.createElement("p"),n=document.createElement("strong");n.textContent=i?.name??t.eventKey,r.append(n,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 i=this.handoff(e,t),r=this.activeHandoff?.holdId!==i.holdId;this.activeHandoff=i,this.renderHeldAllocations(this.api.allocationsForHold(e.holdId)),this.updateTabs(),this.api.watchSettlement(e.holdId),this.syncProgress(),this.syncPane(),this.syncHoldTicker(),r&&this.options.onHold?.(i),this.options.onHoldChange?.(i)}checkout(e,t){let i=this.handoff(e,t);this.continued=!0,this.activeHandoff=i,this.options.onCheckout?.(i)}};var lo="seatlayer-season-picker-style";function co(){if(document.getElementById(lo))return;let s=document.createElement("style");s.id=lo,s.textContent=`
2706
+ `,document.head.appendChild(s)}var ac="https://api.seatlayer.io",lc=6e4,cc=2e3,dc=1e3,pc=36e5,hc=5e3,uc=5e3,mc=15e3,fc=12e4,gc=new Set(["preparing","commit_pending","abort_pending","expire_pending"]),q=class extends Error{constructor(){super("performance_group_destroyed"),this.name="PerformanceGroupDestroyedError"}};function bc(s){return new Promise(e=>setTimeout(e,s))}function us(s){let e=Number(s.headers.get("Retry-After")??"1");return Number.isFinite(e)?Math.max(50,Math.min(hc,e*1e3)):1e3}function ot(s,e){return`/pub/performance-groups/${encodeURIComponent(s)}/operations/${encodeURIComponent(e)}`}function Ht(s){return s.replace(/^pghop_/,"").replace(/-/g,"").slice(-8).toUpperCase()}var ms=class{constructor(e,t,i){this.api=e;this.sink=t;this.intervalMs=i;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)),n=[...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,n.length&&this.sink.applyStatuses(n),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))}}},yi=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??ac).replace(/\/+$/,""),this.access=t.access,this.fetcher=t.fetch??globalThis.fetch.bind(globalThis),this.recoveryTimeoutMs=t.recoveryTimeoutMs??lc,this.realtimePollMs=Math.max(500,t.realtimePollMs??cc),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(n=>this.adoptSession(n));let i=this.readOperationRecord();i&&this.storedIsUndecided(i)&&(this.pendingOperationId=i.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(n=>{throw this.chartRequest=null,n});let[t,i]=await Promise.all([this.descriptorCache?Promise.resolve(this.descriptorCache):this.descriptor(),this.chartRequest]);return{doc:i,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 $(404,"not_found","not_found"))}async objects(e){let t=this.descriptorCache?.inclusionMode==="flexible_dates",i=`/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(i,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 $(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 n=this.objectsCache;if(this.selectionMode==="same_seat"){let o=n.performances.filter(d=>this.includedEventKeys.has(d.eventKey));if(!o.length)throw new $(409,"group_selection_incomplete","group_selection_incomplete");let a=Object.keys(o[0]?.seats??{}),l=Object.fromEntries(a.map(d=>[d,o.every(u=>u.seats[d]==="free")?"free":"blocked"])),c=Object.fromEntries(a.flatMap(d=>{let u=o.filter(h=>h.seats[d]!=="free").map(h=>h.eventKey);return u.length>0&&u.length<o.length?[[d,u]]:[]})),p={seats:l,partial:c,hidden:[...new Set(o.flatMap(d=>d.hidden??[]))],closed:[...new Set(o.flatMap(d=>d.closed??[]))],revision:n.revision,state:n.state,salesClosed:o.some(d=>d.salesClosed)};return this.noteAvailability(n,p.salesClosed,p),p}let r=n.performances.find(o=>o.eventKey===this.activePerformanceKey);if(!r)throw new $(409,"group_performance_unavailable","group_performance_unavailable");return this.noteAvailability(n,n.salesClosed||n.performances.some(o=>o.salesClosed),r),r}setSelectionMode(e,t){if(this.pendingOperationId||this.holdBlocked)throw new $(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 $(404,"group_performance_not_found","group_performance_not_found");this.activePerformanceKey=e}setIncludedEventKeys(e){let t=new Set(this.descriptorCache?.performances.map(i=>i.eventKey)??[]);if(!e.length||new Set(e).size!==e.length||e.some(i=>!t.has(i)))throw new $(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(i=>({...i})))}allocationsForHold(e){return(this.allocationsByHold.get(e)??[]).map(t=>({eventKey:t.eventKey,items:t.items.map(i=>({...i}))}))}async hold(e,t,i,n){if(this.assertUsable(),n)throw new $(409,"group_hold_replace_unsupported","group_hold_replace_unsupported");let r=t.map(c=>c.label),o={labels:r};if(this.descriptorCache?.inclusionMode==="flexible_dates"&&(o.eventKeys=this.includedPerformanceKeys()),this.selectionMode==="per_performance"){if(!this.activePerformanceKey||!this.descriptorCache||!this.partySize)throw new $(409,"group_selection_incomplete","group_selection_incomplete");this.setPerformanceSelections(this.activePerformanceKey,t);let c=this.descriptorCache.performances.filter(p=>this.includedEventKeys.has(p.eventKey)).map(p=>({eventKey:p.eventKey,selections:this.selectionsByEvent.get(p.eventKey)??[]}));if(c.some(p=>p.selections.length!==this.partySize))throw new $(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,...i?{ttlMs:i}:{}})})}catch(c){if(c instanceof q)throw c;if(c instanceof ae)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,us(l))}if(l.status===503){let c=await l.clone().json().catch(()=>null);if((c?.code??c?.error)==="performance_group_abort_pending"){let p=c?.operation?.operationId??a;return this.beginOperation(p),c?.operation&&this.emit(c.operation),this.recover(p,r,Date.now()+this.recoveryTimeoutMs,us(l))}}try{return await this.throwResponse(l,r)}catch(c){throw this.failOperation(a),c}}async release(e,t,i){this.assertUsable();let n=this.operationForHold(i),r=await this.json(`${ot(this.groupKey,n)}/release`,{method:"POST",body:"{}"});return this.operationByHold.delete(i),this.allocationsByHold.delete(i),this.clearOperationRecord(),r}async resume(e,t){this.assertUsable();let i=this.operationForHold(t),n=await this.json(ot(this.groupKey,i));return this.complete(n.operation)}async extend(e,t,i=12e4){this.assertUsable();let n=this.operationForHold(t),r=Math.max(dc,Math.min(pc,Math.round(i))),o=await this.json(`${ot(this.groupKey,n)}/extend`,{method:"POST",body:JSON.stringify({ttlMs:r})}),a=this.complete(o.operation);return{holdId:a.holdId,expiresAt:a.expiresAt}}bestAvailable(){return Promise.reject(new $(400,"group_best_available_unsupported","group_best_available_unsupported"))}socketUrl(){return""}createRealtime(e,t){return new ms(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:Ht(e.operationId)});let t;try{t=await this.authorized(ot(this.groupKey,e.operationId))}catch(r){return r 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 i=await this.responseJson(t);this.emit(i.operation);let n=i.operation.state;return n==="committed"||n==="booked"?(this.emitRecovery({kind:"idle"}),this.complete(i.operation)):n==="aborted"||n==="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>=fc?mc:uc;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 n=await this.authorized(ot(this.groupKey,e));if(!n.ok)return this.scheduleSettlementPoll();t=(await this.responseJson(n)).operation}catch(n){return n instanceof q?this.stopSettlementWatch():this.scheduleSettlementPoll()}if(this.destroyed||this.settleOperationId!==e)return;let i=t.state!==this.settleState;if(this.settleState=t.state,i&&this.noteOperationState(e,t.state),this.settled(t.state)){this.stopSettlementWatch(),t.state!=="booked"&&this.clearOperationRecord(),this.emit(t);return}i&&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"||gc.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 i=this.readOperationRecord();!i||i.operationId!==e||this.writeOperationRecord({...i,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 n=0;n<2;n++){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 $(409,"performance_group_session_adopt_failed","performance_group_session_adopt_failed");let i=this.pendingOperationId??"";throw this.emitRecovery({kind:"failed",operationId:i,reference:i?Ht(i):"",reason:"session_adopt_failed",retryable:!1}),this.adoptFailure}async recover(e,t,i,n=100){let r=n,o=Date.now()+Math.min(8e3,Math.max(500,this.recoveryTimeoutMs/2)),a="unknown";for(;Date.now()<=i;){if(this.destroyed)throw new q;if(this.emitRecovery({kind:"pending",operationId:e,phase:a,longRunning:Date.now()>=o,reference:Ht(e)}),await bc(r),this.destroyed)throw new q;let l;try{l=await this.authorized(ot(this.groupKey,e))}catch(d){if(d instanceof q)throw d;if(d instanceof ae)throw this.recoveryFailed(e,"request_failed"),d;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 p=(await this.responseJson(l)).operation;if(a=p.state,this.noteOperationState(e,p.state),this.emit(p),p.state==="committed"||p.state==="booked")return this.emitRecovery({kind:"idle"}),this.complete(p);if(p.state==="aborted"||p.state==="expired")throw this.failOperation(e),new $(409,"conflict","conflict",t.map(d=>({label:d,status:"held"})));r=us(l)}throw this.recoveryFailed(e,"deadline"),new $(504,"performance_group_outcome_unknown","performance_group_outcome_unknown")}recoveryFailed(e,t){this.emitRecovery({kind:"failed",operationId:e,reference:Ht(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,i){if(this.destroyed||!this.onAvailability)return;let n=e.state??this.descriptorCache?.state??"active",r=e.revision??null,o=!!r&&!!this.knownRevision&&r!==this.knownRevision;r&&!this.knownRevision&&(this.knownRevision=r);let a=i?.partial??{},l=Object.values(i?.seats??{});this.onAvailability({partial:a,freeCount:l.filter(c=>c==="free").length,blockedCount:Object.keys(i?.seats??{}).filter(c=>i.seats[c]!=="free"&&!(c in a)).length,state:n,salesClosed:!!t||n!=="active",revision:r,revisionChanged:o})}acceptRevision(e){this.knownRevision=e}complete(e){if(!e.hold||e.hold.expiresAt==null)throw new $(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 i=t.find(n=>n.eventKey===this.activePerformanceKey)?.items;return{holdId:e.hold.id,expiresAt:e.hold.expiresAt,items:i??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 $(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={},i=!1){if(this.destroyed)throw new q;if(this.adoptFailure)throw this.adoptFailure;let n={...t.headers};t.body!==void 0&&(n["Content-Type"]="application/json");let r=await this.access.authorization(i?"unauthorized":"initial");if(this.destroyed)throw new q;if(this.adoptFailure)throw this.adoptFailure;if(!r)throw new Error("performance_group_buyer_access_required");n.Authorization=r;let o=await this.fetcher(`${this.base}${e}`,{method:t.method??"GET",headers:n,body:t.body,credentials:"omit",signal:this.aborter.signal});if(!i&&(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 i=await this.authorized(e,t);return i.ok?this.responseJson(i):this.throwResponse(i)}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 n=await e.json().catch(()=>null)??{},r=n.code??n.error??`request_failed_${e.status}`;throw e.status===409&&!n.conflicts?.length&&t.length&&(n.conflicts=t.map(o=>({label:o,status:"held"}))),new $(e.status,n.error??r,r,n.conflicts)}};var kc="https://api.seatlayer.io";function lo(s){let e=typeof s=="string"?document.querySelector(s):s;if(!e)throw new Error("seatlayer: Performance Group picker container was not found");return e}var fs=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 yi(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,ao(),await yc(this.options.locale),this.options.messages&&xc(this.options.messages),this.destroyed)return this;let t;try{t=await this.api.descriptor()}catch(i){throw ke({apiBase:this.options.apiBase??kc,event:this.options.performanceGroup,scope:"performance_group",surface:"performance_group_picker",outcome:"failure",stage:"group_descriptor",ms:performance.now()-e,load:He(this.options.performanceGroup),transport:"pubapi"}),i}return this.destroyed?this:(this.descriptorValue=t,this.activePerformanceKey=t.performances[0]?.eventKey??null,this.buildChrome(lo(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 i=document.createElement("div");i.className="sl-pg-root",i.dataset.performanceGroup=t.key,i.dataset.selectionMode=this.mode;let n=document.createElement("div");n.className="sl-pg-progress";let r=document.createElement("section");r.className="sl-pg-head",r.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 p=document.createElement("summary");p.textContent=this.copy(t.inclusionMode==="flexible_dates"?"picker.group.flexibleDatesInView":"picker.group.allDates",{count:t.performanceCount});let d=document.createElement("div");d.innerHTML=ps(this.performanceCards(t),this.copy(t.inclusionMode==="flexible_dates"?"picker.group.flexibleDatesNote":"picker.group.includedNote",{count:t.performanceCount})),c.append(p,d);let u=document.createElement("div");u.className="sl-pg-held-summary",u.hidden=!0,r.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 m=this.mode==="per_performance"?this.performanceTabs(t):null,v=document.createElement("div");v.className="sl-pg-inner",v.id=this.panelId,v.setAttribute("aria-busy","false"),v.dataset.locked="false",this.mode==="per_performance"&&(v.setAttribute("role","tabpanel"),v.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 S=document.createElement("p"),L=document.createElement("button");L.type="button",L.hidden=!0,L.textContent=this.copy("picker.group.retry"),L.addEventListener("click",()=>{this.retryRecovery()}),k.append(S,L),v.appendChild(k);let b=document.createElement("div");b.className="sl-pg-live",b.setAttribute("role","status"),b.setAttribute("aria-live","polite"),i.append(n,r),m&&i.append(m),i.append(h,v,g,b),e.appendChild(i),this.root=i,this.progressHost=n,this.legendHost=h,this.paneHost=g,this.datesSummaryHost=p,this.datesCardsHost=d,this.innerHost=v,this.heldSummary=u,this.live=b,this.statusHost=k,this.statusCopy=S,this.statusAction=L,this.syncProgress(),this.syncLegend(),this.syncPane()}async mountPicker(e){let t=new ze(mi({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:(i,n)=>{try{this.options.onAnalytics?.(i,{...n,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:i=>this.selectionChanged(i),onSelectionValidityChange:i=>this.selectionValidityChanged(i),onSelectionValid:this.options.onSelectionValid,onSelectionInvalid:this.options.onSelectionInvalid,onSelectionLimit:this.options.onSelectionLimit,onHoldChange:(i,n)=>this.holdChanged(i,n),onCheckout:(i,n)=>this.checkout(i,n),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"?Hr(this.includedPerformances(),e.performanceCount,this.options.locale,this.copy("picker.group.flexibleSelectedNote",{count:this.includedPerformances().length})):null,selectNight:i=>{this.switchPerformance(i)},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:i=>this.copy("picker.group.selectAvailableDates",{count:i}),activate:(i,n)=>{this.selectPartialSeat(i,n)}}:null,confirmDateSelection:e.inclusionMode==="flexible_dates"&&this.mode==="same_seat"?{includedEventKeys:()=>this.api.includedPerformanceKeys(),availableEventKeys:i=>this.partialSeatDates.get(i)??this.nights().map(n=>n.eventKey),label:i=>this.copy("picker.group.selectAvailableDates",{count:i}),apply:(i,n)=>this.applySeatDates(i,n,!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:gi(t,this.options.locale),time:bi(t,this.options.locale)}))}nights(){return(this.descriptorValue?.performances??[]).map(e=>({eventKey:e.eventKey,name:e.name,shortDate:vi(e,this.options.locale)}))}seatMarks(){let e=this.descriptorValue?.performanceCount??0,t=this.availability,i=!!t?.salesClosed||!!t&&t.state!=="active",n=this.mode==="same_seat"&&!i?t?.partial??{}:{},r={};for(let o of this.markedLabels)r[o]=null;if(this.markedLabels.clear(),e>0)for(let[o,a]of Object.entries(n))!a.length||a.length>=e||(r[o]={kind:"partial",fraction:(e-a.length)/e,data:{blockedEventKeys:[...a]}},this.markedLabels.add(o));return r}activePerformanceLabel(){if(this.mode!=="per_performance")return null;let e=this.descriptorValue?.performances.find(n=>n.eventKey===this.activePerformanceKey);if(!e)return null;let t=vi(e,this.options.locale),i=e.name?.trim();return i&&i!==t?`${i} \xB7 ${t}`:t}nightSummary(){return this.mode!=="per_performance"?[]:(this.descriptorValue?.performances??[]).map(e=>({eventKey:e.eventKey,name:vi(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),i=t.filter(r=>r>0),n=i.length===t.length&&i.every(r=>r===i[0]);return{seats:t.reduce((r,o)=>r+o,0),performances:e.length,totalPerformances:this.descriptorValue?.performanceCount??e.length,performancesChosen:i.length,perPerformance:n&&i.length?i[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=Fr(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=Or({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 i=this.activeHandoff?.seatLabels??this.picker?.getSelection().map(r=>r.label)??[],n=this.heldTotal();e.hidden=!1,e.innerHTML=zr({title:this.copy("picker.group.yourSelection"),rows:t.map(r=>({eventKey:r.eventKey,name:`${gi(r,this.options.locale)} ${bi(r,this.options.locale)}`,labels:i})),empty:this.copy("picker.group.noSeatsChosenYet"),note:n?null:this.copy("picker.group.pricesPerPerformance"),total:n?{label:this.copy("picker.group.total"),amount:n}:null,holdStatus:this.booked?this.copy("picker.group.bookedAll",{count:t.length}):this.activeHandoff?this.copy("picker.group.heldTogether",{count:t.length,time:jr(this.activeHandoff.expiresAt-Date.now())}):null})}heldTotal(){let e=this.activeHandoff,t=this.descriptorValue;if(!e||!t)return null;let n=this.api.allocationsForHold(e.holdId).flatMap(a=>a.items);if(!n.length)return null;let r=n.reduce((a,l)=>a+l.unitPrice*(l.quantity??1),0),o=n[0]?.currency??t.currency;try{return vc(r,o,void 0,this.options.locale)}catch{return`${o} ${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(i=>t.has(i.eventKey))}syncIncludedDates(){let e=this.descriptorValue;if(!e||!this.datesSummaryHost||!this.datesCardsHost)return;let t=this.includedPerformances(),i=e.inclusionMode==="flexible_dates";this.datesSummaryHost.textContent=i&&t.length<e.performanceCount?this.copy("picker.group.flexibleDatesSelected",{selected:t.length,total:e.performanceCount}):this.copy(i?"picker.group.flexibleDatesInView":"picker.group.allDates",{count:e.performanceCount}),this.datesCardsHost.innerHTML=ps(this.performanceCards({...e,performances:t}),this.copy(i&&t.length<e.performanceCount?"picker.group.flexibleSelectedNote":i?"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,i){if(this.destroyed||this.holdBlocked()||this.activeHandoff||!t.length)return!1;let n=this.api.includedPerformanceKeys();if(n.length===t.length&&n.every(r=>t.includes(r)))return!0;this.selectingPartialSeat=!0;try{if(this.api.setIncludedEventKeys(t),this.syncIncludedDates(),await this.picker?.refreshAvailability(),!(i?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 n.length&&(this.api.setIncludedEventKeys(n),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(lo(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 i=this.options.messages?.[e];return i!==void 0?t?i.replace(/\{(\w+)\}/g,(n,r)=>String(t[r]??`{${r}}`)):i:wc(e,t)}performanceTabs(e){let t=document.createElement("div");t.className="sl-pg-tabsbar";let i=document.createElement("button");i.type="button",i.className="sl-pg-step",i.dataset.step="previous",i.setAttribute("aria-label",this.copy("picker.group.previousPerformance")),i.textContent="\u2039",i.addEventListener("click",()=>{this.stepPerformance(-1)});let n=document.createElement("button");n.type="button",n.className="sl-pg-step",n.dataset.step="next",n.setAttribute("aria-label",this.copy("picker.group.nextPerformance")),n.textContent="\u203A",n.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((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 p=document.createElement("span");p.className="sl-pg-tab-state",p.textContent=this.copy("picker.group.stillNeedsSeat");let d=document.createElement("span");d.className="sl-pg-tab-badge",d.textContent=this.copy("picker.group.chosenOfTotal",{chosen:0,total:this.options.numberOfPlacesToSelect??1}),l.append(c,d,p),l.addEventListener("click",()=>{this.switchPerformance(o.eventKey)}),l.addEventListener("keydown",u=>this.tabKeydown(u)),r.appendChild(l)}),t.append(i,r,n),this.tabsHost=r,this.prevButton=i,this.nextButton=n,t}tabButtons(){return[...this.tabsHost?.querySelectorAll(".sl-pg-tab")??[]]}tabKeydown(e){let t=this.tabButtons(),i=t.findIndex(a=>a===e.target);if(i<0)return;let n=getComputedStyle(this.tabsHost??document.body).direction==="rtl",r=-1;switch(e.key){case"ArrowRight":r=i+(n?-1:1);break;case"ArrowLeft":r=i+(n?1:-1);break;case"ArrowDown":r=i+1;break;case"ArrowUp":r=i-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 o=t[r];o.focus({preventScroll:!0}),o.disabled||this.switchPerformance(o.dataset.eventKey)}stepPerformance(e){let t=this.tabButtons(),i=t.findIndex(r=>r.dataset.eventKey===this.activePerformanceKey),n=t[i+e];!n||n.disabled||(n.focus({preventScroll:!0}),this.switchPerformance(n.dataset.eventKey))}submissionState(){let e=this.descriptorValue?.performances??[];if(this.mode!=="per_performance"){let n=!this.holdBlocked();return{complete:e.length,total:e.length,ready:n}}let t=this.options.numberOfPlacesToSelect,i=e.filter(n=>this.selectionsByEvent.get(n.eventKey)?.length===t&&this.validByEvent.get(n.eventKey)!==!1).length;return{complete:i,total:e.length,ready:i===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(i=>i.eventKey)),this.syncIncludedDates(),this.picker?.refreshAvailability().catch(i=>this.options.onError?.(i)).finally(()=>{this.resettingFlexibleSelection=!1}));return}if(this.refreshingComposition||this.switchingPerformance||!this.activePerformanceKey)return;let t=e.map(i=>({...i}));this.selectionsByEvent.set(this.activePerformanceKey,t),this.api.setPerformanceSelections(this.activePerformanceKey,t.map(i=>({label:i.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,i=(this.selectionsByEvent.get(e)??[]).map(r=>r.label),n=this.copy("picker.group.chosenOfTotal",{chosen:i.length,total:t});return i.length===0?{key:"not-started",label:this.copy("picker.group.stillNeedsSeat"),badge:n}:i.length===t&&this.validByEvent.get(e)!==!1?{key:"complete",label:this.copy("picker.group.completeWithSeats",{seats:i.join(", ")}),badge:n}:i.length===t?{key:"needs-attention",label:this.copy("picker.group.needsAttention"),badge:n}:{key:"in-progress",label:this.copy("picker.group.needsMoreSeats",{count:t-i.length}),badge:n}}updateTabs(){let e=this.tabButtons(),t=this.switchingPerformance||this.operationPending||this.recovery.kind!=="idle"||!!this.activeHandoff;e.forEach(n=>{let r=n.dataset.eventKey,o=this.tabState(r),a=r===this.activePerformanceKey;n.dataset.state=o.key,n.disabled=t,n.setAttribute("aria-selected",String(a)),n.tabIndex=a?0:-1;let l=n.querySelector(".sl-pg-tab-state");l&&(l.textContent=o.label);let c=n.querySelector(".sl-pg-tab-badge");c&&(c.textContent=o.badge);let p=n.querySelector(".sl-pg-tab-name")?.textContent??r;n.setAttribute("aria-label",`${p}: ${o.badge} \xB7 ${o.label}`),a&&this.innerHost?.setAttribute("aria-labelledby",n.id)});let i=e.findIndex(n=>n.dataset.eventKey===this.activePerformanceKey);this.prevButton&&(this.prevButton.disabled=t||i<=0),this.nextButton&&(this.nextButton.disabled=t||i<0||i>=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(i=>i.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 i=this.picker.selectObjects(t);this.switchingPerformance=!1,this.selectionChanged(i),i.length!==t.length&&this.validByEvent.set(e,!1),this.options.onSelectionChange?.(i);let n=this.descriptorValue?.performances.find(r=>r.eventKey===e);n&&this.announce(this.copy("picker.group.performanceOpened",{performance:n.name}))}catch(i){this.options.onError?.(i)}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,i={}){this.statusHost&&this.statusCopy&&this.statusAction&&(this.statusCopy.textContent=t,this.statusHost.hidden=!t,this.statusAction.hidden=!i.retry),this.announce(t),this.options.onStatusChange?.({kind:e,message:t,...i.reference?{reference:i.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 i=this.descriptorValue,n=this.api.operationIdForHold(e.holdId);if(!i||!n)throw new Error("seatlayer: Performance Group hold identity is unavailable");let r=this.api.allocationsForHold(e.holdId);return{operationId:n,holdId:e.holdId,expiresAt:e.expiresAt,performanceGroup:i,selectionMode:this.mode,performanceKeys:r.map(o=>o.eventKey),bookingState:this.booked?"booked":"held",seatLabels:t.map(o=>o.label),...this.mode==="per_performance"?{allocations:r.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 i=this.descriptorValue?.performances.find(o=>o.eventKey===t.eventKey),n=document.createElement("p"),r=document.createElement("strong");r.textContent=i?.name??t.eventKey,n.append(r,document.createTextNode(t.items.map(o=>o.label).join(", "))),this.heldSummary.appendChild(n)}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 i=this.handoff(e,t),n=this.activeHandoff?.holdId!==i.holdId;this.activeHandoff=i,this.renderHeldAllocations(this.api.allocationsForHold(e.holdId)),this.updateTabs(),this.api.watchSettlement(e.holdId),this.syncProgress(),this.syncPane(),this.syncHoldTicker(),n&&this.options.onHold?.(i),this.options.onHoldChange?.(i)}checkout(e,t){let i=this.handoff(e,t);this.continued=!0,this.activeHandoff=i,this.options.onCheckout?.(i)}};var co="seatlayer-season-picker-style";function po(){if(document.getElementById(co))return;let s=document.createElement("style");s.id=co,s.textContent=`
2317
2707
  .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)}
2318
2708
  .sl-season-root *{box-sizing:border-box}.sl-season-root button,.sl-season-root summary{font:inherit}
2319
2709
  .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}
@@ -2327,4 +2717,4 @@ import{a as ws,b as ks,c as Ss,e as Dt,f as qe,g as Bt,h as ut}from"./chunk-KESI
2327
2717
  .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}
2328
2718
  @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}}
2329
2719
  @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}}
2330
- `,document.head.appendChild(s)}var pc="https://api.seatlayer.io",hc=6e4,uc=5e3,V=class extends Error{constructor(t,i){super(`season_request_failed:${t}`);this.code=t;this.status=i;this.name="SeasonApiError"}},bi=class extends Error{constructor(t){super(`season_operation_timeout:${t}`);this.operationId=t;this.name="SeasonRecoveryTimeoutError"}};function mc(s,e){let t=Number(s.headers.get("Retry-After")),i=Number.isFinite(t)&&t>=0?t:e.retryAfterSeconds;return Math.max(0,Math.min(uc,i*1e3))}function fc(s,e){return e?.aborted?Promise.reject(e.reason??new DOMException("Aborted","AbortError")):new Promise((t,i)=>{let r=setTimeout(t,s);e?.addEventListener("abort",()=>{clearTimeout(r),i(e.reason??new DOMException("Aborted","AbortError"))},{once:!0})})}function gc(s){if(!s||typeof s!="object")return"unknown";let e=s;return typeof e.code=="string"?e.code:typeof e.error=="string"?e.error:"unknown"}var bc=/^shc_[a-f0-9]{40}$/,vc=/^shh_[a-f0-9]{40}$/,yc=new Set(["preparing","commit_pending","committed","expire_pending","booking_pending","abort_pending","aborted","partial_terminal","expired","booked"]),xc=new Set(["pending","prepared","refused","applied","expired","booked","aborted"]);function ps(s){return Array.isArray(s)?s.some(ps):!s||typeof s!="object"?!1:Object.entries(s).some(([e,t])=>e==="childHoldId"||e==="child_hold_id"||e==="holdId"&&typeof t=="string"&&bc.test(t)||ps(t))}function Ht(s,e,t="invalid_operation_response"){if(!s||typeof s!="object"||Array.isArray(s))throw new V(t,502);if(ps(s))throw new V("unsafe_operation_response",502);let i=s,r=i.allocations,n=new Set,o=Array.isArray(r)&&r.length>0&&r.every(d=>{if(!d||typeof d!="object")return!1;let m=d.eventId,u=d.state;return typeof m!="string"||!m||typeof u!="string"||!xc.has(u)||n.has(m)?!1:(n.add(m),!0)}),a=i.bookingRef===null||typeof i.bookingRef=="string"&&i.bookingRef.length>0,l=i.state!=="booked"||typeof i.bookingRef=="string"&&o&&r.every(d=>d.state==="booked"),c=i.state!=="booking_pending"||typeof i.bookingRef=="string"&&o&&r.some(d=>d.state!=="booked"),p=i.state!=="committed"||i.bookingRef===null;if(i.operationId!==e.operationId||i.seasonId!==e.seasonId||i.kind!=="HOLD"||typeof i.holdId!="string"||!vc.test(i.holdId)||i.policy!=="fixed_inclusion_same_seat"||typeof i.state!="string"||!yc.has(i.state)||typeof i.expiresAt!="number"||!Number.isFinite(i.expiresAt)||i.expiresAt<0||!a||typeof i.location!="string"||!i.location||typeof i.retryAfterSeconds!="number"||!Number.isFinite(i.retryAfterSeconds)||i.retryAfterSeconds<0||!o||!l||!c||!p||i.pricingAuthority!==void 0&&i.pricingAuthority!=="host"||i.authoritativeAmountIncluded!==void 0&&i.authoritativeAmountIncluded!==!1)throw new V(t,502);return{operationId:i.operationId,seasonId:i.seasonId,kind:i.kind,holdId:i.holdId,expiresAt:i.expiresAt,policy:i.policy,pricingAuthority:"host",authoritativeAmountIncluded:!1,state:i.state,bookingRef:i.bookingRef,location:i.location,retryAfterSeconds:i.retryAfterSeconds,allocations:r.map(d=>({eventId:d.eventId,state:d.state}))}}function wc(s,e,t){if(!Array.isArray(s)||s.length!==t||s.some(o=>typeof o!="string"||!o)||new Set(s).size!==s.length||!Array.isArray(e)||e.length!==s.length)throw new V("invalid_best_available_response",502);let i=s,r=new Set(i),n=new Map;for(let o of e){if(!o||typeof o!="object")throw new V("invalid_best_available_response",502);let a=o;if(typeof a.label!="string"||!r.has(a.label)||n.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 V("invalid_best_available_response",502);n.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:i,items:i.map(o=>n.get(o))}}function po(s,e){return{seasonKey:s.key,planActivationId:s.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:i})=>({eventKey:t,state:i}))}}var oe,ot,de,at,It,pe,he,ee,ce,ho,vi=class{constructor(e,t){I(this,ee);I(this,oe);I(this,ot);I(this,de);I(this,at);I(this,It);I(this,pe,!1);I(this,he,null);T(this,oe,e),T(this,ot,(t.apiBase??pc).replace(/\/$/,"")),T(this,de,t.access),T(this,at,t.fetch??globalThis.fetch.bind(globalThis)),T(this,It,t.recoveryTimeoutMs??hc),f(this,de).onRenewed(i=>C(this,ee,ho).call(this,i))}async descriptor(){let{body:e}=await C(this,ee,ce).call(this,"GET","");return e.season}async chart(){let{body:e}=await C(this,ee,ce).call(this,"GET","/chart");return e}async availability(){let{body:e}=await C(this,ee,ce).call(this,"GET","/availability"),t=Object.values(e.seats??{});return{...e,freeCount:t.filter(i=>i==="free").length,blockedCount:t.filter(i=>i!=="free").length}}async hold(e,t){let{body:i,response:r}=await C(this,ee,ce).call(this,"POST","/holds",{operationId:t,labels:[...e]});return{operation:Ht(i.operation,{seasonId:f(this,oe),operationId:t}),response:r}}async bestAvailable(e){let{body:t,response:i}=await C(this,ee,ce).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=Ht(t.operation,{seasonId:f(this,oe),operationId:e.operationId},"invalid_best_available_response"),{labels:n,items:o}=wc(t.labels,t.items,e.qty);return{operation:r,labels:n,items:o,response:i}}async operation(e){let{body:t,response:i}=await C(this,ee,ce).call(this,"GET",`/operations/${encodeURIComponent(e)}`);return{operation:Ht(t.operation,{seasonId:f(this,oe),operationId:e}),response:i}}async release(e,t){let{body:i,response:r}=await C(this,ee,ce).call(this,"POST",`/holds/${encodeURIComponent(e)}/release`,{releaseActionId:t});return{operation:Ht(i.operation,{seasonId:f(this,oe),operationId:e}),response:r}}async renewalIntent(e){let{body:t}=await C(this,ee,ce).call(this,"POST","/renewal-intents",{offerId:e}),i=t.intent;if(!i||i.offerId!==e||i.state!=="intent_received"||!i.intentId||!Number.isFinite(i.receivedAt))throw new V("invalid_renewal_intent_response",502);return i}async waitForTerminal(e,t,i){let r=Date.now(),n=t?{operation:Ht(t.operation,{seasonId:f(this,oe),operationId:e}),response:t.response}:await this.operation(e);for(;n.operation.state==="preparing"||n.operation.state==="commit_pending"||n.operation.state==="expire_pending"||n.operation.state==="booking_pending"||n.operation.state==="abort_pending";){if(Date.now()-r>=f(this,It))throw new bi(e);await fc(mc(n.response,n.operation),i),n=await this.operation(e)}return n.operation}destroy(){f(this,pe)||(T(this,pe,!0),f(this,de).onRenewed(void 0),f(this,de).clear())}};oe=new WeakMap,ot=new WeakMap,de=new WeakMap,at=new WeakMap,It=new WeakMap,pe=new WeakMap,he=new WeakMap,ee=new WeakSet,ce=async function(e,t,i,r=!0){if(f(this,pe))throw new V("season_api_destroyed",409);if(f(this,he))throw f(this,he);let n=await f(this,de).authorization();if(f(this,pe))throw new V("season_api_destroyed",409);if(f(this,he))throw f(this,he);if(!n)throw new se({reason:"no_token",retryable:!1});let o=await f(this,at).call(this,`${f(this,ot)}/pub/seasons/${encodeURIComponent(f(this,oe))}${t}`,{method:e,headers:{Authorization:n,...i===void 0?{}:{"Content-Type":"application/json"}},body:i===void 0?void 0:JSON.stringify(i)}),a=await o.json().catch(()=>null);if(!o.ok){let l=gc(a);if(r&&await f(this,de).handleFailure(o.status,l))return C(this,ee,ce).call(this,e,t,i,!1);let c=f(this,de).unavailable;throw c?new se(c):new V(l,o.status)}if(a===null)throw new V("invalid_json_response",502);return{body:a,response:o}},ho=async function(e){if(f(this,pe))return;let t=`/pub/seasons/${encodeURIComponent(f(this,oe))}/session/adopt`;for(let i=0;i<2;i++){if(f(this,pe))return;try{if((await f(this,at).call(this,`${f(this,ot)}${t}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.token}`},body:JSON.stringify({previousToken:e.previousToken}),credentials:"omit"})).ok){T(this,he,null);return}}catch{}}if(!f(this,pe))throw T(this,he,new V("season_session_adopt_failed",409)),f(this,he)};var kc=2500;function Sc(s){let e=typeof s=="string"?document.querySelector(s):s;if(!e)throw new Error("seatlayer: Season picker container was not found");return e}function Tc(s,e,t){if(s.startsAt==null)return{date:"Date to be announced",time:null};try{let i=new Date(s.startsAt),r=e?{timeZone:e}:{};return{date:new Intl.DateTimeFormat(t,{dateStyle:"medium",...r}).format(i),time:new Intl.DateTimeFormat(t,{timeStyle:"short",...r}).format(i)}}catch{return{date:"Date to be announced",time:null}}}function uo(s){return s.state==="committed"||s.state==="booked"}var hs=class{constructor(e,t,i){this.transport=e;this.sink=t;this.intervalMs=i;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(([i,r])=>this.prior[i]!==r).map(([i,r])=>({label:i,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))}}},us=class{constructor(e,t){this.api=e;this.realtimePollMs=t;this.descriptorValue=null;this.availabilityValue=null;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 V("season_best_available_in_progress",409);let i={operationId:e,...t.accessibility?.length?{accessibility:[...t.accessibility]}:{},...t.requireContiguous===!0?{requireContiguous:!0}:{}};return this.nextBestAvailable=i,i}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,i]=await Promise.all([this.descriptorValue?Promise.resolve(this.descriptorValue):this.api.descriptor(),this.api.chart()]);return this.descriptorValue=t,{doc:i,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,i,r){if(r)throw new V("season_hold_replace_unsupported",409);let n=this.nextOperationId??`sop_${crypto.randomUUID()}`;this.nextOperationId=null;let o=await this.api.hold(t.map(l=>l.label),n),a=await this.api.waitForTerminal(n,o);if(!uo(a))throw new V(`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,i){let r=this.operationForHold(i);if(!r)throw new V("season_hold_not_found",404);let n=this.nextReleaseActionId??`sra_${crypto.randomUUID()}`;this.nextReleaseActionId=null;let o=await this.api.release(r.operationId,n),a=await this.api.waitForTerminal(r.operationId,o);if(a.state==="partial_terminal")throw this.remember(a),new V("season_operation_partial_terminal",409);this.forget(i)}async bestAvailable(e,t,i,r){let n=this.nextBestAvailable;this.nextBestAvailable=null;let o=n?.operationId??`sop_${crypto.randomUUID()}`,a=await this.api.bestAvailable({operationId:o,qty:t,...i?{categoryKey:i}:{},...r?{zoneId:r}:{},...n?.accessibility?.length?{accessibility:n.accessibility}:{},...n?.requireContiguous===!0?{requireContiguous:!0}:{}}),l=await this.api.waitForTerminal(o,a);if(!uo(l))throw new V(`season_operation_${l.state}`,409);this.remember(l);let c=new Map(a.items.map(p=>[p.label,p]));return{holdId:l.holdId,expiresAt:l.expiresAt,labels:[...a.labels],items:a.labels.map(p=>{let d=c.get(p);return{label:p,objectId:d?.objectId??p,objectType:"seat",categoryKey:d?.categoryKey??i??"",tierId:d?.tierId??null,unitPrice:0,currency:this.descriptorValue?.currency??"USD",...d?.quantity==null?{}:{quantity:d.quantity}}})}}socketUrl(){return""}createRealtime(e,t){return new hs(this,t,this.realtimePollMs)}},O,je,Rt,ue,Y,Ot,ie,ke,z,J,Se,pt,Ie,Te,Ge,Ce,Re,ht,P,mo,fo,go,fs,yi,lt,ct,K,Fe,gs,dt,ms=class{constructor(e){I(this,P);I(this,O);I(this,je);I(this,Rt);I(this,ue);I(this,Y);I(this,Ot,new AbortController);I(this,ie,null);I(this,ke,null);I(this,z,null);I(this,J,null);I(this,Se,null);I(this,pt,null);I(this,Ie,null);I(this,Te,null);I(this,Ge,null);I(this,Ce,[]);I(this,Re,!1);I(this,ht,!1);if(!e?.season)throw new Error("seatlayer: `season` key is required");if(!e.container)throw new Error("seatlayer: `container` is required");if(!e.buyerAccessToken&&!e.buyerAccessTokenProvider)throw new Error("seatlayer: Season buyer access 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,je,Sc(e.container)),T(this,Rt,new ae({token:e.buyerAccessToken,provider:e.buyerAccessTokenProvider,onExpired:e.onAccessExpired,onUnavailable:e.onAccessUnavailable})),T(this,ue,new vi(e.season,{apiBase:e.apiBase,access:f(this,Rt),fetch:e.fetch,recoveryTimeoutMs:e.recoveryTimeoutMs})),T(this,Y,new us(f(this,ue),Math.max(750,e.realtimePollMs??kc)))}async render(){C(this,P,gs).call(this),co(),C(this,P,fo).call(this),C(this,P,K).call(this,{kind:"loading",message:"Loading Season seats available for every performance."},!0);try{let[e,t]=await Promise.all([f(this,ue).descriptor(),f(this,ue).availability()]);return f(this,Re)?this:(T(this,ie,e),T(this,ke,t),f(this,Y).prime(e,t),C(this,P,go).call(this),await C(this,P,mo).call(this,e),C(this,P,K).call(this,{kind:"ready",message:`${t.freeCount} seat${t.freeCount===1?"":"s"} available for every included performance.`}),f(this,O).initialOperationId&&await this.restoreOperation(f(this,O).initialOperationId),this)}catch(e){if(f(this,Re))return this;throw C(this,P,Fe).call(this,e),e}}async holdSameSeat(e,t){if(C(this,P,dt).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(f(this,Y).queueOperation(t),f(this,J).selectObjectsWithoutConfirmation([...e]),C(this,P,K).call(this,{kind:"pending",message:"Holding the same seats for every performance.",operationId:t},!0),await f(this,J).handleCta(),!f(this,z))throw new V("season_hold_not_created",409);return f(this,z)}async holdBestAvailable(e,t,i={}){if(C(this,P,dt).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=f(this,J).maxTickets;if(e>r)throw new Error(`seatlayer: Best Available quantity cannot exceed the configured maximum (${r})`);if(f(this,ht))throw new V("season_best_available_in_progress",409);T(this,ht,!0);let n=null;try{if(n=f(this,Y).queueBestAvailable(t,i),C(this,P,K).call(this,{kind:"pending",message:`Finding ${e} Season seat${e===1?"":"s"} available for every performance.`,operationId:t},!0),!await f(this,J).bestAvailableOrThrow(e,i.categoryKey,{zoneId:i.zoneId})||!f(this,z))throw new V("season_hold_not_created",409);return f(this,z)}catch(o){throw C(this,P,Fe).call(this,o,t),o}finally{n&&f(this,Y).clearBestAvailable(n),T(this,ht,!1)}}async restoreOperation(e){C(this,P,dt).call(this),C(this,P,K).call(this,{kind:"pending",message:"Restoring your Season selection.",operationId:e},!0);try{let t=await f(this,ue).waitForTerminal(e,void 0,f(this,Ot).signal);return t.state==="aborted"||t.state==="expired"?(T(this,z,null),f(this,O).onHoldChange?.(null),C(this,P,K).call(this,{kind:"released",message:"The previous Season selection is no longer held.",operationId:e}),null):(f(this,Y).remember(t),C(this,P,fs).call(this,t,!1))}catch(t){throw C(this,P,Fe).call(this,t,e),t}}async release(e){C(this,P,dt).call(this);let t=f(this,z);if(t){if(!e)throw new Error("seatlayer: caller-stable release action id is required");f(this,Y).queueRelease(e),C(this,P,K).call(this,{kind:"pending",message:"Releasing the Season seats.",operationId:t.operationId},!0);try{f(this,J)?.getCurrentHold()?.holdId===t.holdId?await f(this,J).release():(await f(this,Y).release("",[],t.holdId),C(this,P,yi).call(this)),C(this,P,K).call(this,{kind:"released",message:"The Season seats were released.",operationId:t.operationId})}catch(i){throw C(this,P,Fe).call(this,i,t.operationId),i}}}async createRenewalIntent(e){if(C(this,P,dt).call(this),!e.startsWith("sro_"))throw new Error("seatlayer: Season renewal offer id is required");C(this,P,K).call(this,{kind:"pending",message:"Recording renewal intent. No purchase is made in the browser."},!0);try{let t=await f(this,ue).renewalIntent(e);return C(this,P,K).call(this,{kind:"renewal_intent",message:"Renewal intent recorded. Your ticketing platform will confirm price, payment, and renewal."}),f(this,O).onRenewalIntent?.(t),t}catch(t){throw C(this,P,Fe).call(this,t),t}}getDescriptor(){return f(this,ie)}getAvailability(){return f(this,ke)}getHandoff(){return f(this,z)}destroy(){f(this,Re)||(T(this,Re,!0),f(this,Ot).abort(),f(this,J)?.destroy(),f(this,ue).destroy(),f(this,je).replaceChildren(),T(this,Se,null),T(this,pt,null),T(this,Ie,null),T(this,Te,null),T(this,Ge,null),T(this,ie,null),T(this,ke,null),T(this,z,null))}};O=new WeakMap,je=new WeakMap,Rt=new WeakMap,ue=new WeakMap,Y=new WeakMap,Ot=new WeakMap,ie=new WeakMap,ke=new WeakMap,z=new WeakMap,J=new WeakMap,Se=new WeakMap,pt=new WeakMap,Ie=new WeakMap,Te=new WeakMap,Ge=new WeakMap,Ce=new WeakMap,Re=new WeakMap,ht=new WeakMap,P=new WeakSet,mo=async function(e){let t=new ze(pi({container:f(this,pt),event:e.key,apiBase:f(this,O).apiBase,transport:f(this,Y),hideEventDetails:!0,maxSelection:f(this,O).maxSelection,selectedObjects:f(this,O).selectedObjects,selectableObjects:f(this,O).selectableObjects,numberOfPlacesToSelect:f(this,O).numberOfPlacesToSelect,selectionValidators:f(this,O).selectionValidators,locale:f(this,O).locale,messages:f(this,O).messages,languages:f(this,O).languages,colorblindSafe:f(this,O).colorblindSafe,initialView:f(this,O).initialView,enable3D:f(this,O).enable3D,max3DSeats:f(this,O).max3DSeats,hideBadge:f(this,O).hideBadge,theme:f(this,O).theme,confirmSelection:f(this,O).confirmSelection,seatView:f(this,O).seatView,onBuyerViewChange:f(this,O).onBuyerViewChange,onAnalytics:(i,r)=>{try{f(this,O).onAnalytics?.(i,{...r,metricScope:"season",seasonKey:e.key,planActivationId:e.planActivationId,performanceCount:e.occurrenceCount})}catch{}},onSelectionChange:i=>{T(this,Ce,i.map(r=>r.label)),C(this,P,lt).call(this),f(this,O).onSelectionChange?.(i)},onSelectionValidityChange:f(this,O).onSelectionValidityChange,onHoldChange:i=>{if(!i){C(this,P,yi).call(this);return}let r=f(this,Y).operationForHold(i.holdId);r&&C(this,P,fs).call(this,r,!0)},onCheckout:()=>{f(this,z)&&(C(this,P,ct).call(this,"checkout"),f(this,O).onContinue?.(f(this,z)))},onHoldExpired:()=>{C(this,P,yi).call(this),C(this,P,K).call(this,{kind:"released",message:"The Season hold expired. Choose seats again."}),f(this,O).onHoldExpired?.()},onError:i=>C(this,P,Fe).call(this,i)},{surface:"season",performanceCount:e.occurrenceCount,selectionMode:"same_seat",suppressPricing:!0,groupSelectionSummary:()=>{let i=f(this,Ce).length;return i?{seats:i,performances:e.occurrenceCount,performancesChosen:e.occurrenceCount,perPerformance:i}:null}}));T(this,J,t),await t.render()},fo=function(){f(this,je).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 i=document.createElement("ol");i.className="sl-season-progress",i.setAttribute("aria-label","Season checkout progress");for(let[h,y]of["Choose seats","Review package","Checkout"].entries()){let x=document.createElement("li");x.dataset.state=h===0?"current":"upcoming";let S=document.createElement("span");S.textContent=String(h+1),x.append(S,y),i.append(x)}let r=document.createElement("div");r.className="sl-season-stage";let n=document.createElement("div");n.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 p=document.createElement("i");p.textContent="1\xD7";let d=document.createElement("span");d.textContent="Each seat you choose is reserved for every included performance.",c.append(p,d);let m=document.createElement("p");m.className="sl-season-availability";let u=document.createElement("p");u.className="sl-season-checkout-note",u.textContent="Your ticketing platform confirms package price, payment, admission passes, and member benefits.",o.append(a,l,c,m,u),r.append(n,o);let b=document.createElement("p");b.className="sl-season-status",b.setAttribute("role","status"),b.setAttribute("aria-live","polite"),e.append(t,i,r,b),f(this,je).append(e),T(this,Se,e),T(this,pt,n),T(this,Ie,b),T(this,Te,l),T(this,Ge,m)},go=function(){let e=f(this,ie),t=f(this,O).offer,i=f(this,Se).querySelector(".sl-season-hero");i.replaceChildren();let r=document.createElement("div");r.className="sl-season-copy";let n=document.createElement("p");n.className="sl-season-eyebrow",n.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 y=document.createElement("span");y.className="sl-season-fact",y.textContent=h,l.append(y)}r.append(n,o,a,l),i.append(r);let c=document.createElement("div");c.className="sl-season-offer";let p=document.createElement("span");p.className="sl-season-offer-label",p.textContent=t?.priceLabel?"Season package":"Package price";let d=document.createElement(t?.priceLabel?"strong":"span");if(d.className=t?.priceLabel?"sl-season-price":"sl-season-price-note",d.textContent=t?.priceLabel??"Confirmed by your ticketing platform at checkout",c.append(p,d),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)}if(i.append(c),t?.benefits?.length){let h=document.createElement("ul");h.className="sl-season-benefits";for(let y of t.benefits.slice(0,6)){let x=document.createElement("li");x.textContent=y,h.append(x)}i.append(h)}let m=document.createElement("details");m.className="sl-season-dates";let u=document.createElement("summary");u.textContent=`All ${e.occurrenceCount} performances included`;let b=document.createElement("ol");b.className="sl-season-date-list";for(let h of e.occurrences){let y=document.createElement("li");y.className="sl-season-date";let x=document.createElement("b");x.textContent=h.name;let S=Tc(h,e.timezone,f(this,O).locale),A=document.createElement("time");h.startsAt!=null&&(A.dateTime=new Date(h.startsAt).toISOString()),A.textContent=S.time?`${S.date} \xB7 ${S.time}`:S.date,y.append(x,A),b.append(y)}m.append(u,b),i.append(m),C(this,P,lt).call(this)},fs=function(e,t){if(e.state==="booked")return T(this,z,null),f(this,Y).forget(e.holdId),f(this,J)?.notifyGroupSettled("booked"),C(this,P,ct).call(this,"complete"),C(this,P,K).call(this,{kind:"booked",message:`Your Season booking is complete for all ${f(this,ie).occurrenceCount} performances. No further checkout action is needed.`,operationId:e.operationId}),f(this,O).onHoldChange?.(null),null;if(e.state==="partial_terminal")return T(this,z,null),T(this,Ce,[]),f(this,Y).forget(e.holdId),f(this,J)?.notifyGroupSettled("lost"),C(this,P,lt).call(this),C(this,P,ct).call(this,"review"),C(this,P,K).call(this,{kind:"partial_terminal",message:"This Season selection needs organizer review. Do not try another selection.",operationId:e.operationId}),f(this,O).onHoldChange?.(null),null;if(e.state!=="committed")return T(this,z,null),f(this,Y).forget(e.holdId),f(this,J)?.notifyGroupSettled("lost"),C(this,P,K).call(this,{kind:"failed",message:"The Season selection could not be completed.",operationId:e.operationId}),f(this,O).onHoldChange?.(null),null;let i=po(f(this,ie),e),r=f(this,z)?.holdId!==i.holdId;return T(this,z,i),C(this,P,lt).call(this),C(this,P,ct).call(this,"review"),f(this,O).onHoldChange?.(i),C(this,P,K).call(this,{kind:"held",message:`Your seats are held for all ${f(this,ie).occurrenceCount} performances. Review and continue to checkout.`,operationId:e.operationId}),r&&t&&f(this,O).onHold?.(i),i},yi=function(){T(this,z,null),T(this,Ce,[]),C(this,P,lt).call(this),C(this,P,ct).call(this,"choose"),f(this,O).onHoldChange?.(null)},lt=function(){if(!f(this,Te))return;let e=f(this,Ce).length;if(!e)f(this,Te).textContent="Choose a seat on the map. Unavailable seats are already booked on at least one included performance.";else{f(this,Te).replaceChildren();let t=document.createElement("strong");t.textContent=f(this,Ce).join(", "),f(this,Te).append(t,` \xB7 ${e} Season seat${e===1?"":"s"} across all ${f(this,ie)?.occurrenceCount??0} performances`)}f(this,Ge)&&f(this,ke)&&(f(this,Ge).textContent=`${f(this,ke).freeCount} seat${f(this,ke).freeCount===1?"":"s"} currently available for the complete Season`)},ct=function(e){let t=e==="choose"?0:e==="review"?1:e==="checkout"?2:3;f(this,Se)?.querySelectorAll(".sl-season-progress li").forEach((i,r)=>{i.dataset.state=r<t?"done":r===t?"current":"upcoming";let n=i.querySelector("span");n&&(n.textContent=r<t?"\u2713":String(r+1))})},K=function(e,t=!1){f(this,Ie)&&(f(this,Ie).textContent=e.message,f(this,Ie).dataset.kind=e.kind),f(this,Se)&&(f(this,Se).dataset.busy=String(t)),f(this,O).onStatusChange?.(e)},Fe=function(e,t){let i=e instanceof V?`Season selection unavailable (${e.code}).`:"Season selection could not be completed.";C(this,P,K).call(this,{kind:"failed",message:i,operationId:t}),f(this,O).onError?.(e)},gs=function(){if(f(this,Re))throw new Error("seatlayer: SeasonPicker was destroyed")},dt=function(){if(C(this,P,gs).call(this),!f(this,ie)||!f(this,J))throw new Error("seatlayer: render SeasonPicker before using it")};function Cc(s,e={}){let t=e.origin??"";if(!t)try{t=new URL(s.src,window.location.href).origin}catch{t=""}let i=!1,r=null,n=null,o=null,a="",l=null,c=()=>{if(i)return;i=!0,r=s.getAttribute("style"),Object.assign(s.style,{position:"fixed",inset:"0",width:"100vw",height:"100vh",margin:"0",border:"0",zIndex:"2147483000",background:"#101625"});let m=document.documentElement;n=m.style.overflow,m.style.overflow="hidden",document.body&&(o=document.body.style.overflow,document.body.style.overflow="hidden"),l=u=>{u.key==="Escape"&&p()},window.addEventListener("keydown",l)},p=()=>{i&&(i=!1,r===null?s.removeAttribute("style"):s.setAttribute("style",r),r=null,a&&(s.style.height=a),n!==null&&(document.documentElement.style.overflow=n,n=null),o!==null&&document.body&&(document.body.style.overflow=o,o=null),l&&(window.removeEventListener("keydown",l),l=null))},d=m=>{if(m.source!==s.contentWindow||t&&m.origin!==t||!m.data||typeof m.data!="object")return;let u=m.data;if(u.type==="seatlayer:height"){typeof u.px=="number"&&Number.isFinite(u.px)&&u.px>0&&(a=`${Math.round(u.px)}px`,i||(s.style.height=a));return}u.type==="seatlayer:fullscreen"&&(u.on===!0?c():u.on===!1&&p())};return window.addEventListener("message",d),()=>{window.removeEventListener("message",d),p()}}export{B as ApiError,ae as BuyerAccessContext,se as BuyerAccessUnavailableError,ge as BuyerRealtimeClient,Bi as EmbeddedDesigner,j as PerformanceGroupDestroyedError,ds as PerformanceGroupPicker,dr as SEATING_CHART_CALLBACK_PROPS,ar as SEATING_CHART_HANDLE_METHODS,lr as SEATING_CHART_IDENTITY_PROPS,cr as SEATING_CHART_VALUE_PROPS,V as SeasonApiError,ms as SeasonPicker,bi as SeasonRecoveryTimeoutError,ze as SeatPicker,_i as SeatingChart,Cc as attachPickerFrame,ga as bindSeatingChartHandle,ba as buildSeatingChartOptions,yt as createBuyerAccessContext,mt as createControllerSink,Vi as parseTicketOfferAvailability,Lt as shortOperationReference,Ni as ticketOfferPrices};
2720
+ `,document.head.appendChild(s)}var Sc="https://api.seatlayer.io",Tc=6e4,Cc=5e3,z=class extends Error{constructor(t,i){super(`season_request_failed:${t}`);this.code=t;this.status=i;this.name="SeasonApiError"}},xi=class extends Error{constructor(t){super(`season_operation_timeout:${t}`);this.operationId=t;this.name="SeasonRecoveryTimeoutError"}};function Ec(s,e){let t=Number(s.headers.get("Retry-After")),i=Number.isFinite(t)&&t>=0?t:e.retryAfterSeconds;return Math.max(0,Math.min(Cc,i*1e3))}function Ac(s,e){return e?.aborted?Promise.reject(e.reason??new DOMException("Aborted","AbortError")):new Promise((t,i)=>{let n=setTimeout(t,s);e?.addEventListener("abort",()=>{clearTimeout(n),i(e.reason??new DOMException("Aborted","AbortError"))},{once:!0})})}function Pc(s){if(!s||typeof s!="object")return"unknown";let e=s;return typeof e.code=="string"?e.code:typeof e.error=="string"?e.error:"unknown"}var Lc=/^shc_[a-f0-9]{40}$/,Mc=/^shh_[a-f0-9]{40}$/,Hc=new Set(["preparing","commit_pending","committed","expire_pending","booking_pending","abort_pending","aborted","partial_terminal","expired","booked"]),Ic=new Set(["pending","prepared","refused","applied","expired","booked","aborted"]);function gs(s){return Array.isArray(s)?s.some(gs):!s||typeof s!="object"?!1:Object.entries(s).some(([e,t])=>e==="childHoldId"||e==="child_hold_id"||e==="holdId"&&typeof t=="string"&&Lc.test(t)||gs(t))}function It(s,e,t="invalid_operation_response"){if(!s||typeof s!="object"||Array.isArray(s))throw new z(t,502);if(gs(s))throw new z("unsafe_operation_response",502);let i=s,n=i.allocations,r=new Set,o=Array.isArray(n)&&n.length>0&&n.every(d=>{if(!d||typeof d!="object")return!1;let u=d.eventId,h=d.state;return typeof u!="string"||!u||typeof h!="string"||!Ic.has(h)||r.has(u)?!1:(r.add(u),!0)}),a=i.bookingRef===null||typeof i.bookingRef=="string"&&i.bookingRef.length>0,l=i.state!=="booked"||typeof i.bookingRef=="string"&&o&&n.every(d=>d.state==="booked"),c=i.state!=="booking_pending"||typeof i.bookingRef=="string"&&o&&n.some(d=>d.state!=="booked"),p=i.state!=="committed"||i.bookingRef===null;if(i.operationId!==e.operationId||i.seasonId!==e.seasonId||i.kind!=="HOLD"||typeof i.holdId!="string"||!Mc.test(i.holdId)||i.policy!=="fixed_inclusion_same_seat"||typeof i.state!="string"||!Hc.has(i.state)||typeof i.expiresAt!="number"||!Number.isFinite(i.expiresAt)||i.expiresAt<0||!a||typeof i.location!="string"||!i.location||typeof i.retryAfterSeconds!="number"||!Number.isFinite(i.retryAfterSeconds)||i.retryAfterSeconds<0||!o||!l||!c||!p||i.pricingAuthority!==void 0&&i.pricingAuthority!=="host"||i.authoritativeAmountIncluded!==void 0&&i.authoritativeAmountIncluded!==!1)throw new z(t,502);return{operationId:i.operationId,seasonId:i.seasonId,kind:i.kind,holdId:i.holdId,expiresAt:i.expiresAt,policy:i.policy,pricingAuthority:"host",authoritativeAmountIncluded:!1,state:i.state,bookingRef:i.bookingRef,location:i.location,retryAfterSeconds:i.retryAfterSeconds,allocations:n.map(d=>({eventId:d.eventId,state:d.state}))}}function Oc(s,e,t){if(!Array.isArray(s)||s.length!==t||s.some(o=>typeof o!="string"||!o)||new Set(s).size!==s.length||!Array.isArray(e)||e.length!==s.length)throw new z("invalid_best_available_response",502);let i=s,n=new Set(i),r=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"||!n.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:i,items:i.map(o=>r.get(o))}}function ho(s,e){return{seasonKey:s.key,planActivationId:s.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:i})=>({eventKey:t,state:i}))}}var de,at,me,lt,Ot,fe,ge,se,ue,uo,wi=class{constructor(e,t){R(this,se);R(this,de);R(this,at);R(this,me);R(this,lt);R(this,Ot);R(this,fe,!1);R(this,ge,null);C(this,de,e),C(this,at,(t.apiBase??Sc).replace(/\/$/,"")),C(this,me,t.access),C(this,lt,t.fetch??globalThis.fetch.bind(globalThis)),C(this,Ot,t.recoveryTimeoutMs??Tc),f(this,me).onRenewed(i=>E(this,se,uo).call(this,i))}async descriptor(){let{body:e}=await E(this,se,ue).call(this,"GET","");return e.season}async chart(){let{body:e}=await E(this,se,ue).call(this,"GET","/chart");return e}async availability(){let{body:e}=await E(this,se,ue).call(this,"GET","/availability"),t=Object.values(e.seats??{});return{...e,freeCount:t.filter(i=>i==="free").length,blockedCount:t.filter(i=>i!=="free").length}}async hold(e,t){let{body:i,response:n}=await E(this,se,ue).call(this,"POST","/holds",{operationId:t,labels:[...e]});return{operation:It(i.operation,{seasonId:f(this,de),operationId:t}),response:n}}async bestAvailable(e){let{body:t,response:i}=await E(this,se,ue).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}:{}}),n=It(t.operation,{seasonId:f(this,de),operationId:e.operationId},"invalid_best_available_response"),{labels:r,items:o}=Oc(t.labels,t.items,e.qty);return{operation:n,labels:r,items:o,response:i}}async operation(e){let{body:t,response:i}=await E(this,se,ue).call(this,"GET",`/operations/${encodeURIComponent(e)}`);return{operation:It(t.operation,{seasonId:f(this,de),operationId:e}),response:i}}async release(e,t){let{body:i,response:n}=await E(this,se,ue).call(this,"POST",`/holds/${encodeURIComponent(e)}/release`,{releaseActionId:t});return{operation:It(i.operation,{seasonId:f(this,de),operationId:e}),response:n}}async renewalIntent(e){let{body:t}=await E(this,se,ue).call(this,"POST","/renewal-intents",{offerId:e}),i=t.intent;if(!i||i.offerId!==e||i.state!=="intent_received"||!i.intentId||!Number.isFinite(i.receivedAt))throw new z("invalid_renewal_intent_response",502);return i}async waitForTerminal(e,t,i){let n=Date.now(),r=t?{operation:It(t.operation,{seasonId:f(this,de),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()-n>=f(this,Ot))throw new xi(e);await Ac(Ec(r.response,r.operation),i),r=await this.operation(e)}return r.operation}destroy(){f(this,fe)||(C(this,fe,!0),f(this,me).onRenewed(void 0),f(this,me).clear())}};de=new WeakMap,at=new WeakMap,me=new WeakMap,lt=new WeakMap,Ot=new WeakMap,fe=new WeakMap,ge=new WeakMap,se=new WeakSet,ue=async function(e,t,i,n=!0){if(f(this,fe))throw new z("season_api_destroyed",409);if(f(this,ge))throw f(this,ge);let r=await f(this,me).authorization();if(f(this,fe))throw new z("season_api_destroyed",409);if(f(this,ge))throw f(this,ge);if(!r)throw new ae({reason:"no_token",retryable:!1});let o=await f(this,lt).call(this,`${f(this,at)}/pub/seasons/${encodeURIComponent(f(this,de))}${t}`,{method:e,headers:{Authorization:r,...i===void 0?{}:{"Content-Type":"application/json"}},body:i===void 0?void 0:JSON.stringify(i)}),a=await o.json().catch(()=>null);if(!o.ok){let l=Pc(a);if(n&&await f(this,me).handleFailure(o.status,l))return E(this,se,ue).call(this,e,t,i,!1);let c=f(this,me).unavailable;throw c?new ae(c):new z(l,o.status)}if(a===null)throw new z("invalid_json_response",502);return{body:a,response:o}},uo=async function(e){if(f(this,fe))return;let t=`/pub/seasons/${encodeURIComponent(f(this,de))}/session/adopt`;for(let i=0;i<2;i++){if(f(this,fe))return;try{if((await f(this,lt).call(this,`${f(this,at)}${t}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.token}`},body:JSON.stringify({previousToken:e.previousToken}),credentials:"omit"})).ok){C(this,ge,null);return}}catch{}}if(!f(this,fe))throw C(this,ge,new z("season_session_adopt_failed",409)),f(this,ge)};var Rc=2500;function _c(s){let e=typeof s=="string"?document.querySelector(s):s;if(!e)throw new Error("seatlayer: Season picker container was not found");return e}function Dc(s,e,t){if(s.startsAt==null)return{date:"Date to be announced",time:null};try{let i=new Date(s.startsAt),n=e?{timeZone:e}:{};return{date:new Intl.DateTimeFormat(t,{dateStyle:"medium",...n}).format(i),time:new Intl.DateTimeFormat(t,{timeStyle:"short",...n}).format(i)}}catch{return{date:"Date to be announced",time:null}}}function mo(s){return s.state==="committed"||s.state==="booked"}var bs=class{constructor(e,t,i){this.transport=e;this.sink=t;this.intervalMs=i;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(([i,n])=>this.prior[i]!==n).map(([i,n])=>({label:i,status:n}));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))}}},vs=class{constructor(e,t){this.api=e;this.realtimePollMs=t;this.descriptorValue=null;this.availabilityValue=null;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 i={operationId:e,...t.accessibility?.length?{accessibility:[...t.accessibility]}:{},...t.requireContiguous===!0?{requireContiguous:!0}:{}};return this.nextBestAvailable=i,i}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,i]=await Promise.all([this.descriptorValue?Promise.resolve(this.descriptorValue):this.api.descriptor(),this.api.chart()]);return this.descriptorValue=t,{doc:i,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,i,n){if(n)throw new z("season_hold_replace_unsupported",409);let r=this.nextOperationId??`sop_${crypto.randomUUID()}`;this.nextOperationId=null;let o=await this.api.hold(t.map(l=>l.label),r),a=await this.api.waitForTerminal(r,o);if(!mo(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,i){let n=this.operationForHold(i);if(!n)throw new z("season_hold_not_found",404);let r=this.nextReleaseActionId??`sra_${crypto.randomUUID()}`;this.nextReleaseActionId=null;let o=await this.api.release(n.operationId,r),a=await this.api.waitForTerminal(n.operationId,o);if(a.state==="partial_terminal")throw this.remember(a),new z("season_operation_partial_terminal",409);this.forget(i)}async bestAvailable(e,t,i,n){let r=this.nextBestAvailable;this.nextBestAvailable=null;let o=r?.operationId??`sop_${crypto.randomUUID()}`,a=await this.api.bestAvailable({operationId:o,qty:t,...i?{categoryKey:i}:{},...n?{zoneId:n}:{},...r?.accessibility?.length?{accessibility:r.accessibility}:{},...r?.requireContiguous===!0?{requireContiguous:!0}:{}}),l=await this.api.waitForTerminal(o,a);if(!mo(l))throw new z(`season_operation_${l.state}`,409);this.remember(l);let c=new Map(a.items.map(p=>[p.label,p]));return{holdId:l.holdId,expiresAt:l.expiresAt,labels:[...a.labels],items:a.labels.map(p=>{let d=c.get(p);return{label:p,objectId:d?.objectId??p,objectType:"seat",categoryKey:d?.categoryKey??i??"",tierId:d?.tierId??null,unitPrice:0,currency:this.descriptorValue?.currency??"USD",...d?.quantity==null?{}:{quantity:d.quantity}}})}}socketUrl(){return""}createRealtime(e,t){return new bs(this,t,this.realtimePollMs)}},D,Ge,Rt,be,X,_t,oe,Te,j,te,Ce,ht,Ie,Ee,qe,Ae,Oe,ut,P,fo,go,bo,xs,ki,ct,dt,W,je,ws,pt,ys=class{constructor(e){R(this,P);R(this,D);R(this,Ge);R(this,Rt);R(this,be);R(this,X);R(this,_t,new AbortController);R(this,oe,null);R(this,Te,null);R(this,j,null);R(this,te,null);R(this,Ce,null);R(this,ht,null);R(this,Ie,null);R(this,Ee,null);R(this,qe,null);R(this,Ae,[]);R(this,Oe,!1);R(this,ut,!1);if(!e?.season)throw new Error("seatlayer: `season` key is required");if(!e.container)throw new Error("seatlayer: `container` is required");if(!e.buyerAccessToken&&!e.buyerAccessTokenProvider)throw new Error("seatlayer: Season buyer access is required");if("event"in e||"performanceGroup"in e)throw new Error("seatlayer: SeasonPicker is not SeatPicker or PerformanceGroupPicker");C(this,D,e),C(this,Ge,_c(e.container)),C(this,Rt,new pe({token:e.buyerAccessToken,provider:e.buyerAccessTokenProvider,onExpired:e.onAccessExpired,onUnavailable:e.onAccessUnavailable})),C(this,be,new wi(e.season,{apiBase:e.apiBase,access:f(this,Rt),fetch:e.fetch,recoveryTimeoutMs:e.recoveryTimeoutMs})),C(this,X,new vs(f(this,be),Math.max(750,e.realtimePollMs??Rc)))}async render(){E(this,P,ws).call(this),po(),E(this,P,go).call(this),E(this,P,W).call(this,{kind:"loading",message:"Loading Season seats available for every performance."},!0);try{let[e,t]=await Promise.all([f(this,be).descriptor(),f(this,be).availability()]);return f(this,Oe)?this:(C(this,oe,e),C(this,Te,t),f(this,X).prime(e,t),E(this,P,bo).call(this),await E(this,P,fo).call(this,e),E(this,P,W).call(this,{kind:"ready",message:`${t.freeCount} seat${t.freeCount===1?"":"s"} available for every included performance.`}),f(this,D).initialOperationId&&await this.restoreOperation(f(this,D).initialOperationId),this)}catch(e){if(f(this,Oe))return this;throw E(this,P,je).call(this,e),e}}async holdSameSeat(e,t){if(E(this,P,pt).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(f(this,X).queueOperation(t),f(this,te).selectObjectsWithoutConfirmation([...e]),E(this,P,W).call(this,{kind:"pending",message:"Holding the same seats for every performance.",operationId:t},!0),await f(this,te).handleCta(),!f(this,j))throw new z("season_hold_not_created",409);return f(this,j)}async holdBestAvailable(e,t,i={}){if(E(this,P,pt).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 n=f(this,te).maxTickets;if(e>n)throw new Error(`seatlayer: Best Available quantity cannot exceed the configured maximum (${n})`);if(f(this,ut))throw new z("season_best_available_in_progress",409);C(this,ut,!0);let r=null;try{if(r=f(this,X).queueBestAvailable(t,i),E(this,P,W).call(this,{kind:"pending",message:`Finding ${e} Season seat${e===1?"":"s"} available for every performance.`,operationId:t},!0),!await f(this,te).bestAvailableOrThrow(e,i.categoryKey,{zoneId:i.zoneId})||!f(this,j))throw new z("season_hold_not_created",409);return f(this,j)}catch(o){throw E(this,P,je).call(this,o,t),o}finally{r&&f(this,X).clearBestAvailable(r),C(this,ut,!1)}}async restoreOperation(e){E(this,P,pt).call(this),E(this,P,W).call(this,{kind:"pending",message:"Restoring your Season selection.",operationId:e},!0);try{let t=await f(this,be).waitForTerminal(e,void 0,f(this,_t).signal);return t.state==="aborted"||t.state==="expired"?(C(this,j,null),f(this,D).onHoldChange?.(null),E(this,P,W).call(this,{kind:"released",message:"The previous Season selection is no longer held.",operationId:e}),null):(f(this,X).remember(t),E(this,P,xs).call(this,t,!1))}catch(t){throw E(this,P,je).call(this,t,e),t}}async release(e){E(this,P,pt).call(this);let t=f(this,j);if(t){if(!e)throw new Error("seatlayer: caller-stable release action id is required");f(this,X).queueRelease(e),E(this,P,W).call(this,{kind:"pending",message:"Releasing the Season seats.",operationId:t.operationId},!0);try{f(this,te)?.getCurrentHold()?.holdId===t.holdId?await f(this,te).release():(await f(this,X).release("",[],t.holdId),E(this,P,ki).call(this)),E(this,P,W).call(this,{kind:"released",message:"The Season seats were released.",operationId:t.operationId})}catch(i){throw E(this,P,je).call(this,i,t.operationId),i}}}async createRenewalIntent(e){if(E(this,P,pt).call(this),!e.startsWith("sro_"))throw new Error("seatlayer: Season renewal offer id is required");E(this,P,W).call(this,{kind:"pending",message:"Recording renewal intent. No purchase is made in the browser."},!0);try{let t=await f(this,be).renewalIntent(e);return E(this,P,W).call(this,{kind:"renewal_intent",message:"Renewal intent recorded. Your ticketing platform will confirm price, payment, and renewal."}),f(this,D).onRenewalIntent?.(t),t}catch(t){throw E(this,P,je).call(this,t),t}}getDescriptor(){return f(this,oe)}getAvailability(){return f(this,Te)}getHandoff(){return f(this,j)}destroy(){f(this,Oe)||(C(this,Oe,!0),f(this,_t).abort(),f(this,te)?.destroy(),f(this,be).destroy(),f(this,Ge).replaceChildren(),C(this,Ce,null),C(this,ht,null),C(this,Ie,null),C(this,Ee,null),C(this,qe,null),C(this,oe,null),C(this,Te,null),C(this,j,null))}};D=new WeakMap,Ge=new WeakMap,Rt=new WeakMap,be=new WeakMap,X=new WeakMap,_t=new WeakMap,oe=new WeakMap,Te=new WeakMap,j=new WeakMap,te=new WeakMap,Ce=new WeakMap,ht=new WeakMap,Ie=new WeakMap,Ee=new WeakMap,qe=new WeakMap,Ae=new WeakMap,Oe=new WeakMap,ut=new WeakMap,P=new WeakSet,fo=async function(e){let t=new ze(mi({container:f(this,ht),event:e.key,apiBase:f(this,D).apiBase,transport:f(this,X),hideEventDetails:!0,maxSelection:f(this,D).maxSelection,selectedObjects:f(this,D).selectedObjects,selectableObjects:f(this,D).selectableObjects,numberOfPlacesToSelect:f(this,D).numberOfPlacesToSelect,selectionValidators:f(this,D).selectionValidators,locale:f(this,D).locale,messages:f(this,D).messages,languages:f(this,D).languages,colorblindSafe:f(this,D).colorblindSafe,initialView:f(this,D).initialView,enable3D:f(this,D).enable3D,max3DSeats:f(this,D).max3DSeats,hideBadge:f(this,D).hideBadge,theme:f(this,D).theme,confirmSelection:f(this,D).confirmSelection,seatView:f(this,D).seatView,onBuyerViewChange:f(this,D).onBuyerViewChange,onAnalytics:(i,n)=>{try{f(this,D).onAnalytics?.(i,{...n,metricScope:"season",seasonKey:e.key,planActivationId:e.planActivationId,performanceCount:e.occurrenceCount})}catch{}},onSelectionChange:i=>{C(this,Ae,i.map(n=>n.label)),E(this,P,ct).call(this),f(this,D).onSelectionChange?.(i)},onSelectionValidityChange:f(this,D).onSelectionValidityChange,onHoldChange:i=>{if(!i){E(this,P,ki).call(this);return}let n=f(this,X).operationForHold(i.holdId);n&&E(this,P,xs).call(this,n,!0)},onCheckout:()=>{f(this,j)&&(E(this,P,dt).call(this,"checkout"),f(this,D).onContinue?.(f(this,j)))},onHoldExpired:()=>{E(this,P,ki).call(this),E(this,P,W).call(this,{kind:"released",message:"The Season hold expired. Choose seats again."}),f(this,D).onHoldExpired?.()},onError:i=>E(this,P,je).call(this,i)},{surface:"season",performanceCount:e.occurrenceCount,selectionMode:"same_seat",suppressPricing:!0,groupSelectionSummary:()=>{let i=f(this,Ae).length;return i?{seats:i,performances:e.occurrenceCount,performancesChosen:e.occurrenceCount,perPerformance:i}:null}}));C(this,te,t),await t.render()},go=function(){f(this,Ge).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 i=document.createElement("ol");i.className="sl-season-progress",i.setAttribute("aria-label","Season checkout progress");for(let[m,v]of["Choose seats","Review package","Checkout"].entries()){let k=document.createElement("li");k.dataset.state=m===0?"current":"upcoming";let S=document.createElement("span");S.textContent=String(m+1),k.append(S,v),i.append(k)}let n=document.createElement("div");n.className="sl-season-stage";let r=document.createElement("div");r.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 p=document.createElement("i");p.textContent="1\xD7";let d=document.createElement("span");d.textContent="Each seat you choose is reserved for every included performance.",c.append(p,d);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),n.append(r,o);let g=document.createElement("p");g.className="sl-season-status",g.setAttribute("role","status"),g.setAttribute("aria-live","polite"),e.append(t,i,n,g),f(this,Ge).append(e),C(this,Ce,e),C(this,ht,r),C(this,Ie,g),C(this,Ee,l),C(this,qe,u)},bo=function(){let e=f(this,oe),t=f(this,D).offer,i=f(this,Ce).querySelector(".sl-season-hero");i.replaceChildren();let n=document.createElement("div");n.className="sl-season-copy";let r=document.createElement("p");r.className="sl-season-eyebrow",r.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 m of[`${e.occurrenceCount} performances`,e.venue,t?.renewalLabel??"Same-seat package"].filter(Boolean)){let v=document.createElement("span");v.className="sl-season-fact",v.textContent=m,l.append(v)}n.append(r,o,a,l),i.append(n);let c=document.createElement("div");c.className="sl-season-offer";let p=document.createElement("span");p.className="sl-season-offer-label",p.textContent=t?.priceLabel?"Season package":"Package price";let d=document.createElement(t?.priceLabel?"strong":"span");if(d.className=t?.priceLabel?"sl-season-price":"sl-season-price-note",d.textContent=t?.priceLabel??"Confirmed by your ticketing platform at checkout",c.append(p,d),t?.compareAtPriceLabel){let m=document.createElement("span");m.className="sl-season-was",m.textContent=t.compareAtPriceLabel,c.append(m)}if(t?.savingsLabel){let m=document.createElement("span");m.className="sl-season-saving",m.textContent=t.savingsLabel,c.append(m)}if(t?.priceNote){let m=document.createElement("span");m.className="sl-season-price-note",m.textContent=t.priceNote,c.append(m)}if(i.append(c),t?.benefits?.length){let m=document.createElement("ul");m.className="sl-season-benefits";for(let v of t.benefits.slice(0,6)){let k=document.createElement("li");k.textContent=v,m.append(k)}i.append(m)}let u=document.createElement("details");u.className="sl-season-dates";let h=document.createElement("summary");h.textContent=`All ${e.occurrenceCount} performances included`;let g=document.createElement("ol");g.className="sl-season-date-list";for(let m of e.occurrences){let v=document.createElement("li");v.className="sl-season-date";let k=document.createElement("b");k.textContent=m.name;let S=Dc(m,e.timezone,f(this,D).locale),L=document.createElement("time");m.startsAt!=null&&(L.dateTime=new Date(m.startsAt).toISOString()),L.textContent=S.time?`${S.date} \xB7 ${S.time}`:S.date,v.append(k,L),g.append(v)}u.append(h,g),i.append(u),E(this,P,ct).call(this)},xs=function(e,t){if(e.state==="booked")return C(this,j,null),f(this,X).forget(e.holdId),f(this,te)?.notifyGroupSettled("booked"),E(this,P,dt).call(this,"complete"),E(this,P,W).call(this,{kind:"booked",message:`Your Season booking is complete for all ${f(this,oe).occurrenceCount} performances. No further checkout action is needed.`,operationId:e.operationId}),f(this,D).onHoldChange?.(null),null;if(e.state==="partial_terminal")return C(this,j,null),C(this,Ae,[]),f(this,X).forget(e.holdId),f(this,te)?.notifyGroupSettled("lost"),E(this,P,ct).call(this),E(this,P,dt).call(this,"review"),E(this,P,W).call(this,{kind:"partial_terminal",message:"This Season selection needs organizer review. Do not try another selection.",operationId:e.operationId}),f(this,D).onHoldChange?.(null),null;if(e.state!=="committed")return C(this,j,null),f(this,X).forget(e.holdId),f(this,te)?.notifyGroupSettled("lost"),E(this,P,W).call(this,{kind:"failed",message:"The Season selection could not be completed.",operationId:e.operationId}),f(this,D).onHoldChange?.(null),null;let i=ho(f(this,oe),e),n=f(this,j)?.holdId!==i.holdId;return C(this,j,i),E(this,P,ct).call(this),E(this,P,dt).call(this,"review"),f(this,D).onHoldChange?.(i),E(this,P,W).call(this,{kind:"held",message:`Your seats are held for all ${f(this,oe).occurrenceCount} performances. Review and continue to checkout.`,operationId:e.operationId}),n&&t&&f(this,D).onHold?.(i),i},ki=function(){C(this,j,null),C(this,Ae,[]),E(this,P,ct).call(this),E(this,P,dt).call(this,"choose"),f(this,D).onHoldChange?.(null)},ct=function(){if(!f(this,Ee))return;let e=f(this,Ae).length;if(!e)f(this,Ee).textContent="Choose a seat on the map. Unavailable seats are already booked on at least one included performance.";else{f(this,Ee).replaceChildren();let t=document.createElement("strong");t.textContent=f(this,Ae).join(", "),f(this,Ee).append(t,` \xB7 ${e} Season seat${e===1?"":"s"} across all ${f(this,oe)?.occurrenceCount??0} performances`)}f(this,qe)&&f(this,Te)&&(f(this,qe).textContent=`${f(this,Te).freeCount} seat${f(this,Te).freeCount===1?"":"s"} currently available for the complete Season`)},dt=function(e){let t=e==="choose"?0:e==="review"?1:e==="checkout"?2:3;f(this,Ce)?.querySelectorAll(".sl-season-progress li").forEach((i,n)=>{i.dataset.state=n<t?"done":n===t?"current":"upcoming";let r=i.querySelector("span");r&&(r.textContent=n<t?"\u2713":String(n+1))})},W=function(e,t=!1){f(this,Ie)&&(f(this,Ie).textContent=e.message,f(this,Ie).dataset.kind=e.kind),f(this,Ce)&&(f(this,Ce).dataset.busy=String(t)),f(this,D).onStatusChange?.(e)},je=function(e,t){let i=e instanceof z?`Season selection unavailable (${e.code}).`:"Season selection could not be completed.";E(this,P,W).call(this,{kind:"failed",message:i,operationId:t}),f(this,D).onError?.(e)},ws=function(){if(f(this,Oe))throw new Error("seatlayer: SeasonPicker was destroyed")},pt=function(){if(E(this,P,ws).call(this),!f(this,oe)||!f(this,te))throw new Error("seatlayer: render SeasonPicker before using it")};function Bc(s,e={}){let t=e.origin??"";if(!t)try{t=new URL(s.src,window.location.href).origin}catch{t=""}let i=!1,n=null,r=null,o=null,a="",l=null,c=()=>{if(i)return;i=!0,n=s.getAttribute("style"),Object.assign(s.style,{position:"fixed",inset:"0",width:"100vw",height:"100vh",margin:"0",border:"0",zIndex:"2147483000",background:"#101625"});let u=document.documentElement;r=u.style.overflow,u.style.overflow="hidden",document.body&&(o=document.body.style.overflow,document.body.style.overflow="hidden"),l=h=>{h.key==="Escape"&&p()},window.addEventListener("keydown",l)},p=()=>{i&&(i=!1,n===null?s.removeAttribute("style"):s.setAttribute("style",n),n=null,a&&(s.style.height=a),r!==null&&(document.documentElement.style.overflow=r,r=null),o!==null&&document.body&&(document.body.style.overflow=o,o=null),l&&(window.removeEventListener("keydown",l),l=null))},d=u=>{if(u.source!==s.contentWindow||t&&u.origin!==t||!u.data||typeof u.data!="object")return;let h=u.data;if(h.type==="seatlayer:height"){typeof h.px=="number"&&Number.isFinite(h.px)&&h.px>0&&(a=`${Math.round(h.px)}px`,i||(s.style.height=a));return}h.type==="seatlayer:fullscreen"&&(h.on===!0?c():h.on===!1&&p())};return window.addEventListener("message",d),()=>{window.removeEventListener("message",d),p()}}export{$ as ApiError,pe as BuyerAccessContext,ae as BuyerAccessUnavailableError,ve as BuyerRealtimeClient,Vi as EmbeddedDesigner,q as PerformanceGroupDestroyedError,fs as PerformanceGroupPicker,yn as SEATING_CHART_CALLBACK_PROPS,gn as SEATING_CHART_HANDLE_METHODS,bn as SEATING_CHART_IDENTITY_PROPS,vn as SEATING_CHART_VALUE_PROPS,z as SeasonApiError,ys as SeasonPicker,xi as SeasonRecoveryTimeoutError,ze as SeatPicker,Ni as SeatingChart,Bc as attachPickerFrame,La as bindSeatingChartHandle,Ma as buildSeatingChartOptions,xt as createBuyerAccessContext,ft as createControllerSink,zi as parseTicketOfferAvailability,Ht as shortOperationReference,ji as ticketOfferPrices};