tf-checkout-react-native 2.0.0-beta.5 → 2.0.0-beta.7
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/dist/index.d.mts +124 -4
- package/dist/index.d.ts +124 -4
- package/dist/index.js +1702 -749
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1657 -688
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/sections/AccountDeletion.tsx +329 -0
- package/src/sections/EventDiscussionView.tsx +4 -0
- package/src/sections/Streaming.tsx +278 -0
- package/src/sections/discussion/CommentImages.tsx +34 -10
- package/src/sections/index.ts +12 -0
package/dist/index.mjs
CHANGED
|
@@ -81,6 +81,8 @@ import {
|
|
|
81
81
|
useState as useState22,
|
|
82
82
|
useSyncExternalStore as useSyncExternalStore15
|
|
83
83
|
} from "react";
|
|
84
|
+
import { useEffect as useEffect18, useRef as useRef21, useState as useState23 } from "react";
|
|
85
|
+
import { useQueryClient as useQueryClient13 } from "@tanstack/react-query";
|
|
84
86
|
var __defProp = Object.defineProperty;
|
|
85
87
|
var __export = (target, all) => {
|
|
86
88
|
for (var name in all)
|
|
@@ -135,12 +137,13 @@ var getConfig = () => {
|
|
|
135
137
|
var getOriginUrl = () => getConfig().host;
|
|
136
138
|
var isConfigured = () => current !== null;
|
|
137
139
|
var TtfError = class extends Error {
|
|
138
|
-
constructor(message, status, code, data) {
|
|
140
|
+
constructor(message, status, code, data, retryAfter) {
|
|
139
141
|
super(message);
|
|
140
142
|
this.name = "TtfError";
|
|
141
143
|
this.status = status;
|
|
142
144
|
this.code = code;
|
|
143
145
|
this.data = data;
|
|
146
|
+
this.retryAfter = retryAfter;
|
|
144
147
|
}
|
|
145
148
|
};
|
|
146
149
|
var flattenMessages = (value6) => {
|
|
@@ -169,8 +172,14 @@ var codeFrom = (payload) => {
|
|
|
169
172
|
}
|
|
170
173
|
return void 0;
|
|
171
174
|
};
|
|
175
|
+
var retryAfterFrom = (value6) => {
|
|
176
|
+
if (typeof value6 !== "string" && typeof value6 !== "number") return void 0;
|
|
177
|
+
const text3 = String(value6).trim();
|
|
178
|
+
const seconds = /^\d+$/.test(text3) ? Number(text3) : (Date.parse(text3) - Date.now()) / 1e3;
|
|
179
|
+
return Number.isFinite(seconds) && seconds > 0 ? Math.ceil(seconds) : void 0;
|
|
180
|
+
};
|
|
172
181
|
var toTtfError = (error, fallback = "Something went wrong") => {
|
|
173
|
-
var _a, _b, _c;
|
|
182
|
+
var _a, _b, _c, _d, _e;
|
|
174
183
|
if (error instanceof TtfError) return error;
|
|
175
184
|
if (error instanceof AxiosError) {
|
|
176
185
|
const status = (_b = (_a = error.response) == null ? void 0 : _a.status) != null ? _b : 0;
|
|
@@ -179,7 +188,8 @@ var toTtfError = (error, fallback = "Something went wrong") => {
|
|
|
179
188
|
messageFrom(payload, error.message || fallback),
|
|
180
189
|
status,
|
|
181
190
|
codeFrom(payload),
|
|
182
|
-
payload
|
|
191
|
+
payload,
|
|
192
|
+
retryAfterFrom((_e = (_d = error.response) == null ? void 0 : _d.headers) == null ? void 0 : _e["retry-after"])
|
|
183
193
|
);
|
|
184
194
|
}
|
|
185
195
|
if (error instanceof Error) return new TtfError(error.message || fallback, 0);
|
|
@@ -458,11 +468,11 @@ var active = null;
|
|
|
458
468
|
var eventSuffix = /^(?:tickets|add-to-cart|add-ons(?:\/reserve)?|custom_fields|conditions|promo|currency|password|track|referrer|add_to_waiting_list|send-rsvp-info|extras\/(?:accommodation|reserve)|festival\/(?:accommodation|reserve)|waiver(?:\/signature-image)?|seat-token|seat-chart|seats\/(?:selection-(?:cart|status|reserve|release)|reserve(?:\/block)?|status|delete-reserved))\/?$/;
|
|
459
469
|
var checkoutGrantEvent = (url2, currentEvent) => {
|
|
460
470
|
if (/^(?:[a-z][a-z\d+.-]*:)?\/\//i.test(url2)) return null;
|
|
461
|
-
const
|
|
462
|
-
const event = /^v1\/event\/([1-9]\d*)(?:\/(.*))?$/.exec(
|
|
471
|
+
const path4 = url2.split(/[?#]/, 1)[0].replace(/^\/+/, "").replace(/^api\//, "");
|
|
472
|
+
const event = /^v1\/event\/([1-9]\d*)(?:\/(.*))?$/.exec(path4);
|
|
463
473
|
if (event)
|
|
464
474
|
return event[1] === currentEvent && (!event[2] || eventSuffix.test(event[2])) ? event[1] : null;
|
|
465
|
-
if (/^v1\/(?:cart|checkout-configs|checkout|on-checkout)\/?$/.test(
|
|
475
|
+
if (/^v1\/(?:cart|checkout-configs|checkout|on-checkout)\/?$/.test(path4) || /^v1\/checkout\/(?:request-phone-code|verify-phone-code)\/?$/.test(path4) || /^v1\/order\/[^/]+\/verify-customer-order\/?$/.test(path4))
|
|
466
476
|
return currentEvent;
|
|
467
477
|
return null;
|
|
468
478
|
};
|
|
@@ -1192,23 +1202,23 @@ var missingCheckoutDetails = (state, options = {}) => {
|
|
|
1192
1202
|
return missing;
|
|
1193
1203
|
};
|
|
1194
1204
|
var buildOnCheckoutBody = (input, base = {}) => {
|
|
1195
|
-
const
|
|
1205
|
+
const attributes6 = { ...base };
|
|
1196
1206
|
const buyer2 = input.buyerFields || {};
|
|
1197
1207
|
if (buyer2.phoneVerificationToken)
|
|
1198
|
-
|
|
1208
|
+
attributes6.phone_verification_token = buyer2.phoneVerificationToken;
|
|
1199
1209
|
if (buyer2.phoneVerificationToken && buyer2.phoneFirstUseKnownEmail === true)
|
|
1200
|
-
|
|
1210
|
+
attributes6.phone_first_use_known_email = true;
|
|
1201
1211
|
if (buyer2.nationality !== void 0 && buyer2.nationality !== "") {
|
|
1202
|
-
|
|
1212
|
+
attributes6.nationality = buyer2.nationality;
|
|
1203
1213
|
}
|
|
1204
1214
|
if (buyer2.gender) {
|
|
1205
|
-
|
|
1215
|
+
attributes6.gender = buyer2.gender;
|
|
1206
1216
|
}
|
|
1207
1217
|
if (buyer2.instagramHandle) {
|
|
1208
|
-
|
|
1218
|
+
attributes6.instagram_handle = buyer2.instagramHandle;
|
|
1209
1219
|
}
|
|
1210
1220
|
if (hasKeys(input.dataCapture)) {
|
|
1211
|
-
|
|
1221
|
+
attributes6.data_capture = { ...input.dataCapture };
|
|
1212
1222
|
}
|
|
1213
1223
|
if (input.ticketHolders && input.ticketHolders.length) {
|
|
1214
1224
|
const holders = [];
|
|
@@ -1232,21 +1242,21 @@ var buildOnCheckoutBody = (input, base = {}) => {
|
|
|
1232
1242
|
holders.push(row);
|
|
1233
1243
|
ticketDataCapture.push(hasKeys(capture) ? { ...capture } : {});
|
|
1234
1244
|
});
|
|
1235
|
-
|
|
1245
|
+
attributes6.ticket_holders = holders;
|
|
1236
1246
|
if (hasTicketCapture) {
|
|
1237
|
-
|
|
1247
|
+
attributes6.ticket_data_capture = ticketDataCapture;
|
|
1238
1248
|
}
|
|
1239
1249
|
}
|
|
1240
1250
|
if (hasKeys(input.addOns)) {
|
|
1241
|
-
|
|
1251
|
+
attributes6.add_ons = { ...input.addOns };
|
|
1242
1252
|
}
|
|
1243
1253
|
if (hasKeys(input.addOnDataCapture)) {
|
|
1244
|
-
|
|
1254
|
+
attributes6.add_on_data_capture = { ...input.addOnDataCapture };
|
|
1245
1255
|
}
|
|
1246
1256
|
if (input.waiverSignatures && input.waiverSignatures.length) {
|
|
1247
|
-
|
|
1257
|
+
attributes6.waiver_signatures = input.waiverSignatures.map((entry) => ({ ...entry }));
|
|
1248
1258
|
}
|
|
1249
|
-
return
|
|
1259
|
+
return attributes6;
|
|
1250
1260
|
};
|
|
1251
1261
|
var evaluateFieldGates = (gates) => {
|
|
1252
1262
|
const g = gates || {};
|
|
@@ -1343,9 +1353,9 @@ var buildChangePaymentMethodAttributes = (input) => ({
|
|
|
1343
1353
|
order_hash: input.orderHash,
|
|
1344
1354
|
redirect: false
|
|
1345
1355
|
});
|
|
1346
|
-
var resolvePayPalForm = (
|
|
1347
|
-
const actionUrl =
|
|
1348
|
-
const fields =
|
|
1356
|
+
var resolvePayPalForm = (attributes6) => {
|
|
1357
|
+
const actionUrl = attributes6 && attributes6.action_url;
|
|
1358
|
+
const fields = attributes6 && attributes6.fields;
|
|
1349
1359
|
if (typeof actionUrl !== "string" || !actionUrl) return null;
|
|
1350
1360
|
if (!fields || typeof fields !== "object") return null;
|
|
1351
1361
|
return { action_url: actionUrl, fields };
|
|
@@ -1671,8 +1681,8 @@ var rewardsFromResponse = (response) => {
|
|
|
1671
1681
|
if (!isObject(response)) return null;
|
|
1672
1682
|
if (looksLikeRewards(response)) return response;
|
|
1673
1683
|
const data = isObject(response.data) ? response.data : {};
|
|
1674
|
-
const
|
|
1675
|
-
for (const candidate of [
|
|
1684
|
+
const attributes6 = isObject(data.attributes) ? data.attributes : {};
|
|
1685
|
+
for (const candidate of [attributes6.rewards, data.rewards, response.rewards]) {
|
|
1676
1686
|
if (looksLikeRewards(candidate)) return candidate;
|
|
1677
1687
|
}
|
|
1678
1688
|
return null;
|
|
@@ -2707,8 +2717,8 @@ var mapBundle = (b) => {
|
|
|
2707
2717
|
maxQuantity: max
|
|
2708
2718
|
};
|
|
2709
2719
|
};
|
|
2710
|
-
var bundlesFromCatalog = (
|
|
2711
|
-
const attrs =
|
|
2720
|
+
var bundlesFromCatalog = (attributes6) => {
|
|
2721
|
+
const attrs = attributes6 != null ? attributes6 : {};
|
|
2712
2722
|
return asList(attrs.bundles).map(mapBundle).filter((bundle) => bundle.id !== "");
|
|
2713
2723
|
};
|
|
2714
2724
|
var bundleQuantityRange = (bundle) => {
|
|
@@ -3715,18 +3725,18 @@ var ticketChangeDoneCopy = (result2) => {
|
|
|
3715
3725
|
var slotAlternativesFromError = (error) => {
|
|
3716
3726
|
const e = error != null ? error : {};
|
|
3717
3727
|
const payload = e.data && typeof e.data === "object" ? e.data : e;
|
|
3718
|
-
return list(payload.alternatives).map((
|
|
3728
|
+
return list(payload.alternatives).map((s6) => {
|
|
3719
3729
|
var _a, _b, _c, _d, _e;
|
|
3720
3730
|
return {
|
|
3721
|
-
ticketTypeId: String((_a =
|
|
3722
|
-
label: String((_c = (_b =
|
|
3723
|
-
startsAt: String((_d =
|
|
3724
|
-
slotValue: String((_e =
|
|
3731
|
+
ticketTypeId: String((_a = s6.ticketTypeId) != null ? _a : ""),
|
|
3732
|
+
label: String((_c = (_b = s6.label) != null ? _b : s6.startsAt) != null ? _c : ""),
|
|
3733
|
+
startsAt: String((_d = s6.startsAt) != null ? _d : ""),
|
|
3734
|
+
slotValue: String((_e = s6.slotValue) != null ? _e : "")
|
|
3725
3735
|
};
|
|
3726
|
-
}).filter((
|
|
3736
|
+
}).filter((s6) => s6.ticketTypeId !== "" && s6.label !== "").slice(0, 3);
|
|
3727
3737
|
};
|
|
3728
3738
|
var ticketChangeView = (options) => options.canChange ? "choose" : "closed";
|
|
3729
|
-
var resolveSiteUrl = (
|
|
3739
|
+
var resolveSiteUrl = (path4, origin) => /^https?:\/\//i.test(path4) ? path4 : `${origin.replace(/\/+$/, "")}/${path4.replace(/^\/+/, "")}`;
|
|
3730
3740
|
var ticketChangeAccessKey = (access) => {
|
|
3731
3741
|
var _a;
|
|
3732
3742
|
return JSON.stringify([access.ticketHash, (_a = access.orderHash) != null ? _a : ""]);
|
|
@@ -3924,8 +3934,8 @@ var signaturePngDataUrl = (strokes, { padWidth, padHeight, width = 600, lineWidt
|
|
|
3924
3934
|
const a = points[i - 1];
|
|
3925
3935
|
const b = points[i];
|
|
3926
3936
|
const steps = Math.max(1, Math.ceil(Math.hypot(b.x - a.x, b.y - a.y) * 2));
|
|
3927
|
-
for (let
|
|
3928
|
-
ink(a.x + (b.x - a.x) *
|
|
3937
|
+
for (let s6 = 0; s6 <= steps; s6++) {
|
|
3938
|
+
ink(a.x + (b.x - a.x) * s6 / steps, a.y + (b.y - a.y) * s6 / steps);
|
|
3929
3939
|
}
|
|
3930
3940
|
}
|
|
3931
3941
|
}
|
|
@@ -4188,23 +4198,23 @@ var waiverSignaturesAttribute = (waiver, signatures, holders, billing, backfille
|
|
|
4188
4198
|
backfilledHolderIndexes
|
|
4189
4199
|
);
|
|
4190
4200
|
if (!waiver || !counted) return [];
|
|
4191
|
-
return Object.entries(counted).map(([index,
|
|
4201
|
+
return Object.entries(counted).map(([index, s6]) => [Number(index), s6]).filter(([index]) => Number.isInteger(index) && index >= 0 && index < holders.length).sort(([a], [b]) => a - b).map(([index, s6]) => {
|
|
4192
4202
|
var _a, _b, _c, _d;
|
|
4193
4203
|
return {
|
|
4194
4204
|
holder_index: index,
|
|
4195
4205
|
version_id: waiver.versionId,
|
|
4196
4206
|
body_sha256: waiver.bodySha256,
|
|
4197
|
-
signer_role:
|
|
4198
|
-
first_name:
|
|
4199
|
-
last_name:
|
|
4200
|
-
...
|
|
4201
|
-
minor_name: (_a =
|
|
4202
|
-
guardian_relationship: (_b =
|
|
4203
|
-
...
|
|
4207
|
+
signer_role: s6.signerRole,
|
|
4208
|
+
first_name: s6.firstName,
|
|
4209
|
+
last_name: s6.lastName,
|
|
4210
|
+
...s6.signerRole === "guardian" ? {
|
|
4211
|
+
minor_name: (_a = s6.minorName) != null ? _a : "",
|
|
4212
|
+
guardian_relationship: (_b = s6.guardianRelationship) != null ? _b : "",
|
|
4213
|
+
...s6.minorDob ? { minor_dob: s6.minorDob } : {}
|
|
4204
4214
|
} : {},
|
|
4205
|
-
method:
|
|
4206
|
-
...
|
|
4207
|
-
agree_electronic:
|
|
4215
|
+
method: s6.method,
|
|
4216
|
+
...s6.method === "typed" ? { typed_name: (_c = s6.typedName) != null ? _c : "" } : { image_reference: (_d = s6.imageReference) != null ? _d : "" },
|
|
4217
|
+
agree_electronic: s6.agreeElectronic
|
|
4208
4218
|
};
|
|
4209
4219
|
});
|
|
4210
4220
|
};
|
|
@@ -4282,7 +4292,7 @@ var checkoutIsBusy = (snapshot) => {
|
|
|
4282
4292
|
};
|
|
4283
4293
|
var cartTicketCount = (cart) => {
|
|
4284
4294
|
var _a, _b;
|
|
4285
|
-
return cart.selections.reduce((n,
|
|
4295
|
+
return cart.selections.reduce((n, s6) => n + s6.quantity, 0) || ((_b = (_a = cart.breakdown) == null ? void 0 : _a.tickets) != null ? _b : []).reduce((n, line) => n + line.quantity, 0) || 1;
|
|
4286
4296
|
};
|
|
4287
4297
|
var cartTicketSlots = (cart) => {
|
|
4288
4298
|
var _a, _b;
|
|
@@ -5375,18 +5385,22 @@ __export(api_exports, {
|
|
|
5375
5385
|
confirmPreRegistration: () => confirmPreRegistration,
|
|
5376
5386
|
confirmRedirect: () => confirmRedirect,
|
|
5377
5387
|
connectAppleMusic: () => connectAppleMusic,
|
|
5388
|
+
connectSpotify: () => connectSpotify,
|
|
5378
5389
|
createEventComment: () => createEventComment,
|
|
5379
5390
|
createOrder: () => createOrder,
|
|
5380
5391
|
createPack: () => createPack,
|
|
5381
5392
|
createPaymentPlan: () => createPaymentPlan,
|
|
5382
5393
|
declineResale: () => declineResale,
|
|
5383
5394
|
decodeShareActionToken: () => decodeShareActionToken,
|
|
5395
|
+
deleteAccount: () => deleteAccount,
|
|
5384
5396
|
disconnectAccount: () => disconnectAccount,
|
|
5385
5397
|
disconnectAppleMusic: () => disconnectAppleMusic,
|
|
5398
|
+
disconnectSpotify: () => disconnectSpotify,
|
|
5386
5399
|
exchangeBrowserSignIn: () => exchangeBrowserSignIn,
|
|
5387
5400
|
exchangeCheckoutBrowserCode: () => exchangeCheckoutBrowserCode,
|
|
5388
5401
|
filterAddonsForTickets: () => filterAddonsForTickets,
|
|
5389
5402
|
getAccommodation: () => getAccommodation,
|
|
5403
|
+
getAccountDeletionStatus: () => getAccountDeletionStatus,
|
|
5390
5404
|
getAccountRewards: () => getAccountRewards,
|
|
5391
5405
|
getCart: () => getCart,
|
|
5392
5406
|
getCheckoutBuyerProfile: () => getCheckoutBuyerProfile,
|
|
@@ -5492,6 +5506,7 @@ __export(api_exports, {
|
|
|
5492
5506
|
sdkSeatSessionHeaders: () => sdkSeatSessionHeaders,
|
|
5493
5507
|
seatSelectionSecurity: () => seatSelectionSecurity,
|
|
5494
5508
|
sellTicket: () => sellTicket,
|
|
5509
|
+
sendAccountDeletionCode: () => sendAccountDeletionCode,
|
|
5495
5510
|
sendCheckoutTwoFactorSms: () => sendCheckoutTwoFactorSms,
|
|
5496
5511
|
sendPhoneCode: () => sendPhoneCode,
|
|
5497
5512
|
sendRsvp: () => sendRsvp,
|
|
@@ -5581,15 +5596,15 @@ var assertSuccess = (response) => {
|
|
|
5581
5596
|
}
|
|
5582
5597
|
return response.data;
|
|
5583
5598
|
};
|
|
5584
|
-
var updateAccount = async (
|
|
5599
|
+
var updateAccount = async (attributes6) => {
|
|
5585
5600
|
const response = await patch(ENDPOINTS.profile.account, {
|
|
5586
|
-
data: { attributes:
|
|
5601
|
+
data: { attributes: attributes6 }
|
|
5587
5602
|
});
|
|
5588
5603
|
return assertSuccess(response);
|
|
5589
5604
|
};
|
|
5590
|
-
var updateProfile = async (
|
|
5605
|
+
var updateProfile = async (attributes6) => {
|
|
5591
5606
|
const epoch = getSessionEpoch();
|
|
5592
|
-
const normalized = buildProfileUpdate(
|
|
5607
|
+
const normalized = buildProfileUpdate(attributes6);
|
|
5593
5608
|
const response = await patch(ENDPOINTS.profile.update, {
|
|
5594
5609
|
data: { attributes: normalized }
|
|
5595
5610
|
});
|
|
@@ -5741,13 +5756,13 @@ var register = async (fields) => {
|
|
|
5741
5756
|
return profile;
|
|
5742
5757
|
}
|
|
5743
5758
|
const data = res.data;
|
|
5744
|
-
const
|
|
5745
|
-
if (
|
|
5759
|
+
const attributes6 = data && typeof data === "object" && "attributes" in data ? data.attributes : void 0;
|
|
5760
|
+
if (attributes6 == null ? void 0 : attributes6.access_token) {
|
|
5746
5761
|
assertAuthEpoch(epoch);
|
|
5747
5762
|
setTokens(
|
|
5748
5763
|
{
|
|
5749
|
-
access:
|
|
5750
|
-
refresh:
|
|
5764
|
+
access: attributes6.access_token,
|
|
5765
|
+
refresh: attributes6.refresh_token
|
|
5751
5766
|
},
|
|
5752
5767
|
epoch
|
|
5753
5768
|
);
|
|
@@ -5761,7 +5776,7 @@ var register = async (fields) => {
|
|
|
5761
5776
|
if (error instanceof TtfError && error.code === "two_factor_auth") throw error;
|
|
5762
5777
|
}
|
|
5763
5778
|
}
|
|
5764
|
-
const candidate = (_c =
|
|
5779
|
+
const candidate = (_c = attributes6 == null ? void 0 : attributes6.user_profile) != null ? _c : data;
|
|
5765
5780
|
assertAuthEpoch(epoch);
|
|
5766
5781
|
const firstName = String((_e = (_d = candidate == null ? void 0 : candidate.firstName) != null ? _d : candidate == null ? void 0 : candidate.first_name) != null ? _e : "");
|
|
5767
5782
|
const lastName = String((_g = (_f = candidate == null ? void 0 : candidate.lastName) != null ? _f : candidate == null ? void 0 : candidate.last_name) != null ? _g : "");
|
|
@@ -6189,7 +6204,7 @@ var decodeShareActionToken = (value6, method) => {
|
|
|
6189
6204
|
}
|
|
6190
6205
|
return value6;
|
|
6191
6206
|
};
|
|
6192
|
-
var confirmPreRegistration = async (eventId,
|
|
6207
|
+
var confirmPreRegistration = async (eventId, attributes6) => post(ENDPOINTS.preRegistration.confirm(eventId), { data: { attributes: attributes6 } });
|
|
6193
6208
|
var getInfluencers = async (eventId) => get(ENDPOINTS.preRegistration.influencers(eventId));
|
|
6194
6209
|
var getConfirmationPage = async (hash) => get(ENDPOINTS.preRegistration.confirmationPage(hash));
|
|
6195
6210
|
var submitShareAction = async (hash, input) => {
|
|
@@ -6357,14 +6372,14 @@ var getEventInfo = async (eventId, pk) => {
|
|
|
6357
6372
|
const body = await get(ENDPOINTS.events.info(eventId), {
|
|
6358
6373
|
params: pk ? { pk } : void 0
|
|
6359
6374
|
});
|
|
6360
|
-
const
|
|
6361
|
-
const a =
|
|
6375
|
+
const attributes6 = (_b = (_a = body == null ? void 0 : body.data) == null ? void 0 : _a.attributes) != null ? _b : {};
|
|
6376
|
+
const a = attributes6;
|
|
6362
6377
|
const slotSettings = (_d = (_c = a.timeslotSettings) != null ? _c : a.timeslot_settings) != null ? _d : {};
|
|
6363
6378
|
const dates = (_g = (_f = (_e = slotSettings.availableDates) != null ? _e : slotSettings.available_dates) != null ? _f : a.available_dates) != null ? _g : [];
|
|
6364
6379
|
const rawCountry = a.country;
|
|
6365
6380
|
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;
|
|
6366
6381
|
return {
|
|
6367
|
-
isSeatedEvent: isSeatedEvent(
|
|
6382
|
+
isSeatedEvent: isSeatedEvent(attributes6),
|
|
6368
6383
|
tableMapEnabled: Boolean((_k = a.tableMapEnabled) != null ? _k : a.table_map_enabled),
|
|
6369
6384
|
isTimeSlotEvent: Boolean(
|
|
6370
6385
|
(_n = (_m = (_l = a.isTimeSlotEvent) != null ? _l : a.is_time_slot_event) != null ? _m : a.time_slot_event) != null ? _n : a.is_timeslot
|
|
@@ -6373,8 +6388,8 @@ var getEventInfo = async (eventId, pk) => {
|
|
|
6373
6388
|
allowMultipleTicketTypePurchases: Boolean(
|
|
6374
6389
|
(_o = a.allowMultipleTicketTypePurchases) != null ? _o : a.allow_multiple_ticket_type_purchases
|
|
6375
6390
|
),
|
|
6376
|
-
slug: (_p =
|
|
6377
|
-
name: (_q =
|
|
6391
|
+
slug: (_p = attributes6.slug) != null ? _p : null,
|
|
6392
|
+
name: (_q = attributes6.name) != null ? _q : null,
|
|
6378
6393
|
countryCode: countryCode ? String(countryCode).toUpperCase() : null
|
|
6379
6394
|
};
|
|
6380
6395
|
};
|
|
@@ -6412,30 +6427,30 @@ var getEventTimeSlotTickets = async (eventId, date, options) => {
|
|
|
6412
6427
|
for (const hourKey of Object.keys(hours != null ? hours : {}).sort()) {
|
|
6413
6428
|
const times = (_e = hours[hourKey]) != null ? _e : {};
|
|
6414
6429
|
for (const timeKey of Object.keys(times).sort()) {
|
|
6415
|
-
for (const
|
|
6416
|
-
if (!(
|
|
6417
|
-
const stock = Number((_h = (_g =
|
|
6430
|
+
for (const s6 of Object.values((_f = times[timeKey]) != null ? _f : {})) {
|
|
6431
|
+
if (!(s6 == null ? void 0 : s6.matrix_record_id)) continue;
|
|
6432
|
+
const stock = Number((_h = (_g = s6.in_stock) != null ? _g : s6.real_stock) != null ? _h : 0);
|
|
6418
6433
|
out.push({
|
|
6419
|
-
id: String(
|
|
6420
|
-
name:
|
|
6421
|
-
groupName: (_j = (_i =
|
|
6422
|
-
optionName: String((_k =
|
|
6423
|
-
price: Number((_l =
|
|
6424
|
-
priceWithFees: Number((_n = (_m =
|
|
6425
|
-
priceSymbol: (_p = (_o =
|
|
6434
|
+
id: String(s6.matrix_record_id),
|
|
6435
|
+
name: s6.display_name || s6.option_value || "Ticket",
|
|
6436
|
+
groupName: (_j = (_i = s6.group_name) != null ? _i : s6.groupName) != null ? _j : null,
|
|
6437
|
+
optionName: String((_k = s6.option_key) != null ? _k : ""),
|
|
6438
|
+
price: Number((_l = s6.base_price) != null ? _l : 0),
|
|
6439
|
+
priceWithFees: Number((_n = (_m = s6.price_with_fees) != null ? _m : s6.base_price) != null ? _n : 0),
|
|
6440
|
+
priceSymbol: (_p = (_o = s6.price_symbol) != null ? _o : s6.priceSymbol) != null ? _p : "",
|
|
6426
6441
|
currency: "",
|
|
6427
6442
|
feeIncluded: false,
|
|
6428
|
-
depositPercent:
|
|
6429
|
-
soldOut: Boolean(
|
|
6430
|
-
salesStarted:
|
|
6431
|
-
salesEnded: Boolean(
|
|
6432
|
-
minQuantity: Number((_q =
|
|
6433
|
-
maxQuantity: Number((_r =
|
|
6434
|
-
multiplier: Number((_s =
|
|
6435
|
-
isTable: Boolean(
|
|
6443
|
+
depositPercent: s6.deposit_percent != null ? Number(s6.deposit_percent) : null,
|
|
6444
|
+
soldOut: Boolean(s6.sold_out) || stock <= 0,
|
|
6445
|
+
salesStarted: s6.sales_started != null ? Boolean(s6.sales_started) : true,
|
|
6446
|
+
salesEnded: Boolean(s6.sales_ended),
|
|
6447
|
+
minQuantity: Number((_q = s6.min_quantity) != null ? _q : 1) || 1,
|
|
6448
|
+
maxQuantity: Number((_r = s6.max_quantity) != null ? _r : 10) || 10,
|
|
6449
|
+
multiplier: Number((_s = s6.multiplier) != null ? _s : 1) || 1,
|
|
6450
|
+
isTable: Boolean(s6.is_table),
|
|
6436
6451
|
allowDirectPurchase: true,
|
|
6437
|
-
descriptionRich: (_t =
|
|
6438
|
-
badgeText: badgeOf((_u =
|
|
6452
|
+
descriptionRich: (_t = s6.description) != null ? _t : null,
|
|
6453
|
+
badgeText: badgeOf((_u = s6.badge_text) != null ? _u : s6.badgeText),
|
|
6439
6454
|
timeSlot: { date: slotDate, time: timeKey }
|
|
6440
6455
|
});
|
|
6441
6456
|
}
|
|
@@ -6861,7 +6876,7 @@ var createOrder = async (input) => {
|
|
|
6861
6876
|
billing,
|
|
6862
6877
|
input.backfilledHolderIndexes
|
|
6863
6878
|
);
|
|
6864
|
-
const
|
|
6879
|
+
const attributes6 = buildOnCheckoutBody(
|
|
6865
6880
|
{
|
|
6866
6881
|
buyerFields: {
|
|
6867
6882
|
phoneVerificationToken: billing.phoneVerificationToken,
|
|
@@ -6914,7 +6929,7 @@ var createOrder = async (input) => {
|
|
|
6914
6929
|
} : {}
|
|
6915
6930
|
}
|
|
6916
6931
|
);
|
|
6917
|
-
const body = await post(ENDPOINTS.order.create, { data: { attributes:
|
|
6932
|
+
const body = await post(ENDPOINTS.order.create, { data: { attributes: attributes6 } });
|
|
6918
6933
|
const a = (_b = body == null ? void 0 : body.data) == null ? void 0 : _b.attributes;
|
|
6919
6934
|
if (!(a == null ? void 0 : a.hash)) throw new TtfError("Order was not created (no hash in response).", 0);
|
|
6920
6935
|
return {
|
|
@@ -6954,8 +6969,8 @@ var mapProfileToBilling = (profile) => {
|
|
|
6954
6969
|
var _a, _b, _c, _d;
|
|
6955
6970
|
const str = (v) => v == null || v === "" ? void 0 : String(v);
|
|
6956
6971
|
const idStr = (v) => {
|
|
6957
|
-
const
|
|
6958
|
-
return
|
|
6972
|
+
const s6 = str(v);
|
|
6973
|
+
return s6 === void 0 || s6 === "0" || s6 === "-1" ? void 0 : s6;
|
|
6959
6974
|
};
|
|
6960
6975
|
const dobParts = /^(\d{4})-(\d{2})-(\d{2})/.exec((_a = profile.dateOfBirth) != null ? _a : "");
|
|
6961
6976
|
const dob = dobParts && Number(dobParts[1]) > 1900 ? {
|
|
@@ -7072,9 +7087,9 @@ var chargeSavedCardPlan = async (orderHash, paymentMethodId) => {
|
|
|
7072
7087
|
clientSecret: typeof inner.client_secret === "string" ? inner.client_secret : void 0
|
|
7073
7088
|
};
|
|
7074
7089
|
};
|
|
7075
|
-
var changePaymentMethod = async (
|
|
7090
|
+
var changePaymentMethod = async (attributes6) => {
|
|
7076
7091
|
await post(ENDPOINTS.payment.changeMethod, {
|
|
7077
|
-
data: { attributes:
|
|
7092
|
+
data: { attributes: attributes6 }
|
|
7078
7093
|
});
|
|
7079
7094
|
};
|
|
7080
7095
|
var getPayPalForm = async (orderHash) => {
|
|
@@ -7976,6 +7991,29 @@ var disconnectAppleMusic = async (revision) => {
|
|
|
7976
7991
|
})
|
|
7977
7992
|
);
|
|
7978
7993
|
};
|
|
7994
|
+
var connectSpotify = async () => {
|
|
7995
|
+
const epoch = getSessionEpoch();
|
|
7996
|
+
const security2 = await sessionWriteSecurity(epoch);
|
|
7997
|
+
assertSessionEpoch(epoch);
|
|
7998
|
+
return unwrap2(
|
|
7999
|
+
await post(
|
|
8000
|
+
"/customer/music/spotify/connect",
|
|
8001
|
+
{},
|
|
8002
|
+
security2
|
|
8003
|
+
)
|
|
8004
|
+
);
|
|
8005
|
+
};
|
|
8006
|
+
var disconnectSpotify = async (revision) => {
|
|
8007
|
+
const epoch = getSessionEpoch();
|
|
8008
|
+
const security2 = await sessionWriteSecurity(epoch);
|
|
8009
|
+
assertSessionEpoch(epoch);
|
|
8010
|
+
return unwrap2(
|
|
8011
|
+
await del("/customer/music/spotify", {
|
|
8012
|
+
...security2,
|
|
8013
|
+
data: { revision }
|
|
8014
|
+
})
|
|
8015
|
+
);
|
|
8016
|
+
};
|
|
7979
8017
|
var endpoint = (postId) => {
|
|
7980
8018
|
if (!/^[1-9][0-9]*$/.test(String(postId)))
|
|
7981
8019
|
throw new TtfError("This article is not available.", 422, "VALIDATION_ERROR");
|
|
@@ -7990,14 +8028,14 @@ var unwrap3 = (response) => {
|
|
|
7990
8028
|
return response.data;
|
|
7991
8029
|
};
|
|
7992
8030
|
var getWordPostReaction = async (postId) => {
|
|
7993
|
-
const
|
|
8031
|
+
const path4 = endpoint(postId);
|
|
7994
8032
|
const epoch = getSessionEpoch();
|
|
7995
|
-
const result2 = unwrap3(await get(
|
|
8033
|
+
const result2 = unwrap3(await get(path4));
|
|
7996
8034
|
assertSessionEpoch(epoch);
|
|
7997
8035
|
return result2;
|
|
7998
8036
|
};
|
|
7999
8037
|
var setWordPostReaction = async (postId, reaction, revision) => {
|
|
8000
|
-
const
|
|
8038
|
+
const path4 = endpoint(postId);
|
|
8001
8039
|
if (![null, "up", "down"].includes(reaction) || !Number.isSafeInteger(revision) || revision < 0)
|
|
8002
8040
|
throw new TtfError(
|
|
8003
8041
|
"Choose an article reaction and try again.",
|
|
@@ -8008,7 +8046,7 @@ var setWordPostReaction = async (postId, reaction, revision) => {
|
|
|
8008
8046
|
const security2 = await sessionWriteSecurity(epoch);
|
|
8009
8047
|
assertSessionEpoch(epoch);
|
|
8010
8048
|
const result2 = unwrap3(
|
|
8011
|
-
await put(
|
|
8049
|
+
await put(path4, { reaction, revision }, security2)
|
|
8012
8050
|
);
|
|
8013
8051
|
assertSessionEpoch(epoch);
|
|
8014
8052
|
return result2;
|
|
@@ -8178,6 +8216,98 @@ var cancelTicketGift = async (hash, tokenId) => {
|
|
|
8178
8216
|
)
|
|
8179
8217
|
);
|
|
8180
8218
|
};
|
|
8219
|
+
var path3 = "/customer/account-deletion";
|
|
8220
|
+
var requireAccount2 = () => {
|
|
8221
|
+
if (!getConfig().accountAuth || !getConfig().cookieAuth || !isAuthenticated() || !getConfirmedBuyerId())
|
|
8222
|
+
throw new TtfError("Sign in to your Ticket Fairy account to delete it.", 401);
|
|
8223
|
+
};
|
|
8224
|
+
var invalid = () => {
|
|
8225
|
+
throw new TtfError("Account deletion could not be confirmed. Try again.", 502);
|
|
8226
|
+
};
|
|
8227
|
+
var attributes5 = (raw) => {
|
|
8228
|
+
var _a, _b, _c, _d;
|
|
8229
|
+
if ((raw == null ? void 0 : raw.success) === false || (raw == null ? void 0 : raw.error) === true)
|
|
8230
|
+
throw new TtfError(
|
|
8231
|
+
typeof raw.message === "string" ? raw.message : "Unable to update your account.",
|
|
8232
|
+
typeof raw.status === "number" ? raw.status : 422,
|
|
8233
|
+
typeof raw.code === "string" ? raw.code : void 0,
|
|
8234
|
+
raw
|
|
8235
|
+
);
|
|
8236
|
+
return (_d = (_c = (_b = (_a = raw == null ? void 0 : raw.data) == null ? void 0 : _a.attributes) != null ? _b : raw == null ? void 0 : raw.data) != null ? _c : raw) != null ? _d : {};
|
|
8237
|
+
};
|
|
8238
|
+
var brand = (value6) => {
|
|
8239
|
+
if (!Number.isSafeInteger(value6 == null ? void 0 : value6.id) || value6.id <= 0 || typeof value6.name !== "string")
|
|
8240
|
+
invalid();
|
|
8241
|
+
let teamUrl;
|
|
8242
|
+
if (typeof value6.teamUrl === "string") {
|
|
8243
|
+
try {
|
|
8244
|
+
const url2 = new URL(value6.teamUrl);
|
|
8245
|
+
if (url2.protocol === "https:" && !url2.port && !url2.username && !url2.password && !url2.search && !url2.hash && [
|
|
8246
|
+
"manage.ticketfairy.com",
|
|
8247
|
+
"manage.theticketfairy.com",
|
|
8248
|
+
"test-manage.ticketfairy.com",
|
|
8249
|
+
"preproduction-manage.ticketfairy.com"
|
|
8250
|
+
].includes(url2.hostname) && url2.pathname === `/brand/${value6.id}/team`)
|
|
8251
|
+
teamUrl = url2.toString();
|
|
8252
|
+
} catch (e) {
|
|
8253
|
+
}
|
|
8254
|
+
}
|
|
8255
|
+
return { id: value6.id, name: value6.name, ...teamUrl ? { teamUrl } : {} };
|
|
8256
|
+
};
|
|
8257
|
+
var getAccountDeletionStatus = async () => {
|
|
8258
|
+
requireAccount2();
|
|
8259
|
+
const assertOwner = captureSessionAction();
|
|
8260
|
+
const value6 = attributes5(await get(path3));
|
|
8261
|
+
assertOwner();
|
|
8262
|
+
if (typeof value6.canDelete !== "boolean" || typeof value6.email !== "string" || !["password", "email_code"].includes(value6.verification) || typeof value6.appleLinked !== "boolean" || !Array.isArray(value6.blockers))
|
|
8263
|
+
invalid();
|
|
8264
|
+
const blockers = value6.blockers.map((row) => {
|
|
8265
|
+
if (typeof (row == null ? void 0 : row.code) !== "string" || typeof row.message !== "string" || row.brands !== void 0 && !Array.isArray(row.brands) || row.moreBrands !== void 0 && typeof row.moreBrands !== "boolean")
|
|
8266
|
+
invalid();
|
|
8267
|
+
return {
|
|
8268
|
+
code: row.code,
|
|
8269
|
+
message: row.message,
|
|
8270
|
+
...row.brands ? { brands: row.brands.map(brand) } : {},
|
|
8271
|
+
...row.moreBrands !== void 0 ? { moreBrands: row.moreBrands } : {}
|
|
8272
|
+
};
|
|
8273
|
+
});
|
|
8274
|
+
if (value6.canDelete !== (blockers.length === 0)) invalid();
|
|
8275
|
+
return {
|
|
8276
|
+
canDelete: value6.canDelete,
|
|
8277
|
+
verification: value6.verification,
|
|
8278
|
+
email: value6.email,
|
|
8279
|
+
appleLinked: value6.appleLinked,
|
|
8280
|
+
blockers
|
|
8281
|
+
};
|
|
8282
|
+
};
|
|
8283
|
+
var sendAccountDeletionCode = async (language = "en") => {
|
|
8284
|
+
requireAccount2();
|
|
8285
|
+
const assertOwner = captureSessionAction();
|
|
8286
|
+
const security2 = await sessionWriteSecurity();
|
|
8287
|
+
assertOwner();
|
|
8288
|
+
const value6 = attributes5(
|
|
8289
|
+
await post(`${path3}/code`, { data: { attributes: { language } } }, security2)
|
|
8290
|
+
);
|
|
8291
|
+
assertOwner();
|
|
8292
|
+
if (typeof value6.email !== "string" || !Number.isFinite(value6.expiresInMinutes) || value6.expiresInMinutes <= 0)
|
|
8293
|
+
invalid();
|
|
8294
|
+
return { email: value6.email, expiresInMinutes: value6.expiresInMinutes };
|
|
8295
|
+
};
|
|
8296
|
+
var deleteAccount = async (proof) => {
|
|
8297
|
+
requireAccount2();
|
|
8298
|
+
const keys = proof && typeof proof === "object" ? Object.keys(proof) : [];
|
|
8299
|
+
if (keys.length !== 1 || !["password", "code"].includes(keys[0]) || typeof proof[keys[0]] !== "string" || !proof[keys[0]])
|
|
8300
|
+
throw new TtfError("Enter your password or the code sent to your email.", 422);
|
|
8301
|
+
const assertOwner = captureSessionAction();
|
|
8302
|
+
const security2 = await sessionWriteSecurity();
|
|
8303
|
+
assertOwner();
|
|
8304
|
+
const value6 = attributes5(await post(path3, { data: { attributes: proof } }, security2));
|
|
8305
|
+
assertOwner();
|
|
8306
|
+
if (value6.deleted !== true || !Number.isSafeInteger(value6.teamsLeft) || value6.teamsLeft < 0)
|
|
8307
|
+
invalid();
|
|
8308
|
+
clearSession();
|
|
8309
|
+
return { deleted: true, teamsLeft: value6.teamsLeft };
|
|
8310
|
+
};
|
|
8181
8311
|
var retiredStores = /* @__PURE__ */ new WeakSet();
|
|
8182
8312
|
var retireCheckoutStore = (store) => {
|
|
8183
8313
|
retiredStores.add(store);
|
|
@@ -9826,7 +9956,7 @@ var bundleFlowAvailable = (draft, catalog, catalogState) => {
|
|
|
9826
9956
|
];
|
|
9827
9957
|
const slots = bundleHolderSlots(catalog, bundleSelectionAttribute(qty));
|
|
9828
9958
|
const holders = draft.holders.filter(
|
|
9829
|
-
(h) => !changed.includes(h.bundleId) || slots.some((
|
|
9959
|
+
(h) => !changed.includes(h.bundleId) || slots.some((s6) => s6.bundleId === h.bundleId && s6.ticketIndex === h.ticketIndex)
|
|
9830
9960
|
);
|
|
9831
9961
|
return { draft: { ...draft, qty, holders }, removed, reduced, belowMinimum };
|
|
9832
9962
|
};
|
|
@@ -9871,7 +10001,7 @@ var bundleDraftWithHolder = (draft, slot, next) => {
|
|
|
9871
10001
|
var bundleFlowInput = (eventId, draft, slots) => {
|
|
9872
10002
|
const selection = bundleSelectionAttribute(draft.qty);
|
|
9873
10003
|
const holders = draft.holders.filter(
|
|
9874
|
-
(h) => slots.some((
|
|
10004
|
+
(h) => slots.some((s6) => s6.bundleId === h.bundleId && s6.ticketIndex === h.ticketIndex) && (h.firstName.trim() || h.lastName.trim())
|
|
9875
10005
|
);
|
|
9876
10006
|
const buyer2 = holders.length ? { ...draft.buyer, holders } : { ...draft.buyer };
|
|
9877
10007
|
return {
|
|
@@ -10453,7 +10583,9 @@ var ttf = {
|
|
|
10453
10583
|
get: getPreferences,
|
|
10454
10584
|
save: saveInterests,
|
|
10455
10585
|
connectAppleMusic,
|
|
10456
|
-
disconnectAppleMusic
|
|
10586
|
+
disconnectAppleMusic,
|
|
10587
|
+
connectSpotify,
|
|
10588
|
+
disconnectSpotify
|
|
10457
10589
|
},
|
|
10458
10590
|
comments: {
|
|
10459
10591
|
list: getEventComments,
|
|
@@ -10477,6 +10609,9 @@ var ttf = {
|
|
|
10477
10609
|
sendCheckoutTwoFactorSms,
|
|
10478
10610
|
cancelCheckoutTwoFactor,
|
|
10479
10611
|
logoutFromCheckout,
|
|
10612
|
+
getAccountDeletionStatus,
|
|
10613
|
+
sendAccountDeletionCode,
|
|
10614
|
+
deleteAccount,
|
|
10480
10615
|
getLinkedAccounts,
|
|
10481
10616
|
linkAccount,
|
|
10482
10617
|
disconnectAccount,
|
|
@@ -10686,6 +10821,7 @@ __export(hooks_exports, {
|
|
|
10686
10821
|
ticketHolderFor: () => ticketHolderFor,
|
|
10687
10822
|
ttfKeys: () => ttfKeys,
|
|
10688
10823
|
useAccommodationSelection: () => useAccommodationSelection,
|
|
10824
|
+
useAccountDeletion: () => useAccountDeletion,
|
|
10689
10825
|
useAccountPreferences: () => useAccountPreferences,
|
|
10690
10826
|
useAccountRewards: () => useAccountRewards,
|
|
10691
10827
|
useAccountRewardsSummary: () => useAccountRewardsSummary,
|
|
@@ -11818,23 +11954,23 @@ var useSeatSelection = (eventId, checkout, onContinue) => {
|
|
|
11818
11954
|
ttf.seatmap.data(eventId).then((response) => {
|
|
11819
11955
|
var _a, _b, _c;
|
|
11820
11956
|
if (!current4 || !active2()) return;
|
|
11821
|
-
const
|
|
11822
|
-
if ((
|
|
11823
|
-
setChart({ state: "provider", data:
|
|
11957
|
+
const attributes6 = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.attributes;
|
|
11958
|
+
if ((attributes6 == null ? void 0 : attributes6.provider) === "seats_io") {
|
|
11959
|
+
setChart({ state: "provider", data: attributes6 });
|
|
11824
11960
|
return;
|
|
11825
11961
|
}
|
|
11826
|
-
if (!
|
|
11962
|
+
if (!attributes6 || attributes6.seatData == null) {
|
|
11827
11963
|
setChart({ state: "empty" });
|
|
11828
11964
|
return;
|
|
11829
11965
|
}
|
|
11830
11966
|
const data = {
|
|
11831
|
-
seatData: typeof
|
|
11832
|
-
ticketTypeTierRelations: (_b =
|
|
11833
|
-
eventSeats: (_c =
|
|
11834
|
-
seatReservationTime: Number(
|
|
11835
|
-
seatMapType: typeof
|
|
11836
|
-
tierPrices:
|
|
11837
|
-
predefinedSeats:
|
|
11967
|
+
seatData: typeof attributes6.seatData === "string" ? JSON.parse(attributes6.seatData) : attributes6.seatData,
|
|
11968
|
+
ticketTypeTierRelations: (_b = attributes6.ticketTypeTierRelations) != null ? _b : {},
|
|
11969
|
+
eventSeats: (_c = attributes6.eventSeats) != null ? _c : [],
|
|
11970
|
+
seatReservationTime: Number(attributes6.seatReservationTime) || 0,
|
|
11971
|
+
seatMapType: typeof attributes6.seatMapType === "string" ? attributes6.seatMapType : null,
|
|
11972
|
+
tierPrices: attributes6.tierPrices,
|
|
11973
|
+
predefinedSeats: attributes6.predefinedSeats
|
|
11838
11974
|
};
|
|
11839
11975
|
chartRef.current = data;
|
|
11840
11976
|
setChart({ state: "ready", data });
|
|
@@ -14191,7 +14327,12 @@ var useAccountPreferences = (enabled = true) => {
|
|
|
14191
14327
|
const ownedEpoch = useMemo9(() => getSessionEpoch(), [scope]);
|
|
14192
14328
|
const pending2 = useRef13({ scope, locked: false });
|
|
14193
14329
|
const client = useQueryClient8();
|
|
14194
|
-
const query = useSessionQuery({
|
|
14330
|
+
const query = useSessionQuery({
|
|
14331
|
+
queryKey: key2,
|
|
14332
|
+
queryFn: getPreferences,
|
|
14333
|
+
retry: false,
|
|
14334
|
+
enabled
|
|
14335
|
+
});
|
|
14195
14336
|
const perform = async (action, message) => {
|
|
14196
14337
|
if (getSessionCacheScope() !== scope || getSessionEpoch() !== ownedEpoch || pending2.current.scope === scope && pending2.current.locked)
|
|
14197
14338
|
return;
|
|
@@ -14227,10 +14368,19 @@ var useAccountPreferences = (enabled = true) => {
|
|
|
14227
14368
|
"Your interests have been updated."
|
|
14228
14369
|
) : Promise.resolve(void 0),
|
|
14229
14370
|
connectAppleMusic: () => perform(connectAppleMusic),
|
|
14371
|
+
connectSpotify: () => perform(connectSpotify),
|
|
14230
14372
|
disconnectAppleMusic: () => query.data ? perform(
|
|
14231
14373
|
() => disconnectAppleMusic(query.data.revision),
|
|
14232
14374
|
"Apple Music disconnected. Your saved interests stay."
|
|
14233
|
-
) : Promise.resolve(void 0)
|
|
14375
|
+
) : Promise.resolve(void 0),
|
|
14376
|
+
disconnectSpotify: () => {
|
|
14377
|
+
var _a;
|
|
14378
|
+
const revision = (_a = query.data) == null ? void 0 : _a.revision;
|
|
14379
|
+
return revision === void 0 ? Promise.resolve(void 0) : perform(
|
|
14380
|
+
() => disconnectSpotify(revision),
|
|
14381
|
+
"Spotify disconnected. Your saved interests stay."
|
|
14382
|
+
);
|
|
14383
|
+
}
|
|
14234
14384
|
};
|
|
14235
14385
|
};
|
|
14236
14386
|
var useInterestSelection = () => {
|
|
@@ -15342,6 +15492,221 @@ var useReceiptRewards = ({ orderHash, data }) => {
|
|
|
15342
15492
|
submitDetails: (award, details) => run("details", () => ttf.rewards.submitPrizeDetails(hash, award, details))
|
|
15343
15493
|
};
|
|
15344
15494
|
};
|
|
15495
|
+
var useAccountDeletion = () => {
|
|
15496
|
+
var _a;
|
|
15497
|
+
const session = useAuthSession();
|
|
15498
|
+
const configuration2 = getConfig();
|
|
15499
|
+
const scope = session.sessionScope;
|
|
15500
|
+
const epoch = getSessionEpoch();
|
|
15501
|
+
const assertOwner = captureSessionAction();
|
|
15502
|
+
const accountSession = Boolean(
|
|
15503
|
+
configuration2.accountAuth && configuration2.cookieAuth && session.isAuthenticated
|
|
15504
|
+
);
|
|
15505
|
+
const profile = useProfile({
|
|
15506
|
+
enabled: accountSession && !session.buyerId,
|
|
15507
|
+
retry: false
|
|
15508
|
+
});
|
|
15509
|
+
const confirmingAccount = Boolean(accountSession && !session.buyerId && !profile.error);
|
|
15510
|
+
const signedIn = Boolean(accountSession && session.buyerId);
|
|
15511
|
+
const empty = () => ({
|
|
15512
|
+
scope,
|
|
15513
|
+
configuration: configuration2,
|
|
15514
|
+
isOpen: false,
|
|
15515
|
+
proof: "",
|
|
15516
|
+
busy: false,
|
|
15517
|
+
error: "",
|
|
15518
|
+
codeSent: null,
|
|
15519
|
+
retryAfter: 0,
|
|
15520
|
+
deleted: false
|
|
15521
|
+
});
|
|
15522
|
+
const [stored, setStored] = useState23(empty);
|
|
15523
|
+
const current4 = stored.scope === scope && stored.configuration === configuration2;
|
|
15524
|
+
const state = current4 ? stored : empty();
|
|
15525
|
+
const active2 = useRef21(true);
|
|
15526
|
+
const pending2 = useRef21(null);
|
|
15527
|
+
const cooldowns = useRef21({ scope, configuration: configuration2, code: 0, confirm: 0 });
|
|
15528
|
+
const editor = useRef21({ scope, configuration: configuration2, generation: 0, isOpen: false, proof: "" });
|
|
15529
|
+
const generation = editor.current.generation;
|
|
15530
|
+
const client = useQueryClient13();
|
|
15531
|
+
const query = useSessionQuery({
|
|
15532
|
+
queryKey: ["ttf", "account-deletion"],
|
|
15533
|
+
queryFn: getAccountDeletionStatus,
|
|
15534
|
+
enabled: signedIn,
|
|
15535
|
+
retry: false
|
|
15536
|
+
});
|
|
15537
|
+
const owns = () => {
|
|
15538
|
+
try {
|
|
15539
|
+
assertOwner();
|
|
15540
|
+
return active2.current;
|
|
15541
|
+
} catch (e) {
|
|
15542
|
+
return false;
|
|
15543
|
+
}
|
|
15544
|
+
};
|
|
15545
|
+
useEffect18(() => {
|
|
15546
|
+
active2.current = true;
|
|
15547
|
+
return () => {
|
|
15548
|
+
active2.current = false;
|
|
15549
|
+
};
|
|
15550
|
+
}, []);
|
|
15551
|
+
useEffect18(() => {
|
|
15552
|
+
setStored(
|
|
15553
|
+
(value6) => value6.scope === scope && value6.configuration === configuration2 ? value6 : empty()
|
|
15554
|
+
);
|
|
15555
|
+
if (editor.current.scope !== scope || editor.current.configuration !== configuration2)
|
|
15556
|
+
editor.current = {
|
|
15557
|
+
scope,
|
|
15558
|
+
configuration: configuration2,
|
|
15559
|
+
generation: editor.current.generation + 1,
|
|
15560
|
+
isOpen: false,
|
|
15561
|
+
proof: ""
|
|
15562
|
+
};
|
|
15563
|
+
pending2.current = null;
|
|
15564
|
+
if (cooldowns.current.scope !== scope || cooldowns.current.configuration !== configuration2)
|
|
15565
|
+
cooldowns.current = { scope, configuration: configuration2, code: 0, confirm: 0 };
|
|
15566
|
+
}, [scope, configuration2]);
|
|
15567
|
+
useEffect18(() => {
|
|
15568
|
+
if (!state.retryAfter) return;
|
|
15569
|
+
const timer = setTimeout(() => {
|
|
15570
|
+
if (owns()) setStored((value6) => ({ ...value6, retryAfter: remainingCooldown() }));
|
|
15571
|
+
}, 1e3);
|
|
15572
|
+
return () => clearTimeout(timer);
|
|
15573
|
+
}, [state.retryAfter, scope, configuration2]);
|
|
15574
|
+
const update = (patch2) => {
|
|
15575
|
+
if (owns())
|
|
15576
|
+
setStored((value6) => ({
|
|
15577
|
+
...value6.scope === scope && value6.configuration === configuration2 ? value6 : empty(),
|
|
15578
|
+
...patch2
|
|
15579
|
+
}));
|
|
15580
|
+
};
|
|
15581
|
+
const ownsEditor = () => owns() && editor.current.scope === scope && editor.current.configuration === configuration2 && editor.current.generation === generation;
|
|
15582
|
+
const remainingCooldown = () => Math.ceil(
|
|
15583
|
+
Math.max(
|
|
15584
|
+
0,
|
|
15585
|
+
cooldowns.current.code - Date.now(),
|
|
15586
|
+
cooldowns.current.confirm - Date.now()
|
|
15587
|
+
) / 1e3
|
|
15588
|
+
);
|
|
15589
|
+
const retry = async () => {
|
|
15590
|
+
if (!owns() || !accountSession) return;
|
|
15591
|
+
update({ error: "" });
|
|
15592
|
+
if (!session.buyerId) await profile.refetch();
|
|
15593
|
+
else await query.refetch();
|
|
15594
|
+
};
|
|
15595
|
+
const perform = async (action, deleting = false) => {
|
|
15596
|
+
var _a2, _b, _c, _d;
|
|
15597
|
+
if (!owns() || !signedIn || pending2.current) return false;
|
|
15598
|
+
const operation = /* @__PURE__ */ Symbol();
|
|
15599
|
+
pending2.current = operation;
|
|
15600
|
+
update({ busy: true, error: "" });
|
|
15601
|
+
try {
|
|
15602
|
+
const result2 = await action();
|
|
15603
|
+
if (deleting) {
|
|
15604
|
+
const retired = getConfig() === configuration2 && !isAuthenticated() && getSessionEpoch() === epoch + 1 && getSessionCacheScope() === scope + 1;
|
|
15605
|
+
client.removeQueries({
|
|
15606
|
+
predicate: (query2) => {
|
|
15607
|
+
const tail = query2.queryKey[query2.queryKey.length - 1];
|
|
15608
|
+
return Boolean(
|
|
15609
|
+
tail && typeof tail === "object" && "tfSessionScope" in tail && tail.tfSessionScope === scope
|
|
15610
|
+
);
|
|
15611
|
+
}
|
|
15612
|
+
});
|
|
15613
|
+
if (!active2.current || !retired) return false;
|
|
15614
|
+
setStored({
|
|
15615
|
+
...empty(),
|
|
15616
|
+
scope: getSessionCacheScope(),
|
|
15617
|
+
busy: false,
|
|
15618
|
+
deleted: true
|
|
15619
|
+
});
|
|
15620
|
+
return true;
|
|
15621
|
+
}
|
|
15622
|
+
if (!owns()) return false;
|
|
15623
|
+
cooldowns.current.code = Date.now() + 6e4;
|
|
15624
|
+
update({
|
|
15625
|
+
busy: false,
|
|
15626
|
+
codeSent: result2,
|
|
15627
|
+
retryAfter: remainingCooldown()
|
|
15628
|
+
});
|
|
15629
|
+
return true;
|
|
15630
|
+
} catch (caught) {
|
|
15631
|
+
if (owns() && !(caught instanceof TtfError && caught.code === "SESSION_CHANGED")) {
|
|
15632
|
+
const details = caught instanceof TtfError ? caught.data : void 0;
|
|
15633
|
+
const seconds = Number(
|
|
15634
|
+
(_d = (_c = (_b = caught instanceof TtfError ? caught.retryAfter : void 0) != null ? _b : (_a2 = details == null ? void 0 : details.details) == null ? void 0 : _a2.retryAfter) != null ? _c : details == null ? void 0 : details.retryAfter) != null ? _d : 0
|
|
15635
|
+
);
|
|
15636
|
+
if (Number.isFinite(seconds) && seconds > 0)
|
|
15637
|
+
cooldowns.current[deleting ? "confirm" : "code"] = Date.now() + Math.ceil(seconds) * 1e3;
|
|
15638
|
+
update({
|
|
15639
|
+
busy: false,
|
|
15640
|
+
error: caught instanceof Error ? caught.message : "Unable to update your account. Try again.",
|
|
15641
|
+
retryAfter: remainingCooldown()
|
|
15642
|
+
});
|
|
15643
|
+
}
|
|
15644
|
+
return false;
|
|
15645
|
+
} finally {
|
|
15646
|
+
if (pending2.current === operation) pending2.current = null;
|
|
15647
|
+
}
|
|
15648
|
+
};
|
|
15649
|
+
return {
|
|
15650
|
+
signedIn,
|
|
15651
|
+
confirmingAccount,
|
|
15652
|
+
status: signedIn ? query.data : void 0,
|
|
15653
|
+
query,
|
|
15654
|
+
retry,
|
|
15655
|
+
canConfirm: Boolean(
|
|
15656
|
+
signedIn && ownsEditor() && editor.current.isOpen && !pending2.current && Date.now() >= cooldowns.current.confirm && ((_a = query.data) == null ? void 0 : _a.canDelete) && (query.data.verification === "password" ? state.proof.length : state.proof.trim().length)
|
|
15657
|
+
),
|
|
15658
|
+
isOpen: state.isOpen,
|
|
15659
|
+
proof: state.proof,
|
|
15660
|
+
busy: state.busy,
|
|
15661
|
+
error: state.error || (signedIn && query.error instanceof Error ? query.error.message : "") || (accountSession && profile.error instanceof Error ? profile.error.message : ""),
|
|
15662
|
+
codeSent: state.codeSent,
|
|
15663
|
+
retryAfter: state.retryAfter,
|
|
15664
|
+
deleted: state.deleted,
|
|
15665
|
+
open: () => {
|
|
15666
|
+
if (!signedIn || !ownsEditor() || pending2.current) return;
|
|
15667
|
+
editor.current = {
|
|
15668
|
+
scope,
|
|
15669
|
+
configuration: configuration2,
|
|
15670
|
+
generation: generation + 1,
|
|
15671
|
+
isOpen: true,
|
|
15672
|
+
proof: ""
|
|
15673
|
+
};
|
|
15674
|
+
update({ isOpen: true, proof: "", error: "", deleted: false });
|
|
15675
|
+
},
|
|
15676
|
+
cancel: () => {
|
|
15677
|
+
if (!ownsEditor() || pending2.current) return;
|
|
15678
|
+
editor.current = {
|
|
15679
|
+
scope,
|
|
15680
|
+
configuration: configuration2,
|
|
15681
|
+
generation: generation + 1,
|
|
15682
|
+
isOpen: false,
|
|
15683
|
+
proof: ""
|
|
15684
|
+
};
|
|
15685
|
+
update({ isOpen: false, proof: "", error: "" });
|
|
15686
|
+
},
|
|
15687
|
+
setProof: (proof) => {
|
|
15688
|
+
if (!ownsEditor() || !editor.current.isOpen || pending2.current) return;
|
|
15689
|
+
editor.current.proof = proof;
|
|
15690
|
+
update({ proof, error: "" });
|
|
15691
|
+
},
|
|
15692
|
+
sendCode: (language = "en") => {
|
|
15693
|
+
var _a2;
|
|
15694
|
+
return !ownsEditor() || !editor.current.isOpen || remainingCooldown() > 0 || !((_a2 = query.data) == null ? void 0 : _a2.canDelete) || query.data.verification !== "email_code" ? Promise.resolve(false) : perform(() => sendAccountDeletionCode(language));
|
|
15695
|
+
},
|
|
15696
|
+
confirm: () => {
|
|
15697
|
+
const status = query.data;
|
|
15698
|
+
if (!ownsEditor() || !editor.current.isOpen || Date.now() < cooldowns.current.confirm || !(status == null ? void 0 : status.canDelete) || !editor.current.proof)
|
|
15699
|
+
return Promise.resolve(false);
|
|
15700
|
+
const proof = editor.current.proof;
|
|
15701
|
+
return perform(
|
|
15702
|
+
() => deleteAccount(
|
|
15703
|
+
status.verification === "password" ? { password: proof } : { code: proof.trim() }
|
|
15704
|
+
),
|
|
15705
|
+
true
|
|
15706
|
+
);
|
|
15707
|
+
}
|
|
15708
|
+
};
|
|
15709
|
+
};
|
|
15345
15710
|
var accountEn = {
|
|
15346
15711
|
"account.loading_your_interests": "Loading your interests\u2026",
|
|
15347
15712
|
"account.your_interests_could_not_load": "Your interests could not load.",
|
|
@@ -16004,6 +16369,138 @@ Object.assign(accountEs, {
|
|
|
16004
16369
|
"account.choose_images_totaling_no_more_than_5_mib_after_processing": "Elige im\xE1genes que no sumen m\xE1s de 5 MiB despu\xE9s del procesamiento.",
|
|
16005
16370
|
"account.write_a_comment_or_choose_an_image": "Escribe un comentario o elige una imagen."
|
|
16006
16371
|
});
|
|
16372
|
+
Object.assign(accountEn, {
|
|
16373
|
+
"account.spotify_disconnected_your_saved_interests_stay": "Spotify disconnected. Your saved interests stay.",
|
|
16374
|
+
"account.choose_which_artist_and_genre_names_to_use_for_event_suggestions": "Choose which artist and genre names to use for event suggestions.",
|
|
16375
|
+
"account.disconnect_spotify_and_remove_its_imported_data_and_approved_names_your_saved_interests_stay": "Disconnect Spotify and remove its imported data and approved names? Your saved interests stay.",
|
|
16376
|
+
"account.review_choices": "Review choices",
|
|
16377
|
+
"account.no_artist_or_genre_names_approved_yet": "No artist or genre names approved yet.",
|
|
16378
|
+
"account.refresh_connections": "Refresh connections",
|
|
16379
|
+
"account.only_the_artist_and_genre_names_you_approve_are_used_for_these_event_suggestions": "Only the artist and genre names you approve are used for these event suggestions.",
|
|
16380
|
+
"account.continue_in_a_new_tab_to_review_your_spotify_choices_return_here_when_you_finish": "Continue in a new tab to review your Spotify choices. Return here when you finish.",
|
|
16381
|
+
"account.continue_to_spotify": "Continue to Spotify",
|
|
16382
|
+
"account.spotify_connections_are_not_available_right_now": "Spotify connections are not available right now.",
|
|
16383
|
+
"account.spotify_could_not_confirm_this_account_please_try_again": "Spotify could not confirm this account. Please try again.",
|
|
16384
|
+
"account.this_spotify_connection_expired_open_a_new_connection": "This Spotify connection expired. Open a new connection.",
|
|
16385
|
+
"account.your_account_changed_open_a_new_spotify_connection": "Your account changed. Open a new Spotify connection.",
|
|
16386
|
+
"account.choose_only_the_spotify_names_shown_for_this_connection": "Choose only the Spotify names shown for this connection.",
|
|
16387
|
+
"account.spotify_artist_names_could_not_be_loaded_please_try_again": "Spotify artist names could not be loaded. Please try again.",
|
|
16388
|
+
"account.disconnect_spotify": "Disconnect Spotify?",
|
|
16389
|
+
"account.your_imported_spotify_data_and_approved_names_will_be_removed_your_saved_interests_stay": "Your imported Spotify data and approved names will be removed. Your saved interests stay.",
|
|
16390
|
+
"account.sign_in_to_manage_your_music_connections": "Sign in to manage your music connections."
|
|
16391
|
+
});
|
|
16392
|
+
Object.assign(accountEs, {
|
|
16393
|
+
"account.spotify_disconnected_your_saved_interests_stay": "Spotify se desconect\xF3. Tus intereses guardados se conservan.",
|
|
16394
|
+
"account.choose_which_artist_and_genre_names_to_use_for_event_suggestions": "Elige qu\xE9 nombres de artistas y g\xE9neros usar para sugerirte eventos.",
|
|
16395
|
+
"account.disconnect_spotify_and_remove_its_imported_data_and_approved_names_your_saved_interests_stay": "\xBFDesconectar Spotify y eliminar sus datos importados y los nombres aprobados? Tus intereses guardados se conservan.",
|
|
16396
|
+
"account.review_choices": "Revisar selecciones",
|
|
16397
|
+
"account.no_artist_or_genre_names_approved_yet": "A\xFAn no has aprobado nombres de artistas o g\xE9neros.",
|
|
16398
|
+
"account.refresh_connections": "Actualizar conexiones",
|
|
16399
|
+
"account.only_the_artist_and_genre_names_you_approve_are_used_for_these_event_suggestions": "Solo se usan los nombres de artistas y g\xE9neros que apruebas para estas sugerencias de eventos.",
|
|
16400
|
+
"account.continue_in_a_new_tab_to_review_your_spotify_choices_return_here_when_you_finish": "Contin\xFAa en una pesta\xF1a nueva para revisar tus selecciones de Spotify. Vuelve aqu\xED cuando termines.",
|
|
16401
|
+
"account.continue_to_spotify": "Continuar a Spotify",
|
|
16402
|
+
"account.spotify_connections_are_not_available_right_now": "Las conexiones de Spotify no est\xE1n disponibles en este momento.",
|
|
16403
|
+
"account.spotify_could_not_confirm_this_account_please_try_again": "Spotify no pudo confirmar esta cuenta. Int\xE9ntalo de nuevo.",
|
|
16404
|
+
"account.this_spotify_connection_expired_open_a_new_connection": "Esta conexi\xF3n de Spotify ha caducado. Abre una nueva conexi\xF3n.",
|
|
16405
|
+
"account.your_account_changed_open_a_new_spotify_connection": "Tu cuenta ha cambiado. Abre una nueva conexi\xF3n de Spotify.",
|
|
16406
|
+
"account.choose_only_the_spotify_names_shown_for_this_connection": "Elige solo los nombres de Spotify que se muestran para esta conexi\xF3n.",
|
|
16407
|
+
"account.spotify_artist_names_could_not_be_loaded_please_try_again": "No se pudieron cargar los nombres de artistas de Spotify. Int\xE9ntalo de nuevo.",
|
|
16408
|
+
"account.disconnect_spotify": "\xBFDesconectar Spotify?",
|
|
16409
|
+
"account.your_imported_spotify_data_and_approved_names_will_be_removed_your_saved_interests_stay": "Se eliminar\xE1n tus datos importados de Spotify y los nombres aprobados. Tus intereses guardados se conservan.",
|
|
16410
|
+
"account.sign_in_to_manage_your_music_connections": "Inicia sesi\xF3n para gestionar tus conexiones de m\xFAsica."
|
|
16411
|
+
});
|
|
16412
|
+
Object.assign(accountEn, {
|
|
16413
|
+
"account.delete_account": "Delete account",
|
|
16414
|
+
"account.account_deleted": "Account deleted",
|
|
16415
|
+
"account.your_ticket_fairy_account_has_been_closed_you_are_signed_out": "Your Ticket Fairy account has been closed. You are signed out.",
|
|
16416
|
+
"account.financial_and_transaction_records_are_retained_where_required": "Financial and transaction records are retained where required.",
|
|
16417
|
+
"account.continue_browsing": "Continue browsing",
|
|
16418
|
+
"account.sign_in_to_review_and_delete_your_ticket_fairy_account": "Sign in to review and delete your Ticket Fairy account.",
|
|
16419
|
+
"account.loading_account_deletion_options": "Loading account deletion options\u2026",
|
|
16420
|
+
"account.account_deletion_options_could_not_load": "Account deletion options could not load.",
|
|
16421
|
+
"account.this_closes_your_ticket_fairy_account_across_the_app_website_and_organiser_dashboard": "This closes your Ticket Fairy account across the app, website and organiser dashboard.",
|
|
16422
|
+
"account.what_is_removed": "What is removed",
|
|
16423
|
+
"account.your_personal_profile_sign_in_access_friends_saved_preferences_and_the_content_you_posted_are_removed_or_anonymised": "Your personal profile, sign-in access, friends, saved preferences and the content you posted are removed or anonymised.",
|
|
16424
|
+
"account.what_is_kept": "What is kept",
|
|
16425
|
+
"account.financial_and_transaction_records_are_retained_where_required_deleting_your_account_does_not_refund_or_cancel_orders_and_does_not_delete_other_ticket_holders_details": "Financial and transaction records are retained where required. Deleting your account does not refund or cancel orders, and does not delete other ticket holders\u2019 details.",
|
|
16426
|
+
"account.if_ticket_fairy_still_appears_in_your_apple_account_after_deletion_remove_its_access_there_too": "If Ticket Fairy still appears in your Apple Account after deletion, remove its access there too.",
|
|
16427
|
+
"account.before_you_delete_your_account": "Before you delete your account",
|
|
16428
|
+
"account.open_name_team_settings": "Open {{name}} team settings",
|
|
16429
|
+
"account.check_again": "Check again",
|
|
16430
|
+
"account.confirm_account_deletion": "Confirm account deletion",
|
|
16431
|
+
"account.delete_your_account_permanently": "Delete your account permanently?",
|
|
16432
|
+
"account.this_cannot_be_undone_confirm_that_you_want_to_close_this_account": "This cannot be undone. Confirm that you want to close this account.",
|
|
16433
|
+
"account.we_will_email_a_deletion_code_to_email": "We will email a deletion code to {{email}}.",
|
|
16434
|
+
"account.send_a_new_code": "Send a new code",
|
|
16435
|
+
"account.email_deletion_code": "Email deletion code",
|
|
16436
|
+
"account.a_code_was_sent_to_email_it_expires_in_minutes_minutes": "A code was sent to {{email}}. It expires in {{minutes}} minutes.",
|
|
16437
|
+
"account.try_again_in_seconds_seconds": "Try again in {{seconds}} seconds.",
|
|
16438
|
+
"account.current_password": "Current password",
|
|
16439
|
+
"account.deletion_code": "Deletion code",
|
|
16440
|
+
"account.keep_account": "Keep account",
|
|
16441
|
+
"account.permanently_delete_account": "Permanently delete account",
|
|
16442
|
+
"account.please_wait": "Please wait\u2026",
|
|
16443
|
+
"account.team_settings": "Team settings",
|
|
16444
|
+
"account.unable_to_open_team_settings_please_try_again": "Unable to open team settings. Please try again.",
|
|
16445
|
+
"account.sign_in_to_your_ticket_fairy_account_to_delete_it": "Sign in to your Ticket Fairy account to delete it.",
|
|
16446
|
+
"account.account_deletion_could_not_be_confirmed_try_again": "Account deletion could not be confirmed. Try again.",
|
|
16447
|
+
"account.unable_to_update_your_account": "Unable to update your account.",
|
|
16448
|
+
"account.unable_to_update_your_account_try_again": "Unable to update your account. Try again.",
|
|
16449
|
+
"account.enter_your_password_or_the_code_sent_to_your_email": "Enter your password or the code sent to your email.",
|
|
16450
|
+
"account.that_password_is_not_right_enter_the_password_you_sign_in_with": "That password is not right. Enter the password you sign in with.",
|
|
16451
|
+
"account.that_code_is_not_right_check_the_newest_email_from_ticket_fairy_and_enter_the_code_in_it": "That code is not right. Check the newest email from Ticket Fairy and enter the code in it.",
|
|
16452
|
+
"account.that_code_no_longer_works_ask_for_a_new_code": "That code no longer works. Ask for a new code.",
|
|
16453
|
+
"account.we_have_just_sent_you_a_code_check_your_email_or_ask_for_a_new_code_in_a_minute": "We have just sent you a code. Check your email, or ask for a new code in a minute.",
|
|
16454
|
+
"account.we_could_not_send_the_code_just_now_try_again_in_a_few_minutes": "We could not send the code just now. Try again in a few minutes.",
|
|
16455
|
+
"account.we_re_finishing_a_change_to_your_account_wait_a_moment_then_reload_the_page": "We\u2019re finishing a change to your account. Wait a moment, then reload the page.",
|
|
16456
|
+
"account.we_could_not_finish_deleting_your_account_sign_in_and_try_again_or_contact_ticket_fairy_support": "We could not finish deleting your account. Sign in and try again, or contact Ticket Fairy support."
|
|
16457
|
+
});
|
|
16458
|
+
Object.assign(accountEs, {
|
|
16459
|
+
"account.delete_account": "Eliminar cuenta",
|
|
16460
|
+
"account.account_deleted": "Cuenta eliminada",
|
|
16461
|
+
"account.your_ticket_fairy_account_has_been_closed_you_are_signed_out": "Tu cuenta de Ticket Fairy se ha cerrado. Se ha cerrado tu sesi\xF3n.",
|
|
16462
|
+
"account.financial_and_transaction_records_are_retained_where_required": "Los registros financieros y de transacciones se conservan cuando sea necesario.",
|
|
16463
|
+
"account.continue_browsing": "Seguir explorando",
|
|
16464
|
+
"account.sign_in_to_review_and_delete_your_ticket_fairy_account": "Inicia sesi\xF3n para revisar y eliminar tu cuenta de Ticket Fairy.",
|
|
16465
|
+
"account.loading_account_deletion_options": "Cargando las opciones para eliminar la cuenta\u2026",
|
|
16466
|
+
"account.account_deletion_options_could_not_load": "No se pudieron cargar las opciones para eliminar la cuenta.",
|
|
16467
|
+
"account.this_closes_your_ticket_fairy_account_across_the_app_website_and_organiser_dashboard": "Esto cierra tu cuenta de Ticket Fairy en la app, el sitio web y el panel de organizadores.",
|
|
16468
|
+
"account.what_is_removed": "Qu\xE9 se elimina",
|
|
16469
|
+
"account.your_personal_profile_sign_in_access_friends_saved_preferences_and_the_content_you_posted_are_removed_or_anonymised": "Tu perfil personal, acceso, amigos, preferencias guardadas y contenido publicado se eliminan o se anonimizan.",
|
|
16470
|
+
"account.what_is_kept": "Qu\xE9 se conserva",
|
|
16471
|
+
"account.financial_and_transaction_records_are_retained_where_required_deleting_your_account_does_not_refund_or_cancel_orders_and_does_not_delete_other_ticket_holders_details": "Los registros financieros y de transacciones se conservan cuando sea necesario. Eliminar tu cuenta no reembolsa ni cancela pedidos, ni elimina los datos de otros titulares de entradas.",
|
|
16472
|
+
"account.if_ticket_fairy_still_appears_in_your_apple_account_after_deletion_remove_its_access_there_too": "Si Ticket Fairy sigue apareciendo en tu cuenta de Apple despu\xE9s de la eliminaci\xF3n, retira tambi\xE9n su acceso all\xED.",
|
|
16473
|
+
"account.before_you_delete_your_account": "Antes de eliminar tu cuenta",
|
|
16474
|
+
"account.open_name_team_settings": "Abrir la configuraci\xF3n del equipo de {{name}}",
|
|
16475
|
+
"account.check_again": "Volver a comprobar",
|
|
16476
|
+
"account.confirm_account_deletion": "Confirmar la eliminaci\xF3n de la cuenta",
|
|
16477
|
+
"account.delete_your_account_permanently": "\xBFEliminar tu cuenta de forma permanente?",
|
|
16478
|
+
"account.this_cannot_be_undone_confirm_that_you_want_to_close_this_account": "Esta acci\xF3n no se puede deshacer. Confirma que quieres cerrar esta cuenta.",
|
|
16479
|
+
"account.we_will_email_a_deletion_code_to_email": "Enviaremos un c\xF3digo de eliminaci\xF3n a {{email}}.",
|
|
16480
|
+
"account.send_a_new_code": "Enviar un c\xF3digo nuevo",
|
|
16481
|
+
"account.email_deletion_code": "Enviar c\xF3digo de eliminaci\xF3n",
|
|
16482
|
+
"account.a_code_was_sent_to_email_it_expires_in_minutes_minutes": "Se envi\xF3 un c\xF3digo a {{email}}. Caduca en {{minutes}} minutos.",
|
|
16483
|
+
"account.try_again_in_seconds_seconds": "Int\xE9ntalo de nuevo en {{seconds}} segundos.",
|
|
16484
|
+
"account.current_password": "Contrase\xF1a actual",
|
|
16485
|
+
"account.deletion_code": "C\xF3digo de eliminaci\xF3n",
|
|
16486
|
+
"account.keep_account": "Conservar cuenta",
|
|
16487
|
+
"account.permanently_delete_account": "Eliminar cuenta permanentemente",
|
|
16488
|
+
"account.please_wait": "Espera un momento\u2026",
|
|
16489
|
+
"account.team_settings": "Configuraci\xF3n del equipo",
|
|
16490
|
+
"account.unable_to_open_team_settings_please_try_again": "No se pudo abrir la configuraci\xF3n del equipo. Int\xE9ntalo de nuevo.",
|
|
16491
|
+
"account.sign_in_to_your_ticket_fairy_account_to_delete_it": "Inicia sesi\xF3n en tu cuenta de Ticket Fairy para eliminarla.",
|
|
16492
|
+
"account.account_deletion_could_not_be_confirmed_try_again": "No se pudo confirmar la eliminaci\xF3n de la cuenta. Int\xE9ntalo de nuevo.",
|
|
16493
|
+
"account.unable_to_update_your_account": "No se pudo actualizar tu cuenta.",
|
|
16494
|
+
"account.unable_to_update_your_account_try_again": "No se pudo actualizar tu cuenta. Int\xE9ntalo de nuevo.",
|
|
16495
|
+
"account.enter_your_password_or_the_code_sent_to_your_email": "Introduce tu contrase\xF1a o el c\xF3digo enviado a tu correo.",
|
|
16496
|
+
"account.that_password_is_not_right_enter_the_password_you_sign_in_with": "Esa contrase\xF1a no es correcta. Introduce la contrase\xF1a que usas para iniciar sesi\xF3n.",
|
|
16497
|
+
"account.that_code_is_not_right_check_the_newest_email_from_ticket_fairy_and_enter_the_code_in_it": "Ese c\xF3digo no es correcto. Revisa el correo m\xE1s reciente de Ticket Fairy e introduce su c\xF3digo.",
|
|
16498
|
+
"account.that_code_no_longer_works_ask_for_a_new_code": "Ese c\xF3digo ya no funciona. Solicita uno nuevo.",
|
|
16499
|
+
"account.we_have_just_sent_you_a_code_check_your_email_or_ask_for_a_new_code_in_a_minute": "Acabamos de enviarte un c\xF3digo. Revisa tu correo o solicita otro en un minuto.",
|
|
16500
|
+
"account.we_could_not_send_the_code_just_now_try_again_in_a_few_minutes": "No pudimos enviar el c\xF3digo. Int\xE9ntalo de nuevo en unos minutos.",
|
|
16501
|
+
"account.we_re_finishing_a_change_to_your_account_wait_a_moment_then_reload_the_page": "Estamos terminando un cambio en tu cuenta. Espera un momento y vuelve a cargar la p\xE1gina.",
|
|
16502
|
+
"account.we_could_not_finish_deleting_your_account_sign_in_and_try_again_or_contact_ticket_fairy_support": "No pudimos terminar de eliminar tu cuenta. Inicia sesi\xF3n e int\xE9ntalo de nuevo, o contacta con el soporte de Ticket Fairy."
|
|
16503
|
+
});
|
|
16007
16504
|
var en = {
|
|
16008
16505
|
"auth.completionAgree": "I agree to the Terms of Service and Privacy Policy.",
|
|
16009
16506
|
"auth.completionTerms": "Read Terms of Service",
|
|
@@ -17102,7 +17599,7 @@ var translateAccountMessage = (translate2, english, vars) => {
|
|
|
17102
17599
|
};
|
|
17103
17600
|
|
|
17104
17601
|
// src/CardInput.tsx
|
|
17105
|
-
import { useEffect as
|
|
17602
|
+
import { useEffect as useEffect21, useRef as useRef22, useState as useState27 } from "react";
|
|
17106
17603
|
import { Platform, StyleSheet as StyleSheet4 } from "react-native";
|
|
17107
17604
|
import { CardField } from "@stripe/stripe-react-native";
|
|
17108
17605
|
|
|
@@ -17112,12 +17609,12 @@ import {
|
|
|
17112
17609
|
useCallback as useCallback13,
|
|
17113
17610
|
useContext as useContext2,
|
|
17114
17611
|
useMemo as useMemo14,
|
|
17115
|
-
useState as
|
|
17612
|
+
useState as useState26
|
|
17116
17613
|
} from "react";
|
|
17117
17614
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
17118
17615
|
|
|
17119
17616
|
// src/ui/InstallmentPicker.tsx
|
|
17120
|
-
import { useEffect as
|
|
17617
|
+
import { useEffect as useEffect19, useMemo as useMemo13, useState as useState24 } from "react";
|
|
17121
17618
|
import { Modal, Pressable as Pressable2, StyleSheet as StyleSheet2, Text as Text2, View as View2 } from "react-native";
|
|
17122
17619
|
|
|
17123
17620
|
// src/ui/primitives.tsx
|
|
@@ -17157,48 +17654,48 @@ var Card = ({
|
|
|
17157
17654
|
style
|
|
17158
17655
|
}) => {
|
|
17159
17656
|
const theme = useTheme();
|
|
17160
|
-
const
|
|
17161
|
-
return /* @__PURE__ */ jsx2(View, { style: [
|
|
17657
|
+
const s6 = useStyles(theme);
|
|
17658
|
+
return /* @__PURE__ */ jsx2(View, { style: [s6.card, style], children });
|
|
17162
17659
|
};
|
|
17163
17660
|
var SectionHeader = ({
|
|
17164
17661
|
title,
|
|
17165
17662
|
subtitle
|
|
17166
17663
|
}) => {
|
|
17167
17664
|
const theme = useTheme();
|
|
17168
|
-
const
|
|
17169
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
17170
|
-
/* @__PURE__ */ jsx2(Text, { style:
|
|
17171
|
-
subtitle ? /* @__PURE__ */ jsx2(Text, { style:
|
|
17665
|
+
const s6 = useStyles(theme);
|
|
17666
|
+
return /* @__PURE__ */ jsxs(View, { style: s6.sectionHeader, children: [
|
|
17667
|
+
/* @__PURE__ */ jsx2(Text, { style: s6.sectionTitle, children: title }),
|
|
17668
|
+
subtitle ? /* @__PURE__ */ jsx2(Text, { style: s6.sectionSubtitle, children: subtitle }) : null
|
|
17172
17669
|
] });
|
|
17173
17670
|
};
|
|
17174
17671
|
var Divider = () => {
|
|
17175
17672
|
const theme = useTheme();
|
|
17176
|
-
const
|
|
17177
|
-
return /* @__PURE__ */ jsx2(View, { style:
|
|
17673
|
+
const s6 = useStyles(theme);
|
|
17674
|
+
return /* @__PURE__ */ jsx2(View, { style: s6.divider });
|
|
17178
17675
|
};
|
|
17179
17676
|
var BodyText = ({
|
|
17180
17677
|
children,
|
|
17181
17678
|
style
|
|
17182
17679
|
}) => {
|
|
17183
17680
|
const theme = useTheme();
|
|
17184
|
-
const
|
|
17185
|
-
return /* @__PURE__ */ jsx2(Text, { style: [
|
|
17681
|
+
const s6 = useStyles(theme);
|
|
17682
|
+
return /* @__PURE__ */ jsx2(Text, { style: [s6.body, style], children });
|
|
17186
17683
|
};
|
|
17187
17684
|
var MutedText = ({
|
|
17188
17685
|
children,
|
|
17189
17686
|
style
|
|
17190
17687
|
}) => {
|
|
17191
17688
|
const theme = useTheme();
|
|
17192
|
-
const
|
|
17193
|
-
return /* @__PURE__ */ jsx2(Text, { style: [
|
|
17689
|
+
const s6 = useStyles(theme);
|
|
17690
|
+
return /* @__PURE__ */ jsx2(Text, { style: [s6.muted, style], children });
|
|
17194
17691
|
};
|
|
17195
17692
|
var ErrorText = ({ children }) => {
|
|
17196
17693
|
const theme = useTheme();
|
|
17197
|
-
const
|
|
17694
|
+
const s6 = useStyles(theme);
|
|
17198
17695
|
return /* @__PURE__ */ jsx2(
|
|
17199
17696
|
Text,
|
|
17200
17697
|
{
|
|
17201
|
-
style:
|
|
17698
|
+
style: s6.errorText,
|
|
17202
17699
|
accessibilityRole: "alert",
|
|
17203
17700
|
accessibilityLiveRegion: "assertive",
|
|
17204
17701
|
children
|
|
@@ -17213,7 +17710,7 @@ var Button = ({
|
|
|
17213
17710
|
variant = "primary"
|
|
17214
17711
|
}) => {
|
|
17215
17712
|
const theme = useTheme();
|
|
17216
|
-
const
|
|
17713
|
+
const s6 = useStyles(theme);
|
|
17217
17714
|
const frozen = useFrozen();
|
|
17218
17715
|
const isDisabled = disabled || loading || frozen;
|
|
17219
17716
|
const ghost = variant === "ghost";
|
|
@@ -17225,10 +17722,10 @@ var Button = ({
|
|
|
17225
17722
|
disabled: isDisabled,
|
|
17226
17723
|
onPress,
|
|
17227
17724
|
style: ({ pressed }) => [
|
|
17228
|
-
|
|
17229
|
-
ghost &&
|
|
17230
|
-
isDisabled &&
|
|
17231
|
-
pressed && !isDisabled &&
|
|
17725
|
+
s6.button,
|
|
17726
|
+
ghost && s6.buttonGhost,
|
|
17727
|
+
isDisabled && s6.buttonDisabled,
|
|
17728
|
+
pressed && !isDisabled && s6.buttonPressed
|
|
17232
17729
|
],
|
|
17233
17730
|
children: loading ? /* @__PURE__ */ jsx2(
|
|
17234
17731
|
ActivityIndicator,
|
|
@@ -17236,7 +17733,7 @@ var Button = ({
|
|
|
17236
17733
|
size: "small",
|
|
17237
17734
|
color: ghost ? theme.accent : theme.accentContrast
|
|
17238
17735
|
}
|
|
17239
|
-
) : /* @__PURE__ */ jsx2(Text, { style: [
|
|
17736
|
+
) : /* @__PURE__ */ jsx2(Text, { style: [s6.buttonLabel, ghost && s6.buttonLabelGhost], children })
|
|
17240
17737
|
}
|
|
17241
17738
|
);
|
|
17242
17739
|
};
|
|
@@ -17305,9 +17802,9 @@ var useStyles = (theme) => useMemo12(
|
|
|
17305
17802
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
17306
17803
|
var useInstallmentPicker = () => {
|
|
17307
17804
|
var _a;
|
|
17308
|
-
const [pending2, setPending] =
|
|
17309
|
-
const [choices] =
|
|
17310
|
-
|
|
17805
|
+
const [pending2, setPending] = useState24(null);
|
|
17806
|
+
const [choices] = useState24(() => createInstallmentChoices(setPending));
|
|
17807
|
+
useEffect19(() => () => choices.cancel(), [choices]);
|
|
17311
17808
|
const onInstallmentOffers = choices.ask;
|
|
17312
17809
|
const choose = (offer) => pending2 == null ? void 0 : pending2.choose(offer);
|
|
17313
17810
|
const picker = /* @__PURE__ */ jsx3(
|
|
@@ -17322,7 +17819,7 @@ var useInstallmentPicker = () => {
|
|
|
17322
17819
|
};
|
|
17323
17820
|
var InstallmentModal = ({ offers, onChoose, onClose }) => {
|
|
17324
17821
|
const theme = useTheme();
|
|
17325
|
-
const
|
|
17822
|
+
const s6 = useStyles2(theme);
|
|
17326
17823
|
return /* @__PURE__ */ jsx3(
|
|
17327
17824
|
Modal,
|
|
17328
17825
|
{
|
|
@@ -17330,25 +17827,25 @@ var InstallmentModal = ({ offers, onChoose, onClose }) => {
|
|
|
17330
17827
|
transparent: true,
|
|
17331
17828
|
animationType: "fade",
|
|
17332
17829
|
onRequestClose: onClose,
|
|
17333
|
-
children: /* @__PURE__ */ jsx3(Pressable2, { style:
|
|
17830
|
+
children: /* @__PURE__ */ jsx3(Pressable2, { style: s6.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxs2(Pressable2, { style: s6.box, onPress: () => {
|
|
17334
17831
|
}, children: [
|
|
17335
|
-
/* @__PURE__ */ jsx3(Text2, { style:
|
|
17336
|
-
/* @__PURE__ */ jsx3(View2, { style:
|
|
17832
|
+
/* @__PURE__ */ jsx3(Text2, { style: s6.title, accessibilityRole: "header", children: "Pay in installments?" }),
|
|
17833
|
+
/* @__PURE__ */ jsx3(View2, { style: s6.list, children: (offers != null ? offers : []).map((offer, i) => {
|
|
17337
17834
|
var _a;
|
|
17338
17835
|
return /* @__PURE__ */ jsxs2(
|
|
17339
17836
|
Pressable2,
|
|
17340
17837
|
{
|
|
17341
17838
|
accessibilityRole: "button",
|
|
17342
|
-
style: ({ pressed }) => [
|
|
17839
|
+
style: ({ pressed }) => [s6.option, pressed && s6.optionPressed],
|
|
17343
17840
|
onPress: () => onChoose(offer),
|
|
17344
17841
|
children: [
|
|
17345
|
-
/* @__PURE__ */ jsxs2(Text2, { style:
|
|
17842
|
+
/* @__PURE__ */ jsxs2(Text2, { style: s6.optionMain, children: [
|
|
17346
17843
|
offer.count,
|
|
17347
17844
|
" \xD7",
|
|
17348
17845
|
" ",
|
|
17349
17846
|
(_a = offer.per_installment_formatted) != null ? _a : offer.per_installment
|
|
17350
17847
|
] }),
|
|
17351
|
-
/* @__PURE__ */ jsxs2(Text2, { style:
|
|
17848
|
+
/* @__PURE__ */ jsxs2(Text2, { style: s6.optionMeta, children: [
|
|
17352
17849
|
offer.total_formatted ? `${offer.total_formatted} total` : "",
|
|
17353
17850
|
offer.diff_from_original_formatted ? ` \xB7 ${offer.diff_from_original_formatted}` : ""
|
|
17354
17851
|
] })
|
|
@@ -17413,7 +17910,7 @@ var useStyles2 = (theme) => useMemo13(
|
|
|
17413
17910
|
);
|
|
17414
17911
|
|
|
17415
17912
|
// src/ui/ProviderPages.tsx
|
|
17416
|
-
import { useEffect as
|
|
17913
|
+
import { useEffect as useEffect20, useState as useState25 } from "react";
|
|
17417
17914
|
import {
|
|
17418
17915
|
ActivityIndicator as ActivityIndicator2,
|
|
17419
17916
|
Linking,
|
|
@@ -17425,10 +17922,10 @@ import {
|
|
|
17425
17922
|
import { WebView } from "react-native-webview";
|
|
17426
17923
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
17427
17924
|
var useProviderPages = () => {
|
|
17428
|
-
const [pending2, setPending] =
|
|
17429
|
-
const [pages] =
|
|
17430
|
-
|
|
17431
|
-
|
|
17925
|
+
const [pending2, setPending] = useState25(null);
|
|
17926
|
+
const [pages] = useState25(() => createProviderPages(setPending));
|
|
17927
|
+
useEffect20(() => () => pages.cancel(), [pages]);
|
|
17928
|
+
useEffect20(() => {
|
|
17432
17929
|
if (!pending2) return;
|
|
17433
17930
|
const subscription = Linking.addEventListener("url", ({ url: url2 }) => {
|
|
17434
17931
|
if (providerPageMatchesReturn(url2, pending2.request.returnUrlPrefix))
|
|
@@ -17447,8 +17944,8 @@ var ProviderPage = ({
|
|
|
17447
17944
|
}) => {
|
|
17448
17945
|
var _a;
|
|
17449
17946
|
const theme = useTheme();
|
|
17450
|
-
const [error, setError] =
|
|
17451
|
-
const [reload, setReload] =
|
|
17947
|
+
const [error, setError] = useState25("");
|
|
17948
|
+
const [reload, setReload] = useState25(0);
|
|
17452
17949
|
const close = () => settle(pending2.id, { event: "dismiss" });
|
|
17453
17950
|
const source = pending2.request.uri ? { uri: pending2.request.uri } : { html: (_a = pending2.request.html) != null ? _a : "", baseUrl: pending2.request.baseUrl };
|
|
17454
17951
|
return /* @__PURE__ */ jsx4(
|
|
@@ -17580,7 +18077,7 @@ var getQueryClient = () => {
|
|
|
17580
18077
|
return sharedQueryClient;
|
|
17581
18078
|
};
|
|
17582
18079
|
var CheckoutRoot = ({ checkout, theme, children }) => {
|
|
17583
|
-
const [attempt, setAttempt] =
|
|
18080
|
+
const [attempt, setAttempt] = useState26(0);
|
|
17584
18081
|
const requestValidation = useCallback13(() => setAttempt((n) => n + 1), []);
|
|
17585
18082
|
const validation = useMemo14(
|
|
17586
18083
|
() => ({ attempt, requestValidation }),
|
|
@@ -17652,11 +18149,11 @@ var CardInput = ({
|
|
|
17652
18149
|
visible = true
|
|
17653
18150
|
}) => {
|
|
17654
18151
|
const theme = useTheme();
|
|
17655
|
-
const [attachment, setAttachment] =
|
|
17656
|
-
const handleRef =
|
|
17657
|
-
const visibleRef =
|
|
18152
|
+
const [attachment, setAttachment] = useState27(0);
|
|
18153
|
+
const handleRef = useRef22(null);
|
|
18154
|
+
const visibleRef = useRef22(visible);
|
|
17658
18155
|
visibleRef.current = visible;
|
|
17659
|
-
|
|
18156
|
+
useEffect21(() => {
|
|
17660
18157
|
const handle = cardFields.mount(
|
|
17661
18158
|
owner,
|
|
17662
18159
|
() => setAttachment((n) => n + 1),
|
|
@@ -17668,7 +18165,7 @@ var CardInput = ({
|
|
|
17668
18165
|
handleRef.current = null;
|
|
17669
18166
|
};
|
|
17670
18167
|
}, [owner]);
|
|
17671
|
-
|
|
18168
|
+
useEffect21(() => {
|
|
17672
18169
|
var _a;
|
|
17673
18170
|
(_a = handleRef.current) == null ? void 0 : _a.setVisible(visible);
|
|
17674
18171
|
}, [visible]);
|
|
@@ -17949,7 +18446,7 @@ var configureCheckout = (config) => configure({
|
|
|
17949
18446
|
});
|
|
17950
18447
|
|
|
17951
18448
|
// src/ui/Field.tsx
|
|
17952
|
-
import { useMemo as useMemo15, useState as
|
|
18449
|
+
import { useMemo as useMemo15, useState as useState28 } from "react";
|
|
17953
18450
|
import {
|
|
17954
18451
|
Pressable as Pressable3,
|
|
17955
18452
|
StyleSheet as StyleSheet5,
|
|
@@ -17960,14 +18457,14 @@ import {
|
|
|
17960
18457
|
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
17961
18458
|
var Field = ({ label, error, required, children }) => {
|
|
17962
18459
|
const theme = useTheme();
|
|
17963
|
-
const
|
|
17964
|
-
return /* @__PURE__ */ jsxs5(View4, { style:
|
|
17965
|
-
label ? /* @__PURE__ */ jsxs5(Text3, { style:
|
|
18460
|
+
const s6 = useFieldStyles(theme);
|
|
18461
|
+
return /* @__PURE__ */ jsxs5(View4, { style: s6.field, children: [
|
|
18462
|
+
label ? /* @__PURE__ */ jsxs5(Text3, { style: s6.label, children: [
|
|
17966
18463
|
label,
|
|
17967
|
-
required ? /* @__PURE__ */ jsx7(Text3, { style:
|
|
18464
|
+
required ? /* @__PURE__ */ jsx7(Text3, { style: s6.required, children: " *" }) : null
|
|
17968
18465
|
] }) : null,
|
|
17969
18466
|
children,
|
|
17970
|
-
error ? /* @__PURE__ */ jsx7(Text3, { style:
|
|
18467
|
+
error ? /* @__PURE__ */ jsx7(Text3, { style: s6.error, children: error }) : null
|
|
17971
18468
|
] });
|
|
17972
18469
|
};
|
|
17973
18470
|
var Input = ({
|
|
@@ -17978,24 +18475,24 @@ var Input = ({
|
|
|
17978
18475
|
autoCapitalize = "sentences",
|
|
17979
18476
|
secureTextEntry,
|
|
17980
18477
|
editable: editableProp = true,
|
|
17981
|
-
invalid = false,
|
|
18478
|
+
invalid: invalid2 = false,
|
|
17982
18479
|
onBlur,
|
|
17983
18480
|
...nativeProps
|
|
17984
18481
|
}) => {
|
|
17985
18482
|
const frozen = useFrozen();
|
|
17986
18483
|
const editable = editableProp && !frozen;
|
|
17987
18484
|
const theme = useTheme();
|
|
17988
|
-
const
|
|
17989
|
-
const [focused, setFocused] =
|
|
18485
|
+
const s6 = useFieldStyles(theme);
|
|
18486
|
+
const [focused, setFocused] = useState28(false);
|
|
17990
18487
|
return /* @__PURE__ */ jsx7(
|
|
17991
18488
|
TextInput,
|
|
17992
18489
|
{
|
|
17993
18490
|
...nativeProps,
|
|
17994
18491
|
style: [
|
|
17995
|
-
|
|
17996
|
-
focused &&
|
|
17997
|
-
|
|
17998
|
-
!editable &&
|
|
18492
|
+
s6.input,
|
|
18493
|
+
focused && s6.inputFocused,
|
|
18494
|
+
invalid2 && s6.inputInvalid,
|
|
18495
|
+
!editable && s6.inputDisabled
|
|
17999
18496
|
],
|
|
18000
18497
|
value: value6,
|
|
18001
18498
|
onChangeText,
|
|
@@ -18014,9 +18511,9 @@ var Input = ({
|
|
|
18014
18511
|
}
|
|
18015
18512
|
);
|
|
18016
18513
|
};
|
|
18017
|
-
var Checkbox = ({ checked, onChange, label, invalid = false }) => {
|
|
18514
|
+
var Checkbox = ({ checked, onChange, label, invalid: invalid2 = false }) => {
|
|
18018
18515
|
const theme = useTheme();
|
|
18019
|
-
const
|
|
18516
|
+
const s6 = useFieldStyles(theme);
|
|
18020
18517
|
const frozen = useFrozen();
|
|
18021
18518
|
return /* @__PURE__ */ jsxs5(
|
|
18022
18519
|
Pressable3,
|
|
@@ -18025,20 +18522,20 @@ var Checkbox = ({ checked, onChange, label, invalid = false }) => {
|
|
|
18025
18522
|
accessibilityState: { checked, disabled: frozen },
|
|
18026
18523
|
disabled: frozen,
|
|
18027
18524
|
onPress: () => onChange(!checked),
|
|
18028
|
-
style:
|
|
18525
|
+
style: s6.checkboxRow,
|
|
18029
18526
|
children: [
|
|
18030
18527
|
/* @__PURE__ */ jsx7(
|
|
18031
18528
|
View4,
|
|
18032
18529
|
{
|
|
18033
18530
|
style: [
|
|
18034
|
-
|
|
18035
|
-
checked &&
|
|
18036
|
-
|
|
18531
|
+
s6.checkboxBox,
|
|
18532
|
+
checked && s6.checkboxBoxChecked,
|
|
18533
|
+
invalid2 && !checked && s6.checkboxBoxInvalid
|
|
18037
18534
|
],
|
|
18038
|
-
children: checked ? /* @__PURE__ */ jsx7(Text3, { style:
|
|
18535
|
+
children: checked ? /* @__PURE__ */ jsx7(Text3, { style: s6.checkboxMark, children: "\u2713" }) : null
|
|
18039
18536
|
}
|
|
18040
18537
|
),
|
|
18041
|
-
typeof label === "string" ? /* @__PURE__ */ jsx7(Text3, { style:
|
|
18538
|
+
typeof label === "string" ? /* @__PURE__ */ jsx7(Text3, { style: s6.checkboxLabel, children: label }) : label
|
|
18042
18539
|
]
|
|
18043
18540
|
}
|
|
18044
18541
|
);
|
|
@@ -18093,7 +18590,7 @@ var useFieldStyles = (theme) => useMemo15(
|
|
|
18093
18590
|
);
|
|
18094
18591
|
|
|
18095
18592
|
// src/ui/Select.tsx
|
|
18096
|
-
import { useMemo as useMemo16, useState as
|
|
18593
|
+
import { useMemo as useMemo16, useState as useState29 } from "react";
|
|
18097
18594
|
import { FlatList, Modal as Modal3, Pressable as Pressable4, StyleSheet as StyleSheet6, Text as Text4, View as View5 } from "react-native";
|
|
18098
18595
|
import { Fragment, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
18099
18596
|
function Select({
|
|
@@ -18101,14 +18598,14 @@ function Select({
|
|
|
18101
18598
|
onChange,
|
|
18102
18599
|
options,
|
|
18103
18600
|
placeholder = "Select\u2026",
|
|
18104
|
-
invalid = false,
|
|
18601
|
+
invalid: invalid2 = false,
|
|
18105
18602
|
disabled: disabledProp = false
|
|
18106
18603
|
}) {
|
|
18107
18604
|
const frozen = useFrozen();
|
|
18108
18605
|
const disabled = disabledProp || frozen;
|
|
18109
18606
|
const theme = useTheme();
|
|
18110
|
-
const
|
|
18111
|
-
const [open, setOpen] =
|
|
18607
|
+
const s6 = useSelectStyles(theme);
|
|
18608
|
+
const [open, setOpen] = useState29(false);
|
|
18112
18609
|
const selected = options.find((o) => o.value === value6);
|
|
18113
18610
|
return /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
18114
18611
|
/* @__PURE__ */ jsxs6(
|
|
@@ -18117,10 +18614,10 @@ function Select({
|
|
|
18117
18614
|
accessibilityRole: "button",
|
|
18118
18615
|
disabled,
|
|
18119
18616
|
onPress: () => setOpen(true),
|
|
18120
|
-
style: [
|
|
18617
|
+
style: [s6.control, invalid2 && s6.controlInvalid, disabled && s6.controlDisabled],
|
|
18121
18618
|
children: [
|
|
18122
|
-
/* @__PURE__ */ jsx8(Text4, { style: [
|
|
18123
|
-
/* @__PURE__ */ jsx8(Text4, { style:
|
|
18619
|
+
/* @__PURE__ */ jsx8(Text4, { style: [s6.value, !selected && s6.placeholder], numberOfLines: 1, children: selected ? selected.label : placeholder }),
|
|
18620
|
+
/* @__PURE__ */ jsx8(Text4, { style: s6.chevron, children: "\u25BE" })
|
|
18124
18621
|
]
|
|
18125
18622
|
}
|
|
18126
18623
|
),
|
|
@@ -18131,7 +18628,7 @@ function Select({
|
|
|
18131
18628
|
transparent: true,
|
|
18132
18629
|
animationType: "fade",
|
|
18133
18630
|
onRequestClose: () => setOpen(false),
|
|
18134
|
-
children: /* @__PURE__ */ jsx8(Pressable4, { style:
|
|
18631
|
+
children: /* @__PURE__ */ jsx8(Pressable4, { style: s6.backdrop, onPress: () => setOpen(false), children: /* @__PURE__ */ jsx8(Pressable4, { style: s6.sheet, onPress: () => {
|
|
18135
18632
|
}, children: /* @__PURE__ */ jsx8(
|
|
18136
18633
|
FlatList,
|
|
18137
18634
|
{
|
|
@@ -18143,19 +18640,19 @@ function Select({
|
|
|
18143
18640
|
return /* @__PURE__ */ jsxs6(
|
|
18144
18641
|
Pressable4,
|
|
18145
18642
|
{
|
|
18146
|
-
style:
|
|
18643
|
+
style: s6.option,
|
|
18147
18644
|
onPress: () => {
|
|
18148
18645
|
onChange(item.value);
|
|
18149
18646
|
setOpen(false);
|
|
18150
18647
|
},
|
|
18151
18648
|
children: [
|
|
18152
|
-
/* @__PURE__ */ jsx8(Text4, { style: [
|
|
18153
|
-
isSelected ? /* @__PURE__ */ jsx8(Text4, { style:
|
|
18649
|
+
/* @__PURE__ */ jsx8(Text4, { style: [s6.optionLabel, isSelected && s6.optionLabelSelected], children: item.label }),
|
|
18650
|
+
isSelected ? /* @__PURE__ */ jsx8(Text4, { style: s6.optionCheck, children: "\u2713" }) : null
|
|
18154
18651
|
]
|
|
18155
18652
|
}
|
|
18156
18653
|
);
|
|
18157
18654
|
},
|
|
18158
|
-
ItemSeparatorComponent: () => /* @__PURE__ */ jsx8(View5, { style:
|
|
18655
|
+
ItemSeparatorComponent: () => /* @__PURE__ */ jsx8(View5, { style: s6.sep })
|
|
18159
18656
|
}
|
|
18160
18657
|
) }) })
|
|
18161
18658
|
}
|
|
@@ -18238,7 +18735,7 @@ var QuantitySelect = ({
|
|
|
18238
18735
|
const frozen = useFrozen();
|
|
18239
18736
|
const disabled = disabledProp || frozen;
|
|
18240
18737
|
const theme = useTheme();
|
|
18241
|
-
const
|
|
18738
|
+
const s6 = useQuantityStyles(theme);
|
|
18242
18739
|
const lo = Math.max(1, min);
|
|
18243
18740
|
const cap = Math.min(max, 50);
|
|
18244
18741
|
const atZero = value6 <= 0;
|
|
@@ -18254,7 +18751,7 @@ var QuantitySelect = ({
|
|
|
18254
18751
|
return /* @__PURE__ */ jsxs7(
|
|
18255
18752
|
View6,
|
|
18256
18753
|
{
|
|
18257
|
-
style:
|
|
18754
|
+
style: s6.stepper,
|
|
18258
18755
|
accessible: Boolean(label),
|
|
18259
18756
|
accessibilityRole: label ? "adjustable" : void 0,
|
|
18260
18757
|
accessibilityLabel: label,
|
|
@@ -18273,11 +18770,11 @@ var QuantitySelect = ({
|
|
|
18273
18770
|
accessibilityLabel: "Remove one",
|
|
18274
18771
|
disabled: disabled || atZero,
|
|
18275
18772
|
onPress: dec,
|
|
18276
|
-
style: [
|
|
18277
|
-
children: /* @__PURE__ */ jsx9(Text5, { style:
|
|
18773
|
+
style: [s6.btn, (disabled || atZero) && s6.btnDisabled],
|
|
18774
|
+
children: /* @__PURE__ */ jsx9(Text5, { style: s6.glyph, children: "\u2212" })
|
|
18278
18775
|
}
|
|
18279
18776
|
),
|
|
18280
|
-
/* @__PURE__ */ jsx9(Text5, { style:
|
|
18777
|
+
/* @__PURE__ */ jsx9(Text5, { style: s6.value, children: value6 }),
|
|
18281
18778
|
/* @__PURE__ */ jsx9(
|
|
18282
18779
|
Pressable5,
|
|
18283
18780
|
{
|
|
@@ -18285,8 +18782,8 @@ var QuantitySelect = ({
|
|
|
18285
18782
|
accessibilityLabel: "Add one",
|
|
18286
18783
|
disabled: disabled || atCap,
|
|
18287
18784
|
onPress: inc,
|
|
18288
|
-
style: [
|
|
18289
|
-
children: /* @__PURE__ */ jsx9(Text5, { style:
|
|
18785
|
+
style: [s6.btn, (disabled || atCap) && s6.btnDisabled],
|
|
18786
|
+
children: /* @__PURE__ */ jsx9(Text5, { style: s6.glyph, children: "+" })
|
|
18290
18787
|
}
|
|
18291
18788
|
)
|
|
18292
18789
|
]
|
|
@@ -18323,8 +18820,8 @@ var useQuantityStyles = (theme) => useMemo17(
|
|
|
18323
18820
|
import { useMemo as useMemo18 } from "react";
|
|
18324
18821
|
import { StyleSheet as StyleSheet8, Text as Text6, View as View7 } from "react-native";
|
|
18325
18822
|
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
18326
|
-
var clock = (
|
|
18327
|
-
const v = Math.max(0, Math.floor(
|
|
18823
|
+
var clock = (s6) => {
|
|
18824
|
+
const v = Math.max(0, Math.floor(s6));
|
|
18328
18825
|
return v >= 3600 ? `${Math.floor(v / 3600)}:${String(Math.floor(v % 3600 / 60)).padStart(
|
|
18329
18826
|
2,
|
|
18330
18827
|
"0"
|
|
@@ -18332,11 +18829,11 @@ var clock = (s4) => {
|
|
|
18332
18829
|
};
|
|
18333
18830
|
var Timer = ({ seconds, urgentAt = 60, label }) => {
|
|
18334
18831
|
const theme = useTheme();
|
|
18335
|
-
const
|
|
18832
|
+
const s6 = useTimerStyles(theme);
|
|
18336
18833
|
const urgent = seconds <= urgentAt;
|
|
18337
|
-
return /* @__PURE__ */ jsxs8(View7, { style:
|
|
18338
|
-
label != null ? typeof label === "string" ? /* @__PURE__ */ jsx10(Text6, { style:
|
|
18339
|
-
/* @__PURE__ */ jsx10(Text6, { style: [
|
|
18834
|
+
return /* @__PURE__ */ jsxs8(View7, { style: s6.row, children: [
|
|
18835
|
+
label != null ? typeof label === "string" ? /* @__PURE__ */ jsx10(Text6, { style: s6.label, children: label }) : label : null,
|
|
18836
|
+
/* @__PURE__ */ jsx10(Text6, { style: [s6.clock, urgent && s6.clockUrgent], children: clock(seconds) })
|
|
18340
18837
|
] });
|
|
18341
18838
|
};
|
|
18342
18839
|
var useTimerStyles = (theme) => useMemo18(
|
|
@@ -18360,12 +18857,12 @@ var useTimerStyles = (theme) => useMemo18(
|
|
|
18360
18857
|
);
|
|
18361
18858
|
|
|
18362
18859
|
// src/ui/TimerBanner.tsx
|
|
18363
|
-
import { useMemo as useMemo19, useState as
|
|
18860
|
+
import { useMemo as useMemo19, useState as useState30 } from "react";
|
|
18364
18861
|
import { Pressable as Pressable6, StyleSheet as StyleSheet9, Text as Text7, View as View8 } from "react-native";
|
|
18365
18862
|
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
18366
|
-
var clock2 = (
|
|
18367
|
-
const m = String(Math.floor(
|
|
18368
|
-
const ss = String(
|
|
18863
|
+
var clock2 = (s6) => {
|
|
18864
|
+
const m = String(Math.floor(s6 / 60)).padStart(2, "0");
|
|
18865
|
+
const ss = String(s6 % 60).padStart(2, "0");
|
|
18369
18866
|
return `${m}:${ss}`;
|
|
18370
18867
|
};
|
|
18371
18868
|
var TimerBanner = ({
|
|
@@ -18374,16 +18871,16 @@ var TimerBanner = ({
|
|
|
18374
18871
|
message = "Please complete your purchase before the timer reaches zero."
|
|
18375
18872
|
}) => {
|
|
18376
18873
|
const theme = useTheme();
|
|
18377
|
-
const
|
|
18378
|
-
const [dismissed, setDismissed] =
|
|
18874
|
+
const s6 = useBannerStyles(theme);
|
|
18875
|
+
const [dismissed, setDismissed] = useState30(false);
|
|
18379
18876
|
if (seconds === void 0 || seconds <= 0 || dismissed) return null;
|
|
18380
18877
|
const urgent = seconds <= urgentAt;
|
|
18381
18878
|
return (
|
|
18382
18879
|
// `accessibilityLiveRegion="polite"` is the RN analogue of the web
|
|
18383
18880
|
// `role="status"` — announce the countdown without stealing focus.
|
|
18384
|
-
/* @__PURE__ */ jsxs9(View8, { accessibilityLiveRegion: "polite", style: [
|
|
18385
|
-
/* @__PURE__ */ jsx11(Text7, { style: [
|
|
18386
|
-
/* @__PURE__ */ jsx11(Text7, { style: [
|
|
18881
|
+
/* @__PURE__ */ jsxs9(View8, { accessibilityLiveRegion: "polite", style: [s6.banner, urgent && s6.bannerUrgent], children: [
|
|
18882
|
+
/* @__PURE__ */ jsx11(Text7, { style: [s6.msg, urgent && s6.textUrgent], children: message }),
|
|
18883
|
+
/* @__PURE__ */ jsx11(Text7, { style: [s6.clock, urgent && s6.textUrgent], children: clock2(seconds) }),
|
|
18387
18884
|
/* @__PURE__ */ jsx11(
|
|
18388
18885
|
Pressable6,
|
|
18389
18886
|
{
|
|
@@ -18391,8 +18888,8 @@ var TimerBanner = ({
|
|
|
18391
18888
|
accessibilityLabel: "Dismiss",
|
|
18392
18889
|
hitSlop: 8,
|
|
18393
18890
|
onPress: () => setDismissed(true),
|
|
18394
|
-
style:
|
|
18395
|
-
children: /* @__PURE__ */ jsx11(Text7, { style: [
|
|
18891
|
+
style: s6.close,
|
|
18892
|
+
children: /* @__PURE__ */ jsx11(Text7, { style: [s6.closeGlyph, urgent && s6.textUrgent], children: "\xD7" })
|
|
18396
18893
|
}
|
|
18397
18894
|
)
|
|
18398
18895
|
] })
|
|
@@ -18457,14 +18954,14 @@ var PaymentMethods = ({
|
|
|
18457
18954
|
}) => {
|
|
18458
18955
|
const theme = useTheme();
|
|
18459
18956
|
const frozen = useFrozen();
|
|
18460
|
-
const
|
|
18461
|
-
return /* @__PURE__ */ jsx12(View9, { style:
|
|
18957
|
+
const s6 = useStyles3(theme);
|
|
18958
|
+
return /* @__PURE__ */ jsx12(View9, { style: s6.list, accessibilityRole: "radiogroup", children: options.map((option) => {
|
|
18462
18959
|
var _a, _b;
|
|
18463
18960
|
const active2 = option.value === selected;
|
|
18464
18961
|
const extraValue = option.extra === "phoneNumber" ? (_a = extraValues[option.value]) == null ? void 0 : _a.phoneNumber : (_b = extraValues[option.value]) == null ? void 0 : _b.cashtag;
|
|
18465
18962
|
const extraInvalid = Boolean(active2 && option.extra && showValidation) && !(extraValue == null ? void 0 : extraValue.trim());
|
|
18466
18963
|
const showBody = active2 && (option.value === inputSlotFor || Boolean(option.extra));
|
|
18467
|
-
return /* @__PURE__ */ jsxs10(View9, { style: [
|
|
18964
|
+
return /* @__PURE__ */ jsxs10(View9, { style: [s6.row, active2 && s6.rowActive], children: [
|
|
18468
18965
|
/* @__PURE__ */ jsxs10(
|
|
18469
18966
|
Pressable7,
|
|
18470
18967
|
{
|
|
@@ -18474,23 +18971,23 @@ var PaymentMethods = ({
|
|
|
18474
18971
|
onPress: () => {
|
|
18475
18972
|
if (!frozen) onSelect(option.value);
|
|
18476
18973
|
},
|
|
18477
|
-
style:
|
|
18974
|
+
style: s6.rowHead,
|
|
18478
18975
|
children: [
|
|
18479
|
-
/* @__PURE__ */ jsx12(View9, { style: [
|
|
18976
|
+
/* @__PURE__ */ jsx12(View9, { style: [s6.radio, active2 && s6.radioActive], children: active2 ? /* @__PURE__ */ jsx12(View9, { style: s6.radioDot }) : null }),
|
|
18480
18977
|
option.iconUrl ? /* @__PURE__ */ jsx12(
|
|
18481
18978
|
Image,
|
|
18482
18979
|
{
|
|
18483
18980
|
source: { uri: option.iconUrl },
|
|
18484
|
-
style:
|
|
18981
|
+
style: s6.icon,
|
|
18485
18982
|
resizeMode: "contain",
|
|
18486
18983
|
accessibilityIgnoresInvertColors: true
|
|
18487
18984
|
}
|
|
18488
18985
|
) : null,
|
|
18489
|
-
/* @__PURE__ */ jsx12(Text8, { style:
|
|
18986
|
+
/* @__PURE__ */ jsx12(Text8, { style: s6.rowLabel, children: option.label })
|
|
18490
18987
|
]
|
|
18491
18988
|
}
|
|
18492
18989
|
),
|
|
18493
|
-
showBody ? /* @__PURE__ */ jsxs10(View9, { style:
|
|
18990
|
+
showBody ? /* @__PURE__ */ jsxs10(View9, { style: s6.slot, children: [
|
|
18494
18991
|
option.value === inputSlotFor ? children : null,
|
|
18495
18992
|
option.extra ? /* @__PURE__ */ jsx12(
|
|
18496
18993
|
Field,
|
|
@@ -18563,18 +19060,18 @@ var useStyles3 = (theme) => useMemo20(
|
|
|
18563
19060
|
// src/sections/Tickets.tsx
|
|
18564
19061
|
import {
|
|
18565
19062
|
Fragment as Fragment2,
|
|
18566
|
-
useEffect as
|
|
19063
|
+
useEffect as useEffect22,
|
|
18567
19064
|
useMemo as useMemo21,
|
|
18568
|
-
useRef as
|
|
18569
|
-
useState as
|
|
19065
|
+
useRef as useRef23,
|
|
19066
|
+
useState as useState31
|
|
18570
19067
|
} from "react";
|
|
18571
19068
|
import { Pressable as Pressable8, StyleSheet as StyleSheet11, Text as Text9, View as View10 } from "react-native";
|
|
18572
19069
|
import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
18573
19070
|
var money = (sym, n) => `${sym} ${Number(n).toFixed(2)}`;
|
|
18574
19071
|
var WaitingListForm = ({ ticket, onJoin }) => {
|
|
18575
|
-
const [form, setForm] =
|
|
18576
|
-
const [state, setState] =
|
|
18577
|
-
const [error, setError] =
|
|
19072
|
+
const [form, setForm] = useState31({ firstName: "", lastName: "", email: "" });
|
|
19073
|
+
const [state, setState] = useState31("idle");
|
|
19074
|
+
const [error, setError] = useState31("");
|
|
18578
19075
|
const ok = Boolean(form.firstName.trim() && form.lastName.trim() && form.email.trim());
|
|
18579
19076
|
if (state === "done")
|
|
18580
19077
|
return /* @__PURE__ */ jsx13(MutedText, { children: "You\u2019re on the waiting list \u2014 we\u2019ll email you if a spot opens." });
|
|
@@ -18642,14 +19139,14 @@ var Tickets = ({
|
|
|
18642
19139
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
18643
19140
|
const checkout = useCheckoutContext();
|
|
18644
19141
|
const theme = useTheme();
|
|
18645
|
-
const
|
|
19142
|
+
const s6 = useTicketStyles(theme);
|
|
18646
19143
|
const ticketsQuery = hooks_exports.useTicketsWithMeta(eventId);
|
|
18647
19144
|
const bundleWait = hooks_exports.useTicketGatewayWait(checkout.store);
|
|
18648
19145
|
const bundleStarting = bundleWait !== null;
|
|
18649
19146
|
const promoMeta = (_a = ticketsQuery.data) == null ? void 0 : _a.promo;
|
|
18650
19147
|
const showWaitingList = (_c = (_b = ticketsQuery.data) == null ? void 0 : _b.showWaitingList) != null ? _c : false;
|
|
18651
|
-
const [qty, setQty] =
|
|
18652
|
-
const [slotDate, setSlotDate] =
|
|
19148
|
+
const [qty, setQty] = useState31({});
|
|
19149
|
+
const [slotDate, setSlotDate] = useState31("");
|
|
18653
19150
|
const eventInfo = hooks_exports.useEvent(eventId).data;
|
|
18654
19151
|
const isTimeSlot = Boolean((timeSlotDates == null ? void 0 : timeSlotDates.length) || (eventInfo == null ? void 0 : eventInfo.isTimeSlotEvent));
|
|
18655
19152
|
const dates = useMemo21(
|
|
@@ -18659,7 +19156,7 @@ var Tickets = ({
|
|
|
18659
19156
|
},
|
|
18660
19157
|
[timeSlotDates, eventInfo == null ? void 0 : eventInfo.availableDates]
|
|
18661
19158
|
);
|
|
18662
|
-
|
|
19159
|
+
useEffect22(() => {
|
|
18663
19160
|
if (isTimeSlot && !slotDate && dates.length) setSlotDate(dates[0]);
|
|
18664
19161
|
}, [isTimeSlot, slotDate, dates]);
|
|
18665
19162
|
const slotQuery = hooks_exports.useTimeSlotTickets(eventId, isTimeSlot ? slotDate : void 0);
|
|
@@ -18670,10 +19167,10 @@ var Tickets = ({
|
|
|
18670
19167
|
},
|
|
18671
19168
|
[isTimeSlot, slotQuery.data, (_d = ticketsQuery.data) == null ? void 0 : _d.tickets]
|
|
18672
19169
|
);
|
|
18673
|
-
const [error, setError] =
|
|
18674
|
-
const [code, setCode] =
|
|
18675
|
-
const [codeState, setCodeState] =
|
|
18676
|
-
const [promoOpen, setPromoOpen] =
|
|
19170
|
+
const [error, setError] = useState31("");
|
|
19171
|
+
const [code, setCode] = useState31("");
|
|
19172
|
+
const [codeState, setCodeState] = useState31("idle");
|
|
19173
|
+
const [promoOpen, setPromoOpen] = useState31(false);
|
|
18677
19174
|
hooks_exports.useOnEventChange(eventId, () => {
|
|
18678
19175
|
setQty({});
|
|
18679
19176
|
setSlotDate("");
|
|
@@ -18681,10 +19178,10 @@ var Tickets = ({
|
|
|
18681
19178
|
setPromoOpen(false);
|
|
18682
19179
|
setError("");
|
|
18683
19180
|
});
|
|
18684
|
-
const [wlOpen, setWlOpen] =
|
|
18685
|
-
const [visibleDescription, setVisibleDescription] =
|
|
18686
|
-
const attributionEvent =
|
|
18687
|
-
|
|
19181
|
+
const [wlOpen, setWlOpen] = useState31({});
|
|
19182
|
+
const [visibleDescription, setVisibleDescription] = useState31(null);
|
|
19183
|
+
const attributionEvent = useRef23(null);
|
|
19184
|
+
useEffect22(() => {
|
|
18688
19185
|
var _a2;
|
|
18689
19186
|
if (attributionEvent.current === eventId) return;
|
|
18690
19187
|
attributionEvent.current = eventId;
|
|
@@ -18702,7 +19199,7 @@ var Tickets = ({
|
|
|
18702
19199
|
});
|
|
18703
19200
|
}
|
|
18704
19201
|
}, [eventId, initialPromoCode, referrer, readAttributionFromUrl]);
|
|
18705
|
-
|
|
19202
|
+
useEffect22(() => {
|
|
18706
19203
|
checkout.syncCurrency(eventId, void 0, { seed: true }).catch(() => void 0);
|
|
18707
19204
|
}, [eventId]);
|
|
18708
19205
|
const changeCurrency = (nextCode) => {
|
|
@@ -18713,8 +19210,8 @@ var Tickets = ({
|
|
|
18713
19210
|
}
|
|
18714
19211
|
}).catch(() => void 0);
|
|
18715
19212
|
};
|
|
18716
|
-
const originals =
|
|
18717
|
-
|
|
19213
|
+
const originals = useRef23({});
|
|
19214
|
+
useEffect22(() => {
|
|
18718
19215
|
for (const t of tickets)
|
|
18719
19216
|
if (originals.current[t.id] == null) originals.current[t.id] = t.price;
|
|
18720
19217
|
}, [tickets]);
|
|
@@ -18777,13 +19274,13 @@ var Tickets = ({
|
|
|
18777
19274
|
const ticketIndex = tickets.findIndex((candidate) => candidate.id === t.id);
|
|
18778
19275
|
const previousTicket = ticketIndex > 0 ? tickets[ticketIndex - 1] : void 0;
|
|
18779
19276
|
const startsNamedGroup = Boolean(t.groupName) && t.groupName !== (previousTicket == null ? void 0 : previousTicket.groupName);
|
|
18780
|
-
const groupHeading = startsNamedGroup ? /* @__PURE__ */ jsx13(Text9, { style:
|
|
19277
|
+
const groupHeading = startsNamedGroup ? /* @__PURE__ */ jsx13(Text9, { style: s6.group, children: t.groupName }) : t.id === firstTableId ? /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
18781
19278
|
/* @__PURE__ */ jsx13(Divider, {}),
|
|
18782
|
-
/* @__PURE__ */ jsx13(Text9, { style:
|
|
19279
|
+
/* @__PURE__ */ jsx13(Text9, { style: s6.group, children: "Reserve tables" })
|
|
18783
19280
|
] }) : null;
|
|
18784
19281
|
return /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
18785
19282
|
groupHeading,
|
|
18786
|
-
/* @__PURE__ */ jsxs11(View10, { style: renderTicket ? void 0 :
|
|
19283
|
+
/* @__PURE__ */ jsxs11(View10, { style: renderTicket ? void 0 : s6.rowWrap, children: [
|
|
18787
19284
|
renderTicket ? renderTicket({
|
|
18788
19285
|
ticket: t,
|
|
18789
19286
|
quantity: (_a2 = qty[t.id]) != null ? _a2 : 0,
|
|
@@ -18794,36 +19291,36 @@ var Tickets = ({
|
|
|
18794
19291
|
if (!checkout.orderFixed) selectQty(t, value6);
|
|
18795
19292
|
}
|
|
18796
19293
|
}) : /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
18797
|
-
/* @__PURE__ */ jsxs11(View10, { style:
|
|
18798
|
-
/* @__PURE__ */ jsxs11(View10, { style:
|
|
18799
|
-
/* @__PURE__ */ jsxs11(View10, { style:
|
|
18800
|
-
/* @__PURE__ */ jsx13(Text9, { style:
|
|
19294
|
+
/* @__PURE__ */ jsxs11(View10, { style: s6.row, children: [
|
|
19295
|
+
/* @__PURE__ */ jsxs11(View10, { style: s6.info, children: [
|
|
19296
|
+
/* @__PURE__ */ jsxs11(View10, { style: s6.nameRow, children: [
|
|
19297
|
+
/* @__PURE__ */ jsx13(Text9, { style: s6.name, children: t.name }),
|
|
18801
19298
|
t.descriptionRich ? /* @__PURE__ */ jsx13(
|
|
18802
19299
|
Pressable8,
|
|
18803
19300
|
{
|
|
18804
19301
|
accessibilityRole: "button",
|
|
18805
19302
|
onPress: () => setVisibleDescription((cur) => cur === t.id ? null : t.id),
|
|
18806
|
-
children: /* @__PURE__ */ jsx13(Text9, { style:
|
|
19303
|
+
children: /* @__PURE__ */ jsx13(Text9, { style: s6.infoToggle, children: visibleDescription === t.id ? "Hide info" : "View info" })
|
|
18807
19304
|
}
|
|
18808
19305
|
) : null
|
|
18809
19306
|
] }),
|
|
18810
|
-
/* @__PURE__ */ jsxs11(View10, { style:
|
|
18811
|
-
discounted && original != null ? /* @__PURE__ */ jsx13(Text9, { style:
|
|
18812
|
-
/* @__PURE__ */ jsx13(Text9, { style: [
|
|
18813
|
-
t.isTable ? /* @__PURE__ */ jsx13(Text9, { style:
|
|
18814
|
-
!isFree && !t.soldOut ? /* @__PURE__ */ jsxs11(Text9, { style:
|
|
19307
|
+
/* @__PURE__ */ jsxs11(View10, { style: s6.priceRow, children: [
|
|
19308
|
+
discounted && original != null ? /* @__PURE__ */ jsx13(Text9, { style: s6.oldPrice, children: money(sym, original) }) : null,
|
|
19309
|
+
/* @__PURE__ */ jsx13(Text9, { style: [s6.amount, isFree && s6.amountFree], children: isFree ? "FREE" : money(sym, t.price) }),
|
|
19310
|
+
t.isTable ? /* @__PURE__ */ jsx13(Text9, { style: s6.perTable, children: "\xB7 per table" }) : null,
|
|
19311
|
+
!isFree && !t.soldOut ? /* @__PURE__ */ jsxs11(Text9, { style: s6.fees, children: [
|
|
18815
19312
|
"(",
|
|
18816
19313
|
money(sym, t.priceWithFees),
|
|
18817
19314
|
" with fees)"
|
|
18818
19315
|
] }) : null,
|
|
18819
|
-
t.depositPercent != null ? /* @__PURE__ */ jsxs11(Text9, { style:
|
|
19316
|
+
t.depositPercent != null ? /* @__PURE__ */ jsxs11(Text9, { style: s6.deposit, children: [
|
|
18820
19317
|
t.depositPercent.toFixed(2),
|
|
18821
19318
|
"% DEPOSIT"
|
|
18822
19319
|
] }) : null
|
|
18823
19320
|
] })
|
|
18824
19321
|
] }),
|
|
18825
|
-
seatMapRow(t) ? null : unavailable ? /* @__PURE__ */ jsx13(Text9, { style:
|
|
18826
|
-
t.isTable ? /* @__PURE__ */ jsx13(Text9, { style:
|
|
19322
|
+
seatMapRow(t) ? null : unavailable ? /* @__PURE__ */ jsx13(Text9, { style: s6.soldout, children: t.soldOut ? "Sold out" : notStarted ? "Sales not started" : "Sales Ended" }) : /* @__PURE__ */ jsxs11(View10, { style: s6.qtyWrap, children: [
|
|
19323
|
+
t.isTable ? /* @__PURE__ */ jsx13(Text9, { style: s6.guests, children: "Guests" }) : null,
|
|
18827
19324
|
/* @__PURE__ */ jsx13(
|
|
18828
19325
|
QuantitySelect,
|
|
18829
19326
|
{
|
|
@@ -18836,7 +19333,7 @@ var Tickets = ({
|
|
|
18836
19333
|
)
|
|
18837
19334
|
] })
|
|
18838
19335
|
] }),
|
|
18839
|
-
t.descriptionRich && visibleDescription === t.id ? /* @__PURE__ */ jsx13(Text9, { style:
|
|
19336
|
+
t.descriptionRich && visibleDescription === t.id ? /* @__PURE__ */ jsx13(Text9, { style: s6.description, children: htmlToPlainText(t.descriptionRich) }) : null
|
|
18840
19337
|
] }),
|
|
18841
19338
|
canWaitlist ? wlOpen[t.id] ? /* @__PURE__ */ jsx13(
|
|
18842
19339
|
WaitingListForm,
|
|
@@ -18849,7 +19346,7 @@ var Tickets = ({
|
|
|
18849
19346
|
{
|
|
18850
19347
|
accessibilityRole: "button",
|
|
18851
19348
|
onPress: () => setWlOpen((w) => ({ ...w, [t.id]: true })),
|
|
18852
|
-
children: /* @__PURE__ */ jsx13(Text9, { style:
|
|
19349
|
+
children: /* @__PURE__ */ jsx13(Text9, { style: s6.wlToggle, children: "Join the waiting list" })
|
|
18853
19350
|
}
|
|
18854
19351
|
) : null
|
|
18855
19352
|
] })
|
|
@@ -18867,10 +19364,10 @@ var Tickets = ({
|
|
|
18867
19364
|
const continueTitle = checkout.isBusy ? "Reserving\u2026" : selectionIsTable ? "Reserve tables" : buttonLabel;
|
|
18868
19365
|
return /* @__PURE__ */ jsx13(FrozenFields, { frozen: checkout.orderFixed, children: /* @__PURE__ */ jsxs11(Container, { children: [
|
|
18869
19366
|
title ? /* @__PURE__ */ jsx13(SectionHeader, { title }) : null,
|
|
18870
|
-
listQuery.isLoading ? /* @__PURE__ */ jsx13(View10, { style:
|
|
19367
|
+
listQuery.isLoading ? /* @__PURE__ */ jsx13(View10, { style: s6.loading, children: /* @__PURE__ */ jsx13(Loader, {}) }) : null,
|
|
18871
19368
|
listQuery.error ? /* @__PURE__ */ jsx13(ErrorText, { children: listQuery.error.message }) : null,
|
|
18872
|
-
isTimeSlot && dates.length > 0 ? /* @__PURE__ */ jsxs11(View10, { style:
|
|
18873
|
-
/* @__PURE__ */ jsx13(Text9, { style:
|
|
19369
|
+
isTimeSlot && dates.length > 0 ? /* @__PURE__ */ jsxs11(View10, { style: s6.selectBlock, children: [
|
|
19370
|
+
/* @__PURE__ */ jsx13(Text9, { style: s6.selectLabel, children: "Date" }),
|
|
18874
19371
|
/* @__PURE__ */ jsx13(
|
|
18875
19372
|
Select,
|
|
18876
19373
|
{
|
|
@@ -18883,8 +19380,8 @@ var Tickets = ({
|
|
|
18883
19380
|
}
|
|
18884
19381
|
)
|
|
18885
19382
|
] }) : null,
|
|
18886
|
-
currency && currency.available.length > 1 ? /* @__PURE__ */ jsxs11(View10, { style:
|
|
18887
|
-
/* @__PURE__ */ jsx13(Text9, { style:
|
|
19383
|
+
currency && currency.available.length > 1 ? /* @__PURE__ */ jsxs11(View10, { style: s6.selectBlock, children: [
|
|
19384
|
+
/* @__PURE__ */ jsx13(Text9, { style: s6.selectLabel, children: "Currency" }),
|
|
18888
19385
|
/* @__PURE__ */ jsx13(
|
|
18889
19386
|
Select,
|
|
18890
19387
|
{
|
|
@@ -18899,10 +19396,10 @@ var Tickets = ({
|
|
|
18899
19396
|
] }) : null,
|
|
18900
19397
|
isTimeSlot && !slotQuery.isLoading && tickets.length === 0 && slotDate ? /* @__PURE__ */ jsx13(MutedText, { children: "No sessions available on this date." }) : null,
|
|
18901
19398
|
isTimeSlot ? timeGroups.map((g) => /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
18902
|
-
g.time ? /* @__PURE__ */ jsx13(Text9, { style:
|
|
19399
|
+
g.time ? /* @__PURE__ */ jsx13(Text9, { style: s6.slotTime, children: g.time }) : null,
|
|
18903
19400
|
g.items.map(renderRow)
|
|
18904
19401
|
] }, g.time)) : tickets.map(renderRow),
|
|
18905
|
-
showCodeInput ? /* @__PURE__ */ jsx13(View10, { style:
|
|
19402
|
+
showCodeInput ? /* @__PURE__ */ jsx13(View10, { style: s6.promo, children: !isAccess && !promoOpen ? /* @__PURE__ */ jsx13(Pressable8, { accessibilityRole: "button", onPress: () => setPromoOpen(true), children: /* @__PURE__ */ jsx13(Text9, { style: s6.promoToggle, children: "Got a promo code? Tap here" }) }) : /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
18906
19403
|
/* @__PURE__ */ jsx13(Field, { children: /* @__PURE__ */ jsx13(
|
|
18907
19404
|
Input,
|
|
18908
19405
|
{
|
|
@@ -19162,7 +19659,7 @@ var SeatsIoMap = ({ eventId, initial, onContinue }) => {
|
|
|
19162
19659
|
};
|
|
19163
19660
|
|
|
19164
19661
|
// src/sections/SeatMap.tsx
|
|
19165
|
-
import { useEffect as
|
|
19662
|
+
import { useEffect as useEffect23, useMemo as useMemo23, useRef as useRef24, useState as useState32 } from "react";
|
|
19166
19663
|
import { StyleSheet as StyleSheet12, Text as Text10, View as View12 } from "react-native";
|
|
19167
19664
|
import { WebView as WebView3 } from "react-native-webview";
|
|
19168
19665
|
|
|
@@ -19178,9 +19675,9 @@ var SeatMap = ({ eventId, onContinue }) => {
|
|
|
19178
19675
|
const theme = useTheme();
|
|
19179
19676
|
const flow = hooks_exports.useSeatSelection(eventId, checkout, onContinue);
|
|
19180
19677
|
const bundleStarting = hooks_exports.useBundleStarting(checkout.store);
|
|
19181
|
-
const webview =
|
|
19182
|
-
const [rendererError, setRendererError] =
|
|
19183
|
-
const [size, setSize] =
|
|
19678
|
+
const webview = useRef24(null);
|
|
19679
|
+
const [rendererError, setRendererError] = useState32(false);
|
|
19680
|
+
const [size, setSize] = useState32(320);
|
|
19184
19681
|
const properties = flow.chart.state === "ready" ? {
|
|
19185
19682
|
seatData: flow.chart.data.seatData,
|
|
19186
19683
|
statuses: flow.statuses,
|
|
@@ -19207,7 +19704,7 @@ var SeatMap = ({ eventId, onContinue }) => {
|
|
|
19207
19704
|
`window.__tfSeatMapUpdate&&window.__tfSeatMapUpdate(${safeJson2(properties)});true;`
|
|
19208
19705
|
);
|
|
19209
19706
|
};
|
|
19210
|
-
|
|
19707
|
+
useEffect23(update, [properties && safeJson2(properties)]);
|
|
19211
19708
|
if (flow.chart.state === "provider") return /* @__PURE__ */ jsx15(SeatsIoMap, { eventId, initial: flow.chart.data, onContinue });
|
|
19212
19709
|
return /* @__PURE__ */ jsx15(FrozenFields, { frozen: checkout.orderFixed, children: /* @__PURE__ */ jsxs13(Card, { children: [
|
|
19213
19710
|
/* @__PURE__ */ jsx15(SectionHeader, { title: "Select your seats" }),
|
|
@@ -19360,13 +19857,13 @@ var CustomFieldInput = ({
|
|
|
19360
19857
|
onChange,
|
|
19361
19858
|
error
|
|
19362
19859
|
}) => {
|
|
19363
|
-
const
|
|
19860
|
+
const invalid2 = error !== void 0 && error !== null;
|
|
19364
19861
|
const desc = field.description ? /* @__PURE__ */ jsx16(MutedText, { children: field.description }) : null;
|
|
19365
19862
|
switch (field.type) {
|
|
19366
19863
|
case "textarea":
|
|
19367
19864
|
return /* @__PURE__ */ jsxs14(Field, { label: field.label, required: field.required, error, children: [
|
|
19368
19865
|
desc,
|
|
19369
|
-
/* @__PURE__ */ jsx16(Input, { value: asString(value6), onChangeText: onChange, invalid })
|
|
19866
|
+
/* @__PURE__ */ jsx16(Input, { value: asString(value6), onChangeText: onChange, invalid: invalid2 })
|
|
19370
19867
|
] });
|
|
19371
19868
|
case "select":
|
|
19372
19869
|
case "radio": {
|
|
@@ -19383,7 +19880,7 @@ var CustomFieldInput = ({
|
|
|
19383
19880
|
onChange,
|
|
19384
19881
|
options,
|
|
19385
19882
|
placeholder: "\u2014 select \u2014",
|
|
19386
|
-
invalid
|
|
19883
|
+
invalid: invalid2
|
|
19387
19884
|
}
|
|
19388
19885
|
)
|
|
19389
19886
|
] });
|
|
@@ -19412,7 +19909,7 @@ var CustomFieldInput = ({
|
|
|
19412
19909
|
checked: asString(value6) === "1",
|
|
19413
19910
|
onChange: (on) => onChange(on ? "1" : ""),
|
|
19414
19911
|
label: `${field.label}${field.required ? " *" : ""}`,
|
|
19415
|
-
invalid
|
|
19912
|
+
invalid: invalid2
|
|
19416
19913
|
}
|
|
19417
19914
|
),
|
|
19418
19915
|
error !== void 0 && error !== null ? /* @__PURE__ */ jsx16(ErrorText, { children: error }) : null
|
|
@@ -19432,7 +19929,7 @@ var CustomFieldInput = ({
|
|
|
19432
19929
|
onChangeText: onChange,
|
|
19433
19930
|
keyboardType: field.type === "email" ? "email-address" : field.type === "phone" ? "phone-pad" : "default",
|
|
19434
19931
|
autoCapitalize: field.type === "email" ? "none" : "sentences",
|
|
19435
|
-
invalid
|
|
19932
|
+
invalid: invalid2
|
|
19436
19933
|
}
|
|
19437
19934
|
)
|
|
19438
19935
|
] });
|
|
@@ -19467,7 +19964,7 @@ var AddOns = ({
|
|
|
19467
19964
|
var _a, _b;
|
|
19468
19965
|
const checkout = useCheckoutContext();
|
|
19469
19966
|
const theme = useTheme();
|
|
19470
|
-
const
|
|
19967
|
+
const s6 = useAddonStyles(theme);
|
|
19471
19968
|
const {
|
|
19472
19969
|
query: addonsQuery,
|
|
19473
19970
|
addons,
|
|
@@ -19483,15 +19980,15 @@ var AddOns = ({
|
|
|
19483
19980
|
save,
|
|
19484
19981
|
skip
|
|
19485
19982
|
} = hooks_exports.useAddOnSelection(eventId, checkout, { onContinue, onSkip });
|
|
19486
|
-
const head = /* @__PURE__ */ jsxs15(View14, { style:
|
|
19487
|
-
eyebrow ? /* @__PURE__ */ jsx17(Text11, { style:
|
|
19488
|
-
/* @__PURE__ */ jsx17(Text11, { style:
|
|
19489
|
-
onSkip && !hasRequired ? /* @__PURE__ */ jsx17(Pressable9, { accessibilityRole: "button", onPress: skip, style:
|
|
19983
|
+
const head = /* @__PURE__ */ jsxs15(View14, { style: s6.head, children: [
|
|
19984
|
+
eyebrow ? /* @__PURE__ */ jsx17(Text11, { style: s6.eyebrow, children: eyebrow }) : null,
|
|
19985
|
+
/* @__PURE__ */ jsx17(Text11, { style: s6.heading, children: heading }),
|
|
19986
|
+
onSkip && !hasRequired ? /* @__PURE__ */ jsx17(Pressable9, { accessibilityRole: "button", onPress: skip, style: s6.skipBtn, children: /* @__PURE__ */ jsx17(Text11, { style: s6.skip, children: "Skip" }) }) : null
|
|
19490
19987
|
] });
|
|
19491
19988
|
if (addonsQuery.isLoading) {
|
|
19492
19989
|
return /* @__PURE__ */ jsxs15(Card, { children: [
|
|
19493
19990
|
head,
|
|
19494
|
-
/* @__PURE__ */ jsx17(View14, { style:
|
|
19991
|
+
/* @__PURE__ */ jsx17(View14, { style: s6.sectionLoader, children: /* @__PURE__ */ jsx17(Loader, {}) })
|
|
19495
19992
|
] });
|
|
19496
19993
|
}
|
|
19497
19994
|
if (addonsQuery.isError)
|
|
@@ -19514,30 +20011,30 @@ var AddOns = ({
|
|
|
19514
20011
|
const selectedCount = Object.values(qty).filter((n) => n > 0).length;
|
|
19515
20012
|
return /* @__PURE__ */ jsx17(FrozenFields, { frozen: checkout.orderFixed, children: /* @__PURE__ */ jsxs15(Card, { children: [
|
|
19516
20013
|
head,
|
|
19517
|
-
/* @__PURE__ */ jsx17(Text11, { style:
|
|
20014
|
+
/* @__PURE__ */ jsx17(Text11, { style: s6.subtitle, children: "PLEASE SELECT FROM THE OPTIONAL ADD-ONS BELOW" }),
|
|
19518
20015
|
groups.map((g, gi) => {
|
|
19519
20016
|
var _a2;
|
|
19520
20017
|
return /* @__PURE__ */ jsxs15(Fragment6, { children: [
|
|
19521
|
-
g.heading ? /* @__PURE__ */ jsx17(Text11, { style:
|
|
20018
|
+
g.heading ? /* @__PURE__ */ jsx17(Text11, { style: s6.group, children: g.heading }) : null,
|
|
19522
20019
|
g.items.map((a) => {
|
|
19523
20020
|
var _a3, _b2;
|
|
19524
20021
|
const n = (_a3 = qty[a.id]) != null ? _a3 : 0;
|
|
19525
20022
|
const group = fieldGroups[a.id];
|
|
19526
20023
|
const desc = a.description ? htmlToPlainText(a.description) : "";
|
|
19527
|
-
return /* @__PURE__ */ jsxs15(View14, { style:
|
|
19528
|
-
/* @__PURE__ */ jsxs15(View14, { style:
|
|
19529
|
-
/* @__PURE__ */ jsxs15(View14, { style:
|
|
19530
|
-
/* @__PURE__ */ jsxs15(Text11, { style:
|
|
20024
|
+
return /* @__PURE__ */ jsxs15(View14, { style: s6.item, children: [
|
|
20025
|
+
/* @__PURE__ */ jsxs15(View14, { style: s6.row, children: [
|
|
20026
|
+
/* @__PURE__ */ jsxs15(View14, { style: s6.info, children: [
|
|
20027
|
+
/* @__PURE__ */ jsxs15(Text11, { style: s6.name, children: [
|
|
19531
20028
|
a.name,
|
|
19532
|
-
a.required ? /* @__PURE__ */ jsx17(Text11, { style:
|
|
20029
|
+
a.required ? /* @__PURE__ */ jsx17(Text11, { style: s6.req, children: " \xB7 required" }) : null
|
|
19533
20030
|
] }),
|
|
19534
|
-
/* @__PURE__ */ jsxs15(Text11, { style:
|
|
20031
|
+
/* @__PURE__ */ jsxs15(Text11, { style: s6.price, children: [
|
|
19535
20032
|
money2(a.currency, a.price),
|
|
19536
|
-
a.feeIncluded ? /* @__PURE__ */ jsx17(Text11, { style:
|
|
20033
|
+
a.feeIncluded ? /* @__PURE__ */ jsx17(Text11, { style: s6.priceNote, children: " incl. fees" }) : null
|
|
19537
20034
|
] }),
|
|
19538
|
-
desc ? /* @__PURE__ */ jsx17(Text11, { style:
|
|
20035
|
+
desc ? /* @__PURE__ */ jsx17(Text11, { style: s6.desc, children: desc }) : null
|
|
19539
20036
|
] }),
|
|
19540
|
-
soldOut(a) ? /* @__PURE__ */ jsx17(Text11, { style:
|
|
20037
|
+
soldOut(a) ? /* @__PURE__ */ jsx17(Text11, { style: s6.soldOut, children: "Sold out" }) : /* @__PURE__ */ jsx17(
|
|
19541
20038
|
QuantitySelect,
|
|
19542
20039
|
{
|
|
19543
20040
|
value: n,
|
|
@@ -19547,7 +20044,7 @@ var AddOns = ({
|
|
|
19547
20044
|
}
|
|
19548
20045
|
)
|
|
19549
20046
|
] }),
|
|
19550
|
-
n > 0 && group ? /* @__PURE__ */ jsx17(View14, { style:
|
|
20047
|
+
n > 0 && group ? /* @__PURE__ */ jsx17(View14, { style: s6.fields, children: /* @__PURE__ */ jsx17(
|
|
19551
20048
|
CustomFieldGroupFields,
|
|
19552
20049
|
{
|
|
19553
20050
|
group,
|
|
@@ -19681,7 +20178,7 @@ var Bundles = ({
|
|
|
19681
20178
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
19682
20179
|
const checkout = useCheckoutContext();
|
|
19683
20180
|
const theme = useTheme();
|
|
19684
|
-
const
|
|
20181
|
+
const s6 = useBundleStyles(theme);
|
|
19685
20182
|
const t = translate2 != null ? translate2 : createTranslator({ locale, messages });
|
|
19686
20183
|
const flow = hooks_exports.useBundleFlow(rnConfirmer, eventId, {
|
|
19687
20184
|
claimCard: claimCardField,
|
|
@@ -19697,7 +20194,7 @@ var Bundles = ({
|
|
|
19697
20194
|
onPurchased
|
|
19698
20195
|
});
|
|
19699
20196
|
if (flow.view === "loading") {
|
|
19700
|
-
return /* @__PURE__ */ jsx18(Card, { children: /* @__PURE__ */ jsx18(View15, { style:
|
|
20197
|
+
return /* @__PURE__ */ jsx18(Card, { children: /* @__PURE__ */ jsx18(View15, { style: s6.loader, children: /* @__PURE__ */ jsx18(Loader, {}) }) });
|
|
19701
20198
|
}
|
|
19702
20199
|
if (flow.view === "catalogError") {
|
|
19703
20200
|
return /* @__PURE__ */ jsxs16(Card, { children: [
|
|
@@ -19715,11 +20212,11 @@ var Bundles = ({
|
|
|
19715
20212
|
] });
|
|
19716
20213
|
}
|
|
19717
20214
|
if (flow.view === "hidden") return null;
|
|
19718
|
-
const title = /* @__PURE__ */ jsx18(Text12, { style:
|
|
20215
|
+
const title = /* @__PURE__ */ jsx18(Text12, { style: s6.heading, children: heading != null ? heading : t("bundles.heading") });
|
|
19719
20216
|
if (flow.view === "redirecting") {
|
|
19720
20217
|
return /* @__PURE__ */ jsxs16(Card, { children: [
|
|
19721
20218
|
title,
|
|
19722
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
20219
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("bundles.redirecting") }),
|
|
19723
20220
|
/* @__PURE__ */ jsx18(Loader, {})
|
|
19724
20221
|
] });
|
|
19725
20222
|
}
|
|
@@ -19727,10 +20224,10 @@ var Bundles = ({
|
|
|
19727
20224
|
const { result: result2 } = flow;
|
|
19728
20225
|
return /* @__PURE__ */ jsxs16(Card, { children: [
|
|
19729
20226
|
title,
|
|
19730
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
19731
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
19732
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
19733
|
-
flow.gatewayWait ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
20227
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.strong, children: t("bundles.done.title") }),
|
|
20228
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.muted, children: result2.pending ? t("bundles.done.pending") : result2.email ? t("bundles.done.email", { email: result2.email }) : t("bundles.done.emailUnknown") }),
|
|
20229
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.muted, children: t("bundles.done.order", { orderHash: result2.orderHash }) }),
|
|
20230
|
+
flow.gatewayWait ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t(flow.gatewayWait) }) : null,
|
|
19734
20231
|
/* @__PURE__ */ jsx18(
|
|
19735
20232
|
Button,
|
|
19736
20233
|
{
|
|
@@ -19747,8 +20244,8 @@ var Bundles = ({
|
|
|
19747
20244
|
const amount = money3(flow.payAmount.currency || flow.currency, flow.payAmount.amount);
|
|
19748
20245
|
return /* @__PURE__ */ jsxs16(Card, { children: [
|
|
19749
20246
|
title,
|
|
19750
|
-
flow.notice ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
19751
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
20247
|
+
flow.notice ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t(flow.notice.key, flow.notice.values) }) : null,
|
|
20248
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.strong, children: t("bundles.buyerHeading") }),
|
|
19752
20249
|
/* @__PURE__ */ jsx18(Field, { label: t("bundles.firstName"), children: /* @__PURE__ */ jsx18(
|
|
19753
20250
|
Input,
|
|
19754
20251
|
{
|
|
@@ -19778,8 +20275,8 @@ var Bundles = ({
|
|
|
19778
20275
|
}
|
|
19779
20276
|
) }),
|
|
19780
20277
|
flow.slots.length > 0 ? /* @__PURE__ */ jsxs16(Fragment7, { children: [
|
|
19781
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
19782
|
-
!flow.namesRequired ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
20278
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.strong, children: t("bundles.holdersHeading") }),
|
|
20279
|
+
!flow.namesRequired ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, children: t("bundles.holdersOptional") }) : null,
|
|
19783
20280
|
flow.slots.map((slot) => {
|
|
19784
20281
|
var _a2, _b2;
|
|
19785
20282
|
const value6 = flow.holderValue(slot);
|
|
@@ -19810,17 +20307,17 @@ var Bundles = ({
|
|
|
19810
20307
|
})
|
|
19811
20308
|
] }) : null,
|
|
19812
20309
|
flow.problems.map((key4) => /* @__PURE__ */ jsx18(ErrorText, { children: t(key4) }, key4)),
|
|
19813
|
-
flow.awaitingCard ? /* @__PURE__ */ jsxs16(View15, { style:
|
|
19814
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
20310
|
+
flow.awaitingCard ? /* @__PURE__ */ jsxs16(View15, { style: s6.card, children: [
|
|
20311
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.strong, children: t("bundles.cardHeading") }),
|
|
19815
20312
|
flow.cardElsewhere ? /* @__PURE__ */ jsxs16(Fragment7, { children: [
|
|
19816
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
20313
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.muted, children: t("bundles.payingElsewhere") }),
|
|
19817
20314
|
/* @__PURE__ */ jsx18(Button, { variant: "ghost", onPress: flow.payHere, children: t("bundles.payHere") })
|
|
19818
20315
|
] }) : flow.cardFailed ? /* @__PURE__ */ jsx18(Button, { variant: "ghost", onPress: flow.retryCard, children: t("bundles.retryCard") }) : flow.cardReady && visible ? /* @__PURE__ */ jsx18(CardInput, { owner: flow.cardOwner, visible }) : /* @__PURE__ */ jsx18(Loader, {})
|
|
19819
20316
|
] }) : null,
|
|
19820
|
-
flow.stillSaving ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
19821
|
-
flow.checkingAttempt ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
19822
|
-
flow.waitingForTickets ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
19823
|
-
flow.waitingForBundle ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
20317
|
+
flow.stillSaving ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("common.stillSaving") }) : null,
|
|
20318
|
+
flow.checkingAttempt ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("bundles.checkingAttempt") }) : null,
|
|
20319
|
+
flow.waitingForTickets ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("bundles.waitTickets") }) : null,
|
|
20320
|
+
flow.waitingForBundle ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t((_g = flow.gatewayWait) != null ? _g : "bundles.waitOtherBundle") }) : null,
|
|
19824
20321
|
/* @__PURE__ */ jsx18(
|
|
19825
20322
|
Button,
|
|
19826
20323
|
{
|
|
@@ -19855,13 +20352,13 @@ var Bundles = ({
|
|
|
19855
20352
|
const ticketsInCart = checkout.selections.length > 0;
|
|
19856
20353
|
return /* @__PURE__ */ jsxs16(Card, { children: [
|
|
19857
20354
|
title,
|
|
19858
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
19859
|
-
flow.notice ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
20355
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.muted, children: t("bundles.subtitle") }),
|
|
20356
|
+
flow.notice ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t(flow.notice.key, flow.notice.values) }) : null,
|
|
19860
20357
|
flow.view === "heldOrder" ? /* @__PURE__ */ jsxs16(Fragment7, { children: [
|
|
19861
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
20358
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("bundles.heldOrder") }),
|
|
19862
20359
|
flow.error ? /* @__PURE__ */ jsx18(ErrorText, { children: t(flow.error) }) : null,
|
|
19863
|
-
flow.checkingAttempt ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
19864
|
-
flow.gatewayWait ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
20360
|
+
flow.checkingAttempt ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("bundles.checkingAttempt") }) : null,
|
|
20361
|
+
flow.gatewayWait ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, accessibilityLiveRegion: "polite", children: t(flow.gatewayWait) }) : null,
|
|
19865
20362
|
/* @__PURE__ */ jsx18(
|
|
19866
20363
|
Button,
|
|
19867
20364
|
{
|
|
@@ -19886,18 +20383,18 @@ var Bundles = ({
|
|
|
19886
20383
|
const stock = bundleAvailabilityCopy(bundle);
|
|
19887
20384
|
const contents = bundleContentsLine(bundle);
|
|
19888
20385
|
const desc = htmlToPlainText((_a2 = bundle.description) != null ? _a2 : "");
|
|
19889
|
-
return /* @__PURE__ */ jsxs16(View15, { style: [
|
|
19890
|
-
/* @__PURE__ */ jsxs16(View15, { style:
|
|
19891
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
19892
|
-
/* @__PURE__ */ jsx18(Text12, { style:
|
|
19893
|
-
contents ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
19894
|
-
bundle.bookingFee > 0 && /* @__PURE__ */ jsx18(Text12, { style:
|
|
20386
|
+
return /* @__PURE__ */ jsxs16(View15, { style: [s6.item, { borderTopColor: theme.border }], children: [
|
|
20387
|
+
/* @__PURE__ */ jsxs16(View15, { style: s6.info, children: [
|
|
20388
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.name, children: bundle.name }),
|
|
20389
|
+
/* @__PURE__ */ jsx18(Text12, { style: s6.price, children: money3(bundle.currency, bundle.price) }),
|
|
20390
|
+
contents ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, children: t("bundles.includes", { contents }) }) : null,
|
|
20391
|
+
bundle.bookingFee > 0 && /* @__PURE__ */ jsx18(Text12, { style: s6.muted, children: t("bundles.bookingFee", {
|
|
19895
20392
|
amount: money3(bundle.currency, bundle.bookingFee)
|
|
19896
20393
|
}) }),
|
|
19897
|
-
desc ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
19898
|
-
stock && stock.key !== "bundles.soldOut" ? /* @__PURE__ */ jsx18(Text12, { style: [
|
|
20394
|
+
desc ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, children: desc }) : null,
|
|
20395
|
+
stock && stock.key !== "bundles.soldOut" ? /* @__PURE__ */ jsx18(Text12, { style: [s6.muted, s6.stock], children: t(stock.key, stock.values) }) : null
|
|
19899
20396
|
] }),
|
|
19900
|
-
range.max === 0 ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
20397
|
+
range.max === 0 ? /* @__PURE__ */ jsx18(Text12, { style: s6.soldOut, children: t("bundles.soldOut") }) : /* @__PURE__ */ jsx18(
|
|
19901
20398
|
QuantitySelect,
|
|
19902
20399
|
{
|
|
19903
20400
|
label: t("bundles.quantity", { name: bundle.name }),
|
|
@@ -19909,8 +20406,8 @@ var Bundles = ({
|
|
|
19909
20406
|
)
|
|
19910
20407
|
] }, bundle.id);
|
|
19911
20408
|
}),
|
|
19912
|
-
anySelected ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
19913
|
-
anySelected && ticketsInCart ? /* @__PURE__ */ jsx18(Text12, { style:
|
|
20409
|
+
anySelected ? /* @__PURE__ */ jsx18(Text12, { style: s6.strong, children: t("bundles.total", { amount: money3(flow.currency, flow.total) }) }) : null,
|
|
20410
|
+
anySelected && ticketsInCart ? /* @__PURE__ */ jsx18(Text12, { style: s6.muted, children: t("bundles.boughtSeparately") }) : null,
|
|
19914
20411
|
/* @__PURE__ */ jsx18(Button, { onPress: flow.continueToDetails, disabled: !anySelected, children: t("bundles.continue") })
|
|
19915
20412
|
] });
|
|
19916
20413
|
};
|
|
@@ -19969,10 +20466,10 @@ var useBundleStyles = (theme) => useMemo25(
|
|
|
19969
20466
|
// src/sections/BillingInfo.tsx
|
|
19970
20467
|
import {
|
|
19971
20468
|
Fragment as Fragment10,
|
|
19972
|
-
useEffect as
|
|
20469
|
+
useEffect as useEffect24,
|
|
19973
20470
|
useMemo as useMemo26,
|
|
19974
|
-
useRef as
|
|
19975
|
-
useState as
|
|
20471
|
+
useRef as useRef25,
|
|
20472
|
+
useState as useState35
|
|
19976
20473
|
} from "react";
|
|
19977
20474
|
import { Linking as Linking3, Pressable as Pressable10, StyleSheet as StyleSheet17, Text as Text14, View as View20 } from "react-native";
|
|
19978
20475
|
|
|
@@ -20081,11 +20578,11 @@ var styles4 = StyleSheet15.create({
|
|
|
20081
20578
|
});
|
|
20082
20579
|
|
|
20083
20580
|
// src/sections/billing/PhoneIdentity.tsx
|
|
20084
|
-
import { useState as
|
|
20581
|
+
import { useState as useState34 } from "react";
|
|
20085
20582
|
import { Text as Text13, View as View18 } from "react-native";
|
|
20086
20583
|
|
|
20087
20584
|
// src/auth/TwoFactorForm.tsx
|
|
20088
|
-
import { useState as
|
|
20585
|
+
import { useState as useState33 } from "react";
|
|
20089
20586
|
import { View as View17 } from "react-native";
|
|
20090
20587
|
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
20091
20588
|
var TwoFactorForm = ({
|
|
@@ -20098,7 +20595,7 @@ var TwoFactorForm = ({
|
|
|
20098
20595
|
onSendSms,
|
|
20099
20596
|
onCancel
|
|
20100
20597
|
}) => {
|
|
20101
|
-
const [code, setCode] =
|
|
20598
|
+
const [code, setCode] = useState33("");
|
|
20102
20599
|
return /* @__PURE__ */ jsxs18(View17, { style: { gap: 14 }, children: [
|
|
20103
20600
|
/* @__PURE__ */ jsx20(MutedText, { children: "Enter the six-digit code from your authenticator app or registered phone to complete sign-in." }),
|
|
20104
20601
|
error ? /* @__PURE__ */ jsx20(ErrorText, { children: error }) : null,
|
|
@@ -20150,8 +20647,8 @@ var PhoneIdentity = ({
|
|
|
20150
20647
|
}) => {
|
|
20151
20648
|
var _a;
|
|
20152
20649
|
const identity = hooks_exports.useCheckoutPhoneIdentity(options);
|
|
20153
|
-
const [code, setCode] =
|
|
20154
|
-
const [emailInstead, setEmailInstead] =
|
|
20650
|
+
const [code, setCode] = useState34("");
|
|
20651
|
+
const [emailInstead, setEmailInstead] = useState34(false);
|
|
20155
20652
|
if (emailInstead) return null;
|
|
20156
20653
|
if (identity.challenge)
|
|
20157
20654
|
return /* @__PURE__ */ jsx21(
|
|
@@ -20286,7 +20783,7 @@ var BuyerField = ({
|
|
|
20286
20783
|
error,
|
|
20287
20784
|
onChange
|
|
20288
20785
|
}) => {
|
|
20289
|
-
const
|
|
20786
|
+
const invalid2 = error !== void 0 && error !== null;
|
|
20290
20787
|
if (field.kind === "gender") {
|
|
20291
20788
|
const options = [
|
|
20292
20789
|
{ label: "Male", value: "M" },
|
|
@@ -20299,7 +20796,7 @@ var BuyerField = ({
|
|
|
20299
20796
|
onChange,
|
|
20300
20797
|
options,
|
|
20301
20798
|
placeholder: "\u2014 select \u2014",
|
|
20302
|
-
invalid
|
|
20799
|
+
invalid: invalid2
|
|
20303
20800
|
}
|
|
20304
20801
|
) });
|
|
20305
20802
|
}
|
|
@@ -20315,7 +20812,7 @@ var BuyerField = ({
|
|
|
20315
20812
|
onChange,
|
|
20316
20813
|
options,
|
|
20317
20814
|
placeholder: "\u2014 select \u2014",
|
|
20318
|
-
invalid
|
|
20815
|
+
invalid: invalid2
|
|
20319
20816
|
}
|
|
20320
20817
|
) });
|
|
20321
20818
|
}
|
|
@@ -20326,7 +20823,7 @@ var BuyerField = ({
|
|
|
20326
20823
|
value: value6,
|
|
20327
20824
|
onChangeText: onChange,
|
|
20328
20825
|
autoCapitalize: "none",
|
|
20329
|
-
invalid
|
|
20826
|
+
invalid: invalid2
|
|
20330
20827
|
}
|
|
20331
20828
|
) });
|
|
20332
20829
|
};
|
|
@@ -20458,21 +20955,21 @@ var BillingInfo = ({
|
|
|
20458
20955
|
const checkout = useCheckoutContext();
|
|
20459
20956
|
const validation = useCheckoutValidation();
|
|
20460
20957
|
const theme = useTheme();
|
|
20461
|
-
const
|
|
20958
|
+
const s6 = useStyles4(theme);
|
|
20462
20959
|
const profile = hooks_exports.useCheckoutBuyerProfile(eventId);
|
|
20463
20960
|
const event = hooks_exports.useEvent(eventId);
|
|
20464
20961
|
const combined = !onContinue;
|
|
20465
|
-
const [billing, setBilling] =
|
|
20962
|
+
const [billing, setBilling] = useState35(
|
|
20466
20963
|
() => billingDraftFrom(checkout.billing)
|
|
20467
20964
|
);
|
|
20468
|
-
const [dataCapture, setDataCapture] =
|
|
20965
|
+
const [dataCapture, setDataCapture] = useState35(
|
|
20469
20966
|
(_b = (_a = checkout.billing) == null ? void 0 : _a.dataCapture) != null ? _b : {}
|
|
20470
20967
|
);
|
|
20471
|
-
const [holders, setHolders] =
|
|
20968
|
+
const [holders, setHolders] = useState35(
|
|
20472
20969
|
() => holderDraftsFrom(checkout.holders, checkout.backfilledHolderIndexes)
|
|
20473
20970
|
);
|
|
20474
|
-
const [consent, setConsent] =
|
|
20475
|
-
const [dob, setDob] =
|
|
20971
|
+
const [consent, setConsent] = useState35({ ttfOptIn: false, brandOptIn: false });
|
|
20972
|
+
const [dob, setDob] = useState35(() => billingDobIso(checkout.billing));
|
|
20476
20973
|
hooks_exports.useOnOrderReleased(checkout.orderFixed, () => {
|
|
20477
20974
|
var _a2, _b2;
|
|
20478
20975
|
setBilling(billingDraftFrom(checkout.billing));
|
|
@@ -20483,14 +20980,14 @@ var BillingInfo = ({
|
|
|
20483
20980
|
(prev) => holderDraftsReloaded(prev, checkout.holders, checkout.backfilledHolderIndexes)
|
|
20484
20981
|
);
|
|
20485
20982
|
});
|
|
20486
|
-
const restoredHolders =
|
|
20983
|
+
const restoredHolders = useRef25(checkout.holders);
|
|
20487
20984
|
hooks_exports.useOnEventChange(checkout.eventId, () => {
|
|
20488
20985
|
restoredHolders.current = [];
|
|
20489
20986
|
setHolders([]);
|
|
20490
20987
|
setDataCapture({});
|
|
20491
20988
|
});
|
|
20492
|
-
const profileSeeded =
|
|
20493
|
-
const countryDefaultApplied =
|
|
20989
|
+
const profileSeeded = useRef25(false);
|
|
20990
|
+
const countryDefaultApplied = useRef25(Boolean((_c = checkout.billing) == null ? void 0 : _c.countryId));
|
|
20494
20991
|
const {
|
|
20495
20992
|
setBilling: commitBilling,
|
|
20496
20993
|
setHolders: commitHolders,
|
|
@@ -20524,7 +21021,7 @@ var BillingInfo = ({
|
|
|
20524
21021
|
}
|
|
20525
21022
|
return out;
|
|
20526
21023
|
}, [checkout.breakdown, checkout.selections]);
|
|
20527
|
-
|
|
21024
|
+
useEffect24(() => {
|
|
20528
21025
|
const p = profile.data;
|
|
20529
21026
|
if (!p || profileSeeded.current) return;
|
|
20530
21027
|
profileSeeded.current = true;
|
|
@@ -20547,10 +21044,10 @@ var BillingInfo = ({
|
|
|
20547
21044
|
return keys.every((k) => next[k] === prev[k]) ? prev : next;
|
|
20548
21045
|
});
|
|
20549
21046
|
}, [profile.data, checkout.isLoggedIn]);
|
|
20550
|
-
|
|
21047
|
+
useEffect24(() => {
|
|
20551
21048
|
setHolders((prev) => holderDraftsForSlots(prev, slots, restoredHolders.current));
|
|
20552
21049
|
}, [slots]);
|
|
20553
|
-
|
|
21050
|
+
useEffect24(() => {
|
|
20554
21051
|
if (!showHolders) return;
|
|
20555
21052
|
setHolders(
|
|
20556
21053
|
(prev) => holderDraftsMirroringBuyer(prev, {
|
|
@@ -20561,7 +21058,7 @@ var BillingInfo = ({
|
|
|
20561
21058
|
})
|
|
20562
21059
|
);
|
|
20563
21060
|
}, [showHolders, billing.firstName, billing.lastName, billing.email, billing.phone]);
|
|
20564
|
-
|
|
21061
|
+
useEffect24(() => {
|
|
20565
21062
|
const email = billing.email.trim();
|
|
20566
21063
|
if (checkout.isLoggedIn || !isEmail(email)) return;
|
|
20567
21064
|
const t = setTimeout(
|
|
@@ -20586,7 +21083,7 @@ var BillingInfo = ({
|
|
|
20586
21083
|
var _a2;
|
|
20587
21084
|
return (_a2 = statesQuery.data) != null ? _a2 : [];
|
|
20588
21085
|
}, [statesQuery.data]);
|
|
20589
|
-
|
|
21086
|
+
useEffect24(() => {
|
|
20590
21087
|
var _a2, _b2, _c2, _d2;
|
|
20591
21088
|
if (countryDefaultApplied.current || billing.countryId || countries.length === 0 || profile.isLoading || eventId && event.isLoading) {
|
|
20592
21089
|
return;
|
|
@@ -20625,7 +21122,7 @@ var BillingInfo = ({
|
|
|
20625
21122
|
event.isLoading,
|
|
20626
21123
|
(_e = event.data) == null ? void 0 : _e.countryCode
|
|
20627
21124
|
]);
|
|
20628
|
-
|
|
21125
|
+
useEffect24(() => {
|
|
20629
21126
|
var _a2;
|
|
20630
21127
|
if (!billing.countryId) return;
|
|
20631
21128
|
const country = countries.find(
|
|
@@ -20636,7 +21133,7 @@ var BillingInfo = ({
|
|
|
20636
21133
|
setBilling((current4) => ({ ...current4, countryCode }));
|
|
20637
21134
|
}
|
|
20638
21135
|
}, [billing.countryId, billing.countryCode, countries]);
|
|
20639
|
-
|
|
21136
|
+
useEffect24(() => {
|
|
20640
21137
|
if (!billing.stateId) return;
|
|
20641
21138
|
const state = states.find(
|
|
20642
21139
|
(candidate) => String(candidate.id) === String(billing.stateId)
|
|
@@ -20696,7 +21193,7 @@ var BillingInfo = ({
|
|
|
20696
21193
|
});
|
|
20697
21194
|
if (ttfOptInLabel || brandOptInLabel) commitConsent(consent);
|
|
20698
21195
|
};
|
|
20699
|
-
|
|
21196
|
+
useEffect24(() => {
|
|
20700
21197
|
if (combined) commit();
|
|
20701
21198
|
}, [
|
|
20702
21199
|
combined,
|
|
@@ -20730,9 +21227,9 @@ var BillingInfo = ({
|
|
|
20730
21227
|
return /* @__PURE__ */ jsxs21(FrozenFields, { frozen: checkout.orderFixed, children: [
|
|
20731
21228
|
/* @__PURE__ */ jsxs21(Card, { children: [
|
|
20732
21229
|
/* @__PURE__ */ jsx24(SectionHeader, { title: heading }),
|
|
20733
|
-
onLogin && !checkout.isLoggedIn ? /* @__PURE__ */ jsxs21(View20, { style:
|
|
20734
|
-
/* @__PURE__ */ jsx24(Text14, { style:
|
|
20735
|
-
/* @__PURE__ */ jsx24(Pressable10, { onPress: () => onLogin(), children: /* @__PURE__ */ jsx24(Text14, { style:
|
|
21230
|
+
onLogin && !checkout.isLoggedIn ? /* @__PURE__ */ jsxs21(View20, { style: s6.loginRow, children: [
|
|
21231
|
+
/* @__PURE__ */ jsx24(Text14, { style: s6.note, children: "Login & skip ahead:" }),
|
|
21232
|
+
/* @__PURE__ */ jsx24(Pressable10, { onPress: () => onLogin(), children: /* @__PURE__ */ jsx24(Text14, { style: s6.link, children: "Login" }) })
|
|
20736
21233
|
] }) : null,
|
|
20737
21234
|
gates.phoneFirstCheckout && !checkout.isLoggedIn ? /* @__PURE__ */ jsx24(
|
|
20738
21235
|
BillingPhoneIdentity,
|
|
@@ -20743,8 +21240,8 @@ var BillingInfo = ({
|
|
|
20743
21240
|
whatsappAvailable: Boolean(gates.phoneFirstWhatsapp)
|
|
20744
21241
|
}
|
|
20745
21242
|
) : null,
|
|
20746
|
-
/* @__PURE__ */ jsxs21(View20, { style:
|
|
20747
|
-
/* @__PURE__ */ jsx24(View20, { style:
|
|
21243
|
+
/* @__PURE__ */ jsxs21(View20, { style: s6.row, children: [
|
|
21244
|
+
/* @__PURE__ */ jsx24(View20, { style: s6.col, children: /* @__PURE__ */ jsx24(Field, { error: fieldError("First name", "First name is required."), children: /* @__PURE__ */ jsx24(
|
|
20748
21245
|
Input,
|
|
20749
21246
|
{
|
|
20750
21247
|
placeholder: "First name *",
|
|
@@ -20754,7 +21251,7 @@ var BillingInfo = ({
|
|
|
20754
21251
|
invalid: Boolean(fieldError("First name"))
|
|
20755
21252
|
}
|
|
20756
21253
|
) }) }),
|
|
20757
|
-
/* @__PURE__ */ jsx24(View20, { style:
|
|
21254
|
+
/* @__PURE__ */ jsx24(View20, { style: s6.col, children: /* @__PURE__ */ jsx24(Field, { error: fieldError("Last name", "Last name is required."), children: /* @__PURE__ */ jsx24(
|
|
20758
21255
|
Input,
|
|
20759
21256
|
{
|
|
20760
21257
|
placeholder: "Last name *",
|
|
@@ -20765,8 +21262,8 @@ var BillingInfo = ({
|
|
|
20765
21262
|
}
|
|
20766
21263
|
) }) })
|
|
20767
21264
|
] }),
|
|
20768
|
-
/* @__PURE__ */ jsxs21(View20, { style:
|
|
20769
|
-
/* @__PURE__ */ jsx24(View20, { style:
|
|
21265
|
+
/* @__PURE__ */ jsxs21(View20, { style: s6.row, children: [
|
|
21266
|
+
/* @__PURE__ */ jsx24(View20, { style: s6.col, children: /* @__PURE__ */ jsx24(
|
|
20770
21267
|
Field,
|
|
20771
21268
|
{
|
|
20772
21269
|
error: fieldError("Valid email address", "Enter a valid email address."),
|
|
@@ -20783,7 +21280,7 @@ var BillingInfo = ({
|
|
|
20783
21280
|
)
|
|
20784
21281
|
}
|
|
20785
21282
|
) }),
|
|
20786
|
-
requireEmailConfirmation && !checkout.isLoggedIn ? /* @__PURE__ */ jsx24(View20, { style:
|
|
21283
|
+
requireEmailConfirmation && !checkout.isLoggedIn ? /* @__PURE__ */ jsx24(View20, { style: s6.col, children: /* @__PURE__ */ jsx24(
|
|
20787
21284
|
Field,
|
|
20788
21285
|
{
|
|
20789
21286
|
error: fieldError(
|
|
@@ -20805,10 +21302,10 @@ var BillingInfo = ({
|
|
|
20805
21302
|
) }) : null
|
|
20806
21303
|
] }),
|
|
20807
21304
|
!showValidation && requireEmailConfirmation && billing.confirmEmail && billing.confirmEmail.trim().toLowerCase() !== billing.email.trim().toLowerCase() ? /* @__PURE__ */ jsx24(ErrorText, { children: "The email addresses do not match." }) : null,
|
|
20808
|
-
emailTaken ? /* @__PURE__ */ jsxs21(Text14, { style:
|
|
21305
|
+
emailTaken ? /* @__PURE__ */ jsxs21(Text14, { style: s6.note, children: [
|
|
20809
21306
|
"This email is already registered.",
|
|
20810
21307
|
" ",
|
|
20811
|
-
onLogin ? /* @__PURE__ */ jsx24(Text14, { style:
|
|
21308
|
+
onLogin ? /* @__PURE__ */ jsx24(Text14, { style: s6.link, onPress: () => onLogin(billing.email), children: "Log in to autofill your details" }) : "Log in to autofill your details."
|
|
20812
21309
|
] }) : null,
|
|
20813
21310
|
checkout.buyerFields.map((f) => {
|
|
20814
21311
|
var _a2;
|
|
@@ -20872,7 +21369,7 @@ var BillingInfo = ({
|
|
|
20872
21369
|
}
|
|
20873
21370
|
) : null,
|
|
20874
21371
|
orderGroups.map((g) => /* @__PURE__ */ jsxs21(Fragment10, { children: [
|
|
20875
|
-
g.label ? /* @__PURE__ */ jsx24(Text14, { style:
|
|
21372
|
+
g.label ? /* @__PURE__ */ jsx24(Text14, { style: s6.sectionLabel, children: g.label }) : null,
|
|
20876
21373
|
renderGroupFields(
|
|
20877
21374
|
g,
|
|
20878
21375
|
dataCapture,
|
|
@@ -20887,21 +21384,21 @@ var BillingInfo = ({
|
|
|
20887
21384
|
label: brandOptInLabel
|
|
20888
21385
|
}
|
|
20889
21386
|
) : null,
|
|
20890
|
-
privacyPolicy ? /* @__PURE__ */ jsxs21(View20, { style:
|
|
21387
|
+
privacyPolicy ? /* @__PURE__ */ jsxs21(View20, { style: s6.consent, children: [
|
|
20891
21388
|
/* @__PURE__ */ jsx24(
|
|
20892
21389
|
Checkbox,
|
|
20893
21390
|
{
|
|
20894
21391
|
checked: consent.ttfOptIn,
|
|
20895
21392
|
onChange: (ttfOptIn) => setConsent((c) => ({ ...c, ttfOptIn })),
|
|
20896
21393
|
invalid: privacyInvalid,
|
|
20897
|
-
label: /* @__PURE__ */ jsxs21(Text14, { style:
|
|
21394
|
+
label: /* @__PURE__ */ jsxs21(Text14, { style: s6.consentLabel, children: [
|
|
20898
21395
|
"I have read and agree to ",
|
|
20899
21396
|
privacyPolicy.brandName,
|
|
20900
21397
|
" ",
|
|
20901
21398
|
/* @__PURE__ */ jsx24(
|
|
20902
21399
|
Text14,
|
|
20903
21400
|
{
|
|
20904
|
-
style:
|
|
21401
|
+
style: s6.link,
|
|
20905
21402
|
onPress: () => Linking3.openURL(privacyPolicy.url).catch(() => void 0),
|
|
20906
21403
|
children: privacyPolicy.linkLabel || "Privacy Policy."
|
|
20907
21404
|
}
|
|
@@ -21126,7 +21623,7 @@ var Accommodation = ({ eventId }) => {
|
|
|
21126
21623
|
var styles7 = StyleSheet19.create({ room: { gap: 12, paddingVertical: 12 }, title: { fontSize: 16, fontWeight: "600" } });
|
|
21127
21624
|
|
|
21128
21625
|
// src/sections/Payment.tsx
|
|
21129
|
-
import { useEffect as
|
|
21626
|
+
import { useEffect as useEffect25, useMemo as useMemo27, useState as useState36 } from "react";
|
|
21130
21627
|
import { Platform as Platform2, View as View23 } from "react-native";
|
|
21131
21628
|
import { isPlatformPaySupported } from "@stripe/stripe-react-native";
|
|
21132
21629
|
import { Fragment as Fragment12, jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
@@ -21180,14 +21677,14 @@ var Payment = ({
|
|
|
21180
21677
|
const bundleWait = hooks_exports.useTicketGatewayWait(checkout.store);
|
|
21181
21678
|
const bundleStarting = bundleWait !== null;
|
|
21182
21679
|
const validation = useCheckoutValidation();
|
|
21183
|
-
const [error, setError] =
|
|
21680
|
+
const [error, setError] = useState36("");
|
|
21184
21681
|
const paymentMethods = hooks_exports.useCheckoutPaymentMethods(checkout.store);
|
|
21185
21682
|
const methods = (_a = paymentMethods.data) != null ? _a : null;
|
|
21186
|
-
const [selected, setSelected] =
|
|
21187
|
-
const [extras, setExtras] =
|
|
21188
|
-
const [useSavedCard, setUseSavedCard] =
|
|
21189
|
-
const [nativeWalletSupported, setNativeWalletSupported] =
|
|
21190
|
-
|
|
21683
|
+
const [selected, setSelected] = useState36("");
|
|
21684
|
+
const [extras, setExtras] = useState36({});
|
|
21685
|
+
const [useSavedCard, setUseSavedCard] = useState36(true);
|
|
21686
|
+
const [nativeWalletSupported, setNativeWalletSupported] = useState36(false);
|
|
21687
|
+
useEffect25(() => {
|
|
21191
21688
|
let mounted = true;
|
|
21192
21689
|
const env = getConfig().env;
|
|
21193
21690
|
isPlatformPaySupported({ googlePay: { testEnv: env === "STAG" || env === "DEV" } }).then((supported) => {
|
|
@@ -21260,7 +21757,7 @@ var Payment = ({
|
|
|
21260
21757
|
nativeWalletSupported,
|
|
21261
21758
|
offersOxxo
|
|
21262
21759
|
]);
|
|
21263
|
-
|
|
21760
|
+
useEffect25(() => {
|
|
21264
21761
|
if (options.length && !options.some((o) => o.value === selected))
|
|
21265
21762
|
setSelected(options[0].value);
|
|
21266
21763
|
}, [options, selected]);
|
|
@@ -21386,7 +21883,7 @@ var Payment = ({
|
|
|
21386
21883
|
selected,
|
|
21387
21884
|
onSelect: setSelected,
|
|
21388
21885
|
extraValues: extras,
|
|
21389
|
-
onExtraChange: (v, patch2) => setExtras((
|
|
21886
|
+
onExtraChange: (v, patch2) => setExtras((s6) => ({ ...s6, [v]: { ...s6[v], ...patch2 } })),
|
|
21390
21887
|
showValidation: validation.attempt > 0,
|
|
21391
21888
|
inputSlotFor: isPlanSelected ? reuseSavedCard ? void 0 : "paymentPlan" : cardValue,
|
|
21392
21889
|
children: paymentInput
|
|
@@ -21395,18 +21892,18 @@ var Payment = ({
|
|
|
21395
21892
|
] }) : null,
|
|
21396
21893
|
conditions.map((c) => {
|
|
21397
21894
|
var _a2, _b2;
|
|
21398
|
-
const
|
|
21895
|
+
const invalid2 = validation.attempt > 0 && c.isRequired && !((_a2 = checkout.acceptedConditions) == null ? void 0 : _a2[c.id]);
|
|
21399
21896
|
return /* @__PURE__ */ jsxs24(View23, { style: { gap: 4 }, children: [
|
|
21400
21897
|
/* @__PURE__ */ jsx27(FrozenFields, { frozen: checkout.orderFixed, children: /* @__PURE__ */ jsx27(
|
|
21401
21898
|
Checkbox,
|
|
21402
21899
|
{
|
|
21403
21900
|
checked: Boolean((_b2 = checkout.acceptedConditions) == null ? void 0 : _b2[c.id]),
|
|
21404
|
-
invalid,
|
|
21901
|
+
invalid: invalid2,
|
|
21405
21902
|
onChange: (next) => checkout.acceptCondition(c.id, next),
|
|
21406
21903
|
label: `${conditionText(c.content || c.name)}${c.isRequired ? " *" : ""}`
|
|
21407
21904
|
}
|
|
21408
21905
|
) }),
|
|
21409
|
-
|
|
21906
|
+
invalid2 ? /* @__PURE__ */ jsx27(ErrorText, { children: "You must accept this condition to continue." }) : null
|
|
21410
21907
|
] }, c.id);
|
|
21411
21908
|
})
|
|
21412
21909
|
] }),
|
|
@@ -21430,11 +21927,11 @@ var Payment = ({
|
|
|
21430
21927
|
};
|
|
21431
21928
|
|
|
21432
21929
|
// src/sections/WaiverSigning.tsx
|
|
21433
|
-
import { useMemo as useMemo29, useRef as
|
|
21930
|
+
import { useMemo as useMemo29, useRef as useRef27, useState as useState38 } from "react";
|
|
21434
21931
|
import { Pressable as Pressable12, ScrollView, StyleSheet as StyleSheet21, Text as Text17, View as View25 } from "react-native";
|
|
21435
21932
|
|
|
21436
21933
|
// src/ui/SignaturePad.tsx
|
|
21437
|
-
import { memo, useEffect as
|
|
21934
|
+
import { memo, useEffect as useEffect26, useMemo as useMemo28, useRef as useRef26, useState as useState37 } from "react";
|
|
21438
21935
|
import { PanResponder, Pressable as Pressable11, StyleSheet as StyleSheet20, Text as Text16, View as View24 } from "react-native";
|
|
21439
21936
|
import { Fragment as Fragment13, jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
21440
21937
|
var LINE_WIDTH = 2.5;
|
|
@@ -21480,13 +21977,13 @@ var SignaturePad = ({
|
|
|
21480
21977
|
disabled
|
|
21481
21978
|
}) => {
|
|
21482
21979
|
const theme = useTheme();
|
|
21483
|
-
const strokesRef =
|
|
21484
|
-
const [, setFrame] =
|
|
21485
|
-
const frameRequest =
|
|
21486
|
-
const size =
|
|
21487
|
-
const report =
|
|
21980
|
+
const strokesRef = useRef26([]);
|
|
21981
|
+
const [, setFrame] = useState37(0);
|
|
21982
|
+
const frameRequest = useRef26(null);
|
|
21983
|
+
const size = useRef26({ width: 0, height: PAD_HEIGHT });
|
|
21984
|
+
const report = useRef26(onChange);
|
|
21488
21985
|
report.current = onChange;
|
|
21489
|
-
const disabledRef =
|
|
21986
|
+
const disabledRef = useRef26(disabled);
|
|
21490
21987
|
disabledRef.current = disabled;
|
|
21491
21988
|
const render = () => {
|
|
21492
21989
|
if (frameRequest.current !== null) cancelAnimationFrame(frameRequest.current);
|
|
@@ -21497,7 +21994,7 @@ var SignaturePad = ({
|
|
|
21497
21994
|
if (frameRequest.current !== null) return;
|
|
21498
21995
|
frameRequest.current = requestAnimationFrame(render);
|
|
21499
21996
|
};
|
|
21500
|
-
|
|
21997
|
+
useEffect26(
|
|
21501
21998
|
() => () => {
|
|
21502
21999
|
if (frameRequest.current !== null) cancelAnimationFrame(frameRequest.current);
|
|
21503
22000
|
},
|
|
@@ -21615,7 +22112,7 @@ var WaiverSigning = ({
|
|
|
21615
22112
|
const checkout = useCheckoutContext();
|
|
21616
22113
|
const locked = Boolean(checkout.orderFixed);
|
|
21617
22114
|
const theme = useTheme();
|
|
21618
|
-
const
|
|
22115
|
+
const s6 = useWaiverStyles(theme);
|
|
21619
22116
|
const t = translate2 != null ? translate2 : createTranslator({ locale, messages });
|
|
21620
22117
|
const waiver = checkout.waiver;
|
|
21621
22118
|
const signing = hooks_exports.useWaiverSigning(
|
|
@@ -21624,8 +22121,8 @@ var WaiverSigning = ({
|
|
|
21624
22121
|
checkout.setWaiverSignature,
|
|
21625
22122
|
checkout.holdWaiverSigning
|
|
21626
22123
|
);
|
|
21627
|
-
const [open, setOpen] =
|
|
21628
|
-
const [reloading, setReloading] =
|
|
22124
|
+
const [open, setOpen] = useState38({});
|
|
22125
|
+
const [reloading, setReloading] = useState38(false);
|
|
21629
22126
|
if ((_a = checkout.unavailableDetails) == null ? void 0 : _a.includes("waiver")) {
|
|
21630
22127
|
return /* @__PURE__ */ jsxs26(Card, { children: [
|
|
21631
22128
|
/* @__PURE__ */ jsx29(SectionHeader, { title: t("waivers.heading") }),
|
|
@@ -21649,16 +22146,16 @@ var WaiverSigning = ({
|
|
|
21649
22146
|
if (!waiverSignableAtCheckout(waiver)) {
|
|
21650
22147
|
return /* @__PURE__ */ jsxs26(Card, { children: [
|
|
21651
22148
|
/* @__PURE__ */ jsx29(SectionHeader, { title: waiver.title || t("waivers.heading") }),
|
|
21652
|
-
/* @__PURE__ */ jsx29(Text17, { style:
|
|
22149
|
+
/* @__PURE__ */ jsx29(Text17, { style: s6.muted, children: t("waivers.signLater") })
|
|
21653
22150
|
] });
|
|
21654
22151
|
}
|
|
21655
22152
|
const signatures = (_b = checkout.waiverSignatures) != null ? _b : {};
|
|
21656
22153
|
return /* @__PURE__ */ jsxs26(Card, { children: [
|
|
21657
22154
|
/* @__PURE__ */ jsx29(SectionHeader, { title: waiver.title || t("waivers.heading") }),
|
|
21658
|
-
/* @__PURE__ */ jsx29(Text17, { style:
|
|
22155
|
+
/* @__PURE__ */ jsx29(Text17, { style: s6.muted, children: t(
|
|
21659
22156
|
waiver.checkoutMode === "required" ? "waivers.intro.required" : "waivers.intro.optional"
|
|
21660
22157
|
) }),
|
|
21661
|
-
/* @__PURE__ */ jsx29(ScrollView, { style: [
|
|
22158
|
+
/* @__PURE__ */ jsx29(ScrollView, { style: [s6.textBox, { borderColor: theme.border }], nestedScrollEnabled: true, children: /* @__PURE__ */ jsx29(Text17, { style: s6.body, children: htmlToPlainText(waiver.bodyHtml) }) }),
|
|
21662
22159
|
tickets.map((ticket) => {
|
|
21663
22160
|
const signed = signatures[ticket.index];
|
|
21664
22161
|
const formKey = waiverTicketFormKey(checkout.eventId, waiver, ticket);
|
|
@@ -21671,10 +22168,10 @@ var WaiverSigning = ({
|
|
|
21671
22168
|
number: ticket.ticketNumber,
|
|
21672
22169
|
name: ticket.holderName
|
|
21673
22170
|
}) : t("waivers.ticket", { number: ticket.ticketNumber });
|
|
21674
|
-
return /* @__PURE__ */ jsxs26(View25, { style: [
|
|
21675
|
-
/* @__PURE__ */ jsx29(Text17, { style:
|
|
21676
|
-
signed ? /* @__PURE__ */ jsxs26(View25, { style:
|
|
21677
|
-
/* @__PURE__ */ jsx29(Text17, { style:
|
|
22171
|
+
return /* @__PURE__ */ jsxs26(View25, { style: [s6.ticket, { borderTopColor: theme.border }], children: [
|
|
22172
|
+
/* @__PURE__ */ jsx29(Text17, { style: s6.strong, children: label }),
|
|
22173
|
+
signed ? /* @__PURE__ */ jsxs26(View25, { style: s6.row, children: [
|
|
22174
|
+
/* @__PURE__ */ jsx29(Text17, { style: s6.body, children: t(
|
|
21678
22175
|
!forHolder ? "waivers.signedForSomeoneElse" : signed.signerRole === "guardian" ? "waivers.signedByGuardian" : "waivers.signedBy",
|
|
21679
22176
|
{ name: signed.signerName }
|
|
21680
22177
|
) }),
|
|
@@ -21718,25 +22215,25 @@ var WaiverSigning = ({
|
|
|
21718
22215
|
var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error, onSign }) => {
|
|
21719
22216
|
var _a, _b, _c, _d;
|
|
21720
22217
|
const theme = useTheme();
|
|
21721
|
-
const
|
|
21722
|
-
const [heldDraft, setDraft] =
|
|
22218
|
+
const s6 = useWaiverStyles(theme);
|
|
22219
|
+
const [heldDraft, setDraft] = useState38(
|
|
21723
22220
|
() => emptyWaiverDraft(
|
|
21724
22221
|
{ firstName: ticket.holderFirstName, lastName: ticket.holderLastName },
|
|
21725
22222
|
{ signatureMethods: methods }
|
|
21726
22223
|
)
|
|
21727
22224
|
);
|
|
21728
22225
|
const draft = draftWithAllowedMethod(heldDraft, methods);
|
|
21729
|
-
const [problems, setProblems] =
|
|
21730
|
-
const [pressed, setPressed] =
|
|
22226
|
+
const [problems, setProblems] = useState38([]);
|
|
22227
|
+
const [pressed, setPressed] = useState38(false);
|
|
21731
22228
|
const frozen = busy || locked;
|
|
21732
|
-
const draftRef =
|
|
22229
|
+
const draftRef = useRef27(draft);
|
|
21733
22230
|
draftRef.current = draft;
|
|
21734
22231
|
const patch2 = (next) => {
|
|
21735
22232
|
if (!frozen) setDraft((d) => ({ ...d, ...next }));
|
|
21736
22233
|
};
|
|
21737
22234
|
const guardian = draft.signerRole === "guardian";
|
|
21738
|
-
return /* @__PURE__ */ jsxs26(View25, { style:
|
|
21739
|
-
/* @__PURE__ */ jsx29(Text17, { style:
|
|
22235
|
+
return /* @__PURE__ */ jsxs26(View25, { style: s6.form, children: [
|
|
22236
|
+
/* @__PURE__ */ jsx29(Text17, { style: s6.strong, children: t("waivers.role.label") }),
|
|
21740
22237
|
["holder", "guardian"].map((role) => /* @__PURE__ */ jsxs26(
|
|
21741
22238
|
Pressable12,
|
|
21742
22239
|
{
|
|
@@ -21752,19 +22249,19 @@ var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error
|
|
|
21752
22249
|
} : { signerRole: role }
|
|
21753
22250
|
);
|
|
21754
22251
|
},
|
|
21755
|
-
style:
|
|
22252
|
+
style: s6.choice,
|
|
21756
22253
|
children: [
|
|
21757
22254
|
/* @__PURE__ */ jsx29(
|
|
21758
22255
|
View25,
|
|
21759
22256
|
{
|
|
21760
22257
|
style: [
|
|
21761
|
-
|
|
22258
|
+
s6.radio,
|
|
21762
22259
|
{ borderColor: theme.accent },
|
|
21763
22260
|
draft.signerRole === role && { backgroundColor: theme.accent }
|
|
21764
22261
|
]
|
|
21765
22262
|
}
|
|
21766
22263
|
),
|
|
21767
|
-
/* @__PURE__ */ jsx29(Text17, { style:
|
|
22264
|
+
/* @__PURE__ */ jsx29(Text17, { style: s6.body, children: t(`waivers.role.${role}`) })
|
|
21768
22265
|
]
|
|
21769
22266
|
},
|
|
21770
22267
|
role
|
|
@@ -21824,19 +22321,19 @@ var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error
|
|
|
21824
22321
|
accessibilityState: { selected: draft.method === method },
|
|
21825
22322
|
disabled: frozen,
|
|
21826
22323
|
onPress: () => setDraft((d) => withSignatureMethod(d, method)),
|
|
21827
|
-
style:
|
|
22324
|
+
style: s6.choice,
|
|
21828
22325
|
children: [
|
|
21829
22326
|
/* @__PURE__ */ jsx29(
|
|
21830
22327
|
View25,
|
|
21831
22328
|
{
|
|
21832
22329
|
style: [
|
|
21833
|
-
|
|
22330
|
+
s6.radio,
|
|
21834
22331
|
{ borderColor: theme.accent },
|
|
21835
22332
|
draft.method === method && { backgroundColor: theme.accent }
|
|
21836
22333
|
]
|
|
21837
22334
|
}
|
|
21838
22335
|
),
|
|
21839
|
-
/* @__PURE__ */ jsx29(Text17, { style:
|
|
22336
|
+
/* @__PURE__ */ jsx29(Text17, { style: s6.body, children: t(`waivers.method.${method}`) })
|
|
21840
22337
|
]
|
|
21841
22338
|
},
|
|
21842
22339
|
method
|
|
@@ -21868,7 +22365,7 @@ var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error
|
|
|
21868
22365
|
),
|
|
21869
22366
|
problems.map((key4) => /* @__PURE__ */ jsx29(ErrorText, { children: t(key4) }, key4)),
|
|
21870
22367
|
error ? /* @__PURE__ */ jsx29(ErrorText, { children: error }) : null,
|
|
21871
|
-
busy && !pressed ? /* @__PURE__ */ jsx29(Text17, { style:
|
|
22368
|
+
busy && !pressed ? /* @__PURE__ */ jsx29(Text17, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("common.stillSaving") }) : null,
|
|
21872
22369
|
/* @__PURE__ */ jsx29(
|
|
21873
22370
|
Button,
|
|
21874
22371
|
{
|
|
@@ -21928,7 +22425,7 @@ var useWaiverStyles = (theme) => useMemo29(
|
|
|
21928
22425
|
);
|
|
21929
22426
|
|
|
21930
22427
|
// src/sections/IDVerification.tsx
|
|
21931
|
-
import { useState as
|
|
22428
|
+
import { useState as useState39 } from "react";
|
|
21932
22429
|
import { Linking as Linking4 } from "react-native";
|
|
21933
22430
|
import { jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
21934
22431
|
var MESSAGE = {
|
|
@@ -21943,8 +22440,8 @@ var IDVerification = () => {
|
|
|
21943
22440
|
const checkout = useCheckoutContext();
|
|
21944
22441
|
const theme = useTheme();
|
|
21945
22442
|
const order = checkout.order;
|
|
21946
|
-
const [phase, setPhase] =
|
|
21947
|
-
const [error, setError] =
|
|
22443
|
+
const [phase, setPhase] = useState39("idle");
|
|
22444
|
+
const [error, setError] = useState39("");
|
|
21948
22445
|
if (!(order == null ? void 0 : order.needIdVerification)) return null;
|
|
21949
22446
|
const done = phase === "verified";
|
|
21950
22447
|
const running = phase === "starting" || phase === "polling";
|
|
@@ -21971,7 +22468,7 @@ var IDVerification = () => {
|
|
|
21971
22468
|
};
|
|
21972
22469
|
|
|
21973
22470
|
// src/sections/Confirmation.tsx
|
|
21974
|
-
import { useState as
|
|
22471
|
+
import { useState as useState40 } from "react";
|
|
21975
22472
|
import { Linking as Linking5, Share, StyleSheet as StyleSheet22, Text as Text18, View as View26 } from "react-native";
|
|
21976
22473
|
import Clipboard from "@react-native-clipboard/clipboard";
|
|
21977
22474
|
import { jsx as jsx31, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
@@ -21985,7 +22482,7 @@ var Confirmation = ({
|
|
|
21985
22482
|
const checkout = useCheckoutContext();
|
|
21986
22483
|
const theme = useTheme();
|
|
21987
22484
|
const order = checkout.order;
|
|
21988
|
-
const [copied, setCopied] =
|
|
22485
|
+
const [copied, setCopied] = useState40(false);
|
|
21989
22486
|
if (!order) return null;
|
|
21990
22487
|
const pending2 = order.pending;
|
|
21991
22488
|
const url2 = shareUrl != null ? shareUrl : "";
|
|
@@ -22039,12 +22536,12 @@ var styles9 = StyleSheet22.create({
|
|
|
22039
22536
|
});
|
|
22040
22537
|
|
|
22041
22538
|
// src/sections/Rewards.tsx
|
|
22042
|
-
import { useEffect as
|
|
22539
|
+
import { useEffect as useEffect27, useState as useState42 } from "react";
|
|
22043
22540
|
import { Alert, Image as Image2, Share as Share2, StyleSheet as StyleSheet25, View as View29 } from "react-native";
|
|
22044
22541
|
import Clipboard2 from "@react-native-clipboard/clipboard";
|
|
22045
22542
|
|
|
22046
22543
|
// src/sections/rewards/RewardsLadder.tsx
|
|
22047
|
-
import { useState as
|
|
22544
|
+
import { useState as useState41 } from "react";
|
|
22048
22545
|
import { StyleSheet as StyleSheet23, View as View27 } from "react-native";
|
|
22049
22546
|
import { jsx as jsx32, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
22050
22547
|
var AWARD_STATUS_KEYS = {
|
|
@@ -22054,9 +22551,9 @@ var AWARD_STATUS_KEYS = {
|
|
|
22054
22551
|
cancelled: "rewards.awards.cancelled"
|
|
22055
22552
|
};
|
|
22056
22553
|
var DeliveryDetails = ({ fields, translate: t, onSubmit }) => {
|
|
22057
|
-
const [values2, setValues] =
|
|
22058
|
-
const [saving, setSaving] =
|
|
22059
|
-
const [failure, setFailure] =
|
|
22554
|
+
const [values2, setValues] = useState41({});
|
|
22555
|
+
const [saving, setSaving] = useState41(false);
|
|
22556
|
+
const [failure, setFailure] = useState41("");
|
|
22060
22557
|
return /* @__PURE__ */ jsxs29(View27, { style: { gap: 10 }, children: [
|
|
22061
22558
|
fields.map((field) => {
|
|
22062
22559
|
var _a;
|
|
@@ -22247,10 +22744,10 @@ var RewardsView = ({
|
|
|
22247
22744
|
var _a, _b, _c, _d, _e, _f;
|
|
22248
22745
|
const t = translate2 != null ? translate2 : createTranslator({ locale, messages });
|
|
22249
22746
|
const { rewards, failure, busy, hash } = flow;
|
|
22250
|
-
const [packName, setPackName] =
|
|
22251
|
-
const [packCode, setPackCode] =
|
|
22252
|
-
const [copied, setCopied] =
|
|
22253
|
-
|
|
22747
|
+
const [packName, setPackName] = useState42("");
|
|
22748
|
+
const [packCode, setPackCode] = useState42("");
|
|
22749
|
+
const [copied, setCopied] = useState42(false);
|
|
22750
|
+
useEffect27(() => {
|
|
22254
22751
|
setCopied(false);
|
|
22255
22752
|
}, [rewards == null ? void 0 : rewards.share_link]);
|
|
22256
22753
|
if (!rewards)
|
|
@@ -22453,17 +22950,17 @@ var TicketChange = ({
|
|
|
22453
22950
|
}) => {
|
|
22454
22951
|
var _a;
|
|
22455
22952
|
const theme = useTheme();
|
|
22456
|
-
const
|
|
22953
|
+
const s6 = useChangeStyles(theme);
|
|
22457
22954
|
const t = translate2 != null ? translate2 : createTranslator({ locale, messages });
|
|
22458
22955
|
const open = openUrl != null ? openUrl : rnPorts.openUrl;
|
|
22459
22956
|
const flow = hooks_exports.useTicketChange({ ticketHash, orderHash }, open);
|
|
22460
22957
|
const options = flow.query.data;
|
|
22461
22958
|
const signInLine = flow.signInRequired ? /* @__PURE__ */ jsxs32(View30, { children: [
|
|
22462
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
22959
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("ticketChange.signInRequired") }),
|
|
22463
22960
|
onLogin ? /* @__PURE__ */ jsx35(Button, { onPress: () => flow.signIn(onLogin), children: t("ticketChange.signIn") }) : null
|
|
22464
22961
|
] }) : null;
|
|
22465
22962
|
const label = (option) => option.eventName ? t("ticketChange.otherEvent", { name: option.name, event: option.eventName }) : option.name;
|
|
22466
|
-
const savingLine = flow.saving && flow.step !== "submitting" ? /* @__PURE__ */ jsx35(Text19, { style:
|
|
22963
|
+
const savingLine = flow.saving && flow.step !== "submitting" ? /* @__PURE__ */ jsx35(Text19, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("common.stillSaving") }) : null;
|
|
22467
22964
|
const refreshLine = flow.refreshFailed ? /* @__PURE__ */ jsxs32(View30, { children: [
|
|
22468
22965
|
/* @__PURE__ */ jsx35(ErrorText, { children: t("ticketChange.refreshFailed") }),
|
|
22469
22966
|
/* @__PURE__ */ jsx35(
|
|
@@ -22484,7 +22981,7 @@ var TicketChange = ({
|
|
|
22484
22981
|
if (flow.paymentInProgress) {
|
|
22485
22982
|
return /* @__PURE__ */ jsxs32(Card, { children: [
|
|
22486
22983
|
header,
|
|
22487
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
22984
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.muted, accessibilityLiveRegion: "polite", children: t("ticketChange.paymentInProgress") }),
|
|
22488
22985
|
flow.canContinuePayment ? /* @__PURE__ */ jsx35(Button, { onPress: flow.continuePayment, children: t("ticketChange.continuePayment") }) : null,
|
|
22489
22986
|
flow.notice ? /* @__PURE__ */ jsx35(ErrorText, { children: t(flow.notice) }) : null,
|
|
22490
22987
|
/* @__PURE__ */ jsx35(Button, { variant: "ghost", onPress: flow.startAgain, children: t("ticketChange.startAgain") })
|
|
@@ -22493,7 +22990,7 @@ var TicketChange = ({
|
|
|
22493
22990
|
if (flow.query.isLoading) {
|
|
22494
22991
|
return /* @__PURE__ */ jsxs32(Card, { children: [
|
|
22495
22992
|
header,
|
|
22496
|
-
/* @__PURE__ */ jsx35(View30, { style:
|
|
22993
|
+
/* @__PURE__ */ jsx35(View30, { style: s6.loader, children: /* @__PURE__ */ jsx35(Loader, {}) })
|
|
22497
22994
|
] });
|
|
22498
22995
|
}
|
|
22499
22996
|
if (!options) {
|
|
@@ -22507,8 +23004,8 @@ var TicketChange = ({
|
|
|
22507
23004
|
const priceText = flow.result && "priceText" in flow.result ? flow.result.priceText : "";
|
|
22508
23005
|
return /* @__PURE__ */ jsxs32(Card, { children: [
|
|
22509
23006
|
header,
|
|
22510
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
22511
|
-
priceText ? /* @__PURE__ */ jsx35(Text19, { style:
|
|
23007
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.strong, children: "text" in done ? done.text : t(done.key, done.values) }),
|
|
23008
|
+
priceText ? /* @__PURE__ */ jsx35(Text19, { style: s6.strong, children: priceText }) : null,
|
|
22512
23009
|
/* @__PURE__ */ jsx35(
|
|
22513
23010
|
Button,
|
|
22514
23011
|
{
|
|
@@ -22521,7 +23018,7 @@ var TicketChange = ({
|
|
|
22521
23018
|
if (flow.step === "payment" && ((_a = flow.result) == null ? void 0 : _a.status) === "payment_required") {
|
|
22522
23019
|
return /* @__PURE__ */ jsxs32(Card, { children: [
|
|
22523
23020
|
header,
|
|
22524
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
23021
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.muted, children: t("ticketChange.payment") }),
|
|
22525
23022
|
/* @__PURE__ */ jsx35(Button, { disabled: !flow.can.pay, onPress: flow.openPayment, children: t("ticketChange.paymentOpen") }),
|
|
22526
23023
|
flow.notice ? /* @__PURE__ */ jsx35(ErrorText, { children: t(flow.notice) }) : null,
|
|
22527
23024
|
/* @__PURE__ */ jsx35(
|
|
@@ -22541,12 +23038,12 @@ var TicketChange = ({
|
|
|
22541
23038
|
const submitting = flow.step === "submitting";
|
|
22542
23039
|
return /* @__PURE__ */ jsxs32(Card, { children: [
|
|
22543
23040
|
header,
|
|
22544
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
22545
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
23041
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.strong, children: t("ticketChange.confirmTitle", { name: label(option) }) }),
|
|
23042
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.price, children: option.priceText }),
|
|
22546
23043
|
(() => {
|
|
22547
23044
|
const charge = ticketChangeCharge(option);
|
|
22548
23045
|
if (!charge || option.fee <= 0) return null;
|
|
22549
|
-
return /* @__PURE__ */ jsxs32(Text19, { style:
|
|
23046
|
+
return /* @__PURE__ */ jsxs32(Text19, { style: s6.muted, children: [
|
|
22550
23047
|
t("ticketChange.fee", {
|
|
22551
23048
|
amount: `${option.currency} ${option.fee.toFixed(2)}`
|
|
22552
23049
|
}),
|
|
@@ -22557,10 +23054,10 @@ var TicketChange = ({
|
|
|
22557
23054
|
] });
|
|
22558
23055
|
})(),
|
|
22559
23056
|
flow.error ? /* @__PURE__ */ jsx35(ErrorText, { children: flow.error }) : null,
|
|
22560
|
-
flow.notice ? /* @__PURE__ */ jsx35(Text19, { style:
|
|
23057
|
+
flow.notice ? /* @__PURE__ */ jsx35(Text19, { style: s6.muted, children: t(flow.notice) }) : null,
|
|
22561
23058
|
signInLine,
|
|
22562
|
-
flow.alternatives.length > 0 ? /* @__PURE__ */ jsxs32(View30, { style:
|
|
22563
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
23059
|
+
flow.alternatives.length > 0 ? /* @__PURE__ */ jsxs32(View30, { style: s6.slots, children: [
|
|
23060
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.muted, children: t("ticketChange.slotFull") }),
|
|
22564
23061
|
flow.alternatives.map((slot) => /* @__PURE__ */ jsx35(
|
|
22565
23062
|
Button,
|
|
22566
23063
|
{
|
|
@@ -22587,7 +23084,7 @@ var TicketChange = ({
|
|
|
22587
23084
|
if (ticketChangeView(options) === "choose") {
|
|
22588
23085
|
return /* @__PURE__ */ jsxs32(Card, { children: [
|
|
22589
23086
|
header,
|
|
22590
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
23087
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.muted, children: t("ticketChange.choose") }),
|
|
22591
23088
|
options.options.map((option) => /* @__PURE__ */ jsxs32(
|
|
22592
23089
|
Pressable13,
|
|
22593
23090
|
{
|
|
@@ -22596,31 +23093,31 @@ var TicketChange = ({
|
|
|
22596
23093
|
disabled: !flow.can.select,
|
|
22597
23094
|
onPress: () => flow.select(option),
|
|
22598
23095
|
style: [
|
|
22599
|
-
|
|
23096
|
+
s6.option,
|
|
22600
23097
|
{ borderColor: theme.border },
|
|
22601
|
-
!flow.can.select &&
|
|
23098
|
+
!flow.can.select && s6.optionDisabled
|
|
22602
23099
|
],
|
|
22603
23100
|
children: [
|
|
22604
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
22605
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
23101
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.strong, children: label(option) }),
|
|
23102
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.price, children: option.priceText })
|
|
22606
23103
|
]
|
|
22607
23104
|
},
|
|
22608
23105
|
option.ticketTypeId
|
|
22609
23106
|
)),
|
|
22610
23107
|
flow.error ? /* @__PURE__ */ jsx35(ErrorText, { children: flow.error }) : null,
|
|
22611
|
-
flow.notice ? /* @__PURE__ */ jsx35(Text19, { style:
|
|
23108
|
+
flow.notice ? /* @__PURE__ */ jsx35(Text19, { style: s6.muted, children: t(flow.notice) }) : null,
|
|
22612
23109
|
signInLine
|
|
22613
23110
|
] });
|
|
22614
23111
|
}
|
|
22615
23112
|
return /* @__PURE__ */ jsxs32(Card, { children: [
|
|
22616
23113
|
header,
|
|
22617
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
23114
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.muted, children: options.message || t("ticketChange.closed") }),
|
|
22618
23115
|
options.sellInstead.available ? /* @__PURE__ */ jsxs32(Fragment16, { children: [
|
|
22619
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
23116
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.muted, children: t("ticketChange.sellInsteadNote") }),
|
|
22620
23117
|
/* @__PURE__ */ jsx35(Button, { disabled: !flow.can.sellInstead, onPress: flow.sellInstead, children: t("ticketChange.sellInstead") })
|
|
22621
23118
|
] }) : null,
|
|
22622
|
-
options.waitlistOptions.map((wait) => /* @__PURE__ */ jsx35(View30, { style:
|
|
22623
|
-
/* @__PURE__ */ jsx35(Text19, { style:
|
|
23119
|
+
options.waitlistOptions.map((wait) => /* @__PURE__ */ jsx35(View30, { style: s6.waitlist, children: wait.entry ? /* @__PURE__ */ jsxs32(Fragment16, { children: [
|
|
23120
|
+
/* @__PURE__ */ jsx35(Text19, { style: s6.muted, children: t(
|
|
22624
23121
|
wait.entry.status === "offered" ? "ticketChange.waitlist.offered" : "ticketChange.waitlist.waiting",
|
|
22625
23122
|
{ name: wait.name }
|
|
22626
23123
|
) }),
|
|
@@ -22645,7 +23142,7 @@ var TicketChange = ({
|
|
|
22645
23142
|
}
|
|
22646
23143
|
) }, wait.ticketTypeId)),
|
|
22647
23144
|
flow.error ? /* @__PURE__ */ jsx35(ErrorText, { children: flow.error }) : null,
|
|
22648
|
-
flow.notice ? /* @__PURE__ */ jsx35(Text19, { style:
|
|
23145
|
+
flow.notice ? /* @__PURE__ */ jsx35(Text19, { style: s6.muted, children: t(flow.notice) }) : null
|
|
22649
23146
|
] });
|
|
22650
23147
|
};
|
|
22651
23148
|
var useChangeStyles = (theme) => useMemo31(
|
|
@@ -22744,7 +23241,7 @@ var Trips = ({
|
|
|
22744
23241
|
};
|
|
22745
23242
|
|
|
22746
23243
|
// src/sections/EventDiscussionView.tsx
|
|
22747
|
-
import { useRef as
|
|
23244
|
+
import { useRef as useRef29, useState as useState44 } from "react";
|
|
22748
23245
|
import {
|
|
22749
23246
|
ActivityIndicator as ActivityIndicator4,
|
|
22750
23247
|
Alert as Alert2,
|
|
@@ -22762,7 +23259,7 @@ import {
|
|
|
22762
23259
|
} from "react-native";
|
|
22763
23260
|
|
|
22764
23261
|
// src/sections/discussion/CommentImages.tsx
|
|
22765
|
-
import { useEffect as
|
|
23262
|
+
import { useEffect as useEffect28, useState as useState43 } from "react";
|
|
22766
23263
|
import {
|
|
22767
23264
|
ActivityIndicator as ActivityIndicator3,
|
|
22768
23265
|
Image as Image3,
|
|
@@ -22819,6 +23316,12 @@ var LoadedImage = ({
|
|
|
22819
23316
|
Image3,
|
|
22820
23317
|
{
|
|
22821
23318
|
source: { uri: image.data },
|
|
23319
|
+
accessible: full,
|
|
23320
|
+
accessibilityLabel: full ? t("Image {{number}} of {{total}}", {
|
|
23321
|
+
number: index + 1,
|
|
23322
|
+
total: comment.images.length
|
|
23323
|
+
}) : void 0,
|
|
23324
|
+
accessibilityLiveRegion: full ? "polite" : void 0,
|
|
22822
23325
|
style: s.image,
|
|
22823
23326
|
resizeMode: full ? "contain" : "cover"
|
|
22824
23327
|
}
|
|
@@ -22829,13 +23332,14 @@ var CommentImages = ({
|
|
|
22829
23332
|
comment,
|
|
22830
23333
|
previewKey,
|
|
22831
23334
|
onPreviewChange,
|
|
22832
|
-
locale
|
|
23335
|
+
locale,
|
|
23336
|
+
renderCloseIcon
|
|
22833
23337
|
}) => {
|
|
22834
23338
|
const t = useAccountT(locale);
|
|
22835
23339
|
const theme = useTheme();
|
|
22836
23340
|
const white = [s.white, { fontFamily: theme.fontFamily }];
|
|
22837
|
-
const [selected, setSelected] =
|
|
22838
|
-
|
|
23341
|
+
const [selected, setSelected] = useState43(null);
|
|
23342
|
+
useEffect28(() => {
|
|
22839
23343
|
if (selected === null) return;
|
|
22840
23344
|
onPreviewChange(true);
|
|
22841
23345
|
return () => onPreviewChange(false);
|
|
@@ -22886,22 +23390,24 @@ var CommentImages = ({
|
|
|
22886
23390
|
animationType: "fade",
|
|
22887
23391
|
onRequestClose: () => setSelected(null),
|
|
22888
23392
|
children: /* @__PURE__ */ jsxs34(View32, { style: s.preview, children: [
|
|
22889
|
-
/* @__PURE__ */
|
|
22890
|
-
|
|
22891
|
-
|
|
22892
|
-
|
|
22893
|
-
|
|
22894
|
-
|
|
22895
|
-
|
|
22896
|
-
|
|
22897
|
-
|
|
22898
|
-
|
|
22899
|
-
|
|
22900
|
-
|
|
22901
|
-
|
|
22902
|
-
|
|
22903
|
-
|
|
22904
|
-
|
|
23393
|
+
/* @__PURE__ */ jsx37(View32, { style: s.toolbar, children: /* @__PURE__ */ jsx37(
|
|
23394
|
+
Pressable14,
|
|
23395
|
+
{
|
|
23396
|
+
accessibilityRole: "button",
|
|
23397
|
+
accessibilityLabel: t("Close image"),
|
|
23398
|
+
style: s.closeButton,
|
|
23399
|
+
onPress: () => setSelected(null),
|
|
23400
|
+
children: /* @__PURE__ */ jsx37(
|
|
23401
|
+
View32,
|
|
23402
|
+
{
|
|
23403
|
+
pointerEvents: "none",
|
|
23404
|
+
accessible: false,
|
|
23405
|
+
importantForAccessibility: "no-hide-descendants",
|
|
23406
|
+
children: renderCloseIcon ? renderCloseIcon("#9F9CB0") : /* @__PURE__ */ jsx37(Text20, { style: [white, s.closeGlyph], children: "\xD7" })
|
|
23407
|
+
}
|
|
23408
|
+
)
|
|
23409
|
+
}
|
|
23410
|
+
) }),
|
|
22905
23411
|
/* @__PURE__ */ jsx37(View32, { style: s.full, children: /* @__PURE__ */ jsx37(
|
|
22906
23412
|
LoadedImage,
|
|
22907
23413
|
{
|
|
@@ -23045,11 +23551,19 @@ var s = StyleSheet27.create({
|
|
|
23045
23551
|
preview: {
|
|
23046
23552
|
flex: 1,
|
|
23047
23553
|
backgroundColor: "rgba(11,10,21,0.96)",
|
|
23048
|
-
paddingTop:
|
|
23554
|
+
paddingTop: 53,
|
|
23049
23555
|
paddingBottom: 40,
|
|
23050
23556
|
paddingHorizontal: 16
|
|
23051
23557
|
},
|
|
23052
|
-
toolbar: { flexDirection: "row", justifyContent: "
|
|
23558
|
+
toolbar: { flexDirection: "row", justifyContent: "flex-end" },
|
|
23559
|
+
closeButton: {
|
|
23560
|
+
width: 44,
|
|
23561
|
+
height: 44,
|
|
23562
|
+
marginRight: -10,
|
|
23563
|
+
alignItems: "center",
|
|
23564
|
+
justifyContent: "center"
|
|
23565
|
+
},
|
|
23566
|
+
closeGlyph: { fontSize: 28, lineHeight: 28, color: "#9F9CB0", textAlign: "center" },
|
|
23053
23567
|
full: { flex: 1, width: "100%" },
|
|
23054
23568
|
white: { color: "#EBEBEE", fontSize: 16 },
|
|
23055
23569
|
navButton: {
|
|
@@ -23081,7 +23595,7 @@ var s = StyleSheet27.create({
|
|
|
23081
23595
|
});
|
|
23082
23596
|
|
|
23083
23597
|
// src/sections/discussion/SwipeReply.tsx
|
|
23084
|
-
import { useMemo as useMemo33, useRef as
|
|
23598
|
+
import { useMemo as useMemo33, useRef as useRef28 } from "react";
|
|
23085
23599
|
import { Animated, PanResponder as PanResponder2, StyleSheet as StyleSheet28, Text as Text21, View as View33 } from "react-native";
|
|
23086
23600
|
import { jsx as jsx38, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
23087
23601
|
var SwipeReply = ({
|
|
@@ -23092,7 +23606,7 @@ var SwipeReply = ({
|
|
|
23092
23606
|
children
|
|
23093
23607
|
}) => {
|
|
23094
23608
|
const theme = useTheme();
|
|
23095
|
-
const offset =
|
|
23609
|
+
const offset = useRef28(new Animated.Value(0)).current;
|
|
23096
23610
|
const gesture = useMemo33(() => {
|
|
23097
23611
|
const reset = () => Animated.spring(offset, { toValue: 0, useNativeDriver: true }).start();
|
|
23098
23612
|
return PanResponder2.create({
|
|
@@ -23166,23 +23680,24 @@ var EventDiscussionBody = ({
|
|
|
23166
23680
|
previewKey,
|
|
23167
23681
|
locale,
|
|
23168
23682
|
renderReplyIcon,
|
|
23683
|
+
renderImageCloseIcon,
|
|
23169
23684
|
onModerationFilter,
|
|
23170
23685
|
renderReactionIcon
|
|
23171
23686
|
}) => {
|
|
23172
23687
|
var _a, _b, _c;
|
|
23173
23688
|
const theme = useTheme();
|
|
23174
23689
|
const t = useAccountT(locale);
|
|
23175
|
-
const list2 =
|
|
23176
|
-
const firstContent =
|
|
23177
|
-
const [actions, setActions] =
|
|
23178
|
-
const [reporting, setReporting] =
|
|
23179
|
-
const [moderating, setModerating] =
|
|
23180
|
-
const [reason, setReason] =
|
|
23181
|
-
const [blocksVisible, setBlocksVisible] =
|
|
23182
|
-
const [pickerError, setPickerError] =
|
|
23183
|
-
const [imageOpen, setImageOpen] =
|
|
23184
|
-
const [pickerBusy, setPickerBusy] =
|
|
23185
|
-
const picking =
|
|
23690
|
+
const list2 = useRef29(null);
|
|
23691
|
+
const firstContent = useRef29(true);
|
|
23692
|
+
const [actions, setActions] = useState44(null);
|
|
23693
|
+
const [reporting, setReporting] = useState44(null);
|
|
23694
|
+
const [moderating, setModerating] = useState44(null);
|
|
23695
|
+
const [reason, setReason] = useState44("");
|
|
23696
|
+
const [blocksVisible, setBlocksVisible] = useState44(false);
|
|
23697
|
+
const [pickerError, setPickerError] = useState44("");
|
|
23698
|
+
const [imageOpen, setImageOpen] = useState44(false);
|
|
23699
|
+
const [pickerBusy, setPickerBusy] = useState44(false);
|
|
23700
|
+
const picking = useRef29(false);
|
|
23186
23701
|
const text3 = { color: theme.text, fontFamily: theme.fontFamily };
|
|
23187
23702
|
const muted = { color: theme.muted, fontFamily: theme.fontFamily };
|
|
23188
23703
|
const closeActions = (work) => {
|
|
@@ -23269,7 +23784,8 @@ var EventDiscussionBody = ({
|
|
|
23269
23784
|
comment,
|
|
23270
23785
|
previewKey,
|
|
23271
23786
|
locale,
|
|
23272
|
-
onPreviewChange: setImageOpen
|
|
23787
|
+
onPreviewChange: setImageOpen,
|
|
23788
|
+
renderCloseIcon: renderImageCloseIcon
|
|
23273
23789
|
},
|
|
23274
23790
|
`${comment.id}:${comment.revision}`
|
|
23275
23791
|
),
|
|
@@ -24190,14 +24706,463 @@ var styles13 = StyleSheet30.create({
|
|
|
24190
24706
|
retry: { color: "#C4B5FF", textDecorationLine: "underline" }
|
|
24191
24707
|
});
|
|
24192
24708
|
|
|
24709
|
+
// src/sections/Streaming.tsx
|
|
24710
|
+
import { useMemo as useMemo34, useRef as useRef30, useState as useState45 } from "react";
|
|
24711
|
+
import {
|
|
24712
|
+
ActivityIndicator as ActivityIndicator5,
|
|
24713
|
+
Alert as Alert4,
|
|
24714
|
+
Pressable as Pressable18,
|
|
24715
|
+
StyleSheet as StyleSheet31,
|
|
24716
|
+
Text as Text24,
|
|
24717
|
+
View as View40
|
|
24718
|
+
} from "react-native";
|
|
24719
|
+
import { jsx as jsx45, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
24720
|
+
var Streaming = (props) => {
|
|
24721
|
+
const preferences = hooks_exports.useAccountPreferences();
|
|
24722
|
+
return /* @__PURE__ */ jsx45(StreamingView, { ...props, preferences });
|
|
24723
|
+
};
|
|
24724
|
+
var StreamingView = ({
|
|
24725
|
+
preferences: flow,
|
|
24726
|
+
onOpenMusic,
|
|
24727
|
+
onSignIn,
|
|
24728
|
+
locale,
|
|
24729
|
+
translate: translate2,
|
|
24730
|
+
renderProviderIcon,
|
|
24731
|
+
showHeader = true,
|
|
24732
|
+
theme: override,
|
|
24733
|
+
style
|
|
24734
|
+
}) => {
|
|
24735
|
+
var _a, _b;
|
|
24736
|
+
const defaultT = useAccountT(locale);
|
|
24737
|
+
const t = translate2 != null ? translate2 : defaultT;
|
|
24738
|
+
const inherited = useTheme();
|
|
24739
|
+
const theme = useMemo34(
|
|
24740
|
+
() => override ? resolveTheme({ ...inherited, ...override }) : inherited,
|
|
24741
|
+
[inherited, override]
|
|
24742
|
+
);
|
|
24743
|
+
const session = hooks_exports.useAuthSession();
|
|
24744
|
+
const assertOwner = hooks_exports.useSessionAction();
|
|
24745
|
+
const pendingBrowser = useRef30({ scope: session.sessionScope, locked: false });
|
|
24746
|
+
const [stored, setStored] = useState45({
|
|
24747
|
+
scope: session.sessionScope,
|
|
24748
|
+
busy: false,
|
|
24749
|
+
error: ""
|
|
24750
|
+
});
|
|
24751
|
+
const local = stored.scope === session.sessionScope ? stored : { scope: session.sessionScope, busy: false, error: "" };
|
|
24752
|
+
const busy = flow.busy || local.busy;
|
|
24753
|
+
const text3 = { color: theme.text, fontFamily: theme.fontFamily };
|
|
24754
|
+
const muted = { color: theme.muted, fontFamily: theme.fontFamily };
|
|
24755
|
+
const connect = async (provider) => {
|
|
24756
|
+
try {
|
|
24757
|
+
assertOwner();
|
|
24758
|
+
} catch (e) {
|
|
24759
|
+
return;
|
|
24760
|
+
}
|
|
24761
|
+
if (pendingBrowser.current.scope === session.sessionScope && pendingBrowser.current.locked)
|
|
24762
|
+
return;
|
|
24763
|
+
pendingBrowser.current = { scope: session.sessionScope, locked: true };
|
|
24764
|
+
setStored({ scope: session.sessionScope, busy: true, error: "" });
|
|
24765
|
+
try {
|
|
24766
|
+
const link = await (provider === "spotify" ? flow.connectSpotify() : flow.connectAppleMusic());
|
|
24767
|
+
assertOwner();
|
|
24768
|
+
if (!link) return;
|
|
24769
|
+
await onOpenMusic(link.url, provider);
|
|
24770
|
+
assertOwner();
|
|
24771
|
+
await flow.query.refetch();
|
|
24772
|
+
assertOwner();
|
|
24773
|
+
} catch (e) {
|
|
24774
|
+
try {
|
|
24775
|
+
assertOwner();
|
|
24776
|
+
setStored({
|
|
24777
|
+
scope: session.sessionScope,
|
|
24778
|
+
busy: false,
|
|
24779
|
+
error: "Unable to open the connection page. Please try again."
|
|
24780
|
+
});
|
|
24781
|
+
} catch (e2) {
|
|
24782
|
+
}
|
|
24783
|
+
} finally {
|
|
24784
|
+
try {
|
|
24785
|
+
assertOwner();
|
|
24786
|
+
if (pendingBrowser.current.scope === session.sessionScope)
|
|
24787
|
+
pendingBrowser.current.locked = false;
|
|
24788
|
+
setStored((state) => ({ ...state, scope: session.sessionScope, busy: false }));
|
|
24789
|
+
} catch (e) {
|
|
24790
|
+
}
|
|
24791
|
+
}
|
|
24792
|
+
};
|
|
24793
|
+
const disconnect = (provider) => {
|
|
24794
|
+
try {
|
|
24795
|
+
assertOwner();
|
|
24796
|
+
} catch (e) {
|
|
24797
|
+
return;
|
|
24798
|
+
}
|
|
24799
|
+
Alert4.alert(
|
|
24800
|
+
t(provider === "spotify" ? "Disconnect Spotify?" : "Disconnect Apple Music?"),
|
|
24801
|
+
t(
|
|
24802
|
+
provider === "spotify" ? "Your imported Spotify data and approved names will be removed. Your saved interests stay." : "Your imported artists and genres will be removed. Your saved interests will stay."
|
|
24803
|
+
),
|
|
24804
|
+
[
|
|
24805
|
+
{ text: t("Cancel"), style: "cancel" },
|
|
24806
|
+
{
|
|
24807
|
+
text: t("Disconnect"),
|
|
24808
|
+
style: "destructive",
|
|
24809
|
+
onPress: () => {
|
|
24810
|
+
try {
|
|
24811
|
+
assertOwner();
|
|
24812
|
+
void (provider === "spotify" ? flow.disconnectSpotify() : flow.disconnectAppleMusic());
|
|
24813
|
+
} catch (e) {
|
|
24814
|
+
}
|
|
24815
|
+
}
|
|
24816
|
+
}
|
|
24817
|
+
]
|
|
24818
|
+
);
|
|
24819
|
+
};
|
|
24820
|
+
const action = (label, provider, onPress, disabled = busy) => /* @__PURE__ */ jsx45(
|
|
24821
|
+
Pressable18,
|
|
24822
|
+
{
|
|
24823
|
+
accessibilityRole: "button",
|
|
24824
|
+
accessibilityLabel: provider ? t("{{action}} {{provider}}", { action: t(label), provider }) : t(label),
|
|
24825
|
+
accessibilityState: { disabled, busy },
|
|
24826
|
+
disabled,
|
|
24827
|
+
onPress,
|
|
24828
|
+
style: [s4.button, { borderColor: theme.accent }, disabled && s4.disabled],
|
|
24829
|
+
children: /* @__PURE__ */ jsx45(Text24, { style: [text3, { color: theme.accent, fontSize: theme.fontSize }], children: t(label) })
|
|
24830
|
+
}
|
|
24831
|
+
);
|
|
24832
|
+
const music = (_a = flow.query.data) == null ? void 0 : _a.music;
|
|
24833
|
+
return /* @__PURE__ */ jsxs42(View40, { style: [s4.container, style], children: [
|
|
24834
|
+
showHeader && /* @__PURE__ */ jsx45(Text24, { style: [s4.title, text3], children: t("Streaming") }),
|
|
24835
|
+
/* @__PURE__ */ jsx45(Text24, { style: [s4.intro, text3], children: t("Choose which artist and genre names to use for event suggestions.") }),
|
|
24836
|
+
flow.query.isPending && /* @__PURE__ */ jsx45(
|
|
24837
|
+
ActivityIndicator5,
|
|
24838
|
+
{
|
|
24839
|
+
accessibilityLabel: t("Loading streaming connections\u2026"),
|
|
24840
|
+
color: theme.accent
|
|
24841
|
+
}
|
|
24842
|
+
),
|
|
24843
|
+
music && [
|
|
24844
|
+
{ key: "spotify", name: "Spotify", connection: music.spotify },
|
|
24845
|
+
{ key: "appleMusic", name: "Apple Music", connection: music.appleMusic },
|
|
24846
|
+
{
|
|
24847
|
+
key: "youtubeMusic",
|
|
24848
|
+
name: "YouTube Music",
|
|
24849
|
+
connection: music.youtubeMusic
|
|
24850
|
+
}
|
|
24851
|
+
].map(({ key: key4, name, connection }) => /* @__PURE__ */ jsxs42(View40, { style: [s4.provider, { borderBottomColor: theme.border }], children: [
|
|
24852
|
+
/* @__PURE__ */ jsxs42(View40, { style: s4.identity, children: [
|
|
24853
|
+
renderProviderIcon == null ? void 0 : renderProviderIcon(key4),
|
|
24854
|
+
/* @__PURE__ */ jsxs42(View40, { style: s4.names, children: [
|
|
24855
|
+
/* @__PURE__ */ jsx45(Text24, { style: [s4.name, text3], children: name }),
|
|
24856
|
+
/* @__PURE__ */ jsx45(Text24, { style: [s4.status, muted], children: connection.connected ? t("Connected") : connection.available ? t("Not connected") : t(connection.reason || "Not available yet") })
|
|
24857
|
+
] })
|
|
24858
|
+
] }),
|
|
24859
|
+
key4 !== "youtubeMusic" && /* @__PURE__ */ jsxs42(View40, { style: s4.actions, children: [
|
|
24860
|
+
connection.available && action(
|
|
24861
|
+
connection.connected ? "Review choices" : "Connect",
|
|
24862
|
+
name,
|
|
24863
|
+
() => void connect(key4)
|
|
24864
|
+
),
|
|
24865
|
+
connection.connected && action("Disconnect", name, () => disconnect(key4))
|
|
24866
|
+
] }),
|
|
24867
|
+
connection.connected && /* @__PURE__ */ jsx45(Text24, { style: [s4.approved, muted], children: connection.artists.length || connection.genres.length ? [...connection.artists, ...connection.genres].join(", ") : t("No artist or genre names approved yet.") })
|
|
24868
|
+
] }, key4)),
|
|
24869
|
+
(local.error || flow.error || flow.query.error) && /* @__PURE__ */ jsx45(Text24, { accessibilityRole: "alert", style: [s4.note, { color: theme.error }], children: t(local.error || flow.error || ((_b = flow.query.error) == null ? void 0 : _b.message) || "") }),
|
|
24870
|
+
flow.message && /* @__PURE__ */ jsx45(Text24, { accessibilityLiveRegion: "polite", style: [s4.note, muted], children: t(flow.message) }),
|
|
24871
|
+
action("Refresh connections", "", () => void flow.query.refetch()),
|
|
24872
|
+
!music && onSignIn && action("Sign in", "", onSignIn),
|
|
24873
|
+
/* @__PURE__ */ jsx45(Text24, { style: [s4.note, muted], children: t(
|
|
24874
|
+
"Only the artist and genre names you approve are used for these event suggestions."
|
|
24875
|
+
) })
|
|
24876
|
+
] });
|
|
24877
|
+
};
|
|
24878
|
+
var s4 = StyleSheet31.create({
|
|
24879
|
+
container: { width: "100%" },
|
|
24880
|
+
title: { fontSize: 20, fontWeight: "500", marginBottom: 16 },
|
|
24881
|
+
intro: { fontSize: 20, lineHeight: 28, marginVertical: 24 },
|
|
24882
|
+
provider: { borderBottomWidth: StyleSheet31.hairlineWidth, paddingVertical: 20, gap: 16 },
|
|
24883
|
+
identity: { flexDirection: "row", alignItems: "center", gap: 16 },
|
|
24884
|
+
names: { flex: 1 },
|
|
24885
|
+
name: { fontSize: 16, lineHeight: 24 },
|
|
24886
|
+
status: { fontSize: 14, lineHeight: 20, marginTop: 4 },
|
|
24887
|
+
actions: {
|
|
24888
|
+
flexDirection: "row",
|
|
24889
|
+
flexWrap: "wrap",
|
|
24890
|
+
justifyContent: "flex-end",
|
|
24891
|
+
gap: 10
|
|
24892
|
+
},
|
|
24893
|
+
button: {
|
|
24894
|
+
alignSelf: "flex-end",
|
|
24895
|
+
borderWidth: 1,
|
|
24896
|
+
borderRadius: 24,
|
|
24897
|
+
paddingVertical: 10,
|
|
24898
|
+
paddingHorizontal: 20,
|
|
24899
|
+
minHeight: 44,
|
|
24900
|
+
justifyContent: "center",
|
|
24901
|
+
marginTop: 4
|
|
24902
|
+
},
|
|
24903
|
+
disabled: { opacity: 0.5 },
|
|
24904
|
+
approved: { fontSize: 14, lineHeight: 20 },
|
|
24905
|
+
note: { fontSize: 14, lineHeight: 20, marginTop: 24 }
|
|
24906
|
+
});
|
|
24907
|
+
|
|
24908
|
+
// src/sections/AccountDeletion.tsx
|
|
24909
|
+
import { useMemo as useMemo35 } from "react";
|
|
24910
|
+
import {
|
|
24911
|
+
ActivityIndicator as ActivityIndicator6,
|
|
24912
|
+
Alert as Alert5,
|
|
24913
|
+
Linking as Linking7,
|
|
24914
|
+
Pressable as Pressable19,
|
|
24915
|
+
StyleSheet as StyleSheet32,
|
|
24916
|
+
Text as Text25,
|
|
24917
|
+
TextInput as TextInput3,
|
|
24918
|
+
View as View41
|
|
24919
|
+
} from "react-native";
|
|
24920
|
+
import { Fragment as Fragment24, jsx as jsx46, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
24921
|
+
var AccountDeletion = (props) => {
|
|
24922
|
+
const deletion = hooks_exports.useAccountDeletion();
|
|
24923
|
+
return /* @__PURE__ */ jsx46(AccountDeletionView, { ...props, deletion });
|
|
24924
|
+
};
|
|
24925
|
+
var AccountDeletionView = ({
|
|
24926
|
+
deletion: flow,
|
|
24927
|
+
showHeader = true,
|
|
24928
|
+
showExplanation = true,
|
|
24929
|
+
onSignIn,
|
|
24930
|
+
onDone,
|
|
24931
|
+
onOpenTeam,
|
|
24932
|
+
locale,
|
|
24933
|
+
translate: translate2,
|
|
24934
|
+
theme: override,
|
|
24935
|
+
style
|
|
24936
|
+
}) => {
|
|
24937
|
+
const defaultT = useAccountT(locale);
|
|
24938
|
+
const t = translate2 != null ? translate2 : defaultT;
|
|
24939
|
+
const inherited = useTheme();
|
|
24940
|
+
const theme = useMemo35(
|
|
24941
|
+
() => override ? resolveTheme({ ...inherited, ...override }) : inherited,
|
|
24942
|
+
[inherited, override]
|
|
24943
|
+
);
|
|
24944
|
+
const assertOwner = hooks_exports.useSessionAction();
|
|
24945
|
+
const text3 = { color: theme.text, fontFamily: theme.fontFamily };
|
|
24946
|
+
const muted = { color: theme.muted, fontFamily: theme.fontFamily };
|
|
24947
|
+
const action = (label, execute, danger = false, disabled = flow.busy) => /* @__PURE__ */ jsx46(
|
|
24948
|
+
Pressable19,
|
|
24949
|
+
{
|
|
24950
|
+
accessibilityRole: "button",
|
|
24951
|
+
accessibilityState: { disabled, busy: flow.busy },
|
|
24952
|
+
disabled,
|
|
24953
|
+
onPress: () => {
|
|
24954
|
+
try {
|
|
24955
|
+
assertOwner();
|
|
24956
|
+
execute();
|
|
24957
|
+
} catch (e) {
|
|
24958
|
+
}
|
|
24959
|
+
},
|
|
24960
|
+
style: [
|
|
24961
|
+
s5.button,
|
|
24962
|
+
{ borderColor: danger ? theme.error : theme.accent },
|
|
24963
|
+
disabled && s5.disabled
|
|
24964
|
+
],
|
|
24965
|
+
children: /* @__PURE__ */ jsx46(Text25, { style: [text3, { color: danger ? theme.error : theme.accent }], children: t(label) })
|
|
24966
|
+
}
|
|
24967
|
+
);
|
|
24968
|
+
const openTeam = async (url2) => {
|
|
24969
|
+
try {
|
|
24970
|
+
assertOwner();
|
|
24971
|
+
await (onOpenTeam ? onOpenTeam(url2) : Linking7.openURL(url2));
|
|
24972
|
+
} catch (e) {
|
|
24973
|
+
try {
|
|
24974
|
+
assertOwner();
|
|
24975
|
+
Alert5.alert(
|
|
24976
|
+
t("Team settings"),
|
|
24977
|
+
t("Unable to open team settings. Please try again.")
|
|
24978
|
+
);
|
|
24979
|
+
} catch (e2) {
|
|
24980
|
+
}
|
|
24981
|
+
}
|
|
24982
|
+
};
|
|
24983
|
+
if (flow.deleted)
|
|
24984
|
+
return /* @__PURE__ */ jsxs43(View41, { style: [s5.container, style], children: [
|
|
24985
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.title, text3], children: t("Account deleted") }),
|
|
24986
|
+
/* @__PURE__ */ jsx46(Text25, { accessibilityLiveRegion: "polite", style: [s5.body, text3], children: t("Your Ticket Fairy account has been closed. You are signed out.") }),
|
|
24987
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.body, muted], children: t("Financial and transaction records are retained where required.") }),
|
|
24988
|
+
onDone && action("Continue browsing", onDone, false, false)
|
|
24989
|
+
] });
|
|
24990
|
+
if (flow.confirmingAccount)
|
|
24991
|
+
return /* @__PURE__ */ jsx46(
|
|
24992
|
+
ActivityIndicator6,
|
|
24993
|
+
{
|
|
24994
|
+
accessibilityLabel: t("Loading account deletion options\u2026"),
|
|
24995
|
+
color: theme.accent
|
|
24996
|
+
}
|
|
24997
|
+
);
|
|
24998
|
+
if (!flow.signedIn)
|
|
24999
|
+
return /* @__PURE__ */ jsxs43(View41, { style: [s5.container, style], children: [
|
|
25000
|
+
flow.error && /* @__PURE__ */ jsxs43(Fragment24, { children: [
|
|
25001
|
+
/* @__PURE__ */ jsx46(Text25, { accessibilityRole: "alert", style: [s5.body, { color: theme.error }], children: t(flow.error) }),
|
|
25002
|
+
action("Try again", () => void flow.retry())
|
|
25003
|
+
] }),
|
|
25004
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.body, text3], children: t("Sign in to review and delete your Ticket Fairy account.") }),
|
|
25005
|
+
onSignIn && action("Sign in", onSignIn, false, false)
|
|
25006
|
+
] });
|
|
25007
|
+
if (flow.query.isPending)
|
|
25008
|
+
return /* @__PURE__ */ jsx46(
|
|
25009
|
+
ActivityIndicator6,
|
|
25010
|
+
{
|
|
25011
|
+
accessibilityLabel: t("Loading account deletion options\u2026"),
|
|
25012
|
+
color: theme.accent
|
|
25013
|
+
}
|
|
25014
|
+
);
|
|
25015
|
+
if (!flow.status)
|
|
25016
|
+
return /* @__PURE__ */ jsxs43(View41, { style: [s5.container, style], children: [
|
|
25017
|
+
/* @__PURE__ */ jsx46(Text25, { accessibilityRole: "alert", style: [s5.body, { color: theme.error }], children: t(flow.error || "Account deletion options could not load.") }),
|
|
25018
|
+
action("Try again", () => void flow.retry(), false, false)
|
|
25019
|
+
] });
|
|
25020
|
+
const status = flow.status;
|
|
25021
|
+
const password = status.verification === "password";
|
|
25022
|
+
return /* @__PURE__ */ jsxs43(View41, { style: [s5.container, style], children: [
|
|
25023
|
+
showHeader && /* @__PURE__ */ jsx46(Text25, { style: [s5.title, text3], children: t("Delete account") }),
|
|
25024
|
+
showExplanation && /* @__PURE__ */ jsxs43(Fragment24, { children: [
|
|
25025
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.body, text3], children: t(
|
|
25026
|
+
"This closes your Ticket Fairy account across the app, website and organiser dashboard."
|
|
25027
|
+
) }),
|
|
25028
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.heading, text3], children: t("What is removed") }),
|
|
25029
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.body, muted], children: t(
|
|
25030
|
+
"Your personal profile, sign-in access, friends, saved preferences and the content you posted are removed or anonymised."
|
|
25031
|
+
) }),
|
|
25032
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.heading, text3], children: t("What is kept") }),
|
|
25033
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.body, muted], children: t(
|
|
25034
|
+
"Financial and transaction records are retained where required. Deleting your account does not refund or cancel orders, and does not delete other ticket holders\u2019 details."
|
|
25035
|
+
) })
|
|
25036
|
+
] }),
|
|
25037
|
+
status.appleLinked && /* @__PURE__ */ jsx46(Text25, { style: [s5.body, muted], children: t(
|
|
25038
|
+
"If Ticket Fairy still appears in your Apple Account after deletion, remove its access there too."
|
|
25039
|
+
) }),
|
|
25040
|
+
status.blockers.length > 0 && /* @__PURE__ */ jsxs43(View41, { style: [s5.panel, { borderColor: theme.border }], children: [
|
|
25041
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.heading, text3], children: t("Before you delete your account") }),
|
|
25042
|
+
status.blockers.map((blocker) => {
|
|
25043
|
+
var _a;
|
|
25044
|
+
return /* @__PURE__ */ jsxs43(View41, { style: s5.container, children: [
|
|
25045
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.body, text3], children: t(blocker.message) }),
|
|
25046
|
+
(_a = blocker.brands) == null ? void 0 : _a.map(
|
|
25047
|
+
(brand2) => brand2.teamUrl ? /* @__PURE__ */ jsx46(
|
|
25048
|
+
Pressable19,
|
|
25049
|
+
{
|
|
25050
|
+
accessibilityRole: "link",
|
|
25051
|
+
disabled: flow.busy,
|
|
25052
|
+
onPress: () => {
|
|
25053
|
+
if (brand2.teamUrl) void openTeam(brand2.teamUrl);
|
|
25054
|
+
},
|
|
25055
|
+
style: s5.link,
|
|
25056
|
+
children: /* @__PURE__ */ jsx46(Text25, { style: { color: theme.accent, fontFamily: theme.fontFamily }, children: t("Open {{name}} team settings", { name: brand2.name }) })
|
|
25057
|
+
},
|
|
25058
|
+
brand2.id
|
|
25059
|
+
) : null
|
|
25060
|
+
)
|
|
25061
|
+
] }, blocker.code);
|
|
25062
|
+
}),
|
|
25063
|
+
action("Check again", () => void flow.retry())
|
|
25064
|
+
] }),
|
|
25065
|
+
!flow.isOpen && status.canDelete && action("Delete account", flow.open, true),
|
|
25066
|
+
flow.isOpen && /* @__PURE__ */ jsxs43(
|
|
25067
|
+
View41,
|
|
25068
|
+
{
|
|
25069
|
+
accessibilityLabel: t("Confirm account deletion"),
|
|
25070
|
+
style: [s5.panel, { borderColor: theme.border }],
|
|
25071
|
+
children: [
|
|
25072
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.heading, text3], children: t("Delete your account permanently?") }),
|
|
25073
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.body, text3], children: t("This cannot be undone. Confirm that you want to close this account.") }),
|
|
25074
|
+
!password && /* @__PURE__ */ jsxs43(Fragment24, { children: [
|
|
25075
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.body, muted], children: t("We will email a deletion code to {{email}}.", {
|
|
25076
|
+
email: status.email
|
|
25077
|
+
}) }),
|
|
25078
|
+
action(
|
|
25079
|
+
flow.codeSent ? "Send a new code" : "Email deletion code",
|
|
25080
|
+
() => void flow.sendCode(locale),
|
|
25081
|
+
false,
|
|
25082
|
+
flow.busy || flow.retryAfter > 0
|
|
25083
|
+
),
|
|
25084
|
+
flow.codeSent && /* @__PURE__ */ jsx46(Text25, { accessibilityLiveRegion: "polite", style: [s5.body, muted], children: t("A code was sent to {{email}}. It expires in {{minutes}} minutes.", {
|
|
25085
|
+
email: flow.codeSent.email,
|
|
25086
|
+
minutes: flow.codeSent.expiresInMinutes
|
|
25087
|
+
}) })
|
|
25088
|
+
] }),
|
|
25089
|
+
flow.retryAfter > 0 && /* @__PURE__ */ jsx46(Text25, { accessibilityLiveRegion: "polite", style: [s5.body, muted], children: t("Try again in {{seconds}} seconds.", { seconds: flow.retryAfter }) }),
|
|
25090
|
+
/* @__PURE__ */ jsx46(Text25, { style: [s5.heading, text3], children: t(password ? "Current password" : "Deletion code") }),
|
|
25091
|
+
/* @__PURE__ */ jsx46(
|
|
25092
|
+
TextInput3,
|
|
25093
|
+
{
|
|
25094
|
+
accessibilityLabel: t(password ? "Current password" : "Deletion code"),
|
|
25095
|
+
value: flow.proof,
|
|
25096
|
+
onChangeText: flow.setProof,
|
|
25097
|
+
secureTextEntry: password,
|
|
25098
|
+
textContentType: password ? "password" : "oneTimeCode",
|
|
25099
|
+
autoComplete: password ? "current-password" : "one-time-code",
|
|
25100
|
+
keyboardType: password ? "default" : "number-pad",
|
|
25101
|
+
maxLength: password ? void 0 : 6,
|
|
25102
|
+
autoCapitalize: "none",
|
|
25103
|
+
autoCorrect: false,
|
|
25104
|
+
editable: !flow.busy,
|
|
25105
|
+
style: [
|
|
25106
|
+
s5.input,
|
|
25107
|
+
text3,
|
|
25108
|
+
{ borderColor: theme.border, backgroundColor: theme.background }
|
|
25109
|
+
]
|
|
25110
|
+
}
|
|
25111
|
+
),
|
|
25112
|
+
flow.error && /* @__PURE__ */ jsx46(Text25, { accessibilityRole: "alert", style: [s5.body, { color: theme.error }], children: t(flow.error) }),
|
|
25113
|
+
flow.busy && /* @__PURE__ */ jsx46(
|
|
25114
|
+
ActivityIndicator6,
|
|
25115
|
+
{
|
|
25116
|
+
color: theme.accent,
|
|
25117
|
+
accessibilityLabel: t("Please wait\u2026")
|
|
25118
|
+
}
|
|
25119
|
+
),
|
|
25120
|
+
action("Keep account", flow.cancel),
|
|
25121
|
+
action(
|
|
25122
|
+
"Permanently delete account",
|
|
25123
|
+
() => void flow.confirm(),
|
|
25124
|
+
true,
|
|
25125
|
+
!flow.canConfirm
|
|
25126
|
+
)
|
|
25127
|
+
]
|
|
25128
|
+
}
|
|
25129
|
+
),
|
|
25130
|
+
!flow.isOpen && flow.error && /* @__PURE__ */ jsx46(Text25, { accessibilityRole: "alert", style: [s5.body, { color: theme.error }], children: t(flow.error) })
|
|
25131
|
+
] });
|
|
25132
|
+
};
|
|
25133
|
+
var s5 = StyleSheet32.create({
|
|
25134
|
+
container: { gap: 12 },
|
|
25135
|
+
title: { fontSize: 22, fontWeight: "600", lineHeight: 28 },
|
|
25136
|
+
heading: { fontSize: 16, fontWeight: "600", lineHeight: 23 },
|
|
25137
|
+
body: { fontSize: 15, lineHeight: 22 },
|
|
25138
|
+
panel: {
|
|
25139
|
+
borderWidth: StyleSheet32.hairlineWidth,
|
|
25140
|
+
borderRadius: 16,
|
|
25141
|
+
padding: 16,
|
|
25142
|
+
gap: 12
|
|
25143
|
+
},
|
|
25144
|
+
button: {
|
|
25145
|
+
minHeight: 48,
|
|
25146
|
+
borderWidth: 1,
|
|
25147
|
+
borderRadius: 12,
|
|
25148
|
+
paddingVertical: 12,
|
|
25149
|
+
paddingHorizontal: 16,
|
|
25150
|
+
alignItems: "center",
|
|
25151
|
+
justifyContent: "center"
|
|
25152
|
+
},
|
|
25153
|
+
input: { minHeight: 48, borderWidth: 1, borderRadius: 10, padding: 12, fontSize: 16 },
|
|
25154
|
+
link: { minHeight: 44, justifyContent: "center" },
|
|
25155
|
+
disabled: { opacity: 0.5 }
|
|
25156
|
+
});
|
|
25157
|
+
|
|
24193
25158
|
// src/auth/AuthModal.tsx
|
|
24194
25159
|
import { useCallback as useCallback14 } from "react";
|
|
24195
|
-
import { Image as Image6, Modal as Modal6, Pressable as
|
|
25160
|
+
import { Image as Image6, Modal as Modal6, Pressable as Pressable24, ScrollView as ScrollView3, StyleSheet as StyleSheet37, Text as Text29, View as View47 } from "react-native";
|
|
24196
25161
|
|
|
24197
25162
|
// src/auth/ForgotPasswordForm.tsx
|
|
24198
|
-
import { useEffect as
|
|
24199
|
-
import { Pressable as
|
|
24200
|
-
import { jsx as
|
|
25163
|
+
import { useEffect as useEffect29, useState as useState46 } from "react";
|
|
25164
|
+
import { Pressable as Pressable20, StyleSheet as StyleSheet33, Text as Text26, View as View42 } from "react-native";
|
|
25165
|
+
import { jsx as jsx47, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
24201
25166
|
var ForgotPasswordForm = ({
|
|
24202
25167
|
initialEmail = "",
|
|
24203
25168
|
errors = {},
|
|
@@ -24209,21 +25174,21 @@ var ForgotPasswordForm = ({
|
|
|
24209
25174
|
onFieldChange
|
|
24210
25175
|
}) => {
|
|
24211
25176
|
const theme = useTheme();
|
|
24212
|
-
const [email, setEmail] =
|
|
24213
|
-
|
|
25177
|
+
const [email, setEmail] = useState46(initialEmail);
|
|
25178
|
+
useEffect29(() => {
|
|
24214
25179
|
if (initialEmail && !email) setEmail(initialEmail);
|
|
24215
25180
|
}, [email, initialEmail]);
|
|
24216
25181
|
const submit = () => void onSubmit(email);
|
|
24217
25182
|
if (successMessage) {
|
|
24218
|
-
return /* @__PURE__ */
|
|
24219
|
-
/* @__PURE__ */
|
|
24220
|
-
/* @__PURE__ */
|
|
25183
|
+
return /* @__PURE__ */ jsxs44(View42, { style: styles14.form, children: [
|
|
25184
|
+
/* @__PURE__ */ jsx47(Text26, { style: [styles14.success, { color: theme.success }], children: successMessage }),
|
|
25185
|
+
/* @__PURE__ */ jsx47(Button, { onPress: () => onBackToLogin(email), children: "Back to log in" })
|
|
24221
25186
|
] });
|
|
24222
25187
|
}
|
|
24223
|
-
return /* @__PURE__ */
|
|
24224
|
-
/* @__PURE__ */
|
|
24225
|
-
error ? /* @__PURE__ */
|
|
24226
|
-
/* @__PURE__ */
|
|
25188
|
+
return /* @__PURE__ */ jsxs44(View42, { style: styles14.form, children: [
|
|
25189
|
+
/* @__PURE__ */ jsx47(MutedText, { children: "Enter your email and we\u2019ll send you instructions to reset your password." }),
|
|
25190
|
+
error ? /* @__PURE__ */ jsx47(ErrorText, { children: error }) : null,
|
|
25191
|
+
/* @__PURE__ */ jsx47(Field, { label: "Email", required: true, error: errors.email, children: /* @__PURE__ */ jsx47(
|
|
24227
25192
|
Input,
|
|
24228
25193
|
{
|
|
24229
25194
|
value: email,
|
|
@@ -24237,20 +25202,20 @@ var ForgotPasswordForm = ({
|
|
|
24237
25202
|
invalid: Boolean(errors.email)
|
|
24238
25203
|
}
|
|
24239
25204
|
) }),
|
|
24240
|
-
/* @__PURE__ */
|
|
24241
|
-
/* @__PURE__ */
|
|
24242
|
-
|
|
25205
|
+
/* @__PURE__ */ jsx47(Button, { onPress: submit, loading, children: "Send reset instructions" }),
|
|
25206
|
+
/* @__PURE__ */ jsx47(
|
|
25207
|
+
Pressable20,
|
|
24243
25208
|
{
|
|
24244
25209
|
accessibilityRole: "button",
|
|
24245
25210
|
onPress: () => onBackToLogin(email),
|
|
24246
25211
|
hitSlop: 8,
|
|
24247
25212
|
style: styles14.link,
|
|
24248
|
-
children: /* @__PURE__ */
|
|
25213
|
+
children: /* @__PURE__ */ jsx47(Text26, { style: [styles14.linkText, { color: theme.accent }], children: "Back to log in" })
|
|
24249
25214
|
}
|
|
24250
25215
|
)
|
|
24251
25216
|
] });
|
|
24252
25217
|
};
|
|
24253
|
-
var styles14 =
|
|
25218
|
+
var styles14 = StyleSheet33.create({
|
|
24254
25219
|
form: { gap: 14 },
|
|
24255
25220
|
success: { fontSize: 15, fontWeight: "600" },
|
|
24256
25221
|
link: { alignItems: "center", paddingVertical: 4 },
|
|
@@ -24258,19 +25223,19 @@ var styles14 = StyleSheet31.create({
|
|
|
24258
25223
|
});
|
|
24259
25224
|
|
|
24260
25225
|
// src/auth/LoginForm.tsx
|
|
24261
|
-
import { useEffect as
|
|
24262
|
-
import { Pressable as
|
|
25226
|
+
import { useEffect as useEffect30, useState as useState48 } from "react";
|
|
25227
|
+
import { Pressable as Pressable22, StyleSheet as StyleSheet35, Text as Text28, View as View44 } from "react-native";
|
|
24263
25228
|
|
|
24264
25229
|
// src/auth/PasswordInput.tsx
|
|
24265
|
-
import { useState as
|
|
24266
|
-
import { Pressable as
|
|
24267
|
-
import { jsx as
|
|
25230
|
+
import { useState as useState47 } from "react";
|
|
25231
|
+
import { Pressable as Pressable21, StyleSheet as StyleSheet34, Text as Text27, View as View43 } from "react-native";
|
|
25232
|
+
import { jsx as jsx48, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
24268
25233
|
var PasswordInput = (props) => {
|
|
24269
|
-
const [visible, setVisible] =
|
|
24270
|
-
return /* @__PURE__ */
|
|
24271
|
-
/* @__PURE__ */
|
|
24272
|
-
/* @__PURE__ */
|
|
24273
|
-
|
|
25234
|
+
const [visible, setVisible] = useState47(false);
|
|
25235
|
+
return /* @__PURE__ */ jsxs45(View43, { style: styles15.wrap, children: [
|
|
25236
|
+
/* @__PURE__ */ jsx48(Input, { ...props, autoCapitalize: "none", secureTextEntry: !visible }),
|
|
25237
|
+
/* @__PURE__ */ jsx48(
|
|
25238
|
+
Pressable21,
|
|
24274
25239
|
{
|
|
24275
25240
|
accessibilityRole: "button",
|
|
24276
25241
|
accessibilityLabel: visible ? "Hide password" : "Show password",
|
|
@@ -24278,12 +25243,12 @@ var PasswordInput = (props) => {
|
|
|
24278
25243
|
onPress: () => setVisible((current4) => !current4),
|
|
24279
25244
|
hitSlop: 10,
|
|
24280
25245
|
style: styles15.toggle,
|
|
24281
|
-
children: /* @__PURE__ */
|
|
25246
|
+
children: /* @__PURE__ */ jsx48(Text27, { style: styles15.icon, children: visible ? "\u{1F648}" : "\u{1F441}" })
|
|
24282
25247
|
}
|
|
24283
25248
|
)
|
|
24284
25249
|
] });
|
|
24285
25250
|
};
|
|
24286
|
-
var styles15 =
|
|
25251
|
+
var styles15 = StyleSheet34.create({
|
|
24287
25252
|
wrap: { position: "relative", justifyContent: "center" },
|
|
24288
25253
|
toggle: {
|
|
24289
25254
|
position: "absolute",
|
|
@@ -24296,7 +25261,7 @@ var styles15 = StyleSheet32.create({
|
|
|
24296
25261
|
});
|
|
24297
25262
|
|
|
24298
25263
|
// src/auth/LoginForm.tsx
|
|
24299
|
-
import { jsx as
|
|
25264
|
+
import { jsx as jsx49, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
24300
25265
|
var LoginForm = ({
|
|
24301
25266
|
initialEmail = "",
|
|
24302
25267
|
errors = {},
|
|
@@ -24308,15 +25273,15 @@ var LoginForm = ({
|
|
|
24308
25273
|
onFieldChange
|
|
24309
25274
|
}) => {
|
|
24310
25275
|
const theme = useTheme();
|
|
24311
|
-
const [email, setEmail] =
|
|
24312
|
-
const [password, setPassword] =
|
|
24313
|
-
|
|
25276
|
+
const [email, setEmail] = useState48(initialEmail);
|
|
25277
|
+
const [password, setPassword] = useState48("");
|
|
25278
|
+
useEffect30(() => {
|
|
24314
25279
|
if (initialEmail && !email) setEmail(initialEmail);
|
|
24315
25280
|
}, [email, initialEmail]);
|
|
24316
25281
|
const submit = () => void onSubmit({ email, password });
|
|
24317
|
-
return /* @__PURE__ */
|
|
24318
|
-
error ? /* @__PURE__ */
|
|
24319
|
-
/* @__PURE__ */
|
|
25282
|
+
return /* @__PURE__ */ jsxs46(View44, { style: styles16.form, children: [
|
|
25283
|
+
error ? /* @__PURE__ */ jsx49(ErrorText, { children: error }) : null,
|
|
25284
|
+
/* @__PURE__ */ jsx49(Field, { label: "Email", required: true, error: errors.email, children: /* @__PURE__ */ jsx49(
|
|
24320
25285
|
Input,
|
|
24321
25286
|
{
|
|
24322
25287
|
value: email,
|
|
@@ -24330,7 +25295,7 @@ var LoginForm = ({
|
|
|
24330
25295
|
invalid: Boolean(errors.email)
|
|
24331
25296
|
}
|
|
24332
25297
|
) }),
|
|
24333
|
-
/* @__PURE__ */
|
|
25298
|
+
/* @__PURE__ */ jsx49(Field, { label: "Password", required: true, error: errors.password, children: /* @__PURE__ */ jsx49(
|
|
24334
25299
|
PasswordInput,
|
|
24335
25300
|
{
|
|
24336
25301
|
value: password,
|
|
@@ -24342,29 +25307,29 @@ var LoginForm = ({
|
|
|
24342
25307
|
invalid: Boolean(errors.password)
|
|
24343
25308
|
}
|
|
24344
25309
|
) }),
|
|
24345
|
-
/* @__PURE__ */
|
|
24346
|
-
allowPasswordReset && onForgotPassword ? /* @__PURE__ */
|
|
24347
|
-
|
|
25310
|
+
/* @__PURE__ */ jsx49(Button, { onPress: submit, loading, children: "Login" }),
|
|
25311
|
+
allowPasswordReset && onForgotPassword ? /* @__PURE__ */ jsx49(
|
|
25312
|
+
Pressable22,
|
|
24348
25313
|
{
|
|
24349
25314
|
accessibilityRole: "button",
|
|
24350
25315
|
onPress: () => onForgotPassword(email),
|
|
24351
25316
|
hitSlop: 8,
|
|
24352
25317
|
style: styles16.link,
|
|
24353
|
-
children: /* @__PURE__ */
|
|
25318
|
+
children: /* @__PURE__ */ jsx49(Text28, { style: [styles16.linkText, { color: theme.accent }], children: "Forgot password?" })
|
|
24354
25319
|
}
|
|
24355
25320
|
) : null
|
|
24356
25321
|
] });
|
|
24357
25322
|
};
|
|
24358
|
-
var styles16 =
|
|
25323
|
+
var styles16 = StyleSheet35.create({
|
|
24359
25324
|
form: { gap: 14 },
|
|
24360
25325
|
link: { alignItems: "center", paddingVertical: 4 },
|
|
24361
25326
|
linkText: { fontSize: 14, fontWeight: "600" }
|
|
24362
25327
|
});
|
|
24363
25328
|
|
|
24364
25329
|
// src/auth/RegisterForm.tsx
|
|
24365
|
-
import { useEffect as
|
|
24366
|
-
import { Linking as
|
|
24367
|
-
import { Fragment as
|
|
25330
|
+
import { useEffect as useEffect31, useMemo as useMemo36, useState as useState49 } from "react";
|
|
25331
|
+
import { Linking as Linking8, Pressable as Pressable23, StyleSheet as StyleSheet36, View as View45 } from "react-native";
|
|
25332
|
+
import { Fragment as Fragment25, jsx as jsx50, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
24368
25333
|
var emptyRegistration = (email) => ({
|
|
24369
25334
|
firstName: "",
|
|
24370
25335
|
lastName: "",
|
|
@@ -24391,30 +25356,30 @@ var RegisterForm = ({
|
|
|
24391
25356
|
onFieldChange
|
|
24392
25357
|
}) => {
|
|
24393
25358
|
var _a, _b, _c, _d, _e, _f;
|
|
24394
|
-
const t =
|
|
24395
|
-
const [values2, setValues] =
|
|
25359
|
+
const t = useMemo36(() => createTranslator({ locale }), [locale]);
|
|
25360
|
+
const [values2, setValues] = useState49(
|
|
24396
25361
|
() => emptyRegistration(initialEmail)
|
|
24397
25362
|
);
|
|
24398
|
-
const [termsAccepted, setTermsAccepted] =
|
|
24399
|
-
const [refreshingProof, setRefreshingProof] =
|
|
24400
|
-
const [refreshCode, setRefreshCode] =
|
|
25363
|
+
const [termsAccepted, setTermsAccepted] = useState49(false);
|
|
25364
|
+
const [refreshingProof, setRefreshingProof] = useState49(false);
|
|
25365
|
+
const [refreshCode, setRefreshCode] = useState49("");
|
|
24401
25366
|
const countriesQuery = hooks_exports.useCountries();
|
|
24402
|
-
const countries =
|
|
25367
|
+
const countries = useMemo36(() => {
|
|
24403
25368
|
var _a2;
|
|
24404
25369
|
return (_a2 = countriesQuery.data) != null ? _a2 : [];
|
|
24405
25370
|
}, [countriesQuery.data]);
|
|
24406
25371
|
const statesQuery = hooks_exports.useStates(values2.countryId, {
|
|
24407
25372
|
enabled: requireAddress && Boolean(values2.countryId)
|
|
24408
25373
|
});
|
|
24409
|
-
const states =
|
|
25374
|
+
const states = useMemo36(() => {
|
|
24410
25375
|
var _a2;
|
|
24411
25376
|
return (_a2 = statesQuery.data) != null ? _a2 : [];
|
|
24412
25377
|
}, [statesQuery.data]);
|
|
24413
|
-
|
|
25378
|
+
useEffect31(() => {
|
|
24414
25379
|
if (initialEmail && !values2.email)
|
|
24415
25380
|
setValues((current4) => ({ ...current4, email: initialEmail }));
|
|
24416
25381
|
}, [initialEmail, values2.email]);
|
|
24417
|
-
|
|
25382
|
+
useEffect31(() => {
|
|
24418
25383
|
var _a2;
|
|
24419
25384
|
if (!requireAddress || values2.countryId || countries.length === 0) return;
|
|
24420
25385
|
const preferred = (_a2 = countries.find((country) => {
|
|
@@ -24435,19 +25400,19 @@ var RegisterForm = ({
|
|
|
24435
25400
|
setValues((current4) => ({ ...current4, [field]: value6 }));
|
|
24436
25401
|
onFieldChange == null ? void 0 : onFieldChange(field);
|
|
24437
25402
|
};
|
|
24438
|
-
const countryOptions =
|
|
25403
|
+
const countryOptions = useMemo36(
|
|
24439
25404
|
() => countries.map((country) => ({ label: country.name, value: String(country.id) })),
|
|
24440
25405
|
[countries]
|
|
24441
25406
|
);
|
|
24442
|
-
const stateOptions =
|
|
25407
|
+
const stateOptions = useMemo36(
|
|
24443
25408
|
() => states.map((state) => ({ label: state.name, value: String(state.id) })),
|
|
24444
25409
|
[states]
|
|
24445
25410
|
);
|
|
24446
25411
|
const submit = () => void onSubmit(values2, { requireState: states.length > 0, termsAccepted });
|
|
24447
|
-
return /* @__PURE__ */
|
|
24448
|
-
error ? /* @__PURE__ */
|
|
24449
|
-
/* @__PURE__ */
|
|
24450
|
-
/* @__PURE__ */
|
|
25412
|
+
return /* @__PURE__ */ jsxs47(View45, { style: styles17.form, children: [
|
|
25413
|
+
error ? /* @__PURE__ */ jsx50(ErrorText, { children: error }) : null,
|
|
25414
|
+
/* @__PURE__ */ jsxs47(View45, { style: styles17.row, children: [
|
|
25415
|
+
/* @__PURE__ */ jsx50(View45, { style: styles17.flex, children: /* @__PURE__ */ jsx50(Field, { label: "First name", required: true, error: errors.firstName, children: /* @__PURE__ */ jsx50(
|
|
24451
25416
|
Input,
|
|
24452
25417
|
{
|
|
24453
25418
|
value: values2.firstName,
|
|
@@ -24457,7 +25422,7 @@ var RegisterForm = ({
|
|
|
24457
25422
|
invalid: Boolean(errors.firstName)
|
|
24458
25423
|
}
|
|
24459
25424
|
) }) }),
|
|
24460
|
-
/* @__PURE__ */
|
|
25425
|
+
/* @__PURE__ */ jsx50(View45, { style: styles17.flex, children: /* @__PURE__ */ jsx50(Field, { label: "Last name", required: true, error: errors.lastName, children: /* @__PURE__ */ jsx50(
|
|
24461
25426
|
Input,
|
|
24462
25427
|
{
|
|
24463
25428
|
value: values2.lastName,
|
|
@@ -24468,7 +25433,7 @@ var RegisterForm = ({
|
|
|
24468
25433
|
}
|
|
24469
25434
|
) }) })
|
|
24470
25435
|
] }),
|
|
24471
|
-
/* @__PURE__ */
|
|
25436
|
+
/* @__PURE__ */ jsx50(Field, { label: "Email", required: true, error: errors.email, children: /* @__PURE__ */ jsx50(
|
|
24472
25437
|
Input,
|
|
24473
25438
|
{
|
|
24474
25439
|
value: values2.email,
|
|
@@ -24480,8 +25445,8 @@ var RegisterForm = ({
|
|
|
24480
25445
|
invalid: Boolean(errors.email)
|
|
24481
25446
|
}
|
|
24482
25447
|
) }),
|
|
24483
|
-
requireAddress ? /* @__PURE__ */
|
|
24484
|
-
/* @__PURE__ */
|
|
25448
|
+
requireAddress ? /* @__PURE__ */ jsxs47(Fragment25, { children: [
|
|
25449
|
+
/* @__PURE__ */ jsx50(Field, { label: "Street address", required: true, error: errors.streetAddress, children: /* @__PURE__ */ jsx50(
|
|
24485
25450
|
Input,
|
|
24486
25451
|
{
|
|
24487
25452
|
value: (_a = values2.streetAddress) != null ? _a : "",
|
|
@@ -24490,7 +25455,7 @@ var RegisterForm = ({
|
|
|
24490
25455
|
invalid: Boolean(errors.streetAddress)
|
|
24491
25456
|
}
|
|
24492
25457
|
) }),
|
|
24493
|
-
/* @__PURE__ */
|
|
25458
|
+
/* @__PURE__ */ jsx50(Field, { label: "ZIP / postcode", required: true, error: errors.zip, children: /* @__PURE__ */ jsx50(
|
|
24494
25459
|
Input,
|
|
24495
25460
|
{
|
|
24496
25461
|
value: (_b = values2.zip) != null ? _b : "",
|
|
@@ -24499,7 +25464,7 @@ var RegisterForm = ({
|
|
|
24499
25464
|
invalid: Boolean(errors.zip)
|
|
24500
25465
|
}
|
|
24501
25466
|
) }),
|
|
24502
|
-
/* @__PURE__ */
|
|
25467
|
+
/* @__PURE__ */ jsx50(Field, { label: "Country", required: true, error: errors.countryId, children: /* @__PURE__ */ jsx50(
|
|
24503
25468
|
Select,
|
|
24504
25469
|
{
|
|
24505
25470
|
value: (_c = values2.countryId) != null ? _c : "",
|
|
@@ -24513,13 +25478,13 @@ var RegisterForm = ({
|
|
|
24513
25478
|
}
|
|
24514
25479
|
}
|
|
24515
25480
|
) }),
|
|
24516
|
-
/* @__PURE__ */
|
|
25481
|
+
/* @__PURE__ */ jsx50(
|
|
24517
25482
|
Field,
|
|
24518
25483
|
{
|
|
24519
25484
|
label: "State / Province",
|
|
24520
25485
|
required: states.length > 0,
|
|
24521
25486
|
error: errors.stateId,
|
|
24522
|
-
children: /* @__PURE__ */
|
|
25487
|
+
children: /* @__PURE__ */ jsx50(
|
|
24523
25488
|
Select,
|
|
24524
25489
|
{
|
|
24525
25490
|
value: (_d = values2.stateId) != null ? _d : "",
|
|
@@ -24532,7 +25497,7 @@ var RegisterForm = ({
|
|
|
24532
25497
|
)
|
|
24533
25498
|
}
|
|
24534
25499
|
),
|
|
24535
|
-
/* @__PURE__ */
|
|
25500
|
+
/* @__PURE__ */ jsx50(Field, { label: "City", required: true, error: errors.city, children: /* @__PURE__ */ jsx50(
|
|
24536
25501
|
Input,
|
|
24537
25502
|
{
|
|
24538
25503
|
value: (_e = values2.city) != null ? _e : "",
|
|
@@ -24542,7 +25507,7 @@ var RegisterForm = ({
|
|
|
24542
25507
|
}
|
|
24543
25508
|
) })
|
|
24544
25509
|
] }) : null,
|
|
24545
|
-
/* @__PURE__ */
|
|
25510
|
+
/* @__PURE__ */ jsx50(Field, { label: "Phone", children: /* @__PURE__ */ jsx50(
|
|
24546
25511
|
Input,
|
|
24547
25512
|
{
|
|
24548
25513
|
value: (_f = values2.phone) != null ? _f : "",
|
|
@@ -24552,7 +25517,7 @@ var RegisterForm = ({
|
|
|
24552
25517
|
autoCapitalize: "none"
|
|
24553
25518
|
}
|
|
24554
25519
|
) }),
|
|
24555
|
-
/* @__PURE__ */
|
|
25520
|
+
/* @__PURE__ */ jsx50(Field, { label: "Password", required: true, error: errors.password, children: /* @__PURE__ */ jsx50(
|
|
24556
25521
|
PasswordInput,
|
|
24557
25522
|
{
|
|
24558
25523
|
value: values2.password,
|
|
@@ -24561,7 +25526,7 @@ var RegisterForm = ({
|
|
|
24561
25526
|
invalid: Boolean(errors.password)
|
|
24562
25527
|
}
|
|
24563
25528
|
) }),
|
|
24564
|
-
/* @__PURE__ */
|
|
25529
|
+
/* @__PURE__ */ jsx50(Field, { label: "Confirm password", required: true, error: errors.passwordConfirmation, children: /* @__PURE__ */ jsx50(
|
|
24565
25530
|
PasswordInput,
|
|
24566
25531
|
{
|
|
24567
25532
|
value: values2.passwordConfirmation,
|
|
@@ -24570,8 +25535,8 @@ var RegisterForm = ({
|
|
|
24570
25535
|
invalid: Boolean(errors.passwordConfirmation)
|
|
24571
25536
|
}
|
|
24572
25537
|
) }),
|
|
24573
|
-
completionRefresh ? /* @__PURE__ */
|
|
24574
|
-
/* @__PURE__ */
|
|
25538
|
+
completionRefresh ? /* @__PURE__ */ jsxs47(View45, { style: { gap: 12 }, children: [
|
|
25539
|
+
/* @__PURE__ */ jsxs47(
|
|
24575
25540
|
Button,
|
|
24576
25541
|
{
|
|
24577
25542
|
disabled: loading || completionRefresh.retryAfter > 0,
|
|
@@ -24585,8 +25550,8 @@ var RegisterForm = ({
|
|
|
24585
25550
|
]
|
|
24586
25551
|
}
|
|
24587
25552
|
),
|
|
24588
|
-
refreshingProof ? /* @__PURE__ */
|
|
24589
|
-
/* @__PURE__ */
|
|
25553
|
+
refreshingProof ? /* @__PURE__ */ jsxs47(Fragment25, { children: [
|
|
25554
|
+
/* @__PURE__ */ jsx50(Field, { label: t("auth.completionNewCode"), children: /* @__PURE__ */ jsx50(
|
|
24590
25555
|
Input,
|
|
24591
25556
|
{
|
|
24592
25557
|
value: refreshCode,
|
|
@@ -24596,7 +25561,7 @@ var RegisterForm = ({
|
|
|
24596
25561
|
onChangeText: (value6) => setRefreshCode(value6.replace(/\D/g, "").slice(0, 6))
|
|
24597
25562
|
}
|
|
24598
25563
|
) }),
|
|
24599
|
-
/* @__PURE__ */
|
|
25564
|
+
/* @__PURE__ */ jsx50(
|
|
24600
25565
|
Button,
|
|
24601
25566
|
{
|
|
24602
25567
|
disabled: loading || !/^\d{6}$/.test(refreshCode),
|
|
@@ -24606,38 +25571,38 @@ var RegisterForm = ({
|
|
|
24606
25571
|
)
|
|
24607
25572
|
] }) : null
|
|
24608
25573
|
] }) : null,
|
|
24609
|
-
requireTerms ? /* @__PURE__ */
|
|
24610
|
-
/* @__PURE__ */
|
|
24611
|
-
|
|
25574
|
+
requireTerms ? /* @__PURE__ */ jsxs47(View45, { style: { gap: 8 }, children: [
|
|
25575
|
+
/* @__PURE__ */ jsx50(
|
|
25576
|
+
Pressable23,
|
|
24612
25577
|
{
|
|
24613
25578
|
accessibilityRole: "checkbox",
|
|
24614
25579
|
accessibilityState: { checked: termsAccepted },
|
|
24615
25580
|
onPress: () => setTermsAccepted((current4) => !current4),
|
|
24616
|
-
children: /* @__PURE__ */
|
|
25581
|
+
children: /* @__PURE__ */ jsxs47(MutedText, { children: [
|
|
24617
25582
|
termsAccepted ? "\u2611" : "\u2610",
|
|
24618
25583
|
" ",
|
|
24619
25584
|
t("auth.completionAgree")
|
|
24620
25585
|
] })
|
|
24621
25586
|
}
|
|
24622
25587
|
),
|
|
24623
|
-
/* @__PURE__ */
|
|
24624
|
-
|
|
25588
|
+
/* @__PURE__ */ jsx50(
|
|
25589
|
+
Pressable23,
|
|
24625
25590
|
{
|
|
24626
25591
|
accessibilityRole: "link",
|
|
24627
|
-
onPress: () => void
|
|
24628
|
-
children: /* @__PURE__ */
|
|
25592
|
+
onPress: () => void Linking8.openURL("https://www.ticketfairy.com/terms-of-service"),
|
|
25593
|
+
children: /* @__PURE__ */ jsx50(MutedText, { children: t("auth.completionTerms") })
|
|
24629
25594
|
}
|
|
24630
25595
|
),
|
|
24631
|
-
/* @__PURE__ */
|
|
24632
|
-
|
|
25596
|
+
/* @__PURE__ */ jsx50(
|
|
25597
|
+
Pressable23,
|
|
24633
25598
|
{
|
|
24634
25599
|
accessibilityRole: "link",
|
|
24635
|
-
onPress: () => void
|
|
24636
|
-
children: /* @__PURE__ */
|
|
25600
|
+
onPress: () => void Linking8.openURL("https://www.ticketfairy.com/privacy"),
|
|
25601
|
+
children: /* @__PURE__ */ jsx50(MutedText, { children: t("auth.completionPrivacy") })
|
|
24637
25602
|
}
|
|
24638
25603
|
)
|
|
24639
25604
|
] }) : null,
|
|
24640
|
-
/* @__PURE__ */
|
|
25605
|
+
/* @__PURE__ */ jsx50(
|
|
24641
25606
|
Button,
|
|
24642
25607
|
{
|
|
24643
25608
|
onPress: submit,
|
|
@@ -24648,16 +25613,16 @@ var RegisterForm = ({
|
|
|
24648
25613
|
)
|
|
24649
25614
|
] });
|
|
24650
25615
|
};
|
|
24651
|
-
var styles17 =
|
|
25616
|
+
var styles17 = StyleSheet36.create({
|
|
24652
25617
|
form: { gap: 14 },
|
|
24653
25618
|
row: { flexDirection: "row", gap: 10 },
|
|
24654
25619
|
flex: { flex: 1 }
|
|
24655
25620
|
});
|
|
24656
25621
|
|
|
24657
25622
|
// src/auth/EmailCodeForm.tsx
|
|
24658
|
-
import { useState as
|
|
24659
|
-
import { View as
|
|
24660
|
-
import { Fragment as
|
|
25623
|
+
import { useState as useState50 } from "react";
|
|
25624
|
+
import { View as View46 } from "react-native";
|
|
25625
|
+
import { Fragment as Fragment26, jsx as jsx51, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
24661
25626
|
var EmailCodeForm = ({
|
|
24662
25627
|
initialEmail,
|
|
24663
25628
|
sent,
|
|
@@ -24670,13 +25635,13 @@ var EmailCodeForm = ({
|
|
|
24670
25635
|
onVerify,
|
|
24671
25636
|
onBack
|
|
24672
25637
|
}) => {
|
|
24673
|
-
const [email, setEmail] =
|
|
24674
|
-
const [code, setCode] =
|
|
24675
|
-
return /* @__PURE__ */
|
|
24676
|
-
/* @__PURE__ */
|
|
24677
|
-
error ? /* @__PURE__ */
|
|
24678
|
-
successMessage ? /* @__PURE__ */
|
|
24679
|
-
/* @__PURE__ */
|
|
25638
|
+
const [email, setEmail] = useState50(initialEmail);
|
|
25639
|
+
const [code, setCode] = useState50("");
|
|
25640
|
+
return /* @__PURE__ */ jsxs48(View46, { style: { gap: 14 }, children: [
|
|
25641
|
+
/* @__PURE__ */ jsx51(MutedText, { children: sent ? `Enter the sign-in code sent to ${target}.` : "Receive a one-time sign-in code by email." }),
|
|
25642
|
+
error ? /* @__PURE__ */ jsx51(ErrorText, { children: error }) : null,
|
|
25643
|
+
successMessage ? /* @__PURE__ */ jsx51(MutedText, { children: successMessage }) : null,
|
|
25644
|
+
/* @__PURE__ */ jsx51(Field, { label: "Email", required: true, children: /* @__PURE__ */ jsx51(
|
|
24680
25645
|
Input,
|
|
24681
25646
|
{
|
|
24682
25647
|
value: email,
|
|
@@ -24687,8 +25652,8 @@ var EmailCodeForm = ({
|
|
|
24687
25652
|
accessibilityLabel: "Email"
|
|
24688
25653
|
}
|
|
24689
25654
|
) }),
|
|
24690
|
-
sent ? /* @__PURE__ */
|
|
24691
|
-
/* @__PURE__ */
|
|
25655
|
+
sent ? /* @__PURE__ */ jsxs48(Fragment26, { children: [
|
|
25656
|
+
/* @__PURE__ */ jsx51(Field, { label: "Sign-in code", required: true, children: /* @__PURE__ */ jsx51(
|
|
24692
25657
|
Input,
|
|
24693
25658
|
{
|
|
24694
25659
|
value: code,
|
|
@@ -24702,7 +25667,7 @@ var EmailCodeForm = ({
|
|
|
24702
25667
|
editable: !loading
|
|
24703
25668
|
}
|
|
24704
25669
|
) }),
|
|
24705
|
-
/* @__PURE__ */
|
|
25670
|
+
/* @__PURE__ */ jsx51(
|
|
24706
25671
|
Button,
|
|
24707
25672
|
{
|
|
24708
25673
|
loading,
|
|
@@ -24712,7 +25677,7 @@ var EmailCodeForm = ({
|
|
|
24712
25677
|
}
|
|
24713
25678
|
)
|
|
24714
25679
|
] }) : null,
|
|
24715
|
-
/* @__PURE__ */
|
|
25680
|
+
/* @__PURE__ */ jsx51(
|
|
24716
25681
|
Button,
|
|
24717
25682
|
{
|
|
24718
25683
|
loading: !sent && loading,
|
|
@@ -24722,26 +25687,26 @@ var EmailCodeForm = ({
|
|
|
24722
25687
|
children: retryAfter > 0 ? `Send another code in ${retryAfter}s` : sent ? "Resend code" : "Send sign-in code"
|
|
24723
25688
|
}
|
|
24724
25689
|
),
|
|
24725
|
-
/* @__PURE__ */
|
|
25690
|
+
/* @__PURE__ */ jsx51(Button, { variant: "ghost", disabled: loading, onPress: onBack, children: "Use password instead" })
|
|
24726
25691
|
] });
|
|
24727
25692
|
};
|
|
24728
25693
|
|
|
24729
25694
|
// src/auth/AuthModal.tsx
|
|
24730
|
-
import { jsx as
|
|
25695
|
+
import { jsx as jsx52, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
24731
25696
|
var Tab = ({
|
|
24732
25697
|
label,
|
|
24733
25698
|
active: active2,
|
|
24734
25699
|
onPress
|
|
24735
25700
|
}) => {
|
|
24736
25701
|
const theme = useTheme();
|
|
24737
|
-
return /* @__PURE__ */
|
|
24738
|
-
|
|
25702
|
+
return /* @__PURE__ */ jsx52(
|
|
25703
|
+
Pressable24,
|
|
24739
25704
|
{
|
|
24740
25705
|
accessibilityRole: "tab",
|
|
24741
25706
|
accessibilityState: { selected: active2 },
|
|
24742
25707
|
onPress,
|
|
24743
25708
|
style: [styles18.tab, { borderBottomColor: active2 ? theme.accent : "transparent" }],
|
|
24744
|
-
children: /* @__PURE__ */
|
|
25709
|
+
children: /* @__PURE__ */ jsx52(Text29, { style: [styles18.tabText, { color: active2 ? theme.text : theme.muted }], children: label })
|
|
24745
25710
|
}
|
|
24746
25711
|
);
|
|
24747
25712
|
};
|
|
@@ -24783,34 +25748,34 @@ var AuthModal = ({
|
|
|
24783
25748
|
if (auth.twoFactorChallenge) await auth.cancelTwoFactor();
|
|
24784
25749
|
onClose();
|
|
24785
25750
|
};
|
|
24786
|
-
return /* @__PURE__ */
|
|
24787
|
-
|
|
25751
|
+
return /* @__PURE__ */ jsx52(Modal6, { visible: open, animationType: "slide", transparent: true, onRequestClose: requestClose, children: /* @__PURE__ */ jsx52(Pressable24, { style: styles18.backdrop, onPress: requestClose, children: /* @__PURE__ */ jsxs49(
|
|
25752
|
+
Pressable24,
|
|
24788
25753
|
{
|
|
24789
25754
|
style: [styles18.sheet, { backgroundColor: theme.surface }],
|
|
24790
25755
|
onPress: () => {
|
|
24791
25756
|
},
|
|
24792
25757
|
children: [
|
|
24793
|
-
/* @__PURE__ */
|
|
24794
|
-
/* @__PURE__ */
|
|
24795
|
-
/* @__PURE__ */
|
|
24796
|
-
|
|
25758
|
+
/* @__PURE__ */ jsxs49(View47, { style: styles18.header, children: [
|
|
25759
|
+
/* @__PURE__ */ jsx52(Text29, { style: [styles18.title, { color: theme.text }], children: isPasswordReset ? "Password reset" : auth.view === "two-factor" ? "Verify your sign in" : "Ticket Fairy account" }),
|
|
25760
|
+
/* @__PURE__ */ jsx52(
|
|
25761
|
+
Pressable24,
|
|
24797
25762
|
{
|
|
24798
25763
|
accessibilityRole: "button",
|
|
24799
25764
|
accessibilityLabel: "Close",
|
|
24800
25765
|
disabled: auth.isSubmitting,
|
|
24801
25766
|
onPress: () => void requestClose(),
|
|
24802
25767
|
hitSlop: 12,
|
|
24803
|
-
children: /* @__PURE__ */
|
|
25768
|
+
children: /* @__PURE__ */ jsx52(Text29, { style: [styles18.close, { color: theme.muted }], children: "\u2715" })
|
|
24804
25769
|
}
|
|
24805
25770
|
)
|
|
24806
25771
|
] }),
|
|
24807
|
-
/* @__PURE__ */
|
|
25772
|
+
/* @__PURE__ */ jsxs49(
|
|
24808
25773
|
ScrollView3,
|
|
24809
25774
|
{
|
|
24810
25775
|
contentContainerStyle: styles18.body,
|
|
24811
25776
|
keyboardShouldPersistTaps: "handled",
|
|
24812
25777
|
children: [
|
|
24813
|
-
logoUrl ? /* @__PURE__ */
|
|
25778
|
+
logoUrl ? /* @__PURE__ */ jsx52(
|
|
24814
25779
|
Image6,
|
|
24815
25780
|
{
|
|
24816
25781
|
accessibilityLabel: "The Ticket Fairy",
|
|
@@ -24819,8 +25784,8 @@ var AuthModal = ({
|
|
|
24819
25784
|
resizeMode: "contain"
|
|
24820
25785
|
}
|
|
24821
25786
|
) : null,
|
|
24822
|
-
showTabs ? /* @__PURE__ */
|
|
24823
|
-
/* @__PURE__ */
|
|
25787
|
+
showTabs ? /* @__PURE__ */ jsxs49(View47, { style: [styles18.tabs, { borderBottomColor: theme.border }], children: [
|
|
25788
|
+
/* @__PURE__ */ jsx52(
|
|
24824
25789
|
Tab,
|
|
24825
25790
|
{
|
|
24826
25791
|
label: "Login",
|
|
@@ -24828,7 +25793,7 @@ var AuthModal = ({
|
|
|
24828
25793
|
onPress: () => auth.showLogin(auth.suggestedEmail)
|
|
24829
25794
|
}
|
|
24830
25795
|
),
|
|
24831
|
-
/* @__PURE__ */
|
|
25796
|
+
/* @__PURE__ */ jsx52(
|
|
24832
25797
|
Tab,
|
|
24833
25798
|
{
|
|
24834
25799
|
label: "Sign Up",
|
|
@@ -24837,8 +25802,8 @@ var AuthModal = ({
|
|
|
24837
25802
|
}
|
|
24838
25803
|
)
|
|
24839
25804
|
] }) : null,
|
|
24840
|
-
message && !isPasswordReset ? /* @__PURE__ */
|
|
24841
|
-
auth.view === "email-code" ? /* @__PURE__ */
|
|
25805
|
+
message && !isPasswordReset ? /* @__PURE__ */ jsx52(MutedText, { children: message }) : null,
|
|
25806
|
+
auth.view === "email-code" ? /* @__PURE__ */ jsx52(
|
|
24842
25807
|
EmailCodeForm,
|
|
24843
25808
|
{
|
|
24844
25809
|
initialEmail: auth.suggestedEmail,
|
|
@@ -24853,7 +25818,7 @@ var AuthModal = ({
|
|
|
24853
25818
|
onBack: () => auth.showLogin(auth.suggestedEmail)
|
|
24854
25819
|
}
|
|
24855
25820
|
) : null,
|
|
24856
|
-
auth.view === "two-factor" && auth.twoFactorChallenge ? /* @__PURE__ */
|
|
25821
|
+
auth.view === "two-factor" && auth.twoFactorChallenge ? /* @__PURE__ */ jsx52(
|
|
24857
25822
|
TwoFactorForm,
|
|
24858
25823
|
{
|
|
24859
25824
|
loading: auth.isSubmitting,
|
|
@@ -24866,7 +25831,7 @@ var AuthModal = ({
|
|
|
24866
25831
|
onCancel: auth.cancelTwoFactor
|
|
24867
25832
|
}
|
|
24868
25833
|
) : null,
|
|
24869
|
-
auth.view === "login" ? /* @__PURE__ */
|
|
25834
|
+
auth.view === "login" ? /* @__PURE__ */ jsx52(
|
|
24870
25835
|
LoginForm,
|
|
24871
25836
|
{
|
|
24872
25837
|
initialEmail: auth.suggestedEmail,
|
|
@@ -24879,18 +25844,18 @@ var AuthModal = ({
|
|
|
24879
25844
|
onFieldChange: auth.clearFieldError
|
|
24880
25845
|
}
|
|
24881
25846
|
) : null,
|
|
24882
|
-
auth.view === "login" && auth.browserSignInAvailable ? /* @__PURE__ */
|
|
24883
|
-
|
|
25847
|
+
auth.view === "login" && auth.browserSignInAvailable ? /* @__PURE__ */ jsx52(View47, { style: { gap: 12 }, children: ["google", "apple", "facebook", "passkey"].map((provider) => /* @__PURE__ */ jsx52(
|
|
25848
|
+
Pressable24,
|
|
24884
25849
|
{
|
|
24885
25850
|
accessibilityRole: "button",
|
|
24886
25851
|
disabled: auth.isSubmitting,
|
|
24887
25852
|
onPress: () => void auth.submitBrowserSignIn(provider),
|
|
24888
|
-
children: /* @__PURE__ */
|
|
25853
|
+
children: /* @__PURE__ */ jsx52(Text29, { style: { color: theme.accent }, children: provider === "passkey" ? "Sign in with a passkey" : `Sign in with ${provider === "google" ? "Google" : provider === "apple" ? "Apple" : "Facebook"}` })
|
|
24889
25854
|
},
|
|
24890
25855
|
provider
|
|
24891
25856
|
)) }) : null,
|
|
24892
|
-
auth.view === "login" && auth.emailCodeAvailable ? /* @__PURE__ */
|
|
24893
|
-
auth.view === "register" && allowRegistration ? /* @__PURE__ */
|
|
25857
|
+
auth.view === "login" && auth.emailCodeAvailable ? /* @__PURE__ */ jsx52(Pressable24, { onPress: () => auth.showEmailCode(auth.suggestedEmail), children: /* @__PURE__ */ jsx52(Text29, { style: { color: theme.accent }, children: "Sign in with an email code" }) }) : null,
|
|
25858
|
+
auth.view === "register" && allowRegistration ? /* @__PURE__ */ jsx52(
|
|
24894
25859
|
RegisterForm,
|
|
24895
25860
|
{
|
|
24896
25861
|
initialEmail: auth.suggestedEmail,
|
|
@@ -24908,7 +25873,7 @@ var AuthModal = ({
|
|
|
24908
25873
|
onFieldChange: auth.clearFieldError
|
|
24909
25874
|
}
|
|
24910
25875
|
) : null,
|
|
24911
|
-
isPasswordReset ? /* @__PURE__ */
|
|
25876
|
+
isPasswordReset ? /* @__PURE__ */ jsx52(
|
|
24912
25877
|
ForgotPasswordForm,
|
|
24913
25878
|
{
|
|
24914
25879
|
initialEmail: auth.suggestedEmail,
|
|
@@ -24928,7 +25893,7 @@ var AuthModal = ({
|
|
|
24928
25893
|
}
|
|
24929
25894
|
) }) });
|
|
24930
25895
|
};
|
|
24931
|
-
var styles18 =
|
|
25896
|
+
var styles18 = StyleSheet37.create({
|
|
24932
25897
|
backdrop: { flex: 1, justifyContent: "flex-end", backgroundColor: "rgba(0,0,0,0.4)" },
|
|
24933
25898
|
sheet: {
|
|
24934
25899
|
borderTopLeftRadius: 20,
|
|
@@ -24948,7 +25913,7 @@ var styles18 = StyleSheet35.create({
|
|
|
24948
25913
|
logo: { width: "100%", height: 44, alignSelf: "center" },
|
|
24949
25914
|
tabs: {
|
|
24950
25915
|
flexDirection: "row",
|
|
24951
|
-
borderBottomWidth:
|
|
25916
|
+
borderBottomWidth: StyleSheet37.hairlineWidth
|
|
24952
25917
|
},
|
|
24953
25918
|
tab: {
|
|
24954
25919
|
flex: 1,
|
|
@@ -24960,20 +25925,20 @@ var styles18 = StyleSheet35.create({
|
|
|
24960
25925
|
});
|
|
24961
25926
|
|
|
24962
25927
|
// src/auth/ResetPasswordForm.tsx
|
|
24963
|
-
import { useMemo as
|
|
24964
|
-
import { StyleSheet as
|
|
24965
|
-
import { jsx as
|
|
25928
|
+
import { useMemo as useMemo37, useState as useState51 } from "react";
|
|
25929
|
+
import { StyleSheet as StyleSheet38, Text as Text30, View as View48 } from "react-native";
|
|
25930
|
+
import { jsx as jsx53, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
24966
25931
|
var ResetPasswordForm = ({
|
|
24967
25932
|
token,
|
|
24968
25933
|
onSuccess,
|
|
24969
25934
|
onBackToLogin
|
|
24970
25935
|
}) => {
|
|
24971
25936
|
const theme = useTheme();
|
|
24972
|
-
const [password, setPassword] =
|
|
24973
|
-
const [confirmation, setConfirmation] =
|
|
24974
|
-
const [submitted, setSubmitted] =
|
|
24975
|
-
const [success, setSuccess] =
|
|
24976
|
-
const validation =
|
|
25937
|
+
const [password, setPassword] = useState51("");
|
|
25938
|
+
const [confirmation, setConfirmation] = useState51("");
|
|
25939
|
+
const [submitted, setSubmitted] = useState51(false);
|
|
25940
|
+
const [success, setSuccess] = useState51(false);
|
|
25941
|
+
const validation = useMemo37(() => {
|
|
24977
25942
|
if (!submitted)
|
|
24978
25943
|
return {};
|
|
24979
25944
|
return {
|
|
@@ -24995,16 +25960,16 @@ var ResetPasswordForm = ({
|
|
|
24995
25960
|
reset.mutate({ token, password, passwordConfirmation: confirmation });
|
|
24996
25961
|
};
|
|
24997
25962
|
if (success) {
|
|
24998
|
-
return /* @__PURE__ */
|
|
24999
|
-
/* @__PURE__ */
|
|
25000
|
-
onBackToLogin ? /* @__PURE__ */
|
|
25963
|
+
return /* @__PURE__ */ jsxs50(View48, { style: styles19.form, children: [
|
|
25964
|
+
/* @__PURE__ */ jsx53(Text30, { style: [styles19.success, { color: theme.success }], children: "Your password has been changed. You can now log in." }),
|
|
25965
|
+
onBackToLogin ? /* @__PURE__ */ jsx53(Button, { onPress: onBackToLogin, children: "Log in" }) : null
|
|
25001
25966
|
] });
|
|
25002
25967
|
}
|
|
25003
|
-
return /* @__PURE__ */
|
|
25004
|
-
/* @__PURE__ */
|
|
25005
|
-
validation.token ? /* @__PURE__ */
|
|
25006
|
-
reset.error ? /* @__PURE__ */
|
|
25007
|
-
/* @__PURE__ */
|
|
25968
|
+
return /* @__PURE__ */ jsxs50(View48, { style: styles19.form, children: [
|
|
25969
|
+
/* @__PURE__ */ jsx53(Text30, { style: [styles19.title, { color: theme.text }], children: "Change Password" }),
|
|
25970
|
+
validation.token ? /* @__PURE__ */ jsx53(ErrorText, { children: validation.token }) : null,
|
|
25971
|
+
reset.error ? /* @__PURE__ */ jsx53(ErrorText, { children: errorMessage(reset.error) }) : null,
|
|
25972
|
+
/* @__PURE__ */ jsx53(Field, { label: "New Password", required: true, error: validation.password, children: /* @__PURE__ */ jsx53(
|
|
25008
25973
|
PasswordInput,
|
|
25009
25974
|
{
|
|
25010
25975
|
value: password,
|
|
@@ -25013,7 +25978,7 @@ var ResetPasswordForm = ({
|
|
|
25013
25978
|
invalid: Boolean(validation.password)
|
|
25014
25979
|
}
|
|
25015
25980
|
) }),
|
|
25016
|
-
/* @__PURE__ */
|
|
25981
|
+
/* @__PURE__ */ jsx53(Field, { label: "Confirm Password", required: true, error: validation.confirmation, children: /* @__PURE__ */ jsx53(
|
|
25017
25982
|
PasswordInput,
|
|
25018
25983
|
{
|
|
25019
25984
|
value: confirmation,
|
|
@@ -25022,19 +25987,19 @@ var ResetPasswordForm = ({
|
|
|
25022
25987
|
invalid: Boolean(validation.confirmation)
|
|
25023
25988
|
}
|
|
25024
25989
|
) }),
|
|
25025
|
-
/* @__PURE__ */
|
|
25990
|
+
/* @__PURE__ */ jsx53(Button, { onPress: submit, loading: reset.isPending, disabled: !token, children: "Submit" })
|
|
25026
25991
|
] });
|
|
25027
25992
|
};
|
|
25028
|
-
var styles19 =
|
|
25993
|
+
var styles19 = StyleSheet38.create({
|
|
25029
25994
|
form: { gap: 14 },
|
|
25030
25995
|
title: { fontSize: 18, fontWeight: "700" },
|
|
25031
25996
|
success: { fontSize: 15, fontWeight: "600" }
|
|
25032
25997
|
});
|
|
25033
25998
|
|
|
25034
25999
|
// src/EmbeddedCheckout.tsx
|
|
25035
|
-
import { useEffect as
|
|
25036
|
-
import { Pressable as
|
|
25037
|
-
import { Fragment as
|
|
26000
|
+
import { useEffect as useEffect32, useRef as useRef31, useState as useState52 } from "react";
|
|
26001
|
+
import { Pressable as Pressable25, ScrollView as ScrollView4, StyleSheet as StyleSheet39, Text as Text31, View as View49 } from "react-native";
|
|
26002
|
+
import { Fragment as Fragment27, jsx as jsx54, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
25038
26003
|
var Flow = ({
|
|
25039
26004
|
eventId,
|
|
25040
26005
|
onComplete,
|
|
@@ -25060,13 +26025,13 @@ var Flow = ({
|
|
|
25060
26025
|
var _a;
|
|
25061
26026
|
const checkout = useCheckoutContext();
|
|
25062
26027
|
const theme = useTheme();
|
|
25063
|
-
const [view, setView] =
|
|
25064
|
-
const [selectionView, setSelectionView] =
|
|
25065
|
-
const editedDetailsRef =
|
|
25066
|
-
const [authRequest, setAuthRequest] =
|
|
26028
|
+
const [view, setView] = useState52(initialView);
|
|
26029
|
+
const [selectionView, setSelectionView] = useState52(initialView);
|
|
26030
|
+
const editedDetailsRef = useRef31(null);
|
|
26031
|
+
const [authRequest, setAuthRequest] = useState52(
|
|
25067
26032
|
null
|
|
25068
26033
|
);
|
|
25069
|
-
const [privacyAttempted, setPrivacyAttempted] =
|
|
26034
|
+
const [privacyAttempted, setPrivacyAttempted] = useState52(false);
|
|
25070
26035
|
const openBuiltInAuth = (email) => setAuthRequest((current4) => {
|
|
25071
26036
|
var _a2;
|
|
25072
26037
|
return { email, key: ((_a2 = current4 == null ? void 0 : current4.key) != null ? _a2 : 0) + 1 };
|
|
@@ -25079,7 +26044,7 @@ var Flow = ({
|
|
|
25079
26044
|
orderFixed: checkout.orderFixed
|
|
25080
26045
|
});
|
|
25081
26046
|
const leaveAllowed = canLeavePayment(checkout);
|
|
25082
|
-
|
|
26047
|
+
useEffect32(() => {
|
|
25083
26048
|
if (visibleView === view) return;
|
|
25084
26049
|
if (visibleView === "checkout") setView("checkout");
|
|
25085
26050
|
else {
|
|
@@ -25087,7 +26052,7 @@ var Flow = ({
|
|
|
25087
26052
|
setSelectionView("tickets");
|
|
25088
26053
|
}
|
|
25089
26054
|
}, [view, visibleView]);
|
|
25090
|
-
|
|
26055
|
+
useEffect32(() => {
|
|
25091
26056
|
onViewChange == null ? void 0 : onViewChange(visibleView);
|
|
25092
26057
|
}, [onViewChange, visibleView]);
|
|
25093
26058
|
const enterCheckout = (from) => {
|
|
@@ -25119,18 +26084,18 @@ var Flow = ({
|
|
|
25119
26084
|
const formattedTotal = breakdown ? breakdown.currencySymbol ? `${breakdown.currencySymbol}${Number(selectedTicketsTotal).toFixed(2)}` : `${breakdown.currencyCode} ${Number(selectedTicketsTotal).toFixed(2)}` : null;
|
|
25120
26085
|
const succeeded = checkout.status === "succeeded" && Boolean(checkout.order);
|
|
25121
26086
|
if (visibleView === "checkout" && succeeded && confirmationMode === "inline") {
|
|
25122
|
-
return /* @__PURE__ */
|
|
25123
|
-
/* @__PURE__ */
|
|
25124
|
-
/* @__PURE__ */
|
|
26087
|
+
return /* @__PURE__ */ jsxs51(ScrollView4, { contentContainerStyle: styles20.content, children: [
|
|
26088
|
+
/* @__PURE__ */ jsx54(IDVerification, {}),
|
|
26089
|
+
/* @__PURE__ */ jsx54(Confirmation, { children: confirmationChildren })
|
|
25125
26090
|
] });
|
|
25126
26091
|
}
|
|
25127
|
-
return /* @__PURE__ */
|
|
26092
|
+
return /* @__PURE__ */ jsxs51(
|
|
25128
26093
|
ScrollView4,
|
|
25129
26094
|
{
|
|
25130
26095
|
contentContainerStyle: styles20.content,
|
|
25131
26096
|
keyboardShouldPersistTaps: "handled",
|
|
25132
26097
|
children: [
|
|
25133
|
-
/* @__PURE__ */
|
|
26098
|
+
/* @__PURE__ */ jsx54(View49, { style: visibleView === "tickets" ? styles20.stack : styles20.hidden, children: /* @__PURE__ */ jsx54(
|
|
25134
26099
|
Bundles,
|
|
25135
26100
|
{
|
|
25136
26101
|
eventId,
|
|
@@ -25139,7 +26104,7 @@ var Flow = ({
|
|
|
25139
26104
|
confirmationMode
|
|
25140
26105
|
}
|
|
25141
26106
|
) }),
|
|
25142
|
-
visibleView === "tickets" && /* @__PURE__ */
|
|
26107
|
+
visibleView === "tickets" && /* @__PURE__ */ jsx54(View49, { style: styles20.stack, children: /* @__PURE__ */ jsx54(
|
|
25143
26108
|
Tickets,
|
|
25144
26109
|
{
|
|
25145
26110
|
eventId,
|
|
@@ -25150,29 +26115,29 @@ var Flow = ({
|
|
|
25150
26115
|
readAttributionFromUrl
|
|
25151
26116
|
}
|
|
25152
26117
|
) }),
|
|
25153
|
-
visibleView === "seats" && /* @__PURE__ */
|
|
25154
|
-
/* @__PURE__ */
|
|
25155
|
-
/* @__PURE__ */
|
|
26118
|
+
visibleView === "seats" && /* @__PURE__ */ jsxs51(View49, { style: styles20.stack, children: [
|
|
26119
|
+
/* @__PURE__ */ jsx54(Pressable25, { onPress: () => setView("tickets"), style: styles20.back, children: /* @__PURE__ */ jsx54(Text31, { style: [styles20.backText, { color: theme.accent }], children: "\u2190 Back to tickets" }) }),
|
|
26120
|
+
/* @__PURE__ */ jsx54(SeatMap, { eventId, onContinue: () => enterCheckout("seats") })
|
|
25156
26121
|
] }),
|
|
25157
|
-
visibleView === "checkout" && /* @__PURE__ */
|
|
25158
|
-
/* @__PURE__ */
|
|
25159
|
-
/* @__PURE__ */
|
|
25160
|
-
/* @__PURE__ */
|
|
26122
|
+
visibleView === "checkout" && /* @__PURE__ */ jsxs51(View49, { style: styles20.stack, children: [
|
|
26123
|
+
/* @__PURE__ */ jsx54(TimerBanner, { seconds: checkout.secondsLeft }),
|
|
26124
|
+
/* @__PURE__ */ jsxs51(View49, { style: [styles20.selection, { borderColor: theme.border }], children: [
|
|
26125
|
+
/* @__PURE__ */ jsxs51(Text31, { style: [styles20.selectionText, { color: theme.text }], children: [
|
|
25161
26126
|
selectedCount,
|
|
25162
26127
|
" ",
|
|
25163
26128
|
selectedCount === 1 ? "ticket" : "tickets",
|
|
25164
26129
|
" selected",
|
|
25165
26130
|
formattedTotal ? ` \xB7 ${formattedTotal}` : ""
|
|
25166
26131
|
] }),
|
|
25167
|
-
/* @__PURE__ */
|
|
25168
|
-
|
|
26132
|
+
/* @__PURE__ */ jsx54(
|
|
26133
|
+
Pressable25,
|
|
25169
26134
|
{
|
|
25170
26135
|
onPress: editSelection,
|
|
25171
26136
|
disabled: !leaveAllowed,
|
|
25172
26137
|
accessibilityRole: "button",
|
|
25173
26138
|
accessibilityState: { disabled: !leaveAllowed },
|
|
25174
|
-
children: /* @__PURE__ */
|
|
25175
|
-
|
|
26139
|
+
children: /* @__PURE__ */ jsx54(
|
|
26140
|
+
Text31,
|
|
25176
26141
|
{
|
|
25177
26142
|
style: [
|
|
25178
26143
|
styles20.editText,
|
|
@@ -25185,8 +26150,8 @@ var Flow = ({
|
|
|
25185
26150
|
}
|
|
25186
26151
|
)
|
|
25187
26152
|
] }),
|
|
25188
|
-
/* @__PURE__ */
|
|
25189
|
-
/* @__PURE__ */
|
|
26153
|
+
/* @__PURE__ */ jsx54(AddOns, { eventId }),
|
|
26154
|
+
/* @__PURE__ */ jsx54(
|
|
25190
26155
|
BillingInfo,
|
|
25191
26156
|
{
|
|
25192
26157
|
eventId,
|
|
@@ -25201,8 +26166,8 @@ var Flow = ({
|
|
|
25201
26166
|
showPrivacyError: privacyAttempted
|
|
25202
26167
|
}
|
|
25203
26168
|
),
|
|
25204
|
-
/* @__PURE__ */
|
|
25205
|
-
/* @__PURE__ */
|
|
26169
|
+
/* @__PURE__ */ jsx54(WaiverSigning, { eventId }),
|
|
26170
|
+
/* @__PURE__ */ jsx54(
|
|
25206
26171
|
Payment,
|
|
25207
26172
|
{
|
|
25208
26173
|
onComplete,
|
|
@@ -25217,7 +26182,7 @@ var Flow = ({
|
|
|
25217
26182
|
}
|
|
25218
26183
|
)
|
|
25219
26184
|
] }),
|
|
25220
|
-
authRequest && auth !== false && !onLogin && /* @__PURE__ */
|
|
26185
|
+
authRequest && auth !== false && !onLogin && /* @__PURE__ */ jsx54(
|
|
25221
26186
|
AuthModal,
|
|
25222
26187
|
{
|
|
25223
26188
|
checkoutEventId: eventId,
|
|
@@ -25246,20 +26211,20 @@ var EventFlow = (flow) => {
|
|
|
25246
26211
|
const flowProps = embeddedCheckoutProps(checkout.store, flow);
|
|
25247
26212
|
const heldEvent = hooks_exports.useEvent(shown.waitingFor ? shown.eventId : void 0).data;
|
|
25248
26213
|
const notice = shown.waitingFor ? heldOrderNotice(heldEvent == null ? void 0 : heldEvent.name) : null;
|
|
25249
|
-
return /* @__PURE__ */
|
|
25250
|
-
notice && /* @__PURE__ */
|
|
25251
|
-
|
|
26214
|
+
return /* @__PURE__ */ jsxs51(Fragment27, { children: [
|
|
26215
|
+
notice && /* @__PURE__ */ jsx54(
|
|
26216
|
+
View49,
|
|
25252
26217
|
{
|
|
25253
26218
|
accessibilityLiveRegion: "polite",
|
|
25254
26219
|
style: [styles20.notice, { borderColor: theme.accent }],
|
|
25255
|
-
children: /* @__PURE__ */
|
|
26220
|
+
children: /* @__PURE__ */ jsx54(Text31, { style: [styles20.noticeText, { color: theme.text }], children: translate(notice.key, notice.params) })
|
|
25256
26221
|
}
|
|
25257
26222
|
),
|
|
25258
|
-
/* @__PURE__ */
|
|
26223
|
+
/* @__PURE__ */ jsx54(Flow, { ...flowProps }, flowProps.eventId)
|
|
25259
26224
|
] });
|
|
25260
26225
|
};
|
|
25261
|
-
var EmbeddedCheckout = ({ theme, ...flow }) => /* @__PURE__ */
|
|
25262
|
-
var styles20 =
|
|
26226
|
+
var EmbeddedCheckout = ({ theme, ...flow }) => /* @__PURE__ */ jsx54(CheckoutProvider, { theme, children: /* @__PURE__ */ jsx54(EventFlow, { ...flow }) });
|
|
26227
|
+
var styles20 = StyleSheet39.create({
|
|
25263
26228
|
content: { padding: 16, gap: 12 },
|
|
25264
26229
|
hidden: { display: "none" },
|
|
25265
26230
|
stack: { gap: 12 },
|
|
@@ -25269,7 +26234,7 @@ var styles20 = StyleSheet37.create({
|
|
|
25269
26234
|
flexDirection: "row",
|
|
25270
26235
|
alignItems: "center",
|
|
25271
26236
|
justifyContent: "space-between",
|
|
25272
|
-
borderWidth:
|
|
26237
|
+
borderWidth: StyleSheet39.hairlineWidth,
|
|
25273
26238
|
borderRadius: 10,
|
|
25274
26239
|
paddingVertical: 10,
|
|
25275
26240
|
paddingHorizontal: 14
|
|
@@ -25280,7 +26245,7 @@ var styles20 = StyleSheet37.create({
|
|
|
25280
26245
|
notice: {
|
|
25281
26246
|
marginHorizontal: 16,
|
|
25282
26247
|
marginTop: 16,
|
|
25283
|
-
borderWidth:
|
|
26248
|
+
borderWidth: StyleSheet39.hairlineWidth,
|
|
25284
26249
|
borderRadius: 10,
|
|
25285
26250
|
paddingVertical: 10,
|
|
25286
26251
|
paddingHorizontal: 14
|
|
@@ -25290,6 +26255,8 @@ var styles20 = StyleSheet37.create({
|
|
|
25290
26255
|
export {
|
|
25291
26256
|
ADD_ON_DEFAULT_MAX_QUANTITY,
|
|
25292
26257
|
Accommodation,
|
|
26258
|
+
AccountDeletion,
|
|
26259
|
+
AccountDeletionView,
|
|
25293
26260
|
AccountRewardsSection,
|
|
25294
26261
|
AddOns,
|
|
25295
26262
|
AuthModal,
|
|
@@ -25360,6 +26327,8 @@ export {
|
|
|
25360
26327
|
SeatMap,
|
|
25361
26328
|
SectionHeader,
|
|
25362
26329
|
Select,
|
|
26330
|
+
Streaming,
|
|
26331
|
+
StreamingView,
|
|
25363
26332
|
TICKET_CHANGE_PAYMENT_WINDOW_MS,
|
|
25364
26333
|
TicketChange,
|
|
25365
26334
|
TicketGift,
|