@seatlayer/core 0.72.1 → 0.73.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 (73) hide show
  1. package/dist/{categoryInventory-Bt-0psga.d.ts → categoryInventory-Bcmnr6ZH.d.ts} +1 -1
  2. package/dist/{categoryInventory-BU1j8Q70.d.cts → categoryInventory-DueSAIBX.d.cts} +1 -1
  3. package/dist/{chunk-O5UWBFUT.js → chunk-3L4M7L5I.js} +1 -1
  4. package/dist/chunk-5JB4VW6B.js +1 -0
  5. package/dist/{chunk-YW2WGLRM.js → chunk-BAWUBGWY.js} +1 -1
  6. package/dist/{chunk-5U25QLSS.js → chunk-HDY2MYYH.js} +1 -1
  7. package/dist/chunk-JLYR66MT.js +1 -0
  8. package/dist/{chunk-KCFEFP6H.js → chunk-KN7GLEAI.js} +1 -1
  9. package/dist/{chunk-KPSJDH3N.js → chunk-N5NRM4NW.js} +1 -1
  10. package/dist/chunk-QLDV5ZGA.js +1 -0
  11. package/dist/{chunk-AM2LRFAY.js → chunk-UX67GDLV.js} +1 -1
  12. package/dist/{chunk-ALE2T36W.js → chunk-YFV4DSSX.js} +1 -1
  13. package/dist/{chunk-NKYPEBW3.js → chunk-ZMYRXJOA.js} +1 -1
  14. package/dist/core/chart-ops/index.cjs +1 -1
  15. package/dist/core/chart-ops/index.d.cts +11 -4
  16. package/dist/core/chart-ops/index.d.ts +11 -4
  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 +11 -4
  20. package/dist/core/inventory/index.d.ts +11 -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.cjs +1 -1
  27. package/dist/core/quality/index.d.cts +3 -3
  28. package/dist/core/quality/index.d.ts +3 -3
  29. package/dist/core/quality/index.js +1 -1
  30. package/dist/core/render-assets/index.cjs +1 -1
  31. package/dist/core/render-assets/index.d.cts +1 -1
  32. package/dist/core/render-assets/index.d.ts +1 -1
  33. package/dist/core/render-assets/index.js +1 -1
  34. package/dist/core/seatConfidence.d.cts +1 -1
  35. package/dist/core/seatConfidence.d.ts +1 -1
  36. package/dist/core/sections/index.cjs +1 -1
  37. package/dist/core/sections/index.d.cts +5 -5
  38. package/dist/core/sections/index.d.ts +5 -5
  39. package/dist/core/sections/index.js +1 -1
  40. package/dist/{eventConfigurations-DfVUGyCg.d.ts → eventConfigurations-C7YAqkFR.d.ts} +1 -1
  41. package/dist/{eventConfigurations-3uSorYVC.d.cts → eventConfigurations-DwXdrjqj.d.cts} +1 -1
  42. package/dist/index.cjs +1 -1
  43. package/dist/index.d.cts +102 -13
  44. package/dist/index.d.ts +102 -13
  45. package/dist/index.js +1 -1
  46. package/dist/{labeling-BiWB-8aq.d.ts → labeling-BUCj-kHU.d.ts} +1 -1
  47. package/dist/{labeling-9RWWmJhZ.d.cts → labeling-iugoy25P.d.cts} +1 -1
  48. package/dist/{layout-B6iOoPOv.d.cts → layout-DPJX6D9k.d.cts} +3 -3
  49. package/dist/{layout-B7URbtDR.d.ts → layout-Dv3R0Mpw.d.ts} +3 -3
  50. package/dist/{renderedQuality-C5dQiq97.d.ts → renderedQuality-CSHrmnHf.d.cts} +10 -2
  51. package/dist/{renderedQuality-BZsq3wDe.d.cts → renderedQuality-CfonzUpl.d.ts} +10 -2
  52. package/dist/{renderer-6sFRupj0.d.ts → renderer-C5avrVLy.d.ts} +11 -2
  53. package/dist/{renderer-CBOo1OZk.d.cts → renderer-Dn4Plcv9.d.cts} +11 -2
  54. package/dist/{sections-DU6YDYoZ.d.cts → sections-DhJ7TukF.d.cts} +1 -1
  55. package/dist/{sections-Cn_sk1Sx.d.ts → sections-uV7vqDHj.d.ts} +1 -1
  56. package/dist/{segmentedRowModel-CKmyHvKv.d.cts → segmentedRowModel-DWOjcPrU.d.cts} +1 -1
  57. package/dist/{segmentedRowModel-DbP7pWUk.d.ts → segmentedRowModel-DgSEzAYd.d.ts} +1 -1
  58. package/dist/{ticketRestrictions-CvS2oQ8v.d.ts → ticketRestrictions-DIh61MqE.d.ts} +2 -2
  59. package/dist/{ticketRestrictions-DkenahW2.d.cts → ticketRestrictions-JT87K45q.d.cts} +2 -2
  60. package/dist/{types-D6-wLa-m.d.cts → types-Dx4jA8aI.d.cts} +22 -4
  61. package/dist/{types-D6-wLa-m.d.ts → types-Dx4jA8aI.d.ts} +22 -4
  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 +1 -1
  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-4F7VBQCF.js +0 -1
  72. package/dist/chunk-HXYWP6NX.js +0 -1
  73. package/dist/chunk-XLGYWT5G.js +0 -1
@@ -1,7 +1,7 @@
1
- import { P as Point, C as ChartDoc, R as RowObject } from '../../types-D6-wLa-m.cjs';
2
- import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-CBOo1OZk.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-BU1j8Q70.cjs';
4
- export { C as CompanionSelectionIssue, M as MAX_EVENT_INVENTORY, a as MAX_GA_CAPACITY, N as NotForSaleSelectionIssue, T as TicketOptionApplicabilityIssue, b as TicketSelection, c as TicketSelectionIssue, d as TicketTierResolution, e as applicableTicketTiers, f as companionSelectionIssue, g as gaAreasOf, h as gaInventorySegments, i as gaUnitLabel, j as gaUnitLabels, k as growJoinedGAInventory, l as isGaUnitLabel, r as resolveTicketTierForSeat, t as ticketOptionNotApplicableIssue, m as ticketSelectionIssue, n as ticketTierAppliesToSeat, v as validGAInventorySegments } from '../../ticketRestrictions-DkenahW2.cjs';
1
+ import { P as Point, A as AccessibilityType, C as ChartDoc, R as RowObject } from '../../types-Dx4jA8aI.cjs';
2
+ import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-Dn4Plcv9.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-DueSAIBX.cjs';
4
+ export { C as CompanionSelectionIssue, M as MAX_EVENT_INVENTORY, a as MAX_GA_CAPACITY, N as NotForSaleSelectionIssue, T as TicketOptionApplicabilityIssue, b as TicketSelection, c as TicketSelectionIssue, d as TicketTierResolution, e as applicableTicketTiers, f as companionSelectionIssue, g as gaAreasOf, h as gaInventorySegments, i as gaUnitLabel, j as gaUnitLabels, k as growJoinedGAInventory, l as isGaUnitLabel, r as resolveTicketTierForSeat, t as ticketOptionNotApplicableIssue, m as ticketSelectionIssue, n as ticketTierAppliesToSeat, v as validGAInventorySegments } from '../../ticketRestrictions-JT87K45q.cjs';
5
5
 
6
6
  /**
7
7
  * Best-available seat selection — a PURE, fully unit-testable ranking function.
@@ -40,6 +40,13 @@ interface BestAvailableOpts {
40
40
  categoryKey?: string;
41
41
  /** Restrict the pick to one authored navigation zone. */
42
42
  zoneId?: string;
43
+ /**
44
+ * Restrict candidates to seats carrying at least one requested accommodation.
45
+ * The array is an any-of filter, matching the buyer render/filter contract.
46
+ */
47
+ accessibility?: readonly AccessibilityType[];
48
+ /** Refuse the scattered-seat fallback when no single logical-row run fits. */
49
+ requireContiguous?: boolean;
43
50
  focal: Point;
44
51
  /**
45
52
  * Additive premium bias. When true, candidate scoring STRONGLY prefers seats
@@ -1,7 +1,7 @@
1
- import { P as Point, C as ChartDoc, R as RowObject } from '../../types-D6-wLa-m.js';
2
- import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-6sFRupj0.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-Bt-0psga.js';
4
- export { C as CompanionSelectionIssue, M as MAX_EVENT_INVENTORY, a as MAX_GA_CAPACITY, N as NotForSaleSelectionIssue, T as TicketOptionApplicabilityIssue, b as TicketSelection, c as TicketSelectionIssue, d as TicketTierResolution, e as applicableTicketTiers, f as companionSelectionIssue, g as gaAreasOf, h as gaInventorySegments, i as gaUnitLabel, j as gaUnitLabels, k as growJoinedGAInventory, l as isGaUnitLabel, r as resolveTicketTierForSeat, t as ticketOptionNotApplicableIssue, m as ticketSelectionIssue, n as ticketTierAppliesToSeat, v as validGAInventorySegments } from '../../ticketRestrictions-CvS2oQ8v.js';
1
+ import { P as Point, A as AccessibilityType, C as ChartDoc, R as RowObject } from '../../types-Dx4jA8aI.js';
2
+ import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-C5avrVLy.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-Bcmnr6ZH.js';
4
+ export { C as CompanionSelectionIssue, M as MAX_EVENT_INVENTORY, a as MAX_GA_CAPACITY, N as NotForSaleSelectionIssue, T as TicketOptionApplicabilityIssue, b as TicketSelection, c as TicketSelectionIssue, d as TicketTierResolution, e as applicableTicketTiers, f as companionSelectionIssue, g as gaAreasOf, h as gaInventorySegments, i as gaUnitLabel, j as gaUnitLabels, k as growJoinedGAInventory, l as isGaUnitLabel, r as resolveTicketTierForSeat, t as ticketOptionNotApplicableIssue, m as ticketSelectionIssue, n as ticketTierAppliesToSeat, v as validGAInventorySegments } from '../../ticketRestrictions-DIh61MqE.js';
5
5
 
6
6
  /**
7
7
  * Best-available seat selection — a PURE, fully unit-testable ranking function.
@@ -40,6 +40,13 @@ interface BestAvailableOpts {
40
40
  categoryKey?: string;
41
41
  /** Restrict the pick to one authored navigation zone. */
42
42
  zoneId?: string;
43
+ /**
44
+ * Restrict candidates to seats carrying at least one requested accommodation.
45
+ * The array is an any-of filter, matching the buyer render/filter contract.
46
+ */
47
+ accessibility?: readonly AccessibilityType[];
48
+ /** Refuse the scattered-seat fallback when no single logical-row run fits. */
49
+ requireContiguous?: boolean;
43
50
  focal: Point;
