@seatlayer/core 0.61.0 → 0.63.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 (67) hide show
  1. package/dist/{categoryInventory-B-0p5PBr.d.ts → categoryInventory-C3RogGHF.d.ts} +1 -1
  2. package/dist/{categoryInventory-DjFHXtp6.d.cts → categoryInventory-DEgsjxCC.d.cts} +1 -1
  3. package/dist/{chunk-IZTHA3X2.js → chunk-DFNYIQY3.js} +1 -1
  4. package/dist/chunk-GXMGOWKB.js +1 -0
  5. package/dist/chunk-K7GN3IOW.js +1 -0
  6. package/dist/{chunk-HHM3PB66.js → chunk-LVUGIKHG.js} +1 -1
  7. package/dist/{chunk-VOJMGPDK.js → chunk-QHWOX6PN.js} +1 -1
  8. package/dist/chunk-RZLIIQDP.js +1 -0
  9. package/dist/{chunk-XU73MULJ.js → chunk-UCLIUNHN.js} +1 -1
  10. package/dist/chunk-UL5OIGIF.js +1 -0
  11. package/dist/{chunk-ATFAQDPR.js → chunk-YPVY3Z5S.js} +1 -1
  12. package/dist/core/chart-ops/index.cjs +1 -1
  13. package/dist/core/chart-ops/index.d.cts +9 -5
  14. package/dist/core/chart-ops/index.d.ts +9 -5
  15. package/dist/core/chart-ops/index.js +1 -1
  16. package/dist/core/inventory/index.cjs +1 -1
  17. package/dist/core/inventory/index.d.cts +4 -4
  18. package/dist/core/inventory/index.d.ts +4 -4
  19. package/dist/core/inventory/index.js +1 -1
  20. package/dist/core/layout/index.cjs +1 -1
  21. package/dist/core/layout/index.d.cts +4 -4
  22. package/dist/core/layout/index.d.ts +4 -4
  23. package/dist/core/layout/index.js +1 -1
  24. package/dist/core/quality/index.cjs +1 -1
  25. package/dist/core/quality/index.d.cts +12 -5
  26. package/dist/core/quality/index.d.ts +12 -5
  27. package/dist/core/quality/index.js +1 -1
  28. package/dist/core/render-assets/index.cjs +1 -1
  29. package/dist/core/render-assets/index.d.cts +88 -2
  30. package/dist/core/render-assets/index.d.ts +88 -2
  31. package/dist/core/render-assets/index.js +1 -1
  32. package/dist/core/seatConfidence.d.cts +1 -1
  33. package/dist/core/seatConfidence.d.ts +1 -1
  34. package/dist/core/sections/index.cjs +1 -1
  35. package/dist/core/sections/index.d.cts +5 -5
  36. package/dist/core/sections/index.d.ts +5 -5
  37. package/dist/core/sections/index.js +1 -1
  38. package/dist/index.cjs +1 -1
  39. package/dist/index.d.cts +34 -10
  40. package/dist/index.d.ts +34 -10
  41. package/dist/index.js +1 -1
  42. package/dist/{labeling-iVwhgoip.d.cts → labeling-DRFC35VK.d.cts} +5 -2
  43. package/dist/{labeling-BPCTQfDG.d.ts → labeling-DTHo03rf.d.ts} +5 -2
  44. package/dist/{layout-D-R46h1m.d.ts → layout-BXB8Rf4n.d.ts} +10 -4
  45. package/dist/{layout-Vk2ZGdMS.d.cts → layout-DRB0-NGc.d.cts} +10 -4
  46. package/dist/{renderedQuality-CsXNQCCH.d.ts → renderedQuality-BjSBiqkN.d.ts} +1 -1
  47. package/dist/{renderedQuality-h9RvUWMo.d.cts → renderedQuality-DK7IGCju.d.cts} +1 -1
  48. package/dist/{renderer-QnB3a1yh.d.cts → renderer-BNzVBOBW.d.cts} +11 -1
  49. package/dist/{renderer-Bo9JzqMA.d.ts → renderer-Bhc5CgOS.d.ts} +11 -1
  50. package/dist/{sections-9_Ka3i-z.d.ts → sections-BrQV1WzI.d.ts} +1 -1
  51. package/dist/{sections-Dmjtj1BQ.d.cts → sections-D2bxgVgg.d.cts} +1 -1
  52. package/dist/{segmentedRowModel-s157HmRp.d.cts → segmentedRowModel-BQYSdf7k.d.cts} +1 -1
  53. package/dist/{segmentedRowModel-CO6Jogaa.d.ts → segmentedRowModel-Cl3X8SKt.d.ts} +1 -1
  54. package/dist/{ticketRestrictions-EJTEWPGN.d.ts → ticketRestrictions-B9WkJ6YG.d.ts} +2 -2
  55. package/dist/{ticketRestrictions-DetdPbsL.d.cts → ticketRestrictions-QBvY3Zi7.d.cts} +2 -2
  56. package/dist/{types-Db9rXT14.d.cts → types-DmgX-iuD.d.cts} +48 -1
  57. package/dist/{types-Db9rXT14.d.ts → types-DmgX-iuD.d.ts} +48 -1
  58. package/dist/view3d/crossfade/panorama.d.cts +1 -1
  59. package/dist/view3d/crossfade/panorama.d.ts +1 -1
  60. package/dist/view3d/index.cjs +102 -38
  61. package/dist/view3d/index.d.cts +4 -2
  62. package/dist/view3d/index.d.ts +4 -2
  63. package/dist/view3d/index.js +106 -42
  64. package/package.json +1 -1
  65. package/dist/chunk-CNCFI5RT.js +0 -1
  66. package/dist/chunk-P2NJ6UO6.js +0 -1
  67. package/dist/chunk-VI2CLV3Y.js +0 -1
@@ -1,4 +1,4 @@
1
- import { C as ChartDoc, F as Floor, m as ChartReferenceImage, n as ShapeLineCap, o as ShapeLineEnding, p as ShapeLineJoin, q as ShapeObject } from '../../types-Db9rXT14.cjs';
1
+ import { C as ChartDoc, F as Floor, n as ChartReferenceImage, a as SeatGlyphKind, o as Category, p as ShapeLineCap, q as ShapeLineEnding, r as ShapeLineJoin, s as ShapeObject } from '../../types-DmgX-iuD.cjs';
2
2
 
3
3
  type BackgroundOwner = Pick<ChartDoc, 'referenceImage' | 'backgroundImage'> | Pick<Floor, 'referenceImage' | 'backgroundImage'>;
4
4
  /**
@@ -67,6 +67,92 @@ declare function isVenueIconKey(key: unknown): key is string;
67
67
  /** Every valid registry key (for MCP enum + validation messages). */
68
68
  declare const VENUE_ICON_KEYS: string[];
69
69
 
70
+ /** Authored extent of a glyph's ink inside the viewBox. */
71
+ interface SeatGlyphBounds {
72
+ x: number;
73
+ y: number;
74
+ width: number;
75
+ height: number;
76
+ }
77
+ type SeatGlyphGroup = 'general' | 'fixed' | 'flexible' | 'premium';
78
+ interface SeatGlyph {
79
+ /** Stable registry key persisted as `Category.seatGlyph` / `SeatOverride.glyph`. */
80
+ key: SeatGlyphKind;
81
+ /** Plain-language name (button label, tooltip, accessible name). Never "icon". */
82
+ label: string;
83
+ /** Compact picker label. Authored explicitly; never derived by trimming `label`. */
84
+ shortLabel: string;
85
+ /** Short, visible venue examples that explain when this shape is useful. */
86
+ useCase: string;
87
+ /** Product grouping for picker organisation and future filtering. */
88
+ group: SeatGlyphGroup;
89
+ /**
90
+ * Filled SVG path `d` on a 0 0 24 24 viewBox, or `null` for the circle, which
91
+ * every renderer already draws natively (and which stays the LOD fallback).
92
+ */
93
+ path: string | null;
94
+ /**
95
+ * The rectangle the glyph's ink actually occupies inside the viewBox — never
96
+ * the viewBox itself, because the glyphs do not fill it equally (the
97
+ * bench is 23 units wide, the stool 20). Renderers fit THIS box to the seat,
98
+ * so a bench and a stool carry the same visual weight beside a circle.
99
+ */
100
+ bounds: SeatGlyphBounds | null;
101
+ }
102
+ /** The viewBox side length every seat glyph path is authored against. */
103
+ declare const SEAT_GLYPH_VIEWBOX = 24;
104
+ /**
105
+ * Smallest on-screen seat diameter (px) that still shows its glyph. Below this
106
+ * the chair silhouettes stop being distinguishable and every seat falls back to
107
+ * the plain circle — the same "simplify when small" rule the seat number and the
108
+ * accessibility mark already follow. Seat NUMBERS keep their own independent LOD.
109
+ *
110
+ * Chosen by rendering the catalog at 12/14/16/18px (owner look-pass, 2026-08-20).
111
+ * At 12 and 14 a chair is a smudge and a row of them is noise — plain dots read
112
+ * strictly better there. 16 is the first size at which every glyph, the bench
113
+ * and the stool included, is identifiable as itself.
114
+ */
115
+ declare const SEAT_GLYPH_DETAIL_MIN_PX = 16;
116
+ /**
117
+ * How much smaller than the seat a glyph's own bounding box is drawn.
118
+ *
119
+ * A chair has square shoulders and fills the corners a circle leaves empty, so
120
+ * matching its box to the seat diameter makes it out-weigh the dots beside it.
121
+ * 14% off the widest axis is where a mixed row — a circle category next to a
122
+ * chair category — reads with even visual weight (measured at 18px and 24px,
123
+ * owner look-pass 2026-08-20). This scales ARTWORK only: SEAT_RADIUS, the seat's
124
+ * geometry and its circular hit area are untouched.
125
+ */
126
+ declare const SEAT_GLYPH_INSET = 0.14;
127
+ declare const SEAT_GLYPHS: SeatGlyph[];
128
+ /** Registry order — also the order the pickers show. Circle is always first. */
129
+ declare const SEAT_GLYPH_ORDER: SeatGlyphKind[];
130
+ declare function seatGlyph(kind: SeatGlyphKind | undefined): SeatGlyph;
131
+ /** Plain-language name, for labels and tooltips. */
132
+ declare function seatGlyphLabel(kind: SeatGlyphKind | undefined): string;
133
+ /** Authored path data, or null for the circle (drawn natively everywhere). */
134
+ declare function seatGlyphPath(kind: SeatGlyphKind | undefined): string | null;
135
+ /**
136
+ * How a glyph is placed on a seat of the given radius: fit its own ink box into
137
+ * the inset seat diameter and centre it. One rule, so the Designer canvas, the
138
+ * buyer map and the picker chips all size a glyph identically.
139
+ */
140
+ declare function seatGlyphFit(bounds: SeatGlyphBounds, radius: number): {
141
+ scale: number;
142
+ centreX: number;
143
+ centreY: number;
144
+ };
145
+ declare function isSeatGlyphKind(value: unknown): value is SeatGlyphKind;
146
+ /**
147
+ * The one resolution rule, shared by the Designer canvas, the buyer renderer and
148
+ * the panels: an explicit per-seat override wins, otherwise the seat's effective
149
+ * category decides, otherwise a plain circle.
150
+ *
151
+ * An explicit `'circle'` override is meaningful — it pins one seat back to a dot
152
+ * inside a category that draws chairs — so only an ABSENT override falls through.
153
+ */
154
+ declare function resolveSeatGlyph(override: SeatGlyphKind | undefined, category: Pick<Category, 'seatGlyph'> | undefined): SeatGlyphKind;
155
+
70
156
  declare const SHAPE_LINE_CAPS: readonly ["butt", "round", "square"];
71
157
  declare const SHAPE_LINE_JOINS: readonly ["miter", "round", "bevel"];
72
158
  declare const SHAPE_LINE_ENDINGS: readonly ["none", "arrow"];
@@ -96,4 +182,4 @@ declare function shapeArrowMetrics(strokeWidth: number): {
96
182
  pointerWidth: number;
97
183
  };
98
184
 
99
- export { DECOR_STAMP_ICON_PATHS, DEFAULT_SHAPE_LINE_CAP, DEFAULT_SHAPE_LINE_ENDING, DEFAULT_SHAPE_LINE_JOIN, 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, type VenueIcon, type VenueIconGroup, buyerBackgroundImage, buyerFacingChartDoc, hasConflictingLegacyTrace, isOpenShapeKind, isPointShapeKind, isVenueIconKey, migrateLegacyBackgroundLayersInPlace, resolvedShapeLineStyle, shapeArrowMetrics, traceReferenceImage, venueIcon, venueIconPath };
185
+ export { 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, type SeatGlyph, type SeatGlyphBounds, type SeatGlyphGroup, VENUE_ICONS, VENUE_ICON_GROUP_LABELS, VENUE_ICON_GROUP_ORDER, VENUE_ICON_KEYS, VENUE_ICON_STROKE, VENUE_ICON_VIEWBOX, type VenueIcon, type VenueIconGroup, 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, F as Floor, m as ChartReferenceImage, n as ShapeLineCap, o as ShapeLineEnding, p as ShapeLineJoin, q as ShapeObject } from '../../types-Db9rXT14.js';
1
+ import { C as ChartDoc, F as Floor, n as ChartReferenceImage, a as SeatGlyphKind, o as Category, p as ShapeLineCap, q as ShapeLineEnding, r as ShapeLineJoin, s as ShapeObject } from '../../types-DmgX-iuD.js';
2
2
 
3
3
  type BackgroundOwner = Pick<ChartDoc, 'referenceImage' | 'backgroundImage'> | Pick<Floor, 'referenceImage' | 'backgroundImage'>;
4
4
  /**
@@ -67,6 +67,92 @@ declare function isVenueIconKey(key: unknown): key is string;
67
67
  /** Every valid registry key (for MCP enum + validation messages). */
68
68
  declare const VENUE_ICON_KEYS: string[];
69
69
 
