@seatlayer/core 0.92.5 → 0.94.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ar-2SI7NFFP.js +1 -0
- package/dist/be-U2FT56IF.js +1 -0
- package/dist/bg-CZXBFEYM.js +1 -0
- package/dist/ca-S6HHRSSW.js +1 -0
- package/dist/{chunk-6FTHCEJW.js → chunk-A3ZL3R75.js} +1 -1
- package/dist/{chunk-S4H34KCG.js → chunk-CEIVHWRB.js} +1 -1
- package/dist/{chunk-4I2VWFJY.js → chunk-F2EXXZSZ.js} +1 -1
- package/dist/chunk-F7TP67LK.js +1 -0
- package/dist/{chunk-HC3U5BWH.js → chunk-LAX7F5ML.js} +1 -1
- package/dist/{chunk-NRZY5UXV.js → chunk-LFJUXTIO.js} +1 -1
- package/dist/{chunk-NKJS7MLW.js → chunk-M5X6G7FD.js} +1 -1
- package/dist/chunk-M7JA4BGP.js +1 -0
- package/dist/{chunk-K42NW62J.js → chunk-O3DGXAIC.js} +1 -1
- package/dist/{chunk-LVIAHZ4N.js → chunk-Q3MSDG4S.js} +1 -1
- package/dist/{chunk-TXF2XAK4.js → chunk-TKYTTEJ2.js} +1 -1
- package/dist/{chunk-LQKUHEL6.js → chunk-U7CVRE4P.js} +1 -1
- package/dist/core/chart-ops/index.cjs +1 -1
- package/dist/core/chart-ops/index.d.cts +18 -3
- package/dist/core/chart-ops/index.d.ts +18 -3
- package/dist/core/chart-ops/index.js +1 -1
- package/dist/core/inventory/index.cjs +1 -1
- package/dist/core/inventory/index.d.cts +2 -2
- package/dist/core/inventory/index.d.ts +2 -2
- package/dist/core/inventory/index.js +1 -1
- package/dist/core/layout/index.cjs +1 -1
- package/dist/core/layout/index.d.cts +2 -2
- package/dist/core/layout/index.d.ts +2 -2
- package/dist/core/layout/index.js +1 -1
- package/dist/core/quality/index.d.cts +2 -2
- package/dist/core/quality/index.d.ts +2 -2
- package/dist/core/quality/index.js +1 -1
- package/dist/core/sections/index.cjs +1 -1
- package/dist/core/sections/index.d.cts +1 -1
- package/dist/core/sections/index.d.ts +1 -1
- package/dist/core/sections/index.js +1 -1
- package/dist/cs-LGHHO6S2.js +1 -0
- package/dist/cy-BR55DXTI.js +1 -0
- package/dist/da-AWX6N4TO.js +1 -0
- package/dist/de-77YNHYP5.js +1 -0
- package/dist/el-NIQKJA32.js +1 -0
- package/dist/es-VHGELLST.js +1 -0
- package/dist/et-4TD7XADS.js +1 -0
- package/dist/fa-UAZ5KV3N.js +1 -0
- package/dist/fi-JLCYSRVX.js +1 -0
- package/dist/fr-JX7QFSSO.js +1 -0
- package/dist/he-DOZ45PIT.js +1 -0
- package/dist/hr-H3GWMNG4.js +1 -0
- package/dist/hu-GSQF7ES3.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +34 -17
- package/dist/index.d.ts +34 -17
- package/dist/index.js +1 -1
- package/dist/it-PAUFAEAT.js +1 -0
- package/dist/ja-HFHAFCUM.js +1 -0
- package/dist/ku-KG57RZH4.js +1 -0
- package/dist/localeLoaders-7RRR6IXA.js +1 -0
- package/dist/lt-OWGR7NDQ.js +1 -0
- package/dist/lv-NI4L2PLM.js +1 -0
- package/dist/nl-KJNBH7GK.js +1 -0
- package/dist/no-DPBJYJKY.js +1 -0
- package/dist/pl-XAV56ZWO.js +1 -0
- package/dist/pt-4V7DSTE3.js +1 -0
- package/dist/{renderedQuality-D5G1fHtR.d.ts → renderedQuality-BrCnk3-x.d.ts} +1 -1
- package/dist/{renderedQuality-DThBK6x4.d.cts → renderedQuality-CXlWvz_l.d.cts} +1 -1
- package/dist/{renderer-B7IrAGHP.d.ts → renderer-DbnKKo5K.d.ts} +100 -1
- package/dist/{renderer-BePADdjE.d.cts → renderer-fetXkaDe.d.cts} +100 -1
- package/dist/ro-OIPNCCS7.js +1 -0
- package/dist/ru-JS5BEIO5.js +1 -0
- package/dist/sk-CS5FNAAC.js +1 -0
- package/dist/sl-UKLY77MM.js +1 -0
- package/dist/sr-DGGTR6NQ.js +1 -0
- package/dist/sv-6O6AJ5ZD.js +1 -0
- package/dist/{tableSizing-D7dXthik.d.ts → tableSizing-CPYpm4iH.d.ts} +14 -2
- package/dist/{tableSizing-DUSD6Ksr.d.cts → tableSizing-DKo6Zlt_.d.cts} +14 -2
- package/dist/{ticketRestrictions-5qEU-1eK.d.cts → ticketRestrictions-CEgj821Q.d.cts} +1 -1
- package/dist/{ticketRestrictions-rrajqzOB.d.ts → ticketRestrictions-le9Yoa10.d.ts} +1 -1
- package/dist/tr-HSODCNOA.js +1 -0
- package/dist/uk-PLZCNDOX.js +1 -0
- package/dist/view3d/index.cjs +25 -25
- package/dist/view3d/index.d.cts +1 -1
- package/dist/view3d/index.d.ts +1 -1
- package/dist/view3d/index.js +1 -1
- package/dist/view3d/scene/scene.worker.cjs +1 -1
- package/dist/view3d/scene/scene.worker.js +1 -1
- package/dist/zh-Hans-DQX4CWFR.js +1 -0
- package/dist/zh-Hant-MAEIHPS4.js +1 -0
- package/package.json +1 -1
- package/dist/ar-KGNNNJUO.js +0 -1
- package/dist/be-LE7QOODV.js +0 -1
- package/dist/bg-CVE3J6PP.js +0 -1
- package/dist/ca-IKKNYKM3.js +0 -1
- package/dist/chunk-D5ZLXZYU.js +0 -1
- package/dist/chunk-F45ZMLCU.js +0 -1
- package/dist/cs-URM2GHWN.js +0 -1
- package/dist/cy-2M2GE2B4.js +0 -1
- package/dist/da-WAXH2D7H.js +0 -1
- package/dist/de-H4PSHII3.js +0 -1
- package/dist/el-U4RQJNUD.js +0 -1
- package/dist/es-ZS7OFHRA.js +0 -1
- package/dist/et-ZZIBRHRO.js +0 -1
- package/dist/fa-7QW4XHTK.js +0 -1
- package/dist/fi-P6C2UJG3.js +0 -1
- package/dist/fr-UNQNIKP7.js +0 -1
- package/dist/he-EBIDVS7Q.js +0 -1
- package/dist/hr-ELYMVVXF.js +0 -1
- package/dist/hu-XWENOXUQ.js +0 -1
- package/dist/it-AAI5NPRW.js +0 -1
- package/dist/ja-6WK4CCNS.js +0 -1
- package/dist/ku-7NHUIS6X.js +0 -1
- package/dist/localeLoaders-THFBL37Y.js +0 -1
- package/dist/lt-LRK6MX3B.js +0 -1
- package/dist/lv-OLYBSH3S.js +0 -1
- package/dist/nl-QWXHNW6I.js +0 -1
- package/dist/no-2KC54QOY.js +0 -1
- package/dist/pl-47XPU4H7.js +0 -1
- package/dist/pt-PTM7NPGE.js +0 -1
- package/dist/ro-MGGJVFMK.js +0 -1
- package/dist/ru-TPAADG2S.js +0 -1
- package/dist/sk-Y3IOBKYW.js +0 -1
- package/dist/sl-UUI7EHW5.js +0 -1
- package/dist/sr-LAJHZ4FT.js +0 -1
- package/dist/sv-SRHCVAW4.js +0 -1
- package/dist/tr-CASRE75P.js +0 -1
- package/dist/uk-6A5ZWUPH.js +0 -1
- package/dist/zh-Hans-QN3XNYBM.js +0 -1
- package/dist/zh-Hant-CMJBSD2M.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { P as Point, A as AccessibilityType, C as ChartDoc, R as RowObject } from '../../types-BbqhOJ5L.cjs';
|
|
2
|
-
import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-
|
|
2
|
+
import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-fetXkaDe.cjs';
|
|
3
3
|
export { C as CATEGORY_INVENTORY_FAMILIES, a as CategoryInventoryClone, b as CategoryInventoryConflict, c as CategoryInventoryFamily, d as CategoryInventoryFamilyUsage, e as CategoryInventoryObjectType, f as CategoryInventoryReassignment, g as CategoryInventoryRemediationChange, h as CategoryInventoryRemediationResult, i as CategoryInventoryTarget, j as describeCategoryInventoryConflict, k as effectiveSeatOwnerCategoryCounts, l as inspectCategoryInventoryConflicts, r as remediateCategoryInventoryConflicts } from '../../categoryInventory-C-bfH2av.cjs';
|
|
4
|
-
export { C as ClientInventoryModelVersion, a as CompanionSelectionIssue, D as DEFAULT_EVENT_INVENTORY_LIMIT, G as GA_UNIT_LABEL_PREFIX, b as GroupedTableBookingMode, c as GroupedTableInventoryUnit, d as GroupedTableProjectionError, L as LARGE_VENUE_INVENTORY_MODULE, M as MAX_EVENT_INVENTORY, e as MAX_GA_CAPACITY, N as NotForSaleSelectionIssue, R as RestrictionChartDoc, f as RestrictionSeat, T as TicketOptionApplicabilityIssue, g as TicketSelection, h as TicketSelectionIssue, i as TicketSelectionOptions, j as TicketTierResolution, k as applicableTicketTiers, l as companionSelectionIssue, m as eventInventoryLimitFor, n as gaAreasOf, o as gaInventorySegments, p as gaUnitLabel, q as gaUnitLabels, r as groupedTableInventory, s as growJoinedGAInventory, t as isFullChartDoc, u as isGaUnitLabel, v as resolveTicketTierForSeat, w as ticketOptionNotApplicableIssue, x as ticketSelectionIssue, y as ticketTierAppliesToSeat, z as validGAInventorySegments } from '../../ticketRestrictions-
|
|
4
|
+
export { C as ClientInventoryModelVersion, a as CompanionSelectionIssue, D as DEFAULT_EVENT_INVENTORY_LIMIT, G as GA_UNIT_LABEL_PREFIX, b as GroupedTableBookingMode, c as GroupedTableInventoryUnit, d as GroupedTableProjectionError, L as LARGE_VENUE_INVENTORY_MODULE, M as MAX_EVENT_INVENTORY, e as MAX_GA_CAPACITY, N as NotForSaleSelectionIssue, R as RestrictionChartDoc, f as RestrictionSeat, T as TicketOptionApplicabilityIssue, g as TicketSelection, h as TicketSelectionIssue, i as TicketSelectionOptions, j as TicketTierResolution, k as applicableTicketTiers, l as companionSelectionIssue, m as eventInventoryLimitFor, n as gaAreasOf, o as gaInventorySegments, p as gaUnitLabel, q as gaUnitLabels, r as groupedTableInventory, s as growJoinedGAInventory, t as isFullChartDoc, u as isGaUnitLabel, v as resolveTicketTierForSeat, w as ticketOptionNotApplicableIssue, x as ticketSelectionIssue, y as ticketTierAppliesToSeat, z as validGAInventorySegments } from '../../ticketRestrictions-CEgj821Q.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Best-available seat selection — a PURE, fully unit-testable ranking function.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { P as Point, A as AccessibilityType, C as ChartDoc, R as RowObject } from '../../types-BbqhOJ5L.js';
|
|
2
|
-
import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-
|
|
2
|
+
import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-DbnKKo5K.js';
|
|
3
3
|
export { C as CATEGORY_INVENTORY_FAMILIES, a as CategoryInventoryClone, b as CategoryInventoryConflict, c as CategoryInventoryFamily, d as CategoryInventoryFamilyUsage, e as CategoryInventoryObjectType, f as CategoryInventoryReassignment, g as CategoryInventoryRemediationChange, h as CategoryInventoryRemediationResult, i as CategoryInventoryTarget, j as describeCategoryInventoryConflict, k as effectiveSeatOwnerCategoryCounts, l as inspectCategoryInventoryConflicts, r as remediateCategoryInventoryConflicts } from '../../categoryInventory-4XH7dMDH.js';
|
|
4
|
-
export { C as ClientInventoryModelVersion, a as CompanionSelectionIssue, D as DEFAULT_EVENT_INVENTORY_LIMIT, G as GA_UNIT_LABEL_PREFIX, b as GroupedTableBookingMode, c as GroupedTableInventoryUnit, d as GroupedTableProjectionError, L as LARGE_VENUE_INVENTORY_MODULE, M as MAX_EVENT_INVENTORY, e as MAX_GA_CAPACITY, N as NotForSaleSelectionIssue, R as RestrictionChartDoc, f as RestrictionSeat, T as TicketOptionApplicabilityIssue, g as TicketSelection, h as TicketSelectionIssue, i as TicketSelectionOptions, j as TicketTierResolution, k as applicableTicketTiers, l as companionSelectionIssue, m as eventInventoryLimitFor, n as gaAreasOf, o as gaInventorySegments, p as gaUnitLabel, q as gaUnitLabels, r as groupedTableInventory, s as growJoinedGAInventory, t as isFullChartDoc, u as isGaUnitLabel, v as resolveTicketTierForSeat, w as ticketOptionNotApplicableIssue, x as ticketSelectionIssue, y as ticketTierAppliesToSeat, z as validGAInventorySegments } from '../../ticketRestrictions-
|
|
4
|
+
export { C as ClientInventoryModelVersion, a as CompanionSelectionIssue, D as DEFAULT_EVENT_INVENTORY_LIMIT, G as GA_UNIT_LABEL_PREFIX, b as GroupedTableBookingMode, c as GroupedTableInventoryUnit, d as GroupedTableProjectionError, L as LARGE_VENUE_INVENTORY_MODULE, M as MAX_EVENT_INVENTORY, e as MAX_GA_CAPACITY, N as NotForSaleSelectionIssue, R as RestrictionChartDoc, f as RestrictionSeat, T as TicketOptionApplicabilityIssue, g as TicketSelection, h as TicketSelectionIssue, i as TicketSelectionOptions, j as TicketTierResolution, k as applicableTicketTiers, l as companionSelectionIssue, m as eventInventoryLimitFor, n as gaAreasOf, o as gaInventorySegments, p as gaUnitLabel, q as gaUnitLabels, r as groupedTableInventory, s as growJoinedGAInventory, t as isFullChartDoc, u as isGaUnitLabel, v as resolveTicketTierForSeat, w as ticketOptionNotApplicableIssue, x as ticketSelectionIssue, y as ticketTierAppliesToSeat, z as validGAInventorySegments } from '../../ticketRestrictions-le9Yoa10.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Best-available seat selection — a PURE, fully unit-testable ranking function.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ut,b as pt,c as ft,d as mt,e as yt,f as dt,g as ht,h as bt,i as xt,j as Mt,k as gt,l as wt}from"../../chunk-
|
|
1
|
+
import{a as ut,b as pt,c as ft,d as mt,e as yt,f as dt,g as ht,h as bt,i as xt,j as Mt,k as gt,l as wt}from"../../chunk-O3DGXAIC.js";import{a as Ct,b as vt,c as Rt,d as Ot,e as St,f as B,h as N}from"../../chunk-M7JA4BGP.js";import"../../chunk-TKYTTEJ2.js";import"../../chunk-LAX7F5ML.js";import"../../chunk-TQN2VWQO.js";import"../../chunk-5BMXWOE7.js";import{a as et,b as ot,c as rt,d as nt,e as at,f as it,g as st,h as ct,i as lt}from"../../chunk-CEIVHWRB.js";import"../../chunk-M5X6G7FD.js";import"../../chunk-F2EXXZSZ.js";import{B as R,Ba as v,Ca as P,Ea as j,Fa as _,La as I,M as O,d as H,e as V,f as Z,g as tt,za as S}from"../../chunk-F7TP67LK.js";import"../../chunk-5ITK5236.js";import"../../chunk-JBOTRSMY.js";import"../../chunk-CRCGO52K.js";function g(t){return t.floors?.length?t.floors.flatMap(e=>e.objects):t.objects}function k(t){return g(t).reduce((e,r)=>r.type==="row"?e+S(r):r.type==="table"?e+j(r):r.type==="gaArea"?e+Math.max(0,Math.floor(r.capacity)):r.type==="booth"?e+1:e,0)}function Bt(t){let e={};for(let o of t.categories??[])e[o.key]=0;let r=(o,n)=>{n>0&&(e[o]=(e[o]??0)+n)};for(let o of g(t))if(o.type==="row")for(let n of v(o))r(n.categoryKey,1);else if(o.type==="table")if(o.bookAsWhole||o.variableOccupancy)r(o.categoryKey,Math.max(0,Math.round(o.seatCount)));else for(let n of _(o))r(n.categoryKey,1);else o.type==="gaArea"?r(o.categoryKey,Math.max(0,Math.floor(o.capacity))):o.type==="booth"&&r(o.categoryKey,1);return e}function z(t){if(!t.template)return null;let e=g(t),r=e.filter(u=>u.type==="row"||u.type==="table"||u.type==="gaArea");if(!r.length)return null;let n=e.filter(u=>u.type==="booth").length+r.reduce((u,f)=>u+(f.type==="table"?2:1),0),i=k(t),c=Math.max(n+1,Math.min(5e4,i*4)),l=[.5,1,1.5,2].map(u=>O(Math.round(i*u),n,c));return{family:t.template.family,display:t.template.family.replace(/-/g," ").replace(/\b\w/g,u=>u.toUpperCase()),min:n,max:c,presets:["S","M","L","XL"].map((u,f)=>({size:u,seats:l[f]}))}}function A(t){let e=v(t);return e.length?R(e):{...t.origin}}function Nt(t,e){let r=z(t);if(!r)return structuredClone(t);let o=structuredClone(t),n=g(o),i=n.filter(a=>a.type==="row"||a.type==="table"||a.type==="gaArea"),c=n.filter(a=>a.type==="booth").length,l=Math.max(r.min,Math.min(r.max,Math.round(e))),u=l-c,f=i.map((a,s)=>{let m=a.type==="gaArea"?Math.max(0,Math.floor(a.capacity)):a.seatCount,x=a.type==="table"?2:1;return{object:a,index:s,current:m,minimum:x,value:x,fraction:0}}),K=f.reduce((a,s)=>a+s.minimum,0),w=Math.max(0,u-K),L=f.reduce((a,s)=>a+Math.max(1,s.current-s.minimum),0);for(let a of f){let s=w*Math.max(1,a.current-a.minimum)/L,m=Math.floor(s);a.value+=m,a.fraction=s-m}w=u-f.reduce((a,s)=>a+s.value,0),f.sort((a,s)=>s.fraction-a.fraction||a.index-s.index);for(let a=0;a<w;a++)f[a%f.length].value++;f.sort((a,s)=>a.index-s.index);for(let a of f)if(a.object.type==="row"){let s=A(a.object);a.object.seatCount=a.value;let m=A(a.object);a.object.origin.x+=s.x-m.x,a.object.origin.y+=s.y-m.y}else if(a.object.type==="table"){let s=a.object;if(s.seatCountsBySide){let m=["top","bottom","left","right"],x=P(s),F=m.reduce((p,y)=>p+x[y],0)||1,d=m.map((p,y)=>{let C=a.value*x[p]/F;return{side:p,index:y,value:Math.floor(C),fraction:C-Math.floor(C)}}),X=a.value-d.reduce((p,y)=>p+y.value,0);d.sort((p,y)=>y.fraction-p.fraction||p.index-y.index);for(let p=0;p<X;p++)d[p%d.length].value+=1;d.sort((p,y)=>p.index-y.index),s.seatCountsBySide={top:d[0].value,bottom:d[1].value,left:d[2].value,right:d[3].value},s.sides=m.filter(p=>s.seatCountsBySide[p]>0)}s.seatCount=a.value,s.overrides&&(s.overrides=s.overrides.filter(m=>m.index<a.value),s.overrides.length||delete s.overrides)}else a.object.capacity=a.value;return o.floors?.length&&(o.objects=o.floors[0].objects),o.template={family:o.template.family,targetSeats:l},o=N(o).doc,o.template={family:t.template.family,targetSeats:k(o)},o}var W=1,T=100;function J(t,e){if(!Number.isInteger(e)||e<W||e>T)return null;let r=t.rotation*Math.PI/180,o={x:Math.cos(r),y:Math.sin(r)},n={x:-o.y,y:o.x};return Array.from({length:e},(i,c)=>{let l=t.style==="intertwined"&&c%2===1?t.seatSpacing/2:0;return{type:"row",id:`__block_preview_${c}`,label:"",origin:{x:t.origin.x+n.x*c*t.rowGap+o.x*l,y:t.origin.y+n.y*c*t.rowGap+o.y*l},rotation:t.rotation,curve:t.curve,seatCount:t.seatsPerRow,seatSpacing:t.seatSpacing,categoryKey:"__preview__"}})}function G(t,e=t.rowCount){let r=J(t,e);return r?.length?I(r[r.length-1]):null}function Gt(t,e){if(!Number.isFinite(e.x)||!Number.isFinite(e.y)||t.rowGap<=0)return null;let r=G(t,1);if(!r)return null;let o=t.rotation*Math.PI/180,n={x:-Math.sin(o),y:Math.cos(o)},i=(e.x-r.x)*n.x+(e.y-r.y)*n.y,c=Math.max(W,Math.min(T,Math.round(i/t.rowGap)+1)),l=G(t,c);return l?{rowCount:c,edgePoint:l}:null}function Wt(t,e){return t.length!==e.rowCount?!1:[...t].sort((o,n)=>(o.rowBlockGeneration?.rowIndex??1/0)-(n.rowBlockGeneration?.rowIndex??1/0)).every((o,n)=>{let i=o.rowBlockGeneration;return i?.kind==="row-block-v1"&&i.groupId===e.groupId&&i.rowIndex===n&&i.signature===e.signature&&JSON.stringify(i)===JSON.stringify({...e,rowIndex:n})})}var h=1,b=300,D=330;function M(t){return t.seatCount>1?t.curve/(t.seatCount-1):0}function E(t,e){let r=t.rotation*Math.PI/180,o=M(t)*Math.PI/180,n,i;if(Math.abs(o)<1e-9)n=e*t.seatSpacing,i=0;else{let c=t.seatSpacing/(2*Math.sin(Math.abs(o)/2)),l=o*e;n=c*Math.sin(l),i=-c+c*Math.cos(l)}return{x:t.origin.x+n*Math.cos(r)-i*Math.sin(r),y:t.origin.y+n*Math.sin(r)+i*Math.cos(r)}}function Q(t,e,r){let o=(t??[]).map(n=>({...n,index:n.index+e})).filter(n=>n.index>=0&&n.index<r);return o.length?o:void 0}function U(t,e){if(t.path||!Number.isInteger(e)||e<h||e>b)return null;let r=M(t);return{...t,seatCount:e,curve:r*(e-1)}}function Y(t,e){if(t.path||!Number.isInteger(e)||e<h||e>b)return null;let r=M(t),o=t.seatCount-e,n=-o;return{...t,origin:E(t,o),rotation:B(t.rotation-r*o),seatCount:e,curve:r*(e-1),overrides:Q(t.overrides,n,e)}}function $(t,e=t.seatCount){let r=U(t,e);return r?E(r,e-1):null}function q(t,e=t.seatCount){return Y(t,e)?.origin??null}function Et(t,e){if(t.path||!Number.isFinite(e.x)||!Number.isFinite(e.y))return null;let r=M(t),o=Math.abs(r)<1e-9?b:Math.min(b,Math.floor(D/Math.abs(r))+1),n=null;for(let i=h;i<=Math.max(h,o);i+=1){let c=$(t,i);if(!c)continue;let l=Math.hypot(c.x-e.x,c.y-e.y),u=r*(i-1);(!n||l<n.distance||l===n.distance&&i<n.seatCount)&&(n={seatCount:i,curve:u,endpoint:c,distance:l})}return n}function Kt(t,e){if(t.path||!Number.isFinite(e.x)||!Number.isFinite(e.y))return null;let r=M(t),o=Math.abs(r)<1e-9?b:Math.min(b,Math.floor(D/Math.abs(r))+1),n=null;for(let i=h;i<=Math.max(h,o);i+=1){let c=q(t,i);if(!c)continue;let l=Math.hypot(c.x-e.x,c.y-e.y),u=r*(i-1);(!n||l<n.distance||l===n.distance&&i<n.seatCount)&&(n={seatCount:i,curve:u,endpoint:c,distance:l})}return n}export{Ct as CATEGORY_INVENTORY_FAMILIES,V as DEFAULT_EVENT_INVENTORY_LIMIT,et as GA_UNIT_LABEL_PREFIX,gt as GroupedTableProjectionError,Z as LARGE_VENUE_INVENTORY_MODULE,D as MAX_DIRECT_ROW_SWEEP,H as MAX_EVENT_INVENTORY,rt as MAX_GA_CAPACITY,T as MAX_ROW_BLOCK_ROWS,b as MAX_ROW_SEATS,W as MIN_ROW_BLOCK_ROWS,h as MIN_ROW_SEATS,yt as applicableTicketTiers,z as capacityControl,Bt as categoryCapacity,k as chartCapacity,ht as companionSelectionIssue,Ot as describeCategoryInventoryConflict,vt as effectiveSeatOwnerCategoryCounts,tt as eventInventoryLimitFor,lt as gaAreasOf,it as gaInventorySegments,nt as gaUnitLabel,st as gaUnitLabels,wt as groupedTableInventory,ct as growJoinedGAInventory,Rt as inspectCategoryInventoryConflicts,Wt as intactRowBlockMembers,pt as isFullChartDoc,ot as isGaUnitLabel,xt as pickBestAvailable,Mt as pickBestAvailableInventory,St as remediateCategoryInventoryConflicts,Nt as resizeChartCapacity,Gt as resolveRowBlockCount,Kt as resolveRowStartCapacity,Et as resolveRowTerminalCapacity,dt as resolveTicketTierForSeat,G as rowBlockEdgePoint,J as rowBlockPreviewRows,q as rowStartEndpoint,$ as rowTerminalEndpoint,Y as rowWithStartCapacity,U as rowWithTerminalCapacity,ut as strandedSingles,ft as ticketOptionNotApplicableIssue,bt as ticketSelectionIssue,mt as ticketTierAppliesToSeat,at as validGAInventorySegments};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var ce=Object.defineProperty;var pt=Object.getOwnPropertyDescriptor;var yt=Object.getOwnPropertyNames;var xt=Object.prototype.hasOwnProperty;var gt=(e,t)=>{for(var n in t)ce(e,n,{get:t[n],enumerable:!0})},Mt=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of yt(t))!xt.call(e,r)&&r!==n&&ce(e,r,{get:()=>t[r],enumerable:!(o=pt(t,r))||o.enumerable});return e};var St=e=>Mt(ce({},"__esModule",{value:!0}),e);var Wn={};gt(Wn,{AUTOMATIC_ROUND_TABLE_RADIUS_MAX:()=>Ge,AUTOMATIC_ROUND_TABLE_RADIUS_MIN:()=>Ye,DEFAULT_SEAT_RADIUS:()=>ht,FLOOR_STACK_GAP_RATIO:()=>at,FLOOR_STACK_MIN_SURFACE_PX:()=>dt,TABLE_SEAT_OFFSET:()=>X,TEXT_BACKGROUND_PADDING_MAX:()=>ao,TEXT_BACKGROUND_RADIUS_MAX:()=>lo,TEXT_LETTER_SPACING_MAX:()=>so,TEXT_LETTER_SPACING_MIN:()=>io,TEXT_LINE_HEIGHT_MAX:()=>ro,TEXT_LINE_HEIGHT_MIN:()=>oo,TEXT_OPACITY_MIN:()=>co,TEXT_WIDTH_MAX:()=>no,TEXT_WIDTH_MIN:()=>to,allObjects:()=>st,applyAffine:()=>Fn,automaticRoundTableRadius:()=>rn,buildAisleHoles:()=>It,buildSeatIndex:()=>Gn,buildSectionShell:()=>Pt,chartBounds:()=>$,combinedFloorZoneId:()=>Ie,composeAffine:()=>jn,createPerspectiveCamera:()=>Ln,cubicPoint:()=>q,decomposeAffineLinear:()=>Hn,distanceToRings:()=>Ae,distributeAlongCubic:()=>ae,expandBooth:()=>rt,expandChart:()=>kn,expandRow:()=>tt,expandRowSlots:()=>et,expandTable:()=>ot,expandTableSlots:()=>we,floorObjects:()=>vn,floorStackPlacements:()=>ut,floorsOf:()=>ee,gridStats:()=>$n,hitTest:()=>Kn,initialFloorMode:()=>Dn,invertAffine:()=>Nn,layoutCombinedFloorPlan:()=>_n,layoutFloorStack:()=>An,mainFloorId:()=>ft,nearestWithin:()=>Vn,objectCenter:()=>Pe,owningSectionForObject:()=>it,perspectiveTangentAffine:()=>Bn,pointInPolygon:()=>Se,pointInPolygonWithHoles:()=>z,polygonArea:()=>fe,polygonInscribedAnchor:()=>de,polygonLabelPoint:()=>Pn,polygonNetArea:()=>Et,projectPerspectivePoint:()=>se,queryRect:()=>zn,resolveSegmentedRowGroups:()=>he,rowInventoryCount:()=>Mn,rowSeatPositions:()=>re,segmentedRowComponentSeats:()=>Tt,segmentedRowComponents:()=>Rt,segmentedRowSeatTotal:()=>At,smoothCubicThroughMiddle:()=>wt,stackFloors:()=>Cn,tableInventoryCount:()=>Sn,tableSeatCountsBySide:()=>nt,textLayoutMetrics:()=>le,translateObject:()=>ie});module.exports=St(Wn);var Qn=Math.PI/180;function H(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function F(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function q(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 wt(e,t,n){let o={x:(e.x+t.x)/2,y:(e.y+t.y)/2},r={x:(n.x-o.x)*4/3,y:(n.y-o.y)*4/3};return{start:{...e},control1:{x:e.x+(t.x-e.x)/3+r.x,y:e.y+(t.y-e.y)/3+r.y},control2:{x:e.x+(t.x-e.x)*2/3+r.x,y:e.y+(t.y-e.y)*2/3+r.y},end:{...t}}}function ae(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[q(e,.5)];let o=Array.from({length:n+1},(c,u)=>q(e,u/n)),r=new Float64Array(o.length);for(let c=1;c<o.length;c+=1){let u=o[c].x-o[c-1].x,l=o[c].y-o[c-1].y;r[c]=r[c-1]+Math.hypot(u,l)}let i=r[r.length-1];if(i<=1e-9)return Array.from({length:t},()=>({...e.start}));let s=[],a=1;for(let c=0;c<t;c+=1){let u=i*c/(t-1);for(;a<r.length-1&&r[a]<u;)a+=1;let l=r[a-1],d=r[a],m=d===l?0:(u-l)/(d-l);s.push({x:o[a-1].x+(o[a].x-o[a-1].x)*m,y:o[a-1].y+(o[a].y-o[a-1].y)*m})}return s}function A(e,t){return{x:e.x+t.x,y:e.y+t.y}}function V(e,t){return{x:e.x-t.x,y:e.y-t.y}}function _(e,t){return{x:e.x*t,y:e.y*t}}function Q(e,t=13){return Array.from({length:t},(n,o)=>q(e,o/(t-1)))}function Ce(e,t){let n=Math.max(0,Math.min(1,t))*(e.length-1),o=Math.min(e.length-2,Math.floor(n));return F(e[o],e[o+1],n-o)}function ke(e,t,n){let o=Math.max(0,Math.min(1,t)),r=Math.max(o,Math.min(1,n)),i=[Ce(e,o)];for(let s=1;s<e.length-1;s+=1){let a=s/(e.length-1);a>o+1e-9&&a<r-1e-9&&i.push(e[s])}return i.push(Ce(e,r)),i}function Ee(e,t){let n=[[0,1],[1,2],[2,3],[3,0]],o=0,r=Number.POSITIVE_INFINITY;n.forEach(([m,y],p)=>{let h=H(F(e[m],e[y],.5),t);h<r&&(r=h,o=p)});let i=e[o],s=e[(o+1)%4],a=e[(o+2)%4],c=e[(o+3)%4],u=F(i,s,.5),l=V(t,u),d=Math.max(1e-9,Math.hypot(l.x,l.y));return{p0:i,p1:s,p2:a,p3:c,normal:_(l,1/d),depth:(H(i,c)+H(s,a))/2}}function Oe(e){let{p0:t,p1:n,p2:o,p3:r,normal:i,depth:s}=e,a=V(n,t),c=V(o,r),u=s*.22,l=s*.12;return{nearPath:{start:t,control1:A(A(t,_(a,1/3)),_(i,u)),control2:A(A(t,_(a,2/3)),_(i,u)),end:n},farPath:{start:o,control1:A(A(r,_(c,2/3)),_(i,l)),control2:A(A(r,_(c,1/3)),_(i,l)),end:r}}}function Pt(e,t,n){if(e.length!==4)throw new Error("A section shell requires four mapped bounds corners");let o=e.reduce((p,h)=>A(p,h),{x:0,y:0});o.x/=4,o.y/=4;let r=H(e[0],e[1]),i=H(e[0],e[3]),s=n==="auto"?r>i*1.25&&H(o,t)>i?"bezier":"tapered":n;if(s==="rectangle")return{mode:s,outline:e.map(p=>({...p}))};let a=Ee(e,t),{p0:c,p1:u,p2:l,p3:d}=a;if(s==="tapered")return{mode:s,outline:[A(c,_(V(u,c),.14)),A(c,_(V(u,c),1-.14)),l,d]};let{nearPath:m,farPath:y}=Oe(a);return{mode:s,outline:[...Q(m),...Q(y).slice(1)]}}function It(e,t,n,o){if(e.length!==4)throw new Error("Aisle generation requires four mapped bounds corners");if(!Number.isInteger(n)||n<0||n>3)throw new Error("Aisle count must be an integer from 0 to 3");if(n===0)return[];let r=Ee(e,t),{p0:i,p1:s,p2:a,p3:c}=r,u=o==="bezier"?Oe(r):null,l=u?Q(u.nearPath):null,d=u?Q(u.farPath).reverse():null,m=Math.min(.055,.18/(n+1));return Array.from({length:n},(y,p)=>{let h=(p+1)/(n+1),x=h-m/2,M=h+m/2;return l&&d?[...ke(l,x,M),...ke(d,x,M).reverse()]:[F(i,s,x),F(i,s,M),F(c,a,M),F(c,a,x)]})}var to=40,no=1200,oo=.8,ro=3,io=-2,so=20,co=.1,ao=40,lo=40,Re=e=>Math.max(1,e.fontSize*.6+(e.letterSpacing??0));function vt(e,t){let n=e.text.split(/\r?\n/);if(!e.width)return Math.max(1,n.length);let o=Math.max(1,Math.floor(t/Re(e))),r=0;for(let i of n){if(!i.length){r+=1;continue}let s=0;for(let a of i.split(/\s+/)){let c=a.length;s&&s+1+c<=o?s+=1+c:(r+=Math.max(1,Math.ceil(c/o)),s=c%o)}}return Math.max(1,r)}function le(e){let t=e.background?.padding??0,n=e.text.split(/\r?\n/),o=Math.max(1,...n.map(a=>a.length))*Re(e),r=e.width??o+t*2,i=Math.max(1,r-t*2),s=vt(e,i);return{width:r,height:s*e.fontSize*(e.lineHeight??1.2)+t*2,lineCount:s,padding:t}}function Ct(e,t,n){let o=n.x-t.x,r=n.y-t.y,i=o*o+r*r,s=i?Math.max(0,Math.min(1,((e.x-t.x)*o+(e.y-t.y)*r)/i)):0;return Math.hypot(e.x-(t.x+s*o),e.y-(t.y+s*r))}function Ae(e,t){let n=1/0;for(let o of t)if(!(o.length<2))for(let r=0,i=o.length-1;r<o.length;i=r++){let s=Ct(e,o[i],o[r]);s<n&&(n=s)}return n}function Te(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,a=t[r].x,c=t[r].y;s>e.y!=c>e.y&&e.x<(a-i)*(e.y-s)/(c-s)+i&&(n=!n)}return n}function kt(e,t,n){let o=Te(e,t)&&!n.some(i=>Te(e,i)),r=Ae(e,[t,...n]);return o?r:-r}function Y(e,t,n,o,r){let i=kt({x:e,y:t},o,r);return{x:e,y:t,h:n,d:i,max:i+n*Math.SQRT2}}var ue=class{constructor(){this.items=[]}get size(){return this.items.length}push(t){let n=this.items;n.push(t);let o=n.length-1;for(;o>0;){let r=o-1>>1;if(n[r].max>=n[o].max)break;[n[r],n[o]]=[n[o],n[r]],o=r}}pop(){let t=this.items,n=t[0],o=t.pop();if(t.length&&o){t[0]=o;let r=0;for(;;){let i=r*2+1,s=i+1,a=r;if(i<t.length&&t[i].max>t[a].max&&(a=i),s<t.length&&t[s].max>t[a].max&&(a=s),a===r)break;[t[a],t[r]]=[t[r],t[a]],r=a}}return n}};function fe(e){if(e.length<3)return 0;let t=0;for(let n=0,o=e.length-1;n<e.length;o=n++)t+=(e[o].x+e[n].x)*(e[o].y-e[n].y);return Math.abs(t)/2}function Et(e,t){return Math.max(0,fe(e)-(t??[]).reduce((n,o)=>n+fe(o),0))}function de(e,t){let n=t??[];if(!e.length)return{point:{x:0,y:0},radius:0};if(e.length<3){let h=e.reduce((M,P)=>M+P.x,0)/e.length,x=e.reduce((M,P)=>M+P.y,0)/e.length;return{point:{x:h,y:x},radius:0}}let o=1/0,r=1/0,i=-1/0,s=-1/0;for(let h of e)h.x<o&&(o=h.x),h.y<r&&(r=h.y),h.x>i&&(i=h.x),h.y>s&&(s=h.y);let a=i-o,c=s-r,u=Math.min(a,c);if(!(u>0))return{point:{x:(o+i)/2,y:(r+s)/2},radius:0};let l=Math.max(a,c)/150,d=new ue,m=u/2;for(let h=o;h<i;h+=u)for(let x=r;x<s;x+=u)d.push(Y(h+m,x+m,m,e,n));let y=Y(o+a/2,r+c/2,0,e,n),p=0;for(;d.size;){let h=d.pop();if(!h)break;h.d>y.d&&(y=h),!(h.max-y.d<=l)&&(p>=4e3||(p+=1,m=h.h/2,d.push(Y(h.x-m,h.y-m,m,e,n)),d.push(Y(h.x+m,h.y-m,m,e,n)),d.push(Y(h.x-m,h.y+m,m,e,n)),d.push(Y(h.x+m,h.y+m,m,e,n))))}return{point:{x:y.x,y:y.y},radius:Math.max(0,y.d)}}function Z(e,t,n){return Math.max(t,Math.min(n,e))}function L(e,t,n){return e<t?t:e>n?n:e}var mo=Math.PI*2;function _e(e,t,n){return Ot(e,r=>({x:r.x+t,y:r.y+n}))}function Ot(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 bo=4/3;function Rt(e,t,n){let o=[];for(let r=0;r<e.length-1;r+=1){let i=e[r],s=e[r+1],a=Math.hypot(s.x-i.x,s.y-i.y);if(a<=0)continue;let c=Math.max(1,Math.round(a/n)),u=a/c,l=Math.atan2(s.y-i.y,s.x-i.x),d=r===0,y=(r>0?t[r-1]:void 0)==="break"?2:1,p=d?{...i}:{x:i.x+Math.cos(l)*u*y,y:i.y+Math.sin(l)*u*y},h=d?c+1:Math.max(1,c-(y-1));o.push({origin:p,rotation:l*180/Math.PI,seatCount:h,seatSpacing:u})}return o}function Tt(e){let t=e.rotation*Math.PI/180,n={x:Math.cos(t),y:Math.sin(t)};return Array.from({length:e.seatCount},(o,r)=>({x:e.origin.x+n.x*r*e.seatSpacing,y:e.origin.y+n.y*r*e.seatSpacing}))}function At(e){return e.reduce((t,n)=>t+n.seatCount,0)}function he(e){let t=new Map,n=new Map;for(let o of e){if(o.type!=="row"||!o.segmentedRow)continue;let r=n.get(o.segmentedRow.groupId)??[];r.push(o),n.set(o.segmentedRow.groupId,r)}for(let[o,r]of n){let i=r.slice().sort((m,y)=>m.segmentedRow.componentIndex-y.segmentedRow.componentIndex),s=i[0]?.segmentedRow?.componentCount??0,a=i[0]?.segmentedRow;if(!a||!(s>=2&&i.length===s&&a?.boundaryBefore==="start"&&i.every((m,y)=>m.segmentedRow?.kind==="segmented-row-v1"&&m.segmentedRow.groupId===o&&m.segmentedRow.componentCount===s&&m.segmentedRow.componentIndex===y&&m.segmentedRow.repeatLabelOnComponents===a.repeatLabelOnComponents&&(y===0?m.segmentedRow.boundaryBefore==="start":m.segmentedRow.boundaryBefore!=="start")&&m.segmentedRow.displayLabel===a.displayLabel)))continue;let u=i.reduce((m,y)=>m+y.seatCount,0),l=0,d=0;for(let m of i)m.segmentedRow.boundaryBefore==="break"&&(l+=1),t.set(m.id,{groupId:o,adjacencyOffset:l,displayOffset:d,displayLabel:a.displayLabel,totalSeats:u,canonical:i[0],viewFromSeatUrl:a.viewFromSeatUrl,viewFromSeatMeta:a.viewFromSeatMeta,confidenceEvidence:a.confidenceEvidence}),l+=m.seatCount,d+=m.seatCount}return t}var _t="ABCDEFGHIJKLMNOPQRSTUVWXYZ";var Dt="abcdefghijklmnopqrstuvwxyz";function Lt(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 me(e,t=!1){let n=t?Dt:_t;return Lt(Math.max(0,Math.floor(e)-1),n)}var Ft=[[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 Ft)for(;t>=o;)n+=r,t-=o;return n}function Nt(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 J(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??"",a=e.seatNumbering?.endAt,c=e.seatCount;if(i==="updown"||i==="updown-descending"){let y=Math.ceil(c/2),p=i==="updown"?t<y?n+2*t:n-1+2*(c-t):t<y?n+2*(y-1-t):n+1+2*(t-y);return`${s}${p}`}let u=i==="odd"||i==="even"?2:r,l=a!=null&&Number.isFinite(a)?a-(c-1)*u:n,d=o==="center"?Nt(c)[t]:o==="rtl"?c-1-t:t,m;switch(i){case"odd":{let y=l%2===1?l:l+1;m=String(y+d*2);break}case"even":{let y=l%2===0?l:l+1;m=String(y+d*2);break}case"roman":m=De(l+d*r);break;case"letters-upper":m=me(l+d*r,!1);break;case"letters-lower":m=me(l+d*r,!0);break;default:m=String(l+d*r);break}return`${s}${m}`}function jt(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function Le(e,t,n){return n?.label??`${e.seatLabelBase??e.label}-${J(e,t)}`}function be(e,t,n,o){if(o?.displayLabel)return o.displayLabel;if(e.seatDisplayLabelMode==="number")return J(e,t);if(!n)return`${e.displayLabel||e.label}-${J(e,t)}`;let r=jt(n),i=n.displayOffset+t;return`${n.displayLabel}-${J(r,i)}`}var G=.02291666666666667,So=1/G,Bt=58,Ht=Bt*G;var Xt=3,Fe=0,pe=120,Ut=0,Yt=45,Gt=7,K=1.2;function ye(e,t,n,o){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):o}function Kt(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=Gt?e:Xt}function Ne(e,t={}){let n=ye(t.floorBaseHeightM,Fe,pe,0),o=Math.min(pe,n+Kt(e.elevation)*Ht),r=e.height===void 0?o:ye(e.height,Fe,pe,o),i=ye(e.rake,Ut,Yt,0);return{height:r,rake:i}}function je(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 Be(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],a=s.x-i.x,c=s.y-i.y,u=a*a+c*c,l=u>1e-12?((t-i.x)*a+(n-i.y)*c)/u:0;l<0?l=0:l>1&&(l=1);let d=t-(i.x+l*a),m=n-(i.y+l*c);if(Math.abs(d)>=o||Math.abs(m)>=o)continue;let y=Math.hypot(d,m);y<o&&(o=y)}return o}function Vt(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 He(e,t){return Math.hypot(e.cx-t.cx,e.cy-t.cy)-e.r-t.r}function xe(e,t){let n=1/0;for(let o of je(e)){let r=Be(t,o.x,o.y);r<n&&(n=r)}for(let o of je(t)){let r=Be(e,o.x,o.y);r<n&&(n=r)}return n}function zt(e,t){if(e.length<3)return{pts:e,seatIndices:t};let n=0,o=0;for(let l of e)n+=l.x,o+=l.y;n/=e.length,o/=e.length;let r=-1,i=e[0];for(let l of e){let d=Math.hypot(l.x-n,l.y-o);d>r&&(r=d,i=l)}let s=i.x-n,a=i.y-o,c=Math.hypot(s,a);c>1e-9?(s/=c,a/=c):(s=1,a=0);let u=e.map((l,d)=>({p:l,i:d,t:(l.x-n)*s+(l.y-o)*a})).sort((l,d)=>l.t-d.t);return{pts:u.map(l=>l.p),seatIndices:u.map(l=>t[l.i])}}function $t(e){let t=e.length;if(t<3)return null;let n=0,o=0;for(let P of e)n+=P.x,o+=P.y;n/=t,o/=t;let r=0,i=0,s=0,a=0,c=0,u=0,l=0;for(let P of e){let C=P.x-n,v=P.y-o;r+=C*C,s+=v*v,i+=C*v,a+=C*C*C,c+=v*v*v,u+=C*v*v,l+=v*C*C}let d=r*s-i*i;if(Math.abs(d)<1e-9)return null;let m=(a+u)/2,y=(c+l)/2,p=(m*s-y*i)/d,h=(y*r-m*i)/d,x=p+n,M=h+o;return!Number.isFinite(x)||!Number.isFinite(M)?null:{cx:x,cy:M}}var Wt=.15;function qt(e){if(e.length<2)return null;let t=e.map(P=>{let C=0,v=0;for(let w of P.pts)C+=w.x,v+=w.y;return{x:C/P.pts.length,y:v/P.pts.length}}),n=0,o=0;for(let P of t)n+=P.x,o+=P.y;n/=t.length,o/=t.length;let r=0,i=0,s=0;for(let P of t){let C=P.x-n,v=P.y-o;r+=C*C,i+=C*v,s+=v*v}let a=r+s,c=r*s-i*i,u=a/2+Math.sqrt(Math.max(0,a*a/4-c)),l,d;Math.abs(i)>1e-12?(l=u-s,d=i):r>=s?(l=1,d=0):(l=0,d=1);let m=Math.hypot(l,d);if(!(m>1e-12))return null;l/=m,d/=m;let y=1/0,p=-1/0,h=[];for(let P of e){let C=1/0,v=-1/0;for(let w of P.pts){let f=w.x*l+w.y*d;f<C&&(C=f),f>v&&(v=f),f<y&&(y=f),f>p&&(p=f)}h.push(v-C)}let x=p-y;return x>1e-9?(h.sort((P,C)=>P-C),h[Math.min(h.length-1,Math.floor(h.length*.9))]/x<=Qt?{x:l,y:d}:null):null}var Qt=.35;function Xe(e,t,n,o){let r=new Map;for(let f of n){let b=t[f],S=b.rowId||`__seat-${f}`,g=r.get(S);g||(g={pts:[],idx:[]},r.set(S,g)),g.pts.push({x:b.x,y:b.y}),g.idx.push(f)}if(!r.size)return{sectionId:e,rows:[],blockCount:0};let i=[];for(let[f,b]of r){let S=zt(b.pts,b.idx),g=0;for(let I of S.pts)g+=Math.hypot(I.x-o.x,I.y-o.y);i.push({id:f,pts:S.pts,seatIndices:S.seatIndices,blockId:-1,ordinal:0,blockDepth:0,focalDistance:g/S.pts.length})}let s=i.map(f=>Vt(f.pts)),a=i.length<=256?i.length*(i.length-1)/2:0,c=a?new Float64Array(a):null;c?.fill(Number.NaN);let u=c?new Map(i.map((f,b)=>[f,b])):null,l=(f,b)=>(f>b&&([f,b]=[b,f]),f*(2*i.length-f-1)/2+(b-f-1)),d=(f,b)=>{if(!c)return xe(i[f].pts,i[b].pts);let S=l(f,b),g=c[S];if(!Number.isNaN(g))return g;let I=xe(i[f].pts,i[b].pts);return c[S]=I,I},m=(f,b)=>u?d(u.get(f),u.get(b)):xe(f.pts,b.pts),y=[];for(let f=0;f<i.length;f++){let b=1/0;for(let S=0;S<i.length;S++){if(f===S||He(s[f],s[S])>=b)continue;let g=d(f,S);g<b&&(b=g)}Number.isFinite(b)&&y.push(b)}y.sort((f,b)=>f-b);let p=y.length?y[Math.floor(y.length/2)]:1,h=Math.max(p*1.8,1e-6),x=i.map(()=>[]);for(let f=0;f<i.length;f++)for(let b=f+1;b<i.length;b++)He(s[f],s[b])>h||d(f,b)<=h&&(x[f].push(b),x[b].push(f));let M=0;for(let f=0;f<i.length;f++){if(i[f].blockId!==-1)continue;let b=M++,S=[f];for(i[f].blockId=b;S.length;){let g=S.pop();for(let I of x[g])i[I].blockId===-1&&(i[I].blockId=b,S.push(I))}}let P=new Map;for(let f of i){let b=P.get(f.blockId)??[];b.push(f),P.set(f.blockId,b)}let C=[];for(let f of i){if(f.pts.length<4)continue;let b=$t(f.pts);b&&(!Number.isFinite(b.cx)||!Number.isFinite(b.cy)||C.push({x:b.cx,y:b.cy}))}let v=C.length>=2?(()=>{let f=C.map(g=>g.x).sort((g,I)=>g-I),b=C.map(g=>g.y).sort((g,I)=>g-I),S=Math.floor(C.length/2);return{cx:f[S],cy:b[S]}})():null;if(v){let f=k=>Math.hypot(k.x-v.cx,k.y-v.cy),b=1/0,S=-1/0,g=[];for(let k of i){let E=1/0,O=-1/0;for(let N of k.pts){let j=f(N);j<E&&(E=j),j>O&&(O=j)}g.push(O-E),E<b&&(b=E),O>S&&(S=O)}let I=S-b;g.sort((k,E)=>k-E);let T=g[Math.min(g.length-1,Math.floor(g.length*.9))];if(I>1e-9&&T/I<=Wt){let k=i.map(R=>{let W=0;for(let bt of R.pts)W+=f(bt);return{row:R,radius:W/R.pts.length}}),E=0,O=0;for(let R of k)E+=R.radius,O+=R.row.focalDistance;E/=k.length,O/=k.length;let N=0;for(let R of k)N+=(R.radius-E)*(R.row.focalDistance-O);if(N<0)for(let R of k)R.radius=-R.radius;let B=1/0;for(let R of k)R.radius<B&&(B=R.radius);k.sort((R,W)=>R.radius-W.radius);let D=-1,U=-1/0,mt=I/Math.max(1,k.length)*.5,ve=[];for(let R of k)R.radius-U>mt&&(D++,U=R.radius),R.row.ordinal=D,R.row.blockDepth=R.radius-B,ve.push(R.row);return{sectionId:e,rows:ve,blockCount:M}}}let w=[];for(let[,f]of P){let b=qt(f);if(b){let S=I=>{let T=0;for(let k of I.pts)T+=k.x*b.x+k.y*b.y;return T/I.pts.length};f.sort((I,T)=>S(I)-S(T)),f.length>=2&&f[0].focalDistance>f[f.length-1].focalDistance&&f.reverse();let g=0;for(let I=0;I<f.length;I++)I>0&&(g+=m(f[I-1],f[I])),f[I].ordinal=I,f[I].blockDepth=g,w.push(f[I])}else{let S=1/0;for(let g of f)g.focalDistance<S&&(S=g.focalDistance);f.sort((g,I)=>g.focalDistance-I.focalDistance);for(let g=0;g<f.length;g++)f[g].ordinal=g,f[g].blockDepth=Math.max(0,f[g].focalDistance-S),w.push(f[g])}}return{sectionId:e,rows:w,blockCount:M}}var Zt=/^\d{4}-\d{2}-\d{2}$/;function Jt(e){let t=Date.parse(e);return Number.isFinite(t)?Zt.test(e)?t+864e5:t:null}function en(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 tn(e,t,n){return!(e.eventConfigurationId&&e.eventConfigurationId!==t||e.eventConfigurationVersion!==void 0&&e.eventConfigurationVersion!==n)}function nn(e){return e.status!=="draft"&&e.status!=="retracted"}function on(e,t){return e.status===void 0?t===void 0:e.status!=="approved"?!0:typeof t=="string"&&typeof e.basisSha256=="string"&&e.basisSha256===t}function Ue(e,t={}){return!!e&&nn(e)&&tn(e,t.activeConfigurationId,t.activeConfigurationVersion)&&on(e,t.activeBasisSha256)&&en(e,t.now)}var Ye=36,Ge=160;function rn(e,t=360){let n=Z(Math.round(Number.isFinite(e)?e:1),1,40),o=Z(Number.isFinite(t)?t:360,120,360);return Math.round(Z(n*4*(360/o),Ye,Ge))}var ko=Math.PI*2;function Ke(e){return e==="pitch-football"||e==="rink-hockey"||e==="track-athletics"||e==="oval-cricket"}function sn(e){if((e.kind==="polygon"||e.kind==="polyline"||e.kind==="line")&&e.points&&e.points.length>=2)return e.points;if(e.x==null||e.y==null||e.width==null||e.height==null)return null;let t=e.x,n=e.y,o=e.width,r=e.height;return[{x:t,y:n},{x:t+o,y:n},{x:t+o,y:n+r},{x:t,y:n+r}]}function cn(e,t,n){let o=n*Math.PI/180,r=Math.cos(o),i=Math.sin(o),s=e.x-t.x,a=e.y-t.y;return{x:t.x+s*r-a*i,y:t.y+s*i+a*r}}function Ve(e){let t=sn(e);if(!t||t.length<2)return null;let n=e.rotation??0,o=Math.abs(n)<1e-6?t:t.map(c=>cn(c,{x:t.reduce((u,l)=>u+l.x,0)/t.length,y:t.reduce((u,l)=>u+l.y,0)/t.length},n)),r=1/0,i=1/0,s=-1/0,a=-1/0;for(let c of o)r=Math.min(r,c.x),i=Math.min(i,c.y),s=Math.max(s,c.x),a=Math.max(a,c.y);return!Number.isFinite(r)||s-r<1e-6||a-i<1e-6?null:{minX:r,minY:i,maxX:s,maxY:a}}var an=5,ln=3,un=.92,fn=1.9,dn=2,hn=.6,mn=1,bn=.06;function pn(e){return e.heightM!==void 0?e.heightM:Ke(e.stageKind)?bn:mn}function ze(e){let t=1/0,n=1/0,o=-1/0,r=-1/0,i=-1/0;for(let s of ee(e)){let a=s.baseHeightM??0;for(let c of s.objects){if(c.type!=="shape"||c.role!=="stage")continue;let u=Ve(c);u&&(t=Math.min(t,u.minX),n=Math.min(n,u.minY),o=Math.max(o,u.maxX),r=Math.max(r,u.maxY),i=Math.max(i,a+pn(c)))}}return!Number.isFinite(t)||!Number.isFinite(i)?null:{minX:t,minY:n,maxX:o,maxY:r,deckTopM:i}}function yn(e,t,n,o){let r=1/0,i=1/0,s=-1/0,a=-1/0;for(let y of e)Number.isFinite(y.eyeHeightM)&&(r=Math.min(r,y.x),s=Math.max(s,y.x),i=Math.min(i,y.y),a=Math.max(a,y.y));if(!Number.isFinite(r))return null;let c=r*t,u=i*t,l=Math.max(1,Math.ceil((s-r)*t/n)+1),d=Math.max(1,Math.ceil((a-i)*t/n)+1),m=new Float64Array(l*d).fill(-1/0);for(let y of e){if(!Number.isFinite(y.eyeHeightM))continue;let p=y.eyeHeightM-K,h=Math.min(l-1,Math.max(0,Math.floor((y.x*t-c)/n))),M=Math.min(d-1,Math.max(0,Math.floor((y.y*t-u)/n)))*l+h,P=p+o;P>m[M]&&(m[M]=P)}return{cellM:n,minX:c,minY:u,cols:l,rows:d,top:m}}function xn(e,t,n){let o=Math.floor((t-e.minX)/e.cellM),r=Math.floor((n-e.minY)/e.cellM);return o<0||r<0||o>=e.cols||r>=e.rows?-1/0:e.top[r*e.cols+o]}function $e(e,t,n={}){let o=new Map;if(!t||!e.length)return o;let r=n.metresPerChartUnit??G,i=n.cellM??hn,s=n.chairBackM??un,a=n.selfRowSkipM??dn,c=n.clearThreshold??.9,u=n.partialThreshold??.25,l=Math.max(1,n.columns??an),d=Math.max(1,n.rows??ln),m=yn(e,r,i,s);if(!m)return o;let y=(t.maxX-t.minX)*r,p=(t.maxY-t.minY)*r,h=y>=p,x=(t.minX+t.maxX)/2*r,M=(t.minY+t.maxY)/2*r,P=[];for(let v=0;v<l;v++){let w=(v+.5)/l-.5,f=h?x+w*y:x,b=h?M:M+w*p;for(let S=0;S<d;S++){let g=t.deckTopM+(d===1?0:S/(d-1)*fn);P.push({x:f,y:b,z:g})}}let C=i/2;for(let v of e){if(!Number.isFinite(v.eyeHeightM))continue;let w=v.x*r,f=v.y*r,b=v.eyeHeightM,S=0,g=1/0;for(let T of P){let k=T.x-w,E=T.y-f,O=Math.hypot(k,E);if(!(O>a)){S++;continue}let N=k/O,j=E/O,B=0;for(let D=a;D<O;D+=C){let U=xn(m,w+N*D,f+j*D);if(!(!Number.isFinite(U)||U>=b)&&U>b+(T.z-b)*D/O){B=D;break}}B?g=Math.min(g,B):S++}let I=S/P.length;I>=c||o.set(v.id,{seatId:v.id,mark:I<u?"obstructedView":"restrictedView",visibleFraction:I,totalRays:P.length,atDistanceM:Number.isFinite(g)?g:0})}return o}function We(e,t){if(!t.size)return 0;let n=0;for(let o of e){let r=t.get(o.id);if(!r)continue;let i=o.commercial;i?.restrictedView!==void 0||i?.obstructedView!==void 0||(o.commercial={...i,[r.mark]:!0},n++)}return n}function ge(e){return e?e.accessibility?.length?e.wheelchairSpaceType&&!e.accessibility.includes("wheelchair")?["wheelchair",...e.accessibility]:e.accessibility:e.wheelchairSpaceType?["wheelchair"]:e.accessible?["wheelchair"]:[]:[]}var oe=Math.PI/180,gn=9,X=16;function Me(e,t,n,o){let r=n*oe,i=Math.cos(r),s=Math.sin(r);return{x:o.x+e*i-t*s,y:o.y+e*s+t*i}}function re(e){let{seatCount:t,seatSpacing:n,curve:o,rotation:r,origin:i}=e,s=[];if(e.path)return ae(e.path,t);if(t<=1)return t===1&&s.push({x:i.x,y:i.y}),s;if(o===0){for(let u=0;u<t;u++)s.push(Me(u*n,0,r,i));return s}let a=o/(t-1)*oe,c=n/(2*Math.sin(Math.abs(a)/2));for(let u=0;u<t;u++){let l=u*a,d=c*Math.sin(l),m=-c+c*Math.cos(l);s.push(Me(d,m,r,i))}return s}function Je(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function Mn(e){let t=new Set((e.overrides??[]).filter(n=>n.skip&&Number.isInteger(n.index)&&n.index>=0&&n.index<e.seatCount).map(n=>n.index));return Math.max(0,e.seatCount-t.size)}function et(e,t){let n=Je(e);return re(e).map((o,r)=>{let i=n.get(r),s=ge(i),a=Le(e,r,i),c={...e.commercial,...i?.commercial};return{index:r,x:o.x+(i?.dx??0),y:o.y+(i?.dy??0),label:a,displayLabel:be(e,r,t,i),categoryKey:i?.categoryKey??e.categoryKey,skipped:!!i?.skip,accessible:s.length>0,accessibility:s,wheelchairSpaceType:i?.wheelchairSpaceType,commercial:Object.values(c).some(u=>u!==void 0&&u!==!1&&u!=="")?c:void 0,glyph:i?.glyph,viewUrl:i?.viewFromSeatUrl??e.viewFromSeatUrl,viewMeta:i?.viewFromSeatUrl?i.viewFromSeatMeta:e.viewFromSeatMeta,labelStyle:i?.labelStyle??e.seatLabelStyle}})}function tt(e){let t=[];for(let n of et(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 nt(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 we(e){let t=[],n=Math.max(0,Math.round(e.seatCount));if(n===0)return t;let o=new Map((e.overrides??[]).map(l=>[l.index,l])),r=(l,d,m,y)=>{let p=o.get(l),h=ge(p),x=p?.label??`${e.label}-${l+1}`,M=e.displayLabel??e.label;return{index:l,label:x,displayLabel:p?.displayLabel??`${M}-${l+1}`,x:d+(p?.dx??0),y:m+(p?.dy??0),categoryKey:p?.categoryKey??e.categoryKey,skipped:!!p?.skip,accessible:h.length>0,accessibility:h,wheelchairSpaceType:p?.wheelchairSpaceType,commercial:p?.commercial,glyph:p?.glyph,viewUrl:p?.viewFromSeatUrl,viewMeta:p?.viewFromSeatUrl?p.viewFromSeatMeta:void 0,labelStyle:p?.labelStyle,...y?{side:y}:{}}};if(e.shape==="round"){let l=(e.radius??40)+X,d=e.rotation*oe,m=Math.max(0,Math.min(360,e.seatArc??360));if(m>=360||n===1){for(let x=0;x<n;x++){let M=d+x/n*2*Math.PI;t.push(r(x,e.center.x+l*Math.cos(M),e.center.y+l*Math.sin(M)))}return t}let y=m*oe,p=(2*Math.PI-y)/2,h=d+p;for(let x=0;x<n;x++){let M=h+x/(n-1)*y;t.push(r(x,e.center.x+l*Math.cos(M),e.center.y+l*Math.sin(M)))}return t}let i=e.width??80,s=e.height??50,a=nt(e),c=["top","bottom","left","right"],u=0;for(let l of c){let d=a[l];for(let m=0;m<d;m++){let y,p;l==="top"?(y=-i/2+(m+.5)*i/d,p=-s/2-X):l==="bottom"?(y=-i/2+(m+.5)*i/d,p=s/2+X):l==="left"?(y=-i/2-X,p=-s/2+(m+.5)*s/d):(y=i/2+X,p=-s/2+(m+.5)*s/d);let h=Me(y,p,e.rotation,e.center);t.push(r(u++,h.x,h.y,l))}}return t}function Sn(e){return e.bookAsWhole||e.variableOccupancy?Math.max(0,Math.round(e.seatCount)):we(e).filter(t=>!t.skipped).length}function ot(e){return we(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 rt(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 Se(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,a=t[r].x,c=t[r].y;s>e.y!=c>e.y&&e.x<(a-i)*(e.y-s)/(c-s)+i&&(n=!n)}return n}function wn(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),a=(r.x-n.x)**2+(r.y-n.y)**2;return s>=-1e-7&&s<=a+1e-7})}function z(e,t,n){return Se(e,t)&&!(n??[]).some(o=>Se(e,o)||wn(e,o))}function Pn(e,t){return de(e,t).point}function ne(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 Pe(e){switch(e.type){case"row":{let t=re(e),n=Je(e),o=0,r=0,i=0;for(let s=0;s<t.length;s++){let a=n.get(s);a?.skip||(o+=t[s].x+(a?.dx??0),r+=t[s].y+(a?.dy??0),i++)}return i?{x:o/i,y:r/i}:{x:e.origin.x,y:e.origin.y}}case"table":case"booth":return{x:e.center.x,y:e.center.y};case"gaArea":return ne(e.points);case"section":return ne(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?ne(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 In(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 it(e,t,n=e.filter(r=>r.type==="section"),o=Pe(t)){let r="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0;return(r?n.find(s=>(s.logicalSectionId??s.id)===r&&(In(t,s)||z(o,s.outline,s.holes))):void 0)??n.find(s=>z(o,s.outline,s.holes))}function ee(e){return e.floors&&e.floors.length?e.floors:[{id:"floor-0",name:"Main",objects:e.objects,focalPoint:e.focalPoint,referenceImage:e.referenceImage,backgroundImage:e.backgroundImage}]}function vn(e,t){let n=ee(e);return(t?n.find(o=>o.id===t):n[0])?.objects??[]}function st(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}function ie(e,t,n){let o=i=>({x:i.x+t,y:i.y+n}),r=i=>i.map(o);switch(e.type){case"row":return{...e,origin:o(e.origin)};case"table":case"booth":return{...e,center:o(e.center)};case"gaArea":return{...e,points:r(e.points),...e.holes?{holes:e.holes.map(r)}:{}};case"section":return{...e,outline:r(e.outline),...e.outlinePath?{outlinePath:_e(e.outlinePath,t,n)}:{},...e.holes?{holes:e.holes.map(r)}:{}};case"text":return{...e,position:o(e.position)};case"shape":return{...e,...e.points?{points:r(e.points)}:{},...e.x!=null?{x:e.x+t}:{},...e.y!=null?{y:e.y+n}:{}};case"decorImage":return{...e,x:e.x+t,y:e.y+n}}}function Cn(e,t=900){if(!e.floors||e.floors.length<2)return e;let n=[];return e.floors.forEach((o,r)=>{let i=-r*t;for(let s of o.objects)n.push(i===0?s:ie(s,0,i))}),{...e,objects:n,floors:void 0}}function Qe(e,t,n,o,r,i,s,a,c){let u=[],l=e.filter(h=>h.type==="section"),d=he(e),m=h=>!h?.eventConfigurationId||h.eventConfigurationId===o&&(h.eventConfigurationVersion===void 0||h.eventConfigurationVersion===c),y=h=>Ue(h,{activeConfigurationId:o,activeConfigurationVersion:c,activeBasisSha256:r,now:a}),p=(h,x)=>y(h)?{...h,coverage:x}:void 0;for(let h of e){let x=[];if(h.type==="row"?x=tt(h):h.type==="table"?x=ot(h):h.type==="booth"&&(x=rt(h)),!x.length)continue;for(let w of x)w.viewUrl&&!m(w.viewMeta)&&(w.viewUrl=void 0,w.viewMeta=void 0);if(h.type==="row"){let w=d.get(h.id);if(w){let f=new Map((h.overrides??[]).map(b=>[b.index,b]));for(let b of x){let S=Number(b.id.slice(b.id.lastIndexOf(":")+1));if(!Number.isInteger(S))continue;b.logicalRowId=w.groupId,b.logicalSeatIndex=w.adjacencyOffset+S,f.get(S)?.displayLabel||(b.displayLabel=be(h,S,w)),!b.viewUrl&&w.viewFromSeatUrl&&m(w.viewFromSeatMeta)&&(b.viewUrl=w.viewFromSeatUrl,b.viewMeta=w.viewFromSeatMeta);let g=f.get(S)?.confidenceEvidence;b.confidenceEvidence=p(g,"exact-seat")??p(h.confidenceEvidence,"row-representative")??p(w.confidenceEvidence,"row-representative")}}}let M=it(e,h,l,h.type==="row"?ne(x):Pe(h)),P=M?.viewFromSeatUrl,v=(M?.zone?t?.find(w=>w.id===M.zone):void 0)?.focalPoint??n;for(let w of x){if(!w.confidenceEvidence){let f=Number(w.id.slice(w.id.lastIndexOf(":")+1)),b=(h.type==="row"||h.type==="table")&&Number.isInteger(f)?h.overrides?.find(S=>S.index===f)?.confidenceEvidence:void 0;w.confidenceEvidence=p(b,"exact-seat")??(h.type==="row"?p(h.confidenceEvidence,"row-representative"):void 0)}w.confidenceEvidence??=p(M?.confidenceEvidence,"section-representative")??(s?p(s.evidence,s.coverage):void 0),!w.viewUrl&&P&&m(M?.viewFromSeatMeta)&&(w.viewUrl=P,w.viewMeta=M?.viewFromSeatMeta),!w.viewUrl&&i&&m(i.meta)&&(w.viewUrl=i.url,w.viewMeta=i.meta),M&&(w.sectionId=M.logicalSectionId??M.id),M?.zone&&(w.zoneId=M.zone),v&&(w.focalPoint={...v})}u.push(...x)}return u}function kn(e,t={}){if(e.floors?.length){let o=[];for(let r of e.floors){let i=r.focalPoint??e.focalPoint,s=r.viewFromSeatUrl?{url:r.viewFromSeatUrl,meta:r.viewFromSeatMeta}:e.viewFromSeatUrl?{url:e.viewFromSeatUrl,meta:e.viewFromSeatMeta}:void 0,a=r.confidenceEvidence?{evidence:r.confidenceEvidence,coverage:"floor-representative"}:e.confidenceEvidence?{evidence:e.confidenceEvidence,coverage:"venue-representative"}:void 0,c=Qe(r.objects,e.zones,i,e.eventConfigurationId,e.confidenceBasisSha256,s,a,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);t.resolveEyeHeights!==!1&&Ze(r.objects,r.focalPoint??e.focalPoint,r.baseHeightM??0,c);for(let u of c)u.floorId=r.id;for(let u of c)o.push(u)}return o}let n=Qe(e.objects,e.zones,e.focalPoint,e.eventConfigurationId,e.confidenceBasisSha256,e.viewFromSeatUrl?{url:e.viewFromSeatUrl,meta:e.viewFromSeatMeta}:void 0,e.confidenceEvidence?{evidence:e.confidenceEvidence,coverage:"venue-representative"}:void 0,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);return t.resolveEyeHeights!==!1&&Ze(e.objects,e.focalPoint,t.floorBaseHeightM??0,n),En(e,n,t)}function En(e,t,n){return!n.deriveRestrictedView||e.derivedRestrictedView===!1||n.resolveEyeHeights===!1||We(t,$e(t,ze(e))),t}function Ze(e,t,n,o){let r=e.filter(d=>d.type==="section"),i=n>0||r.some(d=>d.height!==void 0||d.rake!==void 0||(d.elevation??0)>0);if(!r.length||!i||!t){for(let d of o)d.eyeHeightM=n+K;return}let s=new Array(o.length),a=new Map;for(let d of r)a.has(d.id)||a.set(d.id,d);let c=new Map,u=new Map;for(let d=0;d<o.length;d++){let m=o[d],p=(m.sectionId?a.get(m.sectionId)??r.find(x=>x.logicalSectionId===m.sectionId&&z({x:m.x,y:m.y},x.outline,x.holes)):void 0)??r.find(x=>z({x:m.x,y:m.y},x.outline,x.holes))??null;if(s[d]=p,!p)continue;c.has(p.id)||c.set(p.id,Ne(p,{floorBaseHeightM:n}));let h=u.get(p.id);h?h.push(d):u.set(p.id,[d])}let l=new Array(o.length).fill(void 0);for(let[d,m]of u){let y=c.get(d);if(!y)continue;let p=y.rake>0?Math.tan(y.rake*Math.PI/180):0,h=Xe(d,o,m,t);for(let x of h.rows){let M=x.blockDepth*G*p,P=y.height+M;for(let C of x.seatIndices)l[C]=P}}for(let d=0;d<o.length;d++){let m=o[d],y=s[d];if(!y){m.eyeHeightM=n+K;continue}let p=c.get(y.id);m.eyeHeightM=(l[d]??p.height)+K}}var te=40;function $(e,t){let n=t?.freeText==="exclude",o=1/0,r=1/0,i=-1/0,s=-1/0,a=(c,u)=>{c<o&&(o=c),u<r&&(r=u),c>i&&(i=c),u>s&&(s=u)};for(let c of st(e))if(c.type==="row"){let u=new Map((c.overrides??[]).map(l=>[l.index,l]));re(c).forEach((l,d)=>{let m=u.get(d);m?.skip||a(l.x+(m?.dx??0),l.y+(m?.dy??0))})}else if(c.type==="gaArea")for(let u of c.points)a(u.x,u.y);else if(c.type==="section")for(let u of c.outline)a(u.x,u.y);else if(c.type==="decorImage")a(c.x,c.y),a(c.x+c.width,c.y+c.height);else if(c.type==="shape")if(c.points&&c.points.length)for(let u of c.points)a(u.x,u.y);else c.x!=null&&c.y!=null&&c.width!=null&&c.height!=null&&(a(c.x,c.y),a(c.x+c.width,c.y+c.height));else if(c.type==="table"){let u=X+gn,l=c.shape==="round"?(c.radius??40)+u:Math.max((c.width??80)/2,(c.height??50)/2)+u;a(c.center.x-l,c.center.y-l),a(c.center.x+l,c.center.y+l)}else if(c.type==="booth"){let u=Math.max(c.width,c.height)/2;a(c.center.x-u,c.center.y-u),a(c.center.x+u,c.center.y+u)}else if(c.type==="text"){if(n)continue;let u=le(c);a(c.position.x,c.position.y),a(c.position.x+u.width,c.position.y+u.height)}for(let c of[e.referenceImage,e.backgroundImage]){if(!c)continue;let{center:u,width:l}=c,d=l*3/4;a(u.x-l/2,u.y-d/2),a(u.x+l/2,u.y+d/2)}if(!isFinite(o)){let c=e.focalPoint??{x:0,y:0};return{x:c.x-200,y:c.y-200,width:400,height:400}}return{x:o-te,y:r-te,width:i-o+te*2,height:s-r+te*2}}function ct(e){let t=e.backgroundImage;return t?.url&&!t.assetId?t:void 0}var at=.08,On=.045;function Ie(e){return`__floor__:${encodeURIComponent(e)}`}function lt(e,t,n){return{...e,objects:t,floors:void 0,...n?{focalPoint:n}:{},referenceImage:void 0,backgroundImage:void 0}}function Rn(e,t,n){let o=e.focalPoint??t.focalPoint;return o?o.x:n.x+n.width/2}function ut(e){let t=e.floors??[];if(!t.length)return[];let n=t.map(s=>$(lt(e,s.objects,s.focalPoint),{freeText:"exclude"})),r=Math.max(1,...n.map(s=>s.width))*at,i=0;return t.map((s,a)=>{let c=n[a],u=i-(c.y+c.height);return i-=c.height+r,{floorId:s.id,label:s.name??s.id,level:a,levelBadge:a===0?"G":String(a),translation:{x:-Rn(s,e,c),y:u},bounds:c}})}function Tn(e,t,n,o){let r=t==="name"?e.label:e.levelBadge;if(!r)return[];let i=Math.max(1,n*On),s=e.bounds.x+e.translation.x,a=e.bounds.y+e.translation.y+i*.4,c=`floor-level-${e.floorId}`,u={type:"text",id:`${c}-text`,text:r,position:{x:s,y:a},fontSize:i,rotation:0,color:o,bold:!0};if(t==="name")return[u];let l=i*.95;return[{type:"shape",id:`${c}-badge`,kind:"ellipse",x:s-l*.35,y:a-l*.3,width:l*2,height:l*2,fill:"transparent",stroke:{color:o,width:Math.max(1,i*.09)},opacity:.8},u]}function An(e,t={}){let n=e.floors;if(!n||n.length<2)return e;let o=ut(e),r=[];n.forEach((u,l)=>{let{x:d,y:m}=o[l].translation;for(let y of u.objects)l>0&&y.type==="shape"&&y.role==="stage"||r.push(ie(y,d,m))});let i={...e,objects:r,floors:void 0},s=$(i,{freeText:"exclude"}),a=Math.max(1,s.width,s.height),c=e.theme?.textColor??"#94a3b8";for(let u of o)r.push(...Tn(u,t.labelStyle??"number",a,c));return{...i,objects:r,referenceImage:void 0,backgroundImage:void 0}}function _n(e){if(!e.floors||e.floors.length<2)return e;let t=!e.zones?.length,n=new Set,o=e.floors.flatMap(i=>i.objects.flatMap(s=>{if(s.type==="shape"&&s.role==="stage"){let a=JSON.stringify([s.kind,s.x,s.y,s.width,s.height,s.points,s.rotation??0,s.label,s.heightM,s.eventConfigurationIds]);if(n.has(a))return[];n.add(a)}return t&&s.type==="section"?[{...s,zone:Ie(i.id)}]:[s]})),r=t?e.floors.map(i=>({id:Ie(i.id),label:i.name,focalPoint:{...i.focalPoint}})):e.zones;return{...e,objects:o,zones:r,floors:void 0,referenceImage:void 0,backgroundImage:ct(e)}}function ft(e){let t=e.floors;if(!t?.length)return null;let n=t.find(i=>i.objects.some(s=>s.type==="shape"&&s.role==="stage"));if(n)return n.id;let o=t[0],r=-1;for(let i of t){let s=$(lt(e,i.objects,i.focalPoint),{freeText:"exclude"}),a=s.width*s.height;a>r&&(r=a,o=i)}return o.id}var dt=640;function Dn(e,t){return(e.floors?.length??0)<2?null:e.floorOverview==="combined"||!Number.isFinite(t)||t<=0||t>=dt?"all":ft(e)}function Ln(e,t=0){let n=Math.max(1,e.width,e.height),o={x:e.x+e.width/2,y:e.y+e.height/2},r=n*1.55,i=Math.max(n*.82,Math.max(0,t)+n*.45);return{target:o,distance:r,height:i,focalLength:Math.hypot(r,i),yawRad:-8*Math.PI/180}}function se(e,t,n=0){let o=t.x-e.target.x,r=t.y-e.target.y,i=Math.cos(e.yawRad),s=Math.sin(e.yawRad),a=o*i-r*s,u=o*s+r*i-e.distance,l=n-e.height,d=Math.hypot(e.distance,e.height),m=(-e.distance*u-e.height*l)/d,y=(-e.height*u+e.distance*l)/d,p=Math.max(d*.08,m),h=e.focalLength/p;return{x:e.target.x+a*h,y:e.target.y-y*h,depth:p,scale:h}}function Fn(e,t){return{x:e.a*t.x+e.c*t.y+e.e,y:e.b*t.x+e.d*t.y+e.f}}function Nn(e){let t=e.a*e.d-e.b*e.c;if(!Number.isFinite(t)||Math.abs(t)<1e-9)throw new Error("perspective projection produced a singular affine");let n=e.d/t,o=-e.b/t,r=-e.c/t,i=e.a/t;return{a:n,b:o,c:r,d:i,e:-(n*e.e+r*e.f),f:-(o*e.e+i*e.f)}}function jn(e,t){return{a:e.a*t.a+e.c*t.b,b:e.b*t.a+e.d*t.b,c:e.a*t.c+e.c*t.d,d:e.b*t.c+e.d*t.d,e:e.a*t.e+e.c*t.f+e.e,f:e.b*t.e+e.d*t.f+e.f}}function Bn(e,t,n=()=>0){let o=se(e,t,n(t)),r={x:t.x+1,y:t.y},i={x:t.x,y:t.y+1},s=se(e,r,n(r)),a=se(e,i,n(i)),c=s.x-o.x,u=s.y-o.y,l=a.x-o.x,d=a.y-o.y;return{a:c,b:u,c:l,d,e:o.x-c*t.x-l*t.y,f:o.y-u*t.x-d*t.y}}function Hn(e){let t=Math.hypot(e.a,e.b),n=e.a*e.d-e.b*e.c;return{rotationDeg:Math.atan2(e.b,e.a)*180/Math.PI,scaleX:t,scaleY:n/Math.max(t,1e-9),skewX:(e.a*e.c+e.b*e.d)/Math.max(n,1e-9)}}var ht=9;function Xn(e){if(e.kind==="circle")return{hx:e.r,hy:e.r};let t=e.width/2,n=e.height/2,o=e.rotation??0;if(!o)return{hx:t,hy:n};let r=o*Math.PI/180,i=Math.abs(Math.cos(r)),s=Math.abs(Math.sin(r));return{hx:t*i+n*s,hy:t*s+n*i}}function Un(e,t,n){let o=t-e.seat.x,r=n-e.seat.y;if(e.shape.kind==="circle")return o*o+r*r<=e.shape.r*e.shape.r;let i=e.shape.rotation??0,s=o,a=r;if(i){let c=-i*Math.PI/180,u=Math.cos(c),l=Math.sin(c);s=o*u-r*l,a=o*l+r*u}return Math.abs(s)<=e.shape.width/2&&Math.abs(a)<=e.shape.height/2}function Yn(e,t,n,o,r){if(e.shape.kind==="circle"){let p=Math.min(Math.max(e.seat.x,t),o),h=Math.min(Math.max(e.seat.y,n),r),x=e.seat.x-p,M=e.seat.y-h;return x*x+M*M<=e.shape.r*e.shape.r}let i=e.shape.rotation??0;if(!i)return e.seat.x-e.hx<=o&&e.seat.x+e.hx>=t&&e.seat.y-e.hy<=r&&e.seat.y+e.hy>=n;let s=i*Math.PI/180,a=Math.cos(s),c=Math.sin(s),u=e.shape.width/2,l=e.shape.height/2,d=[[-u,-l],[u,-l],[u,l],[-u,l]].map(([p,h])=>[e.seat.x+p*a-h*c,e.seat.y+p*c+h*a]),m=[[t,n],[o,n],[o,r],[t,r]],y=[[1,0],[0,1],[a,c],[-c,a]];for(let[p,h]of y){let x=1/0,M=-1/0;for(let[v,w]of d){let f=v*p+w*h;f<x&&(x=f),f>M&&(M=f)}let P=1/0,C=-1/0;for(let[v,w]of m){let f=v*p+w*h;f<P&&(P=f),f>C&&(C=f)}if(M<P||C<x)return!1}return!0}function Gn(e,t={}){let n=t.seatRadius??ht,o=e.length,r=new Array(o),i=1/0,s=1/0,a=-1/0,c=-1/0,u=0;for(let f=0;f<o;f++){let b=e[f],S=t.shapeOf?.(b)??{kind:"circle",r:n},{hx:g,hy:I}=Xn(S);r[f]={seat:b,shape:S,hx:g,hy:I},b.x-g<i&&(i=b.x-g),b.y-I<s&&(s=b.y-I),b.x+g>a&&(a=b.x+g),b.y+I>c&&(c=b.y+I),g>u&&(u=g),I>u&&(u=I)}o===0&&(i=0,s=0,a=0,c=0);let l=u>0?u*4:1,d=Math.max(a-i,0),m=Math.max(c-s,0),y=Math.max(64,t.maxCells??o*4),p=l,h=Math.max(1,Math.ceil(d/p)||1),x=Math.max(1,Math.ceil(m/p)||1);for(;h*x>y&&(h>1||x>1);)p*=2,h=Math.max(1,Math.ceil(d/p)||1),x=Math.max(1,Math.ceil(m/p)||1);let M=h*x,P=new Int32Array(M+1),C=0;for(let f=0;f<o;f++){let b=r[f],S=L(Math.floor((b.seat.x-b.hx-i)/p),0,h-1),g=L(Math.floor((b.seat.x+b.hx-i)/p),0,h-1),I=L(Math.floor((b.seat.y-b.hy-s)/p),0,x-1),T=L(Math.floor((b.seat.y+b.hy-s)/p),0,x-1);for(let k=I;k<=T;k++)for(let E=S;E<=g;E++)P[k*h+E+1]++,C++}for(let f=0;f<M;f++)P[f+1]+=P[f];let v=new Int32Array(C),w=P.slice(0,M);for(let f=0;f<o;f++){let b=r[f],S=L(Math.floor((b.seat.x-b.hx-i)/p),0,h-1),g=L(Math.floor((b.seat.x+b.hx-i)/p),0,h-1),I=L(Math.floor((b.seat.y-b.hy-s)/p),0,x-1),T=L(Math.floor((b.seat.y+b.hy-s)/p),0,x-1);for(let k=I;k<=T;k++)for(let E=S;E<=g;E++){let O=k*h+E;v[w[O]++]=f}}return{seats:e,entries:r,minX:i,minY:s,cell:p,cols:h,rows:x,cellStart:P,items:v,stamp:new Int32Array(o),epoch:0}}function Kn(e,t,n={}){let{cols:o,rows:r,cell:i,minX:s,minY:a,cellStart:c,items:u,entries:l}=e,d=Math.floor((t.x-s)/i),m=Math.floor((t.y-a)/i);if(d<0||m<0||d>=o||m>=r)return null;let y=m*o+d,p=c[y+1],h=-1,x=1/0;for(let M=c[y];M<p;M++){let P=u[M],C=l[P];if(n.filter&&!n.filter(C.seat.id,C.seat)||!Un(C,t.x,t.y))continue;let v=t.x-C.seat.x,w=t.y-C.seat.y,f=v*v+w*w;(f<x||f===x&&P<h)&&(x=f,h=P)}return h<0?null:l[h].seat.id}function Vn(e,t,n,o={}){if(!(n>0))return null;let{cols:r,rows:i,cell:s,minX:a,minY:c,cellStart:u,items:l,entries:d}=e,m=Math.max(0,Math.floor((t.x-n-a)/s)),y=Math.min(r-1,Math.floor((t.x+n-a)/s)),p=Math.max(0,Math.floor((t.y-n-c)/s)),h=Math.min(i-1,Math.floor((t.y+n-c)/s));if(m>y||p>h)return null;let x=-1,M=n*n,P=e.stamp,C=++e.epoch;for(let v=p;v<=h;v++){let w=v*r;for(let f=m;f<=y;f++){let b=w+f,S=u[b+1];for(let g=u[b];g<S;g++){let I=l[g];if(P[I]===C)continue;P[I]=C;let T=d[I];if(o.filter&&!o.filter(T.seat.id,T.seat))continue;let k=t.x-T.seat.x,E=t.y-T.seat.y,O=k*k+E*E;(O<M||O===M&&I<x)&&(M=O,x=I)}}}return x<0?null:d[x].seat.id}function zn(e,t,n={}){let o=Math.min(t.x,t.x+t.width),r=Math.max(t.x,t.x+t.width),i=Math.min(t.y,t.y+t.height),s=Math.max(t.y,t.y+t.height),a=n.mode??"center",{cols:c,rows:u,cell:l,minX:d,minY:m,cellStart:y,items:p,entries:h}=e,x=Math.max(0,Math.floor((o-d)/l)),M=Math.min(c-1,Math.floor((r-d)/l)),P=Math.max(0,Math.floor((i-m)/l)),C=Math.min(u-1,Math.floor((s-m)/l));if(x>M||P>C)return[];let v=[],w=e.stamp,f=++e.epoch;for(let b=P;b<=C;b++){let S=b*c;for(let g=x;g<=M;g++){let I=S+g,T=y[I+1];for(let k=y[I];k<T;k++){let E=p[k];if(w[E]===f)continue;w[E]=f;let O=h[E];if(n.filter&&!n.filter(O.seat.id,O.seat))continue;(a==="center"?O.seat.x>=o&&O.seat.x<=r&&O.seat.y>=i&&O.seat.y<=s:Yn(O,o,i,r,s))&&v.push(E)}}}return v.sort((b,S)=>b-S),v.map(b=>h[b].seat.id)}function $n(e){let t=e.cols*e.rows,n=0,o=0;for(let i=0;i<t;i++){let s=e.cellStart[i+1]-e.cellStart[i];s>0&&n++,s>o&&(o=s)}let r=e.items.length;return{cell:e.cell,cols:e.cols,rows:e.rows,cells:t,occupiedCells:n,refs:r,maxPerCell:o,meanPerOccupiedCell:n?r/n:0}}0&&(module.exports={AUTOMATIC_ROUND_TABLE_RADIUS_MAX,AUTOMATIC_ROUND_TABLE_RADIUS_MIN,DEFAULT_SEAT_RADIUS,FLOOR_STACK_GAP_RATIO,FLOOR_STACK_MIN_SURFACE_PX,TABLE_SEAT_OFFSET,TEXT_BACKGROUND_PADDING_MAX,TEXT_BACKGROUND_RADIUS_MAX,TEXT_LETTER_SPACING_MAX,TEXT_LETTER_SPACING_MIN,TEXT_LINE_HEIGHT_MAX,TEXT_LINE_HEIGHT_MIN,TEXT_OPACITY_MIN,TEXT_WIDTH_MAX,TEXT_WIDTH_MIN,allObjects,applyAffine,automaticRoundTableRadius,buildAisleHoles,buildSeatIndex,buildSectionShell,chartBounds,combinedFloorZoneId,composeAffine,createPerspectiveCamera,cubicPoint,decomposeAffineLinear,distanceToRings,distributeAlongCubic,expandBooth,expandChart,expandRow,expandRowSlots,expandTable,expandTableSlots,floorObjects,floorStackPlacements,floorsOf,gridStats,hitTest,initialFloorMode,invertAffine,layoutCombinedFloorPlan,layoutFloorStack,mainFloorId,nearestWithin,objectCenter,owningSectionForObject,perspectiveTangentAffine,pointInPolygon,pointInPolygonWithHoles,polygonArea,polygonInscribedAnchor,polygonLabelPoint,polygonNetArea,projectPerspectivePoint,queryRect,resolveSegmentedRowGroups,rowInventoryCount,rowSeatPositions,segmentedRowComponentSeats,segmentedRowComponents,segmentedRowSeatTotal,smoothCubicThroughMiddle,stackFloors,tableInventoryCount,tableSeatCountsBySide,textLayoutMetrics,translateObject});
|
|
1
|
+
"use strict";var ae=Object.defineProperty;var xt=Object.getOwnPropertyDescriptor;var gt=Object.getOwnPropertyNames;var Mt=Object.prototype.hasOwnProperty;var St=(e,t)=>{for(var n in t)ae(e,n,{get:t[n],enumerable:!0})},wt=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of gt(t))!Mt.call(e,r)&&r!==n&&ae(e,r,{get:()=>t[r],enumerable:!(o=xt(t,r))||o.enumerable});return e};var Pt=e=>wt(ae({},"__esModule",{value:!0}),e);var Qn={};St(Qn,{AUTOMATIC_ROUND_TABLE_RADIUS_MAX:()=>Ve,AUTOMATIC_ROUND_TABLE_RADIUS_MIN:()=>Ke,DEFAULT_SEAT_RADIUS:()=>bt,FLOOR_STACK_GAP_RATIO:()=>ut,FLOOR_STACK_MIN_SURFACE_PX:()=>mt,TABLE_SEAT_OFFSET:()=>X,TEXT_BACKGROUND_PADDING_MAX:()=>uo,TEXT_BACKGROUND_RADIUS_MAX:()=>fo,TEXT_LETTER_SPACING_MAX:()=>ao,TEXT_LETTER_SPACING_MIN:()=>co,TEXT_LINE_HEIGHT_MAX:()=>so,TEXT_LINE_HEIGHT_MIN:()=>io,TEXT_OPACITY_MIN:()=>lo,TEXT_WIDTH_MAX:()=>ro,TEXT_WIDTH_MIN:()=>oo,allObjects:()=>at,applyAffine:()=>jn,automaticRoundTableRadius:()=>cn,buildAisleHoles:()=>Ct,buildSeatIndex:()=>Vn,buildSectionShell:()=>vt,chartBounds:()=>W,combinedFloorZoneId:()=>ve,composeAffine:()=>Hn,createPerspectiveCamera:()=>Nn,cubicPoint:()=>Q,decomposeAffineLinear:()=>Un,distanceToRings:()=>_e,distributeAlongCubic:()=>le,expandBooth:()=>st,expandChart:()=>On,expandRow:()=>ot,expandRowSlots:()=>nt,expandTable:()=>it,expandTableSlots:()=>Pe,floorObjects:()=>kn,floorStackPlacements:()=>dt,floorsOf:()=>te,gridStats:()=>qn,hitTest:()=>zn,initialFloorMode:()=>Fn,invertAffine:()=>Bn,layoutCombinedFloorPlan:()=>Ln,layoutFloorStack:()=>Dn,mainFloorId:()=>ht,nearestWithin:()=>$n,objectCenter:()=>Ie,owningSectionForObject:()=>ct,perspectiveTangentAffine:()=>Xn,pointInPolygon:()=>we,pointInPolygonWithHoles:()=>$,polygonArea:()=>de,polygonInscribedAnchor:()=>he,polygonLabelPoint:()=>vn,polygonNetArea:()=>Rt,projectPerspectivePoint:()=>ce,queryRect:()=>Wn,resolveSegmentedRowGroups:()=>me,rowInventoryCount:()=>wn,rowSeatPositions:()=>ie,segmentedRowComponentSeats:()=>_t,segmentedRowComponents:()=>Tt,segmentedRowSeatTotal:()=>Dt,smoothCubicThroughMiddle:()=>It,stackFloors:()=>En,tableInventoryCount:()=>Pn,tableSeatCountsBySide:()=>rt,textLayoutMetrics:()=>ue,translateObject:()=>se,usableHoles:()=>V});module.exports=Pt(Qn);var Jn=Math.PI/180;function H(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function F(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function Q(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 It(e,t,n){let o={x:(e.x+t.x)/2,y:(e.y+t.y)/2},r={x:(n.x-o.x)*4/3,y:(n.y-o.y)*4/3};return{start:{...e},control1:{x:e.x+(t.x-e.x)/3+r.x,y:e.y+(t.y-e.y)/3+r.y},control2:{x:e.x+(t.x-e.x)*2/3+r.x,y:e.y+(t.y-e.y)*2/3+r.y},end:{...t}}}function le(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[Q(e,.5)];let o=Array.from({length:n+1},(u,c)=>Q(e,c/n)),r=new Float64Array(o.length);for(let u=1;u<o.length;u+=1){let c=o[u].x-o[u-1].x,a=o[u].y-o[u-1].y;r[u]=r[u-1]+Math.hypot(c,a)}let i=r[r.length-1];if(i<=1e-9)return Array.from({length:t},()=>({...e.start}));let s=[],l=1;for(let u=0;u<t;u+=1){let c=i*u/(t-1);for(;l<r.length-1&&r[l]<c;)l+=1;let a=r[l-1],f=r[l],m=f===a?0:(c-a)/(f-a);s.push({x:o[l-1].x+(o[l].x-o[l-1].x)*m,y:o[l-1].y+(o[l].y-o[l-1].y)*m})}return s}function T(e,t){return{x:e.x+t.x,y:e.y+t.y}}function z(e,t){return{x:e.x-t.x,y:e.y-t.y}}function _(e,t){return{x:e.x*t,y:e.y*t}}function Z(e,t=13){return Array.from({length:t},(n,o)=>Q(e,o/(t-1)))}function ke(e,t){let n=Math.max(0,Math.min(1,t))*(e.length-1),o=Math.min(e.length-2,Math.floor(n));return F(e[o],e[o+1],n-o)}function Ee(e,t,n){let o=Math.max(0,Math.min(1,t)),r=Math.max(o,Math.min(1,n)),i=[ke(e,o)];for(let s=1;s<e.length-1;s+=1){let l=s/(e.length-1);l>o+1e-9&&l<r-1e-9&&i.push(e[s])}return i.push(ke(e,r)),i}function Oe(e,t){let n=[[0,1],[1,2],[2,3],[3,0]],o=0,r=Number.POSITIVE_INFINITY;n.forEach(([m,p],y)=>{let h=H(F(e[m],e[p],.5),t);h<r&&(r=h,o=y)});let i=e[o],s=e[(o+1)%4],l=e[(o+2)%4],u=e[(o+3)%4],c=F(i,s,.5),a=z(t,c),f=Math.max(1e-9,Math.hypot(a.x,a.y));return{p0:i,p1:s,p2:l,p3:u,normal:_(a,1/f),depth:(H(i,u)+H(s,l))/2}}function Re(e){let{p0:t,p1:n,p2:o,p3:r,normal:i,depth:s}=e,l=z(n,t),u=z(o,r),c=s*.22,a=s*.12;return{nearPath:{start:t,control1:T(T(t,_(l,1/3)),_(i,c)),control2:T(T(t,_(l,2/3)),_(i,c)),end:n},farPath:{start:o,control1:T(T(r,_(u,2/3)),_(i,a)),control2:T(T(r,_(u,1/3)),_(i,a)),end:r}}}function vt(e,t,n){if(e.length!==4)throw new Error("A section shell requires four mapped bounds corners");let o=e.reduce((y,h)=>T(y,h),{x:0,y:0});o.x/=4,o.y/=4;let r=H(e[0],e[1]),i=H(e[0],e[3]),s=n==="auto"?r>i*1.25&&H(o,t)>i?"bezier":"tapered":n;if(s==="rectangle")return{mode:s,outline:e.map(y=>({...y}))};let l=Oe(e,t),{p0:u,p1:c,p2:a,p3:f}=l;if(s==="tapered")return{mode:s,outline:[T(u,_(z(c,u),.14)),T(u,_(z(c,u),1-.14)),a,f]};let{nearPath:m,farPath:p}=Re(l);return{mode:s,outline:[...Z(m),...Z(p).slice(1)]}}function Ct(e,t,n,o){if(e.length!==4)throw new Error("Aisle generation requires four mapped bounds corners");if(!Number.isInteger(n)||n<0||n>3)throw new Error("Aisle count must be an integer from 0 to 3");if(n===0)return[];let r=Oe(e,t),{p0:i,p1:s,p2:l,p3:u}=r,c=o==="bezier"?Re(r):null,a=c?Z(c.nearPath):null,f=c?Z(c.farPath).reverse():null,m=Math.min(.055,.18/(n+1));return Array.from({length:n},(p,y)=>{let h=(y+1)/(n+1),x=h-m/2,M=h+m/2;return a&&f?[...Ee(a,x,M),...Ee(f,x,M).reverse()]:[F(i,s,x),F(i,s,M),F(u,l,M),F(u,l,x)]})}var oo=40,ro=1200,io=.8,so=3,co=-2,ao=20,lo=.1,uo=40,fo=40,Ae=e=>Math.max(1,e.fontSize*.6+(e.letterSpacing??0));function kt(e,t){let n=e.text.split(/\r?\n/);if(!e.width)return Math.max(1,n.length);let o=Math.max(1,Math.floor(t/Ae(e))),r=0;for(let i of n){if(!i.length){r+=1;continue}let s=0;for(let l of i.split(/\s+/)){let u=l.length;s&&s+1+u<=o?s+=1+u:(r+=Math.max(1,Math.ceil(u/o)),s=u%o)}}return Math.max(1,r)}function ue(e){let t=e.background?.padding??0,n=e.text.split(/\r?\n/),o=Math.max(1,...n.map(l=>l.length))*Ae(e),r=e.width??o+t*2,i=Math.max(1,r-t*2),s=kt(e,i);return{width:r,height:s*e.fontSize*(e.lineHeight??1.2)+t*2,lineCount:s,padding:t}}function Et(e,t,n){let o=n.x-t.x,r=n.y-t.y,i=o*o+r*r,s=i?Math.max(0,Math.min(1,((e.x-t.x)*o+(e.y-t.y)*r)/i)):0;return Math.hypot(e.x-(t.x+s*o),e.y-(t.y+s*r))}function _e(e,t){let n=1/0;for(let o of t)if(!(o.length<2))for(let r=0,i=o.length-1;r<o.length;i=r++){let s=Et(e,o[i],o[r]);s<n&&(n=s)}return n}function Te(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,l=t[r].x,u=t[r].y;s>e.y!=u>e.y&&e.x<(l-i)*(e.y-s)/(u-s)+i&&(n=!n)}return n}function De(e){return Array.isArray(e)?e.filter(t=>Array.isArray(t)&&t.length>=3):[]}function Ot(e,t,n){let o=Te(e,t)&&!n.some(i=>Te(e,i)),r=_e(e,[t,...n]);return o?r:-r}function Y(e,t,n,o,r){let i=Ot({x:e,y:t},o,r);return{x:e,y:t,h:n,d:i,max:i+n*Math.SQRT2}}var fe=class{constructor(){this.items=[]}get size(){return this.items.length}push(t){let n=this.items;n.push(t);let o=n.length-1;for(;o>0;){let r=o-1>>1;if(n[r].max>=n[o].max)break;[n[r],n[o]]=[n[o],n[r]],o=r}}pop(){let t=this.items,n=t[0],o=t.pop();if(t.length&&o){t[0]=o;let r=0;for(;;){let i=r*2+1,s=i+1,l=r;if(i<t.length&&t[i].max>t[l].max&&(l=i),s<t.length&&t[s].max>t[l].max&&(l=s),l===r)break;[t[l],t[r]]=[t[r],t[l]],r=l}}return n}};function de(e){if(e.length<3)return 0;let t=0;for(let n=0,o=e.length-1;n<e.length;o=n++)t+=(e[o].x+e[n].x)*(e[o].y-e[n].y);return Math.abs(t)/2}function Rt(e,t){return Math.max(0,de(e)-De(t).reduce((n,o)=>n+de(o),0))}function he(e,t){let n=De(t);if(!e.length)return{point:{x:0,y:0},radius:0};if(e.length<3){let h=e.reduce((M,P)=>M+P.x,0)/e.length,x=e.reduce((M,P)=>M+P.y,0)/e.length;return{point:{x:h,y:x},radius:0}}let o=1/0,r=1/0,i=-1/0,s=-1/0;for(let h of e)h.x<o&&(o=h.x),h.y<r&&(r=h.y),h.x>i&&(i=h.x),h.y>s&&(s=h.y);let l=i-o,u=s-r,c=Math.min(l,u);if(!(c>0))return{point:{x:(o+i)/2,y:(r+s)/2},radius:0};let a=Math.max(l,u)/150,f=new fe,m=c/2;for(let h=o;h<i;h+=c)for(let x=r;x<s;x+=c)f.push(Y(h+m,x+m,m,e,n));let p=Y(o+l/2,r+u/2,0,e,n),y=0;for(;f.size;){let h=f.pop();if(!h)break;h.d>p.d&&(p=h),!(h.max-p.d<=a)&&(y>=4e3||(y+=1,m=h.h/2,f.push(Y(h.x-m,h.y-m,m,e,n)),f.push(Y(h.x+m,h.y-m,m,e,n)),f.push(Y(h.x-m,h.y+m,m,e,n)),f.push(Y(h.x+m,h.y+m,m,e,n))))}return{point:{x:p.x,y:p.y},radius:Math.max(0,p.d)}}function J(e,t,n){return Math.max(t,Math.min(n,e))}function L(e,t,n){return e<t?t:e>n?n:e}var po=Math.PI*2;function Le(e,t,n){return At(e,r=>({x:r.x+t,y:r.y+n}))}function At(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 yo=4/3;function Tt(e,t,n){let o=[];for(let r=0;r<e.length-1;r+=1){let i=e[r],s=e[r+1],l=Math.hypot(s.x-i.x,s.y-i.y);if(l<=0)continue;let u=Math.max(1,Math.round(l/n)),c=l/u,a=Math.atan2(s.y-i.y,s.x-i.x),f=r===0,p=(r>0?t[r-1]:void 0)==="break"?2:1,y=f?{...i}:{x:i.x+Math.cos(a)*c*p,y:i.y+Math.sin(a)*c*p},h=f?u+1:Math.max(1,u-(p-1));o.push({origin:y,rotation:a*180/Math.PI,seatCount:h,seatSpacing:c})}return o}function _t(e){let t=e.rotation*Math.PI/180,n={x:Math.cos(t),y:Math.sin(t)};return Array.from({length:e.seatCount},(o,r)=>({x:e.origin.x+n.x*r*e.seatSpacing,y:e.origin.y+n.y*r*e.seatSpacing}))}function Dt(e){return e.reduce((t,n)=>t+n.seatCount,0)}function me(e){let t=new Map,n=new Map;for(let o of e){if(o.type!=="row"||!o.segmentedRow)continue;let r=n.get(o.segmentedRow.groupId)??[];r.push(o),n.set(o.segmentedRow.groupId,r)}for(let[o,r]of n){let i=r.slice().sort((m,p)=>m.segmentedRow.componentIndex-p.segmentedRow.componentIndex),s=i[0]?.segmentedRow?.componentCount??0,l=i[0]?.segmentedRow;if(!l||!(s>=2&&i.length===s&&l?.boundaryBefore==="start"&&i.every((m,p)=>m.segmentedRow?.kind==="segmented-row-v1"&&m.segmentedRow.groupId===o&&m.segmentedRow.componentCount===s&&m.segmentedRow.componentIndex===p&&m.segmentedRow.repeatLabelOnComponents===l.repeatLabelOnComponents&&(p===0?m.segmentedRow.boundaryBefore==="start":m.segmentedRow.boundaryBefore!=="start")&&m.segmentedRow.displayLabel===l.displayLabel)))continue;let c=i.reduce((m,p)=>m+p.seatCount,0),a=0,f=0;for(let m of i)m.segmentedRow.boundaryBefore==="break"&&(a+=1),t.set(m.id,{groupId:o,adjacencyOffset:a,displayOffset:f,displayLabel:l.displayLabel,totalSeats:c,canonical:i[0],viewFromSeatUrl:l.viewFromSeatUrl,viewFromSeatMeta:l.viewFromSeatMeta,confidenceEvidence:l.confidenceEvidence}),a+=m.seatCount,f+=m.seatCount}return t}var Lt="ABCDEFGHIJKLMNOPQRSTUVWXYZ";var Ft="abcdefghijklmnopqrstuvwxyz";function Nt(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 be(e,t=!1){let n=t?Ft:Lt;return Nt(Math.max(0,Math.floor(e)-1),n)}var jt=[[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 Fe(e){if(!Number.isFinite(e)||e<=0)return String(e);let t=Math.floor(e),n="";for(let[o,r]of jt)for(;t>=o;)n+=r,t-=o;return n}function Bt(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 ee(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??"",l=e.seatNumbering?.endAt,u=e.seatCount;if(i==="updown"||i==="updown-descending"){let p=Math.ceil(u/2),y=i==="updown"?t<p?n+2*t:n-1+2*(u-t):t<p?n+2*(p-1-t):n+1+2*(t-p);return`${s}${y}`}let c=i==="odd"||i==="even"?2:r,a=l!=null&&Number.isFinite(l)?l-(u-1)*c:n,f=o==="center"?Bt(u)[t]:o==="rtl"?u-1-t:t,m;switch(i){case"odd":{let p=a%2===1?a:a+1;m=String(p+f*2);break}case"even":{let p=a%2===0?a:a+1;m=String(p+f*2);break}case"roman":m=Fe(a+f*r);break;case"letters-upper":m=be(a+f*r,!1);break;case"letters-lower":m=be(a+f*r,!0);break;default:m=String(a+f*r);break}return`${s}${m}`}function Ht(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function Ne(e,t,n){return n?.label??`${e.seatLabelBase??e.label}-${ee(e,t)}`}function pe(e,t,n,o){if(o?.displayLabel)return o.displayLabel;if(e.seatDisplayLabelMode==="number")return ee(e,t);if(!n)return`${e.displayLabel||e.label}-${ee(e,t)}`;let r=Ht(n),i=n.displayOffset+t;return`${n.displayLabel}-${ee(r,i)}`}var G=.02291666666666667,Po=1/G,Xt=58,Ut=Xt*G;var Yt=3,je=0,ye=120,Gt=0,Kt=45,Vt=7,K=1.2;function xe(e,t,n,o){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):o}function zt(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=Vt?e:Yt}function Be(e,t={}){let n=xe(t.floorBaseHeightM,je,ye,0),o=Math.min(ye,n+zt(e.elevation)*Ut),r=e.height===void 0?o:xe(e.height,je,ye,o),i=xe(e.rake,Gt,Kt,0);return{height:r,rake:i}}function He(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 Xe(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],l=s.x-i.x,u=s.y-i.y,c=l*l+u*u,a=c>1e-12?((t-i.x)*l+(n-i.y)*u)/c:0;a<0?a=0:a>1&&(a=1);let f=t-(i.x+a*l),m=n-(i.y+a*u);if(Math.abs(f)>=o||Math.abs(m)>=o)continue;let p=Math.hypot(f,m);p<o&&(o=p)}return o}function $t(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 Ue(e,t){return Math.hypot(e.cx-t.cx,e.cy-t.cy)-e.r-t.r}function ge(e,t){let n=1/0;for(let o of He(e)){let r=Xe(t,o.x,o.y);r<n&&(n=r)}for(let o of He(t)){let r=Xe(e,o.x,o.y);r<n&&(n=r)}return n}function Wt(e,t){if(e.length<3)return{pts:e,seatIndices:t};let n=0,o=0;for(let a of e)n+=a.x,o+=a.y;n/=e.length,o/=e.length;let r=-1,i=e[0];for(let a of e){let f=Math.hypot(a.x-n,a.y-o);f>r&&(r=f,i=a)}let s=i.x-n,l=i.y-o,u=Math.hypot(s,l);u>1e-9?(s/=u,l/=u):(s=1,l=0);let c=e.map((a,f)=>({p:a,i:f,t:(a.x-n)*s+(a.y-o)*l})).sort((a,f)=>a.t-f.t);return{pts:c.map(a=>a.p),seatIndices:c.map(a=>t[a.i])}}function qt(e){let t=e.length;if(t<3)return null;let n=0,o=0;for(let P of e)n+=P.x,o+=P.y;n/=t,o/=t;let r=0,i=0,s=0,l=0,u=0,c=0,a=0;for(let P of e){let C=P.x-n,v=P.y-o;r+=C*C,s+=v*v,i+=C*v,l+=C*C*C,u+=v*v*v,c+=C*v*v,a+=v*C*C}let f=r*s-i*i;if(Math.abs(f)<1e-9)return null;let m=(l+c)/2,p=(u+a)/2,y=(m*s-p*i)/f,h=(p*r-m*i)/f,x=y+n,M=h+o;return!Number.isFinite(x)||!Number.isFinite(M)?null:{cx:x,cy:M}}var Qt=.15;function Zt(e){if(e.length<2)return null;let t=e.map(P=>{let C=0,v=0;for(let w of P.pts)C+=w.x,v+=w.y;return{x:C/P.pts.length,y:v/P.pts.length}}),n=0,o=0;for(let P of t)n+=P.x,o+=P.y;n/=t.length,o/=t.length;let r=0,i=0,s=0;for(let P of t){let C=P.x-n,v=P.y-o;r+=C*C,i+=C*v,s+=v*v}let l=r+s,u=r*s-i*i,c=l/2+Math.sqrt(Math.max(0,l*l/4-u)),a,f;Math.abs(i)>1e-12?(a=c-s,f=i):r>=s?(a=1,f=0):(a=0,f=1);let m=Math.hypot(a,f);if(!(m>1e-12))return null;a/=m,f/=m;let p=1/0,y=-1/0,h=[];for(let P of e){let C=1/0,v=-1/0;for(let w of P.pts){let d=w.x*a+w.y*f;d<C&&(C=d),d>v&&(v=d),d<p&&(p=d),d>y&&(y=d)}h.push(v-C)}let x=y-p;return x>1e-9?(h.sort((P,C)=>P-C),h[Math.min(h.length-1,Math.floor(h.length*.9))]/x<=Jt?{x:a,y:f}:null):null}var Jt=.35;function Ye(e,t,n,o){let r=new Map;for(let d of n){let b=t[d],S=b.rowId||`__seat-${d}`,g=r.get(S);g||(g={pts:[],idx:[]},r.set(S,g)),g.pts.push({x:b.x,y:b.y}),g.idx.push(d)}if(!r.size)return{sectionId:e,rows:[],blockCount:0};let i=[];for(let[d,b]of r){let S=Wt(b.pts,b.idx),g=0;for(let I of S.pts)g+=Math.hypot(I.x-o.x,I.y-o.y);i.push({id:d,pts:S.pts,seatIndices:S.seatIndices,blockId:-1,ordinal:0,blockDepth:0,focalDistance:g/S.pts.length})}let s=i.map(d=>$t(d.pts)),l=i.length<=256?i.length*(i.length-1)/2:0,u=l?new Float64Array(l):null;u?.fill(Number.NaN);let c=u?new Map(i.map((d,b)=>[d,b])):null,a=(d,b)=>(d>b&&([d,b]=[b,d]),d*(2*i.length-d-1)/2+(b-d-1)),f=(d,b)=>{if(!u)return ge(i[d].pts,i[b].pts);let S=a(d,b),g=u[S];if(!Number.isNaN(g))return g;let I=ge(i[d].pts,i[b].pts);return u[S]=I,I},m=(d,b)=>c?f(c.get(d),c.get(b)):ge(d.pts,b.pts),p=[];for(let d=0;d<i.length;d++){let b=1/0;for(let S=0;S<i.length;S++){if(d===S||Ue(s[d],s[S])>=b)continue;let g=f(d,S);g<b&&(b=g)}Number.isFinite(b)&&p.push(b)}p.sort((d,b)=>d-b);let y=p.length?p[Math.floor(p.length/2)]:1,h=Math.max(y*1.8,1e-6),x=i.map(()=>[]);for(let d=0;d<i.length;d++)for(let b=d+1;b<i.length;b++)Ue(s[d],s[b])>h||f(d,b)<=h&&(x[d].push(b),x[b].push(d));let M=0;for(let d=0;d<i.length;d++){if(i[d].blockId!==-1)continue;let b=M++,S=[d];for(i[d].blockId=b;S.length;){let g=S.pop();for(let I of x[g])i[I].blockId===-1&&(i[I].blockId=b,S.push(I))}}let P=new Map;for(let d of i){let b=P.get(d.blockId)??[];b.push(d),P.set(d.blockId,b)}let C=[];for(let d of i){if(d.pts.length<4)continue;let b=qt(d.pts);b&&(!Number.isFinite(b.cx)||!Number.isFinite(b.cy)||C.push({x:b.cx,y:b.cy}))}let v=C.length>=2?(()=>{let d=C.map(g=>g.x).sort((g,I)=>g-I),b=C.map(g=>g.y).sort((g,I)=>g-I),S=Math.floor(C.length/2);return{cx:d[S],cy:b[S]}})():null;if(v){let d=k=>Math.hypot(k.x-v.cx,k.y-v.cy),b=1/0,S=-1/0,g=[];for(let k of i){let E=1/0,O=-1/0;for(let N of k.pts){let j=d(N);j<E&&(E=j),j>O&&(O=j)}g.push(O-E),E<b&&(b=E),O>S&&(S=O)}let I=S-b;g.sort((k,E)=>k-E);let A=g[Math.min(g.length-1,Math.floor(g.length*.9))];if(I>1e-9&&A/I<=Qt){let k=i.map(R=>{let q=0;for(let yt of R.pts)q+=d(yt);return{row:R,radius:q/R.pts.length}}),E=0,O=0;for(let R of k)E+=R.radius,O+=R.row.focalDistance;E/=k.length,O/=k.length;let N=0;for(let R of k)N+=(R.radius-E)*(R.row.focalDistance-O);if(N<0)for(let R of k)R.radius=-R.radius;let B=1/0;for(let R of k)R.radius<B&&(B=R.radius);k.sort((R,q)=>R.radius-q.radius);let D=-1,U=-1/0,pt=I/Math.max(1,k.length)*.5,Ce=[];for(let R of k)R.radius-U>pt&&(D++,U=R.radius),R.row.ordinal=D,R.row.blockDepth=R.radius-B,Ce.push(R.row);return{sectionId:e,rows:Ce,blockCount:M}}}let w=[];for(let[,d]of P){let b=Zt(d);if(b){let S=I=>{let A=0;for(let k of I.pts)A+=k.x*b.x+k.y*b.y;return A/I.pts.length};d.sort((I,A)=>S(I)-S(A)),d.length>=2&&d[0].focalDistance>d[d.length-1].focalDistance&&d.reverse();let g=0;for(let I=0;I<d.length;I++)I>0&&(g+=m(d[I-1],d[I])),d[I].ordinal=I,d[I].blockDepth=g,w.push(d[I])}else{let S=1/0;for(let g of d)g.focalDistance<S&&(S=g.focalDistance);d.sort((g,I)=>g.focalDistance-I.focalDistance);for(let g=0;g<d.length;g++)d[g].ordinal=g,d[g].blockDepth=Math.max(0,d[g].focalDistance-S),w.push(d[g])}}return{sectionId:e,rows:w,blockCount:M}}var en=/^\d{4}-\d{2}-\d{2}$/;function tn(e){let t=Date.parse(e);return Number.isFinite(t)?en.test(e)?t+864e5:t:null}function nn(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=tn(e.validUntil);return n===null?!1:(t instanceof Date?t.getTime():t)<n}function on(e,t,n){return!(e.eventConfigurationId&&e.eventConfigurationId!==t||e.eventConfigurationVersion!==void 0&&e.eventConfigurationVersion!==n)}function rn(e){return e.status!=="draft"&&e.status!=="retracted"}function sn(e,t){return e.status===void 0?t===void 0:e.status!=="approved"?!0:typeof t=="string"&&typeof e.basisSha256=="string"&&e.basisSha256===t}function Ge(e,t={}){return!!e&&rn(e)&&on(e,t.activeConfigurationId,t.activeConfigurationVersion)&&sn(e,t.activeBasisSha256)&&nn(e,t.now)}var Ke=36,Ve=160;function cn(e,t=360){let n=J(Math.round(Number.isFinite(e)?e:1),1,40),o=J(Number.isFinite(t)?t:360,120,360);return Math.round(J(n*4*(360/o),Ke,Ve))}var Oo=Math.PI*2;function ze(e){return e==="pitch-football"||e==="rink-hockey"||e==="track-athletics"||e==="oval-cricket"}function an(e){if((e.kind==="polygon"||e.kind==="polyline"||e.kind==="line")&&e.points&&e.points.length>=2)return e.points;if(e.x==null||e.y==null||e.width==null||e.height==null)return null;let t=e.x,n=e.y,o=e.width,r=e.height;return[{x:t,y:n},{x:t+o,y:n},{x:t+o,y:n+r},{x:t,y:n+r}]}function ln(e,t,n){let o=n*Math.PI/180,r=Math.cos(o),i=Math.sin(o),s=e.x-t.x,l=e.y-t.y;return{x:t.x+s*r-l*i,y:t.y+s*i+l*r}}function $e(e){let t=an(e);if(!t||t.length<2)return null;let n=e.rotation??0,o=Math.abs(n)<1e-6?t:t.map(u=>ln(u,{x:t.reduce((c,a)=>c+a.x,0)/t.length,y:t.reduce((c,a)=>c+a.y,0)/t.length},n)),r=1/0,i=1/0,s=-1/0,l=-1/0;for(let u of o)r=Math.min(r,u.x),i=Math.min(i,u.y),s=Math.max(s,u.x),l=Math.max(l,u.y);return!Number.isFinite(r)||s-r<1e-6||l-i<1e-6?null:{minX:r,minY:i,maxX:s,maxY:l}}var un=5,fn=3,dn=.92,hn=1.9,mn=2,bn=.6,pn=1,yn=.06;function xn(e){return e.heightM!==void 0?e.heightM:ze(e.stageKind)?yn:pn}function We(e){let t=1/0,n=1/0,o=-1/0,r=-1/0,i=-1/0;for(let s of te(e)){let l=s.baseHeightM??0;for(let u of s.objects){if(u.type!=="shape"||u.role!=="stage")continue;let c=$e(u);c&&(t=Math.min(t,c.minX),n=Math.min(n,c.minY),o=Math.max(o,c.maxX),r=Math.max(r,c.maxY),i=Math.max(i,l+xn(u)))}}return!Number.isFinite(t)||!Number.isFinite(i)?null:{minX:t,minY:n,maxX:o,maxY:r,deckTopM:i}}function gn(e,t,n,o){let r=1/0,i=1/0,s=-1/0,l=-1/0;for(let p of e)Number.isFinite(p.eyeHeightM)&&(r=Math.min(r,p.x),s=Math.max(s,p.x),i=Math.min(i,p.y),l=Math.max(l,p.y));if(!Number.isFinite(r))return null;let u=r*t,c=i*t,a=Math.max(1,Math.ceil((s-r)*t/n)+1),f=Math.max(1,Math.ceil((l-i)*t/n)+1),m=new Float64Array(a*f).fill(-1/0);for(let p of e){if(!Number.isFinite(p.eyeHeightM))continue;let y=p.eyeHeightM-K,h=Math.min(a-1,Math.max(0,Math.floor((p.x*t-u)/n))),M=Math.min(f-1,Math.max(0,Math.floor((p.y*t-c)/n)))*a+h,P=y+o;P>m[M]&&(m[M]=P)}return{cellM:n,minX:u,minY:c,cols:a,rows:f,top:m}}function Mn(e,t,n){let o=Math.floor((t-e.minX)/e.cellM),r=Math.floor((n-e.minY)/e.cellM);return o<0||r<0||o>=e.cols||r>=e.rows?-1/0:e.top[r*e.cols+o]}function qe(e,t,n={}){let o=new Map;if(!t||!e.length)return o;let r=n.metresPerChartUnit??G,i=n.cellM??bn,s=n.chairBackM??dn,l=n.selfRowSkipM??mn,u=n.clearThreshold??.9,c=n.partialThreshold??.25,a=Math.max(1,n.columns??un),f=Math.max(1,n.rows??fn),m=gn(e,r,i,s);if(!m)return o;let p=(t.maxX-t.minX)*r,y=(t.maxY-t.minY)*r,h=p>=y,x=(t.minX+t.maxX)/2*r,M=(t.minY+t.maxY)/2*r,P=[];for(let v=0;v<a;v++){let w=(v+.5)/a-.5,d=h?x+w*p:x,b=h?M:M+w*y;for(let S=0;S<f;S++){let g=t.deckTopM+(f===1?0:S/(f-1)*hn);P.push({x:d,y:b,z:g})}}let C=i/2;for(let v of e){if(!Number.isFinite(v.eyeHeightM))continue;let w=v.x*r,d=v.y*r,b=v.eyeHeightM,S=0,g=1/0;for(let A of P){let k=A.x-w,E=A.y-d,O=Math.hypot(k,E);if(!(O>l)){S++;continue}let N=k/O,j=E/O,B=0;for(let D=l;D<O;D+=C){let U=Mn(m,w+N*D,d+j*D);if(!(!Number.isFinite(U)||U>=b)&&U>b+(A.z-b)*D/O){B=D;break}}B?g=Math.min(g,B):S++}let I=S/P.length;I>=u||o.set(v.id,{seatId:v.id,mark:I<c?"obstructedView":"restrictedView",visibleFraction:I,totalRays:P.length,atDistanceM:Number.isFinite(g)?g:0})}return o}function Qe(e,t){if(!t.size)return 0;let n=0;for(let o of e){let r=t.get(o.id);if(!r)continue;let i=o.commercial;i?.restrictedView!==void 0||i?.obstructedView!==void 0||(o.commercial={...i,[r.mark]:!0},n++)}return n}function Me(e){return e?e.accessibility?.length?e.wheelchairSpaceType&&!e.accessibility.includes("wheelchair")?["wheelchair",...e.accessibility]:e.accessibility:e.wheelchairSpaceType?["wheelchair"]:e.accessible?["wheelchair"]:[]:[]}var re=Math.PI/180,Sn=9,X=16;function Se(e,t,n,o){let r=n*re,i=Math.cos(r),s=Math.sin(r);return{x:o.x+e*i-t*s,y:o.y+e*s+t*i}}function ie(e){let{seatCount:t,seatSpacing:n,curve:o,rotation:r,origin:i}=e,s=[];if(e.path)return le(e.path,t);if(t<=1)return t===1&&s.push({x:i.x,y:i.y}),s;if(o===0){for(let c=0;c<t;c++)s.push(Se(c*n,0,r,i));return s}let l=o/(t-1)*re,u=n/(2*Math.sin(Math.abs(l)/2));for(let c=0;c<t;c++){let a=c*l,f=u*Math.sin(a),m=-u+u*Math.cos(a);s.push(Se(f,m,r,i))}return s}function tt(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function wn(e){let t=new Set((e.overrides??[]).filter(n=>n.skip&&Number.isInteger(n.index)&&n.index>=0&&n.index<e.seatCount).map(n=>n.index));return Math.max(0,e.seatCount-t.size)}function nt(e,t){let n=tt(e);return ie(e).map((o,r)=>{let i=n.get(r),s=Me(i),l=Ne(e,r,i),u={...e.commercial,...i?.commercial};return{index:r,x:o.x+(i?.dx??0),y:o.y+(i?.dy??0),label:l,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(c=>c!==void 0&&c!==!1&&c!=="")?u:void 0,glyph:i?.glyph,viewUrl:i?.viewFromSeatUrl??e.viewFromSeatUrl,viewMeta:i?.viewFromSeatUrl?i.viewFromSeatMeta:e.viewFromSeatMeta,labelStyle:i?.labelStyle??e.seatLabelStyle}})}function ot(e){let t=[];for(let n of nt(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 rt(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 Pe(e){let t=[],n=Math.max(0,Math.round(e.seatCount));if(n===0)return t;let o=new Map((e.overrides??[]).map(a=>[a.index,a])),r=(a,f,m,p)=>{let y=o.get(a),h=Me(y),x=y?.label??`${e.label}-${a+1}`,M=e.displayLabel??e.label;return{index:a,label:x,displayLabel:y?.displayLabel??`${M}-${a+1}`,x:f+(y?.dx??0),y:m+(y?.dy??0),categoryKey:y?.categoryKey??e.categoryKey,skipped:!!y?.skip,accessible:h.length>0,accessibility:h,wheelchairSpaceType:y?.wheelchairSpaceType,commercial:y?.commercial,glyph:y?.glyph,viewUrl:y?.viewFromSeatUrl,viewMeta:y?.viewFromSeatUrl?y.viewFromSeatMeta:void 0,labelStyle:y?.labelStyle,...p?{side:p}:{}}};if(e.shape==="round"){let a=(e.radius??40)+X,f=e.rotation*re,m=Math.max(0,Math.min(360,e.seatArc??360));if(m>=360||n===1){for(let x=0;x<n;x++){let M=f+x/n*2*Math.PI;t.push(r(x,e.center.x+a*Math.cos(M),e.center.y+a*Math.sin(M)))}return t}let p=m*re,y=(2*Math.PI-p)/2,h=f+y;for(let x=0;x<n;x++){let M=h+x/(n-1)*p;t.push(r(x,e.center.x+a*Math.cos(M),e.center.y+a*Math.sin(M)))}return t}let i=e.width??80,s=e.height??50,l=rt(e),u=["top","bottom","left","right"],c=0;for(let a of u){let f=l[a];for(let m=0;m<f;m++){let p,y;a==="top"?(p=-i/2+(m+.5)*i/f,y=-s/2-X):a==="bottom"?(p=-i/2+(m+.5)*i/f,y=s/2+X):a==="left"?(p=-i/2-X,y=-s/2+(m+.5)*s/f):(p=i/2+X,y=-s/2+(m+.5)*s/f);let h=Se(p,y,e.rotation,e.center);t.push(r(c++,h.x,h.y,a))}}return t}function Pn(e){return e.bookAsWhole||e.variableOccupancy?Math.max(0,Math.round(e.seatCount)):Pe(e).filter(t=>!t.skipped).length}function it(e){return Pe(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 st(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,l=t[r].x,u=t[r].y;s>e.y!=u>e.y&&e.x<(l-i)*(e.y-s)/(u-s)+i&&(n=!n)}return n}function In(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),l=(r.x-n.x)**2+(r.y-n.y)**2;return s>=-1e-7&&s<=l+1e-7})}function V(e){return Array.isArray(e)?e.filter(t=>Array.isArray(t)&&t.length>=3):[]}function $(e,t,n){return we(e,t)&&!V(n).some(o=>we(e,o)||In(e,o))}function vn(e,t){return he(e,t).point}function oe(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 Ie(e){switch(e.type){case"row":{let t=ie(e),n=tt(e),o=0,r=0,i=0;for(let s=0;s<t.length;s++){let l=n.get(s);l?.skip||(o+=t[s].x+(l?.dx??0),r+=t[s].y+(l?.dy??0),i++)}return i?{x:o/i,y:r/i}:{x:e.origin.x,y:e.origin.y}}case"table":case"booth":return{x:e.center.x,y:e.center.y};case"gaArea":return oe(e.points);case"section":return oe(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?oe(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 Ze(e,t){return e.length===t.length&&e.every((n,o)=>n.x===t[o].x&&n.y===t[o].y)}function Cn(e,t){if(e.type!=="gaArea"||!Ze(e.points,t.outline))return!1;let n=V(e.holes),o=V(t.holes);return n.length===o.length&&n.every((r,i)=>Ze(r,o[i]))}function ct(e,t,n=e.filter(r=>r.type==="section"),o=Ie(t)){let r="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0;return(r?n.find(s=>(s.logicalSectionId??s.id)===r&&(Cn(t,s)||$(o,s.outline,s.holes))):void 0)??n.find(s=>$(o,s.outline,s.holes))}function te(e){return e.floors&&e.floors.length?e.floors:[{id:"floor-0",name:"Main",objects:e.objects,focalPoint:e.focalPoint,referenceImage:e.referenceImage,backgroundImage:e.backgroundImage}]}function kn(e,t){let n=te(e);return(t?n.find(o=>o.id===t):n[0])?.objects??[]}function at(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}function se(e,t,n){let o=i=>({x:i.x+t,y:i.y+n}),r=i=>i.map(o);switch(e.type){case"row":return{...e,origin:o(e.origin)};case"table":case"booth":return{...e,center:o(e.center)};case"gaArea":return{...e,points:r(e.points),...e.holes?{holes:V(e.holes).map(r)}:{}};case"section":return{...e,outline:r(e.outline),...e.outlinePath?{outlinePath:Le(e.outlinePath,t,n)}:{},...e.holes?{holes:V(e.holes).map(r)}:{}};case"text":return{...e,position:o(e.position)};case"shape":return{...e,...e.points?{points:r(e.points)}:{},...e.x!=null?{x:e.x+t}:{},...e.y!=null?{y:e.y+n}:{}};case"decorImage":return{...e,x:e.x+t,y:e.y+n}}}function En(e,t=900){if(!e.floors||e.floors.length<2)return e;let n=[];return e.floors.forEach((o,r)=>{let i=-r*t;for(let s of o.objects)n.push(i===0?s:se(s,0,i))}),{...e,objects:n,floors:void 0}}function Je(e,t,n,o,r,i,s,l,u){let c=[],a=e.filter(h=>h.type==="section"),f=me(e),m=h=>!h?.eventConfigurationId||h.eventConfigurationId===o&&(h.eventConfigurationVersion===void 0||h.eventConfigurationVersion===u),p=h=>Ge(h,{activeConfigurationId:o,activeConfigurationVersion:u,activeBasisSha256:r,now:l}),y=(h,x)=>p(h)?{...h,coverage:x}:void 0;for(let h of e){let x=[];if(h.type==="row"?x=ot(h):h.type==="table"?x=it(h):h.type==="booth"&&(x=st(h)),!x.length)continue;for(let w of x)w.viewUrl&&!m(w.viewMeta)&&(w.viewUrl=void 0,w.viewMeta=void 0);if(h.type==="row"){let w=f.get(h.id);if(w){let d=new Map((h.overrides??[]).map(b=>[b.index,b]));for(let b of x){let S=Number(b.id.slice(b.id.lastIndexOf(":")+1));if(!Number.isInteger(S))continue;b.logicalRowId=w.groupId,b.logicalSeatIndex=w.adjacencyOffset+S,d.get(S)?.displayLabel||(b.displayLabel=pe(h,S,w)),!b.viewUrl&&w.viewFromSeatUrl&&m(w.viewFromSeatMeta)&&(b.viewUrl=w.viewFromSeatUrl,b.viewMeta=w.viewFromSeatMeta);let g=d.get(S)?.confidenceEvidence;b.confidenceEvidence=y(g,"exact-seat")??y(h.confidenceEvidence,"row-representative")??y(w.confidenceEvidence,"row-representative")}}}let M=ct(e,h,a,h.type==="row"?oe(x):Ie(h)),P=M?.viewFromSeatUrl,v=(M?.zone?t?.find(w=>w.id===M.zone):void 0)?.focalPoint??n;for(let w of x){if(!w.confidenceEvidence){let d=Number(w.id.slice(w.id.lastIndexOf(":")+1)),b=(h.type==="row"||h.type==="table")&&Number.isInteger(d)?h.overrides?.find(S=>S.index===d)?.confidenceEvidence:void 0;w.confidenceEvidence=y(b,"exact-seat")??(h.type==="row"?y(h.confidenceEvidence,"row-representative"):void 0)}w.confidenceEvidence??=y(M?.confidenceEvidence,"section-representative")??(s?y(s.evidence,s.coverage):void 0),!w.viewUrl&&P&&m(M?.viewFromSeatMeta)&&(w.viewUrl=P,w.viewMeta=M?.viewFromSeatMeta),!w.viewUrl&&i&&m(i.meta)&&(w.viewUrl=i.url,w.viewMeta=i.meta),M&&(w.sectionId=M.logicalSectionId??M.id),M?.zone&&(w.zoneId=M.zone),v&&(w.focalPoint={...v})}c.push(...x)}return c}function On(e,t={}){if(e.floors?.length){let o=[];for(let r of e.floors){let i=r.focalPoint??e.focalPoint,s=r.viewFromSeatUrl?{url:r.viewFromSeatUrl,meta:r.viewFromSeatMeta}:e.viewFromSeatUrl?{url:e.viewFromSeatUrl,meta:e.viewFromSeatMeta}:void 0,l=r.confidenceEvidence?{evidence:r.confidenceEvidence,coverage:"floor-representative"}:e.confidenceEvidence?{evidence:e.confidenceEvidence,coverage:"venue-representative"}:void 0,u=Je(r.objects,e.zones,i,e.eventConfigurationId,e.confidenceBasisSha256,s,l,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);t.resolveEyeHeights!==!1&&et(r.objects,r.focalPoint??e.focalPoint,r.baseHeightM??0,u);for(let c of u)c.floorId=r.id;for(let c of u)o.push(c)}return o}let n=Je(e.objects,e.zones,e.focalPoint,e.eventConfigurationId,e.confidenceBasisSha256,e.viewFromSeatUrl?{url:e.viewFromSeatUrl,meta:e.viewFromSeatMeta}:void 0,e.confidenceEvidence?{evidence:e.confidenceEvidence,coverage:"venue-representative"}:void 0,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);return t.resolveEyeHeights!==!1&&et(e.objects,e.focalPoint,t.floorBaseHeightM??0,n),Rn(e,n,t)}function Rn(e,t,n){return!n.deriveRestrictedView||e.derivedRestrictedView===!1||n.resolveEyeHeights===!1||Qe(t,qe(t,We(e))),t}function et(e,t,n,o){let r=e.filter(f=>f.type==="section"),i=n>0||r.some(f=>f.height!==void 0||f.rake!==void 0||(f.elevation??0)>0);if(!r.length||!i||!t){for(let f of o)f.eyeHeightM=n+K;return}let s=new Array(o.length),l=new Map;for(let f of r)l.has(f.id)||l.set(f.id,f);let u=new Map,c=new Map;for(let f=0;f<o.length;f++){let m=o[f],y=(m.sectionId?l.get(m.sectionId)??r.find(x=>x.logicalSectionId===m.sectionId&&$({x:m.x,y:m.y},x.outline,x.holes)):void 0)??r.find(x=>$({x:m.x,y:m.y},x.outline,x.holes))??null;if(s[f]=y,!y)continue;u.has(y.id)||u.set(y.id,Be(y,{floorBaseHeightM:n}));let h=c.get(y.id);h?h.push(f):c.set(y.id,[f])}let a=new Array(o.length).fill(void 0);for(let[f,m]of c){let p=u.get(f);if(!p)continue;let y=p.rake>0?Math.tan(p.rake*Math.PI/180):0,h=Ye(f,o,m,t);for(let x of h.rows){let M=x.blockDepth*G*y,P=p.height+M;for(let C of x.seatIndices)a[C]=P}}for(let f=0;f<o.length;f++){let m=o[f],p=s[f];if(!p){m.eyeHeightM=n+K;continue}let y=u.get(p.id);m.eyeHeightM=(a[f]??y.height)+K}}var ne=40;function W(e,t){let n=t?.freeText==="exclude",o=1/0,r=1/0,i=-1/0,s=-1/0,l=(c,a)=>{c<o&&(o=c),a<r&&(r=a),c>i&&(i=c),a>s&&(s=a)},u=c=>{if(Array.isArray(c))for(let a of c)!a||typeof a!="object"||l(a.x,a.y)};for(let c of at(e))if(c.type==="row"){let a=new Map((c.overrides??[]).map(f=>[f.index,f]));ie(c).forEach((f,m)=>{let p=a.get(m);p?.skip||l(f.x+(p?.dx??0),f.y+(p?.dy??0))})}else if(c.type==="gaArea")u(c.points);else if(c.type==="section")u(c.outline);else if(c.type==="decorImage")l(c.x,c.y),l(c.x+c.width,c.y+c.height);else if(c.type==="shape")c.points&&c.points.length?u(c.points):c.x!=null&&c.y!=null&&c.width!=null&&c.height!=null&&(l(c.x,c.y),l(c.x+c.width,c.y+c.height));else if(c.type==="table"){let a=X+Sn,f=c.shape==="round"?(c.radius??40)+a:Math.max((c.width??80)/2,(c.height??50)/2)+a;l(c.center.x-f,c.center.y-f),l(c.center.x+f,c.center.y+f)}else if(c.type==="booth"){let a=Math.max(c.width,c.height)/2;l(c.center.x-a,c.center.y-a),l(c.center.x+a,c.center.y+a)}else if(c.type==="text"){if(n)continue;let a=ue(c);l(c.position.x,c.position.y),l(c.position.x+a.width,c.position.y+a.height)}for(let c of[e.referenceImage,e.backgroundImage]){if(!c)continue;let{center:a,width:f}=c;if(!a||!Number.isFinite(a.x)||!Number.isFinite(a.y)||!Number.isFinite(f))continue;let m=f*3/4;l(a.x-f/2,a.y-m/2),l(a.x+f/2,a.y+m/2)}if(!isFinite(o)){let c=e.focalPoint??{x:0,y:0};return{x:c.x-200,y:c.y-200,width:400,height:400}}return{x:o-ne,y:r-ne,width:i-o+ne*2,height:s-r+ne*2}}function lt(e){let t=e.backgroundImage;return t?.url&&!t.assetId?t:void 0}var ut=.08,An=.045;function ve(e){return`__floor__:${encodeURIComponent(e)}`}function ft(e,t,n){return{...e,objects:t,floors:void 0,...n?{focalPoint:n}:{},referenceImage:void 0,backgroundImage:void 0}}function Tn(e,t,n){let o=e.focalPoint??t.focalPoint;return o?o.x:n.x+n.width/2}function dt(e){let t=e.floors??[];if(!t.length)return[];let n=t.map(s=>W(ft(e,s.objects,s.focalPoint),{freeText:"exclude"})),r=Math.max(1,...n.map(s=>s.width))*ut,i=0;return t.map((s,l)=>{let u=n[l],c=i-(u.y+u.height);return i-=u.height+r,{floorId:s.id,label:s.name??s.id,level:l,levelBadge:l===0?"G":String(l),translation:{x:-Tn(s,e,u),y:c},bounds:u}})}function _n(e,t,n,o){let r=t==="name"?e.label:e.levelBadge;if(!r)return[];let i=Math.max(1,n*An),s=e.bounds.x+e.translation.x,l=e.bounds.y+e.translation.y+i*.4,u=`floor-level-${e.floorId}`,c={type:"text",id:`${u}-text`,text:r,position:{x:s,y:l},fontSize:i,rotation:0,color:o,bold:!0};if(t==="name")return[c];let a=i*.95;return[{type:"shape",id:`${u}-badge`,kind:"ellipse",x:s-a*.35,y:l-a*.3,width:a*2,height:a*2,fill:"transparent",stroke:{color:o,width:Math.max(1,i*.09)},opacity:.8},c]}function Dn(e,t={}){let n=e.floors;if(!n||n.length<2)return e;let o=dt(e),r=[];n.forEach((c,a)=>{let{x:f,y:m}=o[a].translation;for(let p of c.objects)a>0&&p.type==="shape"&&p.role==="stage"||r.push(se(p,f,m))});let i={...e,objects:r,floors:void 0},s=W(i,{freeText:"exclude"}),l=Math.max(1,s.width,s.height),u=e.theme?.textColor??"#94a3b8";for(let c of o)r.push(..._n(c,t.labelStyle??"number",l,u));return{...i,objects:r,referenceImage:void 0,backgroundImage:void 0}}function Ln(e){if(!e.floors||e.floors.length<2)return e;let t=!e.zones?.length,n=new Set,o=e.floors.flatMap(i=>i.objects.flatMap(s=>{if(s.type==="shape"&&s.role==="stage"){let l=JSON.stringify([s.kind,s.x,s.y,s.width,s.height,s.points,s.rotation??0,s.label,s.heightM,s.eventConfigurationIds]);if(n.has(l))return[];n.add(l)}return t&&s.type==="section"?[{...s,zone:ve(i.id)}]:[s]})),r=t?e.floors.map(i=>({id:ve(i.id),label:i.name,focalPoint:{...i.focalPoint}})):e.zones;return{...e,objects:o,zones:r,floors:void 0,referenceImage:void 0,backgroundImage:lt(e)}}function ht(e){let t=e.floors;if(!t?.length)return null;let n=t.find(i=>i.objects.some(s=>s.type==="shape"&&s.role==="stage"));if(n)return n.id;let o=t[0],r=-1;for(let i of t){let s=W(ft(e,i.objects,i.focalPoint),{freeText:"exclude"}),l=s.width*s.height;l>r&&(r=l,o=i)}return o.id}var mt=640;function Fn(e,t){return(e.floors?.length??0)<2?null:e.floorOverview==="combined"||!Number.isFinite(t)||t<=0||t>=mt?"all":ht(e)}function Nn(e,t=0){let n=Math.max(1,e.width,e.height),o={x:e.x+e.width/2,y:e.y+e.height/2},r=n*1.55,i=Math.max(n*.82,Math.max(0,t)+n*.45);return{target:o,distance:r,height:i,focalLength:Math.hypot(r,i),yawRad:-8*Math.PI/180}}function ce(e,t,n=0){let o=t.x-e.target.x,r=t.y-e.target.y,i=Math.cos(e.yawRad),s=Math.sin(e.yawRad),l=o*i-r*s,c=o*s+r*i-e.distance,a=n-e.height,f=Math.hypot(e.distance,e.height),m=(-e.distance*c-e.height*a)/f,p=(-e.height*c+e.distance*a)/f,y=Math.max(f*.08,m),h=e.focalLength/y;return{x:e.target.x+l*h,y:e.target.y-p*h,depth:y,scale:h}}function jn(e,t){return{x:e.a*t.x+e.c*t.y+e.e,y:e.b*t.x+e.d*t.y+e.f}}function Bn(e){let t=e.a*e.d-e.b*e.c;if(!Number.isFinite(t)||Math.abs(t)<1e-9)throw new Error("perspective projection produced a singular affine");let n=e.d/t,o=-e.b/t,r=-e.c/t,i=e.a/t;return{a:n,b:o,c:r,d:i,e:-(n*e.e+r*e.f),f:-(o*e.e+i*e.f)}}function Hn(e,t){return{a:e.a*t.a+e.c*t.b,b:e.b*t.a+e.d*t.b,c:e.a*t.c+e.c*t.d,d:e.b*t.c+e.d*t.d,e:e.a*t.e+e.c*t.f+e.e,f:e.b*t.e+e.d*t.f+e.f}}function Xn(e,t,n=()=>0){let o=ce(e,t,n(t)),r={x:t.x+1,y:t.y},i={x:t.x,y:t.y+1},s=ce(e,r,n(r)),l=ce(e,i,n(i)),u=s.x-o.x,c=s.y-o.y,a=l.x-o.x,f=l.y-o.y;return{a:u,b:c,c:a,d:f,e:o.x-u*t.x-a*t.y,f:o.y-c*t.x-f*t.y}}function Un(e){let t=Math.hypot(e.a,e.b),n=e.a*e.d-e.b*e.c;return{rotationDeg:Math.atan2(e.b,e.a)*180/Math.PI,scaleX:t,scaleY:n/Math.max(t,1e-9),skewX:(e.a*e.c+e.b*e.d)/Math.max(n,1e-9)}}var bt=9;function Yn(e){if(e.kind==="circle")return{hx:e.r,hy:e.r};let t=e.width/2,n=e.height/2,o=e.rotation??0;if(!o)return{hx:t,hy:n};let r=o*Math.PI/180,i=Math.abs(Math.cos(r)),s=Math.abs(Math.sin(r));return{hx:t*i+n*s,hy:t*s+n*i}}function Gn(e,t,n){let o=t-e.seat.x,r=n-e.seat.y;if(e.shape.kind==="circle")return o*o+r*r<=e.shape.r*e.shape.r;let i=e.shape.rotation??0,s=o,l=r;if(i){let u=-i*Math.PI/180,c=Math.cos(u),a=Math.sin(u);s=o*c-r*a,l=o*a+r*c}return Math.abs(s)<=e.shape.width/2&&Math.abs(l)<=e.shape.height/2}function Kn(e,t,n,o,r){if(e.shape.kind==="circle"){let y=Math.min(Math.max(e.seat.x,t),o),h=Math.min(Math.max(e.seat.y,n),r),x=e.seat.x-y,M=e.seat.y-h;return x*x+M*M<=e.shape.r*e.shape.r}let i=e.shape.rotation??0;if(!i)return e.seat.x-e.hx<=o&&e.seat.x+e.hx>=t&&e.seat.y-e.hy<=r&&e.seat.y+e.hy>=n;let s=i*Math.PI/180,l=Math.cos(s),u=Math.sin(s),c=e.shape.width/2,a=e.shape.height/2,f=[[-c,-a],[c,-a],[c,a],[-c,a]].map(([y,h])=>[e.seat.x+y*l-h*u,e.seat.y+y*u+h*l]),m=[[t,n],[o,n],[o,r],[t,r]],p=[[1,0],[0,1],[l,u],[-u,l]];for(let[y,h]of p){let x=1/0,M=-1/0;for(let[v,w]of f){let d=v*y+w*h;d<x&&(x=d),d>M&&(M=d)}let P=1/0,C=-1/0;for(let[v,w]of m){let d=v*y+w*h;d<P&&(P=d),d>C&&(C=d)}if(M<P||C<x)return!1}return!0}function Vn(e,t={}){let n=t.seatRadius??bt,o=e.length,r=new Array(o),i=1/0,s=1/0,l=-1/0,u=-1/0,c=0;for(let d=0;d<o;d++){let b=e[d],S=t.shapeOf?.(b)??{kind:"circle",r:n},{hx:g,hy:I}=Yn(S);r[d]={seat:b,shape:S,hx:g,hy:I},b.x-g<i&&(i=b.x-g),b.y-I<s&&(s=b.y-I),b.x+g>l&&(l=b.x+g),b.y+I>u&&(u=b.y+I),g>c&&(c=g),I>c&&(c=I)}o===0&&(i=0,s=0,l=0,u=0);let a=c>0?c*4:1,f=Math.max(l-i,0),m=Math.max(u-s,0),p=Math.max(64,t.maxCells??o*4),y=a,h=Math.max(1,Math.ceil(f/y)||1),x=Math.max(1,Math.ceil(m/y)||1);for(;h*x>p&&(h>1||x>1);)y*=2,h=Math.max(1,Math.ceil(f/y)||1),x=Math.max(1,Math.ceil(m/y)||1);let M=h*x,P=new Int32Array(M+1),C=0;for(let d=0;d<o;d++){let b=r[d],S=L(Math.floor((b.seat.x-b.hx-i)/y),0,h-1),g=L(Math.floor((b.seat.x+b.hx-i)/y),0,h-1),I=L(Math.floor((b.seat.y-b.hy-s)/y),0,x-1),A=L(Math.floor((b.seat.y+b.hy-s)/y),0,x-1);for(let k=I;k<=A;k++)for(let E=S;E<=g;E++)P[k*h+E+1]++,C++}for(let d=0;d<M;d++)P[d+1]+=P[d];let v=new Int32Array(C),w=P.slice(0,M);for(let d=0;d<o;d++){let b=r[d],S=L(Math.floor((b.seat.x-b.hx-i)/y),0,h-1),g=L(Math.floor((b.seat.x+b.hx-i)/y),0,h-1),I=L(Math.floor((b.seat.y-b.hy-s)/y),0,x-1),A=L(Math.floor((b.seat.y+b.hy-s)/y),0,x-1);for(let k=I;k<=A;k++)for(let E=S;E<=g;E++){let O=k*h+E;v[w[O]++]=d}}return{seats:e,entries:r,minX:i,minY:s,cell:y,cols:h,rows:x,cellStart:P,items:v,stamp:new Int32Array(o),epoch:0}}function zn(e,t,n={}){let{cols:o,rows:r,cell:i,minX:s,minY:l,cellStart:u,items:c,entries:a}=e,f=Math.floor((t.x-s)/i),m=Math.floor((t.y-l)/i);if(f<0||m<0||f>=o||m>=r)return null;let p=m*o+f,y=u[p+1],h=-1,x=1/0;for(let M=u[p];M<y;M++){let P=c[M],C=a[P];if(n.filter&&!n.filter(C.seat.id,C.seat)||!Gn(C,t.x,t.y))continue;let v=t.x-C.seat.x,w=t.y-C.seat.y,d=v*v+w*w;(d<x||d===x&&P<h)&&(x=d,h=P)}return h<0?null:a[h].seat.id}function $n(e,t,n,o={}){if(!(n>0))return null;let{cols:r,rows:i,cell:s,minX:l,minY:u,cellStart:c,items:a,entries:f}=e,m=Math.max(0,Math.floor((t.x-n-l)/s)),p=Math.min(r-1,Math.floor((t.x+n-l)/s)),y=Math.max(0,Math.floor((t.y-n-u)/s)),h=Math.min(i-1,Math.floor((t.y+n-u)/s));if(m>p||y>h)return null;let x=-1,M=n*n,P=e.stamp,C=++e.epoch;for(let v=y;v<=h;v++){let w=v*r;for(let d=m;d<=p;d++){let b=w+d,S=c[b+1];for(let g=c[b];g<S;g++){let I=a[g];if(P[I]===C)continue;P[I]=C;let A=f[I];if(o.filter&&!o.filter(A.seat.id,A.seat))continue;let k=t.x-A.seat.x,E=t.y-A.seat.y,O=k*k+E*E;(O<M||O===M&&I<x)&&(M=O,x=I)}}}return x<0?null:f[x].seat.id}function Wn(e,t,n={}){let o=Math.min(t.x,t.x+t.width),r=Math.max(t.x,t.x+t.width),i=Math.min(t.y,t.y+t.height),s=Math.max(t.y,t.y+t.height),l=n.mode??"center",{cols:u,rows:c,cell:a,minX:f,minY:m,cellStart:p,items:y,entries:h}=e,x=Math.max(0,Math.floor((o-f)/a)),M=Math.min(u-1,Math.floor((r-f)/a)),P=Math.max(0,Math.floor((i-m)/a)),C=Math.min(c-1,Math.floor((s-m)/a));if(x>M||P>C)return[];let v=[],w=e.stamp,d=++e.epoch;for(let b=P;b<=C;b++){let S=b*u;for(let g=x;g<=M;g++){let I=S+g,A=p[I+1];for(let k=p[I];k<A;k++){let E=y[k];if(w[E]===d)continue;w[E]=d;let O=h[E];if(n.filter&&!n.filter(O.seat.id,O.seat))continue;(l==="center"?O.seat.x>=o&&O.seat.x<=r&&O.seat.y>=i&&O.seat.y<=s:Kn(O,o,i,r,s))&&v.push(E)}}}return v.sort((b,S)=>b-S),v.map(b=>h[b].seat.id)}function qn(e){let t=e.cols*e.rows,n=0,o=0;for(let i=0;i<t;i++){let s=e.cellStart[i+1]-e.cellStart[i];s>0&&n++,s>o&&(o=s)}let r=e.items.length;return{cell:e.cell,cols:e.cols,rows:e.rows,cells:t,occupiedCells:n,refs:r,maxPerCell:o,meanPerOccupiedCell:n?r/n:0}}0&&(module.exports={AUTOMATIC_ROUND_TABLE_RADIUS_MAX,AUTOMATIC_ROUND_TABLE_RADIUS_MIN,DEFAULT_SEAT_RADIUS,FLOOR_STACK_GAP_RATIO,FLOOR_STACK_MIN_SURFACE_PX,TABLE_SEAT_OFFSET,TEXT_BACKGROUND_PADDING_MAX,TEXT_BACKGROUND_RADIUS_MAX,TEXT_LETTER_SPACING_MAX,TEXT_LETTER_SPACING_MIN,TEXT_LINE_HEIGHT_MAX,TEXT_LINE_HEIGHT_MIN,TEXT_OPACITY_MIN,TEXT_WIDTH_MAX,TEXT_WIDTH_MIN,allObjects,applyAffine,automaticRoundTableRadius,buildAisleHoles,buildSeatIndex,buildSectionShell,chartBounds,combinedFloorZoneId,composeAffine,createPerspectiveCamera,cubicPoint,decomposeAffineLinear,distanceToRings,distributeAlongCubic,expandBooth,expandChart,expandRow,expandRowSlots,expandTable,expandTableSlots,floorObjects,floorStackPlacements,floorsOf,gridStats,hitTest,initialFloorMode,invertAffine,layoutCombinedFloorPlan,layoutFloorStack,mainFloorId,nearestWithin,objectCenter,owningSectionForObject,perspectiveTangentAffine,pointInPolygon,pointInPolygonWithHoles,polygonArea,polygonInscribedAnchor,polygonLabelPoint,polygonNetArea,projectPerspectivePoint,queryRect,resolveSegmentedRowGroups,rowInventoryCount,rowSeatPositions,segmentedRowComponentSeats,segmentedRowComponents,segmentedRowSeatTotal,smoothCubicThroughMiddle,stackFloors,tableInventoryCount,tableSeatCountsBySide,textLayoutMetrics,translateObject,usableHoles});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { P as Point, t as CubicPath, u as TextObject } from '../../types-BbqhOJ5L.cjs';
|
|
2
2
|
export { F as FloorLabelStyle } from '../../types-BbqhOJ5L.cjs';
|
|
3
|
-
export { A as AUTOMATIC_ROUND_TABLE_RADIUS_MAX, a as AUTOMATIC_ROUND_TABLE_RADIUS_MIN, C as ChartBoundsOptions, E as ExpandChartOptions, F as FLOOR_STACK_GAP_RATIO, b as FLOOR_STACK_MIN_SURFACE_PX, c as FloorStackOptions, d as FloorStackPlacement, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, e as TableSeatSlot, f as allObjects, g as automaticRoundTableRadius, h as chartBounds, i as combinedFloorZoneId, j as expandBooth, k as expandChart, l as expandRow, m as expandRowSlots, n as expandTable, o as expandTableSlots, p as floorObjects, q as floorStackPlacements, r as floorsOf, s as initialFloorMode, t as layoutCombinedFloorPlan, u as layoutFloorStack, v as mainFloorId, w as objectCenter, x as owningSectionForObject, y as pointInPolygon, z as pointInPolygonWithHoles, B as polygonLabelPoint, D as rowInventoryCount, G as rowSeatPositions, H as stackFloors, I as tableInventoryCount, J as tableSeatCountsBySide, K as translateObject } from '../../tableSizing-
|
|
3
|
+
export { A as AUTOMATIC_ROUND_TABLE_RADIUS_MAX, a as AUTOMATIC_ROUND_TABLE_RADIUS_MIN, C as ChartBoundsOptions, E as ExpandChartOptions, F as FLOOR_STACK_GAP_RATIO, b as FLOOR_STACK_MIN_SURFACE_PX, c as FloorStackOptions, d as FloorStackPlacement, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, e as TableSeatSlot, f as allObjects, g as automaticRoundTableRadius, h as chartBounds, i as combinedFloorZoneId, j as expandBooth, k as expandChart, l as expandRow, m as expandRowSlots, n as expandTable, o as expandTableSlots, p as floorObjects, q as floorStackPlacements, r as floorsOf, s as initialFloorMode, t as layoutCombinedFloorPlan, u as layoutFloorStack, v as mainFloorId, w as objectCenter, x as owningSectionForObject, y as pointInPolygon, z as pointInPolygonWithHoles, B as polygonLabelPoint, D as rowInventoryCount, G as rowSeatPositions, H as stackFloors, I as tableInventoryCount, J as tableSeatCountsBySide, K as translateObject, L as usableHoles } from '../../tableSizing-DKo6Zlt_.cjs';
|
|
4
4
|
export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-BbHdWqJy.cjs';
|
|
5
|
-
import { E as ExpandedSeat } from '../../renderer-
|
|
5
|
+
import { E as ExpandedSeat } from '../../renderer-fetXkaDe.cjs';
|
|
6
6
|
|
|
7
7
|
type SectionShellMode = 'auto' | 'rectangle' | 'tapered' | 'bezier';
|
|
8
8
|
declare function cubicPoint(path: CubicPath, t: number): Point;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { P as Point, t as CubicPath, u as TextObject } from '../../types-BbqhOJ5L.js';
|
|
2
2
|
export { F as FloorLabelStyle } from '../../types-BbqhOJ5L.js';
|
|
3
|
-
export { A as AUTOMATIC_ROUND_TABLE_RADIUS_MAX, a as AUTOMATIC_ROUND_TABLE_RADIUS_MIN, C as ChartBoundsOptions, E as ExpandChartOptions, F as FLOOR_STACK_GAP_RATIO, b as FLOOR_STACK_MIN_SURFACE_PX, c as FloorStackOptions, d as FloorStackPlacement, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, e as TableSeatSlot, f as allObjects, g as automaticRoundTableRadius, h as chartBounds, i as combinedFloorZoneId, j as expandBooth, k as expandChart, l as expandRow, m as expandRowSlots, n as expandTable, o as expandTableSlots, p as floorObjects, q as floorStackPlacements, r as floorsOf, s as initialFloorMode, t as layoutCombinedFloorPlan, u as layoutFloorStack, v as mainFloorId, w as objectCenter, x as owningSectionForObject, y as pointInPolygon, z as pointInPolygonWithHoles, B as polygonLabelPoint, D as rowInventoryCount, G as rowSeatPositions, H as stackFloors, I as tableInventoryCount, J as tableSeatCountsBySide, K as translateObject } from '../../tableSizing-
|
|
3
|
+
export { A as AUTOMATIC_ROUND_TABLE_RADIUS_MAX, a as AUTOMATIC_ROUND_TABLE_RADIUS_MIN, C as ChartBoundsOptions, E as ExpandChartOptions, F as FLOOR_STACK_GAP_RATIO, b as FLOOR_STACK_MIN_SURFACE_PX, c as FloorStackOptions, d as FloorStackPlacement, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, e as TableSeatSlot, f as allObjects, g as automaticRoundTableRadius, h as chartBounds, i as combinedFloorZoneId, j as expandBooth, k as expandChart, l as expandRow, m as expandRowSlots, n as expandTable, o as expandTableSlots, p as floorObjects, q as floorStackPlacements, r as floorsOf, s as initialFloorMode, t as layoutCombinedFloorPlan, u as layoutFloorStack, v as mainFloorId, w as objectCenter, x as owningSectionForObject, y as pointInPolygon, z as pointInPolygonWithHoles, B as polygonLabelPoint, D as rowInventoryCount, G as rowSeatPositions, H as stackFloors, I as tableInventoryCount, J as tableSeatCountsBySide, K as translateObject, L as usableHoles } from '../../tableSizing-CPYpm4iH.js';
|
|
4
4
|
export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-oVUtwW87.js';
|
|
5
|
-
import { E as ExpandedSeat } from '../../renderer-
|
|
5
|
+
import { E as ExpandedSeat } from '../../renderer-DbnKKo5K.js';
|
|
6
6
|
|
|
7
7
|
type SectionShellMode = 'auto' | 'rectangle' | 'tapered' | 'bezier';
|
|
8
8
|
declare function cubicPoint(path: CubicPath, t: number): Point;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as U,b as V,c as W,d as X,e as Y,f as Z,g as _,h as $,i as fo,j as mo,k as po,l as to,m as xo,n as ao,o as bo,p as co,q as go,r as ho,s as io,t as jo,u as ko}from"../../chunk-A3ZL3R75.js";import{a as oo,b as ro,c as eo}from"../../chunk-TKYTTEJ2.js";import"../../chunk-5BMXWOE7.js";import{$ as u,Aa as A,Ba as B,Ca as C,D as c,Da as D,E as d,Ea as E,F as g,Fa as F,G as h,Ga as G,H as i,Ha as H,I as j,Ia as I,J as k,Ja as J,K as l,Ka as K,L as n,La as L,Ma as M,Na as N,Oa as O,Pa as P,Qa as Q,Ra as R,Sa as S,Ta as T,Z as q,_ as s,aa as v,q as o,r,s as e,t as f,u as m,v as p,w as t,x,xa as w,y as a,ya as y,z as b,za as z}from"../../chunk-F7TP67LK.js";import"../../chunk-5ITK5236.js";import"../../chunk-CRCGO52K.js";export{ro as AUTOMATIC_ROUND_TABLE_RADIUS_MAX,oo as AUTOMATIC_ROUND_TABLE_RADIUS_MIN,fo as DEFAULT_SEAT_RADIUS,U as FLOOR_STACK_GAP_RATIO,_ as FLOOR_STACK_MIN_SURFACE_PX,w as TABLE_SEAT_OFFSET,x as TEXT_BACKGROUND_PADDING_MAX,a as TEXT_BACKGROUND_RADIUS_MAX,p as TEXT_LETTER_SPACING_MAX,m as TEXT_LETTER_SPACING_MIN,f as TEXT_LINE_HEIGHT_MAX,e as TEXT_LINE_HEIGHT_MIN,t as TEXT_OPACITY_MIN,r as TEXT_WIDTH_MAX,o as TEXT_WIDTH_MIN,P as allObjects,go as applyAffine,eo as automaticRoundTableRadius,i as buildAisleHoles,mo as buildSeatIndex,h as buildSectionShell,T as chartBounds,V as combinedFloorZoneId,io as composeAffine,bo as createPerspectiveCamera,c as cubicPoint,ko as decomposeAffineLinear,j as distanceToRings,g as distributeAlongCubic,G as expandBooth,S as expandChart,B as expandRow,A as expandRowSlots,F as expandTable,D as expandTableSlots,O as floorObjects,W as floorStackPlacements,N as floorsOf,ao as gridStats,po as hitTest,$ as initialFloorMode,ho as invertAffine,Y as layoutCombinedFloorPlan,X as layoutFloorStack,Z as mainFloorId,to as nearestWithin,L as objectCenter,M as owningSectionForObject,jo as perspectiveTangentAffine,H as pointInPolygon,J as pointInPolygonWithHoles,k as polygonArea,n as polygonInscribedAnchor,K as polygonLabelPoint,l as polygonNetArea,co as projectPerspectivePoint,xo as queryRect,v as resolveSegmentedRowGroups,z as rowInventoryCount,y as rowSeatPositions,s as segmentedRowComponentSeats,q as segmentedRowComponents,u as segmentedRowSeatTotal,d as smoothCubicThroughMiddle,R as stackFloors,E as tableInventoryCount,C as tableSeatCountsBySide,b as textLayoutMetrics,Q as translateObject,I as usableHoles};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as AccessibilityType } from '../../types-BbqhOJ5L.cjs';
|
|
2
2
|
import { contrastRatioOrNull } from '../color.cjs';
|
|
3
|
-
export { M as MIN_POINTER_TARGET_PX, R as RENDERED_QUALITY_REPORT_VERSION, a as RenderedEvidenceState, b as RenderedQualityFinding, c as RenderedQualityFindingCode, d as RenderedQualityReport, e as RenderedQualitySample, i as inspectRenderedQualityEvidence } from '../../renderedQuality-
|
|
4
|
-
import '../../renderer-
|
|
3
|
+
export { M as MIN_POINTER_TARGET_PX, R as RENDERED_QUALITY_REPORT_VERSION, a as RenderedEvidenceState, b as RenderedQualityFinding, c as RenderedQualityFindingCode, d as RenderedQualityReport, e as RenderedQualitySample, i as inspectRenderedQualityEvidence } from '../../renderedQuality-CXlWvz_l.cjs';
|
|
4
|
+
import '../../renderer-fetXkaDe.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Rendering constants that quality inspection must agree with.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as AccessibilityType } from '../../types-BbqhOJ5L.js';
|
|
2
2
|
import { contrastRatioOrNull } from '../color.js';
|
|
3
|
-
export { M as MIN_POINTER_TARGET_PX, R as RENDERED_QUALITY_REPORT_VERSION, a as RenderedEvidenceState, b as RenderedQualityFinding, c as RenderedQualityFindingCode, d as RenderedQualityReport, e as RenderedQualitySample, i as inspectRenderedQualityEvidence } from '../../renderedQuality-
|
|
4
|
-
import '../../renderer-
|
|
3
|
+
export { M as MIN_POINTER_TARGET_PX, R as RENDERED_QUALITY_REPORT_VERSION, a as RenderedEvidenceState, b as RenderedQualityFinding, c as RenderedQualityFindingCode, d as RenderedQualityReport, e as RenderedQualitySample, i as inspectRenderedQualityEvidence } from '../../renderedQuality-BrCnk3-x.js';
|
|
4
|
+
import '../../renderer-DbnKKo5K.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Rendering constants that quality inspection must agree with.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as J,b as K,c as L}from"../../chunk-
|
|
1
|
+
import{a as J,b as K,c as L}from"../../chunk-Q3MSDG4S.js";import{A,B,C,D,E,F,G,H,I,a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,k as c,l as d,m as g,n as h,o as i,p as j,q as k,r as l,s as n,t as q,u as s,v as u,w as v,x as w,y,z}from"../../chunk-LAX7F5ML.js";import"../../chunk-F2EXXZSZ.js";import"../../chunk-JBOTRSMY.js";export{n as ACCESS_GLYPH_PATH,k as ACCESS_GLYPH_VIEWBOX,l as ACCESS_TYPE_GLYPH_PATHS,y as AUTHORED_LABEL_MIN_CONTRAST,f as BLOCK_LABEL_FILL_RATIO,e as BOOTH_LABEL_FONT_SIZE,g as DARK_BOOKABLE_LABEL_INK,G as DARK_NEUTRAL_SECTION_FILL,t as GA_CAPACITY_LABEL_FONT_SIZE,x as GA_FILL_OPACITY,p as GA_LABEL_FONT_SIZE,d as LARGE_TEXT_CONTRAST,h as LIGHT_BOOKABLE_LABEL_INK,F as LIGHT_NEUTRAL_SECTION_FILL,K as MIN_POINTER_TARGET_PX,a as MIN_VISIBLE_BOOKABLE_LABEL_PX,J as RENDERED_QUALITY_REPORT_VERSION,r as ROW_LABEL_FONT_SIZE,o as SEAT_LABEL_FONT_SIZE,c as SECTION_NAME_CONTRAST,b as SMALL_TEXT_CONTRAST,D as accessGlyphInk,q as accessGlyphPath,s as accessibilityRingInk,m as blockLabelFontSize,u as bookableMarkerLabel,z as categoryBandInk,w as compositeHexOver,C as explicitOrStateAwareLabelInk,L as inspectRenderedQualityEvidence,j as isBookableLabelLegibleAtScale,E as isLightFill,A as mapSeparatingInk,i as minimumTextContrast,H as neutralSectionFill,v as renderedTextContrast,B as stateAwareBookableLabelInk,I as summarizeLabelInkContrast};
|