@seatlayer/core 0.86.11 → 0.86.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/{categoryInventory-D57yq6dR.d.cts → categoryInventory-B0KvSYoo.d.cts} +1 -1
  2. package/dist/{categoryInventory-DTYZCenv.d.ts → categoryInventory-wwMLFGpY.d.ts} +1 -1
  3. package/dist/{chunk-D5M3SNMM.js → chunk-5FKSCROJ.js} +1 -1
  4. package/dist/chunk-A727XBEQ.js +1 -0
  5. package/dist/chunk-LGD23R46.js +1 -0
  6. package/dist/{chunk-OTN5IFWY.js → chunk-QKW67ENQ.js} +1 -1
  7. package/dist/core/chart-ops/index.cjs +1 -1
  8. package/dist/core/chart-ops/index.d.cts +10 -4
  9. package/dist/core/chart-ops/index.d.ts +10 -4
  10. package/dist/core/chart-ops/index.js +1 -1
  11. package/dist/core/inventory/index.cjs +1 -1
  12. package/dist/core/inventory/index.d.cts +8 -4
  13. package/dist/core/inventory/index.d.ts +8 -4
  14. package/dist/core/inventory/index.js +1 -1
  15. package/dist/core/layout/index.d.cts +5 -5
  16. package/dist/core/layout/index.d.ts +5 -5
  17. package/dist/core/layout/index.js +1 -1
  18. package/dist/core/quality/index.d.cts +3 -3
  19. package/dist/core/quality/index.d.ts +3 -3
  20. package/dist/core/render-assets/index.cjs +1 -1
  21. package/dist/core/render-assets/index.d.cts +2 -2
  22. package/dist/core/render-assets/index.d.ts +2 -2
  23. package/dist/core/render-assets/index.js +1 -1
  24. package/dist/core/seatConfidence.d.cts +1 -1
  25. package/dist/core/seatConfidence.d.ts +1 -1
  26. package/dist/core/sections/index.d.cts +5 -5
  27. package/dist/core/sections/index.d.ts +5 -5
  28. package/dist/{eventConfigurations-Dw3rQPPx.d.cts → eventConfigurations-5MITEoYq.d.cts} +1 -1
  29. package/dist/{eventConfigurations-wgXC-YJV.d.ts → eventConfigurations-B_oyAnQJ.d.ts} +1 -1
  30. package/dist/index.cjs +1 -1
  31. package/dist/index.d.cts +13 -13
  32. package/dist/index.d.ts +13 -13
  33. package/dist/index.js +1 -1
  34. package/dist/{labeling-dukb8qMr.d.cts → labeling-C2uHHKqR.d.cts} +1 -1
  35. package/dist/{labeling-CYPm5UH0.d.ts → labeling-DowKpbr4.d.ts} +1 -1
  36. package/dist/{renderedQuality-BuZsXn3h.d.ts → renderedQuality-C25_-3lx.d.ts} +1 -1
  37. package/dist/{renderedQuality-DuYUhFbT.d.cts → renderedQuality-o5FIQP-N.d.cts} +1 -1
  38. package/dist/{renderer-B2uo9TlL.d.ts → renderer-CqA6pY-I.d.ts} +1 -1
  39. package/dist/{renderer-BnidPieD.d.cts → renderer-YNIUt88N.d.cts} +1 -1
  40. package/dist/{seatTypeIcons-2Jiehd_M.d.ts → seatTypeIcons-Ca5m7KWr.d.ts} +1 -1
  41. package/dist/{seatTypeIcons-R6pp6eSj.d.cts → seatTypeIcons-CiA-NOOT.d.cts} +1 -1
  42. package/dist/{sections-yW4KBAKQ.d.cts → sections-BpEpJ8vL.d.cts} +1 -1
  43. package/dist/{sections-BiCA47--.d.ts → sections-CfifAi5J.d.ts} +1 -1
  44. package/dist/{segmentedRowModel-ChRMKKxC.d.ts → segmentedRowModel-BH1BR9_y.d.ts} +1 -1
  45. package/dist/{segmentedRowModel-DgZ-j0cp.d.cts → segmentedRowModel-ehEy4hLF.d.cts} +1 -1
  46. package/dist/{tableSizing-Sr9fm8g5.d.ts → tableSizing-CRMSjgVz.d.ts} +3 -3
  47. package/dist/{tableSizing-Ca0vDrxf.d.cts → tableSizing-ClqA5rok.d.cts} +3 -3
  48. package/dist/{ticketRestrictions-Dsv2W_4o.d.cts → ticketRestrictions-CsPF1iNV.d.cts} +2 -2
  49. package/dist/{ticketRestrictions-C8ylaoRm.d.ts → ticketRestrictions-D4WptSo6.d.ts} +2 -2
  50. package/dist/{types-bJU5OwWf.d.cts → types-lCbuCoX6.d.cts} +17 -4
  51. package/dist/{types-bJU5OwWf.d.ts → types-lCbuCoX6.d.ts} +17 -4
  52. package/dist/view3d/crossfade/panorama.d.cts +1 -1
  53. package/dist/view3d/crossfade/panorama.d.ts +1 -1
  54. package/dist/view3d/index.d.cts +3 -3
  55. package/dist/view3d/index.d.ts +3 -3
  56. package/package.json +1 -1
  57. package/dist/chunk-7LMW7QTP.js +0 -1
  58. package/dist/chunk-NJTU4QK7.js +0 -1
