tf-checkout-react-native 2.0.0-beta.19 → 2.0.0-beta.22
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 +77 -20
- package/dist/index.d.mts +92 -63
- package/dist/index.d.ts +92 -63
- package/dist/index.js +221 -113
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +263 -148
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -5
- package/src/configure.ts +40 -10
- package/src/index.tsx +5 -2
- package/src/sections/Tickets.tsx +5 -3
- package/src/useCheckout.ts +1 -1
- package/src/storage.ts +0 -26
package/dist/index.mjs
CHANGED
|
@@ -2447,7 +2447,14 @@ import { useEffect as useEffect22, useRef as useRef27, useState as useState29 }
|
|
|
2447
2447
|
import { useEffect as useEffect23, useRef as useRef28, useState as useState30 } from "react";
|
|
2448
2448
|
import { useQueryClient as useQueryClient15 } from "@tanstack/react-query";
|
|
2449
2449
|
import { useQueryClient as useQueryClient16 } from "@tanstack/react-query";
|
|
2450
|
-
import {
|
|
2450
|
+
import {
|
|
2451
|
+
useCallback as useCallback14,
|
|
2452
|
+
useEffect as useEffect24,
|
|
2453
|
+
useLayoutEffect as useLayoutEffect4,
|
|
2454
|
+
useMemo as useMemo16,
|
|
2455
|
+
useRef as useRef29,
|
|
2456
|
+
useSyncExternalStore as useSyncExternalStore20
|
|
2457
|
+
} from "react";
|
|
2451
2458
|
var __defProp = Object.defineProperty;
|
|
2452
2459
|
var __export = (target, all) => {
|
|
2453
2460
|
for (var name in all)
|
|
@@ -5785,7 +5792,7 @@ var tripStatus = (status, locale) => {
|
|
|
5785
5792
|
};
|
|
5786
5793
|
var isEventTrip = (data) => "event" in data;
|
|
5787
5794
|
var brandingLines = (identities = []) => identities.map(
|
|
5788
|
-
(
|
|
5795
|
+
(identity2) => [...new Set([identity2.brand_name, identity2.platform_name].filter(Boolean))].join(
|
|
5789
5796
|
" \xB7 "
|
|
5790
5797
|
)
|
|
5791
5798
|
).filter(Boolean);
|
|
@@ -6822,16 +6829,20 @@ var mapOption = (o) => {
|
|
|
6822
6829
|
requiresSignIn: o.requiresSignIn === true || o.requires_sign_in === true
|
|
6823
6830
|
};
|
|
6824
6831
|
};
|
|
6832
|
+
var waitlistId = (value6) => typeof value6 === "string" && /^[1-9]\d*$/.test(value6) ? value6 : typeof value6 === "number" && Number.isSafeInteger(value6) && value6 > 0 ? String(value6) : null;
|
|
6825
6833
|
var mapWaitlist = (w) => {
|
|
6826
|
-
|
|
6834
|
+
const ticketTypeId = waitlistId(w.ticketTypeId);
|
|
6835
|
+
if (!ticketTypeId || typeof w.name !== "string" || !w.name.trim()) return null;
|
|
6836
|
+
if (w.entry === null) return { ticketTypeId, name: w.name, entry: null };
|
|
6837
|
+
if (!w.entry || typeof w.entry !== "object" || Array.isArray(w.entry)) return null;
|
|
6838
|
+
const id2 = waitlistId(w.entry.id);
|
|
6839
|
+
const { status, offerExpiresAt } = w.entry;
|
|
6840
|
+
if (!id2 || !["waiting", "offered"].includes(status) || offerExpiresAt !== void 0 && offerExpiresAt !== null && typeof offerExpiresAt !== "string")
|
|
6841
|
+
return null;
|
|
6827
6842
|
return {
|
|
6828
|
-
ticketTypeId
|
|
6829
|
-
name:
|
|
6830
|
-
entry:
|
|
6831
|
-
id: String((_c = w.entry.id) != null ? _c : ""),
|
|
6832
|
-
status: String((_d = w.entry.status) != null ? _d : ""),
|
|
6833
|
-
offerExpiresAt: text3(w.entry.offerExpiresAt)
|
|
6834
|
-
} : null
|
|
6843
|
+
ticketTypeId,
|
|
6844
|
+
name: w.name,
|
|
6845
|
+
entry: { id: id2, status, offerExpiresAt: text3(offerExpiresAt) }
|
|
6835
6846
|
};
|
|
6836
6847
|
};
|
|
6837
6848
|
var list = (value6) => Array.isArray(value6) ? value6.filter((v) => v && typeof v === "object") : [];
|
|
@@ -6851,7 +6862,7 @@ var ticketChangeOptionsFromResponse = (body3) => {
|
|
|
6851
6862
|
closesAt: text3((_d = a.cutoff) == null ? void 0 : _d.closesAt)
|
|
6852
6863
|
},
|
|
6853
6864
|
options,
|
|
6854
|
-
waitlistOptions: list(a.waitlistOptions).map(mapWaitlist),
|
|
6865
|
+
waitlistOptions: list(a.waitlistOptions).map(mapWaitlist).filter((option) => option !== null),
|
|
6855
6866
|
sellInstead: {
|
|
6856
6867
|
available: Boolean((_e = a.sellInstead) == null ? void 0 : _e.available) && Boolean((_f = a.sellInstead) == null ? void 0 : _f.url),
|
|
6857
6868
|
url: text3((_g = a.sellInstead) == null ? void 0 : _g.url)
|
|
@@ -8523,21 +8534,43 @@ var waitingListEntryFrom = (definition, draft) => {
|
|
|
8523
8534
|
quantity
|
|
8524
8535
|
};
|
|
8525
8536
|
};
|
|
8537
|
+
var identity = (ticket) => {
|
|
8538
|
+
var _a2;
|
|
8539
|
+
return (_a2 = ticket.selectionKey) != null ? _a2 : ticket.id;
|
|
8540
|
+
};
|
|
8541
|
+
var ticketPriceContext = (scope, ticket) => {
|
|
8542
|
+
var _a2, _b;
|
|
8543
|
+
return JSON.stringify([
|
|
8544
|
+
scope,
|
|
8545
|
+
ticket.currency,
|
|
8546
|
+
(_a2 = ticket.timeSlot) == null ? void 0 : _a2.date,
|
|
8547
|
+
(_b = ticket.timeSlot) == null ? void 0 : _b.time,
|
|
8548
|
+
identity(ticket)
|
|
8549
|
+
]);
|
|
8550
|
+
};
|
|
8526
8551
|
var calendarTicketRows = (base, dated) => {
|
|
8527
|
-
const ids = new Set(dated.map(
|
|
8552
|
+
const ids = new Set(dated.map(identity));
|
|
8528
8553
|
return [
|
|
8529
8554
|
...dated,
|
|
8530
|
-
...base.filter(
|
|
8555
|
+
...base.filter(
|
|
8556
|
+
(ticket) => ticket.isRegularTicket === true && !ids.has(identity(ticket))
|
|
8557
|
+
)
|
|
8531
8558
|
];
|
|
8532
8559
|
};
|
|
8533
8560
|
var catalogDate = (selected, dates) => {
|
|
8534
8561
|
var _a2;
|
|
8535
8562
|
return dates.includes(selected) ? selected : (_a2 = dates[0]) != null ? _a2 : "";
|
|
8536
8563
|
};
|
|
8537
|
-
var catalogQuantities = (previous, tickets) => {
|
|
8564
|
+
var catalogQuantities = (previous, tickets, previousTickets = tickets, dateChanged = false) => {
|
|
8565
|
+
var _a2;
|
|
8566
|
+
const retained = /* @__PURE__ */ new Map();
|
|
8567
|
+
for (const ticket of previousTickets) {
|
|
8568
|
+
if (dateChanged && ticket.timeSlot) continue;
|
|
8569
|
+
if (previous[ticket.id] > 0) retained.set(identity(ticket), previous[ticket.id]);
|
|
8570
|
+
}
|
|
8538
8571
|
const next = {};
|
|
8539
8572
|
for (const ticket of tickets) {
|
|
8540
|
-
const quantity =
|
|
8573
|
+
const quantity = (_a2 = retained.get(identity(ticket))) != null ? _a2 : 0;
|
|
8541
8574
|
const range = ticketQuantityRange(ticket);
|
|
8542
8575
|
if (quantity > 0 && !ticket.soldOut && ticket.salesStarted && !ticket.salesEnded && quantity >= range.min && quantity <= range.max && quantity % range.step === 0)
|
|
8543
8576
|
next[ticket.id] = quantity;
|
|
@@ -9504,10 +9537,23 @@ var getVerificationInfo = async () => get(ENDPOINTS.auth.verificationInfo);
|
|
|
9504
9537
|
var updateVerificationStatus = async () => patch(ENDPOINTS.auth.verify, {
|
|
9505
9538
|
data: { attributes: { verification: { verificationStatus: "PENDING" } } }
|
|
9506
9539
|
});
|
|
9507
|
-
var logout = async () => {
|
|
9540
|
+
var logout = async (options = {}) => {
|
|
9541
|
+
const device = options.pushDevice;
|
|
9542
|
+
if (device !== void 0 && (device === null || typeof device !== "object" || Array.isArray(device) || typeof device.appId !== "string" || !/^[a-z][a-z0-9_-]{0,63}$/.test(device.appId) || typeof device.token !== "string" || !device.token || device.token.length > 4096 || /[^\x21-\x7e]/.test(device.token) || device.registration !== void 0 && (typeof device.registration !== "string" || !/^[1-9][0-9]{0,19}:[0-9]{1,20}$/.test(device.registration))))
|
|
9543
|
+
throw new TtfError(
|
|
9544
|
+
"This device could not be removed securely.",
|
|
9545
|
+
0,
|
|
9546
|
+
"VALIDATION_ERROR"
|
|
9547
|
+
);
|
|
9548
|
+
const headers = device ? {
|
|
9549
|
+
"X-TF-Push-App": device.appId,
|
|
9550
|
+
"X-TF-Push-Token": device.token,
|
|
9551
|
+
...device.registration ? { "X-TF-Push-Registration": device.registration } : {}
|
|
9552
|
+
} : void 0;
|
|
9508
9553
|
const epoch = advanceSessionEpoch();
|
|
9509
9554
|
try {
|
|
9510
|
-
await del(ENDPOINTS.auth.session);
|
|
9555
|
+
if (headers) await del(ENDPOINTS.auth.session, { headers });
|
|
9556
|
+
else await del(ENDPOINTS.auth.session);
|
|
9511
9557
|
} finally {
|
|
9512
9558
|
if (epoch === getSessionEpoch()) clearSession();
|
|
9513
9559
|
}
|
|
@@ -9977,10 +10023,21 @@ var badgeOf = (raw) => {
|
|
|
9977
10023
|
const text6 = typeof raw === "string" ? raw.trim() : "";
|
|
9978
10024
|
return text6 || null;
|
|
9979
10025
|
};
|
|
9980
|
-
var
|
|
10026
|
+
var eventCurrency = (raw) => {
|
|
10027
|
+
if (typeof raw === "string") return { currency: raw };
|
|
10028
|
+
if (!raw || typeof raw !== "object") return {};
|
|
10029
|
+
const value6 = raw;
|
|
10030
|
+
return {
|
|
10031
|
+
...typeof value6.currency === "string" ? { currency: value6.currency } : {},
|
|
10032
|
+
...typeof value6.symbol === "string" ? { priceSymbol: value6.symbol } : {}
|
|
10033
|
+
};
|
|
10034
|
+
};
|
|
10035
|
+
var selectionKey = (raw, eventId) => typeof raw === "string" && raw.trim() === raw && /^event:[1-9]\d*:ticket:[1-9]\d*$/.test(raw) && raw.startsWith(`event:${eventId}:ticket:`) ? raw : void 0;
|
|
10036
|
+
var mapTicket = (t, eventId) => {
|
|
9981
10037
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
9982
10038
|
return {
|
|
9983
10039
|
id: String(t.id),
|
|
10040
|
+
...selectionKey(t.selectionKey, eventId) ? { selectionKey: selectionKey(t.selectionKey, eventId) } : {},
|
|
9984
10041
|
isRegularTicket: typeof t.isRegularTicket === "boolean" ? t.isRegularTicket : void 0,
|
|
9985
10042
|
name: (_a2 = t.displayName) != null ? _a2 : "",
|
|
9986
10043
|
groupName: (_c = (_b = t.groupName) != null ? _b : t.group_name) != null ? _c : null,
|
|
@@ -10040,7 +10097,7 @@ var getEventDetails = async (eventId, language = "en") => {
|
|
|
10040
10097
|
endDate: hideDate ? null : text6(a.endDate),
|
|
10041
10098
|
formattedDate: hideDate ? "Date TBC" : String((_q = a.formattedDate) != null ? _q : ""),
|
|
10042
10099
|
timezone: text6(a.timezone),
|
|
10043
|
-
currency:
|
|
10100
|
+
currency: (_r = eventCurrency(a.currency).currency) != null ? _r : "",
|
|
10044
10101
|
salesStart: text6(a.salesStart),
|
|
10045
10102
|
salesEnd: text6(a.salesEnd),
|
|
10046
10103
|
salesStarted: Boolean(a.salesStarted),
|
|
@@ -10065,7 +10122,7 @@ var getEventTickets = async (eventId) => {
|
|
|
10065
10122
|
tfCatalogContext: true
|
|
10066
10123
|
});
|
|
10067
10124
|
const ticketsObj = (_c = (_b = (_a2 = body3 == null ? void 0 : body3.data) == null ? void 0 : _a2.attributes) == null ? void 0 : _b.tickets) != null ? _c : {};
|
|
10068
|
-
return Object.values(ticketsObj).map(mapTicket);
|
|
10125
|
+
return Object.values(ticketsObj).map((ticket) => mapTicket(ticket, eventId));
|
|
10069
10126
|
};
|
|
10070
10127
|
var getEventInfo = async (eventId, pk) => {
|
|
10071
10128
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
@@ -10081,6 +10138,7 @@ var getEventInfo = async (eventId, pk) => {
|
|
|
10081
10138
|
const rawCountry = a.country;
|
|
10082
10139
|
const countryCode = (_j = (_i = (_h = typeof rawCountry === "string" ? rawCountry : rawCountry == null ? void 0 : rawCountry.code) != null ? _h : a.countryCode) != null ? _i : a.country_code) != null ? _j : null;
|
|
10083
10140
|
return {
|
|
10141
|
+
...eventCurrency(a.currency),
|
|
10084
10142
|
isSeatedEvent: isSeatedEvent(attributes6),
|
|
10085
10143
|
tableMapEnabled: Boolean((_k = a.tableMapEnabled) != null ? _k : a.table_map_enabled),
|
|
10086
10144
|
isTimeSlotEvent: Boolean(
|
|
@@ -10114,7 +10172,7 @@ var getEventConditions = async (eventId) => {
|
|
|
10114
10172
|
}).filter((c) => c.content || c.name);
|
|
10115
10173
|
};
|
|
10116
10174
|
var getEventTimeSlotTickets = async (eventId, date, options) => {
|
|
10117
|
-
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
10175
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
10118
10176
|
await sdkSeatSessionHeaders(eventId);
|
|
10119
10177
|
const body3 = await get(ENDPOINTS.events.timeSlotByDate(eventId), {
|
|
10120
10178
|
tfCatalogContext: true,
|
|
@@ -10135,25 +10193,28 @@ var getEventTimeSlotTickets = async (eventId, date, options) => {
|
|
|
10135
10193
|
const stock = Number((_h = (_g = s9.in_stock) != null ? _g : s9.real_stock) != null ? _h : 0);
|
|
10136
10194
|
out.push({
|
|
10137
10195
|
id: String(s9.matrix_record_id),
|
|
10196
|
+
...selectionKey(s9.selectionKey, eventId) ? { selectionKey: selectionKey(s9.selectionKey, eventId) } : {},
|
|
10138
10197
|
name: s9.display_name || s9.option_value || "Ticket",
|
|
10139
10198
|
groupName: (_j = (_i = s9.group_name) != null ? _i : s9.groupName) != null ? _j : null,
|
|
10140
|
-
optionName: String((_k = s9.
|
|
10141
|
-
price: Number((
|
|
10142
|
-
priceWithFees: Number((
|
|
10143
|
-
priceSymbol: (
|
|
10144
|
-
currency: "",
|
|
10145
|
-
feeIncluded:
|
|
10199
|
+
optionName: String((_l = (_k = s9.product_option_key) != null ? _k : s9.option_key) != null ? _l : ""),
|
|
10200
|
+
price: Number((_n = (_m = s9.display_price) != null ? _m : s9.base_price) != null ? _n : 0),
|
|
10201
|
+
priceWithFees: Number((_p = (_o = s9.price_with_fees) != null ? _o : s9.base_price) != null ? _p : 0),
|
|
10202
|
+
priceSymbol: (_r = (_q = s9.price_symbol) != null ? _q : s9.priceSymbol) != null ? _r : "",
|
|
10203
|
+
currency: (_s = s9.price_currency) != null ? _s : "",
|
|
10204
|
+
feeIncluded: s9.fee_included === true,
|
|
10146
10205
|
depositPercent: s9.deposit_percent != null ? Number(s9.deposit_percent) : null,
|
|
10147
10206
|
soldOut: Boolean(s9.sold_out) || stock <= 0,
|
|
10148
10207
|
salesStarted: s9.sales_started != null ? Boolean(s9.sales_started) : true,
|
|
10149
10208
|
salesEnded: Boolean(s9.sales_ended),
|
|
10150
|
-
minQuantity: Number((
|
|
10151
|
-
maxQuantity: Number((
|
|
10152
|
-
multiplier: Number((
|
|
10153
|
-
isTable: Boolean(s9.is_table),
|
|
10154
|
-
|
|
10155
|
-
|
|
10156
|
-
|
|
10209
|
+
minQuantity: Number((_t = s9.min_quantity) != null ? _t : 1) || 1,
|
|
10210
|
+
maxQuantity: Number((_u = s9.max_quantity) != null ? _u : 10),
|
|
10211
|
+
multiplier: Number((_v = s9.multiplier) != null ? _v : 1) || 1,
|
|
10212
|
+
isTable: s9.x_is_table !== void 0 && s9.x_is_table !== null ? Number(s9.x_is_table) === 1 : Boolean(s9.is_table),
|
|
10213
|
+
minGuests: s9.min_guests === void 0 || s9.min_guests === null ? void 0 : Number(s9.min_guests),
|
|
10214
|
+
maxGuests: s9.max_guests === void 0 || s9.max_guests === null ? void 0 : Number(s9.max_guests),
|
|
10215
|
+
allowDirectPurchase: Number((_w = s9.allow_direct_purchase_for_seat_map) != null ? _w : 1) === 1,
|
|
10216
|
+
descriptionRich: (_y = (_x = s9.x_description_rich) != null ? _x : s9.description) != null ? _y : null,
|
|
10217
|
+
badgeText: badgeOf((_z = s9.badge_text) != null ? _z : s9.badgeText),
|
|
10157
10218
|
timeSlot: { date: slotDate, time: timeKey }
|
|
10158
10219
|
});
|
|
10159
10220
|
}
|
|
@@ -10290,7 +10351,7 @@ var getEventTicketsWithMeta = async (eventId) => {
|
|
|
10290
10351
|
const attrs = (_b = (_a2 = body3 == null ? void 0 : body3.data) == null ? void 0 : _a2.attributes) != null ? _b : {};
|
|
10291
10352
|
const ticketsObj = (_c = attrs.tickets) != null ? _c : {};
|
|
10292
10353
|
return {
|
|
10293
|
-
tickets: Object.values(ticketsObj).map(mapTicket),
|
|
10354
|
+
tickets: Object.values(ticketsObj).map((ticket) => mapTicket(ticket, eventId)),
|
|
10294
10355
|
promo: {
|
|
10295
10356
|
isPromotionsEnabled: attrs.isPromotionsEnabled === true,
|
|
10296
10357
|
isAccessCodeEnabled: attrs.is_access_code === true,
|
|
@@ -20074,15 +20135,15 @@ var useCheckoutImageField = ({
|
|
|
20074
20135
|
value: value6,
|
|
20075
20136
|
onChange,
|
|
20076
20137
|
pick: pick3,
|
|
20077
|
-
identity,
|
|
20138
|
+
identity: identity2,
|
|
20078
20139
|
disabled = false
|
|
20079
20140
|
}) => {
|
|
20080
20141
|
const assertOwner = useSessionAction();
|
|
20081
20142
|
const [busy, setBusy] = useState24(false);
|
|
20082
20143
|
const [error, setError] = useState24(null);
|
|
20083
|
-
const owner = useRef22({ identity, value: value6, disabled });
|
|
20084
|
-
if (owner.current.identity !==
|
|
20085
|
-
owner.current = { identity, value: value6, disabled };
|
|
20144
|
+
const owner = useRef22({ identity: identity2, value: value6, disabled });
|
|
20145
|
+
if (owner.current.identity !== identity2 || owner.current.value !== value6 || owner.current.disabled !== disabled)
|
|
20146
|
+
owner.current = { identity: identity2, value: value6, disabled };
|
|
20086
20147
|
const renderOwner = owner.current;
|
|
20087
20148
|
const operation = useRef22(0);
|
|
20088
20149
|
const inFlight = useRef22(false);
|
|
@@ -20100,7 +20161,7 @@ var useCheckoutImageField = ({
|
|
|
20100
20161
|
inFlight.current = false;
|
|
20101
20162
|
setBusy(false);
|
|
20102
20163
|
setError(null);
|
|
20103
|
-
}, [
|
|
20164
|
+
}, [identity2, value6, disabled]);
|
|
20104
20165
|
const select = async (picker = pick3) => {
|
|
20105
20166
|
if (!mounted.current || owner.current !== renderOwner || !picker || disabled || inFlight.current)
|
|
20106
20167
|
return;
|
|
@@ -21475,7 +21536,7 @@ var useTicketCatalog = (eventId, explicitDates) => {
|
|
|
21475
21536
|
}
|
|
21476
21537
|
};
|
|
21477
21538
|
};
|
|
21478
|
-
const [
|
|
21539
|
+
const [selection, updateSelection] = useScopedState(subject, { rows: EMPTY_TICKETS, date: "", quantities: {} });
|
|
21479
21540
|
const [slotDate, updateDate] = useScopedState(subject, "");
|
|
21480
21541
|
const [refreshing, setRefreshing] = useScopedState(subject, false);
|
|
21481
21542
|
const eventQuery = useEvent(eventId);
|
|
@@ -21495,25 +21556,76 @@ var useTicketCatalog = (eventId, explicitDates) => {
|
|
|
21495
21556
|
const base = (_b2 = (_a3 = ticketsQuery.data) == null ? void 0 : _a3.tickets) != null ? _b2 : EMPTY_TICKETS;
|
|
21496
21557
|
if (!isTimeSlot)
|
|
21497
21558
|
return { tickets: base, datedTickets: EMPTY_TICKETS, regularTickets: EMPTY_TICKETS };
|
|
21498
|
-
const
|
|
21559
|
+
const currencies = [...new Set(base.map((ticket) => ticket.currency).filter(Boolean))];
|
|
21560
|
+
const currency = (eventInfo == null ? void 0 : eventInfo.currency) || (currencies.length === 1 ? currencies[0] : "");
|
|
21561
|
+
const symbols = [
|
|
21562
|
+
...new Set(
|
|
21563
|
+
base.filter((ticket) => ticket.currency === currency).map((ticket) => ticket.priceSymbol).filter(Boolean)
|
|
21564
|
+
)
|
|
21565
|
+
];
|
|
21566
|
+
const symbol = (eventInfo == null ? void 0 : eventInfo.priceSymbol) || (symbols.length === 1 ? symbols[0] : "");
|
|
21567
|
+
const dated = (slotQuery.isPlaceholderData ? EMPTY_TICKETS : (_c2 = slotQuery.data) != null ? _c2 : EMPTY_TICKETS).map((ticket) => ({
|
|
21568
|
+
...ticket,
|
|
21569
|
+
currency: ticket.currency || currency,
|
|
21570
|
+
priceSymbol: ticket.priceSymbol || symbol
|
|
21571
|
+
}));
|
|
21499
21572
|
const rows2 = calendarTicketRows(base, dated);
|
|
21500
21573
|
return {
|
|
21501
21574
|
tickets: rows2,
|
|
21502
21575
|
datedTickets: dated,
|
|
21503
21576
|
regularTickets: rows2.slice(dated.length)
|
|
21504
21577
|
};
|
|
21505
|
-
}, [
|
|
21578
|
+
}, [
|
|
21579
|
+
eventInfo,
|
|
21580
|
+
explicitDates,
|
|
21581
|
+
isTimeSlot,
|
|
21582
|
+
(_b = ticketsQuery.data) == null ? void 0 : _b.tickets,
|
|
21583
|
+
slotQuery.data,
|
|
21584
|
+
slotQuery.isPlaceholderData
|
|
21585
|
+
]);
|
|
21586
|
+
const liveCatalog = useRef29({ tickets, date: slotDate });
|
|
21587
|
+
useLayoutEffect4(() => {
|
|
21588
|
+
liveCatalog.current = { tickets, date: slotDate };
|
|
21589
|
+
}, [tickets, slotDate]);
|
|
21590
|
+
const qty = useMemo16(
|
|
21591
|
+
() => catalogQuantities(
|
|
21592
|
+
selection.quantities,
|
|
21593
|
+
tickets,
|
|
21594
|
+
selection.rows,
|
|
21595
|
+
selection.date !== slotDate
|
|
21596
|
+
),
|
|
21597
|
+
[selection, tickets, slotDate]
|
|
21598
|
+
);
|
|
21506
21599
|
useEffect24(() => {
|
|
21507
21600
|
if (!current5()) return;
|
|
21508
21601
|
const next = isTimeSlot ? catalogDate(slotDate, dates) : "";
|
|
21509
21602
|
if (next !== slotDate) updateDate(next);
|
|
21510
|
-
|
|
21511
|
-
|
|
21603
|
+
updateSelection((previous) => {
|
|
21604
|
+
const quantities = catalogQuantities(
|
|
21605
|
+
previous.quantities,
|
|
21606
|
+
tickets,
|
|
21607
|
+
previous.rows,
|
|
21608
|
+
previous.date !== slotDate
|
|
21609
|
+
);
|
|
21610
|
+
return previous.rows === tickets && previous.date === slotDate && quantities === previous.quantities ? previous : { rows: tickets, date: slotDate, quantities };
|
|
21611
|
+
});
|
|
21612
|
+
}, [current5, isTimeSlot, slotDate, dates, tickets, updateDate, updateSelection]);
|
|
21512
21613
|
const setQty = useCallback14(
|
|
21513
21614
|
(update) => {
|
|
21514
|
-
if (current5())
|
|
21615
|
+
if (current5())
|
|
21616
|
+
updateSelection((previous) => {
|
|
21617
|
+
const { tickets: rows2, date } = liveCatalog.current;
|
|
21618
|
+
const quantities = catalogQuantities(
|
|
21619
|
+
previous.quantities,
|
|
21620
|
+
rows2,
|
|
21621
|
+
previous.rows,
|
|
21622
|
+
previous.date !== date
|
|
21623
|
+
);
|
|
21624
|
+
const requested = typeof update === "function" ? update(quantities) : update;
|
|
21625
|
+
return { rows: rows2, date, quantities: catalogQuantities(requested, rows2) };
|
|
21626
|
+
});
|
|
21515
21627
|
},
|
|
21516
|
-
[current5,
|
|
21628
|
+
[current5, updateSelection]
|
|
21517
21629
|
);
|
|
21518
21630
|
const setSlotDate = useCallback14(
|
|
21519
21631
|
(date) => {
|
|
@@ -23973,7 +24085,7 @@ var translateAccountMessage = (translate2, english, vars) => {
|
|
|
23973
24085
|
import { useState as useState35 } from "react";
|
|
23974
24086
|
|
|
23975
24087
|
// src/CardInput.tsx
|
|
23976
|
-
import { useEffect as useEffect27, useRef as
|
|
24088
|
+
import { useEffect as useEffect27, useRef as useRef30, useState as useState34 } from "react";
|
|
23977
24089
|
import { Platform, StyleSheet as StyleSheet4 } from "react-native";
|
|
23978
24090
|
import { CardField } from "@stripe/stripe-react-native";
|
|
23979
24091
|
|
|
@@ -24593,8 +24705,8 @@ var CardInput = ({
|
|
|
24593
24705
|
}) => {
|
|
24594
24706
|
const theme = useTheme();
|
|
24595
24707
|
const [attachment, setAttachment] = useState34(0);
|
|
24596
|
-
const handleRef =
|
|
24597
|
-
const visibleRef =
|
|
24708
|
+
const handleRef = useRef30(null);
|
|
24709
|
+
const visibleRef = useRef30(visible);
|
|
24598
24710
|
visibleRef.current = visible;
|
|
24599
24711
|
useEffect27(() => {
|
|
24600
24712
|
const handle = cardFields.mount(
|
|
@@ -25237,39 +25349,42 @@ var useCheckout2 = (opts = {}) => {
|
|
|
25237
25349
|
};
|
|
25238
25350
|
};
|
|
25239
25351
|
|
|
25240
|
-
// src/storage.ts
|
|
25241
|
-
import { MMKV } from "react-native-mmkv";
|
|
25242
|
-
var createMmkvStorage = (id2 = "tf-checkout") => {
|
|
25243
|
-
const mmkv = new MMKV({ id: id2 });
|
|
25244
|
-
return {
|
|
25245
|
-
getItem: (key5) => {
|
|
25246
|
-
var _a2;
|
|
25247
|
-
return (_a2 = mmkv.getString(key5)) != null ? _a2 : null;
|
|
25248
|
-
},
|
|
25249
|
-
setItem: (key5, value6) => mmkv.set(key5, value6),
|
|
25250
|
-
removeItem: (key5) => mmkv.delete(key5)
|
|
25251
|
-
};
|
|
25252
|
-
};
|
|
25253
|
-
|
|
25254
25352
|
// src/configure.ts
|
|
25255
|
-
var
|
|
25256
|
-
|
|
25257
|
-
|
|
25258
|
-
|
|
25259
|
-
|
|
25260
|
-
|
|
25261
|
-
|
|
25262
|
-
withCredentials: false,
|
|
25263
|
-
// Native owns no browser cookie jar. Ask the canonical session owner to
|
|
25264
|
-
// return its guest carrier and resume that exact carrier on later requests.
|
|
25265
|
-
auth: () => {
|
|
25266
|
-
var _a2;
|
|
25267
|
-
return {
|
|
25268
|
-
...(_a2 = config.auth) == null ? void 0 : _a2.call(config),
|
|
25269
|
-
"X-TF-Session-Mode": "header-only"
|
|
25270
|
-
};
|
|
25353
|
+
var requireStorage = (storage) => {
|
|
25354
|
+
if (!storage || typeof storage !== "object" || Array.isArray(storage) || ["getItem", "setItem", "removeItem"].some(
|
|
25355
|
+
(method) => typeof storage[method] !== "function" || Object.prototype.toString.call(storage[method]) === "[object AsyncFunction]"
|
|
25356
|
+
) || storage.flush !== void 0 && typeof storage.flush !== "function") {
|
|
25357
|
+
throw new Error(
|
|
25358
|
+
"Ticket Fairy native checkout requires a synchronous storage adapter. Pass storage backed by iOS Keychain or Android Keystore; hydrate an async-backed mirror before configuration and await flush() after credential changes."
|
|
25359
|
+
);
|
|
25271
25360
|
}
|
|
25272
|
-
}
|
|
25361
|
+
};
|
|
25362
|
+
var configureCheckout = (config) => {
|
|
25363
|
+
requireStorage(config == null ? void 0 : config.storage);
|
|
25364
|
+
configure({
|
|
25365
|
+
cookieAuth: true,
|
|
25366
|
+
...config,
|
|
25367
|
+
// NSURLSession/RCTNetworking would otherwise accept Set-Cookie outside
|
|
25368
|
+
// the SDK epoch guard. Only the SDK's header-backed jar owns native auth.
|
|
25369
|
+
withCredentials: false,
|
|
25370
|
+
// Native owns no browser cookie jar. Ask the canonical session owner to
|
|
25371
|
+
// return its guest carrier and resume that exact carrier on later requests.
|
|
25372
|
+
auth: () => {
|
|
25373
|
+
var _a2, _b;
|
|
25374
|
+
return {
|
|
25375
|
+
...Object.fromEntries(
|
|
25376
|
+
Object.entries((_b = (_a2 = config.auth) == null ? void 0 : _a2.call(config)) != null ? _b : {}).filter(
|
|
25377
|
+
([name]) => name.toLowerCase() !== "cache-control"
|
|
25378
|
+
)
|
|
25379
|
+
),
|
|
25380
|
+
"X-TF-Session-Mode": "header-only",
|
|
25381
|
+
// Account/ticket responses must not be saved by the native HTTP cache.
|
|
25382
|
+
// Revalidate any older cached response as well as forbidding a new store.
|
|
25383
|
+
"Cache-Control": "no-store, no-cache"
|
|
25384
|
+
};
|
|
25385
|
+
}
|
|
25386
|
+
});
|
|
25387
|
+
};
|
|
25273
25388
|
|
|
25274
25389
|
// src/ui/Field.tsx
|
|
25275
25390
|
import { useMemo as useMemo20, useState as useState36 } from "react";
|
|
@@ -25416,7 +25531,7 @@ var useFieldStyles = (theme) => useMemo20(
|
|
|
25416
25531
|
);
|
|
25417
25532
|
|
|
25418
25533
|
// src/ui/Select.tsx
|
|
25419
|
-
import { useCallback as useCallback16, useEffect as useEffect28, useMemo as useMemo21, useRef as
|
|
25534
|
+
import { useCallback as useCallback16, useEffect as useEffect28, useMemo as useMemo21, useRef as useRef31, useState as useState37 } from "react";
|
|
25420
25535
|
import { FlatList, Modal as Modal3, Pressable as Pressable4, StyleSheet as StyleSheet6, Text as Text5, View as View5 } from "react-native";
|
|
25421
25536
|
import { Fragment, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
25422
25537
|
function Select({
|
|
@@ -25432,7 +25547,7 @@ function Select({
|
|
|
25432
25547
|
const theme = useTheme();
|
|
25433
25548
|
const s9 = useSelectStyles(theme);
|
|
25434
25549
|
const [open, setOpen] = useState37(false);
|
|
25435
|
-
const interaction =
|
|
25550
|
+
const interaction = useRef31({ disabled, open: false, revision: 0 });
|
|
25436
25551
|
interaction.current.disabled = disabled;
|
|
25437
25552
|
const revision = interaction.current.revision;
|
|
25438
25553
|
const close = useCallback16(() => {
|
|
@@ -26064,7 +26179,7 @@ import {
|
|
|
26064
26179
|
Fragment as Fragment2,
|
|
26065
26180
|
useEffect as useEffect29,
|
|
26066
26181
|
useMemo as useMemo27,
|
|
26067
|
-
useRef as
|
|
26182
|
+
useRef as useRef32,
|
|
26068
26183
|
useState as useState40
|
|
26069
26184
|
} from "react";
|
|
26070
26185
|
import { Pressable as Pressable8, StyleSheet as StyleSheet13, Text as Text11, View as View12 } from "react-native";
|
|
@@ -26244,7 +26359,7 @@ var Tickets = ({
|
|
|
26244
26359
|
);
|
|
26245
26360
|
const [promoOpen, setPromoOpen] = hooks_exports.useScopedState(catalog.scope, false);
|
|
26246
26361
|
const [visibleDescription, setVisibleDescription] = useState40(null);
|
|
26247
|
-
const attributionEvent =
|
|
26362
|
+
const attributionEvent = useRef32(null);
|
|
26248
26363
|
useEffect29(() => {
|
|
26249
26364
|
var _a3;
|
|
26250
26365
|
if (!catalogCurrent() || !catalog.attributionReady || attributionEvent.current === eventId)
|
|
@@ -26289,11 +26404,12 @@ var Tickets = ({
|
|
|
26289
26404
|
}
|
|
26290
26405
|
}).catch(() => void 0);
|
|
26291
26406
|
};
|
|
26292
|
-
const originals =
|
|
26407
|
+
const originals = useRef32({});
|
|
26293
26408
|
useEffect29(() => {
|
|
26294
26409
|
for (const t of tickets)
|
|
26295
|
-
if (originals.current[t
|
|
26296
|
-
|
|
26410
|
+
if (originals.current[ticketPriceContext(catalog.scope, t)] == null)
|
|
26411
|
+
originals.current[ticketPriceContext(catalog.scope, t)] = t.price;
|
|
26412
|
+
}, [tickets, catalog.scope]);
|
|
26297
26413
|
const selected = tickets.filter((t) => {
|
|
26298
26414
|
var _a3;
|
|
26299
26415
|
return ((_a3 = qty[t.id]) != null ? _a3 : 0) > 0;
|
|
@@ -26355,7 +26471,7 @@ var Tickets = ({
|
|
|
26355
26471
|
var _a3, _b2;
|
|
26356
26472
|
const notStarted = !t.salesStarted;
|
|
26357
26473
|
const unavailable = t.soldOut || t.salesEnded || notStarted;
|
|
26358
|
-
const original = originals.current[t
|
|
26474
|
+
const original = originals.current[ticketPriceContext(catalog.scope, t)];
|
|
26359
26475
|
const discounted = original != null && original > t.price;
|
|
26360
26476
|
const isFree = Number(t.price) === 0;
|
|
26361
26477
|
const sym = t.priceSymbol || t.currency;
|
|
@@ -26770,7 +26886,7 @@ var SeatsIoMap = ({ eventId, initial, onContinue }) => {
|
|
|
26770
26886
|
};
|
|
26771
26887
|
|
|
26772
26888
|
// src/sections/SeatMap.tsx
|
|
26773
|
-
import { useEffect as useEffect30, useMemo as useMemo29, useRef as
|
|
26889
|
+
import { useEffect as useEffect30, useMemo as useMemo29, useRef as useRef33, useState as useState41 } from "react";
|
|
26774
26890
|
import { StyleSheet as StyleSheet14, Text as Text12, View as View14 } from "react-native";
|
|
26775
26891
|
import { WebView as WebView3 } from "react-native-webview";
|
|
26776
26892
|
|
|
@@ -26786,7 +26902,7 @@ var SeatMap = ({ eventId, onContinue }) => {
|
|
|
26786
26902
|
const theme = useTheme();
|
|
26787
26903
|
const flow = hooks_exports.useSeatSelection(eventId, checkout, onContinue);
|
|
26788
26904
|
const bundleStarting = hooks_exports.useBundleStarting(checkout.store);
|
|
26789
|
-
const webview =
|
|
26905
|
+
const webview = useRef33(null);
|
|
26790
26906
|
const [rendererError, setRendererError] = useState41(false);
|
|
26791
26907
|
const [size, setSize] = useState41(320);
|
|
26792
26908
|
const properties = flow.chart.state === "ready" ? {
|
|
@@ -27623,7 +27739,7 @@ import {
|
|
|
27623
27739
|
Fragment as Fragment10,
|
|
27624
27740
|
useEffect as useEffect31,
|
|
27625
27741
|
useMemo as useMemo32,
|
|
27626
|
-
useRef as
|
|
27742
|
+
useRef as useRef34,
|
|
27627
27743
|
useState as useState44
|
|
27628
27744
|
} from "react";
|
|
27629
27745
|
import { Linking as Linking5, Pressable as Pressable10, StyleSheet as StyleSheet19, Text as Text16, View as View22 } from "react-native";
|
|
@@ -27801,35 +27917,35 @@ var PhoneIdentity = ({
|
|
|
27801
27917
|
...options
|
|
27802
27918
|
}) => {
|
|
27803
27919
|
var _a2;
|
|
27804
|
-
const
|
|
27920
|
+
const identity2 = hooks_exports.useCheckoutPhoneIdentity(options);
|
|
27805
27921
|
const [code, setCode] = useState43("");
|
|
27806
27922
|
const [emailInstead, setEmailInstead] = useState43(false);
|
|
27807
27923
|
if (emailInstead) return null;
|
|
27808
|
-
if (
|
|
27924
|
+
if (identity2.challenge)
|
|
27809
27925
|
return /* @__PURE__ */ jsx23(
|
|
27810
27926
|
TwoFactorForm,
|
|
27811
27927
|
{
|
|
27812
|
-
loading:
|
|
27813
|
-
error:
|
|
27928
|
+
loading: identity2.busy,
|
|
27929
|
+
error: identity2.error,
|
|
27814
27930
|
successMessage: "",
|
|
27815
|
-
smsAvailable:
|
|
27816
|
-
smsRetryAfter:
|
|
27817
|
-
onSubmit:
|
|
27818
|
-
onSendSms:
|
|
27819
|
-
onCancel:
|
|
27931
|
+
smsAvailable: identity2.challenge.smsAvailable,
|
|
27932
|
+
smsRetryAfter: identity2.retryAfter,
|
|
27933
|
+
onSubmit: identity2.verifyTwoFactor,
|
|
27934
|
+
onSendSms: identity2.sendTwoFactorSms,
|
|
27935
|
+
onCancel: identity2.cancel
|
|
27820
27936
|
}
|
|
27821
27937
|
);
|
|
27822
27938
|
return /* @__PURE__ */ jsxs20(View20, { style: { gap: 12, paddingVertical: 12 }, children: [
|
|
27823
27939
|
/* @__PURE__ */ jsx23(Text15, { children: "Verify your phone to complete your details faster" }),
|
|
27824
|
-
|
|
27825
|
-
|
|
27940
|
+
identity2.error ? /* @__PURE__ */ jsx23(ErrorText, { children: identity2.error }) : null,
|
|
27941
|
+
identity2.verified ? /* @__PURE__ */ jsxs20(Fragment9, { children: [
|
|
27826
27942
|
/* @__PURE__ */ jsx23(MutedText, { children: "Your phone is verified." }),
|
|
27827
|
-
((_a2 =
|
|
27943
|
+
((_a2 = identity2.result) == null ? void 0 : _a2.prefill.has_known_email) === true && typeof identity2.result.prefill.email_masked === "string" ? /* @__PURE__ */ jsx23(
|
|
27828
27944
|
Checkbox,
|
|
27829
27945
|
{
|
|
27830
27946
|
checked: Boolean(knownEmailSelected),
|
|
27831
27947
|
onChange: onUseKnownEmail,
|
|
27832
|
-
label: `Send my tickets to ${
|
|
27948
|
+
label: `Send my tickets to ${identity2.result.prefill.email_masked}`
|
|
27833
27949
|
}
|
|
27834
27950
|
) : null
|
|
27835
27951
|
] }) : /* @__PURE__ */ jsxs20(Fragment9, { children: [
|
|
@@ -27837,14 +27953,14 @@ var PhoneIdentity = ({
|
|
|
27837
27953
|
Input,
|
|
27838
27954
|
{
|
|
27839
27955
|
accessibilityLabel: "Mobile number",
|
|
27840
|
-
value:
|
|
27841
|
-
onChangeText:
|
|
27956
|
+
value: identity2.phone,
|
|
27957
|
+
onChangeText: identity2.setPhone,
|
|
27842
27958
|
keyboardType: "phone-pad",
|
|
27843
27959
|
autoComplete: "tel",
|
|
27844
|
-
editable: !
|
|
27960
|
+
editable: !identity2.busy && !identity2.sent
|
|
27845
27961
|
}
|
|
27846
27962
|
) }),
|
|
27847
|
-
|
|
27963
|
+
identity2.sent ? /* @__PURE__ */ jsxs20(Fragment9, { children: [
|
|
27848
27964
|
/* @__PURE__ */ jsx23(Field, { label: "Verification code", children: /* @__PURE__ */ jsx23(
|
|
27849
27965
|
Input,
|
|
27850
27966
|
{
|
|
@@ -27855,15 +27971,15 @@ var PhoneIdentity = ({
|
|
|
27855
27971
|
autoComplete: "one-time-code",
|
|
27856
27972
|
maxLength: 6,
|
|
27857
27973
|
accessibilityLabel: "Verification code",
|
|
27858
|
-
editable: !
|
|
27974
|
+
editable: !identity2.busy
|
|
27859
27975
|
}
|
|
27860
27976
|
) }),
|
|
27861
27977
|
/* @__PURE__ */ jsx23(
|
|
27862
27978
|
Button,
|
|
27863
27979
|
{
|
|
27864
|
-
loading:
|
|
27980
|
+
loading: identity2.busy,
|
|
27865
27981
|
disabled: !/^\d{6}$/.test(code),
|
|
27866
|
-
onPress: () => void
|
|
27982
|
+
onPress: () => void identity2.verify(code),
|
|
27867
27983
|
children: "Verify phone"
|
|
27868
27984
|
}
|
|
27869
27985
|
)
|
|
@@ -27871,30 +27987,30 @@ var PhoneIdentity = ({
|
|
|
27871
27987
|
/* @__PURE__ */ jsx23(
|
|
27872
27988
|
Button,
|
|
27873
27989
|
{
|
|
27874
|
-
disabled:
|
|
27875
|
-
onPress: () => void
|
|
27876
|
-
children:
|
|
27990
|
+
disabled: identity2.busy || identity2.retryAfter > 0 || !identity2.phone.trim(),
|
|
27991
|
+
onPress: () => void identity2.request("sms"),
|
|
27992
|
+
children: identity2.retryAfter > 0 ? `Send another code in ${identity2.retryAfter}s` : "Send code by SMS"
|
|
27877
27993
|
}
|
|
27878
27994
|
),
|
|
27879
27995
|
options.whatsappAvailable ? /* @__PURE__ */ jsx23(
|
|
27880
27996
|
Button,
|
|
27881
27997
|
{
|
|
27882
27998
|
variant: "ghost",
|
|
27883
|
-
disabled:
|
|
27884
|
-
onPress: () => void
|
|
27999
|
+
disabled: identity2.busy || identity2.retryAfter > 0 || !identity2.phone.trim(),
|
|
28000
|
+
onPress: () => void identity2.request("whatsapp"),
|
|
27885
28001
|
children: "Send code by WhatsApp"
|
|
27886
28002
|
}
|
|
27887
28003
|
) : null
|
|
27888
28004
|
] }),
|
|
27889
|
-
(
|
|
28005
|
+
(identity2.sent || identity2.verified) && /* @__PURE__ */ jsx23(
|
|
27890
28006
|
Button,
|
|
27891
28007
|
{
|
|
27892
28008
|
variant: "ghost",
|
|
27893
|
-
disabled:
|
|
28009
|
+
disabled: identity2.busy,
|
|
27894
28010
|
onPress: () => {
|
|
27895
28011
|
setCode("");
|
|
27896
28012
|
onReset();
|
|
27897
|
-
void
|
|
28013
|
+
void identity2.cancel();
|
|
27898
28014
|
},
|
|
27899
28015
|
children: "Change phone number"
|
|
27900
28016
|
}
|
|
@@ -27903,9 +28019,9 @@ var PhoneIdentity = ({
|
|
|
27903
28019
|
Button,
|
|
27904
28020
|
{
|
|
27905
28021
|
variant: "ghost",
|
|
27906
|
-
disabled:
|
|
28022
|
+
disabled: identity2.busy,
|
|
27907
28023
|
onPress: () => {
|
|
27908
|
-
void
|
|
28024
|
+
void identity2.cancel().then(() => setEmailInstead(true));
|
|
27909
28025
|
},
|
|
27910
28026
|
children: "Use email instead"
|
|
27911
28027
|
}
|
|
@@ -28139,14 +28255,14 @@ var BillingInfo = ({
|
|
|
28139
28255
|
(prev) => holderDraftsReloaded(prev, checkout.holders, checkout.backfilledHolderIndexes)
|
|
28140
28256
|
);
|
|
28141
28257
|
});
|
|
28142
|
-
const restoredHolders =
|
|
28258
|
+
const restoredHolders = useRef34(checkout.holders);
|
|
28143
28259
|
hooks_exports.useOnEventChange(checkout.eventId, () => {
|
|
28144
28260
|
restoredHolders.current = [];
|
|
28145
28261
|
setHolders([]);
|
|
28146
28262
|
setDataCapture({});
|
|
28147
28263
|
});
|
|
28148
|
-
const profileSeeded =
|
|
28149
|
-
const countryDefaultApplied =
|
|
28264
|
+
const profileSeeded = useRef34(false);
|
|
28265
|
+
const countryDefaultApplied = useRef34(Boolean((_c = checkout.billing) == null ? void 0 : _c.countryId));
|
|
28150
28266
|
const {
|
|
28151
28267
|
setBilling: commitBilling,
|
|
28152
28268
|
setHolders: commitHolders,
|
|
@@ -29138,11 +29254,11 @@ var Payment = ({
|
|
|
29138
29254
|
};
|
|
29139
29255
|
|
|
29140
29256
|
// src/sections/WaiverSigning.tsx
|
|
29141
|
-
import { useMemo as useMemo35, useRef as
|
|
29257
|
+
import { useMemo as useMemo35, useRef as useRef36, useState as useState47 } from "react";
|
|
29142
29258
|
import { Pressable as Pressable12, ScrollView, StyleSheet as StyleSheet23, Text as Text19, View as View27 } from "react-native";
|
|
29143
29259
|
|
|
29144
29260
|
// src/ui/SignaturePad.tsx
|
|
29145
|
-
import { memo, useEffect as useEffect33, useMemo as useMemo34, useRef as
|
|
29261
|
+
import { memo, useEffect as useEffect33, useMemo as useMemo34, useRef as useRef35, useState as useState46 } from "react";
|
|
29146
29262
|
import { PanResponder, Pressable as Pressable11, StyleSheet as StyleSheet22, Text as Text18, View as View26 } from "react-native";
|
|
29147
29263
|
import { Fragment as Fragment13, jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
29148
29264
|
var LINE_WIDTH = 2.5;
|
|
@@ -29188,13 +29304,13 @@ var SignaturePad = ({
|
|
|
29188
29304
|
disabled
|
|
29189
29305
|
}) => {
|
|
29190
29306
|
const theme = useTheme();
|
|
29191
|
-
const strokesRef =
|
|
29307
|
+
const strokesRef = useRef35([]);
|
|
29192
29308
|
const [, setFrame] = useState46(0);
|
|
29193
|
-
const frameRequest =
|
|
29194
|
-
const size =
|
|
29195
|
-
const report =
|
|
29309
|
+
const frameRequest = useRef35(null);
|
|
29310
|
+
const size = useRef35({ width: 0, height: PAD_HEIGHT });
|
|
29311
|
+
const report = useRef35(onChange);
|
|
29196
29312
|
report.current = onChange;
|
|
29197
|
-
const disabledRef =
|
|
29313
|
+
const disabledRef = useRef35(disabled);
|
|
29198
29314
|
disabledRef.current = disabled;
|
|
29199
29315
|
const render = () => {
|
|
29200
29316
|
if (frameRequest.current !== null) cancelAnimationFrame(frameRequest.current);
|
|
@@ -29437,7 +29553,7 @@ var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error
|
|
|
29437
29553
|
const [problems, setProblems] = useState47([]);
|
|
29438
29554
|
const [pressed, setPressed] = useState47(false);
|
|
29439
29555
|
const frozen = busy || locked;
|
|
29440
|
-
const draftRef =
|
|
29556
|
+
const draftRef = useRef36(draft);
|
|
29441
29557
|
draftRef.current = draft;
|
|
29442
29558
|
const patch2 = (next) => {
|
|
29443
29559
|
if (!frozen) setDraft((d) => ({ ...d, ...next }));
|
|
@@ -30452,7 +30568,7 @@ var Trips = ({
|
|
|
30452
30568
|
};
|
|
30453
30569
|
|
|
30454
30570
|
// src/sections/EventDiscussionView.tsx
|
|
30455
|
-
import { useRef as
|
|
30571
|
+
import { useRef as useRef38, useState as useState53 } from "react";
|
|
30456
30572
|
import {
|
|
30457
30573
|
ActivityIndicator as ActivityIndicator4,
|
|
30458
30574
|
Alert as Alert4,
|
|
@@ -30806,7 +30922,7 @@ var s = StyleSheet29.create({
|
|
|
30806
30922
|
});
|
|
30807
30923
|
|
|
30808
30924
|
// src/sections/discussion/SwipeReply.tsx
|
|
30809
|
-
import { useMemo as useMemo39, useRef as
|
|
30925
|
+
import { useMemo as useMemo39, useRef as useRef37 } from "react";
|
|
30810
30926
|
import { Animated, PanResponder as PanResponder2, StyleSheet as StyleSheet30, Text as Text23, View as View35 } from "react-native";
|
|
30811
30927
|
import { jsx as jsx40, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
30812
30928
|
var SwipeReply = ({
|
|
@@ -30817,7 +30933,7 @@ var SwipeReply = ({
|
|
|
30817
30933
|
children
|
|
30818
30934
|
}) => {
|
|
30819
30935
|
const theme = useTheme();
|
|
30820
|
-
const offset =
|
|
30936
|
+
const offset = useRef37(new Animated.Value(0)).current;
|
|
30821
30937
|
const gesture = useMemo39(() => {
|
|
30822
30938
|
const reset = () => Animated.spring(offset, { toValue: 0, useNativeDriver: true }).start();
|
|
30823
30939
|
return PanResponder2.create({
|
|
@@ -30898,8 +31014,8 @@ var EventDiscussionBody = ({
|
|
|
30898
31014
|
var _a2, _b, _c;
|
|
30899
31015
|
const theme = useTheme();
|
|
30900
31016
|
const t = useAccountT(locale);
|
|
30901
|
-
const list2 =
|
|
30902
|
-
const firstContent =
|
|
31017
|
+
const list2 = useRef38(null);
|
|
31018
|
+
const firstContent = useRef38(true);
|
|
30903
31019
|
const [actions, setActions] = useState53(null);
|
|
30904
31020
|
const [reporting, setReporting] = useState53(null);
|
|
30905
31021
|
const [moderating, setModerating] = useState53(null);
|
|
@@ -30908,7 +31024,7 @@ var EventDiscussionBody = ({
|
|
|
30908
31024
|
const [pickerError, setPickerError] = useState53("");
|
|
30909
31025
|
const [imageOpen, setImageOpen] = useState53(false);
|
|
30910
31026
|
const [pickerBusy, setPickerBusy] = useState53(false);
|
|
30911
|
-
const picking =
|
|
31027
|
+
const picking = useRef38(false);
|
|
30912
31028
|
const text6 = { color: theme.text, fontFamily: theme.fontFamily };
|
|
30913
31029
|
const muted = { color: theme.muted, fontFamily: theme.fontFamily };
|
|
30914
31030
|
const closeActions = (work) => {
|
|
@@ -31922,7 +32038,7 @@ var styles15 = StyleSheet32.create({
|
|
|
31922
32038
|
});
|
|
31923
32039
|
|
|
31924
32040
|
// src/sections/Streaming.tsx
|
|
31925
|
-
import { useMemo as useMemo40, useRef as
|
|
32041
|
+
import { useMemo as useMemo40, useRef as useRef39, useState as useState54 } from "react";
|
|
31926
32042
|
import {
|
|
31927
32043
|
ActivityIndicator as ActivityIndicator5,
|
|
31928
32044
|
Alert as Alert6,
|
|
@@ -31957,7 +32073,7 @@ var StreamingView = ({
|
|
|
31957
32073
|
);
|
|
31958
32074
|
const session = hooks_exports.useAuthSession();
|
|
31959
32075
|
const assertOwner = hooks_exports.useSessionAction();
|
|
31960
|
-
const pendingBrowser =
|
|
32076
|
+
const pendingBrowser = useRef39({ scope: session.sessionScope, locked: false });
|
|
31961
32077
|
const [stored, setStored] = useState54({
|
|
31962
32078
|
scope: session.sessionScope,
|
|
31963
32079
|
busy: false,
|
|
@@ -34060,7 +34176,7 @@ function AccountEmailEnrichment({
|
|
|
34060
34176
|
}
|
|
34061
34177
|
|
|
34062
34178
|
// src/auth/AuthModal.tsx
|
|
34063
|
-
import { useCallback as useCallback17, useEffect as useEffect41, useRef as
|
|
34179
|
+
import { useCallback as useCallback17, useEffect as useEffect41, useRef as useRef40 } from "react";
|
|
34064
34180
|
import { Image as Image8, Modal as Modal7, Pressable as Pressable26, ScrollView as ScrollView4, StyleSheet as StyleSheet42, Text as Text34, View as View55 } from "react-native";
|
|
34065
34181
|
import { jsx as jsx60, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
34066
34182
|
var Tab = ({
|
|
@@ -34287,7 +34403,7 @@ var PhoneAccountModal = ({
|
|
|
34287
34403
|
},
|
|
34288
34404
|
onCancelled: onClose
|
|
34289
34405
|
});
|
|
34290
|
-
const prepared =
|
|
34406
|
+
const prepared = useRef40(false);
|
|
34291
34407
|
useEffect41(() => {
|
|
34292
34408
|
if (prepared.current) return;
|
|
34293
34409
|
prepared.current = true;
|
|
@@ -34450,7 +34566,7 @@ var styles21 = StyleSheet43.create({
|
|
|
34450
34566
|
});
|
|
34451
34567
|
|
|
34452
34568
|
// src/EmbeddedCheckout.tsx
|
|
34453
|
-
import { useEffect as useEffect42, useRef as
|
|
34569
|
+
import { useEffect as useEffect42, useRef as useRef41, useState as useState61 } from "react";
|
|
34454
34570
|
import { Pressable as Pressable27, ScrollView as ScrollView5, StyleSheet as StyleSheet44, Text as Text36, View as View57 } from "react-native";
|
|
34455
34571
|
import { Fragment as Fragment32, jsx as jsx62, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
34456
34572
|
var Flow = ({
|
|
@@ -34480,7 +34596,7 @@ var Flow = ({
|
|
|
34480
34596
|
const theme = useTheme();
|
|
34481
34597
|
const [view, setView] = useState61(initialView);
|
|
34482
34598
|
const [selectionView, setSelectionView] = useState61(initialView);
|
|
34483
|
-
const editedDetailsRef =
|
|
34599
|
+
const editedDetailsRef = useRef41(null);
|
|
34484
34600
|
const [authRequest, setAuthRequest] = useState61(
|
|
34485
34601
|
null
|
|
34486
34602
|
);
|
|
@@ -34924,7 +35040,7 @@ export {
|
|
|
34924
35040
|
clearCheckoutGuestSession,
|
|
34925
35041
|
clearSession,
|
|
34926
35042
|
computeRadialTreeLayout,
|
|
34927
|
-
configure,
|
|
35043
|
+
configureCheckout as configure,
|
|
34928
35044
|
configureCheckout,
|
|
34929
35045
|
confirmBundlePaymentWith,
|
|
34930
35046
|
confirmInstallmentsHasNextAction,
|
|
@@ -34942,7 +35058,6 @@ export {
|
|
|
34942
35058
|
createInstallmentChoices,
|
|
34943
35059
|
createLiveScope,
|
|
34944
35060
|
createMemoryStorage,
|
|
34945
|
-
createMmkvStorage,
|
|
34946
35061
|
createOwnedElements,
|
|
34947
35062
|
createPaymentMarks,
|
|
34948
35063
|
createProviderPages,
|
|
@@ -35029,7 +35144,6 @@ export {
|
|
|
35029
35144
|
mirroredHolderDraft,
|
|
35030
35145
|
missingCheckoutDetails,
|
|
35031
35146
|
missingRequiredAddOns,
|
|
35032
|
-
mmkvStorageAdapter,
|
|
35033
35147
|
mountKeyedField,
|
|
35034
35148
|
nativeStripeErrorOutcome,
|
|
35035
35149
|
newBundleIdempotencyKey,
|
|
@@ -35180,6 +35294,7 @@ export {
|
|
|
35180
35294
|
ticketConfirmerKey,
|
|
35181
35295
|
ticketFieldsFor,
|
|
35182
35296
|
ticketPaymentKeys,
|
|
35297
|
+
ticketPriceContext,
|
|
35183
35298
|
ticketQuantityRange,
|
|
35184
35299
|
ticketRefundConsequences,
|
|
35185
35300
|
ticketTypesForTier,
|