@seatlayer/core 0.67.11 → 0.67.13
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-DEgsjxCC.d.cts → categoryInventory-BI3jJaqD.d.cts} +1 -1
- package/dist/{categoryInventory-C3RogGHF.d.ts → categoryInventory-CDGQe2Ag.d.ts} +1 -1
- package/dist/chunk-3TAVIEVO.js +1 -0
- package/dist/chunk-52MZJZMW.js +1 -0
- package/dist/chunk-5BGP7S3Q.js +1 -0
- package/dist/chunk-BTW7IGNT.js +1 -0
- package/dist/{chunk-F4GG7KDS.js → chunk-BV6FHURE.js} +1 -1
- package/dist/chunk-CRCGO52K.js +1 -0
- package/dist/{chunk-5S3OQBZJ.js → chunk-HZT2U5IY.js} +1 -1
- package/dist/chunk-I6DNJFRF.js +1 -0
- package/dist/{chunk-V7PECHME.js → chunk-QYZ3P5L6.js} +1 -1
- package/dist/{chunk-L35GJOTC.js → chunk-RMNTGICO.js} +1 -1
- package/dist/chunk-Y2J55NLS.js +1 -0
- package/dist/core/chart-ops/index.cjs +1 -1
- package/dist/core/chart-ops/index.d.cts +71 -7
- package/dist/core/chart-ops/index.d.ts +71 -7
- package/dist/core/chart-ops/index.js +1 -1
- package/dist/core/inventory/index.cjs +1 -1
- package/dist/core/inventory/index.d.cts +4 -4
- package/dist/core/inventory/index.d.ts +4 -4
- package/dist/core/inventory/index.js +1 -1
- package/dist/core/layout/index.cjs +1 -1
- package/dist/core/layout/index.d.cts +4 -4
- package/dist/core/layout/index.d.ts +4 -4
- package/dist/core/layout/index.js +1 -1
- package/dist/core/quality/index.d.cts +3 -3
- package/dist/core/quality/index.d.ts +3 -3
- package/dist/core/render-assets/index.d.cts +1 -1
- package/dist/core/render-assets/index.d.ts +1 -1
- package/dist/core/seatConfidence.cjs +1 -1
- package/dist/core/seatConfidence.d.cts +5 -3
- package/dist/core/seatConfidence.d.ts +5 -3
- package/dist/core/seatConfidence.js +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-DImP8Cd6.d.ts +130 -0
- package/dist/eventConfigurations-YqyHnreh.d.cts +130 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +32 -11
- package/dist/index.d.ts +32 -11
- package/dist/index.js +1 -1
- package/dist/{labeling-DTHo03rf.d.ts → labeling-Cb7ZwhoO.d.ts} +1 -1
- package/dist/{labeling-DRFC35VK.d.cts → labeling-lXzjJrgV.d.cts} +1 -1
- package/dist/{layout-BSb0-47G.d.ts → layout-ByBMw1t7.d.ts} +7 -3
- package/dist/{layout-wVlsj-_w.d.cts → layout-cZ3VfeJR.d.cts} +7 -3
- package/dist/{openPanorama-ALLZ6ADE.js → openPanorama-HGRYMWKC.js} +1 -1
- package/dist/{renderedQuality-8i9bYccr.d.cts → renderedQuality-6ta0nSPm.d.cts} +1 -1
- package/dist/{renderedQuality-CbHiqt1W.d.ts → renderedQuality-BJKHot_g.d.ts} +1 -1
- package/dist/{renderer-BxLV6zjl.d.ts → renderer-B9GavToM.d.ts} +3 -1
- package/dist/{renderer-DOVelTZw.d.cts → renderer-C9BLd1g2.d.cts} +3 -1
- package/dist/{sections-BrQV1WzI.d.ts → sections-BvZ1cQkD.d.ts} +1 -1
- package/dist/{sections-D2bxgVgg.d.cts → sections-ND5PRE4j.d.cts} +1 -1
- package/dist/{segmentedRowModel-BQYSdf7k.d.cts → segmentedRowModel-BB9MPufB.d.cts} +1 -1
- package/dist/{segmentedRowModel-Cl3X8SKt.d.ts → segmentedRowModel-CLKP-2ca.d.ts} +1 -1
- package/dist/{ticketRestrictions-D0GRRQ3i.d.cts → ticketRestrictions-CjV47RNG.d.cts} +2 -2
- package/dist/{ticketRestrictions-SteRFSGg.d.ts → ticketRestrictions-DUQ8wHjG.d.ts} +2 -2
- package/dist/{types-DmgX-iuD.d.cts → types-hv6QjPRV.d.cts} +32 -3
- package/dist/{types-DmgX-iuD.d.ts → types-hv6QjPRV.d.ts} +32 -3
- package/dist/view/panoramaDelivery.cjs +1 -1
- package/dist/view/panoramaDelivery.d.cts +5 -0
- package/dist/view/panoramaDelivery.d.ts +5 -0
- package/dist/view/panoramaDelivery.js +1 -1
- package/dist/view3d/crossfade/panorama.cjs +1 -1
- package/dist/view3d/crossfade/panorama.d.cts +7 -1
- package/dist/view3d/crossfade/panorama.d.ts +7 -1
- package/dist/view3d/crossfade/panorama.js +1 -1
- package/dist/view3d/index.cjs +30 -30
- package/dist/view3d/index.d.cts +27 -2
- package/dist/view3d/index.d.ts +27 -2
- package/dist/view3d/index.js +24 -24
- package/package.json +1 -1
- package/dist/chunk-EQM4FFN5.js +0 -1
- package/dist/chunk-IJI4WU57.js +0 -1
- package/dist/chunk-TTTRXXAA.js +0 -1
- package/dist/chunk-XHXBFFWR.js +0 -1
- package/dist/chunk-XPPT3OGQ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ae=Object.defineProperty;var rt=Object.getOwnPropertyDescriptor;var it=Object.getOwnPropertyNames;var st=Object.prototype.hasOwnProperty;var ct=(e,t)=>{for(var n in t)ae(e,n,{get:t[n],enumerable:!0})},at=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of it(t))!st.call(e,r)&&r!==n&&ae(e,r,{get:()=>t[r],enumerable:!(o=rt(t,r))||o.enumerable});return e};var lt=e=>at(ae({},"__esModule",{value:!0}),e);var yn={};ct(yn,{DEFAULT_SECTION_CORNER_SMOOTHING:()=>Ne,MAX_EDGE_SAGITTA_RATIO:()=>Be,TIER_HEIGHT_M:()=>Se,UNGROUPED_ID:()=>ce,applyHidden:()=>bn,arcLevelAt:()=>wt,bearingDeg:()=>Ce,buildSectionRake:()=>Tt,computeSections:()=>tt,cornerSmoothingThresholdDeg:()=>Fe,distanceToPolyline:()=>ue,fitBowlProfile:()=>Mt,fitCircle:()=>ee,hiddenObjectIds:()=>ot,indexLabel:()=>Ee,isSectionHidden:()=>nt,logicalNumberingRow:()=>_e,relabelRows:()=>At,resolveSection:()=>mt,reverseSectionOutlinePath:()=>Xt,sampleSectionOutlinePath:()=>Ht,seatConfidenceDisclosure:()=>jt,seatDisplayLabel:()=>pe,seatInventoryLabel:()=>he,seatLabelPart:()=>ie,sectionCornerSmoothingPath:()=>Kt,sectionGeometry:()=>Ke,sectionOutlinePathFrom:()=>Ge,sectionPathSegmentEnd:()=>Bt,toBijectiveBase:()=>fe,toLetters:()=>oe,toRoman:()=>de,transformSectionOutlinePath:()=>De,translateSectionOutlinePath:()=>Ut,validSectionOutlinePath:()=>ye});module.exports=lt(yn);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],f=s.x-i.x,u=s.y-i.y,m=f*f+u*u,c=m>1e-12?((t-i.x)*f+(n-i.y)*u)/m:0;c<0?c=0:c>1&&(c=1);let b=Math.hypot(t-(i.x+c*f),n-(i.y+c*u));b<o&&(o=b)}return o}function ut(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 ft(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 b=Math.hypot(c.x-n,c.y-o);b>r&&(r=b,i=c)}let s=i.x-n,f=i.y-o,u=Math.hypot(s,f);u>1e-9?(s/=u,f/=u):(s=1,f=0);let m=e.map((c,b)=>({p:c,i:b,t:(c.x-n)*s+(c.y-o)*f})).sort((c,b)=>c.t-b.t);return{pts:m.map(c=>c.p),seatIndices:m.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,f=0,u=0,m=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,f+=y*y*y,u+=a*a*a,m+=y*a*a,c+=a*y*y}let b=r*s-i*i;if(Math.abs(b)<1e-9)return null;let d=(f+m)/2,l=(u+c)/2,p=(d*s-l*i)/b,A=(l*r-d*i)/b,h=p+n,x=A+o;return!Number.isFinite(h)||!Number.isFinite(x)?null:{cx:h,cy:x}}var dt=.15;function ht(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 f=r+s,u=r*s-i*i,m=f/2+Math.sqrt(Math.max(0,f*f/4-u)),c,b;Math.abs(i)>1e-12?(c=m-s,b=i):r>=s?(c=1,b=0):(c=0,b=1);let d=Math.hypot(c,b);if(!(d>1e-12))return null;c/=d,b/=d;let l=1/0,p=-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*b;S<y&&(y=S),S>a&&(a=S),S<l&&(l=S),S>p&&(p=S)}A.push(a-y)}let h=p-l;return h>1e-9?(A.sort((g,y)=>g-y),A[Math.min(A.length-1,Math.floor(A.length*.9))]/h<=pt?{x:c,y:b}:null):null}var pt=.35;function mt(e,t,n,o){let r=new Map;for(let h of n){let x=t[h],g=x.rowId||`__seat-${h}`,y=r.get(g);y||(y={pts:[],idx:[]},r.set(g,y)),y.pts.push({x:x.x,y:x.y}),y.idx.push(h)}if(!r.size)return{sectionId:e,rows:[],blockCount:0};let i=[];for(let[h,x]of r){let g=ft(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:h,pts:g.pts,seatIndices:g.seatIndices,blockId:-1,ordinal:0,blockDepth:0,focalDistance:y/g.pts.length})}let s=i.map(h=>ut(h.pts)),f=[];for(let h=0;h<i.length;h++){let x=1/0;for(let g=0;g<i.length;g++){if(h===g||Ae(s[h],s[g])>=x)continue;let y=le(i[h].pts,i[g].pts);y<x&&(x=y)}Number.isFinite(x)&&f.push(x)}f.sort((h,x)=>h-x);let u=f.length?f[Math.floor(f.length/2)]:1,m=Math.max(u*1.8,1e-6),c=i.map(()=>[]);for(let h=0;h<i.length;h++)for(let x=h+1;x<i.length;x++)Ae(s[h],s[x])>m||le(i[h].pts,i[x].pts)<=m&&(c[h].push(x),c[x].push(h));let b=0;for(let h=0;h<i.length;h++){if(i[h].blockId!==-1)continue;let x=b++,g=[h];for(i[h].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 h of i){let x=d.get(h.blockId)??[];x.push(h),d.set(h.blockId,x)}let l=[];for(let h of i){if(h.pts.length<4)continue;let x=ee(h.pts);x&&(!Number.isFinite(x.cx)||!Number.isFinite(x.cy)||l.push({x:x.cx,y:x.cy}))}let p=l.length>=2?(()=>{let h=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:h[g],cy:x[g]}})():null;if(p){let h=S=>Math.hypot(S.x-p.cx,S.y-p.cy),x=1/0,g=-1/0,y=[];for(let S of i){let R=1/0,_=-1/0;for(let D of S.pts){let H=h(D);H<R&&(R=H),H>_&&(_=H)}y.push(_-R),R<x&&(x=R),_>g&&(g=_)}let a=g-x;y.sort((S,R)=>S-R);let I=y[Math.min(y.length-1,Math.floor(y.length*.9))];if(a>1e-9&&I/a<=dt){let S=i.map(v=>{let j=0;for(let z of v.pts)j+=h(z);return{row:v,radius:j/v.pts.length}}),R=0,_=0;for(let v of S)R+=v.radius,_+=v.row.focalDistance;R/=S.length,_/=S.length;let D=0;for(let v of S)D+=(v.radius-R)*(v.row.focalDistance-_);if(D<0)for(let v of S)v.radius=-v.radius;let U=1/0;for(let v of S)v.radius<U&&(U=v.radius);S.sort((v,j)=>v.radius-j.radius);let J=-1,M=-1/0,P=a/Math.max(1,S.length)*.5,E=[];for(let v of S)v.radius-M>P&&(J++,M=v.radius),v.row.ordinal=J,v.row.blockDepth=v.radius-U,E.push(v.row);return{sectionId:e,rows:E,blockCount:b}}}let A=[];for(let[,h]of d){let x=ht(h);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};h.sort((a,I)=>g(a)-g(I)),h.length>=2&&h[0].focalDistance>h[h.length-1].focalDistance&&h.reverse();let y=0;for(let a=0;a<h.length;a++)a>0&&(y+=le(h[a-1].pts,h[a].pts)),h[a].ordinal=a,h[a].blockDepth=y,A.push(h[a])}else{let g=1/0;for(let y of h)y.focalDistance<g&&(g=y.focalDistance);h.sort((y,a)=>y.focalDistance-a.focalDistance);for(let y=0;y<h.length;y++)h[y].ordinal=y,h[y].blockDepth=Math.max(0,h[y].focalDistance-g),A.push(h[y])}}return{sectionId:e,rows:A,blockCount:b}}var bt=Math.PI/180,C=96,yt=6,xt=60,gt=150,Re=.2,St=.35;function Ce(e,t){let n=Math.atan2(t.x-e.x,t.y-e.y)/bt;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,f=0;for(let u=-n;u<=n;u++){let m=i+u;if(t)m=(m%o+o)%o;else if(m<0||m>=o)continue;s+=e[m],f++}r[i]=s/f}return r}function Mt(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 p of l.pts)r+=p.x,i+=p.y,s++;if(l.pts.length>=4){let p=ee(l.pts);p&&Number.isFinite(p.cx)&&Number.isFinite(p.cy)&&o.push({x:p.cx,y:p.cy})}}if(!s)return null;let f={x:r/s,y:i/s},u=f;if(o.length>=8){let d=te(o.map(x=>x.x)),l=te(o.map(x=>x.y)),p=0;for(let x of n)for(let g of x.rows)for(let y of g.pts){let a=Math.hypot(y.x-f.x,y.y-f.y);a>p&&(p=a)}let A=0,h=p*.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)<h&&A++;Math.hypot(d-f.x,l-f.y)<=p&&A/s<.01&&(u={x:d,y:l})}let m=[];for(let d of n){let l={sectionId:d.sectionId,rMin:1/0,rMax:-1/0,samples:[]};for(let p of d.rows)for(let A of p.pts){let h=Math.hypot(A.x-u.x,A.y-u.y),x=Math.min(C-1,Math.floor(Ce(u,A)/(360/C)));l.samples.push({r:h,bin:x,levelM:p.levelM}),h<l.rMin&&(l.rMin=h),h>l.rMax&&(l.rMax=h)}l.samples.length&&m.push(l)}if(!m.length)return null;m.sort((d,l)=>d.rMin+d.rMax-(l.rMin+l.rMax));let c=[];for(let d of m){let l=!1;for(let p of c){let A=Math.min(d.rMax,p.rMax)-Math.max(d.rMin,p.rMin),h=Math.min(d.rMax-d.rMin,p.rMax-p.rMin);if(h>1e-9&&A>=St*h){p.members.push(d),p.rMin=Math.min(p.rMin,d.rMin),p.rMax=Math.max(p.rMax,d.rMax),l=!0;break}}l||c.push({members:[d],rMin:d.rMin,rMax:d.rMax})}let b=[];for(let d of c){let l=new Array(C).fill(null);for(let M of d.members)for(let P of M.samples){let E=l[P.bin];E||(E={samples:[]},l[P.bin]=E),E.samples.push({r:P.r,levelM:P.levelM})}let p=l.map(M=>!!M);if(!p.filter(Boolean).length)continue;let h=[],x=[];for(let M of l){if(!M)continue;let P=1/0,E=-1/0;for(let v of M.samples)v.r<P&&(P=v.r),v.r>E&&(E=v.r);h.push(P),x.push(E)}let g=te(h),y=te(x);if(!(g>=Re*y)||!(y>0))continue;let a=[...h].sort((M,P)=>M-P);if(!(a[Math.floor(a.length*.1)]>=Re*y))continue;let S=l.map(M=>{if(!M)return null;let P=[...M.samples].sort((k,N)=>k.r-N.r),E=P[0].r,v=P[P.length-1].r,j=P[0].levelM,z=-1/0;for(let k of P)k.levelM>z&&(z=k.levelM);let O=[];for(let k of P){let N={r:k.r,l:k.levelM};for(;O.length&&Math.abs(O[O.length-1].r-N.r)<1e-9;){if(O[O.length-1].l<=N.l){N.skip=!0;break}O.pop()}if(!N.skip){for(;O.length>=2;){let K=O[O.length-2],W=O[O.length-1];if((W.r-K.r)*(N.l-K.l)-(W.l-K.l)*(N.r-K.r)<=0)O.pop();else break}O.push(N)}}let B=O.map(k=>k.r),G=O.map(k=>k.l);return{inner:E,outer:v,front:j,top:z,profile:{rs:B,ls:G}}}),R=p.slice();for(let M=0;M<C;M++){if(R[M])continue;let P=-1,E=-1,v=0;for(let w=1;w<=C;w++){let T=(M-w+C*2)%C;if(R[T]){P=T;break}}for(let w=1;w<=C;w++){let T=(M+w)%C;if(R[T]){E=T,v=w;break}}if(P<0||E<0)continue;let j=0;for(let w=1;w<=C;w++){let T=(M-w+C*2)%C;if(p[T]){j=w;break}}if(j-1+v>yt)continue;let O=S[P],B=S[E],G=j/(j+v),k=O.inner+(B.inner-O.inner)*G,N=O.outer+(B.outer-O.outer)*G,K=O.front+(B.front-O.front)*G,W=O.top+(B.top-O.top)*G;S[M]={inner:k,outer:N,front:K,top:W,profile:{rs:[k,N],ls:[K,W]}}}for(let M=0;M<C;M++)S[M]&&(R[M]=!0);let _=360/C,D=[],H=R.filter(Boolean).length,U=[];if(H===C)U.push({start:0,len:C});else{let M=0;for(;R[M];)M=(M+1)%C;let P=-1;for(let E=0;E<=C;E++){let v=(M+E)%C,j=E<C&&R[v];if(j&&P<0)P=v;else if(!j&&P>=0){let z=(v-P+C)%C||C;U.push({start:P,len:z}),P=-1}}}for(let M of U){if(M.len*_<xt&&M.len<C)continue;let P=M.len===C,E=new Float64Array(M.len),v=new Float64Array(M.len),j=new Float64Array(M.len),z=new Float64Array(M.len),O=[];for(let w=0;w<M.len;w++){let T=S[(M.start+w)%C];E[w]=T.inner,v[w]=T.outer,j[w]=T.front,z[w]=T.top,O.push(T.profile??{rs:[T.inner,T.outer],ls:[T.front,T.top]})}let B=ne(E,P),G=ne(v,P),k=ne(j,P),N=ne(z,P);for(let w=0;w<M.len;w++)B[w]>E[w]&&(B[w]=E[w]),G[w]<v[w]&&(G[w]=v[w]),B[w]>G[w]-1e-6&&(B[w]=Math.max(0,G[w]-1e-6)),N[w]<k[w]&&(N[w]=k[w]);let K={startBin:M.start,binCount:M.len,closed:P,innerR:B,outerR:G,frontLevelM:k,topLevelM:N,profiles:O},W=(w,T,F)=>{let Q=O[w],V=Q.rs,$=Q.ls;if(T<=V[0]){$[0]>F&&($[0]=F);return}if(T>=V[V.length-1]){$[$.length-1]>F&&($[$.length-1]=F);return}for(let X=0;X+1<V.length;X++)if(T<=V[X+1]){$[X]>F&&($[X]=F),$[X+1]>F&&($[X+1]=F);return}};for(let w=0;w<M.len;w++){let T=l[(M.start+w)%C];if(T)for(let F of T.samples){W(w,F.r,F.levelM);let Q=P?(w-1+M.len)%M.len:w-1,V=P?(w+1)%M.len:w+1;Q>=0&&W(Q,F.r,F.levelM),V<M.len&&W(V,F.r,F.levelM)}}D.push(K)}D.reduce((M,P)=>M+P.binCount*_,0)<gt||b.push({arcs:D,sectionIds:d.members.map(M=>M.sectionId),innerRMedian:g,outerRMedian:y})}if(!b.length)return null;if(b.sort((d,l)=>d.innerRMedian-l.innerRMedian),t){let d=b[b.length-1].outerRMedian;if(Math.hypot(t.x-u.x,t.y-u.y)>.9*d)return null}return{centre:u,binCount:C,binStepDeg:360/C,rings:b}}function wt(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),f=t.closed?(s+1)%t.binCount:Math.min(t.binCount-1,s+1),u=i-s,m=c=>{let b=t.profiles[c],d=b.rs,l=b.ls;if(o<=d[0])return l[0];if(o>=d[d.length-1])return l[l.length-1];for(let p=0;p+1<d.length;p++)if(o<=d[p+1]){let A=d[p+1]-d[p],h=A>1e-9?(o-d[p])/A:0;return l[p]+(l[p+1]-l[p])*h}return l[l.length-1]};return m(s)*(1-u)+m(f)*u}var Oe="ABCDEFGHIJKLMNOPQRSTUVWXYZ",vt="ABCDEFGHJKLMNPQRSTUVWXYZ",Pt="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 Ee(e,t){let n=t.startAt-1,o=e+n;if(t.scheme==="numbers")return String(o+1);let r=t.skipAmbiguous?vt:Oe;return fe(o,r)}function oe(e,t=!1){let n=t?Pt:Oe;return fe(Math.max(0,Math.floor(e)-1),n)}var It=[[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 It)for(;t>=o;)n+=r,t-=o;return n}function At(e,t){let n=e.length;return e.map((o,r)=>{let i=t.reverse?n-1-r:r;return{...o,label:Ee(i,t)}})}function Rt(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 Ct(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],f=-1;for(let l of e){let p=Math.hypot(l.x-n,l.y-o);p>f&&(f=p,s=l)}let u=s.x-n,m=s.y-o,c=Math.hypot(u,m);c>1e-9?(u/=c,m/=c):(u=1,m=0);let b=[...e].sort((l,p)=>(l.x-n)*u+(l.y-o)*m-((p.x-n)*u+(p.y-o)*m)),d=0;for(let l of b){let p=Math.hypot(l.x-n,l.y-o);p>d&&(d=p)}return{pts:b,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],f=o[i+1],u=f.x-s.x,m=f.y-s.y,c=u*u+m*m,b=c>1e-12?((t-s.x)*u+(n-s.y)*m)/c:0;b<0?b=0:b>1&&(b=1);let d=Math.hypot(t-(s.x+b*u),n-(s.y+b*m));d<r&&(r=d)}return r}var re=8;function Ot(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 b=e[c],d=Math.hypot(t-b.cx,n-b.cy)-b.radius;for(let l=0;l<re;l++)if(d<o[l]){for(let p=re-1;p>l;p--)o[p]=o[p-1],r[p]=r[p-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 b=Te(e[c],t,n);for(let d=0;d<3;d++)if(b<i[d]){for(let l=2;l>d;l--)i[l]=i[l-1],s[l]=s[l-1];i[d]=b,s[d]=c;break}}if(s[0]<0)return 0;if(i[0]<1e-6)return e[s[0]].depth;let f=i[0]*2.2,u=0,m=0;for(let c=0;c<3;c++){let b=s[c];if(b<0||i[c]>f)continue;let d=1/(i[c]*i[c]);u+=d*e[b].depth,m+=d}return m>0?u/m:e[s[0]].depth}function Et(e){let t=(o,r)=>Ot(e,o,r),n=(o,r)=>{let i=1/0,s=-1;for(let f=0;f<e.length;f++){let u=e[f];if(Math.hypot(o-u.cx,r-u.cy)-u.radius>=i)continue;let m=Te(u,o,r);m<i&&(i=m,s=f)}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),f=Math.hypot(i,s);return f<1e-9?[0,0]:[i/f,s/f]}}}function Tt(e,t){let n=[];for(let o of e){let r=Ct(o.points,t);r&&n.push(r)}return n.length<2?Rt(t):(n.sort((o,r)=>o.depth-r.depth),Et(n))}function _t(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 kt(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 jt(e){if(!e)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 evidence date supplied",limitations:["Generated view is not surveyed sightline truth."]};let t=e.evidenceKind==="synthetic-model",n=e.modelLevel==="configuration-verified"?"Event configuration verified":e.modelLevel==="geometry-verified"?"Venue geometry verified":t?"Versioned synthetic model":"Generated model \xB7 not verified",o=e.realityLevel==="actual-build-checked"?"Actual event build reality checked":e.realityLevel==="comparable-build-reference"?"Comparable-build reference only":"No real-world check supplied",r=t?"Synthetic model evidence":e.modelLevel==="configuration-verified"?"Configuration verified":e.modelLevel==="geometry-verified"?"Geometry verified":"Generated view \xB7 unverified",i=[...e.limitations??[],...t?["Synthetic demo; not surveyed or venue-certified."]:[]],s=e.modeledTarget?`${e.modeledTarget.clearRayCount}/${e.modeledTarget.totalRayCount} target rays clear \xB7 ${e.modeledTarget.classification} in bounded model`:void 0;return s&&i.push("Modeled target is not a percentage of the show visible."),{headline:r,model:n,reality:o,coverage:_t(e.coverage),provenance:e.sourceLabel??e.approvedByRole??"Source not supplied",freshness:kt(e.assessedAt),limitations:i,...s?{modeledTarget:s}:{}}}function Lt(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??"",f=e.seatNumbering?.endAt,u=e.seatCount;if(i==="updown"||i==="updown-descending"){let l=Math.ceil(u/2),p=i==="updown"?t<l?n+2*t:n-1+2*(u-t):t<l?n+2*(l-1-t):n+1+2*(t-l);return`${s}${p}`}let m=i==="odd"||i==="even"?2:r,c=f!=null&&Number.isFinite(f)?f-(u-1)*m:n,b=o==="center"?Lt(u)[t]:o==="rtl"?u-1-t:t,d;switch(i){case"odd":{let l=c%2===1?c:c+1;d=String(l+b*2);break}case"even":{let l=c%2===0?c:c+1;d=String(l+b*2);break}case"roman":d=de(c+b*r);break;case"letters-upper":d=oe(c+b*r,!1);break;case"letters-lower":d=oe(c+b*r,!0);break;default:d=String(c+b*r);break}return`${s}${d}`}function _e(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function he(e,t,n){return n?.label??`${e.label}-${ie(e,t)}`}function pe(e,t,n,o){if(o?.displayLabel)return o.displayLabel;if(!n)return`${e.displayLabel??e.label}-${ie(e,t)}`;let r=_e(n),i=n.displayOffset+t;return`${n.displayLabel}-${ie(r,i)}`}function Dt(e,t,n){return Math.max(t,Math.min(n,e))}function Nt(e){return Dt(e,0,1)}function ke(e){let t=Nt(e);return t*t*(3-2*t)}var Cn=Math.PI/180;function L(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function me(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 Ft(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 Bt(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 Gt(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 Ht(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),f=Math.atan2(i.end.y-i.center.y,i.end.x-i.center.x),u=Ft(s,f,i.clockwise),m=Math.max(2,Math.ceil(Math.abs(u)*i.radius/n));for(let c=1;c<=m;c+=1){let b=s+u*c/m;o.push({x:i.center.x+Math.cos(b)*i.radius,y:i.center.y+Math.sin(b)*i.radius})}}else{let s=L(r,i.control1)+L(i.control1,i.control2)+L(i.control2,i.end),f=Math.max(2,Math.ceil(s/n));for(let u=1;u<=f;u+=1)o.push(Gt(r,i,u/f))}r=i.end}return L(o[o.length-1],o[0])<=1e-4&&o.pop(),o}function Ut(e,t,n){return De(e,r=>({x:r.x+t,y:r.y+n}))}function De(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 Ne=45,be=150,zt=60;function Fe(e){let t=Ne/100;if(e<=t)return be;let n=Math.min(1,(e-t)/(1-t));return be-n*(be-zt)}var je=.5523;function Le(e,t){return Math.abs(e.x-t.x)<=1e-6&&Math.abs(e.y-t.y)<=1e-6}function $t(e){let t=[],n=[];for(e.forEach((o,r)=>{q(o)&&(t.length&&Le(t[t.length-1],o)||(t.push({x:o.x,y:o.y}),n.push(r)))});t.length>1&&Le(t[0],t[t.length-1]);)t.pop(),n.pop();return{points:t,sourceIndex:n}}function Kt(e,t,n){return Ge(e,{cornerSmoothing:t,...n})}var Be=.5,Wt=4/3;function Vt(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,f=o/i,u=n*Wt;return{kind:"bezier",control1:{x:e.x+o/3+s*u,y:e.y+r/3+f*u},control2:{x:e.x+o*2/3+s*u,y:e.y+r*2/3+f*u},end:{...t}}}function Ge(e,t){let{points:n,sourceIndex:o}=$t(e),r=n.length;if(r<3)return null;let i=Math.min(100,Math.max(0,t.cornerSmoothing??0))/100,s=t.edgeCurvature,f=new Array(r).fill(0);if(s?.length)for(let a=0;a<r;a+=1){let I=s[o[a]];f[a]=Number.isFinite(I)?Math.min(100,Math.max(-100,I))/100:0}let u=f.some(a=>Math.abs(a)>1e-6);if(i<=0&&!u)return null;let m=t.wideAngleThresholdDeg??Fe(i),c=[];for(let a=0;a<r;a+=1)c[a]=L(n[a],n[(a+1)%r]);let b=new Array(r).fill(0);for(let a=0;a<r;a+=1){let I=n[(a-1+r)%r],S=n[a],R=n[(a+1)%r],_={x:I.x-S.x,y:I.y-S.y},D={x:R.x-S.x,y:R.y-S.y},H=Math.hypot(_.x,_.y),U=Math.hypot(D.x,D.y);if(H<=1e-9||U<=1e-9)continue;let J=Math.min(1,Math.max(-1,(_.x*D.x+_.y*D.y)/(H*U))),M=Math.acos(J)*180/Math.PI;if(M<m)continue;let P=ke((M-m)/(180-m));b[a]=i*P*.5*Math.min(H,U)}for(let a=0;a<r;a+=1){let I=(a+1)%r,S=b[a]+b[I];if(S>c[a]&&S>1e-9){let R=c[a]/S;b[a]*=R,b[I]*=R}}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],R=n[(a+1)%r];if(b[a]<=1e-6){d[a]={...S},l[a]={...S};continue}let _=L(S,I)||1,D=L(S,R)||1;d[a]={x:S.x+(I.x-S.x)/_*b[a],y:S.y+(I.y-S.y)/_*b[a]},l[a]={x:S.x+(R.x-S.x)/D*b[a],y:S.y+(R.y-S.y)/D*b[a]}}if(b.every(a=>a<=1e-6)&&!u)return null;let p=[],A={...l[0]},h=A,x=(a,I)=>{if(L(h,a)<=1e-9)return;let S=f[I];Math.abs(S)>1e-6?p.push(Vt(h,a,S*Be*c[I])):p.push({kind:"line",end:{...a}}),h=a};for(let a=1;a<=r;a+=1){let I=a%r,S=n[I];x(d[I],(a-1)%r),b[I]>1e-6&&L(d[I],l[I])>1e-9&&(p.push({kind:"bezier",control1:me(d[I],S,je),control2:me(l[I],S,je),end:{...l[I]}}),h=l[I])}if(!p.length)return null;let g=p[p.length-1];L(g.end,A)>1e-9&&(g.kind==="line"?g.end={...A}:p.push({kind:"line",end:{...A}}));let y={version:1,closed:!0,start:A,segments:p};return ye(y)?y:null}function Xt(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 He(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 Ue(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[He(e,.5)];let o=Array.from({length:n+1},(u,m)=>He(e,m/n)),r=new Float64Array(o.length);for(let u=1;u<o.length;u+=1){let m=o[u].x-o[u-1].x,c=o[u].y-o[u-1].y;r[u]=r[u-1]+Math.hypot(m,c)}let i=r[r.length-1];if(i<=1e-9)return Array.from({length:t},()=>({...e.start}));let s=[],f=1;for(let u=0;u<t;u+=1){let m=i*u/(t-1);for(;f<r.length-1&&r[f]<m;)f+=1;let c=r[f-1],b=r[f],d=b===c?0:(m-c)/(b-c);s.push({x:o[f-1].x+(o[f].x-o[f-1].x)*d,y:o[f-1].y+(o[f].y-o[f-1].y)*d})}return s}var $e=.02291666666666667,jn=1/$e,Yt=58,Se=Yt*$e;var qt=3,ze=0,xe=120,Jt=0,Qt=45,Zt=7;function ge(e,t,n,o){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):o}function en(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=Zt?e:qt}function Ke(e,t={}){let n=ge(t.floorBaseHeightM,ze,xe,0),o=Math.min(xe,n+en(e.elevation)*Se),r=e.height===void 0?o:ge(e.height,ze,xe,o),i=ge(e.rake,Jt,Qt,0);return{height:r,rake:i}}function Ye(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 we(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 tn(e){let{seatCount:t,seatSpacing:n,curve:o,rotation:r,origin:i}=e,s=[];if(e.path)return Ue(e.path,t);if(t<=1)return t===1&&s.push({x:i.x,y:i.y}),s;if(o===0){for(let m=0;m<t;m++)s.push(we(m*n,0,r,i));return s}let f=o/(t-1)*se,u=n/(2*Math.sin(Math.abs(f)/2));for(let m=0;m<t;m++){let c=m*f,b=u*Math.sin(c),d=-u+u*Math.cos(c);s.push(we(b,d,r,i))}return s}function nn(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function on(e,t){let n=nn(e);return tn(e).map((o,r)=>{let i=n.get(r),s=Ye(i),f=he(e,r,i),u={...e.commercial,...i?.commercial};return{index:r,x:o.x+(i?.dx??0),y:o.y+(i?.dy??0),label:f,displayLabel:pe(e,r,t,i),categoryKey:i?.categoryKey??e.categoryKey,skipped:!!i?.skip,accessible:s.length>0,accessibility:s,wheelchairSpaceType:i?.wheelchairSpaceType,commercial:Object.values(u).some(m=>m!==void 0&&m!==!1&&m!=="")?u: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 on(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 rn(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 sn(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,b,d,l)=>{let p=o.get(c),A=Ye(p),h=p?.label??`${e.label}-${c+1}`,x=e.displayLabel??e.label;return{index:c,label:h,displayLabel:p?.displayLabel??`${x}-${c+1}`,x:b+(p?.dx??0),y:d+(p?.dy??0),categoryKey:p?.categoryKey??e.categoryKey,skipped:!!p?.skip,accessible:A.length>0,accessibility:A,wheelchairSpaceType:p?.wheelchairSpaceType,commercial:p?.commercial,glyph:p?.glyph,viewUrl:p?.viewFromSeatUrl,viewMeta:p?.viewFromSeatUrl?p.viewFromSeatMeta:void 0,labelStyle:p?.labelStyle,...l?{side:l}:{}}};if(e.shape==="round"){let c=(e.radius??40)+Z,b=e.rotation*se,d=Math.max(0,Math.min(360,e.seatArc??360));if(d>=360||n===1){for(let h=0;h<n;h++){let x=b+h/n*2*Math.PI;t.push(r(h,e.center.x+c*Math.cos(x),e.center.y+c*Math.sin(x)))}return t}let l=d*se,p=(2*Math.PI-l)/2,A=b+p;for(let h=0;h<n;h++){let x=A+h/(n-1)*l;t.push(r(h,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,f=rn(e),u=["top","bottom","left","right"],m=0;for(let c of u){let b=f[c];for(let d=0;d<b;d++){let l,p;c==="top"?(l=-i/2+(d+.5)*i/b,p=-s/2-Z):c==="bottom"?(l=-i/2+(d+.5)*i/b,p=s/2+Z):c==="left"?(l=-i/2-Z,p=-s/2+(d+.5)*s/b):(l=i/2+Z,p=-s/2+(d+.5)*s/b);let A=we(l,p,e.rotation,e.center);t.push(r(m++,A.x,A.y,c))}}return t}function qe(e){return sn(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 Je(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 We(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,f=t[r].x,u=t[r].y;s>e.y!=u>e.y&&e.x<(f-i)*(e.y-s)/(u-s)+i&&(n=!n)}return n}function cn(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),f=(r.x-n.x)**2+(r.y-n.y)**2;return s>=-1e-7&&s<=f+1e-7})}function Ve(e,t,n){return We(e,t)&&!(n??[]).some(o=>We(e,o)||cn(e,o))}function Me(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 an(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 Me(e.points);case"section":return Me(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?Me(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 Xe(e,t){return e.length===t.length&&e.every((n,o)=>n.x===t[o].x&&n.y===t[o].y)}function ln(e,t){if(e.type!=="gaArea"||!Xe(e.points,t.outline))return!1;let n=e.holes??[],o=t.holes??[];return n.length===o.length&&n.every((r,i)=>Xe(r,o[i]))}function Qe(e,t){let n=e.filter(s=>s.type==="section"),o="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0,r=an(t);return(o?n.find(s=>(s.logicalSectionId??s.id)===o&&(ln(t,s)||Ve(r,s.outline,s.holes))):void 0)??n.find(s=>Ve(r,s.outline,s.holes))}function Ze(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}var un="__sl_ga__",Pe=1e5;function fn(e,t){return`${un}${encodeURIComponent(e)}__${t+1}`}function dn(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(f=>r.startIndex<f.end&&s>f.start))return!1;i.push({start:r.startIndex,end:s}),o.set(r.sourceAreaId,i)}return n===e.capacity}function hn(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}]:[]:dn(e)?e.inventorySegments.map(n=>({...n})):[]}function et(e){return hn(e).flatMap(t=>Array.from({length:t.count},(n,o)=>fn(t.sourceAreaId,t.startIndex+o)))}var ce="__ungrouped__";function pn(e){return e.type==="row"?ve(e).map(t=>t.label):e.type==="table"?qe(e).map(t=>t.label):e.type==="booth"?Je(e).map(t=>t.label):e.type==="gaArea"?et(e):[]}function mn(e){return e.type==="row"||e.type==="table"||e.type==="booth"||e.type==="gaArea"}function tt(e){let t=Ze(e),n=t.filter(s=>s.type==="section"),o=new Map;for(let s of n){let f=s.logicalSectionId??s.id;o.get(f)||o.set(f,{id:f,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(!mn(s))continue;let f=pn(s);if(f.length===0)continue;let u=Qe(t,s),m=u?o.get(u.logicalSectionId??u.id):r;m.seatCount+=f.length,m.objectIds.push(s.id),m.seatLabels.push(...f),i.set(s.id,m.id)}return{sections:[...o.values()],ungrouped:r.objectIds.length?r:null,objectToSection:i}}function nt(e,t){return t.has(e.id)||!!e.logicalSectionId&&t.has(e.logicalSectionId)||!!e.zone&&t.has(e.zone)}function ot(e,t){let n=new Set;if(!t.size)return n;let{sections:o,ungrouped:r,objectToSection:i}=tt(e),s=new Set,f=new Map(o.map(m=>[m.id,m.zone]));for(let m of o){let c=f.get(m.id);(t.has(m.id)||c&&t.has(c))&&s.add(m.id)}let u=!!r&&t.has(ce);for(let[m,c]of i)(s.has(c)||u&&c===ce)&&n.add(m);return n}function bn(e,t){if(!t.size)return e;let n=ot(e,t),o=t instanceof Set?t:new Set(t),r=s=>!(n.has(s.id)||s.type==="section"&&nt(s,o));if(e.floors&&e.floors.length){let s=!1,f=e.floors.map(u=>{let m=u.objects.filter(r);return m.length!==u.objects.length&&(s=!0),m.length===u.objects.length?u:{...u,objects:m}});return s?{...e,floors:f,objects:f[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:()=>wn,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:()=>pe,seatInventoryLabel:()=>he,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,m=u*u+f*f,c=m>1e-12?((t-i.x)*u+(n-i.y)*f)/m:0;c<0?c=0:c>1&&(c=1);let b=Math.hypot(t-(i.x+c*u),n-(i.y+c*f));b<o&&(o=b)}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 ht(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 b=Math.hypot(c.x-n,c.y-o);b>r&&(r=b,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 m=e.map((c,b)=>({p:c,i:b,t:(c.x-n)*s+(c.y-o)*u})).sort((c,b)=>c.t-b.t);return{pts:m.map(c=>c.p),seatIndices:m.map(c=>t[c.i])}}function ee(e){let t=e.length;if(t<3)return null;let n=0,o=0;for(let x of e)n+=x.x,o+=x.y;n/=t,o/=t;let r=0,i=0,s=0,u=0,f=0,m=0,c=0;for(let x of e){let y=x.x-n,a=x.y-o;r+=y*y,s+=a*a,i+=y*a,u+=y*y*y,f+=a*a*a,m+=y*a*a,c+=a*y*y}let b=r*s-i*i;if(Math.abs(b)<1e-9)return null;let d=(u+m)/2,l=(f+c)/2,p=(d*s-l*i)/b,A=(l*r-d*i)/b,h=p+n,g=A+o;return!Number.isFinite(h)||!Number.isFinite(g)?null:{cx:h,cy:g}}var pt=.15;function mt(e){if(e.length<2)return null;let t=e.map(x=>{let y=0,a=0;for(let I of x.pts)y+=I.x,a+=I.y;return{x:y/x.pts.length,y:a/x.pts.length}}),n=0,o=0;for(let x of t)n+=x.x,o+=x.y;n/=t.length,o/=t.length;let r=0,i=0,s=0;for(let x of t){let y=x.x-n,a=x.y-o;r+=y*y,i+=y*a,s+=a*a}let u=r+s,f=r*s-i*i,m=u/2+Math.sqrt(Math.max(0,u*u/4-f)),c,b;Math.abs(i)>1e-12?(c=m-s,b=i):r>=s?(c=1,b=0):(c=0,b=1);let d=Math.hypot(c,b);if(!(d>1e-12))return null;c/=d,b/=d;let l=1/0,p=-1/0,A=[];for(let x of e){let y=1/0,a=-1/0;for(let I of x.pts){let S=I.x*c+I.y*b;S<y&&(y=S),S>a&&(a=S),S<l&&(l=S),S>p&&(p=S)}A.push(a-y)}let h=p-l;return h>1e-9?(A.sort((x,y)=>x-y),A[Math.min(A.length-1,Math.floor(A.length*.9))]/h<=bt?{x:c,y:b}:null):null}var bt=.35;function yt(e,t,n,o){let r=new Map;for(let h of n){let g=t[h],x=g.rowId||`__seat-${h}`,y=r.get(x);y||(y={pts:[],idx:[]},r.set(x,y)),y.pts.push({x:g.x,y:g.y}),y.idx.push(h)}if(!r.size)return{sectionId:e,rows:[],blockCount:0};let i=[];for(let[h,g]of r){let x=ht(g.pts,g.idx),y=0;for(let a of x.pts)y+=Math.hypot(a.x-o.x,a.y-o.y);i.push({id:h,pts:x.pts,seatIndices:x.seatIndices,blockId:-1,ordinal:0,blockDepth:0,focalDistance:y/x.pts.length})}let s=i.map(h=>dt(h.pts)),u=[];for(let h=0;h<i.length;h++){let g=1/0;for(let x=0;x<i.length;x++){if(h===x||Ae(s[h],s[x])>=g)continue;let y=le(i[h].pts,i[x].pts);y<g&&(g=y)}Number.isFinite(g)&&u.push(g)}u.sort((h,g)=>h-g);let f=u.length?u[Math.floor(u.length/2)]:1,m=Math.max(f*1.8,1e-6),c=i.map(()=>[]);for(let h=0;h<i.length;h++)for(let g=h+1;g<i.length;g++)Ae(s[h],s[g])>m||le(i[h].pts,i[g].pts)<=m&&(c[h].push(g),c[g].push(h));let b=0;for(let h=0;h<i.length;h++){if(i[h].blockId!==-1)continue;let g=b++,x=[h];for(i[h].blockId=g;x.length;){let y=x.pop();for(let a of c[y])i[a].blockId===-1&&(i[a].blockId=g,x.push(a))}}let d=new Map;for(let h of i){let g=d.get(h.blockId)??[];g.push(h),d.set(h.blockId,g)}let l=[];for(let h of i){if(h.pts.length<4)continue;let g=ee(h.pts);g&&(!Number.isFinite(g.cx)||!Number.isFinite(g.cy)||l.push({x:g.cx,y:g.cy}))}let p=l.length>=2?(()=>{let h=l.map(y=>y.x).sort((y,a)=>y-a),g=l.map(y=>y.y).sort((y,a)=>y-a),x=Math.floor(l.length/2);return{cx:h[x],cy:g[x]}})():null;if(p){let h=S=>Math.hypot(S.x-p.cx,S.y-p.cy),g=1/0,x=-1/0,y=[];for(let S of i){let C=1/0,_=-1/0;for(let L of S.pts){let U=h(L);U<C&&(C=U),U>_&&(_=U)}y.push(_-C),C<g&&(g=C),_>x&&(x=_)}let a=x-g;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<=pt){let S=i.map(v=>{let D=0;for(let V of v.pts)D+=h(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 L=0;for(let v of S)L+=(v.radius-C)*(v.row.focalDistance-_);if(L<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,M=-1/0,P=a/Math.max(1,S.length)*.5,O=[];for(let v of S)v.radius-M>P&&(J++,M=v.radius),v.row.ordinal=J,v.row.blockDepth=v.radius-H,O.push(v.row);return{sectionId:e,rows:O,blockCount:b}}}let A=[];for(let[,h]of d){let g=mt(h);if(g){let x=a=>{let I=0;for(let S of a.pts)I+=S.x*g.x+S.y*g.y;return I/a.pts.length};h.sort((a,I)=>x(a)-x(I)),h.length>=2&&h[0].focalDistance>h[h.length-1].focalDistance&&h.reverse();let y=0;for(let a=0;a<h.length;a++)a>0&&(y+=le(h[a-1].pts,h[a].pts)),h[a].ordinal=a,h[a].blockDepth=y,A.push(h[a])}else{let x=1/0;for(let y of h)y.focalDistance<x&&(x=y.focalDistance);h.sort((y,a)=>y.focalDistance-a.focalDistance);for(let y=0;y<h.length;y++)h[y].ordinal=y,h[y].blockDepth=Math.max(0,h[y].focalDistance-x),A.push(h[y])}}return{sectionId:e,rows:A,blockCount:b}}var gt=Math.PI/180,R=96,xt=6,St=60,Mt=150,Ce=.2,wt=.35;function Re(e,t){let n=Math.atan2(t.x-e.x,t.y-e.y)/gt;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 m=i+f;if(t)m=(m%o+o)%o;else if(m<0||m>=o)continue;s+=e[m],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 p of l.pts)r+=p.x,i+=p.y,s++;if(l.pts.length>=4){let p=ee(l.pts);p&&Number.isFinite(p.cx)&&Number.isFinite(p.cy)&&o.push({x:p.cx,y:p.cy})}}if(!s)return null;let u={x:r/s,y:i/s},f=u;if(o.length>=8){let d=te(o.map(g=>g.x)),l=te(o.map(g=>g.y)),p=0;for(let g of n)for(let x of g.rows)for(let y of x.pts){let a=Math.hypot(y.x-u.x,y.y-u.y);a>p&&(p=a)}let A=0,h=p*.2;for(let g of n)for(let x of g.rows)for(let y of x.pts)Math.hypot(y.x-d,y.y-l)<h&&A++;Math.hypot(d-u.x,l-u.y)<=p&&A/s<.01&&(f={x:d,y:l})}let m=[];for(let d of n){let l={sectionId:d.sectionId,rMin:1/0,rMax:-1/0,samples:[]};for(let p of d.rows)for(let A of p.pts){let h=Math.hypot(A.x-f.x,A.y-f.y),g=Math.min(R-1,Math.floor(Re(f,A)/(360/R)));l.samples.push({r:h,bin:g,levelM:p.levelM}),h<l.rMin&&(l.rMin=h),h>l.rMax&&(l.rMax=h)}l.samples.length&&m.push(l)}if(!m.length)return null;m.sort((d,l)=>d.rMin+d.rMax-(l.rMin+l.rMax));let c=[];for(let d of m){let l=!1;for(let p of c){let A=Math.min(d.rMax,p.rMax)-Math.max(d.rMin,p.rMin),h=Math.min(d.rMax-d.rMin,p.rMax-p.rMin);if(h>1e-9&&A>=wt*h){p.members.push(d),p.rMin=Math.min(p.rMin,d.rMin),p.rMax=Math.max(p.rMax,d.rMax),l=!0;break}}l||c.push({members:[d],rMin:d.rMin,rMax:d.rMax})}let b=[];for(let d of c){let l=new Array(R).fill(null);for(let M of d.members)for(let P of M.samples){let O=l[P.bin];O||(O={samples:[]},l[P.bin]=O),O.samples.push({r:P.r,levelM:P.levelM})}let p=l.map(M=>!!M);if(!p.filter(Boolean).length)continue;let h=[],g=[];for(let M of l){if(!M)continue;let P=1/0,O=-1/0;for(let v of M.samples)v.r<P&&(P=v.r),v.r>O&&(O=v.r);h.push(P),g.push(O)}let x=te(h),y=te(g);if(!(x>=Ce*y)||!(y>0))continue;let a=[...h].sort((M,P)=>M-P);if(!(a[Math.floor(a.length*.1)]>=Ce*y))continue;let S=l.map(M=>{if(!M)return null;let P=[...M.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=p.slice();for(let M=0;M<R;M++){if(C[M])continue;let P=-1,O=-1,v=0;for(let w=1;w<=R;w++){let T=(M-w+R*2)%R;if(C[T]){P=T;break}}for(let w=1;w<=R;w++){let T=(M+w)%R;if(C[T]){O=T,v=w;break}}if(P<0||O<0)continue;let D=0;for(let w=1;w<=R;w++){let T=(M-w+R*2)%R;if(p[T]){D=w;break}}if(D-1+v>xt)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[M]={inner:k,outer:N,front:$,top:K,profile:{rs:[k,N],ls:[$,K]}}}for(let M=0;M<R;M++)S[M]&&(C[M]=!0);let _=360/R,L=[],U=C.filter(Boolean).length,H=[];if(U===R)H.push({start:0,len:R});else{let M=0;for(;C[M];)M=(M+1)%R;let P=-1;for(let O=0;O<=R;O++){let v=(M+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 M of H){if(M.len*_<St&&M.len<R)continue;let P=M.len===R,O=new Float64Array(M.len),v=new Float64Array(M.len),D=new Float64Array(M.len),V=new Float64Array(M.len),E=[];for(let w=0;w<M.len;w++){let T=S[(M.start+w)%R];O[w]=T.inner,v[w]=T.outer,D[w]=T.front,V[w]=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 w=0;w<M.len;w++)B[w]>O[w]&&(B[w]=O[w]),G[w]<v[w]&&(G[w]=v[w]),B[w]>G[w]-1e-6&&(B[w]=Math.max(0,G[w]-1e-6)),N[w]<k[w]&&(N[w]=k[w]);let $={startBin:M.start,binCount:M.len,closed:P,innerR:B,outerR:G,frontLevelM:k,topLevelM:N,profiles:E},K=(w,T,F)=>{let Q=E[w],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 w=0;w<M.len;w++){let T=l[(M.start+w)%R];if(T)for(let F of T.samples){K(w,F.r,F.levelM);let Q=P?(w-1+M.len)%M.len:w-1,W=P?(w+1)%M.len:w+1;Q>=0&&K(Q,F.r,F.levelM),W<M.len&&K(W,F.r,F.levelM)}}L.push($)}L.reduce((M,P)=>M+P.binCount*_,0)<Mt||b.push({arcs:L,sectionIds:d.members.map(M=>M.sectionId),innerRMedian:x,outerRMedian:y})}if(!b.length)return null;if(b.sort((d,l)=>d.innerRMedian-l.innerRMedian),t){let d=b[b.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:b}}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,m=c=>{let b=t.profiles[c],d=b.rs,l=b.ls;if(o<=d[0])return l[0];if(o>=d[d.length-1])return l[l.length-1];for(let p=0;p+1<d.length;p++)if(o<=d[p+1]){let A=d[p+1]-d[p],h=A>1e-9?(o-d[p])/A:0;return l[p]+(l[p+1]-l[p])*h}return l[l.length-1]};return m(s)*(1-f)+m(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 p=Math.hypot(l.x-n,l.y-o);p>u&&(u=p,s=l)}let f=s.x-n,m=s.y-o,c=Math.hypot(f,m);c>1e-9?(f/=c,m/=c):(f=1,m=0);let b=[...e].sort((l,p)=>(l.x-n)*f+(l.y-o)*m-((p.x-n)*f+(p.y-o)*m)),d=0;for(let l of b){let p=Math.hypot(l.x-n,l.y-o);p>d&&(d=p)}return{pts:b,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,m=u.y-s.y,c=f*f+m*m,b=c>1e-12?((t-s.x)*f+(n-s.y)*m)/c:0;b<0?b=0:b>1&&(b=1);let d=Math.hypot(t-(s.x+b*f),n-(s.y+b*m));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 b=e[c],d=Math.hypot(t-b.cx,n-b.cy)-b.radius;for(let l=0;l<re;l++)if(d<o[l]){for(let p=re-1;p>l;p--)o[p]=o[p-1],r[p]=r[p-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 b=Te(e[c],t,n);for(let d=0;d<3;d++)if(b<i[d]){for(let l=2;l>d;l--)i[l]=i[l-1],s[l]=s[l-1];i[d]=b,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,m=0;for(let c=0;c<3;c++){let b=s[c];if(b<0||i[c]>u)continue;let d=1/(i[c]*i[c]);f+=d*e[b].depth,m+=d}return m>0?f/m: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 m=Te(f,o,r);m<i&&(i=m,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 jt(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=jt(e.validUntil);return n===null?!1:(t instanceof Date?t.getTime():t)<n}function ke(e){return e.status!=="draft"&&e.status!=="retracted"}function Lt(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:Lt(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),p=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}${p}`}let m=i==="odd"||i==="even"?2:r,c=u!=null&&Number.isFinite(u)?u-(f-1)*m:n,b=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+b*2);break}case"even":{let l=c%2===0?c:c+1;d=String(l+b*2);break}case"roman":d=de(c+b*r);break;case"letters-upper":d=oe(c+b*r,!1);break;case"letters-lower":d=oe(c+b*r,!0);break;default:d=String(c+b*r);break}return`${s}${d}`}function De(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function he(e,t,n){return n?.label??`${e.label}-${ie(e,t)}`}function pe(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 je(e){let t=Vt(e);return t*t*(3-2*t)}var Ln=Math.PI/180;function j(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function me(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(j(t,n.end)<=1e-9)return!1}else if(n.kind==="bezier"){if(!q(n.control1)||!q(n.control2)||j(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(j(t,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||Math.abs(j(n.end,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||j(t,n.end)<=1e-9)return!1}else return!1;t=n.end}return j(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),m=Math.max(2,Math.ceil(Math.abs(f)*i.radius/n));for(let c=1;c<=m;c+=1){let b=s+f*c/m;o.push({x:i.center.x+Math.cos(b)*i.radius,y:i.center.y+Math.sin(b)*i.radius})}}else{let s=j(r,i.control1)+j(i.control1,i.control2)+j(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 j(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,be=150,Yt=60;function Ge(e){let t=Be/100;if(e<=t)return be;let n=Math.min(1,(e-t)/(1-t));return be-n*(be-Yt)}var Le=.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 m=t.wideAngleThresholdDeg??Ge(i),c=[];for(let a=0;a<r;a+=1)c[a]=j(n[a],n[(a+1)%r]);let b=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},L={x:C.x-S.x,y:C.y-S.y},U=Math.hypot(_.x,_.y),H=Math.hypot(L.x,L.y);if(U<=1e-9||H<=1e-9)continue;let J=Math.min(1,Math.max(-1,(_.x*L.x+_.y*L.y)/(U*H))),M=Math.acos(J)*180/Math.PI;if(M<m)continue;let P=je((M-m)/(180-m));b[a]=i*P*.5*Math.min(U,H)}for(let a=0;a<r;a+=1){let I=(a+1)%r,S=b[a]+b[I];if(S>c[a]&&S>1e-9){let C=c[a]/S;b[a]*=C,b[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(b[a]<=1e-6){d[a]={...S},l[a]={...S};continue}let _=j(S,I)||1,L=j(S,C)||1;d[a]={x:S.x+(I.x-S.x)/_*b[a],y:S.y+(I.y-S.y)/_*b[a]},l[a]={x:S.x+(C.x-S.x)/L*b[a],y:S.y+(C.y-S.y)/L*b[a]}}if(b.every(a=>a<=1e-6)&&!f)return null;let p=[],A={...l[0]},h=A,g=(a,I)=>{if(j(h,a)<=1e-9)return;let S=u[I];Math.abs(S)>1e-6?p.push(Zt(h,a,S*Ue*c[I])):p.push({kind:"line",end:{...a}}),h=a};for(let a=1;a<=r;a+=1){let I=a%r,S=n[I];g(d[I],(a-1)%r),b[I]>1e-6&&j(d[I],l[I])>1e-9&&(p.push({kind:"bezier",control1:me(d[I],S,Le),control2:me(l[I],S,Le),end:{...l[I]}}),h=l[I])}if(!p.length)return null;let x=p[p.length-1];j(x.end,A)>1e-9&&(x.kind==="line"?x.end={...A}:p.push({kind:"line",end:{...A}}));let y={version:1,closed:!0,start:A,segments:p};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,m)=>Ve(e,m/n)),r=new Float64Array(o.length);for(let f=1;f<o.length;f+=1){let m=o[f].x-o[f-1].x,c=o[f].y-o[f-1].y;r[f]=r[f-1]+Math.hypot(m,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 m=i*f/(t-1);for(;u<r.length-1&&r[u]<m;)u+=1;let c=r[u-1],b=r[u],d=b===c?0:(m-c)/(b-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,ge=120,on=0,rn=45,sn=7;function xe(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=xe(t.floorBaseHeightM,$e,ge,0),o=Math.min(ge,n+cn(e.elevation)*Se),r=e.height===void 0?o:xe(e.height,$e,ge,o),i=xe(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 we(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 m=0;m<t;m++)s.push(we(m*n,0,r,i));return s}let u=o/(t-1)*se,f=n/(2*Math.sin(Math.abs(u)/2));for(let m=0;m<t;m++){let c=m*u,b=f*Math.sin(c),d=-f+f*Math.cos(c);s.push(we(b,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=he(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:pe(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(m=>m!==void 0&&m!==!1&&m!=="")?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,b,d,l)=>{let p=o.get(c),A=Je(p),h=p?.label??`${e.label}-${c+1}`,g=e.displayLabel??e.label;return{index:c,label:h,displayLabel:p?.displayLabel??`${g}-${c+1}`,x:b+(p?.dx??0),y:d+(p?.dy??0),categoryKey:p?.categoryKey??e.categoryKey,skipped:!!p?.skip,accessible:A.length>0,accessibility:A,wheelchairSpaceType:p?.wheelchairSpaceType,commercial:p?.commercial,glyph:p?.glyph,viewUrl:p?.viewFromSeatUrl,viewMeta:p?.viewFromSeatUrl?p.viewFromSeatMeta:void 0,labelStyle:p?.labelStyle,...l?{side:l}:{}}};if(e.shape==="round"){let c=(e.radius??40)+Z,b=e.rotation*se,d=Math.max(0,Math.min(360,e.seatArc??360));if(d>=360||n===1){for(let h=0;h<n;h++){let g=b+h/n*2*Math.PI;t.push(r(h,e.center.x+c*Math.cos(g),e.center.y+c*Math.sin(g)))}return t}let l=d*se,p=(2*Math.PI-l)/2,A=b+p;for(let h=0;h<n;h++){let g=A+h/(n-1)*l;t.push(r(h,e.center.x+c*Math.cos(g),e.center.y+c*Math.sin(g)))}return t}let i=e.width??80,s=e.height??50,u=fn(e),f=["top","bottom","left","right"],m=0;for(let c of f){let b=u[c];for(let d=0;d<b;d++){let l,p;c==="top"?(l=-i/2+(d+.5)*i/b,p=-s/2-Z):c==="bottom"?(l=-i/2+(d+.5)*i/b,p=s/2+Z):c==="left"?(l=-i/2-Z,p=-s/2+(d+.5)*s/b):(l=i/2+Z,p=-s/2+(d+.5)*s/b);let A=we(l,p,e.rotation,e.center);t.push(r(m++,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 hn(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)||hn(e,o))}function Me(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 pn(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 Me(e.points);case"section":return Me(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?Me(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 mn(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=pn(t);return(o?n.find(s=>(s.logicalSectionId??s.id)===o&&(mn(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 bn="__sl_ga__",Pe=1e5;function yn(e,t){return`${bn}${encodeURIComponent(e)}__${t+1}`}function gn(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 xn(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}]:[]:gn(e)?e.inventorySegments.map(n=>({...n})):[]}function nt(e){return xn(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 Mn(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(!Mn(s))continue;let u=Sn(s);if(u.length===0)continue;let f=et(t,s),m=f?o.get(f.logicalSectionId??f.id):r;m.seatCount+=u.length,m.objectIds.push(s.id),m.seatLabels.push(...u),i.set(s.id,m.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(m=>[m.id,m.zone]));for(let m of o){let c=u.get(m.id);(t.has(m.id)||c&&t.has(c))&&s.add(m.id)}let f=!!r&&t.has(ce);for(let[m,c]of i)(s.has(c)||f&&c===ce)&&n.add(m);return n}function wn(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 m=f.objects.filter(r);return m.length!==f.objects.length&&(s=!0),m.length===f.objects.length?f:{...f,objects:m}});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, S 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, S as SeatOverride } from '../../types-hv6QjPRV.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-lXzjJrgV.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-BB9MPufB.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-ND5PRE4j.cjs';
|
|
6
|
+
import { E as ExpandedSeat } from '../../renderer-C9BLd1g2.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, S 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, S as SeatOverride } from '../../types-hv6QjPRV.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-Cb7ZwhoO.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-CLKP-2ca.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-BvZ1cQkD.js';
|
|
6
|
+
import { E as ExpandedSeat } from '../../renderer-B9GavToM.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-
|
|
1
|
+
import{a as E}from"../../chunk-Y2J55NLS.js";import{a as F,b as G,c as H,d as I}from"../../chunk-BV6FHURE.js";import{j as z,k as A,l as B,m as C,n as D}from"../../chunk-HZT2U5IY.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-I6DNJFRF.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};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { d as ChartObject, C as ChartDoc } from './types-hv6QjPRV.js';
|
|
2
|
+
|
|
3
|
+
declare const EVENT_CONFIGURATION_SCHEMA: "seatlayer.event-configuration/1";
|
|
4
|
+
declare const EVENT_CONFIGURATION_EXPORT_SCHEMA: "seatlayer.event-configuration-export/1";
|
|
5
|
+
type EventConfigurationLifecycleStatus = 'draft' | 'review' | 'approved' | 'published' | 'archived';
|
|
6
|
+
interface EventConfigurationRef {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly version: number;
|
|
9
|
+
}
|
|
10
|
+
/** Exact immutable venue snapshot against which a configuration was authored. */
|
|
11
|
+
interface EventConfigurationBaseVenue {
|
|
12
|
+
readonly chartId: string;
|
|
13
|
+
/** Opaque chart revision. D1 timestamps and future semantic versions both fit. */
|
|
14
|
+
readonly version: string;
|
|
15
|
+
/** Required when the caller has immutable publication bytes. */
|
|
16
|
+
readonly sha256?: string;
|
|
17
|
+
}
|
|
18
|
+
type EventConfigurationProductionElementKind = 'stage' | 'screen' | 'barrier' | 'camera_platform' | 'sound_desk' | 'rigging_truss';
|
|
19
|
+
type EventConfigurationOcclusion = {
|
|
20
|
+
readonly mode: 'none';
|
|
21
|
+
} | {
|
|
22
|
+
readonly mode: 'partial';
|
|
23
|
+
readonly opacity: number;
|
|
24
|
+
} | {
|
|
25
|
+
readonly mode: 'opaque';
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Event-specific semantics attached to stable base-venue geometry. Position,
|
|
29
|
+
* footprint and rotation remain on the referenced chart object; only the
|
|
30
|
+
* production role and bounded vertical/occlusion behavior are versioned here.
|
|
31
|
+
*/
|
|
32
|
+
interface EventConfigurationProductionElement {
|
|
33
|
+
readonly id: string;
|
|
34
|
+
readonly objectId: string;
|
|
35
|
+
readonly kind: EventConfigurationProductionElementKind;
|
|
36
|
+
readonly heightM: number;
|
|
37
|
+
readonly baseElevationM?: number;
|
|
38
|
+
readonly occlusion: EventConfigurationOcclusion;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Configuration-only references. Base venue geometry remains in the chart;
|
|
42
|
+
* production objects and killed inventory are selected by stable identity.
|
|
43
|
+
*/
|
|
44
|
+
interface EventConfigurationOverlay {
|
|
45
|
+
readonly objectIds: readonly string[];
|
|
46
|
+
readonly productionKillSeatIds: readonly string[];
|
|
47
|
+
readonly productionElements?: readonly EventConfigurationProductionElement[];
|
|
48
|
+
}
|
|
49
|
+
/** Immutable content. Review state, actors and active pointers live outside it. */
|
|
50
|
+
interface EventConfigurationVersion extends EventConfigurationRef {
|
|
51
|
+
readonly schema: typeof EVENT_CONFIGURATION_SCHEMA;
|
|
52
|
+
readonly label: string;
|
|
53
|
+
readonly baseVenue: EventConfigurationBaseVenue;
|
|
54
|
+
readonly overlay: EventConfigurationOverlay;
|
|
55
|
+
}
|
|
56
|
+
/** Portable content only. Importers must create a new draft and never import approval. */
|
|
57
|
+
interface EventConfigurationExportEnvelope {
|
|
58
|
+
readonly schema: typeof EVENT_CONFIGURATION_EXPORT_SCHEMA;
|
|
59
|
+
readonly configuration: EventConfigurationVersion;
|
|
60
|
+
readonly contentSha256: string;
|
|
61
|
+
}
|
|
62
|
+
interface EventConfigurationVersionSummary extends EventConfigurationRef {
|
|
63
|
+
readonly status: EventConfigurationLifecycleStatus;
|
|
64
|
+
readonly contentSha256: string;
|
|
65
|
+
}
|
|
66
|
+
type EventConfigurationParseIssueCode = 'invalid_export' | 'unsupported_schema' | 'invalid_id' | 'invalid_label' | 'invalid_version' | 'invalid_base_venue' | 'invalid_overlay' | 'invalid_production_element' | 'invalid_checksum';
|
|
67
|
+
interface EventConfigurationParseIssue {
|
|
68
|
+
code: EventConfigurationParseIssueCode;
|
|
69
|
+
path: string;
|
|
70
|
+
message: string;
|
|
71
|
+
}
|
|
72
|
+
type EventConfigurationParseResult = {
|
|
73
|
+
ok: true;
|
|
74
|
+
value: EventConfigurationExportEnvelope;
|
|
75
|
+
} | {
|
|
76
|
+
ok: false;
|
|
77
|
+
issues: EventConfigurationParseIssue[];
|
|
78
|
+
};
|
|
79
|
+
type EventConfigurationVersionParseResult = {
|
|
80
|
+
ok: true;
|
|
81
|
+
value: EventConfigurationVersion;
|
|
82
|
+
} | {
|
|
83
|
+
ok: false;
|
|
84
|
+
issues: EventConfigurationParseIssue[];
|
|
85
|
+
};
|
|
86
|
+
type EventConfigurationCompatibilityIssueCode = 'base_venue_mismatch' | 'base_venue_version_mismatch' | 'base_venue_checksum_missing' | 'base_venue_checksum_mismatch' | 'overlay_object_missing' | 'production_element_not_shape' | 'production_kill_seat_missing';
|
|
87
|
+
interface EventConfigurationCompatibilityIssue {
|
|
88
|
+
code: EventConfigurationCompatibilityIssueCode;
|
|
89
|
+
message: string;
|
|
90
|
+
targetId?: string;
|
|
91
|
+
}
|
|
92
|
+
interface EventConfigurationVenueSnapshot extends EventConfigurationBaseVenue {
|
|
93
|
+
objectIds: Iterable<string>;
|
|
94
|
+
seatIds: Iterable<string>;
|
|
95
|
+
/** Optional richer validation supplied by server-side chart readers. */
|
|
96
|
+
objectTypes?: ReadonlyMap<string, ChartObject['type']>;
|
|
97
|
+
}
|
|
98
|
+
interface EventConfigurationCompatibilityResult {
|
|
99
|
+
compatible: boolean;
|
|
100
|
+
issues: EventConfigurationCompatibilityIssue[];
|
|
101
|
+
}
|
|
102
|
+
type LegacyEventConfigurationMigrationResult = {
|
|
103
|
+
ok: true;
|
|
104
|
+
configurations: EventConfigurationVersion[];
|
|
105
|
+
} | {
|
|
106
|
+
ok: false;
|
|
107
|
+
invalidIds: string[];
|
|
108
|
+
};
|
|
109
|
+
/** Strict content boundary used by local authoring and verified R2 reads. */
|
|
110
|
+
declare function parseEventConfigurationVersion(value: unknown): EventConfigurationVersionParseResult;
|
|
111
|
+
/**
|
|
112
|
+
* Strict import boundary for a portable configuration snapshot. Unknown future
|
|
113
|
+
* schemas fail closed. Approval/publication metadata is deliberately absent.
|
|
114
|
+
*/
|
|
115
|
+
declare function parseEventConfigurationExport(value: unknown): EventConfigurationParseResult;
|
|
116
|
+
/** Stable bytes for content hashing and immutable R2 version artifacts. */
|
|
117
|
+
declare function canonicalEventConfigurationJson(configuration: EventConfigurationVersion): string;
|
|
118
|
+
/** Exact compatibility check run before review, event binding, or publication. */
|
|
119
|
+
declare function inspectEventConfigurationCompatibility(configuration: EventConfigurationVersion, venue: EventConfigurationVenueSnapshot): EventConfigurationCompatibilityResult;
|
|
120
|
+
/** Persisted lifecycle routes use this allow-list; rollback is a pointer change, not a status rewrite. */
|
|
121
|
+
declare function canTransitionEventConfiguration(from: EventConfigurationLifecycleStatus, to: EventConfigurationLifecycleStatus): boolean;
|
|
122
|
+
/** A rollback may select only an older, already-published immutable version. */
|
|
123
|
+
declare function resolveEventConfigurationRollback(versions: readonly EventConfigurationVersionSummary[], current: EventConfigurationRef, targetVersion: number): EventConfigurationVersionSummary | null;
|
|
124
|
+
/**
|
|
125
|
+
* Deterministically lifts legacy bare chart ids into standalone version-1
|
|
126
|
+
* configuration content. The source document is never mutated or approved.
|
|
127
|
+
*/
|
|
128
|
+
declare function migrateLegacyEventConfigurations(doc: ChartDoc, baseVenue: EventConfigurationBaseVenue): LegacyEventConfigurationMigrationResult;
|
|
129
|
+
|
|
130
|
+
export { type EventConfigurationRef as E, type LegacyEventConfigurationMigrationResult as L, type EventConfigurationVersion as a, EVENT_CONFIGURATION_EXPORT_SCHEMA as b, EVENT_CONFIGURATION_SCHEMA as c, type EventConfigurationBaseVenue as d, type EventConfigurationCompatibilityIssue as e, type EventConfigurationCompatibilityIssueCode as f, type EventConfigurationCompatibilityResult as g, type EventConfigurationExportEnvelope as h, type EventConfigurationLifecycleStatus as i, type EventConfigurationOcclusion as j, type EventConfigurationOverlay as k, type EventConfigurationParseIssue as l, type EventConfigurationParseIssueCode as m, type EventConfigurationParseResult as n, type EventConfigurationProductionElement as o, type EventConfigurationProductionElementKind as p, type EventConfigurationVenueSnapshot as q, type EventConfigurationVersionParseResult as r, type EventConfigurationVersionSummary as s, canTransitionEventConfiguration as t, canonicalEventConfigurationJson as u, inspectEventConfigurationCompatibility as v, migrateLegacyEventConfigurations as w, parseEventConfigurationExport as x, parseEventConfigurationVersion as y, resolveEventConfigurationRollback as z };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { d as ChartObject, C as ChartDoc } from './types-hv6QjPRV.cjs';
|
|
2
|
+
|
|
3
|
+
declare const EVENT_CONFIGURATION_SCHEMA: "seatlayer.event-configuration/1";
|
|
4
|
+
declare const EVENT_CONFIGURATION_EXPORT_SCHEMA: "seatlayer.event-configuration-export/1";
|
|
5
|
+
type EventConfigurationLifecycleStatus = 'draft' | 'review' | 'approved' | 'published' | 'archived';
|
|
6
|
+
interface EventConfigurationRef {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly version: number;
|
|
9
|
+
}
|
|
10
|
+
/** Exact immutable venue snapshot against which a configuration was authored. */
|
|
11
|
+
interface EventConfigurationBaseVenue {
|
|
12
|
+
readonly chartId: string;
|
|
13
|
+
/** Opaque chart revision. D1 timestamps and future semantic versions both fit. */
|
|
14
|
+
readonly version: string;
|
|
15
|
+
/** Required when the caller has immutable publication bytes. */
|
|
16
|
+
readonly sha256?: string;
|
|
17
|
+
}
|
|
18
|
+
type EventConfigurationProductionElementKind = 'stage' | 'screen' | 'barrier' | 'camera_platform' | 'sound_desk' | 'rigging_truss';
|
|
19
|
+
type EventConfigurationOcclusion = {
|
|
20
|
+
readonly mode: 'none';
|
|
21
|
+
} | {
|
|
22
|
+
readonly mode: 'partial';
|
|
23
|
+
readonly opacity: number;
|
|
24
|
+
} | {
|
|
25
|
+
readonly mode: 'opaque';
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Event-specific semantics attached to stable base-venue geometry. Position,
|
|
29
|
+
* footprint and rotation remain on the referenced chart object; only the
|
|
30
|
+
* production role and bounded vertical/occlusion behavior are versioned here.
|
|
31
|
+
*/
|
|
32
|
+
interface EventConfigurationProductionElement {
|
|
33
|
+
readonly id: string;
|
|
34
|
+
readonly objectId: string;
|
|
35
|
+
readonly kind: EventConfigurationProductionElementKind;
|
|
36
|
+
readonly heightM: number;
|
|
37
|
+
readonly baseElevationM?: number;
|
|
38
|
+
readonly occlusion: EventConfigurationOcclusion;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Configuration-only references. Base venue geometry remains in the chart;
|
|
42
|
+
* production objects and killed inventory are selected by stable identity.
|
|
43
|
+
*/
|
|
44
|
+
interface EventConfigurationOverlay {
|
|
45
|
+
readonly objectIds: readonly string[];
|
|
46
|
+
readonly productionKillSeatIds: readonly string[];
|
|
47
|
+
readonly productionElements?: readonly EventConfigurationProductionElement[];
|
|
48
|
+
}
|
|
49
|
+
/** Immutable content. Review state, actors and active pointers live outside it. */
|
|
50
|
+
interface EventConfigurationVersion extends EventConfigurationRef {
|
|
51
|
+
readonly schema: typeof EVENT_CONFIGURATION_SCHEMA;
|
|
52
|
+
readonly label: string;
|
|
53
|
+
readonly baseVenue: EventConfigurationBaseVenue;
|
|
54
|
+
readonly overlay: EventConfigurationOverlay;
|
|
55
|
+
}
|
|
56
|
+
/** Portable content only. Importers must create a new draft and never import approval. */
|
|
57
|
+
interface EventConfigurationExportEnvelope {
|
|
58
|
+
readonly schema: typeof EVENT_CONFIGURATION_EXPORT_SCHEMA;
|
|
59
|
+
readonly configuration: EventConfigurationVersion;
|
|
60
|
+
readonly contentSha256: string;
|
|
61
|
+
}
|
|
62
|
+
interface EventConfigurationVersionSummary extends EventConfigurationRef {
|
|
63
|
+
readonly status: EventConfigurationLifecycleStatus;
|
|
64
|
+
readonly contentSha256: string;
|
|
65
|
+
}
|
|
66
|
+
type EventConfigurationParseIssueCode = 'invalid_export' | 'unsupported_schema' | 'invalid_id' | 'invalid_label' | 'invalid_version' | 'invalid_base_venue' | 'invalid_overlay' | 'invalid_production_element' | 'invalid_checksum';
|
|
67
|
+
interface EventConfigurationParseIssue {
|
|
68
|
+
code: EventConfigurationParseIssueCode;
|
|
69
|
+
path: string;
|
|
70
|
+
message: string;
|
|
71
|
+
}
|
|
72
|
+
type EventConfigurationParseResult = {
|
|
73
|
+
ok: true;
|
|
74
|
+
value: EventConfigurationExportEnvelope;
|
|
75
|
+
} | {
|
|
76
|
+
ok: false;
|
|
77
|
+
issues: EventConfigurationParseIssue[];
|
|
78
|
+
};
|
|
79
|
+
type EventConfigurationVersionParseResult = {
|
|
80
|
+
ok: true;
|
|
81
|
+
value: EventConfigurationVersion;
|
|
82
|
+
} | {
|
|
83
|
+
ok: false;
|
|
84
|
+
issues: EventConfigurationParseIssue[];
|
|
85
|
+
};
|
|
86
|
+
type EventConfigurationCompatibilityIssueCode = 'base_venue_mismatch' | 'base_venue_version_mismatch' | 'base_venue_checksum_missing' | 'base_venue_checksum_mismatch' | 'overlay_object_missing' | 'production_element_not_shape' | 'production_kill_seat_missing';
|
|
87
|
+
interface EventConfigurationCompatibilityIssue {
|
|
88
|
+
code: EventConfigurationCompatibilityIssueCode;
|
|
89
|
+
message: string;
|
|
90
|
+
targetId?: string;
|
|
91
|
+
}
|
|
92
|
+
interface EventConfigurationVenueSnapshot extends EventConfigurationBaseVenue {
|
|
93
|
+
objectIds: Iterable<string>;
|
|
94
|
+
seatIds: Iterable<string>;
|
|
95
|
+
/** Optional richer validation supplied by server-side chart readers. */
|
|
96
|
+
objectTypes?: ReadonlyMap<string, ChartObject['type']>;
|
|
97
|
+
}
|
|
98
|
+
interface EventConfigurationCompatibilityResult {
|
|
99
|
+
compatible: boolean;
|
|
100
|
+
issues: EventConfigurationCompatibilityIssue[];
|
|
101
|
+
}
|
|
102
|
+
type LegacyEventConfigurationMigrationResult = {
|
|
103
|
+
ok: true;
|
|
104
|
+
configurations: EventConfigurationVersion[];
|
|
105
|
+
} | {
|
|
106
|
+
ok: false;
|
|
107
|
+
invalidIds: string[];
|
|
108
|
+
};
|
|
109
|
+
/** Strict content boundary used by local authoring and verified R2 reads. */
|
|
110
|
+
declare function parseEventConfigurationVersion(value: unknown): EventConfigurationVersionParseResult;
|
|
111
|
+
/**
|
|
112
|
+
* Strict import boundary for a portable configuration snapshot. Unknown future
|
|
113
|
+
* schemas fail closed. Approval/publication metadata is deliberately absent.
|
|
114
|
+
*/
|
|
115
|
+
declare function parseEventConfigurationExport(value: unknown): EventConfigurationParseResult;
|
|
116
|
+
/** Stable bytes for content hashing and immutable R2 version artifacts. */
|
|
117
|
+
declare function canonicalEventConfigurationJson(configuration: EventConfigurationVersion): string;
|
|
118
|
+
/** Exact compatibility check run before review, event binding, or publication. */
|
|
119
|
+
declare function inspectEventConfigurationCompatibility(configuration: EventConfigurationVersion, venue: EventConfigurationVenueSnapshot): EventConfigurationCompatibilityResult;
|
|
120
|
+
/** Persisted lifecycle routes use this allow-list; rollback is a pointer change, not a status rewrite. */
|
|
121
|
+
declare function canTransitionEventConfiguration(from: EventConfigurationLifecycleStatus, to: EventConfigurationLifecycleStatus): boolean;
|
|
122
|
+
/** A rollback may select only an older, already-published immutable version. */
|
|
123
|
+
declare function resolveEventConfigurationRollback(versions: readonly EventConfigurationVersionSummary[], current: EventConfigurationRef, targetVersion: number): EventConfigurationVersionSummary | null;
|
|
124
|
+
/**
|
|
125
|
+
* Deterministically lifts legacy bare chart ids into standalone version-1
|
|
126
|
+
* configuration content. The source document is never mutated or approved.
|
|
127
|
+
*/
|
|
128
|
+
declare function migrateLegacyEventConfigurations(doc: ChartDoc, baseVenue: EventConfigurationBaseVenue): LegacyEventConfigurationMigrationResult;
|
|
129
|
+
|
|
130
|
+
export { type EventConfigurationRef as E, type LegacyEventConfigurationMigrationResult as L, type EventConfigurationVersion as a, EVENT_CONFIGURATION_EXPORT_SCHEMA as b, EVENT_CONFIGURATION_SCHEMA as c, type EventConfigurationBaseVenue as d, type EventConfigurationCompatibilityIssue as e, type EventConfigurationCompatibilityIssueCode as f, type EventConfigurationCompatibilityResult as g, type EventConfigurationExportEnvelope as h, type EventConfigurationLifecycleStatus as i, type EventConfigurationOcclusion as j, type EventConfigurationOverlay as k, type EventConfigurationParseIssue as l, type EventConfigurationParseIssueCode as m, type EventConfigurationParseResult as n, type EventConfigurationProductionElement as o, type EventConfigurationProductionElementKind as p, type EventConfigurationVenueSnapshot as q, type EventConfigurationVersionParseResult as r, type EventConfigurationVersionSummary as s, canTransitionEventConfiguration as t, canonicalEventConfigurationJson as u, inspectEventConfigurationCompatibility as v, migrateLegacyEventConfigurations as w, parseEventConfigurationExport as x, parseEventConfigurationVersion as y, resolveEventConfigurationRollback as z };
|