@@ -1,4 +1,4 @@
1
- import { g as SectionOutlinePath, P as Point, h as SectionPathSegment } from './types-bJU5OwWf.cjs';
1
+ import { g as SectionOutlinePath, P as Point, h as SectionPathSegment } from './types-lCbuCoX6.cjs';
2
2
 
3
3
  declare function sectionPathSegmentEnd(segment: SectionPathSegment): Point;
4
4
  /** Validate finite, continuous closed-path geometry without trusting renderer
@@ -1,4 +1,4 @@
1
- import { g as SectionOutlinePath, P as Point, h as SectionPathSegment } from './types-bJU5OwWf.js';
1
+ import { g as SectionOutlinePath, P as Point, h as SectionPathSegment } from './types-lCbuCoX6.js';
2
2
 
3
3
  declare function sectionPathSegmentEnd(segment: SectionPathSegment): Point;
4
4
  /** Validate finite, continuous closed-path geometry without trusting renderer
@@ -1,4 +1,4 @@
1
- import { R as RendererQualityEvidence, a as RenderedFreeTextEvidence } from './renderer-B2uo9TlL.js';
1
+ import { R as RendererQualityEvidence, a as RenderedFreeTextEvidence } from './renderer-CqA6pY-I.js';
2
2
 
3
3
  declare const RENDERED_QUALITY_REPORT_VERSION = 3;
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { R as RendererQualityEvidence, a as RenderedFreeTextEvidence } from './renderer-BnidPieD.cjs';
1
+ import { R as RendererQualityEvidence, a as RenderedFreeTextEvidence } from './renderer-YNIUt88N.cjs';
2
2
 
3
3
  declare const RENDERED_QUALITY_REPORT_VERSION = 3;
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { P as Point, A as AccessibilityType, b as SeatCommercialAttributes, c as SeatViewMetadata, d as ResolvedSeatConfidenceEvidence, L as LabelStyle, e as SeatGlyphKind, C as ChartDoc, F as FloorLabelStyle } from './types-bJU5OwWf.js';
1
+ import { P as Point, A as AccessibilityType, b as SeatCommercialAttributes, c as SeatViewMetadata, d as ResolvedSeatConfidenceEvidence, L as LabelStyle, e as SeatGlyphKind, C as ChartDoc, F as FloorLabelStyle } from './types-lCbuCoX6.js';
2
2
 
3
3
  interface ExpandedSeat {
4
4
  /** Stable id: `${rowId}:${index}` */
@@ -1,4 +1,4 @@
1
- import { P as Point, A as AccessibilityType, b as SeatCommercialAttributes, c as SeatViewMetadata, d as ResolvedSeatConfidenceEvidence, L as LabelStyle, e as SeatGlyphKind, C as ChartDoc, F as FloorLabelStyle } from './types-bJU5OwWf.cjs';
1
+ import { P as Point, A as AccessibilityType, b as SeatCommercialAttributes, c as SeatViewMetadata, d as ResolvedSeatConfidenceEvidence, L as LabelStyle, e as SeatGlyphKind, C as ChartDoc, F as FloorLabelStyle } from './types-lCbuCoX6.cjs';
2
2
 
