@seatlayer/js 0.109.1 → 0.110.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -5
- package/dist/{channelsMode-CcOZSm0j.d.cts → channelsMode-CVhVwfEC.d.cts} +17 -1
- package/dist/{channelsMode-CcOZSm0j.d.ts → channelsMode-CVhVwfEC.d.ts} +17 -1
- package/dist/channelsMode-DS6TLE4L.js +1 -0
- package/dist/chunk-3FEGZ5HA.js +1 -0
- package/dist/{chunk-T57HSGPG.js → chunk-3IZZM7EV.js} +1 -1
- package/dist/chunk-7I563G2N.js +1 -0
- package/dist/{chunk-CNLSM36T.js → chunk-ECM3ZZET.js} +2 -7
- package/dist/chunk-JDMJI3WC.js +1 -0
- package/dist/{chunk-HHV7F37Y.js → chunk-JS5WH7YG.js} +1 -1
- package/dist/hostedCheckout-NA3IEXE4.js +183 -0
- package/dist/index.cjs +134 -89
- package/dist/index.d.cts +417 -122
- package/dist/index.d.ts +417 -122
- package/dist/index.js +132 -85
- package/dist/manager.cjs +148 -211
- package/dist/manager.d.cts +2 -2
- package/dist/manager.d.ts +2 -2
- package/dist/manager.js +27 -81
- package/dist/{managerExtras-CHNB5GFR.js → managerExtras-XQSDPEQ7.js} +2 -6
- package/dist/{pickerSalesClose-AVOFKQPC.js → pickerSalesClose-2APTQFVA.js} +1 -1
- package/package.json +2 -2
- package/dist/channelsMode-W5KNSQSJ.js +0 -1
- package/dist/chunk-OSZ7DOEH.js +0 -1
- package/dist/chunk-U2Z2AGRX.js +0 -1
- package/dist/chunk-UBFNMA7U.js +0 -1
- package/dist/hostedCheckout-XSQ7ISQC.js +0 -185
package/README.md
CHANGED
|
@@ -192,11 +192,10 @@ host that handles none of them still shows the buyer something true.
|
|
|
192
192
|
### Package prices and hosted Season checkout
|
|
193
193
|
|
|
194
194
|
`GET /pub/seasons/:key/prices` returns per-category package prices in minor
|
|
195
|
-
units. When it does,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
platform confirms the price" wording stays exactly as it was.
|
|
195
|
+
units. When it does, the picker's own cart shows each seat's package price
|
|
196
|
+
("$480 for all 8 dates" on the seat card), the type each seat is sold as when
|
|
197
|
+
`priceTypes` offers a choice, and the package total for every date. With no
|
|
198
|
+
server prices the cart shows no amounts, and your checkout prices the package.
|
|
200
199
|
|
|
201
200
|
`checkout` chooses who takes the money:
|
|
202
201
|
|
|
@@ -218,6 +217,42 @@ complete. `returnUrl` follows the same rules as the Event picker's: the
|
|
|
218
217
|
organizer's declared embed domains decide whether it is honoured, so supplying
|
|
219
218
|
one cannot authorize it.
|
|
220
219
|
|
|
220
|
+
### Adult, child and other price types
|
|
221
|
+
|
|
222
|
+
A package can price each category once per price type: `adult`, `child`,
|
|
223
|
+
`concession`, `senior` and `student`. List the types this picker sells and each
|
|
224
|
+
seat card in the cart offers the types the package prices for that seat's
|
|
225
|
+
category, at that type's price, before the hold:
|
|
226
|
+
|
|
227
|
+
```js
|
|
228
|
+
const picker = new SeasonPicker({
|
|
229
|
+
container: '#season',
|
|
230
|
+
season: 'sea_2027',
|
|
231
|
+
priceTypes: ['adult', 'child'],
|
|
232
|
+
onContinue: (handoff) => continueOnYourServer(handoff.seats),
|
|
233
|
+
// handoff.seats: [{ label: 'A-1', priceTypeKey: 'adult' }, { label: 'A-2', priceTypeKey: 'child' }]
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
// Or name the types yourself; a label left out is adult.
|
|
237
|
+
await picker.holdSameSeat(['A-1', 'A-2'], 'sop_checkout_1185', { 'A-2': 'child' });
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
The hold sends `selections[].priceTypeKey` for each non-adult seat. A type the
|
|
241
|
+
package does not price for that seat is refused with a `SeasonApiError` coded
|
|
242
|
+
`price_type_not_offered`, and nothing is held. Without `priceTypes` (or with
|
|
243
|
+
`['adult']`) every seat is adult and the hold is sent as before. The
|
|
244
|
+
types offered come from `GET /pub/seasons/:key/prices`, so a Season with no
|
|
245
|
+
public prices offers none and holds adult unless `holdSameSeat` names a type.
|
|
246
|
+
Best Available takes no type, so its seats are adult.
|
|
247
|
+
|
|
248
|
+
### Layout
|
|
249
|
+
|
|
250
|
+
A `SeasonPicker` draws in the event picker's own layout and fills its
|
|
251
|
+
container: the map with its controls, the cart as a side panel on a wide
|
|
252
|
+
container and a bottom sheet on a narrow one, and 3D in the same space. The
|
|
253
|
+
package lines are in that cart. Size the container as you would for
|
|
254
|
+
`SeatPicker`; the hosted season page gives it the window under its header.
|
|
255
|
+
|
|
221
256
|
The framework-agnostic JavaScript `SeasonPicker` is also wrapped by
|
|
222
257
|
`@seatlayer/react`, `@seatlayer/vue`, and `@seatlayer/angular` `0.72.0` and
|
|
223
258
|
newer. React Native, Flutter, iOS, and Android do not expose a Season bridge
|
|
@@ -1719,6 +1719,7 @@ declare class SeatManager {
|
|
|
1719
1719
|
private marqueeShape;
|
|
1720
1720
|
/** Until when the box hint stays up after a marquee (CR04). */
|
|
1721
1721
|
private hintUntil;
|
|
1722
|
+
private sectionTooWide;
|
|
1722
1723
|
private socketSnapshotSeen;
|
|
1723
1724
|
private monitorRefreshTimer;
|
|
1724
1725
|
/** `'auto'` is kept as asked, not as resolved — see {@link getThemeMode}. */
|
|
@@ -1980,6 +1981,13 @@ declare class SeatManager {
|
|
|
1980
1981
|
render(): Promise<this>;
|
|
1981
1982
|
/** Load the chart and the live state into the chrome; a failure says why on a card over the room. */
|
|
1982
1983
|
private load;
|
|
1984
|
+
/**
|
|
1985
|
+
* A tool picked by hand: the map comes back to the whole venue (owner, 5 Nov).
|
|
1986
|
+
* Only here, never in setMode: "Block" from a seat card, reserve again and
|
|
1987
|
+
* arriving from a link all open a tool on seats that must stay in view.
|
|
1988
|
+
* Channels keeps its own map and hands it back; Sections filter frames its own.
|
|
1989
|
+
*/
|
|
1990
|
+
private switchTool;
|
|
1983
1991
|
setMode(mode: SeatManagerMode): void;
|
|
1984
1992
|
/**
|
|
1985
1993
|
* Decide what this token may do with sales channels.
|
|
@@ -2213,6 +2221,8 @@ declare class SeatManager {
|
|
|
2213
2221
|
private wireGestures;
|
|
2214
2222
|
/** A click on a section block (the renderer's onSectionTap). */
|
|
2215
2223
|
private handleSectionTap;
|
|
2224
|
+
/** The glide has settled and the seats still can't be picked: say what to do, rather than nothing (CR10). */
|
|
2225
|
+
private noteSectionTooWide;
|
|
2216
2226
|
selectSection(sectionId: string): ExpandedSeat[];
|
|
2217
2227
|
/** Filter every section whose public label matches, then frame their union. */
|
|
2218
2228
|
setFilteredSection(label: string): SeatManagerFilteredSection[];
|
|
@@ -2356,6 +2366,12 @@ declare class SeatManager {
|
|
|
2356
2366
|
private chipLabels;
|
|
2357
2367
|
/** Click lights a chip's seats and the rest step back; again, × or Esc clears; ⇧ click selects them in a picking tool. */
|
|
2358
2368
|
private onLegendChip;
|
|
2369
|
+
/** The sections a lit chip touches: at venue zoom seats aren't drawn, so their blocks say where. */
|
|
2370
|
+
private litSections;
|
|
2371
|
+
private lightSections;
|
|
2372
|
+
private blockPaintInputs;
|
|
2373
|
+
/** Move the map to a lit chip's seats on this floor (managerChipFrame.ts). */
|
|
2374
|
+
private frameChip;
|
|
2359
2375
|
private legendTypes;
|
|
2360
2376
|
/**
|
|
2361
2377
|
* Re-ask the block paint and carry it to the minimap. The minimap paints
|
|
@@ -2838,7 +2854,7 @@ declare function openSeatList(c: SeatChooser, filter?: string): void;
|
|
|
2838
2854
|
* the pickers in the extras chunk; the scrim and dialog stay with the room
|
|
2839
2855
|
* (managerDialog) because Channels' sheets and the section menu use them.
|
|
2840
2856
|
*/
|
|
2841
|
-
declare const PICKER_LIST_CSS = "\n.slm-ch-seatlist{max-height:44vh;overflow:auto;overscroll-behavior:contain;border:1px solid var(--slm-line);\n border-radius:10px;background:var(--slm-surface);margin-top:10px}\n.slm-ch-
|
|
2857
|
+
declare const PICKER_LIST_CSS = "\n.slm-ch-seatlist{max-height:44vh;overflow:auto;overscroll-behavior:contain;border:1px solid var(--slm-line);\n border-radius:10px;background:var(--slm-surface);margin-top:10px}\n.slm-ch-seatitem{display:flex;width:100%;min-height:40px;align-items:center;gap:9px;padding:8px 10px;border-bottom:1px solid var(--slm-line);\n text-align:left;font-size:12.5px;line-height:1.3;color:var(--slm-text)}\n.slm-ch-seatitem:hover:not(:disabled){background:var(--slm-tint)}\n.slm-ch-seatitem .box{width:16px;height:16px;border-radius:4px;border:1px solid var(--slm-muted);display:grid;\n place-items:center;font-size:10px;font-weight:900;color:transparent;flex:none}\n.slm-ch-seatitem[aria-checked=\"true\"] .box{border-color:var(--slm-accent);background:var(--slm-accent);color:var(--slm-accent-ink)}\n.slm-ch-seatitem .meta{margin-left:auto;color:var(--slm-muted);font-size:10.5px}\n.slm-ch-seatitem:disabled{opacity:.55;cursor:not-allowed}\n.slm-ch-seatitem .dot{width:9px;height:9px;border-radius:999px;flex:none}\n.slm-ch-seatlegend{flex:none;display:flex;align-items:center;gap:4px 12px;flex-wrap:wrap;font-size:11.5px;color:var(--slm-muted);font-weight:500}\n.slm-ch-seatlegend span{display:inline-flex;align-items:center;gap:5px}\n.slm-ch-seatlegend i{display:inline-block;width:10px;height:10px;border-radius:3px;border:1.5px solid}\n.slm-ch-seatlist.grid{max-height:52vh;margin-top:0}\n.slm-ch-rowcheck{display:flex;align-items:center;gap:8px;min-height:32px;padding:4px 6px;margin-left:-6px;border-radius:7px;font-size:12px;font-weight:800;color:var(--slm-text);text-align:left}\n.slm-ch-rowcheck:hover{background:var(--slm-tint)}\n.slm-ch-rowcheck .box{width:15px;height:15px;flex:none;display:grid;place-items:center;border:1.5px solid var(--slm-muted);border-radius:4px;color:transparent;font-size:9px;font-weight:900;box-sizing:border-box}\n.slm-ch-rowcheck[aria-checked=\"true\"] .box{border-color:var(--slm-accent);background:var(--slm-accent);color:var(--slm-accent-ink)}\n.slm-ch-rowcheck[aria-checked=\"mixed\"] .box{border-color:var(--slm-accent);background:linear-gradient(var(--slm-accent),var(--slm-accent)) center/7px 2px no-repeat}\n.slm-ch-rowcheck .name{min-width:0}\n.slm-ch-rowcheck .meta{margin-left:auto;padding-left:8px;color:var(--slm-muted);font-size:10.5px;font-weight:700;font-variant-numeric:tabular-nums}\n.slm-ch-seatchips{display:flex;flex-wrap:wrap;gap:7px;padding:1px 0}\n.slm .slm-ch-seatchip{min-width:30px;height:30px;padding:0 8px;border-radius:8px;border:1.5px solid var(--slm-line);background:transparent;color:var(--slm-text);\n font-size:11.5px;font-weight:600;font-variant-numeric:tabular-nums;box-sizing:border-box;line-height:1;position:relative}\n.slm-ch-seatchip:hover{border-color:var(--slm-muted)}\n.slm-ch-seatchip:focus-visible{outline:2px solid var(--slm-accent);outline-offset:1px}\n/* Status has its own colours, never the host's accent or a ticket type's: a\n gold accent made every free seat read as \"in a cart\" (audit m24). Free is an\n open green ring; the rest are tinted and muted; picked is the accent. */\n.slm .slm-ch-seatchip.is-free,.slm-ch-seatlegend .is-free{border-color:#22a06b;background:transparent}\n.slm .slm-ch-seatchip.is-held,.slm-ch-seatlegend .is-held{border-color:#d99a0b;background:color-mix(in srgb,#d99a0b 18%,transparent);color:var(--slm-muted)}\n.slm .slm-ch-seatchip.is-booked,.slm-ch-seatlegend .is-booked{border-color:color-mix(in srgb,var(--slm-muted) 60%,var(--slm-surface));background:color-mix(in srgb,var(--slm-muted) 18%,transparent);color:var(--slm-muted)}\n.slm .slm-ch-seatchip.is-blocked,.slm-ch-seatlegend .is-blocked{border-color:color-mix(in srgb,var(--slm-muted) 85%,var(--slm-surface));background:color-mix(in srgb,var(--slm-muted) 12%,transparent);color:var(--slm-muted)}\n.slm-ch-seatlegend i[class]{background:transparent}\n.slm .slm-ch-seatchip[aria-checked=\"true\"]{border-color:var(--slm-accent);background:color-mix(in srgb,var(--slm-accent) 16%,var(--slm-surface));color:var(--slm-text)}\n/* The count on the left; Clear and Done small and together on the right (CR20). */\n.slm-ch-seatfoot{align-items:center;gap:10px;margin-top:16px;padding-top:12px;border-top:1px solid var(--slm-line)}\n.slm-ch-seatfoot [data-sl-foot]{flex:1;min-width:0;display:flex;align-items:center;gap:10px}\n.slm-ch-seatfoot .slm-ch-seatcount{flex:1;min-width:0;font-size:12.5px;font-weight:600;color:var(--slm-text);font-variant-numeric:tabular-nums}\n.slm-ch-seatfoot .slm-ch-footsum.warn{flex:1}\n.slm .slm-ch-dialog .slm-ch-seatfoot.foot .slm-btn{flex:none;min-width:0;height:28px;padding:0 10px;border-radius:9px;font-size:12px;font-weight:600}\n.slm .slm-ch-seatfoot .slm-btn.ghost{background:var(--slm-surface);color:var(--slm-text);border:1px solid var(--slm-line)}\n.slm .slm-ch-seatfoot .slm-btn:disabled{opacity:.5}\n@media (pointer:coarse){.slm .slm-ch-dialog .slm-ch-seatfoot.foot .slm-btn{height:auto;min-height:40px;padding:0 14px}.slm .slm-ch-seatchip{min-width:36px;height:36px}}\n.slm-ch-scopegroup{position:sticky;top:0;z-index:1;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;\n gap:6px;padding:6px 8px;border-bottom:1px solid var(--slm-line);background:var(--slm-surface)}\n.slm-ch-groupcheck{display:flex;min-width:0;align-items:center;gap:8px;padding:5px 2px;text-align:left;font-size:11px;font-weight:800}\n.slm-ch-groupcheck .box{width:16px;height:16px;flex:none;display:grid;place-items:center;border:1px solid var(--slm-muted);border-radius:4px;\n color:transparent;font-size:10px}\n.slm-ch-groupcheck[aria-checked=\"true\"] .box,.slm-ch-groupcheck[aria-checked=\"mixed\"] .box{border-color:var(--slm-accent);\n background:var(--slm-accent);color:var(--slm-accent-ink)}\n.slm-ch-groupcheck .meta{min-width:0;margin-left:auto;color:var(--slm-muted);font-size:10.5px;font-weight:600;white-space:nowrap}\n/* Board CR20: pickers whose footer says what will be added; names wrap, never cut. */\n.slm-ch-dialog .foot .slm-ch-footsum{flex:1;min-width:0;align-self:center;font-size:12.5px;font-weight:600;color:var(--slm-text)}\n.slm-ch-dialog .foot .slm-ch-footsum.warn{display:flex;gap:8px;align-items:flex-start;padding:8px 10px;border-radius:8px;font-weight:500;color:color-mix(in srgb,#b45309 75%,var(--slm-text));background:color-mix(in srgb,#f59e0b 12%,transparent);border:1px solid color-mix(in srgb,#f59e0b 40%,transparent)}\n.slm-ch-footsum.warn svg{flex:none;margin-top:1px}.slm-ch-footsum.warn b{display:block;font-weight:700}\n.slm-ch-dialog .foot .slm-btn.slm-ch-close{flex:none;margin-left:auto;min-width:0;min-height:0;padding:7px 14px;font-size:12.5px;border-radius:8px}\n.slm-ch-dialog:has(.slm-ch-footsum) .foot .slm-btn{flex:none;min-width:110px}\n.slm-ch-findbox{margin:0 0 10px}.slm-ch-findbox .slm-input{width:100%;min-height:38px}\n.slm-ch-seatitem .name{flex:1;min-width:0}.slm-ch-seatitem .meta{white-space:nowrap}\n.slm-ch-seatitem .box.mixed,.slm-ch-groupcheck .box.mixed{border-color:var(--slm-accent);background:var(--slm-accent);color:var(--slm-accent-ink)}\n.slm-ch-groupcheck .name{font-size:13px;font-weight:600}\n.slm-ch-grouptoggle{display:grid;place-items:center;width:32px;min-height:32px;color:var(--slm-muted)}\n.slm-ch-grouptoggle svg{transition:transform var(--slm-mo-quick) var(--slm-mo-out)}.slm-ch-grouptoggle.open svg{transform:rotate(90deg)}\n.slm-ch-scoperows .slm-ch-seatitem{padding-left:34px}\n.slm-ch-scope-empty{padding:18px 12px;color:var(--slm-muted);font-size:12.5px;line-height:1.5;text-align:center}\n.slm-ch-scope-empty b{display:block;margin-bottom:4px;color:var(--slm-text);font-size:14px}\n/* A column whose list gives way, so in a short room the count, Clear and Done\n stay in view and the list scrolls, rather than the whole dialog. */\n.slm-ch-dialog:has(.slm-sl-grid){width:min(640px,100%);display:flex;flex-direction:column}\n.slm-ch-dialog:has(.slm-sl-grid)>*{flex:none}\n.slm .slm-ch-dialog>.slm-sl-grid{flex:0 1 auto;min-height:150px}\n.slm-sl-grid{display:grid;grid-template-columns:220px minmax(0,1fr);height:min(52vh,440px);border:1px solid var(--slm-line);border-radius:10px;overflow:hidden}\n.slm-sl-sections{overflow:auto;padding:6px;border-right:1px solid var(--slm-line)}\n.slm .slm-sl-section{display:flex;align-items:flex-start;gap:9px;width:100%;padding:9px 10px;border-radius:10px;text-align:left}\n.slm .slm-sl-section.on{background:color-mix(in srgb,var(--slm-accent) 14%,transparent)}\n.slm-sl-section svg{margin-left:auto;align-self:center;color:var(--slm-muted);flex:none}\n.slm-sl-rows{display:flex;flex-direction:column;min-height:0;padding:12px 18px 0}\n.slm-sl-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}.slm-sl-head b{flex:1;min-width:0;font-size:14px;font-weight:700;overflow-wrap:anywhere}\n.slm .slm-sl-head .slm-btn{flex:none;min-width:0;padding:6px 11px;font-size:12px}\n.slm-sl-rows .slm-ch-seatlegend{margin-bottom:6px}\n.slm-sl-rows .slm-ch-seatlist.grid{flex:1;max-height:none;border:0;border-radius:0;margin:0;overflow:auto}\n.slm-sl-row{padding:10px 0;border-top:1px solid var(--slm-line)}\n.slm-sl-row .slm-ch-seatchips{padding-left:27px;margin-top:8px;gap:5px}\n.slm-sl-note{margin:0 0 6px;font-size:12px;color:var(--slm-muted)}\n.slm .slm-ch-seatchip:disabled{opacity:.55;cursor:not-allowed}\n@media(max-width:620px){.slm-sl-grid{grid-template-columns:1fr;grid-template-rows:minmax(0,2fr) minmax(0,3fr);height:auto}.slm-sl-sections{border-right:0;border-bottom:1px solid var(--slm-line)}}\n";
|
|
2842
2858
|
|
|
2843
2859
|
declare const __managerPickers_PICKER_LIST_CSS: typeof PICKER_LIST_CSS;
|
|
2844
2860
|
declare const __managerPickers_openCategory: typeof openCategory;
|
|
@@ -1719,6 +1719,7 @@ declare class SeatManager {
|
|
|
1719
1719
|
private marqueeShape;
|
|
1720
1720
|
/** Until when the box hint stays up after a marquee (CR04). */
|
|
1721
1721
|
private hintUntil;
|
|
1722
|
+
private sectionTooWide;
|
|
1722
1723
|
private socketSnapshotSeen;
|
|
1723
1724
|
private monitorRefreshTimer;
|
|
1724
1725
|
/** `'auto'` is kept as asked, not as resolved — see {@link getThemeMode}. */
|
|
@@ -1980,6 +1981,13 @@ declare class SeatManager {
|
|
|
1980
1981
|
render(): Promise<this>;
|
|
1981
1982
|
/** Load the chart and the live state into the chrome; a failure says why on a card over the room. */
|
|
1982
1983
|
private load;
|
|
1984
|
+
/**
|
|
1985
|
+
* A tool picked by hand: the map comes back to the whole venue (owner, 5 Nov).
|
|
1986
|
+
* Only here, never in setMode: "Block" from a seat card, reserve again and
|
|
1987
|
+
* arriving from a link all open a tool on seats that must stay in view.
|
|
1988
|
+
* Channels keeps its own map and hands it back; Sections filter frames its own.
|
|
1989
|
+
*/
|
|
1990
|
+
private switchTool;
|
|
1983
1991
|
setMode(mode: SeatManagerMode): void;
|
|
1984
1992
|
/**
|
|
1985
1993
|
* Decide what this token may do with sales channels.
|
|
@@ -2213,6 +2221,8 @@ declare class SeatManager {
|
|
|
2213
2221
|
private wireGestures;
|
|
2214
2222
|
/** A click on a section block (the renderer's onSectionTap). */
|
|
2215
2223
|
private handleSectionTap;
|
|
2224
|
+
/** The glide has settled and the seats still can't be picked: say what to do, rather than nothing (CR10). */
|
|
2225
|
+
private noteSectionTooWide;
|
|
2216
2226
|
selectSection(sectionId: string): ExpandedSeat[];
|
|
2217
2227
|
/** Filter every section whose public label matches, then frame their union. */
|
|
2218
2228
|
setFilteredSection(label: string): SeatManagerFilteredSection[];
|
|
@@ -2356,6 +2366,12 @@ declare class SeatManager {
|
|
|
2356
2366
|
private chipLabels;
|
|
2357
2367
|
/** Click lights a chip's seats and the rest step back; again, × or Esc clears; ⇧ click selects them in a picking tool. */
|
|
2358
2368
|
private onLegendChip;
|
|
2369
|
+
/** The sections a lit chip touches: at venue zoom seats aren't drawn, so their blocks say where. */
|
|
2370
|
+
private litSections;
|
|
2371
|
+
private lightSections;
|
|
2372
|
+
private blockPaintInputs;
|
|
2373
|
+
/** Move the map to a lit chip's seats on this floor (managerChipFrame.ts). */
|
|
2374
|
+
private frameChip;
|
|
2359
2375
|
private legendTypes;
|
|
2360
2376
|
/**
|
|
2361
2377
|
* Re-ask the block paint and carry it to the minimap. The minimap paints
|
|
@@ -2838,7 +2854,7 @@ declare function openSeatList(c: SeatChooser, filter?: string): void;
|
|
|
2838
2854
|
* the pickers in the extras chunk; the scrim and dialog stay with the room
|
|
2839
2855
|
* (managerDialog) because Channels' sheets and the section menu use them.
|
|
2840
2856
|
*/
|
|
2841
|
-
declare const PICKER_LIST_CSS = "\n.slm-ch-seatlist{max-height:44vh;overflow:auto;overscroll-behavior:contain;border:1px solid var(--slm-line);\n border-radius:10px;background:var(--slm-surface);margin-top:10px}\n.slm-ch-
|
|
2857
|
+
declare const PICKER_LIST_CSS = "\n.slm-ch-seatlist{max-height:44vh;overflow:auto;overscroll-behavior:contain;border:1px solid var(--slm-line);\n border-radius:10px;background:var(--slm-surface);margin-top:10px}\n.slm-ch-seatitem{display:flex;width:100%;min-height:40px;align-items:center;gap:9px;padding:8px 10px;border-bottom:1px solid var(--slm-line);\n text-align:left;font-size:12.5px;line-height:1.3;color:var(--slm-text)}\n.slm-ch-seatitem:hover:not(:disabled){background:var(--slm-tint)}\n.slm-ch-seatitem .box{width:16px;height:16px;border-radius:4px;border:1px solid var(--slm-muted);display:grid;\n place-items:center;font-size:10px;font-weight:900;color:transparent;flex:none}\n.slm-ch-seatitem[aria-checked=\"true\"] .box{border-color:var(--slm-accent);background:var(--slm-accent);color:var(--slm-accent-ink)}\n.slm-ch-seatitem .meta{margin-left:auto;color:var(--slm-muted);font-size:10.5px}\n.slm-ch-seatitem:disabled{opacity:.55;cursor:not-allowed}\n.slm-ch-seatitem .dot{width:9px;height:9px;border-radius:999px;flex:none}\n.slm-ch-seatlegend{flex:none;display:flex;align-items:center;gap:4px 12px;flex-wrap:wrap;font-size:11.5px;color:var(--slm-muted);font-weight:500}\n.slm-ch-seatlegend span{display:inline-flex;align-items:center;gap:5px}\n.slm-ch-seatlegend i{display:inline-block;width:10px;height:10px;border-radius:3px;border:1.5px solid}\n.slm-ch-seatlist.grid{max-height:52vh;margin-top:0}\n.slm-ch-rowcheck{display:flex;align-items:center;gap:8px;min-height:32px;padding:4px 6px;margin-left:-6px;border-radius:7px;font-size:12px;font-weight:800;color:var(--slm-text);text-align:left}\n.slm-ch-rowcheck:hover{background:var(--slm-tint)}\n.slm-ch-rowcheck .box{width:15px;height:15px;flex:none;display:grid;place-items:center;border:1.5px solid var(--slm-muted);border-radius:4px;color:transparent;font-size:9px;font-weight:900;box-sizing:border-box}\n.slm-ch-rowcheck[aria-checked=\"true\"] .box{border-color:var(--slm-accent);background:var(--slm-accent);color:var(--slm-accent-ink)}\n.slm-ch-rowcheck[aria-checked=\"mixed\"] .box{border-color:var(--slm-accent);background:linear-gradient(var(--slm-accent),var(--slm-accent)) center/7px 2px no-repeat}\n.slm-ch-rowcheck .name{min-width:0}\n.slm-ch-rowcheck .meta{margin-left:auto;padding-left:8px;color:var(--slm-muted);font-size:10.5px;font-weight:700;font-variant-numeric:tabular-nums}\n.slm-ch-seatchips{display:flex;flex-wrap:wrap;gap:7px;padding:1px 0}\n.slm .slm-ch-seatchip{min-width:30px;height:30px;padding:0 8px;border-radius:8px;border:1.5px solid var(--slm-line);background:transparent;color:var(--slm-text);\n font-size:11.5px;font-weight:600;font-variant-numeric:tabular-nums;box-sizing:border-box;line-height:1;position:relative}\n.slm-ch-seatchip:hover{border-color:var(--slm-muted)}\n.slm-ch-seatchip:focus-visible{outline:2px solid var(--slm-accent);outline-offset:1px}\n/* Status has its own colours, never the host's accent or a ticket type's: a\n gold accent made every free seat read as \"in a cart\" (audit m24). Free is an\n open green ring; the rest are tinted and muted; picked is the accent. */\n.slm .slm-ch-seatchip.is-free,.slm-ch-seatlegend .is-free{border-color:#22a06b;background:transparent}\n.slm .slm-ch-seatchip.is-held,.slm-ch-seatlegend .is-held{border-color:#d99a0b;background:color-mix(in srgb,#d99a0b 18%,transparent);color:var(--slm-muted)}\n.slm .slm-ch-seatchip.is-booked,.slm-ch-seatlegend .is-booked{border-color:color-mix(in srgb,var(--slm-muted) 60%,var(--slm-surface));background:color-mix(in srgb,var(--slm-muted) 18%,transparent);color:var(--slm-muted)}\n.slm .slm-ch-seatchip.is-blocked,.slm-ch-seatlegend .is-blocked{border-color:color-mix(in srgb,var(--slm-muted) 85%,var(--slm-surface));background:color-mix(in srgb,var(--slm-muted) 12%,transparent);color:var(--slm-muted)}\n.slm-ch-seatlegend i[class]{background:transparent}\n.slm .slm-ch-seatchip[aria-checked=\"true\"]{border-color:var(--slm-accent);background:color-mix(in srgb,var(--slm-accent) 16%,var(--slm-surface));color:var(--slm-text)}\n/* The count on the left; Clear and Done small and together on the right (CR20). */\n.slm-ch-seatfoot{align-items:center;gap:10px;margin-top:16px;padding-top:12px;border-top:1px solid var(--slm-line)}\n.slm-ch-seatfoot [data-sl-foot]{flex:1;min-width:0;display:flex;align-items:center;gap:10px}\n.slm-ch-seatfoot .slm-ch-seatcount{flex:1;min-width:0;font-size:12.5px;font-weight:600;color:var(--slm-text);font-variant-numeric:tabular-nums}\n.slm-ch-seatfoot .slm-ch-footsum.warn{flex:1}\n.slm .slm-ch-dialog .slm-ch-seatfoot.foot .slm-btn{flex:none;min-width:0;height:28px;padding:0 10px;border-radius:9px;font-size:12px;font-weight:600}\n.slm .slm-ch-seatfoot .slm-btn.ghost{background:var(--slm-surface);color:var(--slm-text);border:1px solid var(--slm-line)}\n.slm .slm-ch-seatfoot .slm-btn:disabled{opacity:.5}\n@media (pointer:coarse){.slm .slm-ch-dialog .slm-ch-seatfoot.foot .slm-btn{height:auto;min-height:40px;padding:0 14px}.slm .slm-ch-seatchip{min-width:36px;height:36px}}\n.slm-ch-scopegroup{position:sticky;top:0;z-index:1;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;\n gap:6px;padding:6px 8px;border-bottom:1px solid var(--slm-line);background:var(--slm-surface)}\n.slm-ch-groupcheck{display:flex;min-width:0;align-items:center;gap:8px;padding:5px 2px;text-align:left;font-size:11px;font-weight:800}\n.slm-ch-groupcheck .box{width:16px;height:16px;flex:none;display:grid;place-items:center;border:1px solid var(--slm-muted);border-radius:4px;\n color:transparent;font-size:10px}\n.slm-ch-groupcheck[aria-checked=\"true\"] .box,.slm-ch-groupcheck[aria-checked=\"mixed\"] .box{border-color:var(--slm-accent);\n background:var(--slm-accent);color:var(--slm-accent-ink)}\n.slm-ch-groupcheck .meta{min-width:0;margin-left:auto;color:var(--slm-muted);font-size:10.5px;font-weight:600;white-space:nowrap}\n/* Board CR20: pickers whose footer says what will be added; names wrap, never cut. */\n.slm-ch-dialog .foot .slm-ch-footsum{flex:1;min-width:0;align-self:center;font-size:12.5px;font-weight:600;color:var(--slm-text)}\n.slm-ch-dialog .foot .slm-ch-footsum.warn{display:flex;gap:8px;align-items:flex-start;padding:8px 10px;border-radius:8px;font-weight:500;color:color-mix(in srgb,#b45309 75%,var(--slm-text));background:color-mix(in srgb,#f59e0b 12%,transparent);border:1px solid color-mix(in srgb,#f59e0b 40%,transparent)}\n.slm-ch-footsum.warn svg{flex:none;margin-top:1px}.slm-ch-footsum.warn b{display:block;font-weight:700}\n.slm-ch-dialog .foot .slm-btn.slm-ch-close{flex:none;margin-left:auto;min-width:0;min-height:0;padding:7px 14px;font-size:12.5px;border-radius:8px}\n.slm-ch-dialog:has(.slm-ch-footsum) .foot .slm-btn{flex:none;min-width:110px}\n.slm-ch-findbox{margin:0 0 10px}.slm-ch-findbox .slm-input{width:100%;min-height:38px}\n.slm-ch-seatitem .name{flex:1;min-width:0}.slm-ch-seatitem .meta{white-space:nowrap}\n.slm-ch-seatitem .box.mixed,.slm-ch-groupcheck .box.mixed{border-color:var(--slm-accent);background:var(--slm-accent);color:var(--slm-accent-ink)}\n.slm-ch-groupcheck .name{font-size:13px;font-weight:600}\n.slm-ch-grouptoggle{display:grid;place-items:center;width:32px;min-height:32px;color:var(--slm-muted)}\n.slm-ch-grouptoggle svg{transition:transform var(--slm-mo-quick) var(--slm-mo-out)}.slm-ch-grouptoggle.open svg{transform:rotate(90deg)}\n.slm-ch-scoperows .slm-ch-seatitem{padding-left:34px}\n.slm-ch-scope-empty{padding:18px 12px;color:var(--slm-muted);font-size:12.5px;line-height:1.5;text-align:center}\n.slm-ch-scope-empty b{display:block;margin-bottom:4px;color:var(--slm-text);font-size:14px}\n/* A column whose list gives way, so in a short room the count, Clear and Done\n stay in view and the list scrolls, rather than the whole dialog. */\n.slm-ch-dialog:has(.slm-sl-grid){width:min(640px,100%);display:flex;flex-direction:column}\n.slm-ch-dialog:has(.slm-sl-grid)>*{flex:none}\n.slm .slm-ch-dialog>.slm-sl-grid{flex:0 1 auto;min-height:150px}\n.slm-sl-grid{display:grid;grid-template-columns:220px minmax(0,1fr);height:min(52vh,440px);border:1px solid var(--slm-line);border-radius:10px;overflow:hidden}\n.slm-sl-sections{overflow:auto;padding:6px;border-right:1px solid var(--slm-line)}\n.slm .slm-sl-section{display:flex;align-items:flex-start;gap:9px;width:100%;padding:9px 10px;border-radius:10px;text-align:left}\n.slm .slm-sl-section.on{background:color-mix(in srgb,var(--slm-accent) 14%,transparent)}\n.slm-sl-section svg{margin-left:auto;align-self:center;color:var(--slm-muted);flex:none}\n.slm-sl-rows{display:flex;flex-direction:column;min-height:0;padding:12px 18px 0}\n.slm-sl-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}.slm-sl-head b{flex:1;min-width:0;font-size:14px;font-weight:700;overflow-wrap:anywhere}\n.slm .slm-sl-head .slm-btn{flex:none;min-width:0;padding:6px 11px;font-size:12px}\n.slm-sl-rows .slm-ch-seatlegend{margin-bottom:6px}\n.slm-sl-rows .slm-ch-seatlist.grid{flex:1;max-height:none;border:0;border-radius:0;margin:0;overflow:auto}\n.slm-sl-row{padding:10px 0;border-top:1px solid var(--slm-line)}\n.slm-sl-row .slm-ch-seatchips{padding-left:27px;margin-top:8px;gap:5px}\n.slm-sl-note{margin:0 0 6px;font-size:12px;color:var(--slm-muted)}\n.slm .slm-ch-seatchip:disabled{opacity:.55;cursor:not-allowed}\n@media(max-width:620px){.slm-sl-grid{grid-template-columns:1fr;grid-template-rows:minmax(0,2fr) minmax(0,3fr);height:auto}.slm-sl-sections{border-right:0;border-bottom:1px solid var(--slm-line)}}\n";
|
|
2842
2858
|
|
|
2843
2859
|
declare const __managerPickers_PICKER_LIST_CSS: typeof PICKER_LIST_CSS;
|
|
2844
2860
|
declare const __managerPickers_openCategory: typeof openCategory;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{P as a,Q as b,R as c}from"./chunk-ECM3ZZET.js";import"./chunk-3IZZM7EV.js";import"./chunk-3FEGZ5HA.js";import"./chunk-7I563G2N.js";export{b as CHANNELS_CSS,c as ChannelsMode,a as bucketRowsHtml};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{relativeLuminance255 as y,rgb255ToHex as E}from"@seatlayer/core/core/color";function c(e){if(!e)return null;let n=e.trim().toLowerCase();if(n==="white")return{r:255,g:255,b:255};if(n==="black")return{r:0,g:0,b:0};let t=/^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(n)?.[1];if(t){let s=t.length<=4?[...t].map(o=>`${o}${o}`).join(""):t;return{r:Number.parseInt(s.slice(0,2),16),g:Number.parseInt(s.slice(2,4),16),b:Number.parseInt(s.slice(4,6),16)}}let r=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*[\d.]+%?)?\s*\)$/i.exec(n);return r?{r:Math.max(0,Math.min(255,Number(r[1]))),g:Math.max(0,Math.min(255,Number(r[2]))),b:Math.max(0,Math.min(255,Number(r[3])))}:null}function m(e){return y([e.r,e.g,e.b])}function i(e,n){let t=c(e),r=c(n);if(!t||!r)return null;let s=Math.max(m(t),m(r)),o=Math.min(m(t),m(r));return(s+.05)/(o+.05)}function l(e,n="#172033",t="#eef1f8"){return(i(n,e)??0)>=(i(t,e)??0)?n:t}function R(e){return E(e.r,e.g,e.b)}function h(e,n,t){let r=c(e),s=c(n);if(!r||!s)return null;let o=Math.max(0,Math.min(1,t));return R({r:r.r*o+s.r*(1-o),g:r.g*o+s.g*(1-o),b:r.b*o+s.b*(1-o)})}var g="#d8a425",I=.18;function x(e,n){let t=h(g,n,I)??n;if((i(g,t)??0)>=4.5)return g;for(let r=.15;r<=1;r+=.05){let s=h(g,e,1-r);if(s&&(i(s,t)??0)>=4.5)return s}return l(t)}function M(e,n,t,r){if((i(e,t)??4.5)>=4.5&&(i(e,r)??4.5)>=4.5)return e;if(!c(e)||!c(n))return n;for(let s=.15;s<=1;s+=.05){let o=h(e,n,1-s);if(o&&(i(o,t)??0)>=4.5&&(i(o,r)??0)>=4.5)return o}return n}function k(e){return{"--sl-chrome":e?"#d6dce6":"#556278","--sl-chrome-line":e?"rgba(23,32,51,.55)":"rgba(233,238,247,.55)"}}var P=["--sl-bg","--sl-surface","--sl-text","--sl-muted","--sl-line","--sl-accent-text","--sl-warn-text","--sl-chrome","--sl-chrome-line"];function S(e,n){let t=n??e["--sl-bg"],r=c(t)?l(t)==="#172033":!1,s=c(e["--sl-bg"])?l(e["--sl-bg"])==="#172033":!1;if(r===s)return null;let o=r?"#ffffff":"#1a2234",a=l(t),u=e["--sl-accent"];return{"--sl-bg":t,"--sl-surface":o,"--sl-text":a,"--sl-muted":r?"#667085":"#a5aec2","--sl-line":r?"rgba(23,32,51,.16)":"rgba(165,174,194,.24)","--sl-accent-text":M(u,a,t,o),...k(r),"--sl-warn-text":x(a,o)}}var L="#f7f8fb",T={light:{background:"#ffffff",surface:"#f6f7fb",text:"#172033",muted:"#667085",line:"rgba(23,32,51,.16)",map:"#e9edf4"},dark:{background:"#0f1522",surface:"#1a2234",text:"#eef1f8",muted:"#a5aec2",line:"rgba(165,174,194,.24)",map:"#0f1522"}};function N(){try{return window.matchMedia?.("(prefers-color-scheme: dark)").matches===!0}catch{return!1}}function _(e){if(e)return e==="auto"?N()?"dark":"light":e}function H(e,n=e?.mode){if(e?.map)return e.map;let t=_(n);return t?{background:T[t].map}:null}function A(e){let n;try{n=window.matchMedia?.("(prefers-color-scheme: dark)")}catch{return()=>{}}if(!n)return()=>{};let t=r=>e(r.matches);return typeof n.addEventListener=="function"?n.addEventListener("change",t):n.addListener?.(t),()=>{typeof n.removeEventListener=="function"?n.removeEventListener("change",t):n.removeListener?.(t)}}function K(e,n,t,r){let s=t?T[t]:null,o=n?.background??s?.background??e?.background??L,a=c(o)?l(o)==="#172033":!1,u=n?.surface??s?.surface??(a?"#ffffff":"#1a2234"),C=r&&/^#[0-9a-f]{6}$/i.test(r)?r:void 0,f=n?.accent??e?.accent??C??"#f4b740",b=e?.accentInk,v=n?.accentInk??(b&&(i(b,f)??4.5)>=4.5?b:l(f,"#1a1200","#ffffff")),d=s?void 0:e?.textColor,p=n?.text??s?.text??(d&&(i(d,o)??4.5)>=4.5&&(i(d,u)??4.5)>=4.5?d:l(o));return{"--sl-accent":f,"--sl-accent-ink":v,"--sl-accent-text":M(f,p,o,u),"--sl-warn-text":x(p,u),"--sl-bg":o,"--sl-surface":u,"--sl-text":p,"--sl-muted":n?.muted??s?.muted??(a?"#667085":"#a5aec2"),"--sl-line":n?.line??s?.line??(a?"rgba(23,32,51,.16)":"rgba(165,174,194,.24)"),...k(a),"--sl-scrim-ink":a?"rgba(16,22,36,1)":"rgba(4,7,13,1)","--sl-font":n?.fontFamily??e?.fontFamily??"-apple-system,BlinkMacSystemFont,'Segoe UI',Inter,sans-serif","--sl-radius":`${n?.radius??14}px`}}export{P as a,S as b,T as c,_ as d,H as e,A as f,K as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as i}from"./chunk-
|
|
1
|
+
import{c as i}from"./chunk-3FEGZ5HA.js";function m(t){t.querySelectorAll("select:not([data-themed])").forEach(e=>{e.dataset.themed="true";let n=document.createElement("details");n.className="slm-themed-picker";let r=document.createElement("summary"),l=document.createElement("div");l.className="slm-themed-options";let d=e.getAttribute("aria-label")||Array.from(e.labels??[]).map(o=>o.textContent).join(" ")||"Choose option";r.setAttribute("aria-label",d.trim()),n.append(r,l),e.after(n),e.hidden=!0;let s=()=>{r.textContent=e.selectedOptions[0]?.textContent??"Choose\u2026",r.setAttribute("aria-disabled",String(e.disabled)),l.replaceChildren(...Array.from(e.options).map(o=>{let a=document.createElement("button");return a.type="button",a.textContent=o.textContent,a.setAttribute("aria-label",o.textContent??""),a.disabled=e.disabled||o.disabled,a.setAttribute("aria-pressed",String(o.selected)),a.onclick=()=>{e.value=o.value,n.open=!1,s(),r.focus(),e.dispatchEvent(new Event("change",{bubbles:!0})),s()},a}))};s(),e.addEventListener("change",s),r.onclick=o=>{if(e.disabled){o.preventDefault();return}s(),t.querySelectorAll(".slm-themed-picker").forEach(a=>{a!==n&&(a.open=!1)})},n.addEventListener("focusout",o=>{n.contains(o.relatedTarget)||(n.open=!1)}),n.addEventListener("keydown",o=>{if(o.key==="Escape"&&(o.preventDefault(),o.stopPropagation(),n.open=!1,r.focus()),o.key==="ArrowDown"||o.key==="ArrowUp"){if(e.disabled)return;o.preventDefault(),n.open=!0;let a=Array.from(l.querySelectorAll("button:not(:disabled)")),c=a.indexOf(document.activeElement);a[(c+(o.key==="ArrowDown"?1:a.length-1)+a.length)%a.length]?.focus()}})})}function f(t){t.querySelectorAll('input[type="date"],input[type="datetime-local"],input[type="time"]').forEach(e=>{e.dataset.slmPicker!=="1"&&(e.dataset.slmPicker="1",e.addEventListener("click",()=>{if(!(e.disabled||e.readOnly))try{e.showPicker?.()}catch{}}))})}import{formatMoney as u}from"@seatlayer/core";function h(t){return t?t.mode:"open"}function y(t,e,n){switch(t){case"open":return null;case"hidden":return{mode:"hidden",labels:e};case"closed":return{mode:"closed",labels:e};case"timed":return{mode:"timed",revealAt:n?.revealAt??Date.now()+36e5,labels:e};case"threshold":return{mode:"threshold",thresholdPct:n?.thresholdPct??80,labels:e}}}function E(t){if(typeof t=="string"){let e=document.querySelector(t);if(!e)throw new Error(`seatmanager: container "${t}" not found`);return e}if(!(t instanceof HTMLElement))throw new Error("seatmanager: container must be a CSS selector or an HTMLElement");return t}function S(t){if(!t.startsWith("mse_"))throw new Error("seatmanager: token must be a short-lived event-scoped mse_ grant minted by your backend; tenant secret keys are unsupported in browsers")}function k(t){return t==="blocked"?"not_for_sale":t}var M={free:"#6e7bff",booked:"#9ca3af",held:"#f4b740",blocked:"#475569"};function T(t,e){let n=t??{},r=e?i[e]:null,l=e==="light";return{"--slm-bg":n.background??r?.background??"#0e1017","--slm-surface":r?.surface??"#181b24","--slm-text":r?.text??"#eef1f7","--slm-muted":r?.muted??"#8b93a7","--slm-line":r?.line??"rgba(255,255,255,.09)","--slm-tint":l?"rgba(23,32,51,.05)":"rgba(255,255,255,.035)","--slm-tint-strong":l?"rgba(23,32,51,.09)":"rgba(255,255,255,.07)","--slm-accent":n.accent??(l?"#4654c8":"#6e7bff"),"--slm-accent-ink":n.accentInk??"#ffffff","--slm-font":"-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif","--slm-radius":"14px"}}function A(t){return t?i[t].map:null}function x(t,e){let n=Math.max(0,Math.round((e-t)/1e3));if(n<5)return"just now";if(n<60)return`${n}s ago`;let r=Math.round(n/60);return r<60?`${r}m ago`:`${Math.round(r/60)}h ago`}function v(t,e){return u(t,e,{maximumFractionDigits:0,fallback:(n,r)=>`${r} ${Math.round(n).toLocaleString()}`})}function R(t){return String(t??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}export{m as a,f as b,h as c,y as d,E as e,S as f,k as g,M as h,T as i,A as j,x as k,v as l,R as m};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var f=a=>{throw TypeError(a)};var e=(a,b,c)=>b.has(a)||f("Cannot "+c);var h=(a,b,c)=>(e(a,b,"read from private field"),c?c.call(a):b.get(a)),j=(a,b,c)=>b.has(a)?f("Cannot add the same private member more than once"):b instanceof WeakSet?b.add(a):b.set(a,c),i=(a,b,c,d)=>(e(a,b,"write to private field"),d?d.call(a,c):b.set(a,c),c),k=(a,b,c)=>(e(a,b,"access private method"),c);var l=(a,b,c,d)=>({set _(g){i(a,b,g,c)},get _(){return h(a,b,d)}});export{h as a,j as b,i as c,k as d,l as e};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ne,m as S}from"./chunk-
|
|
1
|
+
import{a as ne,m as S}from"./chunk-3IZZM7EV.js";var ie={tag:'<path d="M3.5 12.2V4.5a1 1 0 0 1 1-1h7.7l8.3 8.3a1.4 1.4 0 0 1 0 2l-6.3 6.3a1.4 1.4 0 0 1-2 0z"/><circle cx="8" cy="8" r="1.6"/>',ban:'<circle cx="12" cy="12" r="8.5"/><path d="M6 6l12 12"/>',cursor:'<path d="M5 3.5l13 7-5.6 1.6L10 18z"/>',box:'<rect x="4" y="4" width="16" height="16" rx="2" stroke-dasharray="3 2.4"/>',search:'<circle cx="11" cy="11" r="6.5"/><path d="M16 16l4.5 4.5"/>',alert:'<path d="M12 3.8l9.3 16.2H2.7z"/><path d="M12 10v4.5M12 17.3v.2"/>',check:'<path d="M5 12.5l4.5 4.5L19 7.5"/>',eye:'<path d="M2.5 12s3.5-6.5 9.5-6.5 9.5 6.5 9.5 6.5-3.5 6.5-9.5 6.5S2.5 12 2.5 12z"/><circle cx="12" cy="12" r="3"/>',bookmark:'<path d="M6.5 3.5h11v17l-5.5-4-5.5 4z"/>',layers:'<path d="M12 3.5l8.5 4.5L12 12.5 3.5 8z"/><path d="M3.5 12L12 16.5 20.5 12"/><path d="M3.5 16L12 20.5 20.5 16"/>',table:'<circle cx="12" cy="12" r="5"/><circle cx="12" cy="3.5" r="1.6"/><circle cx="12" cy="20.5" r="1.6"/><circle cx="3.5" cy="12" r="1.6"/><circle cx="20.5" cy="12" r="1.6"/>',clock:'<circle cx="12" cy="12" r="8.5"/><path d="M12 7.5V12l3 2"/>',lock:'<rect x="5" y="10.5" width="14" height="10" rx="2"/><path d="M8 10.5V7.5a4 4 0 0 1 8 0v3"/>',info:'<circle cx="12" cy="12" r="8.5"/><path d="M12 11v5.5M12 7.6v.2"/>',user:'<circle cx="12" cy="8" r="3.8"/><path d="M4.5 20.5a7.5 7.5 0 0 1 15 0"/>',bolt:'<path d="M13 3L5 13.5h6l-1 7.5 8-10.5h-6z"/>',star:'<path d="M12 3.8l2.5 5.2 5.7.8-4.1 4 1 5.6L12 16.8l-5.1 2.6 1-5.6-4.1-4 5.7-.8z"/>',seat:'<path d="M7 11V6.5a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2V11"/><path d="M5 11h14v4H5z"/><path d="M7 15v4.5M17 15v4.5"/>',gauge:'<path d="M4 16a8 8 0 1 1 16 0"/><path d="M12 16l4-5"/>',bell:'<path d="M6 16V11a6 6 0 0 1 12 0v5l1.5 2h-15z"/><path d="M10 20.5a2 2 0 0 0 4 0"/>',undo:'<path d="M8.5 5L4 9.5 8.5 14"/><path d="M4 9.5h10a6 6 0 0 1 0 12h-3"/>',plus:'<path d="M12 5v14M5 12h14"/>',palette:'<path d="M12 3.5a8.5 8.5 0 1 0 0 17c1.2 0 1.8-.8 1.8-1.7 0-1.3-1-1.6-1-2.8 0-1 .8-1.7 1.8-1.7h2.2a3.7 3.7 0 0 0 3.7-3.7C20.5 6.4 16.7 3.5 12 3.5z"/><circle cx="7.8" cy="11" r="1.2"/><circle cx="10.5" cy="7.3" r="1.2"/><circle cx="15" cy="7.6" r="1.2"/>',x:'<path d="M6 6l12 12M18 6L6 18"/>',ticket:'<path d="M3.5 8.5V6a1 1 0 0 1 1-1h15a1 1 0 0 1 1 1v2.5a2.5 2.5 0 0 0 0 5V16a1 1 0 0 1-1 1h-15a1 1 0 0 1-1-1v-2.5a2.5 2.5 0 0 0 0-5z"/><path d="M14 5.5v11" stroke-dasharray="1.6 2"/>',history:'<path d="M4 12a8 8 0 1 0 2.3-5.6"/><path d="M4 4.5v3.5h3.5"/><path d="M12 8v4.2l2.8 1.8"/>',spark:'<path d="M12 3.5l1.8 5 5 1.8-5 1.8-1.8 5-1.8-5-5-1.8 5-1.8z"/><path d="M18.5 15.5l.7 1.8 1.8.7-1.8.7-.7 1.8-.7-1.8-1.8-.7 1.8-.7z"/>',lasso:'<ellipse cx="12" cy="9.5" rx="8" ry="5.5" stroke-dasharray="3 2.4"/><path d="M8.5 14.5c-1.5 1.2-1.6 3.4.2 4.2 1.4.6 2.8-.3 2.8-1.7"/>',hand:'<path d="M8 13V6a2 2 0 0 1 4 0v6-8a2 2 0 0 1 4 0v8-6a2 2 0 0 1 4 0v10c0 4-3 6-7 6-3 0-5-2-7-5l-3-4a2 2 0 0 1 3-2l2 2Z"/>',fit:'<path d="M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5"/>',route:'<circle cx="6" cy="6" r="2.2"/><circle cx="18" cy="18" r="2.2"/><path d="M8.2 6H15a3 3 0 0 1 0 6H9a3 3 0 0 0 0 6h6.8"/>'};function M(i,e,t=30){let n=Math.round(t*.58);return`<span class="slm-plate" style="width:${t}px;height:${t}px;background:color-mix(in srgb,${e} 15%,transparent)"><svg width="${n}" height="${n}" viewBox="0 0 24 24" fill="none" stroke="${e}" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${ie[i]??""}</svg></span>`}var yt={booked:["seat","#8a94a6"],free:["seat","#22a06b"],held:["clock","#d99a0b"],blocked:["ban","#d64545"],reserved:["bookmark","#c026d3"]};function B(i,e="currentColor",t=16){return`<svg width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" stroke="${e}" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${ie[i]??""}</svg>`}function ae(i){return`<div class="slm-railhead slm-taskhead">${M(i.glyph,i.hue)}<p class="slm-eyebrow">${S(i.title)}</p>${i.badge?`<span class="slm-scope event">${S(i.badge)}</span>`:""}</div><p class="slm-hint">${i.purpose}${i.how?` <button type="button" class="slm-howlink" data-how="${i.how}">How it works \u203A</button>`:""}</p>`}function kt(){return'<div class="slm-selcard" data-ref="selcard" aria-live="polite"></div>'}function oe(){return typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent)?"\u2318K":"Ctrl K"}function wt(){return oe().replace("\u2318","\u2318 ").split(" ").map(i=>`<kbd>${i}</kbd>`).join("")}function se(){return typeof matchMedia=="function"&&matchMedia("(pointer: coarse)").matches}var Oe=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent)?"\u2318Z":"Ctrl Z",_e='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 6l6 6-6 6"/></svg>',qe=[["cursor","#d99a0b","Click a seat","or anywhere near it"],["box","#d99a0b","Drag on the map","to draw a box"],["search","#4c6fff","Search",", then Enter"]],Ne=[["cursor","#d99a0b","Tap a seat","or anywhere near it"],["box","#d99a0b","Press and hold, then drag","to draw a box"],["search","#4c6fff","Find","a seat, row or section"]];function xt(i,e){if(i.classList.toggle("empty",e.count===0),!e.count){i.innerHTML=`<div class="slm-selcount"><b>0</b> seats selected</div><div class="slm-ways">${(se()?Ne:qe).map(([n,s,a,o])=>`<span>${M(n,s,26)}<span><b>${a}</b>${n==="search"&&!se()?oe():""}${o}</span></span>`).join("")}${e.saved?`<button type="button" class="slm-savedrow" data-saved-list>${M("star","#d99a0b",26)}<span><b>Saved selections</b>${e.saved.toLocaleString()} on this event</span>${_e}</button>`:""}</div>`;return}let t=e.count===1?"seat":"seats";i.innerHTML=`<div class="slm-selcount"><b>${e.count.toLocaleString()}</b> ${t} selected<button type="button" class="slm-linkbtn" data-sel-clear>Clear</button></div><p class="slm-selwhere">${S(e.where)}</p><div class="slm-selparts">${e.parts.map(n=>`<span class="tone-${n.tone}">${S(n.label)}</span>`).join("")}${e.types.map(n=>`<span class="type"><i style="background:${S(n.color)}"></i>${S(n.label)}${n.count==null?"":` ${n.count.toLocaleString()}`}</span>`).join("")}</div>`+(e.stale?`<p class="slm-selstale">${M("alert","#b45309",20)}${S(e.stale)}</p>`:"")+`<div class="slm-selbtns">${e.canSimilar?`<span class="slm-simwrap"><button type="button" class="slm-btn ghost" data-sel-similar aria-haspopup="menu" aria-expanded="false">${B("spark","#d99a0b")}Select similar</button></span>`:""}<button type="button" class="slm-btn ghost" data-sel-undo title="Undo the last change to the selection (${Oe})"${e.canUndo?"":" disabled"}>${B("undo","#64748b")}Undo</button>${e.canSave?`<button type="button" class="slm-btn ghost slm-selsave" data-sel-save>${B("star","#d99a0b")}Save</button>`:""}</div>`}function Ue(i){return i.length?i.length===1?`row ${i[0]}`:i.length<=4?`rows ${i[0]}\u2013${i[i.length-1]}`:`${i.length} rows`:""}function St(i){if(!i.length)return"";if(i.length===1){let t=Ue(i[0].rows);return t?`${i[0].label} \xB7 ${t}`:i[0].label}let e=i.slice(0,2).map(t=>t.label).join(", ");return`${i.length} sections: ${e}${i.length>2?"\u2026":""}`}function v(i,e,t,n){return`<div class="slm-panelalert ${i}" role="${i==="error"?"alert":"status"}">${B(n??(i==="ok"?"check":"alert"),"currentColor",18)}<span><b>${S(e)}</b>${S(t)}</span></div>`}function Ct(i){return`<div class="slm-railfoot" data-ref="${i}"><button type="button" class="slm-btn" data-foot-action></button><button type="button" class="slm-linkbtn" data-foot-secondary hidden></button><p class="slm-note" data-foot-note></p></div>`}function $t(i,e){let t=i.querySelector("[data-foot-action]"),n=i.querySelector("[data-foot-note]");t&&(t.textContent=e.label,t.disabled=!!e.disabled||!!e.busy,t.classList.toggle("danger",!!e.danger),t.classList.toggle("busy",!!e.busy),t.setAttribute("aria-busy",String(!!e.busy)));let s=i.querySelector("[data-foot-secondary]");s&&(s.hidden=!e.secondary,s.innerHTML=e.secondary?`${e.look?B("undo","currentColor",14):""}${S(e.secondary)}`:"",s.disabled=!!e.busy),n&&(n.textContent=e.note??"",n.hidden=!e.note),i.classList.toggle("done",e.look==="done"),i.classList.toggle("settle",e.look==="settle")}function Ve(i,e){if(!i.labels.length)return"Nothing found";let t=[];i.sections&&t.push(`${i.sections.toLocaleString()} section${i.sections===1?"":"s"}`),i.rows&&t.push(`${i.rows.toLocaleString()} row${i.rows===1?"":"s"}`);let n=`${i.labels.length.toLocaleString()} seat${i.labels.length===1?"":"s"} found`,s=t.length?`${t.join(" \xB7 ")} \xB7 ${n}`:n;return e?`${s} \xB7 Enter to ${e==="frame"?"show":"select"}`:s}function Fe(i={}){return`
|
|
2
2
|
<div class="slm-find${i.compact?" slm-find-bar":""}" data-ch-find>
|
|
3
3
|
<input type="search" class="slm-input" data-ch-find-input placeholder="Find seat, row or section" aria-label="Find seat, row or section" autocomplete="off"${i.compact?' aria-keyshortcuts="/"':""}>
|
|
4
4
|
<span class="slm-find-count" data-ch-find-count role="status"></span>
|
|
@@ -81,8 +81,6 @@ import{a as ne,m as S}from"./chunk-T57HSGPG.js";var ie={tag:'<path d="M3.5 12.2V
|
|
|
81
81
|
background:#f4b740;color:#1a1200;font-weight:800;font-size:12.5px}
|
|
82
82
|
.slm-ch-staged .go:disabled{opacity:.48;cursor:not-allowed}
|
|
83
83
|
.slm-ch-staged .drop{color:var(--slm-muted);font-weight:700;font-size:11.5px;min-height:44px;padding-inline:8px}
|
|
84
|
-
.slm-ch-tick{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;
|
|
85
|
-
background:#fff;color:#1f7a4d;font-weight:900;font-size:11px;animation:slm-ch-tick var(--slm-mo-base) var(--slm-mo-spring)}
|
|
86
84
|
@keyframes slm-ch-shake{0%,100%{transform:none}25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}
|
|
87
85
|
@keyframes slm-ch-tick{from{transform:scale(.4);opacity:0}to{transform:scale(1);opacity:1}}
|
|
88
86
|
|
|
@@ -251,9 +249,6 @@ import{a as ne,m as S}from"./chunk-T57HSGPG.js";var ie={tag:'<path d="M3.5 12.2V
|
|
|
251
249
|
changes and the button dims for the length of the confirmation. */
|
|
252
250
|
.slm-ch-copyrow .slm-btn.copied{opacity:.72}
|
|
253
251
|
.slm-ch-copysink{position:absolute;left:-9999px;top:0;width:1px;height:1px;opacity:0}
|
|
254
|
-
.slm-ch-lkrow{display:flex;gap:8px;margin-top:5px;font-size:11px;color:var(--slm-muted)}
|
|
255
|
-
.slm-ch-lkrow .k{flex:none;min-width:104px}
|
|
256
|
-
.slm-ch-lkrow .v{color:var(--slm-text);font-variant-numeric:tabular-nums}
|
|
257
252
|
.slm-ch-radio{display:flex;gap:9px;align-items:flex-start;padding:11px 12px;border:1px solid var(--slm-line);
|
|
258
253
|
border-radius:10px;margin-top:8px;font-size:12.5px;cursor:pointer;
|
|
259
254
|
transition:border-color var(--slm-mo-quick) var(--slm-mo-out)}
|
|
@@ -282,7 +277,7 @@ import{a as ne,m as S}from"./chunk-T57HSGPG.js";var ie={tag:'<path d="M3.5 12.2V
|
|
|
282
277
|
@media (prefers-reduced-motion:reduce){
|
|
283
278
|
.slm-ch-layer,.slm-ch-banner,.slm-ch-staged,.slm-ch-row,.slm.compact.ch-sheet .slm-rail,
|
|
284
279
|
.slm-ch-radio,.slm-ch-copyrow .slm-btn{transition:none!important}
|
|
285
|
-
.slm-ch-staged.shake,.slm-ch-
|
|
280
|
+
.slm-ch-staged.shake,.slm-ch-bucket,.slm-ch-scrim,.slm-ch-dialog,
|
|
286
281
|
.slm-ch-counts b.bump,.slm-ch-selnum.bump{animation:none!important}
|
|
287
282
|
.slm-ch-busy::before{animation:none!important;opacity:1}
|
|
288
283
|
.slm-ch-staged.shake{outline:2px solid #e5484d;outline-offset:2px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function C(p){return p.focusedSection!==null?p.deeperThanSectionFrame===!1?"venue":"section":p.atVenueFit!==void 0?p.atVenueFit?"none":"venue":p.seatsRevealed?"venue":"none"}import{pointInPolygon as M,t as u}from"@seatlayer/core";import{createMinimapTransform as y,minimapPointToWorld as x,minimapViewportPlan as w}from"@seatlayer/core/picker/minimapGeometry";function S(p){let e={inactive:0,available:1,selected:2},i=new Map;for(let n of p){let o=i.get(n.id);(!o||e[n.state]>e[o])&&i.set(n.id,n.state)}let t={selected:0,available:0,inactive:0};for(let n of i.values())t[n]+=1;return t}function k(p,e){return p.x<=e.x&&p.y<=e.y&&p.x+p.width>=e.x+e.width&&p.y+p.height>=e.y+e.height}function L(p,e){let i=new g(p);return i.build(e),i}var g=class{constructor(e){this.host=e;this.miniCanvas=null;this.miniBase=null;this.miniWrap=null;this.miniToggle=null;this.miniLabel=null;this.miniTf=null;this.miniDrag=null;this.miniSuppressClick=!1;this.userClosed=!1}dispose(){this.miniToggle?.remove(),this.miniWrap?.remove(),this.miniToggle=null,this.miniWrap=null,this.miniCanvas=null,this.miniBase=null,this.miniLabel=null,this.miniTf=null,this.miniDrag=null,this.host.root()?.removeAttribute("data-minimap-open")}build(e){if(!this.host.controller.getViewport())return;let t=document.createElement("button");t.type="button",t.className="sl-minimap-toggle",t.setAttribute("aria-label",u("picker.openVenueMap")),t.setAttribute("aria-expanded","false"),t.innerHTML='<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 6l5-2 8 3 5-2v13l-5 2-8-3-5 2zM8 4v13M16 7v13"/></svg>',e.appendChild(t),this.miniToggle=t;let n=document.createElement("div");n.className="sl-minimap",n.setAttribute("role","group");let o=document.createElement("div");o.className="sl-minimap-bar";let h=document.createElement("span");h.className="sl-minimap-label";let s=document.createElement("span");s.className="sl-minimap-key",s.setAttribute("aria-label",u("picker.minimapStateKey")),s.append(...[["focused","picker.minimapStateFocused"],["selected","picker.minimapStateSelected"],["","picker.minimapStateAvailable"],["inactive","picker.minimapStateInactive"]].map(([a,f])=>{let m=document.createElement("i");return a&&(m.className=a),m.title=u(f),m}));let r=document.createElement("button");r.type="button",r.className="sl-minimap-close",r.setAttribute("aria-label",u("picker.closeVenueMap")),r.textContent="\xD7",o.append(h,s,r);let l=document.createElement("canvas");l.tabIndex=0,l.setAttribute("role","application"),l.setAttribute("aria-label",u("picker.venueMapLabel")),n.append(o,l),e.appendChild(n),this.miniWrap=n,this.miniLabel=h,this.miniCanvas=l;let d=document.createElement("canvas");this.miniBase=d,t.addEventListener("click",()=>{let a=this.host.root()?.dataset.minimapOpen==="true";this.userClosed=a,this.setMinimapOpen(!a)}),r.addEventListener("click",()=>{this.userClosed=!0,this.setMinimapOpen(!1)}),l.addEventListener("click",a=>{if(this.miniSuppressClick){this.miniSuppressClick=!1;return}this.minimapJump(a)}),l.addEventListener("pointerdown",a=>this.minimapPointerDown(a)),l.addEventListener("pointermove",a=>this.minimapPointerMove(a)),l.addEventListener("pointerup",a=>this.minimapPointerUp(a)),l.addEventListener("pointercancel",a=>this.minimapPointerUp(a)),l.addEventListener("keydown",a=>this.minimapKeydown(a)),this.layoutMinimap(),this.syncMinimapLabel(),this.drawMinimapStatic(),this.drawMinimapRect()}setAutoOpen(e){if(this.miniWrap){if(!e){this.userClosed=!1,this.host.root()?.dataset.minimapOpen==="true"&&this.setMinimapOpen(!1,!1);return}this.userClosed||this.host.root()?.dataset.minimapOpen==="true"||this.setMinimapOpen(!0,!1)}}setMinimapOpen(e,i=!0){this.host.root()?.setAttribute("data-minimap-open",String(e)),this.miniToggle?.setAttribute("aria-expanded",String(e)),i&&(e?this.miniCanvas?.focus():this.miniToggle?.focus())}layoutMinimap(){let e=this.miniCanvas,i=this.miniBase,t=this.host.controller.getViewport()?.bounds;if(!e||!i||!t||!(t.width>0&&t.height>0))return;let n=196,o=146,h=6,s=t.width/Math.max(1,t.height),r=n,l=Math.round(n/s);l>o&&(l=o,r=Math.round(o*s)),r=Math.max(64,r),l=Math.max(48,l);let d=Math.min(2,window.devicePixelRatio||1);e.width=Math.round(r*d),e.height=Math.round(l*d),e.style.width=`${r}px`,e.style.height=`${l}px`,i.width=e.width,i.height=e.height,this.miniTf=y(t,e.width,e.height,d,h)}syncMinimapLabel(){if(!this.miniLabel||!this.miniWrap)return;let e=this.host.controller.getFloors(),i=this.host.controller.isFloorOverview()?u("picker.allFloors"):e.find(r=>r.id===this.host.controller.getActiveFloorId())?.name??u("picker.venueOverview"),t=this.host.controller.getMinimapSnapshot().sections,o=t.find(r=>r.active)?.label??this.host.focusedSectionLabel(),h=o?`${i} \xB7 ${o}`:i;this.miniLabel.textContent=h;let s=u("picker.venueMapSummary",S(t));this.miniWrap.setAttribute("aria-label",t.length?`${h}. ${s}`:h),this.miniCanvas?.setAttribute("aria-label",t.length?`${h}. ${s} ${u("picker.venueMapPanSections")}`:`${h}. ${u("picker.venueMapPanEmpty")}`)}refreshMinimap(){this.miniBase&&(this.layoutMinimap(),this.syncMinimapLabel(),this.drawMinimapStatic(),this.drawMinimapRect())}drawMinimapStatic(){let e=this.miniBase,i=this.miniTf;if(!e||!i)return;let t=e.getContext("2d");if(!t)return;t.clearRect(0,0,e.width,e.height);let n=a=>a*i.scale+i.offX,o=a=>a*i.scale+i.offY,h=this.host.cssVar("--sl-line")||"rgba(139,147,167,.5)",s=this.host.cssVar("--sl-muted")||"#8b93a7",r=this.host.cssVar("--sl-accent")||"#6e7bff",l=this.host.cssVar("--sl-success")||"#22a06b",d=this.host.controller.getMinimapSnapshot();for(let a of d.sections){if(a.outline.length<3)continue;t.beginPath(),a.outline.forEach((m,c)=>c===0?t.moveTo(n(m.x),o(m.y)):t.lineTo(n(m.x),o(m.y))),t.closePath();let f=a.paint;if(t.globalAlpha=a.state==="inactive"?.5:.92,f?t.fillStyle=f.fill:(t.globalAlpha=a.state==="inactive"?.18:a.state==="selected"?.72:.34,t.fillStyle=a.state==="inactive"?s:a.state==="selected"?r:l),t.fill(),t.globalAlpha=.82,t.lineWidth=Math.max(1,i.dpr),t.strokeStyle=f?.stroke||h,t.stroke(),a.owned){t.globalAlpha=1,t.lineWidth=Math.max(2,i.dpr*1.5),t.strokeStyle=r,t.stroke();let m=a.outline.reduce((c,v)=>({x:c.x+v.x,y:c.y+v.y}),{x:0,y:0});t.beginPath(),t.arc(n(m.x/a.outline.length),o(m.y/a.outline.length),Math.max(1.5,i.dpr*1.6),0,Math.PI*2),t.fillStyle=r,t.fill(),t.beginPath(),a.outline.forEach((c,v)=>v===0?t.moveTo(n(c.x),o(c.y)):t.lineTo(n(c.x),o(c.y))),t.closePath()}a.active&&(t.globalAlpha=1,t.lineJoin="round",t.lineWidth=Math.max(4,i.dpr*3.5),t.strokeStyle=this.host.cssVar("--sl-surface")||"#fff",t.stroke(),t.lineWidth=Math.max(2,i.dpr*1.75),t.strokeStyle=r,t.stroke())}if(t.globalAlpha=1,!d.sections.length){let a=Math.max(1,i.dpr),f=new Map,m=c=>{let v=f.get(c);if(v)return v;let b=this.host.tint?.(c)||l;return f.set(c,b),b};for(let c of d.seats)t.globalAlpha=c.state==="inactive"?.22:.78,t.fillStyle=c.state==="inactive"?s:c.state==="selected"?r:m(c.categoryKey),t.beginPath(),t.arc(n(c.x),o(c.y),a,0,Math.PI*2),t.fill();t.globalAlpha=1}}drawMinimapRect(){let e=this.miniCanvas,i=this.miniBase,t=this.miniTf;if(!e||!i||!t)return;let n=e.getContext("2d");if(!n)return;n.clearRect(0,0,e.width,e.height),n.drawImage(i,0,0);let o=this.host.controller.getViewport();if(!o)return;let h=k(o.visible,o.bounds);if(this.host.root()?.toggleAttribute("data-minimap-idle",h),h)return;let s=w(o.visible,t,e.width,e.height,Math.max(2,t.dpr*2)),r=this.host.cssVar("--sl-text")||"#12151c",l=this.host.cssVar("--sl-surface")||"#fff";n.save(),n.globalAlpha=.1,n.fillStyle=r,n.fillRect(s.raw.x,s.raw.y,s.raw.width,s.raw.height),n.globalAlpha=.9,n.lineJoin="round",n.lineWidth=Math.max(4,t.dpr*3.25),n.strokeStyle=l,n.strokeRect(s.raw.x,s.raw.y,s.raw.width,s.raw.height),n.globalAlpha=1,n.lineWidth=Math.max(2,t.dpr*1.75),n.strokeStyle=r,n.strokeRect(s.raw.x,s.raw.y,s.raw.width,s.raw.height),s.clipped&&Object.values(s.clippedEdges).some(Boolean)&&(n.setLineDash([Math.max(3,t.dpr*3),Math.max(2,t.dpr*2)]),n.strokeRect(s.clipped.x,s.clipped.y,s.clipped.width,s.clipped.height)),n.restore()}minimapWorldPoint(e){let i=this.miniCanvas,t=this.miniTf;if(!i||!t)return null;let n=i.getBoundingClientRect(),o=(e.clientX-n.left)*(i.width/Math.max(1,n.width)),h=(e.clientY-n.top)*(i.height/Math.max(1,n.height));return{...x({x:o,y:h},t),px:o,py:h}}minimapPointerDown(e){let i=this.minimapWorldPoint(e),t=this.host.controller.getViewport()?.visible;!i||!t||!(i.x>=t.x&&i.x<=t.x+t.width&&i.y>=t.y&&i.y<=t.y+t.height)||(this.miniDrag={pointerId:e.pointerId,offsetX:i.x-(t.x+t.width/2),offsetY:i.y-(t.y+t.height/2),startX:e.clientX,startY:e.clientY,moved:!1},this.miniCanvas?.setPointerCapture(e.pointerId),this.miniCanvas?.classList.add("sl-dragging"),e.preventDefault())}minimapPointerMove(e){let i=this.miniDrag;if(!i||i.pointerId!==e.pointerId)return;let t=this.minimapWorldPoint(e);t&&(!i.moved&&Math.hypot(e.clientX-i.startX,e.clientY-i.startY)>2&&(i.moved=!0,this.host.controller.clearSectionFocus()),this.host.controller.panToWorld({x:t.x-i.offsetX,y:t.y-i.offsetY}),e.preventDefault())}minimapPointerUp(e){let i=this.miniDrag;!i||i.pointerId!==e.pointerId||(this.miniSuppressClick=i.moved,this.miniDrag=null,this.miniCanvas?.classList.remove("sl-dragging"),this.miniCanvas?.hasPointerCapture(e.pointerId)&&this.miniCanvas.releasePointerCapture(e.pointerId))}minimapKeydown(e){let i=this.host.controller.getViewport()?.visible;if(!i)return;if(e.key==="Home"){this.host.controller.overview(),e.preventDefault();return}let t=e.key==="ArrowLeft"?-i.width*.2:e.key==="ArrowRight"?i.width*.2:0,n=e.key==="ArrowUp"?-i.height*.2:e.key==="ArrowDown"?i.height*.2:0;!t&&!n||(this.host.controller.clearSectionFocus(),this.host.controller.panToWorld({x:i.x+i.width/2+t,y:i.y+i.height/2+n}),e.preventDefault())}minimapJump(e){let i=this.minimapWorldPoint(e);if(i){for(let t of this.host.controller.getMinimapSnapshot().sections)if(!(t.state==="inactive"||t.outline.length<3)&&M(i,t.outline)){this.host.controller.focusSection(t.id);return}this.host.controller.clearSectionFocus(),this.host.controller.panToWorld(i)}}};export{C as a,L as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
1
|
+
import{a as h}from"./chunk-3IZZM7EV.js";function b(t,r,s,n={}){let i=n.previous?null:document.activeElement??null;n.previous?.scrim.remove();let e=document.createElement("div");e.className="slm-ch-scrim",e.innerHTML=`<div class="slm-ch-dialog" role="dialog" aria-modal="true"
|
|
2
2
|
aria-labelledby="slm-ch-dlg-title" tabindex="-1">${r}</div>`,t.appendChild(e);let o=e.firstElementChild,d=!1,c={scrim:e,dialog:o,close:({restoreFocus:a=!0}={})=>{d||(d=!0,e.remove(),a&&(i?.isConnected&&t.contains(i)?i:t).focus?.({preventScroll:!0}),n.onClose?.())}};return o.querySelectorAll("[data-ch-close]").forEach(a=>{a.addEventListener("click",()=>c.close())}),e.addEventListener("keydown",a=>{if(a.key==="Escape"){a.stopPropagation(),c.close();return}if(a.key!=="Tab")return;let m=[...o.querySelectorAll('summary,button:not([disabled]),select:not([hidden]),input,textarea,a[href],[tabindex]:not([tabindex="-1"])')];if(!m.length)return;let u=m[0],p=m[m.length-1];a.shiftKey&&document.activeElement===u?(a.preventDefault(),p.focus()):!a.shiftKey&&document.activeElement===p&&(a.preventDefault(),u.focus())}),s(o),h(o),(o.querySelector("input,summary,button")??o).focus(),c}var v=`
|
|
3
3
|
.slm{--slm-ch-scrim:rgba(0,0,0,.58)}
|
|
4
4
|
.slm[data-theme=light]{--slm-ch-scrim:rgba(23,32,51,.42)}
|