44
51
  /**
45
52
  * Additive premium bias. When true, candidate scoring STRONGLY prefers seats
@@ -1 +1 @@
1
- import{a as bt,b as xt,c as Mt,d as gt,e as wt,g as B,h as N}from"../../chunk-XLGYWT5G.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}from"../../chunk-4F7VBQCF.js";import"../../chunk-FMZ6HLDH.js";import"../../chunk-HXYWP6NX.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-AM2LRFAY.js";import"../../chunk-YW2WGLRM.js";import{l as R,ma as S,oa as v,pa as P,ra as j,sa as _,w as O,xa as I}from"../../chunk-KCFEFP6H.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 St(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 Pt(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 It(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 Bt(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 kt(t,e){if(t.path||!Number.isFinite(e.x)||!Number.isFinite(e.y))return null;let r=M(t),o=Math.abs(r)<1e-9?b:Math.min(b,Math.floor(D/Math.abs(r))+1),n=null;for(let i=h;i<=Math.max(h,o);i+=1){let c=$(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 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=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{bt as CATEGORY_INVENTORY_FAMILIES,dt 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,lt as applicableTicketTiers,z as capacityControl,St as categoryCapacity,k as chartCapacity,pt as companionSelectionIssue,gt as describeCategoryInventoryConflict,xt as effectiveSeatOwnerCategoryCounts,nt as gaAreasOf,et as gaInventorySegments,Z as gaUnitLabel,ot as gaUnitLabels,ht as groupedTableInventory,rt as growJoinedGAInventory,Mt as inspectCategoryInventoryConflicts,Bt as intactRowBlockMembers,at as isGaUnitLabel,mt as pickBestAvailable,yt as pickBestAvailableInventory,wt as remediateCategoryInventoryConflicts,Pt as resizeChartCapacity,It as resolveRowBlockCount,Gt as resolveRowStartCapacity,kt as resolveRowTerminalCapacity,ut as resolveTicketTierForSeat,G as rowBlockEdgePoint,J as rowBlockPreviewRows,q as rowStartEndpoint,$ as rowTerminalEndpoint,Y as rowWithStartCapacity,U as rowWithTerminalCapacity,it as strandedSingles,st as ticketOptionNotApplicableIssue,ft as ticketSelectionIssue,ct 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}from"../../chunk-JLYR66MT.js";import{a as bt,b as xt,c as Mt,d as gt,e as wt,f as B,h as N}from"../../chunk-5JB4VW6B.js";import"../../chunk-FMZ6HLDH.js";import"../../chunk-QLDV5ZGA.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-UX67GDLV.js";import"../../chunk-BAWUBGWY.js";import{l as R,ma as S,oa as v,pa as P,ra as j,sa as _,w as O,xa as I}from"../../chunk-KN7GLEAI.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 St(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 Pt(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 It(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 Bt(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 kt(t,e){if(t.path||!Number.isFinite(e.x)||!Number.isFinite(e.y))return null;let r=M(t),o=Math.abs(r)<1e-9?b:Math.min(b,Math.floor(D/Math.abs(r))+1),n=null;for(let i=h;i<=Math.max(h,o);i+=1){let c=$(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 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=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{bt as CATEGORY_INVENTORY_FAMILIES,dt 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,lt as applicableTicketTiers,z as capacityControl,St as categoryCapacity,k as chartCapacity,pt as companionSelectionIssue,gt as describeCategoryInventoryConflict,xt as effectiveSeatOwnerCategoryCounts,nt as gaAreasOf,et as gaInventorySegments,Z as gaUnitLabel,ot as gaUnitLabels,ht as groupedTableInventory,rt as growJoinedGAInventory,Mt as inspectCategoryInventoryConflicts,Bt as intactRowBlockMembers,at as isGaUnitLabel,mt as pickBestAvailable,yt as pickBestAvailableInventory,wt as remediateCategoryInventoryConflicts,Pt as resizeChartCapacity,It as resolveRowBlockCount,Gt as resolveRowStartCapacity,kt as resolveRowTerminalCapacity,ut as resolveTicketTierForSeat,G as rowBlockEdgePoint,J as rowBlockPreviewRows,q as rowStartEndpoint,$ as rowTerminalEndpoint,Y as rowWithStartCapacity,U as rowWithTerminalCapacity,it as strandedSingles,st as ticketOptionNotApplicableIssue,ft as ticketSelectionIssue,ct as ticketTierAppliesToSeat,tt as validGAInventorySegments};
@@ -1 +1 @@
1
- "use strict";var Z=Object.defineProperty;var Je=Object.getOwnPropertyDescriptor;var et=Object.getOwnPropertyNames;var tt=Object.prototype.hasOwnProperty;var nt=(e,t)=>{for(var n in t)Z(e,n,{get:t[n],enumerable:!0})},ot=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of et(t))!tt.call(e,r)&&r!==n&&Z(e,r,{get:()=>t[r],enumerable:!(o=Je(t,r))||o.enumerable});return e};var rt=e=>ot(Z({},"__esModule",{value:!0}),e);var xn={};nt(xn,{DEFAULT_SEAT_RADIUS:()=>Qe,FLOOR_STACK_GAP_RATIO:()=>Ke,FLOOR_STACK_MIN_SURFACE_PX:()=>qe,TABLE_SEAT_OFFSET:()=>F,TEXT_BACKGROUND_PADDING_MAX:()=>Tn,TEXT_BACKGROUND_RADIUS_MAX:()=>Rn,TEXT_LETTER_SPACING_MAX:()=>On,TEXT_LETTER_SPACING_MIN:()=>En,TEXT_LINE_HEIGHT_MAX:()=>Cn,TEXT_LINE_HEIGHT_MIN:()=>vn,TEXT_OPACITY_MIN:()=>An,TEXT_WIDTH_MAX:()=>In,TEXT_WIDTH_MIN:()=>Pn,allObjects:()=>Ye,applyAffine:()=>on,buildAisleHoles:()=>ct,buildSeatIndex:()=>dn,buildSectionShell:()=>st,chartBounds:()=>X,composeAffine:()=>sn,createPerspectiveCamera:()=>nn,cubicPoint:()=>G,decomposeAffineLinear:()=>an,distanceToRings:()=>Pe,distributeAlongCubic:()=>J,expandBooth:()=>Xe,expandChart:()=>qt,expandRow:()=>pe,expandRowSlots:()=>Ne,expandTable:()=>Ue,expandTableSlots:()=>ye,floorObjects:()=>$t,floorStackPlacements:()=>$e,floorsOf:()=>Ve,gridStats:()=>yn,hitTest:()=>hn,initialFloorMode:()=>tn,invertAffine:()=>rn,layoutFloorStack:()=>en,mainFloorId:()=>We,nearestWithin:()=>mn,objectCenter:()=>He,owningSectionForObject:()=>Ge,perspectiveTangentAffine:()=>cn,pointInPolygon:()=>he,pointInPolygonWithHoles:()=>U,polygonArea:()=>ne,polygonInscribedAnchor:()=>oe,polygonLabelPoint:()=>Kt,polygonNetArea:()=>ft,projectPerspectivePoint:()=>q,queryRect:()=>pn,resolveSegmentedRowGroups:()=>re,rowInventoryCount:()=>Gt,rowSeatPositions:()=>me,segmentedRowComponentSeats:()=>mt,segmentedRowComponents:()=>ht,segmentedRowSeatTotal:()=>pt,smoothCubicThroughMiddle:()=>it,stackFloors:()=>Wt,tableInventoryCount:()=>Vt,tableSeatCountsBySide:()=>Be,textLayoutMetrics:()=>ee,translateObject:()=>W});module.exports=rt(xn);var gn=Math.PI/180;function j(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function D(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function G(e,t){let n=1-t,o=n*n*n,r=3*n*n*t,i=3*n*t*t,s=t*t*t;return{x:o*e.start.x+r*e.control1.x+i*e.control2.x+s*e.end.x,y:o*e.start.y+r*e.control1.y+i*e.control2.y+s*e.end.y}}function it(e,t,n){let o={x:(e.x+t.x)/2,y:(e.y+t.y)/2},r={x:(n.x-o.x)*4/3,y:(n.y-o.y)*4/3};return{start:{...e},control1:{x:e.x+(t.x-e.x)/3+r.x,y:e.y+(t.y-e.y)/3+r.y},control2:{x:e.x+(t.x-e.x)*2/3+r.x,y:e.y+(t.y-e.y)*2/3+r.y},end:{...t}}}function J(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[G(e,.5)];let o=Array.from({length:n+1},(c,u)=>G(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],p=d===a?0:(u-a)/(d-a);s.push({x:o[l-1].x+(o[l].x-o[l-1].x)*p,y:o[l-1].y+(o[l].y-o[l-1].y)*p})}return s}function _(e,t){return{x:e.x+t.x,y:e.y+t.y}}function B(e,t){return{x:e.x-t.x,y:e.y-t.y}}function k(e,t){return{x:e.x*t,y:e.y*t}}function V(e,t=13){return Array.from({length:t},(n,o)=>G(e,o/(t-1)))}function xe(e,t){let n=Math.max(0,Math.min(1,t))*(e.length-1),o=Math.min(e.length-2,Math.floor(n));return D(e[o],e[o+1],n-o)}function be(e,t,n){let o=Math.max(0,Math.min(1,t)),r=Math.max(o,Math.min(1,n)),i=[xe(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(xe(e,r)),i}function ge(e,t){let n=[[0,1],[1,2],[2,3],[3,0]],o=0,r=Number.POSITIVE_INFINITY;n.forEach(([p,x],m)=>{let h=j(D(e[p],e[x],.5),t);h<r&&(r=h,o=m)});let i=e[o],s=e[(o+1)%4],l=e[(o+2)%4],c=e[(o+3)%4],u=D(i,s,.5),a=B(t,u),d=Math.max(1e-9,Math.hypot(a.x,a.y));return{p0:i,p1:s,p2:l,p3:c,normal:k(a,1/d),depth:(j(i,c)+j(s,l))/2}}function Se(e){let{p0:t,p1:n,p2:o,p3:r,normal:i,depth:s}=e,l=B(n,t),c=B(o,r),u=s*.22,a=s*.12;return{nearPath:{start:t,control1:_(_(t,k(l,1/3)),k(i,u)),control2:_(_(t,k(l,2/3)),k(i,u)),end:n},farPath:{start:o,control1:_(_(r,k(c,2/3)),k(i,a)),control2:_(_(r,k(c,1/3)),k(i,a)),end:r}}}function st(e,t,n){if(e.length!==4)throw new Error("A section shell requires four mapped bounds corners");let o=e.reduce((m,h)=>_(m,h),{x:0,y:0});o.x/=4,o.y/=4;let r=j(e[0],e[1]),i=j(e[0],e[3]),s=n==="auto"?r>i*1.25&&j(o,t)>i?"bezier":"tapered":n;if(s==="rectangle")return{mode:s,outline:e.map(m=>({...m}))};let l=ge(e,t),{p0:c,p1:u,p2:a,p3:d}=l;if(s==="tapered")return{mode:s,outline:[_(c,k(B(u,c),.14)),_(c,k(B(u,c),1-.14)),a,d]};let{nearPath:p,farPath:x}=Se(l);return{mode:s,outline:[...V(p),...V(x).slice(1)]}}function ct(e,t,n,o){if(e.length!==4)throw new Error("Aisle generation requires four mapped bounds corners");if(!Number.isInteger(n)||n<0||n>3)throw new Error("Aisle count must be an integer from 0 to 3");if(n===0)return[];let r=ge(e,t),{p0:i,p1:s,p2:l,p3:c}=r,u=o==="bezier"?Se(r):null,a=u?V(u.nearPath):null,d=u?V(u.farPath).reverse():null,p=Math.min(.055,.18/(n+1));return Array.from({length:n},(x,m)=>{let h=(m+1)/(n+1),f=h-p/2,b=h+p/2;return a&&d?[...be(a,f,b),...be(d,f,b).reverse()]:[D(i,s,f),D(i,s,b),D(c,l,b),D(c,l,f)]})}var Pn=40,In=1200,vn=.8,Cn=3,En=-2,On=20,An=.1,Tn=40,Rn=40,Me=e=>Math.max(1,e.fontSize*.6+(e.letterSpacing??0));function at(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/Me(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 ee(e){let t=e.background?.padding??0,n=e.text.split(/\r?\n/),o=Math.max(1,...n.map(l=>l.length))*Me(e),r=e.width??o+t*2,i=Math.max(1,r-t*2),s=at(e,i);return{width:r,height:s*e.fontSize*(e.lineHeight??1.2)+t*2,lineCount:s,padding:t}}function lt(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 Pe(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=lt(e,o[i],o[r]);s<n&&(n=s)}return n}function we(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,s=t[o].y,l=t[r].x,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 ut(e,t,n){let o=we(e,t)&&!n.some(i=>we(e,i)),r=Pe(e,[t,...n]);return o?r:-r}function N(e,t,n,o,r){let i=ut({x:e,y:t},o,r);return{x:e,y:t,h:n,d:i,max:i+n*Math.SQRT2}}var te=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 ne(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 ft(e,t){return Math.max(0,ne(e)-(t??[]).reduce((n,o)=>n+ne(o),0))}function oe(e,t){let n=t??[];if(!e.length)return{point:{x:0,y:0},radius:0};if(e.length<3){let h=e.reduce((b,M)=>b+M.x,0)/e.length,f=e.reduce((b,M)=>b+M.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 te,p=u/2;for(let h=o;h<i;h+=u)for(let f=r;f<s;f+=u)d.push(N(h+p,f+p,p,e,n));let x=N(o+l/2,r+c/2,0,e,n),m=0;for(;d.size;){let h=d.pop();if(!h)break;h.d>x.d&&(x=h),!(h.max-x.d<=a)&&(m>=4e3||(m+=1,p=h.h/2,d.push(N(h.x-p,h.y-p,p,e,n)),d.push(N(h.x+p,h.y-p,p,e,n)),d.push(N(h.x-p,h.y+p,p,e,n)),d.push(N(h.x+p,h.y+p,p,e,n))))}return{point:{x:x.x,y:x.y},radius:Math.max(0,x.d)}}function L(e,t,n){return e<t?t:e>n?n:e}var Dn=Math.PI*2;function Ie(e,t,n){return dt(e,r=>({x:r.x+t,y:r.y+n}))}function dt(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 jn=4/3;function ht(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,x=(r>0?t[r-1]:void 0)==="break"?2:1,m=d?{...i}:{x:i.x+Math.cos(a)*u*x,y:i.y+Math.sin(a)*u*x},h=d?c+1:Math.max(1,c-(x-1));o.push({origin:m,rotation:a*180/Math.PI,seatCount:h,seatSpacing:u})}return o}function mt(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 pt(e){return e.reduce((t,n)=>t+n.seatCount,0)}function re(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((p,x)=>p.segmentedRow.componentIndex-x.segmentedRow.componentIndex),s=i[0]?.segmentedRow?.componentCount??0,l=i[0]?.segmentedRow;if(!l||!(s>=2&&i.length===s&&l?.boundaryBefore==="start"&&i.every((p,x)=>p.segmentedRow?.kind==="segmented-row-v1"&&p.segmentedRow.groupId===o&&p.segmentedRow.componentCount===s&&p.segmentedRow.componentIndex===x&&p.segmentedRow.repeatLabelOnComponents===l.repeatLabelOnComponents&&(x===0?p.segmentedRow.boundaryBefore==="start":p.segmentedRow.boundaryBefore!=="start")&&p.segmentedRow.displayLabel===l.displayLabel)))continue;let u=i.reduce((p,x)=>p+x.seatCount,0),a=0,d=0;for(let p of i)p.segmentedRow.boundaryBefore==="break"&&(a+=1),t.set(p.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+=p.seatCount,d+=p.seatCount}return t}var yt="ABCDEFGHIJKLMNOPQRSTUVWXYZ";var xt="abcdefghijklmnopqrstuvwxyz";function bt(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 ie(e,t=!1){let n=t?xt:yt;return bt(Math.max(0,Math.floor(e)-1),n)}var gt=[[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 ve(e){if(!Number.isFinite(e)||e<=0)return String(e);let t=Math.floor(e),n="";for(let[o,r]of gt)for(;t>=o;)n+=r,t-=o;return n}function St(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 se(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 x=Math.ceil(c/2),m=i==="updown"?t<x?n+2*t:n-1+2*(c-t):t<x?n+2*(x-1-t):n+1+2*(t-x);return`${s}${m}`}let u=i==="odd"||i==="even"?2:r,a=l!=null&&Number.isFinite(l)?l-(c-1)*u:n,d=o==="center"?St(c)[t]:o==="rtl"?c-1-t:t,p;switch(i){case"odd":{let x=a%2===1?a:a+1;p=String(x+d*2);break}case"even":{let x=a%2===0?a:a+1;p=String(x+d*2);break}case"roman":p=ve(a+d*r);break;case"letters-upper":p=ie(a+d*r,!1);break;case"letters-lower":p=ie(a+d*r,!0);break;default:p=String(a+d*r);break}return`${s}${p}`}function Mt(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function Ce(e,t,n){return n?.label??`${e.label}-${se(e,t)}`}function ce(e,t,n,o){if(o?.displayLabel)return o.displayLabel;if(!n)return`${e.displayLabel??e.label}-${se(e,t)}`;let r=Mt(n),i=n.displayOffset+t;return`${n.displayLabel}-${se(r,i)}`}var Y=.02291666666666667,Hn=1/Y,wt=58,Pt=wt*Y;var It=3,Ee=0,ae=120,vt=0,Ct=45,Et=7,K=1.2;function le(e,t,n,o){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):o}function Ot(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=Et?e:It}function Oe(e,t={}){let n=le(t.floorBaseHeightM,Ee,ae,0),o=Math.min(ae,n+Ot(e.elevation)*Pt),r=e.height===void 0?o:le(e.height,Ee,ae,o),i=le(e.rake,vt,Ct,0);return{height:r,rake:i}}function Ae(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 Te(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 At(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 Re(e,t){return Math.hypot(e.cx-t.cx,e.cy-t.cy)-e.r-t.r}function ue(e,t){let n=1/0;for(let o of Ae(e)){let r=Te(t,o.x,o.y);r<n&&(n=r)}for(let o of Ae(t)){let r=Te(e,o.x,o.y);r<n&&(n=r)}return n}function Tt(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 Rt(e){let t=e.length;if(t<3)return null;let n=0,o=0;for(let M of e)n+=M.x,o+=M.y;n/=t,o/=t;let r=0,i=0,s=0,l=0,c=0,u=0,a=0;for(let M of e){let g=M.x-n,y=M.y-o;r+=g*g,s+=y*y,i+=g*y,l+=g*g*g,c+=y*y*y,u+=g*y*y,a+=y*g*g}let d=r*s-i*i;if(Math.abs(d)<1e-9)return null;let p=(l+u)/2,x=(c+a)/2,m=(p*s-x*i)/d,h=(x*r-p*i)/d,f=m+n,b=h+o;return!Number.isFinite(f)||!Number.isFinite(b)?null:{cx:f,cy:b}}var _t=.15;function kt(e){if(e.length<2)return null;let t=e.map(M=>{let g=0,y=0;for(let P of M.pts)g+=P.x,y+=P.y;return{x:g/M.pts.length,y:y/M.pts.length}}),n=0,o=0;for(let M of t)n+=M.x,o+=M.y;n/=t.length,o/=t.length;let r=0,i=0,s=0;for(let M of t){let g=M.x-n,y=M.y-o;r+=g*g,i+=g*y,s+=y*y}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 p=Math.hypot(a,d);if(!(p>1e-12))return null;a/=p,d/=p;let x=1/0,m=-1/0,h=[];for(let M of e){let g=1/0,y=-1/0;for(let P of M.pts){let S=P.x*a+P.y*d;S<g&&(g=S),S>y&&(y=S),S<x&&(x=S),S>m&&(m=S)}h.push(y-g)}let f=m-x;return f>1e-9?(h.sort((M,g)=>M-g),h[Math.min(h.length-1,Math.floor(h.length*.9))]/f<=Lt?{x:a,y:d}:null):null}var Lt=.35;function _e(e,t,n,o){let r=new Map;for(let f of n){let b=t[f],M=b.rowId||`__seat-${f}`,g=r.get(M);g||(g={pts:[],idx:[]},r.set(M,g)),g.pts.push({x:b.x,y:b.y}),g.idx.push(f)}if(!r.size)return{sectionId:e,rows:[],blockCount:0};let i=[];for(let[f,b]of r){let M=Tt(b.pts,b.idx),g=0;for(let y of M.pts)g+=Math.hypot(y.x-o.x,y.y-o.y);i.push({id:f,pts:M.pts,seatIndices:M.seatIndices,blockId:-1,ordinal:0,blockDepth:0,focalDistance:g/M.pts.length})}let s=i.map(f=>At(f.pts)),l=[];for(let f=0;f<i.length;f++){let b=1/0;for(let M=0;M<i.length;M++){if(f===M||Re(s[f],s[M])>=b)continue;let g=ue(i[f].pts,i[M].pts);g<b&&(b=g)}Number.isFinite(b)&&l.push(b)}l.sort((f,b)=>f-b);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 b=f+1;b<i.length;b++)Re(s[f],s[b])>u||ue(i[f].pts,i[b].pts)<=u&&(a[f].push(b),a[b].push(f));let d=0;for(let f=0;f<i.length;f++){if(i[f].blockId!==-1)continue;let b=d++,M=[f];for(i[f].blockId=b;M.length;){let g=M.pop();for(let y of a[g])i[y].blockId===-1&&(i[y].blockId=b,M.push(y))}}let p=new Map;for(let f of i){let b=p.get(f.blockId)??[];b.push(f),p.set(f.blockId,b)}let x=[];for(let f of i){if(f.pts.length<4)continue;let b=Rt(f.pts);b&&(!Number.isFinite(b.cx)||!Number.isFinite(b.cy)||x.push({x:b.cx,y:b.cy}))}let m=x.length>=2?(()=>{let f=x.map(g=>g.x).sort((g,y)=>g-y),b=x.map(g=>g.y).sort((g,y)=>g-y),M=Math.floor(x.length/2);return{cx:f[M],cy:b[M]}})():null;if(m){let f=S=>Math.hypot(S.x-m.cx,S.y-m.cy),b=1/0,M=-1/0,g=[];for(let S of i){let w=1/0,v=-1/0;for(let C of S.pts){let I=f(C);I<w&&(w=I),I>v&&(v=I)}g.push(v-w),w<b&&(b=w),v>M&&(M=v)}let y=M-b;g.sort((S,w)=>S-w);let P=g[Math.min(g.length-1,Math.floor(g.length*.9))];if(y>1e-9&&P/y<=_t){let S=i.map(E=>{let H=0;for(let Ze of E.pts)H+=f(Ze);return{row:E,radius:H/E.pts.length}}),w=0,v=0;for(let E of S)w+=E.radius,v+=E.row.focalDistance;w/=S.length,v/=S.length;let C=0;for(let E of S)C+=(E.radius-w)*(E.row.focalDistance-v);if(C<0)for(let E of S)E.radius=-E.radius;let R=1/0;for(let E of S)E.radius<R&&(R=E.radius);S.sort((E,H)=>E.radius-H.radius);let A=-1,O=-1/0,T=y/Math.max(1,S.length)*.5,Q=[];for(let E of S)E.radius-O>T&&(A++,O=E.radius),E.row.ordinal=A,E.row.blockDepth=E.radius-R,Q.push(E.row);return{sectionId:e,rows:Q,blockCount:d}}}let h=[];for(let[,f]of p){let b=kt(f);if(b){let M=y=>{let P=0;for(let S of y.pts)P+=S.x*b.x+S.y*b.y;return P/y.pts.length};f.sort((y,P)=>M(y)-M(P)),f.length>=2&&f[0].focalDistance>f[f.length-1].focalDistance&&f.reverse();let g=0;for(let y=0;y<f.length;y++)y>0&&(g+=ue(f[y-1].pts,f[y].pts)),f[y].ordinal=y,f[y].blockDepth=g,h.push(f[y])}else{let M=1/0;for(let g of f)g.focalDistance<M&&(M=g.focalDistance);f.sort((g,y)=>g.focalDistance-y.focalDistance);for(let g=0;g<f.length;g++)f[g].ordinal=g,f[g].blockDepth=Math.max(0,f[g].focalDistance-M),h.push(f[g])}}return{sectionId:e,rows:h,blockCount:d}}var Dt=/^\d{4}-\d{2}-\d{2}$/;function jt(e){let t=Date.parse(e);return Number.isFinite(t)?Dt.test(e)?t+864e5:t:null}function Ft(e,t=Date.now()){if(e.validUntil===void 0){if(e.status!=="approved")return!0;let o=e.assessedAt?Date.parse(e.assessedAt):Number.NaN;return Number.isFinite(o)&&(t instanceof Date?t.getTime():t)<=o+366*864e5}let n=jt(e.validUntil);return n===null?!1:(t instanceof Date?t.getTime():t)<n}function Nt(e,t,n){return!(e.eventConfigurationId&&e.eventConfigurationId!==t||e.eventConfigurationVersion!==void 0&&e.eventConfigurationVersion!==n)}function Bt(e){return e.status!=="draft"&&e.status!=="retracted"}function Ut(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 ke(e,t={}){return!!e&&Bt(e)&&Nt(e,t.activeConfigurationId,t.activeConfigurationVersion)&&Ut(e,t.activeBasisSha256)&&Ft(e,t.now)}function Fe(e){return e?e.accessibility&&e.accessibility.length?e.wheelchairSpaceType&&!e.accessibility.includes("wheelchair")?["wheelchair",...e.accessibility]:e.accessibility:e.wheelchairSpaceType?["wheelchair"]:e.accessible?["wheelchair"]:[]:[]}var $=Math.PI/180,Xt=9,F=16;function de(e,t,n,o){let r=n*$,i=Math.cos(r),s=Math.sin(r);return{x:o.x+e*i-t*s,y:o.y+e*s+t*i}}function me(e){let{seatCount:t,seatSpacing:n,curve:o,rotation:r,origin:i}=e,s=[];if(e.path)return J(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(de(u*n,0,r,i));return s}let l=o/(t-1)*$,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),p=-c+c*Math.cos(a);s.push(de(d,p,r,i))}return s}function Ht(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function Gt(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 Ne(e,t){let n=Ht(e);return me(e).map((o,r)=>{let i=n.get(r),s=Fe(i),l=Ce(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:ce(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 pe(e){let t=[];for(let n of Ne(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 Be(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 ye(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,p,x)=>{let m=o.get(a),h=Fe(m),f=m?.label??`${e.label}-${a+1}`,b=e.displayLabel??e.label;return{index:a,label:f,displayLabel:m?.displayLabel??`${b}-${a+1}`,x:d+(m?.dx??0),y:p+(m?.dy??0),categoryKey:m?.categoryKey??e.categoryKey,skipped:!!m?.skip,accessible:h.length>0,accessibility:h,wheelchairSpaceType:m?.wheelchairSpaceType,commercial:m?.commercial,glyph:m?.glyph,viewUrl:m?.viewFromSeatUrl,viewMeta:m?.viewFromSeatUrl?m.viewFromSeatMeta:void 0,labelStyle:m?.labelStyle,...x?{side:x}:{}}};if(e.shape==="round"){let a=(e.radius??40)+F,d=e.rotation*$,p=Math.max(0,Math.min(360,e.seatArc??360));if(p>=360||n===1){for(let f=0;f<n;f++){let b=d+f/n*2*Math.PI;t.push(r(f,e.center.x+a*Math.cos(b),e.center.y+a*Math.sin(b)))}return t}let x=p*$,m=(2*Math.PI-x)/2,h=d+m;for(let f=0;f<n;f++){let b=h+f/(n-1)*x;t.push(r(f,e.center.x+a*Math.cos(b),e.center.y+a*Math.sin(b)))}return t}let i=e.width??80,s=e.height??50,l=Be(e),c=["top","bottom","left","right"],u=0;for(let a of c){let d=l[a];for(let p=0;p<d;p++){let x,m;a==="top"?(x=-i/2+(p+.5)*i/d,m=-s/2-F):a==="bottom"?(x=-i/2+(p+.5)*i/d,m=s/2+F):a==="left"?(x=-i/2-F,m=-s/2+(p+.5)*s/d):(x=i/2+F,m=-s/2+(p+.5)*s/d);let h=de(x,m,e.rotation,e.center);t.push(r(u++,h.x,h.y,a))}}return t}function Vt(e){return e.bookAsWhole||e.variableOccupancy?Math.max(0,Math.round(e.seatCount)):ye(e).filter(t=>!t.skipped).length}function Ue(e){return ye(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 Xe(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 he(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 Yt(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 U(e,t,n){return he(e,t)&&!(n??[]).some(o=>he(e,o)||Yt(e,o))}function Kt(e,t){return oe(e,t).point}function fe(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 He(e){switch(e.type){case"row":{let t=pe(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 fe(e.points);case"section":return fe(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?fe(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 Le(e,t){return e.length===t.length&&e.every((n,o)=>n.x===t[o].x&&n.y===t[o].y)}function zt(e,t){if(e.type!=="gaArea"||!Le(e.points,t.outline))return!1;let n=e.holes??[],o=t.holes??[];return n.length===o.length&&n.every((r,i)=>Le(r,o[i]))}function Ge(e,t){let n=e.filter(s=>s.type==="section"),o="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0,r=He(t);return(o?n.find(s=>(s.logicalSectionId??s.id)===o&&(zt(t,s)||U(r,s.outline,s.holes))):void 0)??n.find(s=>U(r,s.outline,s.holes))}function Ve(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 $t(e,t){let n=Ve(e);return(t?n.find(o=>o.id===t):n[0])?.objects??[]}function Ye(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}function W(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:Ie(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 Wt(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:W(s,0,i))}),{...e,objects:n,floors:void 0}}function De(e,t,n,o,r,i,s,l,c){let u=[],a=re(e),d=m=>!m?.eventConfigurationId||m.eventConfigurationId===o&&(m.eventConfigurationVersion===void 0||m.eventConfigurationVersion===c),p=m=>ke(m,{activeConfigurationId:o,activeConfigurationVersion:c,activeBasisSha256:r,now:l}),x=(m,h)=>p(m)?{...m,coverage:h}:void 0;for(let m of e){let h=[];if(m.type==="row"?h=pe(m):m.type==="table"?h=Ue(m):m.type==="booth"&&(h=Xe(m)),!h.length)continue;for(let y of h)y.viewUrl&&!d(y.viewMeta)&&(y.viewUrl=void 0,y.viewMeta=void 0);if(m.type==="row"){let y=a.get(m.id);if(y){let P=new Map((m.overrides??[]).map(S=>[S.index,S]));for(let S of h){let w=Number(S.id.slice(S.id.lastIndexOf(":")+1));if(!Number.isInteger(w))continue;S.logicalRowId=y.groupId,S.logicalSeatIndex=y.adjacencyOffset+w,P.get(w)?.displayLabel||(S.displayLabel=ce(m,w,y)),!S.viewUrl&&y.viewFromSeatUrl&&d(y.viewFromSeatMeta)&&(S.viewUrl=y.viewFromSeatUrl,S.viewMeta=y.viewFromSeatMeta);let v=P.get(w)?.confidenceEvidence;S.confidenceEvidence=x(v,"exact-seat")??x(m.confidenceEvidence,"row-representative")??x(y.confidenceEvidence,"row-representative")}}}let f=Ge(e,m),b=f?.viewFromSeatUrl,g=(f?.zone?t?.find(y=>y.id===f.zone):void 0)?.focalPoint??n;for(let y of h){if(!y.confidenceEvidence){let P=Number(y.id.slice(y.id.lastIndexOf(":")+1)),S=(m.type==="row"||m.type==="table")&&Number.isInteger(P)?m.overrides?.find(w=>w.index===P)?.confidenceEvidence:void 0;y.confidenceEvidence=x(S,"exact-seat")??(m.type==="row"?x(m.confidenceEvidence,"row-representative"):void 0)}y.confidenceEvidence??=x(f?.confidenceEvidence,"section-representative")??(s?x(s.evidence,s.coverage):void 0),!y.viewUrl&&b&&d(f?.viewFromSeatMeta)&&(y.viewUrl=b,y.viewMeta=f?.viewFromSeatMeta),!y.viewUrl&&i&&d(i.meta)&&(y.viewUrl=i.url,y.viewMeta=i.meta),f&&(y.sectionId=f.logicalSectionId??f.id),f?.zone&&(y.zoneId=f.zone),g&&(y.focalPoint={...g})}u.push(...h)}return u}function qt(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=De(r.objects,e.zones,i,e.eventConfigurationId,e.confidenceBasisSha256,s,l,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);t.resolveEyeHeights!==!1&&je(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=De(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&&je(e.objects,e.focalPoint,t.floorBaseHeightM??0,n),n}function je(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+K;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],x=(d.sectionId?r.find(h=>h.id===d.sectionId)??r.find(h=>h.logicalSectionId===d.sectionId&&U({x:d.x,y:d.y},h.outline,h.holes)):void 0)??r.find(h=>U({x:d.x,y:d.y},h.outline,h.holes))??null;if(s[a]=x,!x)continue;l.has(x.id)||l.set(x.id,Oe(x,{floorBaseHeightM:n}));let m=c.get(x.id);m?m.push(a):c.set(x.id,[a])}let u=new Array(o.length).fill(void 0);for(let[a,d]of c){let p=l.get(a);if(!p)continue;let x=p.rake>0?Math.tan(p.rake*Math.PI/180):0,m=_e(a,o,d,t);for(let h of m.rows){let f=h.blockDepth*Y*x,b=p.height+f;for(let M of h.seatIndices)u[M]=b}}for(let a=0;a<o.length;a++){let d=o[a],p=s[a];if(!p){d.eyeHeightM=n+K;continue}let x=l.get(p.id);d.eyeHeightM=(u[a]??x.height)+K}}var z=40;function X(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 Ye(e))if(c.type==="row"){let u=new Map((c.overrides??[]).map(a=>[a.index,a]));me(c).forEach((a,d)=>{let p=u.get(d);p?.skip||l(a.x+(p?.dx??0),a.y+(p?.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=F+Xt,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=ee(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}}var Ke=.08,Qt=.045;function ze(e,t,n){return{...e,objects:t,floors:void 0,...n?{focalPoint:n}:{},referenceImage:void 0,backgroundImage:void 0}}function Zt(e,t,n){let o=e.focalPoint??t.focalPoint;return o?o.x:n.x+n.width/2}function $e(e){let t=e.floors??[];if(!t.length)return[];let n=t.map(s=>X(ze(e,s.objects,s.focalPoint),{freeText:"exclude"})),r=Math.max(1,...n.map(s=>s.width))*Ke,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:-Zt(s,e,c),y:u},bounds:c}})}function Jt(e,t,n,o){let r=t==="name"?e.label:e.levelBadge;if(!r)return[];let i=Math.max(1,n*Qt),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 en(e,t={}){let n=e.floors;if(!n||n.length<2)return e;let o=$e(e),r=[];n.forEach((u,a)=>{let{x:d,y:p}=o[a].translation;for(let x of u.objects)a>0&&x.type==="shape"&&x.role==="stage"||r.push(W(x,d,p))});let i={...e,objects:r,floors:void 0},s=X(i,{freeText:"exclude"}),l=Math.max(1,s.width,s.height),c=e.theme?.textColor??"#94a3b8";for(let u of o)r.push(...Jt(u,t.labelStyle??"number",l,c));return{...i,objects:r,referenceImage:void 0,backgroundImage:void 0}}function We(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=X(ze(e,i.objects,i.focalPoint),{freeText:"exclude"}),l=s.width*s.height;l>r&&(r=l,o=i)}return o.id}var qe=640;function tn(e,t){return(e.floors?.length??0)<2?null:!Number.isFinite(t)||t<=0||t>=qe?"all":We(e)}function nn(e,t=0){let n=Math.max(1,e.width,e.height),o={x:e.x+e.width/2,y:e.y+e.height/2},r=n*1.55,i=Math.max(n*.82,Math.max(0,t)+n*.45);return{target:o,distance:r,height:i,focalLength:Math.hypot(r,i),yawRad:-8*Math.PI/180}}function q(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),p=(-e.distance*u-e.height*a)/d,x=(-e.height*u+e.distance*a)/d,m=Math.max(d*.08,p),h=e.focalLength/m;return{x:e.target.x+l*h,y:e.target.y-x*h,depth:m,scale:h}}function on(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 rn(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 sn(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 cn(e,t,n=()=>0){let o=q(e,t,n(t)),r={x:t.x+1,y:t.y},i={x:t.x,y:t.y+1},s=q(e,r,n(r)),l=q(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 an(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 Qe=9;function ln(e){if(e.kind==="circle")return{hx:e.r,hy:e.r};let t=e.width/2,n=e.height/2,o=e.rotation??0;if(!o)return{hx:t,hy:n};let r=o*Math.PI/180,i=Math.abs(Math.cos(r)),s=Math.abs(Math.sin(r));return{hx:t*i+n*s,hy:t*s+n*i}}function un(e,t,n){let o=t-e.seat.x,r=n-e.seat.y;if(e.shape.kind==="circle")return o*o+r*r<=e.shape.r*e.shape.r;let i=e.shape.rotation??0,s=o,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 fn(e,t,n,o,r){if(e.shape.kind==="circle"){let m=Math.min(Math.max(e.seat.x,t),o),h=Math.min(Math.max(e.seat.y,n),r),f=e.seat.x-m,b=e.seat.y-h;return f*f+b*b<=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(([m,h])=>[e.seat.x+m*l-h*c,e.seat.y+m*c+h*l]),p=[[t,n],[o,n],[o,r],[t,r]],x=[[1,0],[0,1],[l,c],[-c,l]];for(let[m,h]of x){let f=1/0,b=-1/0;for(let[y,P]of d){let S=y*m+P*h;S<f&&(f=S),S>b&&(b=S)}let M=1/0,g=-1/0;for(let[y,P]of p){let S=y*m+P*h;S<M&&(M=S),S>g&&(g=S)}if(b<M||g<f)return!1}return!0}function dn(e,t={}){let n=t.seatRadius??Qe,o=e.length,r=new Array(o),i=1/0,s=1/0,l=-1/0,c=-1/0,u=0;for(let S=0;S<o;S++){let w=e[S],v=t.shapeOf?.(w)??{kind:"circle",r:n},{hx:C,hy:I}=ln(v);r[S]={seat:w,shape:v,hx:C,hy:I},w.x-C<i&&(i=w.x-C),w.y-I<s&&(s=w.y-I),w.x+C>l&&(l=w.x+C),w.y+I>c&&(c=w.y+I),C>u&&(u=C),I>u&&(u=I)}o===0&&(i=0,s=0,l=0,c=0);let a=u>0?u*4:1,d=Math.max(l-i,0),p=Math.max(c-s,0),x=Math.max(64,t.maxCells??o*4),m=a,h=Math.max(1,Math.ceil(d/m)||1),f=Math.max(1,Math.ceil(p/m)||1);for(;h*f>x&&(h>1||f>1);)m*=2,h=Math.max(1,Math.ceil(d/m)||1),f=Math.max(1,Math.ceil(p/m)||1);let b=h*f,M=new Int32Array(b+1),g=0;for(let S=0;S<o;S++){let w=r[S],v=L(Math.floor((w.seat.x-w.hx-i)/m),0,h-1),C=L(Math.floor((w.seat.x+w.hx-i)/m),0,h-1),I=L(Math.floor((w.seat.y-w.hy-s)/m),0,f-1),R=L(Math.floor((w.seat.y+w.hy-s)/m),0,f-1);for(let A=I;A<=R;A++)for(let O=v;O<=C;O++)M[A*h+O+1]++,g++}for(let S=0;S<b;S++)M[S+1]+=M[S];let y=new Int32Array(g),P=M.slice(0,b);for(let S=0;S<o;S++){let w=r[S],v=L(Math.floor((w.seat.x-w.hx-i)/m),0,h-1),C=L(Math.floor((w.seat.x+w.hx-i)/m),0,h-1),I=L(Math.floor((w.seat.y-w.hy-s)/m),0,f-1),R=L(Math.floor((w.seat.y+w.hy-s)/m),0,f-1);for(let A=I;A<=R;A++)for(let O=v;O<=C;O++){let T=A*h+O;y[P[T]++]=S}}return{seats:e,entries:r,minX:i,minY:s,cell:m,cols:h,rows:f,cellStart:M,items:y,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),p=Math.floor((t.y-l)/i);if(d<0||p<0||d>=o||p>=r)return null;let x=p*o+d,m=c[x+1],h=-1,f=1/0;for(let b=c[x];b<m;b++){let M=u[b],g=a[M];if(n.filter&&!n.filter(g.seat.id,g.seat)||!un(g,t.x,t.y))continue;let y=t.x-g.seat.x,P=t.y-g.seat.y,S=y*y+P*P;(S<f||S===f&&M<h)&&(f=S,h=M)}return h<0?null:a[h].seat.id}function mn(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,p=Math.max(0,Math.floor((t.x-n-l)/s)),x=Math.min(r-1,Math.floor((t.x+n-l)/s)),m=Math.max(0,Math.floor((t.y-n-c)/s)),h=Math.min(i-1,Math.floor((t.y+n-c)/s));if(p>x||m>h)return null;let f=-1,b=n*n,M=e.stamp,g=++e.epoch;for(let y=m;y<=h;y++){let P=y*r;for(let S=p;S<=x;S++){let w=P+S,v=u[w+1];for(let C=u[w];C<v;C++){let I=a[C];if(M[I]===g)continue;M[I]=g;let R=d[I];if(o.filter&&!o.filter(R.seat.id,R.seat))continue;let A=t.x-R.seat.x,O=t.y-R.seat.y,T=A*A+O*O;(T<b||T===b&&I<f)&&(b=T,f=I)}}}return f<0?null:d[f].seat.id}function pn(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:p,cellStart:x,items:m,entries:h}=e,f=Math.max(0,Math.floor((o-d)/a)),b=Math.min(c-1,Math.floor((r-d)/a)),M=Math.max(0,Math.floor((i-p)/a)),g=Math.min(u-1,Math.floor((s-p)/a));if(f>b||M>g)return[];let y=[],P=e.stamp,S=++e.epoch;for(let w=M;w<=g;w++){let v=w*c;for(let C=f;C<=b;C++){let I=v+C,R=x[I+1];for(let A=x[I];A<R;A++){let O=m[A];if(P[O]===S)continue;P[O]=S;let T=h[O];if(n.filter&&!n.filter(T.seat.id,T.seat))continue;(l==="center"?T.seat.x>=o&&T.seat.x<=r&&T.seat.y>=i&&T.seat.y<=s:fn(T,o,i,r,s))&&y.push(O)}}}return y.sort((w,v)=>w-v),y.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={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,buildAisleHoles,buildSeatIndex,buildSectionShell,chartBounds,composeAffine,createPerspectiveCamera,cubicPoint,decomposeAffineLinear,distanceToRings,distributeAlongCubic,expandBooth,expandChart,expandRow,expandRowSlots,expandTable,expandTableSlots,floorObjects,floorStackPlacements,floorsOf,gridStats,hitTest,initialFloorMode,invertAffine,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 Z=Object.defineProperty;var Je=Object.getOwnPropertyDescriptor;var et=Object.getOwnPropertyNames;var tt=Object.prototype.hasOwnProperty;var nt=(e,t)=>{for(var n in t)Z(e,n,{get:t[n],enumerable:!0})},ot=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of et(t))!tt.call(e,r)&&r!==n&&Z(e,r,{get:()=>t[r],enumerable:!(o=Je(t,r))||o.enumerable});return e};var rt=e=>ot(Z({},"__esModule",{value:!0}),e);var xn={};nt(xn,{DEFAULT_SEAT_RADIUS:()=>Qe,FLOOR_STACK_GAP_RATIO:()=>Ke,FLOOR_STACK_MIN_SURFACE_PX:()=>qe,TABLE_SEAT_OFFSET:()=>F,TEXT_BACKGROUND_PADDING_MAX:()=>Tn,TEXT_BACKGROUND_RADIUS_MAX:()=>Rn,TEXT_LETTER_SPACING_MAX:()=>On,TEXT_LETTER_SPACING_MIN:()=>En,TEXT_LINE_HEIGHT_MAX:()=>Cn,TEXT_LINE_HEIGHT_MIN:()=>vn,TEXT_OPACITY_MIN:()=>An,TEXT_WIDTH_MAX:()=>In,TEXT_WIDTH_MIN:()=>Pn,allObjects:()=>Ye,applyAffine:()=>on,buildAisleHoles:()=>ct,buildSeatIndex:()=>dn,buildSectionShell:()=>st,chartBounds:()=>X,composeAffine:()=>sn,createPerspectiveCamera:()=>nn,cubicPoint:()=>G,decomposeAffineLinear:()=>an,distanceToRings:()=>Pe,distributeAlongCubic:()=>J,expandBooth:()=>Xe,expandChart:()=>qt,expandRow:()=>pe,expandRowSlots:()=>Ne,expandTable:()=>Ue,expandTableSlots:()=>ye,floorObjects:()=>$t,floorStackPlacements:()=>$e,floorsOf:()=>Ve,gridStats:()=>yn,hitTest:()=>hn,initialFloorMode:()=>tn,invertAffine:()=>rn,layoutFloorStack:()=>en,mainFloorId:()=>We,nearestWithin:()=>mn,objectCenter:()=>He,owningSectionForObject:()=>Ge,perspectiveTangentAffine:()=>cn,pointInPolygon:()=>he,pointInPolygonWithHoles:()=>U,polygonArea:()=>ne,polygonInscribedAnchor:()=>oe,polygonLabelPoint:()=>Kt,polygonNetArea:()=>ft,projectPerspectivePoint:()=>q,queryRect:()=>pn,resolveSegmentedRowGroups:()=>re,rowInventoryCount:()=>Gt,rowSeatPositions:()=>me,segmentedRowComponentSeats:()=>mt,segmentedRowComponents:()=>ht,segmentedRowSeatTotal:()=>pt,smoothCubicThroughMiddle:()=>it,stackFloors:()=>Wt,tableInventoryCount:()=>Vt,tableSeatCountsBySide:()=>Be,textLayoutMetrics:()=>ee,translateObject:()=>W});module.exports=rt(xn);var gn=Math.PI/180;function j(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function D(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function G(e,t){let n=1-t,o=n*n*n,r=3*n*n*t,i=3*n*t*t,s=t*t*t;return{x:o*e.start.x+r*e.control1.x+i*e.control2.x+s*e.end.x,y:o*e.start.y+r*e.control1.y+i*e.control2.y+s*e.end.y}}function it(e,t,n){let o={x:(e.x+t.x)/2,y:(e.y+t.y)/2},r={x:(n.x-o.x)*4/3,y:(n.y-o.y)*4/3};return{start:{...e},control1:{x:e.x+(t.x-e.x)/3+r.x,y:e.y+(t.y-e.y)/3+r.y},control2:{x:e.x+(t.x-e.x)*2/3+r.x,y:e.y+(t.y-e.y)*2/3+r.y},end:{...t}}}function J(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[G(e,.5)];let o=Array.from({length:n+1},(c,u)=>G(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],p=d===a?0:(u-a)/(d-a);s.push({x:o[l-1].x+(o[l].x-o[l-1].x)*p,y:o[l-1].y+(o[l].y-o[l-1].y)*p})}return s}function _(e,t){return{x:e.x+t.x,y:e.y+t.y}}function B(e,t){return{x:e.x-t.x,y:e.y-t.y}}function k(e,t){return{x:e.x*t,y:e.y*t}}function V(e,t=13){return Array.from({length:t},(n,o)=>G(e,o/(t-1)))}function xe(e,t){let n=Math.max(0,Math.min(1,t))*(e.length-1),o=Math.min(e.length-2,Math.floor(n));return D(e[o],e[o+1],n-o)}function be(e,t,n){let o=Math.max(0,Math.min(1,t)),r=Math.max(o,Math.min(1,n)),i=[xe(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(xe(e,r)),i}function ge(e,t){let n=[[0,1],[1,2],[2,3],[3,0]],o=0,r=Number.POSITIVE_INFINITY;n.forEach(([p,x],m)=>{let h=j(D(e[p],e[x],.5),t);h<r&&(r=h,o=m)});let i=e[o],s=e[(o+1)%4],l=e[(o+2)%4],c=e[(o+3)%4],u=D(i,s,.5),a=B(t,u),d=Math.max(1e-9,Math.hypot(a.x,a.y));return{p0:i,p1:s,p2:l,p3:c,normal:k(a,1/d),depth:(j(i,c)+j(s,l))/2}}function Se(e){let{p0:t,p1:n,p2:o,p3:r,normal:i,depth:s}=e,l=B(n,t),c=B(o,r),u=s*.22,a=s*.12;return{nearPath:{start:t,control1:_(_(t,k(l,1/3)),k(i,u)),control2:_(_(t,k(l,2/3)),k(i,u)),end:n},farPath:{start:o,control1:_(_(r,k(c,2/3)),k(i,a)),control2:_(_(r,k(c,1/3)),k(i,a)),end:r}}}function st(e,t,n){if(e.length!==4)throw new Error("A section shell requires four mapped bounds corners");let o=e.reduce((m,h)=>_(m,h),{x:0,y:0});o.x/=4,o.y/=4;let r=j(e[0],e[1]),i=j(e[0],e[3]),s=n==="auto"?r>i*1.25&&j(o,t)>i?"bezier":"tapered":n;if(s==="rectangle")return{mode:s,outline:e.map(m=>({...m}))};let l=ge(e,t),{p0:c,p1:u,p2:a,p3:d}=l;if(s==="tapered")return{mode:s,outline:[_(c,k(B(u,c),.14)),_(c,k(B(u,c),1-.14)),a,d]};let{nearPath:p,farPath:x}=Se(l);return{mode:s,outline:[...V(p),...V(x).slice(1)]}}function ct(e,t,n,o){if(e.length!==4)throw new Error("Aisle generation requires four mapped bounds corners");if(!Number.isInteger(n)||n<0||n>3)throw new Error("Aisle count must be an integer from 0 to 3");if(n===0)return[];let r=ge(e,t),{p0:i,p1:s,p2:l,p3:c}=r,u=o==="bezier"?Se(r):null,a=u?V(u.nearPath):null,d=u?V(u.farPath).reverse():null,p=Math.min(.055,.18/(n+1));return Array.from({length:n},(x,m)=>{let h=(m+1)/(n+1),f=h-p/2,b=h+p/2;return a&&d?[...be(a,f,b),...be(d,f,b).reverse()]:[D(i,s,f),D(i,s,b),D(c,l,b),D(c,l,f)]})}var Pn=40,In=1200,vn=.8,Cn=3,En=-2,On=20,An=.1,Tn=40,Rn=40,Me=e=>Math.max(1,e.fontSize*.6+(e.letterSpacing??0));function at(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/Me(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 ee(e){let t=e.background?.padding??0,n=e.text.split(/\r?\n/),o=Math.max(1,...n.map(l=>l.length))*Me(e),r=e.width??o+t*2,i=Math.max(1,r-t*2),s=at(e,i);return{width:r,height:s*e.fontSize*(e.lineHeight??1.2)+t*2,lineCount:s,padding:t}}function lt(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 Pe(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=lt(e,o[i],o[r]);s<n&&(n=s)}return n}function we(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,s=t[o].y,l=t[r].x,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 ut(e,t,n){let o=we(e,t)&&!n.some(i=>we(e,i)),r=Pe(e,[t,...n]);return o?r:-r}function N(e,t,n,o,r){let i=ut({x:e,y:t},o,r);return{x:e,y:t,h:n,d:i,max:i+n*Math.SQRT2}}var te=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 ne(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 ft(e,t){return Math.max(0,ne(e)-(t??[]).reduce((n,o)=>n+ne(o),0))}function oe(e,t){let n=t??[];if(!e.length)return{point:{x:0,y:0},radius:0};if(e.length<3){let h=e.reduce((b,M)=>b+M.x,0)/e.length,f=e.reduce((b,M)=>b+M.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 te,p=u/2;for(let h=o;h<i;h+=u)for(let f=r;f<s;f+=u)d.push(N(h+p,f+p,p,e,n));let x=N(o+l/2,r+c/2,0,e,n),m=0;for(;d.size;){let h=d.pop();if(!h)break;h.d>x.d&&(x=h),!(h.max-x.d<=a)&&(m>=4e3||(m+=1,p=h.h/2,d.push(N(h.x-p,h.y-p,p,e,n)),d.push(N(h.x+p,h.y-p,p,e,n)),d.push(N(h.x-p,h.y+p,p,e,n)),d.push(N(h.x+p,h.y+p,p,e,n))))}return{point:{x:x.x,y:x.y},radius:Math.max(0,x.d)}}function L(e,t,n){return e<t?t:e>n?n:e}var Dn=Math.PI*2;function Ie(e,t,n){return dt(e,r=>({x:r.x+t,y:r.y+n}))}function dt(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 jn=4/3;function ht(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,x=(r>0?t[r-1]:void 0)==="break"?2:1,m=d?{...i}:{x:i.x+Math.cos(a)*u*x,y:i.y+Math.sin(a)*u*x},h=d?c+1:Math.max(1,c-(x-1));o.push({origin:m,rotation:a*180/Math.PI,seatCount:h,seatSpacing:u})}return o}function mt(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 pt(e){return e.reduce((t,n)=>t+n.seatCount,0)}function re(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((p,x)=>p.segmentedRow.componentIndex-x.segmentedRow.componentIndex),s=i[0]?.segmentedRow?.componentCount??0,l=i[0]?.segmentedRow;if(!l||!(s>=2&&i.length===s&&l?.boundaryBefore==="start"&&i.every((p,x)=>p.segmentedRow?.kind==="segmented-row-v1"&&p.segmentedRow.groupId===o&&p.segmentedRow.componentCount===s&&p.segmentedRow.componentIndex===x&&p.segmentedRow.repeatLabelOnComponents===l.repeatLabelOnComponents&&(x===0?p.segmentedRow.boundaryBefore==="start":p.segmentedRow.boundaryBefore!=="start")&&p.segmentedRow.displayLabel===l.displayLabel)))continue;let u=i.reduce((p,x)=>p+x.seatCount,0),a=0,d=0;for(let p of i)p.segmentedRow.boundaryBefore==="break"&&(a+=1),t.set(p.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+=p.seatCount,d+=p.seatCount}return t}var yt="ABCDEFGHIJKLMNOPQRSTUVWXYZ";var xt="abcdefghijklmnopqrstuvwxyz";function bt(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 ie(e,t=!1){let n=t?xt:yt;return bt(Math.max(0,Math.floor(e)-1),n)}var gt=[[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 ve(e){if(!Number.isFinite(e)||e<=0)return String(e);let t=Math.floor(e),n="";for(let[o,r]of gt)for(;t>=o;)n+=r,t-=o;return n}function St(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 se(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 x=Math.ceil(c/2),m=i==="updown"?t<x?n+2*t:n-1+2*(c-t):t<x?n+2*(x-1-t):n+1+2*(t-x);return`${s}${m}`}let u=i==="odd"||i==="even"?2:r,a=l!=null&&Number.isFinite(l)?l-(c-1)*u:n,d=o==="center"?St(c)[t]:o==="rtl"?c-1-t:t,p;switch(i){case"odd":{let x=a%2===1?a:a+1;p=String(x+d*2);break}case"even":{let x=a%2===0?a:a+1;p=String(x+d*2);break}case"roman":p=ve(a+d*r);break;case"letters-upper":p=ie(a+d*r,!1);break;case"letters-lower":p=ie(a+d*r,!0);break;default:p=String(a+d*r);break}return`${s}${p}`}function Mt(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function Ce(e,t,n){return n?.label??`${e.label}-${se(e,t)}`}function ce(e,t,n,o){if(o?.displayLabel)return o.displayLabel;if(!n)return`${e.displayLabel||e.label}-${se(e,t)}`;let r=Mt(n),i=n.displayOffset+t;return`${n.displayLabel}-${se(r,i)}`}var Y=.02291666666666667,Hn=1/Y,wt=58,Pt=wt*Y;var It=3,Ee=0,ae=120,vt=0,Ct=45,Et=7,K=1.2;function le(e,t,n,o){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):o}function Ot(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=Et?e:It}function Oe(e,t={}){let n=le(t.floorBaseHeightM,Ee,ae,0),o=Math.min(ae,n+Ot(e.elevation)*Pt),r=e.height===void 0?o:le(e.height,Ee,ae,o),i=le(e.rake,vt,Ct,0);return{height:r,rake:i}}function Ae(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 Te(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 At(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 Re(e,t){return Math.hypot(e.cx-t.cx,e.cy-t.cy)-e.r-t.r}function ue(e,t){let n=1/0;for(let o of Ae(e)){let r=Te(t,o.x,o.y);r<n&&(n=r)}for(let o of Ae(t)){let r=Te(e,o.x,o.y);r<n&&(n=r)}return n}function Tt(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 Rt(e){let t=e.length;if(t<3)return null;let n=0,o=0;for(let M of e)n+=M.x,o+=M.y;n/=t,o/=t;let r=0,i=0,s=0,l=0,c=0,u=0,a=0;for(let M of e){let g=M.x-n,y=M.y-o;r+=g*g,s+=y*y,i+=g*y,l+=g*g*g,c+=y*y*y,u+=g*y*y,a+=y*g*g}let d=r*s-i*i;if(Math.abs(d)<1e-9)return null;let p=(l+u)/2,x=(c+a)/2,m=(p*s-x*i)/d,h=(x*r-p*i)/d,f=m+n,b=h+o;return!Number.isFinite(f)||!Number.isFinite(b)?null:{cx:f,cy:b}}var _t=.15;function kt(e){if(e.length<2)return null;let t=e.map(M=>{let g=0,y=0;for(let P of M.pts)g+=P.x,y+=P.y;return{x:g/M.pts.length,y:y/M.pts.length}}),n=0,o=0;for(let M of t)n+=M.x,o+=M.y;n/=t.length,o/=t.length;let r=0,i=0,s=0;for(let M of t){let g=M.x-n,y=M.y-o;r+=g*g,i+=g*y,s+=y*y}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 p=Math.hypot(a,d);if(!(p>1e-12))return null;a/=p,d/=p;let x=1/0,m=-1/0,h=[];for(let M of e){let g=1/0,y=-1/0;for(let P of M.pts){let S=P.x*a+P.y*d;S<g&&(g=S),S>y&&(y=S),S<x&&(x=S),S>m&&(m=S)}h.push(y-g)}let f=m-x;return f>1e-9?(h.sort((M,g)=>M-g),h[Math.min(h.length-1,Math.floor(h.length*.9))]/f<=Lt?{x:a,y:d}:null):null}var Lt=.35;function _e(e,t,n,o){let r=new Map;for(let f of n){let b=t[f],M=b.rowId||`__seat-${f}`,g=r.get(M);g||(g={pts:[],idx:[]},r.set(M,g)),g.pts.push({x:b.x,y:b.y}),g.idx.push(f)}if(!r.size)return{sectionId:e,rows:[],blockCount:0};let i=[];for(let[f,b]of r){let M=Tt(b.pts,b.idx),g=0;for(let y of M.pts)g+=Math.hypot(y.x-o.x,y.y-o.y);i.push({id:f,pts:M.pts,seatIndices:M.seatIndices,blockId:-1,ordinal:0,blockDepth:0,focalDistance:g/M.pts.length})}let s=i.map(f=>At(f.pts)),l=[];for(let f=0;f<i.length;f++){let b=1/0;for(let M=0;M<i.length;M++){if(f===M||Re(s[f],s[M])>=b)continue;let g=ue(i[f].pts,i[M].pts);g<b&&(b=g)}Number.isFinite(b)&&l.push(b)}l.sort((f,b)=>f-b);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 b=f+1;b<i.length;b++)Re(s[f],s[b])>u||ue(i[f].pts,i[b].pts)<=u&&(a[f].push(b),a[b].push(f));let d=0;for(let f=0;f<i.length;f++){if(i[f].blockId!==-1)continue;let b=d++,M=[f];for(i[f].blockId=b;M.length;){let g=M.pop();for(let y of a[g])i[y].blockId===-1&&(i[y].blockId=b,M.push(y))}}let p=new Map;for(let f of i){let b=p.get(f.blockId)??[];b.push(f),p.set(f.blockId,b)}let x=[];for(let f of i){if(f.pts.length<4)continue;let b=Rt(f.pts);b&&(!Number.isFinite(b.cx)||!Number.isFinite(b.cy)||x.push({x:b.cx,y:b.cy}))}let m=x.length>=2?(()=>{let f=x.map(g=>g.x).sort((g,y)=>g-y),b=x.map(g=>g.y).sort((g,y)=>g-y),M=Math.floor(x.length/2);return{cx:f[M],cy:b[M]}})():null;if(m){let f=S=>Math.hypot(S.x-m.cx,S.y-m.cy),b=1/0,M=-1/0,g=[];for(let S of i){let w=1/0,v=-1/0;for(let C of S.pts){let I=f(C);I<w&&(w=I),I>v&&(v=I)}g.push(v-w),w<b&&(b=w),v>M&&(M=v)}let y=M-b;g.sort((S,w)=>S-w);let P=g[Math.min(g.length-1,Math.floor(g.length*.9))];if(y>1e-9&&P/y<=_t){let S=i.map(E=>{let H=0;for(let Ze of E.pts)H+=f(Ze);return{row:E,radius:H/E.pts.length}}),w=0,v=0;for(let E of S)w+=E.radius,v+=E.row.focalDistance;w/=S.length,v/=S.length;let C=0;for(let E of S)C+=(E.radius-w)*(E.row.focalDistance-v);if(C<0)for(let E of S)E.radius=-E.radius;let R=1/0;for(let E of S)E.radius<R&&(R=E.radius);S.sort((E,H)=>E.radius-H.radius);let A=-1,O=-1/0,T=y/Math.max(1,S.length)*.5,Q=[];for(let E of S)E.radius-O>T&&(A++,O=E.radius),E.row.ordinal=A,E.row.blockDepth=E.radius-R,Q.push(E.row);return{sectionId:e,rows:Q,blockCount:d}}}let h=[];for(let[,f]of p){let b=kt(f);if(b){let M=y=>{let P=0;for(let S of y.pts)P+=S.x*b.x+S.y*b.y;return P/y.pts.length};f.sort((y,P)=>M(y)-M(P)),f.length>=2&&f[0].focalDistance>f[f.length-1].focalDistance&&f.reverse();let g=0;for(let y=0;y<f.length;y++)y>0&&(g+=ue(f[y-1].pts,f[y].pts)),f[y].ordinal=y,f[y].blockDepth=g,h.push(f[y])}else{let M=1/0;for(let g of f)g.focalDistance<M&&(M=g.focalDistance);f.sort((g,y)=>g.focalDistance-y.focalDistance);for(let g=0;g<f.length;g++)f[g].ordinal=g,f[g].blockDepth=Math.max(0,f[g].focalDistance-M),h.push(f[g])}}return{sectionId:e,rows:h,blockCount:d}}var Dt=/^\d{4}-\d{2}-\d{2}$/;function jt(e){let t=Date.parse(e);return Number.isFinite(t)?Dt.test(e)?t+864e5:t:null}function Ft(e,t=Date.now()){if(e.validUntil===void 0){if(e.status!=="approved")return!0;let o=e.assessedAt?Date.parse(e.assessedAt):Number.NaN;return Number.isFinite(o)&&(t instanceof Date?t.getTime():t)<=o+366*864e5}let n=jt(e.validUntil);return n===null?!1:(t instanceof Date?t.getTime():t)<n}function Nt(e,t,n){return!(e.eventConfigurationId&&e.eventConfigurationId!==t||e.eventConfigurationVersion!==void 0&&e.eventConfigurationVersion!==n)}function Bt(e){return e.status!=="draft"&&e.status!=="retracted"}function Ut(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 ke(e,t={}){return!!e&&Bt(e)&&Nt(e,t.activeConfigurationId,t.activeConfigurationVersion)&&Ut(e,t.activeBasisSha256)&&Ft(e,t.now)}function Fe(e){return e?e.accessibility&&e.accessibility.length?e.wheelchairSpaceType&&!e.accessibility.includes("wheelchair")?["wheelchair",...e.accessibility]:e.accessibility:e.wheelchairSpaceType?["wheelchair"]:e.accessible?["wheelchair"]:[]:[]}var $=Math.PI/180,Xt=9,F=16;function de(e,t,n,o){let r=n*$,i=Math.cos(r),s=Math.sin(r);return{x:o.x+e*i-t*s,y:o.y+e*s+t*i}}function me(e){let{seatCount:t,seatSpacing:n,curve:o,rotation:r,origin:i}=e,s=[];if(e.path)return J(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(de(u*n,0,r,i));return s}let l=o/(t-1)*$,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),p=-c+c*Math.cos(a);s.push(de(d,p,r,i))}return s}function Ht(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function Gt(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 Ne(e,t){let n=Ht(e);return me(e).map((o,r)=>{let i=n.get(r),s=Fe(i),l=Ce(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:ce(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 pe(e){let t=[];for(let n of Ne(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 Be(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 ye(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,p,x)=>{let m=o.get(a),h=Fe(m),f=m?.label??`${e.label}-${a+1}`,b=e.displayLabel??e.label;return{index:a,label:f,displayLabel:m?.displayLabel??`${b}-${a+1}`,x:d+(m?.dx??0),y:p+(m?.dy??0),categoryKey:m?.categoryKey??e.categoryKey,skipped:!!m?.skip,accessible:h.length>0,accessibility:h,wheelchairSpaceType:m?.wheelchairSpaceType,commercial:m?.commercial,glyph:m?.glyph,viewUrl:m?.viewFromSeatUrl,viewMeta:m?.viewFromSeatUrl?m.viewFromSeatMeta:void 0,labelStyle:m?.labelStyle,...x?{side:x}:{}}};if(e.shape==="round"){let a=(e.radius??40)+F,d=e.rotation*$,p=Math.max(0,Math.min(360,e.seatArc??360));if(p>=360||n===1){for(let f=0;f<n;f++){let b=d+f/n*2*Math.PI;t.push(r(f,e.center.x+a*Math.cos(b),e.center.y+a*Math.sin(b)))}return t}let x=p*$,m=(2*Math.PI-x)/2,h=d+m;for(let f=0;f<n;f++){let b=h+f/(n-1)*x;t.push(r(f,e.center.x+a*Math.cos(b),e.center.y+a*Math.sin(b)))}return t}let i=e.width??80,s=e.height??50,l=Be(e),c=["top","bottom","left","right"],u=0;for(let a of c){let d=l[a];for(let p=0;p<d;p++){let x,m;a==="top"?(x=-i/2+(p+.5)*i/d,m=-s/2-F):a==="bottom"?(x=-i/2+(p+.5)*i/d,m=s/2+F):a==="left"?(x=-i/2-F,m=-s/2+(p+.5)*s/d):(x=i/2+F,m=-s/2+(p+.5)*s/d);let h=de(x,m,e.rotation,e.center);t.push(r(u++,h.x,h.y,a))}}return t}function Vt(e){return e.bookAsWhole||e.variableOccupancy?Math.max(0,Math.round(e.seatCount)):ye(e).filter(t=>!t.skipped).length}function Ue(e){return ye(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 Xe(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 he(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 Yt(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 U(e,t,n){return he(e,t)&&!(n??[]).some(o=>he(e,o)||Yt(e,o))}function Kt(e,t){return oe(e,t).point}function fe(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 He(e){switch(e.type){case"row":{let t=pe(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 fe(e.points);case"section":return fe(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?fe(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 Le(e,t){return e.length===t.length&&e.every((n,o)=>n.x===t[o].x&&n.y===t[o].y)}function zt(e,t){if(e.type!=="gaArea"||!Le(e.points,t.outline))return!1;let n=e.holes??[],o=t.holes??[];return n.length===o.length&&n.every((r,i)=>Le(r,o[i]))}function Ge(e,t){let n=e.filter(s=>s.type==="section"),o="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0,r=He(t);return(o?n.find(s=>(s.logicalSectionId??s.id)===o&&(zt(t,s)||U(r,s.outline,s.holes))):void 0)??n.find(s=>U(r,s.outline,s.holes))}function Ve(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 $t(e,t){let n=Ve(e);return(t?n.find(o=>o.id===t):n[0])?.objects??[]}function Ye(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}function W(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:Ie(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 Wt(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:W(s,0,i))}),{...e,objects:n,floors:void 0}}function De(e,t,n,o,r,i,s,l,c){let u=[],a=re(e),d=m=>!m?.eventConfigurationId||m.eventConfigurationId===o&&(m.eventConfigurationVersion===void 0||m.eventConfigurationVersion===c),p=m=>ke(m,{activeConfigurationId:o,activeConfigurationVersion:c,activeBasisSha256:r,now:l}),x=(m,h)=>p(m)?{...m,coverage:h}:void 0;for(let m of e){let h=[];if(m.type==="row"?h=pe(m):m.type==="table"?h=Ue(m):m.type==="booth"&&(h=Xe(m)),!h.length)continue;for(let y of h)y.viewUrl&&!d(y.viewMeta)&&(y.viewUrl=void 0,y.viewMeta=void 0);if(m.type==="row"){let y=a.get(m.id);if(y){let P=new Map((m.overrides??[]).map(S=>[S.index,S]));for(let S of h){let w=Number(S.id.slice(S.id.lastIndexOf(":")+1));if(!Number.isInteger(w))continue;S.logicalRowId=y.groupId,S.logicalSeatIndex=y.adjacencyOffset+w,P.get(w)?.displayLabel||(S.displayLabel=ce(m,w,y)),!S.viewUrl&&y.viewFromSeatUrl&&d(y.viewFromSeatMeta)&&(S.viewUrl=y.viewFromSeatUrl,S.viewMeta=y.viewFromSeatMeta);let v=P.get(w)?.confidenceEvidence;S.confidenceEvidence=x(v,"exact-seat")??x(m.confidenceEvidence,"row-representative")??x(y.confidenceEvidence,"row-representative")}}}let f=Ge(e,m),b=f?.viewFromSeatUrl,g=(f?.zone?t?.find(y=>y.id===f.zone):void 0)?.focalPoint??n;for(let y of h){if(!y.confidenceEvidence){let P=Number(y.id.slice(y.id.lastIndexOf(":")+1)),S=(m.type==="row"||m.type==="table")&&Number.isInteger(P)?m.overrides?.find(w=>w.index===P)?.confidenceEvidence:void 0;y.confidenceEvidence=x(S,"exact-seat")??(m.type==="row"?x(m.confidenceEvidence,"row-representative"):void 0)}y.confidenceEvidence??=x(f?.confidenceEvidence,"section-representative")??(s?x(s.evidence,s.coverage):void 0),!y.viewUrl&&b&&d(f?.viewFromSeatMeta)&&(y.viewUrl=b,y.viewMeta=f?.viewFromSeatMeta),!y.viewUrl&&i&&d(i.meta)&&(y.viewUrl=i.url,y.viewMeta=i.meta),f&&(y.sectionId=f.logicalSectionId??f.id),f?.zone&&(y.zoneId=f.zone),g&&(y.focalPoint={...g})}u.push(...h)}return u}function qt(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=De(r.objects,e.zones,i,e.eventConfigurationId,e.confidenceBasisSha256,s,l,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);t.resolveEyeHeights!==!1&&je(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=De(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&&je(e.objects,e.focalPoint,t.floorBaseHeightM??0,n),n}function je(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+K;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],x=(d.sectionId?r.find(h=>h.id===d.sectionId)??r.find(h=>h.logicalSectionId===d.sectionId&&U({x:d.x,y:d.y},h.outline,h.holes)):void 0)??r.find(h=>U({x:d.x,y:d.y},h.outline,h.holes))??null;if(s[a]=x,!x)continue;l.has(x.id)||l.set(x.id,Oe(x,{floorBaseHeightM:n}));let m=c.get(x.id);m?m.push(a):c.set(x.id,[a])}let u=new Array(o.length).fill(void 0);for(let[a,d]of c){let p=l.get(a);if(!p)continue;let x=p.rake>0?Math.tan(p.rake*Math.PI/180):0,m=_e(a,o,d,t);for(let h of m.rows){let f=h.blockDepth*Y*x,b=p.height+f;for(let M of h.seatIndices)u[M]=b}}for(let a=0;a<o.length;a++){let d=o[a],p=s[a];if(!p){d.eyeHeightM=n+K;continue}let x=l.get(p.id);d.eyeHeightM=(u[a]??x.height)+K}}var z=40;function X(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 Ye(e))if(c.type==="row"){let u=new Map((c.overrides??[]).map(a=>[a.index,a]));me(c).forEach((a,d)=>{let p=u.get(d);p?.skip||l(a.x+(p?.dx??0),a.y+(p?.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=F+Xt,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=ee(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}}var Ke=.08,Qt=.045;function ze(e,t,n){return{...e,objects:t,floors:void 0,...n?{focalPoint:n}:{},referenceImage:void 0,backgroundImage:void 0}}function Zt(e,t,n){let o=e.focalPoint??t.focalPoint;return o?o.x:n.x+n.width/2}function $e(e){let t=e.floors??[];if(!t.length)return[];let n=t.map(s=>X(ze(e,s.objects,s.focalPoint),{freeText:"exclude"})),r=Math.max(1,...n.map(s=>s.width))*Ke,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:-Zt(s,e,c),y:u},bounds:c}})}function Jt(e,t,n,o){let r=t==="name"?e.label:e.levelBadge;if(!r)return[];let i=Math.max(1,n*Qt),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 en(e,t={}){let n=e.floors;if(!n||n.length<2)return e;let o=$e(e),r=[];n.forEach((u,a)=>{let{x:d,y:p}=o[a].translation;for(let x of u.objects)a>0&&x.type==="shape"&&x.role==="stage"||r.push(W(x,d,p))});let i={...e,objects:r,floors:void 0},s=X(i,{freeText:"exclude"}),l=Math.max(1,s.width,s.height),c=e.theme?.textColor??"#94a3b8";for(let u of o)r.push(...Jt(u,t.labelStyle??"number",l,c));return{...i,objects:r,referenceImage:void 0,backgroundImage:void 0}}function We(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=X(ze(e,i.objects,i.focalPoint),{freeText:"exclude"}),l=s.width*s.height;l>r&&(r=l,o=i)}return o.id}var qe=640;function tn(e,t){return(e.floors?.length??0)<2?null:!Number.isFinite(t)||t<=0||t>=qe?"all":We(e)}function nn(e,t=0){let n=Math.max(1,e.width,e.height),o={x:e.x+e.width/2,y:e.y+e.height/2},r=n*1.55,i=Math.max(n*.82,Math.max(0,t)+n*.45);return{target:o,distance:r,height:i,focalLength:Math.hypot(r,i),yawRad:-8*Math.PI/180}}function q(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),p=(-e.distance*u-e.height*a)/d,x=(-e.height*u+e.distance*a)/d,m=Math.max(d*.08,p),h=e.focalLength/m;return{x:e.target.x+l*h,y:e.target.y-x*h,depth:m,scale:h}}function on(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 rn(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 sn(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 cn(e,t,n=()=>0){let o=q(e,t,n(t)),r={x:t.x+1,y:t.y},i={x:t.x,y:t.y+1},s=q(e,r,n(r)),l=q(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 an(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 Qe=9;function ln(e){if(e.kind==="circle")return{hx:e.r,hy:e.r};let t=e.width/2,n=e.height/2,o=e.rotation??0;if(!o)return{hx:t,hy:n};let r=o*Math.PI/180,i=Math.abs(Math.cos(r)),s=Math.abs(Math.sin(r));return{hx:t*i+n*s,hy:t*s+n*i}}function un(e,t,n){let o=t-e.seat.x,r=n-e.seat.y;if(e.shape.kind==="circle")return o*o+r*r<=e.shape.r*e.shape.r;let i=e.shape.rotation??0,s=o,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 fn(e,t,n,o,r){if(e.shape.kind==="circle"){let m=Math.min(Math.max(e.seat.x,t),o),h=Math.min(Math.max(e.seat.y,n),r),f=e.seat.x-m,b=e.seat.y-h;return f*f+b*b<=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(([m,h])=>[e.seat.x+m*l-h*c,e.seat.y+m*c+h*l]),p=[[t,n],[o,n],[o,r],[t,r]],x=[[1,0],[0,1],[l,c],[-c,l]];for(let[m,h]of x){let f=1/0,b=-1/0;for(let[y,P]of d){let S=y*m+P*h;S<f&&(f=S),S>b&&(b=S)}let M=1/0,g=-1/0;for(let[y,P]of p){let S=y*m+P*h;S<M&&(M=S),S>g&&(g=S)}if(b<M||g<f)return!1}return!0}function dn(e,t={}){let n=t.seatRadius??Qe,o=e.length,r=new Array(o),i=1/0,s=1/0,l=-1/0,c=-1/0,u=0;for(let S=0;S<o;S++){let w=e[S],v=t.shapeOf?.(w)??{kind:"circle",r:n},{hx:C,hy:I}=ln(v);r[S]={seat:w,shape:v,hx:C,hy:I},w.x-C<i&&(i=w.x-C),w.y-I<s&&(s=w.y-I),w.x+C>l&&(l=w.x+C),w.y+I>c&&(c=w.y+I),C>u&&(u=C),I>u&&(u=I)}o===0&&(i=0,s=0,l=0,c=0);let a=u>0?u*4:1,d=Math.max(l-i,0),p=Math.max(c-s,0),x=Math.max(64,t.maxCells??o*4),m=a,h=Math.max(1,Math.ceil(d/m)||1),f=Math.max(1,Math.ceil(p/m)||1);for(;h*f>x&&(h>1||f>1);)m*=2,h=Math.max(1,Math.ceil(d/m)||1),f=Math.max(1,Math.ceil(p/m)||1);let b=h*f,M=new Int32Array(b+1),g=0;for(let S=0;S<o;S++){let w=r[S],v=L(Math.floor((w.seat.x-w.hx-i)/m),0,h-1),C=L(Math.floor((w.seat.x+w.hx-i)/m),0,h-1),I=L(Math.floor((w.seat.y-w.hy-s)/m),0,f-1),R=L(Math.floor((w.seat.y+w.hy-s)/m),0,f-1);for(let A=I;A<=R;A++)for(let O=v;O<=C;O++)M[A*h+O+1]++,g++}for(let S=0;S<b;S++)M[S+1]+=M[S];let y=new Int32Array(g),P=M.slice(0,b);for(let S=0;S<o;S++){let w=r[S],v=L(Math.floor((w.seat.x-w.hx-i)/m),0,h-1),C=L(Math.floor((w.seat.x+w.hx-i)/m),0,h-1),I=L(Math.floor((w.seat.y-w.hy-s)/m),0,f-1),R=L(Math.floor((w.seat.y+w.hy-s)/m),0,f-1);for(let A=I;A<=R;A++)for(let O=v;O<=C;O++){let T=A*h+O;y[P[T]++]=S}}return{seats:e,entries:r,minX:i,minY:s,cell:m,cols:h,rows:f,cellStart:M,items:y,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),p=Math.floor((t.y-l)/i);if(d<0||p<0||d>=o||p>=r)return null;let x=p*o+d,m=c[x+1],h=-1,f=1/0;for(let b=c[x];b<m;b++){let M=u[b],g=a[M];if(n.filter&&!n.filter(g.seat.id,g.seat)||!un(g,t.x,t.y))continue;let y=t.x-g.seat.x,P=t.y-g.seat.y,S=y*y+P*P;(S<f||S===f&&M<h)&&(f=S,h=M)}return h<0?null:a[h].seat.id}function mn(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,p=Math.max(0,Math.floor((t.x-n-l)/s)),x=Math.min(r-1,Math.floor((t.x+n-l)/s)),m=Math.max(0,Math.floor((t.y-n-c)/s)),h=Math.min(i-1,Math.floor((t.y+n-c)/s));if(p>x||m>h)return null;let f=-1,b=n*n,M=e.stamp,g=++e.epoch;for(let y=m;y<=h;y++){let P=y*r;for(let S=p;S<=x;S++){let w=P+S,v=u[w+1];for(let C=u[w];C<v;C++){let I=a[C];if(M[I]===g)continue;M[I]=g;let R=d[I];if(o.filter&&!o.filter(R.seat.id,R.seat))continue;let A=t.x-R.seat.x,O=t.y-R.seat.y,T=A*A+O*O;(T<b||T===b&&I<f)&&(b=T,f=I)}}}return f<0?null:d[f].seat.id}function pn(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:p,cellStart:x,items:m,entries:h}=e,f=Math.max(0,Math.floor((o-d)/a)),b=Math.min(c-1,Math.floor((r-d)/a)),M=Math.max(0,Math.floor((i-p)/a)),g=Math.min(u-1,Math.floor((s-p)/a));if(f>b||M>g)return[];let y=[],P=e.stamp,S=++e.epoch;for(let w=M;w<=g;w++){let v=w*c;for(let C=f;C<=b;C++){let I=v+C,R=x[I+1];for(let A=x[I];A<R;A++){let O=m[A];if(P[O]===S)continue;P[O]=S;let T=h[O];if(n.filter&&!n.filter(T.seat.id,T.seat))continue;(l==="center"?T.seat.x>=o&&T.seat.x<=r&&T.seat.y>=i&&T.seat.y<=s:fn(T,o,i,r,s))&&y.push(O)}}}return y.sort((w,v)=>w-v),y.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={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,buildAisleHoles,buildSeatIndex,buildSectionShell,chartBounds,composeAffine,createPerspectiveCamera,cubicPoint,decomposeAffineLinear,distanceToRings,distributeAlongCubic,expandBooth,expandChart,expandRow,expandRowSlots,expandTable,expandTableSlots,floorObjects,floorStackPlacements,floorsOf,gridStats,hitTest,initialFloorMode,invertAffine,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, u as CubicPath, v as TextObject } from '../../types-D6-wLa-m.cjs';
2
- export { F as FloorLabelStyle } from '../../types-D6-wLa-m.cjs';
3
- export { C as ChartBoundsOptions, E as ExpandChartOptions, F as FLOOR_STACK_GAP_RATIO, a as FLOOR_STACK_MIN_SURFACE_PX, b as FloorStackOptions, c as FloorStackPlacement, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, d as TableSeatSlot, e as allObjects, f as chartBounds, g as expandBooth, h as expandChart, i as expandRow, j as expandRowSlots, k as expandTable, l as expandTableSlots, m as floorObjects, n as floorStackPlacements, o as floorsOf, p as initialFloorMode, q as layoutFloorStack, r as mainFloorId, s as objectCenter, t as owningSectionForObject, u as pointInPolygon, v as pointInPolygonWithHoles, w as polygonLabelPoint, x as rowInventoryCount, y as rowSeatPositions, z as stackFloors, A as tableInventoryCount, B as tableSeatCountsBySide, D as translateObject } from '../../layout-B6iOoPOv.cjs';
4
- export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-CKmyHvKv.cjs';
5
- import { E as ExpandedSeat } from '../../renderer-CBOo1OZk.cjs';
1
+ import { P as Point, u as CubicPath, v as TextObject } from '../../types-Dx4jA8aI.cjs';
2
+ export { F as FloorLabelStyle } from '../../types-Dx4jA8aI.cjs';
3
+ export { C as ChartBoundsOptions, E as ExpandChartOptions, F as FLOOR_STACK_GAP_RATIO, a as FLOOR_STACK_MIN_SURFACE_PX, b as FloorStackOptions, c as FloorStackPlacement, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, d as TableSeatSlot, e as allObjects, f as chartBounds, g as expandBooth, h as expandChart, i as expandRow, j as expandRowSlots, k as expandTable, l as expandTableSlots, m as floorObjects, n as floorStackPlacements, o as floorsOf, p as initialFloorMode, q as layoutFloorStack, r as mainFloorId, s as objectCenter, t as owningSectionForObject, u as pointInPolygon, v as pointInPolygonWithHoles, w as polygonLabelPoint, x as rowInventoryCount, y as rowSeatPositions, z as stackFloors, A as tableInventoryCount, B as tableSeatCountsBySide, D as translateObject } from '../../layout-DPJX6D9k.cjs';
4
+ export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-DWOjcPrU.cjs';
5
+ import { E as ExpandedSeat } from '../../renderer-Dn4Plcv9.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, u as CubicPath, v as TextObject } from '../../types-D6-wLa-m.js';
2
- export { F as FloorLabelStyle } from '../../types-D6-wLa-m.js';
3
- export { C as ChartBoundsOptions, E as ExpandChartOptions, F as FLOOR_STACK_GAP_RATIO, a as FLOOR_STACK_MIN_SURFACE_PX, b as FloorStackOptions, c as FloorStackPlacement, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, d as TableSeatSlot, e as allObjects, f as chartBounds, g as expandBooth, h as expandChart, i as expandRow, j as expandRowSlots, k as expandTable, l as expandTableSlots, m as floorObjects, n as floorStackPlacements, o as floorsOf, p as initialFloorMode, q as layoutFloorStack, r as mainFloorId, s as objectCenter, t as owningSectionForObject, u as pointInPolygon, v as pointInPolygonWithHoles, w as polygonLabelPoint, x as rowInventoryCount, y as rowSeatPositions, z as stackFloors, A as tableInventoryCount, B as tableSeatCountsBySide, D as translateObject } from '../../layout-B7URbtDR.js';
4
- export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-DbP7pWUk.js';
5
- import { E as ExpandedSeat } from '../../renderer-6sFRupj0.js';
1
+ import { P as Point, u as CubicPath, v as TextObject } from '../../types-Dx4jA8aI.js';
2
+ export { F as FloorLabelStyle } from '../../types-Dx4jA8aI.js';
3
+ export { C as ChartBoundsOptions, E as ExpandChartOptions, F as FLOOR_STACK_GAP_RATIO, a as FLOOR_STACK_MIN_SURFACE_PX, b as FloorStackOptions, c as FloorStackPlacement, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, d as TableSeatSlot, e as allObjects, f as chartBounds, g as expandBooth, h as expandChart, i as expandRow, j as expandRowSlots, k as expandTable, l as expandTableSlots, m as floorObjects, n as floorStackPlacements, o as floorsOf, p as initialFloorMode, q as layoutFloorStack, r as mainFloorId, s as objectCenter, t as owningSectionForObject, u as pointInPolygon, v as pointInPolygonWithHoles, w as polygonLabelPoint, x as rowInventoryCount, y as rowSeatPositions, z as stackFloors, A as tableInventoryCount, B as tableSeatCountsBySide, D as translateObject } from '../../layout-Dv3R0Mpw.js';
4
+ export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-DgSEzAYd.js';
5
+ import { E as ExpandedSeat } from '../../renderer-C5avrVLy.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 $,j as oo,k as ro,l as eo,m as fo,n as mo,o as po,p as to,q as xo,r as ao,s as bo}from"../../chunk-NKYPEBW3.js";import{Aa as N,Ba as O,Ca as P,Da as Q,Ea as R,Fa as S,J as q,K as s,L as u,M as v,a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,ka as w,la as y,ma as z,n as c,na as A,o as d,oa as B,p as g,pa as C,q as h,qa as D,r as i,ra as E,s as j,sa as F,t as k,ta as G,u as l,ua as H,v as n,va as I,wa as J,xa as K,ya as L,za as M}from"../../chunk-KCFEFP6H.js";import"../../chunk-CRCGO52K.js";export{Z as DEFAULT_SEAT_RADIUS,T as FLOOR_STACK_GAP_RATIO,X 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,po as applyAffine,i as buildAisleHoles,_ as buildSeatIndex,h as buildSectionShell,S as chartBounds,xo as composeAffine,fo as createPerspectiveCamera,c as cubicPoint,bo 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,U as floorStackPlacements,M as floorsOf,eo as gridStats,$ as hitTest,Y as initialFloorMode,to as invertAffine,V as layoutFloorStack,W as mainFloorId,oo as nearestWithin,K as objectCenter,L as owningSectionForObject,ao as perspectiveTangentAffine,H as pointInPolygon,I as pointInPolygonWithHoles,k as polygonArea,n as polygonInscribedAnchor,J as polygonLabelPoint,l as polygonNetArea,mo as projectPerspectivePoint,ro 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 $,j as oo,k as ro,l as eo,m as fo,n as mo,o as po,p as to,q as xo,r as ao,s as bo}from"../../chunk-ZMYRXJOA.js";import{Aa as N,Ba as O,Ca as P,Da as Q,Ea as R,Fa as S,J as q,K as s,L as u,M as v,a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,ka as w,la as y,ma as z,n as c,na as A,o as d,oa as B,p as g,pa as C,q as h,qa as D,r as i,ra as E,s as j,sa as F,t as k,ta as G,u as l,ua as H,v as n,va as I,wa as J,xa as K,ya as L,za as M}from"../../chunk-KN7GLEAI.js";import"../../chunk-CRCGO52K.js";export{Z as DEFAULT_SEAT_RADIUS,T as FLOOR_STACK_GAP_RATIO,X 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,po as applyAffine,i as buildAisleHoles,_ as buildSeatIndex,h as buildSectionShell,S as chartBounds,xo as composeAffine,fo as createPerspectiveCamera,c as cubicPoint,bo 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,U as floorStackPlacements,M as floorsOf,eo as gridStats,$ as hitTest,Y as initialFloorMode,to as invertAffine,V as layoutFloorStack,W as mainFloorId,oo as nearestWithin,K as objectCenter,L as owningSectionForObject,ao as perspectiveTangentAffine,H as pointInPolygon,I as pointInPolygonWithHoles,k as polygonArea,n as polygonInscribedAnchor,J as polygonLabelPoint,l as polygonNetArea,mo as projectPerspectivePoint,ro 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 +1 @@
1
- "use strict";var K=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var ye=Object.getOwnPropertyNames;var Le=Object.prototype.hasOwnProperty;var xe=(t,r)=>{for(var o in r)K(t,o,{get:r[o],enumerable:!0})},ve=(t,r,o,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let c of ye(r))!Le.call(t,c)&&c!==o&&K(t,c,{get:()=>r[c],enumerable:!(s=fe(r,c))||s.enumerable});return t};var we=t=>ve(K({},"__esModule",{value:!0}),t);var Ue={};xe(Ue,{ACCESS_GLYPH_PATH:()=>Pe,ACCESS_GLYPH_VIEWBOX:()=>Fe,ACCESS_TYPE_GLYPH_PATHS:()=>U,AUTHORED_LABEL_MIN_CONTRAST:()=>Ve,BOOTH_LABEL_FONT_SIZE:()=>Se,DARK_BOOKABLE_LABEL_INK:()=>S,DARK_NEUTRAL_SECTION_FILL:()=>le,GA_CAPACITY_LABEL_FONT_SIZE:()=>Te,GA_FILL_OPACITY:()=>Ae,GA_LABEL_FONT_SIZE:()=>Be,LARGE_TEXT_CONTRAST:()=>ie,LIGHT_BOOKABLE_LABEL_INK:()=>B,LIGHT_NEUTRAL_SECTION_FILL:()=>ae,MIN_VISIBLE_BOOKABLE_LABEL_PX:()=>T,RENDERED_QUALITY_REPORT_VERSION:()=>be,ROW_LABEL_FONT_SIZE:()=>ke,SEAT_LABEL_FONT_SIZE:()=>Ie,SMALL_TEXT_CONTRAST:()=>z,accessGlyphInk:()=>He,accessGlyphPath:()=>Ne,bookableMarkerLabel:()=>ze,compositeHexOver:()=>Oe,inspectRenderedQualityEvidence:()=>$e,isBookableLabelLegibleAtScale:()=>_e,isLightFill:()=>se,minimumTextContrast:()=>Ee,neutralSectionFill:()=>Qe,renderedTextContrast:()=>b,stateAwareBookableLabelInk:()=>oe,summarizeLabelInkContrast:()=>Ge});module.exports=we(Ue);var Re=/^#?([\da-f]{3}|[\da-f]{6})$/i;function R(t){let r=Re.exec((t??"").trim());if(!r)return null;let o=r[1].length===3?r[1].split("").map(c=>c+c).join(""):r[1],s=parseInt(o,16);return[s>>16&255,s>>8&255,s&255]}function $(t){let r=t/255;return r<=.04045?r/12.92:((r+.055)/1.055)**2.4}function N(t){return .2126*$(t[0])+.7152*$(t[1])+.0722*$(t[2])}function re(t,r){let o=R(t),s=R(r);if(!o||!s)return null;let c=N(o),u=N(s);return(Math.max(c,u)+.05)/(Math.min(c,u)+.05)}var Ie=7,ke=10,Se=10,Be=15,Te=11,Ae=.85,T=12,z=4.5,ie=3,S="#000000",B="#ffffff",Me=24,Ce=18.67;function Ee(t,r=400){return t>=Me||r>=700&&t>=Ce?ie:z}function _e(t,r){return t*r>=T}var Fe=24,U={wheelchair:"M7.8 4.5a2.2 2.2 0 1 0 4.4 0a2.2 2.2 0 1 0 -4.4 0zM8 7L10.5 7L10.5 15L8 15ZM8 12.5L18 12.5L18 15L8 15ZM16 15L18 15L18 18L16 18ZM5.5 16a5.5 5.5 0 1 0 11 0a5.5 5.5 0 1 0 -11 0zM8 16a3 3 0 1 1 6 0a3 3 0 1 1 -6 0z",companion:"M5.5 6.5a3 3 0 1 0 6 0a3 3 0 1 0 -6 0zM4.5 18.5L6 11.5L11 11.5L12.5 18.5ZM12.5 7.5a3 3 0 1 0 6 0a3 3 0 1 0 -6 0zM11.5 19L13 12.5L18 12.5L19.5 19Z","semi-ambulatory":"M8.3 3.8a2.2 2.2 0 1 0 4.4 0a2.2 2.2 0 1 0 -4.4 0zM9 6.2L12 6.6L11 13.5L8.6 13L9 6.2ZM8.6 13L11 13L9.5 21L7 21ZM10.4 13L12.6 13L13.6 21L11.2 21ZM11.2 7.2L14 8L14.6 9.6L11.9 8.9ZM14.4 6.8L15.9 6.8L16.4 21L14.8 21Z","designated-aisle":"M3 5L6 5L6 14L3 14ZM3 12L13 12L13 15L3 15ZM5 15L7 15L7 20L5 20ZM11 15L13 15L13 20L11 20ZM13 7L20 7L17 4L19 4L23 8.5L19 13L17 13L20 10L13 10Z","step-free":"M4 4.5a2.2 2.2 0 1 0 4.4 0a2.2 2.2 0 1 0 -4.4 0zM4.4 7L7.5 7L7.5 13L11 15L9.5 17L5 14L4.4 7ZM2 19L8 19L17 10L22 10L22 13L18 13L10 21L2 21Z",hearing:"M15.5 3.5C9 2.2 5.5 6 5.5 11.5C5.5 16 8 19.5 10.5 21C13.2 22.6 16.4 20.8 15.4 18C14.8 16.4 12.9 16.1 13 14C13.1 11.9 15.8 11.4 15.8 8.5C15.8 5.4 13 4 15.5 3.5Z",cart:"M5.5 6L18.5 6a2.5 2.5 0 0 1 2.5 2.5L21 15.5a2.5 2.5 0 0 1 -2.5 2.5L11 18L7 20.5L7.5 18L5.5 18a2.5 2.5 0 0 1 -2.5 -2.5L3 8.5a2.5 2.5 0 0 1 2.5 -2.5zM6.5 11L17.5 11L17.5 12.6L6.5 12.6zM6.5 14L17.5 14L17.5 15.6L6.5 15.6z","sign-language":"M7 11L17 11L17 18a2 2 0 0 1 -2 2L9 20a2 2 0 0 1 -2 -2zM7.6 5L9.4 5L9.4 12L7.6 12zM9.9 3.5L11.7 3.5L11.7 12L9.9 12zM12.3 3.5L14.1 3.5L14.1 12L12.3 12zM14.6 5L16.4 5L16.4 12L14.6 12zM7.2 12.5L5 10.2L6.4 8.9L8.6 11.2Z","low-vision":"M2.5 12C6 6 18 6 21.5 12C18 18 6 18 2.5 12ZM9 12a3 3 0 1 0 6 0a3 3 0 1 0 -6 0zM17.5 3L19 3L19 6L17.5 6ZM19 4L22 4L22 5.5L19 5.5Z","sensory-friendly":"M4 11C4 5 7 2.5 12 2.5S20 5 20 11L17 11C17 7 15.5 5.5 12 5.5S7 7 7 11ZM3 10L8 10L8 19L5 19a2 2 0 0 1 -2 -2ZM16 10L21 10L21 17a2 2 0 0 1 -2 2L16 19ZM9 12L15 12L15 14L9 14ZM10 16L14 16L14 18L10 18Z","plus-size":"M9.4 4.3a2.6 2.6 0 1 0 5.2 0a2.6 2.6 0 1 0 -5.2 0zM5 20L4 13C4 10.5 7 9.5 12 9.5C17 9.5 20 10.5 20 13L19 20Z","lift-armrest":"M5 6L8 6L8 19L5 19zM5 16L18 16L18 19L5 19zM8 12L17 12L17 14.5L8 14.5zM14 7L16 7L16 12L14 12zM12 7L18 7L15 3Z"},Pe=U.wheelchair;function Ne(t){if(!t?.length)return null;let r=t.includes("wheelchair")?"wheelchair":t[0];return U[r]??null}function ze(t){return/-(\d{1,5})$/.exec(t)?.[1]??t}var b=re;function Oe(t,r,o){let s=R(t),c=R(r);if(!s||!c)return r;let u=Math.max(0,Math.min(1,o));return`#${s.map((p,M)=>Math.round(p*u+c[M]*(1-u))).map(p=>p.toString(16).padStart(2,"0")).join("")}`}var Ve=3;function oe(t,r,o=z){let s=b(r,t);if(s!=null&&s>=o)return r;let c=b(S,t)??0,u=b(B,t)??0;return c===0&&u===0?r:c>=u?S:B}var Ze=3;function He(t){let r=b("#ffffff",t);if(r!=null&&r>=Ze)return"#ffffff";let o=b(S,t)??0,s=b(B,t)??0;return o===0&&s===0?"#ffffff":o>=s?S:B}var ne=/^#[0-9a-f]{6}$/i;function se(t){let r=R(t);return r!=null&&N(r)>.5}var ae="#e5e7eb",le="#273142";function Qe(t){return se(t)?ae:le}function Ge(t,r,o=z){let s=ne.test(t.trim()),c=t.trim().toLowerCase(),u=0,m=0,p=null;for(let C of r){if(!s||!ne.test(C.trim()))continue;u+=1;let E=oe(C,t,o);E.toLowerCase()!==c&&(m+=1,p=E)}return{total:u,overridden:m,status:u===0?"none":m===0?"applies":m===u?"overridden":"mixed",overrideInk:p}}var be=3,I=4.5,O=3,ce=24,Ke=20;function V(t){return t.filter(r=>r.visible&&!!r.screenBox)}function y(t,r){return t.x<r.x+r.width&&t.x+t.width>r.x&&t.y<r.y+r.height&&t.y+t.height>r.y}function h(t){return t.length?Math.round(Math.min(...t)*100)/100:null}function l(t,r,o){return o.length?{code:t,message:r,count:o.length,samples:o.slice(0,Ke)}:null}function A(t,r,o){return{primaryId:t.seatId,primaryLabel:t.label,...r==null?{}:{measured:Math.round(r*100)/100},...o==null?{}:{minimum:o}}}function Z(t,r,o){return{primaryId:t.id,primaryLabel:t.label,...r==null?{}:{measured:Math.round(r*100)/100},...o==null?{}:{minimum:o}}}function ue(t,r,o){return{primaryId:t.objectId,primaryLabel:t.text,...r==null?{}:{measured:Math.round(r*100)/100},...o==null?{}:{minimum:o}}}function L(t,r,o,s){return{primaryId:t,primaryLabel:r,secondaryId:o,secondaryLabel:s}}function $e(t,r="overview",o=null){let s=V(t.labels),c=V(t.hierarchyLabels),u=V(t.freeTextLabels),m=V(t.rowLabels),p=t.gaAreas.filter(e=>e.visible),M=s.map(e=>b(e.ink,e.fill)??0),C=c.map(e=>b(e.ink,e.fill)??0),E=u.map(e=>b(e.ink,e.background)??0),de=p.map(e=>b(e.effectiveBackground,t.canvasBackground)??0),d=o?t.labels.filter(e=>e.categoryKey===o):t.labels,x=o?t.gaAreas.filter(e=>e.categoryKey===o):t.gaAreas,f=d.filter(e=>e.selected),v=d.filter(e=>e.status==="held"),w=d.filter(e=>e.status==="booked"),_=d.filter(e=>e.pointerTarget.active),j=new Set([...t.labels.filter(e=>e.visible&&(e.opacity>.25||e.selected||e.status!=="free")).map(e=>e.categoryKey),...t.gaAreas.filter(e=>e.visible&&e.opacity>.1).map(e=>e.categoryKey)]),F=f.length?h(f.map(e=>b(e.selectionRingColor??t.selectionRingColor,e.fill)??0)):null,a=[],k=(e,n)=>Array.from({length:e},(g,P)=>({primaryId:`overview:${P+1}`,primaryLabel:n}));r==="overview"&&t.rung==="sections"&&(a.push(l("overview-section-category-paint","Section overview shells must use the neutral hierarchy palette, not category paint",k(t.overviewStyle.categoryPaintedSectionShells,"category-painted section shell"))),a.push(l("overview-category-detail-visible","Category-tinted section detail must wait until section focus or seat zoom",k(t.overviewStyle.visibleCategoryDetailOutlines,"category detail outline"))),a.push(l("overview-row-hints-visible","Row and seat patterns must not clutter the section overview",k(t.overviewStyle.visibleSectionRowHints,"section row hint"))),a.push(l("overview-availability-clutter","Live availability counts belong in focused detail, not on section overview shells",k(t.overviewStyle.visibleSectionAvailabilityLabels,"section availability label"))),a.push(l("overview-ga-detail-visible","Section-contained standing paint belongs in focused detail, not on section overview shells",k(t.overviewStyle.visibleSectionGADetails,"section-contained GA detail")))),a.push(l("bookable-label-undersized","Visible bookable labels must meet the rendered small-text size floor",s.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>A(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),a.push(l("bookable-label-viewport-clipped","Visible interaction labels must remain fully inside the buyer viewport",r==="interaction"?s.filter(e=>e.screenBox.x<0||e.screenBox.y<0||e.screenBox.x+e.screenBox.width>t.viewport.width||e.screenBox.y+e.screenBox.height>t.viewport.height).map(e=>A(e)):[])),a.push(l("row-label-viewport-clipped","Visible interaction row labels must remain fully inside the buyer viewport",r==="interaction"?m.flatMap((e,n)=>{let g=e.screenBox;return g.x<0||g.y<0||g.x+g.width>t.viewport.width||g.y+g.height>t.viewport.height?[{primaryId:`row-label-${n}`,primaryLabel:e.text}]:[]}):[]));let X=[];if(r==="interaction")for(let e=0;e<m.length;e+=1)for(let n=0;n<e;n+=1)y(m[e].screenBox,m[n].screenBox)&&X.push(L(`row-label-${n}`,m[n].text,`row-label-${e}`,m[e].text));if(a.push(l("row-label-collision","Visible interaction row labels must not overlap",X)),r==="interaction"){let e=d.length>0,n=x.length>0,g=e||n,P=x.filter(i=>i.visible),me=new Set([...d.flatMap(i=>i.sectionId?[i.sectionId]:[]),...x.flatMap(i=>i.sectionId?[i.sectionId]:[])]),pe=new Set([...t.labels.map(i=>i.categoryKey),...t.gaAreas.map(i=>i.categoryKey)]),H=i=>i.screenCenter.x>=0&&i.screenCenter.x<=t.viewport.width&&i.screenCenter.y>=0&&i.screenCenter.y<=t.viewport.height;a.push(l("detail-rung-missing","Interaction evidence with bookable inventory must render the seat-detail rung",g&&t.rung!=="seats"?[{primaryId:"renderer",primaryLabel:t.rung}]:[])),a.push(l("detail-inventory-not-visible","Interaction evidence must frame at least one real bookable unit",g&&!d.some(H)&&!P.length?[{primaryId:"renderer",primaryLabel:"no target inventory in viewport"}]:[])),a.push(l("pointer-target-inactive","Interaction evidence must expose a live production pointer target",e&&!_.some(H)||!e&&n&&!P.some(i=>i.interactive)?[{primaryId:"renderer",primaryLabel:"no active pointer target in viewport"}]:[])),a.push(l("pointer-target-undersized","Every active production pointer target must reach at least 24 CSS pixels",_.filter(i=>H(i)&&i.pointerTarget.effectiveMinimumPx<ce).map(i=>A(i,i.pointerTarget.effectiveMinimumPx,ce)))),a.push(l("selected-state-missing","Interaction evidence must paint a selected unit and its renderer-owned ring",e&&(!f.length||!f.some(i=>t.selectionRingSeatIds.includes(i.seatId)))?[{primaryId:"renderer",primaryLabel:"selected state"}]:[])),a.push(l("selected-state-contrast-low","The selected-state ring must maintain 3:1 graphical contrast with the seat paint",f.length&&(F??0)<O?[{primaryId:f[0].seatId,primaryLabel:f[0].label,measured:Math.round((F??0)*100)/100,minimum:O}]:[])),a.push(l("held-state-missing","Interaction evidence must paint a held state when the floor has at least two status-managed units",d.length>=2&&!v.length?[{primaryId:"renderer",primaryLabel:"held state"}]:[])),a.push(l("booked-state-missing","Interaction evidence must paint a taken state when the floor has at least three status-managed units",d.length>=3&&!w.length?[{primaryId:"renderer",primaryLabel:"booked state"}]:[]));let ge=new Set(v.map(i=>`${i.fill.toLowerCase()}:${i.opacity}`)),he=new Set(w.map(i=>`${i.fill.toLowerCase()}:${i.opacity}`));a.push(l("status-state-indistinct","Held and taken evidence must resolve to distinct renderer paint",v.length&&w.length&&[...ge].some(i=>he.has(i))?[{primaryId:v[0].seatId,primaryLabel:v[0].label,secondaryId:w[0].seatId,secondaryLabel:w[0].label}]:[])),a.push(l("section-focus-missing","Interaction evidence must exercise section focus and its backdrop when section membership exists",me.size&&(!t.focusedSectionId||!t.focusBackdropVisible)?[{primaryId:"renderer",primaryLabel:"section focus"}]:[])),a.push(l("category-filter-missing","Interaction evidence must exercise a category filter when multiple categories exist",pe.size>=2&&(!t.categoryFilterKeys||!t.categoryFilterKeys.length)?[{primaryId:"renderer",primaryLabel:"category filter"}]:[]));let Q=t.labels.filter(i=>i.status==="free"&&!i.selected&&t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(i.categoryKey)),G=t.gaAreas.filter(i=>t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(i.categoryKey));a.push(l("category-filter-ineffective","The active category filter must visibly dim excluded free inventory",(Q.length||G.length)&&!Q.some(i=>i.opacity<=.25)&&!G.some(i=>i.opacity<=.1)?[...Q.map(i=>A(i,i.opacity)),...G.map(i=>({primaryId:i.areaId,primaryLabel:i.label,measured:i.opacity}))]:[])),a.push(l("target-category-not-visible","A category-specific interaction scene must visibly paint its exact target category",o&&!j.has(o)?[{primaryId:o,primaryLabel:o}]:[])),a.push(l("target-category-filter-mismatch","A category-specific interaction scene must bind its filter to only the exact target category",o&&(t.categoryFilterKeys?.length!==1||t.categoryFilterKeys[0]!==o)?[{primaryId:o,primaryLabel:o}]:[]))}a.push(l("bookable-label-contrast-low","Visible bookable labels must meet 4.5:1 contrast against their actual paint",s.flatMap(e=>{let n=b(e.ink,e.fill)??0;return n<I?[A(e,n,I)]:[]})));let D=[];for(let e=0;e<s.length;e+=1)for(let n=0;n<e;n+=1)y(s[e].screenBox,s[n].screenBox)&&D.push(L(s[n].seatId,s[n].label,s[e].seatId,s[e].label));a.push(l("bookable-label-collision","Visible bookable labels must not overlap",D)),a.push(l("hierarchy-label-undersized","Visible section and zone labels must meet the rendered small-text size floor",c.filter(e=>e.renderedFontPx<T).map(e=>Z(e,e.renderedFontPx,T)))),a.push(l("hierarchy-label-contrast-low","Visible section and zone labels must meet 4.5:1 contrast against their backing paint",c.flatMap(e=>{let n=b(e.ink,e.fill)??0;return n<I?[Z(e,n,I)]:[]}))),a.push(l("hierarchy-label-viewport-clipped","Visible overview hierarchy labels must remain fully inside the buyer viewport",r==="overview"?c.filter(e=>e.screenBox.x<0||e.screenBox.y<0||e.screenBox.x+e.screenBox.width>t.viewport.width||e.screenBox.y+e.screenBox.height>t.viewport.height).map(e=>Z(e)):[])),a.push(l("hierarchy-label-outside-section","Visible section labels must remain inside the filled section surface and outside holes",c.filter(e=>e.kind==="section"&&e.fitsContainer===!1).map(e=>Z(e))));let Y=[];for(let e=0;e<c.length;e+=1)for(let n=0;n<e;n+=1)y(c[e].screenBox,c[n].screenBox)&&Y.push(L(c[n].id,c[n].label,c[e].id,c[e].label));a.push(l("hierarchy-label-collision","Visible hierarchy labels must not overlap each other",Y));let W=[];for(let e of c)for(let n of s)y(e.screenBox,n.screenBox)&&W.push(L(e.id,e.label,n.seatId,n.label));a.push(l("hierarchy-bookable-collision","Visible hierarchy labels must not overlap bookable labels",W)),a.push(l("free-text-undersized","Visible chart text must meet the rendered small-text size floor",u.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>ue(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),a.push(l("free-text-contrast-low","Visible chart text must meet 4.5:1 contrast against its measured background",u.flatMap(e=>{let n=b(e.ink,e.background)??0;return n<I?[ue(e,n,I)]:[]})));let J=[];for(let e=0;e<u.length;e+=1)for(let n=0;n<e;n+=1)y(u[e].screenBox,u[n].screenBox)&&J.push(L(u[n].objectId,u[n].text,u[e].objectId,u[e].text));a.push(l("free-text-collision","Visible chart text labels must not overlap each other",J));let q=[];for(let e of u)for(let n of s)y(e.screenBox,n.screenBox)&&q.push(L(e.objectId,e.text,n.seatId,n.label));a.push(l("free-text-bookable-collision","Visible chart text must not overlap bookable labels",q));let ee=[];for(let e of u)for(let n of c)y(e.screenBox,n.screenBox)&&ee.push(L(e.objectId,e.text,n.id,n.label));a.push(l("free-text-hierarchy-collision","Visible chart text must not overlap hierarchy labels",ee)),a.push(l("ga-contrast-low","Visible GA surfaces must maintain 3:1 graphical contrast with the canvas",p.flatMap(e=>{let n=b(e.effectiveBackground,t.canvasBackground)??0;return n<O?[{primaryId:e.areaId,primaryLabel:e.label,measured:Math.round(n*100)/100,minimum:O}]:[]})));let te=a.filter(e=>!!e);return{version:be,passed:te.length===0,state:r,targetCategoryKey:o,resolvedRules:["rendered-overview-label-size","rendered-overview-label-contrast","rendered-overview-label-collision","rendered-overview-hierarchy-viewport","rendered-overview-hierarchy-containment","rendered-overview-section-first-style","rendered-overview-ga-contrast",...r==="interaction"?["rendered-detail-label-viewport","rendered-detail-inventory","rendered-pointer-target","rendered-selected-held-taken-states","rendered-section-focus","rendered-category-filter"]:[]],viewport:t.viewport,canvasBackground:t.canvasBackground,effectiveScale:t.effectiveScale,rung:t.rung,inventory:{totalBookableUnits:t.totalBookableUnits,totalLabelledBookableUnits:t.totalLabelledBookableUnits,visibleBookableLabels:s.length,hiddenBookableLabels:t.hiddenLabels,visibleHierarchyLabels:c.length,visibleFreeTextLabels:u.length,visibleGAAreas:p.length},overviewStyle:t.overviewStyle,composition:{hierarchy:t.hierarchyLabels.filter(e=>e.role==="name").map(e=>({id:e.id,kind:e.kind,label:e.label,visible:e.visible})).sort((e,n)=>e.kind.localeCompare(n.kind)||e.id.localeCompare(n.id)),labelledObjects:t.freeTextLabels.map(e=>({objectId:e.objectId,kind:e.kind,text:e.text,visible:e.visible})).sort((e,n)=>e.objectId.localeCompare(n.objectId)||e.kind.localeCompare(n.kind)),gaAreas:t.gaAreas.map(e=>({areaId:e.areaId,label:e.label,categoryKey:e.categoryKey,...e.sectionId?{sectionId:e.sectionId}:{},visible:e.visible})).sort((e,n)=>e.areaId.localeCompare(n.areaId)),bookableSectionIds:[...new Set(t.labels.flatMap(e=>e.sectionId?[e.sectionId]:[]))].sort(),categoryKeys:[...new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)])].sort(),activeCategoryKeys:[...j].sort()},metrics:{minimumRenderedBookableLabelPx:h(s.map(e=>e.renderedFontPx)),minimumBookableLabelContrast:h(M),minimumRenderedHierarchyLabelPx:h(c.map(e=>e.renderedFontPx)),minimumHierarchyLabelContrast:h(C),minimumRenderedFreeTextPx:h(u.map(e=>e.renderedFontPx)),minimumFreeTextContrast:h(E),minimumGAContrast:h(de),minimumEffectivePointerTargetPx:h(_.map(e=>e.pointerTarget.effectiveMinimumPx)),selectedRingContrast:F==null?null:Math.round(F*100)/100},interaction:{applicable:{detail:d.length>0||x.length>0,pointer:d.length>0||x.length>0,held:d.length>=2,booked:d.length>=3,sectionFocus:d.some(e=>!!e.sectionId)||x.some(e=>!!e.sectionId),categoryFilter:new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)]).size>=2},selectedUnits:f.length,heldUnits:v.length,bookedUnits:w.length,activePointerTargets:_.length,focusedSectionId:t.focusedSectionId,focusBackdropVisible:t.focusBackdropVisible,categoryFilterKeys:t.categoryFilterKeys},findings:te}}0&&(module.exports={ACCESS_GLYPH_PATH,ACCESS_GLYPH_VIEWBOX,ACCESS_TYPE_GLYPH_PATHS,AUTHORED_LABEL_MIN_CONTRAST,BOOTH_LABEL_FONT_SIZE,DARK_BOOKABLE_LABEL_INK,DARK_NEUTRAL_SECTION_FILL,GA_CAPACITY_LABEL_FONT_SIZE,GA_FILL_OPACITY,GA_LABEL_FONT_SIZE,LARGE_TEXT_CONTRAST,LIGHT_BOOKABLE_LABEL_INK,LIGHT_NEUTRAL_SECTION_FILL,MIN_VISIBLE_BOOKABLE_LABEL_PX,RENDERED_QUALITY_REPORT_VERSION,ROW_LABEL_FONT_SIZE,SEAT_LABEL_FONT_SIZE,SMALL_TEXT_CONTRAST,accessGlyphInk,accessGlyphPath,bookableMarkerLabel,compositeHexOver,inspectRenderedQualityEvidence,isBookableLabelLegibleAtScale,isLightFill,minimumTextContrast,neutralSectionFill,renderedTextContrast,stateAwareBookableLabelInk,summarizeLabelInkContrast});
1
+ "use strict";var K=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var ye=Object.getOwnPropertyNames;var Le=Object.prototype.hasOwnProperty;var xe=(t,r)=>{for(var o in r)K(t,o,{get:r[o],enumerable:!0})},ve=(t,r,o,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let c of ye(r))!Le.call(t,c)&&c!==o&&K(t,c,{get:()=>r[c],enumerable:!(s=fe(r,c))||s.enumerable});return t};var we=t=>ve(K({},"__esModule",{value:!0}),t);var Ue={};xe(Ue,{ACCESS_GLYPH_PATH:()=>Pe,ACCESS_GLYPH_VIEWBOX:()=>Fe,ACCESS_TYPE_GLYPH_PATHS:()=>U,AUTHORED_LABEL_MIN_CONTRAST:()=>Ve,BOOTH_LABEL_FONT_SIZE:()=>Se,DARK_BOOKABLE_LABEL_INK:()=>S,DARK_NEUTRAL_SECTION_FILL:()=>ce,GA_CAPACITY_LABEL_FONT_SIZE:()=>Te,GA_FILL_OPACITY:()=>Ae,GA_LABEL_FONT_SIZE:()=>Be,LARGE_TEXT_CONTRAST:()=>oe,LIGHT_BOOKABLE_LABEL_INK:()=>B,LIGHT_NEUTRAL_SECTION_FILL:()=>le,MIN_POINTER_TARGET_PX:()=>j,MIN_VISIBLE_BOOKABLE_LABEL_PX:()=>T,RENDERED_QUALITY_REPORT_VERSION:()=>be,ROW_LABEL_FONT_SIZE:()=>ke,SEAT_LABEL_FONT_SIZE:()=>Ie,SMALL_TEXT_CONTRAST:()=>z,accessGlyphInk:()=>He,accessGlyphPath:()=>Ne,bookableMarkerLabel:()=>ze,compositeHexOver:()=>Oe,inspectRenderedQualityEvidence:()=>$e,isBookableLabelLegibleAtScale:()=>_e,isLightFill:()=>ae,minimumTextContrast:()=>Ee,neutralSectionFill:()=>Qe,renderedTextContrast:()=>b,stateAwareBookableLabelInk:()=>se,summarizeLabelInkContrast:()=>Ge});module.exports=we(Ue);var Re=/^#?([\da-f]{3}|[\da-f]{6})$/i;function R(t){let r=Re.exec((t??"").trim());if(!r)return null;let o=r[1].length===3?r[1].split("").map(c=>c+c).join(""):r[1],s=parseInt(o,16);return[s>>16&255,s>>8&255,s&255]}function $(t){let r=t/255;return r<=.04045?r/12.92:((r+.055)/1.055)**2.4}function N(t){return .2126*$(t[0])+.7152*$(t[1])+.0722*$(t[2])}function ne(t,r){let o=R(t),s=R(r);if(!o||!s)return null;let c=N(o),u=N(s);return(Math.max(c,u)+.05)/(Math.min(c,u)+.05)}var Ie=7,ke=10,Se=10,Be=15,Te=11,Ae=.85,T=12,z=4.5,oe=3,S="#000000",B="#ffffff",Me=24,Ce=18.67;function Ee(t,r=400){return t>=Me||r>=700&&t>=Ce?oe:z}function _e(t,r){return t*r>=T}var Fe=24,U={wheelchair:"M7.8 4.5a2.2 2.2 0 1 0 4.4 0a2.2 2.2 0 1 0 -4.4 0zM8 7L10.5 7L10.5 15L8 15ZM8 12.5L18 12.5L18 15L8 15ZM16 15L18 15L18 18L16 18ZM5.5 16a5.5 5.5 0 1 0 11 0a5.5 5.5 0 1 0 -11 0zM8 16a3 3 0 1 1 6 0a3 3 0 1 1 -6 0z",companion:"M5.5 6.5a3 3 0 1 0 6 0a3 3 0 1 0 -6 0zM4.5 18.5L6 11.5L11 11.5L12.5 18.5ZM12.5 7.5a3 3 0 1 0 6 0a3 3 0 1 0 -6 0zM11.5 19L13 12.5L18 12.5L19.5 19Z","semi-ambulatory":"M8.3 3.8a2.2 2.2 0 1 0 4.4 0a2.2 2.2 0 1 0 -4.4 0zM9 6.2L12 6.6L11 13.5L8.6 13L9 6.2ZM8.6 13L11 13L9.5 21L7 21ZM10.4 13L12.6 13L13.6 21L11.2 21ZM11.2 7.2L14 8L14.6 9.6L11.9 8.9ZM14.4 6.8L15.9 6.8L16.4 21L14.8 21Z","designated-aisle":"M3 5L6 5L6 14L3 14ZM3 12L13 12L13 15L3 15ZM5 15L7 15L7 20L5 20ZM11 15L13 15L13 20L11 20ZM13 7L20 7L17 4L19 4L23 8.5L19 13L17 13L20 10L13 10Z","step-free":"M4 4.5a2.2 2.2 0 1 0 4.4 0a2.2 2.2 0 1 0 -4.4 0zM4.4 7L7.5 7L7.5 13L11 15L9.5 17L5 14L4.4 7ZM2 19L8 19L17 10L22 10L22 13L18 13L10 21L2 21Z",hearing:"M15.5 3.5C9 2.2 5.5 6 5.5 11.5C5.5 16 8 19.5 10.5 21C13.2 22.6 16.4 20.8 15.4 18C14.8 16.4 12.9 16.1 13 14C13.1 11.9 15.8 11.4 15.8 8.5C15.8 5.4 13 4 15.5 3.5Z",cart:"M5.5 6L18.5 6a2.5 2.5 0 0 1 2.5 2.5L21 15.5a2.5 2.5 0 0 1 -2.5 2.5L11 18L7 20.5L7.5 18L5.5 18a2.5 2.5 0 0 1 -2.5 -2.5L3 8.5a2.5 2.5 0 0 1 2.5 -2.5zM6.5 11L17.5 11L17.5 12.6L6.5 12.6zM6.5 14L17.5 14L17.5 15.6L6.5 15.6z","sign-language":"M7 11L17 11L17 18a2 2 0 0 1 -2 2L9 20a2 2 0 0 1 -2 -2zM7.6 5L9.4 5L9.4 12L7.6 12zM9.9 3.5L11.7 3.5L11.7 12L9.9 12zM12.3 3.5L14.1 3.5L14.1 12L12.3 12zM14.6 5L16.4 5L16.4 12L14.6 12zM7.2 12.5L5 10.2L6.4 8.9L8.6 11.2Z","low-vision":"M2.5 12C6 6 18 6 21.5 12C18 18 6 18 2.5 12ZM9 12a3 3 0 1 0 6 0a3 3 0 1 0 -6 0zM17.5 3L19 3L19 6L17.5 6ZM19 4L22 4L22 5.5L19 5.5Z","sensory-friendly":"M4 11C4 5 7 2.5 12 2.5S20 5 20 11L17 11C17 7 15.5 5.5 12 5.5S7 7 7 11ZM3 10L8 10L8 19L5 19a2 2 0 0 1 -2 -2ZM16 10L21 10L21 17a2 2 0 0 1 -2 2L16 19ZM9 12L15 12L15 14L9 14ZM10 16L14 16L14 18L10 18Z","plus-size":"M9.4 4.3a2.6 2.6 0 1 0 5.2 0a2.6 2.6 0 1 0 -5.2 0zM5 20L4 13C4 10.5 7 9.5 12 9.5C17 9.5 20 10.5 20 13L19 20Z","lift-armrest":"M5 6L8 6L8 19L5 19zM5 16L18 16L18 19L5 19zM8 12L17 12L17 14.5L8 14.5zM14 7L16 7L16 12L14 12zM12 7L18 7L15 3Z"},Pe=U.wheelchair;function Ne(t){if(!t?.length)return null;let r=t.includes("wheelchair")?"wheelchair":t[0];return U[r]??null}function ze(t){return/-(\d{1,5})$/.exec(t)?.[1]??t}var b=ne;function Oe(t,r,o){let s=R(t),c=R(r);if(!s||!c)return r;let u=Math.max(0,Math.min(1,o));return`#${s.map((p,M)=>Math.round(p*u+c[M]*(1-u))).map(p=>p.toString(16).padStart(2,"0")).join("")}`}var Ve=3;function se(t,r,o=z){let s=b(r,t);if(s!=null&&s>=o)return r;let c=b(S,t)??0,u=b(B,t)??0;return c===0&&u===0?r:c>=u?S:B}var Ze=3;function He(t){let r=b("#ffffff",t);if(r!=null&&r>=Ze)return"#ffffff";let o=b(S,t)??0,s=b(B,t)??0;return o===0&&s===0?"#ffffff":o>=s?S:B}var ie=/^#[0-9a-f]{6}$/i;function ae(t){let r=R(t);return r!=null&&N(r)>.5}var le="#e5e7eb",ce="#273142";function Qe(t){return ae(t)?le:ce}function Ge(t,r,o=z){let s=ie.test(t.trim()),c=t.trim().toLowerCase(),u=0,m=0,p=null;for(let C of r){if(!s||!ie.test(C.trim()))continue;u+=1;let E=se(C,t,o);E.toLowerCase()!==c&&(m+=1,p=E)}return{total:u,overridden:m,status:u===0?"none":m===0?"applies":m===u?"overridden":"mixed",overrideInk:p}}var be=3,I=4.5,O=3,j=24,Ke=20;function V(t){return t.filter(r=>r.visible&&!!r.screenBox)}function y(t,r){return t.x<r.x+r.width&&t.x+t.width>r.x&&t.y<r.y+r.height&&t.y+t.height>r.y}function h(t){return t.length?Math.round(Math.min(...t)*100)/100:null}function l(t,r,o){return o.length?{code:t,message:r,count:o.length,samples:o.slice(0,Ke)}:null}function A(t,r,o){return{primaryId:t.seatId,primaryLabel:t.label,...r==null?{}:{measured:Math.round(r*100)/100},...o==null?{}:{minimum:o}}}function Z(t,r,o){return{primaryId:t.id,primaryLabel:t.label,...r==null?{}:{measured:Math.round(r*100)/100},...o==null?{}:{minimum:o}}}function ue(t,r,o){return{primaryId:t.objectId,primaryLabel:t.text,...r==null?{}:{measured:Math.round(r*100)/100},...o==null?{}:{minimum:o}}}function L(t,r,o,s){return{primaryId:t,primaryLabel:r,secondaryId:o,secondaryLabel:s}}function $e(t,r="overview",o=null){let s=V(t.labels),c=V(t.hierarchyLabels),u=V(t.freeTextLabels),m=V(t.rowLabels),p=t.gaAreas.filter(e=>e.visible),M=s.map(e=>b(e.ink,e.fill)??0),C=c.map(e=>b(e.ink,e.fill)??0),E=u.map(e=>b(e.ink,e.background)??0),de=p.map(e=>b(e.effectiveBackground,t.canvasBackground)??0),d=o?t.labels.filter(e=>e.categoryKey===o):t.labels,x=o?t.gaAreas.filter(e=>e.categoryKey===o):t.gaAreas,f=d.filter(e=>e.selected),v=d.filter(e=>e.status==="held"),w=d.filter(e=>e.status==="booked"),_=d.filter(e=>e.pointerTarget.active),X=new Set([...t.labels.filter(e=>e.visible&&(e.opacity>.25||e.selected||e.status!=="free")).map(e=>e.categoryKey),...t.gaAreas.filter(e=>e.visible&&e.opacity>.1).map(e=>e.categoryKey)]),F=f.length?h(f.map(e=>b(e.selectionRingColor??t.selectionRingColor,e.fill)??0)):null,a=[],k=(e,n)=>Array.from({length:e},(g,P)=>({primaryId:`overview:${P+1}`,primaryLabel:n}));r==="overview"&&t.rung==="sections"&&(a.push(l("overview-section-category-paint","Section overview shells must use the neutral hierarchy palette, not category paint",k(t.overviewStyle.categoryPaintedSectionShells,"category-painted section shell"))),a.push(l("overview-category-detail-visible","Category-tinted section detail must wait until section focus or seat zoom",k(t.overviewStyle.visibleCategoryDetailOutlines,"category detail outline"))),a.push(l("overview-row-hints-visible","Row and seat patterns must not clutter the section overview",k(t.overviewStyle.visibleSectionRowHints,"section row hint"))),a.push(l("overview-availability-clutter","Live availability counts belong in focused detail, not on section overview shells",k(t.overviewStyle.visibleSectionAvailabilityLabels,"section availability label"))),a.push(l("overview-ga-detail-visible","Section-contained standing paint belongs in focused detail, not on section overview shells",k(t.overviewStyle.visibleSectionGADetails,"section-contained GA detail")))),a.push(l("bookable-label-undersized","Visible bookable labels must meet the rendered small-text size floor",s.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>A(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),a.push(l("bookable-label-viewport-clipped","Visible interaction labels must remain fully inside the buyer viewport",r==="interaction"?s.filter(e=>e.screenBox.x<0||e.screenBox.y<0||e.screenBox.x+e.screenBox.width>t.viewport.width||e.screenBox.y+e.screenBox.height>t.viewport.height).map(e=>A(e)):[])),a.push(l("row-label-viewport-clipped","Visible interaction row labels must remain fully inside the buyer viewport",r==="interaction"?m.flatMap((e,n)=>{let g=e.screenBox;return g.x<0||g.y<0||g.x+g.width>t.viewport.width||g.y+g.height>t.viewport.height?[{primaryId:`row-label-${n}`,primaryLabel:e.text}]:[]}):[]));let D=[];if(r==="interaction")for(let e=0;e<m.length;e+=1)for(let n=0;n<e;n+=1)y(m[e].screenBox,m[n].screenBox)&&D.push(L(`row-label-${n}`,m[n].text,`row-label-${e}`,m[e].text));if(a.push(l("row-label-collision","Visible interaction row labels must not overlap",D)),r==="interaction"){let e=d.length>0,n=x.length>0,g=e||n,P=x.filter(i=>i.visible),me=new Set([...d.flatMap(i=>i.sectionId?[i.sectionId]:[]),...x.flatMap(i=>i.sectionId?[i.sectionId]:[])]),pe=new Set([...t.labels.map(i=>i.categoryKey),...t.gaAreas.map(i=>i.categoryKey)]),H=i=>i.screenCenter.x>=0&&i.screenCenter.x<=t.viewport.width&&i.screenCenter.y>=0&&i.screenCenter.y<=t.viewport.height;a.push(l("detail-rung-missing","Interaction evidence with bookable inventory must render the seat-detail rung",g&&t.rung!=="seats"?[{primaryId:"renderer",primaryLabel:t.rung}]:[])),a.push(l("detail-inventory-not-visible","Interaction evidence must frame at least one real bookable unit",g&&!d.some(H)&&!P.length?[{primaryId:"renderer",primaryLabel:"no target inventory in viewport"}]:[])),a.push(l("pointer-target-inactive","Interaction evidence must expose a live production pointer target",e&&!_.some(H)||!e&&n&&!P.some(i=>i.interactive)?[{primaryId:"renderer",primaryLabel:"no active pointer target in viewport"}]:[])),a.push(l("pointer-target-undersized","Every active production pointer target must reach at least 24 CSS pixels",_.filter(i=>H(i)&&i.pointerTarget.effectiveMinimumPx<j).map(i=>A(i,i.pointerTarget.effectiveMinimumPx,j)))),a.push(l("selected-state-missing","Interaction evidence must paint a selected unit and its renderer-owned ring",e&&(!f.length||!f.some(i=>t.selectionRingSeatIds.includes(i.seatId)))?[{primaryId:"renderer",primaryLabel:"selected state"}]:[])),a.push(l("selected-state-contrast-low","The selected-state ring must maintain 3:1 graphical contrast with the seat paint",f.length&&(F??0)<O?[{primaryId:f[0].seatId,primaryLabel:f[0].label,measured:Math.round((F??0)*100)/100,minimum:O}]:[])),a.push(l("held-state-missing","Interaction evidence must paint a held state when the floor has at least two status-managed units",d.length>=2&&!v.length?[{primaryId:"renderer",primaryLabel:"held state"}]:[])),a.push(l("booked-state-missing","Interaction evidence must paint a taken state when the floor has at least three status-managed units",d.length>=3&&!w.length?[{primaryId:"renderer",primaryLabel:"booked state"}]:[]));let ge=new Set(v.map(i=>`${i.fill.toLowerCase()}:${i.opacity}`)),he=new Set(w.map(i=>`${i.fill.toLowerCase()}:${i.opacity}`));a.push(l("status-state-indistinct","Held and taken evidence must resolve to distinct renderer paint",v.length&&w.length&&[...ge].some(i=>he.has(i))?[{primaryId:v[0].seatId,primaryLabel:v[0].label,secondaryId:w[0].seatId,secondaryLabel:w[0].label}]:[])),a.push(l("section-focus-missing","Interaction evidence must exercise section focus and its backdrop when section membership exists",me.size&&(!t.focusedSectionId||!t.focusBackdropVisible)?[{primaryId:"renderer",primaryLabel:"section focus"}]:[])),a.push(l("category-filter-missing","Interaction evidence must exercise a category filter when multiple categories exist",pe.size>=2&&(!t.categoryFilterKeys||!t.categoryFilterKeys.length)?[{primaryId:"renderer",primaryLabel:"category filter"}]:[]));let Q=t.labels.filter(i=>i.status==="free"&&!i.selected&&t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(i.categoryKey)),G=t.gaAreas.filter(i=>t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(i.categoryKey));a.push(l("category-filter-ineffective","The active category filter must visibly dim excluded free inventory",(Q.length||G.length)&&!Q.some(i=>i.opacity<=.25)&&!G.some(i=>i.opacity<=.1)?[...Q.map(i=>A(i,i.opacity)),...G.map(i=>({primaryId:i.areaId,primaryLabel:i.label,measured:i.opacity}))]:[])),a.push(l("target-category-not-visible","A category-specific interaction scene must visibly paint its exact target category",o&&!X.has(o)?[{primaryId:o,primaryLabel:o}]:[])),a.push(l("target-category-filter-mismatch","A category-specific interaction scene must bind its filter to only the exact target category",o&&(t.categoryFilterKeys?.length!==1||t.categoryFilterKeys[0]!==o)?[{primaryId:o,primaryLabel:o}]:[]))}a.push(l("bookable-label-contrast-low","Visible bookable labels must meet 4.5:1 contrast against their actual paint",s.flatMap(e=>{let n=b(e.ink,e.fill)??0;return n<I?[A(e,n,I)]:[]})));let Y=[];for(let e=0;e<s.length;e+=1)for(let n=0;n<e;n+=1)y(s[e].screenBox,s[n].screenBox)&&Y.push(L(s[n].seatId,s[n].label,s[e].seatId,s[e].label));a.push(l("bookable-label-collision","Visible bookable labels must not overlap",Y)),a.push(l("hierarchy-label-undersized","Visible section and zone labels must meet the rendered small-text size floor",c.filter(e=>e.renderedFontPx<T).map(e=>Z(e,e.renderedFontPx,T)))),a.push(l("hierarchy-label-contrast-low","Visible section and zone labels must meet 4.5:1 contrast against their backing paint",c.flatMap(e=>{let n=b(e.ink,e.fill)??0;return n<I?[Z(e,n,I)]:[]}))),a.push(l("hierarchy-label-viewport-clipped","Visible overview hierarchy labels must remain fully inside the buyer viewport",r==="overview"?c.filter(e=>e.screenBox.x<0||e.screenBox.y<0||e.screenBox.x+e.screenBox.width>t.viewport.width||e.screenBox.y+e.screenBox.height>t.viewport.height).map(e=>Z(e)):[])),a.push(l("hierarchy-label-outside-section","Visible section labels must remain inside the filled section surface and outside holes",c.filter(e=>e.kind==="section"&&e.fitsContainer===!1).map(e=>Z(e))));let W=[];for(let e=0;e<c.length;e+=1)for(let n=0;n<e;n+=1)y(c[e].screenBox,c[n].screenBox)&&W.push(L(c[n].id,c[n].label,c[e].id,c[e].label));a.push(l("hierarchy-label-collision","Visible hierarchy labels must not overlap each other",W));let J=[];for(let e of c)for(let n of s)y(e.screenBox,n.screenBox)&&J.push(L(e.id,e.label,n.seatId,n.label));a.push(l("hierarchy-bookable-collision","Visible hierarchy labels must not overlap bookable labels",J)),a.push(l("free-text-undersized","Visible chart text must meet the rendered small-text size floor",u.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>ue(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),a.push(l("free-text-contrast-low","Visible chart text must meet 4.5:1 contrast against its measured background",u.flatMap(e=>{let n=b(e.ink,e.background)??0;return n<I?[ue(e,n,I)]:[]})));let q=[];for(let e=0;e<u.length;e+=1)for(let n=0;n<e;n+=1)y(u[e].screenBox,u[n].screenBox)&&q.push(L(u[n].objectId,u[n].text,u[e].objectId,u[e].text));a.push(l("free-text-collision","Visible chart text labels must not overlap each other",q));let ee=[];for(let e of u)for(let n of s)y(e.screenBox,n.screenBox)&&ee.push(L(e.objectId,e.text,n.seatId,n.label));a.push(l("free-text-bookable-collision","Visible chart text must not overlap bookable labels",ee));let te=[];for(let e of u)for(let n of c)y(e.screenBox,n.screenBox)&&te.push(L(e.objectId,e.text,n.id,n.label));a.push(l("free-text-hierarchy-collision","Visible chart text must not overlap hierarchy labels",te)),a.push(l("ga-contrast-low","Visible GA surfaces must maintain 3:1 graphical contrast with the canvas",p.flatMap(e=>{let n=b(e.effectiveBackground,t.canvasBackground)??0;return n<O?[{primaryId:e.areaId,primaryLabel:e.label,measured:Math.round(n*100)/100,minimum:O}]:[]})));let re=a.filter(e=>!!e);return{version:be,passed:re.length===0,state:r,targetCategoryKey:o,resolvedRules:["rendered-overview-label-size","rendered-overview-label-contrast","rendered-overview-label-collision","rendered-overview-hierarchy-viewport","rendered-overview-hierarchy-containment","rendered-overview-section-first-style","rendered-overview-ga-contrast",...r==="interaction"?["rendered-detail-label-viewport","rendered-detail-inventory","rendered-pointer-target","rendered-selected-held-taken-states","rendered-section-focus","rendered-category-filter"]:[]],viewport:t.viewport,canvasBackground:t.canvasBackground,effectiveScale:t.effectiveScale,rung:t.rung,inventory:{totalBookableUnits:t.totalBookableUnits,totalLabelledBookableUnits:t.totalLabelledBookableUnits,visibleBookableLabels:s.length,hiddenBookableLabels:t.hiddenLabels,visibleHierarchyLabels:c.length,visibleFreeTextLabels:u.length,visibleGAAreas:p.length},overviewStyle:t.overviewStyle,composition:{hierarchy:t.hierarchyLabels.filter(e=>e.role==="name").map(e=>({id:e.id,kind:e.kind,label:e.label,visible:e.visible})).sort((e,n)=>e.kind.localeCompare(n.kind)||e.id.localeCompare(n.id)),labelledObjects:t.freeTextLabels.map(e=>({objectId:e.objectId,kind:e.kind,text:e.text,visible:e.visible})).sort((e,n)=>e.objectId.localeCompare(n.objectId)||e.kind.localeCompare(n.kind)),gaAreas:t.gaAreas.map(e=>({areaId:e.areaId,label:e.label,categoryKey:e.categoryKey,...e.sectionId?{sectionId:e.sectionId}:{},visible:e.visible})).sort((e,n)=>e.areaId.localeCompare(n.areaId)),bookableSectionIds:[...new Set(t.labels.flatMap(e=>e.sectionId?[e.sectionId]:[]))].sort(),categoryKeys:[...new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)])].sort(),activeCategoryKeys:[...X].sort()},metrics:{minimumRenderedBookableLabelPx:h(s.map(e=>e.renderedFontPx)),minimumBookableLabelContrast:h(M),minimumRenderedHierarchyLabelPx:h(c.map(e=>e.renderedFontPx)),minimumHierarchyLabelContrast:h(C),minimumRenderedFreeTextPx:h(u.map(e=>e.renderedFontPx)),minimumFreeTextContrast:h(E),minimumGAContrast:h(de),minimumEffectivePointerTargetPx:h(_.map(e=>e.pointerTarget.effectiveMinimumPx)),selectedRingContrast:F==null?null:Math.round(F*100)/100},interaction:{applicable:{detail:d.length>0||x.length>0,pointer:d.length>0||x.length>0,held:d.length>=2,booked:d.length>=3,sectionFocus:d.some(e=>!!e.sectionId)||x.some(e=>!!e.sectionId),categoryFilter:new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)]).size>=2},selectedUnits:f.length,heldUnits:v.length,bookedUnits:w.length,activePointerTargets:_.length,focusedSectionId:t.focusedSectionId,focusBackdropVisible:t.focusBackdropVisible,categoryFilterKeys:t.categoryFilterKeys},findings:re}}0&&(module.exports={ACCESS_GLYPH_PATH,ACCESS_GLYPH_VIEWBOX,ACCESS_TYPE_GLYPH_PATHS,AUTHORED_LABEL_MIN_CONTRAST,BOOTH_LABEL_FONT_SIZE,DARK_BOOKABLE_LABEL_INK,DARK_NEUTRAL_SECTION_FILL,GA_CAPACITY_LABEL_FONT_SIZE,GA_FILL_OPACITY,GA_LABEL_FONT_SIZE,LARGE_TEXT_CONTRAST,LIGHT_BOOKABLE_LABEL_INK,LIGHT_NEUTRAL_SECTION_FILL,MIN_POINTER_TARGET_PX,MIN_VISIBLE_BOOKABLE_LABEL_PX,RENDERED_QUALITY_REPORT_VERSION,ROW_LABEL_FONT_SIZE,SEAT_LABEL_FONT_SIZE,SMALL_TEXT_CONTRAST,accessGlyphInk,accessGlyphPath,bookableMarkerLabel,compositeHexOver,inspectRenderedQualityEvidence,isBookableLabelLegibleAtScale,isLightFill,minimumTextContrast,neutralSectionFill,renderedTextContrast,stateAwareBookableLabelInk,summarizeLabelInkContrast});
@@ -1,7 +1,7 @@
1
- import { A as AccessibilityType } from '../../types-D6-wLa-m.cjs';
1
+ import { A as AccessibilityType } from '../../types-Dx4jA8aI.cjs';
2
2
  import { contrastRatioOrNull } from '../color.cjs';
3
- export { 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-BZsq3wDe.cjs';
4
- import '../../renderer-CBOo1OZk.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-CSHrmnHf.cjs';
4
+ import '../../renderer-Dn4Plcv9.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-D6-wLa-m.js';
1
+ import { A as AccessibilityType } from '../../types-Dx4jA8aI.js';
2
2
  import { contrastRatioOrNull } from '../color.js';
3
- export { 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-C5dQiq97.js';
4
- import '../../renderer-6sFRupj0.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-CfonzUpl.js';
4
+ import '../../renderer-C5avrVLy.js';
5
5
 
6
6
  /**
7
7
  * Rendering constants that quality inspection must agree with.
@@ -1 +1 @@
1
- import{a as C,b as D}from"../../chunk-O5UWBFUT.js";import{A,B,a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,k as c,l as d,m as g,n as h,o as i,p as j,q as k,r as l,s as n,t as q,u as s,v as u,w as v,x as w,y,z}from"../../chunk-FMZ6HLDH.js";import"../../chunk-JBOTRSMY.js";export{j as ACCESS_GLYPH_PATH,h as ACCESS_GLYPH_VIEWBOX,i as ACCESS_TYPE_GLYPH_PATHS,s as AUTHORED_LABEL_MIN_CONTRAST,e as BOOTH_LABEL_FONT_SIZE,b as DARK_BOOKABLE_LABEL_INK,z as DARK_NEUTRAL_SECTION_FILL,m as GA_CAPACITY_LABEL_FONT_SIZE,p as GA_FILL_OPACITY,f as GA_LABEL_FONT_SIZE,a as LARGE_TEXT_CONTRAST,c as LIGHT_BOOKABLE_LABEL_INK,y as LIGHT_NEUTRAL_SECTION_FILL,t as MIN_VISIBLE_BOOKABLE_LABEL_PX,C as RENDERED_QUALITY_REPORT_VERSION,r as ROW_LABEL_FONT_SIZE,o as SEAT_LABEL_FONT_SIZE,x as SMALL_TEXT_CONTRAST,v as accessGlyphInk,k as accessGlyphPath,l as bookableMarkerLabel,q as compositeHexOver,D as inspectRenderedQualityEvidence,g as isBookableLabelLegibleAtScale,w as isLightFill,d as minimumTextContrast,A as neutralSectionFill,n as renderedTextContrast,u as stateAwareBookableLabelInk,B as summarizeLabelInkContrast};
1
+ import{a as C,b as D,c as E}from"../../chunk-3L4M7L5I.js";import{A,B,a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,k as c,l as d,m as g,n as h,o as i,p as j,q as k,r as l,s as n,t as q,u as s,v as u,w as v,x as w,y,z}from"../../chunk-FMZ6HLDH.js";import"../../chunk-JBOTRSMY.js";export{j as ACCESS_GLYPH_PATH,h as ACCESS_GLYPH_VIEWBOX,i as ACCESS_TYPE_GLYPH_PATHS,s as AUTHORED_LABEL_MIN_CONTRAST,e as BOOTH_LABEL_FONT_SIZE,b as DARK_BOOKABLE_LABEL_INK,z as DARK_NEUTRAL_SECTION_FILL,m as GA_CAPACITY_LABEL_FONT_SIZE,p as GA_FILL_OPACITY,f as GA_LABEL_FONT_SIZE,a as LARGE_TEXT_CONTRAST,c as LIGHT_BOOKABLE_LABEL_INK,y as LIGHT_NEUTRAL_SECTION_FILL,D as MIN_POINTER_TARGET_PX,t as MIN_VISIBLE_BOOKABLE_LABEL_PX,C as RENDERED_QUALITY_REPORT_VERSION,r as ROW_LABEL_FONT_SIZE,o as SEAT_LABEL_FONT_SIZE,x as SMALL_TEXT_CONTRAST,v as accessGlyphInk,k as accessGlyphPath,l as bookableMarkerLabel,q as compositeHexOver,E as inspectRenderedQualityEvidence,g as isBookableLabelLegibleAtScale,w as isLightFill,d as minimumTextContrast,A as neutralSectionFill,n as renderedTextContrast,u as stateAwareBookableLabelInk,B as summarizeLabelInkContrast};
@@ -1 +1 @@
1
- "use strict";var i=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var E=(e,n)=>{for(var t in n)i(e,t,{get:n[t],enumerable:!0})},C=(e,n,t,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of x(n))!I.call(e,r)&&r!==t&&i(e,r,{get:()=>n[r],enumerable:!(a=v(n,r))||a.enumerable});return e};var Q=e=>C(i({},"__esModule",{value:!0}),e);var q={};E(q,{DECOR_STAMP_ICON_PATHS:()=>Z,DEFAULT_SHAPE_LINE_CAP:()=>b,DEFAULT_SHAPE_LINE_ENDING:()=>h,DEFAULT_SHAPE_LINE_JOIN:()=>m,SEAT_GLYPHS:()=>c,SEAT_GLYPH_DETAIL_MIN_PX:()=>oe,SEAT_GLYPH_INSET:()=>se,SEAT_GLYPH_ORDER:()=>B,SEAT_GLYPH_VIEWBOX:()=>ie,SHAPE_LINE_CAPS:()=>Y,SHAPE_LINE_ENDINGS:()=>U,SHAPE_LINE_JOINS:()=>j,VENUE_ICONS:()=>o,VENUE_ICON_GROUP_LABELS:()=>H,VENUE_ICON_GROUP_ORDER:()=>A,VENUE_ICON_KEYS:()=>R,VENUE_ICON_STROKE:()=>ae,VENUE_ICON_VIEWBOX:()=>te,buyerBackgroundImage:()=>f,buyerFacingChartDoc:()=>V,hasConflictingLegacyTrace:()=>P,isOpenShapeKind:()=>k,isPointShapeKind:()=>J,isSeatGlyphKind:()=>l,isVenueIconKey:()=>T,migrateLegacyBackgroundLayersInPlace:()=>G,resolveSeatGlyph:()=>F,resolvedShapeLineStyle:()=>W,seatGlyph:()=>p,seatGlyphFit:()=>K,seatGlyphLabel:()=>w,seatGlyphPath:()=>D,shapeArrowMetrics:()=>X,traceReferenceImage:()=>_,venueIcon:()=>M,venueIconPath:()=>N});module.exports=Q(q);function u(e){let n=e;return delete n.referenceScan,delete n.referenceInventorySource,delete n.referenceInventoryExclusion,delete n.referenceSource,delete n.referenceAnnotationSource,e}function _(e){return e.referenceImage??(e.backgroundImage?.assetId?e.backgroundImage:void 0)}function f(e){let n=e.backgroundImage;return n?.url&&!n.assetId?n:void 0}function d(e){let n=f(e);if(!n?.url)return;let{calibration:t,derivedScale:a,assetId:r,...S}=n;return S}function G(e){let n=t=>{let a=t.backgroundImage;a?.assetId&&(t.referenceImage||(t.referenceImage=a,t.backgroundImage=void 0))};n(e);for(let t of e.floors??[])n(t);return e}function g(e){let n={...e};return u(n),delete n.editor,n}function O(e){let n={...e};return delete n.referenceCategorySource,delete n.referenceDirectSeatImport,n}function V(e){let n=d(e),t=e.floors?.map(a=>({...a,objects:a.objects.map(g),referenceImage:void 0,backgroundImage:d(a)}));return{...e,categories:e.categories.map(O),objects:e.objects.map(g),referenceImage:void 0,venueSurveyRegistrations:void 0,backgroundImage:n,...t?{floors:t}:{}}}function P(e){return!!e.referenceImage?.assetId&&!!e.backgroundImage?.assetId&&e.referenceImage.assetId!==e.backgroundImage.assetId}var te=24,ae=2,H={facilities:"Facilities","food-drink":"Food & drink",navigation:"Getting around",accessibility:"Accessibility"},A=["facilities","food-drink","navigation","accessibility"],L="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:L},{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:L},{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"}],Z={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"},y=new Map(o.map(e=>[e.key,e]));function M(e){return e?y.get(e):void 0}function N(e){return M(e)?.path}function T(e){return typeof e=="string"&&y.has(e)}var R=o.map(e=>e.key);var ie=24,oe=16,se=.14,c=[{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}}],B=c.map(e=>e.key),s=new Map(c.map(e=>[e.key,e]));function p(e){return s.get(e)??s.get("circle")}function w(e){return p(e).label}function D(e){return p(e).path}function K(e,n){return{scale:n*2*(1-.14)/Math.max(e.width,e.height),centreX:e.x+e.width/2,centreY:e.y+e.height/2}}function l(e){return typeof e=="string"&&s.has(e)}function F(e,n){return l(e)?e:l(n?.seatGlyph)?n.seatGlyph:"circle"}var Y=["butt","round","square"],j=["miter","round","bevel"],U=["none","arrow"],b="round",m="round",h="none";function k(e){return e==="line"||e==="polyline"}function J(e){return e==="polygon"||k(e)}function W(e){return{lineCap:e.lineCap??b,lineJoin:e.lineJoin??m,startEnding:e.startEnding??h,endEnding:e.endEnding??h}}function X(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,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,shapeArrowMetrics,traceReferenceImage,venueIcon,venueIconPath});
1
+ "use strict";var i=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var E=(e,n)=>{for(var t in n)i(e,t,{get:n[t],enumerable:!0})},C=(e,n,t,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of x(n))!I.call(e,r)&&r!==t&&i(e,r,{get:()=>n[r],enumerable:!(a=v(n,r))||a.enumerable});return e};var Q=e=>C(i({},"__esModule",{value:!0}),e);var q={};E(q,{DECOR_STAMP_ICON_PATHS:()=>Z,DEFAULT_SHAPE_LINE_CAP:()=>b,DEFAULT_SHAPE_LINE_ENDING:()=>h,DEFAULT_SHAPE_LINE_JOIN:()=>m,SEAT_GLYPHS:()=>l,SEAT_GLYPH_DETAIL_MIN_PX:()=>oe,SEAT_GLYPH_INSET:()=>se,SEAT_GLYPH_ORDER:()=>B,SEAT_GLYPH_VIEWBOX:()=>ie,SHAPE_LINE_CAPS:()=>Y,SHAPE_LINE_ENDINGS:()=>j,SHAPE_LINE_JOINS:()=>U,VENUE_ICONS:()=>o,VENUE_ICON_GROUP_LABELS:()=>A,VENUE_ICON_GROUP_ORDER:()=>H,VENUE_ICON_KEYS:()=>R,VENUE_ICON_STROKE:()=>ae,VENUE_ICON_VIEWBOX:()=>te,buyerBackgroundImage:()=>f,buyerFacingChartDoc:()=>V,hasConflictingLegacyTrace:()=>P,isOpenShapeKind:()=>k,isPointShapeKind:()=>J,isSeatGlyphKind:()=>c,isVenueIconKey:()=>T,migrateLegacyBackgroundLayersInPlace:()=>G,resolveSeatGlyph:()=>F,resolvedShapeLineStyle:()=>W,seatGlyph:()=>p,seatGlyphFit:()=>K,seatGlyphLabel:()=>w,seatGlyphPath:()=>D,shapeArrowMetrics:()=>X,traceReferenceImage:()=>_,venueIcon:()=>M,venueIconPath:()=>N});module.exports=Q(q);function u(e){let n=e;return delete n.referenceScan,delete n.referenceInventorySource,delete n.referenceInventoryExclusion,delete n.referenceSource,delete n.referenceAnnotationSource,e}function _(e){return e.referenceImage??(e.backgroundImage?.assetId?e.backgroundImage:void 0)}function f(e){let n=e.backgroundImage;return n?.url&&!n.assetId?n:void 0}function d(e){let n=f(e);if(!n?.url)return;let{calibration:t,derivedScale:a,assetId:r,...S}=n;return S}function G(e){let n=t=>{let a=t.backgroundImage;a?.assetId&&(t.referenceImage||(t.referenceImage=a,t.backgroundImage=void 0))};n(e);for(let t of e.floors??[])n(t);return e}function g(e){let n={...e};return u(n),delete n.editor,n}function O(e){let n={...e};return delete n.referenceCategorySource,delete n.referenceDirectSeatImport,n}function V(e){let n=d(e),t=e.floors?.map(a=>({...a,objects:a.objects.map(g),referenceImage:void 0,backgroundImage:d(a)}));return{...e,categories:e.categories.map(O),objects:e.objects.map(g),referenceImage:void 0,venueSurveyRegistrations:void 0,backgroundImage:n,...t?{floors:t}:{}}}function P(e){return!!e.referenceImage?.assetId&&!!e.backgroundImage?.assetId&&e.referenceImage.assetId!==e.backgroundImage.assetId}var te=24,ae=2,A={facilities:"Facilities","food-drink":"Food & drink",navigation:"Getting around",accessibility:"Accessibility"},H=["facilities","food-drink","navigation","accessibility"],L="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:L},{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:L},{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"}],Z={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"},y=new Map(o.map(e=>[e.key,e]));function M(e){return e?y.get(e):void 0}function N(e){return M(e)?.path}function T(e){return typeof e=="string"&&y.has(e)}var R=o.map(e=>e.key);var ie=24,oe=16,se=.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}}],B=l.map(e=>e.key),s=new Map(l.map(e=>[e.key,e]));function p(e){return s.get(e)??s.get("circle")}function w(e){return p(e).label}function D(e){return p(e).path}function K(e,n){return{scale:n*2*(1-.14)/Math.max(e.width,e.height),centreX:e.x+e.width/2,centreY:e.y+e.height/2}}function c(e){return typeof e=="string"&&s.has(e)}function F(e,n){return c(e)?e:c(n?.seatGlyph)?n.seatGlyph:"circle"}var Y=["butt","round","square"],U=["miter","round","bevel"],j=["none","arrow"],b="round",m="round",h="none";function k(e){return e==="line"||e==="polyline"}function J(e){return e==="polygon"||k(e)}function W(e){return{lineCap:e.lineCap??b,lineJoin:e.lineJoin??m,startEnding:e.startEnding??h,endEnding:e.endEnding??h}}function X(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,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,shapeArrowMetrics,traceReferenceImage,venueIcon,venueIconPath});
@@ -1,4 +1,4 @@
1
- import { C as ChartDoc, l as Floor, o as ChartReferenceImage, d as SeatGlyphKind, p as Category, q as ShapeLineCap, r as ShapeLineEnding, s as ShapeLineJoin, t as ShapeObject } from '../../types-D6-wLa-m.cjs';
1
+ import { C as ChartDoc, l as Floor, o as ChartReferenceImage, d as SeatGlyphKind, p as Category, q as ShapeLineCap, r as ShapeLineEnding, s as ShapeLineJoin, t as ShapeObject } from '../../types-Dx4jA8aI.cjs';
2
2
 
3
3
  type BackgroundOwner = Pick<ChartDoc, 'referenceImage' | 'backgroundImage'> | Pick<Floor, 'referenceImage' | 'backgroundImage'>;
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { C as ChartDoc, l as Floor, o as ChartReferenceImage, d as SeatGlyphKind, p as Category, q as ShapeLineCap, r as ShapeLineEnding, s as ShapeLineJoin, t as ShapeObject } from '../../types-D6-wLa-m.js';
1
+ import { C as ChartDoc, l as Floor, o as ChartReferenceImage, d as SeatGlyphKind, p as Category, q as ShapeLineCap, r as ShapeLineEnding, s as ShapeLineJoin, t as ShapeObject } from '../../types-Dx4jA8aI.js';
2
2
 
3
3
  type BackgroundOwner = Pick<ChartDoc, 'referenceImage' | 'backgroundImage'> | Pick<Floor, 'referenceImage' | 'backgroundImage'>;
4
4
  /**