@seatlayer/core 0.72.1 → 0.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{categoryInventory-Bt-0psga.d.ts → categoryInventory-Bcmnr6ZH.d.ts} +1 -1
- package/dist/{categoryInventory-BU1j8Q70.d.cts → categoryInventory-DueSAIBX.d.cts} +1 -1
- package/dist/{chunk-O5UWBFUT.js → chunk-3L4M7L5I.js} +1 -1
- package/dist/chunk-5JB4VW6B.js +1 -0
- package/dist/{chunk-5U25QLSS.js → chunk-6TIKEDC4.js} +1 -1
- package/dist/{chunk-YW2WGLRM.js → chunk-BAWUBGWY.js} +1 -1
- package/dist/chunk-JLYR66MT.js +1 -0
- package/dist/{chunk-KCFEFP6H.js → chunk-KN7GLEAI.js} +1 -1
- package/dist/{chunk-KPSJDH3N.js → chunk-N5NRM4NW.js} +1 -1
- package/dist/chunk-QLDV5ZGA.js +1 -0
- package/dist/{chunk-AM2LRFAY.js → chunk-UX67GDLV.js} +1 -1
- package/dist/{chunk-ALE2T36W.js → chunk-YFV4DSSX.js} +1 -1
- package/dist/{chunk-NKYPEBW3.js → chunk-ZMYRXJOA.js} +1 -1
- package/dist/core/chart-ops/index.cjs +1 -1
- package/dist/core/chart-ops/index.d.cts +11 -4
- package/dist/core/chart-ops/index.d.ts +11 -4
- package/dist/core/chart-ops/index.js +1 -1
- package/dist/core/inventory/index.cjs +1 -1
- package/dist/core/inventory/index.d.cts +11 -4
- package/dist/core/inventory/index.d.ts +11 -4
- package/dist/core/inventory/index.js +1 -1
- package/dist/core/layout/index.cjs +1 -1
- package/dist/core/layout/index.d.cts +5 -5
- package/dist/core/layout/index.d.ts +5 -5
- package/dist/core/layout/index.js +1 -1
- package/dist/core/quality/index.cjs +1 -1
- package/dist/core/quality/index.d.cts +3 -3
- package/dist/core/quality/index.d.ts +3 -3
- package/dist/core/quality/index.js +1 -1
- package/dist/core/render-assets/index.cjs +1 -1
- package/dist/core/render-assets/index.d.cts +1 -1
- package/dist/core/render-assets/index.d.ts +1 -1
- package/dist/core/render-assets/index.js +1 -1
- package/dist/core/seatConfidence.d.cts +1 -1
- package/dist/core/seatConfidence.d.ts +1 -1
- package/dist/core/sections/index.cjs +1 -1
- package/dist/core/sections/index.d.cts +5 -5
- package/dist/core/sections/index.d.ts +5 -5
- package/dist/core/sections/index.js +1 -1
- package/dist/{eventConfigurations-DfVUGyCg.d.ts → eventConfigurations-C7YAqkFR.d.ts} +1 -1
- package/dist/{eventConfigurations-3uSorYVC.d.cts → eventConfigurations-DwXdrjqj.d.cts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +102 -13
- package/dist/index.d.ts +102 -13
- package/dist/index.js +1 -1
- package/dist/{labeling-BiWB-8aq.d.ts → labeling-BUCj-kHU.d.ts} +1 -1
- package/dist/{labeling-9RWWmJhZ.d.cts → labeling-iugoy25P.d.cts} +1 -1
- package/dist/{layout-B6iOoPOv.d.cts → layout-DPJX6D9k.d.cts} +3 -3
- package/dist/{layout-B7URbtDR.d.ts → layout-Dv3R0Mpw.d.ts} +3 -3
- package/dist/{renderedQuality-C5dQiq97.d.ts → renderedQuality-CSHrmnHf.d.cts} +10 -2
- package/dist/{renderedQuality-BZsq3wDe.d.cts → renderedQuality-CfonzUpl.d.ts} +10 -2
- package/dist/{renderer-6sFRupj0.d.ts → renderer-C5avrVLy.d.ts} +11 -2
- package/dist/{renderer-CBOo1OZk.d.cts → renderer-Dn4Plcv9.d.cts} +11 -2
- package/dist/{sections-DU6YDYoZ.d.cts → sections-DhJ7TukF.d.cts} +1 -1
- package/dist/{sections-Cn_sk1Sx.d.ts → sections-uV7vqDHj.d.ts} +1 -1
- package/dist/{segmentedRowModel-CKmyHvKv.d.cts → segmentedRowModel-DWOjcPrU.d.cts} +1 -1
- package/dist/{segmentedRowModel-DbP7pWUk.d.ts → segmentedRowModel-DgSEzAYd.d.ts} +1 -1
- package/dist/{ticketRestrictions-CvS2oQ8v.d.ts → ticketRestrictions-DIh61MqE.d.ts} +2 -2
- package/dist/{ticketRestrictions-DkenahW2.d.cts → ticketRestrictions-JT87K45q.d.cts} +2 -2
- package/dist/{types-D6-wLa-m.d.cts → types-Dx4jA8aI.d.cts} +22 -4
- package/dist/{types-D6-wLa-m.d.ts → types-Dx4jA8aI.d.ts} +22 -4
- package/dist/view3d/crossfade/panorama.d.cts +1 -1
- package/dist/view3d/crossfade/panorama.d.ts +1 -1
- package/dist/view3d/index.cjs +1 -1
- package/dist/view3d/index.d.cts +3 -3
- package/dist/view3d/index.d.ts +3 -3
- package/dist/view3d/index.js +1 -1
- package/dist/view3d/scene/scene.worker.cjs +1 -1
- package/dist/view3d/scene/scene.worker.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4F7VBQCF.js +0 -1
- package/dist/chunk-HXYWP6NX.js +0 -1
- package/dist/chunk-XLGYWT5G.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{A as I,B as J,d,e as g,f as h,g as i,h as j,i as k,j as l,k as n,l as q,m as s,n as u,o as v,p as w,q as y,r as z,s as A,t as B,u as C,v as D,w as E,x as F,y as G,z as H}from"../../chunk-QLDV5ZGA.js";import{a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,k as c}from"../../chunk-UL5OIGIF.js";export{u as DECOR_STAMP_ICON_PATHS,D as DEFAULT_SHAPE_LINE_CAP,F as DEFAULT_SHAPE_LINE_ENDING,E as DEFAULT_SHAPE_LINE_JOIN,f as SEAT_GLYPHS,r as SEAT_GLYPH_DETAIL_MIN_PX,e as SEAT_GLYPH_INSET,m as SEAT_GLYPH_ORDER,o as SEAT_GLYPH_VIEWBOX,A as SHAPE_LINE_CAPS,C as SHAPE_LINE_ENDINGS,B as SHAPE_LINE_JOINS,s as VENUE_ICONS,n as VENUE_ICON_GROUP_LABELS,q as VENUE_ICON_GROUP_ORDER,z as VENUE_ICON_KEYS,l as VENUE_ICON_STROKE,k as VENUE_ICON_VIEWBOX,g as buyerBackgroundImage,i as buyerFacingChartDoc,j as hasConflictingLegacyTrace,G as isOpenShapeKind,H as isPointShapeKind,b as isSeatGlyphKind,y as isVenueIconKey,h as migrateLegacyBackgroundLayersInPlace,c as resolveSeatGlyph,I as resolvedShapeLineStyle,p as seatGlyph,a as seatGlyphFit,t as seatGlyphLabel,x as seatGlyphPath,J as shapeArrowMetrics,d as traceReferenceImage,v as venueIcon,w as venueIconPath};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ae=Object.defineProperty;var st=Object.getOwnPropertyDescriptor;var ct=Object.getOwnPropertyNames;var at=Object.prototype.hasOwnProperty;var lt=(e,t)=>{for(var n in t)ae(e,n,{get:t[n],enumerable:!0})},ut=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ct(t))!at.call(e,r)&&r!==n&&ae(e,r,{get:()=>t[r],enumerable:!(o=st(t,r))||o.enumerable});return e};var ft=e=>ut(ae({},"__esModule",{value:!0}),e);var vn={};lt(vn,{DEFAULT_SECTION_CORNER_SMOOTHING:()=>Be,MAX_EDGE_SAGITTA_RATIO:()=>Ue,TIER_HEIGHT_M:()=>Se,UNGROUPED_ID:()=>ce,applyHidden:()=>Mn,arcLevelAt:()=>Pt,bearingDeg:()=>Re,buildSectionRake:()=>kt,computeSections:()=>ot,cornerSmoothingThresholdDeg:()=>Ge,distanceToPolyline:()=>ue,fitBowlProfile:()=>vt,fitCircle:()=>ee,hiddenObjectIds:()=>it,indexLabel:()=>Oe,isSectionHidden:()=>rt,logicalNumberingRow:()=>De,relabelRows:()=>Rt,resolveSection:()=>yt,reverseSectionOutlinePath:()=>en,sampleSectionOutlinePath:()=>Wt,seatConfidenceDisclosure:()=>Gt,seatDisplayLabel:()=>he,seatInventoryLabel:()=>pe,seatLabelPart:()=>ie,sectionCornerSmoothingPath:()=>Jt,sectionGeometry:()=>We,sectionOutlinePathFrom:()=>He,sectionPathSegmentEnd:()=>$t,toBijectiveBase:()=>fe,toLetters:()=>oe,toRoman:()=>de,transformSectionOutlinePath:()=>Fe,translateSectionOutlinePath:()=>Xt,validSectionOutlinePath:()=>ye});module.exports=ft(vn);function Ie(e){let t=e.length;return t<=3?[...e]:[e[Math.floor(t*.25)],e[Math.floor(t*.5)],e[Math.floor(t*.75)]]}function ue(e,t,n){if(!e.length)return 1/0;if(e.length===1)return Math.hypot(t-e[0].x,n-e[0].y);let o=1/0;for(let r=0;r+1<e.length;r++){let i=e[r],s=e[r+1],u=s.x-i.x,f=s.y-i.y,b=u*u+f*f,c=b>1e-12?((t-i.x)*u+(n-i.y)*f)/b:0;c<0?c=0:c>1&&(c=1);let m=Math.hypot(t-(i.x+c*u),n-(i.y+c*f));m<o&&(o=m)}return o}function dt(e){let t=0,n=0;for(let i of e)t+=i.x,n+=i.y;let o=e.length||1;t/=o,n/=o;let r=0;for(let i of e){let s=Math.hypot(i.x-t,i.y-n);s>r&&(r=s)}return{cx:t,cy:n,r}}function Ae(e,t){return Math.hypot(e.cx-t.cx,e.cy-t.cy)-e.r-t.r}function le(e,t){let n=1/0;for(let o of Ie(e)){let r=ue(t,o.x,o.y);r<n&&(n=r)}for(let o of Ie(t)){let r=ue(e,o.x,o.y);r<n&&(n=r)}return n}function pt(e,t){if(e.length<3)return{pts:e,seatIndices:t};let n=0,o=0;for(let c of e)n+=c.x,o+=c.y;n/=e.length,o/=e.length;let r=-1,i=e[0];for(let c of e){let m=Math.hypot(c.x-n,c.y-o);m>r&&(r=m,i=c)}let s=i.x-n,u=i.y-o,f=Math.hypot(s,u);f>1e-9?(s/=f,u/=f):(s=1,u=0);let b=e.map((c,m)=>({p:c,i:m,t:(c.x-n)*s+(c.y-o)*u})).sort((c,m)=>c.t-m.t);return{pts:b.map(c=>c.p),seatIndices:b.map(c=>t[c.i])}}function ee(e){let t=e.length;if(t<3)return null;let n=0,o=0;for(let g of e)n+=g.x,o+=g.y;n/=t,o/=t;let r=0,i=0,s=0,u=0,f=0,b=0,c=0;for(let g of e){let y=g.x-n,a=g.y-o;r+=y*y,s+=a*a,i+=y*a,u+=y*y*y,f+=a*a*a,b+=y*a*a,c+=a*y*y}let m=r*s-i*i;if(Math.abs(m)<1e-9)return null;let d=(u+b)/2,l=(f+c)/2,h=(d*s-l*i)/m,A=(l*r-d*i)/m,p=h+n,x=A+o;return!Number.isFinite(p)||!Number.isFinite(x)?null:{cx:p,cy:x}}var ht=.15;function bt(e){if(e.length<2)return null;let t=e.map(g=>{let y=0,a=0;for(let I of g.pts)y+=I.x,a+=I.y;return{x:y/g.pts.length,y:a/g.pts.length}}),n=0,o=0;for(let g of t)n+=g.x,o+=g.y;n/=t.length,o/=t.length;let r=0,i=0,s=0;for(let g of t){let y=g.x-n,a=g.y-o;r+=y*y,i+=y*a,s+=a*a}let u=r+s,f=r*s-i*i,b=u/2+Math.sqrt(Math.max(0,u*u/4-f)),c,m;Math.abs(i)>1e-12?(c=b-s,m=i):r>=s?(c=1,m=0):(c=0,m=1);let d=Math.hypot(c,m);if(!(d>1e-12))return null;c/=d,m/=d;let l=1/0,h=-1/0,A=[];for(let g of e){let y=1/0,a=-1/0;for(let I of g.pts){let S=I.x*c+I.y*m;S<y&&(y=S),S>a&&(a=S),S<l&&(l=S),S>h&&(h=S)}A.push(a-y)}let p=h-l;return p>1e-9?(A.sort((g,y)=>g-y),A[Math.min(A.length-1,Math.floor(A.length*.9))]/p<=mt?{x:c,y:m}:null):null}var mt=.35;function yt(e,t,n,o){let r=new Map;for(let p of n){let x=t[p],g=x.rowId||`__seat-${p}`,y=r.get(g);y||(y={pts:[],idx:[]},r.set(g,y)),y.pts.push({x:x.x,y:x.y}),y.idx.push(p)}if(!r.size)return{sectionId:e,rows:[],blockCount:0};let i=[];for(let[p,x]of r){let g=pt(x.pts,x.idx),y=0;for(let a of g.pts)y+=Math.hypot(a.x-o.x,a.y-o.y);i.push({id:p,pts:g.pts,seatIndices:g.seatIndices,blockId:-1,ordinal:0,blockDepth:0,focalDistance:y/g.pts.length})}let s=i.map(p=>dt(p.pts)),u=[];for(let p=0;p<i.length;p++){let x=1/0;for(let g=0;g<i.length;g++){if(p===g||Ae(s[p],s[g])>=x)continue;let y=le(i[p].pts,i[g].pts);y<x&&(x=y)}Number.isFinite(x)&&u.push(x)}u.sort((p,x)=>p-x);let f=u.length?u[Math.floor(u.length/2)]:1,b=Math.max(f*1.8,1e-6),c=i.map(()=>[]);for(let p=0;p<i.length;p++)for(let x=p+1;x<i.length;x++)Ae(s[p],s[x])>b||le(i[p].pts,i[x].pts)<=b&&(c[p].push(x),c[x].push(p));let m=0;for(let p=0;p<i.length;p++){if(i[p].blockId!==-1)continue;let x=m++,g=[p];for(i[p].blockId=x;g.length;){let y=g.pop();for(let a of c[y])i[a].blockId===-1&&(i[a].blockId=x,g.push(a))}}let d=new Map;for(let p of i){let x=d.get(p.blockId)??[];x.push(p),d.set(p.blockId,x)}let l=[];for(let p of i){if(p.pts.length<4)continue;let x=ee(p.pts);x&&(!Number.isFinite(x.cx)||!Number.isFinite(x.cy)||l.push({x:x.cx,y:x.cy}))}let h=l.length>=2?(()=>{let p=l.map(y=>y.x).sort((y,a)=>y-a),x=l.map(y=>y.y).sort((y,a)=>y-a),g=Math.floor(l.length/2);return{cx:p[g],cy:x[g]}})():null;if(h){let p=S=>Math.hypot(S.x-h.cx,S.y-h.cy),x=1/0,g=-1/0,y=[];for(let S of i){let C=1/0,_=-1/0;for(let j of S.pts){let U=p(j);U<C&&(C=U),U>_&&(_=U)}y.push(_-C),C<x&&(x=C),_>g&&(g=_)}let a=g-x;y.sort((S,C)=>S-C);let I=y[Math.min(y.length-1,Math.floor(y.length*.9))];if(a>1e-9&&I/a<=ht){let S=i.map(v=>{let D=0;for(let V of v.pts)D+=p(V);return{row:v,radius:D/v.pts.length}}),C=0,_=0;for(let v of S)C+=v.radius,_+=v.row.focalDistance;C/=S.length,_/=S.length;let j=0;for(let v of S)j+=(v.radius-C)*(v.row.focalDistance-_);if(j<0)for(let v of S)v.radius=-v.radius;let H=1/0;for(let v of S)v.radius<H&&(H=v.radius);S.sort((v,D)=>v.radius-D.radius);let J=-1,w=-1/0,P=a/Math.max(1,S.length)*.5,O=[];for(let v of S)v.radius-w>P&&(J++,w=v.radius),v.row.ordinal=J,v.row.blockDepth=v.radius-H,O.push(v.row);return{sectionId:e,rows:O,blockCount:m}}}let A=[];for(let[,p]of d){let x=bt(p);if(x){let g=a=>{let I=0;for(let S of a.pts)I+=S.x*x.x+S.y*x.y;return I/a.pts.length};p.sort((a,I)=>g(a)-g(I)),p.length>=2&&p[0].focalDistance>p[p.length-1].focalDistance&&p.reverse();let y=0;for(let a=0;a<p.length;a++)a>0&&(y+=le(p[a-1].pts,p[a].pts)),p[a].ordinal=a,p[a].blockDepth=y,A.push(p[a])}else{let g=1/0;for(let y of p)y.focalDistance<g&&(g=y.focalDistance);p.sort((y,a)=>y.focalDistance-a.focalDistance);for(let y=0;y<p.length;y++)p[y].ordinal=y,p[y].blockDepth=Math.max(0,p[y].focalDistance-g),A.push(p[y])}}return{sectionId:e,rows:A,blockCount:m}}var xt=Math.PI/180,R=96,gt=6,St=60,wt=150,Ce=.2,Mt=.35;function Re(e,t){let n=Math.atan2(t.x-e.x,t.y-e.y)/xt;return n<0?n+360:n}function te(e){if(!e.length)return NaN;let t=[...e].sort((n,o)=>n-o);return t[Math.floor(t.length/2)]}function ne(e,t,n=2){let o=e.length,r=new Float64Array(o);for(let i=0;i<o;i++){let s=0,u=0;for(let f=-n;f<=n;f++){let b=i+f;if(t)b=(b%o+o)%o;else if(b<0||b>=o)continue;s+=e[b],u++}r[i]=s/u}return r}function vt(e,t){let n=e.filter(d=>d.rows.length>=1);if(n.length<1)return null;let o=[],r=0,i=0,s=0;for(let d of n)for(let l of d.rows){for(let h of l.pts)r+=h.x,i+=h.y,s++;if(l.pts.length>=4){let h=ee(l.pts);h&&Number.isFinite(h.cx)&&Number.isFinite(h.cy)&&o.push({x:h.cx,y:h.cy})}}if(!s)return null;let u={x:r/s,y:i/s},f=u;if(o.length>=8){let d=te(o.map(x=>x.x)),l=te(o.map(x=>x.y)),h=0;for(let x of n)for(let g of x.rows)for(let y of g.pts){let a=Math.hypot(y.x-u.x,y.y-u.y);a>h&&(h=a)}let A=0,p=h*.2;for(let x of n)for(let g of x.rows)for(let y of g.pts)Math.hypot(y.x-d,y.y-l)<p&&A++;Math.hypot(d-u.x,l-u.y)<=h&&A/s<.01&&(f={x:d,y:l})}let b=[];for(let d of n){let l={sectionId:d.sectionId,rMin:1/0,rMax:-1/0,samples:[]};for(let h of d.rows)for(let A of h.pts){let p=Math.hypot(A.x-f.x,A.y-f.y),x=Math.min(R-1,Math.floor(Re(f,A)/(360/R)));l.samples.push({r:p,bin:x,levelM:h.levelM}),p<l.rMin&&(l.rMin=p),p>l.rMax&&(l.rMax=p)}l.samples.length&&b.push(l)}if(!b.length)return null;b.sort((d,l)=>d.rMin+d.rMax-(l.rMin+l.rMax));let c=[];for(let d of b){let l=!1;for(let h of c){let A=Math.min(d.rMax,h.rMax)-Math.max(d.rMin,h.rMin),p=Math.min(d.rMax-d.rMin,h.rMax-h.rMin);if(p>1e-9&&A>=Mt*p){h.members.push(d),h.rMin=Math.min(h.rMin,d.rMin),h.rMax=Math.max(h.rMax,d.rMax),l=!0;break}}l||c.push({members:[d],rMin:d.rMin,rMax:d.rMax})}let m=[];for(let d of c){let l=new Array(R).fill(null);for(let w of d.members)for(let P of w.samples){let O=l[P.bin];O||(O={samples:[]},l[P.bin]=O),O.samples.push({r:P.r,levelM:P.levelM})}let h=l.map(w=>!!w);if(!h.filter(Boolean).length)continue;let p=[],x=[];for(let w of l){if(!w)continue;let P=1/0,O=-1/0;for(let v of w.samples)v.r<P&&(P=v.r),v.r>O&&(O=v.r);p.push(P),x.push(O)}let g=te(p),y=te(x);if(!(g>=Ce*y)||!(y>0))continue;let a=[...p].sort((w,P)=>w-P);if(!(a[Math.floor(a.length*.1)]>=Ce*y))continue;let S=l.map(w=>{if(!w)return null;let P=[...w.samples].sort((k,N)=>k.r-N.r),O=P[0].r,v=P[P.length-1].r,D=P[0].levelM,V=-1/0;for(let k of P)k.levelM>V&&(V=k.levelM);let E=[];for(let k of P){let N={r:k.r,l:k.levelM};for(;E.length&&Math.abs(E[E.length-1].r-N.r)<1e-9;){if(E[E.length-1].l<=N.l){N.skip=!0;break}E.pop()}if(!N.skip){for(;E.length>=2;){let $=E[E.length-2],K=E[E.length-1];if((K.r-$.r)*(N.l-$.l)-(K.l-$.l)*(N.r-$.r)<=0)E.pop();else break}E.push(N)}}let B=E.map(k=>k.r),G=E.map(k=>k.l);return{inner:O,outer:v,front:D,top:V,profile:{rs:B,ls:G}}}),C=h.slice();for(let w=0;w<R;w++){if(C[w])continue;let P=-1,O=-1,v=0;for(let M=1;M<=R;M++){let T=(w-M+R*2)%R;if(C[T]){P=T;break}}for(let M=1;M<=R;M++){let T=(w+M)%R;if(C[T]){O=T,v=M;break}}if(P<0||O<0)continue;let D=0;for(let M=1;M<=R;M++){let T=(w-M+R*2)%R;if(h[T]){D=M;break}}if(D-1+v>gt)continue;let E=S[P],B=S[O],G=D/(D+v),k=E.inner+(B.inner-E.inner)*G,N=E.outer+(B.outer-E.outer)*G,$=E.front+(B.front-E.front)*G,K=E.top+(B.top-E.top)*G;S[w]={inner:k,outer:N,front:$,top:K,profile:{rs:[k,N],ls:[$,K]}}}for(let w=0;w<R;w++)S[w]&&(C[w]=!0);let _=360/R,j=[],U=C.filter(Boolean).length,H=[];if(U===R)H.push({start:0,len:R});else{let w=0;for(;C[w];)w=(w+1)%R;let P=-1;for(let O=0;O<=R;O++){let v=(w+O)%R,D=O<R&&C[v];if(D&&P<0)P=v;else if(!D&&P>=0){let V=(v-P+R)%R||R;H.push({start:P,len:V}),P=-1}}}for(let w of H){if(w.len*_<St&&w.len<R)continue;let P=w.len===R,O=new Float64Array(w.len),v=new Float64Array(w.len),D=new Float64Array(w.len),V=new Float64Array(w.len),E=[];for(let M=0;M<w.len;M++){let T=S[(w.start+M)%R];O[M]=T.inner,v[M]=T.outer,D[M]=T.front,V[M]=T.top,E.push(T.profile??{rs:[T.inner,T.outer],ls:[T.front,T.top]})}let B=ne(O,P),G=ne(v,P),k=ne(D,P),N=ne(V,P);for(let M=0;M<w.len;M++)B[M]>O[M]&&(B[M]=O[M]),G[M]<v[M]&&(G[M]=v[M]),B[M]>G[M]-1e-6&&(B[M]=Math.max(0,G[M]-1e-6)),N[M]<k[M]&&(N[M]=k[M]);let $={startBin:w.start,binCount:w.len,closed:P,innerR:B,outerR:G,frontLevelM:k,topLevelM:N,profiles:E},K=(M,T,F)=>{let Q=E[M],W=Q.rs,z=Q.ls;if(T<=W[0]){z[0]>F&&(z[0]=F);return}if(T>=W[W.length-1]){z[z.length-1]>F&&(z[z.length-1]=F);return}for(let X=0;X+1<W.length;X++)if(T<=W[X+1]){z[X]>F&&(z[X]=F),z[X+1]>F&&(z[X+1]=F);return}};for(let M=0;M<w.len;M++){let T=l[(w.start+M)%R];if(T)for(let F of T.samples){K(M,F.r,F.levelM);let Q=P?(M-1+w.len)%w.len:M-1,W=P?(M+1)%w.len:M+1;Q>=0&&K(Q,F.r,F.levelM),W<w.len&&K(W,F.r,F.levelM)}}j.push($)}j.reduce((w,P)=>w+P.binCount*_,0)<wt||m.push({arcs:j,sectionIds:d.members.map(w=>w.sectionId),innerRMedian:g,outerRMedian:y})}if(!m.length)return null;if(m.sort((d,l)=>d.innerRMedian-l.innerRMedian),t){let d=m[m.length-1].outerRMedian;if(Math.hypot(t.x-f.x,t.y-f.y)>.9*d)return null}return{centre:f,binCount:R,binStepDeg:360/R,rings:m}}function Pt(e,t,n,o){let r=e.binStepDeg,i=n/r-.5-t.startBin;i=(i%e.binCount+e.binCount)%e.binCount,i>t.binCount-1&&(t.closed?i=i-t.binCount<t.binCount-i?0:t.binCount-1:i=i-(t.binCount-1)<e.binCount-i?t.binCount-1:0);let s=Math.floor(i),u=t.closed?(s+1)%t.binCount:Math.min(t.binCount-1,s+1),f=i-s,b=c=>{let m=t.profiles[c],d=m.rs,l=m.ls;if(o<=d[0])return l[0];if(o>=d[d.length-1])return l[l.length-1];for(let h=0;h+1<d.length;h++)if(o<=d[h+1]){let A=d[h+1]-d[h],p=A>1e-9?(o-d[h])/A:0;return l[h]+(l[h+1]-l[h])*p}return l[l.length-1]};return b(s)*(1-f)+b(u)*f}var Ee="ABCDEFGHIJKLMNOPQRSTUVWXYZ",It="ABCDEFGHJKLMNPQRSTUVWXYZ",At="abcdefghijklmnopqrstuvwxyz";function fe(e,t){let n=t.length,o=e+1,r="";for(;o>0;){o-=1;let i=o%n;r=t[i]+r,o=Math.floor(o/n)}return r}function Oe(e,t){let n=t.startAt-1,o=e+n;if(t.scheme==="numbers")return String(o+1);let r=t.skipAmbiguous?It:Ee;return fe(o,r)}function oe(e,t=!1){let n=t?At:Ee;return fe(Math.max(0,Math.floor(e)-1),n)}var Ct=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]];function de(e){if(!Number.isFinite(e)||e<=0)return String(e);let t=Math.floor(e),n="";for(let[o,r]of Ct)for(;t>=o;)n+=r,t-=o;return n}function Rt(e,t){let n=e.length;return e.map((o,r)=>{let i=t.reverse?n-1-r:r;return{...o,label:Oe(i,t)}})}function Et(e){return{kind:"radial",rowCount:0,rows:[],nearestRow:()=>-1,depthAt:(t,n)=>Math.hypot(t-e.x,n-e.y),gradientAt:(t,n)=>{let o=t-e.x,r=n-e.y,i=Math.hypot(o,r);return i<1e-9?[0,0]:[o/i,r/i]}}}function Ot(e,t){if(!e.length)return null;let n=0,o=0,r=0;for(let l of e)n+=l.x,o+=l.y,r+=Math.hypot(l.x-t.x,l.y-t.y);let i=e.length;n/=i,o/=i,r/=i;let s=e[0],u=-1;for(let l of e){let h=Math.hypot(l.x-n,l.y-o);h>u&&(u=h,s=l)}let f=s.x-n,b=s.y-o,c=Math.hypot(f,b);c>1e-9?(f/=c,b/=c):(f=1,b=0);let m=[...e].sort((l,h)=>(l.x-n)*f+(l.y-o)*b-((h.x-n)*f+(h.y-o)*b)),d=0;for(let l of m){let h=Math.hypot(l.x-n,l.y-o);h>d&&(d=h)}return{pts:m,cx:n,cy:o,radius:d,depth:r}}function Te(e,t,n){let o=e.pts;if(o.length===1)return Math.hypot(t-o[0].x,n-o[0].y);let r=1/0;for(let i=0;i+1<o.length;i++){let s=o[i],u=o[i+1],f=u.x-s.x,b=u.y-s.y,c=f*f+b*b,m=c>1e-12?((t-s.x)*f+(n-s.y)*b)/c:0;m<0?m=0:m>1&&(m=1);let d=Math.hypot(t-(s.x+m*f),n-(s.y+m*b));d<r&&(r=d)}return r}var re=8;function Tt(e,t,n){let o=new Array(re).fill(1/0),r=new Array(re).fill(-1);for(let c=0;c<e.length;c++){let m=e[c],d=Math.hypot(t-m.cx,n-m.cy)-m.radius;for(let l=0;l<re;l++)if(d<o[l]){for(let h=re-1;h>l;h--)o[h]=o[h-1],r[h]=r[h-1];o[l]=d,r[l]=c;break}}let i=new Array(3).fill(1/0),s=new Array(3).fill(-1);for(let c of r){if(c<0)continue;let m=Te(e[c],t,n);for(let d=0;d<3;d++)if(m<i[d]){for(let l=2;l>d;l--)i[l]=i[l-1],s[l]=s[l-1];i[d]=m,s[d]=c;break}}if(s[0]<0)return 0;if(i[0]<1e-6)return e[s[0]].depth;let u=i[0]*2.2,f=0,b=0;for(let c=0;c<3;c++){let m=s[c];if(m<0||i[c]>u)continue;let d=1/(i[c]*i[c]);f+=d*e[m].depth,b+=d}return b>0?f/b:e[s[0]].depth}function _t(e){let t=(o,r)=>Tt(e,o,r),n=(o,r)=>{let i=1/0,s=-1;for(let u=0;u<e.length;u++){let f=e[u];if(Math.hypot(o-f.cx,r-f.cy)-f.radius>=i)continue;let b=Te(f,o,r);b<i&&(i=b,s=u)}return s};return{kind:"rows",rowCount:e.length,rows:e,nearestRow:n,depthAt:t,gradientAt:(o,r)=>{let i=(t(o+.5,r)-t(o-.5,r))/1,s=(t(o,r+.5)-t(o,r-.5))/(2*.5),u=Math.hypot(i,s);return u<1e-9?[0,0]:[i/u,s/u]}}}function kt(e,t){let n=[];for(let o of e){let r=Ot(o.points,t);r&&n.push(r)}return n.length<2?Et(t):(n.sort((o,r)=>o.depth-r.depth),_t(n))}var Dt=/^\d{4}-\d{2}-\d{2}$/;function Lt(e){let t=Date.parse(e);return Number.isFinite(t)?Dt.test(e)?t+864e5:t:null}function _e(e,t=Date.now()){if(e.validUntil===void 0){if(e.status!=="approved")return!0;let o=e.assessedAt?Date.parse(e.assessedAt):Number.NaN;return Number.isFinite(o)&&(t instanceof Date?t.getTime():t)<=o+366*864e5}let n=Lt(e.validUntil);return n===null?!1:(t instanceof Date?t.getTime():t)<n}function ke(e){return e.status!=="draft"&&e.status!=="retracted"}function jt(e){return e==="exact-seat"?"Exact seat in the model":e==="row-representative"?"Representative row evidence":e==="section-representative"?"Representative section evidence":e==="floor-representative"?"Representative floor evidence":"Representative venue evidence"}function Nt(e){if(!e)return"No assessment date supplied";let t=new Date(e);return Number.isFinite(t.getTime())?`Assessed ${t.toISOString().slice(0,10)}`:"No assessment date supplied"}function Ft(){return{headline:"Generated view \xB7 unverified",model:"No geometry or event-configuration verification supplied",reality:"No real-world check supplied",coverage:"Selected chart seat",provenance:"Chart-derived model",freshness:"No current organizer-approved evidence matches this Event, venue revision, or renewal window",limitations:["Generated view is not surveyed sightline truth."]}}function Bt(e){let t=Nt(e.assessedAt);if(!e.validUntil)return t;let n=Date.parse(e.validUntil);return Number.isFinite(n)?`${t} \xB7 valid until ${e.validUntil.slice(0,10)}`:t}function Gt(e,t={}){if(!e||!ke(e)||!_e(e,t.now))return Ft();let n=e.evidenceKind==="synthetic-model",o=e.modelLevel==="configuration-verified"?"Event configuration verified":e.modelLevel==="geometry-verified"?"Venue geometry verified":n?"Versioned synthetic model":"Generated model \xB7 not verified",r=e.realityLevel==="actual-build-checked"?"Actual event build reality checked":e.realityLevel==="comparable-build-reference"?"Comparable-build reference only":"No real-world check supplied",i=n?"Synthetic model evidence":e.modelLevel==="configuration-verified"?"Configuration verified":e.modelLevel==="geometry-verified"?"Geometry verified":"Generated view \xB7 unverified",s=[...e.limitations??[],...n?["Synthetic demo; not surveyed or venue-certified."]:[]],u=e.modeledTarget?`${e.modeledTarget.label} \xB7 ${e.modeledTarget.clearRayCount}/${e.modeledTarget.totalRayCount} target rays clear \xB7 ${e.modeledTarget.classification} in bounded model \xB7 ${e.modeledTarget.methodLabel}`+(e.modeledTarget.occluderLabels?.length?` \xB7 modeled occluders: ${e.modeledTarget.occluderLabels.join(", ")}`:""):void 0;return u&&s.push("Modeled target is not a percentage of the show visible."),{headline:i,model:o,reality:r,coverage:jt(e.coverage),provenance:e.sourceLabel??e.approvedByRole??"Source not supplied",freshness:Bt(e),limitations:s,...u?{modeledTarget:u}:{}}}function Ut(e){let t=new Array(e);return Array.from({length:e},(n,o)=>o).sort((n,o)=>Math.abs(2*n-(e-1))-Math.abs(2*o-(e-1))||n-o).forEach((n,o)=>t[n]=o),t}function ie(e,t){let n=e.seatLabelStart??1,o=e.seatNumbering?.direction??"ltr",r=e.seatNumbering?.step??1,i=e.seatNumbering?.scheme??"decimal",s=e.seatNumbering?.prefix??"",u=e.seatNumbering?.endAt,f=e.seatCount;if(i==="updown"||i==="updown-descending"){let l=Math.ceil(f/2),h=i==="updown"?t<l?n+2*t:n-1+2*(f-t):t<l?n+2*(l-1-t):n+1+2*(t-l);return`${s}${h}`}let b=i==="odd"||i==="even"?2:r,c=u!=null&&Number.isFinite(u)?u-(f-1)*b:n,m=o==="center"?Ut(f)[t]:o==="rtl"?f-1-t:t,d;switch(i){case"odd":{let l=c%2===1?c:c+1;d=String(l+m*2);break}case"even":{let l=c%2===0?c:c+1;d=String(l+m*2);break}case"roman":d=de(c+m*r);break;case"letters-upper":d=oe(c+m*r,!1);break;case"letters-lower":d=oe(c+m*r,!0);break;default:d=String(c+m*r);break}return`${s}${d}`}function De(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function pe(e,t,n){return n?.label??`${e.label}-${ie(e,t)}`}function he(e,t,n,o){if(o?.displayLabel)return o.displayLabel;if(!n)return`${e.displayLabel??e.label}-${ie(e,t)}`;let r=De(n),i=n.displayOffset+t;return`${n.displayLabel}-${ie(r,i)}`}function Ht(e,t,n){return Math.max(t,Math.min(n,e))}function Vt(e){return Ht(e,0,1)}function Le(e){let t=Vt(e);return t*t*(3-2*t)}var jn=Math.PI/180;function L(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function be(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}var Y=Math.PI*2;function q(e){return Number.isFinite(e.x)&&Number.isFinite(e.y)}function zt(e,t,n){let o=t-e;if(n){for(;o<0;)o+=Y;for(;o>=Y;)o-=Y}else{for(;o>0;)o-=Y;for(;o<=-Y;)o+=Y}return o}function $t(e){return e.end}function ye(e){if(e.version!==1||e.closed!==!0||!q(e.start)||!Array.isArray(e.segments)||e.segments.length<2||e.segments.length>512)return!1;let t=e.start;for(let n of e.segments){if(!n||!q(n.end))return!1;if(n.kind==="line"){if(L(t,n.end)<=1e-9)return!1}else if(n.kind==="bezier"){if(!q(n.control1)||!q(n.control2)||L(t,n.end)<=1e-9)return!1}else if(n.kind==="arc"){if(!q(n.center)||!Number.isFinite(n.radius)||n.radius<=1e-6||Math.abs(L(t,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||Math.abs(L(n.end,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||L(t,n.end)<=1e-9)return!1}else return!1;t=n.end}return L(t,e.start)<=1e-4}function Kt(e,t,n){let o=1-n;return{x:o**3*e.x+3*o**2*n*t.control1.x+3*o*n**2*t.control2.x+n**3*t.end.x,y:o**3*e.y+3*o**2*n*t.control1.y+3*o*n**2*t.control2.y+n**3*t.end.y}}function Wt(e,t=2){if(!ye(e))throw new Error("Section outline path is invalid");let n=Math.max(.25,t),o=[{...e.start}],r=e.start;for(let i of e.segments){if(i.kind==="line")o.push({...i.end});else if(i.kind==="arc"){let s=Math.atan2(r.y-i.center.y,r.x-i.center.x),u=Math.atan2(i.end.y-i.center.y,i.end.x-i.center.x),f=zt(s,u,i.clockwise),b=Math.max(2,Math.ceil(Math.abs(f)*i.radius/n));for(let c=1;c<=b;c+=1){let m=s+f*c/b;o.push({x:i.center.x+Math.cos(m)*i.radius,y:i.center.y+Math.sin(m)*i.radius})}}else{let s=L(r,i.control1)+L(i.control1,i.control2)+L(i.control2,i.end),u=Math.max(2,Math.ceil(s/n));for(let f=1;f<=u;f+=1)o.push(Kt(r,i,f/u))}r=i.end}return L(o[o.length-1],o[0])<=1e-4&&o.pop(),o}function Xt(e,t,n){return Fe(e,r=>({x:r.x+t,y:r.y+n}))}function Fe(e,t,n=1,o=!1){return{...e,start:t(e.start),segments:e.segments.map(r=>r.kind==="line"?{...r,end:t(r.end)}:r.kind==="arc"?{...r,center:t(r.center),radius:r.radius*Math.abs(n),clockwise:o?!r.clockwise:r.clockwise,end:t(r.end)}:{...r,control1:t(r.control1),control2:t(r.control2),end:t(r.end)})}}var Be=45,me=150,Yt=60;function Ge(e){let t=Be/100;if(e<=t)return me;let n=Math.min(1,(e-t)/(1-t));return me-n*(me-Yt)}var je=.5523;function Ne(e,t){return Math.abs(e.x-t.x)<=1e-6&&Math.abs(e.y-t.y)<=1e-6}function qt(e){let t=[],n=[];for(e.forEach((o,r)=>{q(o)&&(t.length&&Ne(t[t.length-1],o)||(t.push({x:o.x,y:o.y}),n.push(r)))});t.length>1&&Ne(t[0],t[t.length-1]);)t.pop(),n.pop();return{points:t,sourceIndex:n}}function Jt(e,t,n){return He(e,{cornerSmoothing:t,...n})}var Ue=.5,Qt=4/3;function Zt(e,t,n){let o=t.x-e.x,r=t.y-e.y,i=Math.hypot(o,r);if(i<=1e-9)return{kind:"line",end:{...t}};let s=-r/i,u=o/i,f=n*Qt;return{kind:"bezier",control1:{x:e.x+o/3+s*f,y:e.y+r/3+u*f},control2:{x:e.x+o*2/3+s*f,y:e.y+r*2/3+u*f},end:{...t}}}function He(e,t){let{points:n,sourceIndex:o}=qt(e),r=n.length;if(r<3)return null;let i=Math.min(100,Math.max(0,t.cornerSmoothing??0))/100,s=t.edgeCurvature,u=new Array(r).fill(0);if(s?.length)for(let a=0;a<r;a+=1){let I=s[o[a]];u[a]=Number.isFinite(I)?Math.min(100,Math.max(-100,I))/100:0}let f=u.some(a=>Math.abs(a)>1e-6);if(i<=0&&!f)return null;let b=t.wideAngleThresholdDeg??Ge(i),c=[];for(let a=0;a<r;a+=1)c[a]=L(n[a],n[(a+1)%r]);let m=new Array(r).fill(0);for(let a=0;a<r;a+=1){let I=n[(a-1+r)%r],S=n[a],C=n[(a+1)%r],_={x:I.x-S.x,y:I.y-S.y},j={x:C.x-S.x,y:C.y-S.y},U=Math.hypot(_.x,_.y),H=Math.hypot(j.x,j.y);if(U<=1e-9||H<=1e-9)continue;let J=Math.min(1,Math.max(-1,(_.x*j.x+_.y*j.y)/(U*H))),w=Math.acos(J)*180/Math.PI;if(w<b)continue;let P=Le((w-b)/(180-b));m[a]=i*P*.5*Math.min(U,H)}for(let a=0;a<r;a+=1){let I=(a+1)%r,S=m[a]+m[I];if(S>c[a]&&S>1e-9){let C=c[a]/S;m[a]*=C,m[I]*=C}}let d=new Array(r),l=new Array(r);for(let a=0;a<r;a+=1){let I=n[(a-1+r)%r],S=n[a],C=n[(a+1)%r];if(m[a]<=1e-6){d[a]={...S},l[a]={...S};continue}let _=L(S,I)||1,j=L(S,C)||1;d[a]={x:S.x+(I.x-S.x)/_*m[a],y:S.y+(I.y-S.y)/_*m[a]},l[a]={x:S.x+(C.x-S.x)/j*m[a],y:S.y+(C.y-S.y)/j*m[a]}}if(m.every(a=>a<=1e-6)&&!f)return null;let h=[],A={...l[0]},p=A,x=(a,I)=>{if(L(p,a)<=1e-9)return;let S=u[I];Math.abs(S)>1e-6?h.push(Zt(p,a,S*Ue*c[I])):h.push({kind:"line",end:{...a}}),p=a};for(let a=1;a<=r;a+=1){let I=a%r,S=n[I];x(d[I],(a-1)%r),m[I]>1e-6&&L(d[I],l[I])>1e-9&&(h.push({kind:"bezier",control1:be(d[I],S,je),control2:be(l[I],S,je),end:{...l[I]}}),p=l[I])}if(!h.length)return null;let g=h[h.length-1];L(g.end,A)>1e-9&&(g.kind==="line"?g.end={...A}:h.push({kind:"line",end:{...A}}));let y={version:1,closed:!0,start:A,segments:h};return ye(y)?y:null}function en(e){let t=[],n=e.start;for(let r of e.segments)t.push(n),n=r.end;let o=[];for(let r=e.segments.length-1;r>=0;r-=1){let i=e.segments[r],s=t[r];i.kind==="line"?o.push({kind:"line",end:{...s}}):i.kind==="arc"?o.push({kind:"arc",center:{...i.center},radius:i.radius,clockwise:!i.clockwise,end:{...s}}):o.push({kind:"bezier",control1:{...i.control2},control2:{...i.control1},end:{...s}})}return{version:1,closed:!0,start:{...e.start},segments:o}}function Ve(e,t){let n=1-t,o=n*n*n,r=3*n*n*t,i=3*n*t*t,s=t*t*t;return{x:o*e.start.x+r*e.control1.x+i*e.control2.x+s*e.end.x,y:o*e.start.y+r*e.control1.y+i*e.control2.y+s*e.end.y}}function ze(e,t,n=192){if(!Number.isInteger(t)||t<1)throw new Error("Path point count must be a positive integer");if(t===1)return[Ve(e,.5)];let o=Array.from({length:n+1},(f,b)=>Ve(e,b/n)),r=new Float64Array(o.length);for(let f=1;f<o.length;f+=1){let b=o[f].x-o[f-1].x,c=o[f].y-o[f-1].y;r[f]=r[f-1]+Math.hypot(b,c)}let i=r[r.length-1];if(i<=1e-9)return Array.from({length:t},()=>({...e.start}));let s=[],u=1;for(let f=0;f<t;f+=1){let b=i*f/(t-1);for(;u<r.length-1&&r[u]<b;)u+=1;let c=r[u-1],m=r[u],d=m===c?0:(b-c)/(m-c);s.push({x:o[u-1].x+(o[u].x-o[u-1].x)*d,y:o[u-1].y+(o[u].y-o[u-1].y)*d})}return s}var Ke=.02291666666666667,Hn=1/Ke,tn=58,Se=tn*Ke;var nn=3,$e=0,xe=120,on=0,rn=45,sn=7;function ge(e,t,n,o){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):o}function cn(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=sn?e:nn}function We(e,t={}){let n=ge(t.floorBaseHeightM,$e,xe,0),o=Math.min(xe,n+cn(e.elevation)*Se),r=e.height===void 0?o:ge(e.height,$e,xe,o),i=ge(e.rake,on,rn,0);return{height:r,rake:i}}function Je(e){return e?e.accessibility&&e.accessibility.length?e.wheelchairSpaceType&&!e.accessibility.includes("wheelchair")?["wheelchair",...e.accessibility]:e.accessibility:e.wheelchairSpaceType?["wheelchair"]:e.accessible?["wheelchair"]:[]:[]}var se=Math.PI/180;var Z=16;function Me(e,t,n,o){let r=n*se,i=Math.cos(r),s=Math.sin(r);return{x:o.x+e*i-t*s,y:o.y+e*s+t*i}}function an(e){let{seatCount:t,seatSpacing:n,curve:o,rotation:r,origin:i}=e,s=[];if(e.path)return ze(e.path,t);if(t<=1)return t===1&&s.push({x:i.x,y:i.y}),s;if(o===0){for(let b=0;b<t;b++)s.push(Me(b*n,0,r,i));return s}let u=o/(t-1)*se,f=n/(2*Math.sin(Math.abs(u)/2));for(let b=0;b<t;b++){let c=b*u,m=f*Math.sin(c),d=-f+f*Math.cos(c);s.push(Me(m,d,r,i))}return s}function ln(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function un(e,t){let n=ln(e);return an(e).map((o,r)=>{let i=n.get(r),s=Je(i),u=pe(e,r,i),f={...e.commercial,...i?.commercial};return{index:r,x:o.x+(i?.dx??0),y:o.y+(i?.dy??0),label:u,displayLabel:he(e,r,t,i),categoryKey:i?.categoryKey??e.categoryKey,skipped:!!i?.skip,accessible:s.length>0,accessibility:s,wheelchairSpaceType:i?.wheelchairSpaceType,commercial:Object.values(f).some(b=>b!==void 0&&b!==!1&&b!=="")?f:void 0,glyph:i?.glyph,viewUrl:i?.viewFromSeatUrl??e.viewFromSeatUrl,viewMeta:i?.viewFromSeatUrl?i.viewFromSeatMeta:e.viewFromSeatMeta,labelStyle:i?.labelStyle}})}function ve(e){let t=[];for(let n of un(e))n.skipped||t.push({id:`${e.id}:${n.index}`,label:n.label,displayLabel:n.displayLabel===n.label?void 0:n.displayLabel,x:n.x,y:n.y,rowId:e.id,categoryKey:n.categoryKey,accessible:n.accessible||void 0,accessibility:n.accessibility.length?n.accessibility:void 0,wheelchairSpaceType:n.wheelchairSpaceType,commercial:n.commercial,glyph:n.glyph,viewUrl:n.viewUrl,viewMeta:n.viewMeta,labelStyle:n.labelStyle});return t}function fn(e){if(e.seatCountsBySide)return{...e.seatCountsBySide};let t=e.sides&&e.sides.length?e.sides:["top","bottom"],n=["top","bottom","left","right"].filter(i=>t.includes(i)),o={top:0,bottom:0,left:0,right:0};if(!n.length)return o;let r=Math.max(0,Math.round(e.seatCount));for(let i=0;i<r;i++)o[n[i%n.length]]+=1;return o}function dn(e){let t=[],n=Math.max(0,Math.round(e.seatCount));if(n===0)return t;let o=new Map((e.overrides??[]).map(c=>[c.index,c])),r=(c,m,d,l)=>{let h=o.get(c),A=Je(h),p=h?.label??`${e.label}-${c+1}`,x=e.displayLabel??e.label;return{index:c,label:p,displayLabel:h?.displayLabel??`${x}-${c+1}`,x:m+(h?.dx??0),y:d+(h?.dy??0),categoryKey:h?.categoryKey??e.categoryKey,skipped:!!h?.skip,accessible:A.length>0,accessibility:A,wheelchairSpaceType:h?.wheelchairSpaceType,commercial:h?.commercial,glyph:h?.glyph,viewUrl:h?.viewFromSeatUrl,viewMeta:h?.viewFromSeatUrl?h.viewFromSeatMeta:void 0,labelStyle:h?.labelStyle,...l?{side:l}:{}}};if(e.shape==="round"){let c=(e.radius??40)+Z,m=e.rotation*se,d=Math.max(0,Math.min(360,e.seatArc??360));if(d>=360||n===1){for(let p=0;p<n;p++){let x=m+p/n*2*Math.PI;t.push(r(p,e.center.x+c*Math.cos(x),e.center.y+c*Math.sin(x)))}return t}let l=d*se,h=(2*Math.PI-l)/2,A=m+h;for(let p=0;p<n;p++){let x=A+p/(n-1)*l;t.push(r(p,e.center.x+c*Math.cos(x),e.center.y+c*Math.sin(x)))}return t}let i=e.width??80,s=e.height??50,u=fn(e),f=["top","bottom","left","right"],b=0;for(let c of f){let m=u[c];for(let d=0;d<m;d++){let l,h;c==="top"?(l=-i/2+(d+.5)*i/m,h=-s/2-Z):c==="bottom"?(l=-i/2+(d+.5)*i/m,h=s/2+Z):c==="left"?(l=-i/2-Z,h=-s/2+(d+.5)*s/m):(l=i/2+Z,h=-s/2+(d+.5)*s/m);let A=Me(l,h,e.rotation,e.center);t.push(r(b++,A.x,A.y,c))}}return t}function Qe(e){return dn(e).filter(t=>!t.skipped).map(t=>({id:`${e.id}:${t.index}`,label:t.label,...t.displayLabel!==t.label?{displayLabel:t.displayLabel}:{},x:t.x,y:t.y,rowId:e.id,categoryKey:t.categoryKey,...t.accessible?{accessible:!0}:{},...t.accessibility.length?{accessibility:t.accessibility}:{},...t.wheelchairSpaceType?{wheelchairSpaceType:t.wheelchairSpaceType}:{},...t.commercial?{commercial:t.commercial}:{},...t.glyph?{glyph:t.glyph}:{},...t.viewUrl?{viewUrl:t.viewUrl}:{},...t.viewUrl&&t.viewMeta?{viewMeta:t.viewMeta}:{},...t.labelStyle?{labelStyle:t.labelStyle}:{}}))}function Ze(e){return[{id:`${e.id}:0`,label:e.label,...e.displayLabel&&e.displayLabel!==e.label?{displayLabel:e.displayLabel}:{},x:e.center.x,y:e.center.y,rowId:e.id,categoryKey:e.categoryKey,kind:"booth"}]}function Xe(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,s=t[o].y,u=t[r].x,f=t[r].y;s>e.y!=f>e.y&&e.x<(u-i)*(e.y-s)/(f-s)+i&&(n=!n)}return n}function pn(e,t){return t.some((n,o)=>{let r=t[(o+1)%t.length],i=(e.y-n.y)*(r.x-n.x)-(e.x-n.x)*(r.y-n.y);if(Math.abs(i)>1e-7)return!1;let s=(e.x-n.x)*(r.x-n.x)+(e.y-n.y)*(r.y-n.y),u=(r.x-n.x)**2+(r.y-n.y)**2;return s>=-1e-7&&s<=u+1e-7})}function Ye(e,t,n){return Xe(e,t)&&!(n??[]).some(o=>Xe(e,o)||pn(e,o))}function we(e){if(!e.length)return{x:0,y:0};let t=0,n=0;for(let o of e)t+=o.x,n+=o.y;return{x:t/e.length,y:n/e.length}}function hn(e){switch(e.type){case"row":{let t=ve(e);if(!t.length)return{x:e.origin.x,y:e.origin.y};let n=0,o=0;for(let r of t)n+=r.x,o+=r.y;return{x:n/t.length,y:o/t.length}}case"table":case"booth":return{x:e.center.x,y:e.center.y};case"gaArea":return we(e.points);case"section":return we(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?we(e.points):e.x!=null&&e.y!=null&&e.width!=null&&e.height!=null?{x:e.x+e.width/2,y:e.y+e.height/2}:{x:e.x??0,y:e.y??0};case"decorImage":return{x:e.x+e.width/2,y:e.y+e.height/2}}}function qe(e,t){return e.length===t.length&&e.every((n,o)=>n.x===t[o].x&&n.y===t[o].y)}function bn(e,t){if(e.type!=="gaArea"||!qe(e.points,t.outline))return!1;let n=e.holes??[],o=t.holes??[];return n.length===o.length&&n.every((r,i)=>qe(r,o[i]))}function et(e,t){let n=e.filter(s=>s.type==="section"),o="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0,r=hn(t);return(o?n.find(s=>(s.logicalSectionId??s.id)===o&&(bn(t,s)||Ye(r,s.outline,s.holes))):void 0)??n.find(s=>Ye(r,s.outline,s.holes))}function tt(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}var mn="__sl_ga__",Pe=1e5;function yn(e,t){return`${mn}${encodeURIComponent(e)}__${t+1}`}function xn(e){let t=e.inventorySegments;if(t===void 0)return!0;if(!Array.isArray(t)||t.length<1||t.length>256)return!1;let n=0,o=new Map;for(let r of t){if(!r||typeof r.sourceAreaId!="string"||!r.sourceAreaId.trim()||r.sourceAreaId.length>160||!Number.isInteger(r.startIndex)||r.startIndex<0||!Number.isInteger(r.count)||r.count<1||r.startIndex+r.count>Pe||(n+=r.count,n>Pe))return!1;let i=o.get(r.sourceAreaId)??[],s=r.startIndex+r.count;if(i.some(u=>r.startIndex<u.end&&s>u.start))return!1;i.push({start:r.startIndex,end:s}),o.set(r.sourceAreaId,i)}return n===e.capacity}function gn(e){let t=Math.min(Pe,Math.max(0,Math.floor(e.capacity)));return e.inventorySegments===void 0?t?[{sourceAreaId:e.id,startIndex:0,count:t}]:[]:xn(e)?e.inventorySegments.map(n=>({...n})):[]}function nt(e){return gn(e).flatMap(t=>Array.from({length:t.count},(n,o)=>yn(t.sourceAreaId,t.startIndex+o)))}var ce="__ungrouped__";function Sn(e){return e.type==="row"?ve(e).map(t=>t.label):e.type==="table"?Qe(e).map(t=>t.label):e.type==="booth"?Ze(e).map(t=>t.label):e.type==="gaArea"?nt(e):[]}function wn(e){return e.type==="row"||e.type==="table"||e.type==="booth"||e.type==="gaArea"}function ot(e){let t=tt(e),n=t.filter(s=>s.type==="section"),o=new Map;for(let s of n){let u=s.logicalSectionId??s.id;o.get(u)||o.set(u,{id:u,label:s.displayLabel||s.label||"Section",zone:s.zone,seatCount:0,objectIds:[],seatLabels:[]})}let r={id:ce,label:"Other seats",seatCount:0,objectIds:[],seatLabels:[]},i=new Map;for(let s of t){if(!wn(s))continue;let u=Sn(s);if(u.length===0)continue;let f=et(t,s),b=f?o.get(f.logicalSectionId??f.id):r;b.seatCount+=u.length,b.objectIds.push(s.id),b.seatLabels.push(...u),i.set(s.id,b.id)}return{sections:[...o.values()],ungrouped:r.objectIds.length?r:null,objectToSection:i}}function rt(e,t){return t.has(e.id)||!!e.logicalSectionId&&t.has(e.logicalSectionId)||!!e.zone&&t.has(e.zone)}function it(e,t){let n=new Set;if(!t.size)return n;let{sections:o,ungrouped:r,objectToSection:i}=ot(e),s=new Set,u=new Map(o.map(b=>[b.id,b.zone]));for(let b of o){let c=u.get(b.id);(t.has(b.id)||c&&t.has(c))&&s.add(b.id)}let f=!!r&&t.has(ce);for(let[b,c]of i)(s.has(c)||f&&c===ce)&&n.add(b);return n}function Mn(e,t){if(!t.size)return e;let n=it(e,t),o=t instanceof Set?t:new Set(t),r=s=>!(n.has(s.id)||s.type==="section"&&rt(s,o));if(e.floors&&e.floors.length){let s=!1,u=e.floors.map(f=>{let b=f.objects.filter(r);return b.length!==f.objects.length&&(s=!0),b.length===f.objects.length?f:{...f,objects:b}});return s?{...e,floors:u,objects:u[0].objects}:e}let i=e.objects.filter(r);return i.length===e.objects.length?e:{...e,objects:i}}0&&(module.exports={DEFAULT_SECTION_CORNER_SMOOTHING,MAX_EDGE_SAGITTA_RATIO,TIER_HEIGHT_M,UNGROUPED_ID,applyHidden,arcLevelAt,bearingDeg,buildSectionRake,computeSections,cornerSmoothingThresholdDeg,distanceToPolyline,fitBowlProfile,fitCircle,hiddenObjectIds,indexLabel,isSectionHidden,logicalNumberingRow,relabelRows,resolveSection,reverseSectionOutlinePath,sampleSectionOutlinePath,seatConfidenceDisclosure,seatDisplayLabel,seatInventoryLabel,seatLabelPart,sectionCornerSmoothingPath,sectionGeometry,sectionOutlinePathFrom,sectionPathSegmentEnd,toBijectiveBase,toLetters,toRoman,transformSectionOutlinePath,translateSectionOutlinePath,validSectionOutlinePath});
|
|
1
|
+
"use strict";var ae=Object.defineProperty;var st=Object.getOwnPropertyDescriptor;var ct=Object.getOwnPropertyNames;var at=Object.prototype.hasOwnProperty;var lt=(e,t)=>{for(var n in t)ae(e,n,{get:t[n],enumerable:!0})},ut=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ct(t))!at.call(e,r)&&r!==n&&ae(e,r,{get:()=>t[r],enumerable:!(o=st(t,r))||o.enumerable});return e};var ft=e=>ut(ae({},"__esModule",{value:!0}),e);var vn={};lt(vn,{DEFAULT_SECTION_CORNER_SMOOTHING:()=>Be,MAX_EDGE_SAGITTA_RATIO:()=>Ue,TIER_HEIGHT_M:()=>Se,UNGROUPED_ID:()=>ce,applyHidden:()=>Mn,arcLevelAt:()=>Pt,bearingDeg:()=>Re,buildSectionRake:()=>kt,computeSections:()=>ot,cornerSmoothingThresholdDeg:()=>Ge,distanceToPolyline:()=>ue,fitBowlProfile:()=>vt,fitCircle:()=>ee,hiddenObjectIds:()=>it,indexLabel:()=>Oe,isSectionHidden:()=>rt,logicalNumberingRow:()=>De,relabelRows:()=>Rt,resolveSection:()=>yt,reverseSectionOutlinePath:()=>en,sampleSectionOutlinePath:()=>Wt,seatConfidenceDisclosure:()=>Gt,seatDisplayLabel:()=>he,seatInventoryLabel:()=>pe,seatLabelPart:()=>ie,sectionCornerSmoothingPath:()=>Jt,sectionGeometry:()=>We,sectionOutlinePathFrom:()=>He,sectionPathSegmentEnd:()=>$t,toBijectiveBase:()=>fe,toLetters:()=>oe,toRoman:()=>de,transformSectionOutlinePath:()=>Fe,translateSectionOutlinePath:()=>Xt,validSectionOutlinePath:()=>ye});module.exports=ft(vn);function Ie(e){let t=e.length;return t<=3?[...e]:[e[Math.floor(t*.25)],e[Math.floor(t*.5)],e[Math.floor(t*.75)]]}function ue(e,t,n){if(!e.length)return 1/0;if(e.length===1)return Math.hypot(t-e[0].x,n-e[0].y);let o=1/0;for(let r=0;r+1<e.length;r++){let i=e[r],s=e[r+1],u=s.x-i.x,f=s.y-i.y,b=u*u+f*f,c=b>1e-12?((t-i.x)*u+(n-i.y)*f)/b:0;c<0?c=0:c>1&&(c=1);let m=Math.hypot(t-(i.x+c*u),n-(i.y+c*f));m<o&&(o=m)}return o}function dt(e){let t=0,n=0;for(let i of e)t+=i.x,n+=i.y;let o=e.length||1;t/=o,n/=o;let r=0;for(let i of e){let s=Math.hypot(i.x-t,i.y-n);s>r&&(r=s)}return{cx:t,cy:n,r}}function Ae(e,t){return Math.hypot(e.cx-t.cx,e.cy-t.cy)-e.r-t.r}function le(e,t){let n=1/0;for(let o of Ie(e)){let r=ue(t,o.x,o.y);r<n&&(n=r)}for(let o of Ie(t)){let r=ue(e,o.x,o.y);r<n&&(n=r)}return n}function pt(e,t){if(e.length<3)return{pts:e,seatIndices:t};let n=0,o=0;for(let c of e)n+=c.x,o+=c.y;n/=e.length,o/=e.length;let r=-1,i=e[0];for(let c of e){let m=Math.hypot(c.x-n,c.y-o);m>r&&(r=m,i=c)}let s=i.x-n,u=i.y-o,f=Math.hypot(s,u);f>1e-9?(s/=f,u/=f):(s=1,u=0);let b=e.map((c,m)=>({p:c,i:m,t:(c.x-n)*s+(c.y-o)*u})).sort((c,m)=>c.t-m.t);return{pts:b.map(c=>c.p),seatIndices:b.map(c=>t[c.i])}}function ee(e){let t=e.length;if(t<3)return null;let n=0,o=0;for(let g of e)n+=g.x,o+=g.y;n/=t,o/=t;let r=0,i=0,s=0,u=0,f=0,b=0,c=0;for(let g of e){let y=g.x-n,a=g.y-o;r+=y*y,s+=a*a,i+=y*a,u+=y*y*y,f+=a*a*a,b+=y*a*a,c+=a*y*y}let m=r*s-i*i;if(Math.abs(m)<1e-9)return null;let d=(u+b)/2,l=(f+c)/2,h=(d*s-l*i)/m,A=(l*r-d*i)/m,p=h+n,x=A+o;return!Number.isFinite(p)||!Number.isFinite(x)?null:{cx:p,cy:x}}var ht=.15;function bt(e){if(e.length<2)return null;let t=e.map(g=>{let y=0,a=0;for(let I of g.pts)y+=I.x,a+=I.y;return{x:y/g.pts.length,y:a/g.pts.length}}),n=0,o=0;for(let g of t)n+=g.x,o+=g.y;n/=t.length,o/=t.length;let r=0,i=0,s=0;for(let g of t){let y=g.x-n,a=g.y-o;r+=y*y,i+=y*a,s+=a*a}let u=r+s,f=r*s-i*i,b=u/2+Math.sqrt(Math.max(0,u*u/4-f)),c,m;Math.abs(i)>1e-12?(c=b-s,m=i):r>=s?(c=1,m=0):(c=0,m=1);let d=Math.hypot(c,m);if(!(d>1e-12))return null;c/=d,m/=d;let l=1/0,h=-1/0,A=[];for(let g of e){let y=1/0,a=-1/0;for(let I of g.pts){let S=I.x*c+I.y*m;S<y&&(y=S),S>a&&(a=S),S<l&&(l=S),S>h&&(h=S)}A.push(a-y)}let p=h-l;return p>1e-9?(A.sort((g,y)=>g-y),A[Math.min(A.length-1,Math.floor(A.length*.9))]/p<=mt?{x:c,y:m}:null):null}var mt=.35;function yt(e,t,n,o){let r=new Map;for(let p of n){let x=t[p],g=x.rowId||`__seat-${p}`,y=r.get(g);y||(y={pts:[],idx:[]},r.set(g,y)),y.pts.push({x:x.x,y:x.y}),y.idx.push(p)}if(!r.size)return{sectionId:e,rows:[],blockCount:0};let i=[];for(let[p,x]of r){let g=pt(x.pts,x.idx),y=0;for(let a of g.pts)y+=Math.hypot(a.x-o.x,a.y-o.y);i.push({id:p,pts:g.pts,seatIndices:g.seatIndices,blockId:-1,ordinal:0,blockDepth:0,focalDistance:y/g.pts.length})}let s=i.map(p=>dt(p.pts)),u=[];for(let p=0;p<i.length;p++){let x=1/0;for(let g=0;g<i.length;g++){if(p===g||Ae(s[p],s[g])>=x)continue;let y=le(i[p].pts,i[g].pts);y<x&&(x=y)}Number.isFinite(x)&&u.push(x)}u.sort((p,x)=>p-x);let f=u.length?u[Math.floor(u.length/2)]:1,b=Math.max(f*1.8,1e-6),c=i.map(()=>[]);for(let p=0;p<i.length;p++)for(let x=p+1;x<i.length;x++)Ae(s[p],s[x])>b||le(i[p].pts,i[x].pts)<=b&&(c[p].push(x),c[x].push(p));let m=0;for(let p=0;p<i.length;p++){if(i[p].blockId!==-1)continue;let x=m++,g=[p];for(i[p].blockId=x;g.length;){let y=g.pop();for(let a of c[y])i[a].blockId===-1&&(i[a].blockId=x,g.push(a))}}let d=new Map;for(let p of i){let x=d.get(p.blockId)??[];x.push(p),d.set(p.blockId,x)}let l=[];for(let p of i){if(p.pts.length<4)continue;let x=ee(p.pts);x&&(!Number.isFinite(x.cx)||!Number.isFinite(x.cy)||l.push({x:x.cx,y:x.cy}))}let h=l.length>=2?(()=>{let p=l.map(y=>y.x).sort((y,a)=>y-a),x=l.map(y=>y.y).sort((y,a)=>y-a),g=Math.floor(l.length/2);return{cx:p[g],cy:x[g]}})():null;if(h){let p=S=>Math.hypot(S.x-h.cx,S.y-h.cy),x=1/0,g=-1/0,y=[];for(let S of i){let C=1/0,_=-1/0;for(let j of S.pts){let U=p(j);U<C&&(C=U),U>_&&(_=U)}y.push(_-C),C<x&&(x=C),_>g&&(g=_)}let a=g-x;y.sort((S,C)=>S-C);let I=y[Math.min(y.length-1,Math.floor(y.length*.9))];if(a>1e-9&&I/a<=ht){let S=i.map(v=>{let D=0;for(let V of v.pts)D+=p(V);return{row:v,radius:D/v.pts.length}}),C=0,_=0;for(let v of S)C+=v.radius,_+=v.row.focalDistance;C/=S.length,_/=S.length;let j=0;for(let v of S)j+=(v.radius-C)*(v.row.focalDistance-_);if(j<0)for(let v of S)v.radius=-v.radius;let H=1/0;for(let v of S)v.radius<H&&(H=v.radius);S.sort((v,D)=>v.radius-D.radius);let J=-1,w=-1/0,P=a/Math.max(1,S.length)*.5,O=[];for(let v of S)v.radius-w>P&&(J++,w=v.radius),v.row.ordinal=J,v.row.blockDepth=v.radius-H,O.push(v.row);return{sectionId:e,rows:O,blockCount:m}}}let A=[];for(let[,p]of d){let x=bt(p);if(x){let g=a=>{let I=0;for(let S of a.pts)I+=S.x*x.x+S.y*x.y;return I/a.pts.length};p.sort((a,I)=>g(a)-g(I)),p.length>=2&&p[0].focalDistance>p[p.length-1].focalDistance&&p.reverse();let y=0;for(let a=0;a<p.length;a++)a>0&&(y+=le(p[a-1].pts,p[a].pts)),p[a].ordinal=a,p[a].blockDepth=y,A.push(p[a])}else{let g=1/0;for(let y of p)y.focalDistance<g&&(g=y.focalDistance);p.sort((y,a)=>y.focalDistance-a.focalDistance);for(let y=0;y<p.length;y++)p[y].ordinal=y,p[y].blockDepth=Math.max(0,p[y].focalDistance-g),A.push(p[y])}}return{sectionId:e,rows:A,blockCount:m}}var xt=Math.PI/180,R=96,gt=6,St=60,wt=150,Ce=.2,Mt=.35;function Re(e,t){let n=Math.atan2(t.x-e.x,t.y-e.y)/xt;return n<0?n+360:n}function te(e){if(!e.length)return NaN;let t=[...e].sort((n,o)=>n-o);return t[Math.floor(t.length/2)]}function ne(e,t,n=2){let o=e.length,r=new Float64Array(o);for(let i=0;i<o;i++){let s=0,u=0;for(let f=-n;f<=n;f++){let b=i+f;if(t)b=(b%o+o)%o;else if(b<0||b>=o)continue;s+=e[b],u++}r[i]=s/u}return r}function vt(e,t){let n=e.filter(d=>d.rows.length>=1);if(n.length<1)return null;let o=[],r=0,i=0,s=0;for(let d of n)for(let l of d.rows){for(let h of l.pts)r+=h.x,i+=h.y,s++;if(l.pts.length>=4){let h=ee(l.pts);h&&Number.isFinite(h.cx)&&Number.isFinite(h.cy)&&o.push({x:h.cx,y:h.cy})}}if(!s)return null;let u={x:r/s,y:i/s},f=u;if(o.length>=8){let d=te(o.map(x=>x.x)),l=te(o.map(x=>x.y)),h=0;for(let x of n)for(let g of x.rows)for(let y of g.pts){let a=Math.hypot(y.x-u.x,y.y-u.y);a>h&&(h=a)}let A=0,p=h*.2;for(let x of n)for(let g of x.rows)for(let y of g.pts)Math.hypot(y.x-d,y.y-l)<p&&A++;Math.hypot(d-u.x,l-u.y)<=h&&A/s<.01&&(f={x:d,y:l})}let b=[];for(let d of n){let l={sectionId:d.sectionId,rMin:1/0,rMax:-1/0,samples:[]};for(let h of d.rows)for(let A of h.pts){let p=Math.hypot(A.x-f.x,A.y-f.y),x=Math.min(R-1,Math.floor(Re(f,A)/(360/R)));l.samples.push({r:p,bin:x,levelM:h.levelM}),p<l.rMin&&(l.rMin=p),p>l.rMax&&(l.rMax=p)}l.samples.length&&b.push(l)}if(!b.length)return null;b.sort((d,l)=>d.rMin+d.rMax-(l.rMin+l.rMax));let c=[];for(let d of b){let l=!1;for(let h of c){let A=Math.min(d.rMax,h.rMax)-Math.max(d.rMin,h.rMin),p=Math.min(d.rMax-d.rMin,h.rMax-h.rMin);if(p>1e-9&&A>=Mt*p){h.members.push(d),h.rMin=Math.min(h.rMin,d.rMin),h.rMax=Math.max(h.rMax,d.rMax),l=!0;break}}l||c.push({members:[d],rMin:d.rMin,rMax:d.rMax})}let m=[];for(let d of c){let l=new Array(R).fill(null);for(let w of d.members)for(let P of w.samples){let O=l[P.bin];O||(O={samples:[]},l[P.bin]=O),O.samples.push({r:P.r,levelM:P.levelM})}let h=l.map(w=>!!w);if(!h.filter(Boolean).length)continue;let p=[],x=[];for(let w of l){if(!w)continue;let P=1/0,O=-1/0;for(let v of w.samples)v.r<P&&(P=v.r),v.r>O&&(O=v.r);p.push(P),x.push(O)}let g=te(p),y=te(x);if(!(g>=Ce*y)||!(y>0))continue;let a=[...p].sort((w,P)=>w-P);if(!(a[Math.floor(a.length*.1)]>=Ce*y))continue;let S=l.map(w=>{if(!w)return null;let P=[...w.samples].sort((k,N)=>k.r-N.r),O=P[0].r,v=P[P.length-1].r,D=P[0].levelM,V=-1/0;for(let k of P)k.levelM>V&&(V=k.levelM);let E=[];for(let k of P){let N={r:k.r,l:k.levelM};for(;E.length&&Math.abs(E[E.length-1].r-N.r)<1e-9;){if(E[E.length-1].l<=N.l){N.skip=!0;break}E.pop()}if(!N.skip){for(;E.length>=2;){let $=E[E.length-2],K=E[E.length-1];if((K.r-$.r)*(N.l-$.l)-(K.l-$.l)*(N.r-$.r)<=0)E.pop();else break}E.push(N)}}let B=E.map(k=>k.r),G=E.map(k=>k.l);return{inner:O,outer:v,front:D,top:V,profile:{rs:B,ls:G}}}),C=h.slice();for(let w=0;w<R;w++){if(C[w])continue;let P=-1,O=-1,v=0;for(let M=1;M<=R;M++){let T=(w-M+R*2)%R;if(C[T]){P=T;break}}for(let M=1;M<=R;M++){let T=(w+M)%R;if(C[T]){O=T,v=M;break}}if(P<0||O<0)continue;let D=0;for(let M=1;M<=R;M++){let T=(w-M+R*2)%R;if(h[T]){D=M;break}}if(D-1+v>gt)continue;let E=S[P],B=S[O],G=D/(D+v),k=E.inner+(B.inner-E.inner)*G,N=E.outer+(B.outer-E.outer)*G,$=E.front+(B.front-E.front)*G,K=E.top+(B.top-E.top)*G;S[w]={inner:k,outer:N,front:$,top:K,profile:{rs:[k,N],ls:[$,K]}}}for(let w=0;w<R;w++)S[w]&&(C[w]=!0);let _=360/R,j=[],U=C.filter(Boolean).length,H=[];if(U===R)H.push({start:0,len:R});else{let w=0;for(;C[w];)w=(w+1)%R;let P=-1;for(let O=0;O<=R;O++){let v=(w+O)%R,D=O<R&&C[v];if(D&&P<0)P=v;else if(!D&&P>=0){let V=(v-P+R)%R||R;H.push({start:P,len:V}),P=-1}}}for(let w of H){if(w.len*_<St&&w.len<R)continue;let P=w.len===R,O=new Float64Array(w.len),v=new Float64Array(w.len),D=new Float64Array(w.len),V=new Float64Array(w.len),E=[];for(let M=0;M<w.len;M++){let T=S[(w.start+M)%R];O[M]=T.inner,v[M]=T.outer,D[M]=T.front,V[M]=T.top,E.push(T.profile??{rs:[T.inner,T.outer],ls:[T.front,T.top]})}let B=ne(O,P),G=ne(v,P),k=ne(D,P),N=ne(V,P);for(let M=0;M<w.len;M++)B[M]>O[M]&&(B[M]=O[M]),G[M]<v[M]&&(G[M]=v[M]),B[M]>G[M]-1e-6&&(B[M]=Math.max(0,G[M]-1e-6)),N[M]<k[M]&&(N[M]=k[M]);let $={startBin:w.start,binCount:w.len,closed:P,innerR:B,outerR:G,frontLevelM:k,topLevelM:N,profiles:E},K=(M,T,F)=>{let Q=E[M],W=Q.rs,z=Q.ls;if(T<=W[0]){z[0]>F&&(z[0]=F);return}if(T>=W[W.length-1]){z[z.length-1]>F&&(z[z.length-1]=F);return}for(let X=0;X+1<W.length;X++)if(T<=W[X+1]){z[X]>F&&(z[X]=F),z[X+1]>F&&(z[X+1]=F);return}};for(let M=0;M<w.len;M++){let T=l[(w.start+M)%R];if(T)for(let F of T.samples){K(M,F.r,F.levelM);let Q=P?(M-1+w.len)%w.len:M-1,W=P?(M+1)%w.len:M+1;Q>=0&&K(Q,F.r,F.levelM),W<w.len&&K(W,F.r,F.levelM)}}j.push($)}j.reduce((w,P)=>w+P.binCount*_,0)<wt||m.push({arcs:j,sectionIds:d.members.map(w=>w.sectionId),innerRMedian:g,outerRMedian:y})}if(!m.length)return null;if(m.sort((d,l)=>d.innerRMedian-l.innerRMedian),t){let d=m[m.length-1].outerRMedian;if(Math.hypot(t.x-f.x,t.y-f.y)>.9*d)return null}return{centre:f,binCount:R,binStepDeg:360/R,rings:m}}function Pt(e,t,n,o){let r=e.binStepDeg,i=n/r-.5-t.startBin;i=(i%e.binCount+e.binCount)%e.binCount,i>t.binCount-1&&(t.closed?i=i-t.binCount<t.binCount-i?0:t.binCount-1:i=i-(t.binCount-1)<e.binCount-i?t.binCount-1:0);let s=Math.floor(i),u=t.closed?(s+1)%t.binCount:Math.min(t.binCount-1,s+1),f=i-s,b=c=>{let m=t.profiles[c],d=m.rs,l=m.ls;if(o<=d[0])return l[0];if(o>=d[d.length-1])return l[l.length-1];for(let h=0;h+1<d.length;h++)if(o<=d[h+1]){let A=d[h+1]-d[h],p=A>1e-9?(o-d[h])/A:0;return l[h]+(l[h+1]-l[h])*p}return l[l.length-1]};return b(s)*(1-f)+b(u)*f}var Ee="ABCDEFGHIJKLMNOPQRSTUVWXYZ",It="ABCDEFGHJKLMNPQRSTUVWXYZ",At="abcdefghijklmnopqrstuvwxyz";function fe(e,t){let n=t.length,o=e+1,r="";for(;o>0;){o-=1;let i=o%n;r=t[i]+r,o=Math.floor(o/n)}return r}function Oe(e,t){let n=t.startAt-1,o=e+n;if(t.scheme==="numbers")return String(o+1);let r=t.skipAmbiguous?It:Ee;return fe(o,r)}function oe(e,t=!1){let n=t?At:Ee;return fe(Math.max(0,Math.floor(e)-1),n)}var Ct=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]];function de(e){if(!Number.isFinite(e)||e<=0)return String(e);let t=Math.floor(e),n="";for(let[o,r]of Ct)for(;t>=o;)n+=r,t-=o;return n}function Rt(e,t){let n=e.length;return e.map((o,r)=>{let i=t.reverse?n-1-r:r;return{...o,label:Oe(i,t)}})}function Et(e){return{kind:"radial",rowCount:0,rows:[],nearestRow:()=>-1,depthAt:(t,n)=>Math.hypot(t-e.x,n-e.y),gradientAt:(t,n)=>{let o=t-e.x,r=n-e.y,i=Math.hypot(o,r);return i<1e-9?[0,0]:[o/i,r/i]}}}function Ot(e,t){if(!e.length)return null;let n=0,o=0,r=0;for(let l of e)n+=l.x,o+=l.y,r+=Math.hypot(l.x-t.x,l.y-t.y);let i=e.length;n/=i,o/=i,r/=i;let s=e[0],u=-1;for(let l of e){let h=Math.hypot(l.x-n,l.y-o);h>u&&(u=h,s=l)}let f=s.x-n,b=s.y-o,c=Math.hypot(f,b);c>1e-9?(f/=c,b/=c):(f=1,b=0);let m=[...e].sort((l,h)=>(l.x-n)*f+(l.y-o)*b-((h.x-n)*f+(h.y-o)*b)),d=0;for(let l of m){let h=Math.hypot(l.x-n,l.y-o);h>d&&(d=h)}return{pts:m,cx:n,cy:o,radius:d,depth:r}}function Te(e,t,n){let o=e.pts;if(o.length===1)return Math.hypot(t-o[0].x,n-o[0].y);let r=1/0;for(let i=0;i+1<o.length;i++){let s=o[i],u=o[i+1],f=u.x-s.x,b=u.y-s.y,c=f*f+b*b,m=c>1e-12?((t-s.x)*f+(n-s.y)*b)/c:0;m<0?m=0:m>1&&(m=1);let d=Math.hypot(t-(s.x+m*f),n-(s.y+m*b));d<r&&(r=d)}return r}var re=8;function Tt(e,t,n){let o=new Array(re).fill(1/0),r=new Array(re).fill(-1);for(let c=0;c<e.length;c++){let m=e[c],d=Math.hypot(t-m.cx,n-m.cy)-m.radius;for(let l=0;l<re;l++)if(d<o[l]){for(let h=re-1;h>l;h--)o[h]=o[h-1],r[h]=r[h-1];o[l]=d,r[l]=c;break}}let i=new Array(3).fill(1/0),s=new Array(3).fill(-1);for(let c of r){if(c<0)continue;let m=Te(e[c],t,n);for(let d=0;d<3;d++)if(m<i[d]){for(let l=2;l>d;l--)i[l]=i[l-1],s[l]=s[l-1];i[d]=m,s[d]=c;break}}if(s[0]<0)return 0;if(i[0]<1e-6)return e[s[0]].depth;let u=i[0]*2.2,f=0,b=0;for(let c=0;c<3;c++){let m=s[c];if(m<0||i[c]>u)continue;let d=1/(i[c]*i[c]);f+=d*e[m].depth,b+=d}return b>0?f/b:e[s[0]].depth}function _t(e){let t=(o,r)=>Tt(e,o,r),n=(o,r)=>{let i=1/0,s=-1;for(let u=0;u<e.length;u++){let f=e[u];if(Math.hypot(o-f.cx,r-f.cy)-f.radius>=i)continue;let b=Te(f,o,r);b<i&&(i=b,s=u)}return s};return{kind:"rows",rowCount:e.length,rows:e,nearestRow:n,depthAt:t,gradientAt:(o,r)=>{let i=(t(o+.5,r)-t(o-.5,r))/1,s=(t(o,r+.5)-t(o,r-.5))/(2*.5),u=Math.hypot(i,s);return u<1e-9?[0,0]:[i/u,s/u]}}}function kt(e,t){let n=[];for(let o of e){let r=Ot(o.points,t);r&&n.push(r)}return n.length<2?Et(t):(n.sort((o,r)=>o.depth-r.depth),_t(n))}var Dt=/^\d{4}-\d{2}-\d{2}$/;function Lt(e){let t=Date.parse(e);return Number.isFinite(t)?Dt.test(e)?t+864e5:t:null}function _e(e,t=Date.now()){if(e.validUntil===void 0){if(e.status!=="approved")return!0;let o=e.assessedAt?Date.parse(e.assessedAt):Number.NaN;return Number.isFinite(o)&&(t instanceof Date?t.getTime():t)<=o+366*864e5}let n=Lt(e.validUntil);return n===null?!1:(t instanceof Date?t.getTime():t)<n}function ke(e){return e.status!=="draft"&&e.status!=="retracted"}function jt(e){return e==="exact-seat"?"Exact seat in the model":e==="row-representative"?"Representative row evidence":e==="section-representative"?"Representative section evidence":e==="floor-representative"?"Representative floor evidence":"Representative venue evidence"}function Nt(e){if(!e)return"No assessment date supplied";let t=new Date(e);return Number.isFinite(t.getTime())?`Assessed ${t.toISOString().slice(0,10)}`:"No assessment date supplied"}function Ft(){return{headline:"Generated view \xB7 unverified",model:"No geometry or event-configuration verification supplied",reality:"No real-world check supplied",coverage:"Selected chart seat",provenance:"Chart-derived model",freshness:"No current organizer-approved evidence matches this Event, venue revision, or renewal window",limitations:["Generated view is not surveyed sightline truth."]}}function Bt(e){let t=Nt(e.assessedAt);if(!e.validUntil)return t;let n=Date.parse(e.validUntil);return Number.isFinite(n)?`${t} \xB7 valid until ${e.validUntil.slice(0,10)}`:t}function Gt(e,t={}){if(!e||!ke(e)||!_e(e,t.now))return Ft();let n=e.evidenceKind==="synthetic-model",o=e.modelLevel==="configuration-verified"?"Event configuration verified":e.modelLevel==="geometry-verified"?"Venue geometry verified":n?"Versioned synthetic model":"Generated model \xB7 not verified",r=e.realityLevel==="actual-build-checked"?"Actual event build reality checked":e.realityLevel==="comparable-build-reference"?"Comparable-build reference only":"No real-world check supplied",i=n?"Synthetic model evidence":e.modelLevel==="configuration-verified"?"Configuration verified":e.modelLevel==="geometry-verified"?"Geometry verified":"Generated view \xB7 unverified",s=[...e.limitations??[],...n?["Synthetic demo; not surveyed or venue-certified."]:[]],u=e.modeledTarget?`${e.modeledTarget.label} \xB7 ${e.modeledTarget.clearRayCount}/${e.modeledTarget.totalRayCount} target rays clear \xB7 ${e.modeledTarget.classification} in bounded model \xB7 ${e.modeledTarget.methodLabel}`+(e.modeledTarget.occluderLabels?.length?` \xB7 modeled occluders: ${e.modeledTarget.occluderLabels.join(", ")}`:""):void 0;return u&&s.push("Modeled target is not a percentage of the show visible."),{headline:i,model:o,reality:r,coverage:jt(e.coverage),provenance:e.sourceLabel??e.approvedByRole??"Source not supplied",freshness:Bt(e),limitations:s,...u?{modeledTarget:u}:{}}}function Ut(e){let t=new Array(e);return Array.from({length:e},(n,o)=>o).sort((n,o)=>Math.abs(2*n-(e-1))-Math.abs(2*o-(e-1))||n-o).forEach((n,o)=>t[n]=o),t}function ie(e,t){let n=e.seatLabelStart??1,o=e.seatNumbering?.direction??"ltr",r=e.seatNumbering?.step??1,i=e.seatNumbering?.scheme??"decimal",s=e.seatNumbering?.prefix??"",u=e.seatNumbering?.endAt,f=e.seatCount;if(i==="updown"||i==="updown-descending"){let l=Math.ceil(f/2),h=i==="updown"?t<l?n+2*t:n-1+2*(f-t):t<l?n+2*(l-1-t):n+1+2*(t-l);return`${s}${h}`}let b=i==="odd"||i==="even"?2:r,c=u!=null&&Number.isFinite(u)?u-(f-1)*b:n,m=o==="center"?Ut(f)[t]:o==="rtl"?f-1-t:t,d;switch(i){case"odd":{let l=c%2===1?c:c+1;d=String(l+m*2);break}case"even":{let l=c%2===0?c:c+1;d=String(l+m*2);break}case"roman":d=de(c+m*r);break;case"letters-upper":d=oe(c+m*r,!1);break;case"letters-lower":d=oe(c+m*r,!0);break;default:d=String(c+m*r);break}return`${s}${d}`}function De(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function pe(e,t,n){return n?.label??`${e.label}-${ie(e,t)}`}function he(e,t,n,o){if(o?.displayLabel)return o.displayLabel;if(!n)return`${e.displayLabel||e.label}-${ie(e,t)}`;let r=De(n),i=n.displayOffset+t;return`${n.displayLabel}-${ie(r,i)}`}function Ht(e,t,n){return Math.max(t,Math.min(n,e))}function Vt(e){return Ht(e,0,1)}function Le(e){let t=Vt(e);return t*t*(3-2*t)}var jn=Math.PI/180;function L(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function be(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}var Y=Math.PI*2;function q(e){return Number.isFinite(e.x)&&Number.isFinite(e.y)}function zt(e,t,n){let o=t-e;if(n){for(;o<0;)o+=Y;for(;o>=Y;)o-=Y}else{for(;o>0;)o-=Y;for(;o<=-Y;)o+=Y}return o}function $t(e){return e.end}function ye(e){if(e.version!==1||e.closed!==!0||!q(e.start)||!Array.isArray(e.segments)||e.segments.length<2||e.segments.length>512)return!1;let t=e.start;for(let n of e.segments){if(!n||!q(n.end))return!1;if(n.kind==="line"){if(L(t,n.end)<=1e-9)return!1}else if(n.kind==="bezier"){if(!q(n.control1)||!q(n.control2)||L(t,n.end)<=1e-9)return!1}else if(n.kind==="arc"){if(!q(n.center)||!Number.isFinite(n.radius)||n.radius<=1e-6||Math.abs(L(t,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||Math.abs(L(n.end,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||L(t,n.end)<=1e-9)return!1}else return!1;t=n.end}return L(t,e.start)<=1e-4}function Kt(e,t,n){let o=1-n;return{x:o**3*e.x+3*o**2*n*t.control1.x+3*o*n**2*t.control2.x+n**3*t.end.x,y:o**3*e.y+3*o**2*n*t.control1.y+3*o*n**2*t.control2.y+n**3*t.end.y}}function Wt(e,t=2){if(!ye(e))throw new Error("Section outline path is invalid");let n=Math.max(.25,t),o=[{...e.start}],r=e.start;for(let i of e.segments){if(i.kind==="line")o.push({...i.end});else if(i.kind==="arc"){let s=Math.atan2(r.y-i.center.y,r.x-i.center.x),u=Math.atan2(i.end.y-i.center.y,i.end.x-i.center.x),f=zt(s,u,i.clockwise),b=Math.max(2,Math.ceil(Math.abs(f)*i.radius/n));for(let c=1;c<=b;c+=1){let m=s+f*c/b;o.push({x:i.center.x+Math.cos(m)*i.radius,y:i.center.y+Math.sin(m)*i.radius})}}else{let s=L(r,i.control1)+L(i.control1,i.control2)+L(i.control2,i.end),u=Math.max(2,Math.ceil(s/n));for(let f=1;f<=u;f+=1)o.push(Kt(r,i,f/u))}r=i.end}return L(o[o.length-1],o[0])<=1e-4&&o.pop(),o}function Xt(e,t,n){return Fe(e,r=>({x:r.x+t,y:r.y+n}))}function Fe(e,t,n=1,o=!1){return{...e,start:t(e.start),segments:e.segments.map(r=>r.kind==="line"?{...r,end:t(r.end)}:r.kind==="arc"?{...r,center:t(r.center),radius:r.radius*Math.abs(n),clockwise:o?!r.clockwise:r.clockwise,end:t(r.end)}:{...r,control1:t(r.control1),control2:t(r.control2),end:t(r.end)})}}var Be=45,me=150,Yt=60;function Ge(e){let t=Be/100;if(e<=t)return me;let n=Math.min(1,(e-t)/(1-t));return me-n*(me-Yt)}var je=.5523;function Ne(e,t){return Math.abs(e.x-t.x)<=1e-6&&Math.abs(e.y-t.y)<=1e-6}function qt(e){let t=[],n=[];for(e.forEach((o,r)=>{q(o)&&(t.length&&Ne(t[t.length-1],o)||(t.push({x:o.x,y:o.y}),n.push(r)))});t.length>1&&Ne(t[0],t[t.length-1]);)t.pop(),n.pop();return{points:t,sourceIndex:n}}function Jt(e,t,n){return He(e,{cornerSmoothing:t,...n})}var Ue=.5,Qt=4/3;function Zt(e,t,n){let o=t.x-e.x,r=t.y-e.y,i=Math.hypot(o,r);if(i<=1e-9)return{kind:"line",end:{...t}};let s=-r/i,u=o/i,f=n*Qt;return{kind:"bezier",control1:{x:e.x+o/3+s*f,y:e.y+r/3+u*f},control2:{x:e.x+o*2/3+s*f,y:e.y+r*2/3+u*f},end:{...t}}}function He(e,t){let{points:n,sourceIndex:o}=qt(e),r=n.length;if(r<3)return null;let i=Math.min(100,Math.max(0,t.cornerSmoothing??0))/100,s=t.edgeCurvature,u=new Array(r).fill(0);if(s?.length)for(let a=0;a<r;a+=1){let I=s[o[a]];u[a]=Number.isFinite(I)?Math.min(100,Math.max(-100,I))/100:0}let f=u.some(a=>Math.abs(a)>1e-6);if(i<=0&&!f)return null;let b=t.wideAngleThresholdDeg??Ge(i),c=[];for(let a=0;a<r;a+=1)c[a]=L(n[a],n[(a+1)%r]);let m=new Array(r).fill(0);for(let a=0;a<r;a+=1){let I=n[(a-1+r)%r],S=n[a],C=n[(a+1)%r],_={x:I.x-S.x,y:I.y-S.y},j={x:C.x-S.x,y:C.y-S.y},U=Math.hypot(_.x,_.y),H=Math.hypot(j.x,j.y);if(U<=1e-9||H<=1e-9)continue;let J=Math.min(1,Math.max(-1,(_.x*j.x+_.y*j.y)/(U*H))),w=Math.acos(J)*180/Math.PI;if(w<b)continue;let P=Le((w-b)/(180-b));m[a]=i*P*.5*Math.min(U,H)}for(let a=0;a<r;a+=1){let I=(a+1)%r,S=m[a]+m[I];if(S>c[a]&&S>1e-9){let C=c[a]/S;m[a]*=C,m[I]*=C}}let d=new Array(r),l=new Array(r);for(let a=0;a<r;a+=1){let I=n[(a-1+r)%r],S=n[a],C=n[(a+1)%r];if(m[a]<=1e-6){d[a]={...S},l[a]={...S};continue}let _=L(S,I)||1,j=L(S,C)||1;d[a]={x:S.x+(I.x-S.x)/_*m[a],y:S.y+(I.y-S.y)/_*m[a]},l[a]={x:S.x+(C.x-S.x)/j*m[a],y:S.y+(C.y-S.y)/j*m[a]}}if(m.every(a=>a<=1e-6)&&!f)return null;let h=[],A={...l[0]},p=A,x=(a,I)=>{if(L(p,a)<=1e-9)return;let S=u[I];Math.abs(S)>1e-6?h.push(Zt(p,a,S*Ue*c[I])):h.push({kind:"line",end:{...a}}),p=a};for(let a=1;a<=r;a+=1){let I=a%r,S=n[I];x(d[I],(a-1)%r),m[I]>1e-6&&L(d[I],l[I])>1e-9&&(h.push({kind:"bezier",control1:be(d[I],S,je),control2:be(l[I],S,je),end:{...l[I]}}),p=l[I])}if(!h.length)return null;let g=h[h.length-1];L(g.end,A)>1e-9&&(g.kind==="line"?g.end={...A}:h.push({kind:"line",end:{...A}}));let y={version:1,closed:!0,start:A,segments:h};return ye(y)?y:null}function en(e){let t=[],n=e.start;for(let r of e.segments)t.push(n),n=r.end;let o=[];for(let r=e.segments.length-1;r>=0;r-=1){let i=e.segments[r],s=t[r];i.kind==="line"?o.push({kind:"line",end:{...s}}):i.kind==="arc"?o.push({kind:"arc",center:{...i.center},radius:i.radius,clockwise:!i.clockwise,end:{...s}}):o.push({kind:"bezier",control1:{...i.control2},control2:{...i.control1},end:{...s}})}return{version:1,closed:!0,start:{...e.start},segments:o}}function Ve(e,t){let n=1-t,o=n*n*n,r=3*n*n*t,i=3*n*t*t,s=t*t*t;return{x:o*e.start.x+r*e.control1.x+i*e.control2.x+s*e.end.x,y:o*e.start.y+r*e.control1.y+i*e.control2.y+s*e.end.y}}function ze(e,t,n=192){if(!Number.isInteger(t)||t<1)throw new Error("Path point count must be a positive integer");if(t===1)return[Ve(e,.5)];let o=Array.from({length:n+1},(f,b)=>Ve(e,b/n)),r=new Float64Array(o.length);for(let f=1;f<o.length;f+=1){let b=o[f].x-o[f-1].x,c=o[f].y-o[f-1].y;r[f]=r[f-1]+Math.hypot(b,c)}let i=r[r.length-1];if(i<=1e-9)return Array.from({length:t},()=>({...e.start}));let s=[],u=1;for(let f=0;f<t;f+=1){let b=i*f/(t-1);for(;u<r.length-1&&r[u]<b;)u+=1;let c=r[u-1],m=r[u],d=m===c?0:(b-c)/(m-c);s.push({x:o[u-1].x+(o[u].x-o[u-1].x)*d,y:o[u-1].y+(o[u].y-o[u-1].y)*d})}return s}var Ke=.02291666666666667,Hn=1/Ke,tn=58,Se=tn*Ke;var nn=3,$e=0,xe=120,on=0,rn=45,sn=7;function ge(e,t,n,o){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):o}function cn(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=sn?e:nn}function We(e,t={}){let n=ge(t.floorBaseHeightM,$e,xe,0),o=Math.min(xe,n+cn(e.elevation)*Se),r=e.height===void 0?o:ge(e.height,$e,xe,o),i=ge(e.rake,on,rn,0);return{height:r,rake:i}}function Je(e){return e?e.accessibility&&e.accessibility.length?e.wheelchairSpaceType&&!e.accessibility.includes("wheelchair")?["wheelchair",...e.accessibility]:e.accessibility:e.wheelchairSpaceType?["wheelchair"]:e.accessible?["wheelchair"]:[]:[]}var se=Math.PI/180;var Z=16;function Me(e,t,n,o){let r=n*se,i=Math.cos(r),s=Math.sin(r);return{x:o.x+e*i-t*s,y:o.y+e*s+t*i}}function an(e){let{seatCount:t,seatSpacing:n,curve:o,rotation:r,origin:i}=e,s=[];if(e.path)return ze(e.path,t);if(t<=1)return t===1&&s.push({x:i.x,y:i.y}),s;if(o===0){for(let b=0;b<t;b++)s.push(Me(b*n,0,r,i));return s}let u=o/(t-1)*se,f=n/(2*Math.sin(Math.abs(u)/2));for(let b=0;b<t;b++){let c=b*u,m=f*Math.sin(c),d=-f+f*Math.cos(c);s.push(Me(m,d,r,i))}return s}function ln(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function un(e,t){let n=ln(e);return an(e).map((o,r)=>{let i=n.get(r),s=Je(i),u=pe(e,r,i),f={...e.commercial,...i?.commercial};return{index:r,x:o.x+(i?.dx??0),y:o.y+(i?.dy??0),label:u,displayLabel:he(e,r,t,i),categoryKey:i?.categoryKey??e.categoryKey,skipped:!!i?.skip,accessible:s.length>0,accessibility:s,wheelchairSpaceType:i?.wheelchairSpaceType,commercial:Object.values(f).some(b=>b!==void 0&&b!==!1&&b!=="")?f:void 0,glyph:i?.glyph,viewUrl:i?.viewFromSeatUrl??e.viewFromSeatUrl,viewMeta:i?.viewFromSeatUrl?i.viewFromSeatMeta:e.viewFromSeatMeta,labelStyle:i?.labelStyle}})}function ve(e){let t=[];for(let n of un(e))n.skipped||t.push({id:`${e.id}:${n.index}`,label:n.label,displayLabel:n.displayLabel===n.label?void 0:n.displayLabel,x:n.x,y:n.y,rowId:e.id,categoryKey:n.categoryKey,accessible:n.accessible||void 0,accessibility:n.accessibility.length?n.accessibility:void 0,wheelchairSpaceType:n.wheelchairSpaceType,commercial:n.commercial,glyph:n.glyph,viewUrl:n.viewUrl,viewMeta:n.viewMeta,labelStyle:n.labelStyle});return t}function fn(e){if(e.seatCountsBySide)return{...e.seatCountsBySide};let t=e.sides&&e.sides.length?e.sides:["top","bottom"],n=["top","bottom","left","right"].filter(i=>t.includes(i)),o={top:0,bottom:0,left:0,right:0};if(!n.length)return o;let r=Math.max(0,Math.round(e.seatCount));for(let i=0;i<r;i++)o[n[i%n.length]]+=1;return o}function dn(e){let t=[],n=Math.max(0,Math.round(e.seatCount));if(n===0)return t;let o=new Map((e.overrides??[]).map(c=>[c.index,c])),r=(c,m,d,l)=>{let h=o.get(c),A=Je(h),p=h?.label??`${e.label}-${c+1}`,x=e.displayLabel??e.label;return{index:c,label:p,displayLabel:h?.displayLabel??`${x}-${c+1}`,x:m+(h?.dx??0),y:d+(h?.dy??0),categoryKey:h?.categoryKey??e.categoryKey,skipped:!!h?.skip,accessible:A.length>0,accessibility:A,wheelchairSpaceType:h?.wheelchairSpaceType,commercial:h?.commercial,glyph:h?.glyph,viewUrl:h?.viewFromSeatUrl,viewMeta:h?.viewFromSeatUrl?h.viewFromSeatMeta:void 0,labelStyle:h?.labelStyle,...l?{side:l}:{}}};if(e.shape==="round"){let c=(e.radius??40)+Z,m=e.rotation*se,d=Math.max(0,Math.min(360,e.seatArc??360));if(d>=360||n===1){for(let p=0;p<n;p++){let x=m+p/n*2*Math.PI;t.push(r(p,e.center.x+c*Math.cos(x),e.center.y+c*Math.sin(x)))}return t}let l=d*se,h=(2*Math.PI-l)/2,A=m+h;for(let p=0;p<n;p++){let x=A+p/(n-1)*l;t.push(r(p,e.center.x+c*Math.cos(x),e.center.y+c*Math.sin(x)))}return t}let i=e.width??80,s=e.height??50,u=fn(e),f=["top","bottom","left","right"],b=0;for(let c of f){let m=u[c];for(let d=0;d<m;d++){let l,h;c==="top"?(l=-i/2+(d+.5)*i/m,h=-s/2-Z):c==="bottom"?(l=-i/2+(d+.5)*i/m,h=s/2+Z):c==="left"?(l=-i/2-Z,h=-s/2+(d+.5)*s/m):(l=i/2+Z,h=-s/2+(d+.5)*s/m);let A=Me(l,h,e.rotation,e.center);t.push(r(b++,A.x,A.y,c))}}return t}function Qe(e){return dn(e).filter(t=>!t.skipped).map(t=>({id:`${e.id}:${t.index}`,label:t.label,...t.displayLabel!==t.label?{displayLabel:t.displayLabel}:{},x:t.x,y:t.y,rowId:e.id,categoryKey:t.categoryKey,...t.accessible?{accessible:!0}:{},...t.accessibility.length?{accessibility:t.accessibility}:{},...t.wheelchairSpaceType?{wheelchairSpaceType:t.wheelchairSpaceType}:{},...t.commercial?{commercial:t.commercial}:{},...t.glyph?{glyph:t.glyph}:{},...t.viewUrl?{viewUrl:t.viewUrl}:{},...t.viewUrl&&t.viewMeta?{viewMeta:t.viewMeta}:{},...t.labelStyle?{labelStyle:t.labelStyle}:{}}))}function Ze(e){return[{id:`${e.id}:0`,label:e.label,...e.displayLabel&&e.displayLabel!==e.label?{displayLabel:e.displayLabel}:{},x:e.center.x,y:e.center.y,rowId:e.id,categoryKey:e.categoryKey,kind:"booth"}]}function Xe(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,s=t[o].y,u=t[r].x,f=t[r].y;s>e.y!=f>e.y&&e.x<(u-i)*(e.y-s)/(f-s)+i&&(n=!n)}return n}function pn(e,t){return t.some((n,o)=>{let r=t[(o+1)%t.length],i=(e.y-n.y)*(r.x-n.x)-(e.x-n.x)*(r.y-n.y);if(Math.abs(i)>1e-7)return!1;let s=(e.x-n.x)*(r.x-n.x)+(e.y-n.y)*(r.y-n.y),u=(r.x-n.x)**2+(r.y-n.y)**2;return s>=-1e-7&&s<=u+1e-7})}function Ye(e,t,n){return Xe(e,t)&&!(n??[]).some(o=>Xe(e,o)||pn(e,o))}function we(e){if(!e.length)return{x:0,y:0};let t=0,n=0;for(let o of e)t+=o.x,n+=o.y;return{x:t/e.length,y:n/e.length}}function hn(e){switch(e.type){case"row":{let t=ve(e);if(!t.length)return{x:e.origin.x,y:e.origin.y};let n=0,o=0;for(let r of t)n+=r.x,o+=r.y;return{x:n/t.length,y:o/t.length}}case"table":case"booth":return{x:e.center.x,y:e.center.y};case"gaArea":return we(e.points);case"section":return we(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?we(e.points):e.x!=null&&e.y!=null&&e.width!=null&&e.height!=null?{x:e.x+e.width/2,y:e.y+e.height/2}:{x:e.x??0,y:e.y??0};case"decorImage":return{x:e.x+e.width/2,y:e.y+e.height/2}}}function qe(e,t){return e.length===t.length&&e.every((n,o)=>n.x===t[o].x&&n.y===t[o].y)}function bn(e,t){if(e.type!=="gaArea"||!qe(e.points,t.outline))return!1;let n=e.holes??[],o=t.holes??[];return n.length===o.length&&n.every((r,i)=>qe(r,o[i]))}function et(e,t){let n=e.filter(s=>s.type==="section"),o="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0,r=hn(t);return(o?n.find(s=>(s.logicalSectionId??s.id)===o&&(bn(t,s)||Ye(r,s.outline,s.holes))):void 0)??n.find(s=>Ye(r,s.outline,s.holes))}function tt(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}var mn="__sl_ga__",Pe=1e5;function yn(e,t){return`${mn}${encodeURIComponent(e)}__${t+1}`}function xn(e){let t=e.inventorySegments;if(t===void 0)return!0;if(!Array.isArray(t)||t.length<1||t.length>256)return!1;let n=0,o=new Map;for(let r of t){if(!r||typeof r.sourceAreaId!="string"||!r.sourceAreaId.trim()||r.sourceAreaId.length>160||!Number.isInteger(r.startIndex)||r.startIndex<0||!Number.isInteger(r.count)||r.count<1||r.startIndex+r.count>Pe||(n+=r.count,n>Pe))return!1;let i=o.get(r.sourceAreaId)??[],s=r.startIndex+r.count;if(i.some(u=>r.startIndex<u.end&&s>u.start))return!1;i.push({start:r.startIndex,end:s}),o.set(r.sourceAreaId,i)}return n===e.capacity}function gn(e){let t=Math.min(Pe,Math.max(0,Math.floor(e.capacity)));return e.inventorySegments===void 0?t?[{sourceAreaId:e.id,startIndex:0,count:t}]:[]:xn(e)?e.inventorySegments.map(n=>({...n})):[]}function nt(e){return gn(e).flatMap(t=>Array.from({length:t.count},(n,o)=>yn(t.sourceAreaId,t.startIndex+o)))}var ce="__ungrouped__";function Sn(e){return e.type==="row"?ve(e).map(t=>t.label):e.type==="table"?Qe(e).map(t=>t.label):e.type==="booth"?Ze(e).map(t=>t.label):e.type==="gaArea"?nt(e):[]}function wn(e){return e.type==="row"||e.type==="table"||e.type==="booth"||e.type==="gaArea"}function ot(e){let t=tt(e),n=t.filter(s=>s.type==="section"),o=new Map;for(let s of n){let u=s.logicalSectionId??s.id;o.get(u)||o.set(u,{id:u,label:s.displayLabel||s.label||"Section",zone:s.zone,seatCount:0,objectIds:[],seatLabels:[]})}let r={id:ce,label:"Other seats",seatCount:0,objectIds:[],seatLabels:[]},i=new Map;for(let s of t){if(!wn(s))continue;let u=Sn(s);if(u.length===0)continue;let f=et(t,s),b=f?o.get(f.logicalSectionId??f.id):r;b.seatCount+=u.length,b.objectIds.push(s.id),b.seatLabels.push(...u),i.set(s.id,b.id)}return{sections:[...o.values()],ungrouped:r.objectIds.length?r:null,objectToSection:i}}function rt(e,t){return t.has(e.id)||!!e.logicalSectionId&&t.has(e.logicalSectionId)||!!e.zone&&t.has(e.zone)}function it(e,t){let n=new Set;if(!t.size)return n;let{sections:o,ungrouped:r,objectToSection:i}=ot(e),s=new Set,u=new Map(o.map(b=>[b.id,b.zone]));for(let b of o){let c=u.get(b.id);(t.has(b.id)||c&&t.has(c))&&s.add(b.id)}let f=!!r&&t.has(ce);for(let[b,c]of i)(s.has(c)||f&&c===ce)&&n.add(b);return n}function Mn(e,t){if(!t.size)return e;let n=it(e,t),o=t instanceof Set?t:new Set(t),r=s=>!(n.has(s.id)||s.type==="section"&&rt(s,o));if(e.floors&&e.floors.length){let s=!1,u=e.floors.map(f=>{let b=f.objects.filter(r);return b.length!==f.objects.length&&(s=!0),b.length===f.objects.length?f:{...f,objects:b}});return s?{...e,floors:u,objects:u[0].objects}:e}let i=e.objects.filter(r);return i.length===e.objects.length?e:{...e,objects:i}}0&&(module.exports={DEFAULT_SECTION_CORNER_SMOOTHING,MAX_EDGE_SAGITTA_RATIO,TIER_HEIGHT_M,UNGROUPED_ID,applyHidden,arcLevelAt,bearingDeg,buildSectionRake,computeSections,cornerSmoothingThresholdDeg,distanceToPolyline,fitBowlProfile,fitCircle,hiddenObjectIds,indexLabel,isSectionHidden,logicalNumberingRow,relabelRows,resolveSection,reverseSectionOutlinePath,sampleSectionOutlinePath,seatConfidenceDisclosure,seatDisplayLabel,seatInventoryLabel,seatLabelPart,sectionCornerSmoothingPath,sectionGeometry,sectionOutlinePathFrom,sectionPathSegmentEnd,toBijectiveBase,toLetters,toRoman,transformSectionOutlinePath,translateSectionOutlinePath,validSectionOutlinePath});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { P as Point, R as RowObject, j as SeatOverride } from '../../types-
|
|
2
|
-
export { D as DEFAULT_SECTION_CORNER_SMOOTHING, M as MAX_EDGE_SAGITTA_RATIO, R as RelabelOptions, S as SectionOutlineDerivation, c as cornerSmoothingThresholdDeg, i as indexLabel, r as relabelRows, a as reverseSectionOutlinePath, s as sampleSectionOutlinePath, b as sectionCornerSmoothingPath, d as sectionOutlinePathFrom, e as sectionPathSegmentEnd, t as toBijectiveBase, f as toLetters, g as toRoman, h as transformSectionOutlinePath, j as translateSectionOutlinePath, v as validSectionOutlinePath } from '../../labeling-
|
|
1
|
+
import { P as Point, R as RowObject, j as SeatOverride } from '../../types-Dx4jA8aI.cjs';
|
|
2
|
+
export { D as DEFAULT_SECTION_CORNER_SMOOTHING, M as MAX_EDGE_SAGITTA_RATIO, R as RelabelOptions, S as SectionOutlineDerivation, c as cornerSmoothingThresholdDeg, i as indexLabel, r as relabelRows, a as reverseSectionOutlinePath, s as sampleSectionOutlinePath, b as sectionCornerSmoothingPath, d as sectionOutlinePathFrom, e as sectionPathSegmentEnd, t as toBijectiveBase, f as toLetters, g as toRoman, h as transformSectionOutlinePath, j as translateSectionOutlinePath, v as validSectionOutlinePath } from '../../labeling-iugoy25P.cjs';
|
|
3
3
|
export { SeatConfidenceDisclosure, seatConfidenceDisclosure } from '../seatConfidence.cjs';
|
|
4
|
-
import { S as SegmentedRowPlacement } from '../../segmentedRowModel-
|
|
5
|
-
export { A as AvailabilityRule, S as SectionNode, T as TIER_HEIGHT_M, U as UNGROUPED_ID, a as applyHidden, c as computeSections, h as hiddenObjectIds, i as isSectionHidden, s as sectionGeometry } from '../../sections-
|
|
6
|
-
import { E as ExpandedSeat } from '../../renderer-
|
|
4
|
+
import { S as SegmentedRowPlacement } from '../../segmentedRowModel-DWOjcPrU.cjs';
|
|
5
|
+
export { A as AvailabilityRule, S as SectionNode, T as TIER_HEIGHT_M, U as UNGROUPED_ID, a as applyHidden, c as computeSections, h as hiddenObjectIds, i as isSectionHidden, s as sectionGeometry } from '../../sections-DhJ7TukF.cjs';
|
|
6
|
+
import { E as ExpandedSeat } from '../../renderer-Dn4Plcv9.cjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* THE bowl resolver — whether a floor's stands wrap a centre, and the smooth
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { P as Point, R as RowObject, j as SeatOverride } from '../../types-
|
|
2
|
-
export { D as DEFAULT_SECTION_CORNER_SMOOTHING, M as MAX_EDGE_SAGITTA_RATIO, R as RelabelOptions, S as SectionOutlineDerivation, c as cornerSmoothingThresholdDeg, i as indexLabel, r as relabelRows, a as reverseSectionOutlinePath, s as sampleSectionOutlinePath, b as sectionCornerSmoothingPath, d as sectionOutlinePathFrom, e as sectionPathSegmentEnd, t as toBijectiveBase, f as toLetters, g as toRoman, h as transformSectionOutlinePath, j as translateSectionOutlinePath, v as validSectionOutlinePath } from '../../labeling-
|
|
1
|
+
import { P as Point, R as RowObject, j as SeatOverride } from '../../types-Dx4jA8aI.js';
|
|
2
|
+
export { D as DEFAULT_SECTION_CORNER_SMOOTHING, M as MAX_EDGE_SAGITTA_RATIO, R as RelabelOptions, S as SectionOutlineDerivation, c as cornerSmoothingThresholdDeg, i as indexLabel, r as relabelRows, a as reverseSectionOutlinePath, s as sampleSectionOutlinePath, b as sectionCornerSmoothingPath, d as sectionOutlinePathFrom, e as sectionPathSegmentEnd, t as toBijectiveBase, f as toLetters, g as toRoman, h as transformSectionOutlinePath, j as translateSectionOutlinePath, v as validSectionOutlinePath } from '../../labeling-BUCj-kHU.js';
|
|
3
3
|
export { SeatConfidenceDisclosure, seatConfidenceDisclosure } from '../seatConfidence.js';
|
|
4
|
-
import { S as SegmentedRowPlacement } from '../../segmentedRowModel-
|
|
5
|
-
export { A as AvailabilityRule, S as SectionNode, T as TIER_HEIGHT_M, U as UNGROUPED_ID, a as applyHidden, c as computeSections, h as hiddenObjectIds, i as isSectionHidden, s as sectionGeometry } from '../../sections-
|
|
6
|
-
import { E as ExpandedSeat } from '../../renderer-
|
|
4
|
+
import { S as SegmentedRowPlacement } from '../../segmentedRowModel-DgSEzAYd.js';
|
|
5
|
+
export { A as AvailabilityRule, S as SectionNode, T as TIER_HEIGHT_M, U as UNGROUPED_ID, a as applyHidden, c as computeSections, h as hiddenObjectIds, i as isSectionHidden, s as sectionGeometry } from '../../sections-uV7vqDHj.js';
|
|
6
|
+
import { E as ExpandedSeat } from '../../renderer-C5avrVLy.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* THE bowl resolver — whether a floor's stands wrap a centre, and the smooth
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as E}from"../../chunk-Y2J55NLS.js";import{a as F,b as G,c as H,d as I}from"../../chunk-
|
|
1
|
+
import{a as E}from"../../chunk-Y2J55NLS.js";import{a as F,b as G,c as H,d as I}from"../../chunk-N5NRM4NW.js";import{j as z,k as A,l as B,m as C,n as D}from"../../chunk-UX67GDLV.js";import{A as e,B as f,C as m,D as p,E as t,F as x,G as a,H as b,I as c,N as d,O as g,P as h,Q as i,R as j,S as k,T as l,U as n,V as q,Y as s,ga as u,ha as v,ia as w,ja as y,y as o,z as r}from"../../chunk-KN7GLEAI.js";import"../../chunk-CRCGO52K.js";export{p as DEFAULT_SECTION_CORNER_SMOOTHING,a as MAX_EDGE_SAGITTA_RATIO,s as TIER_HEIGHT_M,z as UNGROUPED_ID,D as applyHidden,I as arcLevelAt,G as bearingDeg,F as buildSectionRake,A as computeSections,t as cornerSmoothingThresholdDeg,v as distanceToPolyline,H as fitBowlProfile,w as fitCircle,C as hiddenObjectIds,g as indexLabel,B as isSectionHidden,l as logicalNumberingRow,j as relabelRows,y as resolveSection,c as reverseSectionOutlinePath,e as sampleSectionOutlinePath,E as seatConfidenceDisclosure,q as seatDisplayLabel,n as seatInventoryLabel,k as seatLabelPart,x as sectionCornerSmoothingPath,u as sectionGeometry,b as sectionOutlinePathFrom,o as sectionPathSegmentEnd,d as toBijectiveBase,h as toLetters,i as toRoman,m as transformSectionOutlinePath,f as translateSectionOutlinePath,r as validSectionOutlinePath};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ChartObject, C as ChartDoc } from './types-
|
|
1
|
+
import { a as ChartObject, C as ChartDoc } from './types-Dx4jA8aI.js';
|
|
2
2
|
|
|
3
3
|
declare const EVENT_CONFIGURATION_SCHEMA: "seatlayer.event-configuration/1";
|
|
4
4
|
declare const EVENT_CONFIGURATION_EXPORT_SCHEMA: "seatlayer.event-configuration-export/1";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ChartObject, C as ChartDoc } from './types-
|
|
1
|
+
import { a as ChartObject, C as ChartDoc } from './types-Dx4jA8aI.cjs';
|
|
2
2
|
|
|
3
3
|
declare const EVENT_CONFIGURATION_SCHEMA: "seatlayer.event-configuration/1";
|
|
4
4
|
declare const EVENT_CONFIGURATION_EXPORT_SCHEMA: "seatlayer.event-configuration-export/1";
|