@scopetickets/checkout 0.1.1 → 0.1.3
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 +29 -1
- package/dist/{chunk-4BOPQURW.js → chunk-GJZKPJB5.js} +86 -86
- package/dist/{chunk-4BOPQURW.js.map → chunk-GJZKPJB5.js.map} +1 -1
- package/dist/index.cjs +997 -522
- package/dist/index.cjs.map +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +98 -32
- package/dist/index.d.ts +98 -32
- package/dist/index.js +661 -186
- package/dist/index.js.map +1 -1
- package/dist/pickers.d.cts +5 -0
- package/dist/pickers.d.ts +5 -0
- package/dist/pickers.js +1 -1
- package/dist/styles.css +55 -19
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -429,8 +429,22 @@ function IslandHeader({
|
|
|
429
429
|
var import_react6 = require("react");
|
|
430
430
|
|
|
431
431
|
// src/island/island-geometry.ts
|
|
432
|
-
|
|
433
|
-
|
|
432
|
+
var AXES = {
|
|
433
|
+
"top-left": { block: "top", inline: "left" },
|
|
434
|
+
top: { block: "top", inline: "center" },
|
|
435
|
+
"top-right": { block: "top", inline: "right" },
|
|
436
|
+
left: { block: "center", inline: "left" },
|
|
437
|
+
center: { block: "center", inline: "center" },
|
|
438
|
+
right: { block: "center", inline: "right" },
|
|
439
|
+
"bottom-left": { block: "bottom", inline: "left" },
|
|
440
|
+
bottom: { block: "bottom", inline: "center" },
|
|
441
|
+
"bottom-right": { block: "bottom", inline: "right" }
|
|
442
|
+
};
|
|
443
|
+
function alignmentAxes(align) {
|
|
444
|
+
return AXES[align];
|
|
445
|
+
}
|
|
446
|
+
function pinEdge(block) {
|
|
447
|
+
return block === "center" ? null : block;
|
|
434
448
|
}
|
|
435
449
|
var SPACE = {
|
|
436
450
|
/** `$0.25` — the hairline step. */
|
|
@@ -522,12 +536,24 @@ function toLocal(rect, container, align, scale = 1) {
|
|
|
522
536
|
height: rect.height / s
|
|
523
537
|
};
|
|
524
538
|
}
|
|
525
|
-
var NO_GROWTH = Object.freeze({ surface: 0,
|
|
526
|
-
function anchorTravel(growth, anchor) {
|
|
527
|
-
|
|
539
|
+
var NO_GROWTH = Object.freeze({ surface: 0, clip: 0, gutter: 0 });
|
|
540
|
+
function anchorTravel(growth, anchor, align) {
|
|
541
|
+
if (anchor === "CHROME") return 0;
|
|
542
|
+
switch (align) {
|
|
543
|
+
case "top":
|
|
544
|
+
return 0;
|
|
545
|
+
case "bottom":
|
|
546
|
+
return growth.clip - growth.gutter;
|
|
547
|
+
case "center":
|
|
548
|
+
return (growth.clip - growth.gutter) / 2;
|
|
549
|
+
default: {
|
|
550
|
+
const exhaustive = align;
|
|
551
|
+
return exhaustive;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
528
554
|
}
|
|
529
555
|
function forSurfaceGrowth(rect, growth, anchor, align) {
|
|
530
|
-
const travel = anchorTravel(growth, anchor);
|
|
556
|
+
const travel = anchorTravel(growth, anchor, align);
|
|
531
557
|
switch (align) {
|
|
532
558
|
case "top":
|
|
533
559
|
return { ...rect, offset: rect.offset + travel };
|
|
@@ -535,6 +561,10 @@ function forSurfaceGrowth(rect, growth, anchor, align) {
|
|
|
535
561
|
return { ...rect, offset: rect.offset + growth.surface - travel };
|
|
536
562
|
case "center":
|
|
537
563
|
return { ...rect, offset: rect.offset + travel - growth.surface / 2 };
|
|
564
|
+
default: {
|
|
565
|
+
const exhaustive = align;
|
|
566
|
+
return exhaustive;
|
|
567
|
+
}
|
|
538
568
|
}
|
|
539
569
|
}
|
|
540
570
|
function carryTransform(from, to, align) {
|
|
@@ -665,6 +695,7 @@ var IslandSurface = (0, import_react5.forwardRef)(function IslandSurface2({
|
|
|
665
695
|
rowHeight,
|
|
666
696
|
edge,
|
|
667
697
|
align,
|
|
698
|
+
placement,
|
|
668
699
|
journeyFullscreen,
|
|
669
700
|
popAxis = "both",
|
|
670
701
|
press,
|
|
@@ -674,6 +705,7 @@ var IslandSurface = (0, import_react5.forwardRef)(function IslandSurface2({
|
|
|
674
705
|
height,
|
|
675
706
|
label,
|
|
676
707
|
footprint,
|
|
708
|
+
footprintEdge,
|
|
677
709
|
clipRef,
|
|
678
710
|
bay,
|
|
679
711
|
bayHeight,
|
|
@@ -683,6 +715,8 @@ var IslandSurface = (0, import_react5.forwardRef)(function IslandSurface2({
|
|
|
683
715
|
shield,
|
|
684
716
|
sealed = false
|
|
685
717
|
}, ref) {
|
|
718
|
+
const axes = alignmentAxes(align);
|
|
719
|
+
const pinned = placement === "screen";
|
|
686
720
|
const style = {
|
|
687
721
|
"--scopetickets-island-radius": `${radius}px`,
|
|
688
722
|
"--scopetickets-island-padding-block": `${padding.block}px`,
|
|
@@ -722,13 +756,19 @@ var IslandSurface = (0, import_react5.forwardRef)(function IslandSurface2({
|
|
|
722
756
|
};
|
|
723
757
|
return (
|
|
724
758
|
// The reservation, and nothing else: it holds the island's collapsed footprint open
|
|
725
|
-
// in the host page's flow
|
|
759
|
+
// in the host page's flow — or, placed on the screen, pinned to it — and gives the
|
|
760
|
+
// frame something to be positioned against.
|
|
726
761
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
727
762
|
"div",
|
|
728
763
|
{
|
|
729
764
|
"data-scopetickets-island-anchor": true,
|
|
765
|
+
"data-placement": pinned ? "screen" : void 0,
|
|
766
|
+
"data-align-block": pinned ? axes.block : void 0,
|
|
730
767
|
className: "scopetickets-island-anchor",
|
|
731
|
-
style: {
|
|
768
|
+
style: {
|
|
769
|
+
"--scopetickets-island-anchor-height": `${footprint}px`,
|
|
770
|
+
...pinned ? { "--scopetickets-island-anchor-inset": `${footprintEdge}px` } : {}
|
|
771
|
+
},
|
|
732
772
|
children: [
|
|
733
773
|
shield,
|
|
734
774
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
@@ -737,7 +777,8 @@ var IslandSurface = (0, import_react5.forwardRef)(function IslandSurface2({
|
|
|
737
777
|
ref,
|
|
738
778
|
"data-scopetickets-island": true,
|
|
739
779
|
"data-mode": modeAttribute(mode),
|
|
740
|
-
"data-align":
|
|
780
|
+
"data-align-block": axes.block,
|
|
781
|
+
"data-align-inline": axes.inline,
|
|
741
782
|
"data-journey": journeyFullscreen ? "fullscreen" : void 0,
|
|
742
783
|
"data-pop-axis": popAxis === "block" ? "block" : void 0,
|
|
743
784
|
"data-press": press ?? void 0,
|
|
@@ -789,6 +830,7 @@ var layoutScale = (element) => {
|
|
|
789
830
|
};
|
|
790
831
|
var startAtRest = (contentKey) => atRest(initialSlots(contentKey));
|
|
791
832
|
var COLLAPSED_FOOTPRINT = footprintHeight("compact");
|
|
833
|
+
var COLLAPSED_EDGE = frameFor("compact").edge;
|
|
792
834
|
function IslandHost({
|
|
793
835
|
presentation,
|
|
794
836
|
contentKey,
|
|
@@ -796,6 +838,7 @@ function IslandHost({
|
|
|
796
838
|
label,
|
|
797
839
|
mode,
|
|
798
840
|
align = "bottom",
|
|
841
|
+
placement = "page",
|
|
799
842
|
journeyFullscreen,
|
|
800
843
|
chrome,
|
|
801
844
|
bay,
|
|
@@ -808,6 +851,7 @@ function IslandHost({
|
|
|
808
851
|
}) {
|
|
809
852
|
const [state, dispatch] = (0, import_react6.useReducer)(reduceTransition, contentKey, startAtRest);
|
|
810
853
|
const frame = frameFor(presentation);
|
|
854
|
+
const { block } = alignmentAxes(align);
|
|
811
855
|
const [press, setPress] = (0, import_react6.useState)(null);
|
|
812
856
|
const ledRef = (0, import_react6.useRef)("none");
|
|
813
857
|
const letGo = (0, import_react6.useRef)(null);
|
|
@@ -892,7 +936,6 @@ function IslandHost({
|
|
|
892
936
|
);
|
|
893
937
|
const clipRef = (0, import_react6.useRef)(null);
|
|
894
938
|
const layerRef = (0, import_react6.useRef)(null);
|
|
895
|
-
const baySectionRef = (0, import_react6.useRef)(null);
|
|
896
939
|
const bayRef = (0, import_react6.useRef)(null);
|
|
897
940
|
const [bayContent, setBayContent] = (0, import_react6.useState)(0);
|
|
898
941
|
const measureBay = (0, import_react6.useCallback)(() => {
|
|
@@ -994,14 +1037,16 @@ function IslandHost({
|
|
|
994
1037
|
const scale = layoutScale(layer);
|
|
995
1038
|
const arrivingPlane = activePlaneRef.current;
|
|
996
1039
|
const bayTarget = bayShown ? bayRef.current?.offsetHeight ?? 0 : 0;
|
|
997
|
-
const
|
|
998
|
-
const bayNow = baySection === null ? 0 : asRect(baySection).height / scale;
|
|
1040
|
+
const clipNow = clipRef.current === null ? 0 : asRect(clipRef.current).height / scale;
|
|
999
1041
|
const gutter = gutterTravel();
|
|
1000
|
-
const growth = arrivingPlane === null ? NO_GROWTH : {
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1042
|
+
const growth = arrivingPlane === null ? NO_GROWTH : (() => {
|
|
1043
|
+
const planeTarget = arrivingPlane.getBoundingClientRect().height / scale + gutter;
|
|
1044
|
+
return {
|
|
1045
|
+
surface: planeTarget + bayTarget - container.height / scale,
|
|
1046
|
+
clip: planeTarget - clipNow,
|
|
1047
|
+
gutter
|
|
1048
|
+
};
|
|
1049
|
+
})();
|
|
1005
1050
|
const found = [];
|
|
1006
1051
|
for (const [name, entry] of registry.current) {
|
|
1007
1052
|
const leavingEntry = entry[leaving] ?? entry[CHROME];
|
|
@@ -1010,14 +1055,14 @@ function IslandHost({
|
|
|
1010
1055
|
const from = leavingEntry?.element;
|
|
1011
1056
|
const arriving = arrivingEntry;
|
|
1012
1057
|
if (!from || !arriving?.element) continue;
|
|
1013
|
-
const fromRect = toLocal(asRect(from), container,
|
|
1058
|
+
const fromRect = toLocal(asRect(from), container, block, scale);
|
|
1014
1059
|
const toRect = forSurfaceGrowth(
|
|
1015
|
-
toLocal(asRect(arriving.element), container,
|
|
1060
|
+
toLocal(asRect(arriving.element), container, block, scale),
|
|
1016
1061
|
growth,
|
|
1017
1062
|
entry[active] === void 0 ? "CHROME" : "PLANE",
|
|
1018
|
-
|
|
1063
|
+
block
|
|
1019
1064
|
);
|
|
1020
|
-
const transform = carryTransform(fromRect, toRect,
|
|
1065
|
+
const transform = carryTransform(fromRect, toRect, block);
|
|
1021
1066
|
const moving = !isStationary(transform);
|
|
1022
1067
|
if (arriving.carryWhen === "resized" && !isResized(transform)) continue;
|
|
1023
1068
|
const fromLeaving = moving && drawsFromLeaving(fromRect, toRect);
|
|
@@ -1034,7 +1079,7 @@ function IslandHost({
|
|
|
1034
1079
|
lift: toCssLift(transform),
|
|
1035
1080
|
grow: toCssGrow(fromRect, raster),
|
|
1036
1081
|
rest: toCssGrow(toRect, raster),
|
|
1037
|
-
lead: carryLead(fromRect, toRect,
|
|
1082
|
+
lead: carryLead(fromRect, toRect, block)
|
|
1038
1083
|
} : {}
|
|
1039
1084
|
});
|
|
1040
1085
|
}
|
|
@@ -1042,7 +1087,7 @@ function IslandHost({
|
|
|
1042
1087
|
});
|
|
1043
1088
|
if (next.length === 0) return;
|
|
1044
1089
|
dispatch({ type: "CARRIES_MEASURED", carries: next });
|
|
1045
|
-
}, [active, state.phase, atFinalWidth, gutterTravel,
|
|
1090
|
+
}, [active, state.phase, atFinalWidth, gutterTravel, block, bayShown]);
|
|
1046
1091
|
(0, import_react6.useEffect)(() => {
|
|
1047
1092
|
if (state.phase !== "PLACED") return void 0;
|
|
1048
1093
|
const frame2 = requestAnimationFrame(() => dispatch({ type: "PAINTED" }));
|
|
@@ -1093,17 +1138,18 @@ function IslandHost({
|
|
|
1093
1138
|
rowHeight: frame.rowHeight,
|
|
1094
1139
|
edge: frame.edge,
|
|
1095
1140
|
align,
|
|
1141
|
+
placement,
|
|
1096
1142
|
journeyFullscreen,
|
|
1097
1143
|
popAxis,
|
|
1098
1144
|
press: transitioning ? null : press,
|
|
1099
1145
|
gesture,
|
|
1100
1146
|
footprint: COLLAPSED_FOOTPRINT,
|
|
1147
|
+
footprintEdge: COLLAPSED_EDGE,
|
|
1101
1148
|
transitioning,
|
|
1102
1149
|
height: height === null ? null : height + bayHeight,
|
|
1103
1150
|
bay: bay === void 0 ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1104
1151
|
"section",
|
|
1105
1152
|
{
|
|
1106
|
-
ref: baySectionRef,
|
|
1107
1153
|
className: "scopetickets-island-surface__bay",
|
|
1108
1154
|
"aria-label": bayLabel,
|
|
1109
1155
|
"aria-hidden": !bayVisible,
|
|
@@ -1139,7 +1185,7 @@ function IslandHost({
|
|
|
1139
1185
|
// Against whatever does not move while the card grows — an edge, or
|
|
1140
1186
|
// the centre line where the island is pinned to neither. See
|
|
1141
1187
|
// `toCssInset`, which used to be `[align]` and could not stay that.
|
|
1142
|
-
...toCssInset(carry.to.offset, carry.box.height,
|
|
1188
|
+
...toCssInset(carry.to.offset, carry.box.height, block),
|
|
1143
1189
|
width: `${carry.box.width}px`,
|
|
1144
1190
|
height: `${carry.box.height}px`,
|
|
1145
1191
|
transform: painted ? void 0 : carry.slide
|
|
@@ -1242,6 +1288,7 @@ function CheckoutIsland({
|
|
|
1242
1288
|
headerTrail,
|
|
1243
1289
|
mode,
|
|
1244
1290
|
align,
|
|
1291
|
+
placement,
|
|
1245
1292
|
journeyFullscreen
|
|
1246
1293
|
}) {
|
|
1247
1294
|
const flies = !(variant === "hold" || variant === "cart");
|
|
@@ -1277,6 +1324,7 @@ function CheckoutIsland({
|
|
|
1277
1324
|
label: "Your order",
|
|
1278
1325
|
mode,
|
|
1279
1326
|
align,
|
|
1327
|
+
placement,
|
|
1280
1328
|
journeyFullscreen,
|
|
1281
1329
|
chrome,
|
|
1282
1330
|
bay,
|
|
@@ -1605,6 +1653,30 @@ var ScopeClient = class {
|
|
|
1605
1653
|
signal
|
|
1606
1654
|
});
|
|
1607
1655
|
}
|
|
1656
|
+
/**
|
|
1657
|
+
* Tickets for any number of events or whole series in one request, each row naming the
|
|
1658
|
+
* events it sells for in `EventKeys`.
|
|
1659
|
+
*
|
|
1660
|
+
* THE ROUTE TO READ TICKETS FROM. `Events/{key}/Tickets` omits a timeslot at
|
|
1661
|
+
* `Remaining: 0` rather than reporting it sold out, so a sold-out session never reaches
|
|
1662
|
+
* the picker at all.
|
|
1663
|
+
*
|
|
1664
|
+
* A MISSPELT PARAMETER IS NOT REFUSED: the platform answers `200 {"Tickets":[]}`, which
|
|
1665
|
+
* reads exactly like an event that sells nothing.
|
|
1666
|
+
*/
|
|
1667
|
+
async getTicketInformation(query, signal) {
|
|
1668
|
+
const params = new URLSearchParams();
|
|
1669
|
+
for (const key of query.events ?? []) params.append("events", key);
|
|
1670
|
+
for (const key of query.series ?? []) params.append("series", key);
|
|
1671
|
+
if (query.includeTimeslots) params.set("include_timeslots", "true");
|
|
1672
|
+
if (query.includeQuestions) params.set("include_questions", "true");
|
|
1673
|
+
const response = await this.fetch(
|
|
1674
|
+
`/api/v2/TicketInformation?${params}`,
|
|
1675
|
+
{ signal }
|
|
1676
|
+
);
|
|
1677
|
+
return response.Tickets ?? [];
|
|
1678
|
+
}
|
|
1679
|
+
/** @deprecated Use getTicketInformation(), which also reports sold-out timeslots */
|
|
1608
1680
|
async getEventTickets(eventKey, signal) {
|
|
1609
1681
|
const response = await this.fetch(
|
|
1610
1682
|
`/api/v2/Events/${eventKey}/Tickets?include_timeslots=true`,
|
|
@@ -2677,8 +2749,8 @@ function e164(dialCode, phone) {
|
|
|
2677
2749
|
if (country === null) return null;
|
|
2678
2750
|
const national = nationalDigits(phone, country);
|
|
2679
2751
|
if (!isValidPhone(phone, country)) return null;
|
|
2680
|
-
const
|
|
2681
|
-
return isE164(
|
|
2752
|
+
const composed2 = `${country.dialCode}${national}`;
|
|
2753
|
+
return isE164(composed2) ? composed2 : null;
|
|
2682
2754
|
}
|
|
2683
2755
|
function normalizeE164(value) {
|
|
2684
2756
|
const { dialCode, national } = splitPhoneNumber(value);
|
|
@@ -3390,8 +3462,8 @@ var PURCHASE_STEPS = [
|
|
|
3390
3462
|
name: "More Information",
|
|
3391
3463
|
islandState: "details",
|
|
3392
3464
|
preflightStepId: "questionnaire",
|
|
3393
|
-
blurb: "The event\u2019s own questions \u2014 the last thing the order can still be missing.
|
|
3394
|
-
excusedWhen: "
|
|
3465
|
+
blurb: "The event\u2019s own questions \u2014 the last thing the order can still be missing. They come from the tickets and from the event\u2019s questionnaire, or its series\u2019, which is read with the cart; the answers go to every cart item once, before any charge.",
|
|
3466
|
+
excusedWhen: "Nothing asks \u2014 not the ticket, the event or its series. A failed LOOKUP is NOT this \u2014 it resolves to a notice, because proceeding would let the buyer reach payment and be rejected server-side with nothing on screen to fix.",
|
|
3395
3467
|
collapsed: pill("Add Details")
|
|
3396
3468
|
},
|
|
3397
3469
|
{
|
|
@@ -4844,136 +4916,182 @@ function useCheckoutClient(appKey, source) {
|
|
|
4844
4916
|
});
|
|
4845
4917
|
}, [appKey, orgKey, environment]);
|
|
4846
4918
|
}
|
|
4919
|
+
function readRun(info, environment) {
|
|
4920
|
+
const eventKeyByDay = {};
|
|
4921
|
+
for (const event of info.Events) eventKeyByDay[dayOf(event.Date)] = event.Key;
|
|
4922
|
+
const theme = info.Series?.Theme ?? info.Events[0]?.Theme;
|
|
4923
|
+
const artwork = runArtwork(info.Series, info.Events, ENVIRONMENT_URLS[environment].artworkUrl);
|
|
4924
|
+
if (artwork === void 0 && theme !== void 0 && typeof console !== "undefined") {
|
|
4925
|
+
console.warn(
|
|
4926
|
+
"[ScopeTicketsCheckout] no cart artwork resolved from this run\u2019s Theme. Expected a url in `Theme.Backgrounds[0]`. The Theme as it arrived:",
|
|
4927
|
+
theme
|
|
4928
|
+
);
|
|
4929
|
+
}
|
|
4930
|
+
return {
|
|
4931
|
+
info,
|
|
4932
|
+
events: info.Events.map((event) => ({
|
|
4933
|
+
eventKey: event.Key,
|
|
4934
|
+
name: event.Name,
|
|
4935
|
+
day: dayOf(event.Date)
|
|
4936
|
+
})),
|
|
4937
|
+
eventKeyByDay,
|
|
4938
|
+
/*
|
|
4939
|
+
* THE VENUE'S CLOCK, from the venue. `Venue.TimeZone` is an IANA zone and every event
|
|
4940
|
+
* carries its venue — `nowTime` was `00:00` for a turn, which is not a clock at all:
|
|
4941
|
+
* it says every slot today is still to come, which is exactly the question the time
|
|
4942
|
+
* picker asks it.
|
|
4943
|
+
*/
|
|
4944
|
+
timeZone: info.Events[0]?.Venue?.TimeZone ?? null,
|
|
4945
|
+
artwork
|
|
4946
|
+
};
|
|
4947
|
+
}
|
|
4948
|
+
function composed({ run, wanted, today, nowTime, tickets, error }, loading) {
|
|
4949
|
+
const { info } = run;
|
|
4950
|
+
const slots = tickets.flatMap((ticket) => ticket.HasTimeslot ? ticket.Timeslots ?? [] : []);
|
|
4951
|
+
const slotsByDay = wanted !== null && slots.length > 0 ? { [wanted]: slots.map(toTimeslot) } : {};
|
|
4952
|
+
const questions = tickets.flatMap((ticket) => ticket.Questions ?? []);
|
|
4953
|
+
const productCurrency = tickets.map((ticket) => ticket.Currency).find((currency) => currency !== null && currency !== void 0);
|
|
4954
|
+
const assignments = [
|
|
4955
|
+
...info.UserTypes ?? [],
|
|
4956
|
+
...info.Events.flatMap((event) => event.UserTypes ?? []),
|
|
4957
|
+
...tickets.flatMap((ticket) => ticket.UserTypes ?? [])
|
|
4958
|
+
];
|
|
4959
|
+
const organisation = info.Events[0]?.Organisation;
|
|
4960
|
+
return {
|
|
4961
|
+
schedule: {
|
|
4962
|
+
series: { events: [...run.events] },
|
|
4963
|
+
today,
|
|
4964
|
+
nowTime,
|
|
4965
|
+
slotsByDay
|
|
4966
|
+
},
|
|
4967
|
+
userTypes: groupUserTypes(assignments),
|
|
4968
|
+
userTypeNames: userTypeNames(assignments),
|
|
4969
|
+
/*
|
|
4970
|
+
* THE QUESTIONS RIDE ON THE TICKETS, so they arrive with the slots and cost no
|
|
4971
|
+
* request of their own. `getQuestionnaireQuestions` wants a cart's event id, which
|
|
4972
|
+
* does not exist yet at the step that has to know whether to ask.
|
|
4973
|
+
*/
|
|
4974
|
+
questions: [...new Map(questions.map((q) => [q.QuestionId, q])).values()],
|
|
4975
|
+
/*
|
|
4976
|
+
* WHOSE EVENT IT IS. There is no follow endpoint and there does not need to be:
|
|
4977
|
+
* the organisation is on every event, and it is who a buyer would want to hear
|
|
4978
|
+
* from again.
|
|
4979
|
+
*
|
|
4980
|
+
* NOT THE VENUE, though the event names one. A venue hosts whatever is booked
|
|
4981
|
+
* into it — following one subscribes a buyer to every unrelated thing that happens
|
|
4982
|
+
* in a building, which is not what "stay up to date" offered them. The organiser
|
|
4983
|
+
* is the party whose next event resembles this one.
|
|
4984
|
+
*/
|
|
4985
|
+
follow: [
|
|
4986
|
+
organisation === void 0 ? null : { key: organisation.Key, name: organisation.Name, kind: "Organiser" }
|
|
4987
|
+
].filter((entity) => entity !== null),
|
|
4988
|
+
/*
|
|
4989
|
+
* `Backgrounds[0]`, made absolute against the CDN, the run's before a night's — see
|
|
4990
|
+
* `runArtwork`. The platform answers with site-root paths, so the origin is the
|
|
4991
|
+
* whole of the work: without it every thumbnail points at the customer's own domain.
|
|
4992
|
+
*/
|
|
4993
|
+
artwork: run.artwork,
|
|
4994
|
+
eventKeyByDay: run.eventKeyByDay,
|
|
4995
|
+
hasTimeslots: tickets.some((ticket) => ticket.HasTimeslot),
|
|
4996
|
+
limits: ticketLimits(tickets),
|
|
4997
|
+
/* Most specific first — a product's own, then its event's, then the run's. */
|
|
4998
|
+
currency: productCurrency ?? info.Events[0]?.Currency ?? info.Series?.Currency ?? void 0,
|
|
4999
|
+
loading,
|
|
5000
|
+
error: loading ? null : error
|
|
5001
|
+
};
|
|
5002
|
+
}
|
|
4847
5003
|
function useCheckoutData(subjectKey, isSeries, client, enabled, day, environment = "production") {
|
|
4848
|
-
const [
|
|
5004
|
+
const [run, setRun] = (0, import_react9.useState)({ status: "IDLE" });
|
|
5005
|
+
const [sessions, setSessions] = (0, import_react9.useState)({ status: "IDLE" });
|
|
4849
5006
|
(0, import_react9.useEffect)(() => {
|
|
4850
5007
|
if (!enabled || client === null) return;
|
|
4851
5008
|
const abort = new AbortController();
|
|
4852
|
-
|
|
4853
|
-
const load = async () =>
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
const timeZone = info.Events[0]?.Venue?.TimeZone ?? null;
|
|
4863
|
-
const now = /* @__PURE__ */ new Date();
|
|
4864
|
-
const today = dayInZone(now, timeZone);
|
|
4865
|
-
const wanted = day !== void 0 && day in eventKeyByDay ? day : soonestRelevantDay({ events }, today);
|
|
4866
|
-
const forDay = wanted === null ? void 0 : eventKeyByDay[wanted];
|
|
4867
|
-
const slotsByDay = {};
|
|
4868
|
-
const questions = [];
|
|
4869
|
-
let list = [];
|
|
4870
|
-
let ticketsError = null;
|
|
4871
|
-
if (forDay !== void 0) {
|
|
4872
|
-
try {
|
|
4873
|
-
list = await client.getEventTickets(forDay, abort.signal);
|
|
4874
|
-
} catch (cause) {
|
|
4875
|
-
ticketsError = cause instanceof Error ? cause : new Error(String(cause));
|
|
4876
|
-
}
|
|
4877
|
-
}
|
|
4878
|
-
const tickets = wanted === null ? [] : [[wanted, list]];
|
|
4879
|
-
let hasTimeslots = false;
|
|
4880
|
-
let productCurrency;
|
|
4881
|
-
for (const [on, forThatDay] of tickets) {
|
|
4882
|
-
const slots = forThatDay.flatMap(
|
|
4883
|
-
(ticket) => ticket.HasTimeslot ? ticket.Timeslots ?? [] : []
|
|
4884
|
-
);
|
|
4885
|
-
if (forThatDay.some((ticket) => ticket.HasTimeslot)) hasTimeslots = true;
|
|
4886
|
-
if (slots.length > 0) slotsByDay[on] = slots.map(toTimeslot);
|
|
4887
|
-
for (const ticket of forThatDay) {
|
|
4888
|
-
questions.push(...ticket.Questions ?? []);
|
|
4889
|
-
productCurrency ??= ticket.Currency ?? void 0;
|
|
4890
|
-
}
|
|
4891
|
-
}
|
|
4892
|
-
const assignments = [
|
|
4893
|
-
...info.UserTypes ?? [],
|
|
4894
|
-
...info.Events.flatMap((event) => event.UserTypes ?? []),
|
|
4895
|
-
...list.flatMap((ticket) => ticket.UserTypes ?? [])
|
|
4896
|
-
];
|
|
4897
|
-
const organisation = info.Events[0]?.Organisation;
|
|
4898
|
-
const theme = info.Series?.Theme ?? info.Events[0]?.Theme;
|
|
4899
|
-
const artwork = runArtwork(
|
|
4900
|
-
info.Series,
|
|
4901
|
-
info.Events,
|
|
4902
|
-
ENVIRONMENT_URLS[environment].artworkUrl
|
|
4903
|
-
);
|
|
4904
|
-
if (artwork === void 0 && theme !== void 0 && typeof console !== "undefined") {
|
|
5009
|
+
setRun({ status: "LOADING" });
|
|
5010
|
+
const load = async () => readRun(
|
|
5011
|
+
isSeries ? await client.getSeriesInfo(subjectKey, abort.signal) : await client.getEventInfo(subjectKey, abort.signal),
|
|
5012
|
+
environment
|
|
5013
|
+
);
|
|
5014
|
+
load().then((loaded2) => {
|
|
5015
|
+
if (!abort.signal.aborted) setRun({ status: "LOADED", run: loaded2 });
|
|
5016
|
+
}).catch((cause) => {
|
|
5017
|
+
if (abort.signal.aborted) return;
|
|
5018
|
+
if (typeof console !== "undefined") {
|
|
4905
5019
|
console.warn(
|
|
4906
|
-
|
|
4907
|
-
|
|
5020
|
+
`[ScopeTicketsCheckout] could not load ${isSeries ? "series" : "event"} '${subjectKey}' from ${environment} (${ENVIRONMENT_URLS[environment].apiUrl}). If the key is right, check \`source.environment\` \u2014 it defaults to production.`,
|
|
5021
|
+
cause
|
|
4908
5022
|
);
|
|
4909
5023
|
}
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
* in a building, which is not what "stay up to date" offered them. The organiser
|
|
4933
|
-
* is the party whose next event resembles this one.
|
|
4934
|
-
*/
|
|
4935
|
-
follow: [
|
|
4936
|
-
organisation === void 0 ? null : { key: organisation.Key, name: organisation.Name, kind: "Organiser" }
|
|
4937
|
-
].filter((entity) => entity !== null),
|
|
4938
|
-
/*
|
|
4939
|
-
* `Backgrounds[0]`, made absolute against the CDN, the run's before a night's — see
|
|
4940
|
-
* `runArtwork`. The platform answers with site-root paths, so the origin is the
|
|
4941
|
-
* whole of the work: without it every thumbnail points at the customer's own domain.
|
|
4942
|
-
*/
|
|
4943
|
-
artwork,
|
|
4944
|
-
eventKeyByDay,
|
|
4945
|
-
hasTimeslots,
|
|
4946
|
-
limits: ticketLimits(list),
|
|
4947
|
-
ticketsError,
|
|
4948
|
-
/* Most specific first — a product's own, then its event's, then the run's. */
|
|
4949
|
-
currency: productCurrency ?? info.Events[0]?.Currency ?? info.Series?.Currency ?? void 0
|
|
4950
|
-
};
|
|
5024
|
+
setRun({
|
|
5025
|
+
status: "ERROR",
|
|
5026
|
+
error: cause instanceof Error ? cause : new Error(String(cause))
|
|
5027
|
+
});
|
|
5028
|
+
});
|
|
5029
|
+
return () => abort.abort();
|
|
5030
|
+
}, [client, subjectKey, isSeries, enabled, environment]);
|
|
5031
|
+
const loaded = run.status === "LOADED" ? run.run : void 0;
|
|
5032
|
+
const wanted = (0, import_react9.useMemo)(() => {
|
|
5033
|
+
if (loaded === void 0) return null;
|
|
5034
|
+
if (day !== void 0 && day in loaded.eventKeyByDay) return day;
|
|
5035
|
+
return soonestRelevantDay({ events: loaded.events }, dayInZone(/* @__PURE__ */ new Date(), loaded.timeZone));
|
|
5036
|
+
}, [loaded, day]);
|
|
5037
|
+
(0, import_react9.useEffect)(() => {
|
|
5038
|
+
if (!enabled || client === null || loaded === void 0) return;
|
|
5039
|
+
const abort = new AbortController();
|
|
5040
|
+
const now = /* @__PURE__ */ new Date();
|
|
5041
|
+
const asked = {
|
|
5042
|
+
run: loaded,
|
|
5043
|
+
wanted,
|
|
5044
|
+
today: dayInZone(now, loaded.timeZone),
|
|
5045
|
+
nowTime: timeOfDayInZone(now, loaded.timeZone)
|
|
4951
5046
|
};
|
|
4952
|
-
|
|
5047
|
+
const eventKey = wanted === null ? void 0 : loaded.eventKeyByDay[wanted];
|
|
5048
|
+
if (eventKey === void 0) {
|
|
5049
|
+
setSessions({ status: "SETTLED", day: { ...asked, tickets: [], error: null } });
|
|
5050
|
+
return;
|
|
5051
|
+
}
|
|
5052
|
+
setSessions((was) => ({
|
|
5053
|
+
status: "LOADING",
|
|
5054
|
+
previous: was.status === "SETTLED" ? was.day : was.status === "LOADING" ? was.previous : void 0
|
|
5055
|
+
}));
|
|
5056
|
+
client.getTicketInformation(
|
|
5057
|
+
{ events: [eventKey], includeTimeslots: true, includeQuestions: true },
|
|
5058
|
+
abort.signal
|
|
5059
|
+
).then((tickets) => {
|
|
4953
5060
|
if (abort.signal.aborted) return;
|
|
4954
|
-
|
|
4955
|
-
console.warn(
|
|
4956
|
-
"[ScopeTicketsCheckout] could not load tickets for this day; sessions, questions and user types will be missing.",
|
|
4957
|
-
ticketsError
|
|
4958
|
-
);
|
|
4959
|
-
}
|
|
4960
|
-
setData({ ...loaded, loading: false, error: ticketsError });
|
|
5061
|
+
setSessions({ status: "SETTLED", day: { ...asked, tickets, error: null } });
|
|
4961
5062
|
}).catch((cause) => {
|
|
4962
5063
|
if (abort.signal.aborted) return;
|
|
5064
|
+
const error = cause instanceof Error ? cause : new Error(String(cause));
|
|
4963
5065
|
if (typeof console !== "undefined") {
|
|
4964
5066
|
console.warn(
|
|
4965
|
-
|
|
4966
|
-
|
|
5067
|
+
"[ScopeTicketsCheckout] could not load tickets for this day; sessions, questions and user types will be missing.",
|
|
5068
|
+
error
|
|
4967
5069
|
);
|
|
4968
5070
|
}
|
|
4969
|
-
|
|
4970
|
-
...NOTHING,
|
|
4971
|
-
error: cause instanceof Error ? cause : new Error(String(cause))
|
|
4972
|
-
});
|
|
5071
|
+
setSessions({ status: "SETTLED", day: { ...asked, tickets: [], error } });
|
|
4973
5072
|
});
|
|
4974
5073
|
return () => abort.abort();
|
|
4975
|
-
}, [client,
|
|
4976
|
-
return
|
|
5074
|
+
}, [client, enabled, loaded, wanted]);
|
|
5075
|
+
return (0, import_react9.useMemo)(() => {
|
|
5076
|
+
if (!enabled) return NOTHING;
|
|
5077
|
+
switch (run.status) {
|
|
5078
|
+
case "IDLE":
|
|
5079
|
+
return NOTHING;
|
|
5080
|
+
case "LOADING":
|
|
5081
|
+
return { ...NOTHING, loading: true };
|
|
5082
|
+
case "ERROR":
|
|
5083
|
+
return { ...NOTHING, error: run.error };
|
|
5084
|
+
case "LOADED": {
|
|
5085
|
+
const shown = sessions.status === "SETTLED" ? sessions.day : sessions.status === "LOADING" ? sessions.previous : void 0;
|
|
5086
|
+
if (shown === void 0 || shown.run !== run.run) return { ...NOTHING, loading: true };
|
|
5087
|
+
return composed(shown, sessions.status === "LOADING");
|
|
5088
|
+
}
|
|
5089
|
+
default: {
|
|
5090
|
+
const exhaustive = run;
|
|
5091
|
+
return exhaustive;
|
|
5092
|
+
}
|
|
5093
|
+
}
|
|
5094
|
+
}, [enabled, run, sessions]);
|
|
4977
5095
|
}
|
|
4978
5096
|
|
|
4979
5097
|
// src/data/useAccountGateway.ts
|
|
@@ -6437,6 +6555,171 @@ function productForSession(tickets, session) {
|
|
|
6437
6555
|
return sells.find((ticket) => ticket.Available) ?? sells[0];
|
|
6438
6556
|
}
|
|
6439
6557
|
|
|
6558
|
+
// src/domain/questionnaire.ts
|
|
6559
|
+
var AGREED = "true";
|
|
6560
|
+
var NOT_AGREED = "false";
|
|
6561
|
+
function questionType(type) {
|
|
6562
|
+
switch (type.trim().toLowerCase()) {
|
|
6563
|
+
case "text":
|
|
6564
|
+
return "TEXT";
|
|
6565
|
+
case "boolean":
|
|
6566
|
+
return "AGREEMENT";
|
|
6567
|
+
case "integer":
|
|
6568
|
+
return "INTEGER";
|
|
6569
|
+
default:
|
|
6570
|
+
return null;
|
|
6571
|
+
}
|
|
6572
|
+
}
|
|
6573
|
+
function questionKind(question) {
|
|
6574
|
+
const type = questionType(question.Type);
|
|
6575
|
+
switch (type) {
|
|
6576
|
+
case "TEXT":
|
|
6577
|
+
return "TEXT";
|
|
6578
|
+
case "AGREEMENT":
|
|
6579
|
+
return "AGREEMENT";
|
|
6580
|
+
case "INTEGER":
|
|
6581
|
+
return "INTEGER";
|
|
6582
|
+
// Unknown types are asked as text rather than dropped.
|
|
6583
|
+
case null:
|
|
6584
|
+
return "TEXT";
|
|
6585
|
+
default: {
|
|
6586
|
+
const exhaustive = type;
|
|
6587
|
+
return exhaustive;
|
|
6588
|
+
}
|
|
6589
|
+
}
|
|
6590
|
+
}
|
|
6591
|
+
function questionAnswered(kind, value) {
|
|
6592
|
+
switch (kind) {
|
|
6593
|
+
case "TEXT":
|
|
6594
|
+
return (value ?? "").trim().length > 0;
|
|
6595
|
+
case "AGREEMENT":
|
|
6596
|
+
return value === AGREED;
|
|
6597
|
+
case "INTEGER":
|
|
6598
|
+
return wholeNumber(value) !== null;
|
|
6599
|
+
default: {
|
|
6600
|
+
const exhaustive = kind;
|
|
6601
|
+
return exhaustive;
|
|
6602
|
+
}
|
|
6603
|
+
}
|
|
6604
|
+
}
|
|
6605
|
+
function wholeNumber(value) {
|
|
6606
|
+
const text = (value ?? "").trim();
|
|
6607
|
+
if (!/^[+-]?\d{1,10}$/.test(text)) return null;
|
|
6608
|
+
const parsed = Number(text);
|
|
6609
|
+
return parsed >= -2147483648 && parsed <= 2147483647 ? text : null;
|
|
6610
|
+
}
|
|
6611
|
+
function questionsAnswered(questions, answers) {
|
|
6612
|
+
return questions.every(
|
|
6613
|
+
(question) => questionAnswered(questionKind(question), answers[String(question.QuestionId)])
|
|
6614
|
+
);
|
|
6615
|
+
}
|
|
6616
|
+
var MAX_ANSWER_LENGTH = 200;
|
|
6617
|
+
var QUESTION_KEY = /^\d{1,12}$/;
|
|
6618
|
+
function hostAnswers(raw) {
|
|
6619
|
+
if (raw === null || typeof raw !== "object") return {};
|
|
6620
|
+
const kept = {};
|
|
6621
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
6622
|
+
if (!QUESTION_KEY.test(key) || typeof value !== "string") continue;
|
|
6623
|
+
const answer = value.trim();
|
|
6624
|
+
if (answer.length > MAX_ANSWER_LENGTH) continue;
|
|
6625
|
+
kept[key] = answer;
|
|
6626
|
+
}
|
|
6627
|
+
return kept;
|
|
6628
|
+
}
|
|
6629
|
+
function responsesFor(items, questions, answers) {
|
|
6630
|
+
const values = [];
|
|
6631
|
+
for (const question of questions) {
|
|
6632
|
+
const value = answers[String(question.QuestionId)];
|
|
6633
|
+
const kind = questionKind(question);
|
|
6634
|
+
switch (kind) {
|
|
6635
|
+
case "TEXT": {
|
|
6636
|
+
const text = (value ?? "").trim();
|
|
6637
|
+
if (text.length > 0 && text.length <= MAX_ANSWER_LENGTH) {
|
|
6638
|
+
values.push({ QuestionId: question.QuestionId, Value: text });
|
|
6639
|
+
}
|
|
6640
|
+
break;
|
|
6641
|
+
}
|
|
6642
|
+
case "AGREEMENT":
|
|
6643
|
+
if (value === AGREED || value === NOT_AGREED) {
|
|
6644
|
+
values.push({ QuestionId: question.QuestionId, Value: value });
|
|
6645
|
+
}
|
|
6646
|
+
break;
|
|
6647
|
+
case "INTEGER": {
|
|
6648
|
+
const number = wholeNumber(value);
|
|
6649
|
+
if (number !== null) values.push({ QuestionId: question.QuestionId, Value: number });
|
|
6650
|
+
break;
|
|
6651
|
+
}
|
|
6652
|
+
default: {
|
|
6653
|
+
const exhaustive = kind;
|
|
6654
|
+
return exhaustive;
|
|
6655
|
+
}
|
|
6656
|
+
}
|
|
6657
|
+
}
|
|
6658
|
+
if (values.length === 0) return [];
|
|
6659
|
+
return items.map((item) => ({
|
|
6660
|
+
ItemKey: item.Key,
|
|
6661
|
+
Values: values.map((entry) => ({ ...entry }))
|
|
6662
|
+
}));
|
|
6663
|
+
}
|
|
6664
|
+
function answersLocked(save) {
|
|
6665
|
+
switch (save.status) {
|
|
6666
|
+
case "IDLE":
|
|
6667
|
+
return false;
|
|
6668
|
+
case "SAVING":
|
|
6669
|
+
case "SAVED":
|
|
6670
|
+
return true;
|
|
6671
|
+
case "FAILED":
|
|
6672
|
+
return save.partly;
|
|
6673
|
+
default: {
|
|
6674
|
+
const exhaustive = save;
|
|
6675
|
+
return exhaustive;
|
|
6676
|
+
}
|
|
6677
|
+
}
|
|
6678
|
+
}
|
|
6679
|
+
var MAX_QUESTION_TEXT = 1e3;
|
|
6680
|
+
var MAX_QUESTION_TYPE = 40;
|
|
6681
|
+
function guardQuestions(raw) {
|
|
6682
|
+
if (!Array.isArray(raw)) return [];
|
|
6683
|
+
return raw.flatMap((entry) => {
|
|
6684
|
+
if (entry === null || typeof entry !== "object") return [];
|
|
6685
|
+
const { QuestionId, Question, Type } = entry;
|
|
6686
|
+
if (typeof QuestionId !== "number" || !Number.isSafeInteger(QuestionId)) return [];
|
|
6687
|
+
if (typeof Question !== "string" || Question.trim() === "") return [];
|
|
6688
|
+
if (Question.length > MAX_QUESTION_TEXT) return [];
|
|
6689
|
+
if (typeof Type !== "string" || Type.length > MAX_QUESTION_TYPE) return [];
|
|
6690
|
+
return [{ QuestionId, Question, Type }];
|
|
6691
|
+
});
|
|
6692
|
+
}
|
|
6693
|
+
function mergeQuestions(eventQuestions, ticketQuestions) {
|
|
6694
|
+
const seen = /* @__PURE__ */ new Set();
|
|
6695
|
+
const merged = [];
|
|
6696
|
+
for (const question of [...eventQuestions, ...ticketQuestions]) {
|
|
6697
|
+
if (seen.has(question.QuestionId)) continue;
|
|
6698
|
+
seen.add(question.QuestionId);
|
|
6699
|
+
merged.push(question);
|
|
6700
|
+
}
|
|
6701
|
+
return merged;
|
|
6702
|
+
}
|
|
6703
|
+
function questionsInHand(ticketQuestions, load, hasCart) {
|
|
6704
|
+
if (!hasCart) return { status: "READY", questions: guardQuestions(ticketQuestions) };
|
|
6705
|
+
switch (load.status) {
|
|
6706
|
+
case "IDLE":
|
|
6707
|
+
case "LOADING":
|
|
6708
|
+
return { status: "PENDING" };
|
|
6709
|
+
case "LOADED":
|
|
6710
|
+
return {
|
|
6711
|
+
status: "READY",
|
|
6712
|
+
questions: mergeQuestions(load.questions, guardQuestions(ticketQuestions))
|
|
6713
|
+
};
|
|
6714
|
+
case "FAILED":
|
|
6715
|
+
return { status: "FAILED" };
|
|
6716
|
+
default: {
|
|
6717
|
+
const exhaustive = load;
|
|
6718
|
+
return exhaustive;
|
|
6719
|
+
}
|
|
6720
|
+
}
|
|
6721
|
+
}
|
|
6722
|
+
|
|
6440
6723
|
// src/domain/promo.ts
|
|
6441
6724
|
function promoSaved(cart, currency) {
|
|
6442
6725
|
if (currency === void 0) return null;
|
|
@@ -6464,8 +6747,23 @@ var IDLE = {
|
|
|
6464
6747
|
items: [],
|
|
6465
6748
|
currency: void 0,
|
|
6466
6749
|
productName: void 0,
|
|
6467
|
-
payment: void 0
|
|
6750
|
+
payment: void 0,
|
|
6751
|
+
answers: { status: "IDLE" },
|
|
6752
|
+
eventQuestions: { status: "IDLE" }
|
|
6468
6753
|
};
|
|
6754
|
+
async function eventQuestionsFor(client, cart) {
|
|
6755
|
+
if (client === null) return { status: "IDLE" };
|
|
6756
|
+
if (typeof cart.EventId !== "number")
|
|
6757
|
+
return { status: "FAILED", reason: "The cart names no event" };
|
|
6758
|
+
try {
|
|
6759
|
+
return {
|
|
6760
|
+
status: "LOADED",
|
|
6761
|
+
questions: guardQuestions(await client.getQuestionnaireQuestions(cart.EventId))
|
|
6762
|
+
};
|
|
6763
|
+
} catch (cause) {
|
|
6764
|
+
return { status: "FAILED", reason: cause instanceof Error ? cause.message : String(cause) };
|
|
6765
|
+
}
|
|
6766
|
+
}
|
|
6469
6767
|
var POLL_MS = 2e3;
|
|
6470
6768
|
function toQuote(cart, currency) {
|
|
6471
6769
|
if (currency === void 0) return void 0;
|
|
@@ -6548,7 +6846,7 @@ function useCheckoutOrder(client, request, currency, open, adopt, userTypeNames2
|
|
|
6548
6846
|
const cart = withExpiry(await client.createCart(mark), opening);
|
|
6549
6847
|
held.current = opening;
|
|
6550
6848
|
asking = `reading the tickets on '${mark}'`;
|
|
6551
|
-
const tickets = await client.
|
|
6849
|
+
const tickets = await client.getTicketInformation({ events: [mark], includeTimeslots: true });
|
|
6552
6850
|
const asked = safeParse(timeslot, null) ?? void 0;
|
|
6553
6851
|
const session = sessionFor(tickets, asked);
|
|
6554
6852
|
const product = productForSession(tickets, session);
|
|
@@ -6598,9 +6896,18 @@ function useCheckoutOrder(client, request, currency, open, adopt, userTypeNames2
|
|
|
6598
6896
|
productName: product.Name
|
|
6599
6897
|
};
|
|
6600
6898
|
};
|
|
6601
|
-
load().then(({ cart, items, fill, currency: filled2, productName }) => {
|
|
6899
|
+
load().then(async ({ cart, items, fill, currency: filled2, productName }) => {
|
|
6900
|
+
const eventQuestions = await eventQuestionsFor(client, cart);
|
|
6602
6901
|
if (!live) return;
|
|
6603
|
-
setState((was) => ({
|
|
6902
|
+
setState((was) => ({
|
|
6903
|
+
...was,
|
|
6904
|
+
cart,
|
|
6905
|
+
items,
|
|
6906
|
+
fill,
|
|
6907
|
+
currency: filled2,
|
|
6908
|
+
productName,
|
|
6909
|
+
eventQuestions
|
|
6910
|
+
}));
|
|
6604
6911
|
}).catch((cause) => {
|
|
6605
6912
|
if (!live) return;
|
|
6606
6913
|
opened.current = null;
|
|
@@ -6673,6 +6980,44 @@ function useCheckoutOrder(client, request, currency, open, adopt, userTypeNames2
|
|
|
6673
6980
|
},
|
|
6674
6981
|
[client, state.cart?.Key]
|
|
6675
6982
|
);
|
|
6983
|
+
const savedAnswers = (0, import_react21.useRef)(null);
|
|
6984
|
+
const saveAnswers = (0, import_react21.useCallback)(
|
|
6985
|
+
async (questions, answers) => {
|
|
6986
|
+
const cartKey = state.cart?.Key;
|
|
6987
|
+
if (client === null || cartKey === void 0) return false;
|
|
6988
|
+
const was = savedAnswers.current;
|
|
6989
|
+
const landed = was !== null && was.cartKey === cartKey && was.items.size > 0 ? was : null;
|
|
6990
|
+
const requests = landed === null ? responsesFor(state.items, questions, answers) : state.items.map((item) => ({
|
|
6991
|
+
ItemKey: item.Key,
|
|
6992
|
+
Values: landed.values.map((value) => ({ ...value }))
|
|
6993
|
+
}));
|
|
6994
|
+
if (requests.length === 0) return true;
|
|
6995
|
+
const saved = landed?.items ?? /* @__PURE__ */ new Set();
|
|
6996
|
+
savedAnswers.current = { cartKey, values: requests[0]?.Values ?? [], items: saved };
|
|
6997
|
+
const unsent = requests.filter((request2) => !saved.has(request2.ItemKey));
|
|
6998
|
+
if (unsent.length === 0) return true;
|
|
6999
|
+
setState((held2) => ({ ...held2, answers: { status: "SAVING" } }));
|
|
7000
|
+
for (const request2 of unsent) {
|
|
7001
|
+
try {
|
|
7002
|
+
await client.submitQuestionnaireResponses(cartKey, request2);
|
|
7003
|
+
saved.add(request2.ItemKey);
|
|
7004
|
+
} catch (cause) {
|
|
7005
|
+
setState((held2) => ({
|
|
7006
|
+
...held2,
|
|
7007
|
+
answers: {
|
|
7008
|
+
status: "FAILED",
|
|
7009
|
+
reason: cause instanceof Error ? cause.message : String(cause),
|
|
7010
|
+
partly: saved.size > 0
|
|
7011
|
+
}
|
|
7012
|
+
}));
|
|
7013
|
+
return false;
|
|
7014
|
+
}
|
|
7015
|
+
}
|
|
7016
|
+
setState((held2) => ({ ...held2, answers: { status: "SAVED" } }));
|
|
7017
|
+
return true;
|
|
7018
|
+
},
|
|
7019
|
+
[client, state.cart?.Key, state.items]
|
|
7020
|
+
);
|
|
6676
7021
|
const [promo, setPromo] = (0, import_react21.useState)({ status: "IDLE" });
|
|
6677
7022
|
const writePromo = (0, import_react21.useCallback)(
|
|
6678
7023
|
async (write) => {
|
|
@@ -6754,6 +7099,14 @@ function useCheckoutOrder(client, request, currency, open, adopt, userTypeNames2
|
|
|
6754
7099
|
setWatching(false);
|
|
6755
7100
|
setState((was) => was.payment === void 0 ? was : { ...was, payment: void 0 });
|
|
6756
7101
|
}, []);
|
|
7102
|
+
const retryEventQuestions = (0, import_react21.useCallback)(() => {
|
|
7103
|
+
const cart = state.cart;
|
|
7104
|
+
if (cart === null) return;
|
|
7105
|
+
setState((was) => ({ ...was, eventQuestions: { status: "LOADING" } }));
|
|
7106
|
+
void eventQuestionsFor(client, cart).then(
|
|
7107
|
+
(eventQuestions) => setState((was) => was.cart?.Key === cart.Key ? { ...was, eventQuestions } : was)
|
|
7108
|
+
);
|
|
7109
|
+
}, [client, state.cart]);
|
|
6757
7110
|
const restart = (0, import_react21.useCallback)(() => {
|
|
6758
7111
|
opened.current = null;
|
|
6759
7112
|
held.current = null;
|
|
@@ -6771,6 +7124,7 @@ function useCheckoutOrder(client, request, currency, open, adopt, userTypeNames2
|
|
|
6771
7124
|
quote: state.cart === null ? void 0 : toQuote(state.cart, filled ?? currency),
|
|
6772
7125
|
hold: state.cart === null ? void 0 : toHold(state.cart, Date.now(), held.current),
|
|
6773
7126
|
saveBuyer,
|
|
7127
|
+
saveAnswers,
|
|
6774
7128
|
promo,
|
|
6775
7129
|
applyPromo,
|
|
6776
7130
|
removePromo,
|
|
@@ -6779,7 +7133,8 @@ function useCheckoutOrder(client, request, currency, open, adopt, userTypeNames2
|
|
|
6779
7133
|
paidWithoutFinalizing,
|
|
6780
7134
|
retryPayment,
|
|
6781
7135
|
chargeAttempted,
|
|
6782
|
-
restart
|
|
7136
|
+
restart,
|
|
7137
|
+
retryEventQuestions
|
|
6783
7138
|
};
|
|
6784
7139
|
}
|
|
6785
7140
|
|
|
@@ -6997,6 +7352,7 @@ function TextField({
|
|
|
6997
7352
|
placeholder,
|
|
6998
7353
|
maxLength,
|
|
6999
7354
|
autoFocus = false,
|
|
7355
|
+
readOnly = false,
|
|
7000
7356
|
id,
|
|
7001
7357
|
name
|
|
7002
7358
|
}) {
|
|
@@ -7045,6 +7401,7 @@ function TextField({
|
|
|
7045
7401
|
value,
|
|
7046
7402
|
placeholder,
|
|
7047
7403
|
maxLength,
|
|
7404
|
+
readOnly,
|
|
7048
7405
|
onChange: (event) => {
|
|
7049
7406
|
const typed = event.target.value;
|
|
7050
7407
|
const before = typed.slice(0, event.target.selectionStart ?? typed.length);
|
|
@@ -7090,6 +7447,26 @@ function TextField({
|
|
|
7090
7447
|
);
|
|
7091
7448
|
}
|
|
7092
7449
|
|
|
7450
|
+
// src/island/Switch.tsx
|
|
7451
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
7452
|
+
function Switch({ checked, onChange, label, size: size2 = "wide", disabled = false }) {
|
|
7453
|
+
const press = useIslandPress("element");
|
|
7454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
7455
|
+
"button",
|
|
7456
|
+
{
|
|
7457
|
+
type: "button",
|
|
7458
|
+
role: "switch",
|
|
7459
|
+
"aria-checked": checked,
|
|
7460
|
+
"aria-label": label,
|
|
7461
|
+
disabled,
|
|
7462
|
+
className: `scopetickets-island-switch scopetickets-island-switch--${size2}`,
|
|
7463
|
+
onClick: () => onChange(!checked),
|
|
7464
|
+
...disabled ? {} : press,
|
|
7465
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "scopetickets-island-switch__thumb", "aria-hidden": "true" })
|
|
7466
|
+
}
|
|
7467
|
+
);
|
|
7468
|
+
}
|
|
7469
|
+
|
|
7093
7470
|
// src/island/ContactSteps.tsx
|
|
7094
7471
|
var import_react23 = require("react");
|
|
7095
7472
|
|
|
@@ -7258,7 +7635,7 @@ function counterRingPaths(progress, direction = "cw") {
|
|
|
7258
7635
|
}
|
|
7259
7636
|
|
|
7260
7637
|
// src/island/CounterRing.tsx
|
|
7261
|
-
var
|
|
7638
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
7262
7639
|
var LAYER = { position: "absolute", inset: 0 };
|
|
7263
7640
|
var DEFAULT_FILL = "var(--scopetickets-island-counter-ring-fill)";
|
|
7264
7641
|
var DEFAULT_TRACK = "var(--scopetickets-island-counter-ring-track)";
|
|
@@ -7273,22 +7650,22 @@ function CounterRing({
|
|
|
7273
7650
|
track = true
|
|
7274
7651
|
}) {
|
|
7275
7652
|
if (complete !== void 0) {
|
|
7276
|
-
return /* @__PURE__ */ (0,
|
|
7653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
7277
7654
|
"span",
|
|
7278
7655
|
{
|
|
7279
7656
|
className: "scopetickets-island-counter-ring",
|
|
7280
7657
|
style: { width: size2, height: size2, flex: "none" },
|
|
7281
|
-
children: /* @__PURE__ */ (0,
|
|
7658
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ContentFlag, { tone: complete, title })
|
|
7282
7659
|
}
|
|
7283
7660
|
);
|
|
7284
7661
|
}
|
|
7285
|
-
return /* @__PURE__ */ (0,
|
|
7662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
7286
7663
|
"span",
|
|
7287
7664
|
{
|
|
7288
7665
|
className: "scopetickets-island-counter-ring",
|
|
7289
7666
|
style: { position: "relative", display: "block", width: size2, height: size2, flex: "none" },
|
|
7290
7667
|
children: [
|
|
7291
|
-
track ? /* @__PURE__ */ (0,
|
|
7668
|
+
track ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { style: LAYER, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
7292
7669
|
import_icons8.IconGlyph,
|
|
7293
7670
|
{
|
|
7294
7671
|
glyph: "StepCompletionProgressRingTrack",
|
|
@@ -7297,7 +7674,7 @@ function CounterRing({
|
|
|
7297
7674
|
fill: true
|
|
7298
7675
|
}
|
|
7299
7676
|
) }) : null,
|
|
7300
|
-
/* @__PURE__ */ (0,
|
|
7677
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { style: LAYER, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
7301
7678
|
import_icons8.IconGlyph,
|
|
7302
7679
|
{
|
|
7303
7680
|
glyph: "StepCompletionProgressRing",
|
|
@@ -7313,7 +7690,7 @@ function CounterRing({
|
|
|
7313
7690
|
}
|
|
7314
7691
|
|
|
7315
7692
|
// src/island/ContactSteps.tsx
|
|
7316
|
-
var
|
|
7693
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
7317
7694
|
function useReportAnswered(answered, onAnsweredChange) {
|
|
7318
7695
|
(0, import_react23.useEffect)(() => {
|
|
7319
7696
|
onAnsweredChange?.(answered);
|
|
@@ -7322,10 +7699,10 @@ function useReportAnswered(answered, onAnsweredChange) {
|
|
|
7322
7699
|
function ringFor(counter) {
|
|
7323
7700
|
if (counter.kind === "EMPTY") return void 0;
|
|
7324
7701
|
const props = counter.kind === "COMPLETE" ? { progress: 1, complete: counter.flag } : { progress: counter.progress };
|
|
7325
|
-
return /* @__PURE__ */ (0,
|
|
7702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CounterRing, { ...props, size: 16 });
|
|
7326
7703
|
}
|
|
7327
7704
|
function StepForm({ children }) {
|
|
7328
|
-
return /* @__PURE__ */ (0,
|
|
7705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("form", { className: "scopetickets-island-card__fields", onSubmit: (event) => event.preventDefault(), children });
|
|
7329
7706
|
}
|
|
7330
7707
|
function NameStep({
|
|
7331
7708
|
value,
|
|
@@ -7337,8 +7714,8 @@ function NameStep({
|
|
|
7337
7714
|
const { firstName, lastName } = current;
|
|
7338
7715
|
const accept = (next) => onChange ? onChange(next) : setInternal(next);
|
|
7339
7716
|
useReportAnswered(isCompleteName(firstName, lastName), onAnsweredChange);
|
|
7340
|
-
return /* @__PURE__ */ (0,
|
|
7341
|
-
/* @__PURE__ */ (0,
|
|
7717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(StepForm, { children: [
|
|
7718
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
7342
7719
|
TextField,
|
|
7343
7720
|
{
|
|
7344
7721
|
id: "contact-given-name",
|
|
@@ -7354,7 +7731,7 @@ function NameStep({
|
|
|
7354
7731
|
onSubmit: () => document.getElementById("contact-family-name")?.focus()
|
|
7355
7732
|
}
|
|
7356
7733
|
),
|
|
7357
|
-
/* @__PURE__ */ (0,
|
|
7734
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
7358
7735
|
TextField,
|
|
7359
7736
|
{
|
|
7360
7737
|
id: "contact-family-name",
|
|
@@ -7379,7 +7756,7 @@ function EmailStep({
|
|
|
7379
7756
|
const email = value ?? internal;
|
|
7380
7757
|
const accept = (next) => onChange ? onChange(next) : setInternal(next);
|
|
7381
7758
|
useReportAnswered(isValidEmail(email), onAnsweredChange);
|
|
7382
|
-
return /* @__PURE__ */ (0,
|
|
7759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StepForm, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
7383
7760
|
TextField,
|
|
7384
7761
|
{
|
|
7385
7762
|
id: "contact-email",
|
|
@@ -7419,8 +7796,8 @@ function PhoneStep({
|
|
|
7419
7796
|
if (onChange) onChange(next);
|
|
7420
7797
|
else setInternal(next);
|
|
7421
7798
|
};
|
|
7422
|
-
return /* @__PURE__ */ (0,
|
|
7423
|
-
/* @__PURE__ */ (0,
|
|
7799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(StepForm, { children: [
|
|
7800
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
7424
7801
|
TextField,
|
|
7425
7802
|
{
|
|
7426
7803
|
id: "phone-country-code",
|
|
@@ -7435,7 +7812,7 @@ function PhoneStep({
|
|
|
7435
7812
|
note: country?.name
|
|
7436
7813
|
}
|
|
7437
7814
|
),
|
|
7438
|
-
/* @__PURE__ */ (0,
|
|
7815
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
7439
7816
|
TextField,
|
|
7440
7817
|
{
|
|
7441
7818
|
id: "phone-national",
|
|
@@ -7468,8 +7845,8 @@ function PasswordStep({
|
|
|
7468
7845
|
onPasswordChange?.(submittable ? password : "");
|
|
7469
7846
|
}, [submittable, password, onPasswordChange]);
|
|
7470
7847
|
const type = revealed ? "text" : "password";
|
|
7471
|
-
return /* @__PURE__ */ (0,
|
|
7472
|
-
accountEmail === void 0 ? null : /* @__PURE__ */ (0,
|
|
7848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(StepForm, { children: [
|
|
7849
|
+
accountEmail === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
7473
7850
|
"input",
|
|
7474
7851
|
{
|
|
7475
7852
|
type: "text",
|
|
@@ -7482,7 +7859,7 @@ function PasswordStep({
|
|
|
7482
7859
|
className: "scopetickets-island-offscreen"
|
|
7483
7860
|
}
|
|
7484
7861
|
),
|
|
7485
|
-
/* @__PURE__ */ (0,
|
|
7862
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
7486
7863
|
TextField,
|
|
7487
7864
|
{
|
|
7488
7865
|
id: "new-password",
|
|
@@ -7502,7 +7879,7 @@ function PasswordStep({
|
|
|
7502
7879
|
trailing: ringFor(enterPasswordCounter(password))
|
|
7503
7880
|
}
|
|
7504
7881
|
),
|
|
7505
|
-
/* @__PURE__ */ (0,
|
|
7882
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
7506
7883
|
TextField,
|
|
7507
7884
|
{
|
|
7508
7885
|
id: "confirm-password",
|
|
@@ -7529,7 +7906,7 @@ function ConfirmEmailStep({
|
|
|
7529
7906
|
const [typed, setTyped] = (0, import_react23.useState)(initialEmail);
|
|
7530
7907
|
const email = typed.trim() === "" ? initialEmail : typed;
|
|
7531
7908
|
useReportAnswered(isValidEmail(email), onAnsweredChange);
|
|
7532
|
-
return /* @__PURE__ */ (0,
|
|
7909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StepForm, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
7533
7910
|
TextField,
|
|
7534
7911
|
{
|
|
7535
7912
|
id: "account-email",
|
|
@@ -7556,7 +7933,7 @@ function ConfirmEmailStep({
|
|
|
7556
7933
|
|
|
7557
7934
|
// src/island/PasscodeField.tsx
|
|
7558
7935
|
var import_react24 = require("react");
|
|
7559
|
-
var
|
|
7936
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
7560
7937
|
function PasscodeField({
|
|
7561
7938
|
value,
|
|
7562
7939
|
onChange,
|
|
@@ -7588,8 +7965,8 @@ function PasscodeField({
|
|
|
7588
7965
|
event.preventDefault();
|
|
7589
7966
|
onComplete?.();
|
|
7590
7967
|
};
|
|
7591
|
-
return /* @__PURE__ */ (0,
|
|
7592
|
-
/* @__PURE__ */ (0,
|
|
7968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "scopetickets-island-passcode", children: [
|
|
7969
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
7593
7970
|
"input",
|
|
7594
7971
|
{
|
|
7595
7972
|
ref: inputRef,
|
|
@@ -7609,7 +7986,7 @@ function PasscodeField({
|
|
|
7609
7986
|
"aria-describedby": message === void 0 ? void 0 : messageId
|
|
7610
7987
|
}
|
|
7611
7988
|
),
|
|
7612
|
-
/* @__PURE__ */ (0,
|
|
7989
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "scopetickets-island-passcode__boxes", "aria-hidden": "true", children: Array.from({ length: PASSCODE_LENGTH }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
7613
7990
|
"span",
|
|
7614
7991
|
{
|
|
7615
7992
|
className: "scopetickets-island-passcode__box",
|
|
@@ -7620,7 +7997,7 @@ function PasscodeField({
|
|
|
7620
7997
|
},
|
|
7621
7998
|
index
|
|
7622
7999
|
)) }),
|
|
7623
|
-
message === void 0 ? null : /* @__PURE__ */ (0,
|
|
8000
|
+
message === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { id: messageId, role: "status", className: "scopetickets-island-passcode__message", children: message })
|
|
7624
8001
|
] });
|
|
7625
8002
|
}
|
|
7626
8003
|
var VERIFY_EMAIL_COPY = {
|
|
@@ -7647,7 +8024,7 @@ function VerifyEmailStep({
|
|
|
7647
8024
|
setCode("");
|
|
7648
8025
|
setRefused(true);
|
|
7649
8026
|
}, [invalid]);
|
|
7650
|
-
return /* @__PURE__ */ (0,
|
|
8027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "scopetickets-island-card__fields", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
7651
8028
|
PasscodeField,
|
|
7652
8029
|
{
|
|
7653
8030
|
autoFocus: true,
|
|
@@ -7668,7 +8045,7 @@ function VerifyEmailStep({
|
|
|
7668
8045
|
var import_icons10 = require("@scopetickets/icons");
|
|
7669
8046
|
|
|
7670
8047
|
// src/island/brand-marks.tsx
|
|
7671
|
-
var
|
|
8048
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
7672
8049
|
function BrandMark({
|
|
7673
8050
|
mark,
|
|
7674
8051
|
artwork,
|
|
@@ -7683,7 +8060,7 @@ function BrandMark({
|
|
|
7683
8060
|
const a11y = title ? { role: "img", "aria-label": title } : { "aria-hidden": true, focusable: false };
|
|
7684
8061
|
const drawn = height ?? artwork.height;
|
|
7685
8062
|
const box = fill ? { width: "100%", height: "100%" } : { height: drawn, width: drawn * artwork.width / artwork.height, maxWidth: "100%" };
|
|
7686
|
-
return /* @__PURE__ */ (0,
|
|
8063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
7687
8064
|
"svg",
|
|
7688
8065
|
{
|
|
7689
8066
|
...a11y,
|
|
@@ -7697,7 +8074,7 @@ function BrandMark({
|
|
|
7697
8074
|
...box,
|
|
7698
8075
|
...style
|
|
7699
8076
|
},
|
|
7700
|
-
children: paths.map((path, i) => /* @__PURE__ */ (0,
|
|
8077
|
+
children: paths.map((path, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
7701
8078
|
"path",
|
|
7702
8079
|
{
|
|
7703
8080
|
d: path.d,
|
|
@@ -7738,7 +8115,7 @@ var SCOPE_TICKETS_WORDMARK_PATHS = [
|
|
|
7738
8115
|
}
|
|
7739
8116
|
];
|
|
7740
8117
|
function ScopeTicketsWordmarkMark(props) {
|
|
7741
|
-
return /* @__PURE__ */ (0,
|
|
8118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
7742
8119
|
BrandMark,
|
|
7743
8120
|
{
|
|
7744
8121
|
...props,
|
|
@@ -7827,6 +8204,21 @@ var NOTICES = {
|
|
|
7827
8204
|
*/
|
|
7828
8205
|
actions: [secondary("CLOSE", "Close")]
|
|
7829
8206
|
},
|
|
8207
|
+
QUESTIONS_NOT_LOADED: {
|
|
8208
|
+
id: "QUESTIONS_NOT_LOADED",
|
|
8209
|
+
severity: "FAILURE",
|
|
8210
|
+
title: "We Could Not Load the Questions",
|
|
8211
|
+
subtitle: "This event asks a few questions before checkout, and they did not reach us just now.",
|
|
8212
|
+
actions: [confirm("RETRY", "Try Again"), secondary("CLOSE", "Close")]
|
|
8213
|
+
},
|
|
8214
|
+
ANSWERS_NOT_SAVED: {
|
|
8215
|
+
id: "ANSWERS_NOT_SAVED",
|
|
8216
|
+
severity: "FAILURE",
|
|
8217
|
+
title: "We Could Not Save Your Answers",
|
|
8218
|
+
// Every path to a charge saves the answers first, so nothing has been charged.
|
|
8219
|
+
subtitle: "Your answers did not reach us just now. Nothing has been charged.",
|
|
8220
|
+
actions: [confirm("RETRY", "Try Again"), secondary("CLOSE", "Close")]
|
|
8221
|
+
},
|
|
7830
8222
|
/*
|
|
7831
8223
|
* THE COUNTERPART OF THE CHARGE PROMISE, and the reason both of these say it. Before a
|
|
7832
8224
|
* payment the reassurance a buyer needs is that no money moved; after one it is the
|
|
@@ -7993,6 +8385,12 @@ function raiseForSignIn(signIn2, funnel) {
|
|
|
7993
8385
|
function raiseForFeedback(submission) {
|
|
7994
8386
|
return submission.status === "FAILED" ? NOTICES.FEEDBACK_NOT_SENT : null;
|
|
7995
8387
|
}
|
|
8388
|
+
function raiseForQuestions(load) {
|
|
8389
|
+
return load.status === "FAILED" ? NOTICES.QUESTIONS_NOT_LOADED : null;
|
|
8390
|
+
}
|
|
8391
|
+
function raiseForAnswers(answers) {
|
|
8392
|
+
return answers.status === "FAILED" ? NOTICES.ANSWERS_NOT_SAVED : null;
|
|
8393
|
+
}
|
|
7996
8394
|
function noticeTelemetry(severity) {
|
|
7997
8395
|
return severity === "WARNING" ? "BREADCRUMB" : "EXCEPTION";
|
|
7998
8396
|
}
|
|
@@ -8001,7 +8399,7 @@ function noticeLeadRole(severity) {
|
|
|
8001
8399
|
}
|
|
8002
8400
|
|
|
8003
8401
|
// src/island/CredentialFields.tsx
|
|
8004
|
-
var
|
|
8402
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
8005
8403
|
function CredentialFields({
|
|
8006
8404
|
email,
|
|
8007
8405
|
password,
|
|
@@ -8010,7 +8408,7 @@ function CredentialFields({
|
|
|
8010
8408
|
passwordVisible,
|
|
8011
8409
|
onSubmit
|
|
8012
8410
|
}) {
|
|
8013
|
-
return /* @__PURE__ */ (0,
|
|
8411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
8014
8412
|
"form",
|
|
8015
8413
|
{
|
|
8016
8414
|
className: "scopetickets-island-credentials",
|
|
@@ -8018,7 +8416,7 @@ function CredentialFields({
|
|
|
8018
8416
|
onSubmit: (event) => event.preventDefault(),
|
|
8019
8417
|
"data-revealed": passwordVisible ? "" : void 0,
|
|
8020
8418
|
children: [
|
|
8021
|
-
/* @__PURE__ */ (0,
|
|
8419
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
8022
8420
|
TextField,
|
|
8023
8421
|
{
|
|
8024
8422
|
id: "signin-email",
|
|
@@ -8034,7 +8432,7 @@ function CredentialFields({
|
|
|
8034
8432
|
onSubmit: () => document.getElementById("signin-password")?.focus()
|
|
8035
8433
|
}
|
|
8036
8434
|
),
|
|
8037
|
-
/* @__PURE__ */ (0,
|
|
8435
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "scopetickets-island-credentials__password", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
8038
8436
|
TextField,
|
|
8039
8437
|
{
|
|
8040
8438
|
id: "signin-password",
|
|
@@ -8059,9 +8457,9 @@ function CredentialFields({
|
|
|
8059
8457
|
var import_status = require("@scopetickets/icons/status");
|
|
8060
8458
|
|
|
8061
8459
|
// src/island/RadioDot.tsx
|
|
8062
|
-
var
|
|
8460
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
8063
8461
|
function RadioDot({ selected }) {
|
|
8064
|
-
return /* @__PURE__ */ (0,
|
|
8462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
8065
8463
|
"span",
|
|
8066
8464
|
{
|
|
8067
8465
|
className: "scopetickets-island-radio",
|
|
@@ -8072,14 +8470,14 @@ function RadioDot({ selected }) {
|
|
|
8072
8470
|
}
|
|
8073
8471
|
|
|
8074
8472
|
// src/island/PaymentMethods.tsx
|
|
8075
|
-
var
|
|
8473
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
8076
8474
|
function PaymentRow({
|
|
8077
8475
|
method,
|
|
8078
8476
|
selected,
|
|
8079
8477
|
onSelect
|
|
8080
8478
|
}) {
|
|
8081
8479
|
const press = useIslandPress("element");
|
|
8082
|
-
return /* @__PURE__ */ (0,
|
|
8480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
8083
8481
|
"button",
|
|
8084
8482
|
{
|
|
8085
8483
|
type: "button",
|
|
@@ -8090,15 +8488,15 @@ function PaymentRow({
|
|
|
8090
8488
|
onClick: onSelect,
|
|
8091
8489
|
...press,
|
|
8092
8490
|
children: [
|
|
8093
|
-
method.icon === void 0 ? /* @__PURE__ */ (0,
|
|
8094
|
-
/* @__PURE__ */ (0,
|
|
8095
|
-
method.mark ?? /* @__PURE__ */ (0,
|
|
8096
|
-
method.detail === void 0 ? null : /* @__PURE__ */ (0,
|
|
8097
|
-
method.perk === void 0 ? null : /* @__PURE__ */ (0,
|
|
8491
|
+
method.icon === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(RadioDot, { selected }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "scopetickets-island-pay__mark", "aria-hidden": "true", children: method.icon }),
|
|
8492
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "scopetickets-island-pay__content", children: [
|
|
8493
|
+
method.mark ?? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "scopetickets-island-pay__label", children: method.label }),
|
|
8494
|
+
method.detail === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "scopetickets-island-pay__detail", children: method.detail }),
|
|
8495
|
+
method.perk === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "scopetickets-island-pay__perk", children: method.perk }),
|
|
8098
8496
|
method.note === void 0 ? null : (
|
|
8099
8497
|
/* THE PERK'S SLOT, because the note is the same trailing text at the same
|
|
8100
8498
|
* weight — the difference is only why it is there. */
|
|
8101
|
-
/* @__PURE__ */ (0,
|
|
8499
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "scopetickets-island-pay__perk", children: method.note })
|
|
8102
8500
|
)
|
|
8103
8501
|
] })
|
|
8104
8502
|
]
|
|
@@ -8113,7 +8511,7 @@ function PaymentMethods({ methods, selectedKey, onSelect, label }) {
|
|
|
8113
8511
|
0,
|
|
8114
8512
|
methods.findIndex((method) => method.key === selectedKey)
|
|
8115
8513
|
);
|
|
8116
|
-
return /* @__PURE__ */ (0,
|
|
8514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
8117
8515
|
"div",
|
|
8118
8516
|
{
|
|
8119
8517
|
className: "scopetickets-island-pay",
|
|
@@ -8121,8 +8519,8 @@ function PaymentMethods({ methods, selectedKey, onSelect, label }) {
|
|
|
8121
8519
|
"aria-label": label,
|
|
8122
8520
|
style: { "--scopetickets-island-pay-index": selectedIndex },
|
|
8123
8521
|
children: [
|
|
8124
|
-
/* @__PURE__ */ (0,
|
|
8125
|
-
methods.map((method) => /* @__PURE__ */ (0,
|
|
8522
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "scopetickets-island-pay__highlight", "aria-hidden": "true" }),
|
|
8523
|
+
methods.map((method) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
8126
8524
|
PaymentRow,
|
|
8127
8525
|
{
|
|
8128
8526
|
method,
|
|
@@ -8163,7 +8561,7 @@ function formatHold(hold) {
|
|
|
8163
8561
|
|
|
8164
8562
|
// src/island/CountdownTimer.tsx
|
|
8165
8563
|
var import_icons9 = require("@scopetickets/icons");
|
|
8166
|
-
var
|
|
8564
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
8167
8565
|
var LAYER2 = { position: "absolute", inset: 0 };
|
|
8168
8566
|
var TRACK_FILL = "var(--scopetickets-island-timer-track, rgba(230, 230, 230, 0.05))";
|
|
8169
8567
|
function CountdownTimer({
|
|
@@ -8176,7 +8574,7 @@ function CountdownTimer({
|
|
|
8176
8574
|
className,
|
|
8177
8575
|
style
|
|
8178
8576
|
}) {
|
|
8179
|
-
return /* @__PURE__ */ (0,
|
|
8577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
8180
8578
|
"span",
|
|
8181
8579
|
{
|
|
8182
8580
|
className,
|
|
@@ -8189,7 +8587,7 @@ function CountdownTimer({
|
|
|
8189
8587
|
...style
|
|
8190
8588
|
},
|
|
8191
8589
|
children: [
|
|
8192
|
-
track ? /* @__PURE__ */ (0,
|
|
8590
|
+
track ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { style: LAYER2, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
8193
8591
|
import_icons9.IconGlyph,
|
|
8194
8592
|
{
|
|
8195
8593
|
glyph: "TimerTrack",
|
|
@@ -8198,7 +8596,7 @@ function CountdownTimer({
|
|
|
8198
8596
|
fill: true
|
|
8199
8597
|
}
|
|
8200
8598
|
) }) : null,
|
|
8201
|
-
/* @__PURE__ */ (0,
|
|
8599
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { style: LAYER2, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
8202
8600
|
import_icons9.IconGlyph,
|
|
8203
8601
|
{
|
|
8204
8602
|
glyph: "Timer",
|
|
@@ -8216,7 +8614,7 @@ function CountdownTimer({
|
|
|
8216
8614
|
}
|
|
8217
8615
|
|
|
8218
8616
|
// src/island/step-cards.tsx
|
|
8219
|
-
var
|
|
8617
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
8220
8618
|
var STEP_BADGES = {
|
|
8221
8619
|
/* More Information's ASTERISK — the design. */
|
|
8222
8620
|
/*
|
|
@@ -8227,7 +8625,7 @@ var STEP_BADGES = {
|
|
|
8227
8625
|
* ROUND, not square — the two question badges and the passkey sit in a square notch;
|
|
8228
8626
|
* this one and Create Account's plus do not.
|
|
8229
8627
|
*/
|
|
8230
|
-
DETAILS: { shape: "circle", content: /* @__PURE__ */ (0,
|
|
8628
|
+
DETAILS: { shape: "circle", content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.AsteriskIcon, { fill: true, spin: true, appearance: "metal" }) },
|
|
8231
8629
|
/*
|
|
8232
8630
|
* Metal is an SVG FILTER whose canvas is 28x28 for a 20x20 glyph, and it normally hangs
|
|
8233
8631
|
* outside the layout box. A SQUARE badge slot CLIPS — by design; a badge clipped to a
|
|
@@ -8239,31 +8637,31 @@ var STEP_BADGES = {
|
|
|
8239
8637
|
*/
|
|
8240
8638
|
NAME: {
|
|
8241
8639
|
shape: "square",
|
|
8242
|
-
content: /* @__PURE__ */ (0,
|
|
8640
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.TextCursorWithRectangleIcon, { fill: true, appearance: "metal" })
|
|
8243
8641
|
},
|
|
8244
8642
|
EMAIL: {
|
|
8245
8643
|
shape: "square",
|
|
8246
|
-
content: /* @__PURE__ */ (0,
|
|
8644
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.PaperPlaneToTopLeftIcon, { fill: true, appearance: "metal" })
|
|
8247
8645
|
},
|
|
8248
8646
|
PASSWORD: {
|
|
8249
8647
|
shape: "square",
|
|
8250
|
-
content: /* @__PURE__ */ (0,
|
|
8648
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.TextCursorWithRedactedTextIcon, { fill: true, appearance: "metal" })
|
|
8251
8649
|
},
|
|
8252
8650
|
/* the design — a handset, in the square notch like the other questions. */
|
|
8253
|
-
PHONE: { shape: "square", content: /* @__PURE__ */ (0,
|
|
8651
|
+
PHONE: { shape: "square", content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.PhoneToRightIcon, { fill: true, appearance: "metal" }) },
|
|
8254
8652
|
/*
|
|
8255
8653
|
* A CAMERA OVER THE FACE BEING CHOSEN — the design, in the square notch. The badge says
|
|
8256
8654
|
* what the hero beneath it is FOR on this card: the avatar is not reporting who is
|
|
8257
8655
|
* signed in, it is wearing what has just been picked.
|
|
8258
8656
|
*/
|
|
8259
|
-
PROFILE_PHOTO: { shape: "square", content: /* @__PURE__ */ (0,
|
|
8260
|
-
FOLLOW: { shape: "square", content: /* @__PURE__ */ (0,
|
|
8657
|
+
PROFILE_PHOTO: { shape: "square", content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.CameraIcon, { fill: true, appearance: "metal" }) },
|
|
8658
|
+
FOLLOW: { shape: "square", content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.BellIcon, { fill: true, appearance: "metal" }) },
|
|
8261
8659
|
/*
|
|
8262
8660
|
* A HEART IN A CALLOUT — the design's badge on this card, in the square notch the other
|
|
8263
8661
|
* marks here sit in. It says what the hero underneath is for: the avatar is not
|
|
8264
8662
|
* reporting who is signed in, it is being asked a question.
|
|
8265
8663
|
*/
|
|
8266
|
-
FEEDBACK: { shape: "square", content: /* @__PURE__ */ (0,
|
|
8664
|
+
FEEDBACK: { shape: "square", content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.CalloutWithHeartIcon, { fill: true, appearance: "metal" }) },
|
|
8267
8665
|
/*
|
|
8268
8666
|
* NO `CREATE_ACCOUNT` ENTRY, AND THAT IS THE POINT. Its badge is on its CARD —
|
|
8269
8667
|
* `AUTH_CARDS.ADD_TO_ACCOUNT`, which is the authority for everything the design draws —
|
|
@@ -8277,7 +8675,7 @@ var STEP_BADGES = {
|
|
|
8277
8675
|
* metal glyph. The glyph is drawn; the blue field is not, because no token in the
|
|
8278
8676
|
* export we have says what that fill is. Raised in.
|
|
8279
8677
|
*/
|
|
8280
|
-
PAYMENT: { shape: "square", content: /* @__PURE__ */ (0,
|
|
8678
|
+
PAYMENT: { shape: "square", content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.PaymentCardIcon, { fill: true, appearance: "metal" }) },
|
|
8281
8679
|
/*
|
|
8282
8680
|
* ROUND, like Details and Create Account's plus — the sticker is a mark rather than a
|
|
8283
8681
|
* picture, and the square slot is for the ones that read as pictures in a frame.
|
|
@@ -8285,14 +8683,14 @@ var STEP_BADGES = {
|
|
|
8285
8683
|
* It also keeps the sticker off the clip the note above describes: a square slot cuts
|
|
8286
8684
|
* the metal filter's canvas at the badge's own edge, and this glyph reaches its.
|
|
8287
8685
|
*/
|
|
8288
|
-
PROMO: { shape: "circle", content: /* @__PURE__ */ (0,
|
|
8686
|
+
PROMO: { shape: "circle", content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.PercentInStickerIcon, { fill: true, appearance: "metal" }) },
|
|
8289
8687
|
/*
|
|
8290
8688
|
* THE SAME MARK THE EMAIL STEP WEARS. The buyer is looking at their address again, and
|
|
8291
8689
|
* a second glyph for the same subject would suggest a different one.
|
|
8292
8690
|
*/
|
|
8293
8691
|
CONFIRM_EMAIL: {
|
|
8294
8692
|
shape: "square",
|
|
8295
|
-
content: /* @__PURE__ */ (0,
|
|
8693
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.PaperPlaneToTopLeftIcon, { fill: true, appearance: "metal" })
|
|
8296
8694
|
},
|
|
8297
8695
|
/*
|
|
8298
8696
|
* @Zsolt — AUTH SURFACE. `3735:45219` — the SQUARE notch, and the set's own passkey
|
|
@@ -8300,7 +8698,7 @@ var STEP_BADGES = {
|
|
|
8300
8698
|
* keyhole shipped here first and is a different idea: a keyhole is a lock, and a
|
|
8301
8699
|
* passkey is the thing that opens one without a key.
|
|
8302
8700
|
*/
|
|
8303
|
-
PASSKEY: { shape: "square", content: /* @__PURE__ */ (0,
|
|
8701
|
+
PASSKEY: { shape: "square", content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.PasskeyIcon, { fill: true, appearance: "metal" }) }
|
|
8304
8702
|
/*
|
|
8305
8703
|
* NO `PAYMENT_SUCCESS` ENTRY ANY MORE. It drew a bare metal check in the circular
|
|
8306
8704
|
* notch, and the design now gives it the same status tag the failure wears — a green
|
|
@@ -8357,7 +8755,7 @@ function statusBadge(status, size2, override) {
|
|
|
8357
8755
|
const Glyph = override ?? mark ?? spec.icon;
|
|
8358
8756
|
return {
|
|
8359
8757
|
shape: "circle",
|
|
8360
|
-
content: /* @__PURE__ */ (0,
|
|
8758
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
8361
8759
|
"span",
|
|
8362
8760
|
{
|
|
8363
8761
|
role: "img",
|
|
@@ -8379,7 +8777,7 @@ function statusBadge(status, size2, override) {
|
|
|
8379
8777
|
*/
|
|
8380
8778
|
background: mark === void 0 ? tone.background : "transparent"
|
|
8381
8779
|
},
|
|
8382
|
-
children: /* @__PURE__ */ (0,
|
|
8780
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
8383
8781
|
Glyph,
|
|
8384
8782
|
{
|
|
8385
8783
|
fill: true,
|
|
@@ -8488,7 +8886,7 @@ function funnelViewProps(funnel, handlers) {
|
|
|
8488
8886
|
title: FUNNEL_COPY.title,
|
|
8489
8887
|
subtitle: funnel.status === "REFUSED" ? FUNNEL_COPY.refused : working ? FUNNEL_COPY.working : FUNNEL_COPY.subtitle,
|
|
8490
8888
|
actionLabel: AUTH_COPY.SIGN_IN,
|
|
8491
|
-
input: /* @__PURE__ */ (0,
|
|
8889
|
+
input: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
8492
8890
|
CredentialFields,
|
|
8493
8891
|
{
|
|
8494
8892
|
email: credentials.email,
|
|
@@ -8615,7 +9013,7 @@ function cartViewProps(input, hold, onBack) {
|
|
|
8615
9013
|
function holdBadge(hold) {
|
|
8616
9014
|
return {
|
|
8617
9015
|
shape: "circle",
|
|
8618
|
-
content: /* @__PURE__ */ (0,
|
|
9016
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CountdownTimer, { remaining: holdRemaining(hold), appearance: "solid", size: "100%" }),
|
|
8619
9017
|
id: "view:hold"
|
|
8620
9018
|
};
|
|
8621
9019
|
}
|
|
@@ -8655,12 +9053,12 @@ var SIGN_IN_WITH_WORDMARK = {
|
|
|
8655
9053
|
mark: {
|
|
8656
9054
|
side: "trailing",
|
|
8657
9055
|
spacing: "joined",
|
|
8658
|
-
node: /* @__PURE__ */ (0,
|
|
9056
|
+
node: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ScopeTicketsWordmarkMark, { height: 12, title: "Scope Tickets" })
|
|
8659
9057
|
}
|
|
8660
9058
|
};
|
|
8661
9059
|
var KEYHOLE_BADGE = {
|
|
8662
9060
|
shape: "square",
|
|
8663
|
-
content: /* @__PURE__ */ (0,
|
|
9061
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.KeyholeInSquareIcon, { fill: true, appearance: "metal" }),
|
|
8664
9062
|
/*
|
|
8665
9063
|
* NAMED, like every step badge — it is square, and so are six others. See
|
|
8666
9064
|
* `STEP_ACCESSORY` for what the name is for.
|
|
@@ -8716,7 +9114,7 @@ var AUTH_CARDS = {
|
|
|
8716
9114
|
* on exactly as the header's glyphs do. SEPARATE spacing, not joined: the label says
|
|
8717
9115
|
* the whole thing on its own and the glyph accompanies it.
|
|
8718
9116
|
*/
|
|
8719
|
-
mark: { side: "trailing", node: /* @__PURE__ */ (0,
|
|
9117
|
+
mark: { side: "trailing", node: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.PasskeyIcon, { size: 16, color: "currentColor" }) }
|
|
8720
9118
|
},
|
|
8721
9119
|
{ role: "secondary", label: AUTH_COPY.ENTER_PASSWORD },
|
|
8722
9120
|
{ role: "secondary", label: AUTH_COPY.SIGN_OUT }
|
|
@@ -8751,7 +9149,7 @@ var AUTH_CARDS = {
|
|
|
8751
9149
|
*/
|
|
8752
9150
|
accessory: {
|
|
8753
9151
|
shape: "circle",
|
|
8754
|
-
content: /* @__PURE__ */ (0,
|
|
9152
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.PlusInCircleIcon, { fill: true, appearance: "metal" }),
|
|
8755
9153
|
id: "card:account-plus"
|
|
8756
9154
|
}
|
|
8757
9155
|
}
|
|
@@ -8946,7 +9344,7 @@ var STEP_CARD_ACTIONS = {
|
|
|
8946
9344
|
role: "secondary",
|
|
8947
9345
|
label: "Upload",
|
|
8948
9346
|
uploads: true,
|
|
8949
|
-
mark: { side: "leading", node: /* @__PURE__ */ (0,
|
|
9347
|
+
mark: { side: "leading", node: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.CloudWithArrowUpInIcon, { size: 14, color: "currentColor" }) }
|
|
8950
9348
|
}
|
|
8951
9349
|
],
|
|
8952
9350
|
/*
|
|
@@ -8958,9 +9356,9 @@ var STEP_CARD_ACTIONS = {
|
|
|
8958
9356
|
*/
|
|
8959
9357
|
FOLLOW: [{ role: "primary", label: "Continue to Ticket" }]
|
|
8960
9358
|
};
|
|
8961
|
-
var POWERED_BY = /* @__PURE__ */ (0,
|
|
9359
|
+
var POWERED_BY = /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "scopetickets-island-credit", children: [
|
|
8962
9360
|
"Powered by",
|
|
8963
|
-
/* @__PURE__ */ (0,
|
|
9361
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ScopeTicketsWordmarkMark, { height: 12 })
|
|
8964
9362
|
] });
|
|
8965
9363
|
var STEP_CARD_COPY = {
|
|
8966
9364
|
PARTY: { title: "Party Size", subtitle: "Let us know who\u2019s coming." },
|
|
@@ -9114,9 +9512,9 @@ var SIGN_IN_FUNNEL_CARD = {
|
|
|
9114
9512
|
* justify-center`, `gap: $2`, with the words `whitespace-nowrap` and the mark at
|
|
9115
9513
|
* 117.778 x 20 beside them.
|
|
9116
9514
|
*/
|
|
9117
|
-
title: /* @__PURE__ */ (0,
|
|
9118
|
-
/* @__PURE__ */ (0,
|
|
9119
|
-
/* @__PURE__ */ (0,
|
|
9515
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "scopetickets-island-funnel-title", children: [
|
|
9516
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "Sign In to" }),
|
|
9517
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ScopeTicketsWordmarkMark, { height: 20, title: "Scope Tickets" })
|
|
9120
9518
|
] }),
|
|
9121
9519
|
subtitle: "Sign in below."
|
|
9122
9520
|
},
|
|
@@ -9136,6 +9534,7 @@ var SIGN_IN_FUNNEL_CARD = {
|
|
|
9136
9534
|
* still running, unlike the design.
|
|
9137
9535
|
*/
|
|
9138
9536
|
};
|
|
9537
|
+
var DETAILS_SAVED_SUBTITLE = "Your answers are saved with this order and can no longer be changed.";
|
|
9139
9538
|
|
|
9140
9539
|
// src/island/island-hero.tsx
|
|
9141
9540
|
var HERO_TRANSITION_KEY = "checkout:hero";
|
|
@@ -9277,7 +9676,7 @@ async function read(client, subject, day) {
|
|
|
9277
9676
|
if (client === null || subject === void 0) return NOTHING2;
|
|
9278
9677
|
const eventKey = await eventKeyFor(client, subject, day);
|
|
9279
9678
|
if (eventKey === null) return NOTHING2;
|
|
9280
|
-
const tickets = await client.
|
|
9679
|
+
const tickets = await client.getTicketInformation({ events: [eventKey], includeQuestions: true });
|
|
9281
9680
|
return {
|
|
9282
9681
|
sellsSessions: tickets.some((ticket) => ticket.HasTimeslot),
|
|
9283
9682
|
asksQuestions: tickets.some((ticket) => (ticket.Questions ?? []).length > 0)
|
|
@@ -9291,7 +9690,7 @@ async function eventKeyFor(client, subject, day) {
|
|
|
9291
9690
|
}
|
|
9292
9691
|
|
|
9293
9692
|
// src/island/RestingIsland.tsx
|
|
9294
|
-
var
|
|
9693
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
9295
9694
|
function RestingIsland({
|
|
9296
9695
|
appKey,
|
|
9297
9696
|
source,
|
|
@@ -9306,6 +9705,7 @@ function RestingIsland({
|
|
|
9306
9705
|
initialPresentation = "card",
|
|
9307
9706
|
mode = "system",
|
|
9308
9707
|
align = "bottom",
|
|
9708
|
+
placement = "page",
|
|
9309
9709
|
simulate = false,
|
|
9310
9710
|
onCheckOut
|
|
9311
9711
|
}) {
|
|
@@ -9385,7 +9785,7 @@ function RestingIsland({
|
|
|
9385
9785
|
[raised, signIn2, funnel]
|
|
9386
9786
|
);
|
|
9387
9787
|
const badge = showsCart && running !== void 0 ? holdBadge(running) : heroAccessory(showsCart ? void 0 : authCard.accessory);
|
|
9388
|
-
const hero = /* @__PURE__ */ (0,
|
|
9788
|
+
const hero = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
9389
9789
|
import_avatar3.Avatar,
|
|
9390
9790
|
{
|
|
9391
9791
|
subject: { kind: "user", avatar: buyerAvatarValue(session.auth), assets: avatarAssets },
|
|
@@ -9396,13 +9796,14 @@ function RestingIsland({
|
|
|
9396
9796
|
}
|
|
9397
9797
|
);
|
|
9398
9798
|
if (notice !== null) {
|
|
9399
|
-
return /* @__PURE__ */ (0,
|
|
9799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
9400
9800
|
CheckoutIsland,
|
|
9401
9801
|
{
|
|
9402
9802
|
mode,
|
|
9403
9803
|
align,
|
|
9804
|
+
placement,
|
|
9404
9805
|
contentKey: `IDLE:NOTICE:${notice.id}`,
|
|
9405
|
-
avatar: /* @__PURE__ */ (0,
|
|
9806
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
9406
9807
|
import_avatar3.Avatar,
|
|
9407
9808
|
{
|
|
9408
9809
|
subject: { kind: "user", avatar: buyerAvatarValue(session.auth), assets: avatarAssets },
|
|
@@ -9417,11 +9818,12 @@ function RestingIsland({
|
|
|
9417
9818
|
);
|
|
9418
9819
|
}
|
|
9419
9820
|
if (funnelOpen(funnel.state)) {
|
|
9420
|
-
return /* @__PURE__ */ (0,
|
|
9821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
9421
9822
|
CheckoutIsland,
|
|
9422
9823
|
{
|
|
9423
9824
|
mode,
|
|
9424
9825
|
align,
|
|
9826
|
+
placement,
|
|
9425
9827
|
contentKey: "IDLE:FUNNEL",
|
|
9426
9828
|
avatar: hero,
|
|
9427
9829
|
...funnelViewProps(funnel.state, {
|
|
@@ -9434,11 +9836,12 @@ function RestingIsland({
|
|
|
9434
9836
|
}
|
|
9435
9837
|
if (showsCart) {
|
|
9436
9838
|
const total = formatMoney(money.minorUnits, money.currency);
|
|
9437
|
-
return /* @__PURE__ */ (0,
|
|
9839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
9438
9840
|
CheckoutIsland,
|
|
9439
9841
|
{
|
|
9440
9842
|
mode,
|
|
9441
9843
|
align,
|
|
9844
|
+
placement,
|
|
9442
9845
|
expanded,
|
|
9443
9846
|
contentKey: "IDLE:CART",
|
|
9444
9847
|
onToggle: toggle,
|
|
@@ -9446,7 +9849,7 @@ function RestingIsland({
|
|
|
9446
9849
|
pillCopy: { title: total, subtitle: CART_VIEW.title },
|
|
9447
9850
|
actionLabel: RESTING_CART.checkOut,
|
|
9448
9851
|
...restingCartViewProps(
|
|
9449
|
-
/* @__PURE__ */ (0,
|
|
9852
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
9450
9853
|
CartLines,
|
|
9451
9854
|
{
|
|
9452
9855
|
lines,
|
|
@@ -9464,11 +9867,12 @@ function RestingIsland({
|
|
|
9464
9867
|
);
|
|
9465
9868
|
}
|
|
9466
9869
|
const lead = drawnQuote === void 0 ? null : quoteLines(drawnQuote);
|
|
9467
|
-
return /* @__PURE__ */ (0,
|
|
9870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
9468
9871
|
CheckoutIsland,
|
|
9469
9872
|
{
|
|
9470
9873
|
mode,
|
|
9471
9874
|
align,
|
|
9875
|
+
placement,
|
|
9472
9876
|
expanded,
|
|
9473
9877
|
contentKey: `IDLE:${prompt.card}`,
|
|
9474
9878
|
onToggle: toggle,
|
|
@@ -9478,7 +9882,7 @@ function RestingIsland({
|
|
|
9478
9882
|
subtitle: authCard.copy.subtitle,
|
|
9479
9883
|
pillCopy: { title: lead?.headline, subtitle: lead?.qualifier ?? void 0 },
|
|
9480
9884
|
actionLabel: prompt.actionLabel,
|
|
9481
|
-
input: offersPasskeySignIn ? /* @__PURE__ */ (0,
|
|
9885
|
+
input: offersPasskeySignIn ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
9482
9886
|
PasskeyButton,
|
|
9483
9887
|
{
|
|
9484
9888
|
hostUrl: passkeyEnvironment.passkeyHostUrl,
|
|
@@ -9544,13 +9948,13 @@ function useTicketCodes(gateway, keys) {
|
|
|
9544
9948
|
}
|
|
9545
9949
|
|
|
9546
9950
|
// src/island/QuickActions.tsx
|
|
9547
|
-
var
|
|
9951
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
9548
9952
|
function QuickActions({ actions }) {
|
|
9549
|
-
return /* @__PURE__ */ (0,
|
|
9953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "scopetickets-island-quick", children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(QuickActionButton, { action }, action.key)) });
|
|
9550
9954
|
}
|
|
9551
9955
|
function QuickActionButton({ action }) {
|
|
9552
9956
|
const press = useIslandPress("element");
|
|
9553
|
-
return /* @__PURE__ */ (0,
|
|
9957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
9554
9958
|
"button",
|
|
9555
9959
|
{
|
|
9556
9960
|
type: "button",
|
|
@@ -9561,8 +9965,8 @@ function QuickActionButton({ action }) {
|
|
|
9561
9965
|
"data-disabled": action.disabled === true ? "" : void 0,
|
|
9562
9966
|
...press,
|
|
9563
9967
|
children: [
|
|
9564
|
-
/* @__PURE__ */ (0,
|
|
9565
|
-
/* @__PURE__ */ (0,
|
|
9968
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-quick__ring", "aria-hidden": "true", children: action.glyph }),
|
|
9969
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "scopetickets-island-quick__label", "aria-hidden": "true", children: action.lines.map((line) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: line }, line)) })
|
|
9566
9970
|
]
|
|
9567
9971
|
}
|
|
9568
9972
|
);
|
|
@@ -9614,7 +10018,7 @@ function sameFit(current, next) {
|
|
|
9614
10018
|
}
|
|
9615
10019
|
|
|
9616
10020
|
// src/island/TicketCode.tsx
|
|
9617
|
-
var
|
|
10021
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
9618
10022
|
function readTicketEdgeTokens(node) {
|
|
9619
10023
|
if (typeof getComputedStyle !== "function") return TICKET_EDGE_FALLBACK;
|
|
9620
10024
|
const style = getComputedStyle(node);
|
|
@@ -9660,20 +10064,20 @@ function TicketCode({
|
|
|
9660
10064
|
if (frameRef.current) observer.observe(frameRef.current);
|
|
9661
10065
|
return () => observer.disconnect();
|
|
9662
10066
|
}, [measure, fit?.ok]);
|
|
9663
|
-
const header = /* @__PURE__ */ (0,
|
|
9664
|
-
/* @__PURE__ */ (0,
|
|
9665
|
-
/* @__PURE__ */ (0,
|
|
9666
|
-
qualifier === null ? null : /* @__PURE__ */ (0,
|
|
9667
|
-
name === null ? null : /* @__PURE__ */ (0,
|
|
10067
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "scopetickets-island-ticket__header", ref: headerRef, children: [
|
|
10068
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "scopetickets-island-ticket__holder", children: [
|
|
10069
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "scopetickets-island-ticket__who", children: [
|
|
10070
|
+
qualifier === null ? null : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__qualifier", children: qualifier }),
|
|
10071
|
+
name === null ? null : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__name", children: name })
|
|
9668
10072
|
] }),
|
|
9669
|
-
avatar === void 0 || avatar === null ? null : /* @__PURE__ */ (0,
|
|
10073
|
+
avatar === void 0 || avatar === null ? null : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__avatar", children: avatar })
|
|
9670
10074
|
] }),
|
|
9671
|
-
/* @__PURE__ */ (0,
|
|
9672
|
-
/* @__PURE__ */ (0,
|
|
9673
|
-
time === null ? null : /* @__PURE__ */ (0,
|
|
10075
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "scopetickets-island-ticket__booking", children: [
|
|
10076
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__day", children: day }),
|
|
10077
|
+
time === null ? null : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__time", children: time })
|
|
9674
10078
|
] })
|
|
9675
10079
|
] });
|
|
9676
|
-
return /* @__PURE__ */ (0,
|
|
10080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "scopetickets-island-ticket", ref: hostRef, children: fit?.ok === true ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
9677
10081
|
"div",
|
|
9678
10082
|
{
|
|
9679
10083
|
ref: frameRef,
|
|
@@ -9683,23 +10087,23 @@ function TicketCode({
|
|
|
9683
10087
|
"--scopetickets-island-ticket-rows": fit.rows
|
|
9684
10088
|
},
|
|
9685
10089
|
children: [
|
|
9686
|
-
/* @__PURE__ */ (0,
|
|
9687
|
-
/* @__PURE__ */ (0,
|
|
9688
|
-
/* @__PURE__ */ (0,
|
|
9689
|
-
/* @__PURE__ */ (0,
|
|
10090
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "scopetickets-island-ticket__band", children: [
|
|
10091
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__corner" }),
|
|
10092
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__rail" }),
|
|
10093
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__corner" })
|
|
9690
10094
|
] }),
|
|
9691
|
-
/* @__PURE__ */ (0,
|
|
9692
|
-
/* @__PURE__ */ (0,
|
|
9693
|
-
/* @__PURE__ */ (0,
|
|
10095
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "scopetickets-island-ticket__middle", children: [
|
|
10096
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__side", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__rail scopetickets-island-ticket__rail--turned" }) }),
|
|
10097
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "scopetickets-island-ticket__centre", children: [
|
|
9694
10098
|
header,
|
|
9695
|
-
/* @__PURE__ */ (0,
|
|
10099
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TicketCodeImage, { code, label: codeLabel, missing: codeMissing })
|
|
9696
10100
|
] }),
|
|
9697
|
-
/* @__PURE__ */ (0,
|
|
10101
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__side scopetickets-island-ticket__side--flipped", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__rail scopetickets-island-ticket__rail--turned" }) })
|
|
9698
10102
|
] }),
|
|
9699
|
-
/* @__PURE__ */ (0,
|
|
9700
|
-
/* @__PURE__ */ (0,
|
|
9701
|
-
/* @__PURE__ */ (0,
|
|
9702
|
-
/* @__PURE__ */ (0,
|
|
10103
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "scopetickets-island-ticket__band scopetickets-island-ticket__band--flipped", children: [
|
|
10104
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__corner" }),
|
|
10105
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__rail" }),
|
|
10106
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__corner" })
|
|
9703
10107
|
] })
|
|
9704
10108
|
]
|
|
9705
10109
|
}
|
|
@@ -9709,7 +10113,7 @@ function TicketCode({
|
|
|
9709
10113
|
* width the ticket will have, so the first measurement is a real one rather than a
|
|
9710
10114
|
* zero that draws a ticket of one cutout and then jumps.
|
|
9711
10115
|
*/
|
|
9712
|
-
/* @__PURE__ */ (0,
|
|
10116
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "scopetickets-island-ticket__ruler", "aria-hidden": "true", children: header })
|
|
9713
10117
|
) });
|
|
9714
10118
|
}
|
|
9715
10119
|
function TicketCodeImage({
|
|
@@ -9718,20 +10122,20 @@ function TicketCodeImage({
|
|
|
9718
10122
|
missing
|
|
9719
10123
|
}) {
|
|
9720
10124
|
if (code.status === "DRAWN") {
|
|
9721
|
-
return /* @__PURE__ */ (0,
|
|
10125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "scopetickets-island-ticket__code", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("img", { src: code.src, alt: label, draggable: false }) });
|
|
9722
10126
|
}
|
|
9723
|
-
return /* @__PURE__ */ (0,
|
|
10127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
9724
10128
|
"div",
|
|
9725
10129
|
{
|
|
9726
10130
|
className: "scopetickets-island-ticket__code scopetickets-island-ticket__code--bare",
|
|
9727
10131
|
"data-state": code.status === "LOADING" ? "loading" : "missing",
|
|
9728
|
-
children: code.status === "ERROR" ? /* @__PURE__ */ (0,
|
|
10132
|
+
children: code.status === "ERROR" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "scopetickets-island-ticket__missing", children: missing }) : null
|
|
9729
10133
|
}
|
|
9730
10134
|
);
|
|
9731
10135
|
}
|
|
9732
10136
|
|
|
9733
10137
|
// src/island/TicketCodes.tsx
|
|
9734
|
-
var
|
|
10138
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
9735
10139
|
function TicketCodes({ tickets, at, onAtChange, label }) {
|
|
9736
10140
|
const wrapRef = (0, import_react29.useRef)(null);
|
|
9737
10141
|
const pagerRef = (0, import_react29.useRef)(null);
|
|
@@ -9822,7 +10226,7 @@ function TicketCodes({ tickets, at, onAtChange, label }) {
|
|
|
9822
10226
|
onAtChange(landed);
|
|
9823
10227
|
}, [tickets.length, onAtChange]);
|
|
9824
10228
|
if (tickets.length === 0) return null;
|
|
9825
|
-
return /* @__PURE__ */ (0,
|
|
10229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "scopetickets-island-codes", ref: wrapRef, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9826
10230
|
"div",
|
|
9827
10231
|
{
|
|
9828
10232
|
ref: pagerRef,
|
|
@@ -9836,14 +10240,14 @@ function TicketCodes({ tickets, at, onAtChange, label }) {
|
|
|
9836
10240
|
onPointerMove,
|
|
9837
10241
|
onPointerUp: release,
|
|
9838
10242
|
onPointerCancel: release,
|
|
9839
|
-
children: tickets.map((ticket, index) => /* @__PURE__ */ (0,
|
|
10243
|
+
children: tickets.map((ticket, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9840
10244
|
"div",
|
|
9841
10245
|
{
|
|
9842
10246
|
className: "scopetickets-island-codes__page",
|
|
9843
10247
|
ref: (node) => {
|
|
9844
10248
|
pageRefs.current[index] = node;
|
|
9845
10249
|
},
|
|
9846
|
-
children: /* @__PURE__ */ (0,
|
|
10250
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TicketCode, { ...ticket })
|
|
9847
10251
|
},
|
|
9848
10252
|
ticket.key
|
|
9849
10253
|
))
|
|
@@ -9897,27 +10301,27 @@ function TicketCodePager({
|
|
|
9897
10301
|
previousLabel,
|
|
9898
10302
|
nextLabel
|
|
9899
10303
|
}) {
|
|
9900
|
-
return /* @__PURE__ */ (0,
|
|
9901
|
-
/* @__PURE__ */ (0,
|
|
10304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "scopetickets-island-codes__pager-control", children: [
|
|
10305
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9902
10306
|
PagerArrow,
|
|
9903
10307
|
{
|
|
9904
10308
|
label: previousLabel,
|
|
9905
10309
|
disabled: at <= 0,
|
|
9906
10310
|
onPress: () => onAtChange(at - 1),
|
|
9907
|
-
glyph: /* @__PURE__ */ (0,
|
|
10311
|
+
glyph: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons11.ArrowLeftIcon, { size: 16, color: "currentColor" })
|
|
9908
10312
|
}
|
|
9909
10313
|
),
|
|
9910
|
-
/* @__PURE__ */ (0,
|
|
10314
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "scopetickets-island-codes__position", "aria-live": "polite", children: [
|
|
9911
10315
|
position,
|
|
9912
|
-
/* @__PURE__ */ (0,
|
|
10316
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "scopetickets-island-codes__position-of", children: positionOf })
|
|
9913
10317
|
] }),
|
|
9914
|
-
/* @__PURE__ */ (0,
|
|
10318
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9915
10319
|
PagerArrow,
|
|
9916
10320
|
{
|
|
9917
10321
|
label: nextLabel,
|
|
9918
10322
|
disabled: at >= count - 1,
|
|
9919
10323
|
onPress: () => onAtChange(at + 1),
|
|
9920
|
-
glyph: /* @__PURE__ */ (0,
|
|
10324
|
+
glyph: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons11.ArrowRightIcon, { size: 16, color: "currentColor" })
|
|
9921
10325
|
}
|
|
9922
10326
|
)
|
|
9923
10327
|
] });
|
|
@@ -9929,7 +10333,7 @@ function PagerArrow({
|
|
|
9929
10333
|
glyph
|
|
9930
10334
|
}) {
|
|
9931
10335
|
const press = useIslandPress("element");
|
|
9932
|
-
return /* @__PURE__ */ (0,
|
|
10336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9933
10337
|
"button",
|
|
9934
10338
|
{
|
|
9935
10339
|
type: "button",
|
|
@@ -9946,13 +10350,13 @@ function PagerArrow({
|
|
|
9946
10350
|
|
|
9947
10351
|
// src/island/TicketsInBooking.tsx
|
|
9948
10352
|
var import_icons12 = require("@scopetickets/icons");
|
|
9949
|
-
var
|
|
10353
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
9950
10354
|
function TicketsInBooking({ tickets, onOpen }) {
|
|
9951
|
-
return /* @__PURE__ */ (0,
|
|
10355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "scopetickets-island-tickets", children: tickets.map((ticket) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TicketInBookingRow, { ticket, onOpen: () => onOpen(ticket.key) }, ticket.key)) });
|
|
9952
10356
|
}
|
|
9953
10357
|
function TicketInBookingRow({ ticket, onOpen }) {
|
|
9954
10358
|
const press = useIslandPress("element");
|
|
9955
|
-
return /* @__PURE__ */ (0,
|
|
10359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
9956
10360
|
"button",
|
|
9957
10361
|
{
|
|
9958
10362
|
type: "button",
|
|
@@ -9961,8 +10365,8 @@ function TicketInBookingRow({ ticket, onOpen }) {
|
|
|
9961
10365
|
onClick: onOpen,
|
|
9962
10366
|
...press,
|
|
9963
10367
|
children: [
|
|
9964
|
-
/* @__PURE__ */ (0,
|
|
9965
|
-
/* @__PURE__ */ (0,
|
|
10368
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "scopetickets-island-tickets__detail", children: [
|
|
10369
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
9966
10370
|
"span",
|
|
9967
10371
|
{
|
|
9968
10372
|
className: "scopetickets-island-tickets__holder",
|
|
@@ -9970,9 +10374,9 @@ function TicketInBookingRow({ ticket, onOpen }) {
|
|
|
9970
10374
|
children: ticket.holder
|
|
9971
10375
|
}
|
|
9972
10376
|
),
|
|
9973
|
-
ticket.qualifier === null ? null : /* @__PURE__ */ (0,
|
|
10377
|
+
ticket.qualifier === null ? null : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "scopetickets-island-tickets__qualifier", children: ticket.qualifier })
|
|
9974
10378
|
] }),
|
|
9975
|
-
ticket.add === void 0 ? /* @__PURE__ */ (0,
|
|
10379
|
+
ticket.add === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "scopetickets-island-tickets__open", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons12.ArrowRightIcon, { size: 16, color: "currentColor" }) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "scopetickets-island-tickets__add", "aria-hidden": "true", children: ticket.add })
|
|
9976
10380
|
]
|
|
9977
10381
|
}
|
|
9978
10382
|
);
|
|
@@ -9980,7 +10384,7 @@ function TicketInBookingRow({ ticket, onOpen }) {
|
|
|
9980
10384
|
|
|
9981
10385
|
// src/island/booking-cards.tsx
|
|
9982
10386
|
var import_icons13 = require("@scopetickets/icons");
|
|
9983
|
-
var
|
|
10387
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
9984
10388
|
var BOOKING_COPY = {
|
|
9985
10389
|
/** The root. A statement of what was bought, which is why the title is a subject. */
|
|
9986
10390
|
title: "Booking Details",
|
|
@@ -10081,13 +10485,13 @@ function bookingDismiss(back) {
|
|
|
10081
10485
|
}
|
|
10082
10486
|
function DayChip({ day, size: size2 }) {
|
|
10083
10487
|
const { date, month } = formatDayChip(day);
|
|
10084
|
-
return /* @__PURE__ */ (0,
|
|
10488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
10085
10489
|
"span",
|
|
10086
10490
|
{
|
|
10087
10491
|
className: `scopetickets-island-datemark${size2 === 10 ? " scopetickets-island-datemark--sm" : ""}`,
|
|
10088
10492
|
children: [
|
|
10089
|
-
/* @__PURE__ */ (0,
|
|
10090
|
-
size2 === 10 ? null : /* @__PURE__ */ (0,
|
|
10493
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "scopetickets-island-datemark__date", children: date }),
|
|
10494
|
+
size2 === 10 ? null : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "scopetickets-island-datemark__month", children: month })
|
|
10091
10495
|
]
|
|
10092
10496
|
}
|
|
10093
10497
|
);
|
|
@@ -10095,33 +10499,33 @@ function DayChip({ day, size: size2 }) {
|
|
|
10095
10499
|
var BOOKING_BADGES = {
|
|
10096
10500
|
day: (day, size2) => ({
|
|
10097
10501
|
shape: "square",
|
|
10098
|
-
content: /* @__PURE__ */ (0,
|
|
10502
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DayChip, { day, size: size2 }),
|
|
10099
10503
|
id: "booking:day"
|
|
10100
10504
|
}),
|
|
10101
10505
|
edit: {
|
|
10102
10506
|
shape: "square",
|
|
10103
|
-
content: /* @__PURE__ */ (0,
|
|
10507
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons13.PaperAndPencilIcon, { fill: true, appearance: "metal" }),
|
|
10104
10508
|
id: "booking:edit"
|
|
10105
10509
|
},
|
|
10106
10510
|
/* The same plane the quick action wears, so the card says what the press that opened it did. */
|
|
10107
10511
|
send: {
|
|
10108
10512
|
shape: "square",
|
|
10109
|
-
content: /* @__PURE__ */ (0,
|
|
10513
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons13.PaperPlaneToTopRightIcon, { fill: true, appearance: "metal" }),
|
|
10110
10514
|
id: "booking:send"
|
|
10111
10515
|
}
|
|
10112
10516
|
};
|
|
10113
10517
|
function CodeGlyph({ size: size2 = 16 }) {
|
|
10114
|
-
return /* @__PURE__ */ (0,
|
|
10518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons13.QrCodeIcon, { size: size2, color: "currentColor" });
|
|
10115
10519
|
}
|
|
10116
10520
|
function EditGlyph({ size: size2 = 16 }) {
|
|
10117
|
-
return /* @__PURE__ */ (0,
|
|
10521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons13.PaperAndPencilIcon, { size: size2, color: "currentColor" });
|
|
10118
10522
|
}
|
|
10119
10523
|
function SendGlyph({ size: size2 = 16 }) {
|
|
10120
|
-
return /* @__PURE__ */ (0,
|
|
10524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons13.PaperPlaneToTopRightIcon, { size: size2, color: "currentColor" });
|
|
10121
10525
|
}
|
|
10122
10526
|
|
|
10123
10527
|
// src/island/BookingIsland.tsx
|
|
10124
|
-
var
|
|
10528
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
10125
10529
|
var NO_CODES = [];
|
|
10126
10530
|
function BookingIsland({
|
|
10127
10531
|
appKey,
|
|
@@ -10135,7 +10539,8 @@ function BookingIsland({
|
|
|
10135
10539
|
walletBadge,
|
|
10136
10540
|
initialPresentation = "card",
|
|
10137
10541
|
mode = "system",
|
|
10138
|
-
align = "bottom"
|
|
10542
|
+
align = "bottom",
|
|
10543
|
+
placement = "page"
|
|
10139
10544
|
}) {
|
|
10140
10545
|
const [expanded, setExpanded] = (0, import_react30.useState)(initialPresentation === "card");
|
|
10141
10546
|
const [screen, setScreen] = (0, import_react30.useState)({ kind: "BOOKING" });
|
|
@@ -10214,14 +10619,14 @@ function BookingIsland({
|
|
|
10214
10619
|
},
|
|
10215
10620
|
[booking, commitHolder, retryable]
|
|
10216
10621
|
);
|
|
10217
|
-
const common = { mode, align, expanded, onToggle: onDismiss };
|
|
10622
|
+
const common = { mode, align, placement, expanded, onToggle: onDismiss };
|
|
10218
10623
|
if (notice !== null) {
|
|
10219
|
-
return /* @__PURE__ */ (0,
|
|
10624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10220
10625
|
CheckoutIsland,
|
|
10221
10626
|
{
|
|
10222
10627
|
...common,
|
|
10223
10628
|
contentKey: `BOOKING:NOTICE:${notice.id}`,
|
|
10224
|
-
avatar: /* @__PURE__ */ (0,
|
|
10629
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10225
10630
|
import_avatar4.Avatar,
|
|
10226
10631
|
{
|
|
10227
10632
|
subject: { kind: "event", src: occasion.artwork ?? "", alt: "" },
|
|
@@ -10237,13 +10642,13 @@ function BookingIsland({
|
|
|
10237
10642
|
}
|
|
10238
10643
|
if (dressed === null) {
|
|
10239
10644
|
const waiting = booking.state.status === "LOADING";
|
|
10240
|
-
return /* @__PURE__ */ (0,
|
|
10645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10241
10646
|
CheckoutIsland,
|
|
10242
10647
|
{
|
|
10243
10648
|
...common,
|
|
10244
10649
|
contentKey: waiting ? "BOOKING:LOADING" : "BOOKING:NONE",
|
|
10245
10650
|
dismiss: "close",
|
|
10246
|
-
avatar: /* @__PURE__ */ (0,
|
|
10651
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10247
10652
|
import_avatar4.Avatar,
|
|
10248
10653
|
{
|
|
10249
10654
|
subject: { kind: "event", src: occasion.artwork ?? "", alt: "" },
|
|
@@ -10295,14 +10700,14 @@ function BookingIsland({
|
|
|
10295
10700
|
...named === null ? { add: BOOKING_COPY.add } : {}
|
|
10296
10701
|
};
|
|
10297
10702
|
});
|
|
10298
|
-
return /* @__PURE__ */ (0,
|
|
10703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10299
10704
|
CheckoutIsland,
|
|
10300
10705
|
{
|
|
10301
10706
|
...common,
|
|
10302
10707
|
contentKey: "BOOKING:ROOT",
|
|
10303
10708
|
dismiss,
|
|
10304
10709
|
onToggle: onDismiss,
|
|
10305
|
-
avatar: expanded ? /* @__PURE__ */ (0,
|
|
10710
|
+
avatar: expanded ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10306
10711
|
import_avatar4.Avatar,
|
|
10307
10712
|
{
|
|
10308
10713
|
subject: { kind: "event", src: occasion.artwork ?? "", alt: "" },
|
|
@@ -10311,7 +10716,7 @@ function BookingIsland({
|
|
|
10311
10716
|
accessory: BOOKING_BADGES.day(occasion.day, 25),
|
|
10312
10717
|
transitionKey: BOOKING_TRANSITION_KEY
|
|
10313
10718
|
}
|
|
10314
|
-
) : /* @__PURE__ */ (0,
|
|
10719
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10315
10720
|
import_avatar4.Avatar,
|
|
10316
10721
|
{
|
|
10317
10722
|
subject: { kind: "user", avatar: buyerAvatar ?? null, assets: buyerAvatarAssets },
|
|
@@ -10319,7 +10724,7 @@ function BookingIsland({
|
|
|
10319
10724
|
fill: true,
|
|
10320
10725
|
accessory: {
|
|
10321
10726
|
shape: "square",
|
|
10322
|
-
content: /* @__PURE__ */ (0,
|
|
10727
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10323
10728
|
import_avatar4.Avatar,
|
|
10324
10729
|
{
|
|
10325
10730
|
subject: { kind: "event", src: occasion.artwork ?? "", alt: "" },
|
|
@@ -10333,22 +10738,22 @@ function BookingIsland({
|
|
|
10333
10738
|
}
|
|
10334
10739
|
),
|
|
10335
10740
|
title: BOOKING_COPY.title,
|
|
10336
|
-
subtitle: /* @__PURE__ */ (0,
|
|
10337
|
-
/* @__PURE__ */ (0,
|
|
10338
|
-
/* @__PURE__ */ (0,
|
|
10741
|
+
subtitle: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "scopetickets-island-booking__lines", children: [
|
|
10742
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: occasion.name }),
|
|
10743
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: formatDayDate(occasion.day) })
|
|
10339
10744
|
] }),
|
|
10340
10745
|
pillCopy: {},
|
|
10341
10746
|
actionLabel: BOOKING_COPY.myBooking,
|
|
10342
|
-
input: /* @__PURE__ */ (0,
|
|
10343
|
-
time === null ? null : /* @__PURE__ */ (0,
|
|
10344
|
-
/* @__PURE__ */ (0,
|
|
10747
|
+
input: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "scopetickets-island-booking", children: [
|
|
10748
|
+
time === null ? null : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "scopetickets-island-booking__time", children: time }),
|
|
10749
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TicketsInBooking, { tickets: rows, onOpen: openTicket })
|
|
10345
10750
|
] }),
|
|
10346
10751
|
actions: [
|
|
10347
10752
|
{
|
|
10348
10753
|
key: "booking-codes",
|
|
10349
10754
|
role: "secondary",
|
|
10350
10755
|
label: BOOKING_COPY.showCodes,
|
|
10351
|
-
mark: { side: "leading", node: /* @__PURE__ */ (0,
|
|
10756
|
+
mark: { side: "leading", node: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CodeGlyph, {}) },
|
|
10352
10757
|
onPress: () => openCodes(0)
|
|
10353
10758
|
}
|
|
10354
10759
|
]
|
|
@@ -10370,7 +10775,7 @@ function BookingIsland({
|
|
|
10370
10775
|
codeMissing: BOOKING_COPY.codeMissing
|
|
10371
10776
|
};
|
|
10372
10777
|
});
|
|
10373
|
-
return /* @__PURE__ */ (0,
|
|
10778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10374
10779
|
CheckoutIsland,
|
|
10375
10780
|
{
|
|
10376
10781
|
...common,
|
|
@@ -10379,7 +10784,7 @@ function BookingIsland({
|
|
|
10379
10784
|
onToggle: onDismiss,
|
|
10380
10785
|
pillCopy: pill2,
|
|
10381
10786
|
actionLabel: BOOKING_COPY.codes,
|
|
10382
|
-
input: /* @__PURE__ */ (0,
|
|
10787
|
+
input: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10383
10788
|
TicketCodes,
|
|
10384
10789
|
{
|
|
10385
10790
|
tickets: entries,
|
|
@@ -10389,7 +10794,7 @@ function BookingIsland({
|
|
|
10389
10794
|
}
|
|
10390
10795
|
),
|
|
10391
10796
|
actions: [],
|
|
10392
|
-
footer: /* @__PURE__ */ (0,
|
|
10797
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10393
10798
|
TicketCodePager,
|
|
10394
10799
|
{
|
|
10395
10800
|
at: showing.at,
|
|
@@ -10408,7 +10813,7 @@ function BookingIsland({
|
|
|
10408
10813
|
const name = holderName(ticket.holder) ?? BOOKING_COPY.awaiting;
|
|
10409
10814
|
const qualifier = ticketQualifier(ticket);
|
|
10410
10815
|
if (showing.kind === "TICKET") {
|
|
10411
|
-
return /* @__PURE__ */ (0,
|
|
10816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10412
10817
|
CheckoutIsland,
|
|
10413
10818
|
{
|
|
10414
10819
|
...common,
|
|
@@ -10416,35 +10821,35 @@ function BookingIsland({
|
|
|
10416
10821
|
dismiss,
|
|
10417
10822
|
onToggle: onDismiss,
|
|
10418
10823
|
title: ticketTitle(ticket.holder) ?? BOOKING_COPY.ticketFallbackTitle,
|
|
10419
|
-
subtitle: /* @__PURE__ */ (0,
|
|
10420
|
-
qualifier === null ? null : /* @__PURE__ */ (0,
|
|
10421
|
-
/* @__PURE__ */ (0,
|
|
10422
|
-
occasionTime(occasion) === null ? null : /* @__PURE__ */ (0,
|
|
10824
|
+
subtitle: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "scopetickets-island-booking__lines", children: [
|
|
10825
|
+
qualifier === null ? null : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: qualifier }),
|
|
10826
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: formatWeekdayAndDate(occasion.day) }),
|
|
10827
|
+
occasionTime(occasion) === null ? null : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: occasionTime(occasion) })
|
|
10423
10828
|
] }),
|
|
10424
10829
|
pillCopy: { title: name, subtitle: qualifier ?? occasion.name },
|
|
10425
10830
|
actionLabel: BOOKING_COPY.title,
|
|
10426
|
-
input: /* @__PURE__ */ (0,
|
|
10427
|
-
walletBadge === void 0 ? null : /* @__PURE__ */ (0,
|
|
10428
|
-
/* @__PURE__ */ (0,
|
|
10429
|
-
/* @__PURE__ */ (0,
|
|
10831
|
+
input: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "scopetickets-island-booking scopetickets-island-booking--ticket", children: [
|
|
10832
|
+
walletBadge === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "scopetickets-island-booking__wallet", children: walletBadge(ticket.key) }),
|
|
10833
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "scopetickets-island-booking__rule", "aria-hidden": "true" }),
|
|
10834
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10430
10835
|
QuickActions,
|
|
10431
10836
|
{
|
|
10432
10837
|
actions: [
|
|
10433
10838
|
{
|
|
10434
10839
|
key: "ticket-code",
|
|
10435
|
-
glyph: /* @__PURE__ */ (0,
|
|
10840
|
+
glyph: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CodeGlyph, { size: 24 }),
|
|
10436
10841
|
lines: BOOKING_COPY.showCodeLines,
|
|
10437
10842
|
onPress: () => openCodes(indexOfTicket(dressed.tickets, ticket.key))
|
|
10438
10843
|
},
|
|
10439
10844
|
{
|
|
10440
10845
|
key: "ticket-holder",
|
|
10441
|
-
glyph: /* @__PURE__ */ (0,
|
|
10846
|
+
glyph: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(EditGlyph, { size: 24 }),
|
|
10442
10847
|
lines: BOOKING_COPY.editHolderLines,
|
|
10443
10848
|
onPress: () => openEdit(ticket)
|
|
10444
10849
|
},
|
|
10445
10850
|
{
|
|
10446
10851
|
key: "ticket-send",
|
|
10447
|
-
glyph: /* @__PURE__ */ (0,
|
|
10852
|
+
glyph: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SendGlyph, { size: 24 }),
|
|
10448
10853
|
lines: BOOKING_COPY.sendTicketLines,
|
|
10449
10854
|
/*
|
|
10450
10855
|
* ADDRESSED BY THE NUMERIC ID, which some tickets arrive without — the
|
|
@@ -10470,7 +10875,7 @@ function BookingIsland({
|
|
|
10470
10875
|
const failed2 = booking.send.status === "FAILED";
|
|
10471
10876
|
const address = sendTo.trim();
|
|
10472
10877
|
const sendable2 = isValidEmail(address) && !sending && address !== sent?.email;
|
|
10473
|
-
return /* @__PURE__ */ (0,
|
|
10878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10474
10879
|
CheckoutIsland,
|
|
10475
10880
|
{
|
|
10476
10881
|
...common,
|
|
@@ -10486,7 +10891,7 @@ function BookingIsland({
|
|
|
10486
10891
|
subtitle: sent !== null ? BOOKING_COPY.sentTo(sent.email) : failed2 ? BOOKING_COPY.sendFailed : BOOKING_COPY.sendPrompt,
|
|
10487
10892
|
pillCopy: { title: name, subtitle: BOOKING_COPY.sendTicket },
|
|
10488
10893
|
actionLabel: BOOKING_COPY.sendTicket,
|
|
10489
|
-
input: /* @__PURE__ */ (0,
|
|
10894
|
+
input: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "scopetickets-island-booking__form", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10490
10895
|
TextField,
|
|
10491
10896
|
{
|
|
10492
10897
|
id: "send-ticket-email",
|
|
@@ -10519,7 +10924,7 @@ function BookingIsland({
|
|
|
10519
10924
|
const saving = booking.save.status === "SAVING";
|
|
10520
10925
|
const sendable = holderComplete(held) && holderChanged(ticket.holder, held);
|
|
10521
10926
|
const change = (field) => (value) => setDraft({ ...held, [field]: value });
|
|
10522
|
-
return /* @__PURE__ */ (0,
|
|
10927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10523
10928
|
CheckoutIsland,
|
|
10524
10929
|
{
|
|
10525
10930
|
...common,
|
|
@@ -10535,8 +10940,8 @@ function BookingIsland({
|
|
|
10535
10940
|
subtitle: qualifier ?? void 0,
|
|
10536
10941
|
pillCopy: { title: name, subtitle: BOOKING_COPY.editHolder },
|
|
10537
10942
|
actionLabel: BOOKING_COPY.editHolder,
|
|
10538
|
-
input: /* @__PURE__ */ (0,
|
|
10539
|
-
/* @__PURE__ */ (0,
|
|
10943
|
+
input: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "scopetickets-island-booking__form", children: [
|
|
10944
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10540
10945
|
TextField,
|
|
10541
10946
|
{
|
|
10542
10947
|
label: BOOKING_COPY.firstName,
|
|
@@ -10549,7 +10954,7 @@ function BookingIsland({
|
|
|
10549
10954
|
enterKeyHint: "next"
|
|
10550
10955
|
}
|
|
10551
10956
|
),
|
|
10552
|
-
/* @__PURE__ */ (0,
|
|
10957
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10553
10958
|
TextField,
|
|
10554
10959
|
{
|
|
10555
10960
|
label: BOOKING_COPY.lastName,
|
|
@@ -10562,7 +10967,7 @@ function BookingIsland({
|
|
|
10562
10967
|
enterKeyHint: "next"
|
|
10563
10968
|
}
|
|
10564
10969
|
),
|
|
10565
|
-
/* @__PURE__ */ (0,
|
|
10970
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10566
10971
|
TextField,
|
|
10567
10972
|
{
|
|
10568
10973
|
label: BOOKING_COPY.email,
|
|
@@ -10617,7 +11022,7 @@ function indexOfTicket(tickets, key) {
|
|
|
10617
11022
|
}
|
|
10618
11023
|
function holderFace(holder, { size: size2 = 10, accessory, transitionKey } = {}) {
|
|
10619
11024
|
if (holder.photo === null) return void 0;
|
|
10620
|
-
return /* @__PURE__ */ (0,
|
|
11025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10621
11026
|
import_avatar4.Avatar,
|
|
10622
11027
|
{
|
|
10623
11028
|
subject: { kind: "user", avatar: holder.photo, alt: "" },
|
|
@@ -10636,13 +11041,13 @@ var import_icons14 = require("@scopetickets/icons");
|
|
|
10636
11041
|
var import_react32 = require("react");
|
|
10637
11042
|
|
|
10638
11043
|
// src/island/CalendarMonthHeading.tsx
|
|
10639
|
-
var
|
|
11044
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
10640
11045
|
function CalendarMonthHeading({ month }) {
|
|
10641
|
-
return /* @__PURE__ */ (0,
|
|
11046
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h3", { className: "scopetickets-island-calendar__heading", children: formatMonthName(month) });
|
|
10642
11047
|
}
|
|
10643
11048
|
|
|
10644
11049
|
// src/island/CalendarDayIndicator.tsx
|
|
10645
|
-
var
|
|
11050
|
+
var import_jsx_runtime39 = (
|
|
10646
11051
|
// DECORATIVE, and now correctly so.
|
|
10647
11052
|
require("react/jsx-runtime")
|
|
10648
11053
|
);
|
|
@@ -10654,20 +11059,20 @@ var FILLED_SEGMENTS = {
|
|
|
10654
11059
|
};
|
|
10655
11060
|
function CalendarDayIndicator({ level }) {
|
|
10656
11061
|
const filled = FILLED_SEGMENTS[level];
|
|
10657
|
-
return /* @__PURE__ */ (0,
|
|
10658
|
-
/* @__PURE__ */ (0,
|
|
11062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "scopetickets-island-day-indicator", "aria-hidden": "true", children: [
|
|
11063
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
10659
11064
|
"span",
|
|
10660
11065
|
{
|
|
10661
11066
|
className: `scopetickets-island-day-indicator__fill scopetickets-island-day-indicator__fill--${level.toLowerCase()}`,
|
|
10662
11067
|
style: { flexGrow: filled }
|
|
10663
11068
|
}
|
|
10664
11069
|
),
|
|
10665
|
-
filled < SEGMENTS ? /* @__PURE__ */ (0,
|
|
11070
|
+
filled < SEGMENTS ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { style: { flexGrow: SEGMENTS - filled } }) : null
|
|
10666
11071
|
] });
|
|
10667
11072
|
}
|
|
10668
11073
|
|
|
10669
11074
|
// src/island/CalendarDay.tsx
|
|
10670
|
-
var
|
|
11075
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
10671
11076
|
function CalendarDay({
|
|
10672
11077
|
cell,
|
|
10673
11078
|
accessory,
|
|
@@ -10679,10 +11084,10 @@ function CalendarDay({
|
|
|
10679
11084
|
const press = useIslandPress("element");
|
|
10680
11085
|
const dimmed = outsideMonth ? { "data-outside-month": "" } : null;
|
|
10681
11086
|
if (cell.kind === "EMPTY") {
|
|
10682
|
-
return /* @__PURE__ */ (0,
|
|
11087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "scopetickets-island-day", "aria-hidden": "true" });
|
|
10683
11088
|
}
|
|
10684
11089
|
if (isSelectableCalendarCell(cell)) {
|
|
10685
|
-
return /* @__PURE__ */ (0,
|
|
11090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10686
11091
|
CalendarDayButton,
|
|
10687
11092
|
{
|
|
10688
11093
|
cell,
|
|
@@ -10696,7 +11101,7 @@ function CalendarDay({
|
|
|
10696
11101
|
);
|
|
10697
11102
|
}
|
|
10698
11103
|
if (cell.kind === "UNAVAILABLE") {
|
|
10699
|
-
return /* @__PURE__ */ (0,
|
|
11104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10700
11105
|
CalendarDayButton,
|
|
10701
11106
|
{
|
|
10702
11107
|
cell,
|
|
@@ -10708,7 +11113,7 @@ function CalendarDay({
|
|
|
10708
11113
|
}
|
|
10709
11114
|
);
|
|
10710
11115
|
}
|
|
10711
|
-
return /* @__PURE__ */ (0,
|
|
11116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "scopetickets-island-day", ...dimmed, ...press, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "scopetickets-island-day__well", "data-state": cell.kind, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "scopetickets-island-day__number", children: cell.dayOfMonth }) }) });
|
|
10712
11117
|
}
|
|
10713
11118
|
function CalendarDayButton({
|
|
10714
11119
|
cell,
|
|
@@ -10721,7 +11126,7 @@ function CalendarDayButton({
|
|
|
10721
11126
|
}) {
|
|
10722
11127
|
const selected = cell.kind === "SELECTED";
|
|
10723
11128
|
const availability = readAvailability(remaining);
|
|
10724
|
-
return /* @__PURE__ */ (0,
|
|
11129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10725
11130
|
"button",
|
|
10726
11131
|
{
|
|
10727
11132
|
type: "button",
|
|
@@ -10732,17 +11137,17 @@ function CalendarDayButton({
|
|
|
10732
11137
|
"aria-label": availability === null ? label : `${label}, ${availability.announcement}`,
|
|
10733
11138
|
onClick: onSelect ? () => onSelect(cell.day) : void 0,
|
|
10734
11139
|
...press,
|
|
10735
|
-
children: /* @__PURE__ */ (0,
|
|
10736
|
-
/* @__PURE__ */ (0,
|
|
10737
|
-
cell.kind === "UNAVAILABLE" ? /* @__PURE__ */ (0,
|
|
10738
|
-
accessory === "LINE" && availability !== null ? /* @__PURE__ */ (0,
|
|
11140
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "scopetickets-island-day__well", "data-state": cell.kind, children: [
|
|
11141
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "scopetickets-island-day__number", children: cell.dayOfMonth }),
|
|
11142
|
+
cell.kind === "UNAVAILABLE" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "scopetickets-island-day__strike", "aria-hidden": "true" }) : null,
|
|
11143
|
+
accessory === "LINE" && availability !== null ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "scopetickets-island-day__accessory", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CalendarDayIndicator, { level: availability.level }) }) : null
|
|
10739
11144
|
] })
|
|
10740
11145
|
}
|
|
10741
11146
|
);
|
|
10742
11147
|
}
|
|
10743
11148
|
|
|
10744
11149
|
// src/island/CalendarRunGrid.tsx
|
|
10745
|
-
var
|
|
11150
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
10746
11151
|
function CalendarRunGrid({
|
|
10747
11152
|
series,
|
|
10748
11153
|
weeks,
|
|
@@ -10753,10 +11158,10 @@ function CalendarRunGrid({
|
|
|
10753
11158
|
selectedDay,
|
|
10754
11159
|
onSelectDay
|
|
10755
11160
|
}) {
|
|
10756
|
-
return /* @__PURE__ */ (0,
|
|
11161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "scopetickets-island-calendar__grid", children: weeks.map((weekStart) => (
|
|
10757
11162
|
// A presentational row: the seven columns are a layout, and announcing "row 3
|
|
10758
11163
|
// of 9" describes the grid rather than the run.
|
|
10759
|
-
/* @__PURE__ */ (0,
|
|
11164
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "scopetickets-island-calendar__week", children: buildWeekRow(series, weekStart, { today, selectedDay }).map((cell, dayIndex) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10760
11165
|
CalendarDay,
|
|
10761
11166
|
{
|
|
10762
11167
|
cell,
|
|
@@ -10773,7 +11178,7 @@ function CalendarRunGrid({
|
|
|
10773
11178
|
|
|
10774
11179
|
// src/island/CalendarScroller.tsx
|
|
10775
11180
|
var import_react31 = require("react");
|
|
10776
|
-
var
|
|
11181
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
10777
11182
|
var WHEEL_IDLE_MS = 200;
|
|
10778
11183
|
var CALENDAR_DRAG_SLOP = 4;
|
|
10779
11184
|
function CalendarScroller({
|
|
@@ -10911,7 +11316,7 @@ function CalendarScroller({
|
|
|
10911
11316
|
},
|
|
10912
11317
|
[]
|
|
10913
11318
|
);
|
|
10914
|
-
return /* @__PURE__ */ (0,
|
|
11319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
10915
11320
|
"div",
|
|
10916
11321
|
{
|
|
10917
11322
|
ref: viewportRef,
|
|
@@ -10928,8 +11333,8 @@ function CalendarScroller({
|
|
|
10928
11333
|
onPointerCancel,
|
|
10929
11334
|
onClickCapture,
|
|
10930
11335
|
children: [
|
|
10931
|
-
/* @__PURE__ */ (0,
|
|
10932
|
-
/* @__PURE__ */ (0,
|
|
11336
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "scopetickets-island-calendar-scroller__window", "aria-hidden": "true" }),
|
|
11337
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
10933
11338
|
"div",
|
|
10934
11339
|
{
|
|
10935
11340
|
ref: trackRef,
|
|
@@ -10947,17 +11352,17 @@ function CalendarScroller({
|
|
|
10947
11352
|
}
|
|
10948
11353
|
|
|
10949
11354
|
// src/island/CalendarWeekdayNames.tsx
|
|
10950
|
-
var
|
|
11355
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
10951
11356
|
var WEEKDAY_NAMES = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
|
|
10952
11357
|
function CalendarWeekdayNames() {
|
|
10953
11358
|
return (
|
|
10954
11359
|
// `aria-hidden`, and it is not a shortcut.
|
|
10955
|
-
/* @__PURE__ */ (0,
|
|
11360
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "scopetickets-island-calendar__weekdays", "aria-hidden": "true", children: WEEKDAY_NAMES.map((name) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "scopetickets-island-calendar__weekday", children: name }, name)) })
|
|
10956
11361
|
);
|
|
10957
11362
|
}
|
|
10958
11363
|
|
|
10959
11364
|
// src/island/DayPicker.tsx
|
|
10960
|
-
var
|
|
11365
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
10961
11366
|
function DayPicker({
|
|
10962
11367
|
series,
|
|
10963
11368
|
today,
|
|
@@ -10990,10 +11395,10 @@ function DayPicker({
|
|
|
10990
11395
|
[starts, currentMonth, onSelectDay]
|
|
10991
11396
|
);
|
|
10992
11397
|
if (weeks.length === 0) return null;
|
|
10993
|
-
return /* @__PURE__ */ (0,
|
|
10994
|
-
currentMonth !== null && /* @__PURE__ */ (0,
|
|
10995
|
-
/* @__PURE__ */ (0,
|
|
10996
|
-
/* @__PURE__ */ (0,
|
|
11398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "scopetickets-island-calendar", "data-accessory": accessory, children: [
|
|
11399
|
+
currentMonth !== null && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CalendarMonthHeading, { month: currentMonth }),
|
|
11400
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CalendarWeekdayNames, {}),
|
|
11401
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
10997
11402
|
CalendarScroller,
|
|
10998
11403
|
{
|
|
10999
11404
|
rowCount: weeks.length,
|
|
@@ -11001,7 +11406,7 @@ function DayPicker({
|
|
|
11001
11406
|
onRowChange: setRow,
|
|
11002
11407
|
onRowPreview: setShownRow,
|
|
11003
11408
|
label: "Weeks of the run",
|
|
11004
|
-
children: /* @__PURE__ */ (0,
|
|
11409
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
11005
11410
|
CalendarRunGrid,
|
|
11006
11411
|
{
|
|
11007
11412
|
series,
|
|
@@ -11024,7 +11429,7 @@ var import_react35 = require("react");
|
|
|
11024
11429
|
|
|
11025
11430
|
// src/island/CalendarWeekSection.tsx
|
|
11026
11431
|
var import_react33 = require("react");
|
|
11027
|
-
var
|
|
11432
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
11028
11433
|
function CalendarWeekSection({
|
|
11029
11434
|
series,
|
|
11030
11435
|
today,
|
|
@@ -11079,16 +11484,16 @@ function CalendarWeekSection({
|
|
|
11079
11484
|
);
|
|
11080
11485
|
}, [weeks.length, visibleWeek, selectedWeek, selectedDay, onVisibleMonthChange]);
|
|
11081
11486
|
if (weeks.length === 0) return null;
|
|
11082
|
-
return /* @__PURE__ */ (0,
|
|
11083
|
-
/* @__PURE__ */ (0,
|
|
11084
|
-
/* @__PURE__ */ (0,
|
|
11487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "scopetickets-island-week", children: [
|
|
11488
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CalendarWeekdayNames, {}),
|
|
11489
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "scopetickets-island-week__pager", ref: pagerRef, onScroll: paint, children: weeks.map((weekStart, index) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
11085
11490
|
"div",
|
|
11086
11491
|
{
|
|
11087
11492
|
className: "scopetickets-island-week__page",
|
|
11088
11493
|
ref: (node) => {
|
|
11089
11494
|
pageRefs.current[index] = node;
|
|
11090
11495
|
},
|
|
11091
|
-
children: /* @__PURE__ */ (0,
|
|
11496
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "scopetickets-island-week__row", children: buildWeekRow(series, weekStart, { today, selectedDay }).map((cell, dayIndex) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
11092
11497
|
CalendarDay,
|
|
11093
11498
|
{
|
|
11094
11499
|
cell,
|
|
@@ -11106,14 +11511,14 @@ function CalendarWeekSection({
|
|
|
11106
11511
|
}
|
|
11107
11512
|
|
|
11108
11513
|
// src/island/SelectedDayHeading.tsx
|
|
11109
|
-
var
|
|
11514
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
11110
11515
|
function SelectedDayHeading({ day }) {
|
|
11111
|
-
return /* @__PURE__ */ (0,
|
|
11112
|
-
/* @__PURE__ */ (0,
|
|
11516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("h3", { className: "scopetickets-island-day-heading", children: [
|
|
11517
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "scopetickets-island-day-heading__weekday", children: [
|
|
11113
11518
|
formatDayWeekday(day),
|
|
11114
11519
|
","
|
|
11115
11520
|
] }),
|
|
11116
|
-
/* @__PURE__ */ (0,
|
|
11521
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "scopetickets-island-day-heading__date", children: formatDayDate(day) })
|
|
11117
11522
|
] });
|
|
11118
11523
|
}
|
|
11119
11524
|
|
|
@@ -11121,7 +11526,7 @@ function SelectedDayHeading({ day }) {
|
|
|
11121
11526
|
var import_react34 = require("react");
|
|
11122
11527
|
|
|
11123
11528
|
// src/island/Timeslot.tsx
|
|
11124
|
-
var
|
|
11529
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
11125
11530
|
var REMAINING_SIZE = "var(--scopetickets-island-space-4)";
|
|
11126
11531
|
var SELECTED_ARC = "var(--scopetickets-island-timeslot-ring-selected)";
|
|
11127
11532
|
var TRACK = "var(--scopetickets-island-timeslot-track)";
|
|
@@ -11129,16 +11534,16 @@ var SELECTED_TRACK = "var(--scopetickets-island-timeslot-track-selected)";
|
|
|
11129
11534
|
var SOLD_OUT = "Sold Out";
|
|
11130
11535
|
function Timeslot({ cell, accessory, onSelect }) {
|
|
11131
11536
|
if (isDatePickerCellSelectable(cell.state)) {
|
|
11132
|
-
return /* @__PURE__ */ (0,
|
|
11537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TimeslotButton, { cell, accessory, onSelect });
|
|
11133
11538
|
}
|
|
11134
|
-
return /* @__PURE__ */ (0,
|
|
11539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TimeslotFixed, { cell });
|
|
11135
11540
|
}
|
|
11136
11541
|
function TimeslotRow({ cell }) {
|
|
11137
|
-
return /* @__PURE__ */ (0,
|
|
11138
|
-
/* @__PURE__ */ (0,
|
|
11139
|
-
cell.slot.endTime === null ? null : /* @__PURE__ */ (0,
|
|
11140
|
-
/* @__PURE__ */ (0,
|
|
11141
|
-
/* @__PURE__ */ (0,
|
|
11542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "scopetickets-island-timeslot__times", children: [
|
|
11543
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "scopetickets-island-timeslot__time", children: cell.slot.startTime }),
|
|
11544
|
+
cell.slot.endTime === null ? null : /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
11545
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "scopetickets-island-timeslot__dash", "aria-hidden": "true", children: "-" }),
|
|
11546
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "scopetickets-island-timeslot__time", children: cell.slot.endTime })
|
|
11142
11547
|
] }),
|
|
11143
11548
|
cell.state === "UNAVAILABLE" ? (
|
|
11144
11549
|
/*
|
|
@@ -11149,8 +11554,8 @@ function TimeslotRow({ cell }) {
|
|
|
11149
11554
|
* merely BEGUN keeps its ring — it still has seats, and "Sold Out" over them
|
|
11150
11555
|
* would be false.
|
|
11151
11556
|
*/
|
|
11152
|
-
/* @__PURE__ */ (0,
|
|
11153
|
-
) : cell.slot.remaining === null ? null : /* @__PURE__ */ (0,
|
|
11557
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "scopetickets-island-timeslot__soldout", children: SOLD_OUT })
|
|
11558
|
+
) : cell.slot.remaining === null ? null : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "scopetickets-island-timeslot__remaining", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
11154
11559
|
CounterRing,
|
|
11155
11560
|
{
|
|
11156
11561
|
progress: cell.slot.remaining,
|
|
@@ -11169,7 +11574,7 @@ function TimeslotButton({ cell, accessory, onSelect }) {
|
|
|
11169
11574
|
const press = useIslandPress("element");
|
|
11170
11575
|
const selected = cell.state === "SELECTED";
|
|
11171
11576
|
const availability = readAvailability(cell.slot.remaining);
|
|
11172
|
-
return /* @__PURE__ */ (0,
|
|
11577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
11173
11578
|
"button",
|
|
11174
11579
|
{
|
|
11175
11580
|
type: "button",
|
|
@@ -11178,23 +11583,23 @@ function TimeslotButton({ cell, accessory, onSelect }) {
|
|
|
11178
11583
|
"aria-label": timeslotLabel(cell, availability?.announcement ?? null),
|
|
11179
11584
|
onClick: () => onSelect(cell.slot.startTime),
|
|
11180
11585
|
...press,
|
|
11181
|
-
children: /* @__PURE__ */ (0,
|
|
11182
|
-
/* @__PURE__ */ (0,
|
|
11183
|
-
accessory === "LINE" && availability !== null ? /* @__PURE__ */ (0,
|
|
11586
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "scopetickets-island-timeslot__pill", "data-state": cell.state, children: [
|
|
11587
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TimeslotRow, { cell }),
|
|
11588
|
+
accessory === "LINE" && availability !== null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "scopetickets-island-timeslot__accessory", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(CalendarDayIndicator, { level: availability.level }) }) : null
|
|
11184
11589
|
] })
|
|
11185
11590
|
}
|
|
11186
11591
|
);
|
|
11187
11592
|
}
|
|
11188
11593
|
function TimeslotFixed({ cell }) {
|
|
11189
|
-
return /* @__PURE__ */ (0,
|
|
11594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "scopetickets-island-timeslot", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "scopetickets-island-timeslot__pill", "data-state": cell.state, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TimeslotRow, { cell }) }) });
|
|
11190
11595
|
}
|
|
11191
11596
|
|
|
11192
11597
|
// src/island/TimeslotGroupSection.tsx
|
|
11193
|
-
var
|
|
11598
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
11194
11599
|
function TimeslotGroupSection({ group, accessory, onSelect }) {
|
|
11195
|
-
return /* @__PURE__ */ (0,
|
|
11196
|
-
group.label === null ? null : /* @__PURE__ */ (0,
|
|
11197
|
-
/* @__PURE__ */ (0,
|
|
11600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("section", { className: "scopetickets-island-timeslots__group", children: [
|
|
11601
|
+
group.label === null ? null : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h4", { className: "scopetickets-island-timeslots__label", children: group.label }),
|
|
11602
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "scopetickets-island-timeslots__list", children: group.cells.map((cell, index) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11198
11603
|
Timeslot,
|
|
11199
11604
|
{
|
|
11200
11605
|
cell,
|
|
@@ -11207,7 +11612,7 @@ function TimeslotGroupSection({ group, accessory, onSelect }) {
|
|
|
11207
11612
|
}
|
|
11208
11613
|
|
|
11209
11614
|
// src/island/TimeslotPicker.tsx
|
|
11210
|
-
var
|
|
11615
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
11211
11616
|
function TimeslotPicker({
|
|
11212
11617
|
slots,
|
|
11213
11618
|
selection,
|
|
@@ -11221,7 +11626,7 @@ function TimeslotPicker({
|
|
|
11221
11626
|
() => buildTimeslotGroups(slots, { selection, today, nowTime, grouping }),
|
|
11222
11627
|
[slots, selection, today, nowTime, grouping]
|
|
11223
11628
|
);
|
|
11224
|
-
return /* @__PURE__ */ (0,
|
|
11629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "scopetickets-island-timeslots", children: groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11225
11630
|
TimeslotGroupSection,
|
|
11226
11631
|
{
|
|
11227
11632
|
group,
|
|
@@ -11276,7 +11681,7 @@ function reduceDaySwap(state, event) {
|
|
|
11276
11681
|
}
|
|
11277
11682
|
|
|
11278
11683
|
// src/island/TimePicker.tsx
|
|
11279
|
-
var
|
|
11684
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
11280
11685
|
function TimePicker({
|
|
11281
11686
|
series,
|
|
11282
11687
|
today,
|
|
@@ -11301,8 +11706,8 @@ function TimePicker({
|
|
|
11301
11706
|
}
|
|
11302
11707
|
};
|
|
11303
11708
|
const shownSelection = swap.shown.day === selection.day ? selection : { day: swap.shown.day, startTime: null };
|
|
11304
|
-
return /* @__PURE__ */ (0,
|
|
11305
|
-
/* @__PURE__ */ (0,
|
|
11709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "scopetickets-island-time", "data-accessory": accessory, children: [
|
|
11710
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
11306
11711
|
CalendarWeekSection,
|
|
11307
11712
|
{
|
|
11308
11713
|
series,
|
|
@@ -11314,7 +11719,7 @@ function TimePicker({
|
|
|
11314
11719
|
onVisibleMonthChange
|
|
11315
11720
|
}
|
|
11316
11721
|
),
|
|
11317
|
-
/* @__PURE__ */ (0,
|
|
11722
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
11318
11723
|
"div",
|
|
11319
11724
|
{
|
|
11320
11725
|
className: "scopetickets-island-time__swap",
|
|
@@ -11322,8 +11727,8 @@ function TimePicker({
|
|
|
11322
11727
|
style: swap.phase === "REST" ? void 0 : { "--scopetickets-island-swap-sign": swap.sign },
|
|
11323
11728
|
onAnimationEnd: onSwapAnimationEnd,
|
|
11324
11729
|
children: [
|
|
11325
|
-
/* @__PURE__ */ (0,
|
|
11326
|
-
/* @__PURE__ */ (0,
|
|
11730
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectedDayHeading, { day: swap.shown.day }),
|
|
11731
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
11327
11732
|
TimeslotPicker,
|
|
11328
11733
|
{
|
|
11329
11734
|
slots: swap.shown.slots,
|
|
@@ -11342,7 +11747,7 @@ function TimePicker({
|
|
|
11342
11747
|
|
|
11343
11748
|
// src/island/IslandPaymentFrame.tsx
|
|
11344
11749
|
var import_react36 = require("react");
|
|
11345
|
-
var
|
|
11750
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
11346
11751
|
var MOUNTING_HEIGHT = 280;
|
|
11347
11752
|
var HEIGHT_WAIT_MS = 6e3;
|
|
11348
11753
|
var CART_NOT_FOUND = /cart was not found/i;
|
|
@@ -11510,7 +11915,7 @@ function IslandPaymentFrame({
|
|
|
11510
11915
|
deliveredCancelRef.current = cancelSignal;
|
|
11511
11916
|
post(buildCancelRequestedMessage(identity));
|
|
11512
11917
|
}, [cancelSignal, active, identity, post]);
|
|
11513
|
-
return /* @__PURE__ */ (0,
|
|
11918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11514
11919
|
"iframe",
|
|
11515
11920
|
{
|
|
11516
11921
|
ref: frame,
|
|
@@ -11623,7 +12028,7 @@ function signalProviderReturn(payload) {
|
|
|
11623
12028
|
}
|
|
11624
12029
|
|
|
11625
12030
|
// src/island/ScopeTicketsCheckout.tsx
|
|
11626
|
-
var
|
|
12031
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
11627
12032
|
var PROVIDER_BUTTON_HEIGHT = 52;
|
|
11628
12033
|
var CONFIRMS_ADDRESS = ACCOUNT_CREATION_ORDER[ACCOUNT_CREATION_ORDER.indexOf("CONFIRM_EMAIL") + 1];
|
|
11629
12034
|
var NOTHING_COLLECTED = {
|
|
@@ -11697,7 +12102,7 @@ function ScopeTicketsCheckout({
|
|
|
11697
12102
|
const [opensAt, setOpensAt] = (0, import_react37.useState)(null);
|
|
11698
12103
|
const [booked, setBooked] = (0, import_react37.useState)(null);
|
|
11699
12104
|
const auth = useAuthSession(seed);
|
|
11700
|
-
const face = booked !== null ? /* @__PURE__ */ (0,
|
|
12105
|
+
const face = booked !== null ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11701
12106
|
BookingIsland,
|
|
11702
12107
|
{
|
|
11703
12108
|
appKey: props.appKey,
|
|
@@ -11709,11 +12114,12 @@ function ScopeTicketsCheckout({
|
|
|
11709
12114
|
buyerAvatar: buyerAvatarValue(auth.session.auth),
|
|
11710
12115
|
buyerAvatarAssets: avatarAssetsFor(defaultProfilePhotos(props.source?.environment)),
|
|
11711
12116
|
mode: props.mode,
|
|
11712
|
-
align: props.align
|
|
12117
|
+
align: props.align,
|
|
12118
|
+
placement: props.placement
|
|
11713
12119
|
}
|
|
11714
12120
|
) : (
|
|
11715
12121
|
/* Nothing to sell, so nothing to check out: the account card, and no cart face. */
|
|
11716
|
-
intent === void 0 ? /* @__PURE__ */ (0,
|
|
12122
|
+
intent === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(RestingIsland, { ...props, auth }) : opensOn === "cart" && opensAt === null ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(RestingIsland, { ...props, auth, intent, onCheckOut: setOpensAt }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11717
12123
|
PurchaseIsland,
|
|
11718
12124
|
{
|
|
11719
12125
|
...props,
|
|
@@ -11724,7 +12130,7 @@ function ScopeTicketsCheckout({
|
|
|
11724
12130
|
}
|
|
11725
12131
|
)
|
|
11726
12132
|
);
|
|
11727
|
-
return /* @__PURE__ */ (0,
|
|
12133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(IslandContinuityContext.Provider, { value: CHECKOUT_CONTINUITY, children: face });
|
|
11728
12134
|
}
|
|
11729
12135
|
function PurchaseIsland({
|
|
11730
12136
|
appKey,
|
|
@@ -11743,8 +12149,10 @@ function PurchaseIsland({
|
|
|
11743
12149
|
simulate = false,
|
|
11744
12150
|
onCommit,
|
|
11745
12151
|
initialPresentation = "card",
|
|
12152
|
+
openingLabel,
|
|
11746
12153
|
mode = "system",
|
|
11747
12154
|
align = "bottom",
|
|
12155
|
+
placement = "page",
|
|
11748
12156
|
opensAt,
|
|
11749
12157
|
onPlaced
|
|
11750
12158
|
}) {
|
|
@@ -11808,7 +12216,16 @@ function PurchaseIsland({
|
|
|
11808
12216
|
[userTypes, fetched.userTypes, partyAsking]
|
|
11809
12217
|
);
|
|
11810
12218
|
const standing = (0, import_react37.useMemo)(() => foldIntent(intent, collected), [intent, collected]);
|
|
12219
|
+
const [walkQuestionnaire, setWalkQuestionnaire] = (0, import_react37.useState)({ hasCart: false, load: { status: "IDLE" } });
|
|
12220
|
+
const walkQuestions = (0, import_react37.useMemo)(
|
|
12221
|
+
() => questionsInHand(fetched.questions, walkQuestionnaire.load, walkQuestionnaire.hasCart),
|
|
12222
|
+
[fetched.questions, walkQuestionnaire]
|
|
12223
|
+
);
|
|
11811
12224
|
const orderedBuyer = (0, import_react37.useMemo)(() => orderBuyer(standing, session.auth), [standing, session.auth]);
|
|
12225
|
+
const answersInHand = (0, import_react37.useMemo)(
|
|
12226
|
+
() => ({ ...hostAnswers(intent?.answers), ...collected.answers }),
|
|
12227
|
+
[intent?.answers, collected.answers]
|
|
12228
|
+
);
|
|
11812
12229
|
const situation = (0, import_react37.useMemo)(
|
|
11813
12230
|
() => ({
|
|
11814
12231
|
name: "The host composes what it holds",
|
|
@@ -11829,12 +12246,13 @@ function PurchaseIsland({
|
|
|
11829
12246
|
*/
|
|
11830
12247
|
excused: [
|
|
11831
12248
|
...excusedByIntent(
|
|
11832
|
-
|
|
11833
|
-
|
|
11834
|
-
|
|
11835
|
-
|
|
11836
|
-
|
|
11837
|
-
|
|
12249
|
+
// Unknown or failed questions keep the step.
|
|
12250
|
+
walkQuestions.status !== "READY" || walkQuestions.questions.length > 0 ? {
|
|
12251
|
+
...intent,
|
|
12252
|
+
asksQuestions: true,
|
|
12253
|
+
// Host answers skip the step only if they cover every question.
|
|
12254
|
+
answers: walkQuestions.status === "READY" && !questionsAnswered(walkQuestions.questions, hostAnswers(intent.answers)) ? void 0 : intent.answers
|
|
12255
|
+
} : intent
|
|
11838
12256
|
),
|
|
11839
12257
|
/*
|
|
11840
12258
|
* AND A RUN THAT SELLS NO SESSIONS IS NOT ASKED FOR ONE. `HasTimeslot` is the
|
|
@@ -11855,7 +12273,7 @@ function PurchaseIsland({
|
|
|
11855
12273
|
savedPaymentMethod: intent.paymentMethodKey !== void 0,
|
|
11856
12274
|
devicePasskey: false
|
|
11857
12275
|
}),
|
|
11858
|
-
[intent,
|
|
12276
|
+
[intent, walkQuestions, fetched.hasTimeslots, photos.length]
|
|
11859
12277
|
);
|
|
11860
12278
|
const [accountChosen, setAccountChosen] = (0, import_react37.useState)(false);
|
|
11861
12279
|
const [passwordRevealed, setPasswordRevealed] = (0, import_react37.useState)(false);
|
|
@@ -11961,6 +12379,19 @@ function PurchaseIsland({
|
|
|
11961
12379
|
*/
|
|
11962
12380
|
userTypeNames2
|
|
11963
12381
|
);
|
|
12382
|
+
const questionnaire = (0, import_react37.useMemo)(
|
|
12383
|
+
() => questionsInHand(fetched.questions, order.eventQuestions, order.cart !== null),
|
|
12384
|
+
[fetched.questions, order.eventQuestions, order.cart]
|
|
12385
|
+
);
|
|
12386
|
+
const answersReady = questionnaire.status === "READY" && questionsAnswered(questionnaire.questions, answersInHand);
|
|
12387
|
+
const answersSaved = answersLocked(order.answers);
|
|
12388
|
+
(0, import_react37.useEffect)(() => {
|
|
12389
|
+
setWalkQuestionnaire({ hasCart: order.cart !== null, load: order.eventQuestions });
|
|
12390
|
+
}, [order.cart, order.eventQuestions]);
|
|
12391
|
+
const saveForCharge = (0, import_react37.useCallback)(
|
|
12392
|
+
() => questionnaire.status !== "READY" || !answersReady ? Promise.resolve(false) : order.saveAnswers(questionnaire.questions, answersInHand).then((saved) => saved && order.saveBuyer(buyerDetails(orderedBuyer))),
|
|
12393
|
+
[order, questionnaire, answersReady, answersInHand, orderedBuyer]
|
|
12394
|
+
);
|
|
11964
12395
|
(0, import_react37.useEffect)(() => {
|
|
11965
12396
|
if (order.fill.status !== "FAILED" || typeof console === "undefined") return;
|
|
11966
12397
|
console.warn(
|
|
@@ -12034,6 +12465,11 @@ function PurchaseIsland({
|
|
|
12034
12465
|
const index = Math.min(Math.max(from, floor), last);
|
|
12035
12466
|
const walked = walk.stops[index]?.step ?? "REVIEW";
|
|
12036
12467
|
const stepId = detour ?? (outcome?.kind === "FAILED" ? "PAYMENT_FAILED" : walked);
|
|
12468
|
+
(0, import_react37.useEffect)(() => {
|
|
12469
|
+
if (questionnaire.status !== "READY" || answersReady || floor > 0) return;
|
|
12470
|
+
const details = walk.stops.findIndex((stop) => stop.step === "DETAILS");
|
|
12471
|
+
if (details !== -1 && from > details) setAt("DETAILS");
|
|
12472
|
+
}, [questionnaire.status, answersReady, floor, walk.stops, from]);
|
|
12037
12473
|
const passkeyRegistration = usePasskeyRegistration(accounts, stepId === "PASSKEY");
|
|
12038
12474
|
const step = purchaseStep(stepId);
|
|
12039
12475
|
const ratedTicket = outcome?.kind === "PLACED" ? outcome.attendeeTicketKey : void 0;
|
|
@@ -12095,7 +12531,7 @@ function PurchaseIsland({
|
|
|
12095
12531
|
setRevolutCart(key);
|
|
12096
12532
|
setSavedRevolutCart(null);
|
|
12097
12533
|
}
|
|
12098
|
-
void
|
|
12534
|
+
void saveForCharge().then((saved) => {
|
|
12099
12535
|
if (!saved || selectionRequest.current !== request) return;
|
|
12100
12536
|
if (wallet) setSavedWalletCart(key);
|
|
12101
12537
|
else setSavedRevolutCart(key);
|
|
@@ -12114,7 +12550,7 @@ function PurchaseIsland({
|
|
|
12114
12550
|
const funnel = useAuthFunnel(signIns, auth);
|
|
12115
12551
|
useSessionGuard(client, auth);
|
|
12116
12552
|
const raised = (0, import_react37.useMemo)(
|
|
12117
|
-
() => raiseFor(order.fill) ?? raiseForAccount(accountFlow.progress, accountFlow.outcome) ?? raiseForSignIn(signIn2.state, funnel.state) ?? /*
|
|
12553
|
+
() => raiseFor(order.fill) ?? raiseForQuestions(order.eventQuestions) ?? raiseForAnswers(order.answers) ?? raiseForAccount(accountFlow.progress, accountFlow.outcome) ?? raiseForSignIn(signIn2.state, funnel.state) ?? /*
|
|
12118
12554
|
* THE RATING LAST, because it is the least of them. Everything above is about the
|
|
12119
12555
|
* order or the way into an account; a rating that did not send is news about a
|
|
12120
12556
|
* courtesy, and a buyer holding both should be told about the one that matters.
|
|
@@ -12122,6 +12558,8 @@ function PurchaseIsland({
|
|
|
12122
12558
|
raiseForFeedback(feedback.submission),
|
|
12123
12559
|
[
|
|
12124
12560
|
order.fill,
|
|
12561
|
+
order.eventQuestions,
|
|
12562
|
+
order.answers,
|
|
12125
12563
|
accountFlow.progress,
|
|
12126
12564
|
accountFlow.outcome,
|
|
12127
12565
|
signIn2.state,
|
|
@@ -12141,6 +12579,15 @@ function PurchaseIsland({
|
|
|
12141
12579
|
if (raised?.id === "SIGN_IN_NOT_COMPLETED") signIn2.retry();
|
|
12142
12580
|
if (raised?.id === "SIGN_IN_UNREACHABLE") funnel.open(standing.buyer?.email ?? "");
|
|
12143
12581
|
if (raised?.id === "FEEDBACK_NOT_SENT") feedback.retry();
|
|
12582
|
+
if (raised?.id === "QUESTIONS_NOT_LOADED") order.retryEventQuestions();
|
|
12583
|
+
if (raised?.id === "ANSWERS_NOT_SAVED") {
|
|
12584
|
+
const key = order.cart?.Key;
|
|
12585
|
+
void saveForCharge().then((saved) => {
|
|
12586
|
+
if (!saved || key === void 0) return;
|
|
12587
|
+
setSavedRevolutCart(key);
|
|
12588
|
+
setSavedWalletCart(key);
|
|
12589
|
+
});
|
|
12590
|
+
}
|
|
12144
12591
|
if (raised?.id === "ACCOUNT_NOT_CREATED") {
|
|
12145
12592
|
accountFlow.create(
|
|
12146
12593
|
{
|
|
@@ -12164,7 +12611,9 @@ function PurchaseIsland({
|
|
|
12164
12611
|
collected.firstName,
|
|
12165
12612
|
collected.lastName,
|
|
12166
12613
|
collected.phone,
|
|
12167
|
-
walk.stops
|
|
12614
|
+
walk.stops,
|
|
12615
|
+
saveForCharge,
|
|
12616
|
+
order
|
|
12168
12617
|
]
|
|
12169
12618
|
);
|
|
12170
12619
|
const forward = (0, import_react37.useCallback)(() => {
|
|
@@ -12340,7 +12789,7 @@ function PurchaseIsland({
|
|
|
12340
12789
|
}
|
|
12341
12790
|
if (action.pays === true) {
|
|
12342
12791
|
return () => {
|
|
12343
|
-
void
|
|
12792
|
+
void saveForCharge().then((saved) => {
|
|
12344
12793
|
if (!saved) return;
|
|
12345
12794
|
setSubmitSignal((was) => was + 1);
|
|
12346
12795
|
});
|
|
@@ -12360,7 +12809,7 @@ function PurchaseIsland({
|
|
|
12360
12809
|
detour,
|
|
12361
12810
|
forward,
|
|
12362
12811
|
order,
|
|
12363
|
-
|
|
12812
|
+
saveForCharge,
|
|
12364
12813
|
walletCharging,
|
|
12365
12814
|
/* The funnel's prefill is the address TYPED, not the order's — see its press below. */
|
|
12366
12815
|
standing.buyer?.email,
|
|
@@ -12600,20 +13049,20 @@ function PurchaseIsland({
|
|
|
12600
13049
|
};
|
|
12601
13050
|
(0, import_react37.useEffect)(() => {
|
|
12602
13051
|
const key = order.cart?.Key;
|
|
12603
|
-
if (stepId !== "REVIEW" || key === void 0 || revolutCart === key) return;
|
|
13052
|
+
if (stepId !== "REVIEW" || key === void 0 || revolutCart === key || !answersReady) return;
|
|
12604
13053
|
setRevolutCart(key);
|
|
12605
13054
|
setWalletCart(key);
|
|
12606
13055
|
const request = ++selectionRequest.current;
|
|
12607
|
-
void
|
|
13056
|
+
void saveForCharge().then((saved) => {
|
|
12608
13057
|
if (!saved || selectionRequest.current !== request) return;
|
|
12609
13058
|
setSavedRevolutCart(key);
|
|
12610
13059
|
setSavedWalletCart(key);
|
|
12611
13060
|
});
|
|
12612
|
-
}, [stepId, order.cart?.Key, revolutCart]);
|
|
13061
|
+
}, [stepId, order.cart?.Key, revolutCart, answersReady]);
|
|
12613
13062
|
const [cardStatus, setCardStatus] = (0, import_react37.useState)(null);
|
|
12614
13063
|
const checkoutSessionId = (0, import_react37.useMemo)(() => crypto.randomUUID(), [order.cart?.Key]);
|
|
12615
|
-
const payEntries = frameMounted ? /* @__PURE__ */ (0,
|
|
12616
|
-
/* @__PURE__ */ (0,
|
|
13064
|
+
const payEntries = frameMounted ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
13065
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "scopetickets-island-bay__field", hidden: !cardChosen || frameHeight === null, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12617
13066
|
IslandPaymentFrame,
|
|
12618
13067
|
{
|
|
12619
13068
|
hostUrl: ENVIRONMENT_URLS[source?.environment ?? "production"].paymentHostUrl,
|
|
@@ -12658,7 +13107,7 @@ function PurchaseIsland({
|
|
|
12658
13107
|
* dead attempt to resurrect. A cancel or a decline is the host's own
|
|
12659
13108
|
* cancellation housekeeping, which re-arms the button itself.
|
|
12660
13109
|
*/
|
|
12661
|
-
/* @__PURE__ */ (0,
|
|
13110
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: walletVisible ? void 0 : "scopetickets-island-bay__offstage", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12662
13111
|
IslandPaymentFrame,
|
|
12663
13112
|
{
|
|
12664
13113
|
hostUrl: ENVIRONMENT_URLS[source?.environment ?? "production"].paymentHostUrl,
|
|
@@ -12694,11 +13143,11 @@ function PurchaseIsland({
|
|
|
12694
13143
|
},
|
|
12695
13144
|
`wallet:${order.cart.Key}`
|
|
12696
13145
|
) }),
|
|
12697
|
-
revolutCart === order.cart.Key && /* @__PURE__ */ (0,
|
|
13146
|
+
revolutCart === order.cart.Key && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12698
13147
|
"div",
|
|
12699
13148
|
{
|
|
12700
13149
|
className: journeyInline && journeyFullscreen ? "scopetickets-island-bay__journey" : revolutVisible ? void 0 : "scopetickets-island-bay__offstage",
|
|
12701
|
-
children: /* @__PURE__ */ (0,
|
|
13150
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12702
13151
|
IslandPaymentFrame,
|
|
12703
13152
|
{
|
|
12704
13153
|
hostUrl: ENVIRONMENT_URLS[source?.environment ?? "production"].paymentHostUrl,
|
|
@@ -12740,15 +13189,16 @@ function PurchaseIsland({
|
|
|
12740
13189
|
}
|
|
12741
13190
|
)
|
|
12742
13191
|
] }) : null;
|
|
12743
|
-
const bay = frameMounted || bayOpen ? /* @__PURE__ */ (0,
|
|
13192
|
+
const bay = frameMounted || bayOpen ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "scopetickets-island-bay__buttons", children: payEntries }) : void 0;
|
|
12744
13193
|
if (notice !== null) {
|
|
12745
|
-
return /* @__PURE__ */ (0,
|
|
13194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12746
13195
|
CheckoutIsland,
|
|
12747
13196
|
{
|
|
12748
13197
|
mode,
|
|
12749
13198
|
align,
|
|
13199
|
+
placement,
|
|
12750
13200
|
contentKey: `NOTICE:${notice.id}`,
|
|
12751
|
-
avatar: /* @__PURE__ */ (0,
|
|
13201
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12752
13202
|
import_avatar5.Avatar,
|
|
12753
13203
|
{
|
|
12754
13204
|
subject: { kind: "user", avatar: heroAvatar, assets: avatarAssets },
|
|
@@ -12763,15 +13213,16 @@ function PurchaseIsland({
|
|
|
12763
13213
|
);
|
|
12764
13214
|
}
|
|
12765
13215
|
if (cartOpen && held !== void 0) {
|
|
12766
|
-
return /* @__PURE__ */ (0,
|
|
13216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12767
13217
|
CheckoutIsland,
|
|
12768
13218
|
{
|
|
12769
13219
|
mode,
|
|
12770
13220
|
align,
|
|
13221
|
+
placement,
|
|
12771
13222
|
contentKey: "CART",
|
|
12772
13223
|
bay,
|
|
12773
13224
|
bayVisible: false,
|
|
12774
|
-
avatar: /* @__PURE__ */ (0,
|
|
13225
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12775
13226
|
import_avatar5.Avatar,
|
|
12776
13227
|
{
|
|
12777
13228
|
subject: { kind: "user", avatar: heroAvatar, assets: avatarAssets },
|
|
@@ -12782,7 +13233,7 @@ function PurchaseIsland({
|
|
|
12782
13233
|
}
|
|
12783
13234
|
),
|
|
12784
13235
|
...cartViewProps(
|
|
12785
|
-
/* @__PURE__ */ (0,
|
|
13236
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12786
13237
|
CartLines,
|
|
12787
13238
|
{
|
|
12788
13239
|
lines: drawnCartLines,
|
|
@@ -12798,13 +13249,14 @@ function PurchaseIsland({
|
|
|
12798
13249
|
);
|
|
12799
13250
|
}
|
|
12800
13251
|
if (funnelOpen(funnel.state)) {
|
|
12801
|
-
return /* @__PURE__ */ (0,
|
|
13252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12802
13253
|
CheckoutIsland,
|
|
12803
13254
|
{
|
|
12804
13255
|
mode,
|
|
12805
13256
|
align,
|
|
13257
|
+
placement,
|
|
12806
13258
|
contentKey: "FUNNEL",
|
|
12807
|
-
avatar: /* @__PURE__ */ (0,
|
|
13259
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12808
13260
|
import_avatar5.Avatar,
|
|
12809
13261
|
{
|
|
12810
13262
|
subject: { kind: "user", avatar: heroAvatar, assets: avatarAssets },
|
|
@@ -12822,13 +13274,14 @@ function PurchaseIsland({
|
|
|
12822
13274
|
);
|
|
12823
13275
|
}
|
|
12824
13276
|
if (timedOut && expanded && drawnHold !== void 0) {
|
|
12825
|
-
return /* @__PURE__ */ (0,
|
|
13277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12826
13278
|
CheckoutIsland,
|
|
12827
13279
|
{
|
|
12828
13280
|
mode,
|
|
12829
13281
|
align,
|
|
13282
|
+
placement,
|
|
12830
13283
|
contentKey: "HOLD_TIMED_OUT",
|
|
12831
|
-
avatar: /* @__PURE__ */ (0,
|
|
13284
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12832
13285
|
import_avatar5.Avatar,
|
|
12833
13286
|
{
|
|
12834
13287
|
subject: { kind: "user", avatar: heroAvatar, assets: avatarAssets },
|
|
@@ -12843,7 +13296,7 @@ function PurchaseIsland({
|
|
|
12843
13296
|
);
|
|
12844
13297
|
}
|
|
12845
13298
|
const waitingOnPayment = stepId === "PROCESSING" && journey.kind === "unresolved" && !terminalPayment;
|
|
12846
|
-
const input = offersPasskeySignIn ? /* @__PURE__ */ (0,
|
|
13299
|
+
const input = offersPasskeySignIn ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12847
13300
|
PasskeyButton,
|
|
12848
13301
|
{
|
|
12849
13302
|
hostUrl: passkeyEnvironment.passkeyHostUrl,
|
|
@@ -12851,7 +13304,7 @@ function PurchaseIsland({
|
|
|
12851
13304
|
label: AUTH_COPY.USE_PASSKEY,
|
|
12852
13305
|
onResult: signIn2.onResult
|
|
12853
13306
|
}
|
|
12854
|
-
) : waitingOnPayment ? /* @__PURE__ */ (0,
|
|
13307
|
+
) : waitingOnPayment ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "scopetickets-island-payment-waiting", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12855
13308
|
ProcessingSlowIcon,
|
|
12856
13309
|
{
|
|
12857
13310
|
className: "scopetickets-island-payment-waiting-glyph",
|
|
@@ -12882,7 +13335,8 @@ function PurchaseIsland({
|
|
|
12882
13335
|
schedule: drawnSchedule,
|
|
12883
13336
|
onPartyRefused: setPartyRefused,
|
|
12884
13337
|
partyRefused,
|
|
12885
|
-
questions:
|
|
13338
|
+
questions: questionnaire.status === "READY" ? questionnaire.questions : [],
|
|
13339
|
+
answersLocked: answersSaved,
|
|
12886
13340
|
follow: fetched.follow,
|
|
12887
13341
|
buyerEmail: standing.buyer?.email,
|
|
12888
13342
|
scheduleDay: chosenDay,
|
|
@@ -12962,7 +13416,7 @@ function PurchaseIsland({
|
|
|
12962
13416
|
stepId === "NAME" ? isCompleteName(
|
|
12963
13417
|
standing.buyer?.firstName ?? "",
|
|
12964
13418
|
standing.buyer?.lastName ?? ""
|
|
12965
|
-
) : stepId === "EMAIL" ? isValidEmail(collected.email) : stepId === "PHONE" ? e164(collected.phone.dialCode, collected.phone.national) !== null : input === null || answered
|
|
13419
|
+
) : stepId === "EMAIL" ? isValidEmail(collected.email) : stepId === "PHONE" ? e164(collected.phone.dialCode, collected.phone.national) !== null : stepId === "DETAILS" ? questionnaire.status === "READY" && questionsAnswered(questionnaire.questions, collected.answers) : input === null || answered
|
|
12966
13420
|
)
|
|
12967
13421
|
)
|
|
12968
13422
|
)
|
|
@@ -12993,7 +13447,7 @@ function PurchaseIsland({
|
|
|
12993
13447
|
* checkout this is. A card with no hold has the room for it; one with a hold has
|
|
12994
13448
|
* something more useful to say in the only line it has.
|
|
12995
13449
|
*/
|
|
12996
|
-
stepId === "REVIEW" || stepId === "PAYMENT" ? drawnHold === void 0 ? POWERED_BY : CART_VIEW.remaining(formatHold(drawnHold)) : copy?.subtitle
|
|
13450
|
+
stepId === "REVIEW" || stepId === "PAYMENT" ? drawnHold === void 0 ? POWERED_BY : CART_VIEW.remaining(formatHold(drawnHold)) : stepId === "DETAILS" && answersSaved ? DETAILS_SAVED_SUBTITLE : copy?.subtitle
|
|
12997
13451
|
);
|
|
12998
13452
|
const lines = drawnQuote === void 0 ? null : quoteLines(drawnQuote);
|
|
12999
13453
|
const title = paidRecovery ? "Payment Received" : stepId === "ACCOUNT_CREATED" ? accountCreatedTitle(accountFirstName) : stepId === "REVIEW" && lines !== null ? `Pay ${lines.headline}` : (
|
|
@@ -13002,7 +13456,7 @@ function PurchaseIsland({
|
|
|
13002
13456
|
* MONEY and not a percentage — see `promoSaved`, where the reason no endpoint
|
|
13003
13457
|
* can answer for a rate is written down.
|
|
13004
13458
|
*/
|
|
13005
|
-
stepId === "PROMO" && promoSaving !== null ? /* @__PURE__ */ (0,
|
|
13459
|
+
stepId === "PROMO" && promoSaving !== null ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "scopetickets-island-promo__saved", children: PROMO_COPY.saved(promoSaving) }) : copy?.title
|
|
13006
13460
|
);
|
|
13007
13461
|
const baseActions = authCard?.actions ?? STEP_CARD_ACTIONS[stepId];
|
|
13008
13462
|
const creatingOrder = pressCreatesOrder(stepId, walk.stops[index + 1]?.step);
|
|
@@ -13059,7 +13513,7 @@ function PurchaseIsland({
|
|
|
13059
13513
|
label: passwordRevealed ? "Hide Entered Text" : "Show Entered Text",
|
|
13060
13514
|
mark: {
|
|
13061
13515
|
side: "leading",
|
|
13062
|
-
node: passwordRevealed ? /* @__PURE__ */ (0,
|
|
13516
|
+
node: passwordRevealed ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons14.EyeToCenterWithStrikethroughIcon, { size: 14, color: "currentColor" }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons14.EyeToCenterIcon, { size: 14, color: "currentColor" })
|
|
13063
13517
|
},
|
|
13064
13518
|
onPress: () => setPasswordRevealed((was) => !was)
|
|
13065
13519
|
}
|
|
@@ -13123,7 +13577,7 @@ function PurchaseIsland({
|
|
|
13123
13577
|
const heroSize = expanded ? 25 : 10;
|
|
13124
13578
|
const closable = !UNCLOSABLE_STEPS.has(stepId);
|
|
13125
13579
|
const payHoldBadge = (stepId === "REVIEW" || stepId === "PAYMENT") && drawnHold !== void 0 ? holdBadge(drawnHold) : null;
|
|
13126
|
-
const hero = /* @__PURE__ */ (0,
|
|
13580
|
+
const hero = /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13127
13581
|
import_avatar5.Avatar,
|
|
13128
13582
|
{
|
|
13129
13583
|
subject: { kind: "user", avatar: heroAvatar, assets: avatarAssets },
|
|
@@ -13133,11 +13587,12 @@ function PurchaseIsland({
|
|
|
13133
13587
|
transitionKey: HERO_TRANSITION_KEY
|
|
13134
13588
|
}
|
|
13135
13589
|
);
|
|
13136
|
-
return /* @__PURE__ */ (0,
|
|
13590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13137
13591
|
CheckoutIsland,
|
|
13138
13592
|
{
|
|
13139
13593
|
mode,
|
|
13140
13594
|
align,
|
|
13595
|
+
placement,
|
|
13141
13596
|
expanded,
|
|
13142
13597
|
journeyFullscreen: journeyInline && journeyFullscreen,
|
|
13143
13598
|
contentKey: `${detour === null ? "" : "detour:"}${stepId}:${prompt?.kind === "CARD" ? prompt.card : ""}`,
|
|
@@ -13168,7 +13623,7 @@ function PurchaseIsland({
|
|
|
13168
13623
|
* pill: both are what the pill OPENS, and a control that re-opens the card you are
|
|
13169
13624
|
* standing on is a control that does nothing. The way out is the header's back.
|
|
13170
13625
|
*/
|
|
13171
|
-
detour === "PROMO" || cartOpen ? void 0 : summary === void 0 ? /* @__PURE__ */ (0,
|
|
13626
|
+
detour === "PROMO" || cartOpen ? void 0 : summary === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13172
13627
|
ComposeFunnel,
|
|
13173
13628
|
{
|
|
13174
13629
|
stops: composeFunnel(
|
|
@@ -13179,7 +13634,7 @@ function PurchaseIsland({
|
|
|
13179
13634
|
onGo: goToStep,
|
|
13180
13635
|
label: COMPOSE_FUNNEL_LABEL
|
|
13181
13636
|
}
|
|
13182
|
-
) : /* @__PURE__ */ (0,
|
|
13637
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13183
13638
|
IslandCommitPill,
|
|
13184
13639
|
{
|
|
13185
13640
|
onOpenCart: openCart,
|
|
@@ -13191,7 +13646,7 @@ function PurchaseIsland({
|
|
|
13191
13646
|
),
|
|
13192
13647
|
pillCopy: { title: lines?.headline, subtitle: lines?.qualifier ?? void 0 },
|
|
13193
13648
|
input,
|
|
13194
|
-
actionLabel: detour === null && index === 0 ? OPENING_LABEL : step.collapsed.kind === "PILL" ? step.collapsed.actionLabel : step.name,
|
|
13649
|
+
actionLabel: detour === null && index === 0 ? openingLabel?.trim() || OPENING_LABEL : step.collapsed.kind === "PILL" ? step.collapsed.actionLabel : step.name,
|
|
13195
13650
|
actions: toIslandActions(planeActions),
|
|
13196
13651
|
bayActions: toIslandActions(bayActions)
|
|
13197
13652
|
}
|
|
@@ -13210,6 +13665,7 @@ function stepInput(stepId, context) {
|
|
|
13210
13665
|
onPartyRefused,
|
|
13211
13666
|
partyRefused,
|
|
13212
13667
|
questions,
|
|
13668
|
+
answersLocked: answersLocked2,
|
|
13213
13669
|
follow,
|
|
13214
13670
|
buyerEmail,
|
|
13215
13671
|
buyerName: buyerName2,
|
|
@@ -13239,7 +13695,7 @@ function stepInput(stepId, context) {
|
|
|
13239
13695
|
* from, which is the platform's and had nowhere to arrive.
|
|
13240
13696
|
*/
|
|
13241
13697
|
case "DATE":
|
|
13242
|
-
return schedule === void 0 ? null : /* @__PURE__ */ (0,
|
|
13698
|
+
return schedule === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13243
13699
|
DayPicker,
|
|
13244
13700
|
{
|
|
13245
13701
|
series: schedule.series,
|
|
@@ -13252,7 +13708,7 @@ function stepInput(stepId, context) {
|
|
|
13252
13708
|
case "TIME": {
|
|
13253
13709
|
if (schedule === void 0) return null;
|
|
13254
13710
|
const day = scheduleDay ?? schedule.today;
|
|
13255
|
-
return /* @__PURE__ */ (0,
|
|
13711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13256
13712
|
TimePicker,
|
|
13257
13713
|
{
|
|
13258
13714
|
series: schedule.series,
|
|
@@ -13278,30 +13734,69 @@ function stepInput(stepId, context) {
|
|
|
13278
13734
|
/*
|
|
13279
13735
|
* THE EVENT'S OWN QUESTIONS. The card was a gate onto nothing: `DETAILS` had no case
|
|
13280
13736
|
* here, so it drew a sentence about needing details and no way to give any. The
|
|
13281
|
-
* questions
|
|
13737
|
+
* questions come from the tickets and the event's questionnaire, which arrives with the
|
|
13738
|
+
* cart, so they are in hand by the time this is asked.
|
|
13282
13739
|
*/
|
|
13283
13740
|
case "DETAILS":
|
|
13284
|
-
return questions.length === 0 ? null : /* @__PURE__ */ (0,
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
|
|
13290
|
-
|
|
13291
|
-
|
|
13292
|
-
|
|
13293
|
-
|
|
13294
|
-
|
|
13295
|
-
|
|
13296
|
-
|
|
13297
|
-
|
|
13741
|
+
return questions.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "scopetickets-island-card__fields", children: questions.map((question) => {
|
|
13742
|
+
const key = String(question.QuestionId);
|
|
13743
|
+
const value = collected.answers[key];
|
|
13744
|
+
const answer = answersLocked2 ? void 0 : (next) => setCollected((was) => ({ ...was, answers: { ...was.answers, [key]: next } }));
|
|
13745
|
+
const kind = questionKind(question);
|
|
13746
|
+
switch (kind) {
|
|
13747
|
+
case "AGREEMENT":
|
|
13748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "scopetickets-island-card__agreement", children: [
|
|
13749
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "scopetickets-island-card__agreement-label", children: question.Question }),
|
|
13750
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13751
|
+
Switch,
|
|
13752
|
+
{
|
|
13753
|
+
checked: value === AGREED,
|
|
13754
|
+
label: question.Question,
|
|
13755
|
+
onChange: (on) => answer?.(on ? AGREED : NOT_AGREED),
|
|
13756
|
+
disabled: answersLocked2
|
|
13757
|
+
}
|
|
13758
|
+
)
|
|
13759
|
+
] }, question.QuestionId);
|
|
13760
|
+
case "INTEGER":
|
|
13761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13762
|
+
TextField,
|
|
13763
|
+
{
|
|
13764
|
+
label: question.Question,
|
|
13765
|
+
value: value ?? "",
|
|
13766
|
+
onChange: answer,
|
|
13767
|
+
inputMode: "numeric",
|
|
13768
|
+
maxLength: 11,
|
|
13769
|
+
readOnly: answersLocked2,
|
|
13770
|
+
enterKeyHint: "done"
|
|
13771
|
+
},
|
|
13772
|
+
question.QuestionId
|
|
13773
|
+
);
|
|
13774
|
+
case "TEXT":
|
|
13775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13776
|
+
TextField,
|
|
13777
|
+
{
|
|
13778
|
+
label: question.Question,
|
|
13779
|
+
value: value ?? "",
|
|
13780
|
+
onChange: answer,
|
|
13781
|
+
maxLength: MAX_ANSWER_LENGTH,
|
|
13782
|
+
readOnly: answersLocked2,
|
|
13783
|
+
enterKeyHint: "done"
|
|
13784
|
+
},
|
|
13785
|
+
question.QuestionId
|
|
13786
|
+
);
|
|
13787
|
+
default: {
|
|
13788
|
+
const exhaustive = kind;
|
|
13789
|
+
return exhaustive;
|
|
13790
|
+
}
|
|
13791
|
+
}
|
|
13792
|
+
}) });
|
|
13298
13793
|
/*
|
|
13299
13794
|
* WHO TO HEAR FROM AGAIN. `FollowList` was built and tested and mounted by nothing —
|
|
13300
13795
|
* the organiser and the venue are on every event, and they are who a buyer would
|
|
13301
13796
|
* follow.
|
|
13302
13797
|
*/
|
|
13303
13798
|
case "FOLLOW":
|
|
13304
|
-
return follow.length === 0 ? null : /* @__PURE__ */ (0,
|
|
13799
|
+
return follow.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13305
13800
|
FollowList,
|
|
13306
13801
|
{
|
|
13307
13802
|
entities: follow,
|
|
@@ -13317,7 +13812,7 @@ function stepInput(stepId, context) {
|
|
|
13317
13812
|
* TICKET the number ends up against is the widget's business and not this card's.
|
|
13318
13813
|
*/
|
|
13319
13814
|
case "FEEDBACK":
|
|
13320
|
-
return /* @__PURE__ */ (0,
|
|
13815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13321
13816
|
StarRating,
|
|
13322
13817
|
{
|
|
13323
13818
|
value: collected.rating,
|
|
@@ -13327,7 +13822,7 @@ function stepInput(stepId, context) {
|
|
|
13327
13822
|
);
|
|
13328
13823
|
case "PARTY":
|
|
13329
13824
|
if (party.status === "ASKING") return null;
|
|
13330
|
-
return /* @__PURE__ */ (0,
|
|
13825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13331
13826
|
PartyStepper,
|
|
13332
13827
|
{
|
|
13333
13828
|
onRefuse: onPartyRefused,
|
|
@@ -13343,7 +13838,7 @@ function stepInput(stepId, context) {
|
|
|
13343
13838
|
}
|
|
13344
13839
|
);
|
|
13345
13840
|
case "NAME":
|
|
13346
|
-
return /* @__PURE__ */ (0,
|
|
13841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13347
13842
|
NameStep,
|
|
13348
13843
|
{
|
|
13349
13844
|
value: buyerName2,
|
|
@@ -13352,7 +13847,7 @@ function stepInput(stepId, context) {
|
|
|
13352
13847
|
}
|
|
13353
13848
|
);
|
|
13354
13849
|
case "EMAIL":
|
|
13355
|
-
return /* @__PURE__ */ (0,
|
|
13850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13356
13851
|
EmailStep,
|
|
13357
13852
|
{
|
|
13358
13853
|
value: collected.email,
|
|
@@ -13361,7 +13856,7 @@ function stepInput(stepId, context) {
|
|
|
13361
13856
|
}
|
|
13362
13857
|
);
|
|
13363
13858
|
case "PHONE":
|
|
13364
|
-
return /* @__PURE__ */ (0,
|
|
13859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13365
13860
|
PhoneStep,
|
|
13366
13861
|
{
|
|
13367
13862
|
value: collected.phone,
|
|
@@ -13374,7 +13869,7 @@ function stepInput(stepId, context) {
|
|
|
13374
13869
|
* own save prompt. See `PasswordStep`'s hidden username.
|
|
13375
13870
|
*/
|
|
13376
13871
|
case "PASSWORD":
|
|
13377
|
-
return /* @__PURE__ */ (0,
|
|
13872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13378
13873
|
PasswordStep,
|
|
13379
13874
|
{
|
|
13380
13875
|
revealed: passwordRevealed,
|
|
@@ -13384,7 +13879,7 @@ function stepInput(stepId, context) {
|
|
|
13384
13879
|
}
|
|
13385
13880
|
);
|
|
13386
13881
|
case "CONFIRM_EMAIL":
|
|
13387
|
-
return /* @__PURE__ */ (0,
|
|
13882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13388
13883
|
ConfirmEmailStep,
|
|
13389
13884
|
{
|
|
13390
13885
|
initialEmail: buyerEmail ?? "",
|
|
@@ -13393,7 +13888,7 @@ function stepInput(stepId, context) {
|
|
|
13393
13888
|
}
|
|
13394
13889
|
);
|
|
13395
13890
|
case "VERIFY_EMAIL":
|
|
13396
|
-
return /* @__PURE__ */ (0,
|
|
13891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13397
13892
|
VerifyEmailStep,
|
|
13398
13893
|
{
|
|
13399
13894
|
onAnsweredChange,
|
|
@@ -13408,7 +13903,7 @@ function stepInput(stepId, context) {
|
|
|
13408
13903
|
* only the Skip for this step; see `cardActions`.
|
|
13409
13904
|
*/
|
|
13410
13905
|
case "PASSKEY":
|
|
13411
|
-
return /* @__PURE__ */ (0,
|
|
13906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13412
13907
|
PasskeyButton,
|
|
13413
13908
|
{
|
|
13414
13909
|
hostUrl: passkey.hostUrl,
|
|
@@ -13423,7 +13918,7 @@ function stepInput(stepId, context) {
|
|
|
13423
13918
|
* `CheckoutProps.profilePhotos`.
|
|
13424
13919
|
*/
|
|
13425
13920
|
case "PROFILE_PHOTO":
|
|
13426
|
-
return photos.length === 0 ? null : /* @__PURE__ */ (0,
|
|
13921
|
+
return photos.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13427
13922
|
ProfilePhotoPicker,
|
|
13428
13923
|
{
|
|
13429
13924
|
photos,
|
|
@@ -13443,8 +13938,8 @@ function stepInput(stepId, context) {
|
|
|
13443
13938
|
case "PROMO": {
|
|
13444
13939
|
const { typed, onTyped, applied, write } = context.promo;
|
|
13445
13940
|
const refused4 = write.status === "REFUSED";
|
|
13446
|
-
return /* @__PURE__ */ (0,
|
|
13447
|
-
/* @__PURE__ */ (0,
|
|
13941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
13942
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
13448
13943
|
TextField,
|
|
13449
13944
|
{
|
|
13450
13945
|
id: "promo-code",
|
|
@@ -13459,7 +13954,7 @@ function stepInput(stepId, context) {
|
|
|
13459
13954
|
flagTitle: refused4 ? void 0 : PROMO_COPY.accepted
|
|
13460
13955
|
}
|
|
13461
13956
|
),
|
|
13462
|
-
refused4 ? /* @__PURE__ */ (0,
|
|
13957
|
+
refused4 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "scopetickets-island-promo__refusal", role: "status", children: write.reason }) : null
|
|
13463
13958
|
] });
|
|
13464
13959
|
}
|
|
13465
13960
|
default:
|
|
@@ -13469,7 +13964,7 @@ function stepInput(stepId, context) {
|
|
|
13469
13964
|
|
|
13470
13965
|
// src/PaymentReturn.tsx
|
|
13471
13966
|
var import_react38 = require("react");
|
|
13472
|
-
var
|
|
13967
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
13473
13968
|
var CART_ALREADY_CONVERTED_MESSAGE = "Cart was altered while attempting to confirm the transaction";
|
|
13474
13969
|
var CARRIED_CHECKOUT_PARAMS2 = ["event", "eventKey", "cartKey", "checkoutSessionId"];
|
|
13475
13970
|
function checkoutReturnUrl(checkoutPath, search) {
|
|
@@ -13569,32 +14064,32 @@ function PaymentReturn({
|
|
|
13569
14064
|
}
|
|
13570
14065
|
}, 150);
|
|
13571
14066
|
};
|
|
13572
|
-
const wayBack = checkoutPath === void 0 && !window.opener ? null : /* @__PURE__ */ (0,
|
|
14067
|
+
const wayBack = checkoutPath === void 0 && !window.opener ? null : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("button", { type: "button", onClick: goBack, className: "scopetickets-payment-return__back", children: "Return to checkout" });
|
|
13573
14068
|
if (state.status === "processing") {
|
|
13574
|
-
return /* @__PURE__ */ (0,
|
|
14069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "scopetickets-payment-return scopetickets-payment-return--processing", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: "Completing your payment..." }) });
|
|
13575
14070
|
}
|
|
13576
14071
|
if (state.status === "completed") {
|
|
13577
|
-
return /* @__PURE__ */ (0,
|
|
13578
|
-
/* @__PURE__ */ (0,
|
|
13579
|
-
/* @__PURE__ */ (0,
|
|
14072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "scopetickets-payment-return scopetickets-payment-return--success", children: [
|
|
14073
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: "Payment successful!" }),
|
|
14074
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: "You can close this window." })
|
|
13580
14075
|
] });
|
|
13581
14076
|
}
|
|
13582
14077
|
if (state.status === "cancelled") {
|
|
13583
|
-
return /* @__PURE__ */ (0,
|
|
13584
|
-
/* @__PURE__ */ (0,
|
|
14078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "scopetickets-payment-return scopetickets-payment-return--cancelled", children: [
|
|
14079
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: "Payment was cancelled." }),
|
|
13585
14080
|
wayBack
|
|
13586
14081
|
] });
|
|
13587
14082
|
}
|
|
13588
|
-
return /* @__PURE__ */ (0,
|
|
13589
|
-
/* @__PURE__ */ (0,
|
|
13590
|
-
/* @__PURE__ */ (0,
|
|
14083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "scopetickets-payment-return scopetickets-payment-return--failed", children: [
|
|
14084
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: "Payment failed" }),
|
|
14085
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { children: state.message }),
|
|
13591
14086
|
wayBack
|
|
13592
14087
|
] });
|
|
13593
14088
|
}
|
|
13594
14089
|
|
|
13595
14090
|
// src/island/CalendarGrainButton.tsx
|
|
13596
14091
|
var import_react39 = require("react");
|
|
13597
|
-
var
|
|
14092
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
13598
14093
|
function useShortenedMonth(long) {
|
|
13599
14094
|
const [short, setShort] = (0, import_react39.useState)(false);
|
|
13600
14095
|
const title = (0, import_react39.useRef)(null);
|
|
@@ -13637,7 +14132,7 @@ function CalendarGrainButton({ month, grain, onPress }) {
|
|
|
13637
14132
|
const long = grain === "YEAR" ? formatMonthYear(month) : formatMonthName(month);
|
|
13638
14133
|
const { short, titleRef, probeRef } = useShortenedMonth(long);
|
|
13639
14134
|
const shown = grain === "MONTH" && short ? formatMonthNameShort(month) : long;
|
|
13640
|
-
const title = /* @__PURE__ */ (0,
|
|
14135
|
+
const title = /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
13641
14136
|
"span",
|
|
13642
14137
|
{
|
|
13643
14138
|
className: "scopetickets-island-header-button__title",
|
|
@@ -13645,7 +14140,7 @@ function CalendarGrainButton({ month, grain, onPress }) {
|
|
|
13645
14140
|
...grain === "MONTH" && short ? { "data-grain-short": "" } : null,
|
|
13646
14141
|
children: [
|
|
13647
14142
|
shown,
|
|
13648
|
-
grain === "MONTH" ? /* @__PURE__ */ (0,
|
|
14143
|
+
grain === "MONTH" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
13649
14144
|
"span",
|
|
13650
14145
|
{
|
|
13651
14146
|
className: "scopetickets-island-header-button__probe",
|
|
@@ -13658,9 +14153,9 @@ function CalendarGrainButton({ month, grain, onPress }) {
|
|
|
13658
14153
|
}
|
|
13659
14154
|
);
|
|
13660
14155
|
if (onPress === void 0) {
|
|
13661
|
-
return /* @__PURE__ */ (0,
|
|
14156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "scopetickets-island-chrome-pill scopetickets-island-grain-pill", children: title });
|
|
13662
14157
|
}
|
|
13663
|
-
return /* @__PURE__ */ (0,
|
|
14158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
13664
14159
|
"button",
|
|
13665
14160
|
{
|
|
13666
14161
|
type: "button",
|
|
@@ -13671,26 +14166,6 @@ function CalendarGrainButton({ month, grain, onPress }) {
|
|
|
13671
14166
|
}
|
|
13672
14167
|
);
|
|
13673
14168
|
}
|
|
13674
|
-
|
|
13675
|
-
// src/island/Switch.tsx
|
|
13676
|
-
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
13677
|
-
function Switch({ checked, onChange, label, size: size2 = "wide", disabled = false }) {
|
|
13678
|
-
const press = useIslandPress("element");
|
|
13679
|
-
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
13680
|
-
"button",
|
|
13681
|
-
{
|
|
13682
|
-
type: "button",
|
|
13683
|
-
role: "switch",
|
|
13684
|
-
"aria-checked": checked,
|
|
13685
|
-
"aria-label": label,
|
|
13686
|
-
disabled,
|
|
13687
|
-
className: `scopetickets-island-switch scopetickets-island-switch--${size2}`,
|
|
13688
|
-
onClick: () => onChange(!checked),
|
|
13689
|
-
...disabled ? {} : press,
|
|
13690
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "scopetickets-island-switch__thumb", "aria-hidden": "true" })
|
|
13691
|
-
}
|
|
13692
|
-
);
|
|
13693
|
-
}
|
|
13694
14169
|
// Annotate the CommonJS export names for ESM import in node:
|
|
13695
14170
|
0 && (module.exports = {
|
|
13696
14171
|
AUTH_CARDS,
|