70
+ /** Authored extent of a glyph's ink inside the viewBox. */
71
+ interface SeatGlyphBounds {
72
+ x: number;
73
+ y: number;
74
+ width: number;
75
+ height: number;
76
+ }
77
+ type SeatGlyphGroup = 'general' | 'fixed' | 'flexible' | 'premium';
78
+ interface SeatGlyph {
79
+ /** Stable registry key persisted as `Category.seatGlyph` / `SeatOverride.glyph`. */
80
+ key: SeatGlyphKind;
81
+ /** Plain-language name (button label, tooltip, accessible name). Never "icon". */
82
+ label: string;
83
+ /** Compact picker label. Authored explicitly; never derived by trimming `label`. */
84
+ shortLabel: string;
85
+ /** Short, visible venue examples that explain when this shape is useful. */
86
+ useCase: string;
87
+ /** Product grouping for picker organisation and future filtering. */
88
+ group: SeatGlyphGroup;
89
+ /**
90
+ * Filled SVG path `d` on a 0 0 24 24 viewBox, or `null` for the circle, which
91
+ * every renderer already draws natively (and which stays the LOD fallback).
92
+ */
93
+ path: string | null;
94
+ /**
95
+ * The rectangle the glyph's ink actually occupies inside the viewBox — never
96
+ * the viewBox itself, because the glyphs do not fill it equally (the
97
+ * bench is 23 units wide, the stool 20). Renderers fit THIS box to the seat,
98
+ * so a bench and a stool carry the same visual weight beside a circle.
99
+ */
100
+ bounds: SeatGlyphBounds | null;
101
+ }
102
+ /** The viewBox side length every seat glyph path is authored against. */
103
+ declare const SEAT_GLYPH_VIEWBOX = 24;
104
+ /**
105
+ * Smallest on-screen seat diameter (px) that still shows its glyph. Below this
106
+ * the chair silhouettes stop being distinguishable and every seat falls back to
107
+ * the plain circle — the same "simplify when small" rule the seat number and the
108
+ * accessibility mark already follow. Seat NUMBERS keep their own independent LOD.
109
+ *
110
+ * Chosen by rendering the catalog at 12/14/16/18px (owner look-pass, 2026-08-20).
111
+ * At 12 and 14 a chair is a smudge and a row of them is noise — plain dots read
112
+ * strictly better there. 16 is the first size at which every glyph, the bench
113
+ * and the stool included, is identifiable as itself.
114
+ */
115
+ declare const SEAT_GLYPH_DETAIL_MIN_PX = 16;
116
+ /**
117
+ * How much smaller than the seat a glyph's own bounding box is drawn.
118
+ *
119
+ * A chair has square shoulders and fills the corners a circle leaves empty, so
120
+ * matching its box to the seat diameter makes it out-weigh the dots beside it.
121
+ * 14% off the widest axis is where a mixed row — a circle category next to a
122
+ * chair category — reads with even visual weight (measured at 18px and 24px,
123
+ * owner look-pass 2026-08-20). This scales ARTWORK only: SEAT_RADIUS, the seat's
124
+ * geometry and its circular hit area are untouched.
125
+ */
126
+ declare const SEAT_GLYPH_INSET = 0.14;
127
+ declare const SEAT_GLYPHS: SeatGlyph[];
128
+ /** Registry order — also the order the pickers show. Circle is always first. */
129
+ declare const SEAT_GLYPH_ORDER: SeatGlyphKind[];
130
+ declare function seatGlyph(kind: SeatGlyphKind | undefined): SeatGlyph;
131
+ /** Plain-language name, for labels and tooltips. */
132
+ declare function seatGlyphLabel(kind: SeatGlyphKind | undefined): string;
133
+ /** Authored path data, or null for the circle (drawn natively everywhere). */
134
+ declare function seatGlyphPath(kind: SeatGlyphKind | undefined): string | null;
135
+ /**
136
+ * How a glyph is placed on a seat of the given radius: fit its own ink box into
137
+ * the inset seat diameter and centre it. One rule, so the Designer canvas, the
138
+ * buyer map and the picker chips all size a glyph identically.
139
+ */
140
+ declare function seatGlyphFit(bounds: SeatGlyphBounds, radius: number): {
141
+ scale: number;
142
+ centreX: number;
143
+ centreY: number;
144
+ };
145
+ declare function isSeatGlyphKind(value: unknown): value is SeatGlyphKind;
146
+ /**
147
+ * The one resolution rule, shared by the Designer canvas, the buyer renderer and
148
+ * the panels: an explicit per-seat override wins, otherwise the seat's effective
149
+ * category decides, otherwise a plain circle.
150
+ *
151
+ * An explicit `'circle'` override is meaningful — it pins one seat back to a dot
152
+ * inside a category that draws chairs — so only an ABSENT override falls through.
153
+ */
154
+ declare function resolveSeatGlyph(override: SeatGlyphKind | undefined, category: Pick<Category, 'seatGlyph'> | undefined): SeatGlyphKind;
155
+
70
156
  declare const SHAPE_LINE_CAPS: readonly ["butt", "round", "square"];
71
157
  declare const SHAPE_LINE_JOINS: readonly ["miter", "round", "bevel"];
72
158
  declare const SHAPE_LINE_ENDINGS: readonly ["none", "arrow"];
@@ -96,4 +182,4 @@ declare function shapeArrowMetrics(strokeWidth: number): {
96
182
  pointerWidth: number;
97
183
  };
98
184
 
99
- export { DECOR_STAMP_ICON_PATHS, DEFAULT_SHAPE_LINE_CAP, DEFAULT_SHAPE_LINE_ENDING, DEFAULT_SHAPE_LINE_JOIN, 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, type VenueIcon, type VenueIconGroup, buyerBackgroundImage, buyerFacingChartDoc, hasConflictingLegacyTrace, isOpenShapeKind, isPointShapeKind, isVenueIconKey, migrateLegacyBackgroundLayersInPlace, resolvedShapeLineStyle, shapeArrowMetrics, traceReferenceImage, venueIcon, venueIconPath };
185
+ export { 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, type SeatGlyph, type SeatGlyphBounds, type SeatGlyphGroup, VENUE_ICONS, VENUE_ICON_GROUP_LABELS, VENUE_ICON_GROUP_ORDER, VENUE_ICON_KEYS, VENUE_ICON_STROKE, VENUE_ICON_VIEWBOX, type VenueIcon, type VenueIconGroup, buyerBackgroundImage, buyerFacingChartDoc, hasConflictingLegacyTrace, isOpenShapeKind, isPointShapeKind, isSeatGlyphKind, isVenueIconKey, migrateLegacyBackgroundLayersInPlace, resolveSeatGlyph, resolvedShapeLineStyle, seatGlyph, seatGlyphFit, seatGlyphLabel, seatGlyphPath, shapeArrowMetrics, traceReferenceImage, venueIcon, venueIconPath };
@@ -1 +1 @@
1
- import{a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,k as c,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}from"../../chunk-DNGP2HDT.js";export{c as DECOR_STAMP_ICON_PATHS,n as DEFAULT_SHAPE_LINE_CAP,s as DEFAULT_SHAPE_LINE_ENDING,q as DEFAULT_SHAPE_LINE_JOIN,j as SHAPE_LINE_CAPS,l as SHAPE_LINE_ENDINGS,k as SHAPE_LINE_JOINS,b as VENUE_ICONS,x as VENUE_ICON_GROUP_LABELS,a as VENUE_ICON_GROUP_ORDER,i as VENUE_ICON_KEYS,t as VENUE_ICON_STROKE,p as VENUE_ICON_VIEWBOX,r as buyerBackgroundImage,f as buyerFacingChartDoc,m as hasConflictingLegacyTrace,u as isOpenShapeKind,v as isPointShapeKind,h as isVenueIconKey,e as migrateLegacyBackgroundLayersInPlace,w as resolvedShapeLineStyle,y as shapeArrowMetrics,o as traceReferenceImage,d as venueIcon,g as venueIconPath};
1
+ import{a as o,b as r,c as e,d as f,e as m,f as k,g as l,h as n,i as q,j as s,k as u,l as v,m as w,n as y,o as z,p as A,q as B,r as C,s as D,t as E,u as F,v as G,w as H,x as I,y as J}from"../../chunk-DNGP2HDT.js";import{a as p,b as t,c as x,d as a,e as b,f as c,g as d,h as g,i as h,j as i,k as j}from"../../chunk-UL5OIGIF.js";export{u as DECOR_STAMP_ICON_PATHS,D as DEFAULT_SHAPE_LINE_CAP,F as DEFAULT_SHAPE_LINE_ENDING,E as DEFAULT_SHAPE_LINE_JOIN,a as SEAT_GLYPHS,t as SEAT_GLYPH_DETAIL_MIN_PX,x as SEAT_GLYPH_INSET,b as SEAT_GLYPH_ORDER,p as SEAT_GLYPH_VIEWBOX,A as SHAPE_LINE_CAPS,C as SHAPE_LINE_ENDINGS,B as SHAPE_LINE_JOINS,s as VENUE_ICONS,n as VENUE_ICON_GROUP_LABELS,q as VENUE_ICON_GROUP_ORDER,z as VENUE_ICON_KEYS,l as VENUE_ICON_STROKE,k as VENUE_ICON_VIEWBOX,r as buyerBackgroundImage,f as buyerFacingChartDoc,m as hasConflictingLegacyTrace,G as isOpenShapeKind,H as isPointShapeKind,i as isSeatGlyphKind,y as isVenueIconKey,e as migrateLegacyBackgroundLayersInPlace,j as resolveSeatGlyph,I as resolvedShapeLineStyle,c as seatGlyph,h as seatGlyphFit,d as seatGlyphLabel,g as seatGlyphPath,J as shapeArrowMetrics,o as traceReferenceImage,v as venueIcon,w as venueIconPath};
@@ -1,4 +1,4 @@
1
- import { g as ResolvedSeatConfidenceEvidence } from '../types-Db9rXT14.cjs';
1
+ import { h as ResolvedSeatConfidenceEvidence } from '../types-DmgX-iuD.cjs';
2
2
 
