@seatlayer/core 0.86.12 → 0.87.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.
Files changed (75) hide show
  1. package/dist/{categoryInventory-D57yq6dR.d.cts → categoryInventory-C5TShXDW.d.cts} +1 -1
  2. package/dist/{categoryInventory-DTYZCenv.d.ts → categoryInventory-CvhYDK4q.d.ts} +1 -1
  3. package/dist/chunk-5ITK5236.js +1 -0
  4. package/dist/{chunk-Q3U3F4YJ.js → chunk-AHPF5SD6.js} +1 -1
  5. package/dist/chunk-CFRNWESM.js +1 -0
  6. package/dist/chunk-E7TOTX6I.js +1 -0
  7. package/dist/{chunk-PRED5KHO.js → chunk-FVTW2IBN.js} +1 -1
  8. package/dist/chunk-OLTZIZEM.js +1 -0
  9. package/dist/chunk-PI3UH2EN.js +1 -0
  10. package/dist/chunk-PMBS3VZM.js +1 -0
  11. package/dist/{chunk-OTN5IFWY.js → chunk-QTBBVSN6.js} +1 -1
  12. package/dist/{chunk-BS37TGPX.js → chunk-R7TV7RYQ.js} +1 -1
  13. package/dist/{chunk-BT2KJXQC.js → chunk-WAGKI44J.js} +1 -1
  14. package/dist/core/chart-ops/index.cjs +1 -1
  15. package/dist/core/chart-ops/index.d.cts +66 -5
  16. package/dist/core/chart-ops/index.d.ts +66 -5
  17. package/dist/core/chart-ops/index.js +1 -1
  18. package/dist/core/inventory/index.cjs +1 -1
  19. package/dist/core/inventory/index.d.cts +8 -4
  20. package/dist/core/inventory/index.d.ts +8 -4
  21. package/dist/core/inventory/index.js +1 -1
  22. package/dist/core/layout/index.cjs +1 -1
  23. package/dist/core/layout/index.d.cts +5 -5
  24. package/dist/core/layout/index.d.ts +5 -5
  25. package/dist/core/layout/index.js +1 -1
  26. package/dist/core/quality/index.d.cts +3 -3
  27. package/dist/core/quality/index.d.ts +3 -3
  28. package/dist/core/render-assets/index.cjs +1 -1
  29. package/dist/core/render-assets/index.d.cts +2 -2
  30. package/dist/core/render-assets/index.d.ts +2 -2
  31. package/dist/core/render-assets/index.js +1 -1
  32. package/dist/core/seatConfidence.d.cts +1 -1
  33. package/dist/core/seatConfidence.d.ts +1 -1
  34. package/dist/core/sections/index.cjs +1 -1
  35. package/dist/core/sections/index.d.cts +11 -9
  36. package/dist/core/sections/index.d.ts +11 -9
  37. package/dist/core/sections/index.js +1 -1
  38. package/dist/{eventConfigurations-Dw3rQPPx.d.cts → eventConfigurations-D0G8mxbb.d.cts} +1 -1
  39. package/dist/{eventConfigurations-wgXC-YJV.d.ts → eventConfigurations-Dvb8u8bV.d.ts} +1 -1
  40. package/dist/index.cjs +1 -1
  41. package/dist/index.d.cts +21 -13
  42. package/dist/index.d.ts +21 -13
  43. package/dist/index.js +1 -1
  44. package/dist/{labeling-CYPm5UH0.d.ts → labeling-BEamEVl5.d.ts} +1 -1
  45. package/dist/{labeling-dukb8qMr.d.cts → labeling-YVvDyso3.d.cts} +1 -1
  46. package/dist/{renderedQuality-BuZsXn3h.d.ts → renderedQuality-BqrSXn-t.d.ts} +1 -1
  47. package/dist/{renderedQuality-DuYUhFbT.d.cts → renderedQuality-DkDTyl9y.d.cts} +1 -1
  48. package/dist/{renderer-BnidPieD.d.cts → renderer-C7veuoCF.d.cts} +1 -1
  49. package/dist/{renderer-B2uo9TlL.d.ts → renderer-CUKvpguA.d.ts} +1 -1
  50. package/dist/{seatTypeIcons-R6pp6eSj.d.cts → seatTypeIcons-DHf2-kPo.d.cts} +1 -1
  51. package/dist/{seatTypeIcons-2Jiehd_M.d.ts → seatTypeIcons-DxxPw5Mn.d.ts} +1 -1
  52. package/dist/{sections-BiCA47--.d.ts → sections-B8JXltQM.d.ts} +1 -1
  53. package/dist/{sections-yW4KBAKQ.d.cts → sections-COvZ-5ua.d.cts} +1 -1
  54. package/dist/{segmentedRowModel-DgZ-j0cp.d.cts → segmentedRowModel-DkGr4Jb7.d.cts} +1 -1
  55. package/dist/{segmentedRowModel-ChRMKKxC.d.ts → segmentedRowModel-Dm3nuc6_.d.ts} +1 -1
  56. package/dist/{tableSizing-Sr9fm8g5.d.ts → tableSizing-CEqWVQ4f.d.ts} +3 -3
  57. package/dist/{tableSizing-Ca0vDrxf.d.cts → tableSizing-DVTmR9Wg.d.cts} +3 -3
  58. package/dist/{ticketRestrictions-Dsv2W_4o.d.cts → ticketRestrictions-DbpUYleE.d.cts} +2 -2
  59. package/dist/{ticketRestrictions-C8ylaoRm.d.ts → ticketRestrictions-JhGzamZ8.d.ts} +2 -2
  60. package/dist/{types-bJU5OwWf.d.cts → types-pwg1Vsz-.d.cts} +47 -5
  61. package/dist/{types-bJU5OwWf.d.ts → types-pwg1Vsz-.d.ts} +47 -5
  62. package/dist/view3d/crossfade/panorama.d.cts +1 -1
  63. package/dist/view3d/crossfade/panorama.d.ts +1 -1
  64. package/dist/view3d/index.cjs +8 -8
  65. package/dist/view3d/index.d.cts +3 -3
  66. package/dist/view3d/index.d.ts +3 -3
  67. package/dist/view3d/index.js +1 -1
  68. package/dist/view3d/scene/scene.worker.cjs +1 -1
  69. package/dist/view3d/scene/scene.worker.js +1 -1
  70. package/package.json +1 -1
  71. package/dist/chunk-24O23MNB.js +0 -1
  72. package/dist/chunk-4ABXX5PL.js +0 -1
  73. package/dist/chunk-7LMW7QTP.js +0 -1
  74. package/dist/chunk-NJTU4QK7.js +0 -1
  75. package/dist/chunk-PNHFP2OH.js +0 -1
@@ -1,7 +1,7 @@
1
- import { P as Point, A as AccessibilityType, C as ChartDoc, R as RowObject } from '../../types-bJU5OwWf.cjs';
2
- import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-BnidPieD.cjs';
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-D57yq6dR.cjs';
4
- export { C as ClientInventoryModelVersion, a as CompanionSelectionIssue, G as GroupedTableBookingMode, b as GroupedTableInventoryUnit, c as GroupedTableProjectionError, M as MAX_EVENT_INVENTORY, d as MAX_GA_CAPACITY, N as NotForSaleSelectionIssue, R as RestrictionChartDoc, e as RestrictionSeat, T as TicketOptionApplicabilityIssue, f as TicketSelection, g as TicketSelectionIssue, h as TicketSelectionOptions, i as TicketTierResolution, j as applicableTicketTiers, k as companionSelectionIssue, l as gaAreasOf, m as gaInventorySegments, n as gaUnitLabel, o as gaUnitLabels, p as groupedTableInventory, q as growJoinedGAInventory, r as isFullChartDoc, s as isGaUnitLabel, t as resolveTicketTierForSeat, u as ticketOptionNotApplicableIssue, v as ticketSelectionIssue, w as ticketTierAppliesToSeat, x as validGAInventorySegments } from '../../ticketRestrictions-Dsv2W_4o.cjs';
1
+ import { P as Point, A as AccessibilityType, C as ChartDoc, R as RowObject } from '../../types-pwg1Vsz-.cjs';
2
+ import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-C7veuoCF.cjs';
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-C5TShXDW.cjs';
4
+ export { C as ClientInventoryModelVersion, a as CompanionSelectionIssue, G as GroupedTableBookingMode, b as GroupedTableInventoryUnit, c as GroupedTableProjectionError, M as MAX_EVENT_INVENTORY, d as MAX_GA_CAPACITY, N as NotForSaleSelectionIssue, R as RestrictionChartDoc, e as RestrictionSeat, T as TicketOptionApplicabilityIssue, f as TicketSelection, g as TicketSelectionIssue, h as TicketSelectionOptions, i as TicketTierResolution, j as applicableTicketTiers, k as companionSelectionIssue, l as gaAreasOf, m as gaInventorySegments, n as gaUnitLabel, o as gaUnitLabels, p as groupedTableInventory, q as growJoinedGAInventory, r as isFullChartDoc, s as isGaUnitLabel, t as resolveTicketTierForSeat, u as ticketOptionNotApplicableIssue, v as ticketSelectionIssue, w as ticketTierAppliesToSeat, x as validGAInventorySegments } from '../../ticketRestrictions-DbpUYleE.cjs';
5
5
 
6
6
  /**
7
7
  * Best-available seat selection — a PURE, fully unit-testable ranking function.
@@ -55,6 +55,10 @@ interface BestAvailableOpts {
55
55
  * byte-identical to the baseline algorithm — the premium term never runs.
56
56
  */
57
57
  preferPremium?: boolean;
58
+ /** Recovery-only bias: rank distance before the ordinary orphan-seat rule. */
59
+ preferNearest?: boolean;
60
+ /** Logical rows containing the original seats in a recovery request. */
61
+ preferredRowIds?: readonly string[];
58
62
  }
59
63
  /**
60
64
  * Pick the `qty` best available seats. Returns `{ labels }` on success, or
@@ -1,7 +1,7 @@
1
- import { P as Point, A as AccessibilityType, C as ChartDoc, R as RowObject } from '../../types-bJU5OwWf.js';
2
- import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-B2uo9TlL.js';
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-DTYZCenv.js';
4
- export { C as ClientInventoryModelVersion, a as CompanionSelectionIssue, G as GroupedTableBookingMode, b as GroupedTableInventoryUnit, c as GroupedTableProjectionError, M as MAX_EVENT_INVENTORY, d as MAX_GA_CAPACITY, N as NotForSaleSelectionIssue, R as RestrictionChartDoc, e as RestrictionSeat, T as TicketOptionApplicabilityIssue, f as TicketSelection, g as TicketSelectionIssue, h as TicketSelectionOptions, i as TicketTierResolution, j as applicableTicketTiers, k as companionSelectionIssue, l as gaAreasOf, m as gaInventorySegments, n as gaUnitLabel, o as gaUnitLabels, p as groupedTableInventory, q as growJoinedGAInventory, r as isFullChartDoc, s as isGaUnitLabel, t as resolveTicketTierForSeat, u as ticketOptionNotApplicableIssue, v as ticketSelectionIssue, w as ticketTierAppliesToSeat, x as validGAInventorySegments } from '../../ticketRestrictions-C8ylaoRm.js';
1
+ import { P as Point, A as AccessibilityType, C as ChartDoc, R as RowObject } from '../../types-pwg1Vsz-.js';
2
+ import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-CUKvpguA.js';
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-CvhYDK4q.js';
4
+ export { C as ClientInventoryModelVersion, a as CompanionSelectionIssue, G as GroupedTableBookingMode, b as GroupedTableInventoryUnit, c as GroupedTableProjectionError, M as MAX_EVENT_INVENTORY, d as MAX_GA_CAPACITY, N as NotForSaleSelectionIssue, R as RestrictionChartDoc, e as RestrictionSeat, T as TicketOptionApplicabilityIssue, f as TicketSelection, g as TicketSelectionIssue, h as TicketSelectionOptions, i as TicketTierResolution, j as applicableTicketTiers, k as companionSelectionIssue, l as gaAreasOf, m as gaInventorySegments, n as gaUnitLabel, o as gaUnitLabels, p as groupedTableInventory, q as growJoinedGAInventory, r as isFullChartDoc, s as isGaUnitLabel, t as resolveTicketTierForSeat, u as ticketOptionNotApplicableIssue, v as ticketSelectionIssue, w as ticketTierAppliesToSeat, x as validGAInventorySegments } from '../../ticketRestrictions-JhGzamZ8.js';
5
5
 
6
6
  /**
7
7
  * Best-available seat selection — a PURE, fully unit-testable ranking function.
@@ -55,6 +55,10 @@ interface BestAvailableOpts {
55
55
  * byte-identical to the baseline algorithm — the premium term never runs.
56
56
  */
57
57
  preferPremium?: boolean;
58
+ /** Recovery-only bias: rank distance before the ordinary orphan-seat rule. */
59
+ preferNearest?: boolean;
60
+ /** Logical rows containing the original seats in a recovery request. */
61
+ preferredRowIds?: readonly string[];
58
62
  }
