@nok-integration/storefront-react 0.25.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +179 -2
- package/dist/index.mjs +1915 -369
- package/dist/standalone/storefront.mjs +1915 -369
- package/dist/standalone/styles.css +239 -135
- package/dist/styles.css +239 -135
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useContext, useEffect, useState, useRef, useCallback, useMemo, createContext, forwardRef, useLayoutEffect, Fragment as Fragment$1 } from "react";
|
|
4
|
-
var client = {};
|
|
5
|
-
var catalog = {};
|
|
4
|
+
var client$1 = {};
|
|
5
|
+
var catalog$1 = {};
|
|
6
6
|
var zod = {};
|
|
7
7
|
var external = {};
|
|
8
|
-
var errors$
|
|
8
|
+
var errors$2 = {};
|
|
9
9
|
var en = {};
|
|
10
10
|
var ZodError = {};
|
|
11
11
|
var util = {};
|
|
@@ -350,23 +350,23 @@ function requireEn() {
|
|
|
350
350
|
en.default = errorMap;
|
|
351
351
|
return en;
|
|
352
352
|
}
|
|
353
|
-
var hasRequiredErrors$
|
|
354
|
-
function requireErrors$
|
|
355
|
-
if (hasRequiredErrors$
|
|
356
|
-
hasRequiredErrors$
|
|
357
|
-
var __importDefault = errors$
|
|
353
|
+
var hasRequiredErrors$2;
|
|
354
|
+
function requireErrors$2() {
|
|
355
|
+
if (hasRequiredErrors$2) return errors$2;
|
|
356
|
+
hasRequiredErrors$2 = 1;
|
|
357
|
+
var __importDefault = errors$2 && errors$2.__importDefault || function(mod) {
|
|
358
358
|
return mod && mod.__esModule ? mod : {
|
|
359
359
|
default: mod
|
|
360
360
|
};
|
|
361
361
|
};
|
|
362
|
-
Object.defineProperty(errors$
|
|
362
|
+
Object.defineProperty(errors$2, "__esModule", {
|
|
363
363
|
value: true
|
|
364
364
|
});
|
|
365
|
-
errors$
|
|
366
|
-
errors$
|
|
367
|
-
errors$
|
|
365
|
+
errors$2.defaultErrorMap = void 0;
|
|
366
|
+
errors$2.setErrorMap = setErrorMap;
|
|
367
|
+
errors$2.getErrorMap = getErrorMap;
|
|
368
368
|
const en_js_1 = __importDefault(requireEn());
|
|
369
|
-
errors$
|
|
369
|
+
errors$2.defaultErrorMap = en_js_1.default;
|
|
370
370
|
let overrideErrorMap = en_js_1.default;
|
|
371
371
|
function setErrorMap(map) {
|
|
372
372
|
overrideErrorMap = map;
|
|
@@ -374,7 +374,7 @@ function requireErrors$1() {
|
|
|
374
374
|
function getErrorMap() {
|
|
375
375
|
return overrideErrorMap;
|
|
376
376
|
}
|
|
377
|
-
return errors$
|
|
377
|
+
return errors$2;
|
|
378
378
|
}
|
|
379
379
|
var parseUtil = {};
|
|
380
380
|
var hasRequiredParseUtil;
|
|
@@ -392,7 +392,7 @@ function requireParseUtil() {
|
|
|
392
392
|
});
|
|
393
393
|
exports.isAsync = exports.isValid = exports.isDirty = exports.isAborted = exports.OK = exports.DIRTY = exports.INVALID = exports.ParseStatus = exports.EMPTY_PATH = exports.makeIssue = void 0;
|
|
394
394
|
exports.addIssueToContext = addIssueToContext;
|
|
395
|
-
const errors_js_1 = requireErrors$
|
|
395
|
+
const errors_js_1 = requireErrors$2();
|
|
396
396
|
const en_js_1 = __importDefault(requireEn());
|
|
397
397
|
const makeIssue = (params) => {
|
|
398
398
|
const { data, path, errorMaps, issueData } = params;
|
|
@@ -552,7 +552,7 @@ function requireTypes() {
|
|
|
552
552
|
types.datetimeRegex = datetimeRegex;
|
|
553
553
|
types.custom = custom;
|
|
554
554
|
const ZodError_js_1 = requireZodError();
|
|
555
|
-
const errors_js_1 = requireErrors$
|
|
555
|
+
const errors_js_1 = requireErrors$2();
|
|
556
556
|
const errorUtil_js_1 = requireErrorUtil();
|
|
557
557
|
const parseUtil_js_1 = requireParseUtil();
|
|
558
558
|
const util_js_1 = requireUtil();
|
|
@@ -4110,7 +4110,7 @@ function requireExternal() {
|
|
|
4110
4110
|
Object.defineProperty(exports, "__esModule", {
|
|
4111
4111
|
value: true
|
|
4112
4112
|
});
|
|
4113
|
-
__exportStar(requireErrors$
|
|
4113
|
+
__exportStar(requireErrors$2(), exports);
|
|
4114
4114
|
__exportStar(requireParseUtil(), exports);
|
|
4115
4115
|
__exportStar(requireTypeAliases(), exports);
|
|
4116
4116
|
__exportStar(requireUtil(), exports);
|
|
@@ -4171,11 +4171,11 @@ function requireZod() {
|
|
|
4171
4171
|
})(zod);
|
|
4172
4172
|
return zod;
|
|
4173
4173
|
}
|
|
4174
|
-
var money = {};
|
|
4175
|
-
var hasRequiredMoney;
|
|
4176
|
-
function requireMoney() {
|
|
4177
|
-
if (hasRequiredMoney) return money;
|
|
4178
|
-
hasRequiredMoney = 1;
|
|
4174
|
+
var money$1 = {};
|
|
4175
|
+
var hasRequiredMoney$1;
|
|
4176
|
+
function requireMoney$1() {
|
|
4177
|
+
if (hasRequiredMoney$1) return money$1;
|
|
4178
|
+
hasRequiredMoney$1 = 1;
|
|
4179
4179
|
(function(exports) {
|
|
4180
4180
|
Object.defineProperty(exports, "__esModule", {
|
|
4181
4181
|
value: true
|
|
@@ -4187,21 +4187,21 @@ function requireMoney() {
|
|
|
4187
4187
|
amount: zod_1.z.number().int("amount must be an integer number of minor units (no floats)"),
|
|
4188
4188
|
currency: exports.Currency
|
|
4189
4189
|
}).strict();
|
|
4190
|
-
})(money);
|
|
4191
|
-
return money;
|
|
4192
|
-
}
|
|
4193
|
-
var common = {};
|
|
4194
|
-
var hasRequiredCommon;
|
|
4195
|
-
function requireCommon() {
|
|
4196
|
-
if (hasRequiredCommon) return common;
|
|
4197
|
-
hasRequiredCommon = 1;
|
|
4190
|
+
})(money$1);
|
|
4191
|
+
return money$1;
|
|
4192
|
+
}
|
|
4193
|
+
var common$1 = {};
|
|
4194
|
+
var hasRequiredCommon$1;
|
|
4195
|
+
function requireCommon$1() {
|
|
4196
|
+
if (hasRequiredCommon$1) return common$1;
|
|
4197
|
+
hasRequiredCommon$1 = 1;
|
|
4198
4198
|
(function(exports) {
|
|
4199
4199
|
Object.defineProperty(exports, "__esModule", {
|
|
4200
4200
|
value: true
|
|
4201
4201
|
});
|
|
4202
4202
|
exports.Pricing = exports.Address = exports.PaginationParams = exports.Page = exports.Attributes = exports.MarketQuery = exports.LanguageTag = exports.CountryCode = exports.Sku = exports.Url = exports.Timestamp = void 0;
|
|
4203
4203
|
const zod_1 = requireZod();
|
|
4204
|
-
const money_1 = requireMoney();
|
|
4204
|
+
const money_1 = requireMoney$1();
|
|
4205
4205
|
exports.Timestamp = zod_1.z.string().datetime({
|
|
4206
4206
|
offset: true
|
|
4207
4207
|
});
|
|
@@ -4237,21 +4237,21 @@ function requireCommon() {
|
|
|
4237
4237
|
tax: money_1.Money,
|
|
4238
4238
|
total: money_1.Money
|
|
4239
4239
|
});
|
|
4240
|
-
})(common);
|
|
4241
|
-
return common;
|
|
4240
|
+
})(common$1);
|
|
4241
|
+
return common$1;
|
|
4242
4242
|
}
|
|
4243
|
-
var hasRequiredCatalog;
|
|
4244
|
-
function requireCatalog() {
|
|
4245
|
-
if (hasRequiredCatalog) return catalog;
|
|
4246
|
-
hasRequiredCatalog = 1;
|
|
4243
|
+
var hasRequiredCatalog$1;
|
|
4244
|
+
function requireCatalog$1() {
|
|
4245
|
+
if (hasRequiredCatalog$1) return catalog$1;
|
|
4246
|
+
hasRequiredCatalog$1 = 1;
|
|
4247
4247
|
(function(exports) {
|
|
4248
4248
|
Object.defineProperty(exports, "__esModule", {
|
|
4249
4249
|
value: true
|
|
4250
4250
|
});
|
|
4251
4251
|
exports.CatalogReadQuery = exports.ListProductsQuery = exports.RecommendationsResponse = exports.ProductListResponse = exports.Product = exports.SizeGuide = exports.SizeGuideMeasurement = exports.SizeChartUnit = exports.ProductPromo = exports.ProductVariant = void 0;
|
|
4252
4252
|
const zod_1 = requireZod();
|
|
4253
|
-
const money_1 = requireMoney();
|
|
4254
|
-
const common_1 = requireCommon();
|
|
4253
|
+
const money_1 = requireMoney$1();
|
|
4254
|
+
const common_1 = requireCommon$1();
|
|
4255
4255
|
exports.ProductVariant = zod_1.z.object({
|
|
4256
4256
|
sku: common_1.Sku,
|
|
4257
4257
|
attributes: common_1.Attributes,
|
|
@@ -4306,22 +4306,22 @@ function requireCatalog() {
|
|
|
4306
4306
|
limit: zod_1.z.number().int().positive().max(100).optional()
|
|
4307
4307
|
});
|
|
4308
4308
|
exports.CatalogReadQuery = common_1.MarketQuery;
|
|
4309
|
-
})(catalog);
|
|
4310
|
-
return catalog;
|
|
4311
|
-
}
|
|
4312
|
-
var content$
|
|
4313
|
-
var hasRequiredContent;
|
|
4314
|
-
function requireContent() {
|
|
4315
|
-
if (hasRequiredContent) return content$
|
|
4316
|
-
hasRequiredContent = 1;
|
|
4309
|
+
})(catalog$1);
|
|
4310
|
+
return catalog$1;
|
|
4311
|
+
}
|
|
4312
|
+
var content$2 = {};
|
|
4313
|
+
var hasRequiredContent$1;
|
|
4314
|
+
function requireContent$1() {
|
|
4315
|
+
if (hasRequiredContent$1) return content$2;
|
|
4316
|
+
hasRequiredContent$1 = 1;
|
|
4317
4317
|
(function(exports) {
|
|
4318
4318
|
Object.defineProperty(exports, "__esModule", {
|
|
4319
4319
|
value: true
|
|
4320
4320
|
});
|
|
4321
4321
|
exports.HomeContent = exports.HomeSlide = exports.CategoryPage = exports.CategoryBlock = exports.ProductGalleryBlock = exports.ExploreBlock = exports.WhyUsBlock = exports.ReviewBlock = exports.GridBlock = exports.LifestyleImageBlock = exports.FeaturedBlock = exports.LifestyleTextBlock = exports.RailBlock = exports.CategoryHero = void 0;
|
|
4322
4322
|
const zod_1 = requireZod();
|
|
4323
|
-
const common_1 = requireCommon();
|
|
4324
|
-
const catalog_1 = requireCatalog();
|
|
4323
|
+
const common_1 = requireCommon$1();
|
|
4324
|
+
const catalog_1 = requireCatalog$1();
|
|
4325
4325
|
exports.CategoryHero = zod_1.z.object({
|
|
4326
4326
|
title: zod_1.z.string(),
|
|
4327
4327
|
subtitle: zod_1.z.string().optional(),
|
|
@@ -4398,19 +4398,20 @@ function requireContent() {
|
|
|
4398
4398
|
image: zod_1.z.string().min(1).optional(),
|
|
4399
4399
|
video: zod_1.z.string().min(1).optional(),
|
|
4400
4400
|
desktop_image: zod_1.z.string().min(1).optional(),
|
|
4401
|
+
desktop_video: zod_1.z.string().min(1).optional(),
|
|
4401
4402
|
focal_y: zod_1.z.number().int().min(0).max(100).optional()
|
|
4402
4403
|
});
|
|
4403
4404
|
exports.HomeContent = zod_1.z.object({
|
|
4404
4405
|
slides: zod_1.z.array(exports.HomeSlide)
|
|
4405
4406
|
});
|
|
4406
|
-
})(content$
|
|
4407
|
-
return content$
|
|
4407
|
+
})(content$2);
|
|
4408
|
+
return content$2;
|
|
4408
4409
|
}
|
|
4409
|
-
var storefrontConfig = {};
|
|
4410
|
-
var hasRequiredStorefrontConfig;
|
|
4411
|
-
function requireStorefrontConfig() {
|
|
4412
|
-
if (hasRequiredStorefrontConfig) return storefrontConfig;
|
|
4413
|
-
hasRequiredStorefrontConfig = 1;
|
|
4410
|
+
var storefrontConfig$1 = {};
|
|
4411
|
+
var hasRequiredStorefrontConfig$1;
|
|
4412
|
+
function requireStorefrontConfig$1() {
|
|
4413
|
+
if (hasRequiredStorefrontConfig$1) return storefrontConfig$1;
|
|
4414
|
+
hasRequiredStorefrontConfig$1 = 1;
|
|
4414
4415
|
(function(exports) {
|
|
4415
4416
|
Object.defineProperty(exports, "__esModule", {
|
|
4416
4417
|
value: true
|
|
@@ -4450,63 +4451,63 @@ function requireStorefrontConfig() {
|
|
|
4450
4451
|
default_lang: "en"
|
|
4451
4452
|
}
|
|
4452
4453
|
};
|
|
4453
|
-
})(storefrontConfig);
|
|
4454
|
-
return storefrontConfig;
|
|
4455
|
-
}
|
|
4456
|
-
var inventory = {};
|
|
4457
|
-
var hasRequiredInventory;
|
|
4458
|
-
function requireInventory() {
|
|
4459
|
-
if (hasRequiredInventory) return inventory;
|
|
4460
|
-
hasRequiredInventory = 1;
|
|
4461
|
-
Object.defineProperty(inventory, "__esModule", {
|
|
4454
|
+
})(storefrontConfig$1);
|
|
4455
|
+
return storefrontConfig$1;
|
|
4456
|
+
}
|
|
4457
|
+
var inventory$1 = {};
|
|
4458
|
+
var hasRequiredInventory$1;
|
|
4459
|
+
function requireInventory$1() {
|
|
4460
|
+
if (hasRequiredInventory$1) return inventory$1;
|
|
4461
|
+
hasRequiredInventory$1 = 1;
|
|
4462
|
+
Object.defineProperty(inventory$1, "__esModule", {
|
|
4462
4463
|
value: true
|
|
4463
4464
|
});
|
|
4464
|
-
inventory.Inventory = void 0;
|
|
4465
|
+
inventory$1.Inventory = void 0;
|
|
4465
4466
|
const zod_1 = requireZod();
|
|
4466
|
-
const common_1 = requireCommon();
|
|
4467
|
-
inventory.Inventory = zod_1.z.object({
|
|
4467
|
+
const common_1 = requireCommon$1();
|
|
4468
|
+
inventory$1.Inventory = zod_1.z.object({
|
|
4468
4469
|
sku: common_1.Sku,
|
|
4469
4470
|
available: zod_1.z.number().int().nonnegative(),
|
|
4470
4471
|
in_stock: zod_1.z.boolean()
|
|
4471
4472
|
});
|
|
4472
|
-
return inventory;
|
|
4473
|
+
return inventory$1;
|
|
4473
4474
|
}
|
|
4474
|
-
var cart = {};
|
|
4475
|
-
var ids = {};
|
|
4476
|
-
var hasRequiredIds;
|
|
4477
|
-
function requireIds() {
|
|
4478
|
-
if (hasRequiredIds) return ids;
|
|
4479
|
-
hasRequiredIds = 1;
|
|
4480
|
-
Object.defineProperty(ids, "__esModule", {
|
|
4475
|
+
var cart$1 = {};
|
|
4476
|
+
var ids$1 = {};
|
|
4477
|
+
var hasRequiredIds$1;
|
|
4478
|
+
function requireIds$1() {
|
|
4479
|
+
if (hasRequiredIds$1) return ids$1;
|
|
4480
|
+
hasRequiredIds$1 = 1;
|
|
4481
|
+
Object.defineProperty(ids$1, "__esModule", {
|
|
4481
4482
|
value: true
|
|
4482
4483
|
});
|
|
4483
|
-
ids.RequestId = ids.EventId = ids.OrderRef = ids.CheckoutId = ids.CartId = ids.UserId = void 0;
|
|
4484
|
-
ids.prefixedId = prefixedId;
|
|
4484
|
+
ids$1.RequestId = ids$1.EventId = ids$1.OrderRef = ids$1.CheckoutId = ids$1.CartId = ids$1.UserId = void 0;
|
|
4485
|
+
ids$1.prefixedId = prefixedId;
|
|
4485
4486
|
const zod_1 = requireZod();
|
|
4486
4487
|
function prefixedId(prefix, _brand) {
|
|
4487
4488
|
return zod_1.z.string().regex(new RegExp(`^${prefix}[A-Za-z0-9._-]+$`), `must be a '${prefix}…' identifier`).brand();
|
|
4488
4489
|
}
|
|
4489
|
-
ids.UserId = prefixedId("usr_");
|
|
4490
|
-
ids.CartId = prefixedId("cart_");
|
|
4491
|
-
ids.CheckoutId = prefixedId("chk_");
|
|
4492
|
-
ids.OrderRef = zod_1.z.string().regex(/^(?:ord_[A-Za-z0-9._-]+|\d+)$/, "must be an 'ord_…' identifier or a numeric order reference").brand();
|
|
4493
|
-
ids.EventId = prefixedId("evt_");
|
|
4494
|
-
ids.RequestId = prefixedId("req_");
|
|
4495
|
-
return ids;
|
|
4496
|
-
}
|
|
4497
|
-
var vip$
|
|
4498
|
-
var hasRequiredVip;
|
|
4499
|
-
function requireVip() {
|
|
4500
|
-
if (hasRequiredVip) return vip$
|
|
4501
|
-
hasRequiredVip = 1;
|
|
4490
|
+
ids$1.UserId = prefixedId("usr_");
|
|
4491
|
+
ids$1.CartId = prefixedId("cart_");
|
|
4492
|
+
ids$1.CheckoutId = prefixedId("chk_");
|
|
4493
|
+
ids$1.OrderRef = zod_1.z.string().regex(/^(?:ord_[A-Za-z0-9._-]+|\d+)$/, "must be an 'ord_…' identifier or a numeric order reference").brand();
|
|
4494
|
+
ids$1.EventId = prefixedId("evt_");
|
|
4495
|
+
ids$1.RequestId = prefixedId("req_");
|
|
4496
|
+
return ids$1;
|
|
4497
|
+
}
|
|
4498
|
+
var vip$2 = {};
|
|
4499
|
+
var hasRequiredVip$1;
|
|
4500
|
+
function requireVip$1() {
|
|
4501
|
+
if (hasRequiredVip$1) return vip$2;
|
|
4502
|
+
hasRequiredVip$1 = 1;
|
|
4502
4503
|
(function(exports) {
|
|
4503
4504
|
Object.defineProperty(exports, "__esModule", {
|
|
4504
4505
|
value: true
|
|
4505
4506
|
});
|
|
4506
4507
|
exports.VipClaimResponse = exports.VipClaimRefusalReason = exports.VipClaimRequest = exports.VipClaimLine = exports.VipCartItemRequest = exports.VipInviteView = exports.VipHero = exports.VipInviteOffer = exports.VipInviteResolveRequest = exports.VipDeliveryRule = exports.VIP_TOKEN_PATTERN = exports.VipInviteRef = void 0;
|
|
4507
4508
|
const zod_1 = requireZod();
|
|
4508
|
-
const common_1 = requireCommon();
|
|
4509
|
-
const ids_1 = requireIds();
|
|
4509
|
+
const common_1 = requireCommon$1();
|
|
4510
|
+
const ids_1 = requireIds$1();
|
|
4510
4511
|
exports.VipInviteRef = (0, ids_1.prefixedId)("vip_", "VipInviteRef");
|
|
4511
4512
|
exports.VIP_TOKEN_PATTERN = /^[A-Za-z0-9_-]{43}$/;
|
|
4512
4513
|
exports.VipDeliveryRule = zod_1.z.enum(["both_free", "standard_free", "both_paid"]);
|
|
@@ -4576,24 +4577,24 @@ function requireVip() {
|
|
|
4576
4577
|
invite_ref: exports.VipInviteRef,
|
|
4577
4578
|
reason: exports.VipClaimRefusalReason
|
|
4578
4579
|
})]);
|
|
4579
|
-
})(vip$
|
|
4580
|
-
return vip$
|
|
4580
|
+
})(vip$2);
|
|
4581
|
+
return vip$2;
|
|
4581
4582
|
}
|
|
4582
|
-
var hasRequiredCart;
|
|
4583
|
-
function requireCart() {
|
|
4584
|
-
if (hasRequiredCart) return cart;
|
|
4585
|
-
hasRequiredCart = 1;
|
|
4583
|
+
var hasRequiredCart$1;
|
|
4584
|
+
function requireCart$1() {
|
|
4585
|
+
if (hasRequiredCart$1) return cart$1;
|
|
4586
|
+
hasRequiredCart$1 = 1;
|
|
4586
4587
|
(function(exports) {
|
|
4587
4588
|
Object.defineProperty(exports, "__esModule", {
|
|
4588
4589
|
value: true
|
|
4589
4590
|
});
|
|
4590
4591
|
exports.PartnerCart = exports.PartnerCartItem = exports.CartHandoffResponse = exports.UpdateCartItemRequest = exports.AddCartItemRequest = exports.CartMarketQuery = exports.Cart = exports.HiddenSummaryLine = exports.CartHold = exports.CartLock = exports.CartLockReason = exports.CartTotals = exports.CartItem = void 0;
|
|
4591
4592
|
const zod_1 = requireZod();
|
|
4592
|
-
const money_1 = requireMoney();
|
|
4593
|
-
const ids_1 = requireIds();
|
|
4594
|
-
const money_2 = requireMoney();
|
|
4595
|
-
const common_1 = requireCommon();
|
|
4596
|
-
const vip_1 = requireVip();
|
|
4593
|
+
const money_1 = requireMoney$1();
|
|
4594
|
+
const ids_1 = requireIds$1();
|
|
4595
|
+
const money_2 = requireMoney$1();
|
|
4596
|
+
const common_1 = requireCommon$1();
|
|
4597
|
+
const vip_1 = requireVip$1();
|
|
4597
4598
|
exports.CartItem = zod_1.z.object({
|
|
4598
4599
|
sku: common_1.Sku,
|
|
4599
4600
|
qty: zod_1.z.number().int().positive(),
|
|
@@ -4606,7 +4607,8 @@ function requireCart() {
|
|
|
4606
4607
|
available: zod_1.z.number().int().nonnegative().optional()
|
|
4607
4608
|
});
|
|
4608
4609
|
exports.CartTotals = common_1.Pricing.extend({
|
|
4609
|
-
discount: money_1.Money.optional()
|
|
4610
|
+
discount: money_1.Money.optional(),
|
|
4611
|
+
subtotal_before_discount: money_1.Money.optional()
|
|
4610
4612
|
});
|
|
4611
4613
|
exports.CartLockReason = zod_1.z.enum(["checkout_handoff"]);
|
|
4612
4614
|
exports.CartLock = zod_1.z.object({
|
|
@@ -4658,21 +4660,21 @@ function requireCart() {
|
|
|
4658
4660
|
locked: exports.CartLock.optional(),
|
|
4659
4661
|
vip_invite_ref: vip_1.VipInviteRef.optional()
|
|
4660
4662
|
});
|
|
4661
|
-
})(cart);
|
|
4662
|
-
return cart;
|
|
4663
|
+
})(cart$1);
|
|
4664
|
+
return cart$1;
|
|
4663
4665
|
}
|
|
4664
|
-
var session = {};
|
|
4665
|
-
var hasRequiredSession;
|
|
4666
|
-
function requireSession() {
|
|
4667
|
-
if (hasRequiredSession) return session;
|
|
4668
|
-
hasRequiredSession = 1;
|
|
4666
|
+
var session$1 = {};
|
|
4667
|
+
var hasRequiredSession$1;
|
|
4668
|
+
function requireSession$1() {
|
|
4669
|
+
if (hasRequiredSession$1) return session$1;
|
|
4670
|
+
hasRequiredSession$1 = 1;
|
|
4669
4671
|
(function(exports) {
|
|
4670
4672
|
Object.defineProperty(exports, "__esModule", {
|
|
4671
4673
|
value: true
|
|
4672
4674
|
});
|
|
4673
4675
|
exports.ShopSessionResponse = exports.ShopSessionProduct = exports.ShopSessionRequest = exports.SessionExchangeResponse = exports.SessionExchangeRequest = void 0;
|
|
4674
4676
|
const zod_1 = requireZod();
|
|
4675
|
-
const ids_1 = requireIds();
|
|
4677
|
+
const ids_1 = requireIds$1();
|
|
4676
4678
|
exports.SessionExchangeRequest = zod_1.z.object({
|
|
4677
4679
|
token: zod_1.z.string().min(1)
|
|
4678
4680
|
}).strict();
|
|
@@ -4695,25 +4697,25 @@ function requireSession() {
|
|
|
4695
4697
|
email: zod_1.z.string().optional(),
|
|
4696
4698
|
product: exports.ShopSessionProduct.nullish()
|
|
4697
4699
|
});
|
|
4698
|
-
})(session);
|
|
4699
|
-
return session;
|
|
4700
|
+
})(session$1);
|
|
4701
|
+
return session$1;
|
|
4700
4702
|
}
|
|
4701
|
-
var orderTracking = {};
|
|
4702
|
-
var orders = {};
|
|
4703
|
-
var hasRequiredOrders;
|
|
4704
|
-
function requireOrders() {
|
|
4705
|
-
if (hasRequiredOrders) return orders;
|
|
4706
|
-
hasRequiredOrders = 1;
|
|
4703
|
+
var orderTracking$1 = {};
|
|
4704
|
+
var orders$1 = {};
|
|
4705
|
+
var hasRequiredOrders$1;
|
|
4706
|
+
function requireOrders$1() {
|
|
4707
|
+
if (hasRequiredOrders$1) return orders$1;
|
|
4708
|
+
hasRequiredOrders$1 = 1;
|
|
4707
4709
|
(function(exports) {
|
|
4708
4710
|
Object.defineProperty(exports, "__esModule", {
|
|
4709
4711
|
value: true
|
|
4710
4712
|
});
|
|
4711
4713
|
exports.OrderIntakeResponse = exports.OrderRefundRequest = exports.RefundReason = exports.OrderCancelRequest = exports.OrderLineAction = exports.CancelReason = exports.OrderPlacedRequest = exports.OrderPaymentSummary = exports.OrderTotals = exports.OrderCustomer = exports.OrderLine = exports.OrderEventEnvelope = void 0;
|
|
4712
4714
|
const zod_1 = requireZod();
|
|
4713
|
-
const money_1 = requireMoney();
|
|
4714
|
-
const ids_1 = requireIds();
|
|
4715
|
-
const common_1 = requireCommon();
|
|
4716
|
-
const vip_1 = requireVip();
|
|
4715
|
+
const money_1 = requireMoney$1();
|
|
4716
|
+
const ids_1 = requireIds$1();
|
|
4717
|
+
const common_1 = requireCommon$1();
|
|
4718
|
+
const vip_1 = requireVip$1();
|
|
4717
4719
|
exports.OrderEventEnvelope = zod_1.z.object({
|
|
4718
4720
|
event_id: ids_1.EventId,
|
|
4719
4721
|
occurred_at: common_1.Timestamp
|
|
@@ -4779,24 +4781,24 @@ function requireOrders() {
|
|
|
4779
4781
|
status: zod_1.z.enum(["accepted", "duplicate"]),
|
|
4780
4782
|
received_at: common_1.Timestamp
|
|
4781
4783
|
});
|
|
4782
|
-
})(orders);
|
|
4783
|
-
return orders;
|
|
4784
|
+
})(orders$1);
|
|
4785
|
+
return orders$1;
|
|
4784
4786
|
}
|
|
4785
|
-
var hasRequiredOrderTracking;
|
|
4786
|
-
function requireOrderTracking() {
|
|
4787
|
-
if (hasRequiredOrderTracking) return orderTracking;
|
|
4788
|
-
hasRequiredOrderTracking = 1;
|
|
4787
|
+
var hasRequiredOrderTracking$1;
|
|
4788
|
+
function requireOrderTracking$1() {
|
|
4789
|
+
if (hasRequiredOrderTracking$1) return orderTracking$1;
|
|
4790
|
+
hasRequiredOrderTracking$1 = 1;
|
|
4789
4791
|
(function(exports) {
|
|
4790
4792
|
Object.defineProperty(exports, "__esModule", {
|
|
4791
4793
|
value: true
|
|
4792
4794
|
});
|
|
4793
4795
|
exports.ReturnDetail = exports.ReturnItem = exports.ReturnProgressEntry = exports.CreateReturnRequest = exports.ReturnRequestItem = exports.RecordedReturnReason = exports.FanReturnReason = exports.RequestCancellationRequest = exports.FanCancelReason = exports.OrderDetail = exports.ReturnSummary = exports.OrderList = exports.ReturnSummaryItem = exports.OrderSummaryItem = exports.ReturnOutcome = exports.ReturnStatus = exports.OrderItem = exports.OrderTracking = exports.OrderProgressEntry = exports.OrderProgressStep = void 0;
|
|
4794
4796
|
const zod_1 = requireZod();
|
|
4795
|
-
const money_1 = requireMoney();
|
|
4796
|
-
const ids_1 = requireIds();
|
|
4797
|
-
const common_1 = requireCommon();
|
|
4798
|
-
const orders_1 = requireOrders();
|
|
4799
|
-
const vip_1 = requireVip();
|
|
4797
|
+
const money_1 = requireMoney$1();
|
|
4798
|
+
const ids_1 = requireIds$1();
|
|
4799
|
+
const common_1 = requireCommon$1();
|
|
4800
|
+
const orders_1 = requireOrders$1();
|
|
4801
|
+
const vip_1 = requireVip$1();
|
|
4800
4802
|
exports.OrderProgressStep = zod_1.z.enum(["packing", "on_its_way", "out_for_delivery", "delivered", "cancelled"]);
|
|
4801
4803
|
exports.OrderProgressEntry = zod_1.z.object({
|
|
4802
4804
|
step: exports.OrderProgressStep,
|
|
@@ -4922,42 +4924,42 @@ function requireOrderTracking() {
|
|
|
4922
4924
|
label_url: common_1.Url.optional(),
|
|
4923
4925
|
label_email: zod_1.z.string().email().optional()
|
|
4924
4926
|
});
|
|
4925
|
-
})(orderTracking);
|
|
4926
|
-
return orderTracking;
|
|
4927
|
+
})(orderTracking$1);
|
|
4928
|
+
return orderTracking$1;
|
|
4927
4929
|
}
|
|
4928
|
-
var stockAlerts = {};
|
|
4929
|
-
var hasRequiredStockAlerts;
|
|
4930
|
-
function requireStockAlerts() {
|
|
4931
|
-
if (hasRequiredStockAlerts) return stockAlerts;
|
|
4932
|
-
hasRequiredStockAlerts = 1;
|
|
4933
|
-
Object.defineProperty(stockAlerts, "__esModule", {
|
|
4930
|
+
var stockAlerts$1 = {};
|
|
4931
|
+
var hasRequiredStockAlerts$1;
|
|
4932
|
+
function requireStockAlerts$1() {
|
|
4933
|
+
if (hasRequiredStockAlerts$1) return stockAlerts$1;
|
|
4934
|
+
hasRequiredStockAlerts$1 = 1;
|
|
4935
|
+
Object.defineProperty(stockAlerts$1, "__esModule", {
|
|
4934
4936
|
value: true
|
|
4935
4937
|
});
|
|
4936
|
-
stockAlerts.StockAlert = stockAlerts.StockAlertRequest = void 0;
|
|
4938
|
+
stockAlerts$1.StockAlert = stockAlerts$1.StockAlertRequest = void 0;
|
|
4937
4939
|
const zod_1 = requireZod();
|
|
4938
|
-
const common_1 = requireCommon();
|
|
4939
|
-
stockAlerts.StockAlertRequest = zod_1.z.object({
|
|
4940
|
+
const common_1 = requireCommon$1();
|
|
4941
|
+
stockAlerts$1.StockAlertRequest = zod_1.z.object({
|
|
4940
4942
|
sku: common_1.Sku
|
|
4941
4943
|
}).strict();
|
|
4942
|
-
stockAlerts.StockAlert = zod_1.z.object({
|
|
4944
|
+
stockAlerts$1.StockAlert = zod_1.z.object({
|
|
4943
4945
|
sku: common_1.Sku,
|
|
4944
4946
|
created_at: common_1.Timestamp,
|
|
4945
4947
|
notified_at: common_1.Timestamp.optional()
|
|
4946
4948
|
});
|
|
4947
|
-
return stockAlerts;
|
|
4949
|
+
return stockAlerts$1;
|
|
4948
4950
|
}
|
|
4949
|
-
var support = {};
|
|
4950
|
-
var hasRequiredSupport;
|
|
4951
|
-
function requireSupport() {
|
|
4952
|
-
if (hasRequiredSupport) return support;
|
|
4953
|
-
hasRequiredSupport = 1;
|
|
4951
|
+
var support$1 = {};
|
|
4952
|
+
var hasRequiredSupport$1;
|
|
4953
|
+
function requireSupport$1() {
|
|
4954
|
+
if (hasRequiredSupport$1) return support$1;
|
|
4955
|
+
hasRequiredSupport$1 = 1;
|
|
4954
4956
|
(function(exports) {
|
|
4955
4957
|
Object.defineProperty(exports, "__esModule", {
|
|
4956
4958
|
value: true
|
|
4957
4959
|
});
|
|
4958
4960
|
exports.SupportAttachment = exports.SupportTicket = exports.SupportTicketRequest = exports.SupportCategory = void 0;
|
|
4959
4961
|
const zod_1 = requireZod();
|
|
4960
|
-
const common_1 = requireCommon();
|
|
4962
|
+
const common_1 = requireCommon$1();
|
|
4961
4963
|
exports.SupportCategory = zod_1.z.string().trim().min(1).max(120);
|
|
4962
4964
|
exports.SupportTicketRequest = zod_1.z.object({
|
|
4963
4965
|
email: zod_1.z.string().email().max(254),
|
|
@@ -4976,14 +4978,14 @@ function requireSupport() {
|
|
|
4976
4978
|
content_type: zod_1.z.string().min(1),
|
|
4977
4979
|
bytes: zod_1.z.number().int().positive()
|
|
4978
4980
|
});
|
|
4979
|
-
})(support);
|
|
4980
|
-
return support;
|
|
4981
|
+
})(support$1);
|
|
4982
|
+
return support$1;
|
|
4981
4983
|
}
|
|
4982
|
-
var errors = {};
|
|
4983
|
-
var hasRequiredErrors;
|
|
4984
|
-
function requireErrors() {
|
|
4985
|
-
if (hasRequiredErrors) return errors;
|
|
4986
|
-
hasRequiredErrors = 1;
|
|
4984
|
+
var errors$1 = {};
|
|
4985
|
+
var hasRequiredErrors$1;
|
|
4986
|
+
function requireErrors$1() {
|
|
4987
|
+
if (hasRequiredErrors$1) return errors$1;
|
|
4988
|
+
hasRequiredErrors$1 = 1;
|
|
4987
4989
|
(function(exports) {
|
|
4988
4990
|
Object.defineProperty(exports, "__esModule", {
|
|
4989
4991
|
value: true
|
|
@@ -5022,29 +5024,29 @@ function requireErrors() {
|
|
|
5022
5024
|
error: exports.ApiErrorBody,
|
|
5023
5025
|
request_id: zod_1.z.string()
|
|
5024
5026
|
});
|
|
5025
|
-
})(errors);
|
|
5026
|
-
return errors;
|
|
5027
|
+
})(errors$1);
|
|
5028
|
+
return errors$1;
|
|
5027
5029
|
}
|
|
5028
|
-
var hasRequiredClient;
|
|
5029
|
-
function requireClient() {
|
|
5030
|
-
if (hasRequiredClient) return client;
|
|
5031
|
-
hasRequiredClient = 1;
|
|
5032
|
-
Object.defineProperty(client, "__esModule", {
|
|
5030
|
+
var hasRequiredClient$1;
|
|
5031
|
+
function requireClient$1() {
|
|
5032
|
+
if (hasRequiredClient$1) return client$1;
|
|
5033
|
+
hasRequiredClient$1 = 1;
|
|
5034
|
+
Object.defineProperty(client$1, "__esModule", {
|
|
5033
5035
|
value: true
|
|
5034
5036
|
});
|
|
5035
|
-
client.DaznApiError = void 0;
|
|
5036
|
-
client.createClient = createClient;
|
|
5037
|
-
const catalog_1 = requireCatalog();
|
|
5038
|
-
const content_1 = requireContent();
|
|
5039
|
-
const storefront_config_1 = requireStorefrontConfig();
|
|
5040
|
-
const inventory_1 = requireInventory();
|
|
5041
|
-
const cart_1 = requireCart();
|
|
5042
|
-
const session_1 = requireSession();
|
|
5043
|
-
const order_tracking_1 = requireOrderTracking();
|
|
5044
|
-
const stock_alerts_1 = requireStockAlerts();
|
|
5045
|
-
const support_1 = requireSupport();
|
|
5046
|
-
const vip_1 = requireVip();
|
|
5047
|
-
const errors_1 = requireErrors();
|
|
5037
|
+
client$1.DaznApiError = void 0;
|
|
5038
|
+
client$1.createClient = createClient;
|
|
5039
|
+
const catalog_1 = requireCatalog$1();
|
|
5040
|
+
const content_1 = requireContent$1();
|
|
5041
|
+
const storefront_config_1 = requireStorefrontConfig$1();
|
|
5042
|
+
const inventory_1 = requireInventory$1();
|
|
5043
|
+
const cart_1 = requireCart$1();
|
|
5044
|
+
const session_1 = requireSession$1();
|
|
5045
|
+
const order_tracking_1 = requireOrderTracking$1();
|
|
5046
|
+
const stock_alerts_1 = requireStockAlerts$1();
|
|
5047
|
+
const support_1 = requireSupport$1();
|
|
5048
|
+
const vip_1 = requireVip$1();
|
|
5049
|
+
const errors_1 = requireErrors$1();
|
|
5048
5050
|
class DaznApiError extends Error {
|
|
5049
5051
|
status;
|
|
5050
5052
|
code;
|
|
@@ -5059,7 +5061,7 @@ function requireClient() {
|
|
|
5059
5061
|
this.body = parsed?.error;
|
|
5060
5062
|
}
|
|
5061
5063
|
}
|
|
5062
|
-
client.DaznApiError = DaznApiError;
|
|
5064
|
+
client$1.DaznApiError = DaznApiError;
|
|
5063
5065
|
function buildQuery(query) {
|
|
5064
5066
|
if (!query) return "";
|
|
5065
5067
|
const params = new URLSearchParams();
|
|
@@ -5308,9 +5310,9 @@ function requireClient() {
|
|
|
5308
5310
|
}
|
|
5309
5311
|
};
|
|
5310
5312
|
}
|
|
5311
|
-
return client;
|
|
5313
|
+
return client$1;
|
|
5312
5314
|
}
|
|
5313
|
-
var clientExports = requireClient();
|
|
5315
|
+
var clientExports = requireClient$1();
|
|
5314
5316
|
const TOP = {
|
|
5315
5317
|
doc: 0,
|
|
5316
5318
|
pane: 0
|
|
@@ -6527,6 +6529,7 @@ const ES = {
|
|
|
6527
6529
|
Select: "Seleccionar",
|
|
6528
6530
|
Shop: "Tienda",
|
|
6529
6531
|
"Scroll down for more": "Desplázate hacia abajo para ver más",
|
|
6532
|
+
"Limited edition": "Edición limitada",
|
|
6530
6533
|
Previous: "Anterior",
|
|
6531
6534
|
Next: "Siguiente",
|
|
6532
6535
|
"Claim yours": "Consigue el tuyo",
|
|
@@ -6546,7 +6549,8 @@ const ES = {
|
|
|
6546
6549
|
"Return #{0}": "Devolución n.º {0}",
|
|
6547
6550
|
"Return reported": "Devolución notificada",
|
|
6548
6551
|
"Return received": "Devolución recibida",
|
|
6549
|
-
"Return completed": "Devolución completada"
|
|
6552
|
+
"Return completed": "Devolución completada",
|
|
6553
|
+
"Your session has timed out. Please try again.": "Tu sesión ha caducado. Inténtalo de nuevo."
|
|
6550
6554
|
};
|
|
6551
6555
|
const CATALOGUES = {
|
|
6552
6556
|
es: ES
|
|
@@ -7406,6 +7410,11 @@ function OrderSummary({ pricing, deferred = [], hidden = [], rows = CART_ROWS, d
|
|
|
7406
7410
|
const { format } = useMoney();
|
|
7407
7411
|
const isDeferred = (key) => deferred.includes(key);
|
|
7408
7412
|
const visible = rows.filter((row2) => !hidden.includes(row2.key)).filter((row2) => row2.key !== "discount" || discount2 !== void 0).filter((row2) => !collapsible || expanded || row2.key === "shipping" || row2.key === "total");
|
|
7413
|
+
const drawsDiscount = discount2 !== void 0 && rows.some((row2) => row2.key === "discount");
|
|
7414
|
+
const shown = drawsDiscount && pricing.subtotal_before_discount ? {
|
|
7415
|
+
...pricing,
|
|
7416
|
+
subtotal: pricing.subtotal_before_discount
|
|
7417
|
+
} : pricing;
|
|
7409
7418
|
return jsx("dl", {
|
|
7410
7419
|
className: styles$M.summary,
|
|
7411
7420
|
children: visible.map(({ label: label2, key }) => {
|
|
@@ -7446,7 +7455,7 @@ function OrderSummary({ pricing, deferred = [], hidden = [], rows = CART_ROWS, d
|
|
|
7446
7455
|
}) : t(label2)
|
|
7447
7456
|
}), jsx("dd", {
|
|
7448
7457
|
className: pending2 ? styles$M.pending : void 0,
|
|
7449
|
-
children: pending2 ? t("Calculated at checkout") : renderValue(key,
|
|
7458
|
+
children: pending2 ? t("Calculated at checkout") : renderValue(key, shown, format, t)
|
|
7450
7459
|
})]
|
|
7451
7460
|
}, key);
|
|
7452
7461
|
})
|
|
@@ -7699,7 +7708,8 @@ function SheetHeader({ onClose, closeLabel }) {
|
|
|
7699
7708
|
className: styles$K.handleSlot,
|
|
7700
7709
|
"aria-hidden": "true",
|
|
7701
7710
|
children: jsx("div", {
|
|
7702
|
-
className: styles$K.handle
|
|
7711
|
+
className: styles$K.handle,
|
|
7712
|
+
"data-sheet-handle": ""
|
|
7703
7713
|
})
|
|
7704
7714
|
}), jsx("button", {
|
|
7705
7715
|
type: "button",
|
|
@@ -8981,7 +8991,7 @@ const cancelledMeta = "_cancelledMeta_18zlk_241";
|
|
|
8981
8991
|
const aside$1 = "_aside_18zlk_249";
|
|
8982
8992
|
const cancelledMain = "_cancelledMain_18zlk_250";
|
|
8983
8993
|
const wide$3 = "_wide_18zlk_255";
|
|
8984
|
-
const vip = "_vip_18zlk_305";
|
|
8994
|
+
const vip$1 = "_vip_18zlk_305";
|
|
8985
8995
|
const reorder = "_reorder_18zlk_312";
|
|
8986
8996
|
const cancelledSub = "_cancelledSub_18zlk_320";
|
|
8987
8997
|
const dot$3 = "_dot_18zlk_332";
|
|
@@ -9005,7 +9015,7 @@ const styles$D = {
|
|
|
9005
9015
|
aside: aside$1,
|
|
9006
9016
|
cancelledMain,
|
|
9007
9017
|
wide: wide$3,
|
|
9008
|
-
vip,
|
|
9018
|
+
vip: vip$1,
|
|
9009
9019
|
reorder,
|
|
9010
9020
|
cancelledSub,
|
|
9011
9021
|
dot: dot$3
|
|
@@ -10212,10 +10222,10 @@ const styles$y = {
|
|
|
10212
10222
|
large,
|
|
10213
10223
|
swatchSlot
|
|
10214
10224
|
};
|
|
10215
|
-
function ProductTile({ product, priority, size = "default" }) {
|
|
10225
|
+
function ProductTile({ product, priority, size = "default", flag }) {
|
|
10216
10226
|
const image2 = product.media[0];
|
|
10217
10227
|
const anyInStock = product.variants.length === 0 ? true : product.variants.some((v) => v.in_stock);
|
|
10218
|
-
const topBadge2 = product.badges?.[0];
|
|
10228
|
+
const topBadge2 = flag ?? product.badges?.[0];
|
|
10219
10229
|
const pct = discountPct(product.price, product.compare_at);
|
|
10220
10230
|
const t = useT();
|
|
10221
10231
|
return jsxs(ShopLink, {
|
|
@@ -10999,16 +11009,17 @@ function StickyCtaBar({ children, info: info2, variant = "floating", className }
|
|
|
10999
11009
|
})]
|
|
11000
11010
|
});
|
|
11001
11011
|
}
|
|
11002
|
-
const surface = "
|
|
11003
|
-
const screen = "
|
|
11004
|
-
const body$4 = "
|
|
11005
|
-
const items = "
|
|
11006
|
-
const sectionHeader = "
|
|
11007
|
-
const sectionTitle = "
|
|
11008
|
-
const count = "
|
|
11009
|
-
const lines = "
|
|
11010
|
-
const footer = "
|
|
11011
|
-
const cta$4 = "
|
|
11012
|
+
const surface = "_surface_qvckt_15";
|
|
11013
|
+
const screen = "_screen_qvckt_20";
|
|
11014
|
+
const body$4 = "_body_qvckt_12";
|
|
11015
|
+
const items = "_items_qvckt_34";
|
|
11016
|
+
const sectionHeader = "_sectionHeader_qvckt_40";
|
|
11017
|
+
const sectionTitle = "_sectionTitle_qvckt_46";
|
|
11018
|
+
const count = "_count_qvckt_67";
|
|
11019
|
+
const lines = "_lines_qvckt_91";
|
|
11020
|
+
const footer = "_footer_qvckt_101";
|
|
11021
|
+
const cta$4 = "_cta_qvckt_127";
|
|
11022
|
+
const ctaError = "_ctaError_qvckt_135";
|
|
11012
11023
|
const styles$o = {
|
|
11013
11024
|
surface,
|
|
11014
11025
|
screen,
|
|
@@ -11019,7 +11030,8 @@ const styles$o = {
|
|
|
11019
11030
|
count,
|
|
11020
11031
|
lines,
|
|
11021
11032
|
footer,
|
|
11022
|
-
cta: cta$4
|
|
11033
|
+
cta: cta$4,
|
|
11034
|
+
ctaError
|
|
11023
11035
|
};
|
|
11024
11036
|
function CartView(props = {}) {
|
|
11025
11037
|
const t = useT();
|
|
@@ -11049,6 +11061,7 @@ function CartViewContent({ onContinueShopping, checkoutLabel } = {}) {
|
|
|
11049
11061
|
const wide2 = useDesktopLayout();
|
|
11050
11062
|
const panelSummary = useInSidePanel() && wide2;
|
|
11051
11063
|
const [handingOff, setHandingOff] = useState(false);
|
|
11064
|
+
const [sessionLapsed, setSessionLapsed] = useState(false);
|
|
11052
11065
|
const load = useCallback(async () => {
|
|
11053
11066
|
if (!carts?.get()) setState("loading");
|
|
11054
11067
|
try {
|
|
@@ -11182,6 +11195,7 @@ function CartViewContent({ onContinueShopping, checkoutLabel } = {}) {
|
|
|
11182
11195
|
async function handOff(current2) {
|
|
11183
11196
|
messageToNative("showLoader");
|
|
11184
11197
|
setHandingOff(true);
|
|
11198
|
+
setSessionLapsed(false);
|
|
11185
11199
|
try {
|
|
11186
11200
|
const { checkout_url } = await api.cart.handoff();
|
|
11187
11201
|
emit({
|
|
@@ -11192,7 +11206,15 @@ function CartViewContent({ onContinueShopping, checkoutLabel } = {}) {
|
|
|
11192
11206
|
window.location.assign(checkout_url);
|
|
11193
11207
|
} catch (err) {
|
|
11194
11208
|
const code = codeOf(err);
|
|
11195
|
-
|
|
11209
|
+
if (isUnauthorized(err)) {
|
|
11210
|
+
emit({
|
|
11211
|
+
type: "session_required",
|
|
11212
|
+
action: "checkout"
|
|
11213
|
+
});
|
|
11214
|
+
setSessionLapsed(true);
|
|
11215
|
+
} else {
|
|
11216
|
+
toast2.show(t(treatmentFor(code).body), "critical");
|
|
11217
|
+
}
|
|
11196
11218
|
setHandingOff(false);
|
|
11197
11219
|
}
|
|
11198
11220
|
}
|
|
@@ -11248,6 +11270,13 @@ function CartViewContent({ onContinueShopping, checkoutLabel } = {}) {
|
|
|
11248
11270
|
}), jsx(StickyCtaBar, {
|
|
11249
11271
|
variant: "divider",
|
|
11250
11272
|
className: styles$o.cta,
|
|
11273
|
+
...sessionLapsed ? {
|
|
11274
|
+
info: jsx("p", {
|
|
11275
|
+
className: styles$o.ctaError,
|
|
11276
|
+
role: "alert",
|
|
11277
|
+
children: t("Your session has timed out. Please try again.")
|
|
11278
|
+
})
|
|
11279
|
+
} : {},
|
|
11251
11280
|
children: jsx(Button, {
|
|
11252
11281
|
variant: "primary",
|
|
11253
11282
|
onClick: () => void handOff(cart2),
|
|
@@ -11464,31 +11493,31 @@ function DesktopGallery({ media: media2, alt, badges: badges2, focus }) {
|
|
|
11464
11493
|
})]
|
|
11465
11494
|
});
|
|
11466
11495
|
}
|
|
11467
|
-
const scrim$3 = "
|
|
11468
|
-
const sheet$1 = "
|
|
11469
|
-
const body$3 = "
|
|
11470
|
-
const titles = "
|
|
11471
|
-
const title$b = "
|
|
11472
|
-
const subtitle$4 = "
|
|
11473
|
-
const units = "
|
|
11474
|
-
const unit = "
|
|
11475
|
-
const unitOn = "
|
|
11476
|
-
const unitOff = "
|
|
11477
|
-
const tableWrap = "
|
|
11478
|
-
const table = "
|
|
11479
|
-
const col = "
|
|
11480
|
-
const colEdge = "
|
|
11481
|
-
const note = "
|
|
11482
|
-
const how = "
|
|
11483
|
-
const howTitle = "
|
|
11484
|
-
const howList = "
|
|
11485
|
-
const howItem = "
|
|
11486
|
-
const howLabel = "
|
|
11487
|
-
const howText = "
|
|
11488
|
-
const fabric = "
|
|
11489
|
-
const fabricLabel = "
|
|
11490
|
-
const fabricText = "
|
|
11491
|
-
const notes = "
|
|
11496
|
+
const scrim$3 = "_scrim_n0uqj_8";
|
|
11497
|
+
const sheet$1 = "_sheet_n0uqj_2";
|
|
11498
|
+
const body$3 = "_body_n0uqj_40";
|
|
11499
|
+
const titles = "_titles_n0uqj_67";
|
|
11500
|
+
const title$b = "_title_n0uqj_67";
|
|
11501
|
+
const subtitle$4 = "_subtitle_n0uqj_83";
|
|
11502
|
+
const units = "_units_n0uqj_96";
|
|
11503
|
+
const unit = "_unit_n0uqj_96";
|
|
11504
|
+
const unitOn = "_unitOn_n0uqj_130";
|
|
11505
|
+
const unitOff = "_unitOff_n0uqj_138";
|
|
11506
|
+
const tableWrap = "_tableWrap_n0uqj_147";
|
|
11507
|
+
const table = "_table_n0uqj_147";
|
|
11508
|
+
const col = "_col_n0uqj_179";
|
|
11509
|
+
const colEdge = "_colEdge_n0uqj_183";
|
|
11510
|
+
const note = "_note_n0uqj_251";
|
|
11511
|
+
const how = "_how_n0uqj_263";
|
|
11512
|
+
const howTitle = "_howTitle_n0uqj_269";
|
|
11513
|
+
const howList = "_howList_n0uqj_277";
|
|
11514
|
+
const howItem = "_howItem_n0uqj_284";
|
|
11515
|
+
const howLabel = "_howLabel_n0uqj_309";
|
|
11516
|
+
const howText = "_howText_n0uqj_319";
|
|
11517
|
+
const fabric = "_fabric_n0uqj_328";
|
|
11518
|
+
const fabricLabel = "_fabricLabel_n0uqj_336";
|
|
11519
|
+
const fabricText = "_fabricText_n0uqj_344";
|
|
11520
|
+
const notes = "_notes_n0uqj_355";
|
|
11492
11521
|
const styles$k = {
|
|
11493
11522
|
scrim: scrim$3,
|
|
11494
11523
|
sheet: sheet$1,
|
|
@@ -12041,7 +12070,7 @@ function PromoBanner({ promo: promo2 }) {
|
|
|
12041
12070
|
});
|
|
12042
12071
|
}
|
|
12043
12072
|
const page = "_page_5si5d_1";
|
|
12044
|
-
const content = "_content_5si5d_14";
|
|
12073
|
+
const content$1 = "_content_5si5d_14";
|
|
12045
12074
|
const intro = "_intro_5si5d_21";
|
|
12046
12075
|
const productInfo = "_productInfo_5si5d_28";
|
|
12047
12076
|
const titlePrice = "_titlePrice_5si5d_34";
|
|
@@ -12061,7 +12090,7 @@ const cta$3 = "_cta_5si5d_128";
|
|
|
12061
12090
|
const shop = "_shop_5si5d_145";
|
|
12062
12091
|
const styles$e = {
|
|
12063
12092
|
page,
|
|
12064
|
-
content,
|
|
12093
|
+
content: content$1,
|
|
12065
12094
|
intro,
|
|
12066
12095
|
productInfo,
|
|
12067
12096
|
titlePrice,
|
|
@@ -12837,15 +12866,16 @@ function ClaimScreenNav({ crumbs: crumbs2, tone }) {
|
|
|
12837
12866
|
useSetScreenNav(crumbs2, tone);
|
|
12838
12867
|
return null;
|
|
12839
12868
|
}
|
|
12840
|
-
const pcp = "
|
|
12841
|
-
const blocks = "
|
|
12842
|
-
const featured = "
|
|
12843
|
-
const gridBlock = "
|
|
12844
|
-
const blockTitle = "
|
|
12845
|
-
const grid = "
|
|
12846
|
-
const block = "
|
|
12847
|
-
const phoneOnly$2 = "
|
|
12848
|
-
const wideOnly$1 = "
|
|
12869
|
+
const pcp = "_pcp_1x54p_6";
|
|
12870
|
+
const blocks = "_blocks_1x54p_24";
|
|
12871
|
+
const featured = "_featured_1x54p_36";
|
|
12872
|
+
const gridBlock = "_gridBlock_1x54p_37";
|
|
12873
|
+
const blockTitle = "_blockTitle_1x54p_44";
|
|
12874
|
+
const grid = "_grid_1x54p_37";
|
|
12875
|
+
const block = "_block_1x54p_24";
|
|
12876
|
+
const phoneOnly$2 = "_phoneOnly_1x54p_65";
|
|
12877
|
+
const wideOnly$1 = "_wideOnly_1x54p_69";
|
|
12878
|
+
const wideItem = "_wideItem_1x54p_111";
|
|
12849
12879
|
const styles$6 = {
|
|
12850
12880
|
pcp,
|
|
12851
12881
|
blocks,
|
|
@@ -12855,9 +12885,10 @@ const styles$6 = {
|
|
|
12855
12885
|
grid,
|
|
12856
12886
|
block,
|
|
12857
12887
|
phoneOnly: phoneOnly$2,
|
|
12858
|
-
wideOnly: wideOnly$1
|
|
12888
|
+
wideOnly: wideOnly$1,
|
|
12889
|
+
wideItem
|
|
12859
12890
|
};
|
|
12860
|
-
function Block({ block: block2 }) {
|
|
12891
|
+
function Block({ block: block2, lead = [] }) {
|
|
12861
12892
|
const t = useT();
|
|
12862
12893
|
switch (block2.kind) {
|
|
12863
12894
|
case "rail":
|
|
@@ -12899,13 +12930,21 @@ function Block({ block: block2 }) {
|
|
|
12899
12930
|
children: [block2.title && jsx("h2", {
|
|
12900
12931
|
className: styles$6.blockTitle,
|
|
12901
12932
|
children: t(block2.title)
|
|
12902
|
-
}),
|
|
12933
|
+
}), jsxs("ul", {
|
|
12903
12934
|
className: styles$6.grid,
|
|
12904
|
-
children:
|
|
12935
|
+
children: [lead.map(({ product, flag }) => jsx("li", {
|
|
12936
|
+
className: styles$6.wideItem,
|
|
12937
|
+
children: jsx(ProductTile, {
|
|
12938
|
+
product,
|
|
12939
|
+
...flag ? {
|
|
12940
|
+
flag: t(flag)
|
|
12941
|
+
} : {}
|
|
12942
|
+
})
|
|
12943
|
+
}, product.sku)), block2.products.map((p) => jsx("li", {
|
|
12905
12944
|
children: jsx(ProductTile, {
|
|
12906
12945
|
product: p
|
|
12907
12946
|
})
|
|
12908
|
-
}, p.sku))
|
|
12947
|
+
}, p.sku))]
|
|
12909
12948
|
})]
|
|
12910
12949
|
});
|
|
12911
12950
|
case "review":
|
|
@@ -12937,6 +12976,28 @@ function Block({ block: block2 }) {
|
|
|
12937
12976
|
}
|
|
12938
12977
|
}
|
|
12939
12978
|
const PHONE_ONLY_KINDS = /* @__PURE__ */ new Set(["rail", "product_gallery", "featured", "why_us"]);
|
|
12979
|
+
function leadOf(blocks2, grid2) {
|
|
12980
|
+
const target = blocks2[grid2];
|
|
12981
|
+
if (!target || target.kind !== "grid") return [];
|
|
12982
|
+
const seen = new Set(target.products.map((p) => p.sku));
|
|
12983
|
+
const lead = [];
|
|
12984
|
+
const add = (product, flag) => {
|
|
12985
|
+
if (seen.has(product.sku)) return;
|
|
12986
|
+
seen.add(product.sku);
|
|
12987
|
+
lead.push(flag ? {
|
|
12988
|
+
product,
|
|
12989
|
+
flag
|
|
12990
|
+
} : {
|
|
12991
|
+
product
|
|
12992
|
+
});
|
|
12993
|
+
};
|
|
12994
|
+
for (const block2 of blocks2) {
|
|
12995
|
+
if (block2.kind === "product_gallery") add(block2.product, block2.title || void 0);
|
|
12996
|
+
else if (block2.kind === "featured") add(block2.product);
|
|
12997
|
+
else if (block2.kind === "rail") block2.products.forEach((p) => add(p));
|
|
12998
|
+
}
|
|
12999
|
+
return lead;
|
|
13000
|
+
}
|
|
12940
13001
|
function statementIndex(blocks2) {
|
|
12941
13002
|
const image2 = blocks2.findIndex((b) => b.kind === "lifestyle_image");
|
|
12942
13003
|
if (image2 > 0 && blocks2[image2 - 1]?.kind === "lifestyle_text") return image2 - 1;
|
|
@@ -12957,6 +13018,8 @@ function CategoryNav({ title: title2 }) {
|
|
|
12957
13018
|
}
|
|
12958
13019
|
function CategoryContent({ page: page2 }) {
|
|
12959
13020
|
const statement = statementIndex(page2.blocks);
|
|
13021
|
+
const grid2 = page2.blocks.findIndex((b) => b.kind === "grid");
|
|
13022
|
+
const lead = leadOf(page2.blocks, grid2);
|
|
12960
13023
|
return jsxs(ShopSurface, {
|
|
12961
13024
|
tone: "dark",
|
|
12962
13025
|
fill: true,
|
|
@@ -12972,7 +13035,10 @@ function CategoryContent({ page: page2 }) {
|
|
|
12972
13035
|
className: styles$6.block,
|
|
12973
13036
|
"data-wide": PHONE_ONLY_KINDS.has(block2.kind) || block2.kind === "lifestyle_text" && i !== statement ? "off" : "on",
|
|
12974
13037
|
children: jsx(Block, {
|
|
12975
|
-
block: block2
|
|
13038
|
+
block: block2,
|
|
13039
|
+
...i === grid2 ? {
|
|
13040
|
+
lead
|
|
13041
|
+
} : {}
|
|
12976
13042
|
})
|
|
12977
13043
|
}, i))
|
|
12978
13044
|
})]
|
|
@@ -13145,71 +13211,1483 @@ function ProductView({ sku, initialData, showRecommendations = true, onNotFound
|
|
|
13145
13211
|
})
|
|
13146
13212
|
});
|
|
13147
13213
|
}
|
|
13148
|
-
|
|
13149
|
-
|
|
13150
|
-
|
|
13151
|
-
|
|
13152
|
-
|
|
13153
|
-
|
|
13154
|
-
|
|
13155
|
-
|
|
13156
|
-
|
|
13157
|
-
|
|
13158
|
-
|
|
13159
|
-
const
|
|
13160
|
-
|
|
13161
|
-
|
|
13162
|
-
|
|
13163
|
-
|
|
13164
|
-
|
|
13165
|
-
|
|
13166
|
-
|
|
13167
|
-
|
|
13168
|
-
|
|
13169
|
-
|
|
13170
|
-
|
|
13171
|
-
|
|
13172
|
-
|
|
13173
|
-
|
|
13174
|
-
|
|
13175
|
-
|
|
13176
|
-
|
|
13177
|
-
|
|
13178
|
-
|
|
13179
|
-
|
|
13180
|
-
|
|
13181
|
-
|
|
13182
|
-
|
|
13183
|
-
|
|
13184
|
-
|
|
13185
|
-
|
|
13186
|
-
|
|
13187
|
-
|
|
13188
|
-
|
|
13189
|
-
|
|
13190
|
-
|
|
13191
|
-
|
|
13192
|
-
|
|
13193
|
-
|
|
13194
|
-
|
|
13195
|
-
|
|
13196
|
-
|
|
13197
|
-
|
|
13198
|
-
|
|
13199
|
-
|
|
13200
|
-
|
|
13201
|
-
|
|
13202
|
-
|
|
13203
|
-
|
|
13204
|
-
|
|
13205
|
-
|
|
13206
|
-
|
|
13207
|
-
|
|
13208
|
-
|
|
13209
|
-
|
|
13210
|
-
|
|
13211
|
-
|
|
13212
|
-
|
|
13214
|
+
var dist = {};
|
|
13215
|
+
var money = {};
|
|
13216
|
+
var hasRequiredMoney;
|
|
13217
|
+
function requireMoney() {
|
|
13218
|
+
if (hasRequiredMoney) return money;
|
|
13219
|
+
hasRequiredMoney = 1;
|
|
13220
|
+
(function(exports) {
|
|
13221
|
+
Object.defineProperty(exports, "__esModule", {
|
|
13222
|
+
value: true
|
|
13223
|
+
});
|
|
13224
|
+
exports.Money = exports.Currency = void 0;
|
|
13225
|
+
const zod_1 = requireZod();
|
|
13226
|
+
exports.Currency = zod_1.z.string().regex(/^[A-Z]{3}$/, "currency must be an ISO-4217 alpha-3 code (e.g. GBP)");
|
|
13227
|
+
exports.Money = zod_1.z.object({
|
|
13228
|
+
amount: zod_1.z.number().int("amount must be an integer number of minor units (no floats)"),
|
|
13229
|
+
currency: exports.Currency
|
|
13230
|
+
}).strict();
|
|
13231
|
+
})(money);
|
|
13232
|
+
return money;
|
|
13233
|
+
}
|
|
13234
|
+
var ids = {};
|
|
13235
|
+
var hasRequiredIds;
|
|
13236
|
+
function requireIds() {
|
|
13237
|
+
if (hasRequiredIds) return ids;
|
|
13238
|
+
hasRequiredIds = 1;
|
|
13239
|
+
Object.defineProperty(ids, "__esModule", {
|
|
13240
|
+
value: true
|
|
13241
|
+
});
|
|
13242
|
+
ids.RequestId = ids.EventId = ids.OrderRef = ids.CheckoutId = ids.CartId = ids.UserId = void 0;
|
|
13243
|
+
ids.prefixedId = prefixedId;
|
|
13244
|
+
const zod_1 = requireZod();
|
|
13245
|
+
function prefixedId(prefix, _brand) {
|
|
13246
|
+
return zod_1.z.string().regex(new RegExp(`^${prefix}[A-Za-z0-9._-]+$`), `must be a '${prefix}…' identifier`).brand();
|
|
13247
|
+
}
|
|
13248
|
+
ids.UserId = prefixedId("usr_");
|
|
13249
|
+
ids.CartId = prefixedId("cart_");
|
|
13250
|
+
ids.CheckoutId = prefixedId("chk_");
|
|
13251
|
+
ids.OrderRef = zod_1.z.string().regex(/^(?:ord_[A-Za-z0-9._-]+|\d+)$/, "must be an 'ord_…' identifier or a numeric order reference").brand();
|
|
13252
|
+
ids.EventId = prefixedId("evt_");
|
|
13253
|
+
ids.RequestId = prefixedId("req_");
|
|
13254
|
+
return ids;
|
|
13255
|
+
}
|
|
13256
|
+
var common = {};
|
|
13257
|
+
var hasRequiredCommon;
|
|
13258
|
+
function requireCommon() {
|
|
13259
|
+
if (hasRequiredCommon) return common;
|
|
13260
|
+
hasRequiredCommon = 1;
|
|
13261
|
+
(function(exports) {
|
|
13262
|
+
Object.defineProperty(exports, "__esModule", {
|
|
13263
|
+
value: true
|
|
13264
|
+
});
|
|
13265
|
+
exports.Pricing = exports.Address = exports.PaginationParams = exports.Page = exports.Attributes = exports.MarketQuery = exports.LanguageTag = exports.CountryCode = exports.Sku = exports.Url = exports.Timestamp = void 0;
|
|
13266
|
+
const zod_1 = requireZod();
|
|
13267
|
+
const money_1 = requireMoney();
|
|
13268
|
+
exports.Timestamp = zod_1.z.string().datetime({
|
|
13269
|
+
offset: true
|
|
13270
|
+
});
|
|
13271
|
+
exports.Url = zod_1.z.string().url();
|
|
13272
|
+
exports.Sku = zod_1.z.string().min(1);
|
|
13273
|
+
exports.CountryCode = zod_1.z.string().regex(/^[A-Z]{2}$/, "country must be an ISO-3166-1 alpha-2 code (e.g. GB)");
|
|
13274
|
+
exports.LanguageTag = zod_1.z.string().regex(/^[a-z]{2}(-[A-Z]{2})?$/, "lang must be an IETF language tag (e.g. en, es, en-GB)");
|
|
13275
|
+
exports.MarketQuery = zod_1.z.object({
|
|
13276
|
+
country: exports.CountryCode.optional(),
|
|
13277
|
+
lang: exports.LanguageTag.optional()
|
|
13278
|
+
});
|
|
13279
|
+
exports.Attributes = zod_1.z.record(zod_1.z.string(), zod_1.z.string());
|
|
13280
|
+
exports.Page = zod_1.z.object({
|
|
13281
|
+
cursor: zod_1.z.string().nullable(),
|
|
13282
|
+
has_more: zod_1.z.boolean()
|
|
13283
|
+
});
|
|
13284
|
+
exports.PaginationParams = zod_1.z.object({
|
|
13285
|
+
cursor: zod_1.z.string().optional(),
|
|
13286
|
+
limit: zod_1.z.number().int().positive().max(100).optional()
|
|
13287
|
+
});
|
|
13288
|
+
exports.Address = zod_1.z.object({
|
|
13289
|
+
name: zod_1.z.string().min(1),
|
|
13290
|
+
line1: zod_1.z.string().min(1),
|
|
13291
|
+
line2: zod_1.z.string().optional(),
|
|
13292
|
+
city: zod_1.z.string().min(1),
|
|
13293
|
+
region: zod_1.z.string().optional(),
|
|
13294
|
+
postcode: zod_1.z.string().min(1),
|
|
13295
|
+
country: exports.CountryCode
|
|
13296
|
+
});
|
|
13297
|
+
exports.Pricing = zod_1.z.object({
|
|
13298
|
+
subtotal: money_1.Money,
|
|
13299
|
+
shipping: money_1.Money,
|
|
13300
|
+
tax: money_1.Money,
|
|
13301
|
+
total: money_1.Money
|
|
13302
|
+
});
|
|
13303
|
+
})(common);
|
|
13304
|
+
return common;
|
|
13305
|
+
}
|
|
13306
|
+
var session = {};
|
|
13307
|
+
var hasRequiredSession;
|
|
13308
|
+
function requireSession() {
|
|
13309
|
+
if (hasRequiredSession) return session;
|
|
13310
|
+
hasRequiredSession = 1;
|
|
13311
|
+
(function(exports) {
|
|
13312
|
+
Object.defineProperty(exports, "__esModule", {
|
|
13313
|
+
value: true
|
|
13314
|
+
});
|
|
13315
|
+
exports.ShopSessionResponse = exports.ShopSessionProduct = exports.ShopSessionRequest = exports.SessionExchangeResponse = exports.SessionExchangeRequest = void 0;
|
|
13316
|
+
const zod_1 = requireZod();
|
|
13317
|
+
const ids_1 = requireIds();
|
|
13318
|
+
exports.SessionExchangeRequest = zod_1.z.object({
|
|
13319
|
+
token: zod_1.z.string().min(1)
|
|
13320
|
+
}).strict();
|
|
13321
|
+
exports.SessionExchangeResponse = zod_1.z.object({
|
|
13322
|
+
user_id: ids_1.UserId
|
|
13323
|
+
});
|
|
13324
|
+
exports.ShopSessionRequest = zod_1.z.object({
|
|
13325
|
+
session: zod_1.z.string().min(1),
|
|
13326
|
+
code: zod_1.z.string().min(1)
|
|
13327
|
+
}).strict();
|
|
13328
|
+
exports.ShopSessionProduct = zod_1.z.object({
|
|
13329
|
+
id: zod_1.z.string(),
|
|
13330
|
+
vendor_id: zod_1.z.string(),
|
|
13331
|
+
title: zod_1.z.string()
|
|
13332
|
+
});
|
|
13333
|
+
exports.ShopSessionResponse = zod_1.z.object({
|
|
13334
|
+
shop_session_id: zod_1.z.string(),
|
|
13335
|
+
session_token: zod_1.z.string(),
|
|
13336
|
+
expires_at: zod_1.z.number().int(),
|
|
13337
|
+
email: zod_1.z.string().optional(),
|
|
13338
|
+
product: exports.ShopSessionProduct.nullish()
|
|
13339
|
+
});
|
|
13340
|
+
})(session);
|
|
13341
|
+
return session;
|
|
13342
|
+
}
|
|
13343
|
+
var catalog = {};
|
|
13344
|
+
var hasRequiredCatalog;
|
|
13345
|
+
function requireCatalog() {
|
|
13346
|
+
if (hasRequiredCatalog) return catalog;
|
|
13347
|
+
hasRequiredCatalog = 1;
|
|
13348
|
+
(function(exports) {
|
|
13349
|
+
Object.defineProperty(exports, "__esModule", {
|
|
13350
|
+
value: true
|
|
13351
|
+
});
|
|
13352
|
+
exports.CatalogReadQuery = exports.ListProductsQuery = exports.RecommendationsResponse = exports.ProductListResponse = exports.Product = exports.SizeGuide = exports.SizeGuideMeasurement = exports.SizeChartUnit = exports.ProductPromo = exports.ProductVariant = void 0;
|
|
13353
|
+
const zod_1 = requireZod();
|
|
13354
|
+
const money_1 = requireMoney();
|
|
13355
|
+
const common_1 = requireCommon();
|
|
13356
|
+
exports.ProductVariant = zod_1.z.object({
|
|
13357
|
+
sku: common_1.Sku,
|
|
13358
|
+
attributes: common_1.Attributes,
|
|
13359
|
+
in_stock: zod_1.z.boolean(),
|
|
13360
|
+
image: common_1.Url.optional(),
|
|
13361
|
+
available: zod_1.z.number().int().nonnegative().optional()
|
|
13362
|
+
});
|
|
13363
|
+
exports.ProductPromo = zod_1.z.object({
|
|
13364
|
+
message: zod_1.z.string(),
|
|
13365
|
+
ends_at: common_1.Timestamp.optional()
|
|
13366
|
+
});
|
|
13367
|
+
exports.SizeChartUnit = zod_1.z.enum(["cm", "in"]);
|
|
13368
|
+
exports.SizeGuideMeasurement = zod_1.z.object({
|
|
13369
|
+
label: zod_1.z.string().min(1),
|
|
13370
|
+
description: zod_1.z.string().min(1)
|
|
13371
|
+
});
|
|
13372
|
+
exports.SizeGuide = zod_1.z.object({
|
|
13373
|
+
title: zod_1.z.string(),
|
|
13374
|
+
subtitle: zod_1.z.string().min(1).optional(),
|
|
13375
|
+
columns: zod_1.z.array(zod_1.z.string()).optional(),
|
|
13376
|
+
rows: zod_1.z.array(zod_1.z.array(zod_1.z.string())).optional(),
|
|
13377
|
+
unit: exports.SizeChartUnit.optional(),
|
|
13378
|
+
note: zod_1.z.string().min(1).optional(),
|
|
13379
|
+
measurements: zod_1.z.array(exports.SizeGuideMeasurement).optional(),
|
|
13380
|
+
fabric: zod_1.z.string().min(1).optional(),
|
|
13381
|
+
notes: zod_1.z.array(zod_1.z.string()).optional()
|
|
13382
|
+
});
|
|
13383
|
+
exports.Product = zod_1.z.object({
|
|
13384
|
+
sku: common_1.Sku,
|
|
13385
|
+
title: zod_1.z.string(),
|
|
13386
|
+
category: zod_1.z.string(),
|
|
13387
|
+
price: money_1.Money,
|
|
13388
|
+
compare_at: money_1.Money.optional(),
|
|
13389
|
+
media: zod_1.z.array(common_1.Url),
|
|
13390
|
+
media_by_colour: zod_1.z.record(zod_1.z.string(), zod_1.z.array(common_1.Url)).optional(),
|
|
13391
|
+
variants: zod_1.z.array(exports.ProductVariant),
|
|
13392
|
+
description: zod_1.z.string().optional(),
|
|
13393
|
+
badges: zod_1.z.array(zod_1.z.string()).optional(),
|
|
13394
|
+
promo: exports.ProductPromo.optional(),
|
|
13395
|
+
size_guide: exports.SizeGuide.optional()
|
|
13396
|
+
});
|
|
13397
|
+
exports.ProductListResponse = zod_1.z.object({
|
|
13398
|
+
data: zod_1.z.array(exports.Product),
|
|
13399
|
+
page: common_1.Page
|
|
13400
|
+
});
|
|
13401
|
+
exports.RecommendationsResponse = zod_1.z.object({
|
|
13402
|
+
data: zod_1.z.array(exports.Product)
|
|
13403
|
+
});
|
|
13404
|
+
exports.ListProductsQuery = common_1.MarketQuery.extend({
|
|
13405
|
+
category: zod_1.z.string().optional(),
|
|
13406
|
+
cursor: zod_1.z.string().optional(),
|
|
13407
|
+
limit: zod_1.z.number().int().positive().max(100).optional()
|
|
13408
|
+
});
|
|
13409
|
+
exports.CatalogReadQuery = common_1.MarketQuery;
|
|
13410
|
+
})(catalog);
|
|
13411
|
+
return catalog;
|
|
13412
|
+
}
|
|
13413
|
+
var content = {};
|
|
13414
|
+
var hasRequiredContent;
|
|
13415
|
+
function requireContent() {
|
|
13416
|
+
if (hasRequiredContent) return content;
|
|
13417
|
+
hasRequiredContent = 1;
|
|
13418
|
+
(function(exports) {
|
|
13419
|
+
Object.defineProperty(exports, "__esModule", {
|
|
13420
|
+
value: true
|
|
13421
|
+
});
|
|
13422
|
+
exports.HomeContent = exports.HomeSlide = exports.CategoryPage = exports.CategoryBlock = exports.ProductGalleryBlock = exports.ExploreBlock = exports.WhyUsBlock = exports.ReviewBlock = exports.GridBlock = exports.LifestyleImageBlock = exports.FeaturedBlock = exports.LifestyleTextBlock = exports.RailBlock = exports.CategoryHero = void 0;
|
|
13423
|
+
const zod_1 = requireZod();
|
|
13424
|
+
const common_1 = requireCommon();
|
|
13425
|
+
const catalog_1 = requireCatalog();
|
|
13426
|
+
exports.CategoryHero = zod_1.z.object({
|
|
13427
|
+
title: zod_1.z.string(),
|
|
13428
|
+
subtitle: zod_1.z.string().optional(),
|
|
13429
|
+
image: common_1.Url.optional(),
|
|
13430
|
+
desktop_image: common_1.Url.optional()
|
|
13431
|
+
});
|
|
13432
|
+
exports.RailBlock = zod_1.z.object({
|
|
13433
|
+
kind: zod_1.z.literal("rail"),
|
|
13434
|
+
title: zod_1.z.string(),
|
|
13435
|
+
products: zod_1.z.array(catalog_1.Product)
|
|
13436
|
+
});
|
|
13437
|
+
exports.LifestyleTextBlock = zod_1.z.object({
|
|
13438
|
+
kind: zod_1.z.literal("lifestyle_text"),
|
|
13439
|
+
text: zod_1.z.string(),
|
|
13440
|
+
align: zod_1.z.enum(["center", "left"]).default("center")
|
|
13441
|
+
});
|
|
13442
|
+
exports.FeaturedBlock = zod_1.z.object({
|
|
13443
|
+
kind: zod_1.z.literal("featured"),
|
|
13444
|
+
title: zod_1.z.string().min(1).optional(),
|
|
13445
|
+
product: catalog_1.Product
|
|
13446
|
+
});
|
|
13447
|
+
exports.LifestyleImageBlock = zod_1.z.object({
|
|
13448
|
+
kind: zod_1.z.literal("lifestyle_image"),
|
|
13449
|
+
images: zod_1.z.array(common_1.Url).min(1),
|
|
13450
|
+
videos: zod_1.z.array(common_1.Url.nullable()).optional(),
|
|
13451
|
+
desktop_images: zod_1.z.array(common_1.Url.nullable()).optional()
|
|
13452
|
+
});
|
|
13453
|
+
exports.GridBlock = zod_1.z.object({
|
|
13454
|
+
kind: zod_1.z.literal("grid"),
|
|
13455
|
+
title: zod_1.z.string().min(1).optional(),
|
|
13456
|
+
products: zod_1.z.array(catalog_1.Product)
|
|
13457
|
+
});
|
|
13458
|
+
exports.ReviewBlock = zod_1.z.object({
|
|
13459
|
+
kind: zod_1.z.literal("review"),
|
|
13460
|
+
quotes: zod_1.z.array(zod_1.z.object({
|
|
13461
|
+
quote: zod_1.z.string(),
|
|
13462
|
+
author: zod_1.z.string()
|
|
13463
|
+
})).min(1),
|
|
13464
|
+
disclaimer: zod_1.z.string().min(1).optional()
|
|
13465
|
+
});
|
|
13466
|
+
exports.WhyUsBlock = zod_1.z.object({
|
|
13467
|
+
kind: zod_1.z.literal("why_us"),
|
|
13468
|
+
items: zod_1.z.array(zod_1.z.object({
|
|
13469
|
+
icon: zod_1.z.enum(["payment", "delivery", "returns"]).optional(),
|
|
13470
|
+
title: zod_1.z.string(),
|
|
13471
|
+
body: zod_1.z.string()
|
|
13472
|
+
})).min(1)
|
|
13473
|
+
});
|
|
13474
|
+
exports.ExploreBlock = zod_1.z.object({
|
|
13475
|
+
kind: zod_1.z.literal("explore"),
|
|
13476
|
+
title: zod_1.z.string(),
|
|
13477
|
+
links: zod_1.z.array(zod_1.z.object({
|
|
13478
|
+
label: zod_1.z.string(),
|
|
13479
|
+
code: zod_1.z.string()
|
|
13480
|
+
})).min(1)
|
|
13481
|
+
});
|
|
13482
|
+
exports.ProductGalleryBlock = zod_1.z.object({
|
|
13483
|
+
kind: zod_1.z.literal("product_gallery"),
|
|
13484
|
+
title: zod_1.z.string().min(1),
|
|
13485
|
+
product: catalog_1.Product
|
|
13486
|
+
});
|
|
13487
|
+
exports.CategoryBlock = zod_1.z.discriminatedUnion("kind", [exports.RailBlock, exports.LifestyleTextBlock, exports.FeaturedBlock, exports.ProductGalleryBlock, exports.LifestyleImageBlock, exports.GridBlock, exports.ReviewBlock, exports.WhyUsBlock, exports.ExploreBlock]);
|
|
13488
|
+
exports.CategoryPage = zod_1.z.object({
|
|
13489
|
+
code: zod_1.z.string(),
|
|
13490
|
+
hero: exports.CategoryHero,
|
|
13491
|
+
blocks: zod_1.z.array(exports.CategoryBlock)
|
|
13492
|
+
});
|
|
13493
|
+
exports.HomeSlide = zod_1.z.object({
|
|
13494
|
+
key: zod_1.z.string().min(1),
|
|
13495
|
+
title: zod_1.z.string().min(1),
|
|
13496
|
+
subtitle: zod_1.z.string(),
|
|
13497
|
+
cta: zod_1.z.string().min(1),
|
|
13498
|
+
target: zod_1.z.string().min(1).optional(),
|
|
13499
|
+
image: zod_1.z.string().min(1).optional(),
|
|
13500
|
+
video: zod_1.z.string().min(1).optional(),
|
|
13501
|
+
desktop_image: zod_1.z.string().min(1).optional(),
|
|
13502
|
+
desktop_video: zod_1.z.string().min(1).optional(),
|
|
13503
|
+
focal_y: zod_1.z.number().int().min(0).max(100).optional()
|
|
13504
|
+
});
|
|
13505
|
+
exports.HomeContent = zod_1.z.object({
|
|
13506
|
+
slides: zod_1.z.array(exports.HomeSlide)
|
|
13507
|
+
});
|
|
13508
|
+
})(content);
|
|
13509
|
+
return content;
|
|
13510
|
+
}
|
|
13511
|
+
var inventory = {};
|
|
13512
|
+
var hasRequiredInventory;
|
|
13513
|
+
function requireInventory() {
|
|
13514
|
+
if (hasRequiredInventory) return inventory;
|
|
13515
|
+
hasRequiredInventory = 1;
|
|
13516
|
+
Object.defineProperty(inventory, "__esModule", {
|
|
13517
|
+
value: true
|
|
13518
|
+
});
|
|
13519
|
+
inventory.Inventory = void 0;
|
|
13520
|
+
const zod_1 = requireZod();
|
|
13521
|
+
const common_1 = requireCommon();
|
|
13522
|
+
inventory.Inventory = zod_1.z.object({
|
|
13523
|
+
sku: common_1.Sku,
|
|
13524
|
+
available: zod_1.z.number().int().nonnegative(),
|
|
13525
|
+
in_stock: zod_1.z.boolean()
|
|
13526
|
+
});
|
|
13527
|
+
return inventory;
|
|
13528
|
+
}
|
|
13529
|
+
var cart = {};
|
|
13530
|
+
var vip = {};
|
|
13531
|
+
var hasRequiredVip;
|
|
13532
|
+
function requireVip() {
|
|
13533
|
+
if (hasRequiredVip) return vip;
|
|
13534
|
+
hasRequiredVip = 1;
|
|
13535
|
+
(function(exports) {
|
|
13536
|
+
Object.defineProperty(exports, "__esModule", {
|
|
13537
|
+
value: true
|
|
13538
|
+
});
|
|
13539
|
+
exports.VipClaimResponse = exports.VipClaimRefusalReason = exports.VipClaimRequest = exports.VipClaimLine = exports.VipCartItemRequest = exports.VipInviteView = exports.VipHero = exports.VipInviteOffer = exports.VipInviteResolveRequest = exports.VipDeliveryRule = exports.VIP_TOKEN_PATTERN = exports.VipInviteRef = void 0;
|
|
13540
|
+
const zod_1 = requireZod();
|
|
13541
|
+
const common_1 = requireCommon();
|
|
13542
|
+
const ids_1 = requireIds();
|
|
13543
|
+
exports.VipInviteRef = (0, ids_1.prefixedId)("vip_", "VipInviteRef");
|
|
13544
|
+
exports.VIP_TOKEN_PATTERN = /^[A-Za-z0-9_-]{43}$/;
|
|
13545
|
+
exports.VipDeliveryRule = zod_1.z.enum(["both_free", "standard_free", "both_paid"]);
|
|
13546
|
+
exports.VipInviteResolveRequest = zod_1.z.union([zod_1.z.object({
|
|
13547
|
+
token: zod_1.z.string().regex(exports.VIP_TOKEN_PATTERN)
|
|
13548
|
+
}).strict(), zod_1.z.object({
|
|
13549
|
+
invite_ref: exports.VipInviteRef
|
|
13550
|
+
}).strict()]);
|
|
13551
|
+
exports.VipInviteOffer = zod_1.z.object({
|
|
13552
|
+
product_sku: common_1.Sku,
|
|
13553
|
+
quantity: zod_1.z.number().int().positive()
|
|
13554
|
+
});
|
|
13555
|
+
exports.VipHero = zod_1.z.object({
|
|
13556
|
+
image: common_1.Url.nullable(),
|
|
13557
|
+
desktop_image: common_1.Url.nullable().optional(),
|
|
13558
|
+
desktop_video: common_1.Url.nullable().optional(),
|
|
13559
|
+
headline: zod_1.z.string(),
|
|
13560
|
+
body: zod_1.z.string().nullable(),
|
|
13561
|
+
cta_label: zod_1.z.string()
|
|
13562
|
+
});
|
|
13563
|
+
exports.VipInviteView = zod_1.z.discriminatedUnion("state", [zod_1.z.object({
|
|
13564
|
+
state: zod_1.z.literal("active"),
|
|
13565
|
+
invite_ref: exports.VipInviteRef,
|
|
13566
|
+
recipient_name: zod_1.z.string(),
|
|
13567
|
+
personal_message: zod_1.z.string().nullable(),
|
|
13568
|
+
delivery_rule: exports.VipDeliveryRule,
|
|
13569
|
+
expires_at: common_1.Timestamp,
|
|
13570
|
+
items: zod_1.z.array(exports.VipInviteOffer).min(1),
|
|
13571
|
+
hero: exports.VipHero.nullable().optional()
|
|
13572
|
+
}), zod_1.z.object({
|
|
13573
|
+
state: zod_1.z.literal("scheduled"),
|
|
13574
|
+
opens_at: common_1.Timestamp
|
|
13575
|
+
}), zod_1.z.object({
|
|
13576
|
+
state: zod_1.z.literal("claimed"),
|
|
13577
|
+
order_ref: ids_1.OrderRef.optional()
|
|
13578
|
+
}), zod_1.z.object({
|
|
13579
|
+
state: zod_1.z.literal("expired")
|
|
13580
|
+
}), zod_1.z.object({
|
|
13581
|
+
state: zod_1.z.literal("revoked")
|
|
13582
|
+
})]);
|
|
13583
|
+
const VipCartLine = {
|
|
13584
|
+
sku: common_1.Sku,
|
|
13585
|
+
qty: zod_1.z.number().int().positive().max(99)
|
|
13586
|
+
};
|
|
13587
|
+
exports.VipCartItemRequest = zod_1.z.union([zod_1.z.object({
|
|
13588
|
+
token: zod_1.z.string().regex(exports.VIP_TOKEN_PATTERN),
|
|
13589
|
+
...VipCartLine
|
|
13590
|
+
}).strict(), zod_1.z.object({
|
|
13591
|
+
invite_ref: exports.VipInviteRef,
|
|
13592
|
+
...VipCartLine
|
|
13593
|
+
}).strict()]);
|
|
13594
|
+
exports.VipClaimLine = zod_1.z.object({
|
|
13595
|
+
sku: common_1.Sku,
|
|
13596
|
+
qty: zod_1.z.number().int().positive()
|
|
13597
|
+
}).strict();
|
|
13598
|
+
exports.VipClaimRequest = zod_1.z.object({
|
|
13599
|
+
invite_ref: exports.VipInviteRef,
|
|
13600
|
+
dazn_user_id: zod_1.z.string().min(1).max(200),
|
|
13601
|
+
lines: zod_1.z.array(exports.VipClaimLine).min(1).max(50)
|
|
13602
|
+
}).strict();
|
|
13603
|
+
exports.VipClaimRefusalReason = zod_1.z.enum(["unknown", "revoked", "expired", "not_yet_valid", "claimed_by_another", "already_ordered", "outside_entitlement"]);
|
|
13604
|
+
exports.VipClaimResponse = zod_1.z.discriminatedUnion("result", [zod_1.z.object({
|
|
13605
|
+
result: zod_1.z.literal("claimed"),
|
|
13606
|
+
invite_ref: exports.VipInviteRef
|
|
13607
|
+
}), zod_1.z.object({
|
|
13608
|
+
result: zod_1.z.literal("refused"),
|
|
13609
|
+
invite_ref: exports.VipInviteRef,
|
|
13610
|
+
reason: exports.VipClaimRefusalReason
|
|
13611
|
+
})]);
|
|
13612
|
+
})(vip);
|
|
13613
|
+
return vip;
|
|
13614
|
+
}
|
|
13615
|
+
var hasRequiredCart;
|
|
13616
|
+
function requireCart() {
|
|
13617
|
+
if (hasRequiredCart) return cart;
|
|
13618
|
+
hasRequiredCart = 1;
|
|
13619
|
+
(function(exports) {
|
|
13620
|
+
Object.defineProperty(exports, "__esModule", {
|
|
13621
|
+
value: true
|
|
13622
|
+
});
|
|
13623
|
+
exports.PartnerCart = exports.PartnerCartItem = exports.CartHandoffResponse = exports.UpdateCartItemRequest = exports.AddCartItemRequest = exports.CartMarketQuery = exports.Cart = exports.HiddenSummaryLine = exports.CartHold = exports.CartLock = exports.CartLockReason = exports.CartTotals = exports.CartItem = void 0;
|
|
13624
|
+
const zod_1 = requireZod();
|
|
13625
|
+
const money_1 = requireMoney();
|
|
13626
|
+
const ids_1 = requireIds();
|
|
13627
|
+
const money_2 = requireMoney();
|
|
13628
|
+
const common_1 = requireCommon();
|
|
13629
|
+
const vip_1 = requireVip();
|
|
13630
|
+
exports.CartItem = zod_1.z.object({
|
|
13631
|
+
sku: common_1.Sku,
|
|
13632
|
+
qty: zod_1.z.number().int().positive(),
|
|
13633
|
+
unit_price: money_1.Money,
|
|
13634
|
+
line_total: money_1.Money,
|
|
13635
|
+
compare_at_unit_price: money_1.Money.optional(),
|
|
13636
|
+
title: zod_1.z.string().optional(),
|
|
13637
|
+
image: common_1.Url.optional(),
|
|
13638
|
+
attributes: common_1.Attributes.optional(),
|
|
13639
|
+
available: zod_1.z.number().int().nonnegative().optional()
|
|
13640
|
+
});
|
|
13641
|
+
exports.CartTotals = common_1.Pricing.extend({
|
|
13642
|
+
discount: money_1.Money.optional(),
|
|
13643
|
+
subtotal_before_discount: money_1.Money.optional()
|
|
13644
|
+
});
|
|
13645
|
+
exports.CartLockReason = zod_1.z.enum(["checkout_handoff"]);
|
|
13646
|
+
exports.CartLock = zod_1.z.object({
|
|
13647
|
+
since: zod_1.z.string().datetime(),
|
|
13648
|
+
expires_at: zod_1.z.string().datetime().optional(),
|
|
13649
|
+
reason: exports.CartLockReason
|
|
13650
|
+
});
|
|
13651
|
+
exports.CartHold = zod_1.z.object({
|
|
13652
|
+
taken_at: zod_1.z.string().datetime(),
|
|
13653
|
+
expires_at: zod_1.z.string().datetime()
|
|
13654
|
+
});
|
|
13655
|
+
exports.HiddenSummaryLine = zod_1.z.enum(["tax", "shipping"]);
|
|
13656
|
+
exports.Cart = zod_1.z.object({
|
|
13657
|
+
cart_id: ids_1.CartId,
|
|
13658
|
+
currency: money_2.Currency,
|
|
13659
|
+
items: zod_1.z.array(exports.CartItem),
|
|
13660
|
+
totals: exports.CartTotals,
|
|
13661
|
+
locked: exports.CartLock.optional(),
|
|
13662
|
+
hold: exports.CartHold.optional(),
|
|
13663
|
+
hidden_lines: zod_1.z.array(exports.HiddenSummaryLine).optional(),
|
|
13664
|
+
vip: zod_1.z.object({
|
|
13665
|
+
invite_ref: vip_1.VipInviteRef
|
|
13666
|
+
}).optional()
|
|
13667
|
+
});
|
|
13668
|
+
exports.CartMarketQuery = common_1.MarketQuery;
|
|
13669
|
+
exports.AddCartItemRequest = zod_1.z.object({
|
|
13670
|
+
sku: common_1.Sku,
|
|
13671
|
+
qty: zod_1.z.number().int().positive()
|
|
13672
|
+
}).strict();
|
|
13673
|
+
exports.UpdateCartItemRequest = zod_1.z.object({
|
|
13674
|
+
qty: zod_1.z.number().int().positive()
|
|
13675
|
+
}).strict();
|
|
13676
|
+
exports.CartHandoffResponse = zod_1.z.object({
|
|
13677
|
+
checkout_url: zod_1.z.string().url()
|
|
13678
|
+
});
|
|
13679
|
+
exports.PartnerCartItem = zod_1.z.object({
|
|
13680
|
+
variantId: common_1.Sku,
|
|
13681
|
+
price: zod_1.z.number().nonnegative(),
|
|
13682
|
+
quantity: zod_1.z.number().int().positive()
|
|
13683
|
+
});
|
|
13684
|
+
exports.PartnerCart = zod_1.z.object({
|
|
13685
|
+
cart_id: ids_1.CartId,
|
|
13686
|
+
partner_id: zod_1.z.string().min(1),
|
|
13687
|
+
currency: money_2.Currency,
|
|
13688
|
+
version: zod_1.z.number().int().nonnegative(),
|
|
13689
|
+
items: zod_1.z.array(exports.CartItem),
|
|
13690
|
+
cart_items: zod_1.z.array(exports.PartnerCartItem),
|
|
13691
|
+
totals: exports.CartTotals,
|
|
13692
|
+
locked: exports.CartLock.optional(),
|
|
13693
|
+
vip_invite_ref: vip_1.VipInviteRef.optional()
|
|
13694
|
+
});
|
|
13695
|
+
})(cart);
|
|
13696
|
+
return cart;
|
|
13697
|
+
}
|
|
13698
|
+
var orders = {};
|
|
13699
|
+
var hasRequiredOrders;
|
|
13700
|
+
function requireOrders() {
|
|
13701
|
+
if (hasRequiredOrders) return orders;
|
|
13702
|
+
hasRequiredOrders = 1;
|
|
13703
|
+
(function(exports) {
|
|
13704
|
+
Object.defineProperty(exports, "__esModule", {
|
|
13705
|
+
value: true
|
|
13706
|
+
});
|
|
13707
|
+
exports.OrderIntakeResponse = exports.OrderRefundRequest = exports.RefundReason = exports.OrderCancelRequest = exports.OrderLineAction = exports.CancelReason = exports.OrderPlacedRequest = exports.OrderPaymentSummary = exports.OrderTotals = exports.OrderCustomer = exports.OrderLine = exports.OrderEventEnvelope = void 0;
|
|
13708
|
+
const zod_1 = requireZod();
|
|
13709
|
+
const money_1 = requireMoney();
|
|
13710
|
+
const ids_1 = requireIds();
|
|
13711
|
+
const common_1 = requireCommon();
|
|
13712
|
+
const vip_1 = requireVip();
|
|
13713
|
+
exports.OrderEventEnvelope = zod_1.z.object({
|
|
13714
|
+
event_id: ids_1.EventId,
|
|
13715
|
+
occurred_at: common_1.Timestamp
|
|
13716
|
+
});
|
|
13717
|
+
exports.OrderLine = zod_1.z.object({
|
|
13718
|
+
line_ref: zod_1.z.string().min(1),
|
|
13719
|
+
sku: common_1.Sku,
|
|
13720
|
+
qty: zod_1.z.number().int().positive(),
|
|
13721
|
+
unit_price: money_1.Money,
|
|
13722
|
+
line_total: money_1.Money,
|
|
13723
|
+
compare_at_unit_price: money_1.Money.optional(),
|
|
13724
|
+
title: zod_1.z.string().optional()
|
|
13725
|
+
});
|
|
13726
|
+
exports.OrderCustomer = zod_1.z.object({
|
|
13727
|
+
customer_ref: zod_1.z.string().min(1),
|
|
13728
|
+
name: zod_1.z.string().min(1).optional(),
|
|
13729
|
+
email: zod_1.z.string().email().optional(),
|
|
13730
|
+
phone: zod_1.z.string().min(1).optional()
|
|
13731
|
+
});
|
|
13732
|
+
exports.OrderTotals = zod_1.z.object({
|
|
13733
|
+
items: money_1.Money,
|
|
13734
|
+
shipping: money_1.Money,
|
|
13735
|
+
tax: money_1.Money,
|
|
13736
|
+
discount: money_1.Money.optional(),
|
|
13737
|
+
grand_total: money_1.Money
|
|
13738
|
+
});
|
|
13739
|
+
exports.OrderPaymentSummary = zod_1.z.object({
|
|
13740
|
+
brand: zod_1.z.string().min(1),
|
|
13741
|
+
last4: zod_1.z.string().regex(/^\d{4}$/).optional()
|
|
13742
|
+
});
|
|
13743
|
+
exports.OrderPlacedRequest = exports.OrderEventEnvelope.extend({
|
|
13744
|
+
order_ref: ids_1.OrderRef.optional(),
|
|
13745
|
+
placed_at: common_1.Timestamp,
|
|
13746
|
+
currency: money_1.Currency,
|
|
13747
|
+
customer: exports.OrderCustomer,
|
|
13748
|
+
ship_to: common_1.Address,
|
|
13749
|
+
lines: zod_1.z.array(exports.OrderLine).min(1),
|
|
13750
|
+
totals: exports.OrderTotals,
|
|
13751
|
+
payment: exports.OrderPaymentSummary.optional(),
|
|
13752
|
+
vip_invite_ref: vip_1.VipInviteRef.optional()
|
|
13753
|
+
}).strict();
|
|
13754
|
+
exports.CancelReason = zod_1.z.enum(["customer_request", "payment_failed", "fraud", "unfulfillable", "other"]);
|
|
13755
|
+
exports.OrderLineAction = zod_1.z.object({
|
|
13756
|
+
line_ref: zod_1.z.string().min(1),
|
|
13757
|
+
qty: zod_1.z.number().int().positive()
|
|
13758
|
+
});
|
|
13759
|
+
exports.OrderCancelRequest = exports.OrderEventEnvelope.extend({
|
|
13760
|
+
reason: exports.CancelReason,
|
|
13761
|
+
note: zod_1.z.string().max(500).optional(),
|
|
13762
|
+
lines: zod_1.z.array(exports.OrderLineAction).min(1)
|
|
13763
|
+
}).strict();
|
|
13764
|
+
exports.RefundReason = zod_1.z.enum(["customer_request", "return", "damaged", "not_delivered", "goodwill", "other"]);
|
|
13765
|
+
exports.OrderRefundRequest = exports.OrderEventEnvelope.extend({
|
|
13766
|
+
reason: exports.RefundReason,
|
|
13767
|
+
note: zod_1.z.string().max(500).optional(),
|
|
13768
|
+
amount: money_1.Money,
|
|
13769
|
+
restock: zod_1.z.boolean(),
|
|
13770
|
+
lines: zod_1.z.array(exports.OrderLineAction).min(1)
|
|
13771
|
+
}).strict();
|
|
13772
|
+
exports.OrderIntakeResponse = zod_1.z.object({
|
|
13773
|
+
order_ref: ids_1.OrderRef,
|
|
13774
|
+
event_id: ids_1.EventId,
|
|
13775
|
+
status: zod_1.z.enum(["accepted", "duplicate"]),
|
|
13776
|
+
received_at: common_1.Timestamp
|
|
13777
|
+
});
|
|
13778
|
+
})(orders);
|
|
13779
|
+
return orders;
|
|
13780
|
+
}
|
|
13781
|
+
var orderTracking = {};
|
|
13782
|
+
var hasRequiredOrderTracking;
|
|
13783
|
+
function requireOrderTracking() {
|
|
13784
|
+
if (hasRequiredOrderTracking) return orderTracking;
|
|
13785
|
+
hasRequiredOrderTracking = 1;
|
|
13786
|
+
(function(exports) {
|
|
13787
|
+
Object.defineProperty(exports, "__esModule", {
|
|
13788
|
+
value: true
|
|
13789
|
+
});
|
|
13790
|
+
exports.ReturnDetail = exports.ReturnItem = exports.ReturnProgressEntry = exports.CreateReturnRequest = exports.ReturnRequestItem = exports.RecordedReturnReason = exports.FanReturnReason = exports.RequestCancellationRequest = exports.FanCancelReason = exports.OrderDetail = exports.ReturnSummary = exports.OrderList = exports.ReturnSummaryItem = exports.OrderSummaryItem = exports.ReturnOutcome = exports.ReturnStatus = exports.OrderItem = exports.OrderTracking = exports.OrderProgressEntry = exports.OrderProgressStep = void 0;
|
|
13791
|
+
const zod_1 = requireZod();
|
|
13792
|
+
const money_1 = requireMoney();
|
|
13793
|
+
const ids_1 = requireIds();
|
|
13794
|
+
const common_1 = requireCommon();
|
|
13795
|
+
const orders_1 = requireOrders();
|
|
13796
|
+
const vip_1 = requireVip();
|
|
13797
|
+
exports.OrderProgressStep = zod_1.z.enum(["packing", "on_its_way", "out_for_delivery", "delivered", "cancelled"]);
|
|
13798
|
+
exports.OrderProgressEntry = zod_1.z.object({
|
|
13799
|
+
step: exports.OrderProgressStep,
|
|
13800
|
+
label: zod_1.z.string().min(1),
|
|
13801
|
+
at: common_1.Timestamp.optional(),
|
|
13802
|
+
current: zod_1.z.boolean()
|
|
13803
|
+
});
|
|
13804
|
+
exports.OrderTracking = zod_1.z.object({
|
|
13805
|
+
carrier: zod_1.z.string().min(1),
|
|
13806
|
+
reference: zod_1.z.string().min(1).optional(),
|
|
13807
|
+
url: common_1.Url.optional()
|
|
13808
|
+
});
|
|
13809
|
+
exports.OrderItem = zod_1.z.object({
|
|
13810
|
+
line_ref: zod_1.z.string().min(1),
|
|
13811
|
+
sku: common_1.Sku,
|
|
13812
|
+
qty: zod_1.z.number().int().positive(),
|
|
13813
|
+
unit_price: money_1.Money,
|
|
13814
|
+
line_total: money_1.Money,
|
|
13815
|
+
compare_at_unit_price: money_1.Money.optional(),
|
|
13816
|
+
title: zod_1.z.string().optional(),
|
|
13817
|
+
image: common_1.Url.optional(),
|
|
13818
|
+
attributes: common_1.Attributes.optional(),
|
|
13819
|
+
cancelled_qty: zod_1.z.number().int().nonnegative(),
|
|
13820
|
+
refunded_qty: zod_1.z.number().int().nonnegative(),
|
|
13821
|
+
returned_qty: zod_1.z.number().int().nonnegative().optional()
|
|
13822
|
+
});
|
|
13823
|
+
exports.ReturnStatus = zod_1.z.enum(["reported", "package_received", "completed"]);
|
|
13824
|
+
exports.ReturnOutcome = zod_1.z.enum(["accepted", "rejected", "partial"]);
|
|
13825
|
+
exports.OrderSummaryItem = zod_1.z.object({
|
|
13826
|
+
order_ref: ids_1.OrderRef,
|
|
13827
|
+
placed_at: common_1.Timestamp,
|
|
13828
|
+
currency: money_1.Currency,
|
|
13829
|
+
status: exports.OrderProgressStep,
|
|
13830
|
+
headline: zod_1.z.string().min(1),
|
|
13831
|
+
total: money_1.Money,
|
|
13832
|
+
item_count: zod_1.z.number().int().nonnegative(),
|
|
13833
|
+
image: common_1.Url.optional(),
|
|
13834
|
+
images: zod_1.z.array(common_1.Url).max(3).optional(),
|
|
13835
|
+
return_status: exports.ReturnStatus.optional()
|
|
13836
|
+
});
|
|
13837
|
+
exports.ReturnSummaryItem = zod_1.z.object({
|
|
13838
|
+
return_ref: zod_1.z.string().min(1),
|
|
13839
|
+
order_ref: ids_1.OrderRef,
|
|
13840
|
+
status: exports.ReturnStatus,
|
|
13841
|
+
reported_at: common_1.Timestamp,
|
|
13842
|
+
currency: money_1.Currency,
|
|
13843
|
+
headline: zod_1.z.string().min(1),
|
|
13844
|
+
value: money_1.Money,
|
|
13845
|
+
item_count: zod_1.z.number().int().nonnegative(),
|
|
13846
|
+
images: zod_1.z.array(common_1.Url).max(3).optional()
|
|
13847
|
+
});
|
|
13848
|
+
exports.OrderList = zod_1.z.object({
|
|
13849
|
+
orders: zod_1.z.array(exports.OrderSummaryItem),
|
|
13850
|
+
returns: zod_1.z.array(exports.ReturnSummaryItem).optional()
|
|
13851
|
+
});
|
|
13852
|
+
exports.ReturnSummary = zod_1.z.object({
|
|
13853
|
+
return_ref: zod_1.z.string().min(1),
|
|
13854
|
+
status: exports.ReturnStatus,
|
|
13855
|
+
reported_at: common_1.Timestamp
|
|
13856
|
+
});
|
|
13857
|
+
exports.OrderDetail = zod_1.z.object({
|
|
13858
|
+
order_ref: ids_1.OrderRef,
|
|
13859
|
+
placed_at: common_1.Timestamp,
|
|
13860
|
+
currency: money_1.Currency,
|
|
13861
|
+
email: zod_1.z.string().email().optional(),
|
|
13862
|
+
status: exports.OrderProgressStep,
|
|
13863
|
+
headline: zod_1.z.string().min(1),
|
|
13864
|
+
estimated_delivery: zod_1.z.object({
|
|
13865
|
+
from: common_1.Timestamp,
|
|
13866
|
+
to: common_1.Timestamp
|
|
13867
|
+
}).optional(),
|
|
13868
|
+
progress: zod_1.z.array(exports.OrderProgressEntry).min(1),
|
|
13869
|
+
tracking: exports.OrderTracking.optional(),
|
|
13870
|
+
items: zod_1.z.array(exports.OrderItem).min(1),
|
|
13871
|
+
ship_to: common_1.Address,
|
|
13872
|
+
payment: orders_1.OrderPaymentSummary.optional(),
|
|
13873
|
+
totals: orders_1.OrderTotals,
|
|
13874
|
+
can_cancel: zod_1.z.boolean().optional(),
|
|
13875
|
+
can_return: zod_1.z.boolean().optional(),
|
|
13876
|
+
returns: zod_1.z.array(exports.ReturnSummary).optional(),
|
|
13877
|
+
vip: zod_1.z.object({
|
|
13878
|
+
invite_ref: vip_1.VipInviteRef
|
|
13879
|
+
}).optional()
|
|
13880
|
+
});
|
|
13881
|
+
exports.FanCancelReason = zod_1.z.enum(["changed_my_mind", "ordered_by_mistake", "delivery_too_long"]);
|
|
13882
|
+
exports.RequestCancellationRequest = zod_1.z.object({
|
|
13883
|
+
reason: exports.FanCancelReason
|
|
13884
|
+
}).strict();
|
|
13885
|
+
exports.FanReturnReason = zod_1.z.enum(["too_large", "too_small", "arrived_too_late", "item_damaged", "not_as_described"]);
|
|
13886
|
+
exports.RecordedReturnReason = zod_1.z.enum([...exports.FanReturnReason.options, "changed_my_mind"]);
|
|
13887
|
+
exports.ReturnRequestItem = zod_1.z.object({
|
|
13888
|
+
line_ref: zod_1.z.string().min(1),
|
|
13889
|
+
qty: zod_1.z.number().int().positive(),
|
|
13890
|
+
reason: exports.FanReturnReason
|
|
13891
|
+
});
|
|
13892
|
+
exports.CreateReturnRequest = zod_1.z.object({
|
|
13893
|
+
items: zod_1.z.array(exports.ReturnRequestItem).min(1)
|
|
13894
|
+
}).strict();
|
|
13895
|
+
exports.ReturnProgressEntry = zod_1.z.object({
|
|
13896
|
+
step: exports.ReturnStatus,
|
|
13897
|
+
label: zod_1.z.string().min(1),
|
|
13898
|
+
at: common_1.Timestamp.optional(),
|
|
13899
|
+
current: zod_1.z.boolean()
|
|
13900
|
+
});
|
|
13901
|
+
exports.ReturnItem = zod_1.z.object({
|
|
13902
|
+
line_ref: zod_1.z.string().min(1),
|
|
13903
|
+
sku: common_1.Sku,
|
|
13904
|
+
qty: zod_1.z.number().int().positive(),
|
|
13905
|
+
reason: exports.RecordedReturnReason,
|
|
13906
|
+
unit_price: money_1.Money,
|
|
13907
|
+
compare_at_unit_price: money_1.Money.optional(),
|
|
13908
|
+
title: zod_1.z.string().optional(),
|
|
13909
|
+
image: common_1.Url.optional(),
|
|
13910
|
+
attributes: common_1.Attributes.optional()
|
|
13911
|
+
});
|
|
13912
|
+
exports.ReturnDetail = zod_1.z.object({
|
|
13913
|
+
return_ref: zod_1.z.string().min(1),
|
|
13914
|
+
order_ref: ids_1.OrderRef,
|
|
13915
|
+
status: exports.ReturnStatus,
|
|
13916
|
+
reported_at: common_1.Timestamp,
|
|
13917
|
+
progress: zod_1.z.array(exports.ReturnProgressEntry).min(1),
|
|
13918
|
+
items: zod_1.z.array(exports.ReturnItem).min(1),
|
|
13919
|
+
label_url: common_1.Url.optional(),
|
|
13920
|
+
label_email: zod_1.z.string().email().optional()
|
|
13921
|
+
});
|
|
13922
|
+
})(orderTracking);
|
|
13923
|
+
return orderTracking;
|
|
13924
|
+
}
|
|
13925
|
+
var deliveryOptions = {};
|
|
13926
|
+
var hasRequiredDeliveryOptions;
|
|
13927
|
+
function requireDeliveryOptions() {
|
|
13928
|
+
if (hasRequiredDeliveryOptions) return deliveryOptions;
|
|
13929
|
+
hasRequiredDeliveryOptions = 1;
|
|
13930
|
+
(function(exports) {
|
|
13931
|
+
Object.defineProperty(exports, "__esModule", {
|
|
13932
|
+
value: true
|
|
13933
|
+
});
|
|
13934
|
+
exports.DeliveryOptionsResponse = exports.DeliveryTax = exports.TaxRateType = exports.DeliveryServiceability = exports.DeliveryOption = exports.DeliveryEstimate = exports.DeliveryEstimateUnit = exports.DeliveryOptionType = exports.DeliveryOptionsRequest = exports.DeliveryShippingAddress = void 0;
|
|
13935
|
+
const zod_1 = requireZod();
|
|
13936
|
+
const vip_1 = requireVip();
|
|
13937
|
+
const money_1 = requireMoney();
|
|
13938
|
+
const common_1 = requireCommon();
|
|
13939
|
+
exports.DeliveryShippingAddress = zod_1.z.object({
|
|
13940
|
+
line1: zod_1.z.string().min(1),
|
|
13941
|
+
line2: zod_1.z.string().optional(),
|
|
13942
|
+
city: zod_1.z.string().min(1),
|
|
13943
|
+
state: zod_1.z.string().optional(),
|
|
13944
|
+
postalCode: zod_1.z.string().min(1),
|
|
13945
|
+
country: common_1.CountryCode
|
|
13946
|
+
}).strict();
|
|
13947
|
+
exports.DeliveryOptionsRequest = zod_1.z.object({
|
|
13948
|
+
shippingAddress: exports.DeliveryShippingAddress,
|
|
13949
|
+
inviteRef: vip_1.VipInviteRef.optional()
|
|
13950
|
+
}).strict();
|
|
13951
|
+
exports.DeliveryOptionType = zod_1.z.enum(["STANDARD", "EXPRESS"]);
|
|
13952
|
+
exports.DeliveryEstimateUnit = zod_1.z.enum(["BUSINESS_DAYS"]);
|
|
13953
|
+
exports.DeliveryEstimate = zod_1.z.object({
|
|
13954
|
+
minDays: zod_1.z.number().int().nonnegative(),
|
|
13955
|
+
maxDays: zod_1.z.number().int().nonnegative(),
|
|
13956
|
+
unit: exports.DeliveryEstimateUnit
|
|
13957
|
+
}).strict().refine((e) => e.maxDays >= e.minDays, {
|
|
13958
|
+
message: "maxDays must be greater than or equal to minDays"
|
|
13959
|
+
});
|
|
13960
|
+
exports.DeliveryOption = zod_1.z.object({
|
|
13961
|
+
id: zod_1.z.string().min(1),
|
|
13962
|
+
type: exports.DeliveryOptionType,
|
|
13963
|
+
name: zod_1.z.string().min(1),
|
|
13964
|
+
price: money_1.Money,
|
|
13965
|
+
deliveryEstimate: exports.DeliveryEstimate
|
|
13966
|
+
}).strict();
|
|
13967
|
+
exports.DeliveryServiceability = zod_1.z.object({
|
|
13968
|
+
isServiceable: zod_1.z.boolean()
|
|
13969
|
+
}).strict();
|
|
13970
|
+
exports.TaxRateType = zod_1.z.enum(["PERCENTAGE"]);
|
|
13971
|
+
exports.DeliveryTax = zod_1.z.object({
|
|
13972
|
+
applicable: zod_1.z.boolean(),
|
|
13973
|
+
rate: zod_1.z.number().nonnegative(),
|
|
13974
|
+
rateType: exports.TaxRateType
|
|
13975
|
+
}).strict();
|
|
13976
|
+
exports.DeliveryOptionsResponse = zod_1.z.object({
|
|
13977
|
+
serviceability: exports.DeliveryServiceability,
|
|
13978
|
+
shippingOptions: zod_1.z.array(exports.DeliveryOption),
|
|
13979
|
+
tax: exports.DeliveryTax
|
|
13980
|
+
}).strict();
|
|
13981
|
+
})(deliveryOptions);
|
|
13982
|
+
return deliveryOptions;
|
|
13983
|
+
}
|
|
13984
|
+
var health = {};
|
|
13985
|
+
var hasRequiredHealth;
|
|
13986
|
+
function requireHealth() {
|
|
13987
|
+
if (hasRequiredHealth) return health;
|
|
13988
|
+
hasRequiredHealth = 1;
|
|
13989
|
+
Object.defineProperty(health, "__esModule", {
|
|
13990
|
+
value: true
|
|
13991
|
+
});
|
|
13992
|
+
health.HealthReady = health.HealthLive = void 0;
|
|
13993
|
+
const zod_1 = requireZod();
|
|
13994
|
+
health.HealthLive = zod_1.z.object({
|
|
13995
|
+
status: zod_1.z.literal("ok")
|
|
13996
|
+
});
|
|
13997
|
+
health.HealthReady = zod_1.z.object({
|
|
13998
|
+
status: zod_1.z.enum(["ok", "degraded"]),
|
|
13999
|
+
checks: zod_1.z.record(zod_1.z.string(), zod_1.z.boolean())
|
|
14000
|
+
});
|
|
14001
|
+
return health;
|
|
14002
|
+
}
|
|
14003
|
+
var stockAlerts = {};
|
|
14004
|
+
var hasRequiredStockAlerts;
|
|
14005
|
+
function requireStockAlerts() {
|
|
14006
|
+
if (hasRequiredStockAlerts) return stockAlerts;
|
|
14007
|
+
hasRequiredStockAlerts = 1;
|
|
14008
|
+
Object.defineProperty(stockAlerts, "__esModule", {
|
|
14009
|
+
value: true
|
|
14010
|
+
});
|
|
14011
|
+
stockAlerts.StockAlert = stockAlerts.StockAlertRequest = void 0;
|
|
14012
|
+
const zod_1 = requireZod();
|
|
14013
|
+
const common_1 = requireCommon();
|
|
14014
|
+
stockAlerts.StockAlertRequest = zod_1.z.object({
|
|
14015
|
+
sku: common_1.Sku
|
|
14016
|
+
}).strict();
|
|
14017
|
+
stockAlerts.StockAlert = zod_1.z.object({
|
|
14018
|
+
sku: common_1.Sku,
|
|
14019
|
+
created_at: common_1.Timestamp,
|
|
14020
|
+
notified_at: common_1.Timestamp.optional()
|
|
14021
|
+
});
|
|
14022
|
+
return stockAlerts;
|
|
14023
|
+
}
|
|
14024
|
+
var support = {};
|
|
14025
|
+
var hasRequiredSupport;
|
|
14026
|
+
function requireSupport() {
|
|
14027
|
+
if (hasRequiredSupport) return support;
|
|
14028
|
+
hasRequiredSupport = 1;
|
|
14029
|
+
(function(exports) {
|
|
14030
|
+
Object.defineProperty(exports, "__esModule", {
|
|
14031
|
+
value: true
|
|
14032
|
+
});
|
|
14033
|
+
exports.SupportAttachment = exports.SupportTicket = exports.SupportTicketRequest = exports.SupportCategory = void 0;
|
|
14034
|
+
const zod_1 = requireZod();
|
|
14035
|
+
const common_1 = requireCommon();
|
|
14036
|
+
exports.SupportCategory = zod_1.z.string().trim().min(1).max(120);
|
|
14037
|
+
exports.SupportTicketRequest = zod_1.z.object({
|
|
14038
|
+
email: zod_1.z.string().email().max(254),
|
|
14039
|
+
category: exports.SupportCategory,
|
|
14040
|
+
description: zod_1.z.string().trim().min(1).max(4e3),
|
|
14041
|
+
image_url: zod_1.z.string().url().max(2048).optional(),
|
|
14042
|
+
dazn_user_id: zod_1.z.string().trim().min(1).max(128).optional()
|
|
14043
|
+
}).strict();
|
|
14044
|
+
exports.SupportTicket = zod_1.z.object({
|
|
14045
|
+
reference: zod_1.z.string().min(1),
|
|
14046
|
+
category: exports.SupportCategory,
|
|
14047
|
+
created_at: common_1.Timestamp
|
|
14048
|
+
});
|
|
14049
|
+
exports.SupportAttachment = zod_1.z.object({
|
|
14050
|
+
url: zod_1.z.string().url(),
|
|
14051
|
+
content_type: zod_1.z.string().min(1),
|
|
14052
|
+
bytes: zod_1.z.number().int().positive()
|
|
14053
|
+
});
|
|
14054
|
+
})(support);
|
|
14055
|
+
return support;
|
|
14056
|
+
}
|
|
14057
|
+
var storefrontConfig = {};
|
|
14058
|
+
var hasRequiredStorefrontConfig;
|
|
14059
|
+
function requireStorefrontConfig() {
|
|
14060
|
+
if (hasRequiredStorefrontConfig) return storefrontConfig;
|
|
14061
|
+
hasRequiredStorefrontConfig = 1;
|
|
14062
|
+
(function(exports) {
|
|
14063
|
+
Object.defineProperty(exports, "__esModule", {
|
|
14064
|
+
value: true
|
|
14065
|
+
});
|
|
14066
|
+
exports.STOREFRONT_CONFIG_FALLBACK = exports.StorefrontConfig = exports.StorefrontMarketConfig = exports.StorefrontPresentationConfig = exports.StorefrontAnalyticsConfig = void 0;
|
|
14067
|
+
const zod_1 = requireZod();
|
|
14068
|
+
exports.StorefrontAnalyticsConfig = zod_1.z.object({
|
|
14069
|
+
ga4_measurement_id: zod_1.z.string().nullable(),
|
|
14070
|
+
debug: zod_1.z.boolean()
|
|
14071
|
+
});
|
|
14072
|
+
exports.StorefrontPresentationConfig = zod_1.z.object({
|
|
14073
|
+
show_cart_tax: zod_1.z.boolean(),
|
|
14074
|
+
show_size_charts: zod_1.z.boolean(),
|
|
14075
|
+
show_stock_alerts: zod_1.z.boolean()
|
|
14076
|
+
});
|
|
14077
|
+
exports.StorefrontMarketConfig = zod_1.z.object({
|
|
14078
|
+
default_country: zod_1.z.string(),
|
|
14079
|
+
default_lang: zod_1.z.string()
|
|
14080
|
+
});
|
|
14081
|
+
exports.StorefrontConfig = zod_1.z.object({
|
|
14082
|
+
analytics: exports.StorefrontAnalyticsConfig,
|
|
14083
|
+
presentation: exports.StorefrontPresentationConfig,
|
|
14084
|
+
market: exports.StorefrontMarketConfig
|
|
14085
|
+
});
|
|
14086
|
+
exports.STOREFRONT_CONFIG_FALLBACK = {
|
|
14087
|
+
analytics: {
|
|
14088
|
+
ga4_measurement_id: null,
|
|
14089
|
+
debug: false
|
|
14090
|
+
},
|
|
14091
|
+
presentation: {
|
|
14092
|
+
show_cart_tax: true,
|
|
14093
|
+
show_size_charts: true,
|
|
14094
|
+
show_stock_alerts: true
|
|
14095
|
+
},
|
|
14096
|
+
market: {
|
|
14097
|
+
default_country: "GB",
|
|
14098
|
+
default_lang: "en"
|
|
14099
|
+
}
|
|
14100
|
+
};
|
|
14101
|
+
})(storefrontConfig);
|
|
14102
|
+
return storefrontConfig;
|
|
14103
|
+
}
|
|
14104
|
+
var errors = {};
|
|
14105
|
+
var hasRequiredErrors;
|
|
14106
|
+
function requireErrors() {
|
|
14107
|
+
if (hasRequiredErrors) return errors;
|
|
14108
|
+
hasRequiredErrors = 1;
|
|
14109
|
+
(function(exports) {
|
|
14110
|
+
Object.defineProperty(exports, "__esModule", {
|
|
14111
|
+
value: true
|
|
14112
|
+
});
|
|
14113
|
+
exports.ErrorResponse = exports.ApiErrorBody = exports.ERROR_CODE_STATUS = exports.ErrorCode = void 0;
|
|
14114
|
+
const zod_1 = requireZod();
|
|
14115
|
+
exports.ErrorCode = zod_1.z.enum(["invalid_request", "unauthorized", "out_of_stock", "cart_locked", "sku_not_found", "category_not_found", "amount_mismatch", "duplicate_order", "order_not_found", "order_not_cancellable", "cart_not_found", "support_ticket_not_found", "vip_invite_not_found", "vip_cart_conflict", "vip_invite_mismatch", "size_chart_not_found", "forbidden", "invalid_transition", "rate_limited", "server_error"]);
|
|
14116
|
+
exports.ERROR_CODE_STATUS = {
|
|
14117
|
+
invalid_request: 400,
|
|
14118
|
+
unauthorized: 401,
|
|
14119
|
+
out_of_stock: 409,
|
|
14120
|
+
cart_locked: 409,
|
|
14121
|
+
sku_not_found: 404,
|
|
14122
|
+
category_not_found: 404,
|
|
14123
|
+
amount_mismatch: 422,
|
|
14124
|
+
duplicate_order: 200,
|
|
14125
|
+
order_not_found: 404,
|
|
14126
|
+
order_not_cancellable: 409,
|
|
14127
|
+
cart_not_found: 404,
|
|
14128
|
+
support_ticket_not_found: 404,
|
|
14129
|
+
vip_invite_not_found: 404,
|
|
14130
|
+
vip_cart_conflict: 409,
|
|
14131
|
+
vip_invite_mismatch: 409,
|
|
14132
|
+
size_chart_not_found: 404,
|
|
14133
|
+
forbidden: 403,
|
|
14134
|
+
invalid_transition: 409,
|
|
14135
|
+
rate_limited: 429,
|
|
14136
|
+
server_error: 500
|
|
14137
|
+
};
|
|
14138
|
+
exports.ApiErrorBody = zod_1.z.object({
|
|
14139
|
+
code: exports.ErrorCode,
|
|
14140
|
+
message: zod_1.z.string(),
|
|
14141
|
+
details: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional()
|
|
14142
|
+
});
|
|
14143
|
+
exports.ErrorResponse = zod_1.z.object({
|
|
14144
|
+
error: exports.ApiErrorBody,
|
|
14145
|
+
request_id: zod_1.z.string()
|
|
14146
|
+
});
|
|
14147
|
+
})(errors);
|
|
14148
|
+
return errors;
|
|
14149
|
+
}
|
|
14150
|
+
var events = {};
|
|
14151
|
+
var hasRequiredEvents;
|
|
14152
|
+
function requireEvents() {
|
|
14153
|
+
if (hasRequiredEvents) return events;
|
|
14154
|
+
hasRequiredEvents = 1;
|
|
14155
|
+
(function(exports) {
|
|
14156
|
+
Object.defineProperty(exports, "__esModule", {
|
|
14157
|
+
value: true
|
|
14158
|
+
});
|
|
14159
|
+
exports.Event = exports.EventEnvelope = exports.EVENT_DATA_SCHEMAS = exports.ReturnStatusChangedData = exports.SupportTicketCreatedData = exports.BackInStockData = exports.InventoryChangedData = exports.PriceUpdatedData = exports.ProductUpdatedData = exports.InventoryThresholdData = exports.PaymentRefundedData = exports.OrderCancelledData = exports.ShipmentDeliveredData = exports.ShipmentDispatchedData = exports.OrderStatusChangedData = exports.EventType = exports.OrderStatus = void 0;
|
|
14160
|
+
const zod_1 = requireZod();
|
|
14161
|
+
const money_1 = requireMoney();
|
|
14162
|
+
const ids_1 = requireIds();
|
|
14163
|
+
const common_1 = requireCommon();
|
|
14164
|
+
const order_tracking_1 = requireOrderTracking();
|
|
14165
|
+
exports.OrderStatus = zod_1.z.enum(["confirmed", "packed", "shipped", "delivered", "cancelled", "refunded"]);
|
|
14166
|
+
exports.EventType = zod_1.z.enum(["order.status_changed", "shipment.dispatched", "shipment.delivered", "order.cancelled", "payment.refunded", "inventory.low_stock", "inventory.out_of_stock", "product.updated", "price.updated", "inventory.changed", "stock.back_in_stock", "support.ticket_created", "return.status_changed"]);
|
|
14167
|
+
exports.OrderStatusChangedData = zod_1.z.object({
|
|
14168
|
+
order_ref: zod_1.z.string(),
|
|
14169
|
+
status: exports.OrderStatus,
|
|
14170
|
+
timestamp: common_1.Timestamp,
|
|
14171
|
+
tracking: order_tracking_1.OrderTracking.optional()
|
|
14172
|
+
});
|
|
14173
|
+
exports.ShipmentDispatchedData = zod_1.z.object({
|
|
14174
|
+
order_ref: zod_1.z.string(),
|
|
14175
|
+
courier: zod_1.z.string(),
|
|
14176
|
+
tracking_number: zod_1.z.string(),
|
|
14177
|
+
timestamp: common_1.Timestamp
|
|
14178
|
+
});
|
|
14179
|
+
exports.ShipmentDeliveredData = zod_1.z.object({
|
|
14180
|
+
order_ref: zod_1.z.string(),
|
|
14181
|
+
timestamp: common_1.Timestamp
|
|
14182
|
+
});
|
|
14183
|
+
exports.OrderCancelledData = zod_1.z.object({
|
|
14184
|
+
order_ref: zod_1.z.string(),
|
|
14185
|
+
reason: zod_1.z.string(),
|
|
14186
|
+
timestamp: common_1.Timestamp
|
|
14187
|
+
});
|
|
14188
|
+
exports.PaymentRefundedData = zod_1.z.object({
|
|
14189
|
+
order_ref: zod_1.z.string(),
|
|
14190
|
+
amount: money_1.Money,
|
|
14191
|
+
timestamp: common_1.Timestamp
|
|
14192
|
+
});
|
|
14193
|
+
exports.InventoryThresholdData = zod_1.z.object({
|
|
14194
|
+
sku: common_1.Sku,
|
|
14195
|
+
remaining_qty: zod_1.z.number().int().nonnegative(),
|
|
14196
|
+
threshold: zod_1.z.number().int().nonnegative()
|
|
14197
|
+
});
|
|
14198
|
+
exports.ProductUpdatedData = zod_1.z.object({
|
|
14199
|
+
sku: common_1.Sku
|
|
14200
|
+
});
|
|
14201
|
+
exports.PriceUpdatedData = zod_1.z.object({
|
|
14202
|
+
sku: common_1.Sku,
|
|
14203
|
+
price: money_1.Money
|
|
14204
|
+
});
|
|
14205
|
+
exports.InventoryChangedData = zod_1.z.object({
|
|
14206
|
+
sku: common_1.Sku,
|
|
14207
|
+
available: zod_1.z.number().int().nonnegative()
|
|
14208
|
+
});
|
|
14209
|
+
exports.BackInStockData = zod_1.z.object({
|
|
14210
|
+
sku: common_1.Sku,
|
|
14211
|
+
product_sku: common_1.Sku,
|
|
14212
|
+
customer_ref: zod_1.z.string(),
|
|
14213
|
+
email: zod_1.z.string().email().optional(),
|
|
14214
|
+
available: zod_1.z.number().int().nonnegative(),
|
|
14215
|
+
timestamp: common_1.Timestamp
|
|
14216
|
+
});
|
|
14217
|
+
exports.SupportTicketCreatedData = zod_1.z.object({
|
|
14218
|
+
reference: zod_1.z.string(),
|
|
14219
|
+
dazn_user_id: zod_1.z.string(),
|
|
14220
|
+
email: zod_1.z.string().email(),
|
|
14221
|
+
category: zod_1.z.string(),
|
|
14222
|
+
description: zod_1.z.string(),
|
|
14223
|
+
image_url: zod_1.z.string().url().optional(),
|
|
14224
|
+
timestamp: common_1.Timestamp
|
|
14225
|
+
});
|
|
14226
|
+
exports.ReturnStatusChangedData = zod_1.z.object({
|
|
14227
|
+
return_ref: zod_1.z.string(),
|
|
14228
|
+
status: order_tracking_1.ReturnStatus,
|
|
14229
|
+
outcome: order_tracking_1.ReturnOutcome.optional(),
|
|
14230
|
+
outcome_note: zod_1.z.string().optional(),
|
|
14231
|
+
lines: zod_1.z.array(zod_1.z.object({
|
|
14232
|
+
line_ref: zod_1.z.string(),
|
|
14233
|
+
outcome: order_tracking_1.ReturnOutcome
|
|
14234
|
+
})).optional(),
|
|
14235
|
+
timestamp: common_1.Timestamp
|
|
14236
|
+
});
|
|
14237
|
+
exports.EVENT_DATA_SCHEMAS = {
|
|
14238
|
+
"order.status_changed": exports.OrderStatusChangedData,
|
|
14239
|
+
"shipment.dispatched": exports.ShipmentDispatchedData,
|
|
14240
|
+
"shipment.delivered": exports.ShipmentDeliveredData,
|
|
14241
|
+
"order.cancelled": exports.OrderCancelledData,
|
|
14242
|
+
"payment.refunded": exports.PaymentRefundedData,
|
|
14243
|
+
"inventory.low_stock": exports.InventoryThresholdData,
|
|
14244
|
+
"inventory.out_of_stock": exports.InventoryThresholdData,
|
|
14245
|
+
"product.updated": exports.ProductUpdatedData,
|
|
14246
|
+
"price.updated": exports.PriceUpdatedData,
|
|
14247
|
+
"inventory.changed": exports.InventoryChangedData,
|
|
14248
|
+
"stock.back_in_stock": exports.BackInStockData,
|
|
14249
|
+
"support.ticket_created": exports.SupportTicketCreatedData,
|
|
14250
|
+
"return.status_changed": exports.ReturnStatusChangedData
|
|
14251
|
+
};
|
|
14252
|
+
exports.EventEnvelope = zod_1.z.object({
|
|
14253
|
+
event_id: ids_1.EventId,
|
|
14254
|
+
type: exports.EventType,
|
|
14255
|
+
created_at: common_1.Timestamp,
|
|
14256
|
+
data: zod_1.z.unknown()
|
|
14257
|
+
});
|
|
14258
|
+
const eventMember = (type) => zod_1.z.object({
|
|
14259
|
+
event_id: ids_1.EventId,
|
|
14260
|
+
type: zod_1.z.literal(type),
|
|
14261
|
+
created_at: common_1.Timestamp,
|
|
14262
|
+
data: exports.EVENT_DATA_SCHEMAS[type]
|
|
14263
|
+
});
|
|
14264
|
+
exports.Event = zod_1.z.discriminatedUnion("type", [eventMember("order.status_changed"), eventMember("shipment.dispatched"), eventMember("shipment.delivered"), eventMember("order.cancelled"), eventMember("payment.refunded"), eventMember("inventory.low_stock"), eventMember("inventory.out_of_stock"), eventMember("product.updated"), eventMember("price.updated"), eventMember("inventory.changed"), eventMember("stock.back_in_stock"), eventMember("support.ticket_created")]);
|
|
14265
|
+
})(events);
|
|
14266
|
+
return events;
|
|
14267
|
+
}
|
|
14268
|
+
var utils = {};
|
|
14269
|
+
var hasRequiredUtils;
|
|
14270
|
+
function requireUtils() {
|
|
14271
|
+
if (hasRequiredUtils) return utils;
|
|
14272
|
+
hasRequiredUtils = 1;
|
|
14273
|
+
Object.defineProperty(utils, "__esModule", {
|
|
14274
|
+
value: true
|
|
14275
|
+
});
|
|
14276
|
+
utils.parseOr = parseOr;
|
|
14277
|
+
utils.is = is;
|
|
14278
|
+
function parseOr(schema, value2, fallback) {
|
|
14279
|
+
const result = schema.safeParse(value2);
|
|
14280
|
+
return result.success ? result.data : fallback;
|
|
14281
|
+
}
|
|
14282
|
+
function is(schema, value2) {
|
|
14283
|
+
return schema.safeParse(value2).success;
|
|
14284
|
+
}
|
|
14285
|
+
return utils;
|
|
14286
|
+
}
|
|
14287
|
+
var client = {};
|
|
14288
|
+
var hasRequiredClient;
|
|
14289
|
+
function requireClient() {
|
|
14290
|
+
if (hasRequiredClient) return client;
|
|
14291
|
+
hasRequiredClient = 1;
|
|
14292
|
+
Object.defineProperty(client, "__esModule", {
|
|
14293
|
+
value: true
|
|
14294
|
+
});
|
|
14295
|
+
client.DaznApiError = void 0;
|
|
14296
|
+
client.createClient = createClient;
|
|
14297
|
+
const catalog_1 = requireCatalog();
|
|
14298
|
+
const content_1 = requireContent();
|
|
14299
|
+
const storefront_config_1 = requireStorefrontConfig();
|
|
14300
|
+
const inventory_1 = requireInventory();
|
|
14301
|
+
const cart_1 = requireCart();
|
|
14302
|
+
const session_1 = requireSession();
|
|
14303
|
+
const order_tracking_1 = requireOrderTracking();
|
|
14304
|
+
const stock_alerts_1 = requireStockAlerts();
|
|
14305
|
+
const support_1 = requireSupport();
|
|
14306
|
+
const vip_1 = requireVip();
|
|
14307
|
+
const errors_1 = requireErrors();
|
|
14308
|
+
class DaznApiError extends Error {
|
|
14309
|
+
status;
|
|
14310
|
+
code;
|
|
14311
|
+
requestId;
|
|
14312
|
+
body;
|
|
14313
|
+
constructor(status, parsed) {
|
|
14314
|
+
super(parsed?.error.message ?? `DAZN API error (HTTP ${status})`);
|
|
14315
|
+
this.name = "DaznApiError";
|
|
14316
|
+
this.status = status;
|
|
14317
|
+
this.code = parsed?.error.code;
|
|
14318
|
+
this.requestId = parsed?.request_id;
|
|
14319
|
+
this.body = parsed?.error;
|
|
14320
|
+
}
|
|
14321
|
+
}
|
|
14322
|
+
client.DaznApiError = DaznApiError;
|
|
14323
|
+
function buildQuery(query) {
|
|
14324
|
+
if (!query) return "";
|
|
14325
|
+
const params = new URLSearchParams();
|
|
14326
|
+
for (const [key, value2] of Object.entries(query)) {
|
|
14327
|
+
if (value2 !== void 0) params.set(key, String(value2));
|
|
14328
|
+
}
|
|
14329
|
+
const qs = params.toString();
|
|
14330
|
+
return qs ? `?${qs}` : "";
|
|
14331
|
+
}
|
|
14332
|
+
function createClient(options2) {
|
|
14333
|
+
const doFetch = options2.fetch ?? globalThis.fetch;
|
|
14334
|
+
if (!doFetch) {
|
|
14335
|
+
throw new Error("No fetch implementation available; pass options.fetch");
|
|
14336
|
+
}
|
|
14337
|
+
const base = options2.baseUrl.replace(/\/$/, "");
|
|
14338
|
+
function market(query) {
|
|
14339
|
+
return {
|
|
14340
|
+
...options2.market,
|
|
14341
|
+
...query
|
|
14342
|
+
};
|
|
14343
|
+
}
|
|
14344
|
+
async function request(config) {
|
|
14345
|
+
const token = await options2.getToken?.();
|
|
14346
|
+
const headers = {
|
|
14347
|
+
accept: "application/json",
|
|
14348
|
+
...options2.defaultHeaders,
|
|
14349
|
+
...config.headers
|
|
14350
|
+
};
|
|
14351
|
+
const body3 = config.body === void 0 && config.method === "POST" ? {} : config.body;
|
|
14352
|
+
if (body3 !== void 0) headers["content-type"] = "application/json";
|
|
14353
|
+
if (token) headers["authorization"] = `Bearer ${token}`;
|
|
14354
|
+
const res = await doFetch(`${base}${config.path}${buildQuery(config.query)}`, {
|
|
14355
|
+
method: config.method,
|
|
14356
|
+
headers,
|
|
14357
|
+
credentials: options2.credentials ?? "include",
|
|
14358
|
+
body: body3 !== void 0 ? JSON.stringify(body3) : void 0
|
|
14359
|
+
});
|
|
14360
|
+
if (!res.ok) {
|
|
14361
|
+
let parsed;
|
|
14362
|
+
try {
|
|
14363
|
+
parsed = errors_1.ErrorResponse.parse(await res.json());
|
|
14364
|
+
} catch {
|
|
14365
|
+
parsed = void 0;
|
|
14366
|
+
}
|
|
14367
|
+
throw new DaznApiError(res.status, parsed);
|
|
14368
|
+
}
|
|
14369
|
+
return config.schema.parse(await res.json());
|
|
14370
|
+
}
|
|
14371
|
+
async function upload(path, file, schema) {
|
|
14372
|
+
const token = await options2.getToken?.();
|
|
14373
|
+
const headers = {
|
|
14374
|
+
accept: "application/json",
|
|
14375
|
+
...options2.defaultHeaders
|
|
14376
|
+
};
|
|
14377
|
+
if (token) headers["authorization"] = `Bearer ${token}`;
|
|
14378
|
+
const form = new FormData();
|
|
14379
|
+
form.append("file", file);
|
|
14380
|
+
const res = await doFetch(`${base}${path}`, {
|
|
14381
|
+
method: "POST",
|
|
14382
|
+
headers,
|
|
14383
|
+
credentials: options2.credentials ?? "include",
|
|
14384
|
+
body: form
|
|
14385
|
+
});
|
|
14386
|
+
if (!res.ok) {
|
|
14387
|
+
let parsed;
|
|
14388
|
+
try {
|
|
14389
|
+
parsed = errors_1.ErrorResponse.parse(await res.json());
|
|
14390
|
+
} catch {
|
|
14391
|
+
parsed = void 0;
|
|
14392
|
+
}
|
|
14393
|
+
throw new DaznApiError(res.status, parsed);
|
|
14394
|
+
}
|
|
14395
|
+
return schema.parse(await res.json());
|
|
14396
|
+
}
|
|
14397
|
+
return {
|
|
14398
|
+
catalog: {
|
|
14399
|
+
listProducts: (query = {}) => request({
|
|
14400
|
+
method: "GET",
|
|
14401
|
+
path: "/catalog/products",
|
|
14402
|
+
query,
|
|
14403
|
+
schema: catalog_1.ProductListResponse
|
|
14404
|
+
}),
|
|
14405
|
+
getProduct: (sku, query = {}) => request({
|
|
14406
|
+
method: "GET",
|
|
14407
|
+
path: `/catalog/products/${encodeURIComponent(sku)}`,
|
|
14408
|
+
query,
|
|
14409
|
+
schema: catalog_1.Product
|
|
14410
|
+
}),
|
|
14411
|
+
getRecommendations: (sku, query = {}) => request({
|
|
14412
|
+
method: "GET",
|
|
14413
|
+
path: `/catalog/products/${encodeURIComponent(sku)}/recommendations`,
|
|
14414
|
+
query,
|
|
14415
|
+
schema: catalog_1.RecommendationsResponse
|
|
14416
|
+
}),
|
|
14417
|
+
getCategoryPage: (code, query = {}) => request({
|
|
14418
|
+
method: "GET",
|
|
14419
|
+
path: "/catalog/categories/page",
|
|
14420
|
+
query: {
|
|
14421
|
+
...query,
|
|
14422
|
+
code
|
|
14423
|
+
},
|
|
14424
|
+
schema: content_1.CategoryPage
|
|
14425
|
+
})
|
|
14426
|
+
},
|
|
14427
|
+
content: {
|
|
14428
|
+
home: () => request({
|
|
14429
|
+
method: "GET",
|
|
14430
|
+
path: "/content/home",
|
|
14431
|
+
schema: content_1.HomeContent
|
|
14432
|
+
})
|
|
14433
|
+
},
|
|
14434
|
+
storefrontConfig: {
|
|
14435
|
+
get: () => request({
|
|
14436
|
+
method: "GET",
|
|
14437
|
+
path: "/storefront-config",
|
|
14438
|
+
schema: storefront_config_1.StorefrontConfig
|
|
14439
|
+
})
|
|
14440
|
+
},
|
|
14441
|
+
inventory: {
|
|
14442
|
+
get: (sku) => request({
|
|
14443
|
+
method: "GET",
|
|
14444
|
+
path: `/inventory/${encodeURIComponent(sku)}`,
|
|
14445
|
+
schema: inventory_1.Inventory
|
|
14446
|
+
})
|
|
14447
|
+
},
|
|
14448
|
+
cart: {
|
|
14449
|
+
create: (query = {}) => request({
|
|
14450
|
+
method: "POST",
|
|
14451
|
+
path: "/cart",
|
|
14452
|
+
query: market(query),
|
|
14453
|
+
schema: cart_1.Cart
|
|
14454
|
+
}),
|
|
14455
|
+
get: (query = {}) => request({
|
|
14456
|
+
method: "GET",
|
|
14457
|
+
path: "/cart",
|
|
14458
|
+
query: market(query),
|
|
14459
|
+
schema: cart_1.Cart
|
|
14460
|
+
}),
|
|
14461
|
+
addItem: (body3, query = {}) => request({
|
|
14462
|
+
method: "POST",
|
|
14463
|
+
path: "/cart/items",
|
|
14464
|
+
body: body3,
|
|
14465
|
+
query: market(query),
|
|
14466
|
+
schema: cart_1.Cart
|
|
14467
|
+
}),
|
|
14468
|
+
updateItem: (sku, body3, query = {}) => request({
|
|
14469
|
+
method: "PATCH",
|
|
14470
|
+
path: `/cart/items/${encodeURIComponent(sku)}`,
|
|
14471
|
+
body: body3,
|
|
14472
|
+
query: market(query),
|
|
14473
|
+
schema: cart_1.Cart
|
|
14474
|
+
}),
|
|
14475
|
+
removeItem: (sku, query = {}) => request({
|
|
14476
|
+
method: "DELETE",
|
|
14477
|
+
path: `/cart/items/${encodeURIComponent(sku)}`,
|
|
14478
|
+
query: market(query),
|
|
14479
|
+
schema: cart_1.Cart
|
|
14480
|
+
}),
|
|
14481
|
+
handoff: (query = {}) => request({
|
|
14482
|
+
query: market(query),
|
|
14483
|
+
method: "POST",
|
|
14484
|
+
path: "/cart/handoff",
|
|
14485
|
+
schema: cart_1.CartHandoffResponse
|
|
14486
|
+
})
|
|
14487
|
+
},
|
|
14488
|
+
stockAlerts: {
|
|
14489
|
+
create: (body3, query = {}) => request({
|
|
14490
|
+
method: "POST",
|
|
14491
|
+
path: "/stock-alerts",
|
|
14492
|
+
body: body3,
|
|
14493
|
+
query: market(query),
|
|
14494
|
+
schema: stock_alerts_1.StockAlert
|
|
14495
|
+
})
|
|
14496
|
+
},
|
|
14497
|
+
orders: {
|
|
14498
|
+
list: () => request({
|
|
14499
|
+
method: "GET",
|
|
14500
|
+
path: "/orders",
|
|
14501
|
+
schema: order_tracking_1.OrderList
|
|
14502
|
+
}),
|
|
14503
|
+
get: (orderRef) => request({
|
|
14504
|
+
method: "GET",
|
|
14505
|
+
path: `/orders/${encodeURIComponent(orderRef)}`,
|
|
14506
|
+
schema: order_tracking_1.OrderDetail
|
|
14507
|
+
}),
|
|
14508
|
+
requestCancellation: (orderRef, body3) => request({
|
|
14509
|
+
method: "POST",
|
|
14510
|
+
path: `/orders/${encodeURIComponent(orderRef)}/cancellation`,
|
|
14511
|
+
body: body3,
|
|
14512
|
+
schema: order_tracking_1.OrderDetail
|
|
14513
|
+
}),
|
|
14514
|
+
createReturn: (orderRef, body3) => request({
|
|
14515
|
+
method: "POST",
|
|
14516
|
+
path: `/orders/${encodeURIComponent(orderRef)}/returns`,
|
|
14517
|
+
body: body3,
|
|
14518
|
+
schema: order_tracking_1.ReturnDetail
|
|
14519
|
+
})
|
|
14520
|
+
},
|
|
14521
|
+
returns: {
|
|
14522
|
+
get: (returnRef) => request({
|
|
14523
|
+
method: "GET",
|
|
14524
|
+
path: `/returns/${encodeURIComponent(returnRef)}`,
|
|
14525
|
+
schema: order_tracking_1.ReturnDetail
|
|
14526
|
+
})
|
|
14527
|
+
},
|
|
14528
|
+
support: {
|
|
14529
|
+
uploadAttachment: (file) => upload("/support/attachments", file, support_1.SupportAttachment),
|
|
14530
|
+
createTicket: (body3) => request({
|
|
14531
|
+
method: "POST",
|
|
14532
|
+
path: "/support/tickets",
|
|
14533
|
+
body: body3,
|
|
14534
|
+
schema: support_1.SupportTicket
|
|
14535
|
+
})
|
|
14536
|
+
},
|
|
14537
|
+
vip: {
|
|
14538
|
+
resolve: (locator, query = {}) => request({
|
|
14539
|
+
method: "POST",
|
|
14540
|
+
path: "/vip/resolve",
|
|
14541
|
+
body: typeof locator === "string" ? {
|
|
14542
|
+
token: locator
|
|
14543
|
+
} : locator,
|
|
14544
|
+
query: market(query),
|
|
14545
|
+
schema: vip_1.VipInviteView
|
|
14546
|
+
}),
|
|
14547
|
+
addToCart: (body3, query = {}) => request({
|
|
14548
|
+
method: "POST",
|
|
14549
|
+
path: "/vip/cart/items",
|
|
14550
|
+
body: body3,
|
|
14551
|
+
query: market(query),
|
|
14552
|
+
schema: cart_1.Cart
|
|
14553
|
+
})
|
|
14554
|
+
},
|
|
14555
|
+
auth: {
|
|
14556
|
+
exchangeSession: (body3) => request({
|
|
14557
|
+
method: "POST",
|
|
14558
|
+
path: "/auth/session",
|
|
14559
|
+
body: body3,
|
|
14560
|
+
schema: session_1.SessionExchangeResponse
|
|
14561
|
+
}),
|
|
14562
|
+
redeemShopSession: (body3) => request({
|
|
14563
|
+
method: "POST",
|
|
14564
|
+
path: "/auth/shop-session",
|
|
14565
|
+
body: body3,
|
|
14566
|
+
schema: session_1.ShopSessionResponse
|
|
14567
|
+
})
|
|
14568
|
+
}
|
|
14569
|
+
};
|
|
14570
|
+
}
|
|
14571
|
+
return client;
|
|
14572
|
+
}
|
|
14573
|
+
var hasRequiredDist;
|
|
14574
|
+
function requireDist() {
|
|
14575
|
+
if (hasRequiredDist) return dist;
|
|
14576
|
+
hasRequiredDist = 1;
|
|
14577
|
+
(function(exports) {
|
|
14578
|
+
var __createBinding = dist && dist.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
14579
|
+
if (k2 === void 0) k2 = k;
|
|
14580
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14581
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
14582
|
+
desc = {
|
|
14583
|
+
enumerable: true,
|
|
14584
|
+
get: function() {
|
|
14585
|
+
return m[k];
|
|
14586
|
+
}
|
|
14587
|
+
};
|
|
14588
|
+
}
|
|
14589
|
+
Object.defineProperty(o, k2, desc);
|
|
14590
|
+
} : function(o, m, k, k2) {
|
|
14591
|
+
if (k2 === void 0) k2 = k;
|
|
14592
|
+
o[k2] = m[k];
|
|
14593
|
+
});
|
|
14594
|
+
var __exportStar = dist && dist.__exportStar || function(m, exports2) {
|
|
14595
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p);
|
|
14596
|
+
};
|
|
14597
|
+
Object.defineProperty(exports, "__esModule", {
|
|
14598
|
+
value: true
|
|
14599
|
+
});
|
|
14600
|
+
exports.API_VERSION = void 0;
|
|
14601
|
+
__exportStar(requireMoney(), exports);
|
|
14602
|
+
__exportStar(requireIds(), exports);
|
|
14603
|
+
__exportStar(requireCommon(), exports);
|
|
14604
|
+
__exportStar(requireSession(), exports);
|
|
14605
|
+
__exportStar(requireCatalog(), exports);
|
|
14606
|
+
__exportStar(requireContent(), exports);
|
|
14607
|
+
__exportStar(requireInventory(), exports);
|
|
14608
|
+
__exportStar(requireCart(), exports);
|
|
14609
|
+
__exportStar(requireOrders(), exports);
|
|
14610
|
+
__exportStar(requireOrderTracking(), exports);
|
|
14611
|
+
__exportStar(requireDeliveryOptions(), exports);
|
|
14612
|
+
__exportStar(requireHealth(), exports);
|
|
14613
|
+
__exportStar(requireStockAlerts(), exports);
|
|
14614
|
+
__exportStar(requireSupport(), exports);
|
|
14615
|
+
__exportStar(requireVip(), exports);
|
|
14616
|
+
__exportStar(requireStorefrontConfig(), exports);
|
|
14617
|
+
__exportStar(requireErrors(), exports);
|
|
14618
|
+
__exportStar(requireEvents(), exports);
|
|
14619
|
+
__exportStar(requireUtils(), exports);
|
|
14620
|
+
__exportStar(requireClient(), exports);
|
|
14621
|
+
exports.API_VERSION = "v1";
|
|
14622
|
+
})(dist);
|
|
14623
|
+
return dist;
|
|
14624
|
+
}
|
|
14625
|
+
var distExports = requireDist();
|
|
14626
|
+
const hero$1 = "_hero_dctyt_1";
|
|
14627
|
+
const image$1 = "_image_dctyt_11";
|
|
14628
|
+
const foot = "_foot_dctyt_34";
|
|
14629
|
+
const text$1 = "_text_dctyt_40";
|
|
14630
|
+
const logo$1 = "_logo_dctyt_48";
|
|
14631
|
+
const copy$1 = "_copy_dctyt_53";
|
|
14632
|
+
const headline = "_headline_dctyt_62";
|
|
14633
|
+
const body = "_body_dctyt_70";
|
|
14634
|
+
const cta$2 = "_cta_dctyt_79";
|
|
14635
|
+
const video = "_video_dctyt_83";
|
|
14636
|
+
const desktopOnly = "_desktopOnly_dctyt_87";
|
|
14637
|
+
const phoneOnly$1 = "_phoneOnly_dctyt_97";
|
|
14638
|
+
const hero$2 = {
|
|
14639
|
+
hero: hero$1,
|
|
14640
|
+
image: image$1,
|
|
14641
|
+
foot,
|
|
14642
|
+
text: text$1,
|
|
14643
|
+
logo: logo$1,
|
|
14644
|
+
copy: copy$1,
|
|
14645
|
+
headline,
|
|
14646
|
+
body,
|
|
14647
|
+
cta: cta$2,
|
|
14648
|
+
video,
|
|
14649
|
+
desktopOnly,
|
|
14650
|
+
phoneOnly: phoneOnly$1
|
|
14651
|
+
};
|
|
14652
|
+
function VipHero({ hero: hero2, onContinue }) {
|
|
14653
|
+
const t = useT();
|
|
14654
|
+
const assetUrl = useAssetUrl();
|
|
14655
|
+
const ref = useRef(null);
|
|
14656
|
+
useTopOffset(ref, "--vip-hero-top");
|
|
14657
|
+
const desktopImage = hero2.desktop_image ?? null;
|
|
14658
|
+
const desktopVideo = hero2.desktop_video ?? null;
|
|
14659
|
+
const wide2 = desktopImage !== null || desktopVideo !== null;
|
|
14660
|
+
return jsx(ShopSurface, {
|
|
14661
|
+
tone: "dark",
|
|
14662
|
+
fill: true,
|
|
14663
|
+
"data-shop-layout": "wide",
|
|
14664
|
+
children: jsxs("section", {
|
|
14665
|
+
ref,
|
|
14666
|
+
className: hero$2.hero,
|
|
14667
|
+
children: [hero2.image && jsx("div", {
|
|
14668
|
+
className: [hero$2.image, wide2 ? hero$2.phoneOnly : ""].join(" "),
|
|
14669
|
+
children: jsx(ShopImage, {
|
|
14670
|
+
src: hero2.image,
|
|
14671
|
+
alt: "",
|
|
14672
|
+
fill: true,
|
|
14673
|
+
sizes: "(max-width: 480px) 100vw, 480px",
|
|
14674
|
+
priority: true
|
|
14675
|
+
})
|
|
14676
|
+
}), wide2 && jsxs("div", {
|
|
14677
|
+
className: [hero$2.image, hero$2.desktopOnly].join(" "),
|
|
14678
|
+
children: [desktopImage && jsx(ShopImage, {
|
|
14679
|
+
src: desktopImage,
|
|
14680
|
+
alt: "",
|
|
14681
|
+
fill: true,
|
|
14682
|
+
sizes: "100vw"
|
|
14683
|
+
}), desktopVideo && jsx(ShopVideo, {
|
|
14684
|
+
src: desktopVideo,
|
|
14685
|
+
...desktopImage ? {
|
|
14686
|
+
poster: desktopImage
|
|
14687
|
+
} : {},
|
|
14688
|
+
fill: true,
|
|
14689
|
+
className: hero$2.video
|
|
14690
|
+
})]
|
|
13213
14691
|
}), jsxs("div", {
|
|
13214
14692
|
className: hero$2.foot,
|
|
13215
14693
|
children: [jsxs("div", {
|
|
@@ -13363,27 +14841,43 @@ function VipBreadcrumb({ title: title2, trail: trail2 = [], onHome }) {
|
|
|
13363
14841
|
}
|
|
13364
14842
|
const INVITE_REF = /^vip_[A-Za-z0-9._-]+$/;
|
|
13365
14843
|
function locatorOf(segment) {
|
|
13366
|
-
|
|
13367
|
-
|
|
13368
|
-
|
|
14844
|
+
if (INVITE_REF.test(segment) && segment.length !== 43) {
|
|
14845
|
+
return {
|
|
14846
|
+
invite_ref: segment
|
|
14847
|
+
};
|
|
14848
|
+
}
|
|
14849
|
+
if (distExports.VIP_TOKEN_PATTERN.test(segment)) return {
|
|
13369
14850
|
token: segment
|
|
13370
14851
|
};
|
|
14852
|
+
return null;
|
|
13371
14853
|
}
|
|
14854
|
+
const INVALID_LINK = /* @__PURE__ */ new Set(["invalid_request", "vip_invite_not_found", "vip_invite_mismatch"]);
|
|
13372
14855
|
function VipLandingView({ token, onUnavailable }) {
|
|
13373
14856
|
const t = useT();
|
|
13374
14857
|
const { api, emit } = useShop();
|
|
13375
|
-
const
|
|
14858
|
+
const locator = locatorOf(token);
|
|
14859
|
+
const [load, setLoad] = useState(locator ? {
|
|
13376
14860
|
status: "loading"
|
|
14861
|
+
} : {
|
|
14862
|
+
status: "invalid"
|
|
13377
14863
|
});
|
|
14864
|
+
const [attempt, setAttempt] = useState(0);
|
|
13378
14865
|
const emitRef = useRef(emit);
|
|
13379
14866
|
emitRef.current = emit;
|
|
13380
14867
|
useSetScreenTitle(t("DAZN Shop"), "none");
|
|
13381
14868
|
useEffect(() => {
|
|
14869
|
+
const target = locatorOf(token);
|
|
14870
|
+
if (!target) {
|
|
14871
|
+
setLoad({
|
|
14872
|
+
status: "invalid"
|
|
14873
|
+
});
|
|
14874
|
+
return void 0;
|
|
14875
|
+
}
|
|
13382
14876
|
let live = true;
|
|
13383
14877
|
setLoad({
|
|
13384
14878
|
status: "loading"
|
|
13385
14879
|
});
|
|
13386
|
-
api.vip.resolve(
|
|
14880
|
+
api.vip.resolve(target).then((invite2) => {
|
|
13387
14881
|
if (live) setLoad({
|
|
13388
14882
|
status: "done",
|
|
13389
14883
|
invite: invite2
|
|
@@ -13396,7 +14890,9 @@ function VipLandingView({ token, onUnavailable }) {
|
|
|
13396
14890
|
code,
|
|
13397
14891
|
scope: "vip.resolve"
|
|
13398
14892
|
});
|
|
13399
|
-
setLoad({
|
|
14893
|
+
setLoad(code && INVALID_LINK.has(code) ? {
|
|
14894
|
+
status: "invalid"
|
|
14895
|
+
} : {
|
|
13400
14896
|
status: "error",
|
|
13401
14897
|
code
|
|
13402
14898
|
});
|
|
@@ -13404,19 +14900,18 @@ function VipLandingView({ token, onUnavailable }) {
|
|
|
13404
14900
|
return () => {
|
|
13405
14901
|
live = false;
|
|
13406
14902
|
};
|
|
13407
|
-
}, [api, token]);
|
|
14903
|
+
}, [api, token, attempt]);
|
|
14904
|
+
if (load.status === "invalid") return jsx(VipInviteInvalid, {});
|
|
13408
14905
|
if (load.status === "loading") return jsx(ScreenSkeleton, {
|
|
13409
14906
|
tone: "light"
|
|
13410
14907
|
});
|
|
13411
14908
|
if (load.status === "error") {
|
|
13412
|
-
if (load.code === "vip_invite_not_found" || load.code === "vip_invite_mismatch") {
|
|
13413
|
-
return jsx(VipInviteInvalid, {});
|
|
13414
|
-
}
|
|
13415
14909
|
return jsx(ShopSurface, {
|
|
13416
14910
|
tone: "light",
|
|
13417
14911
|
fill: true,
|
|
13418
14912
|
children: jsx(ErrorState, {
|
|
13419
|
-
code: load.code
|
|
14913
|
+
code: load.code,
|
|
14914
|
+
onRetry: () => setAttempt((n) => n + 1)
|
|
13420
14915
|
})
|
|
13421
14916
|
});
|
|
13422
14917
|
}
|
|
@@ -13460,8 +14955,10 @@ function ActiveLanding({ token, invite }) {
|
|
|
13460
14955
|
if (current2?.vip?.invite_ref === invite.invite_ref) {
|
|
13461
14956
|
for (const line2 of current2.items) await api.cart.removeItem(line2.sku);
|
|
13462
14957
|
}
|
|
14958
|
+
const target = locatorOf(token);
|
|
14959
|
+
if (!target) throw new Error("invalid invite link");
|
|
13463
14960
|
const cart2 = await api.vip.addToCart({
|
|
13464
|
-
...
|
|
14961
|
+
...target,
|
|
13465
14962
|
sku: variantSku,
|
|
13466
14963
|
qty: 1
|
|
13467
14964
|
});
|
|
@@ -13524,31 +15021,33 @@ function ActiveLanding({ token, invite }) {
|
|
|
13524
15021
|
})
|
|
13525
15022
|
});
|
|
13526
15023
|
}
|
|
13527
|
-
const showcase = "
|
|
13528
|
-
const panel = "
|
|
13529
|
-
const image = "
|
|
13530
|
-
const desktopArt = "
|
|
13531
|
-
const hero = "
|
|
13532
|
-
const heroContent = "
|
|
13533
|
-
const heroText = "
|
|
13534
|
-
const logo = "
|
|
13535
|
-
const heroTitle = "
|
|
13536
|
-
const heroSub = "
|
|
13537
|
-
const swipe = "
|
|
13538
|
-
const swipeLabel = "
|
|
13539
|
-
const chevron$1 = "
|
|
13540
|
-
const overlay$1 = "
|
|
13541
|
-
const copy = "
|
|
13542
|
-
const title$2 = "
|
|
13543
|
-
const subtitle$1 = "
|
|
13544
|
-
const cta = "
|
|
13545
|
-
const mosaic = "
|
|
13546
|
-
const info = "
|
|
13547
|
-
const
|
|
13548
|
-
const
|
|
13549
|
-
const
|
|
13550
|
-
const
|
|
13551
|
-
const
|
|
15024
|
+
const showcase = "_showcase_nmp6h_14";
|
|
15025
|
+
const panel = "_panel_nmp6h_40";
|
|
15026
|
+
const image = "_image_nmp6h_93";
|
|
15027
|
+
const desktopArt = "_desktopArt_nmp6h_98";
|
|
15028
|
+
const hero = "_hero_nmp6h_137";
|
|
15029
|
+
const heroContent = "_heroContent_nmp6h_228";
|
|
15030
|
+
const heroText = "_heroText_nmp6h_252";
|
|
15031
|
+
const logo = "_logo_nmp6h_261";
|
|
15032
|
+
const heroTitle = "_heroTitle_nmp6h_281";
|
|
15033
|
+
const heroSub = "_heroSub_nmp6h_305";
|
|
15034
|
+
const swipe = "_swipe_nmp6h_324";
|
|
15035
|
+
const swipeLabel = "_swipeLabel_nmp6h_331";
|
|
15036
|
+
const chevron$1 = "_chevron_nmp6h_337";
|
|
15037
|
+
const overlay$1 = "_overlay_nmp6h_11";
|
|
15038
|
+
const copy = "_copy_nmp6h_374";
|
|
15039
|
+
const title$2 = "_title_nmp6h_386";
|
|
15040
|
+
const subtitle$1 = "_subtitle_nmp6h_395";
|
|
15041
|
+
const cta = "_cta_nmp6h_403";
|
|
15042
|
+
const mosaic = "_mosaic_nmp6h_447";
|
|
15043
|
+
const info = "_info_nmp6h_459";
|
|
15044
|
+
const band = "_band_nmp6h_463";
|
|
15045
|
+
const bandTitle = "_bandTitle_nmp6h_472";
|
|
15046
|
+
const products = "_products_nmp6h_484";
|
|
15047
|
+
const wideOnly = "_wideOnly_nmp6h_504";
|
|
15048
|
+
const phoneOnly = "_phoneOnly_nmp6h_530";
|
|
15049
|
+
const phoneArt = "_phoneArt_nmp6h_531";
|
|
15050
|
+
const desktopFocal = "_desktopFocal_nmp6h_540";
|
|
13552
15051
|
const styles$3 = {
|
|
13553
15052
|
showcase,
|
|
13554
15053
|
panel,
|
|
@@ -13570,6 +15069,8 @@ const styles$3 = {
|
|
|
13570
15069
|
cta,
|
|
13571
15070
|
mosaic,
|
|
13572
15071
|
info,
|
|
15072
|
+
band,
|
|
15073
|
+
bandTitle,
|
|
13573
15074
|
products,
|
|
13574
15075
|
wideOnly,
|
|
13575
15076
|
phoneOnly,
|
|
@@ -13588,9 +15089,18 @@ function useDocumentSnap(ref, enabled = true) {
|
|
|
13588
15089
|
root2.style.scrollPaddingTop = "0px";
|
|
13589
15090
|
let snapping = false;
|
|
13590
15091
|
let awaitingTouch = false;
|
|
15092
|
+
const layoutOf = () => {
|
|
15093
|
+
let top22 = 0;
|
|
15094
|
+
for (let node = el; node; node = node.offsetParent) {
|
|
15095
|
+
top22 += node.offsetTop;
|
|
15096
|
+
}
|
|
15097
|
+
return `${root2.scrollHeight}:${top22}`;
|
|
15098
|
+
};
|
|
15099
|
+
let snappedLayout = "";
|
|
13591
15100
|
const snapOn = () => {
|
|
13592
15101
|
root2.style.scrollSnapType = "y mandatory";
|
|
13593
15102
|
snapping = true;
|
|
15103
|
+
snappedLayout = layoutOf();
|
|
13594
15104
|
};
|
|
13595
15105
|
const snapOff = () => {
|
|
13596
15106
|
root2.style.scrollSnapType = "none";
|
|
@@ -13616,6 +15126,7 @@ function useDocumentSnap(ref, enabled = true) {
|
|
|
13616
15126
|
};
|
|
13617
15127
|
let at = TOP;
|
|
13618
15128
|
let returning = false;
|
|
15129
|
+
let restoring = false;
|
|
13619
15130
|
let holding = false;
|
|
13620
15131
|
const settle = () => {
|
|
13621
15132
|
returning = false;
|
|
@@ -13632,19 +15143,26 @@ function useDocumentSnap(ref, enabled = true) {
|
|
|
13632
15143
|
release();
|
|
13633
15144
|
const back = returnOffset(here());
|
|
13634
15145
|
returning = back !== null;
|
|
15146
|
+
restoring = returning;
|
|
13635
15147
|
at = back ?? TOP;
|
|
13636
15148
|
holding = true;
|
|
13637
15149
|
if (frame2 !== null && typeof window.cancelAnimationFrame === "function") {
|
|
13638
15150
|
window.cancelAnimationFrame(frame2);
|
|
13639
15151
|
}
|
|
13640
|
-
|
|
15152
|
+
if (restoring) snapOn();
|
|
15153
|
+
else snapOff();
|
|
13641
15154
|
top2();
|
|
13642
15155
|
frame2 = typeof window.requestAnimationFrame === "function" ? window.requestAnimationFrame(() => {
|
|
13643
15156
|
top2();
|
|
13644
15157
|
snapOn();
|
|
13645
15158
|
}) : null;
|
|
13646
15159
|
release = anchorTop(() => {
|
|
13647
|
-
if (snapping) {
|
|
15160
|
+
if (snapping && !restoring) {
|
|
15161
|
+
const layout = layoutOf();
|
|
15162
|
+
if (layout !== snappedLayout) {
|
|
15163
|
+
snappedLayout = layout;
|
|
15164
|
+
return true;
|
|
15165
|
+
}
|
|
13648
15166
|
snapOff();
|
|
13649
15167
|
snapOnAtTouch();
|
|
13650
15168
|
}
|
|
@@ -13698,8 +15216,8 @@ function useDocumentSnap(ref, enabled = true) {
|
|
|
13698
15216
|
};
|
|
13699
15217
|
}, [ref, enabled]);
|
|
13700
15218
|
}
|
|
13701
|
-
const
|
|
13702
|
-
const
|
|
15219
|
+
const DESKTOP_POSTER = "/figma/home/desktop-poster.jpg";
|
|
15220
|
+
const DESKTOP_VIDEO = "/figma/home/desktop.mp4";
|
|
13703
15221
|
const FALLBACK_PANELS = [{
|
|
13704
15222
|
key: "hoodies",
|
|
13705
15223
|
title: "Hoodies",
|
|
@@ -13709,7 +15227,8 @@ const FALLBACK_PANELS = [{
|
|
|
13709
15227
|
target: "hoodies",
|
|
13710
15228
|
video: "/figma/home/hoodies.mp4",
|
|
13711
15229
|
image: "/figma/home/hoodies-poster.jpg",
|
|
13712
|
-
desktopImage:
|
|
15230
|
+
desktopImage: DESKTOP_POSTER,
|
|
15231
|
+
desktopVideo: DESKTOP_VIDEO
|
|
13713
15232
|
}, {
|
|
13714
15233
|
key: "zip-ups",
|
|
13715
15234
|
title: "Zip Ups",
|
|
@@ -13719,7 +15238,8 @@ const FALLBACK_PANELS = [{
|
|
|
13719
15238
|
target: "zip-ups",
|
|
13720
15239
|
video: "/figma/home/zip-ups.mp4",
|
|
13721
15240
|
image: "/figma/home/zip-ups-poster.jpg",
|
|
13722
|
-
desktopImage:
|
|
15241
|
+
desktopImage: DESKTOP_POSTER,
|
|
15242
|
+
desktopVideo: DESKTOP_VIDEO
|
|
13723
15243
|
}, {
|
|
13724
15244
|
key: "t-shirts",
|
|
13725
15245
|
title: "T-Shirts",
|
|
@@ -13729,17 +15249,20 @@ const FALLBACK_PANELS = [{
|
|
|
13729
15249
|
target: "t-shirts",
|
|
13730
15250
|
video: "/figma/home/tshirts.mp4",
|
|
13731
15251
|
image: "/figma/home/tshirts-poster.jpg",
|
|
13732
|
-
desktopImage:
|
|
15252
|
+
desktopImage: DESKTOP_POSTER,
|
|
15253
|
+
desktopVideo: DESKTOP_VIDEO
|
|
13733
15254
|
}];
|
|
13734
|
-
|
|
15255
|
+
const BAND_LIMIT = 20;
|
|
15256
|
+
const WIDE_BAND = 3;
|
|
15257
|
+
function useBandProducts(target) {
|
|
13735
15258
|
const shop2 = useShopOptional();
|
|
13736
15259
|
const [loaded, setLoaded] = useState(null);
|
|
13737
15260
|
useEffect(() => {
|
|
13738
|
-
if (!
|
|
15261
|
+
if (!target || !shop2) return;
|
|
13739
15262
|
let live = true;
|
|
13740
15263
|
void shop2.api.catalog.listProducts({
|
|
13741
15264
|
category: target,
|
|
13742
|
-
limit:
|
|
15265
|
+
limit: BAND_LIMIT,
|
|
13743
15266
|
...shop2.market ?? {}
|
|
13744
15267
|
}).then((res) => {
|
|
13745
15268
|
const products2 = res.data;
|
|
@@ -13753,12 +15276,13 @@ function useBandProducts(target, enabled) {
|
|
|
13753
15276
|
return () => {
|
|
13754
15277
|
live = false;
|
|
13755
15278
|
};
|
|
13756
|
-
}, [
|
|
13757
|
-
return loaded && loaded.target === target ? loaded.products
|
|
15279
|
+
}, [target, shop2]);
|
|
15280
|
+
return loaded && loaded.target === target ? loaded.products : [];
|
|
13758
15281
|
}
|
|
13759
15282
|
function CategoryPanel({ panel: panel2, wide: wide2 }) {
|
|
13760
15283
|
const t = useT();
|
|
13761
|
-
const
|
|
15284
|
+
const all = useBandProducts(panel2.target);
|
|
15285
|
+
const products2 = wide2 ? all.slice(0, WIDE_BAND) : all;
|
|
13762
15286
|
return jsxs("section", {
|
|
13763
15287
|
className: styles$3.panel,
|
|
13764
15288
|
"aria-label": t(panel2.title),
|
|
@@ -13789,6 +15313,13 @@ function CategoryPanel({ panel: panel2, wide: wide2 }) {
|
|
|
13789
15313
|
fill: true,
|
|
13790
15314
|
sizes: "(max-width: 480px) 100vw, 480px",
|
|
13791
15315
|
className: [styles$3.image, panel2.desktopImage ? styles$3.desktopFocal : ""].join(" ")
|
|
15316
|
+
}), wide2 && panel2.desktopVideo && jsx(ShopVideo, {
|
|
15317
|
+
src: panel2.desktopVideo,
|
|
15318
|
+
...panel2.desktopImage ? {
|
|
15319
|
+
poster: panel2.desktopImage
|
|
15320
|
+
} : {},
|
|
15321
|
+
fill: true,
|
|
15322
|
+
className: [styles$3.image, styles$3.desktopArt].join(" ")
|
|
13792
15323
|
}), jsxs("div", {
|
|
13793
15324
|
className: styles$3.overlay,
|
|
13794
15325
|
children: [jsxs("div", {
|
|
@@ -13808,13 +15339,19 @@ function CategoryPanel({ panel: panel2, wide: wide2 }) {
|
|
|
13808
15339
|
"aria-label": `${t(panel2.title)} — ${t(panel2.cta)}`,
|
|
13809
15340
|
children: t(panel2.cta)
|
|
13810
15341
|
})]
|
|
13811
|
-
}), products2.length > 0 &&
|
|
13812
|
-
className: styles$3.
|
|
13813
|
-
children:
|
|
13814
|
-
|
|
13815
|
-
|
|
13816
|
-
|
|
13817
|
-
|
|
15342
|
+
}), products2.length > 0 && jsxs("div", {
|
|
15343
|
+
className: styles$3.band,
|
|
15344
|
+
children: [jsx("h3", {
|
|
15345
|
+
className: styles$3.bandTitle,
|
|
15346
|
+
children: t("Limited edition")
|
|
15347
|
+
}), jsx("ul", {
|
|
15348
|
+
className: styles$3.products,
|
|
15349
|
+
children: products2.map((product) => jsx("li", {
|
|
15350
|
+
children: jsx(ProductTile, {
|
|
15351
|
+
product
|
|
15352
|
+
})
|
|
15353
|
+
}, product.sku))
|
|
15354
|
+
})]
|
|
13818
15355
|
})]
|
|
13819
15356
|
})]
|
|
13820
15357
|
});
|
|
@@ -13864,6 +15401,9 @@ function useSlides() {
|
|
|
13864
15401
|
...s.desktop_image === void 0 ? {} : {
|
|
13865
15402
|
desktopImage: s.desktop_image
|
|
13866
15403
|
},
|
|
15404
|
+
...s.desktop_video === void 0 ? {} : {
|
|
15405
|
+
desktopVideo: s.desktop_video
|
|
15406
|
+
},
|
|
13867
15407
|
...s.focal_y === void 0 ? {} : {
|
|
13868
15408
|
focalY: s.focal_y
|
|
13869
15409
|
}
|
|
@@ -13914,11 +15454,17 @@ function HomeShowcase() {
|
|
|
13914
15454
|
priority: true,
|
|
13915
15455
|
className: [styles$3.image, styles$3.phoneArt].join(" ")
|
|
13916
15456
|
}), jsx(ShopImage, {
|
|
13917
|
-
src:
|
|
15457
|
+
src: DESKTOP_POSTER,
|
|
13918
15458
|
alt: "",
|
|
13919
15459
|
fill: true,
|
|
13920
15460
|
sizes: "100vw",
|
|
13921
15461
|
className: [styles$3.image, styles$3.desktopArt].join(" ")
|
|
15462
|
+
}), wide2 && jsx(ShopVideo, {
|
|
15463
|
+
src: DESKTOP_VIDEO,
|
|
15464
|
+
poster: DESKTOP_POSTER,
|
|
15465
|
+
fill: true,
|
|
15466
|
+
priority: true,
|
|
15467
|
+
className: [styles$3.image, styles$3.desktopArt].join(" ")
|
|
13922
15468
|
}), jsxs("div", {
|
|
13923
15469
|
className: styles$3.heroContent,
|
|
13924
15470
|
children: [jsxs("div", {
|