3
3
  interface SeatConfidenceDisclosure {
4
4
  headline: string;
@@ -1,4 +1,4 @@
1
- import { g as ResolvedSeatConfidenceEvidence } from '../types-Db9rXT14.js';
1
+ import { h as ResolvedSeatConfidenceEvidence } from '../types-DmgX-iuD.js';
2
2
 
3
3
  interface SeatConfidenceDisclosure {
4
4
  headline: string;
@@ -1 +1 @@
1
- "use strict";var ae=Object.defineProperty;var tt=Object.getOwnPropertyDescriptor;var nt=Object.getOwnPropertyNames;var ot=Object.prototype.hasOwnProperty;var rt=(e,t)=>{for(var n in t)ae(e,n,{get:t[n],enumerable:!0})},it=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of nt(t))!ot.call(e,r)&&r!==n&&ae(e,r,{get:()=>t[r],enumerable:!(o=tt(t,r))||o.enumerable});return e};var st=e=>it(ae({},"__esModule",{value:!0}),e);var mn={};rt(mn,{DEFAULT_SECTION_CORNER_SMOOTHING:()=>Gt,MAX_EDGE_SAGITTA_RATIO:()=>De,TIER_HEIGHT_M:()=>ge,UNGROUPED_ID:()=>ce,applyHidden:()=>pn,arcLevelAt:()=>gt,bearingDeg:()=>Re,buildSectionRake:()=>Ct,computeSections:()=>Qe,distanceToPolyline:()=>ue,fitBowlProfile:()=>xt,fitCircle:()=>ee,hiddenObjectIds:()=>et,indexLabel:()=>Oe,isSectionHidden:()=>Ze,logicalNumberingRow:()=>Te,relabelRows:()=>vt,resolveSection:()=>dt,reverseSectionOutlinePath:()=>Vt,sampleSectionOutlinePath:()=>Ft,seatConfidenceDisclosure:()=>Tt,seatDisplayLabel:()=>pe,seatInventoryLabel:()=>he,seatLabelPart:()=>ie,sectionCornerSmoothingPath:()=>zt,sectionGeometry:()=>Ue,sectionOutlinePathFrom:()=>Ne,sectionPathSegmentEnd:()=>Dt,toBijectiveBase:()=>fe,toLetters:()=>oe,toRoman:()=>de,transformSectionOutlinePath:()=>Le,translateSectionOutlinePath:()=>Bt,validSectionOutlinePath:()=>be});module.exports=st(mn);function Pe(e){let t=e.length;return t<=3?[...e]:[e[Math.floor(t*.25)],e[Math.floor(t*.5)],e[Math.floor(t*.75)]]}function ue(e,t,n){if(!e.length)return 1/0;if(e.length===1)return Math.hypot(t-e[0].x,n-e[0].y);let o=1/0;for(let r=0;r+1<e.length;r++){let i=e[r],s=e[r+1],f=s.x-i.x,u=s.y-i.y,m=f*f+u*u,c=m>1e-12?((t-i.x)*f+(n-i.y)*u)/m:0;c<0?c=0:c>1&&(c=1);let b=Math.hypot(t-(i.x+c*f),n-(i.y+c*u));b<o&&(o=b)}return o}function ct(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 Ie(e,t){return Math.hypot(e.cx-t.cx,e.cy-t.cy)-e.r-t.r}function le(e,t){let n=1/0;for(let o of Pe(e)){let r=ue(t,o.x,o.y);r<n&&(n=r)}for(let o of Pe(t)){let r=ue(e,o.x,o.y);r<n&&(n=r)}return n}function at(e,t){if(e.length<3)return{pts:e,seatIndices:t};let n=0,o=0;for(let c of e)n+=c.x,o+=c.y;n/=e.length,o/=e.length;let r=-1,i=e[0];for(let c of e){let b=Math.hypot(c.x-n,c.y-o);b>r&&(r=b,i=c)}let s=i.x-n,f=i.y-o,u=Math.hypot(s,f);u>1e-9?(s/=u,f/=u):(s=1,f=0);let m=e.map((c,b)=>({p:c,i:b,t:(c.x-n)*s+(c.y-o)*f})).sort((c,b)=>c.t-b.t);return{pts:m.map(c=>c.p),seatIndices:m.map(c=>t[c.i])}}function ee(e){let t=e.length;if(t<3)return null;let n=0,o=0;for(let g of e)n+=g.x,o+=g.y;n/=t,o/=t;let r=0,i=0,s=0,f=0,u=0,m=0,c=0;for(let g of e){let y=g.x-n,a=g.y-o;r+=y*y,s+=a*a,i+=y*a,f+=y*y*y,u+=a*a*a,m+=y*a*a,c+=a*y*y}let b=r*s-i*i;if(Math.abs(b)<1e-9)return null;let d=(f+m)/2,l=(u+c)/2,p=(d*s-l*i)/b,A=(l*r-d*i)/b,h=p+n,x=A+o;return!Number.isFinite(h)||!Number.isFinite(x)?null:{cx:h,cy:x}}var lt=.15;function ut(e){if(e.length<2)return null;let t=e.map(g=>{let y=0,a=0;for(let I of g.pts)y+=I.x,a+=I.y;return{x:y/g.pts.length,y:a/g.pts.length}}),n=0,o=0;for(let g of t)n+=g.x,o+=g.y;n/=t.length,o/=t.length;let r=0,i=0,s=0;for(let g of t){let y=g.x-n,a=g.y-o;r+=y*y,i+=y*a,s+=a*a}let f=r+s,u=r*s-i*i,m=f/2+Math.sqrt(Math.max(0,f*f/4-u)),c,b;Math.abs(i)>1e-12?(c=m-s,b=i):r>=s?(c=1,b=0):(c=0,b=1);let d=Math.hypot(c,b);if(!(d>1e-12))return null;c/=d,b/=d;let l=1/0,p=-1/0,A=[];for(let g of e){let y=1/0,a=-1/0;for(let I of g.pts){let S=I.x*c+I.y*b;S<y&&(y=S),S>a&&(a=S),S<l&&(l=S),S>p&&(p=S)}A.push(a-y)}let h=p-l;return h>1e-9?(A.sort((g,y)=>g-y),A[Math.min(A.length-1,Math.floor(A.length*.9))]/h<=ft?{x:c,y:b}:null):null}var ft=.35;function dt(e,t,n,o){let r=new Map;for(let h of n){let x=t[h],g=x.rowId||`__seat-${h}`,y=r.get(g);y||(y={pts:[],idx:[]},r.set(g,y)),y.pts.push({x:x.x,y:x.y}),y.idx.push(h)}if(!r.size)return{sectionId:e,rows:[],blockCount:0};let i=[];for(let[h,x]of r){let g=at(x.pts,x.idx),y=0;for(let a of g.pts)y+=Math.hypot(a.x-o.x,a.y-o.y);i.push({id:h,pts:g.pts,seatIndices:g.seatIndices,blockId:-1,ordinal:0,blockDepth:0,focalDistance:y/g.pts.length})}let s=i.map(h=>ct(h.pts)),f=[];for(let h=0;h<i.length;h++){let x=1/0;for(let g=0;g<i.length;g++){if(h===g||Ie(s[h],s[g])>=x)continue;let y=le(i[h].pts,i[g].pts);y<x&&(x=y)}Number.isFinite(x)&&f.push(x)}f.sort((h,x)=>h-x);let u=f.length?f[Math.floor(f.length/2)]:1,m=Math.max(u*1.8,1e-6),c=i.map(()=>[]);for(let h=0;h<i.length;h++)for(let x=h+1;x<i.length;x++)Ie(s[h],s[x])>m||le(i[h].pts,i[x].pts)<=m&&(c[h].push(x),c[x].push(h));let b=0;for(let h=0;h<i.length;h++){if(i[h].blockId!==-1)continue;let x=b++,g=[h];for(i[h].blockId=x;g.length;){let y=g.pop();for(let a of c[y])i[a].blockId===-1&&(i[a].blockId=x,g.push(a))}}let d=new Map;for(let h of i){let x=d.get(h.blockId)??[];x.push(h),d.set(h.blockId,x)}let l=[];for(let h of i){if(h.pts.length<4)continue;let x=ee(h.pts);x&&(!Number.isFinite(x.cx)||!Number.isFinite(x.cy)||l.push({x:x.cx,y:x.cy}))}let p=l.length>=2?(()=>{let h=l.map(y=>y.x).sort((y,a)=>y-a),x=l.map(y=>y.y).sort((y,a)=>y-a),g=Math.floor(l.length/2);return{cx:h[g],cy:x[g]}})():null;if(p){let h=S=>Math.hypot(S.x-p.cx,S.y-p.cy),x=1/0,g=-1/0,y=[];for(let S of i){let R=1/0,k=-1/0;for(let D of S.pts){let H=h(D);H<R&&(R=H),H>k&&(k=H)}y.push(k-R),R<x&&(x=R),k>g&&(g=k)}let a=g-x;y.sort((S,R)=>S-R);let I=y[Math.min(y.length-1,Math.floor(y.length*.9))];if(a>1e-9&&I/a<=lt){let S=i.map(v=>{let j=0;for(let z of v.pts)j+=h(z);return{row:v,radius:j/v.pts.length}}),R=0,k=0;for(let v of S)R+=v.radius,k+=v.row.focalDistance;R/=S.length,k/=S.length;let D=0;for(let v of S)D+=(v.radius-R)*(v.row.focalDistance-k);if(D<0)for(let v of S)v.radius=-v.radius;let U=1/0;for(let v of S)v.radius<U&&(U=v.radius);S.sort((v,j)=>v.radius-j.radius);let J=-1,M=-1/0,P=a/Math.max(1,S.length)*.5,E=[];for(let v of S)v.radius-M>P&&(J++,M=v.radius),v.row.ordinal=J,v.row.blockDepth=v.radius-U,E.push(v.row);return{sectionId:e,rows:E,blockCount:b}}}let A=[];for(let[,h]of d){let x=ut(h);if(x){let g=a=>{let I=0;for(let S of a.pts)I+=S.x*x.x+S.y*x.y;return I/a.pts.length};h.sort((a,I)=>g(a)-g(I)),h.length>=2&&h[0].focalDistance>h[h.length-1].focalDistance&&h.reverse();let y=0;for(let a=0;a<h.length;a++)a>0&&(y+=le(h[a-1].pts,h[a].pts)),h[a].ordinal=a,h[a].blockDepth=y,A.push(h[a])}else{let g=1/0;for(let y of h)y.focalDistance<g&&(g=y.focalDistance);h.sort((y,a)=>y.focalDistance-a.focalDistance);for(let y=0;y<h.length;y++)h[y].ordinal=y,h[y].blockDepth=Math.max(0,h[y].focalDistance-g),A.push(h[y])}}return{sectionId:e,rows:A,blockCount:b}}var ht=Math.PI/180,C=96,pt=6,mt=60,bt=150,Ae=.2,yt=.35;function Re(e,t){let n=Math.atan2(t.x-e.x,t.y-e.y)/ht;return n<0?n+360:n}function te(e){if(!e.length)return NaN;let t=[...e].sort((n,o)=>n-o);return t[Math.floor(t.length/2)]}function ne(e,t,n=2){let o=e.length,r=new Float64Array(o);for(let i=0;i<o;i++){let s=0,f=0;for(let u=-n;u<=n;u++){let m=i+u;if(t)m=(m%o+o)%o;else if(m<0||m>=o)continue;s+=e[m],f++}r[i]=s/f}return r}function xt(e,t){let n=e.filter(d=>d.rows.length>=1);if(n.length<1)return null;let o=[],r=0,i=0,s=0;for(let d of n)for(let l of d.rows){for(let p of l.pts)r+=p.x,i+=p.y,s++;if(l.pts.length>=4){let p=ee(l.pts);p&&Number.isFinite(p.cx)&&Number.isFinite(p.cy)&&o.push({x:p.cx,y:p.cy})}}if(!s)return null;let f={x:r/s,y:i/s},u=f;if(o.length>=8){let d=te(o.map(x=>x.x)),l=te(o.map(x=>x.y)),p=0;for(let x of n)for(let g of x.rows)for(let y of g.pts){let a=Math.hypot(y.x-f.x,y.y-f.y);a>p&&(p=a)}let A=0,h=p*.2;for(let x of n)for(let g of x.rows)for(let y of g.pts)Math.hypot(y.x-d,y.y-l)<h&&A++;Math.hypot(d-f.x,l-f.y)<=p&&A/s<.01&&(u={x:d,y:l})}let m=[];for(let d of n){let l={sectionId:d.sectionId,rMin:1/0,rMax:-1/0,samples:[]};for(let p of d.rows)for(let A of p.pts){let h=Math.hypot(A.x-u.x,A.y-u.y),x=Math.min(C-1,Math.floor(Re(u,A)/(360/C)));l.samples.push({r:h,bin:x,levelM:p.levelM}),h<l.rMin&&(l.rMin=h),h>l.rMax&&(l.rMax=h)}l.samples.length&&m.push(l)}if(!m.length)return null;m.sort((d,l)=>d.rMin+d.rMax-(l.rMin+l.rMax));let c=[];for(let d of m){let l=!1;for(let p of c){let A=Math.min(d.rMax,p.rMax)-Math.max(d.rMin,p.rMin),h=Math.min(d.rMax-d.rMin,p.rMax-p.rMin);if(h>1e-9&&A>=yt*h){p.members.push(d),p.rMin=Math.min(p.rMin,d.rMin),p.rMax=Math.max(p.rMax,d.rMax),l=!0;break}}l||c.push({members:[d],rMin:d.rMin,rMax:d.rMax})}let b=[];for(let d of c){let l=new Array(C).fill(null);for(let M of d.members)for(let P of M.samples){let E=l[P.bin];E||(E={samples:[]},l[P.bin]=E),E.samples.push({r:P.r,levelM:P.levelM})}let p=l.map(M=>!!M);if(!p.filter(Boolean).length)continue;let h=[],x=[];for(let M of l){if(!M)continue;let P=1/0,E=-1/0;for(let v of M.samples)v.r<P&&(P=v.r),v.r>E&&(E=v.r);h.push(P),x.push(E)}let g=te(h),y=te(x);if(!(g>=Ae*y)||!(y>0))continue;let a=[...h].sort((M,P)=>M-P);if(!(a[Math.floor(a.length*.1)]>=Ae*y))continue;let S=l.map(M=>{if(!M)return null;let P=[...M.samples].sort((_,N)=>_.r-N.r),E=P[0].r,v=P[P.length-1].r,j=P[0].levelM,z=-1/0;for(let _ of P)_.levelM>z&&(z=_.levelM);let O=[];for(let _ of P){let N={r:_.r,l:_.levelM};for(;O.length&&Math.abs(O[O.length-1].r-N.r)<1e-9;){if(O[O.length-1].l<=N.l){N.skip=!0;break}O.pop()}if(!N.skip){for(;O.length>=2;){let K=O[O.length-2],V=O[O.length-1];if((V.r-K.r)*(N.l-K.l)-(V.l-K.l)*(N.r-K.r)<=0)O.pop();else break}O.push(N)}}let B=O.map(_=>_.r),G=O.map(_=>_.l);return{inner:E,outer:v,front:j,top:z,profile:{rs:B,ls:G}}}),R=p.slice();for(let M=0;M<C;M++){if(R[M])continue;let P=-1,E=-1,v=0;for(let w=1;w<=C;w++){let T=(M-w+C*2)%C;if(R[T]){P=T;break}}for(let w=1;w<=C;w++){let T=(M+w)%C;if(R[T]){E=T,v=w;break}}if(P<0||E<0)continue;let j=0;for(let w=1;w<=C;w++){let T=(M-w+C*2)%C;if(p[T]){j=w;break}}if(j-1+v>pt)continue;let O=S[P],B=S[E],G=j/(j+v),_=O.inner+(B.inner-O.inner)*G,N=O.outer+(B.outer-O.outer)*G,K=O.front+(B.front-O.front)*G,V=O.top+(B.top-O.top)*G;S[M]={inner:_,outer:N,front:K,top:V,profile:{rs:[_,N],ls:[K,V]}}}for(let M=0;M<C;M++)S[M]&&(R[M]=!0);let k=360/C,D=[],H=R.filter(Boolean).length,U=[];if(H===C)U.push({start:0,len:C});else{let M=0;for(;R[M];)M=(M+1)%C;let P=-1;for(let E=0;E<=C;E++){let v=(M+E)%C,j=E<C&&R[v];if(j&&P<0)P=v;else if(!j&&P>=0){let z=(v-P+C)%C||C;U.push({start:P,len:z}),P=-1}}}for(let M of U){if(M.len*k<mt&&M.len<C)continue;let P=M.len===C,E=new Float64Array(M.len),v=new Float64Array(M.len),j=new Float64Array(M.len),z=new Float64Array(M.len),O=[];for(let w=0;w<M.len;w++){let T=S[(M.start+w)%C];E[w]=T.inner,v[w]=T.outer,j[w]=T.front,z[w]=T.top,O.push(T.profile??{rs:[T.inner,T.outer],ls:[T.front,T.top]})}let B=ne(E,P),G=ne(v,P),_=ne(j,P),N=ne(z,P);for(let w=0;w<M.len;w++)B[w]>E[w]&&(B[w]=E[w]),G[w]<v[w]&&(G[w]=v[w]),B[w]>G[w]-1e-6&&(B[w]=Math.max(0,G[w]-1e-6)),N[w]<_[w]&&(N[w]=_[w]);let K={startBin:M.start,binCount:M.len,closed:P,innerR:B,outerR:G,frontLevelM:_,topLevelM:N,profiles:O},V=(w,T,F)=>{let Q=O[w],W=Q.rs,$=Q.ls;if(T<=W[0]){$[0]>F&&($[0]=F);return}if(T>=W[W.length-1]){$[$.length-1]>F&&($[$.length-1]=F);return}for(let X=0;X+1<W.length;X++)if(T<=W[X+1]){$[X]>F&&($[X]=F),$[X+1]>F&&($[X+1]=F);return}};for(let w=0;w<M.len;w++){let T=l[(M.start+w)%C];if(T)for(let F of T.samples){V(w,F.r,F.levelM);let Q=P?(w-1+M.len)%M.len:w-1,W=P?(w+1)%M.len:w+1;Q>=0&&V(Q,F.r,F.levelM),W<M.len&&V(W,F.r,F.levelM)}}D.push(K)}D.reduce((M,P)=>M+P.binCount*k,0)<bt||b.push({arcs:D,sectionIds:d.members.map(M=>M.sectionId),innerRMedian:g,outerRMedian:y})}if(!b.length)return null;if(b.sort((d,l)=>d.innerRMedian-l.innerRMedian),t){let d=b[b.length-1].outerRMedian;if(Math.hypot(t.x-u.x,t.y-u.y)>.9*d)return null}return{centre:u,binCount:C,binStepDeg:360/C,rings:b}}function gt(e,t,n,o){let r=e.binStepDeg,i=n/r-.5-t.startBin;i=(i%e.binCount+e.binCount)%e.binCount,i>t.binCount-1&&(t.closed?i=i-t.binCount<t.binCount-i?0:t.binCount-1:i=i-(t.binCount-1)<e.binCount-i?t.binCount-1:0);let s=Math.floor(i),f=t.closed?(s+1)%t.binCount:Math.min(t.binCount-1,s+1),u=i-s,m=c=>{let b=t.profiles[c],d=b.rs,l=b.ls;if(o<=d[0])return l[0];if(o>=d[d.length-1])return l[l.length-1];for(let p=0;p+1<d.length;p++)if(o<=d[p+1]){let A=d[p+1]-d[p],h=A>1e-9?(o-d[p])/A:0;return l[p]+(l[p+1]-l[p])*h}return l[l.length-1]};return m(s)*(1-u)+m(f)*u}var Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZ",St="ABCDEFGHJKLMNPQRSTUVWXYZ",Mt="abcdefghijklmnopqrstuvwxyz";function fe(e,t){let n=t.length,o=e+1,r="";for(;o>0;){o-=1;let i=o%n;r=t[i]+r,o=Math.floor(o/n)}return r}function Oe(e,t){let n=t.startAt-1,o=e+n;if(t.scheme==="numbers")return String(o+1);let r=t.skipAmbiguous?St:Ce;return fe(o,r)}function oe(e,t=!1){let n=t?Mt:Ce;return fe(Math.max(0,Math.floor(e)-1),n)}var wt=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]];function de(e){if(!Number.isFinite(e)||e<=0)return String(e);let t=Math.floor(e),n="";for(let[o,r]of wt)for(;t>=o;)n+=r,t-=o;return n}function vt(e,t){let n=e.length;return e.map((o,r)=>{let i=t.reverse?n-1-r:r;return{...o,label:Oe(i,t)}})}function Pt(e){return{kind:"radial",rowCount:0,rows:[],nearestRow:()=>-1,depthAt:(t,n)=>Math.hypot(t-e.x,n-e.y),gradientAt:(t,n)=>{let o=t-e.x,r=n-e.y,i=Math.hypot(o,r);return i<1e-9?[0,0]:[o/i,r/i]}}}function It(e,t){if(!e.length)return null;let n=0,o=0,r=0;for(let l of e)n+=l.x,o+=l.y,r+=Math.hypot(l.x-t.x,l.y-t.y);let i=e.length;n/=i,o/=i,r/=i;let s=e[0],f=-1;for(let l of e){let p=Math.hypot(l.x-n,l.y-o);p>f&&(f=p,s=l)}let u=s.x-n,m=s.y-o,c=Math.hypot(u,m);c>1e-9?(u/=c,m/=c):(u=1,m=0);let b=[...e].sort((l,p)=>(l.x-n)*u+(l.y-o)*m-((p.x-n)*u+(p.y-o)*m)),d=0;for(let l of b){let p=Math.hypot(l.x-n,l.y-o);p>d&&(d=p)}return{pts:b,cx:n,cy:o,radius:d,depth:r}}function Ee(e,t,n){let o=e.pts;if(o.length===1)return Math.hypot(t-o[0].x,n-o[0].y);let r=1/0;for(let i=0;i+1<o.length;i++){let s=o[i],f=o[i+1],u=f.x-s.x,m=f.y-s.y,c=u*u+m*m,b=c>1e-12?((t-s.x)*u+(n-s.y)*m)/c:0;b<0?b=0:b>1&&(b=1);let d=Math.hypot(t-(s.x+b*u),n-(s.y+b*m));d<r&&(r=d)}return r}var re=8;function At(e,t,n){let o=new Array(re).fill(1/0),r=new Array(re).fill(-1);for(let c=0;c<e.length;c++){let b=e[c],d=Math.hypot(t-b.cx,n-b.cy)-b.radius;for(let l=0;l<re;l++)if(d<o[l]){for(let p=re-1;p>l;p--)o[p]=o[p-1],r[p]=r[p-1];o[l]=d,r[l]=c;break}}let i=new Array(3).fill(1/0),s=new Array(3).fill(-1);for(let c of r){if(c<0)continue;let b=Ee(e[c],t,n);for(let d=0;d<3;d++)if(b<i[d]){for(let l=2;l>d;l--)i[l]=i[l-1],s[l]=s[l-1];i[d]=b,s[d]=c;break}}if(s[0]<0)return 0;if(i[0]<1e-6)return e[s[0]].depth;let f=i[0]*2.2,u=0,m=0;for(let c=0;c<3;c++){let b=s[c];if(b<0||i[c]>f)continue;let d=1/(i[c]*i[c]);u+=d*e[b].depth,m+=d}return m>0?u/m:e[s[0]].depth}function Rt(e){let t=(o,r)=>At(e,o,r),n=(o,r)=>{let i=1/0,s=-1;for(let f=0;f<e.length;f++){let u=e[f];if(Math.hypot(o-u.cx,r-u.cy)-u.radius>=i)continue;let m=Ee(u,o,r);m<i&&(i=m,s=f)}return s};return{kind:"rows",rowCount:e.length,rows:e,nearestRow:n,depthAt:t,gradientAt:(o,r)=>{let i=(t(o+.5,r)-t(o-.5,r))/1,s=(t(o,r+.5)-t(o,r-.5))/(2*.5),f=Math.hypot(i,s);return f<1e-9?[0,0]:[i/f,s/f]}}}function Ct(e,t){let n=[];for(let o of e){let r=It(o.points,t);r&&n.push(r)}return n.length<2?Pt(t):(n.sort((o,r)=>o.depth-r.depth),Rt(n))}function Ot(e){return e==="exact-seat"?"Exact seat in the model":e==="row-representative"?"Representative row evidence":e==="section-representative"?"Representative section evidence":e==="floor-representative"?"Representative floor evidence":"Representative venue evidence"}function Et(e){if(!e)return"No assessment date supplied";let t=new Date(e);return Number.isFinite(t.getTime())?`Assessed ${t.toISOString().slice(0,10)}`:"No assessment date supplied"}function Tt(e){if(!e)return{headline:"Generated view \xB7 unverified",model:"No geometry or event-configuration verification supplied",reality:"No real-world check supplied",coverage:"Selected chart seat",provenance:"Chart-derived model",freshness:"No evidence date supplied",limitations:["Generated view is not surveyed sightline truth."]};let t=e.evidenceKind==="synthetic-model",n=e.modelLevel==="configuration-verified"?"Event configuration verified":e.modelLevel==="geometry-verified"?"Venue geometry verified":t?"Versioned synthetic model":"Generated model \xB7 not verified",o=e.realityLevel==="actual-build-checked"?"Actual event build reality checked":e.realityLevel==="comparable-build-reference"?"Comparable-build reference only":"No real-world check supplied",r=t?"Synthetic model evidence":e.modelLevel==="configuration-verified"?"Configuration verified":e.modelLevel==="geometry-verified"?"Geometry verified":"Generated view \xB7 unverified",i=[...e.limitations??[],...t?["Synthetic demo; not surveyed or venue-certified."]:[]],s=e.modeledTarget?`${e.modeledTarget.clearRayCount}/${e.modeledTarget.totalRayCount} target rays clear \xB7 ${e.modeledTarget.classification} in bounded model`:void 0;return s&&i.push("Modeled target is not a percentage of the show visible."),{headline:r,model:n,reality:o,coverage:Ot(e.coverage),provenance:e.sourceLabel??e.approvedByRole??"Source not supplied",freshness:Et(e.assessedAt),limitations:i,...s?{modeledTarget:s}:{}}}function kt(e){let t=new Array(e);return Array.from({length:e},(n,o)=>o).sort((n,o)=>Math.abs(2*n-(e-1))-Math.abs(2*o-(e-1))||n-o).forEach((n,o)=>t[n]=o),t}function ie(e,t){let n=e.seatLabelStart??1,o=e.seatNumbering?.direction??"ltr",r=e.seatNumbering?.step??1,i=e.seatNumbering?.scheme??"decimal",s=e.seatNumbering?.prefix??"",f=e.seatNumbering?.endAt,u=e.seatCount;if(i==="updown"||i==="updown-descending"){let l=Math.ceil(u/2),p=i==="updown"?t<l?n+2*t:n-1+2*(u-t):t<l?n+2*(l-1-t):n+1+2*(t-l);return`${s}${p}`}let m=i==="odd"||i==="even"?2:r,c=f!=null&&Number.isFinite(f)?f-(u-1)*m:n,b=o==="center"?kt(u)[t]:o==="rtl"?u-1-t:t,d;switch(i){case"odd":{let l=c%2===1?c:c+1;d=String(l+b*2);break}case"even":{let l=c%2===0?c:c+1;d=String(l+b*2);break}case"roman":d=de(c+b*r);break;case"letters-upper":d=oe(c+b*r,!1);break;case"letters-lower":d=oe(c+b*r,!0);break;default:d=String(c+b*r);break}return`${s}${d}`}function Te(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function he(e,t,n){return n?.label??`${e.label}-${ie(e,t)}`}function pe(e,t,n,o){if(o?.displayLabel)return o.displayLabel;if(!n)return`${e.displayLabel??e.label}-${ie(e,t)}`;let r=Te(n),i=n.displayOffset+t;return`${n.displayLabel}-${ie(r,i)}`}function _t(e,t,n){return Math.max(t,Math.min(n,e))}function jt(e){return _t(e,0,1)}function ke(e){let t=jt(e);return t*t*(3-2*t)}var An=Math.PI/180;function L(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function me(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}var Y=Math.PI*2;function q(e){return Number.isFinite(e.x)&&Number.isFinite(e.y)}function Lt(e,t,n){let o=t-e;if(n){for(;o<0;)o+=Y;for(;o>=Y;)o-=Y}else{for(;o>0;)o-=Y;for(;o<=-Y;)o+=Y}return o}function Dt(e){return e.end}function be(e){if(e.version!==1||e.closed!==!0||!q(e.start)||!Array.isArray(e.segments)||e.segments.length<2||e.segments.length>512)return!1;let t=e.start;for(let n of e.segments){if(!n||!q(n.end))return!1;if(n.kind==="line"){if(L(t,n.end)<=1e-9)return!1}else if(n.kind==="bezier"){if(!q(n.control1)||!q(n.control2)||L(t,n.end)<=1e-9)return!1}else if(n.kind==="arc"){if(!q(n.center)||!Number.isFinite(n.radius)||n.radius<=1e-6||Math.abs(L(t,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||Math.abs(L(n.end,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||L(t,n.end)<=1e-9)return!1}else return!1;t=n.end}return L(t,e.start)<=1e-4}function Nt(e,t,n){let o=1-n;return{x:o**3*e.x+3*o**2*n*t.control1.x+3*o*n**2*t.control2.x+n**3*t.end.x,y:o**3*e.y+3*o**2*n*t.control1.y+3*o*n**2*t.control2.y+n**3*t.end.y}}function Ft(e,t=2){if(!be(e))throw new Error("Section outline path is invalid");let n=Math.max(.25,t),o=[{...e.start}],r=e.start;for(let i of e.segments){if(i.kind==="line")o.push({...i.end});else if(i.kind==="arc"){let s=Math.atan2(r.y-i.center.y,r.x-i.center.x),f=Math.atan2(i.end.y-i.center.y,i.end.x-i.center.x),u=Lt(s,f,i.clockwise),m=Math.max(2,Math.ceil(Math.abs(u)*i.radius/n));for(let c=1;c<=m;c+=1){let b=s+u*c/m;o.push({x:i.center.x+Math.cos(b)*i.radius,y:i.center.y+Math.sin(b)*i.radius})}}else{let s=L(r,i.control1)+L(i.control1,i.control2)+L(i.control2,i.end),f=Math.max(2,Math.ceil(s/n));for(let u=1;u<=f;u+=1)o.push(Nt(r,i,u/f))}r=i.end}return L(o[o.length-1],o[0])<=1e-4&&o.pop(),o}function Bt(e,t,n){return Le(e,r=>({x:r.x+t,y:r.y+n}))}function Le(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 Gt=45,Ht=150,_e=.5523;function je(e,t){return Math.abs(e.x-t.x)<=1e-6&&Math.abs(e.y-t.y)<=1e-6}function Ut(e){let t=[],n=[];for(e.forEach((o,r)=>{q(o)&&(t.length&&je(t[t.length-1],o)||(t.push({x:o.x,y:o.y}),n.push(r)))});t.length>1&&je(t[0],t[t.length-1]);)t.pop(),n.pop();return{points:t,sourceIndex:n}}function zt(e,t,n){return Ne(e,{cornerSmoothing:t,...n})}var De=.5,$t=4/3;function Kt(e,t,n){let o=t.x-e.x,r=t.y-e.y,i=Math.hypot(o,r);if(i<=1e-9)return{kind:"line",end:{...t}};let s=-r/i,f=o/i,u=n*$t;return{kind:"bezier",control1:{x:e.x+o/3+s*u,y:e.y+r/3+f*u},control2:{x:e.x+o*2/3+s*u,y:e.y+r*2/3+f*u},end:{...t}}}function Ne(e,t){let{points:n,sourceIndex:o}=Ut(e),r=n.length;if(r<3)return null;let i=Math.min(100,Math.max(0,t.cornerSmoothing??0))/100,s=t.edgeCurvature,f=new Array(r).fill(0);if(s?.length)for(let a=0;a<r;a+=1){let I=s[o[a]];f[a]=Number.isFinite(I)?Math.min(100,Math.max(-100,I))/100:0}let u=f.some(a=>Math.abs(a)>1e-6);if(i<=0&&!u)return null;let m=t.wideAngleThresholdDeg??Ht,c=[];for(let a=0;a<r;a+=1)c[a]=L(n[a],n[(a+1)%r]);let b=new Array(r).fill(0);for(let a=0;a<r;a+=1){let I=n[(a-1+r)%r],S=n[a],R=n[(a+1)%r],k={x:I.x-S.x,y:I.y-S.y},D={x:R.x-S.x,y:R.y-S.y},H=Math.hypot(k.x,k.y),U=Math.hypot(D.x,D.y);if(H<=1e-9||U<=1e-9)continue;let J=Math.min(1,Math.max(-1,(k.x*D.x+k.y*D.y)/(H*U))),M=Math.acos(J)*180/Math.PI;if(M<m)continue;let P=ke((M-m)/(180-m));b[a]=i*P*.5*Math.min(H,U)}for(let a=0;a<r;a+=1){let I=(a+1)%r,S=b[a]+b[I];if(S>c[a]&&S>1e-9){let R=c[a]/S;b[a]*=R,b[I]*=R}}let d=new Array(r),l=new Array(r);for(let a=0;a<r;a+=1){let I=n[(a-1+r)%r],S=n[a],R=n[(a+1)%r];if(b[a]<=1e-6){d[a]={...S},l[a]={...S};continue}let k=L(S,I)||1,D=L(S,R)||1;d[a]={x:S.x+(I.x-S.x)/k*b[a],y:S.y+(I.y-S.y)/k*b[a]},l[a]={x:S.x+(R.x-S.x)/D*b[a],y:S.y+(R.y-S.y)/D*b[a]}}if(b.every(a=>a<=1e-6)&&!u)return null;let p=[],A={...l[0]},h=A,x=(a,I)=>{if(L(h,a)<=1e-9)return;let S=f[I];Math.abs(S)>1e-6?p.push(Kt(h,a,S*De*c[I])):p.push({kind:"line",end:{...a}}),h=a};for(let a=1;a<=r;a+=1){let I=a%r,S=n[I];x(d[I],(a-1)%r),b[I]>1e-6&&L(d[I],l[I])>1e-9&&(p.push({kind:"bezier",control1:me(d[I],S,_e),control2:me(l[I],S,_e),end:{...l[I]}}),h=l[I])}if(!p.length)return null;let g=p[p.length-1];L(g.end,A)>1e-9&&(g.kind==="line"?g.end={...A}:p.push({kind:"line",end:{...A}}));let y={version:1,closed:!0,start:A,segments:p};return be(y)?y:null}function Vt(e){let t=[],n=e.start;for(let r of e.segments)t.push(n),n=r.end;let o=[];for(let r=e.segments.length-1;r>=0;r-=1){let i=e.segments[r],s=t[r];i.kind==="line"?o.push({kind:"line",end:{...s}}):i.kind==="arc"?o.push({kind:"arc",center:{...i.center},radius:i.radius,clockwise:!i.clockwise,end:{...s}}):o.push({kind:"bezier",control1:{...i.control2},control2:{...i.control1},end:{...s}})}return{version:1,closed:!0,start:{...e.start},segments:o}}function Fe(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 Be(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[Fe(e,.5)];let o=Array.from({length:n+1},(u,m)=>Fe(e,m/n)),r=new Float64Array(o.length);for(let u=1;u<o.length;u+=1){let m=o[u].x-o[u-1].x,c=o[u].y-o[u-1].y;r[u]=r[u-1]+Math.hypot(m,c)}let i=r[r.length-1];if(i<=1e-9)return Array.from({length:t},()=>({...e.start}));let s=[],f=1;for(let u=0;u<t;u+=1){let m=i*u/(t-1);for(;f<r.length-1&&r[f]<m;)f+=1;let c=r[f-1],b=r[f],d=b===c?0:(m-c)/(b-c);s.push({x:o[f-1].x+(o[f].x-o[f-1].x)*d,y:o[f-1].y+(o[f].y-o[f-1].y)*d})}return s}var He=.02291666666666667,kn=1/He,Wt=58,ge=Wt*He;var Xt=3,Ge=0,ye=120,Yt=0,qt=45,Jt=7;function xe(e,t,n,o){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):o}function Qt(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=Jt?e:Xt}function Ue(e,t={}){let n=xe(t.floorBaseHeightM,Ge,ye,0),o=Math.min(ye,n+Qt(e.elevation)*ge),r=e.height===void 0?o:xe(e.height,Ge,ye,o),i=xe(e.rake,Yt,qt,0);return{height:r,rake:i}}function Ve(e){return e?e.accessibility&&e.accessibility.length?e.wheelchairSpaceType&&!e.accessibility.includes("wheelchair")?["wheelchair",...e.accessibility]:e.accessibility:e.wheelchairSpaceType?["wheelchair"]:e.accessible?["wheelchair"]:[]:[]}var se=Math.PI/180;var Z=16;function Me(e,t,n,o){let r=n*se,i=Math.cos(r),s=Math.sin(r);return{x:o.x+e*i-t*s,y:o.y+e*s+t*i}}function Zt(e){let{seatCount:t,seatSpacing:n,curve:o,rotation:r,origin:i}=e,s=[];if(e.path)return Be(e.path,t);if(t<=1)return t===1&&s.push({x:i.x,y:i.y}),s;if(o===0){for(let m=0;m<t;m++)s.push(Me(m*n,0,r,i));return s}let f=o/(t-1)*se,u=n/(2*Math.sin(Math.abs(f)/2));for(let m=0;m<t;m++){let c=m*f,b=u*Math.sin(c),d=-u+u*Math.cos(c);s.push(Me(b,d,r,i))}return s}function en(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function tn(e,t){let n=en(e);return Zt(e).map((o,r)=>{let i=n.get(r),s=Ve(i),f=he(e,r,i),u={...e.commercial,...i?.commercial};return{index:r,x:o.x+(i?.dx??0),y:o.y+(i?.dy??0),label:f,displayLabel:pe(e,r,t,i),categoryKey:i?.categoryKey??e.categoryKey,skipped:!!i?.skip,accessible:s.length>0,accessibility:s,wheelchairSpaceType:i?.wheelchairSpaceType,commercial:Object.values(u).some(m=>m!==void 0&&m!==!1&&m!=="")?u:void 0,viewUrl:i?.viewFromSeatUrl??e.viewFromSeatUrl,viewMeta:i?.viewFromSeatUrl?i.viewFromSeatMeta:e.viewFromSeatMeta,labelStyle:i?.labelStyle}})}function we(e){let t=[];for(let n of tn(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,viewUrl:n.viewUrl,viewMeta:n.viewMeta,labelStyle:n.labelStyle});return t}function nn(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 on(e){let t=[],n=Math.max(0,Math.round(e.seatCount));if(n===0)return t;let o=new Map((e.overrides??[]).map(c=>[c.index,c])),r=(c,b,d,l)=>{let p=o.get(c),A=Ve(p),h=p?.label??`${e.label}-${c+1}`,x=e.displayLabel??e.label;return{index:c,label:h,displayLabel:p?.displayLabel??`${x}-${c+1}`,x:b+(p?.dx??0),y:d+(p?.dy??0),categoryKey:p?.categoryKey??e.categoryKey,skipped:!!p?.skip,accessible:A.length>0,accessibility:A,wheelchairSpaceType:p?.wheelchairSpaceType,commercial:p?.commercial,viewUrl:p?.viewFromSeatUrl,viewMeta:p?.viewFromSeatUrl?p.viewFromSeatMeta:void 0,labelStyle:p?.labelStyle,...l?{side:l}:{}}};if(e.shape==="round"){let c=(e.radius??40)+Z,b=e.rotation*se,d=Math.max(0,Math.min(360,e.seatArc??360));if(d>=360||n===1){for(let h=0;h<n;h++){let x=b+h/n*2*Math.PI;t.push(r(h,e.center.x+c*Math.cos(x),e.center.y+c*Math.sin(x)))}return t}let l=d*se,p=(2*Math.PI-l)/2,A=b+p;for(let h=0;h<n;h++){let x=A+h/(n-1)*l;t.push(r(h,e.center.x+c*Math.cos(x),e.center.y+c*Math.sin(x)))}return t}let i=e.width??80,s=e.height??50,f=nn(e),u=["top","bottom","left","right"],m=0;for(let c of u){let b=f[c];for(let d=0;d<b;d++){let l,p;c==="top"?(l=-i/2+(d+.5)*i/b,p=-s/2-Z):c==="bottom"?(l=-i/2+(d+.5)*i/b,p=s/2+Z):c==="left"?(l=-i/2-Z,p=-s/2+(d+.5)*s/b):(l=i/2+Z,p=-s/2+(d+.5)*s/b);let A=Me(l,p,e.rotation,e.center);t.push(r(m++,A.x,A.y,c))}}return t}function We(e){return on(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.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 ze(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,s=t[o].y,f=t[r].x,u=t[r].y;s>e.y!=u>e.y&&e.x<(f-i)*(e.y-s)/(u-s)+i&&(n=!n)}return n}function rn(e,t){return t.some((n,o)=>{let r=t[(o+1)%t.length],i=(e.y-n.y)*(r.x-n.x)-(e.x-n.x)*(r.y-n.y);if(Math.abs(i)>1e-7)return!1;let s=(e.x-n.x)*(r.x-n.x)+(e.y-n.y)*(r.y-n.y),f=(r.x-n.x)**2+(r.y-n.y)**2;return s>=-1e-7&&s<=f+1e-7})}function $e(e,t,n){return ze(e,t)&&!(n??[]).some(o=>ze(e,o)||rn(e,o))}function Se(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 sn(e){switch(e.type){case"row":{let t=we(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 Se(e.points);case"section":return Se(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?Se(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 Ke(e,t){return e.length===t.length&&e.every((n,o)=>n.x===t[o].x&&n.y===t[o].y)}function cn(e,t){if(e.type!=="gaArea"||!Ke(e.points,t.outline))return!1;let n=e.holes??[],o=t.holes??[];return n.length===o.length&&n.every((r,i)=>Ke(r,o[i]))}function Ye(e,t){let n=e.filter(s=>s.type==="section"),o="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0,r=sn(t);return(o?n.find(s=>(s.logicalSectionId??s.id)===o&&(cn(t,s)||$e(r,s.outline,s.holes))):void 0)??n.find(s=>$e(r,s.outline,s.holes))}function qe(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}var an="__sl_ga__",ve=1e5;function ln(e,t){return`${an}${encodeURIComponent(e)}__${t+1}`}function un(e){let t=e.inventorySegments;if(t===void 0)return!0;if(!Array.isArray(t)||t.length<1||t.length>256)return!1;let n=0,o=new Map;for(let r of t){if(!r||typeof r.sourceAreaId!="string"||!r.sourceAreaId.trim()||r.sourceAreaId.length>160||!Number.isInteger(r.startIndex)||r.startIndex<0||!Number.isInteger(r.count)||r.count<1||r.startIndex+r.count>ve||(n+=r.count,n>ve))return!1;let i=o.get(r.sourceAreaId)??[],s=r.startIndex+r.count;if(i.some(f=>r.startIndex<f.end&&s>f.start))return!1;i.push({start:r.startIndex,end:s}),o.set(r.sourceAreaId,i)}return n===e.capacity}function fn(e){let t=Math.min(ve,Math.max(0,Math.floor(e.capacity)));return e.inventorySegments===void 0?t?[{sourceAreaId:e.id,startIndex:0,count:t}]:[]:un(e)?e.inventorySegments.map(n=>({...n})):[]}function Je(e){return fn(e).flatMap(t=>Array.from({length:t.count},(n,o)=>ln(t.sourceAreaId,t.startIndex+o)))}var ce="__ungrouped__";function dn(e){return e.type==="row"?we(e).map(t=>t.label):e.type==="table"?We(e).map(t=>t.label):e.type==="booth"?Xe(e).map(t=>t.label):e.type==="gaArea"?Je(e):[]}function hn(e){return e.type==="row"||e.type==="table"||e.type==="booth"||e.type==="gaArea"}function Qe(e){let t=qe(e),n=t.filter(s=>s.type==="section"),o=new Map;for(let s of n){let f=s.logicalSectionId??s.id;o.get(f)||o.set(f,{id:f,label:s.displayLabel||s.label||"Section",zone:s.zone,seatCount:0,objectIds:[],seatLabels:[]})}let r={id:ce,label:"Other seats",seatCount:0,objectIds:[],seatLabels:[]},i=new Map;for(let s of t){if(!hn(s))continue;let f=dn(s);if(f.length===0)continue;let u=Ye(t,s),m=u?o.get(u.logicalSectionId??u.id):r;m.seatCount+=f.length,m.objectIds.push(s.id),m.seatLabels.push(...f),i.set(s.id,m.id)}return{sections:[...o.values()],ungrouped:r.objectIds.length?r:null,objectToSection:i}}function Ze(e,t){return t.has(e.id)||!!e.logicalSectionId&&t.has(e.logicalSectionId)||!!e.zone&&t.has(e.zone)}function et(e,t){let n=new Set;if(!t.size)return n;let{sections:o,ungrouped:r,objectToSection:i}=Qe(e),s=new Set,f=new Map(o.map(m=>[m.id,m.zone]));for(let m of o){let c=f.get(m.id);(t.has(m.id)||c&&t.has(c))&&s.add(m.id)}let u=!!r&&t.has(ce);for(let[m,c]of i)(s.has(c)||u&&c===ce)&&n.add(m);return n}function pn(e,t){if(!t.size)return e;let n=et(e,t),o=t instanceof Set?t:new Set(t),r=s=>!(n.has(s.id)||s.type==="section"&&Ze(s,o));if(e.floors&&e.floors.length){let s=!1,f=e.floors.map(u=>{let m=u.objects.filter(r);return m.length!==u.objects.length&&(s=!0),m.length===u.objects.length?u:{...u,objects:m}});return s?{...e,floors:f,objects:f[0].objects}:e}let i=e.objects.filter(r);return i.length===e.objects.length?e:{...e,objects:i}}0&&(module.exports={DEFAULT_SECTION_CORNER_SMOOTHING,MAX_EDGE_SAGITTA_RATIO,TIER_HEIGHT_M,UNGROUPED_ID,applyHidden,arcLevelAt,bearingDeg,buildSectionRake,computeSections,distanceToPolyline,fitBowlProfile,fitCircle,hiddenObjectIds,indexLabel,isSectionHidden,logicalNumberingRow,relabelRows,resolveSection,reverseSectionOutlinePath,sampleSectionOutlinePath,seatConfidenceDisclosure,seatDisplayLabel,seatInventoryLabel,seatLabelPart,sectionCornerSmoothingPath,sectionGeometry,sectionOutlinePathFrom,sectionPathSegmentEnd,toBijectiveBase,toLetters,toRoman,transformSectionOutlinePath,translateSectionOutlinePath,validSectionOutlinePath});
1
+ "use strict";var ae=Object.defineProperty;var rt=Object.getOwnPropertyDescriptor;var it=Object.getOwnPropertyNames;var st=Object.prototype.hasOwnProperty;var ct=(e,t)=>{for(var n in t)ae(e,n,{get:t[n],enumerable:!0})},at=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of it(t))!st.call(e,r)&&r!==n&&ae(e,r,{get:()=>t[r],enumerable:!(o=rt(t,r))||o.enumerable});return e};var lt=e=>at(ae({},"__esModule",{value:!0}),e);var yn={};ct(yn,{DEFAULT_SECTION_CORNER_SMOOTHING:()=>Ne,MAX_EDGE_SAGITTA_RATIO:()=>Be,TIER_HEIGHT_M:()=>Se,UNGROUPED_ID:()=>ce,applyHidden:()=>bn,arcLevelAt:()=>wt,bearingDeg:()=>Ce,buildSectionRake:()=>Tt,computeSections:()=>tt,cornerSmoothingThresholdDeg:()=>Fe,distanceToPolyline:()=>ue,fitBowlProfile:()=>Mt,fitCircle:()=>ee,hiddenObjectIds:()=>ot,indexLabel:()=>Ee,isSectionHidden:()=>nt,logicalNumberingRow:()=>_e,relabelRows:()=>At,resolveSection:()=>mt,reverseSectionOutlinePath:()=>Xt,sampleSectionOutlinePath:()=>Ht,seatConfidenceDisclosure:()=>jt,seatDisplayLabel:()=>pe,seatInventoryLabel:()=>he,seatLabelPart:()=>ie,sectionCornerSmoothingPath:()=>Kt,sectionGeometry:()=>Ke,sectionOutlinePathFrom:()=>Ge,sectionPathSegmentEnd:()=>Bt,toBijectiveBase:()=>fe,toLetters:()=>oe,toRoman:()=>de,transformSectionOutlinePath:()=>De,translateSectionOutlinePath:()=>Ut,validSectionOutlinePath:()=>ye});module.exports=lt(yn);function Ie(e){let t=e.length;return t<=3?[...e]:[e[Math.floor(t*.25)],e[Math.floor(t*.5)],e[Math.floor(t*.75)]]}function ue(e,t,n){if(!e.length)return 1/0;if(e.length===1)return Math.hypot(t-e[0].x,n-e[0].y);let o=1/0;for(let r=0;r+1<e.length;r++){let i=e[r],s=e[r+1],f=s.x-i.x,u=s.y-i.y,m=f*f+u*u,c=m>1e-12?((t-i.x)*f+(n-i.y)*u)/m:0;c<0?c=0:c>1&&(c=1);let b=Math.hypot(t-(i.x+c*f),n-(i.y+c*u));b<o&&(o=b)}return o}function ut(e){let t=0,n=0;for(let i of e)t+=i.x,n+=i.y;let o=e.length||1;t/=o,n/=o;let r=0;for(let i of e){let s=Math.hypot(i.x-t,i.y-n);s>r&&(r=s)}return{cx:t,cy:n,r}}function Ae(e,t){return Math.hypot(e.cx-t.cx,e.cy-t.cy)-e.r-t.r}function le(e,t){let n=1/0;for(let o of Ie(e)){let r=ue(t,o.x,o.y);r<n&&(n=r)}for(let o of Ie(t)){let r=ue(e,o.x,o.y);r<n&&(n=r)}return n}function ft(e,t){if(e.length<3)return{pts:e,seatIndices:t};let n=0,o=0;for(let c of e)n+=c.x,o+=c.y;n/=e.length,o/=e.length;let r=-1,i=e[0];for(let c of e){let b=Math.hypot(c.x-n,c.y-o);b>r&&(r=b,i=c)}let s=i.x-n,f=i.y-o,u=Math.hypot(s,f);u>1e-9?(s/=u,f/=u):(s=1,f=0);let m=e.map((c,b)=>({p:c,i:b,t:(c.x-n)*s+(c.y-o)*f})).sort((c,b)=>c.t-b.t);return{pts:m.map(c=>c.p),seatIndices:m.map(c=>t[c.i])}}function ee(e){let t=e.length;if(t<3)return null;let n=0,o=0;for(let g of e)n+=g.x,o+=g.y;n/=t,o/=t;let r=0,i=0,s=0,f=0,u=0,m=0,c=0;for(let g of e){let y=g.x-n,a=g.y-o;r+=y*y,s+=a*a,i+=y*a,f+=y*y*y,u+=a*a*a,m+=y*a*a,c+=a*y*y}let b=r*s-i*i;if(Math.abs(b)<1e-9)return null;let d=(f+m)/2,l=(u+c)/2,p=(d*s-l*i)/b,A=(l*r-d*i)/b,h=p+n,x=A+o;return!Number.isFinite(h)||!Number.isFinite(x)?null:{cx:h,cy:x}}var dt=.15;function ht(e){if(e.length<2)return null;let t=e.map(g=>{let y=0,a=0;for(let I of g.pts)y+=I.x,a+=I.y;return{x:y/g.pts.length,y:a/g.pts.length}}),n=0,o=0;for(let g of t)n+=g.x,o+=g.y;n/=t.length,o/=t.length;let r=0,i=0,s=0;for(let g of t){let y=g.x-n,a=g.y-o;r+=y*y,i+=y*a,s+=a*a}let f=r+s,u=r*s-i*i,m=f/2+Math.sqrt(Math.max(0,f*f/4-u)),c,b;Math.abs(i)>1e-12?(c=m-s,b=i):r>=s?(c=1,b=0):(c=0,b=1);let d=Math.hypot(c,b);if(!(d>1e-12))return null;c/=d,b/=d;let l=1/0,p=-1/0,A=[];for(let g of e){let y=1/0,a=-1/0;for(let I of g.pts){let S=I.x*c+I.y*b;S<y&&(y=S),S>a&&(a=S),S<l&&(l=S),S>p&&(p=S)}A.push(a-y)}let h=p-l;return h>1e-9?(A.sort((g,y)=>g-y),A[Math.min(A.length-1,Math.floor(A.length*.9))]/h<=pt?{x:c,y:b}:null):null}var pt=.35;function mt(e,t,n,o){let r=new Map;for(let h of n){let x=t[h],g=x.rowId||`__seat-${h}`,y=r.get(g);y||(y={pts:[],idx:[]},r.set(g,y)),y.pts.push({x:x.x,y:x.y}),y.idx.push(h)}if(!r.size)return{sectionId:e,rows:[],blockCount:0};let i=[];for(let[h,x]of r){let g=ft(x.pts,x.idx),y=0;for(let a of g.pts)y+=Math.hypot(a.x-o.x,a.y-o.y);i.push({id:h,pts:g.pts,seatIndices:g.seatIndices,blockId:-1,ordinal:0,blockDepth:0,focalDistance:y/g.pts.length})}let s=i.map(h=>ut(h.pts)),f=[];for(let h=0;h<i.length;h++){let x=1/0;for(let g=0;g<i.length;g++){if(h===g||Ae(s[h],s[g])>=x)continue;let y=le(i[h].pts,i[g].pts);y<x&&(x=y)}Number.isFinite(x)&&f.push(x)}f.sort((h,x)=>h-x);let u=f.length?f[Math.floor(f.length/2)]:1,m=Math.max(u*1.8,1e-6),c=i.map(()=>[]);for(let h=0;h<i.length;h++)for(let x=h+1;x<i.length;x++)Ae(s[h],s[x])>m||le(i[h].pts,i[x].pts)<=m&&(c[h].push(x),c[x].push(h));let b=0;for(let h=0;h<i.length;h++){if(i[h].blockId!==-1)continue;let x=b++,g=[h];for(i[h].blockId=x;g.length;){let y=g.pop();for(let a of c[y])i[a].blockId===-1&&(i[a].blockId=x,g.push(a))}}let d=new Map;for(let h of i){let x=d.get(h.blockId)??[];x.push(h),d.set(h.blockId,x)}let l=[];for(let h of i){if(h.pts.length<4)continue;let x=ee(h.pts);x&&(!Number.isFinite(x.cx)||!Number.isFinite(x.cy)||l.push({x:x.cx,y:x.cy}))}let p=l.length>=2?(()=>{let h=l.map(y=>y.x).sort((y,a)=>y-a),x=l.map(y=>y.y).sort((y,a)=>y-a),g=Math.floor(l.length/2);return{cx:h[g],cy:x[g]}})():null;if(p){let h=S=>Math.hypot(S.x-p.cx,S.y-p.cy),x=1/0,g=-1/0,y=[];for(let S of i){let R=1/0,_=-1/0;for(let D of S.pts){let H=h(D);H<R&&(R=H),H>_&&(_=H)}y.push(_-R),R<x&&(x=R),_>g&&(g=_)}let a=g-x;y.sort((S,R)=>S-R);let I=y[Math.min(y.length-1,Math.floor(y.length*.9))];if(a>1e-9&&I/a<=dt){let S=i.map(v=>{let j=0;for(let z of v.pts)j+=h(z);return{row:v,radius:j/v.pts.length}}),R=0,_=0;for(let v of S)R+=v.radius,_+=v.row.focalDistance;R/=S.length,_/=S.length;let D=0;for(let v of S)D+=(v.radius-R)*(v.row.focalDistance-_);if(D<0)for(let v of S)v.radius=-v.radius;let U=1/0;for(let v of S)v.radius<U&&(U=v.radius);S.sort((v,j)=>v.radius-j.radius);let J=-1,M=-1/0,P=a/Math.max(1,S.length)*.5,E=[];for(let v of S)v.radius-M>P&&(J++,M=v.radius),v.row.ordinal=J,v.row.blockDepth=v.radius-U,E.push(v.row);return{sectionId:e,rows:E,blockCount:b}}}let A=[];for(let[,h]of d){let x=ht(h);if(x){let g=a=>{let I=0;for(let S of a.pts)I+=S.x*x.x+S.y*x.y;return I/a.pts.length};h.sort((a,I)=>g(a)-g(I)),h.length>=2&&h[0].focalDistance>h[h.length-1].focalDistance&&h.reverse();let y=0;for(let a=0;a<h.length;a++)a>0&&(y+=le(h[a-1].pts,h[a].pts)),h[a].ordinal=a,h[a].blockDepth=y,A.push(h[a])}else{let g=1/0;for(let y of h)y.focalDistance<g&&(g=y.focalDistance);h.sort((y,a)=>y.focalDistance-a.focalDistance);for(let y=0;y<h.length;y++)h[y].ordinal=y,h[y].blockDepth=Math.max(0,h[y].focalDistance-g),A.push(h[y])}}return{sectionId:e,rows:A,blockCount:b}}var bt=Math.PI/180,C=96,yt=6,xt=60,gt=150,Re=.2,St=.35;function Ce(e,t){let n=Math.atan2(t.x-e.x,t.y-e.y)/bt;return n<0?n+360:n}function te(e){if(!e.length)return NaN;let t=[...e].sort((n,o)=>n-o);return t[Math.floor(t.length/2)]}function ne(e,t,n=2){let o=e.length,r=new Float64Array(o);for(let i=0;i<o;i++){let s=0,f=0;for(let u=-n;u<=n;u++){let m=i+u;if(t)m=(m%o+o)%o;else if(m<0||m>=o)continue;s+=e[m],f++}r[i]=s/f}return r}function Mt(e,t){let n=e.filter(d=>d.rows.length>=1);if(n.length<1)return null;let o=[],r=0,i=0,s=0;for(let d of n)for(let l of d.rows){for(let p of l.pts)r+=p.x,i+=p.y,s++;if(l.pts.length>=4){let p=ee(l.pts);p&&Number.isFinite(p.cx)&&Number.isFinite(p.cy)&&o.push({x:p.cx,y:p.cy})}}if(!s)return null;let f={x:r/s,y:i/s},u=f;if(o.length>=8){let d=te(o.map(x=>x.x)),l=te(o.map(x=>x.y)),p=0;for(let x of n)for(let g of x.rows)for(let y of g.pts){let a=Math.hypot(y.x-f.x,y.y-f.y);a>p&&(p=a)}let A=0,h=p*.2;for(let x of n)for(let g of x.rows)for(let y of g.pts)Math.hypot(y.x-d,y.y-l)<h&&A++;Math.hypot(d-f.x,l-f.y)<=p&&A/s<.01&&(u={x:d,y:l})}let m=[];for(let d of n){let l={sectionId:d.sectionId,rMin:1/0,rMax:-1/0,samples:[]};for(let p of d.rows)for(let A of p.pts){let h=Math.hypot(A.x-u.x,A.y-u.y),x=Math.min(C-1,Math.floor(Ce(u,A)/(360/C)));l.samples.push({r:h,bin:x,levelM:p.levelM}),h<l.rMin&&(l.rMin=h),h>l.rMax&&(l.rMax=h)}l.samples.length&&m.push(l)}if(!m.length)return null;m.sort((d,l)=>d.rMin+d.rMax-(l.rMin+l.rMax));let c=[];for(let d of m){let l=!1;for(let p of c){let A=Math.min(d.rMax,p.rMax)-Math.max(d.rMin,p.rMin),h=Math.min(d.rMax-d.rMin,p.rMax-p.rMin);if(h>1e-9&&A>=St*h){p.members.push(d),p.rMin=Math.min(p.rMin,d.rMin),p.rMax=Math.max(p.rMax,d.rMax),l=!0;break}}l||c.push({members:[d],rMin:d.rMin,rMax:d.rMax})}let b=[];for(let d of c){let l=new Array(C).fill(null);for(let M of d.members)for(let P of M.samples){let E=l[P.bin];E||(E={samples:[]},l[P.bin]=E),E.samples.push({r:P.r,levelM:P.levelM})}let p=l.map(M=>!!M);if(!p.filter(Boolean).length)continue;let h=[],x=[];for(let M of l){if(!M)continue;let P=1/0,E=-1/0;for(let v of M.samples)v.r<P&&(P=v.r),v.r>E&&(E=v.r);h.push(P),x.push(E)}let g=te(h),y=te(x);if(!(g>=Re*y)||!(y>0))continue;let a=[...h].sort((M,P)=>M-P);if(!(a[Math.floor(a.length*.1)]>=Re*y))continue;let S=l.map(M=>{if(!M)return null;let P=[...M.samples].sort((k,N)=>k.r-N.r),E=P[0].r,v=P[P.length-1].r,j=P[0].levelM,z=-1/0;for(let k of P)k.levelM>z&&(z=k.levelM);let O=[];for(let k of P){let N={r:k.r,l:k.levelM};for(;O.length&&Math.abs(O[O.length-1].r-N.r)<1e-9;){if(O[O.length-1].l<=N.l){N.skip=!0;break}O.pop()}if(!N.skip){for(;O.length>=2;){let K=O[O.length-2],W=O[O.length-1];if((W.r-K.r)*(N.l-K.l)-(W.l-K.l)*(N.r-K.r)<=0)O.pop();else break}O.push(N)}}let B=O.map(k=>k.r),G=O.map(k=>k.l);return{inner:E,outer:v,front:j,top:z,profile:{rs:B,ls:G}}}),R=p.slice();for(let M=0;M<C;M++){if(R[M])continue;let P=-1,E=-1,v=0;for(let w=1;w<=C;w++){let T=(M-w+C*2)%C;if(R[T]){P=T;break}}for(let w=1;w<=C;w++){let T=(M+w)%C;if(R[T]){E=T,v=w;break}}if(P<0||E<0)continue;let j=0;for(let w=1;w<=C;w++){let T=(M-w+C*2)%C;if(p[T]){j=w;break}}if(j-1+v>yt)continue;let O=S[P],B=S[E],G=j/(j+v),k=O.inner+(B.inner-O.inner)*G,N=O.outer+(B.outer-O.outer)*G,K=O.front+(B.front-O.front)*G,W=O.top+(B.top-O.top)*G;S[M]={inner:k,outer:N,front:K,top:W,profile:{rs:[k,N],ls:[K,W]}}}for(let M=0;M<C;M++)S[M]&&(R[M]=!0);let _=360/C,D=[],H=R.filter(Boolean).length,U=[];if(H===C)U.push({start:0,len:C});else{let M=0;for(;R[M];)M=(M+1)%C;let P=-1;for(let E=0;E<=C;E++){let v=(M+E)%C,j=E<C&&R[v];if(j&&P<0)P=v;else if(!j&&P>=0){let z=(v-P+C)%C||C;U.push({start:P,len:z}),P=-1}}}for(let M of U){if(M.len*_<xt&&M.len<C)continue;let P=M.len===C,E=new Float64Array(M.len),v=new Float64Array(M.len),j=new Float64Array(M.len),z=new Float64Array(M.len),O=[];for(let w=0;w<M.len;w++){let T=S[(M.start+w)%C];E[w]=T.inner,v[w]=T.outer,j[w]=T.front,z[w]=T.top,O.push(T.profile??{rs:[T.inner,T.outer],ls:[T.front,T.top]})}let B=ne(E,P),G=ne(v,P),k=ne(j,P),N=ne(z,P);for(let w=0;w<M.len;w++)B[w]>E[w]&&(B[w]=E[w]),G[w]<v[w]&&(G[w]=v[w]),B[w]>G[w]-1e-6&&(B[w]=Math.max(0,G[w]-1e-6)),N[w]<k[w]&&(N[w]=k[w]);let K={startBin:M.start,binCount:M.len,closed:P,innerR:B,outerR:G,frontLevelM:k,topLevelM:N,profiles:O},W=(w,T,F)=>{let Q=O[w],V=Q.rs,$=Q.ls;if(T<=V[0]){$[0]>F&&($[0]=F);return}if(T>=V[V.length-1]){$[$.length-1]>F&&($[$.length-1]=F);return}for(let X=0;X+1<V.length;X++)if(T<=V[X+1]){$[X]>F&&($[X]=F),$[X+1]>F&&($[X+1]=F);return}};for(let w=0;w<M.len;w++){let T=l[(M.start+w)%C];if(T)for(let F of T.samples){W(w,F.r,F.levelM);let Q=P?(w-1+M.len)%M.len:w-1,V=P?(w+1)%M.len:w+1;Q>=0&&W(Q,F.r,F.levelM),V<M.len&&W(V,F.r,F.levelM)}}D.push(K)}D.reduce((M,P)=>M+P.binCount*_,0)<gt||b.push({arcs:D,sectionIds:d.members.map(M=>M.sectionId),innerRMedian:g,outerRMedian:y})}if(!b.length)return null;if(b.sort((d,l)=>d.innerRMedian-l.innerRMedian),t){let d=b[b.length-1].outerRMedian;if(Math.hypot(t.x-u.x,t.y-u.y)>.9*d)return null}return{centre:u,binCount:C,binStepDeg:360/C,rings:b}}function wt(e,t,n,o){let r=e.binStepDeg,i=n/r-.5-t.startBin;i=(i%e.binCount+e.binCount)%e.binCount,i>t.binCount-1&&(t.closed?i=i-t.binCount<t.binCount-i?0:t.binCount-1:i=i-(t.binCount-1)<e.binCount-i?t.binCount-1:0);let s=Math.floor(i),f=t.closed?(s+1)%t.binCount:Math.min(t.binCount-1,s+1),u=i-s,m=c=>{let b=t.profiles[c],d=b.rs,l=b.ls;if(o<=d[0])return l[0];if(o>=d[d.length-1])return l[l.length-1];for(let p=0;p+1<d.length;p++)if(o<=d[p+1]){let A=d[p+1]-d[p],h=A>1e-9?(o-d[p])/A:0;return l[p]+(l[p+1]-l[p])*h}return l[l.length-1]};return m(s)*(1-u)+m(f)*u}var Oe="ABCDEFGHIJKLMNOPQRSTUVWXYZ",vt="ABCDEFGHJKLMNPQRSTUVWXYZ",Pt="abcdefghijklmnopqrstuvwxyz";function fe(e,t){let n=t.length,o=e+1,r="";for(;o>0;){o-=1;let i=o%n;r=t[i]+r,o=Math.floor(o/n)}return r}function Ee(e,t){let n=t.startAt-1,o=e+n;if(t.scheme==="numbers")return String(o+1);let r=t.skipAmbiguous?vt:Oe;return fe(o,r)}function oe(e,t=!1){let n=t?Pt:Oe;return fe(Math.max(0,Math.floor(e)-1),n)}var It=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]];function de(e){if(!Number.isFinite(e)||e<=0)return String(e);let t=Math.floor(e),n="";for(let[o,r]of It)for(;t>=o;)n+=r,t-=o;return n}function At(e,t){let n=e.length;return e.map((o,r)=>{let i=t.reverse?n-1-r:r;return{...o,label:Ee(i,t)}})}function Rt(e){return{kind:"radial",rowCount:0,rows:[],nearestRow:()=>-1,depthAt:(t,n)=>Math.hypot(t-e.x,n-e.y),gradientAt:(t,n)=>{let o=t-e.x,r=n-e.y,i=Math.hypot(o,r);return i<1e-9?[0,0]:[o/i,r/i]}}}function Ct(e,t){if(!e.length)return null;let n=0,o=0,r=0;for(let l of e)n+=l.x,o+=l.y,r+=Math.hypot(l.x-t.x,l.y-t.y);let i=e.length;n/=i,o/=i,r/=i;let s=e[0],f=-1;for(let l of e){let p=Math.hypot(l.x-n,l.y-o);p>f&&(f=p,s=l)}let u=s.x-n,m=s.y-o,c=Math.hypot(u,m);c>1e-9?(u/=c,m/=c):(u=1,m=0);let b=[...e].sort((l,p)=>(l.x-n)*u+(l.y-o)*m-((p.x-n)*u+(p.y-o)*m)),d=0;for(let l of b){let p=Math.hypot(l.x-n,l.y-o);p>d&&(d=p)}return{pts:b,cx:n,cy:o,radius:d,depth:r}}function Te(e,t,n){let o=e.pts;if(o.length===1)return Math.hypot(t-o[0].x,n-o[0].y);let r=1/0;for(let i=0;i+1<o.length;i++){let s=o[i],f=o[i+1],u=f.x-s.x,m=f.y-s.y,c=u*u+m*m,b=c>1e-12?((t-s.x)*u+(n-s.y)*m)/c:0;b<0?b=0:b>1&&(b=1);let d=Math.hypot(t-(s.x+b*u),n-(s.y+b*m));d<r&&(r=d)}return r}var re=8;function Ot(e,t,n){let o=new Array(re).fill(1/0),r=new Array(re).fill(-1);for(let c=0;c<e.length;c++){let b=e[c],d=Math.hypot(t-b.cx,n-b.cy)-b.radius;for(let l=0;l<re;l++)if(d<o[l]){for(let p=re-1;p>l;p--)o[p]=o[p-1],r[p]=r[p-1];o[l]=d,r[l]=c;break}}let i=new Array(3).fill(1/0),s=new Array(3).fill(-1);for(let c of r){if(c<0)continue;let b=Te(e[c],t,n);for(let d=0;d<3;d++)if(b<i[d]){for(let l=2;l>d;l--)i[l]=i[l-1],s[l]=s[l-1];i[d]=b,s[d]=c;break}}if(s[0]<0)return 0;if(i[0]<1e-6)return e[s[0]].depth;let f=i[0]*2.2,u=0,m=0;for(let c=0;c<3;c++){let b=s[c];if(b<0||i[c]>f)continue;let d=1/(i[c]*i[c]);u+=d*e[b].depth,m+=d}return m>0?u/m:e[s[0]].depth}function Et(e){let t=(o,r)=>Ot(e,o,r),n=(o,r)=>{let i=1/0,s=-1;for(let f=0;f<e.length;f++){let u=e[f];if(Math.hypot(o-u.cx,r-u.cy)-u.radius>=i)continue;let m=Te(u,o,r);m<i&&(i=m,s=f)}return s};return{kind:"rows",rowCount:e.length,rows:e,nearestRow:n,depthAt:t,gradientAt:(o,r)=>{let i=(t(o+.5,r)-t(o-.5,r))/1,s=(t(o,r+.5)-t(o,r-.5))/(2*.5),f=Math.hypot(i,s);return f<1e-9?[0,0]:[i/f,s/f]}}}function Tt(e,t){let n=[];for(let o of e){let r=Ct(o.points,t);r&&n.push(r)}return n.length<2?Rt(t):(n.sort((o,r)=>o.depth-r.depth),Et(n))}function _t(e){return e==="exact-seat"?"Exact seat in the model":e==="row-representative"?"Representative row evidence":e==="section-representative"?"Representative section evidence":e==="floor-representative"?"Representative floor evidence":"Representative venue evidence"}function kt(e){if(!e)return"No assessment date supplied";let t=new Date(e);return Number.isFinite(t.getTime())?`Assessed ${t.toISOString().slice(0,10)}`:"No assessment date supplied"}function jt(e){if(!e)return{headline:"Generated view \xB7 unverified",model:"No geometry or event-configuration verification supplied",reality:"No real-world check supplied",coverage:"Selected chart seat",provenance:"Chart-derived model",freshness:"No evidence date supplied",limitations:["Generated view is not surveyed sightline truth."]};let t=e.evidenceKind==="synthetic-model",n=e.modelLevel==="configuration-verified"?"Event configuration verified":e.modelLevel==="geometry-verified"?"Venue geometry verified":t?"Versioned synthetic model":"Generated model \xB7 not verified",o=e.realityLevel==="actual-build-checked"?"Actual event build reality checked":e.realityLevel==="comparable-build-reference"?"Comparable-build reference only":"No real-world check supplied",r=t?"Synthetic model evidence":e.modelLevel==="configuration-verified"?"Configuration verified":e.modelLevel==="geometry-verified"?"Geometry verified":"Generated view \xB7 unverified",i=[...e.limitations??[],...t?["Synthetic demo; not surveyed or venue-certified."]:[]],s=e.modeledTarget?`${e.modeledTarget.clearRayCount}/${e.modeledTarget.totalRayCount} target rays clear \xB7 ${e.modeledTarget.classification} in bounded model`:void 0;return s&&i.push("Modeled target is not a percentage of the show visible."),{headline:r,model:n,reality:o,coverage:_t(e.coverage),provenance:e.sourceLabel??e.approvedByRole??"Source not supplied",freshness:kt(e.assessedAt),limitations:i,...s?{modeledTarget:s}:{}}}function Lt(e){let t=new Array(e);return Array.from({length:e},(n,o)=>o).sort((n,o)=>Math.abs(2*n-(e-1))-Math.abs(2*o-(e-1))||n-o).forEach((n,o)=>t[n]=o),t}function ie(e,t){let n=e.seatLabelStart??1,o=e.seatNumbering?.direction??"ltr",r=e.seatNumbering?.step??1,i=e.seatNumbering?.scheme??"decimal",s=e.seatNumbering?.prefix??"",f=e.seatNumbering?.endAt,u=e.seatCount;if(i==="updown"||i==="updown-descending"){let l=Math.ceil(u/2),p=i==="updown"?t<l?n+2*t:n-1+2*(u-t):t<l?n+2*(l-1-t):n+1+2*(t-l);return`${s}${p}`}let m=i==="odd"||i==="even"?2:r,c=f!=null&&Number.isFinite(f)?f-(u-1)*m:n,b=o==="center"?Lt(u)[t]:o==="rtl"?u-1-t:t,d;switch(i){case"odd":{let l=c%2===1?c:c+1;d=String(l+b*2);break}case"even":{let l=c%2===0?c:c+1;d=String(l+b*2);break}case"roman":d=de(c+b*r);break;case"letters-upper":d=oe(c+b*r,!1);break;case"letters-lower":d=oe(c+b*r,!0);break;default:d=String(c+b*r);break}return`${s}${d}`}function _e(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function he(e,t,n){return n?.label??`${e.label}-${ie(e,t)}`}function pe(e,t,n,o){if(o?.displayLabel)return o.displayLabel;if(!n)return`${e.displayLabel??e.label}-${ie(e,t)}`;let r=_e(n),i=n.displayOffset+t;return`${n.displayLabel}-${ie(r,i)}`}function Dt(e,t,n){return Math.max(t,Math.min(n,e))}function Nt(e){return Dt(e,0,1)}function ke(e){let t=Nt(e);return t*t*(3-2*t)}var Cn=Math.PI/180;function L(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function me(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}var Y=Math.PI*2;function q(e){return Number.isFinite(e.x)&&Number.isFinite(e.y)}function Ft(e,t,n){let o=t-e;if(n){for(;o<0;)o+=Y;for(;o>=Y;)o-=Y}else{for(;o>0;)o-=Y;for(;o<=-Y;)o+=Y}return o}function Bt(e){return e.end}function ye(e){if(e.version!==1||e.closed!==!0||!q(e.start)||!Array.isArray(e.segments)||e.segments.length<2||e.segments.length>512)return!1;let t=e.start;for(let n of e.segments){if(!n||!q(n.end))return!1;if(n.kind==="line"){if(L(t,n.end)<=1e-9)return!1}else if(n.kind==="bezier"){if(!q(n.control1)||!q(n.control2)||L(t,n.end)<=1e-9)return!1}else if(n.kind==="arc"){if(!q(n.center)||!Number.isFinite(n.radius)||n.radius<=1e-6||Math.abs(L(t,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||Math.abs(L(n.end,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||L(t,n.end)<=1e-9)return!1}else return!1;t=n.end}return L(t,e.start)<=1e-4}function Gt(e,t,n){let o=1-n;return{x:o**3*e.x+3*o**2*n*t.control1.x+3*o*n**2*t.control2.x+n**3*t.end.x,y:o**3*e.y+3*o**2*n*t.control1.y+3*o*n**2*t.control2.y+n**3*t.end.y}}function Ht(e,t=2){if(!ye(e))throw new Error("Section outline path is invalid");let n=Math.max(.25,t),o=[{...e.start}],r=e.start;for(let i of e.segments){if(i.kind==="line")o.push({...i.end});else if(i.kind==="arc"){let s=Math.atan2(r.y-i.center.y,r.x-i.center.x),f=Math.atan2(i.end.y-i.center.y,i.end.x-i.center.x),u=Ft(s,f,i.clockwise),m=Math.max(2,Math.ceil(Math.abs(u)*i.radius/n));for(let c=1;c<=m;c+=1){let b=s+u*c/m;o.push({x:i.center.x+Math.cos(b)*i.radius,y:i.center.y+Math.sin(b)*i.radius})}}else{let s=L(r,i.control1)+L(i.control1,i.control2)+L(i.control2,i.end),f=Math.max(2,Math.ceil(s/n));for(let u=1;u<=f;u+=1)o.push(Gt(r,i,u/f))}r=i.end}return L(o[o.length-1],o[0])<=1e-4&&o.pop(),o}function Ut(e,t,n){return De(e,r=>({x:r.x+t,y:r.y+n}))}function De(e,t,n=1,o=!1){return{...e,start:t(e.start),segments:e.segments.map(r=>r.kind==="line"?{...r,end:t(r.end)}:r.kind==="arc"?{...r,center:t(r.center),radius:r.radius*Math.abs(n),clockwise:o?!r.clockwise:r.clockwise,end:t(r.end)}:{...r,control1:t(r.control1),control2:t(r.control2),end:t(r.end)})}}var Ne=45,be=150,zt=60;function Fe(e){let t=Ne/100;if(e<=t)return be;let n=Math.min(1,(e-t)/(1-t));return be-n*(be-zt)}var je=.5523;function Le(e,t){return Math.abs(e.x-t.x)<=1e-6&&Math.abs(e.y-t.y)<=1e-6}function $t(e){let t=[],n=[];for(e.forEach((o,r)=>{q(o)&&(t.length&&Le(t[t.length-1],o)||(t.push({x:o.x,y:o.y}),n.push(r)))});t.length>1&&Le(t[0],t[t.length-1]);)t.pop(),n.pop();return{points:t,sourceIndex:n}}function Kt(e,t,n){return Ge(e,{cornerSmoothing:t,...n})}var Be=.5,Wt=4/3;function Vt(e,t,n){let o=t.x-e.x,r=t.y-e.y,i=Math.hypot(o,r);if(i<=1e-9)return{kind:"line",end:{...t}};let s=-r/i,f=o/i,u=n*Wt;return{kind:"bezier",control1:{x:e.x+o/3+s*u,y:e.y+r/3+f*u},control2:{x:e.x+o*2/3+s*u,y:e.y+r*2/3+f*u},end:{...t}}}function Ge(e,t){let{points:n,sourceIndex:o}=$t(e),r=n.length;if(r<3)return null;let i=Math.min(100,Math.max(0,t.cornerSmoothing??0))/100,s=t.edgeCurvature,f=new Array(r).fill(0);if(s?.length)for(let a=0;a<r;a+=1){let I=s[o[a]];f[a]=Number.isFinite(I)?Math.min(100,Math.max(-100,I))/100:0}let u=f.some(a=>Math.abs(a)>1e-6);if(i<=0&&!u)return null;let m=t.wideAngleThresholdDeg??Fe(i),c=[];for(let a=0;a<r;a+=1)c[a]=L(n[a],n[(a+1)%r]);let b=new Array(r).fill(0);for(let a=0;a<r;a+=1){let I=n[(a-1+r)%r],S=n[a],R=n[(a+1)%r],_={x:I.x-S.x,y:I.y-S.y},D={x:R.x-S.x,y:R.y-S.y},H=Math.hypot(_.x,_.y),U=Math.hypot(D.x,D.y);if(H<=1e-9||U<=1e-9)continue;let J=Math.min(1,Math.max(-1,(_.x*D.x+_.y*D.y)/(H*U))),M=Math.acos(J)*180/Math.PI;if(M<m)continue;let P=ke((M-m)/(180-m));b[a]=i*P*.5*Math.min(H,U)}for(let a=0;a<r;a+=1){let I=(a+1)%r,S=b[a]+b[I];if(S>c[a]&&S>1e-9){let R=c[a]/S;b[a]*=R,b[I]*=R}}let d=new Array(r),l=new Array(r);for(let a=0;a<r;a+=1){let I=n[(a-1+r)%r],S=n[a],R=n[(a+1)%r];if(b[a]<=1e-6){d[a]={...S},l[a]={...S};continue}let _=L(S,I)||1,D=L(S,R)||1;d[a]={x:S.x+(I.x-S.x)/_*b[a],y:S.y+(I.y-S.y)/_*b[a]},l[a]={x:S.x+(R.x-S.x)/D*b[a],y:S.y+(R.y-S.y)/D*b[a]}}if(b.every(a=>a<=1e-6)&&!u)return null;let p=[],A={...l[0]},h=A,x=(a,I)=>{if(L(h,a)<=1e-9)return;let S=f[I];Math.abs(S)>1e-6?p.push(Vt(h,a,S*Be*c[I])):p.push({kind:"line",end:{...a}}),h=a};for(let a=1;a<=r;a+=1){let I=a%r,S=n[I];x(d[I],(a-1)%r),b[I]>1e-6&&L(d[I],l[I])>1e-9&&(p.push({kind:"bezier",control1:me(d[I],S,je),control2:me(l[I],S,je),end:{...l[I]}}),h=l[I])}if(!p.length)return null;let g=p[p.length-1];L(g.end,A)>1e-9&&(g.kind==="line"?g.end={...A}:p.push({kind:"line",end:{...A}}));let y={version:1,closed:!0,start:A,segments:p};return ye(y)?y:null}function Xt(e){let t=[],n=e.start;for(let r of e.segments)t.push(n),n=r.end;let o=[];for(let r=e.segments.length-1;r>=0;r-=1){let i=e.segments[r],s=t[r];i.kind==="line"?o.push({kind:"line",end:{...s}}):i.kind==="arc"?o.push({kind:"arc",center:{...i.center},radius:i.radius,clockwise:!i.clockwise,end:{...s}}):o.push({kind:"bezier",control1:{...i.control2},control2:{...i.control1},end:{...s}})}return{version:1,closed:!0,start:{...e.start},segments:o}}function He(e,t){let n=1-t,o=n*n*n,r=3*n*n*t,i=3*n*t*t,s=t*t*t;return{x:o*e.start.x+r*e.control1.x+i*e.control2.x+s*e.end.x,y:o*e.start.y+r*e.control1.y+i*e.control2.y+s*e.end.y}}function Ue(e,t,n=192){if(!Number.isInteger(t)||t<1)throw new Error("Path point count must be a positive integer");if(t===1)return[He(e,.5)];let o=Array.from({length:n+1},(u,m)=>He(e,m/n)),r=new Float64Array(o.length);for(let u=1;u<o.length;u+=1){let m=o[u].x-o[u-1].x,c=o[u].y-o[u-1].y;r[u]=r[u-1]+Math.hypot(m,c)}let i=r[r.length-1];if(i<=1e-9)return Array.from({length:t},()=>({...e.start}));let s=[],f=1;for(let u=0;u<t;u+=1){let m=i*u/(t-1);for(;f<r.length-1&&r[f]<m;)f+=1;let c=r[f-1],b=r[f],d=b===c?0:(m-c)/(b-c);s.push({x:o[f-1].x+(o[f].x-o[f-1].x)*d,y:o[f-1].y+(o[f].y-o[f-1].y)*d})}return s}var $e=.02291666666666667,jn=1/$e,Yt=58,Se=Yt*$e;var qt=3,ze=0,xe=120,Jt=0,Qt=45,Zt=7;function ge(e,t,n,o){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):o}function en(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=Zt?e:qt}function Ke(e,t={}){let n=ge(t.floorBaseHeightM,ze,xe,0),o=Math.min(xe,n+en(e.elevation)*Se),r=e.height===void 0?o:ge(e.height,ze,xe,o),i=ge(e.rake,Jt,Qt,0);return{height:r,rake:i}}function Ye(e){return e?e.accessibility&&e.accessibility.length?e.wheelchairSpaceType&&!e.accessibility.includes("wheelchair")?["wheelchair",...e.accessibility]:e.accessibility:e.wheelchairSpaceType?["wheelchair"]:e.accessible?["wheelchair"]:[]:[]}var se=Math.PI/180;var Z=16;function we(e,t,n,o){let r=n*se,i=Math.cos(r),s=Math.sin(r);return{x:o.x+e*i-t*s,y:o.y+e*s+t*i}}function tn(e){let{seatCount:t,seatSpacing:n,curve:o,rotation:r,origin:i}=e,s=[];if(e.path)return Ue(e.path,t);if(t<=1)return t===1&&s.push({x:i.x,y:i.y}),s;if(o===0){for(let m=0;m<t;m++)s.push(we(m*n,0,r,i));return s}let f=o/(t-1)*se,u=n/(2*Math.sin(Math.abs(f)/2));for(let m=0;m<t;m++){let c=m*f,b=u*Math.sin(c),d=-u+u*Math.cos(c);s.push(we(b,d,r,i))}return s}function nn(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function on(e,t){let n=nn(e);return tn(e).map((o,r)=>{let i=n.get(r),s=Ye(i),f=he(e,r,i),u={...e.commercial,...i?.commercial};return{index:r,x:o.x+(i?.dx??0),y:o.y+(i?.dy??0),label:f,displayLabel:pe(e,r,t,i),categoryKey:i?.categoryKey??e.categoryKey,skipped:!!i?.skip,accessible:s.length>0,accessibility:s,wheelchairSpaceType:i?.wheelchairSpaceType,commercial:Object.values(u).some(m=>m!==void 0&&m!==!1&&m!=="")?u:void 0,glyph:i?.glyph,viewUrl:i?.viewFromSeatUrl??e.viewFromSeatUrl,viewMeta:i?.viewFromSeatUrl?i.viewFromSeatMeta:e.viewFromSeatMeta,labelStyle:i?.labelStyle}})}function ve(e){let t=[];for(let n of on(e))n.skipped||t.push({id:`${e.id}:${n.index}`,label:n.label,displayLabel:n.displayLabel===n.label?void 0:n.displayLabel,x:n.x,y:n.y,rowId:e.id,categoryKey:n.categoryKey,accessible:n.accessible||void 0,accessibility:n.accessibility.length?n.accessibility:void 0,wheelchairSpaceType:n.wheelchairSpaceType,commercial:n.commercial,glyph:n.glyph,viewUrl:n.viewUrl,viewMeta:n.viewMeta,labelStyle:n.labelStyle});return t}function rn(e){if(e.seatCountsBySide)return{...e.seatCountsBySide};let t=e.sides&&e.sides.length?e.sides:["top","bottom"],n=["top","bottom","left","right"].filter(i=>t.includes(i)),o={top:0,bottom:0,left:0,right:0};if(!n.length)return o;let r=Math.max(0,Math.round(e.seatCount));for(let i=0;i<r;i++)o[n[i%n.length]]+=1;return o}function sn(e){let t=[],n=Math.max(0,Math.round(e.seatCount));if(n===0)return t;let o=new Map((e.overrides??[]).map(c=>[c.index,c])),r=(c,b,d,l)=>{let p=o.get(c),A=Ye(p),h=p?.label??`${e.label}-${c+1}`,x=e.displayLabel??e.label;return{index:c,label:h,displayLabel:p?.displayLabel??`${x}-${c+1}`,x:b+(p?.dx??0),y:d+(p?.dy??0),categoryKey:p?.categoryKey??e.categoryKey,skipped:!!p?.skip,accessible:A.length>0,accessibility:A,wheelchairSpaceType:p?.wheelchairSpaceType,commercial:p?.commercial,glyph:p?.glyph,viewUrl:p?.viewFromSeatUrl,viewMeta:p?.viewFromSeatUrl?p.viewFromSeatMeta:void 0,labelStyle:p?.labelStyle,...l?{side:l}:{}}};if(e.shape==="round"){let c=(e.radius??40)+Z,b=e.rotation*se,d=Math.max(0,Math.min(360,e.seatArc??360));if(d>=360||n===1){for(let h=0;h<n;h++){let x=b+h/n*2*Math.PI;t.push(r(h,e.center.x+c*Math.cos(x),e.center.y+c*Math.sin(x)))}return t}let l=d*se,p=(2*Math.PI-l)/2,A=b+p;for(let h=0;h<n;h++){let x=A+h/(n-1)*l;t.push(r(h,e.center.x+c*Math.cos(x),e.center.y+c*Math.sin(x)))}return t}let i=e.width??80,s=e.height??50,f=rn(e),u=["top","bottom","left","right"],m=0;for(let c of u){let b=f[c];for(let d=0;d<b;d++){let l,p;c==="top"?(l=-i/2+(d+.5)*i/b,p=-s/2-Z):c==="bottom"?(l=-i/2+(d+.5)*i/b,p=s/2+Z):c==="left"?(l=-i/2-Z,p=-s/2+(d+.5)*s/b):(l=i/2+Z,p=-s/2+(d+.5)*s/b);let A=we(l,p,e.rotation,e.center);t.push(r(m++,A.x,A.y,c))}}return t}function qe(e){return sn(e).filter(t=>!t.skipped).map(t=>({id:`${e.id}:${t.index}`,label:t.label,...t.displayLabel!==t.label?{displayLabel:t.displayLabel}:{},x:t.x,y:t.y,rowId:e.id,categoryKey:t.categoryKey,...t.accessible?{accessible:!0}:{},...t.accessibility.length?{accessibility:t.accessibility}:{},...t.wheelchairSpaceType?{wheelchairSpaceType:t.wheelchairSpaceType}:{},...t.commercial?{commercial:t.commercial}:{},...t.glyph?{glyph:t.glyph}:{},...t.viewUrl?{viewUrl:t.viewUrl}:{},...t.viewUrl&&t.viewMeta?{viewMeta:t.viewMeta}:{},...t.labelStyle?{labelStyle:t.labelStyle}:{}}))}function Je(e){return[{id:`${e.id}:0`,label:e.label,...e.displayLabel&&e.displayLabel!==e.label?{displayLabel:e.displayLabel}:{},x:e.center.x,y:e.center.y,rowId:e.id,categoryKey:e.categoryKey,kind:"booth"}]}function We(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,s=t[o].y,f=t[r].x,u=t[r].y;s>e.y!=u>e.y&&e.x<(f-i)*(e.y-s)/(u-s)+i&&(n=!n)}return n}function cn(e,t){return t.some((n,o)=>{let r=t[(o+1)%t.length],i=(e.y-n.y)*(r.x-n.x)-(e.x-n.x)*(r.y-n.y);if(Math.abs(i)>1e-7)return!1;let s=(e.x-n.x)*(r.x-n.x)+(e.y-n.y)*(r.y-n.y),f=(r.x-n.x)**2+(r.y-n.y)**2;return s>=-1e-7&&s<=f+1e-7})}function Ve(e,t,n){return We(e,t)&&!(n??[]).some(o=>We(e,o)||cn(e,o))}function Me(e){if(!e.length)return{x:0,y:0};let t=0,n=0;for(let o of e)t+=o.x,n+=o.y;return{x:t/e.length,y:n/e.length}}function an(e){switch(e.type){case"row":{let t=ve(e);if(!t.length)return{x:e.origin.x,y:e.origin.y};let n=0,o=0;for(let r of t)n+=r.x,o+=r.y;return{x:n/t.length,y:o/t.length}}case"table":case"booth":return{x:e.center.x,y:e.center.y};case"gaArea":return Me(e.points);case"section":return Me(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?Me(e.points):e.x!=null&&e.y!=null&&e.width!=null&&e.height!=null?{x:e.x+e.width/2,y:e.y+e.height/2}:{x:e.x??0,y:e.y??0};case"decorImage":return{x:e.x+e.width/2,y:e.y+e.height/2}}}function Xe(e,t){return e.length===t.length&&e.every((n,o)=>n.x===t[o].x&&n.y===t[o].y)}function ln(e,t){if(e.type!=="gaArea"||!Xe(e.points,t.outline))return!1;let n=e.holes??[],o=t.holes??[];return n.length===o.length&&n.every((r,i)=>Xe(r,o[i]))}function Qe(e,t){let n=e.filter(s=>s.type==="section"),o="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0,r=an(t);return(o?n.find(s=>(s.logicalSectionId??s.id)===o&&(ln(t,s)||Ve(r,s.outline,s.holes))):void 0)??n.find(s=>Ve(r,s.outline,s.holes))}function Ze(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}var un="__sl_ga__",Pe=1e5;function fn(e,t){return`${un}${encodeURIComponent(e)}__${t+1}`}function dn(e){let t=e.inventorySegments;if(t===void 0)return!0;if(!Array.isArray(t)||t.length<1||t.length>256)return!1;let n=0,o=new Map;for(let r of t){if(!r||typeof r.sourceAreaId!="string"||!r.sourceAreaId.trim()||r.sourceAreaId.length>160||!Number.isInteger(r.startIndex)||r.startIndex<0||!Number.isInteger(r.count)||r.count<1||r.startIndex+r.count>Pe||(n+=r.count,n>Pe))return!1;let i=o.get(r.sourceAreaId)??[],s=r.startIndex+r.count;if(i.some(f=>r.startIndex<f.end&&s>f.start))return!1;i.push({start:r.startIndex,end:s}),o.set(r.sourceAreaId,i)}return n===e.capacity}function hn(e){let t=Math.min(Pe,Math.max(0,Math.floor(e.capacity)));return e.inventorySegments===void 0?t?[{sourceAreaId:e.id,startIndex:0,count:t}]:[]:dn(e)?e.inventorySegments.map(n=>({...n})):[]}function et(e){return hn(e).flatMap(t=>Array.from({length:t.count},(n,o)=>fn(t.sourceAreaId,t.startIndex+o)))}var ce="__ungrouped__";function pn(e){return e.type==="row"?ve(e).map(t=>t.label):e.type==="table"?qe(e).map(t=>t.label):e.type==="booth"?Je(e).map(t=>t.label):e.type==="gaArea"?et(e):[]}function mn(e){return e.type==="row"||e.type==="table"||e.type==="booth"||e.type==="gaArea"}function tt(e){let t=Ze(e),n=t.filter(s=>s.type==="section"),o=new Map;for(let s of n){let f=s.logicalSectionId??s.id;o.get(f)||o.set(f,{id:f,label:s.displayLabel||s.label||"Section",zone:s.zone,seatCount:0,objectIds:[],seatLabels:[]})}let r={id:ce,label:"Other seats",seatCount:0,objectIds:[],seatLabels:[]},i=new Map;for(let s of t){if(!mn(s))continue;let f=pn(s);if(f.length===0)continue;let u=Qe(t,s),m=u?o.get(u.logicalSectionId??u.id):r;m.seatCount+=f.length,m.objectIds.push(s.id),m.seatLabels.push(...f),i.set(s.id,m.id)}return{sections:[...o.values()],ungrouped:r.objectIds.length?r:null,objectToSection:i}}function nt(e,t){return t.has(e.id)||!!e.logicalSectionId&&t.has(e.logicalSectionId)||!!e.zone&&t.has(e.zone)}function ot(e,t){let n=new Set;if(!t.size)return n;let{sections:o,ungrouped:r,objectToSection:i}=tt(e),s=new Set,f=new Map(o.map(m=>[m.id,m.zone]));for(let m of o){let c=f.get(m.id);(t.has(m.id)||c&&t.has(c))&&s.add(m.id)}let u=!!r&&t.has(ce);for(let[m,c]of i)(s.has(c)||u&&c===ce)&&n.add(m);return n}function bn(e,t){if(!t.size)return e;let n=ot(e,t),o=t instanceof Set?t:new Set(t),r=s=>!(n.has(s.id)||s.type==="section"&&nt(s,o));if(e.floors&&e.floors.length){let s=!1,f=e.floors.map(u=>{let m=u.objects.filter(r);return m.length!==u.objects.length&&(s=!0),m.length===u.objects.length?u:{...u,objects:m}});return s?{...e,floors:f,objects:f[0].objects}:e}let i=e.objects.filter(r);return i.length===e.objects.length?e:{...e,objects:i}}0&&(module.exports={DEFAULT_SECTION_CORNER_SMOOTHING,MAX_EDGE_SAGITTA_RATIO,TIER_HEIGHT_M,UNGROUPED_ID,applyHidden,arcLevelAt,bearingDeg,buildSectionRake,computeSections,cornerSmoothingThresholdDeg,distanceToPolyline,fitBowlProfile,fitCircle,hiddenObjectIds,indexLabel,isSectionHidden,logicalNumberingRow,relabelRows,resolveSection,reverseSectionOutlinePath,sampleSectionOutlinePath,seatConfidenceDisclosure,seatDisplayLabel,seatInventoryLabel,seatLabelPart,sectionCornerSmoothingPath,sectionGeometry,sectionOutlinePathFrom,sectionPathSegmentEnd,toBijectiveBase,toLetters,toRoman,transformSectionOutlinePath,translateSectionOutlinePath,validSectionOutlinePath});
@@ -1,9 +1,9 @@
1
- import { P as Point, R as RowObject, S as SeatOverride } from '../../types-Db9rXT14.cjs';
2
- export { D as DEFAULT_SECTION_CORNER_SMOOTHING, M as MAX_EDGE_SAGITTA_RATIO, R as RelabelOptions, S as SectionOutlineDerivation, i as indexLabel, r as relabelRows, a as reverseSectionOutlinePath, s as sampleSectionOutlinePath, b as sectionCornerSmoothingPath, c as sectionOutlinePathFrom, d as sectionPathSegmentEnd, t as toBijectiveBase, e as toLetters, f as toRoman, g as transformSectionOutlinePath, h as translateSectionOutlinePath, v as validSectionOutlinePath } from '../../labeling-iVwhgoip.cjs';
1
+ import { P as Point, R as RowObject, S as SeatOverride } from '../../types-DmgX-iuD.cjs';
2
+ export { D as DEFAULT_SECTION_CORNER_SMOOTHING, M as MAX_EDGE_SAGITTA_RATIO, R as RelabelOptions, S as SectionOutlineDerivation, c as cornerSmoothingThresholdDeg, i as indexLabel, r as relabelRows, a as reverseSectionOutlinePath, s as sampleSectionOutlinePath, b as sectionCornerSmoothingPath, d as sectionOutlinePathFrom, e as sectionPathSegmentEnd, t as toBijectiveBase, f as toLetters, g as toRoman, h as transformSectionOutlinePath, j as translateSectionOutlinePath, v as validSectionOutlinePath } from '../../labeling-DRFC35VK.cjs';
3
3
  export { SeatConfidenceDisclosure, seatConfidenceDisclosure } from '../seatConfidence.cjs';
4
- import { S as SegmentedRowPlacement } from '../../segmentedRowModel-s157HmRp.cjs';
5
- export { A as AvailabilityRule, S as SectionNode, T as TIER_HEIGHT_M, U as UNGROUPED_ID, a as applyHidden, c as computeSections, h as hiddenObjectIds, i as isSectionHidden, s as sectionGeometry } from '../../sections-Dmjtj1BQ.cjs';
6
- import { E as ExpandedSeat } from '../../renderer-QnB3a1yh.cjs';
4
+ import { S as SegmentedRowPlacement } from '../../segmentedRowModel-BQYSdf7k.cjs';
5
+ export { A as AvailabilityRule, S as SectionNode, T as TIER_HEIGHT_M, U as UNGROUPED_ID, a as applyHidden, c as computeSections, h as hiddenObjectIds, i as isSectionHidden, s as sectionGeometry } from '../../sections-D2bxgVgg.cjs';
6
+ import { E as ExpandedSeat } from '../../renderer-BNzVBOBW.cjs';
7
7
 
8
8
  /**
9
9
  * THE bowl resolver — whether a floor's stands wrap a centre, and the smooth
@@ -1,9 +1,9 @@
1
- import { P as Point, R as RowObject, S as SeatOverride } from '../../types-Db9rXT14.js';
2
- export { D as DEFAULT_SECTION_CORNER_SMOOTHING, M as MAX_EDGE_SAGITTA_RATIO, R as RelabelOptions, S as SectionOutlineDerivation, i as indexLabel, r as relabelRows, a as reverseSectionOutlinePath, s as sampleSectionOutlinePath, b as sectionCornerSmoothingPath, c as sectionOutlinePathFrom, d as sectionPathSegmentEnd, t as toBijectiveBase, e as toLetters, f as toRoman, g as transformSectionOutlinePath, h as translateSectionOutlinePath, v as validSectionOutlinePath } from '../../labeling-BPCTQfDG.js';
1
+ import { P as Point, R as RowObject, S as SeatOverride } from '../../types-DmgX-iuD.js';
2
+ export { D as DEFAULT_SECTION_CORNER_SMOOTHING, M as MAX_EDGE_SAGITTA_RATIO, R as RelabelOptions, S as SectionOutlineDerivation, c as cornerSmoothingThresholdDeg, i as indexLabel, r as relabelRows, a as reverseSectionOutlinePath, s as sampleSectionOutlinePath, b as sectionCornerSmoothingPath, d as sectionOutlinePathFrom, e as sectionPathSegmentEnd, t as toBijectiveBase, f as toLetters, g as toRoman, h as transformSectionOutlinePath, j as translateSectionOutlinePath, v as validSectionOutlinePath } from '../../labeling-DTHo03rf.js';
3
3
  export { SeatConfidenceDisclosure, seatConfidenceDisclosure } from '../seatConfidence.js';
4
- import { S as SegmentedRowPlacement } from '../../segmentedRowModel-CO6Jogaa.js';
5
- export { A as AvailabilityRule, S as SectionNode, T as TIER_HEIGHT_M, U as UNGROUPED_ID, a as applyHidden, c as computeSections, h as hiddenObjectIds, i as isSectionHidden, s as sectionGeometry } from '../../sections-9_Ka3i-z.js';
6
- import { E as ExpandedSeat } from '../../renderer-Bo9JzqMA.js';
4
+ import { S as SegmentedRowPlacement } from '../../segmentedRowModel-Cl3X8SKt.js';
5
+ export { A as AvailabilityRule, S as SectionNode, T as TIER_HEIGHT_M, U as UNGROUPED_ID, a as applyHidden, c as computeSections, h as hiddenObjectIds, i as isSectionHidden, s as sectionGeometry } from '../../sections-BrQV1WzI.js';
6
+ import { E as ExpandedSeat } from '../../renderer-Bhc5CgOS.js';
7
7
 
8
8
  /**
9
9
  * THE bowl resolver — whether a floor's stands wrap a centre, and the smooth
@@ -1 +1 @@
1
- import{a as D}from"../../chunk-EQM4FFN5.js";import{a as E,b as F,c as G,d as H}from"../../chunk-VOJMGPDK.js";import{j as y,k as z,l as A,m as B,n as C}from"../../chunk-ATFAQDPR.js";import{A as e,B as f,C as m,D as p,E as t,F as x,G as a,H as b,M as c,N as d,O as g,P as h,Q as i,R as j,S as k,T as l,U as n,X as q,fa as s,ga as u,ha as v,ia as w,y as o,z as r}from"../../chunk-CNCFI5RT.js";export{p as DEFAULT_SECTION_CORNER_SMOOTHING,x as MAX_EDGE_SAGITTA_RATIO,q as TIER_HEIGHT_M,y as UNGROUPED_ID,C as applyHidden,H as arcLevelAt,F as bearingDeg,E as buildSectionRake,z as computeSections,u as distanceToPolyline,G as fitBowlProfile,v as fitCircle,B as hiddenObjectIds,d as indexLabel,A as isSectionHidden,k as logicalNumberingRow,i as relabelRows,w as resolveSection,b as reverseSectionOutlinePath,e as sampleSectionOutlinePath,D as seatConfidenceDisclosure,n as seatDisplayLabel,l as seatInventoryLabel,j as seatLabelPart,t as sectionCornerSmoothingPath,s as sectionGeometry,a as sectionOutlinePathFrom,o as sectionPathSegmentEnd,c as toBijectiveBase,g as toLetters,h as toRoman,m as transformSectionOutlinePath,f as translateSectionOutlinePath,r as validSectionOutlinePath};
1
+ import{a as E}from"../../chunk-EQM4FFN5.js";import{a as F,b as G,c as H,d as I}from"../../chunk-QHWOX6PN.js";import{j as z,k as A,l as B,m as C,n as D}from"../../chunk-YPVY3Z5S.js";import{A as e,B as f,C as m,D as p,E as t,F as x,G as a,H as b,I as c,N as d,O as g,P as h,Q as i,R as j,S as k,T as l,U as n,V as q,Y as s,ga as u,ha as v,ia as w,ja as y,y as o,z as r}from"../../chunk-RZLIIQDP.js";export{p as DEFAULT_SECTION_CORNER_SMOOTHING,a as MAX_EDGE_SAGITTA_RATIO,s as TIER_HEIGHT_M,z as UNGROUPED_ID,D as applyHidden,I as arcLevelAt,G as bearingDeg,F as buildSectionRake,A as computeSections,t as cornerSmoothingThresholdDeg,v as distanceToPolyline,H as fitBowlProfile,w as fitCircle,C as hiddenObjectIds,g as indexLabel,B as isSectionHidden,l as logicalNumberingRow,j as relabelRows,y as resolveSection,c as reverseSectionOutlinePath,e as sampleSectionOutlinePath,E as seatConfidenceDisclosure,q as seatDisplayLabel,n as seatInventoryLabel,k as seatLabelPart,x as sectionCornerSmoothingPath,u as sectionGeometry,b as sectionOutlinePathFrom,o as sectionPathSegmentEnd,d as toBijectiveBase,h as toLetters,i as toRoman,m as transformSectionOutlinePath,f as translateSectionOutlinePath,r as validSectionOutlinePath};