59
63
  /**
60
64
  * Pick the `qty` best available seats. Returns `{ labels }` on success, or
@@ -1 +1 @@
1
- import{a as xt,b as Mt,c as gt,d as wt,e as Ct,g as B,h as N}from"../../chunk-PNHFP2OH.js";import{a as it,b as st,c as ct,d as lt,e as ut,f as pt,g as ft,h as mt,i as yt,j as dt,k as ht,l as bt}from"../../chunk-7LMW7QTP.js";import"../../chunk-BT2KJXQC.js";import"../../chunk-W53J4FJS.js";import"../../chunk-TQN2VWQO.js";import"../../chunk-NJTU4QK7.js";import{a as H,b as V,c as Z,d as tt,e as et,f as ot,g as rt,h as nt,i as at}from"../../chunk-Q3U3F4YJ.js";import"../../chunk-BS37TGPX.js";import"../../chunk-4I2VWFJY.js";import{Ea as S,Ga as v,Ha as P,I as O,Ja as j,Ka as _,Pa as I,x as R}from"../../chunk-24O23MNB.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 Pt(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 jt(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=B(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 Bt(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 Nt(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:N(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 Gt(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 Wt(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{xt as CATEGORY_INVENTORY_FAMILIES,ht as GroupedTableProjectionError,D as MAX_DIRECT_ROW_SWEEP,V as MAX_EVENT_INVENTORY,H 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,ut as applicableTicketTiers,z as capacityControl,Pt as categoryCapacity,k as chartCapacity,ft as companionSelectionIssue,wt as describeCategoryInventoryConflict,Mt as effectiveSeatOwnerCategoryCounts,nt as gaAreasOf,et as gaInventorySegments,Z as gaUnitLabel,ot as gaUnitLabels,bt as groupedTableInventory,rt as growJoinedGAInventory,gt as inspectCategoryInventoryConflicts,Nt as intactRowBlockMembers,st as isFullChartDoc,at as isGaUnitLabel,yt as pickBestAvailable,dt as pickBestAvailableInventory,Ct as remediateCategoryInventoryConflicts,jt as resizeChartCapacity,Bt as resolveRowBlockCount,Wt as resolveRowStartCapacity,Gt as resolveRowTerminalCapacity,pt as resolveTicketTierForSeat,G as rowBlockEdgePoint,J as rowBlockPreviewRows,q as rowStartEndpoint,$ as rowTerminalEndpoint,Y as rowWithStartCapacity,U as rowWithTerminalCapacity,it as strandedSingles,ct as ticketOptionNotApplicableIssue,mt as ticketSelectionIssue,lt as ticketTierAppliesToSeat,tt as validGAInventorySegments};
1
+ import{a as it,b as st,c as ct,d as lt,e as ut,f as pt,g as ft,h as mt,i as yt,j as dt,k as ht,l as bt}from"../../chunk-PI3UH2EN.js";import{a as xt,b as Mt,c as gt,d as wt,e as Ct,f as B,h as N}from"../../chunk-OLTZIZEM.js";import"../../chunk-WAGKI44J.js";import"../../chunk-W53J4FJS.js";import"../../chunk-TQN2VWQO.js";import"../../chunk-CFRNWESM.js";import{a as H,b as V,c as Z,d as tt,e as et,f as ot,g as rt,h as nt,i as at}from"../../chunk-AHPF5SD6.js";import"../../chunk-R7TV7RYQ.js";import"../../chunk-4I2VWFJY.js";import{Aa as j,Ba as _,Ga as I,I as O,va as S,x as R,xa as v,ya as P}from"../../chunk-E7TOTX6I.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 Pt(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 jt(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 Bt(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 Nt(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 Gt(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 Wt(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{xt as CATEGORY_INVENTORY_FAMILIES,ht as GroupedTableProjectionError,D as MAX_DIRECT_ROW_SWEEP,V as MAX_EVENT_INVENTORY,H 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,ut as applicableTicketTiers,z as capacityControl,Pt as categoryCapacity,k as chartCapacity,ft as companionSelectionIssue,wt as describeCategoryInventoryConflict,Mt as effectiveSeatOwnerCategoryCounts,nt as gaAreasOf,et as gaInventorySegments,Z as gaUnitLabel,ot as gaUnitLabels,bt as groupedTableInventory,rt as growJoinedGAInventory,gt as inspectCategoryInventoryConflicts,Nt as intactRowBlockMembers,st as isFullChartDoc,at as isGaUnitLabel,yt as pickBestAvailable,dt as pickBestAvailableInventory,Ct as remediateCategoryInventoryConflicts,jt as resizeChartCapacity,Bt as resolveRowBlockCount,Wt as resolveRowStartCapacity,Gt as resolveRowTerminalCapacity,pt as resolveTicketTierForSeat,G as rowBlockEdgePoint,J as rowBlockPreviewRows,q as rowStartEndpoint,$ as rowTerminalEndpoint,Y as rowWithStartCapacity,U as rowWithTerminalCapacity,it as strandedSingles,ct as ticketOptionNotApplicableIssue,mt as ticketSelectionIssue,lt as ticketTierAppliesToSeat,tt as validGAInventorySegments};
@@ -1 +1 @@
1
- "use strict";var ne=Object.defineProperty;var ut=Object.getOwnPropertyDescriptor;var ft=Object.getOwnPropertyNames;var dt=Object.prototype.hasOwnProperty;var ht=(e,t)=>{for(var n in t)ne(e,n,{get:t[n],enumerable:!0})},mt=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ft(t))!dt.call(e,r)&&r!==n&&ne(e,r,{get:()=>t[r],enumerable:!(o=ut(t,r))||o.enumerable});return e};var bt=e=>mt(ne({},"__esModule",{value:!0}),e);var Kn={};ht(Kn,{AUTOMATIC_ROUND_TABLE_RADIUS_MAX:()=>Xe,AUTOMATIC_ROUND_TABLE_RADIUS_MIN:()=>He,DEFAULT_SEAT_RADIUS:()=>lt,FLOOR_STACK_GAP_RATIO:()=>rt,FLOOR_STACK_MIN_SURFACE_PX:()=>at,TABLE_SEAT_OFFSET:()=>B,TEXT_BACKGROUND_PADDING_MAX:()=>oo,TEXT_BACKGROUND_RADIUS_MAX:()=>ro,TEXT_LETTER_SPACING_MAX:()=>to,TEXT_LETTER_SPACING_MIN:()=>eo,TEXT_LINE_HEIGHT_MAX:()=>Jn,TEXT_LINE_HEIGHT_MIN:()=>Zn,TEXT_OPACITY_MIN:()=>no,TEXT_WIDTH_MAX:()=>Qn,TEXT_WIDTH_MIN:()=>qn,allObjects:()=>nt,applyAffine:()=>Tn,automaticRoundTableRadius:()=>Zt,buildAisleHoles:()=>xt,buildSeatIndex:()=>Bn,buildSectionShell:()=>yt,chartBounds:()=>G,combinedFloorZoneId:()=>we,composeAffine:()=>_n,createPerspectiveCamera:()=>Rn,cubicPoint:()=>z,decomposeAffineLinear:()=>Ln,distanceToRings:()=>Oe,distributeAlongCubic:()=>oe,expandBooth:()=>Je,expandChart:()=>wn,expandRow:()=>Me,expandRowSlots:()=>qe,expandTable:()=>Ze,expandTableSlots:()=>Se,floorObjects:()=>Mn,floorStackPlacements:()=>st,floorsOf:()=>q,gridStats:()=>Yn,hitTest:()=>Hn,initialFloorMode:()=>On,invertAffine:()=>An,layoutCombinedFloorPlan:()=>En,layoutFloorStack:()=>kn,mainFloorId:()=>ct,nearestWithin:()=>Xn,objectCenter:()=>et,owningSectionForObject:()=>tt,perspectiveTangentAffine:()=>Dn,pointInPolygon:()=>xe,pointInPolygonWithHoles:()=>V,polygonArea:()=>se,polygonInscribedAnchor:()=>ce,polygonLabelPoint:()=>xn,polygonNetArea:()=>wt,projectPerspectivePoint:()=>ee,queryRect:()=>Un,resolveSegmentedRowGroups:()=>ae,rowInventoryCount:()=>bn,rowSeatPositions:()=>ge,segmentedRowComponentSeats:()=>vt,segmentedRowComponents:()=>It,segmentedRowSeatTotal:()=>Ct,smoothCubicThroughMiddle:()=>pt,stackFloors:()=>Sn,tableInventoryCount:()=>pn,tableSeatCountsBySide:()=>Qe,textLayoutMetrics:()=>re,translateObject:()=>J});module.exports=bt(Kn);var Gn=Math.PI/180;function N(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function j(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function z(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 pt(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 oe(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[z(e,.5)];let o=Array.from({length:n+1},(c,u)=>z(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,a=o[c].y-o[c-1].y;r[c]=r[c-1]+Math.hypot(u,a)}let i=r[r.length-1];if(i<=1e-9)return Array.from({length:t},()=>({...e.start}));let s=[],l=1;for(let c=0;c<t;c+=1){let u=i*c/(t-1);for(;l<r.length-1&&r[l]<u;)l+=1;let a=r[l-1],d=r[l],m=d===a?0:(u-a)/(d-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 A(e,t){return{x:e.x+t.x,y:e.y+t.y}}function K(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 $(e,t=13){return Array.from({length:t},(n,o)=>z(e,o/(t-1)))}function Pe(e,t){let n=Math.max(0,Math.min(1,t))*(e.length-1),o=Math.min(e.length-2,Math.floor(n));return j(e[o],e[o+1],n-o)}function Ie(e,t,n){let o=Math.max(0,Math.min(1,t)),r=Math.max(o,Math.min(1,n)),i=[Pe(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(Pe(e,r)),i}function ve(e,t){let n=[[0,1],[1,2],[2,3],[3,0]],o=0,r=Number.POSITIVE_INFINITY;n.forEach(([m,y],b)=>{let h=N(j(e[m],e[y],.5),t);h<r&&(r=h,o=b)});let i=e[o],s=e[(o+1)%4],l=e[(o+2)%4],c=e[(o+3)%4],u=j(i,s,.5),a=K(t,u),d=Math.max(1e-9,Math.hypot(a.x,a.y));return{p0:i,p1:s,p2:l,p3:c,normal:_(a,1/d),depth:(N(i,c)+N(s,l))/2}}function Ce(e){let{p0:t,p1:n,p2:o,p3:r,normal:i,depth:s}=e,l=K(n,t),c=K(o,r),u=s*.22,a=s*.12;return{nearPath:{start:t,control1:A(A(t,_(l,1/3)),_(i,u)),control2:A(A(t,_(l,2/3)),_(i,u)),end:n},farPath:{start:o,control1:A(A(r,_(c,2/3)),_(i,a)),control2:A(A(r,_(c,1/3)),_(i,a)),end:r}}}function yt(e,t,n){if(e.length!==4)throw new Error("A section shell requires four mapped bounds corners");let o=e.reduce((b,h)=>A(b,h),{x:0,y:0});o.x/=4,o.y/=4;let r=N(e[0],e[1]),i=N(e[0],e[3]),s=n==="auto"?r>i*1.25&&N(o,t)>i?"bezier":"tapered":n;if(s==="rectangle")return{mode:s,outline:e.map(b=>({...b}))};let l=ve(e,t),{p0:c,p1:u,p2:a,p3:d}=l;if(s==="tapered")return{mode:s,outline:[A(c,_(K(u,c),.14)),A(c,_(K(u,c),1-.14)),a,d]};let{nearPath:m,farPath:y}=Ce(l);return{mode:s,outline:[...$(m),...$(y).slice(1)]}}function xt(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=ve(e,t),{p0:i,p1:s,p2:l,p3:c}=r,u=o==="bezier"?Ce(r):null,a=u?$(u.nearPath):null,d=u?$(u.farPath).reverse():null,m=Math.min(.055,.18/(n+1));return Array.from({length:n},(y,b)=>{let h=(b+1)/(n+1),f=h-m/2,x=h+m/2;return a&&d?[...Ie(a,f,x),...Ie(d,f,x).reverse()]:[j(i,s,f),j(i,s,x),j(c,l,x),j(c,l,f)]})}var qn=40,Qn=1200,Zn=.8,Jn=3,eo=-2,to=20,no=.1,oo=40,ro=40,ke=e=>Math.max(1,e.fontSize*.6+(e.letterSpacing??0));function gt(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/ke(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 c=l.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 re(e){let t=e.background?.padding??0,n=e.text.split(/\r?\n/),o=Math.max(1,...n.map(l=>l.length))*ke(e),r=e.width??o+t*2,i=Math.max(1,r-t*2),s=gt(e,i);return{width:r,height:s*e.fontSize*(e.lineHeight??1.2)+t*2,lineCount:s,padding:t}}function Mt(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 Oe(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=Mt(e,o[i],o[r]);s<n&&(n=s)}return n}function Ee(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,c=t[r].y;s>e.y!=c>e.y&&e.x<(l-i)*(e.y-s)/(c-s)+i&&(n=!n)}return n}function St(e,t,n){let o=Ee(e,t)&&!n.some(i=>Ee(e,i)),r=Oe(e,[t,...n]);return o?r:-r}function H(e,t,n,o,r){let i=St({x:e,y:t},o,r);return{x:e,y:t,h:n,d:i,max:i+n*Math.SQRT2}}var ie=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 se(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 wt(e,t){return Math.max(0,se(e)-(t??[]).reduce((n,o)=>n+se(o),0))}function ce(e,t){let n=t??[];if(!e.length)return{point:{x:0,y:0},radius:0};if(e.length<3){let h=e.reduce((x,S)=>x+S.x,0)/e.length,f=e.reduce((x,S)=>x+S.y,0)/e.length;return{point:{x:h,y:f},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,c=s-r,u=Math.min(l,c);if(!(u>0))return{point:{x:(o+i)/2,y:(r+s)/2},radius:0};let a=Math.max(l,c)/150,d=new ie,m=u/2;for(let h=o;h<i;h+=u)for(let f=r;f<s;f+=u)d.push(H(h+m,f+m,m,e,n));let y=H(o+l/2,r+c/2,0,e,n),b=0;for(;d.size;){let h=d.pop();if(!h)break;h.d>y.d&&(y=h),!(h.max-y.d<=a)&&(b>=4e3||(b+=1,m=h.h/2,d.push(H(h.x-m,h.y-m,m,e,n)),d.push(H(h.x+m,h.y-m,m,e,n)),d.push(H(h.x-m,h.y+m,m,e,n)),d.push(H(h.x+m,h.y+m,m,e,n))))}return{point:{x:y.x,y:y.y},radius:Math.max(0,y.d)}}function W(e,t,n){return Math.max(t,Math.min(n,e))}function D(e,t,n){return e<t?t:e>n?n:e}var ao=Math.PI*2;function Re(e,t,n){return Pt(e,r=>({x:r.x+t,y:r.y+n}))}function Pt(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 lo=4/3;function It(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 c=Math.max(1,Math.round(l/n)),u=l/c,a=Math.atan2(s.y-i.y,s.x-i.x),d=r===0,y=(r>0?t[r-1]:void 0)==="break"?2:1,b=d?{...i}:{x:i.x+Math.cos(a)*u*y,y:i.y+Math.sin(a)*u*y},h=d?c+1:Math.max(1,c-(y-1));o.push({origin:b,rotation:a*180/Math.PI,seatCount:h,seatSpacing:u})}return o}function vt(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 Ct(e){return e.reduce((t,n)=>t+n.seatCount,0)}function ae(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,l=i[0]?.segmentedRow;if(!l||!(s>=2&&i.length===s&&l?.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===l.repeatLabelOnComponents&&(y===0?m.segmentedRow.boundaryBefore==="start":m.segmentedRow.boundaryBefore!=="start")&&m.segmentedRow.displayLabel===l.displayLabel)))continue;let u=i.reduce((m,y)=>m+y.seatCount,0),a=0,d=0;for(let m of i)m.segmentedRow.boundaryBefore==="break"&&(a+=1),t.set(m.id,{groupId:o,adjacencyOffset:a,displayOffset:d,displayLabel:l.displayLabel,totalSeats:u,canonical:i[0],viewFromSeatUrl:l.viewFromSeatUrl,viewFromSeatMeta:l.viewFromSeatMeta,confidenceEvidence:l.confidenceEvidence}),a+=m.seatCount,d+=m.seatCount}return t}var kt="ABCDEFGHIJKLMNOPQRSTUVWXYZ";var Et="abcdefghijklmnopqrstuvwxyz";function Ot(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 le(e,t=!1){let n=t?Et:kt;return Ot(Math.max(0,Math.floor(e)-1),n)}var Rt=[[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 Te(e){if(!Number.isFinite(e)||e<=0)return String(e);let t=Math.floor(e),n="";for(let[o,r]of Rt)for(;t>=o;)n+=r,t-=o;return n}function Tt(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 ue(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,c=e.seatCount;if(i==="updown"||i==="updown-descending"){let y=Math.ceil(c/2),b=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}${b}`}let u=i==="odd"||i==="even"?2:r,a=l!=null&&Number.isFinite(l)?l-(c-1)*u:n,d=o==="center"?Tt(c)[t]:o==="rtl"?c-1-t:t,m;switch(i){case"odd":{let y=a%2===1?a:a+1;m=String(y+d*2);break}case"even":{let y=a%2===0?a:a+1;m=String(y+d*2);break}case"roman":m=Te(a+d*r);break;case"letters-upper":m=le(a+d*r,!1);break;case"letters-lower":m=le(a+d*r,!0);break;default:m=String(a+d*r);break}return`${s}${m}`}function At(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function Ae(e,t,n){return n?.label??`${e.label}-${ue(e,t)}`}function fe(e,t,n,o){if(o?.displayLabel)return o.displayLabel;if(!n)return`${e.displayLabel||e.label}-${ue(e,t)}`;let r=At(n),i=n.displayOffset+t;return`${n.displayLabel}-${ue(r,i)}`}var X=.02291666666666667,po=1/X,_t=58,Dt=_t*X;var Lt=3,_e=0,de=120,Ft=0,jt=45,Nt=7,U=1.2;function he(e,t,n,o){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):o}function Bt(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=Nt?e:Lt}function De(e,t={}){let n=he(t.floorBaseHeightM,_e,de,0),o=Math.min(de,n+Bt(e.elevation)*Dt),r=e.height===void 0?o:he(e.height,_e,de,o),i=he(e.rake,Ft,jt,0);return{height:r,rake:i}}function Le(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 Fe(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,c=s.y-i.y,u=l*l+c*c,a=u>1e-12?((t-i.x)*l+(n-i.y)*c)/u:0;a<0?a=0:a>1&&(a=1);let d=Math.hypot(t-(i.x+a*l),n-(i.y+a*c));d<o&&(o=d)}return o}function Ht(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 je(e,t){return Math.hypot(e.cx-t.cx,e.cy-t.cy)-e.r-t.r}function me(e,t){let n=1/0;for(let o of Le(e)){let r=Fe(t,o.x,o.y);r<n&&(n=r)}for(let o of Le(t)){let r=Fe(e,o.x,o.y);r<n&&(n=r)}return n}function Xt(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 d=Math.hypot(a.x-n,a.y-o);d>r&&(r=d,i=a)}let s=i.x-n,l=i.y-o,c=Math.hypot(s,l);c>1e-9?(s/=c,l/=c):(s=1,l=0);let u=e.map((a,d)=>({p:a,i:d,t:(a.x-n)*s+(a.y-o)*l})).sort((a,d)=>a.t-d.t);return{pts:u.map(a=>a.p),seatIndices:u.map(a=>t[a.i])}}function Ut(e){let t=e.length;if(t<3)return null;let n=0,o=0;for(let S of e)n+=S.x,o+=S.y;n/=t,o/=t;let r=0,i=0,s=0,l=0,c=0,u=0,a=0;for(let S of e){let g=S.x-n,p=S.y-o;r+=g*g,s+=p*p,i+=g*p,l+=g*g*g,c+=p*p*p,u+=g*p*p,a+=p*g*g}let d=r*s-i*i;if(Math.abs(d)<1e-9)return null;let m=(l+u)/2,y=(c+a)/2,b=(m*s-y*i)/d,h=(y*r-m*i)/d,f=b+n,x=h+o;return!Number.isFinite(f)||!Number.isFinite(x)?null:{cx:f,cy:x}}var Yt=.15;function Kt(e){if(e.length<2)return null;let t=e.map(S=>{let g=0,p=0;for(let P of S.pts)g+=P.x,p+=P.y;return{x:g/S.pts.length,y:p/S.pts.length}}),n=0,o=0;for(let S of t)n+=S.x,o+=S.y;n/=t.length,o/=t.length;let r=0,i=0,s=0;for(let S of t){let g=S.x-n,p=S.y-o;r+=g*g,i+=g*p,s+=p*p}let l=r+s,c=r*s-i*i,u=l/2+Math.sqrt(Math.max(0,l*l/4-c)),a,d;Math.abs(i)>1e-12?(a=u-s,d=i):r>=s?(a=1,d=0):(a=0,d=1);let m=Math.hypot(a,d);if(!(m>1e-12))return null;a/=m,d/=m;let y=1/0,b=-1/0,h=[];for(let S of e){let g=1/0,p=-1/0;for(let P of S.pts){let M=P.x*a+P.y*d;M<g&&(g=M),M>p&&(p=M),M<y&&(y=M),M>b&&(b=M)}h.push(p-g)}let f=b-y;return f>1e-9?(h.sort((S,g)=>S-g),h[Math.min(h.length-1,Math.floor(h.length*.9))]/f<=Vt?{x:a,y:d}:null):null}var Vt=.35;function Ne(e,t,n,o){let r=new Map;for(let f of n){let x=t[f],S=x.rowId||`__seat-${f}`,g=r.get(S);g||(g={pts:[],idx:[]},r.set(S,g)),g.pts.push({x:x.x,y:x.y}),g.idx.push(f)}if(!r.size)return{sectionId:e,rows:[],blockCount:0};let i=[];for(let[f,x]of r){let S=Xt(x.pts,x.idx),g=0;for(let p of S.pts)g+=Math.hypot(p.x-o.x,p.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=>Ht(f.pts)),l=[];for(let f=0;f<i.length;f++){let x=1/0;for(let S=0;S<i.length;S++){if(f===S||je(s[f],s[S])>=x)continue;let g=me(i[f].pts,i[S].pts);g<x&&(x=g)}Number.isFinite(x)&&l.push(x)}l.sort((f,x)=>f-x);let c=l.length?l[Math.floor(l.length/2)]:1,u=Math.max(c*1.8,1e-6),a=i.map(()=>[]);for(let f=0;f<i.length;f++)for(let x=f+1;x<i.length;x++)je(s[f],s[x])>u||me(i[f].pts,i[x].pts)<=u&&(a[f].push(x),a[x].push(f));let d=0;for(let f=0;f<i.length;f++){if(i[f].blockId!==-1)continue;let x=d++,S=[f];for(i[f].blockId=x;S.length;){let g=S.pop();for(let p of a[g])i[p].blockId===-1&&(i[p].blockId=x,S.push(p))}}let m=new Map;for(let f of i){let x=m.get(f.blockId)??[];x.push(f),m.set(f.blockId,x)}let y=[];for(let f of i){if(f.pts.length<4)continue;let x=Ut(f.pts);x&&(!Number.isFinite(x.cx)||!Number.isFinite(x.cy)||y.push({x:x.cx,y:x.cy}))}let b=y.length>=2?(()=>{let f=y.map(g=>g.x).sort((g,p)=>g-p),x=y.map(g=>g.y).sort((g,p)=>g-p),S=Math.floor(y.length/2);return{cx:f[S],cy:x[S]}})():null;if(b){let f=M=>Math.hypot(M.x-b.cx,M.y-b.cy),x=1/0,S=-1/0,g=[];for(let M of i){let w=1/0,I=-1/0;for(let v of M.pts){let C=f(v);C<w&&(w=C),C>I&&(I=C)}g.push(I-w),w<x&&(x=w),I>S&&(S=I)}let p=S-x;g.sort((M,w)=>M-w);let P=g[Math.min(g.length-1,Math.floor(g.length*.9))];if(p>1e-9&&P/p<=Yt){let M=i.map(k=>{let L=0;for(let F of k.pts)L+=f(F);return{row:k,radius:L/k.pts.length}}),w=0,I=0;for(let k of M)w+=k.radius,I+=k.row.focalDistance;w/=M.length,I/=M.length;let v=0;for(let k of M)v+=(k.radius-w)*(k.row.focalDistance-I);if(v<0)for(let k of M)k.radius=-k.radius;let T=1/0;for(let k of M)k.radius<T&&(T=k.radius);M.sort((k,L)=>k.radius-L.radius);let R=-1,E=-1/0,O=p/Math.max(1,M.length)*.5,Y=[];for(let k of M)k.radius-E>O&&(R++,E=k.radius),k.row.ordinal=R,k.row.blockDepth=k.radius-T,Y.push(k.row);return{sectionId:e,rows:Y,blockCount:d}}}let h=[];for(let[,f]of m){let x=Kt(f);if(x){let S=p=>{let P=0;for(let M of p.pts)P+=M.x*x.x+M.y*x.y;return P/p.pts.length};f.sort((p,P)=>S(p)-S(P)),f.length>=2&&f[0].focalDistance>f[f.length-1].focalDistance&&f.reverse();let g=0;for(let p=0;p<f.length;p++)p>0&&(g+=me(f[p-1].pts,f[p].pts)),f[p].ordinal=p,f[p].blockDepth=g,h.push(f[p])}else{let S=1/0;for(let g of f)g.focalDistance<S&&(S=g.focalDistance);f.sort((g,p)=>g.focalDistance-p.focalDistance);for(let g=0;g<f.length;g++)f[g].ordinal=g,f[g].blockDepth=Math.max(0,f[g].focalDistance-S),h.push(f[g])}}return{sectionId:e,rows:h,blockCount:d}}var Gt=/^\d{4}-\d{2}-\d{2}$/;function zt(e){let t=Date.parse(e);return Number.isFinite(t)?Gt.test(e)?t+864e5:t:null}function $t(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=zt(e.validUntil);return n===null?!1:(t instanceof Date?t.getTime():t)<n}function Wt(e,t,n){return!(e.eventConfigurationId&&e.eventConfigurationId!==t||e.eventConfigurationVersion!==void 0&&e.eventConfigurationVersion!==n)}function qt(e){return e.status!=="draft"&&e.status!=="retracted"}function Qt(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 Be(e,t={}){return!!e&&qt(e)&&Wt(e,t.activeConfigurationId,t.activeConfigurationVersion)&&Qt(e,t.activeBasisSha256)&&$t(e,t.now)}var He=36,Xe=160;function Zt(e,t=360){let n=W(Math.round(Number.isFinite(e)?e:1),1,40),o=W(Number.isFinite(t)?t:360,120,360);return Math.round(W(n*4*(360/o),He,Xe))}var wo=Math.PI*2;function Ue(e){return e==="pitch-football"||e==="rink-hockey"||e==="track-athletics"||e==="oval-cricket"}function Jt(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 en(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 Ye(e){let t=Jt(e);if(!t||t.length<2)return null;let n=e.rotation??0,o=Math.abs(n)<1e-6?t:t.map(c=>en(c,{x:t.reduce((u,a)=>u+a.x,0)/t.length,y:t.reduce((u,a)=>u+a.y,0)/t.length},n)),r=1/0,i=1/0,s=-1/0,l=-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),l=Math.max(l,c.y);return!Number.isFinite(r)||s-r<1e-6||l-i<1e-6?null:{minX:r,minY:i,maxX:s,maxY:l}}var tn=5,nn=3,on=.92,rn=1.9,sn=2,cn=.6,an=1,ln=.06;function un(e){return e.heightM!==void 0?e.heightM:Ue(e.stageKind)?ln:an}function Ke(e){let t=1/0,n=1/0,o=-1/0,r=-1/0,i=-1/0;for(let s of q(e)){let l=s.baseHeightM??0;for(let c of s.objects){if(c.type!=="shape"||c.role!=="stage")continue;let u=Ye(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,l+un(c)))}}return!Number.isFinite(t)||!Number.isFinite(i)?null:{minX:t,minY:n,maxX:o,maxY:r,deckTopM:i}}function fn(e,t,n,o){let r=1/0,i=1/0,s=-1/0,l=-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),l=Math.max(l,y.y));if(!Number.isFinite(r))return null;let c=r*t,u=i*t,a=Math.max(1,Math.ceil((s-r)*t/n)+1),d=Math.max(1,Math.ceil((l-i)*t/n)+1),m=new Float64Array(a*d).fill(-1/0);for(let y of e){if(!Number.isFinite(y.eyeHeightM))continue;let b=y.eyeHeightM-U,h=Math.min(a-1,Math.max(0,Math.floor((y.x*t-c)/n))),x=Math.min(d-1,Math.max(0,Math.floor((y.y*t-u)/n)))*a+h,S=b+o;S>m[x]&&(m[x]=S)}return{cellM:n,minX:c,minY:u,cols:a,rows:d,top:m}}function dn(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 Ve(e,t,n={}){let o=new Map;if(!t||!e.length)return o;let r=n.metresPerChartUnit??X,i=n.cellM??cn,s=n.chairBackM??on,l=n.selfRowSkipM??sn,c=n.clearThreshold??.9,u=n.partialThreshold??.25,a=Math.max(1,n.columns??tn),d=Math.max(1,n.rows??nn),m=fn(e,r,i,s);if(!m)return o;let y=(t.maxX-t.minX)*r,b=(t.maxY-t.minY)*r,h=y>=b,f=(t.minX+t.maxX)/2*r,x=(t.minY+t.maxY)/2*r,S=[];for(let p=0;p<a;p++){let P=(p+.5)/a-.5,M=h?f+P*y:f,w=h?x:x+P*b;for(let I=0;I<d;I++){let v=t.deckTopM+(d===1?0:I/(d-1)*rn);S.push({x:M,y:w,z:v})}}let g=i/2;for(let p of e){if(!Number.isFinite(p.eyeHeightM))continue;let P=p.x*r,M=p.y*r,w=p.eyeHeightM,I=0,v=1/0;for(let T of S){let R=T.x-P,E=T.y-M,O=Math.hypot(R,E);if(!(O>l)){I++;continue}let Y=R/O,k=E/O,L=0;for(let F=l;F<O;F+=g){let te=dn(m,P+Y*F,M+k*F);if(!(!Number.isFinite(te)||te>=w)&&te>w+(T.z-w)*F/O){L=F;break}}L?v=Math.min(v,L):I++}let C=I/S.length;C>=c||o.set(p.id,{seatId:p.id,mark:C<u?"obstructedView":"restrictedView",visibleFraction:C,totalRays:S.length,atDistanceM:Number.isFinite(v)?v:0})}return o}function Ge(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 be(e){return e?e.accessibility?.length?e.wheelchairSpaceType&&!e.accessibility.includes("wheelchair")?["wheelchair",...e.accessibility]:e.accessibility:e.wheelchairSpaceType?["wheelchair"]:e.accessible?["wheelchair"]:[]:[]}var Z=Math.PI/180,hn=9,B=16;function ye(e,t,n,o){let r=n*Z,i=Math.cos(r),s=Math.sin(r);return{x:o.x+e*i-t*s,y:o.y+e*s+t*i}}function ge(e){let{seatCount:t,seatSpacing:n,curve:o,rotation:r,origin:i}=e,s=[];if(e.path)return oe(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(ye(u*n,0,r,i));return s}let l=o/(t-1)*Z,c=n/(2*Math.sin(Math.abs(l)/2));for(let u=0;u<t;u++){let a=u*l,d=c*Math.sin(a),m=-c+c*Math.cos(a);s.push(ye(d,m,r,i))}return s}function mn(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function bn(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 qe(e,t){let n=mn(e);return ge(e).map((o,r)=>{let i=n.get(r),s=be(i),l=Ae(e,r,i),c={...e.commercial,...i?.commercial};return{index:r,x:o.x+(i?.dx??0),y:o.y+(i?.dy??0),label:l,displayLabel:fe(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}})}function Me(e){let t=[];for(let n of qe(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 Qe(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 Se(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,d,m,y)=>{let b=o.get(a),h=be(b),f=b?.label??`${e.label}-${a+1}`,x=e.displayLabel??e.label;return{index:a,label:f,displayLabel:b?.displayLabel??`${x}-${a+1}`,x:d+(b?.dx??0),y:m+(b?.dy??0),categoryKey:b?.categoryKey??e.categoryKey,skipped:!!b?.skip,accessible:h.length>0,accessibility:h,wheelchairSpaceType:b?.wheelchairSpaceType,commercial:b?.commercial,glyph:b?.glyph,viewUrl:b?.viewFromSeatUrl,viewMeta:b?.viewFromSeatUrl?b.viewFromSeatMeta:void 0,labelStyle:b?.labelStyle,...y?{side:y}:{}}};if(e.shape==="round"){let a=(e.radius??40)+B,d=e.rotation*Z,m=Math.max(0,Math.min(360,e.seatArc??360));if(m>=360||n===1){for(let f=0;f<n;f++){let x=d+f/n*2*Math.PI;t.push(r(f,e.center.x+a*Math.cos(x),e.center.y+a*Math.sin(x)))}return t}let y=m*Z,b=(2*Math.PI-y)/2,h=d+b;for(let f=0;f<n;f++){let x=h+f/(n-1)*y;t.push(r(f,e.center.x+a*Math.cos(x),e.center.y+a*Math.sin(x)))}return t}let i=e.width??80,s=e.height??50,l=Qe(e),c=["top","bottom","left","right"],u=0;for(let a of c){let d=l[a];for(let m=0;m<d;m++){let y,b;a==="top"?(y=-i/2+(m+.5)*i/d,b=-s/2-B):a==="bottom"?(y=-i/2+(m+.5)*i/d,b=s/2+B):a==="left"?(y=-i/2-B,b=-s/2+(m+.5)*s/d):(y=i/2+B,b=-s/2+(m+.5)*s/d);let h=ye(y,b,e.rotation,e.center);t.push(r(u++,h.x,h.y,a))}}return t}function pn(e){return e.bookAsWhole||e.variableOccupancy?Math.max(0,Math.round(e.seatCount)):Se(e).filter(t=>!t.skipped).length}function Ze(e){return Se(e).filter(t=>!t.skipped).map(t=>({id:`${e.id}:${t.index}`,label:t.label,...t.displayLabel!==t.label?{displayLabel:t.displayLabel}:{},x:t.x,y:t.y,rowId:e.id,categoryKey:t.categoryKey,...t.accessible?{accessible:!0}:{},...t.accessibility.length?{accessibility:t.accessibility}:{},...t.wheelchairSpaceType?{wheelchairSpaceType:t.wheelchairSpaceType}:{},...t.commercial?{commercial:t.commercial}:{},...t.glyph?{glyph:t.glyph}:{},...t.viewUrl?{viewUrl:t.viewUrl}:{},...t.viewUrl&&t.viewMeta?{viewMeta:t.viewMeta}:{},...t.labelStyle?{labelStyle:t.labelStyle}:{}}))}function Je(e){return[{id:`${e.id}:0`,label:e.label,...e.displayLabel&&e.displayLabel!==e.label?{displayLabel:e.displayLabel}:{},x:e.center.x,y:e.center.y,rowId:e.id,categoryKey:e.categoryKey,kind:"booth"}]}function xe(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,s=t[o].y,l=t[r].x,c=t[r].y;s>e.y!=c>e.y&&e.x<(l-i)*(e.y-s)/(c-s)+i&&(n=!n)}return n}function yn(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,t,n){return xe(e,t)&&!(n??[]).some(o=>xe(e,o)||yn(e,o))}function xn(e,t){return ce(e,t).point}function pe(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 et(e){switch(e.type){case"row":{let t=Me(e);if(!t.length)return{x:e.origin.x,y:e.origin.y};let n=0,o=0;for(let r of t)n+=r.x,o+=r.y;return{x:n/t.length,y:o/t.length}}case"table":case"booth":return{x:e.center.x,y:e.center.y};case"gaArea":return pe(e.points);case"section":return pe(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?pe(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 gn(e,t){if(e.type!=="gaArea"||!ze(e.points,t.outline))return!1;let n=e.holes??[],o=t.holes??[];return n.length===o.length&&n.every((r,i)=>ze(r,o[i]))}function tt(e,t){let n=e.filter(s=>s.type==="section"),o="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0,r=et(t);return(o?n.find(s=>(s.logicalSectionId??s.id)===o&&(gn(t,s)||V(r,s.outline,s.holes))):void 0)??n.find(s=>V(r,s.outline,s.holes))}function q(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 Mn(e,t){let n=q(e);return(t?n.find(o=>o.id===t):n[0])?.objects??[]}function nt(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}function J(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:Re(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 Sn(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:J(s,0,i))}),{...e,objects:n,floors:void 0}}function $e(e,t,n,o,r,i,s,l,c){let u=[],a=ae(e),d=b=>!b?.eventConfigurationId||b.eventConfigurationId===o&&(b.eventConfigurationVersion===void 0||b.eventConfigurationVersion===c),m=b=>Be(b,{activeConfigurationId:o,activeConfigurationVersion:c,activeBasisSha256:r,now:l}),y=(b,h)=>m(b)?{...b,coverage:h}:void 0;for(let b of e){let h=[];if(b.type==="row"?h=Me(b):b.type==="table"?h=Ze(b):b.type==="booth"&&(h=Je(b)),!h.length)continue;for(let p of h)p.viewUrl&&!d(p.viewMeta)&&(p.viewUrl=void 0,p.viewMeta=void 0);if(b.type==="row"){let p=a.get(b.id);if(p){let P=new Map((b.overrides??[]).map(M=>[M.index,M]));for(let M of h){let w=Number(M.id.slice(M.id.lastIndexOf(":")+1));if(!Number.isInteger(w))continue;M.logicalRowId=p.groupId,M.logicalSeatIndex=p.adjacencyOffset+w,P.get(w)?.displayLabel||(M.displayLabel=fe(b,w,p)),!M.viewUrl&&p.viewFromSeatUrl&&d(p.viewFromSeatMeta)&&(M.viewUrl=p.viewFromSeatUrl,M.viewMeta=p.viewFromSeatMeta);let I=P.get(w)?.confidenceEvidence;M.confidenceEvidence=y(I,"exact-seat")??y(b.confidenceEvidence,"row-representative")??y(p.confidenceEvidence,"row-representative")}}}let f=tt(e,b),x=f?.viewFromSeatUrl,g=(f?.zone?t?.find(p=>p.id===f.zone):void 0)?.focalPoint??n;for(let p of h){if(!p.confidenceEvidence){let P=Number(p.id.slice(p.id.lastIndexOf(":")+1)),M=(b.type==="row"||b.type==="table")&&Number.isInteger(P)?b.overrides?.find(w=>w.index===P)?.confidenceEvidence:void 0;p.confidenceEvidence=y(M,"exact-seat")??(b.type==="row"?y(b.confidenceEvidence,"row-representative"):void 0)}p.confidenceEvidence??=y(f?.confidenceEvidence,"section-representative")??(s?y(s.evidence,s.coverage):void 0),!p.viewUrl&&x&&d(f?.viewFromSeatMeta)&&(p.viewUrl=x,p.viewMeta=f?.viewFromSeatMeta),!p.viewUrl&&i&&d(i.meta)&&(p.viewUrl=i.url,p.viewMeta=i.meta),f&&(p.sectionId=f.logicalSectionId??f.id),f?.zone&&(p.zoneId=f.zone),g&&(p.focalPoint={...g})}u.push(...h)}return u}function wn(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,c=$e(r.objects,e.zones,i,e.eventConfigurationId,e.confidenceBasisSha256,s,l,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);t.resolveEyeHeights!==!1&&We(r.objects,r.focalPoint??e.focalPoint,r.baseHeightM??0,c);for(let u of c)u.floorId=r.id;o.push(...c)}return o}let n=$e(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&&We(e.objects,e.focalPoint,t.floorBaseHeightM??0,n),Pn(e,n,t)}function Pn(e,t,n){return!n.deriveRestrictedView||e.derivedRestrictedView===!1||n.resolveEyeHeights===!1||Ge(t,Ve(t,Ke(e))),t}function We(e,t,n,o){let r=e.filter(a=>a.type==="section"),i=n>0||r.some(a=>a.height!==void 0||a.rake!==void 0||(a.elevation??0)>0);if(!r.length||!i||!t){for(let a of o)a.eyeHeightM=n+U;return}let s=new Array(o.length),l=new Map,c=new Map;for(let a=0;a<o.length;a++){let d=o[a],y=(d.sectionId?r.find(h=>h.id===d.sectionId)??r.find(h=>h.logicalSectionId===d.sectionId&&V({x:d.x,y:d.y},h.outline,h.holes)):void 0)??r.find(h=>V({x:d.x,y:d.y},h.outline,h.holes))??null;if(s[a]=y,!y)continue;l.has(y.id)||l.set(y.id,De(y,{floorBaseHeightM:n}));let b=c.get(y.id);b?b.push(a):c.set(y.id,[a])}let u=new Array(o.length).fill(void 0);for(let[a,d]of c){let m=l.get(a);if(!m)continue;let y=m.rake>0?Math.tan(m.rake*Math.PI/180):0,b=Ne(a,o,d,t);for(let h of b.rows){let f=h.blockDepth*X*y,x=m.height+f;for(let S of h.seatIndices)u[S]=x}}for(let a=0;a<o.length;a++){let d=o[a],m=s[a];if(!m){d.eyeHeightM=n+U;continue}let y=l.get(m.id);d.eyeHeightM=(u[a]??y.height)+U}}var Q=40;function G(e,t){let n=t?.freeText==="exclude",o=1/0,r=1/0,i=-1/0,s=-1/0,l=(c,u)=>{c<o&&(o=c),u<r&&(r=u),c>i&&(i=c),u>s&&(s=u)};for(let c of nt(e))if(c.type==="row"){let u=new Map((c.overrides??[]).map(a=>[a.index,a]));ge(c).forEach((a,d)=>{let m=u.get(d);m?.skip||l(a.x+(m?.dx??0),a.y+(m?.dy??0))})}else if(c.type==="gaArea")for(let u of c.points)l(u.x,u.y);else if(c.type==="section")for(let u of c.outline)l(u.x,u.y);else if(c.type==="decorImage")l(c.x,c.y),l(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)l(u.x,u.y);else 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 u=B+hn,a=c.shape==="round"?(c.radius??40)+u:Math.max((c.width??80)/2,(c.height??50)/2)+u;l(c.center.x-a,c.center.y-a),l(c.center.x+a,c.center.y+a)}else if(c.type==="booth"){let u=Math.max(c.width,c.height)/2;l(c.center.x-u,c.center.y-u),l(c.center.x+u,c.center.y+u)}else if(c.type==="text"){if(n)continue;let u=re(c);l(c.position.x,c.position.y),l(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:a}=c,d=a*3/4;l(u.x-a/2,u.y-d/2),l(u.x+a/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-Q,y:r-Q,width:i-o+Q*2,height:s-r+Q*2}}function ot(e){let t=e.backgroundImage;return t?.url&&!t.assetId?t:void 0}var rt=.08,In=.045;function we(e){return`__floor__:${encodeURIComponent(e)}`}function it(e,t,n){return{...e,objects:t,floors:void 0,...n?{focalPoint:n}:{},referenceImage:void 0,backgroundImage:void 0}}function vn(e,t,n){let o=e.focalPoint??t.focalPoint;return o?o.x:n.x+n.width/2}function st(e){let t=e.floors??[];if(!t.length)return[];let n=t.map(s=>G(it(e,s.objects,s.focalPoint),{freeText:"exclude"})),r=Math.max(1,...n.map(s=>s.width))*rt,i=0;return t.map((s,l)=>{let c=n[l],u=i-(c.y+c.height);return i-=c.height+r,{floorId:s.id,label:s.name??s.id,level:l,levelBadge:l===0?"G":String(l),translation:{x:-vn(s,e,c),y:u},bounds:c}})}function Cn(e,t,n,o){let r=t==="name"?e.label:e.levelBadge;if(!r)return[];let i=Math.max(1,n*In),s=e.bounds.x+e.translation.x,l=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:l},fontSize:i,rotation:0,color:o,bold:!0};if(t==="name")return[u];let a=i*.95;return[{type:"shape",id:`${c}-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},u]}function kn(e,t={}){let n=e.floors;if(!n||n.length<2)return e;let o=st(e),r=[];n.forEach((u,a)=>{let{x:d,y:m}=o[a].translation;for(let y of u.objects)a>0&&y.type==="shape"&&y.role==="stage"||r.push(J(y,d,m))});let i={...e,objects:r,floors:void 0},s=G(i,{freeText:"exclude"}),l=Math.max(1,s.width,s.height),c=e.theme?.textColor??"#94a3b8";for(let u of o)r.push(...Cn(u,t.labelStyle??"number",l,c));return{...i,objects:r,referenceImage:void 0,backgroundImage:void 0}}function En(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:we(i.id)}]:[s]})),r=t?e.floors.map(i=>({id:we(i.id),label:i.name,focalPoint:{...i.focalPoint}})):e.zones;return{...e,objects:o,zones:r,floors:void 0,referenceImage:void 0,backgroundImage:ot(e)}}function ct(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=G(it(e,i.objects,i.focalPoint),{freeText:"exclude"}),l=s.width*s.height;l>r&&(r=l,o=i)}return o.id}var at=640;function On(e,t){return(e.floors?.length??0)<2?null:e.floorOverview==="combined"||!Number.isFinite(t)||t<=0||t>=at?"all":ct(e)}function Rn(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 ee(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,u=o*s+r*i-e.distance,a=n-e.height,d=Math.hypot(e.distance,e.height),m=(-e.distance*u-e.height*a)/d,y=(-e.height*u+e.distance*a)/d,b=Math.max(d*.08,m),h=e.focalLength/b;return{x:e.target.x+l*h,y:e.target.y-y*h,depth:b,scale:h}}function Tn(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 An(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 _n(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 Dn(e,t,n=()=>0){let o=ee(e,t,n(t)),r={x:t.x+1,y:t.y},i={x:t.x,y:t.y+1},s=ee(e,r,n(r)),l=ee(e,i,n(i)),c=s.x-o.x,u=s.y-o.y,a=l.x-o.x,d=l.y-o.y;return{a:c,b:u,c:a,d,e:o.x-c*t.x-a*t.y,f:o.y-u*t.x-d*t.y}}function Ln(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 lt=9;function Fn(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 jn(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 c=-i*Math.PI/180,u=Math.cos(c),a=Math.sin(c);s=o*u-r*a,l=o*a+r*u}return Math.abs(s)<=e.shape.width/2&&Math.abs(l)<=e.shape.height/2}function Nn(e,t,n,o,r){if(e.shape.kind==="circle"){let b=Math.min(Math.max(e.seat.x,t),o),h=Math.min(Math.max(e.seat.y,n),r),f=e.seat.x-b,x=e.seat.y-h;return f*f+x*x<=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),c=Math.sin(s),u=e.shape.width/2,a=e.shape.height/2,d=[[-u,-a],[u,-a],[u,a],[-u,a]].map(([b,h])=>[e.seat.x+b*l-h*c,e.seat.y+b*c+h*l]),m=[[t,n],[o,n],[o,r],[t,r]],y=[[1,0],[0,1],[l,c],[-c,l]];for(let[b,h]of y){let f=1/0,x=-1/0;for(let[p,P]of d){let M=p*b+P*h;M<f&&(f=M),M>x&&(x=M)}let S=1/0,g=-1/0;for(let[p,P]of m){let M=p*b+P*h;M<S&&(S=M),M>g&&(g=M)}if(x<S||g<f)return!1}return!0}function Bn(e,t={}){let n=t.seatRadius??lt,o=e.length,r=new Array(o),i=1/0,s=1/0,l=-1/0,c=-1/0,u=0;for(let M=0;M<o;M++){let w=e[M],I=t.shapeOf?.(w)??{kind:"circle",r:n},{hx:v,hy:C}=Fn(I);r[M]={seat:w,shape:I,hx:v,hy:C},w.x-v<i&&(i=w.x-v),w.y-C<s&&(s=w.y-C),w.x+v>l&&(l=w.x+v),w.y+C>c&&(c=w.y+C),v>u&&(u=v),C>u&&(u=C)}o===0&&(i=0,s=0,l=0,c=0);let a=u>0?u*4:1,d=Math.max(l-i,0),m=Math.max(c-s,0),y=Math.max(64,t.maxCells??o*4),b=a,h=Math.max(1,Math.ceil(d/b)||1),f=Math.max(1,Math.ceil(m/b)||1);for(;h*f>y&&(h>1||f>1);)b*=2,h=Math.max(1,Math.ceil(d/b)||1),f=Math.max(1,Math.ceil(m/b)||1);let x=h*f,S=new Int32Array(x+1),g=0;for(let M=0;M<o;M++){let w=r[M],I=D(Math.floor((w.seat.x-w.hx-i)/b),0,h-1),v=D(Math.floor((w.seat.x+w.hx-i)/b),0,h-1),C=D(Math.floor((w.seat.y-w.hy-s)/b),0,f-1),T=D(Math.floor((w.seat.y+w.hy-s)/b),0,f-1);for(let R=C;R<=T;R++)for(let E=I;E<=v;E++)S[R*h+E+1]++,g++}for(let M=0;M<x;M++)S[M+1]+=S[M];let p=new Int32Array(g),P=S.slice(0,x);for(let M=0;M<o;M++){let w=r[M],I=D(Math.floor((w.seat.x-w.hx-i)/b),0,h-1),v=D(Math.floor((w.seat.x+w.hx-i)/b),0,h-1),C=D(Math.floor((w.seat.y-w.hy-s)/b),0,f-1),T=D(Math.floor((w.seat.y+w.hy-s)/b),0,f-1);for(let R=C;R<=T;R++)for(let E=I;E<=v;E++){let O=R*h+E;p[P[O]++]=M}}return{seats:e,entries:r,minX:i,minY:s,cell:b,cols:h,rows:f,cellStart:S,items:p,stamp:new Int32Array(o),epoch:0}}function Hn(e,t,n={}){let{cols:o,rows:r,cell:i,minX:s,minY:l,cellStart:c,items:u,entries:a}=e,d=Math.floor((t.x-s)/i),m=Math.floor((t.y-l)/i);if(d<0||m<0||d>=o||m>=r)return null;let y=m*o+d,b=c[y+1],h=-1,f=1/0;for(let x=c[y];x<b;x++){let S=u[x],g=a[S];if(n.filter&&!n.filter(g.seat.id,g.seat)||!jn(g,t.x,t.y))continue;let p=t.x-g.seat.x,P=t.y-g.seat.y,M=p*p+P*P;(M<f||M===f&&S<h)&&(f=M,h=S)}return h<0?null:a[h].seat.id}function Xn(e,t,n,o={}){if(!(n>0))return null;let{cols:r,rows:i,cell:s,minX:l,minY:c,cellStart:u,items:a,entries:d}=e,m=Math.max(0,Math.floor((t.x-n-l)/s)),y=Math.min(r-1,Math.floor((t.x+n-l)/s)),b=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||b>h)return null;let f=-1,x=n*n,S=e.stamp,g=++e.epoch;for(let p=b;p<=h;p++){let P=p*r;for(let M=m;M<=y;M++){let w=P+M,I=u[w+1];for(let v=u[w];v<I;v++){let C=a[v];if(S[C]===g)continue;S[C]=g;let T=d[C];if(o.filter&&!o.filter(T.seat.id,T.seat))continue;let R=t.x-T.seat.x,E=t.y-T.seat.y,O=R*R+E*E;(O<x||O===x&&C<f)&&(x=O,f=C)}}}return f<0?null:d[f].seat.id}function Un(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:c,rows:u,cell:a,minX:d,minY:m,cellStart:y,items:b,entries:h}=e,f=Math.max(0,Math.floor((o-d)/a)),x=Math.min(c-1,Math.floor((r-d)/a)),S=Math.max(0,Math.floor((i-m)/a)),g=Math.min(u-1,Math.floor((s-m)/a));if(f>x||S>g)return[];let p=[],P=e.stamp,M=++e.epoch;for(let w=S;w<=g;w++){let I=w*c;for(let v=f;v<=x;v++){let C=I+v,T=y[C+1];for(let R=y[C];R<T;R++){let E=b[R];if(P[E]===M)continue;P[E]=M;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:Nn(O,o,i,r,s))&&p.push(E)}}}return p.sort((w,I)=>w-I),p.map(w=>h[w].seat.id)}function Yn(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 oe=Object.defineProperty;var ut=Object.getOwnPropertyDescriptor;var ft=Object.getOwnPropertyNames;var dt=Object.prototype.hasOwnProperty;var ht=(e,t)=>{for(var n in t)oe(e,n,{get:t[n],enumerable:!0})},mt=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ft(t))!dt.call(e,r)&&r!==n&&oe(e,r,{get:()=>t[r],enumerable:!(o=ut(t,r))||o.enumerable});return e};var bt=e=>mt(oe({},"__esModule",{value:!0}),e);var Gn={};ht(Gn,{AUTOMATIC_ROUND_TABLE_RADIUS_MAX:()=>Xe,AUTOMATIC_ROUND_TABLE_RADIUS_MIN:()=>He,DEFAULT_SEAT_RADIUS:()=>lt,FLOOR_STACK_GAP_RATIO:()=>rt,FLOOR_STACK_MIN_SURFACE_PX:()=>at,TABLE_SEAT_OFFSET:()=>B,TEXT_BACKGROUND_PADDING_MAX:()=>oo,TEXT_BACKGROUND_RADIUS_MAX:()=>ro,TEXT_LETTER_SPACING_MAX:()=>to,TEXT_LETTER_SPACING_MIN:()=>eo,TEXT_LINE_HEIGHT_MAX:()=>Jn,TEXT_LINE_HEIGHT_MIN:()=>Zn,TEXT_OPACITY_MIN:()=>no,TEXT_WIDTH_MAX:()=>Qn,TEXT_WIDTH_MIN:()=>qn,allObjects:()=>nt,applyAffine:()=>Tn,automaticRoundTableRadius:()=>Zt,buildAisleHoles:()=>xt,buildSeatIndex:()=>Bn,buildSectionShell:()=>yt,chartBounds:()=>V,combinedFloorZoneId:()=>we,composeAffine:()=>_n,createPerspectiveCamera:()=>Rn,cubicPoint:()=>z,decomposeAffineLinear:()=>Ln,distanceToRings:()=>Oe,distributeAlongCubic:()=>re,expandBooth:()=>Je,expandChart:()=>wn,expandRow:()=>Me,expandRowSlots:()=>qe,expandTable:()=>Ze,expandTableSlots:()=>Se,floorObjects:()=>Mn,floorStackPlacements:()=>st,floorsOf:()=>Q,gridStats:()=>Yn,hitTest:()=>Hn,initialFloorMode:()=>On,invertAffine:()=>An,layoutCombinedFloorPlan:()=>En,layoutFloorStack:()=>kn,mainFloorId:()=>ct,nearestWithin:()=>Xn,objectCenter:()=>et,owningSectionForObject:()=>tt,perspectiveTangentAffine:()=>Dn,pointInPolygon:()=>xe,pointInPolygonWithHoles:()=>K,polygonArea:()=>ce,polygonInscribedAnchor:()=>ae,polygonLabelPoint:()=>xn,polygonNetArea:()=>wt,projectPerspectivePoint:()=>te,queryRect:()=>Un,resolveSegmentedRowGroups:()=>le,rowInventoryCount:()=>bn,rowSeatPositions:()=>ge,segmentedRowComponentSeats:()=>vt,segmentedRowComponents:()=>It,segmentedRowSeatTotal:()=>Ct,smoothCubicThroughMiddle:()=>pt,stackFloors:()=>Sn,tableInventoryCount:()=>pn,tableSeatCountsBySide:()=>Qe,textLayoutMetrics:()=>ie,translateObject:()=>ee});module.exports=bt(Gn);var Vn=Math.PI/180;function N(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function j(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function z(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 pt(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 re(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[z(e,.5)];let o=Array.from({length:n+1},(c,u)=>z(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,a=o[c].y-o[c-1].y;r[c]=r[c-1]+Math.hypot(u,a)}let i=r[r.length-1];if(i<=1e-9)return Array.from({length:t},()=>({...e.start}));let s=[],l=1;for(let c=0;c<t;c+=1){let u=i*c/(t-1);for(;l<r.length-1&&r[l]<u;)l+=1;let a=r[l-1],d=r[l],m=d===a?0:(u-a)/(d-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 A(e,t){return{x:e.x+t.x,y:e.y+t.y}}function G(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 $(e,t=13){return Array.from({length:t},(n,o)=>z(e,o/(t-1)))}function Pe(e,t){let n=Math.max(0,Math.min(1,t))*(e.length-1),o=Math.min(e.length-2,Math.floor(n));return j(e[o],e[o+1],n-o)}function Ie(e,t,n){let o=Math.max(0,Math.min(1,t)),r=Math.max(o,Math.min(1,n)),i=[Pe(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(Pe(e,r)),i}function ve(e,t){let n=[[0,1],[1,2],[2,3],[3,0]],o=0,r=Number.POSITIVE_INFINITY;n.forEach(([m,y],b)=>{let h=N(j(e[m],e[y],.5),t);h<r&&(r=h,o=b)});let i=e[o],s=e[(o+1)%4],l=e[(o+2)%4],c=e[(o+3)%4],u=j(i,s,.5),a=G(t,u),d=Math.max(1e-9,Math.hypot(a.x,a.y));return{p0:i,p1:s,p2:l,p3:c,normal:_(a,1/d),depth:(N(i,c)+N(s,l))/2}}function Ce(e){let{p0:t,p1:n,p2:o,p3:r,normal:i,depth:s}=e,l=G(n,t),c=G(o,r),u=s*.22,a=s*.12;return{nearPath:{start:t,control1:A(A(t,_(l,1/3)),_(i,u)),control2:A(A(t,_(l,2/3)),_(i,u)),end:n},farPath:{start:o,control1:A(A(r,_(c,2/3)),_(i,a)),control2:A(A(r,_(c,1/3)),_(i,a)),end:r}}}function yt(e,t,n){if(e.length!==4)throw new Error("A section shell requires four mapped bounds corners");let o=e.reduce((b,h)=>A(b,h),{x:0,y:0});o.x/=4,o.y/=4;let r=N(e[0],e[1]),i=N(e[0],e[3]),s=n==="auto"?r>i*1.25&&N(o,t)>i?"bezier":"tapered":n;if(s==="rectangle")return{mode:s,outline:e.map(b=>({...b}))};let l=ve(e,t),{p0:c,p1:u,p2:a,p3:d}=l;if(s==="tapered")return{mode:s,outline:[A(c,_(G(u,c),.14)),A(c,_(G(u,c),1-.14)),a,d]};let{nearPath:m,farPath:y}=Ce(l);return{mode:s,outline:[...$(m),...$(y).slice(1)]}}function xt(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=ve(e,t),{p0:i,p1:s,p2:l,p3:c}=r,u=o==="bezier"?Ce(r):null,a=u?$(u.nearPath):null,d=u?$(u.farPath).reverse():null,m=Math.min(.055,.18/(n+1));return Array.from({length:n},(y,b)=>{let h=(b+1)/(n+1),f=h-m/2,x=h+m/2;return a&&d?[...Ie(a,f,x),...Ie(d,f,x).reverse()]:[j(i,s,f),j(i,s,x),j(c,l,x),j(c,l,f)]})}var qn=40,Qn=1200,Zn=.8,Jn=3,eo=-2,to=20,no=.1,oo=40,ro=40,ke=e=>Math.max(1,e.fontSize*.6+(e.letterSpacing??0));function gt(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/ke(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 c=l.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 ie(e){let t=e.background?.padding??0,n=e.text.split(/\r?\n/),o=Math.max(1,...n.map(l=>l.length))*ke(e),r=e.width??o+t*2,i=Math.max(1,r-t*2),s=gt(e,i);return{width:r,height:s*e.fontSize*(e.lineHeight??1.2)+t*2,lineCount:s,padding:t}}function Mt(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 Oe(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=Mt(e,o[i],o[r]);s<n&&(n=s)}return n}function Ee(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,c=t[r].y;s>e.y!=c>e.y&&e.x<(l-i)*(e.y-s)/(c-s)+i&&(n=!n)}return n}function St(e,t,n){let o=Ee(e,t)&&!n.some(i=>Ee(e,i)),r=Oe(e,[t,...n]);return o?r:-r}function H(e,t,n,o,r){let i=St({x:e,y:t},o,r);return{x:e,y:t,h:n,d:i,max:i+n*Math.SQRT2}}var se=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 ce(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 wt(e,t){return Math.max(0,ce(e)-(t??[]).reduce((n,o)=>n+ce(o),0))}function ae(e,t){let n=t??[];if(!e.length)return{point:{x:0,y:0},radius:0};if(e.length<3){let h=e.reduce((x,S)=>x+S.x,0)/e.length,f=e.reduce((x,S)=>x+S.y,0)/e.length;return{point:{x:h,y:f},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,c=s-r,u=Math.min(l,c);if(!(u>0))return{point:{x:(o+i)/2,y:(r+s)/2},radius:0};let a=Math.max(l,c)/150,d=new se,m=u/2;for(let h=o;h<i;h+=u)for(let f=r;f<s;f+=u)d.push(H(h+m,f+m,m,e,n));let y=H(o+l/2,r+c/2,0,e,n),b=0;for(;d.size;){let h=d.pop();if(!h)break;h.d>y.d&&(y=h),!(h.max-y.d<=a)&&(b>=4e3||(b+=1,m=h.h/2,d.push(H(h.x-m,h.y-m,m,e,n)),d.push(H(h.x+m,h.y-m,m,e,n)),d.push(H(h.x-m,h.y+m,m,e,n)),d.push(H(h.x+m,h.y+m,m,e,n))))}return{point:{x:y.x,y:y.y},radius:Math.max(0,y.d)}}function W(e,t,n){return Math.max(t,Math.min(n,e))}function D(e,t,n){return e<t?t:e>n?n:e}var ao=Math.PI*2;function Re(e,t,n){return Pt(e,r=>({x:r.x+t,y:r.y+n}))}function Pt(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 lo=4/3;function It(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 c=Math.max(1,Math.round(l/n)),u=l/c,a=Math.atan2(s.y-i.y,s.x-i.x),d=r===0,y=(r>0?t[r-1]:void 0)==="break"?2:1,b=d?{...i}:{x:i.x+Math.cos(a)*u*y,y:i.y+Math.sin(a)*u*y},h=d?c+1:Math.max(1,c-(y-1));o.push({origin:b,rotation:a*180/Math.PI,seatCount:h,seatSpacing:u})}return o}function vt(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 Ct(e){return e.reduce((t,n)=>t+n.seatCount,0)}function le(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,l=i[0]?.segmentedRow;if(!l||!(s>=2&&i.length===s&&l?.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===l.repeatLabelOnComponents&&(y===0?m.segmentedRow.boundaryBefore==="start":m.segmentedRow.boundaryBefore!=="start")&&m.segmentedRow.displayLabel===l.displayLabel)))continue;let u=i.reduce((m,y)=>m+y.seatCount,0),a=0,d=0;for(let m of i)m.segmentedRow.boundaryBefore==="break"&&(a+=1),t.set(m.id,{groupId:o,adjacencyOffset:a,displayOffset:d,displayLabel:l.displayLabel,totalSeats:u,canonical:i[0],viewFromSeatUrl:l.viewFromSeatUrl,viewFromSeatMeta:l.viewFromSeatMeta,confidenceEvidence:l.confidenceEvidence}),a+=m.seatCount,d+=m.seatCount}return t}var kt="ABCDEFGHIJKLMNOPQRSTUVWXYZ";var Et="abcdefghijklmnopqrstuvwxyz";function Ot(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 ue(e,t=!1){let n=t?Et:kt;return Ot(Math.max(0,Math.floor(e)-1),n)}var Rt=[[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 Te(e){if(!Number.isFinite(e)||e<=0)return String(e);let t=Math.floor(e),n="";for(let[o,r]of Rt)for(;t>=o;)n+=r,t-=o;return n}function Tt(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 q(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,c=e.seatCount;if(i==="updown"||i==="updown-descending"){let y=Math.ceil(c/2),b=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}${b}`}let u=i==="odd"||i==="even"?2:r,a=l!=null&&Number.isFinite(l)?l-(c-1)*u:n,d=o==="center"?Tt(c)[t]:o==="rtl"?c-1-t:t,m;switch(i){case"odd":{let y=a%2===1?a:a+1;m=String(y+d*2);break}case"even":{let y=a%2===0?a:a+1;m=String(y+d*2);break}case"roman":m=Te(a+d*r);break;case"letters-upper":m=ue(a+d*r,!1);break;case"letters-lower":m=ue(a+d*r,!0);break;default:m=String(a+d*r);break}return`${s}${m}`}function At(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function Ae(e,t,n){return n?.label??`${e.seatLabelBase??e.label}-${q(e,t)}`}function fe(e,t,n,o){if(o?.displayLabel)return o.displayLabel;if(e.seatDisplayLabelMode==="number")return q(e,t);if(!n)return`${e.displayLabel||e.label}-${q(e,t)}`;let r=At(n),i=n.displayOffset+t;return`${n.displayLabel}-${q(r,i)}`}var X=.02291666666666667,po=1/X,_t=58,Dt=_t*X;var Lt=3,_e=0,de=120,Ft=0,jt=45,Nt=7,U=1.2;function he(e,t,n,o){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):o}function Bt(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=Nt?e:Lt}function De(e,t={}){let n=he(t.floorBaseHeightM,_e,de,0),o=Math.min(de,n+Bt(e.elevation)*Dt),r=e.height===void 0?o:he(e.height,_e,de,o),i=he(e.rake,Ft,jt,0);return{height:r,rake:i}}function Le(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 Fe(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,c=s.y-i.y,u=l*l+c*c,a=u>1e-12?((t-i.x)*l+(n-i.y)*c)/u:0;a<0?a=0:a>1&&(a=1);let d=Math.hypot(t-(i.x+a*l),n-(i.y+a*c));d<o&&(o=d)}return o}function Ht(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 je(e,t){return Math.hypot(e.cx-t.cx,e.cy-t.cy)-e.r-t.r}function me(e,t){let n=1/0;for(let o of Le(e)){let r=Fe(t,o.x,o.y);r<n&&(n=r)}for(let o of Le(t)){let r=Fe(e,o.x,o.y);r<n&&(n=r)}return n}function Xt(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 d=Math.hypot(a.x-n,a.y-o);d>r&&(r=d,i=a)}let s=i.x-n,l=i.y-o,c=Math.hypot(s,l);c>1e-9?(s/=c,l/=c):(s=1,l=0);let u=e.map((a,d)=>({p:a,i:d,t:(a.x-n)*s+(a.y-o)*l})).sort((a,d)=>a.t-d.t);return{pts:u.map(a=>a.p),seatIndices:u.map(a=>t[a.i])}}function Ut(e){let t=e.length;if(t<3)return null;let n=0,o=0;for(let S of e)n+=S.x,o+=S.y;n/=t,o/=t;let r=0,i=0,s=0,l=0,c=0,u=0,a=0;for(let S of e){let g=S.x-n,p=S.y-o;r+=g*g,s+=p*p,i+=g*p,l+=g*g*g,c+=p*p*p,u+=g*p*p,a+=p*g*g}let d=r*s-i*i;if(Math.abs(d)<1e-9)return null;let m=(l+u)/2,y=(c+a)/2,b=(m*s-y*i)/d,h=(y*r-m*i)/d,f=b+n,x=h+o;return!Number.isFinite(f)||!Number.isFinite(x)?null:{cx:f,cy:x}}var Yt=.15;function Gt(e){if(e.length<2)return null;let t=e.map(S=>{let g=0,p=0;for(let P of S.pts)g+=P.x,p+=P.y;return{x:g/S.pts.length,y:p/S.pts.length}}),n=0,o=0;for(let S of t)n+=S.x,o+=S.y;n/=t.length,o/=t.length;let r=0,i=0,s=0;for(let S of t){let g=S.x-n,p=S.y-o;r+=g*g,i+=g*p,s+=p*p}let l=r+s,c=r*s-i*i,u=l/2+Math.sqrt(Math.max(0,l*l/4-c)),a,d;Math.abs(i)>1e-12?(a=u-s,d=i):r>=s?(a=1,d=0):(a=0,d=1);let m=Math.hypot(a,d);if(!(m>1e-12))return null;a/=m,d/=m;let y=1/0,b=-1/0,h=[];for(let S of e){let g=1/0,p=-1/0;for(let P of S.pts){let M=P.x*a+P.y*d;M<g&&(g=M),M>p&&(p=M),M<y&&(y=M),M>b&&(b=M)}h.push(p-g)}let f=b-y;return f>1e-9?(h.sort((S,g)=>S-g),h[Math.min(h.length-1,Math.floor(h.length*.9))]/f<=Kt?{x:a,y:d}:null):null}var Kt=.35;function Ne(e,t,n,o){let r=new Map;for(let f of n){let x=t[f],S=x.rowId||`__seat-${f}`,g=r.get(S);g||(g={pts:[],idx:[]},r.set(S,g)),g.pts.push({x:x.x,y:x.y}),g.idx.push(f)}if(!r.size)return{sectionId:e,rows:[],blockCount:0};let i=[];for(let[f,x]of r){let S=Xt(x.pts,x.idx),g=0;for(let p of S.pts)g+=Math.hypot(p.x-o.x,p.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=>Ht(f.pts)),l=[];for(let f=0;f<i.length;f++){let x=1/0;for(let S=0;S<i.length;S++){if(f===S||je(s[f],s[S])>=x)continue;let g=me(i[f].pts,i[S].pts);g<x&&(x=g)}Number.isFinite(x)&&l.push(x)}l.sort((f,x)=>f-x);let c=l.length?l[Math.floor(l.length/2)]:1,u=Math.max(c*1.8,1e-6),a=i.map(()=>[]);for(let f=0;f<i.length;f++)for(let x=f+1;x<i.length;x++)je(s[f],s[x])>u||me(i[f].pts,i[x].pts)<=u&&(a[f].push(x),a[x].push(f));let d=0;for(let f=0;f<i.length;f++){if(i[f].blockId!==-1)continue;let x=d++,S=[f];for(i[f].blockId=x;S.length;){let g=S.pop();for(let p of a[g])i[p].blockId===-1&&(i[p].blockId=x,S.push(p))}}let m=new Map;for(let f of i){let x=m.get(f.blockId)??[];x.push(f),m.set(f.blockId,x)}let y=[];for(let f of i){if(f.pts.length<4)continue;let x=Ut(f.pts);x&&(!Number.isFinite(x.cx)||!Number.isFinite(x.cy)||y.push({x:x.cx,y:x.cy}))}let b=y.length>=2?(()=>{let f=y.map(g=>g.x).sort((g,p)=>g-p),x=y.map(g=>g.y).sort((g,p)=>g-p),S=Math.floor(y.length/2);return{cx:f[S],cy:x[S]}})():null;if(b){let f=M=>Math.hypot(M.x-b.cx,M.y-b.cy),x=1/0,S=-1/0,g=[];for(let M of i){let w=1/0,I=-1/0;for(let v of M.pts){let C=f(v);C<w&&(w=C),C>I&&(I=C)}g.push(I-w),w<x&&(x=w),I>S&&(S=I)}let p=S-x;g.sort((M,w)=>M-w);let P=g[Math.min(g.length-1,Math.floor(g.length*.9))];if(p>1e-9&&P/p<=Yt){let M=i.map(k=>{let L=0;for(let F of k.pts)L+=f(F);return{row:k,radius:L/k.pts.length}}),w=0,I=0;for(let k of M)w+=k.radius,I+=k.row.focalDistance;w/=M.length,I/=M.length;let v=0;for(let k of M)v+=(k.radius-w)*(k.row.focalDistance-I);if(v<0)for(let k of M)k.radius=-k.radius;let T=1/0;for(let k of M)k.radius<T&&(T=k.radius);M.sort((k,L)=>k.radius-L.radius);let R=-1,E=-1/0,O=p/Math.max(1,M.length)*.5,Y=[];for(let k of M)k.radius-E>O&&(R++,E=k.radius),k.row.ordinal=R,k.row.blockDepth=k.radius-T,Y.push(k.row);return{sectionId:e,rows:Y,blockCount:d}}}let h=[];for(let[,f]of m){let x=Gt(f);if(x){let S=p=>{let P=0;for(let M of p.pts)P+=M.x*x.x+M.y*x.y;return P/p.pts.length};f.sort((p,P)=>S(p)-S(P)),f.length>=2&&f[0].focalDistance>f[f.length-1].focalDistance&&f.reverse();let g=0;for(let p=0;p<f.length;p++)p>0&&(g+=me(f[p-1].pts,f[p].pts)),f[p].ordinal=p,f[p].blockDepth=g,h.push(f[p])}else{let S=1/0;for(let g of f)g.focalDistance<S&&(S=g.focalDistance);f.sort((g,p)=>g.focalDistance-p.focalDistance);for(let g=0;g<f.length;g++)f[g].ordinal=g,f[g].blockDepth=Math.max(0,f[g].focalDistance-S),h.push(f[g])}}return{sectionId:e,rows:h,blockCount:d}}var Vt=/^\d{4}-\d{2}-\d{2}$/;function zt(e){let t=Date.parse(e);return Number.isFinite(t)?Vt.test(e)?t+864e5:t:null}function $t(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=zt(e.validUntil);return n===null?!1:(t instanceof Date?t.getTime():t)<n}function Wt(e,t,n){return!(e.eventConfigurationId&&e.eventConfigurationId!==t||e.eventConfigurationVersion!==void 0&&e.eventConfigurationVersion!==n)}function qt(e){return e.status!=="draft"&&e.status!=="retracted"}function Qt(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 Be(e,t={}){return!!e&&qt(e)&&Wt(e,t.activeConfigurationId,t.activeConfigurationVersion)&&Qt(e,t.activeBasisSha256)&&$t(e,t.now)}var He=36,Xe=160;function Zt(e,t=360){let n=W(Math.round(Number.isFinite(e)?e:1),1,40),o=W(Number.isFinite(t)?t:360,120,360);return Math.round(W(n*4*(360/o),He,Xe))}var wo=Math.PI*2;function Ue(e){return e==="pitch-football"||e==="rink-hockey"||e==="track-athletics"||e==="oval-cricket"}function Jt(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 en(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 Ye(e){let t=Jt(e);if(!t||t.length<2)return null;let n=e.rotation??0,o=Math.abs(n)<1e-6?t:t.map(c=>en(c,{x:t.reduce((u,a)=>u+a.x,0)/t.length,y:t.reduce((u,a)=>u+a.y,0)/t.length},n)),r=1/0,i=1/0,s=-1/0,l=-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),l=Math.max(l,c.y);return!Number.isFinite(r)||s-r<1e-6||l-i<1e-6?null:{minX:r,minY:i,maxX:s,maxY:l}}var tn=5,nn=3,on=.92,rn=1.9,sn=2,cn=.6,an=1,ln=.06;function un(e){return e.heightM!==void 0?e.heightM:Ue(e.stageKind)?ln:an}function Ge(e){let t=1/0,n=1/0,o=-1/0,r=-1/0,i=-1/0;for(let s of Q(e)){let l=s.baseHeightM??0;for(let c of s.objects){if(c.type!=="shape"||c.role!=="stage")continue;let u=Ye(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,l+un(c)))}}return!Number.isFinite(t)||!Number.isFinite(i)?null:{minX:t,minY:n,maxX:o,maxY:r,deckTopM:i}}function fn(e,t,n,o){let r=1/0,i=1/0,s=-1/0,l=-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),l=Math.max(l,y.y));if(!Number.isFinite(r))return null;let c=r*t,u=i*t,a=Math.max(1,Math.ceil((s-r)*t/n)+1),d=Math.max(1,Math.ceil((l-i)*t/n)+1),m=new Float64Array(a*d).fill(-1/0);for(let y of e){if(!Number.isFinite(y.eyeHeightM))continue;let b=y.eyeHeightM-U,h=Math.min(a-1,Math.max(0,Math.floor((y.x*t-c)/n))),x=Math.min(d-1,Math.max(0,Math.floor((y.y*t-u)/n)))*a+h,S=b+o;S>m[x]&&(m[x]=S)}return{cellM:n,minX:c,minY:u,cols:a,rows:d,top:m}}function dn(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 Ke(e,t,n={}){let o=new Map;if(!t||!e.length)return o;let r=n.metresPerChartUnit??X,i=n.cellM??cn,s=n.chairBackM??on,l=n.selfRowSkipM??sn,c=n.clearThreshold??.9,u=n.partialThreshold??.25,a=Math.max(1,n.columns??tn),d=Math.max(1,n.rows??nn),m=fn(e,r,i,s);if(!m)return o;let y=(t.maxX-t.minX)*r,b=(t.maxY-t.minY)*r,h=y>=b,f=(t.minX+t.maxX)/2*r,x=(t.minY+t.maxY)/2*r,S=[];for(let p=0;p<a;p++){let P=(p+.5)/a-.5,M=h?f+P*y:f,w=h?x:x+P*b;for(let I=0;I<d;I++){let v=t.deckTopM+(d===1?0:I/(d-1)*rn);S.push({x:M,y:w,z:v})}}let g=i/2;for(let p of e){if(!Number.isFinite(p.eyeHeightM))continue;let P=p.x*r,M=p.y*r,w=p.eyeHeightM,I=0,v=1/0;for(let T of S){let R=T.x-P,E=T.y-M,O=Math.hypot(R,E);if(!(O>l)){I++;continue}let Y=R/O,k=E/O,L=0;for(let F=l;F<O;F+=g){let ne=dn(m,P+Y*F,M+k*F);if(!(!Number.isFinite(ne)||ne>=w)&&ne>w+(T.z-w)*F/O){L=F;break}}L?v=Math.min(v,L):I++}let C=I/S.length;C>=c||o.set(p.id,{seatId:p.id,mark:C<u?"obstructedView":"restrictedView",visibleFraction:C,totalRays:S.length,atDistanceM:Number.isFinite(v)?v:0})}return o}function Ve(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 be(e){return e?e.accessibility?.length?e.wheelchairSpaceType&&!e.accessibility.includes("wheelchair")?["wheelchair",...e.accessibility]:e.accessibility:e.wheelchairSpaceType?["wheelchair"]:e.accessible?["wheelchair"]:[]:[]}var J=Math.PI/180,hn=9,B=16;function ye(e,t,n,o){let r=n*J,i=Math.cos(r),s=Math.sin(r);return{x:o.x+e*i-t*s,y:o.y+e*s+t*i}}function ge(e){let{seatCount:t,seatSpacing:n,curve:o,rotation:r,origin:i}=e,s=[];if(e.path)return re(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(ye(u*n,0,r,i));return s}let l=o/(t-1)*J,c=n/(2*Math.sin(Math.abs(l)/2));for(let u=0;u<t;u++){let a=u*l,d=c*Math.sin(a),m=-c+c*Math.cos(a);s.push(ye(d,m,r,i))}return s}function mn(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function bn(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 qe(e,t){let n=mn(e);return ge(e).map((o,r)=>{let i=n.get(r),s=be(i),l=Ae(e,r,i),c={...e.commercial,...i?.commercial};return{index:r,x:o.x+(i?.dx??0),y:o.y+(i?.dy??0),label:l,displayLabel:fe(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 Me(e){let t=[];for(let n of qe(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 Qe(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 Se(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,d,m,y)=>{let b=o.get(a),h=be(b),f=b?.label??`${e.label}-${a+1}`,x=e.displayLabel??e.label;return{index:a,label:f,displayLabel:b?.displayLabel??`${x}-${a+1}`,x:d+(b?.dx??0),y:m+(b?.dy??0),categoryKey:b?.categoryKey??e.categoryKey,skipped:!!b?.skip,accessible:h.length>0,accessibility:h,wheelchairSpaceType:b?.wheelchairSpaceType,commercial:b?.commercial,glyph:b?.glyph,viewUrl:b?.viewFromSeatUrl,viewMeta:b?.viewFromSeatUrl?b.viewFromSeatMeta:void 0,labelStyle:b?.labelStyle,...y?{side:y}:{}}};if(e.shape==="round"){let a=(e.radius??40)+B,d=e.rotation*J,m=Math.max(0,Math.min(360,e.seatArc??360));if(m>=360||n===1){for(let f=0;f<n;f++){let x=d+f/n*2*Math.PI;t.push(r(f,e.center.x+a*Math.cos(x),e.center.y+a*Math.sin(x)))}return t}let y=m*J,b=(2*Math.PI-y)/2,h=d+b;for(let f=0;f<n;f++){let x=h+f/(n-1)*y;t.push(r(f,e.center.x+a*Math.cos(x),e.center.y+a*Math.sin(x)))}return t}let i=e.width??80,s=e.height??50,l=Qe(e),c=["top","bottom","left","right"],u=0;for(let a of c){let d=l[a];for(let m=0;m<d;m++){let y,b;a==="top"?(y=-i/2+(m+.5)*i/d,b=-s/2-B):a==="bottom"?(y=-i/2+(m+.5)*i/d,b=s/2+B):a==="left"?(y=-i/2-B,b=-s/2+(m+.5)*s/d):(y=i/2+B,b=-s/2+(m+.5)*s/d);let h=ye(y,b,e.rotation,e.center);t.push(r(u++,h.x,h.y,a))}}return t}function pn(e){return e.bookAsWhole||e.variableOccupancy?Math.max(0,Math.round(e.seatCount)):Se(e).filter(t=>!t.skipped).length}function Ze(e){return Se(e).filter(t=>!t.skipped).map(t=>({id:`${e.id}:${t.index}`,label:t.label,...t.displayLabel!==t.label?{displayLabel:t.displayLabel}:{},x:t.x,y:t.y,rowId:e.id,categoryKey:t.categoryKey,...t.accessible?{accessible:!0}:{},...t.accessibility.length?{accessibility:t.accessibility}:{},...t.wheelchairSpaceType?{wheelchairSpaceType:t.wheelchairSpaceType}:{},...t.commercial?{commercial:t.commercial}:{},...t.glyph?{glyph:t.glyph}:{},...t.viewUrl?{viewUrl:t.viewUrl}:{},...t.viewUrl&&t.viewMeta?{viewMeta:t.viewMeta}:{},...t.labelStyle?{labelStyle:t.labelStyle}:{}}))}function Je(e){return[{id:`${e.id}:0`,label:e.label,...e.displayLabel&&e.displayLabel!==e.label?{displayLabel:e.displayLabel}:{},x:e.center.x,y:e.center.y,rowId:e.id,categoryKey:e.categoryKey,kind:"booth"}]}function xe(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,s=t[o].y,l=t[r].x,c=t[r].y;s>e.y!=c>e.y&&e.x<(l-i)*(e.y-s)/(c-s)+i&&(n=!n)}return n}function yn(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 K(e,t,n){return xe(e,t)&&!(n??[]).some(o=>xe(e,o)||yn(e,o))}function xn(e,t){return ae(e,t).point}function pe(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 et(e){switch(e.type){case"row":{let t=Me(e);if(!t.length)return{x:e.origin.x,y:e.origin.y};let n=0,o=0;for(let r of t)n+=r.x,o+=r.y;return{x:n/t.length,y:o/t.length}}case"table":case"booth":return{x:e.center.x,y:e.center.y};case"gaArea":return pe(e.points);case"section":return pe(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?pe(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 gn(e,t){if(e.type!=="gaArea"||!ze(e.points,t.outline))return!1;let n=e.holes??[],o=t.holes??[];return n.length===o.length&&n.every((r,i)=>ze(r,o[i]))}function tt(e,t){let n=e.filter(s=>s.type==="section"),o="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0,r=et(t);return(o?n.find(s=>(s.logicalSectionId??s.id)===o&&(gn(t,s)||K(r,s.outline,s.holes))):void 0)??n.find(s=>K(r,s.outline,s.holes))}function Q(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 Mn(e,t){let n=Q(e);return(t?n.find(o=>o.id===t):n[0])?.objects??[]}function nt(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}function ee(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:Re(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 Sn(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:ee(s,0,i))}),{...e,objects:n,floors:void 0}}function $e(e,t,n,o,r,i,s,l,c){let u=[],a=le(e),d=b=>!b?.eventConfigurationId||b.eventConfigurationId===o&&(b.eventConfigurationVersion===void 0||b.eventConfigurationVersion===c),m=b=>Be(b,{activeConfigurationId:o,activeConfigurationVersion:c,activeBasisSha256:r,now:l}),y=(b,h)=>m(b)?{...b,coverage:h}:void 0;for(let b of e){let h=[];if(b.type==="row"?h=Me(b):b.type==="table"?h=Ze(b):b.type==="booth"&&(h=Je(b)),!h.length)continue;for(let p of h)p.viewUrl&&!d(p.viewMeta)&&(p.viewUrl=void 0,p.viewMeta=void 0);if(b.type==="row"){let p=a.get(b.id);if(p){let P=new Map((b.overrides??[]).map(M=>[M.index,M]));for(let M of h){let w=Number(M.id.slice(M.id.lastIndexOf(":")+1));if(!Number.isInteger(w))continue;M.logicalRowId=p.groupId,M.logicalSeatIndex=p.adjacencyOffset+w,P.get(w)?.displayLabel||(M.displayLabel=fe(b,w,p)),!M.viewUrl&&p.viewFromSeatUrl&&d(p.viewFromSeatMeta)&&(M.viewUrl=p.viewFromSeatUrl,M.viewMeta=p.viewFromSeatMeta);let I=P.get(w)?.confidenceEvidence;M.confidenceEvidence=y(I,"exact-seat")??y(b.confidenceEvidence,"row-representative")??y(p.confidenceEvidence,"row-representative")}}}let f=tt(e,b),x=f?.viewFromSeatUrl,g=(f?.zone?t?.find(p=>p.id===f.zone):void 0)?.focalPoint??n;for(let p of h){if(!p.confidenceEvidence){let P=Number(p.id.slice(p.id.lastIndexOf(":")+1)),M=(b.type==="row"||b.type==="table")&&Number.isInteger(P)?b.overrides?.find(w=>w.index===P)?.confidenceEvidence:void 0;p.confidenceEvidence=y(M,"exact-seat")??(b.type==="row"?y(b.confidenceEvidence,"row-representative"):void 0)}p.confidenceEvidence??=y(f?.confidenceEvidence,"section-representative")??(s?y(s.evidence,s.coverage):void 0),!p.viewUrl&&x&&d(f?.viewFromSeatMeta)&&(p.viewUrl=x,p.viewMeta=f?.viewFromSeatMeta),!p.viewUrl&&i&&d(i.meta)&&(p.viewUrl=i.url,p.viewMeta=i.meta),f&&(p.sectionId=f.logicalSectionId??f.id),f?.zone&&(p.zoneId=f.zone),g&&(p.focalPoint={...g})}u.push(...h)}return u}function wn(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,c=$e(r.objects,e.zones,i,e.eventConfigurationId,e.confidenceBasisSha256,s,l,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);t.resolveEyeHeights!==!1&&We(r.objects,r.focalPoint??e.focalPoint,r.baseHeightM??0,c);for(let u of c)u.floorId=r.id;o.push(...c)}return o}let n=$e(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&&We(e.objects,e.focalPoint,t.floorBaseHeightM??0,n),Pn(e,n,t)}function Pn(e,t,n){return!n.deriveRestrictedView||e.derivedRestrictedView===!1||n.resolveEyeHeights===!1||Ve(t,Ke(t,Ge(e))),t}function We(e,t,n,o){let r=e.filter(a=>a.type==="section"),i=n>0||r.some(a=>a.height!==void 0||a.rake!==void 0||(a.elevation??0)>0);if(!r.length||!i||!t){for(let a of o)a.eyeHeightM=n+U;return}let s=new Array(o.length),l=new Map,c=new Map;for(let a=0;a<o.length;a++){let d=o[a],y=(d.sectionId?r.find(h=>h.id===d.sectionId)??r.find(h=>h.logicalSectionId===d.sectionId&&K({x:d.x,y:d.y},h.outline,h.holes)):void 0)??r.find(h=>K({x:d.x,y:d.y},h.outline,h.holes))??null;if(s[a]=y,!y)continue;l.has(y.id)||l.set(y.id,De(y,{floorBaseHeightM:n}));let b=c.get(y.id);b?b.push(a):c.set(y.id,[a])}let u=new Array(o.length).fill(void 0);for(let[a,d]of c){let m=l.get(a);if(!m)continue;let y=m.rake>0?Math.tan(m.rake*Math.PI/180):0,b=Ne(a,o,d,t);for(let h of b.rows){let f=h.blockDepth*X*y,x=m.height+f;for(let S of h.seatIndices)u[S]=x}}for(let a=0;a<o.length;a++){let d=o[a],m=s[a];if(!m){d.eyeHeightM=n+U;continue}let y=l.get(m.id);d.eyeHeightM=(u[a]??y.height)+U}}var Z=40;function V(e,t){let n=t?.freeText==="exclude",o=1/0,r=1/0,i=-1/0,s=-1/0,l=(c,u)=>{c<o&&(o=c),u<r&&(r=u),c>i&&(i=c),u>s&&(s=u)};for(let c of nt(e))if(c.type==="row"){let u=new Map((c.overrides??[]).map(a=>[a.index,a]));ge(c).forEach((a,d)=>{let m=u.get(d);m?.skip||l(a.x+(m?.dx??0),a.y+(m?.dy??0))})}else if(c.type==="gaArea")for(let u of c.points)l(u.x,u.y);else if(c.type==="section")for(let u of c.outline)l(u.x,u.y);else if(c.type==="decorImage")l(c.x,c.y),l(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)l(u.x,u.y);else 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 u=B+hn,a=c.shape==="round"?(c.radius??40)+u:Math.max((c.width??80)/2,(c.height??50)/2)+u;l(c.center.x-a,c.center.y-a),l(c.center.x+a,c.center.y+a)}else if(c.type==="booth"){let u=Math.max(c.width,c.height)/2;l(c.center.x-u,c.center.y-u),l(c.center.x+u,c.center.y+u)}else if(c.type==="text"){if(n)continue;let u=ie(c);l(c.position.x,c.position.y),l(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:a}=c,d=a*3/4;l(u.x-a/2,u.y-d/2),l(u.x+a/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-Z,y:r-Z,width:i-o+Z*2,height:s-r+Z*2}}function ot(e){let t=e.backgroundImage;return t?.url&&!t.assetId?t:void 0}var rt=.08,In=.045;function we(e){return`__floor__:${encodeURIComponent(e)}`}function it(e,t,n){return{...e,objects:t,floors:void 0,...n?{focalPoint:n}:{},referenceImage:void 0,backgroundImage:void 0}}function vn(e,t,n){let o=e.focalPoint??t.focalPoint;return o?o.x:n.x+n.width/2}function st(e){let t=e.floors??[];if(!t.length)return[];let n=t.map(s=>V(it(e,s.objects,s.focalPoint),{freeText:"exclude"})),r=Math.max(1,...n.map(s=>s.width))*rt,i=0;return t.map((s,l)=>{let c=n[l],u=i-(c.y+c.height);return i-=c.height+r,{floorId:s.id,label:s.name??s.id,level:l,levelBadge:l===0?"G":String(l),translation:{x:-vn(s,e,c),y:u},bounds:c}})}function Cn(e,t,n,o){let r=t==="name"?e.label:e.levelBadge;if(!r)return[];let i=Math.max(1,n*In),s=e.bounds.x+e.translation.x,l=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:l},fontSize:i,rotation:0,color:o,bold:!0};if(t==="name")return[u];let a=i*.95;return[{type:"shape",id:`${c}-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},u]}function kn(e,t={}){let n=e.floors;if(!n||n.length<2)return e;let o=st(e),r=[];n.forEach((u,a)=>{let{x:d,y:m}=o[a].translation;for(let y of u.objects)a>0&&y.type==="shape"&&y.role==="stage"||r.push(ee(y,d,m))});let i={...e,objects:r,floors:void 0},s=V(i,{freeText:"exclude"}),l=Math.max(1,s.width,s.height),c=e.theme?.textColor??"#94a3b8";for(let u of o)r.push(...Cn(u,t.labelStyle??"number",l,c));return{...i,objects:r,referenceImage:void 0,backgroundImage:void 0}}function En(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:we(i.id)}]:[s]})),r=t?e.floors.map(i=>({id:we(i.id),label:i.name,focalPoint:{...i.focalPoint}})):e.zones;return{...e,objects:o,zones:r,floors:void 0,referenceImage:void 0,backgroundImage:ot(e)}}function ct(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=V(it(e,i.objects,i.focalPoint),{freeText:"exclude"}),l=s.width*s.height;l>r&&(r=l,o=i)}return o.id}var at=640;function On(e,t){return(e.floors?.length??0)<2?null:e.floorOverview==="combined"||!Number.isFinite(t)||t<=0||t>=at?"all":ct(e)}function Rn(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 te(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,u=o*s+r*i-e.distance,a=n-e.height,d=Math.hypot(e.distance,e.height),m=(-e.distance*u-e.height*a)/d,y=(-e.height*u+e.distance*a)/d,b=Math.max(d*.08,m),h=e.focalLength/b;return{x:e.target.x+l*h,y:e.target.y-y*h,depth:b,scale:h}}function Tn(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 An(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 _n(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 Dn(e,t,n=()=>0){let o=te(e,t,n(t)),r={x:t.x+1,y:t.y},i={x:t.x,y:t.y+1},s=te(e,r,n(r)),l=te(e,i,n(i)),c=s.x-o.x,u=s.y-o.y,a=l.x-o.x,d=l.y-o.y;return{a:c,b:u,c:a,d,e:o.x-c*t.x-a*t.y,f:o.y-u*t.x-d*t.y}}function Ln(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 lt=9;function Fn(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 jn(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 c=-i*Math.PI/180,u=Math.cos(c),a=Math.sin(c);s=o*u-r*a,l=o*a+r*u}return Math.abs(s)<=e.shape.width/2&&Math.abs(l)<=e.shape.height/2}function Nn(e,t,n,o,r){if(e.shape.kind==="circle"){let b=Math.min(Math.max(e.seat.x,t),o),h=Math.min(Math.max(e.seat.y,n),r),f=e.seat.x-b,x=e.seat.y-h;return f*f+x*x<=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),c=Math.sin(s),u=e.shape.width/2,a=e.shape.height/2,d=[[-u,-a],[u,-a],[u,a],[-u,a]].map(([b,h])=>[e.seat.x+b*l-h*c,e.seat.y+b*c+h*l]),m=[[t,n],[o,n],[o,r],[t,r]],y=[[1,0],[0,1],[l,c],[-c,l]];for(let[b,h]of y){let f=1/0,x=-1/0;for(let[p,P]of d){let M=p*b+P*h;M<f&&(f=M),M>x&&(x=M)}let S=1/0,g=-1/0;for(let[p,P]of m){let M=p*b+P*h;M<S&&(S=M),M>g&&(g=M)}if(x<S||g<f)return!1}return!0}function Bn(e,t={}){let n=t.seatRadius??lt,o=e.length,r=new Array(o),i=1/0,s=1/0,l=-1/0,c=-1/0,u=0;for(let M=0;M<o;M++){let w=e[M],I=t.shapeOf?.(w)??{kind:"circle",r:n},{hx:v,hy:C}=Fn(I);r[M]={seat:w,shape:I,hx:v,hy:C},w.x-v<i&&(i=w.x-v),w.y-C<s&&(s=w.y-C),w.x+v>l&&(l=w.x+v),w.y+C>c&&(c=w.y+C),v>u&&(u=v),C>u&&(u=C)}o===0&&(i=0,s=0,l=0,c=0);let a=u>0?u*4:1,d=Math.max(l-i,0),m=Math.max(c-s,0),y=Math.max(64,t.maxCells??o*4),b=a,h=Math.max(1,Math.ceil(d/b)||1),f=Math.max(1,Math.ceil(m/b)||1);for(;h*f>y&&(h>1||f>1);)b*=2,h=Math.max(1,Math.ceil(d/b)||1),f=Math.max(1,Math.ceil(m/b)||1);let x=h*f,S=new Int32Array(x+1),g=0;for(let M=0;M<o;M++){let w=r[M],I=D(Math.floor((w.seat.x-w.hx-i)/b),0,h-1),v=D(Math.floor((w.seat.x+w.hx-i)/b),0,h-1),C=D(Math.floor((w.seat.y-w.hy-s)/b),0,f-1),T=D(Math.floor((w.seat.y+w.hy-s)/b),0,f-1);for(let R=C;R<=T;R++)for(let E=I;E<=v;E++)S[R*h+E+1]++,g++}for(let M=0;M<x;M++)S[M+1]+=S[M];let p=new Int32Array(g),P=S.slice(0,x);for(let M=0;M<o;M++){let w=r[M],I=D(Math.floor((w.seat.x-w.hx-i)/b),0,h-1),v=D(Math.floor((w.seat.x+w.hx-i)/b),0,h-1),C=D(Math.floor((w.seat.y-w.hy-s)/b),0,f-1),T=D(Math.floor((w.seat.y+w.hy-s)/b),0,f-1);for(let R=C;R<=T;R++)for(let E=I;E<=v;E++){let O=R*h+E;p[P[O]++]=M}}return{seats:e,entries:r,minX:i,minY:s,cell:b,cols:h,rows:f,cellStart:S,items:p,stamp:new Int32Array(o),epoch:0}}function Hn(e,t,n={}){let{cols:o,rows:r,cell:i,minX:s,minY:l,cellStart:c,items:u,entries:a}=e,d=Math.floor((t.x-s)/i),m=Math.floor((t.y-l)/i);if(d<0||m<0||d>=o||m>=r)return null;let y=m*o+d,b=c[y+1],h=-1,f=1/0;for(let x=c[y];x<b;x++){let S=u[x],g=a[S];if(n.filter&&!n.filter(g.seat.id,g.seat)||!jn(g,t.x,t.y))continue;let p=t.x-g.seat.x,P=t.y-g.seat.y,M=p*p+P*P;(M<f||M===f&&S<h)&&(f=M,h=S)}return h<0?null:a[h].seat.id}function Xn(e,t,n,o={}){if(!(n>0))return null;let{cols:r,rows:i,cell:s,minX:l,minY:c,cellStart:u,items:a,entries:d}=e,m=Math.max(0,Math.floor((t.x-n-l)/s)),y=Math.min(r-1,Math.floor((t.x+n-l)/s)),b=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||b>h)return null;let f=-1,x=n*n,S=e.stamp,g=++e.epoch;for(let p=b;p<=h;p++){let P=p*r;for(let M=m;M<=y;M++){let w=P+M,I=u[w+1];for(let v=u[w];v<I;v++){let C=a[v];if(S[C]===g)continue;S[C]=g;let T=d[C];if(o.filter&&!o.filter(T.seat.id,T.seat))continue;let R=t.x-T.seat.x,E=t.y-T.seat.y,O=R*R+E*E;(O<x||O===x&&C<f)&&(x=O,f=C)}}}return f<0?null:d[f].seat.id}function Un(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:c,rows:u,cell:a,minX:d,minY:m,cellStart:y,items:b,entries:h}=e,f=Math.max(0,Math.floor((o-d)/a)),x=Math.min(c-1,Math.floor((r-d)/a)),S=Math.max(0,Math.floor((i-m)/a)),g=Math.min(u-1,Math.floor((s-m)/a));if(f>x||S>g)return[];let p=[],P=e.stamp,M=++e.epoch;for(let w=S;w<=g;w++){let I=w*c;for(let v=f;v<=x;v++){let C=I+v,T=y[C+1];for(let R=y[C];R<T;R++){let E=b[R];if(P[E]===M)continue;P[E]=M;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:Nn(O,o,i,r,s))&&p.push(E)}}}return p.sort((w,I)=>w-I),p.map(w=>h[w].seat.id)}function Yn(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,8 +1,8 @@
1
- import { P as Point, v as CubicPath, w as TextObject } from '../../types-bJU5OwWf.cjs';
2
- export { F as FloorLabelStyle } from '../../types-bJU5OwWf.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-Ca0vDrxf.cjs';
4
- export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-DgZ-j0cp.cjs';
5
- import { E as ExpandedSeat } from '../../renderer-BnidPieD.cjs';
1
+ import { P as Point, v as CubicPath, w as TextObject } from '../../types-pwg1Vsz-.cjs';
2
+ export { F as FloorLabelStyle } from '../../types-pwg1Vsz-.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-DVTmR9Wg.cjs';
4
+ export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-DkGr4Jb7.cjs';
5
+ import { E as ExpandedSeat } from '../../renderer-C7veuoCF.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
- import { P as Point, v as CubicPath, w as TextObject } from '../../types-bJU5OwWf.js';
2
- export { F as FloorLabelStyle } from '../../types-bJU5OwWf.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-Sr9fm8g5.js';
4
- export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-ChRMKKxC.js';
5
- import { E as ExpandedSeat } from '../../renderer-B2uo9TlL.js';
1
+ import { P as Point, v as CubicPath, w as TextObject } from '../../types-pwg1Vsz-.js';
2
+ export { F as FloorLabelStyle } from '../../types-pwg1Vsz-.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-CEqWVQ4f.js';
4
+ export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-Dm3nuc6_.js';
5
+ import { E as ExpandedSeat } from '../../renderer-CUKvpguA.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 T,b as U,c as V,d as W,e as X,f as Y,g as Z,h as _,i as eo,j as fo,k as mo,l as po,m as to,n as xo,o as ao,p as bo,q as co,r as go,s as ho,t as io,u as jo}from"../../chunk-OTN5IFWY.js";import{a as $,b as oo,c as ro}from"../../chunk-BT2KJXQC.js";import"../../chunk-NJTU4QK7.js";import{A as d,B as g,C as h,Ca as w,D as i,Da as y,E as j,Ea as z,F as k,Fa as A,G as l,Ga as B,H as n,Ha as C,Ia as D,Ja as E,Ka as F,La as G,Ma as H,Na as I,Oa as J,Pa as K,Qa as L,Ra as M,Sa as N,Ta as O,Ua as P,V as q,Va as Q,W as s,Wa as R,X as u,Xa as S,Y as v,m as o,n as r,o as e,p as f,q as m,r as p,s as t,t as x,u as a,v as b,z as c}from"../../chunk-24O23MNB.js";import"../../chunk-CRCGO52K.js";export{oo as AUTOMATIC_ROUND_TABLE_RADIUS_MAX,$ as AUTOMATIC_ROUND_TABLE_RADIUS_MIN,eo as DEFAULT_SEAT_RADIUS,T as FLOOR_STACK_GAP_RATIO,Z 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,O as allObjects,co as applyAffine,ro as automaticRoundTableRadius,i as buildAisleHoles,fo as buildSeatIndex,h as buildSectionShell,S as chartBounds,U as combinedFloorZoneId,ho as composeAffine,ao as createPerspectiveCamera,c as cubicPoint,jo as decomposeAffineLinear,j as distanceToRings,g as distributeAlongCubic,G as expandBooth,R as expandChart,B as expandRow,A as expandRowSlots,F as expandTable,D as expandTableSlots,N as floorObjects,V as floorStackPlacements,M as floorsOf,xo as gridStats,mo as hitTest,_ as initialFloorMode,go as invertAffine,X as layoutCombinedFloorPlan,W as layoutFloorStack,Y as mainFloorId,po as nearestWithin,K as objectCenter,L as owningSectionForObject,io as perspectiveTangentAffine,H as pointInPolygon,I as pointInPolygonWithHoles,k as polygonArea,n as polygonInscribedAnchor,J as polygonLabelPoint,l as polygonNetArea,bo as projectPerspectivePoint,to as queryRect,v as resolveSegmentedRowGroups,z as rowInventoryCount,y as rowSeatPositions,s as segmentedRowComponentSeats,q as segmentedRowComponents,u as segmentedRowSeatTotal,d as smoothCubicThroughMiddle,Q as stackFloors,E as tableInventoryCount,C as tableSeatCountsBySide,b as textLayoutMetrics,P as translateObject};
1
+ import{a as T,b as U,c as V,d as W,e as X,f as Y,g as Z,h as _,i as eo,j as fo,k as mo,l as po,m as to,n as xo,o as ao,p as bo,q as co,r as go,s as ho,t as io,u as jo}from"../../chunk-QTBBVSN6.js";import{a as $,b as oo,c as ro}from"../../chunk-WAGKI44J.js";import"../../chunk-CFRNWESM.js";import{A as d,Aa as E,B as g,Ba as F,C as h,Ca as G,D as i,Da as H,E as j,Ea as I,F as k,Fa as J,G as l,Ga as K,H as n,Ha as L,Ia as M,Ja as N,Ka as O,La as P,Ma as Q,Na as R,Oa as S,V as q,W as s,X as u,Y as v,m as o,n as r,o as e,p as f,q as m,r as p,s as t,t as x,ta as w,u as a,ua as y,v as b,va as z,wa as A,xa as B,ya as C,z as c,za as D}from"../../chunk-E7TOTX6I.js";import"../../chunk-5ITK5236.js";import"../../chunk-CRCGO52K.js";export{oo as AUTOMATIC_ROUND_TABLE_RADIUS_MAX,$ as AUTOMATIC_ROUND_TABLE_RADIUS_MIN,eo as DEFAULT_SEAT_RADIUS,T as FLOOR_STACK_GAP_RATIO,Z 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,O as allObjects,co as applyAffine,ro as automaticRoundTableRadius,i as buildAisleHoles,fo as buildSeatIndex,h as buildSectionShell,S as chartBounds,U as combinedFloorZoneId,ho as composeAffine,ao as createPerspectiveCamera,c as cubicPoint,jo as decomposeAffineLinear,j as distanceToRings,g as distributeAlongCubic,G as expandBooth,R as expandChart,B as expandRow,A as expandRowSlots,F as expandTable,D as expandTableSlots,N as floorObjects,V as floorStackPlacements,M as floorsOf,xo as gridStats,mo as hitTest,_ as initialFloorMode,go as invertAffine,X as layoutCombinedFloorPlan,W as layoutFloorStack,Y as mainFloorId,po as nearestWithin,K as objectCenter,L as owningSectionForObject,io as perspectiveTangentAffine,H as pointInPolygon,I as pointInPolygonWithHoles,k as polygonArea,n as polygonInscribedAnchor,J as polygonLabelPoint,l as polygonNetArea,bo as projectPerspectivePoint,to as queryRect,v as resolveSegmentedRowGroups,z as rowInventoryCount,y as rowSeatPositions,s as segmentedRowComponentSeats,q as segmentedRowComponents,u as segmentedRowSeatTotal,d as smoothCubicThroughMiddle,Q as stackFloors,E as tableInventoryCount,C as tableSeatCountsBySide,b as textLayoutMetrics,P as translateObject};
@@ -1,7 +1,7 @@
1
- import { A as AccessibilityType } from '../../types-bJU5OwWf.cjs';
1
+ import { A as AccessibilityType } from '../../types-pwg1Vsz-.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-DuYUhFbT.cjs';
4
- import '../../renderer-BnidPieD.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-DkDTyl9y.cjs';
4
+ import '../../renderer-C7veuoCF.cjs';
5
5
 
6
6
  /**
7
7
  * Rendering constants that quality inspection must agree with.
@@ -1,7 +1,7 @@
1
- import { A as AccessibilityType } from '../../types-bJU5OwWf.js';
1
+ import { A as AccessibilityType } from '../../types-pwg1Vsz-.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-BuZsXn3h.js';
4
- import '../../renderer-B2uo9TlL.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-BqrSXn-t.js';
4
+ import '../../renderer-CUKvpguA.js';
5
5
 
6
6
  /**
7
7
  * Rendering constants that quality inspection must agree with.
@@ -1 +1 @@
1
- "use strict";var i=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var V=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},_=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of E(t))!C.call(e,r)&&r!==n&&i(e,r,{get:()=>t[r],enumerable:!(a=I(t,r))||a.enumerable});return e};var O=e=>_(i({},"__esModule",{value:!0}),e);var ee={};V(ee,{DECOR_STAMP_ICON_PATHS:()=>N,DEFAULT_SHAPE_LINE_CAP:()=>v,DEFAULT_SHAPE_LINE_ENDING:()=>h,DEFAULT_SHAPE_LINE_JOIN:()=>k,SEAT_GLYPHS:()=>l,SEAT_GLYPH_DETAIL_MIN_PX:()=>le,SEAT_GLYPH_INSET:()=>pe,SEAT_GLYPH_ORDER:()=>D,SEAT_GLYPH_VIEWBOX:()=>se,SEAT_TYPE_ICON_BODY:()=>m,SEAT_TYPE_ICON_VIEWBOX:()=>ue,SHAPE_LINE_CAPS:()=>W,SHAPE_LINE_ENDINGS:()=>X,SHAPE_LINE_JOINS:()=>J,VENUE_ICONS:()=>o,VENUE_ICON_GROUP_LABELS:()=>P,VENUE_ICON_GROUP_ORDER:()=>Z,VENUE_ICON_KEYS:()=>R,VENUE_ICON_STROKE:()=>oe,VENUE_ICON_VIEWBOX:()=>ie,buyerBackgroundImage:()=>M,buyerFacingChartDoc:()=>T,hasConflictingLegacyTrace:()=>H,isOpenShapeKind:()=>x,isPointShapeKind:()=>$,isSeatGlyphKind:()=>s,isVenueIconKey:()=>B,migrateLegacyBackgroundLayersInPlace:()=>A,resolveSeatGlyph:()=>j,resolvedShapeLineStyle:()=>z,seatGlyph:()=>p,seatGlyphFit:()=>F,seatGlyphLabel:()=>K,seatGlyphPath:()=>Y,seatTypeIconBody:()=>b,seatTypeIconSvg:()=>U,shapeArrowMetrics:()=>q,traceReferenceImage:()=>Q,venueIcon:()=>L,venueIconPath:()=>w});module.exports=O(ee);function u(e){let t=e;return delete t.referenceScan,delete t.referenceInventorySource,delete t.referenceInventoryExclusion,delete t.referenceSource,delete t.referenceAnnotationSource,e}function Q(e){return e.referenceImage??(e.backgroundImage?.assetId?e.backgroundImage:void 0)}function M(e){let t=e.backgroundImage;return t?.url&&!t.assetId?t:void 0}function d(e){let t=M(e);if(!t?.url)return;let{calibration:n,derivedScale:a,assetId:r,...S}=t;return S}function A(e){let t=n=>{let a=n.backgroundImage;a?.assetId&&(n.referenceImage||(n.referenceImage=a,n.backgroundImage=void 0))};t(e);for(let n of e.floors??[])t(n);return e}function g(e){let t={...e};return u(t),delete t.editor,t}function G(e){let t={...e};return delete t.referenceCategorySource,delete t.referenceDirectSeatImport,t}function T(e){let t=d(e),n=e.floors?.map(a=>({...a,objects:a.objects.map(g),referenceImage:void 0,backgroundImage:d(a)}));return{...e,categories:e.categories.map(G),objects:e.objects.map(g),referenceImage:void 0,venueSurveyRegistrations:void 0,backgroundImage:t,...n?{floors:n}:{}}}function H(e){return!!e.referenceImage?.assetId&&!!e.backgroundImage?.assetId&&e.referenceImage.assetId!==e.backgroundImage.assetId}var ie=24,oe=2,P={facilities:"Facilities","food-drink":"Food & drink",navigation:"Getting around",accessibility:"Accessibility"},Z=["facilities","food-drink","navigation","accessibility"],y="M13 4.6a1.6 1.6 0 1 0-3.2 0 1.6 1.6 0 0 0 3.2 0 M11 6.5V13h5l2.4 6 M15 16.4A5 5 0 1 1 9 11.3",o=[{key:"restroom-men",label:"Men's restroom",group:"facilities",path:"M16 7a4 4 0 1 0-8 0 4 4 0 0 0 8 0 M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"},{key:"restroom-women",label:"Women's restroom",group:"facilities",path:"M15 5a3 3 0 1 0-6 0 3 3 0 0 0 6 0 M12 8l-4 10h8l-4-10 M10 18v4 M14 18v4"},{key:"restroom-accessible",label:"Accessible restroom",group:"facilities",path:y},{key:"first-aid",label:"First aid",group:"facilities",path:"M5 4h14a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Z M12 8v8 M8 12h8"},{key:"coat-check",label:"Coat check",group:"facilities",path:"M12 6a2 2 0 0 1 0-4 2 2 0 0 1 1.6 3.2L21 13H3l8.4-7.8 M3 13h18"},{key:"atm",label:"ATM / cash",group:"facilities",path:"M2 6h20v12H2V6Z M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0 M6 9h.01 M18 15h.01"},{key:"info",label:"Info point",group:"facilities",path:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18 M12 11v5 M12 8h.01"},{key:"lost-found",label:"Lost & found",group:"facilities",path:"M11 4a7 7 0 1 0 0 14 7 7 0 0 0 0-14 M16 16l5 5 M9 8.5a2 2 0 1 1 3 1.7c-.8.5-1 .8-1 1.8 M11 15h.01"},{key:"restrooms",label:"Restrooms",group:"facilities",path:"M6 3h12a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z M12 8a2 2 0 1 0 0 4 2 2 0 0 0 0-4 M9 18v-3.5a3 3 0 0 1 6 0V18"},{key:"charging",label:"Charging point",group:"facilities",path:"M3 8h13v8H3V8Z M16 10h3v4h-3 M9.6 9l-2 3.5h2.5l-1.5 3"},{key:"smoking",label:"Smoking area",group:"facilities",path:"M2 15h13v3H2v-3Z M18 16h2 M19 8c0 1 1 1.5 1 2.5S19 12 19 13"},{key:"no-smoking",label:"No smoking",group:"facilities",path:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18 M5.6 5.6l12.8 12.8 M7 13h6v2H7v-2Z"},{key:"food",label:"Food",group:"food-drink",path:"M7 3v6a2 2 0 0 0 4 0V3 M9 11v10 M17 3c-1.6 1-2.2 3-2.2 6 0 2 .9 3.2 2.2 3.6V21"},{key:"bar",label:"Bar",group:"food-drink",path:"M4 5h16l-8 8-8-8Z M12 13v6 M8 20h8"},{key:"coffee",label:"Caf\xE9 / coffee",group:"food-drink",path:"M4 8h13v4a5 5 0 0 1-5 5H9a5 5 0 0 1-5-5V8Z M17 9h2a2 2 0 0 1 0 4h-2 M8 2v2 M11 2v2 M4 21h14"},{key:"water",label:"Water / drinks",group:"food-drink",path:"M12 22a7 7 0 0 1-7-7c0-5 7-12 7-12s7 7 7 12a7 7 0 0 1-7 7Z"},{key:"merch",label:"Merch / shop",group:"food-drink",path:"M6 8h12l-1 12H7L6 8Z M9 8V6a3 3 0 0 1 6 0v2"},{key:"screen",label:"Screen",group:"facilities",path:"M3 4h18v12H3V4Z M9 20h6 M12 16v4 M10 8l4 2-4 2V8Z"},{key:"sound-booth",label:"Sound booth",group:"facilities",path:"M6 4v16 M6 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4 M12 4v16 M12 8a2 2 0 1 0 0 4 2 2 0 0 0 0-4 M18 4v16 M18 12a2 2 0 1 0 0 4 2 2 0 0 0 0-4"},{key:"entrance",label:"Entrance",group:"navigation",path:"M14 3h5a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-5 M3 12h11 M10 8l4 4-4 4"},{key:"exit",label:"Exit",group:"navigation",path:"M10 3H5a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h5 M14 12h7 M17 8l4 4-4 4"},{key:"emergency-exit",label:"Emergency exit",group:"navigation",path:"M14 4.6a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0 M12.5 8l-3.5 2 1.6 3.6-2 4.4 M12.5 10l3.5 1.5 M9 10.5l-3.5 1 M15 12h6 M18 9l3 3-3 3"},{key:"stairs",label:"Stairs",group:"navigation",path:"M3 20v-4h4v-4h4v-4h4V4h5"},{key:"elevator",label:"Elevator",group:"navigation",path:"M5 3h14a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z M8 11l1.5-2 1.5 2 M8 14l1.5 2 1.5-2 M15 8v8"},{key:"parking",label:"Parking",group:"navigation",path:"M5 3h14a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z M9 17V7h4a3 3 0 0 1 0 6H9"},{key:"wheelchair",label:"Wheelchair access",group:"accessibility",path:y},{key:"hearing",label:"Hearing assistance",group:"accessibility",path:"M8 20a4 4 0 0 1-2-3c0-1 .5-2 .5-3a4.5 4.5 0 1 1 9 0c0 1.4-1 2-2 2.4-1.2.5-1.5 1-1.5 2.2 M17 6a5 5 0 0 1 1 6 M19.5 4a8 8 0 0 1 1.2 9"}],N={wall:"M3 5h18v14H3V5Z M3 9.7h18 M3 14.3h18 M9 5v4.7 M15 5v4.7 M6 9.7v4.6 M12 9.7v4.6 M18 9.7v4.6 M9 14.3v4.7 M15 14.3v4.7",rail:"M3 7h18 M4 17h16 M6 7v10 M10 7v10 M14 7v10 M18 7v10",suite:"M3 4h18v16H3V4Z M6 17v-5h12v5 M8 12V9h8v3",obstruction:"M8 3h8l-1 4v10l1 4H8l1-4V7L8 3Z M9 7h6 M9 17h6"},f=new Map(o.map(e=>[e.key,e]));function L(e){return e?f.get(e):void 0}function w(e){return L(e)?.path}function B(e){return typeof e=="string"&&f.has(e)}var R=o.map(e=>e.key);var se=24,le=16,pe=.14,l=[{key:"circle",label:"Standard seat",shortLabel:"Standard",useCase:"General assigned seating",group:"general",path:null,bounds:null},{key:"theatre",label:"Theatre chair",shortLabel:"Theatre",useCase:"Auditoriums, arenas and stadium stands",group:"fixed",path:"M4.5 3.5 Q4.5 1.5 6.5 1.5 L17.5 1.5 Q19.5 1.5 19.5 3.5 L19.5 13 L4.5 13 Z M3.5 12 L20.5 12 Q22.5 12 22.5 14 L22.5 21 Q22.5 22.5 21 22.5 Q19.5 22.5 19.5 21 L19.5 17.5 L4.5 17.5 L4.5 21 Q4.5 22.5 3 22.5 Q1.5 22.5 1.5 21 L1.5 14 Q1.5 12 3.5 12 Z",bounds:{x:1.5,y:1.5,width:21,height:21}},{key:"dining",label:"Dining chair",shortLabel:"Dining",useCase:"Banquets, restaurants and table seating",group:"flexible",path:"M7 1 Q6 1 6 2.5 L6.75 10.5 L5 10.5 Q4 10.5 4 12 L4 14 Q4 15 5.25 15 L6 15 L4 23 L7 23 L9.5 15 L14.5 15 L17 23 L20 23 L18 15 L18.75 15 Q20 15 20 14 L20 12 Q20 10.5 19 10.5 L17.25 10.5 L18 2.5 Q18 1 17 1 Z",bounds:{x:4,y:1,width:16,height:22}},{key:"folding",label:"Folding chair",shortLabel:"Folding",useCase:"Concert floors, ceremonies and conferences",group:"flexible",path:"M6 2 Q5 2 5 3 L6 8 L18 8 L19 3 Q19 2 18 2 Z M5 9 L19 9 Q20 9 20 10.5 L19 13 L5 13 L4 10.5 Q4 9 5 9 Z M6 12 L9 12 L12 17 L15 12 L18 12 L14 19 L17 23 L14 23 L12 21 L10 23 L7 23 L10 19 Z",bounds:{x:4,y:2,width:16,height:21}},{key:"armchair",label:"Premium armchair",shortLabel:"Armchair",useCase:"Boxes, lounges and club seating",group:"premium",path:"M3.5 4 Q3.5 1.5 6 1.5 L18 1.5 Q20.5 1.5 20.5 4 L20.5 13 L3.5 13 Z M1.5 12.5 Q1.5 10 3.25 10 Q5 10 5 12.5 L5 13.5 L19 13.5 L19 12.5 Q19 10 20.75 10 Q22.5 10 22.5 12.5 L22.5 19.5 Q22.5 22 20 22 L4 22 Q1.5 22 1.5 19.5 Z",bounds:{x:1.5,y:1.5,width:21,height:20.5}},{key:"recliner",label:"Recliner",shortLabel:"Recliner",useCase:"Luxury cinemas and premium clubs",group:"premium",path:"M7 2 Q7 1 8.5 1 L15.5 1 Q17 1 17 2 L19 13 L5 13 Z M4 9 Q2 9 2 11.5 L2 16 Q2 18 4 18 L6 18 L6 15 L18 15 L18 18 L20 18 Q22 18 22 16 L22 11.5 Q22 9 20 9 Q18 9 18 11 L18 13 L6 13 L6 11 Q6 9 4 9 Z M7 17 L17 17 Q18 17 18.5 18.5 L19.5 22.5 L4.5 22.5 L5.5 18.5 Q6 17 7 17 Z",bounds:{x:2,y:1,width:20,height:21.5}},{key:"stool",label:"Stool",shortLabel:"Stool",useCase:"Bars, high-tops and seating rails",group:"flexible",path:"M6 2.5 L18 2.5 Q22 2.5 22 6.5 L22 12 Q22 16 18 16 L6 16 Q2 16 2 12 L2 6.5 Q2 2.5 6 2.5 Z M6 15.5 L9.5 15.5 L7.5 22.5 L3 22.5 Z M14.5 15.5 L18 15.5 L20.5 22.5 L16 22.5 Z",bounds:{x:2,y:2.5,width:20,height:20}},{key:"bench",label:"Bench place",shortLabel:"Bench",useCase:"Pews, bleachers and terraces",group:"fixed",path:"M2.5 0.5 L21.5 0.5 Q23 0.5 23 2 L23 5 Q23 6.5 21.5 6.5 L2.5 6.5 Q1 6.5 1 5 L1 2 Q1 0.5 2.5 0.5 Z M2 7.5 L22 7.5 Q23.5 7.5 23.5 9 L23.5 15.5 Q23.5 17 22 17 L18 17 L18 21.5 Q18 22.5 16.75 22.5 Q15.5 22.5 15.5 21.5 L15.5 17 L8.5 17 L8.5 21.5 Q8.5 22.5 7.25 22.5 Q6 22.5 6 21.5 L6 17 L2 17 Q0.5 17 0.5 15.5 L0.5 9 Q0.5 7.5 2 7.5 Z",bounds:{x:.5,y:.5,width:23,height:22}}],D=l.map(e=>e.key),c=new Map(l.map(e=>[e.key,e]));function p(e){return c.get(e)??c.get("circle")}function K(e){return p(e).label}function Y(e){return p(e).path}function F(e,t){return{scale:t*2*(1-.14)/Math.max(e.width,e.height),centreX:e.x+e.width/2,centreY:e.y+e.height/2}}function s(e){return typeof e=="string"&&c.has(e)}function j(e,t){return s(e)?e:s(t?.seatGlyph)?t.seatGlyph:"circle"}var ue=20,m={wheelchair:'<circle cx="10.6" cy="3.7" r="1.7" /><path d="M8.9 6.3v4.3a1.3 1.3 0 0 0 1.3 1.3h3.4l1.9 4.5h1.9" /><circle cx="9.7" cy="13.3" r="4.7" />',companion:'<circle cx="6" cy="6" r="2" /><circle cx="14" cy="6" r="2" /><path d="M2.5 16v-3.5A3.5 3.5 0 0 1 6 9a3.5 3.5 0 0 1 3.5 3.5V16M10.5 16v-3.5A3.5 3.5 0 0 1 14 9a3.5 3.5 0 0 1 3.5 3.5V16" />',"semi-ambulatory":'<circle cx="8" cy="4" r="1.7" /><path d="m8 6 2 4 3 2M10 10l-2 3-1 4M10 10l2 7M14 7l2 10" />',"designated-aisle":'<path d="M3.5 5.5v7h8.5V10H6.5M5 12.5V17M11 12.5V17" /><path d="M13.5 6.5H19M16.5 4l2.5 2.5L16.5 9" />',"step-free":'<circle cx="5.5" cy="5" r="1.7" /><path d="M5.5 7v4l3 2M2.5 16.5H8l7-7h3M8 16.5h10" />',hearing:'<path d="M7 16c-1-1.2-1.5-2.4-1.5-3.8V9a5 5 0 1 1 10 0c0 2.2-1.2 3.2-2.6 4-1.2.7-1.7 1.4-1.7 2.4A2.6 2.6 0 0 1 8.6 18" />',cart:'<path d="M8 6.5A4 4 0 1 0 8 13M17 6.5a4 4 0 1 0 0 6.5" />',"sign-language":'<path d="M6 16V8.5a1 1 0 0 1 2 0v3M8 11V5.5a1 1 0 0 1 2 0V11M10 11V4.5a1 1 0 0 1 2 0V11M12 11V6a1 1 0 0 1 2 0v6l1-1.5a1.2 1.2 0 0 1 2 1.3L14 17H9.5A3.5 3.5 0 0 1 6 13.5" />',"low-vision":'<path d="M2.5 10s3-5 7.5-5 7.5 5 7.5 5-3 5-7.5 5-7.5-5-7.5-5Z" /><circle cx="10" cy="10" r="2.5" /><path d="m15 4 .5-1.5M17 5l1.5-.8" />',"sensory-friendly":'<path d="M4 11v-1a6 6 0 0 1 12 0v1M4 11h2.5v5H5a1 1 0 0 1-1-1v-4ZM16 11h-2.5v5H15a1 1 0 0 0 1-1v-4Z" /><path d="M8.5 11.5c.8.7 2.2.7 3 0M9 14c.6.4 1.4.4 2 0" />',"plus-size":'<path d="M5 9V6.5A2.5 2.5 0 0 1 7.5 4h5A2.5 2.5 0 0 1 15 6.5V9M3.5 8.5v5h13v-5M6 13.5V17M14 13.5V17" />',"lift-armrest":'<path d="M5 10V6.5A2.5 2.5 0 0 1 7.5 4h4A2.5 2.5 0 0 1 14 6.5V10M4 9v4h11V9M6 13v4M13 13v4" /><path d="M17 11V4M15 6l2-2 2 2" />',obstructedView:'<path d="M2.5 10s3-5 7.5-5 7.5 5 7.5 5-3 5-7.5 5-7.5-5-7.5-5Z" /><path d="m4 17 12-14" />',restrictedView:'<path d="M2.5 10s3-5 7.5-5 7.5 5 7.5 5-3 5-7.5 5-7.5-5-7.5-5Z" /><path d="M10 7.5v3.5M10 13.5h.01" />',premium:'<path d="m10 2.5 2.2 4.6 5 .7-3.6 3.5.9 5-4.5-2.4-4.5 2.4.9-5-3.6-3.5 5-.7Z" />',note:'<circle cx="10" cy="10" r="7.5" /><path d="M10 9.2v4.6M10 6.3h.01" />'};function b(e){return m[e]??""}function U(e,t={}){let n=b(e);if(!n)return"";let a=t.size??18,r=20;return`<svg viewBox="0 0 ${r} ${r}" width="${a}" height="${a}" fill="none" stroke="currentColor" stroke-width="1.45" stroke-linecap="round" stroke-linejoin="round"`+(t.className?` class="${t.className}"`:"")+` aria-hidden="true" focusable="false">${n}</svg>`}var W=["butt","round","square"],J=["miter","round","bevel"],X=["none","arrow"],v="round",k="round",h="none";function x(e){return e==="line"||e==="polyline"}function $(e){return e==="polygon"||x(e)}function z(e){return{lineCap:e.lineCap??v,lineJoin:e.lineJoin??k,startEnding:e.startEnding??h,endEnding:e.endEnding??h}}function q(e){return{pointerLength:Math.min(48,Math.max(8,e*3)),pointerWidth:Math.min(40,Math.max(8,e*2.25))}}0&&(module.exports={DECOR_STAMP_ICON_PATHS,DEFAULT_SHAPE_LINE_CAP,DEFAULT_SHAPE_LINE_ENDING,DEFAULT_SHAPE_LINE_JOIN,SEAT_GLYPHS,SEAT_GLYPH_DETAIL_MIN_PX,SEAT_GLYPH_INSET,SEAT_GLYPH_ORDER,SEAT_GLYPH_VIEWBOX,SEAT_TYPE_ICON_BODY,SEAT_TYPE_ICON_VIEWBOX,SHAPE_LINE_CAPS,SHAPE_LINE_ENDINGS,SHAPE_LINE_JOINS,VENUE_ICONS,VENUE_ICON_GROUP_LABELS,VENUE_ICON_GROUP_ORDER,VENUE_ICON_KEYS,VENUE_ICON_STROKE,VENUE_ICON_VIEWBOX,buyerBackgroundImage,buyerFacingChartDoc,hasConflictingLegacyTrace,isOpenShapeKind,isPointShapeKind,isSeatGlyphKind,isVenueIconKey,migrateLegacyBackgroundLayersInPlace,resolveSeatGlyph,resolvedShapeLineStyle,seatGlyph,seatGlyphFit,seatGlyphLabel,seatGlyphPath,seatTypeIconBody,seatTypeIconSvg,shapeArrowMetrics,traceReferenceImage,venueIcon,venueIconPath});
1
+ "use strict";var L=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var ee=(e,t)=>{for(var n in t)L(e,n,{get:t[n],enumerable:!0})},te=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of z(t))!q.call(e,a)&&a!==n&&L(e,a,{get:()=>t[a],enumerable:!(r=X(t,a))||r.enumerable});return e};var ne=e=>te(L({},"__esModule",{value:!0}),e);var Fe={};ee(Fe,{DECOR_STAMP_ICON_PATHS:()=>Re,DEFAULT_SHAPE_LINE_CAP:()=>$,DEFAULT_SHAPE_LINE_ENDING:()=>C,DEFAULT_SHAPE_LINE_JOIN:()=>Y,SEAT_GLYPHS:()=>O,SEAT_GLYPH_DETAIL_MIN_PX:()=>ot,SEAT_GLYPH_INSET:()=>st,SEAT_GLYPH_ORDER:()=>Ne,SEAT_GLYPH_VIEWBOX:()=>it,SEAT_TYPE_ICON_BODY:()=>K,SEAT_TYPE_ICON_VIEWBOX:()=>ct,SHAPE_LINE_CAPS:()=>je,SHAPE_LINE_ENDINGS:()=>Be,SHAPE_LINE_JOINS:()=>De,VENUE_ICONS:()=>v,VENUE_ICON_GROUP_LABELS:()=>Ce,VENUE_ICON_GROUP_ORDER:()=>Ee,VENUE_ICON_KEYS:()=>Ve,VENUE_ICON_STROKE:()=>rt,VENUE_ICON_VIEWBOX:()=>nt,buyerBackgroundImage:()=>D,buyerFacingChartDoc:()=>Oe,hasConflictingLegacyTrace:()=>Ie,isOpenShapeKind:()=>U,isPointShapeKind:()=>He,isSeatGlyphKind:()=>k,isVenueIconKey:()=>_e,migrateLegacyBackgroundLayersInPlace:()=>xe,resolveSeatGlyph:()=>Qe,resolvedShapeLineStyle:()=>Ze,seatGlyph:()=>I,seatGlyphFit:()=>we,seatGlyphLabel:()=>Te,seatGlyphPath:()=>Pe,seatTypeIconBody:()=>F,seatTypeIconSvg:()=>Ge,shapeArrowMetrics:()=>Ke,traceReferenceImage:()=>ve,venueIcon:()=>Z,venueIconPath:()=>Ae});module.exports=ne(Fe);function E(e){let t=e;return delete t.referenceScan,delete t.referenceInventorySource,delete t.referenceInventoryExclusion,delete t.referenceSource,delete t.referenceAnnotationSource,e}var re="ABCDEFGHIJKLMNOPQRSTUVWXYZ";var ae="abcdefghijklmnopqrstuvwxyz";function ie(e,t){let n=t.length,r=e+1,a="";for(;r>0;){r-=1;let i=r%n;a=t[i]+a,r=Math.floor(r/n)}return a}function M(e,t=!1){let n=t?ae:re;return ie(Math.max(0,Math.floor(e)-1),n)}var oe=[[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 R(e){if(!Number.isFinite(e)||e<=0)return String(e);let t=Math.floor(e),n="";for(let[r,a]of oe)for(;t>=r;)n+=a,t-=r;return n}function se(e){let t=new Array(e);return Array.from({length:e},(n,r)=>r).sort((n,r)=>Math.abs(2*n-(e-1))-Math.abs(2*r-(e-1))||n-r).forEach((n,r)=>t[n]=r),t}function p(e,t){let n=e.seatLabelStart??1,r=e.seatNumbering?.direction??"ltr",a=e.seatNumbering?.step??1,i=e.seatNumbering?.scheme??"decimal",o=e.seatNumbering?.prefix??"",l=e.seatNumbering?.endAt,h=e.seatCount;if(i==="updown"||i==="updown-descending"){let c=Math.ceil(h/2),W=i==="updown"?t<c?n+2*t:n-1+2*(h-t):t<c?n+2*(c-1-t):n+1+2*(t-c);return`${o}${W}`}let J=i==="odd"||i==="even"?2:a,s=l!=null&&Number.isFinite(l)?l-(h-1)*J:n,d=r==="center"?se(h)[t]:r==="rtl"?h-1-t:t,u;switch(i){case"odd":{let c=s%2===1?s:s+1;u=String(c+d*2);break}case"even":{let c=s%2===0?s:s+1;u=String(c+d*2);break}case"roman":u=R(s+d*a);break;case"letters-upper":u=M(s+d*a,!1);break;case"letters-lower":u=M(s+d*a,!0);break;default:u=String(s+d*a);break}return`${o}${u}`}function le(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function g(e,t,n){return n?.label??`${e.seatLabelBase??e.label}-${p(e,t)}`}function S(e,t,n,r){if(r?.displayLabel)return r.displayLabel;if(e.seatDisplayLabelMode==="number")return p(e,t);if(!n)return`${e.displayLabel||e.label}-${p(e,t)}`;let a=le(n),i=n.displayOffset+t;return`${n.displayLabel}-${p(a,i)}`}var ce=["skip","dx","dy","glyph","accessible","accessibility","wheelchairSpaceType","commercial","viewFromSeatUrl","viewFromSeatMeta","confidenceEvidence"];function T(e,t){return!e||!t?!e&&!t:e.size===t.size&&e.color===t.color}function f(e){let t=new Map;for(let n of e.overrides??[])t.set(n.index,n);return t}function A(e){let t=f(e),n=[];for(let r=0;r<e.seatCount;r+=1){let a=t.get(r),i={};for(let o of ce){let l=a?.[o];l!==void 0&&(i[o]=l)}n.push([g(e,r,a),S(e,r,void 0,a),a?.categoryKey??e.categoryKey,a?.labelStyle??e.seatLabelStyle??null,i])}return JSON.stringify(n)}function ue(e){return JSON.parse(JSON.stringify(e))}function y(e,t){let n=ue(e);return t(n)&&A(n)===A(e)?n:e}function de(e){if(e.seatLabelStyle||e.seatCount<1)return!1;let t=f(e);if(t.size<e.seatCount)return!1;let n;for(let r=0;r<e.seatCount;r+=1){let a=t.get(r)?.labelStyle;if(!a)return!1;if(!n)n=a;else if(!T(n,a))return!1}if(!n)return!1;e.seatLabelStyle={...n};for(let r of e.overrides??[])delete r.labelStyle;return!0}function pe(e){if(!/^-?\d+$/.test(e))return;let t=Number(e);return Number.isSafeInteger(t)&&String(t)===e?t:void 0}function he(e){if(!e.length)return;let t=e[0].lastIndexOf("-");if(t<=0)return;let n=e[0].slice(0,t),r=[];for(let i of e){if(!i.startsWith(`${n}-`))return;let o=pe(i.slice(n.length+1));if(o===void 0)return;r.push(o)}if(r.length===1)return{base:n,start:r[0],direction:"ltr"};let a=r[1]-r[0];if(!(a!==1&&a!==-1)){for(let i=1;i<r.length;i+=1)if(r[i]-r[i-1]!==a)return;return a===1?{base:n,start:r[0],direction:"ltr"}:{base:n,start:r[r.length-1],direction:"rtl"}}}function be(e){if(e.seatCount<1)return!1;let t=f(e);if(!(e.overrides??[]).some(a=>a.label!==void 0))return!1;let n=[];for(let a=0;a<e.seatCount;a+=1)n.push(g(e,a,t.get(a)));let r=he(n);if(!r)return!1;r.base===e.label?delete e.seatLabelBase:e.seatLabelBase=r.base,r.start===1?delete e.seatLabelStart:e.seatLabelStart=r.start,r.direction==="ltr"?delete e.seatNumbering:e.seatNumbering={direction:"rtl"};for(let a of e.overrides??[])delete a.label;return!0}function fe(e){if(e.seatDisplayLabelMode||e.seatCount<1)return!1;let t=f(e);for(let n=0;n<e.seatCount;n+=1){let r=t.get(n)?.displayLabel;if(r===void 0||r!==p(e,n))return!1}e.seatDisplayLabelMode="number";for(let n of e.overrides??[])delete n.displayLabel;return!0}function ge(e,t){t.categoryKey===e.categoryKey&&delete t.categoryKey,t.labelStyle&&T(t.labelStyle,e.seatLabelStyle)&&delete t.labelStyle,t.label!==void 0&&t.label===g(e,t.index)&&delete t.label,(!e.segmentedRow||e.seatDisplayLabelMode==="number")&&t.displayLabel!==void 0&&t.displayLabel===S(e,t.index)&&delete t.displayLabel}function P(e){return Object.keys(e).every(t=>t==="index")}function ye(e){if(!e.overrides?.length)return!1;for(let n of e.overrides)ge(e,n);let t=e.overrides.filter(n=>!P(n));return t.length?e.overrides=t:delete e.overrides,!0}function me(e,t){if(!t.segmentedRow||JSON.stringify([e.seatNumbering,e.seatLabelStart])===JSON.stringify([t.seatNumbering,t.seatLabelStart])||t.seatDisplayLabelMode==="number")return!0;let r=f(t);for(let a=0;a<t.seatCount;a+=1)if(r.get(a)?.displayLabel===void 0)return!1;return!0}function Le(e){if(e.type!=="row")return e;let t=y(e,de);return t=y(t,be),t=y(t,fe),t=y(t,ye),me(e,t)?t:e}function Me(e){if(!e.overrides?.length)return e;let t=e.displayLabel??e.label,n=[];for(let a of e.overrides){let i={...a};i.label===`${e.label}-${i.index+1}`&&delete i.label,i.displayLabel===`${t}-${i.index+1}`&&delete i.displayLabel,i.categoryKey===e.categoryKey&&delete i.categoryKey,i.dx===0&&delete i.dx,i.dy===0&&delete i.dy,P(i)||n.push(i)}let r={...e};return n.length?r.overrides=n:delete r.overrides,r}function _(e){return e.type==="row"?Le(e):e.type==="table"?Me(e):e}function w(e){let t=e.objects.map(_),n=e.floors?.map(r=>({...r,objects:r.objects.map(_)}));return{...e,objects:t,...n?{floors:n}:{}}}var V=2,Se=3,N=6;function b(e,t){if(!Number.isFinite(e))return e;let n=10**t,r=Math.round(e*n)/n;return Object.is(r,-0)?0:r}function m(e){return{...e,x:b(e.x,V),y:b(e.y,V)}}function Q(e){let t={...e};t.origin&&typeof t.origin=="object"&&(t.origin=m(t.origin)),Array.isArray(t.outline)&&(t.outline=t.outline.map(m)),Array.isArray(t.points)&&(t.points=t.points.map(m)),typeof t.rotation=="number"&&(t.rotation=b(t.rotation,N)),typeof t.seatSpacing=="number"&&(t.seatSpacing=b(t.seatSpacing,N));let n=t.labelPresentation;return n?.position&&(t.labelPresentation={...n,position:m(n.position)}),Array.isArray(t.overrides)&&(t.overrides=t.overrides.map(r=>{let a={...r};for(let i of["dx","dy"]){let o=a[i];if(typeof o!="number")continue;let l=b(o,Se);l===0?delete a[i]:a[i]=l}return a})),t}function ve(e){return e.referenceImage??(e.backgroundImage?.assetId?e.backgroundImage:void 0)}function D(e){let t=e.backgroundImage;return t?.url&&!t.assetId?t:void 0}function G(e){let t=D(e);if(!t?.url)return;let{calibration:n,derivedScale:r,assetId:a,...i}=t;return i}function xe(e){let t=n=>{let r=n.backgroundImage;r?.assetId&&(n.referenceImage||(n.referenceImage=r,n.backgroundImage=void 0))};t(e);for(let n of e.floors??[])t(n);return e}function j(e){let t=Q(e);return E(t),delete t.editor,delete t.arcFanGeneration,delete t.rowBlockGeneration,t}function ke(e){let t={...e};return delete t.referenceCategorySource,delete t.referenceDirectSeatImport,t}function Oe(e){let t=G(e),n=e.floors?.map(r=>({...r,objects:r.objects.map(j),referenceImage:void 0,backgroundImage:G(r)}));return w({...e,categories:e.categories.map(ke),objects:e.objects.map(j),referenceImage:void 0,venueSurveyRegistrations:void 0,backgroundImage:t,...n?{floors:n}:{}})}function Ie(e){return!!e.referenceImage?.assetId&&!!e.backgroundImage?.assetId&&e.referenceImage.assetId!==e.backgroundImage.assetId}var nt=24,rt=2,Ce={facilities:"Facilities","food-drink":"Food & drink",navigation:"Getting around",accessibility:"Accessibility"},Ee=["facilities","food-drink","navigation","accessibility"],B="M13 4.6a1.6 1.6 0 1 0-3.2 0 1.6 1.6 0 0 0 3.2 0 M11 6.5V13h5l2.4 6 M15 16.4A5 5 0 1 1 9 11.3",v=[{key:"restroom-men",label:"Men's restroom",group:"facilities",path:"M16 7a4 4 0 1 0-8 0 4 4 0 0 0 8 0 M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"},{key:"restroom-women",label:"Women's restroom",group:"facilities",path:"M15 5a3 3 0 1 0-6 0 3 3 0 0 0 6 0 M12 8l-4 10h8l-4-10 M10 18v4 M14 18v4"},{key:"restroom-accessible",label:"Accessible restroom",group:"facilities",path:B},{key:"first-aid",label:"First aid",group:"facilities",path:"M5 4h14a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Z M12 8v8 M8 12h8"},{key:"coat-check",label:"Coat check",group:"facilities",path:"M12 6a2 2 0 0 1 0-4 2 2 0 0 1 1.6 3.2L21 13H3l8.4-7.8 M3 13h18"},{key:"atm",label:"ATM / cash",group:"facilities",path:"M2 6h20v12H2V6Z M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0 M6 9h.01 M18 15h.01"},{key:"info",label:"Info point",group:"facilities",path:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18 M12 11v5 M12 8h.01"},{key:"lost-found",label:"Lost & found",group:"facilities",path:"M11 4a7 7 0 1 0 0 14 7 7 0 0 0 0-14 M16 16l5 5 M9 8.5a2 2 0 1 1 3 1.7c-.8.5-1 .8-1 1.8 M11 15h.01"},{key:"restrooms",label:"Restrooms",group:"facilities",path:"M6 3h12a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z M12 8a2 2 0 1 0 0 4 2 2 0 0 0 0-4 M9 18v-3.5a3 3 0 0 1 6 0V18"},{key:"charging",label:"Charging point",group:"facilities",path:"M3 8h13v8H3V8Z M16 10h3v4h-3 M9.6 9l-2 3.5h2.5l-1.5 3"},{key:"smoking",label:"Smoking area",group:"facilities",path:"M2 15h13v3H2v-3Z M18 16h2 M19 8c0 1 1 1.5 1 2.5S19 12 19 13"},{key:"no-smoking",label:"No smoking",group:"facilities",path:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18 M5.6 5.6l12.8 12.8 M7 13h6v2H7v-2Z"},{key:"food",label:"Food",group:"food-drink",path:"M7 3v6a2 2 0 0 0 4 0V3 M9 11v10 M17 3c-1.6 1-2.2 3-2.2 6 0 2 .9 3.2 2.2 3.6V21"},{key:"bar",label:"Bar",group:"food-drink",path:"M4 5h16l-8 8-8-8Z M12 13v6 M8 20h8"},{key:"coffee",label:"Caf\xE9 / coffee",group:"food-drink",path:"M4 8h13v4a5 5 0 0 1-5 5H9a5 5 0 0 1-5-5V8Z M17 9h2a2 2 0 0 1 0 4h-2 M8 2v2 M11 2v2 M4 21h14"},{key:"water",label:"Water / drinks",group:"food-drink",path:"M12 22a7 7 0 0 1-7-7c0-5 7-12 7-12s7 7 7 12a7 7 0 0 1-7 7Z"},{key:"merch",label:"Merch / shop",group:"food-drink",path:"M6 8h12l-1 12H7L6 8Z M9 8V6a3 3 0 0 1 6 0v2"},{key:"screen",label:"Screen",group:"facilities",path:"M3 4h18v12H3V4Z M9 20h6 M12 16v4 M10 8l4 2-4 2V8Z"},{key:"sound-booth",label:"Sound booth",group:"facilities",path:"M6 4v16 M6 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4 M12 4v16 M12 8a2 2 0 1 0 0 4 2 2 0 0 0 0-4 M18 4v16 M18 12a2 2 0 1 0 0 4 2 2 0 0 0 0-4"},{key:"entrance",label:"Entrance",group:"navigation",path:"M14 3h5a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-5 M3 12h11 M10 8l4 4-4 4"},{key:"exit",label:"Exit",group:"navigation",path:"M10 3H5a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h5 M14 12h7 M17 8l4 4-4 4"},{key:"emergency-exit",label:"Emergency exit",group:"navigation",path:"M14 4.6a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0 M12.5 8l-3.5 2 1.6 3.6-2 4.4 M12.5 10l3.5 1.5 M9 10.5l-3.5 1 M15 12h6 M18 9l3 3-3 3"},{key:"stairs",label:"Stairs",group:"navigation",path:"M3 20v-4h4v-4h4v-4h4V4h5"},{key:"elevator",label:"Elevator",group:"navigation",path:"M5 3h14a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z M8 11l1.5-2 1.5 2 M8 14l1.5 2 1.5-2 M15 8v8"},{key:"parking",label:"Parking",group:"navigation",path:"M5 3h14a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z M9 17V7h4a3 3 0 0 1 0 6H9"},{key:"wheelchair",label:"Wheelchair access",group:"accessibility",path:B},{key:"hearing",label:"Hearing assistance",group:"accessibility",path:"M8 20a4 4 0 0 1-2-3c0-1 .5-2 .5-3a4.5 4.5 0 1 1 9 0c0 1.4-1 2-2 2.4-1.2.5-1.5 1-1.5 2.2 M17 6a5 5 0 0 1 1 6 M19.5 4a8 8 0 0 1 1.2 9"}],Re={wall:"M3 5h18v14H3V5Z M3 9.7h18 M3 14.3h18 M9 5v4.7 M15 5v4.7 M6 9.7v4.6 M12 9.7v4.6 M18 9.7v4.6 M9 14.3v4.7 M15 14.3v4.7",rail:"M3 7h18 M4 17h16 M6 7v10 M10 7v10 M14 7v10 M18 7v10",suite:"M3 4h18v16H3V4Z M6 17v-5h12v5 M8 12V9h8v3",obstruction:"M8 3h8l-1 4v10l1 4H8l1-4V7L8 3Z M9 7h6 M9 17h6"},H=new Map(v.map(e=>[e.key,e]));function Z(e){return e?H.get(e):void 0}function Ae(e){return Z(e)?.path}function _e(e){return typeof e=="string"&&H.has(e)}var Ve=v.map(e=>e.key);var it=24,ot=16,st=.14,O=[{key:"circle",label:"Standard seat",shortLabel:"Standard",useCase:"General assigned seating",group:"general",path:null,bounds:null},{key:"theatre",label:"Theatre chair",shortLabel:"Theatre",useCase:"Auditoriums, arenas and stadium stands",group:"fixed",path:"M4.5 3.5 Q4.5 1.5 6.5 1.5 L17.5 1.5 Q19.5 1.5 19.5 3.5 L19.5 13 L4.5 13 Z M3.5 12 L20.5 12 Q22.5 12 22.5 14 L22.5 21 Q22.5 22.5 21 22.5 Q19.5 22.5 19.5 21 L19.5 17.5 L4.5 17.5 L4.5 21 Q4.5 22.5 3 22.5 Q1.5 22.5 1.5 21 L1.5 14 Q1.5 12 3.5 12 Z",bounds:{x:1.5,y:1.5,width:21,height:21}},{key:"dining",label:"Dining chair",shortLabel:"Dining",useCase:"Banquets, restaurants and table seating",group:"flexible",path:"M7 1 Q6 1 6 2.5 L6.75 10.5 L5 10.5 Q4 10.5 4 12 L4 14 Q4 15 5.25 15 L6 15 L4 23 L7 23 L9.5 15 L14.5 15 L17 23 L20 23 L18 15 L18.75 15 Q20 15 20 14 L20 12 Q20 10.5 19 10.5 L17.25 10.5 L18 2.5 Q18 1 17 1 Z",bounds:{x:4,y:1,width:16,height:22}},{key:"folding",label:"Folding chair",shortLabel:"Folding",useCase:"Concert floors, ceremonies and conferences",group:"flexible",path:"M6 2 Q5 2 5 3 L6 8 L18 8 L19 3 Q19 2 18 2 Z M5 9 L19 9 Q20 9 20 10.5 L19 13 L5 13 L4 10.5 Q4 9 5 9 Z M6 12 L9 12 L12 17 L15 12 L18 12 L14 19 L17 23 L14 23 L12 21 L10 23 L7 23 L10 19 Z",bounds:{x:4,y:2,width:16,height:21}},{key:"armchair",label:"Premium armchair",shortLabel:"Armchair",useCase:"Boxes, lounges and club seating",group:"premium",path:"M3.5 4 Q3.5 1.5 6 1.5 L18 1.5 Q20.5 1.5 20.5 4 L20.5 13 L3.5 13 Z M1.5 12.5 Q1.5 10 3.25 10 Q5 10 5 12.5 L5 13.5 L19 13.5 L19 12.5 Q19 10 20.75 10 Q22.5 10 22.5 12.5 L22.5 19.5 Q22.5 22 20 22 L4 22 Q1.5 22 1.5 19.5 Z",bounds:{x:1.5,y:1.5,width:21,height:20.5}},{key:"recliner",label:"Recliner",shortLabel:"Recliner",useCase:"Luxury cinemas and premium clubs",group:"premium",path:"M7 2 Q7 1 8.5 1 L15.5 1 Q17 1 17 2 L19 13 L5 13 Z M4 9 Q2 9 2 11.5 L2 16 Q2 18 4 18 L6 18 L6 15 L18 15 L18 18 L20 18 Q22 18 22 16 L22 11.5 Q22 9 20 9 Q18 9 18 11 L18 13 L6 13 L6 11 Q6 9 4 9 Z M7 17 L17 17 Q18 17 18.5 18.5 L19.5 22.5 L4.5 22.5 L5.5 18.5 Q6 17 7 17 Z",bounds:{x:2,y:1,width:20,height:21.5}},{key:"stool",label:"Stool",shortLabel:"Stool",useCase:"Bars, high-tops and seating rails",group:"flexible",path:"M6 2.5 L18 2.5 Q22 2.5 22 6.5 L22 12 Q22 16 18 16 L6 16 Q2 16 2 12 L2 6.5 Q2 2.5 6 2.5 Z M6 15.5 L9.5 15.5 L7.5 22.5 L3 22.5 Z M14.5 15.5 L18 15.5 L20.5 22.5 L16 22.5 Z",bounds:{x:2,y:2.5,width:20,height:20}},{key:"bench",label:"Bench place",shortLabel:"Bench",useCase:"Pews, bleachers and terraces",group:"fixed",path:"M2.5 0.5 L21.5 0.5 Q23 0.5 23 2 L23 5 Q23 6.5 21.5 6.5 L2.5 6.5 Q1 6.5 1 5 L1 2 Q1 0.5 2.5 0.5 Z M2 7.5 L22 7.5 Q23.5 7.5 23.5 9 L23.5 15.5 Q23.5 17 22 17 L18 17 L18 21.5 Q18 22.5 16.75 22.5 Q15.5 22.5 15.5 21.5 L15.5 17 L8.5 17 L8.5 21.5 Q8.5 22.5 7.25 22.5 Q6 22.5 6 21.5 L6 17 L2 17 Q0.5 17 0.5 15.5 L0.5 9 Q0.5 7.5 2 7.5 Z",bounds:{x:.5,y:.5,width:23,height:22}}],Ne=O.map(e=>e.key),x=new Map(O.map(e=>[e.key,e]));function I(e){return x.get(e)??x.get("circle")}function Te(e){return I(e).label}function Pe(e){return I(e).path}function we(e,t){return{scale:t*2*(1-.14)/Math.max(e.width,e.height),centreX:e.x+e.width/2,centreY:e.y+e.height/2}}function k(e){return typeof e=="string"&&x.has(e)}function Qe(e,t){return k(e)?e:k(t?.seatGlyph)?t.seatGlyph:"circle"}var ct=20,K={wheelchair:'<circle cx="10.6" cy="3.7" r="1.7" /><path d="M8.9 6.3v4.3a1.3 1.3 0 0 0 1.3 1.3h3.4l1.9 4.5h1.9" /><circle cx="9.7" cy="13.3" r="4.7" />',companion:'<circle cx="6" cy="6" r="2" /><circle cx="14" cy="6" r="2" /><path d="M2.5 16v-3.5A3.5 3.5 0 0 1 6 9a3.5 3.5 0 0 1 3.5 3.5V16M10.5 16v-3.5A3.5 3.5 0 0 1 14 9a3.5 3.5 0 0 1 3.5 3.5V16" />',"semi-ambulatory":'<circle cx="8" cy="4" r="1.7" /><path d="m8 6 2 4 3 2M10 10l-2 3-1 4M10 10l2 7M14 7l2 10" />',"designated-aisle":'<path d="M3.5 5.5v7h8.5V10H6.5M5 12.5V17M11 12.5V17" /><path d="M13.5 6.5H19M16.5 4l2.5 2.5L16.5 9" />',"step-free":'<circle cx="5.5" cy="5" r="1.7" /><path d="M5.5 7v4l3 2M2.5 16.5H8l7-7h3M8 16.5h10" />',hearing:'<path d="M7 16c-1-1.2-1.5-2.4-1.5-3.8V9a5 5 0 1 1 10 0c0 2.2-1.2 3.2-2.6 4-1.2.7-1.7 1.4-1.7 2.4A2.6 2.6 0 0 1 8.6 18" />',cart:'<path d="M8 6.5A4 4 0 1 0 8 13M17 6.5a4 4 0 1 0 0 6.5" />',"sign-language":'<path d="M6 16V8.5a1 1 0 0 1 2 0v3M8 11V5.5a1 1 0 0 1 2 0V11M10 11V4.5a1 1 0 0 1 2 0V11M12 11V6a1 1 0 0 1 2 0v6l1-1.5a1.2 1.2 0 0 1 2 1.3L14 17H9.5A3.5 3.5 0 0 1 6 13.5" />',"low-vision":'<path d="M2.5 10s3-5 7.5-5 7.5 5 7.5 5-3 5-7.5 5-7.5-5-7.5-5Z" /><circle cx="10" cy="10" r="2.5" /><path d="m15 4 .5-1.5M17 5l1.5-.8" />',"sensory-friendly":'<path d="M4 11v-1a6 6 0 0 1 12 0v1M4 11h2.5v5H5a1 1 0 0 1-1-1v-4ZM16 11h-2.5v5H15a1 1 0 0 0 1-1v-4Z" /><path d="M8.5 11.5c.8.7 2.2.7 3 0M9 14c.6.4 1.4.4 2 0" />',"plus-size":'<path d="M5 9V6.5A2.5 2.5 0 0 1 7.5 4h5A2.5 2.5 0 0 1 15 6.5V9M3.5 8.5v5h13v-5M6 13.5V17M14 13.5V17" />',"lift-armrest":'<path d="M5 10V6.5A2.5 2.5 0 0 1 7.5 4h4A2.5 2.5 0 0 1 14 6.5V10M4 9v4h11V9M6 13v4M13 13v4" /><path d="M17 11V4M15 6l2-2 2 2" />',obstructedView:'<path d="M2.5 10s3-5 7.5-5 7.5 5 7.5 5-3 5-7.5 5-7.5-5-7.5-5Z" /><path d="m4 17 12-14" />',restrictedView:'<path d="M2.5 10s3-5 7.5-5 7.5 5 7.5 5-3 5-7.5 5-7.5-5-7.5-5Z" /><path d="M10 7.5v3.5M10 13.5h.01" />',premium:'<path d="m10 2.5 2.2 4.6 5 .7-3.6 3.5.9 5-4.5-2.4-4.5 2.4.9-5-3.6-3.5 5-.7Z" />',note:'<circle cx="10" cy="10" r="7.5" /><path d="M10 9.2v4.6M10 6.3h.01" />'};function F(e){return K[e]??""}function Ge(e,t={}){let n=F(e);if(!n)return"";let r=t.size??18,a=20;return`<svg viewBox="0 0 ${a} ${a}" width="${r}" height="${r}" fill="none" stroke="currentColor" stroke-width="1.45" stroke-linecap="round" stroke-linejoin="round"`+(t.className?` class="${t.className}"`:"")+` aria-hidden="true" focusable="false">${n}</svg>`}var je=["butt","round","square"],De=["miter","round","bevel"],Be=["none","arrow"],$="round",Y="round",C="none";function U(e){return e==="line"||e==="polyline"}function He(e){return e==="polygon"||U(e)}function Ze(e){return{lineCap:e.lineCap??$,lineJoin:e.lineJoin??Y,startEnding:e.startEnding??C,endEnding:e.endEnding??C}}function Ke(e){return{pointerLength:Math.min(48,Math.max(8,e*3)),pointerWidth:Math.min(40,Math.max(8,e*2.25))}}0&&(module.exports={DECOR_STAMP_ICON_PATHS,DEFAULT_SHAPE_LINE_CAP,DEFAULT_SHAPE_LINE_ENDING,DEFAULT_SHAPE_LINE_JOIN,SEAT_GLYPHS,SEAT_GLYPH_DETAIL_MIN_PX,SEAT_GLYPH_INSET,SEAT_GLYPH_ORDER,SEAT_GLYPH_VIEWBOX,SEAT_TYPE_ICON_BODY,SEAT_TYPE_ICON_VIEWBOX,SHAPE_LINE_CAPS,SHAPE_LINE_ENDINGS,SHAPE_LINE_JOINS,VENUE_ICONS,VENUE_ICON_GROUP_LABELS,VENUE_ICON_GROUP_ORDER,VENUE_ICON_KEYS,VENUE_ICON_STROKE,VENUE_ICON_VIEWBOX,buyerBackgroundImage,buyerFacingChartDoc,hasConflictingLegacyTrace,isOpenShapeKind,isPointShapeKind,isSeatGlyphKind,isVenueIconKey,migrateLegacyBackgroundLayersInPlace,resolveSeatGlyph,resolvedShapeLineStyle,seatGlyph,seatGlyphFit,seatGlyphLabel,seatGlyphPath,seatTypeIconBody,seatTypeIconSvg,shapeArrowMetrics,traceReferenceImage,venueIcon,venueIconPath});
@@ -1,5 +1,5 @@
1
- import { C as ChartDoc, n as Floor, p as ChartReferenceImage, e as SeatGlyphKind, q as Category, r as ShapeLineCap, s as ShapeLineEnding, t as ShapeLineJoin, u as ShapeObject } from '../../types-bJU5OwWf.cjs';
2
- export { S as SEAT_TYPE_ICON_BODY, a as SEAT_TYPE_ICON_VIEWBOX, b as SeatTypeIconKey, c as SeatTypeIconOptions, s as seatTypeIconBody, d as seatTypeIconSvg } from '../../seatTypeIcons-R6pp6eSj.cjs';
1
+ import { C as ChartDoc, n as Floor, p as ChartReferenceImage, e as SeatGlyphKind, q as Category, r as ShapeLineCap, s as ShapeLineEnding, t as ShapeLineJoin, u as ShapeObject } from '../../types-pwg1Vsz-.cjs';
2
+ export { S as SEAT_TYPE_ICON_BODY, a as SEAT_TYPE_ICON_VIEWBOX, b as SeatTypeIconKey, c as SeatTypeIconOptions, s as seatTypeIconBody, d as seatTypeIconSvg } from '../../seatTypeIcons-DHf2-kPo.cjs';
3
3
 
4
4
  type BackgroundOwner = Pick<ChartDoc, 'referenceImage' | 'backgroundImage'> | Pick<Floor, 'referenceImage' | 'backgroundImage'>;
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { C as ChartDoc, n as Floor, p as ChartReferenceImage, e as SeatGlyphKind, q as Category, r as ShapeLineCap, s as ShapeLineEnding, t as ShapeLineJoin, u as ShapeObject } from '../../types-bJU5OwWf.js';
2
- export { S as SEAT_TYPE_ICON_BODY, a as SEAT_TYPE_ICON_VIEWBOX, b as SeatTypeIconKey, c as SeatTypeIconOptions, s as seatTypeIconBody, d as seatTypeIconSvg } from '../../seatTypeIcons-2Jiehd_M.js';
1
+ import { C as ChartDoc, n as Floor, p as ChartReferenceImage, e as SeatGlyphKind, q as Category, r as ShapeLineCap, s as ShapeLineEnding, t as ShapeLineJoin, u as ShapeObject } from '../../types-pwg1Vsz-.js';
2
+ export { S as SEAT_TYPE_ICON_BODY, a as SEAT_TYPE_ICON_VIEWBOX, b as SeatTypeIconKey, c as SeatTypeIconOptions, s as seatTypeIconBody, d as seatTypeIconSvg } from '../../seatTypeIcons-DxxPw5Mn.js';
3
3
 
4
4
  type BackgroundOwner = Pick<ChartDoc, 'referenceImage' | 'backgroundImage'> | Pick<Floor, 'referenceImage' | 'backgroundImage'>;
5
5
  /**
@@ -1 +1 @@
1
- import{a as p,b as t,c as x,d as a}from"../../chunk-P4J57TK6.js";import{a as s,b as u,c as v,d as w,e as y,f as z,g as A,h as B,i as C,j as D,k as E,l as F,m as G,n as H,o as I,p as J,q as K,r as L,s as M,t as N}from"../../chunk-TQN2VWQO.js";import{d as o,e as r,f as e,g as f,h as m}from"../../chunk-NJTU4QK7.js";import{a as b,b as c,c as d,d as g,e as h,f as i,g as j,h as k,i as l,j as n,k as q}from"../../chunk-UL5OIGIF.js";export{z as DECOR_STAMP_ICON_PATHS,H as DEFAULT_SHAPE_LINE_CAP,J as DEFAULT_SHAPE_LINE_ENDING,I as DEFAULT_SHAPE_LINE_JOIN,g as SEAT_GLYPHS,c as SEAT_GLYPH_DETAIL_MIN_PX,d as SEAT_GLYPH_INSET,h as SEAT_GLYPH_ORDER,b as SEAT_GLYPH_VIEWBOX,t as SEAT_TYPE_ICON_BODY,p as SEAT_TYPE_ICON_VIEWBOX,E as SHAPE_LINE_CAPS,G as SHAPE_LINE_ENDINGS,F as SHAPE_LINE_JOINS,y as VENUE_ICONS,v as VENUE_ICON_GROUP_LABELS,w as VENUE_ICON_GROUP_ORDER,D as VENUE_ICON_KEYS,u as VENUE_ICON_STROKE,s as VENUE_ICON_VIEWBOX,r as buyerBackgroundImage,f as buyerFacingChartDoc,m as hasConflictingLegacyTrace,K as isOpenShapeKind,L as isPointShapeKind,n as isSeatGlyphKind,C as isVenueIconKey,e as migrateLegacyBackgroundLayersInPlace,q as resolveSeatGlyph,M as resolvedShapeLineStyle,i as seatGlyph,l as seatGlyphFit,j as seatGlyphLabel,k as seatGlyphPath,x as seatTypeIconBody,a as seatTypeIconSvg,N as shapeArrowMetrics,o as traceReferenceImage,A as venueIcon,B as venueIconPath};
1
+ import{a as p,b as t,c as x,d as a}from"../../chunk-P4J57TK6.js";import{a as s,b as u,c as v,d as w,e as y,f as z,g as A,h as B,i as C,j as D,k as E,l as F,m as G,n as H,o as I,p as J,q as K,r as L,s as M,t as N}from"../../chunk-TQN2VWQO.js";import{k as o,l as r,m as e,n as f,o as m}from"../../chunk-CFRNWESM.js";import{a as b,b as c,c as d,d as g,e as h,f as i,g as j,h as k,i as l,j as n,k as q}from"../../chunk-UL5OIGIF.js";import"../../chunk-5ITK5236.js";export{z as DECOR_STAMP_ICON_PATHS,H as DEFAULT_SHAPE_LINE_CAP,J as DEFAULT_SHAPE_LINE_ENDING,I as DEFAULT_SHAPE_LINE_JOIN,g as SEAT_GLYPHS,c as SEAT_GLYPH_DETAIL_MIN_PX,d as SEAT_GLYPH_INSET,h as SEAT_GLYPH_ORDER,b as SEAT_GLYPH_VIEWBOX,t as SEAT_TYPE_ICON_BODY,p as SEAT_TYPE_ICON_VIEWBOX,E as SHAPE_LINE_CAPS,G as SHAPE_LINE_ENDINGS,F as SHAPE_LINE_JOINS,y as VENUE_ICONS,v as VENUE_ICON_GROUP_LABELS,w as VENUE_ICON_GROUP_ORDER,D as VENUE_ICON_KEYS,u as VENUE_ICON_STROKE,s as VENUE_ICON_VIEWBOX,r as buyerBackgroundImage,f as buyerFacingChartDoc,m as hasConflictingLegacyTrace,K as isOpenShapeKind,L as isPointShapeKind,n as isSeatGlyphKind,C as isVenueIconKey,e as migrateLegacyBackgroundLayersInPlace,q as resolveSeatGlyph,M as resolvedShapeLineStyle,i as seatGlyph,l as seatGlyphFit,j as seatGlyphLabel,k as seatGlyphPath,x as seatTypeIconBody,a as seatTypeIconSvg,N as shapeArrowMetrics,o as traceReferenceImage,A as venueIcon,B as venueIconPath};
@@ -1,4 +1,4 @@
1
- import { d as ResolvedSeatConfidenceEvidence } from '../types-bJU5OwWf.cjs';
1
+ import { d as ResolvedSeatConfidenceEvidence } from '../types-pwg1Vsz-.cjs';
2
2
 
3
3
  interface SeatConfidenceDisclosure {
4
4
  headline: string;
@@ -1,4 +1,4 @@
1
- import { d as ResolvedSeatConfidenceEvidence } from '../types-bJU5OwWf.js';
1
+ import { d as ResolvedSeatConfidenceEvidence } from '../types-pwg1Vsz-.js';
2
2
 
3
3
  interface SeatConfidenceDisclosure {
4
4
  headline: string;