3
3
  interface ExpandedSeat {
4
4
  /** Stable id: `${rowId}:${index}` */
@@ -1,4 +1,4 @@
1
- import { A as AccessibilityType, S as SeatCommercialMark } from './types-bJU5OwWf.js';
1
+ import { A as AccessibilityType, S as SeatCommercialMark } from './types-lCbuCoX6.js';
2
2
 
3
3
  /**
4
4
  * ONE icon set for per-seat attributes, shared by every surface that names one.
@@ -1,4 +1,4 @@
1
- import { A as AccessibilityType, S as SeatCommercialMark } from './types-bJU5OwWf.cjs';
1
+ import { A as AccessibilityType, S as SeatCommercialMark } from './types-lCbuCoX6.cjs';
2
2
 
3
3
  /**
4
4
  * ONE icon set for per-seat attributes, shared by every surface that names one.
@@ -1,4 +1,4 @@
1
- import { i as SectionObject, C as ChartDoc } from './types-bJU5OwWf.cjs';
1
+ import { i as SectionObject, C as ChartDoc } from './types-lCbuCoX6.cjs';
2
2
 
3
3
  /**
4
4
  * Real-world scale primitives — the ONE place the app fixes chart-unit ↔ metre ↔
@@ -1,4 +1,4 @@
1
- import { i as SectionObject, C as ChartDoc } from './types-bJU5OwWf.js';
1
+ import { i as SectionObject, C as ChartDoc } from './types-lCbuCoX6.js';
2
2
 
3
3
  /**
4
4
  * Real-world scale primitives — the ONE place the app fixes chart-unit ↔ metre ↔
@@ -1,4 +1,4 @@
1
- import { P as Point, R as RowObject, a as ChartObject } from './types-bJU5OwWf.js';
1
+ import { P as Point, R as RowObject, a as ChartObject } from './types-lCbuCoX6.js';
2
2
 
3
3
  /**
4
4
  * The segmented-row model — one logical row made of several physical rows.
@@ -1,4 +1,4 @@
1
- import { P as Point, R as RowObject, a as ChartObject } from './types-bJU5OwWf.cjs';
1
+ import { P as Point, R as RowObject, a as ChartObject } from './types-lCbuCoX6.cjs';
2
2
 
3
3
  /**
4
4
  * The segmented-row model — one logical row made of several physical rows.
@@ -1,6 +1,6 @@
1
- import { F as FloorLabelStyle, P as Point, C as ChartDoc, A as AccessibilityType, l as SeatOverride, R as RowObject, e as SeatGlyphKind, c as SeatViewMetadata, L as LabelStyle, m as RectTableSide, a as ChartObject, B as BoothObject, T as TableObject, n as Floor, i as SectionObject, o as RectTableSeatCounts } from './types-bJU5OwWf.js';
2
- import { S as SegmentedRowPlacement } from './segmentedRowModel-ChRMKKxC.js';
3
- import { E as ExpandedSeat } from './renderer-B2uo9TlL.js';
1
+ import { F as FloorLabelStyle, P as Point, C as ChartDoc, A as AccessibilityType, l as SeatOverride, R as RowObject, e as SeatGlyphKind, c as SeatViewMetadata, L as LabelStyle, m as RectTableSide, a as ChartObject, B as BoothObject, T as TableObject, n as Floor, i as SectionObject, o as RectTableSeatCounts } from './types-lCbuCoX6.js';
2
+ import { S as SegmentedRowPlacement } from './segmentedRowModel-BH1BR9_y.js';
3
+ import { E as ExpandedSeat } from './renderer-CqA6pY-I.js';
4
4
 
5
5
  /**
6
6
  * The buyer's "All floors" view: one venue, read bottom to top.
@@ -1,6 +1,6 @@
1
- import { F as FloorLabelStyle, P as Point, C as ChartDoc, A as AccessibilityType, l as SeatOverride, R as RowObject, e as SeatGlyphKind, c as SeatViewMetadata, L as LabelStyle, m as RectTableSide, a as ChartObject, B as BoothObject, T as TableObject, n as Floor, i as SectionObject, o as RectTableSeatCounts } from './types-bJU5OwWf.cjs';
2
- import { S as SegmentedRowPlacement } from './segmentedRowModel-DgZ-j0cp.cjs';
3
- import { E as ExpandedSeat } from './renderer-BnidPieD.cjs';
1
+ import { F as FloorLabelStyle, P as Point, C as ChartDoc, A as AccessibilityType, l as SeatOverride, R as RowObject, e as SeatGlyphKind, c as SeatViewMetadata, L as LabelStyle, m as RectTableSide, a as ChartObject, B as BoothObject, T as TableObject, n as Floor, i as SectionObject, o as RectTableSeatCounts } from './types-lCbuCoX6.cjs';
2
+ import { S as SegmentedRowPlacement } from './segmentedRowModel-ehEy4hLF.cjs';
3
+ import { E as ExpandedSeat } from './renderer-YNIUt88N.cjs';
4
4
 
5
5
  /**
6
6
  * The buyer's "All floors" view: one venue, read bottom to top.
@@ -1,5 +1,5 @@
1
- import { C as ChartDoc, G as GAAreaObject, j as GAInventorySegment, k as CategoryTier } from './types-bJU5OwWf.cjs';
2
- import { E as ExpandedSeat } from './renderer-BnidPieD.cjs';
1
+ import { C as ChartDoc, G as GAAreaObject, j as GAInventorySegment, k as CategoryTier } from './types-lCbuCoX6.cjs';
2
+ import { E as ExpandedSeat } from './renderer-YNIUt88N.cjs';
3
3
 
4
4
  declare const MAX_GA_CAPACITY = 100000;
5
5
  declare const MAX_EVENT_INVENTORY = 100000;
@@ -1,5 +1,5 @@
1
- import { C as ChartDoc, G as GAAreaObject, j as GAInventorySegment, k as CategoryTier } from './types-bJU5OwWf.js';
2
- import { E as ExpandedSeat } from './renderer-B2uo9TlL.js';
1
+ import { C as ChartDoc, G as GAAreaObject, j as GAInventorySegment, k as CategoryTier } from './types-lCbuCoX6.js';
2
+ import { E as ExpandedSeat } from './renderer-CqA6pY-I.js';
3
3
 
4
4
  declare const MAX_GA_CAPACITY = 100000;
5
5
  declare const MAX_EVENT_INVENTORY = 100000;
@@ -1372,8 +1372,10 @@ interface ShapeObject extends AuthoringObjectState {
1372
1372
  role?: string;
1373
1373
  /** For a stage: which `StageKind` its polygon was generated from. */
1374
1374
  stageKind?: string;
1375
- /** Public buyer-safe render priority for an approved orientation label. */
1376
- labelImportance?: 'orientation';
1375
+ /** Buyer-facing zoom rule for this caption — see the text object's own
1376
+ * `labelImportance` for the three values. Shapes accept the same enum for
1377
+ * type consistency; caption rendering itself is unchanged. */
1378
+ labelImportance?: 'orientation' | 'detail';
1377
1379
  /** Private source marker for a reviewed direct-plan landmark. Generic edits
1378
1380
  * relinquish it so a later reread cannot overwrite organizer-authored décor. */
1379
1381
  referenceAnnotationSource?: ReferenceDirectAnnotationSource;
@@ -1710,8 +1712,19 @@ interface TextObject extends AuthoringObjectState {
1710
1712
  opacity?: number;
1711
1713
  /** Optional padded background painted behind the exact text box. */
1712
1714
  background?: TextBackground;
1713
- /** Public buyer-safe render priority for an approved orientation label. */
1714
- labelImportance?: 'orientation';
1715
+ /**
1716
+ * Buyer-facing zoom rule for this label ("Show at" in the Designer).
1717
+ *
1718
+ * - `'orientation'` — Always. The reviewed-landmark path: the buyer canvas
1719
+ * keeps it above the rendered-size floor at every zoom (and caps it at the
1720
+ * free-text screen ceiling), so gates and entrances stay readable at the
1721
+ * arena overview. Also written by the reference-import pipeline.
1722
+ * - `'detail'` — Close-up only. Hidden while the camera is at or below the
1723
+ * section rung; above it the normal "when it fits" size rule applies.
1724
+ * - absent — When it fits (the default). The plain rendered-size rule.
1725
+ * Absent is deliberately the default so stored charts need no migration.
1726
+ */
1727
+ labelImportance?: 'orientation' | 'detail';
1715
1728
  /** Private source marker paired with a reviewed direct-plan landmark shape. */
1716
1729
  referenceAnnotationSource?: ReferenceDirectAnnotationSource;
1717
1730
  }
@@ -1372,8 +1372,10 @@ interface ShapeObject extends AuthoringObjectState {
1372
1372
  role?: string;
1373
1373
  /** For a stage: which `StageKind` its polygon was generated from. */
1374
1374
  stageKind?: string;
1375
- /** Public buyer-safe render priority for an approved orientation label. */
1376
- labelImportance?: 'orientation';
1375
+ /** Buyer-facing zoom rule for this caption — see the text object's own
1376
+ * `labelImportance` for the three values. Shapes accept the same enum for
1377
+ * type consistency; caption rendering itself is unchanged. */
1378
+ labelImportance?: 'orientation' | 'detail';
1377
1379
  /** Private source marker for a reviewed direct-plan landmark. Generic edits
1378
1380
  * relinquish it so a later reread cannot overwrite organizer-authored décor. */
1379
1381
  referenceAnnotationSource?: ReferenceDirectAnnotationSource;
@@ -1710,8 +1712,19 @@ interface TextObject extends AuthoringObjectState {
1710
1712
  opacity?: number;
1711
1713
  /** Optional padded background painted behind the exact text box. */
1712
1714
  background?: TextBackground;
1713
- /** Public buyer-safe render priority for an approved orientation label. */
1714
- labelImportance?: 'orientation';
1715
+ /**
1716
+ * Buyer-facing zoom rule for this label ("Show at" in the Designer).
1717
+ *
1718
+ * - `'orientation'` — Always. The reviewed-landmark path: the buyer canvas
1719
+ * keeps it above the rendered-size floor at every zoom (and caps it at the
1720
+ * free-text screen ceiling), so gates and entrances stay readable at the
1721
+ * arena overview. Also written by the reference-import pipeline.
1722
+ * - `'detail'` — Close-up only. Hidden while the camera is at or below the
1723
+ * section rung; above it the normal "when it fits" size rule applies.
1724
+ * - absent — When it fits (the default). The plain rendered-size rule.
1725
+ * Absent is deliberately the default so stored charts need no migration.
1726
+ */
1727
+ labelImportance?: 'orientation' | 'detail';
1715
1728
  /** Private source marker paired with a reviewed direct-plan landmark shape. */
1716
1729
  referenceAnnotationSource?: ReferenceDirectAnnotationSource;
1717
1730
  }
@@ -1,4 +1,4 @@
1
- import { f as SeatViewCoverage } from '../../types-bJU5OwWf.cjs';
1
+ import { f as SeatViewCoverage } from '../../types-lCbuCoX6.cjs';
2
2
 
3
3
  /**
4
4
  * Slice 3 hand-off — the DOM panorama overlay the fly-to-seat cinematic
@@ -1,4 +1,4 @@
1
- import { f as SeatViewCoverage } from '../../types-bJU5OwWf.js';
1
+ import { f as SeatViewCoverage } from '../../types-lCbuCoX6.js';
2
2
 
3
3
  /**
4
4
  * Slice 3 hand-off — the DOM panorama overlay the fly-to-seat cinematic
@@ -1,6 +1,6 @@
1
- import { C as ChartDoc } from '../types-bJU5OwWf.cjs';
2
- import { E as EventConfigurationProductionElementKind, a as EventConfigurationOcclusion, b as EventConfigurationVersion } from '../eventConfigurations-Dw3rQPPx.cjs';
3
- import { E as ExpandedSeat } from '../renderer-BnidPieD.cjs';
1
+ import { C as ChartDoc } from '../types-lCbuCoX6.cjs';
2
+ import { E as EventConfigurationProductionElementKind, a as EventConfigurationOcclusion, b as EventConfigurationVersion } from '../eventConfigurations-5MITEoYq.cjs';
3
+ import { E as ExpandedSeat } from '../renderer-YNIUt88N.cjs';
4
4
  import { SeatView } from './crossfade/panorama.cjs';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { C as ChartDoc } from '../types-bJU5OwWf.js';
2
- import { E as EventConfigurationProductionElementKind, a as EventConfigurationOcclusion, b as EventConfigurationVersion } from '../eventConfigurations-wgXC-YJV.js';
3
- import { E as ExpandedSeat } from '../renderer-B2uo9TlL.js';
1
+ import { C as ChartDoc } from '../types-lCbuCoX6.js';
2
+ import { E as EventConfigurationProductionElementKind, a as EventConfigurationOcclusion, b as EventConfigurationVersion } from '../eventConfigurations-B_oyAnQJ.js';
3
+ import { E as ExpandedSeat } from '../renderer-CqA6pY-I.js';
4
4
  import { SeatView } from './crossfade/panorama.js';
5
5
 
6
6
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seatlayer/core",
3
- "version": "0.86.11",
3
+ "version": "0.86.13",
4
4
  "description": "SeatLayer's seat map rendering engine — the seating chart runtime behind @seatlayer/js and the React, Vue, and Angular SDKs.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": {
@@ -1 +0,0 @@
1
- import{Ka as E,Ta as O,Wa as A}from"./chunk-24O23MNB.js";function I(t){let n=Number(t.slice(t.lastIndexOf(":")+1));return Number.isFinite(n)?n:-1}function J(t,n,i){let e=new Map;for(let a of t){if(a.kind==="booth")continue;let o=e.get(a.rowId);o?o.push(a):e.set(a.rowId,[a])}let d=a=>i.has(a.id)||n(a.id)!=="free",l=[];for(let a of e.values())if(!(a.length<3)){a.sort((o,s)=>I(o.id)-I(s.id));for(let o=1;o<a.length-1;o++){let s=a[o];if(d(s))continue;let g=a[o-1],m=a[o+1];I(s.id)-I(g.id)!==1||I(m.id)-I(s.id)!==1||!d(g)||!d(m)||!i.has(g.id)&&!i.has(m.id)||l.push(s)}}return l}function z(t){return Array.isArray(t.objects)}function D(t,n){if(n.seatsByLabel)return n.seatsByLabel;if(!z(t))throw new Error("ticketRestrictions: a categories-only chart document requires options.seatsByLabel");return new Map(A(t,{resolveEyeHeights:!1}).map(i=>[i.label,i]))}function G(t){return{code:"ticket_option_not_applicable",labels:t,message:"That ticket choice is not available for the selected seat."}}function w(t,n){let i=t.applicability;return i?!(i.seatLabels?.length&&!i.seatLabels.includes(n.label)||i.accessibility?.length&&!i.accessibility.some(e=>n.accessibility?.includes(e))):!0}function Z(t,n){return(t.categories.find(i=>i.key===n.categoryKey)?.tiers??[]).filter(i=>w(i,n))}function B(t,n,i){let e=t.categories.find(l=>l.key===n.categoryKey)?.tiers;if(!e?.length)return{kind:"none"};let d=i==null?e.find(l=>w(l,n)):e.find(l=>l.id===i&&w(l,n));return d?{kind:"resolved",tier:d}:{kind:"invalid"}}function U(t,n){return(t.logicalRowId??t.rowId)===(n.logicalRowId??n.rowId)}function _(t){if(Number.isInteger(t.logicalSeatIndex))return t.logicalSeatIndex;let n=t.id.slice(t.id.lastIndexOf(":")+1),i=Number(n);return Number.isInteger(i)?i:void 0}function V(t,n){if(!U(t,n))return!1;let i=_(t),e=_(n);return i!=null&&e!=null&&Math.abs(i-e)===1}function W(t,n,i={}){if(!n.length)return null;let e=D(t,i),d=n.flatMap(o=>{let s=e.get(o.label);return s?[{selection:o,seat:s}]:[]}),l=d.map(({seat:o})=>o).filter(o=>o.accessibility?.includes("wheelchair")),a=[];for(let{selection:o,seat:s}of d){let g=B(t,s,o.tierId),m=g.kind==="resolved"?g.tier:void 0;(s.accessibility?.includes("companion")||m?.restriction==="companion")&&!l.some(u=>u.id!==s.id&&V(s,u))&&a.push(s.label)}return a.length?{code:"companion_pair_required",labels:a,message:"Select the adjacent wheelchair place with each companion ticket."}:null}function ee(t,n,i={}){if(!n.length)return null;let e=D(t,i),d=new Set(t.categories.filter(o=>o.notForSale).map(o=>o.key)),l=[],a=[];for(let o of n){let s=e.get(o.label);if(!s)continue;if(d.has(s.categoryKey)){l.push(s.label);continue}B(t,s,o.tierId).kind==="invalid"&&a.push(s.label)}return l.length?{code:"not_for_sale",labels:l,message:"These seats are not for sale."}:a.length?G(a):W(t,n,{seatsByLabel:e})}function v(t,n){if(Number.isInteger(t.logicalSeatIndex))return t.logicalSeatIndex;let i=t.id.lastIndexOf(":");if(i<0)return n;let e=Number(t.id.slice(i+1));return Number.isFinite(e)?e:n}function C(t,n){let i=t.x-n.x,e=t.y-n.y;return i*i+e*e}function N(t){let n=0,i=0;for(let e of t)n+=e.x,i+=e.y;return{x:n/t.length,y:i/t.length}}function M(t,n){return t.find(i=>i.focalPoint)?.focalPoint??n}function R(t){return t.commercial?.premium===!0}function $(t,n,i){let e=Math.floor(i.qty);if(!Number.isFinite(e)||e<=0)return{labels:[],reason:"sold_out"};let{categoryKey:d,zoneId:l,focal:a,preferPremium:o,accessibility:s,requireContiguous:g}=i,m=new Map,c=[];if(t.forEach((r,b)=>{let y=n.has(r.label)&&(!d||r.categoryKey===d)&&(!l||r.zoneId===l)&&(!s||s.some(x=>r.accessibility?.includes(x))),f=r.logicalRowId??r.rowId,p=m.get(f);p||(p=[],m.set(f,p)),p.push({seat:r,index:v(r,b),elig:y}),y&&c.push(r)}),c.length===0)return{labels:[],reason:"sold_out"};let u=null,K=r=>{if(!u)return!0;if(o&&r.nonPremium!==u.nonPremium)return r.nonPremium<u.nonPremium;if(r.orphan!==u.orphan)return r.orphan<u.orphan;if(r.d2!==u.d2)return r.d2<u.d2;let b=r.rowId.localeCompare(u.rowId);return b!==0?b<0:r.startIndex<u.startIndex};for(let[r,b]of m){let y=[...b].sort((p,x)=>p.index-x.index),f=0;for(;f<y.length;){if(!y[f].elig){f++;continue}let p=f;for(;p<y.length&&y[p].elig&&(p===f||y[p].index===y[p-1].index+1);)p++;let x=p-f;for(let h=0;h+e<=x;h++){let L=h,j=x-(h+e),F=L===1||j===1?1:0,S=y.slice(f+h,f+h+e).map(k=>k.seat),P={labels:S.map(k=>k.label),seats:S,rowId:r,startIndex:y[f+h].index,orphan:F,nonPremium:o?S.reduce((k,q)=>k+(R(q)?0:1),0):0,d2:C(N(S),M(S,a))};K(P)&&(u=P)}f=p}}return u?{labels:u.labels}:g?{labels:[],reason:c.length?"not_enough_together":"sold_out"}:c.length<e?{labels:[],reason:"not_enough_together"}:{labels:c.map((r,b)=>({seat:r,i:b,d2:C(r,r.focalPoint??a)})).sort((r,b)=>{if(o){let f=R(r.seat)?0:1,p=R(b.seat)?0:1;if(f!==p)return f-p}if(r.d2!==b.d2)return r.d2-b.d2;let y=(r.seat.logicalRowId??r.seat.rowId).localeCompare(b.seat.logicalRowId??b.seat.rowId);return y!==0?y:v(r.seat,r.i)-v(b.seat,b.i)}).slice(0,e).map(r=>r.seat.label)}}function ne(t,n,i,e){let d=Math.floor(e.qty),l=$(t,i,e),o=n.filter(c=>c.bookingMode==="whole"&&c.capacity===d&&i.has(c.label)&&(!e.categoryKey||c.categoryKey===e.categoryKey)&&(!e.zoneId||c.zoneId===e.zoneId)&&!e.accessibility).map(c=>({table:c,d2:C(c.center,c.focalPoint??e.focal)})).sort((c,u)=>c.d2-u.d2||c.table.label.localeCompare(u.table.label))[0];if(!o)return l;if(!l.labels.length)return{labels:[o.table.label]};let s=new Map(t.map(c=>[c.label,c])),g=l.labels.map(c=>s.get(c)).filter(c=>!!c),m=g.length?C(N(g),M(g,e.focal)):Number.POSITIVE_INFINITY;return o.d2<m?{labels:[o.table.label]}:l}var T=class extends Error{constructor(i,e){super(e);this.objectId=i;this.name="GroupedTableProjectionError"}};function H(t){let n=t.minOccupancy,i=t.maxOccupancy;if(!Number.isInteger(n)||!Number.isInteger(i)||n<1||i<n||i>t.seatCount)throw new T(t.id,`Table "${t.label}" has invalid variable-occupancy bounds`);return{min:n,max:i}}function re(t,n){if(n!==2)return[];let i=[];for(let e of O(t)){if(e.type!=="table"||!e.bookAsWhole&&!e.variableOccupancy)continue;if(e.bookAsWhole&&e.variableOccupancy)throw new T(e.id,`Table "${e.label}" cannot be whole-table and variable-occupancy inventory`);if(!Number.isInteger(e.seatCount)||e.seatCount<1||!e.label.trim())throw new T(e.id,"Grouped tables require a label and at least one chair");let d=e.variableOccupancy?"variable":"whole",l=d==="variable"?H(e):{min:e.seatCount,max:e.seatCount};i.push({objectId:e.id,label:e.label,...e.displayLabel?{displayLabel:e.displayLabel}:{},...e.displayType?{displayType:e.displayType}:{},categoryKey:e.categoryKey,mode:d,capacity:e.seatCount,minOccupancy:l.min,maxOccupancy:l.max,chairs:E(e)})}return i}export{J as a,z as b,G as c,w as d,Z as e,B as f,W as g,ee as h,$ as i,ne as j,T as k,re as l};
@@ -1 +0,0 @@
1
- function a(e){let r=e;return delete r.referenceScan,delete r.referenceInventorySource,delete r.referenceInventoryExclusion,delete r.referenceSource,delete r.referenceAnnotationSource,e}function f(e){return(e.type==="shape"||e.type==="text")&&(e.referenceAnnotationSource?.kind==="direct-landmark-v1"||e.referenceAnnotationSource?.kind==="direct-stage-v1")&&(e.referenceAnnotationSource.ownership="organizer"),e}function m(e){return e.type==="shape"&&u(e)}function u(e){return(e.type==="shape"||e.type==="text")&&(e.labelImportance==="orientation"||e.referenceAnnotationSource?.kind==="direct-landmark-v1")}function l(e){return e.referenceImage??(e.backgroundImage?.assetId?e.backgroundImage:void 0)}function d(e){let r=e.backgroundImage;return r?.url&&!r.assetId?r:void 0}function c(e){let r=d(e);if(!r?.url)return;let{calibration:n,derivedScale:t,assetId:s,...i}=r;return i}function k(e){let r=n=>{let t=n.backgroundImage;t?.assetId&&(n.referenceImage||(n.referenceImage=t,n.backgroundImage=void 0))};r(e);for(let n of e.floors??[])r(n);return e}function o(e){let r={...e};return a(r),delete r.editor,r}function g(e){let r={...e};return delete r.referenceCategorySource,delete r.referenceDirectSeatImport,r}function b(e){let r=c(e),n=e.floors?.map(t=>({...t,objects:t.objects.map(o),referenceImage:void 0,backgroundImage:c(t)}));return{...e,categories:e.categories.map(g),objects:e.objects.map(o),referenceImage:void 0,venueSurveyRegistrations:void 0,backgroundImage:r,...n?{floors:n}:{}}}function h(e){return!!e.referenceImage?.assetId&&!!e.backgroundImage?.assetId&&e.referenceImage.assetId!==e.backgroundImage.assetId}export{f as a,m as b,u as c,l as d,d as e,k as f,b as g,h};