@faststore/api 4.5.1-dev.1 → 4.5.1-dev.2
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/cjs/index.js +43 -43
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.mjs +300 -302
- package/dist/es/index.mjs.map +1 -1
- package/dist/src/platforms/vtex/utils/intelligentSearchRequest.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/platforms/vtex/utils/intelligentSearchRequest.ts +5 -12
package/dist/es/index.mjs
CHANGED
|
@@ -42,7 +42,7 @@ const jn = () => function(n = {}) {
|
|
|
42
42
|
return n;
|
|
43
43
|
}
|
|
44
44
|
})
|
|
45
|
-
}, Xn = "cacheControl",
|
|
45
|
+
}, Xn = "cacheControl", Ta = (e, n) => {
|
|
46
46
|
const {
|
|
47
47
|
scope: t = "private",
|
|
48
48
|
sMaxAge: r = 0,
|
|
@@ -80,7 +80,7 @@ const jn = () => function(n = {}) {
|
|
|
80
80
|
resolvers: n
|
|
81
81
|
})
|
|
82
82
|
);
|
|
83
|
-
}, pe = "@faststore/api", ge = "4.5.1-dev.
|
|
83
|
+
}, pe = "@faststore/api", ge = "4.5.1-dev.1", Te = {
|
|
84
84
|
name: pe,
|
|
85
85
|
version: ge
|
|
86
86
|
}, Qn = (e, n) => (t, r, i, a) => {
|
|
@@ -136,7 +136,7 @@ class $ extends ee {
|
|
|
136
136
|
super({ status: 404, type: "NotFoundError" }, n);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
const
|
|
139
|
+
const _a = (e) => e?.name === "FastStoreError", Ea = (e) => e?.extensions?.type === "BadRequestError", Ra = (e) => e?.extensions?.type === "UnauthorizedError", Zn = (e) => e?.extensions?.type === "ForbiddenError", X = (e) => e?.extensions?.type === "NotFoundError", et = `${Te.name}@${Te.version}`, I = async (e, n, t) => {
|
|
140
140
|
const r = await Nn(e, {
|
|
141
141
|
...n,
|
|
142
142
|
headers: {
|
|
@@ -1111,9 +1111,9 @@ const gt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
|
|
|
1111
1111
|
"coordinates",
|
|
1112
1112
|
"deliveryZonesHash",
|
|
1113
1113
|
"pickupPointsHash"
|
|
1114
|
-
]),
|
|
1114
|
+
]), Re = (e) => encodeURI(decodeURI(e)), Ot = (e) => encodeURIComponent(
|
|
1115
1115
|
decodeURIComponent(e).normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "")
|
|
1116
|
-
),
|
|
1116
|
+
), Ct = /^pickup-in-point-(.+)$/;
|
|
1117
1117
|
function sn(e) {
|
|
1118
1118
|
if (!e)
|
|
1119
1119
|
return {};
|
|
@@ -1127,18 +1127,18 @@ function sn(e) {
|
|
|
1127
1127
|
return {};
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
|
-
function
|
|
1131
|
-
const n = {}, t =
|
|
1132
|
-
for (const
|
|
1133
|
-
const
|
|
1134
|
-
if (
|
|
1135
|
-
const
|
|
1136
|
-
!
|
|
1130
|
+
function bt(e) {
|
|
1131
|
+
const n = {}, t = [];
|
|
1132
|
+
for (const r of e.split(";")) {
|
|
1133
|
+
const i = r.indexOf("=");
|
|
1134
|
+
if (i < 0) continue;
|
|
1135
|
+
const a = r.slice(0, i), o = r.slice(i + 1);
|
|
1136
|
+
!a || !o || (vt.has(a) ? n[a] = o : t.push({ key: a, value: o }));
|
|
1137
1137
|
}
|
|
1138
|
-
return { shipping: n,
|
|
1138
|
+
return { shipping: n, extraFacets: t };
|
|
1139
1139
|
}
|
|
1140
|
-
function
|
|
1141
|
-
const n = typeof e.facets == "string" ? e.facets : "", { shipping: t,
|
|
1140
|
+
function wt(e) {
|
|
1141
|
+
const n = typeof e.facets == "string" ? e.facets : "", { shipping: t, extraFacets: r } = bt(n);
|
|
1142
1142
|
return {
|
|
1143
1143
|
segmentParams: {
|
|
1144
1144
|
sc: e.channel,
|
|
@@ -1154,10 +1154,9 @@ function Dt(e) {
|
|
|
1154
1154
|
utmCampaign: e.utm_campaign ?? void 0,
|
|
1155
1155
|
utmiCampaign: e.utmi_campaign ?? void 0,
|
|
1156
1156
|
campaigns: typeof e.campaigns == "string" ? e.campaigns : void 0,
|
|
1157
|
-
priceTables: e.priceTables ?? void 0
|
|
1158
|
-
productClusterIds: r.productClusterIds
|
|
1157
|
+
priceTables: e.priceTables ?? void 0
|
|
1159
1158
|
},
|
|
1160
|
-
extraFacets:
|
|
1159
|
+
extraFacets: r
|
|
1161
1160
|
};
|
|
1162
1161
|
}
|
|
1163
1162
|
function cn(e, n) {
|
|
@@ -1175,16 +1174,15 @@ function cn(e, n) {
|
|
|
1175
1174
|
["utmCampaign", n.utmCampaign],
|
|
1176
1175
|
["utmiCampaign", n.utmiCampaign],
|
|
1177
1176
|
["campaigns", n.campaigns],
|
|
1178
|
-
["priceTables", n.priceTables]
|
|
1179
|
-
["productClusterId", n.productClusterIds]
|
|
1177
|
+
["priceTables", n.priceTables]
|
|
1180
1178
|
];
|
|
1181
1179
|
for (const [r, i] of t)
|
|
1182
1180
|
i != null && i !== "" && e.append(r, String(i));
|
|
1183
1181
|
}
|
|
1184
1182
|
function ln(e) {
|
|
1185
|
-
return
|
|
1183
|
+
return Ct.exec(e)?.[1];
|
|
1186
1184
|
}
|
|
1187
|
-
function
|
|
1185
|
+
function Dt(e) {
|
|
1188
1186
|
const n = e.find((r) => r.key === "shipping"), t = n ? ln(n.value) : void 0;
|
|
1189
1187
|
if (t !== void 0)
|
|
1190
1188
|
try {
|
|
@@ -1193,8 +1191,8 @@ function Pt(e) {
|
|
|
1193
1191
|
return t;
|
|
1194
1192
|
}
|
|
1195
1193
|
}
|
|
1196
|
-
function
|
|
1197
|
-
const t =
|
|
1194
|
+
function Pt(e, n) {
|
|
1195
|
+
const t = Dt(
|
|
1198
1196
|
n
|
|
1199
1197
|
);
|
|
1200
1198
|
return t === void 0 ? e : {
|
|
@@ -1202,25 +1200,25 @@ function At(e, n) {
|
|
|
1202
1200
|
pickupPoint: t
|
|
1203
1201
|
};
|
|
1204
1202
|
}
|
|
1205
|
-
function
|
|
1203
|
+
function At(e) {
|
|
1206
1204
|
return e.map((n) => n.key !== "shipping" || ln(n.value) === void 0 ? n : { ...n, value: "pickup-in-point" });
|
|
1207
1205
|
}
|
|
1208
|
-
function
|
|
1206
|
+
function kt(e, n) {
|
|
1209
1207
|
let t = [...e];
|
|
1210
1208
|
const r = t.some((i) => i.key === "shipping");
|
|
1211
1209
|
for (const i of n)
|
|
1212
1210
|
(!r || i.key !== "shipping") && t.push(i);
|
|
1213
|
-
return t.some((i) => i.key === "shipping" && i.value === "ignore") && (t = t.filter((i) => i.key !== "shipping")),
|
|
1211
|
+
return t.some((i) => i.key === "shipping" && i.value === "ignore") && (t = t.filter((i) => i.key !== "shipping")), At(t);
|
|
1214
1212
|
}
|
|
1215
|
-
function
|
|
1213
|
+
function Ut(e) {
|
|
1216
1214
|
return e.reduce((n, t) => {
|
|
1217
1215
|
let { key: r, value: i } = t;
|
|
1218
|
-
return r === "priceRange" && (r = "price", i = i.replace(" TO ", ":")), r === "ft" ? n : `${n}${Re(r)}/${
|
|
1216
|
+
return r === "priceRange" && (r = "price", i = i.replace(" TO ", ":")), r === "ft" ? n : `${n}${Re(r)}/${Ot(Re(i)).replaceAll(/ |%20/g, "-")}/`;
|
|
1219
1217
|
}, "");
|
|
1220
1218
|
}
|
|
1221
|
-
const
|
|
1222
|
-
function
|
|
1223
|
-
const { segmentParams: t, extraFacets: r } =
|
|
1219
|
+
const Tt = (e) => e.key === "fuzzy" && (e.value === "0" || e.value === "1" || e.value === "auto"), _t = (e) => e.key === "operator" && (e.value === "and" || e.value === "or");
|
|
1220
|
+
function Et(e, n) {
|
|
1221
|
+
const { segmentParams: t, extraFacets: r } = wt(e ?? {}), i = n?.salesChannel ?? t.sc, a = n?.regionId ?? t.regionId, o = n?.locale ?? t.locale ?? "";
|
|
1224
1222
|
return {
|
|
1225
1223
|
segmentParams: {
|
|
1226
1224
|
...t,
|
|
@@ -1231,7 +1229,7 @@ function Rt(e, n) {
|
|
|
1231
1229
|
extraFacets: r
|
|
1232
1230
|
};
|
|
1233
1231
|
}
|
|
1234
|
-
function
|
|
1232
|
+
function Rt(e, n) {
|
|
1235
1233
|
const t = e.filter(({ key: c }) => !It.has(c)), r = e.find(
|
|
1236
1234
|
({ key: c, value: l }) => c === _e && l !== "all-delivery-methods"
|
|
1237
1235
|
) ?? null, i = e.find(
|
|
@@ -1241,11 +1239,11 @@ function Ft(e, n) {
|
|
|
1241
1239
|
), s = a.some(
|
|
1242
1240
|
({ key: c }) => c === Ee
|
|
1243
1241
|
);
|
|
1244
|
-
return r !== null && !o && a.push(r), i !== null && !s && a.push(i),
|
|
1242
|
+
return r !== null && !o && a.push(r), i !== null && !s && a.push(i), kt(a, n);
|
|
1245
1243
|
}
|
|
1246
|
-
function
|
|
1244
|
+
function Ft(e, n) {
|
|
1247
1245
|
const t = e.find(({ key: a }) => a === he) ?? null, r = e.find(({ key: a }) => a === fe) ?? null, i = e.find(({ key: a }) => a === Se) ?? null;
|
|
1248
|
-
t &&
|
|
1246
|
+
t && Tt(t) && n.append(he, t.value), r && _t(r) && n.append(fe, r.value), i && n.append(Se, i.value);
|
|
1249
1247
|
}
|
|
1250
1248
|
function Fe(e, n, t, r) {
|
|
1251
1249
|
const {
|
|
@@ -1264,21 +1262,21 @@ function Fe(e, n, t, r) {
|
|
|
1264
1262
|
f.append("from", p.toString()), f.append("to", m.toString());
|
|
1265
1263
|
}
|
|
1266
1264
|
i && f.append("query", i), r.includeSort && s && f.append("sort", s);
|
|
1267
|
-
const v =
|
|
1265
|
+
const v = Pt(
|
|
1268
1266
|
t.segmentParams,
|
|
1269
1267
|
c
|
|
1270
1268
|
);
|
|
1271
|
-
if (cn(f, v ?? t.segmentParams),
|
|
1269
|
+
if (cn(f, v ?? t.segmentParams), Ft(c, f), l && f.append("show-invisible-items", "true"), n?.hideUnavailableItems !== void 0) {
|
|
1272
1270
|
const p = c.find(({ key: y }) => y === ft), m = p ? p.value : u?.toString() ?? n.hideUnavailableItems.toString();
|
|
1273
1271
|
f.append("hideUnavailableItems", m);
|
|
1274
1272
|
}
|
|
1275
1273
|
n?.simulationBehavior !== void 0 && f.append("simulationBehavior", n.simulationBehavior.toString()), n?.showSponsored !== void 0 && f.append("showSponsored", n.showSponsored.toString()), g !== void 0 && f.append("sponsoredCount", g.toString()), h !== void 0 && f.append("allowRedirect", h.toString());
|
|
1276
|
-
const d =
|
|
1277
|
-
|
|
1274
|
+
const d = Ut(
|
|
1275
|
+
Rt(c, t.extraFacets)
|
|
1278
1276
|
);
|
|
1279
1277
|
return { params: f, path: d };
|
|
1280
1278
|
}
|
|
1281
|
-
function
|
|
1279
|
+
function Nt(e, n) {
|
|
1282
1280
|
const { field: t, value: r, hideUnavailableItems: i, showInvisibleItems: a } = e, o = new URLSearchParams({
|
|
1283
1281
|
field: t ?? "",
|
|
1284
1282
|
value: r ?? ""
|
|
@@ -1296,7 +1294,7 @@ function W(e, n) {
|
|
|
1296
1294
|
};
|
|
1297
1295
|
}
|
|
1298
1296
|
function G(e) {
|
|
1299
|
-
const { endpoint: n, segment: t, defaults: r, args: i = {} } = e, a =
|
|
1297
|
+
const { endpoint: n, segment: t, defaults: r, args: i = {} } = e, a = Et(t, r);
|
|
1300
1298
|
switch (n) {
|
|
1301
1299
|
case "product-search":
|
|
1302
1300
|
case "facets": {
|
|
@@ -1318,7 +1316,7 @@ function G(e) {
|
|
|
1318
1316
|
return W(s, o);
|
|
1319
1317
|
}
|
|
1320
1318
|
case "products": {
|
|
1321
|
-
const o =
|
|
1319
|
+
const o = Nt(i, a.segmentParams);
|
|
1322
1320
|
return W("", o);
|
|
1323
1321
|
}
|
|
1324
1322
|
case "search-suggestions": {
|
|
@@ -1340,16 +1338,16 @@ function G(e) {
|
|
|
1340
1338
|
}
|
|
1341
1339
|
}
|
|
1342
1340
|
}
|
|
1343
|
-
const
|
|
1344
|
-
function
|
|
1341
|
+
const Lt = 10;
|
|
1342
|
+
function Bt(e) {
|
|
1345
1343
|
const { regionId: n, seller: t } = e.storage.channel;
|
|
1346
1344
|
return (t ? Buffer.from(`SW#${t}`).toString("base64") : void 0) ?? (n || void 0);
|
|
1347
1345
|
}
|
|
1348
|
-
function
|
|
1346
|
+
function $t(e) {
|
|
1349
1347
|
const t = sn(e.headers?.cookie).cultureInfo || "";
|
|
1350
1348
|
return Q(e) ? e.storage.locale || t : t || e.storage.locale || "";
|
|
1351
1349
|
}
|
|
1352
|
-
const
|
|
1350
|
+
const Mt = ({
|
|
1353
1351
|
account: e,
|
|
1354
1352
|
environment: n,
|
|
1355
1353
|
hideUnavailableItems: t,
|
|
@@ -1359,8 +1357,8 @@ const zt = ({
|
|
|
1359
1357
|
}, o) => {
|
|
1360
1358
|
const s = `https://${e}.${n}.com.br`, c = on(o), l = sn(o.headers?.cookie), g = () => ({
|
|
1361
1359
|
salesChannel: o.storage.channel.salesChannel,
|
|
1362
|
-
regionId:
|
|
1363
|
-
locale:
|
|
1360
|
+
regionId: Bt(o),
|
|
1361
|
+
locale: $t(o),
|
|
1364
1362
|
hideUnavailableItems: t,
|
|
1365
1363
|
simulationBehavior: r,
|
|
1366
1364
|
showSponsored: i
|
|
@@ -1410,7 +1408,7 @@ const zt = ({
|
|
|
1410
1408
|
showInvisibleItems: P,
|
|
1411
1409
|
hideUnavailableItems: k
|
|
1412
1410
|
}) => {
|
|
1413
|
-
const b = Pe(
|
|
1411
|
+
const b = Pe(Lt);
|
|
1414
1412
|
return (await Promise.all(
|
|
1415
1413
|
D.map(
|
|
1416
1414
|
(T) => b(async () => {
|
|
@@ -1466,15 +1464,15 @@ const zt = ({
|
|
|
1466
1464
|
);
|
|
1467
1465
|
}
|
|
1468
1466
|
};
|
|
1469
|
-
},
|
|
1470
|
-
const t =
|
|
1467
|
+
}, zt = (e, n) => {
|
|
1468
|
+
const t = Mt(e, n), r = gt(e, n), i = nt(e);
|
|
1471
1469
|
return {
|
|
1472
1470
|
search: t,
|
|
1473
1471
|
commerce: r,
|
|
1474
1472
|
catalog: i
|
|
1475
1473
|
};
|
|
1476
|
-
},
|
|
1477
|
-
const t = Pe(
|
|
1474
|
+
}, Vt = 20, xt = (e) => e.entityType === "category", ye = (e) => e.entityType === "brand", Ne = (e) => e.entityType === "collection", qt = (e, n) => {
|
|
1475
|
+
const t = Pe(Vt), r = async (i) => Promise.all(
|
|
1478
1476
|
i.map(
|
|
1479
1477
|
(a) => t(async () => {
|
|
1480
1478
|
const o = a.slug.toLowerCase(), s = a.locale, c = await n.commerce.catalog.byLinkId.category(
|
|
@@ -1512,11 +1510,11 @@ const zt = ({
|
|
|
1512
1510
|
// entry while same-slug / different-locale loads stay isolated.
|
|
1513
1511
|
cacheKeyFn: ({ slug: i, locale: a }) => `${i.toLowerCase()}::${a ?? ""}`
|
|
1514
1512
|
});
|
|
1515
|
-
},
|
|
1513
|
+
}, jt = (e, n) => {
|
|
1516
1514
|
const t = async (r) => Promise.all(r.map((i) => n.commerce.catalog.salesChannel(i)));
|
|
1517
1515
|
return new le(t);
|
|
1518
|
-
},
|
|
1519
|
-
const t = Pe(
|
|
1516
|
+
}, Wt = 1, Gt = (e, n) => {
|
|
1517
|
+
const t = Pe(Wt), r = async (a) => {
|
|
1520
1518
|
const o = a.reduce((u, { items: h }) => [...u, h], []), s = [...o.flat()], c = await n.commerce.checkout.simulation({
|
|
1521
1519
|
country: a[0].country,
|
|
1522
1520
|
postalCode: a[0].postalCode,
|
|
@@ -1539,17 +1537,17 @@ const zt = ({
|
|
|
1539
1537
|
return new le(i, {
|
|
1540
1538
|
maxBatchSize: 50
|
|
1541
1539
|
});
|
|
1542
|
-
},
|
|
1543
|
-
function
|
|
1540
|
+
}, Ht = (e, n) => Ln(e, n);
|
|
1541
|
+
function Xt(e) {
|
|
1544
1542
|
return {
|
|
1545
1543
|
...e,
|
|
1546
|
-
description: e.description ?
|
|
1544
|
+
description: e.description ? Ht(e.description) : e.description
|
|
1547
1545
|
};
|
|
1548
1546
|
}
|
|
1549
1547
|
const N = (e, n) => ({
|
|
1550
1548
|
...e,
|
|
1551
|
-
isVariantOf:
|
|
1552
|
-
}),
|
|
1549
|
+
isVariantOf: Xt(n)
|
|
1550
|
+
}), Yt = ({ flags: e }, n) => {
|
|
1553
1551
|
const t = async (r) => {
|
|
1554
1552
|
const i = r.map((g) => g.split("-")[0]), a = r.some(
|
|
1555
1553
|
(g) => g.split("-")[1] === "invisibleItems"
|
|
@@ -1578,25 +1576,25 @@ const N = (e, n) => ({
|
|
|
1578
1576
|
maxBatchSize: 99
|
|
1579
1577
|
// Max allowed batch size of Search API
|
|
1580
1578
|
});
|
|
1581
|
-
},
|
|
1582
|
-
const { clients: t } = n, r =
|
|
1579
|
+
}, Jt = (e, n) => {
|
|
1580
|
+
const { clients: t } = n, r = Yt(e, t), i = Gt(e, t), a = qt(e, t), o = jt(e, t);
|
|
1583
1581
|
return {
|
|
1584
1582
|
skuLoader: r,
|
|
1585
1583
|
simulationLoader: i,
|
|
1586
1584
|
collectionLoader: a,
|
|
1587
1585
|
salesChannelLoader: o
|
|
1588
1586
|
};
|
|
1589
|
-
}, B = (e) => e.AvailableQuantity > 0, V = (e) => e.spotPrice ?? 0,
|
|
1587
|
+
}, B = (e) => e.AvailableQuantity > 0, V = (e) => e.spotPrice ?? 0, Kt = (e) => e.Price ?? 0, Le = (e) => e ? "https://schema.org/InStock" : "https://schema.org/OutOfStock", dn = (e, n) => B(e) && !B(n) ? -1 : !B(e) && B(n) ? 1 : V(e) - V(n), Qt = (e) => e === "available", M = (e, n = 0, t = 1) => {
|
|
1590
1588
|
const r = n / t;
|
|
1591
1589
|
return Math.round((e + r) * 100) / 100;
|
|
1592
|
-
},
|
|
1590
|
+
}, Zt = (e, n = { includeTaxes: !1 }) => {
|
|
1593
1591
|
const t = e.filter(B), r = t[t.length - 1], i = r ? V(r) : 0;
|
|
1594
1592
|
return n.includeTaxes ? M(i, r?.Tax, r?.product?.unitMultiplier) : i;
|
|
1595
1593
|
}, Be = (e, n = { includeTaxes: !1 }) => {
|
|
1596
1594
|
const [t] = e.filter(B), r = t ? V(t) : 0;
|
|
1597
1595
|
return n.includeTaxes ? M(r, t?.Tax, t?.product?.unitMultiplier) : r;
|
|
1598
|
-
},
|
|
1599
|
-
highPrice: (e) =>
|
|
1596
|
+
}, er = {
|
|
1597
|
+
highPrice: (e) => Zt(e),
|
|
1600
1598
|
lowPrice: (e) => Be(e),
|
|
1601
1599
|
lowPriceWithTaxes: (e) => Be(e, { includeTaxes: !0 }),
|
|
1602
1600
|
offerCount: (e) => e.length,
|
|
@@ -1608,20 +1606,20 @@ const N = (e, n) => ({
|
|
|
1608
1606
|
return (await r.load(i.salesChannel)).CurrencyCode ?? "";
|
|
1609
1607
|
},
|
|
1610
1608
|
offers: (e) => e
|
|
1611
|
-
},
|
|
1609
|
+
}, nr = {
|
|
1612
1610
|
ratingValue: () => 5,
|
|
1613
1611
|
reviewCount: () => 0
|
|
1614
|
-
}, $e = "ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a",
|
|
1612
|
+
}, $e = "ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a", tr = "AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa", rr = (e) => {
|
|
1615
1613
|
let n = e.slice(0);
|
|
1616
1614
|
for (let t = 0; t < $e.length; t++)
|
|
1617
|
-
n = n.replace(new RegExp($e.charAt(t), "g"),
|
|
1615
|
+
n = n.replace(new RegExp($e.charAt(t), "g"), tr.charAt(t));
|
|
1618
1616
|
return n;
|
|
1619
|
-
},
|
|
1617
|
+
}, ir = (e) => e.replace(/[·/_,:]/, "-");
|
|
1620
1618
|
function ae(e) {
|
|
1621
1619
|
const t = e.replace(/,/g, "").replace(/[*+~.()'"!:@&\[\]`/ %$#?{}><=_^]/g, "-");
|
|
1622
|
-
return
|
|
1620
|
+
return ir(rr(t)).toLowerCase();
|
|
1623
1621
|
}
|
|
1624
|
-
const H = (e) =>
|
|
1622
|
+
const H = (e) => xt(e) ? e.slug : ye(e) ? e.linkId : e.linkId ?? ae(e.name), un = {
|
|
1625
1623
|
id: ({ id: e }) => e.toString(),
|
|
1626
1624
|
slug: (e) => H(e),
|
|
1627
1625
|
seo: (e) => ({
|
|
@@ -1733,27 +1731,27 @@ const H = (e) => qt(e) ? e.slug : ye(e) ? e.linkId : e.linkId ?? ae(e.name), un
|
|
|
1733
1731
|
}, ze = (e) => {
|
|
1734
1732
|
const n = e.split(":").map(Number);
|
|
1735
1733
|
return n.length !== 2 || Number.isNaN(n[0]) || Number.isNaN(n[1]) ? null : n;
|
|
1736
|
-
},
|
|
1734
|
+
}, ar = (e) => typeof pn[e] == "string", or = (e) => {
|
|
1737
1735
|
const n = e?.filter(
|
|
1738
|
-
(t) =>
|
|
1736
|
+
(t) => ar(t.key)
|
|
1739
1737
|
);
|
|
1740
1738
|
if (Array.isArray(n) && n.length > 1)
|
|
1741
1739
|
throw new _(
|
|
1742
1740
|
`You passed ${n.length} cross selling facets but only one is allowed. Please leave one of the following facet: ${n.map((t) => t.key).join(",")}`
|
|
1743
1741
|
);
|
|
1744
1742
|
return n?.[0] ?? null;
|
|
1745
|
-
},
|
|
1743
|
+
}, sr = (e) => e?.find((n) => n.key === "slug")?.value ?? null, cr = (e) => e?.find((n) => n.key === "id")?.value ?? null, Ve = (e) => e?.find((n) => n.key === "locale")?.value ?? null, xe = (e) => e?.find((n) => n.key === "channel")?.value ?? null, Ie = (e, n) => {
|
|
1746
1744
|
let t = 0;
|
|
1747
1745
|
for (let r = 1; r < e.length; r++)
|
|
1748
1746
|
n(e[t], e[r]) > 0 && (t = r);
|
|
1749
1747
|
return e[t];
|
|
1750
|
-
},
|
|
1748
|
+
}, lr = {
|
|
1751
1749
|
__resolveType: ({ type: e, values: n }) => e !== "TEXT" && e !== "DELIVERY" ? "StoreFacetRange" : !n || n.length === 0 ? "StoreFacetBoolean" : n.every((t) => t.range) ? "StoreFacetRange" : "StoreFacetBoolean"
|
|
1752
|
-
},
|
|
1750
|
+
}, dr = {
|
|
1753
1751
|
key: ({ key: e }) => e,
|
|
1754
1752
|
label: ({ name: e }) => e,
|
|
1755
1753
|
values: ({ values: e }) => e.sort((n, t) => n.name.localeCompare(t.name))
|
|
1756
|
-
},
|
|
1754
|
+
}, ur = {
|
|
1757
1755
|
key: ({ key: e }) => e,
|
|
1758
1756
|
label: ({ name: e }) => e,
|
|
1759
1757
|
min: ({ values: e, key: n }, t, { storage: { searchArgs: r } }) => {
|
|
@@ -1774,12 +1772,12 @@ const H = (e) => qt(e) ? e.slug : ye(e) ? e.linkId : e.linkId ?? ae(e.name), un
|
|
|
1774
1772
|
absolute: o
|
|
1775
1773
|
};
|
|
1776
1774
|
}
|
|
1777
|
-
},
|
|
1775
|
+
}, pr = {
|
|
1778
1776
|
value: ({ value: e }) => e,
|
|
1779
1777
|
label: ({ name: e }) => e || "unknown",
|
|
1780
1778
|
selected: ({ selected: e }) => e,
|
|
1781
1779
|
quantity: ({ quantity: e }) => e
|
|
1782
|
-
},
|
|
1780
|
+
}, gr = async (e, { data: n }, { clients: { commerce: t } }) => {
|
|
1783
1781
|
if (!n?.orderId)
|
|
1784
1782
|
throw new _("Missing orderId");
|
|
1785
1783
|
return { data: (await t.checkout.cancelOrder(n))?.data };
|
|
@@ -1802,18 +1800,18 @@ function gn(e) {
|
|
|
1802
1800
|
}
|
|
1803
1801
|
return null;
|
|
1804
1802
|
}
|
|
1805
|
-
function
|
|
1803
|
+
function mr(e) {
|
|
1806
1804
|
if (!e || e.status !== "pending") return !1;
|
|
1807
1805
|
const n = e.dimensionStatus.filter((t) => t.status === "pending").flatMap((t) => t.ruleCollection).filter((t) => t.status === "pending");
|
|
1808
1806
|
return n.length === 0 ? !1 : n.every((t) => !t.isUserNextAuthorizer);
|
|
1809
1807
|
}
|
|
1810
|
-
const
|
|
1808
|
+
const hr = async (e, { data: n }, { clients: { commerce: t } }) => {
|
|
1811
1809
|
const r = await t.oms.processOrderAuthorization(n), i = gn(r);
|
|
1812
1810
|
return {
|
|
1813
|
-
isPendingForOtherAuthorizer: !i &&
|
|
1811
|
+
isPendingForOtherAuthorizer: !i && mr(r),
|
|
1814
1812
|
ruleForAuthorization: i
|
|
1815
1813
|
};
|
|
1816
|
-
},
|
|
1814
|
+
}, fr = async (e, { data: n }, { clients: { commerce: t } }) => {
|
|
1817
1815
|
if (!n?.objectKey)
|
|
1818
1816
|
throw new _("Missing objectKey");
|
|
1819
1817
|
const r = n.orderFormId || (await t.orderEntry.createOrderForm()).orderFormId;
|
|
@@ -1822,13 +1820,13 @@ const fr = async (e, { data: n }, { clients: { commerce: t } }) => {
|
|
|
1822
1820
|
orderFormId: r,
|
|
1823
1821
|
sessionToken: n.sessionToken ?? void 0
|
|
1824
1822
|
});
|
|
1825
|
-
},
|
|
1823
|
+
}, Sr = async (e, n, t) => {
|
|
1826
1824
|
if (!(await t.clients.commerce.recommendation.startRecommendationSession())?.recommendationsUserId)
|
|
1827
1825
|
throw new Error(
|
|
1828
1826
|
"Failed to start recommendation session: no session data returned"
|
|
1829
1827
|
);
|
|
1830
1828
|
return !0;
|
|
1831
|
-
},
|
|
1829
|
+
}, yr = async (e, { data: n }, { clients: { commerce: t } }) => ({ id: (await t.subscribeToNewsletter(n))?.Id }), Ir = async (e, { data: n }, { clients: { commerce: t } }) => {
|
|
1832
1830
|
const { fileContent: r, fileName: i, mimeType: a } = n;
|
|
1833
1831
|
if (!r || !i || !a)
|
|
1834
1832
|
throw new _(
|
|
@@ -1882,7 +1880,7 @@ function hn(e) {
|
|
|
1882
1880
|
valueReference: ne.attachment
|
|
1883
1881
|
};
|
|
1884
1882
|
}
|
|
1885
|
-
function
|
|
1883
|
+
function vr(e) {
|
|
1886
1884
|
return {
|
|
1887
1885
|
propertyID: e.id,
|
|
1888
1886
|
name: e.name,
|
|
@@ -1898,7 +1896,7 @@ function fn(e) {
|
|
|
1898
1896
|
`${e.name}:${JSON.stringify(e.value)}:${e.valueReference}`
|
|
1899
1897
|
);
|
|
1900
1898
|
}
|
|
1901
|
-
const
|
|
1899
|
+
const Or = (e) => {
|
|
1902
1900
|
const n = e.postalCode, t = e.geoCoordinates, r = {
|
|
1903
1901
|
addressType: e.addressType || null,
|
|
1904
1902
|
postalCode: n || null,
|
|
@@ -1917,7 +1915,7 @@ const Cr = (e) => {
|
|
|
1917
1915
|
r.geoCoordinates = i !== null && a !== null ? [a, i] : [];
|
|
1918
1916
|
}
|
|
1919
1917
|
return [r];
|
|
1920
|
-
},
|
|
1918
|
+
}, Cr = (e, n, t) => {
|
|
1921
1919
|
const r = n.postalCode, i = n.geoCoordinates, a = e?.shippingData?.availableAddresses ?? [], o = e?.shippingData?.selectedAddresses ?? [];
|
|
1922
1920
|
if (!t && o.length > 0)
|
|
1923
1921
|
return [o[0]];
|
|
@@ -1932,16 +1930,16 @@ const Cr = (e) => {
|
|
|
1932
1930
|
}
|
|
1933
1931
|
return null;
|
|
1934
1932
|
}, Sn = (e, n) => {
|
|
1935
|
-
if (!
|
|
1933
|
+
if (!br(n))
|
|
1936
1934
|
return { updateShipping: !1, addressChanged: !1 };
|
|
1937
|
-
if (!
|
|
1935
|
+
if (!Ar(e))
|
|
1938
1936
|
return { updateShipping: !1, addressChanged: !1 };
|
|
1939
1937
|
const [t] = e?.shippingData?.selectedAddresses ?? [];
|
|
1940
|
-
if (
|
|
1938
|
+
if (wr(t, n.postalCode) || Dr(t, n.geoCoordinates) || Pr(t, n.addressType))
|
|
1941
1939
|
return { updateShipping: !0, addressChanged: !0 };
|
|
1942
1940
|
const { logisticsInfo: r } = e.shippingData;
|
|
1943
|
-
return
|
|
1944
|
-
},
|
|
1941
|
+
return kr(r, n) ? { updateShipping: !0, addressChanged: !1 } : { updateShipping: !1, addressChanged: !1 };
|
|
1942
|
+
}, br = (e) => !!e.postalCode || e.geoCoordinates?.latitude && e.geoCoordinates?.longitude, wr = (e, n) => typeof n == "string" && e?.postalCode !== n, Dr = (e, n) => typeof n?.latitude == "number" && typeof n?.longitude == "number" && (e?.geoCoordinates[0] !== n?.longitude || e?.geoCoordinates[1] !== n?.latitude), Pr = (e, n) => typeof n == "string" && e?.addressType !== n, Ar = (e) => e.items.length !== 0, kr = (e, n) => {
|
|
1945
1943
|
const t = n?.deliveryMode?.deliveryChannel, r = n?.deliveryMode?.deliveryMethod, { startDate: i, endDate: a } = n?.deliveryMode?.deliveryWindow || {};
|
|
1946
1944
|
return e.some(
|
|
1947
1945
|
({ selectedDeliveryChannel: o, selectedSla: s, slas: c }) => {
|
|
@@ -1968,7 +1966,7 @@ const Cr = (e) => {
|
|
|
1968
1966
|
additionalProperty: e.attachments.map(hn)
|
|
1969
1967
|
},
|
|
1970
1968
|
index: n
|
|
1971
|
-
}),
|
|
1969
|
+
}), Ur = (e) => ({
|
|
1972
1970
|
quantity: e.quantity,
|
|
1973
1971
|
seller: e.seller.identifier,
|
|
1974
1972
|
id: e.itemOffered.sku,
|
|
@@ -1981,7 +1979,7 @@ const Cr = (e) => {
|
|
|
1981
1979
|
}), qe = (e) => e.reduce((n, t) => {
|
|
1982
1980
|
const r = Ce(t);
|
|
1983
1981
|
return n.has(r) || n.set(r, []), n.get(r)?.push(t), n;
|
|
1984
|
-
}, /* @__PURE__ */ new Map()),
|
|
1982
|
+
}, /* @__PURE__ */ new Map()), Tr = (e, n) => {
|
|
1985
1983
|
const t = ({ priceToken: s, ...c }, l) => ({
|
|
1986
1984
|
...c,
|
|
1987
1985
|
itemOffered: {
|
|
@@ -2063,12 +2061,12 @@ const je = (e) => {
|
|
|
2063
2061
|
More info at: https://developers.vtex.com/vtex-rest-api/docs/customizable-fields-with-checkout-api`
|
|
2064
2062
|
), r;
|
|
2065
2063
|
}
|
|
2066
|
-
},
|
|
2064
|
+
}, _r = (e, n) => {
|
|
2067
2065
|
const r = e.customData?.customApps.find(
|
|
2068
2066
|
(a) => a.id === "faststore"
|
|
2069
2067
|
)?.fields?.cartEtag;
|
|
2070
2068
|
return r == null ? !0 : On(e, n) !== r;
|
|
2071
|
-
},
|
|
2069
|
+
}, Er = async (e, { clients: { commerce: n } }) => n.checkout.clearOrderFormMessages({
|
|
2072
2070
|
id: e
|
|
2073
2071
|
}), He = async (e, n, { clients: { commerce: t } }) => {
|
|
2074
2072
|
if (!n)
|
|
@@ -2078,7 +2076,7 @@ const je = (e) => {
|
|
|
2078
2076
|
n
|
|
2079
2077
|
);
|
|
2080
2078
|
if (r) {
|
|
2081
|
-
const a =
|
|
2079
|
+
const a = Cr(e, n, i), s = a || Or(n);
|
|
2082
2080
|
return !!n.deliveryMode?.deliveryWindow && await t.checkout.shippingData(
|
|
2083
2081
|
{
|
|
2084
2082
|
id: e.orderFormId,
|
|
@@ -2098,13 +2096,13 @@ const je = (e) => {
|
|
|
2098
2096
|
);
|
|
2099
2097
|
}
|
|
2100
2098
|
return e;
|
|
2101
|
-
},
|
|
2099
|
+
}, Rr = (e, n) => {
|
|
2102
2100
|
if (!e)
|
|
2103
2101
|
return "";
|
|
2104
2102
|
const r = Z(e)[n];
|
|
2105
2103
|
return r ? r.split("=")[1] : "";
|
|
2106
|
-
},
|
|
2107
|
-
const i =
|
|
2104
|
+
}, Fr = async (e, { cart: { order: n }, session: t }, r) => {
|
|
2105
|
+
const i = Rr(
|
|
2108
2106
|
r.headers.cookie,
|
|
2109
2107
|
"checkout.vtex.com"
|
|
2110
2108
|
), {
|
|
@@ -2116,9 +2114,9 @@ const je = (e) => {
|
|
|
2116
2114
|
id: i || void 0,
|
|
2117
2115
|
channel: r.storage.channel
|
|
2118
2116
|
}), g = l.orderFormId;
|
|
2119
|
-
l.messages.length !== 0 && await
|
|
2117
|
+
l.messages.length !== 0 && await Er(g, r);
|
|
2120
2118
|
const u = Z(r?.headers?.cookie ?? "")?.vtex_session, h = Y(u), { acceptedOffer: f, shouldSplitItem: v } = n;
|
|
2121
|
-
if (
|
|
2119
|
+
if (_r(l, h)) {
|
|
2122
2120
|
const b = await Ge(
|
|
2123
2121
|
l,
|
|
2124
2122
|
a,
|
|
@@ -2146,7 +2144,7 @@ const je = (e) => {
|
|
|
2146
2144
|
itemsToUpdate: []
|
|
2147
2145
|
}
|
|
2148
2146
|
), A = y.filter(([b]) => !p.has(b)).flatMap(([, b]) => b.map((U) => ({ ...U, quantity: 0 }))), S = [...w, ...C, ...A].map(
|
|
2149
|
-
|
|
2147
|
+
Ur
|
|
2150
2148
|
), { updateShipping: D } = t ? Sn(l, t) : { updateShipping: !1 };
|
|
2151
2149
|
if (S.length === 0 && !D)
|
|
2152
2150
|
return null;
|
|
@@ -2184,30 +2182,30 @@ const je = (e) => {
|
|
|
2184
2182
|
l.messages,
|
|
2185
2183
|
P.messages
|
|
2186
2184
|
);
|
|
2187
|
-
return
|
|
2188
|
-
},
|
|
2185
|
+
return Tr(n, P) && k ? null : We(P, o, v);
|
|
2186
|
+
}, Nr = (e) => {
|
|
2189
2187
|
const n = (e?.corporateName ?? "").trim();
|
|
2190
2188
|
return n || (e?.firstName ?? "").trim();
|
|
2191
|
-
},
|
|
2189
|
+
}, Lr = (e) => {
|
|
2192
2190
|
if (!e || typeof e != "object")
|
|
2193
2191
|
return !1;
|
|
2194
2192
|
const n = e;
|
|
2195
2193
|
return typeof n.customerId == "string" && n.customerId.trim() !== "" && typeof n.contractName == "string" && typeof n.isActive == "boolean" && typeof n.isCurrent == "boolean";
|
|
2196
|
-
},
|
|
2194
|
+
}, Br = (e) => {
|
|
2197
2195
|
const n = e?.availableContracts?.value;
|
|
2198
|
-
return Array.isArray(n) ? n.filter(
|
|
2199
|
-
},
|
|
2196
|
+
return Array.isArray(n) ? n.filter(Lr) : [];
|
|
2197
|
+
}, $r = (e) => e?.customerId ? !!((e.contractName ?? "").trim() && e.isActive) : !1, Xe = (e) => e?.namespaces?.shopper?.activeContractId?.value?.trim() ?? e?.namespaces?.authentication?.customerId?.value?.trim() ?? e?.namespaces?.profile?.id?.value?.trim() ?? "", Mr = (e, n = "") => {
|
|
2200
2198
|
const t = n.trim();
|
|
2201
|
-
return e.filter(
|
|
2199
|
+
return e.filter($r).map((r) => ({
|
|
2202
2200
|
id: r.customerId,
|
|
2203
2201
|
corporateName: r.contractName.trim(),
|
|
2204
2202
|
isActive: t ? r.customerId === t : r.isCurrent
|
|
2205
2203
|
}));
|
|
2206
2204
|
}, Cn = (e, n) => {
|
|
2207
|
-
const t =
|
|
2205
|
+
const t = Nr(e);
|
|
2208
2206
|
return t || (n?.firstName?.value ?? "").trim();
|
|
2209
2207
|
};
|
|
2210
|
-
async function
|
|
2208
|
+
async function zr(e, n, t) {
|
|
2211
2209
|
try {
|
|
2212
2210
|
const r = await e.commerce.checkout.address({
|
|
2213
2211
|
postalCode: t,
|
|
@@ -2224,11 +2222,11 @@ async function Vr(e, n, t) {
|
|
|
2224
2222
|
), r;
|
|
2225
2223
|
}
|
|
2226
2224
|
}
|
|
2227
|
-
const
|
|
2225
|
+
const Vr = async (e, { session: n, search: t }, { clients: r, headers: i, account: a }) => {
|
|
2228
2226
|
const o = oe.parse(n.channel ?? ""), s = String(n.postalCode ?? ""), c = n.country ?? "";
|
|
2229
2227
|
let l = n.city ?? null, g = n.geoCoordinates ?? null;
|
|
2230
2228
|
if ((!l || !g) && s !== "" && c !== "") {
|
|
2231
|
-
const E = await
|
|
2229
|
+
const E = await zr(
|
|
2232
2230
|
r,
|
|
2233
2231
|
c,
|
|
2234
2232
|
s
|
|
@@ -2321,21 +2319,21 @@ const xr = async (e, { session: n, search: t }, { clients: r, headers: i, accoun
|
|
|
2321
2319
|
city: l
|
|
2322
2320
|
};
|
|
2323
2321
|
return Ae(n, x) ? null : x;
|
|
2324
|
-
},
|
|
2325
|
-
validateCart:
|
|
2326
|
-
validateSession:
|
|
2327
|
-
subscribeToNewsletter:
|
|
2328
|
-
cancelOrder:
|
|
2329
|
-
processOrderAuthorization:
|
|
2330
|
-
uploadFileToOrderEntry:
|
|
2331
|
-
startOrderEntryOperation:
|
|
2332
|
-
startRecommendationSession:
|
|
2322
|
+
}, xr = {
|
|
2323
|
+
validateCart: Fr,
|
|
2324
|
+
validateSession: Vr,
|
|
2325
|
+
subscribeToNewsletter: yr,
|
|
2326
|
+
cancelOrder: gr,
|
|
2327
|
+
processOrderAuthorization: hr,
|
|
2328
|
+
uploadFileToOrderEntry: Ir,
|
|
2329
|
+
startOrderEntryOperation: fr,
|
|
2330
|
+
startRecommendationSession: Sr
|
|
2333
2331
|
};
|
|
2334
2332
|
var be;
|
|
2335
2333
|
(function(e) {
|
|
2336
2334
|
e.NAME = "Name", e.DOCUMENT = "Document", e.OPERATION_DEFINITION = "OperationDefinition", e.VARIABLE_DEFINITION = "VariableDefinition", e.SELECTION_SET = "SelectionSet", e.FIELD = "Field", e.ARGUMENT = "Argument", e.FRAGMENT_SPREAD = "FragmentSpread", e.INLINE_FRAGMENT = "InlineFragment", e.FRAGMENT_DEFINITION = "FragmentDefinition", e.VARIABLE = "Variable", e.INT = "IntValue", e.FLOAT = "FloatValue", e.STRING = "StringValue", e.BOOLEAN = "BooleanValue", e.NULL = "NullValue", e.ENUM = "EnumValue", e.LIST = "ListValue", e.OBJECT = "ObjectValue", e.OBJECT_FIELD = "ObjectField", e.DIRECTIVE = "Directive", e.NAMED_TYPE = "NamedType", e.LIST_TYPE = "ListType", e.NON_NULL_TYPE = "NonNullType", e.SCHEMA_DEFINITION = "SchemaDefinition", e.OPERATION_TYPE_DEFINITION = "OperationTypeDefinition", e.SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition", e.OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition", e.FIELD_DEFINITION = "FieldDefinition", e.INPUT_VALUE_DEFINITION = "InputValueDefinition", e.INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition", e.UNION_TYPE_DEFINITION = "UnionTypeDefinition", e.ENUM_TYPE_DEFINITION = "EnumTypeDefinition", e.ENUM_VALUE_DEFINITION = "EnumValueDefinition", e.INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition", e.DIRECTIVE_DEFINITION = "DirectiveDefinition", e.SCHEMA_EXTENSION = "SchemaExtension", e.SCALAR_TYPE_EXTENSION = "ScalarTypeExtension", e.OBJECT_TYPE_EXTENSION = "ObjectTypeExtension", e.INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension", e.UNION_TYPE_EXTENSION = "UnionTypeExtension", e.ENUM_TYPE_EXTENSION = "EnumTypeExtension", e.INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension";
|
|
2337
2335
|
})(be || (be = {}));
|
|
2338
|
-
const
|
|
2336
|
+
const qr = (e) => typeof e == "string" ? bn(e) : null;
|
|
2339
2337
|
function bn(e) {
|
|
2340
2338
|
try {
|
|
2341
2339
|
return JSON.parse(e);
|
|
@@ -2343,15 +2341,15 @@ function bn(e) {
|
|
|
2343
2341
|
return e;
|
|
2344
2342
|
}
|
|
2345
2343
|
}
|
|
2346
|
-
const
|
|
2344
|
+
const jr = (e) => typeof e == "object" ? JSON.stringify(e) : typeof e == "string" ? e : null, Wr = new _n({
|
|
2347
2345
|
name: "ObjectOrString",
|
|
2348
2346
|
description: "A string or the string representation of an object (a stringified object).",
|
|
2349
|
-
parseValue:
|
|
2350
|
-
serialize:
|
|
2347
|
+
parseValue: qr,
|
|
2348
|
+
serialize: jr,
|
|
2351
2349
|
parseLiteral(e) {
|
|
2352
2350
|
return e.kind === be.STRING ? bn(e.value) : null;
|
|
2353
2351
|
}
|
|
2354
|
-
}), R = (e) => "Price" in e && "seller" in e && "product" in e, F = (e) => "skuName" in e,
|
|
2352
|
+
}), R = (e) => "Price" in e && "seller" in e && "product" in e, F = (e) => "skuName" in e, Gr = {
|
|
2355
2353
|
priceCurrency: async (e, n, t) => {
|
|
2356
2354
|
const {
|
|
2357
2355
|
loaders: { salesChannelLoader: r },
|
|
@@ -2361,7 +2359,7 @@ const Wr = (e) => typeof e == "object" ? JSON.stringify(e) : typeof e == "string
|
|
|
2361
2359
|
},
|
|
2362
2360
|
priceValidUntil: (e) => R(e) ? e.PriceValidUntil ?? "" : F(e) ? e.priceValidUntil ?? "" : null,
|
|
2363
2361
|
itemCondition: () => "https://schema.org/NewCondition",
|
|
2364
|
-
availability: async (e) => R(e) ? Le(B(e)) : F(e) ? Le(
|
|
2362
|
+
availability: async (e) => R(e) ? Le(B(e)) : F(e) ? Le(Qt(e.availability)) : null,
|
|
2365
2363
|
seller: (e, n, t) => R(e) ? {
|
|
2366
2364
|
identifier: t.storage.channel?.seller || e.seller.sellerId || ""
|
|
2367
2365
|
} : F(e) ? {
|
|
@@ -2373,7 +2371,7 @@ const Wr = (e) => typeof e == "object" ? JSON.stringify(e) : typeof e == "string
|
|
|
2373
2371
|
e.tax / 100,
|
|
2374
2372
|
e.unitMultiplier
|
|
2375
2373
|
) : null,
|
|
2376
|
-
sellingPrice: (e) => R(e) ?
|
|
2374
|
+
sellingPrice: (e) => R(e) ? Kt(e) : F(e) ? e.sellingPrice / 100 : null,
|
|
2377
2375
|
listPrice: (e) => R(e) ? e.ListPrice ?? 0 : F(e) ? e.listPrice / 100 : null,
|
|
2378
2376
|
listPriceWithTaxes: (e) => R(e) ? M(
|
|
2379
2377
|
e.ListPrice ?? 0,
|
|
@@ -2387,7 +2385,7 @@ const Wr = (e) => typeof e == "object" ? JSON.stringify(e) : typeof e == "string
|
|
|
2387
2385
|
quantity: (e) => R(e) ? e.AvailableQuantity ?? 0 : F(e) ? e.quantity : null,
|
|
2388
2386
|
isGift: (e) => F(e) ? e.isGift ?? !1 : null,
|
|
2389
2387
|
priceToken: (e) => R(e) ? e.PriceToken ?? null : null
|
|
2390
|
-
},
|
|
2388
|
+
}, Hr = ({ linkText: e }) => `/${e}/p`, Xr = ({
|
|
2391
2389
|
offer: e,
|
|
2392
2390
|
seller: n,
|
|
2393
2391
|
product: t
|
|
@@ -2395,11 +2393,11 @@ const Wr = (e) => typeof e == "object" ? JSON.stringify(e) : typeof e == "string
|
|
|
2395
2393
|
...e,
|
|
2396
2394
|
product: t,
|
|
2397
2395
|
seller: n
|
|
2398
|
-
}),
|
|
2396
|
+
}), Yr = {
|
|
2399
2397
|
imageText: "image",
|
|
2400
2398
|
imageUrl: "https://storecomponents.vtexassets.com/assets/faststore/images/image___117a6d3e229a96ad0e0d0876352566e2.svg",
|
|
2401
2399
|
imageLabel: "label"
|
|
2402
|
-
}, ie = (e, n) => `${e}-${n}`, Ye = (e, n) => `/${ie(e, n)}/p`,
|
|
2400
|
+
}, ie = (e, n) => `${e}-${n}`, Ye = (e, n) => `/${ie(e, n)}/p`, Jr = (e) => Array.isArray(e) && e.length > 0 ? e : null;
|
|
2403
2401
|
function we(e) {
|
|
2404
2402
|
return e.replace(/^\/+|\/+$/g, "");
|
|
2405
2403
|
}
|
|
@@ -2425,10 +2423,10 @@ async function De(e, n, t) {
|
|
|
2425
2423
|
})();
|
|
2426
2424
|
return i.set(r, o), o;
|
|
2427
2425
|
}
|
|
2428
|
-
const
|
|
2426
|
+
const Kr = (e, n) => {
|
|
2429
2427
|
const t = e.findIndex((r) => we(r).split("/").at(-1) === n);
|
|
2430
2428
|
return t < 0 ? 0 : t;
|
|
2431
|
-
},
|
|
2429
|
+
}, Qr = {
|
|
2432
2430
|
productID: ({ itemId: e }) => e,
|
|
2433
2431
|
name: ({ isVariantOf: e, name: n }) => n ?? e.productName,
|
|
2434
2432
|
slug: ({ isVariantOf: { linkText: e }, itemId: n }) => ie(e, n),
|
|
@@ -2436,7 +2434,7 @@ const Qr = (e, n) => {
|
|
|
2436
2434
|
seo: ({ isVariantOf: e }) => ({
|
|
2437
2435
|
title: e.productTitle || e.productName,
|
|
2438
2436
|
description: e.metaTagDescription || e.description,
|
|
2439
|
-
canonical:
|
|
2437
|
+
canonical: Hr(e)
|
|
2440
2438
|
}),
|
|
2441
2439
|
brand: ({ isVariantOf: { brand: e } }) => ({ name: e }),
|
|
2442
2440
|
unitMultiplier: ({ unitMultiplier: e }) => e,
|
|
@@ -2451,7 +2449,7 @@ const Qr = (e, n) => {
|
|
|
2451
2449
|
productId: c
|
|
2452
2450
|
},
|
|
2453
2451
|
itemId: l
|
|
2454
|
-
} = e, g =
|
|
2452
|
+
} = e, g = Kr(s, o), u = r[g], h = we(u).split("/"), f = t.storage.locale;
|
|
2455
2453
|
if (Q(t) && f) {
|
|
2456
2454
|
const v = await De(t, c, f);
|
|
2457
2455
|
if (v) {
|
|
@@ -2500,7 +2498,7 @@ const Qr = (e, n) => {
|
|
|
2500
2498
|
};
|
|
2501
2499
|
},
|
|
2502
2500
|
image: ({ images: e }, n) => {
|
|
2503
|
-
const t = (
|
|
2501
|
+
const t = (Jr(e) ?? [Yr]).map(
|
|
2504
2502
|
({ imageUrl: s, imageText: c, imageLabel: l }) => ({
|
|
2505
2503
|
alternateName: c ?? "",
|
|
2506
2504
|
url: s.replace("vteximg.com.br", "vtexassets.com"),
|
|
@@ -2523,7 +2521,7 @@ const Qr = (e, n) => {
|
|
|
2523
2521
|
review: () => [],
|
|
2524
2522
|
aggregateRating: () => ({}),
|
|
2525
2523
|
offers: (e) => e.sellers.map(
|
|
2526
|
-
(n) =>
|
|
2524
|
+
(n) => Xr({
|
|
2527
2525
|
offer: n.commertialOffer,
|
|
2528
2526
|
seller: n,
|
|
2529
2527
|
product: e
|
|
@@ -2544,7 +2542,7 @@ const Qr = (e, n) => {
|
|
|
2544
2542
|
}))
|
|
2545
2543
|
), i = n.map(
|
|
2546
2544
|
hn
|
|
2547
|
-
), a = t.map(
|
|
2545
|
+
), a = t.map(vr);
|
|
2548
2546
|
return [
|
|
2549
2547
|
...r,
|
|
2550
2548
|
...i,
|
|
@@ -2571,13 +2569,13 @@ const Qr = (e, n) => {
|
|
|
2571
2569
|
return h ? { locale: u, slug: ie(h, a) } : null;
|
|
2572
2570
|
}).filter((u) => u !== null);
|
|
2573
2571
|
}
|
|
2574
|
-
},
|
|
2572
|
+
}, Zr = /* @__PURE__ */ new Set(["allSpecifications"]), ei = {
|
|
2575
2573
|
hasVariant: (e) => e.isVariantOf.items.map((n) => N(n, e.isVariantOf)),
|
|
2576
2574
|
productGroupID: ({ isVariantOf: e }) => e.productId,
|
|
2577
2575
|
name: (e) => e.isVariantOf.productName,
|
|
2578
2576
|
skuVariants: (e) => e,
|
|
2579
2577
|
additionalProperty: ({ isVariantOf: { specificationGroups: e } }) => e.filter(
|
|
2580
|
-
(n) => !
|
|
2578
|
+
(n) => !Zr.has(n.name)
|
|
2581
2579
|
).flatMap(
|
|
2582
2580
|
({ specifications: n }) => n.flatMap(
|
|
2583
2581
|
({ name: t, values: r }) => r.map((i) => ({
|
|
@@ -2587,7 +2585,7 @@ const Qr = (e, n) => {
|
|
|
2587
2585
|
}))
|
|
2588
2586
|
)
|
|
2589
2587
|
)
|
|
2590
|
-
},
|
|
2588
|
+
}, ni = {
|
|
2591
2589
|
propertyID: (e) => e.propertyID || fn(e),
|
|
2592
2590
|
name: ({ name: e }) => e,
|
|
2593
2591
|
value: ({ value: e }) => e,
|
|
@@ -2603,11 +2601,11 @@ const Qr = (e, n) => {
|
|
|
2603
2601
|
({ offer: r }, { offer: i }) => dn(r, i)
|
|
2604
2602
|
);
|
|
2605
2603
|
return t ? t.sku : e[0];
|
|
2606
|
-
}, wn = (e) => e !== "" && !Number.isNaN(Number(e)),
|
|
2604
|
+
}, wn = (e) => e !== "" && !Number.isNaN(Number(e)), ti = /^vrn:recommendations:[^:]+:[^:]+:[^:]+$/, ri = async (e, { campaignVrn: n, userId: t, products: r }, i) => {
|
|
2607
2605
|
const {
|
|
2608
2606
|
clients: { commerce: a }
|
|
2609
2607
|
} = i, { salesChannel: o } = i.storage.channel, s = n?.trim();
|
|
2610
|
-
if (!s || !
|
|
2608
|
+
if (!s || !ti.test(s))
|
|
2611
2609
|
throw new _(`Invalid campaignVrn: "${n}"`);
|
|
2612
2610
|
const c = t?.trim();
|
|
2613
2611
|
if (t != null && !c)
|
|
@@ -2640,11 +2638,11 @@ const Qr = (e, n) => {
|
|
|
2640
2638
|
release_desc: "release:desc",
|
|
2641
2639
|
discount_desc: "discount:desc",
|
|
2642
2640
|
score_desc: ""
|
|
2643
|
-
},
|
|
2641
|
+
}, ii = async (e, { operationId: n }, { clients: { commerce: t } }) => {
|
|
2644
2642
|
if (!n)
|
|
2645
2643
|
throw new _("Missing operationId");
|
|
2646
2644
|
return t.orderEntry.getOperation({ operationId: n });
|
|
2647
|
-
},
|
|
2645
|
+
}, ai = async (e, { orderFormId: n }, { clients: { commerce: t } }) => {
|
|
2648
2646
|
if (!n)
|
|
2649
2647
|
throw new _("Missing orderFormId");
|
|
2650
2648
|
const { items: r } = await t.orderEntry.getOrderFormItems({ orderFormId: n });
|
|
@@ -2660,17 +2658,17 @@ const Qr = (e, n) => {
|
|
|
2660
2658
|
unitMultiplier: i.unitMultiplier ?? 1
|
|
2661
2659
|
}));
|
|
2662
2660
|
};
|
|
2663
|
-
async function
|
|
2661
|
+
async function oi(e, n, t, r) {
|
|
2664
2662
|
const i = n.slice(0, n.lastIndexOf("-"));
|
|
2665
2663
|
return (await De(e, t, r))?.linkId === i;
|
|
2666
2664
|
}
|
|
2667
|
-
const Dn = "Invalid SkuId", Pn = "Slug was set but the fetched sku does not satisfy the slug condition.",
|
|
2668
|
-
async function
|
|
2665
|
+
const Dn = "Invalid SkuId", Pn = "Slug was set but the fetched sku does not satisfy the slug condition.", si = (e) => X(e) || e instanceof Error && (e.message === Dn || e.message.startsWith(Pn));
|
|
2666
|
+
async function ci(e, n, t, r) {
|
|
2669
2667
|
const { linkText: i, productId: a } = n.isVariantOf;
|
|
2670
|
-
if (!(!t || !i || t.startsWith(i) || Q(e) && r && wn(t.split("-").pop() ?? "") && await
|
|
2668
|
+
if (!(!t || !i || t.startsWith(i) || Q(e) && r && wn(t.split("-").pop() ?? "") && await oi(e, t, a, r)))
|
|
2671
2669
|
throw new Error(`${Pn} slug: ${t}, linkText: ${i}`);
|
|
2672
2670
|
}
|
|
2673
|
-
async function
|
|
2671
|
+
async function li(e, n) {
|
|
2674
2672
|
if (n == null)
|
|
2675
2673
|
throw new _("Missing slug or id");
|
|
2676
2674
|
const {
|
|
@@ -2686,9 +2684,9 @@ async function di(e, n) {
|
|
|
2686
2684
|
throw new $(`No product found for id ${i.id}`);
|
|
2687
2685
|
return N(ce(a.items), a);
|
|
2688
2686
|
}
|
|
2689
|
-
const
|
|
2687
|
+
const di = {
|
|
2690
2688
|
product: async (e, { locator: n }, t) => {
|
|
2691
|
-
const r = xe(n), i = Ve(n), a =
|
|
2689
|
+
const r = xe(n), i = Ve(n), a = cr(n), o = sr(n);
|
|
2692
2690
|
r && ve(t, r), i && Oe(t, i);
|
|
2693
2691
|
const {
|
|
2694
2692
|
loaders: { skuLoader: s }
|
|
@@ -2698,11 +2696,11 @@ const ui = {
|
|
|
2698
2696
|
if (!wn(c))
|
|
2699
2697
|
throw new Error(Dn);
|
|
2700
2698
|
const l = await s.load(c);
|
|
2701
|
-
return await
|
|
2699
|
+
return await ci(t, l, o, i), l;
|
|
2702
2700
|
} catch (c) {
|
|
2703
|
-
if (!
|
|
2701
|
+
if (!si(c))
|
|
2704
2702
|
throw c;
|
|
2705
|
-
return
|
|
2703
|
+
return li(t, o);
|
|
2706
2704
|
}
|
|
2707
2705
|
},
|
|
2708
2706
|
collection: (e, { slug: n }, t) => {
|
|
@@ -2722,7 +2720,7 @@ const ui = {
|
|
|
2722
2720
|
selectedFacets: a,
|
|
2723
2721
|
sponsoredCount: o
|
|
2724
2722
|
}, s) => {
|
|
2725
|
-
const c = xe(a), l = Ve(a), g =
|
|
2723
|
+
const c = xe(a), l = Ve(a), g = or(a);
|
|
2726
2724
|
c && ve(s, c), l && Oe(s, l);
|
|
2727
2725
|
const u = t ? Number(t) : 0, h = {
|
|
2728
2726
|
page: Math.ceil(u / n) || 0,
|
|
@@ -3114,10 +3112,10 @@ const ui = {
|
|
|
3114
3112
|
throw new J(
|
|
3115
3113
|
"You are not allowed to list contracts for this organization unit"
|
|
3116
3114
|
);
|
|
3117
|
-
const g =
|
|
3115
|
+
const g = Br(
|
|
3118
3116
|
o?.namespaces.shopper
|
|
3119
3117
|
), u = Xe(o) || c?.customerId?.trim() || "";
|
|
3120
|
-
return
|
|
3118
|
+
return Mr(g, u);
|
|
3121
3119
|
},
|
|
3122
3120
|
pickupPoints: async (e, { geoCoordinates: n }, t) => {
|
|
3123
3121
|
const {
|
|
@@ -3127,10 +3125,10 @@ const ui = {
|
|
|
3127
3125
|
geoCoordinates: n
|
|
3128
3126
|
});
|
|
3129
3127
|
},
|
|
3130
|
-
orderEntryOperation:
|
|
3131
|
-
orderFormItems:
|
|
3132
|
-
recommendations:
|
|
3133
|
-
},
|
|
3128
|
+
orderEntryOperation: ii,
|
|
3129
|
+
orderFormItems: ai,
|
|
3130
|
+
recommendations: ri
|
|
3131
|
+
}, ui = {
|
|
3134
3132
|
reviewRating: () => ({
|
|
3135
3133
|
ratingValue: 5,
|
|
3136
3134
|
bestRating: 5
|
|
@@ -3138,7 +3136,7 @@ const ui = {
|
|
|
3138
3136
|
author: () => ({
|
|
3139
3137
|
name: ""
|
|
3140
3138
|
})
|
|
3141
|
-
},
|
|
3139
|
+
}, pi = (e, n, t) => n ? e.key === "category-1" : t ? e.key === "brand" : !1, gi = {
|
|
3142
3140
|
suggestions: async (e, n, t) => {
|
|
3143
3141
|
const {
|
|
3144
3142
|
clients: { search: r }
|
|
@@ -3189,7 +3187,7 @@ const ui = {
|
|
|
3189
3187
|
t.storage.searchArgs = e;
|
|
3190
3188
|
const { facets: i = [] } = await r.facets(e), a = !e.query, o = e.selectedFacets?.length ? e.selectedFacets[0].key === "category-1" : !1, s = e.selectedFacets?.length ? e.selectedFacets[0].key === "brand" : !1;
|
|
3191
3189
|
return i.filter(
|
|
3192
|
-
(l) => !a || !
|
|
3190
|
+
(l) => !a || !pi(l, o, s)
|
|
3193
3191
|
);
|
|
3194
3192
|
},
|
|
3195
3193
|
metadata: async ({ productSearchPromise: e }) => {
|
|
@@ -3201,12 +3199,12 @@ const ui = {
|
|
|
3201
3199
|
};
|
|
3202
3200
|
},
|
|
3203
3201
|
searchId: async ({ productSearchPromise: e }) => (await e).searchId
|
|
3204
|
-
},
|
|
3202
|
+
}, mi = {
|
|
3205
3203
|
title: ({ title: e }) => e ?? "",
|
|
3206
3204
|
description: ({ description: e }) => e ?? "",
|
|
3207
3205
|
canonical: ({ canonical: e }) => e ?? "",
|
|
3208
3206
|
titleTemplate: () => ""
|
|
3209
|
-
},
|
|
3207
|
+
}, hi = ["bd", "d", "h", "m"], fi = (e) => hi.includes(e), Si = {
|
|
3210
3208
|
bd: {
|
|
3211
3209
|
0: "Today",
|
|
3212
3210
|
1: "In 1 business day",
|
|
@@ -3228,12 +3226,12 @@ const ui = {
|
|
|
3228
3226
|
other: "Up to # minutes"
|
|
3229
3227
|
}
|
|
3230
3228
|
}, An = (e) => {
|
|
3231
|
-
const [n, t] = [e.split(/\D+/)[0], e.split(/[0-9]+/)[1]], r = n !== "" && !Number.isNaN(Number(n)), i =
|
|
3229
|
+
const [n, t] = [e.split(/\D+/)[0], e.split(/[0-9]+/)[1]], r = n !== "" && !Number.isNaN(Number(n)), i = fi(t);
|
|
3232
3230
|
if (!r || !i)
|
|
3233
3231
|
return "";
|
|
3234
3232
|
const a = Number(n) < 2 ? Number(n) : "other";
|
|
3235
|
-
return
|
|
3236
|
-
},
|
|
3233
|
+
return Si[t][a].replace("#", n) ?? "";
|
|
3234
|
+
}, yi = {
|
|
3237
3235
|
carrier: (e) => e?.friendlyName ?? e?.name ?? "",
|
|
3238
3236
|
price: (e) => e?.price ? e.price / 100 : e?.price,
|
|
3239
3237
|
localizedEstimates: (e) => e?.shippingEstimate ? An(e.shippingEstimate) : ""
|
|
@@ -3249,7 +3247,7 @@ function Qe(e, n) {
|
|
|
3249
3247
|
);
|
|
3250
3248
|
return i || e[0];
|
|
3251
3249
|
}
|
|
3252
|
-
function
|
|
3250
|
+
function Ii(e, n, t) {
|
|
3253
3251
|
const r = {};
|
|
3254
3252
|
return e.forEach((i) => {
|
|
3255
3253
|
const a = i.variations;
|
|
@@ -3267,24 +3265,24 @@ function Ze(e) {
|
|
|
3267
3265
|
n[t.name] = t.values[0];
|
|
3268
3266
|
}), n;
|
|
3269
3267
|
}
|
|
3270
|
-
function
|
|
3268
|
+
function vi(e) {
|
|
3271
3269
|
const n = {};
|
|
3272
3270
|
return e?.forEach((t) => {
|
|
3273
3271
|
n[t.field.originalName ?? t.field.name] = t.values.map((r) => r.originalName ?? r.name);
|
|
3274
3272
|
}), n;
|
|
3275
3273
|
}
|
|
3276
|
-
function
|
|
3274
|
+
function Oi(e, n) {
|
|
3277
3275
|
return Number.isNaN(Number(e) - Number(n)) ? e < n ? -1 : e > n ? 1 : 0 : Number(e) - Number(n);
|
|
3278
3276
|
}
|
|
3279
|
-
function
|
|
3277
|
+
function Ci(e) {
|
|
3280
3278
|
const n = e;
|
|
3281
3279
|
for (const t in e)
|
|
3282
3280
|
e[t].every(
|
|
3283
3281
|
(i) => !Number.isNaN(Number(i.value))
|
|
3284
|
-
) && e[t].sort((i, a) =>
|
|
3282
|
+
) && e[t].sort((i, a) => Oi(i.value, a.value));
|
|
3285
3283
|
return n;
|
|
3286
3284
|
}
|
|
3287
|
-
function
|
|
3285
|
+
function bi(e, n, t) {
|
|
3288
3286
|
const r = {}, i = /* @__PURE__ */ new Set();
|
|
3289
3287
|
return e.forEach((a) => {
|
|
3290
3288
|
if (a.variations.length === 0)
|
|
@@ -3325,38 +3323,38 @@ function wi(e, n, t) {
|
|
|
3325
3323
|
};
|
|
3326
3324
|
r[c.name] ? r[c.name].push(u) : r[c.name] = [u];
|
|
3327
3325
|
});
|
|
3328
|
-
}),
|
|
3326
|
+
}), Ci(r);
|
|
3329
3327
|
}
|
|
3330
|
-
const
|
|
3328
|
+
const wi = {
|
|
3331
3329
|
activeVariations: (e) => Ze(e.variations),
|
|
3332
|
-
allVariantsByName: (e) =>
|
|
3333
|
-
slugsMap: (e, n) =>
|
|
3330
|
+
allVariantsByName: (e) => vi(e.isVariantOf.skuSpecifications),
|
|
3331
|
+
slugsMap: (e, n) => Ii(
|
|
3334
3332
|
e.isVariantOf.items,
|
|
3335
3333
|
n.dominantVariantName ?? e.variations[0]?.name,
|
|
3336
3334
|
e.isVariantOf.linkText
|
|
3337
3335
|
),
|
|
3338
3336
|
availableVariations: (e, n) => {
|
|
3339
3337
|
const t = n.dominantVariantName ?? e.variations[0]?.name, i = Ze(e.variations)[t];
|
|
3340
|
-
return
|
|
3338
|
+
return bi(
|
|
3341
3339
|
e.isVariantOf.items,
|
|
3342
3340
|
t,
|
|
3343
3341
|
i
|
|
3344
3342
|
);
|
|
3345
3343
|
},
|
|
3346
3344
|
allVariantProducts: (e) => e.isVariantOf.items.map((n) => N(n, e.isVariantOf))
|
|
3347
|
-
},
|
|
3345
|
+
}, Di = {
|
|
3348
3346
|
"pickup-in-point": "Pickup",
|
|
3349
3347
|
delivery: "Delivery",
|
|
3350
3348
|
pickup: "Pickup",
|
|
3351
3349
|
"take-away": "Take away",
|
|
3352
3350
|
"": ""
|
|
3353
|
-
},
|
|
3351
|
+
}, Pi = {
|
|
3354
3352
|
deliveryOptionsData: (e) => {
|
|
3355
3353
|
const { shippingData: n, items: t } = e, r = n?.logisticsInfo || [], i = n?.selectedAddresses || n?.availableAddresses || [n?.address], a = r.reduce(
|
|
3356
3354
|
(l, g) => {
|
|
3357
3355
|
const u = g?.selectedSla || "", h = g?.selectedDeliveryChannel || g?.deliveryChannel || "", f = g?.deliveryCompany || "", v = g?.deliveryWindow, d = g?.pickupStoreInfo, p = g?.shippingEstimate || "", m = g?.shippingEstimate ? An(g?.shippingEstimate) : "", y = g?.shippingEstimateDate || "", O = g?.addressId || "", w = g?.itemIndex ?? 0, C = t?.[w], A = C?.seller || "", S = `${u}|${h}|${f}|${A}|${p}|${y}|${O}|${v?.startDateUtc}|${v?.endDateUtc}`, D = i?.find(
|
|
3358
3356
|
(T) => T?.addressId === O
|
|
3359
|
-
), P = `${
|
|
3357
|
+
), P = `${Di[h] || ""} ${m} ${D?.neighborhood ? `to ${D?.neighborhood}` : ""}`.trim(), { taxPriceTagsTotal: k, taxPriceTags: b } = Ai(
|
|
3360
3358
|
C?.priceTags ?? []
|
|
3361
3359
|
), U = (C?.sellingPrice ?? 0) * (C?.quantity ?? 0) + (C?.tax ?? 0) + (k ?? 0);
|
|
3362
3360
|
return l[S] || (l[S] = {
|
|
@@ -3414,7 +3412,7 @@ const Di = {
|
|
|
3414
3412
|
) || [];
|
|
3415
3413
|
}
|
|
3416
3414
|
};
|
|
3417
|
-
function
|
|
3415
|
+
function Ai(e) {
|
|
3418
3416
|
const t = e.filter(
|
|
3419
3417
|
(i) => i?.name?.includes("TAX")
|
|
3420
3418
|
), r = t.reduce(
|
|
@@ -3426,28 +3424,28 @@ function ki(e) {
|
|
|
3426
3424
|
taxPriceTagsTotal: r
|
|
3427
3425
|
};
|
|
3428
3426
|
}
|
|
3429
|
-
const
|
|
3427
|
+
const ki = {
|
|
3430
3428
|
StoreCollection: un,
|
|
3431
|
-
StoreAggregateOffer:
|
|
3432
|
-
StoreProduct:
|
|
3433
|
-
StoreSeo:
|
|
3434
|
-
StoreFacet:
|
|
3435
|
-
StoreFacetBoolean:
|
|
3436
|
-
StoreFacetRange:
|
|
3437
|
-
StoreFacetValueBoolean:
|
|
3438
|
-
StoreOffer:
|
|
3439
|
-
StoreAggregateRating:
|
|
3440
|
-
StoreReview:
|
|
3441
|
-
StoreProductGroup:
|
|
3442
|
-
StoreSearchResult:
|
|
3443
|
-
StorePropertyValue:
|
|
3444
|
-
SkuVariants:
|
|
3445
|
-
ShippingSLA:
|
|
3446
|
-
UserOrderResult:
|
|
3447
|
-
ObjectOrString:
|
|
3448
|
-
Query:
|
|
3449
|
-
Mutation:
|
|
3450
|
-
},
|
|
3429
|
+
StoreAggregateOffer: er,
|
|
3430
|
+
StoreProduct: Qr,
|
|
3431
|
+
StoreSeo: mi,
|
|
3432
|
+
StoreFacet: lr,
|
|
3433
|
+
StoreFacetBoolean: dr,
|
|
3434
|
+
StoreFacetRange: ur,
|
|
3435
|
+
StoreFacetValueBoolean: pr,
|
|
3436
|
+
StoreOffer: Gr,
|
|
3437
|
+
StoreAggregateRating: nr,
|
|
3438
|
+
StoreReview: ui,
|
|
3439
|
+
StoreProductGroup: ei,
|
|
3440
|
+
StoreSearchResult: gi,
|
|
3441
|
+
StorePropertyValue: ni,
|
|
3442
|
+
SkuVariants: wi,
|
|
3443
|
+
ShippingSLA: yi,
|
|
3444
|
+
UserOrderResult: Pi,
|
|
3445
|
+
ObjectOrString: Wr,
|
|
3446
|
+
Query: di,
|
|
3447
|
+
Mutation: xr
|
|
3448
|
+
}, Ui = () => ki, Ti = `"""
|
|
3451
3449
|
Address information.
|
|
3452
3450
|
"""
|
|
3453
3451
|
type Address {
|
|
@@ -3492,7 +3490,7 @@ type Address {
|
|
|
3492
3490
|
"""
|
|
3493
3491
|
geoCoordinates: [Float]
|
|
3494
3492
|
}
|
|
3495
|
-
`,
|
|
3493
|
+
`, _i = `"""
|
|
3496
3494
|
Advertisement information about a specific product in a campaign
|
|
3497
3495
|
"""
|
|
3498
3496
|
type Advertisement {
|
|
@@ -3517,7 +3515,7 @@ type Advertisement {
|
|
|
3517
3515
|
"""
|
|
3518
3516
|
adResponseId: String!
|
|
3519
3517
|
}
|
|
3520
|
-
`,
|
|
3518
|
+
`, Ei = `"""
|
|
3521
3519
|
Aggregate offer information, for a given SKU that is available to be fulfilled by multiple sellers.
|
|
3522
3520
|
"""
|
|
3523
3521
|
type StoreAggregateOffer {
|
|
@@ -3546,7 +3544,7 @@ type StoreAggregateOffer {
|
|
|
3546
3544
|
"""
|
|
3547
3545
|
offers: [StoreOffer!]!
|
|
3548
3546
|
}
|
|
3549
|
-
`,
|
|
3547
|
+
`, Ri = `"""
|
|
3550
3548
|
Average rating, based on multiple ratings or reviews.
|
|
3551
3549
|
"""
|
|
3552
3550
|
type StoreAggregateRating {
|
|
@@ -3559,7 +3557,7 @@ type StoreAggregateRating {
|
|
|
3559
3557
|
"""
|
|
3560
3558
|
reviewCount: Int!
|
|
3561
3559
|
}
|
|
3562
|
-
`,
|
|
3560
|
+
`, Fi = `"""
|
|
3563
3561
|
information about the author of a product review or rating.
|
|
3564
3562
|
"""
|
|
3565
3563
|
type StoreAuthor {
|
|
@@ -3568,7 +3566,7 @@ type StoreAuthor {
|
|
|
3568
3566
|
"""
|
|
3569
3567
|
name: String!
|
|
3570
3568
|
}
|
|
3571
|
-
`,
|
|
3569
|
+
`, Ni = `"""
|
|
3572
3570
|
Brand of a given product.
|
|
3573
3571
|
"""
|
|
3574
3572
|
type StoreBrand {
|
|
@@ -3577,7 +3575,7 @@ type StoreBrand {
|
|
|
3577
3575
|
"""
|
|
3578
3576
|
name: String!
|
|
3579
3577
|
}
|
|
3580
|
-
`,
|
|
3578
|
+
`, Li = `"""
|
|
3581
3579
|
Item of a list.
|
|
3582
3580
|
"""
|
|
3583
3581
|
type StoreListItem {
|
|
@@ -3608,7 +3606,7 @@ type StoreBreadcrumbList {
|
|
|
3608
3606
|
"""
|
|
3609
3607
|
numberOfItems: Int!
|
|
3610
3608
|
}
|
|
3611
|
-
`,
|
|
3609
|
+
`, Bi = `"""
|
|
3612
3610
|
Shopping cart message.
|
|
3613
3611
|
"""
|
|
3614
3612
|
type StoreCartMessage {
|
|
@@ -3645,7 +3643,7 @@ input IStoreCart {
|
|
|
3645
3643
|
"""
|
|
3646
3644
|
order: IStoreOrder!
|
|
3647
3645
|
}
|
|
3648
|
-
`,
|
|
3646
|
+
`, $i = `"""
|
|
3649
3647
|
Product collection type. Possible values are \`Department\`, \`Category\`, \`Brand\` or \`Collection\`.
|
|
3650
3648
|
|
|
3651
3649
|
\`SubCategory\` and \`Cluster\` are still declared for backward compatibility but are
|
|
@@ -3760,7 +3758,7 @@ type StoreCollectionLocale {
|
|
|
3760
3758
|
"""
|
|
3761
3759
|
slug: String!
|
|
3762
3760
|
}
|
|
3763
|
-
`,
|
|
3761
|
+
`, Mi = `"""
|
|
3764
3762
|
Delivery Promise badge.
|
|
3765
3763
|
"""
|
|
3766
3764
|
type DeliveryPromiseBadge {
|
|
@@ -3769,7 +3767,7 @@ type DeliveryPromiseBadge {
|
|
|
3769
3767
|
"""
|
|
3770
3768
|
typeName: String
|
|
3771
3769
|
}
|
|
3772
|
-
`,
|
|
3770
|
+
`, zi = `union StoreFacet = StoreFacetRange | StoreFacetBoolean
|
|
3773
3771
|
|
|
3774
3772
|
"""
|
|
3775
3773
|
Search facet range information.
|
|
@@ -3846,7 +3844,7 @@ type StoreFacetValueBoolean {
|
|
|
3846
3844
|
"""
|
|
3847
3845
|
quantity: Int
|
|
3848
3846
|
}
|
|
3849
|
-
`,
|
|
3847
|
+
`, Vi = `"""
|
|
3850
3848
|
Image.
|
|
3851
3849
|
"""
|
|
3852
3850
|
type StoreImage {
|
|
@@ -3873,7 +3871,7 @@ input IStoreImage {
|
|
|
3873
3871
|
"""
|
|
3874
3872
|
alternateName: String!
|
|
3875
3873
|
}
|
|
3876
|
-
`,
|
|
3874
|
+
`, xi = `type Mutation {
|
|
3877
3875
|
"""
|
|
3878
3876
|
Checks for changes between the cart presented in the UI and the cart stored in the ecommerce platform. If changes are detected, it returns the cart stored on the platform. Otherwise, it returns \`null\`.
|
|
3879
3877
|
"""
|
|
@@ -3915,7 +3913,7 @@ input IStoreImage {
|
|
|
3915
3913
|
"""
|
|
3916
3914
|
startRecommendationSession: Boolean!
|
|
3917
3915
|
}
|
|
3918
|
-
`,
|
|
3916
|
+
`, qi = `"""
|
|
3919
3917
|
Newsletter information.
|
|
3920
3918
|
"""
|
|
3921
3919
|
type PersonNewsletter {
|
|
@@ -3938,8 +3936,8 @@ input IPersonNewsletter {
|
|
|
3938
3936
|
"""
|
|
3939
3937
|
email: String!
|
|
3940
3938
|
}
|
|
3941
|
-
`,
|
|
3942
|
-
`,
|
|
3939
|
+
`, ji = `scalar ObjectOrString
|
|
3940
|
+
`, Wi = `"""
|
|
3943
3941
|
Offer information.
|
|
3944
3942
|
"""
|
|
3945
3943
|
type StoreOffer {
|
|
@@ -4032,7 +4030,7 @@ input IStoreOffer {
|
|
|
4032
4030
|
"""
|
|
4033
4031
|
priceToken: String
|
|
4034
4032
|
}
|
|
4035
|
-
`,
|
|
4033
|
+
`, Gi = `"""
|
|
4036
4034
|
Information of a specific order.
|
|
4037
4035
|
"""
|
|
4038
4036
|
type StoreOrder {
|
|
@@ -4067,7 +4065,7 @@ input IStoreOrder {
|
|
|
4067
4065
|
"""
|
|
4068
4066
|
shouldSplitItem: Boolean
|
|
4069
4067
|
}
|
|
4070
|
-
`,
|
|
4068
|
+
`, Hi = `"""
|
|
4071
4069
|
Commercial Authorization response.
|
|
4072
4070
|
"""
|
|
4073
4071
|
type CommercialAuthorizationResponse {
|
|
@@ -4466,7 +4464,7 @@ type ProcessOrderAuthorizationRule {
|
|
|
4466
4464
|
"""
|
|
4467
4465
|
rule: CommercialAuthorizationRule!
|
|
4468
4466
|
}
|
|
4469
|
-
`,
|
|
4467
|
+
`, Xi = `"""
|
|
4470
4468
|
Input for uploading a file to the Order Entry Service.
|
|
4471
4469
|
The file is transmitted as a Base64-encoded string so it can travel
|
|
4472
4470
|
through the standard GraphQL JSON pipeline without multipart support.
|
|
@@ -4527,7 +4525,7 @@ type StoreOrderFormCartItem {
|
|
|
4527
4525
|
seller: String!
|
|
4528
4526
|
unitMultiplier: Float
|
|
4529
4527
|
}
|
|
4530
|
-
`,
|
|
4528
|
+
`, Yi = `"""
|
|
4531
4529
|
Organization.
|
|
4532
4530
|
"""
|
|
4533
4531
|
type StoreOrganization {
|
|
@@ -4564,7 +4562,7 @@ type StoreContract {
|
|
|
4564
4562
|
"""
|
|
4565
4563
|
isActive: Boolean!
|
|
4566
4564
|
}
|
|
4567
|
-
`,
|
|
4565
|
+
`, Ji = `"""
|
|
4568
4566
|
Whenever you make a query that allows for pagination, such as \`allProducts\` or \`allCollections\`, you can check \`StorePageInfo\` to learn more about the complete set of items and use it to paginate your queries.
|
|
4569
4567
|
"""
|
|
4570
4568
|
type StorePageInfo {
|
|
@@ -4589,7 +4587,7 @@ type StorePageInfo {
|
|
|
4589
4587
|
"""
|
|
4590
4588
|
totalCount: Int!
|
|
4591
4589
|
}
|
|
4592
|
-
`,
|
|
4590
|
+
`, Ki = `"""
|
|
4593
4591
|
Input type for setting a new password.
|
|
4594
4592
|
"""
|
|
4595
4593
|
input ISetPassword {
|
|
@@ -4632,7 +4630,7 @@ type SetPasswordResponse {
|
|
|
4632
4630
|
"""
|
|
4633
4631
|
message: String
|
|
4634
4632
|
}
|
|
4635
|
-
`,
|
|
4633
|
+
`, Qi = `"""
|
|
4636
4634
|
Client profile data.
|
|
4637
4635
|
"""
|
|
4638
4636
|
type StorePerson {
|
|
@@ -4675,7 +4673,7 @@ input IStorePerson {
|
|
|
4675
4673
|
"""
|
|
4676
4674
|
familyName: String!
|
|
4677
4675
|
}
|
|
4678
|
-
`,
|
|
4676
|
+
`, Zi = `type PickupPointAddress {
|
|
4679
4677
|
"""
|
|
4680
4678
|
Address city.
|
|
4681
4679
|
"""
|
|
@@ -4754,7 +4752,7 @@ type PickupPoints {
|
|
|
4754
4752
|
"""
|
|
4755
4753
|
pickupPointsHash: String
|
|
4756
4754
|
}
|
|
4757
|
-
`,
|
|
4755
|
+
`, ea = `"""
|
|
4758
4756
|
Product information. Products are variants within product groups, equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on.
|
|
4759
4757
|
"""
|
|
4760
4758
|
type StoreProduct {
|
|
@@ -4922,7 +4920,7 @@ input IStoreProduct {
|
|
|
4922
4920
|
"""
|
|
4923
4921
|
additionalProperty: [IStorePropertyValue!]
|
|
4924
4922
|
}
|
|
4925
|
-
`,
|
|
4923
|
+
`, na = `"""
|
|
4926
4924
|
Product group information. Product groups are catalog entities that may contain variants. They are equivalent to VTEX [Products](https://help.vtex.com/en/tutorial/what-is-a-product--2zrB2gFCHyQokCKKE8kuAw#), whereas each variant is equivalent to a VTEX [SKU](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on.
|
|
4927
4925
|
"""
|
|
4928
4926
|
type StoreProductGroup {
|
|
@@ -4949,7 +4947,7 @@ type StoreProductGroup {
|
|
|
4949
4947
|
"""
|
|
4950
4948
|
skuVariants: SkuVariants
|
|
4951
4949
|
}
|
|
4952
|
-
`,
|
|
4950
|
+
`, ta = `type Profile {
|
|
4953
4951
|
"""
|
|
4954
4952
|
Collection of user's address
|
|
4955
4953
|
"""
|
|
@@ -5010,7 +5008,7 @@ type ProfileAddress {
|
|
|
5010
5008
|
"""
|
|
5011
5009
|
geoCoordinate: [Float]
|
|
5012
5010
|
}
|
|
5013
|
-
`,
|
|
5011
|
+
`, ra = `"""
|
|
5014
5012
|
Properties that can be associated with products and products groups.
|
|
5015
5013
|
"""
|
|
5016
5014
|
type StorePropertyValue {
|
|
@@ -5050,7 +5048,7 @@ input IStorePropertyValue {
|
|
|
5050
5048
|
"""
|
|
5051
5049
|
valueReference: ObjectOrString!
|
|
5052
5050
|
}
|
|
5053
|
-
`,
|
|
5051
|
+
`, ia = `"""
|
|
5054
5052
|
Each product edge contains a \`node\`, with product information, and a \`cursor\`, that can be used as a reference for pagination.
|
|
5055
5053
|
"""
|
|
5056
5054
|
type StoreProductEdge {
|
|
@@ -5680,7 +5678,7 @@ type StoreAccountProfile {
|
|
|
5680
5678
|
email: String
|
|
5681
5679
|
id: String
|
|
5682
5680
|
}
|
|
5683
|
-
`,
|
|
5681
|
+
`, aa = `"""
|
|
5684
5682
|
Summary of a quote returned in list results.
|
|
5685
5683
|
"""
|
|
5686
5684
|
type UserQuoteSummary {
|
|
@@ -5745,7 +5743,7 @@ type UserQuoteListPaging {
|
|
|
5745
5743
|
"""
|
|
5746
5744
|
perPage: Int!
|
|
5747
5745
|
}
|
|
5748
|
-
`,
|
|
5746
|
+
`, oa = `type RecommendationResponse {
|
|
5749
5747
|
products: [StoreProduct!]!
|
|
5750
5748
|
correlationId: String!
|
|
5751
5749
|
campaign: RecommendationCampaign!
|
|
@@ -5756,7 +5754,7 @@ type RecommendationCampaign {
|
|
|
5756
5754
|
title: String
|
|
5757
5755
|
type: String!
|
|
5758
5756
|
}
|
|
5759
|
-
`,
|
|
5757
|
+
`, sa = `"""
|
|
5760
5758
|
Information of a given review rating.
|
|
5761
5759
|
"""
|
|
5762
5760
|
type StoreReviewRating {
|
|
@@ -5783,7 +5781,7 @@ type StoreReview {
|
|
|
5783
5781
|
"""
|
|
5784
5782
|
author: StoreAuthor!
|
|
5785
5783
|
}
|
|
5786
|
-
`,
|
|
5784
|
+
`, ca = `"""
|
|
5787
5785
|
Search Engine Optimization (SEO) tags data.
|
|
5788
5786
|
"""
|
|
5789
5787
|
type StoreSeo {
|
|
@@ -5804,7 +5802,7 @@ type StoreSeo {
|
|
|
5804
5802
|
"""
|
|
5805
5803
|
canonical: String!
|
|
5806
5804
|
}
|
|
5807
|
-
`,
|
|
5805
|
+
`, la = `"""
|
|
5808
5806
|
Currency information.
|
|
5809
5807
|
"""
|
|
5810
5808
|
type StoreCurrency {
|
|
@@ -6079,7 +6077,7 @@ input IStoreSession {
|
|
|
6079
6077
|
"""
|
|
6080
6078
|
refreshAfter: String
|
|
6081
6079
|
}
|
|
6082
|
-
`,
|
|
6080
|
+
`, da = `"""
|
|
6083
6081
|
Shipping Simulation item input.
|
|
6084
6082
|
"""
|
|
6085
6083
|
input IShippingItem {
|
|
@@ -6410,7 +6408,7 @@ type MessageFields {
|
|
|
6410
6408
|
"""
|
|
6411
6409
|
skuName: String
|
|
6412
6410
|
}
|
|
6413
|
-
`,
|
|
6411
|
+
`, ua = `type SkuVariants {
|
|
6414
6412
|
"""
|
|
6415
6413
|
SKU property values for the current SKU.
|
|
6416
6414
|
"""
|
|
@@ -6505,7 +6503,7 @@ Example:
|
|
|
6505
6503
|
\`\`\`
|
|
6506
6504
|
"""
|
|
6507
6505
|
scalar FormattedVariants
|
|
6508
|
-
`,
|
|
6506
|
+
`, pa = `"""
|
|
6509
6507
|
Status used to indicate a message type. For instance, a shopping cart informative or error message.
|
|
6510
6508
|
"""
|
|
6511
6509
|
enum StoreStatus {
|
|
@@ -6513,7 +6511,7 @@ enum StoreStatus {
|
|
|
6513
6511
|
WARNING
|
|
6514
6512
|
ERROR
|
|
6515
6513
|
}
|
|
6516
|
-
`,
|
|
6514
|
+
`, ga = `scalar JSONObject
|
|
6517
6515
|
|
|
6518
6516
|
type UserOrder {
|
|
6519
6517
|
orderId: String
|
|
@@ -7337,71 +7335,71 @@ type UserOrderBudgetAllocationLinkedEntity {
|
|
|
7337
7335
|
type: String
|
|
7338
7336
|
id: String
|
|
7339
7337
|
}
|
|
7340
|
-
`,
|
|
7341
|
-
"./address.graphql":
|
|
7342
|
-
"./advertisement.graphql":
|
|
7343
|
-
"./aggregateOffer.graphql":
|
|
7344
|
-
"./aggregateRating.graphql":
|
|
7345
|
-
"./author.graphql":
|
|
7346
|
-
"./brand.graphql":
|
|
7347
|
-
"./breadcrumb.graphql":
|
|
7348
|
-
"./cart.graphql":
|
|
7349
|
-
"./collection.graphql":
|
|
7350
|
-
"./deliveryPromisesBadge.graphql":
|
|
7351
|
-
"./facet.graphql":
|
|
7352
|
-
"./image.graphql":
|
|
7353
|
-
"./mutation.graphql":
|
|
7354
|
-
"./newsletter.graphql":
|
|
7355
|
-
"./objectOrString.graphql":
|
|
7356
|
-
"./offer.graphql":
|
|
7357
|
-
"./order.graphql":
|
|
7358
|
-
"./orderCommercialAuthorizaton.graphql":
|
|
7359
|
-
"./orderEntry.graphql":
|
|
7360
|
-
"./organization.graphql":
|
|
7361
|
-
"./pageInfo.graphql":
|
|
7362
|
-
"./password.graphql":
|
|
7363
|
-
"./person.graphql":
|
|
7364
|
-
"./pickupPoints.graphql":
|
|
7365
|
-
"./product.graphql":
|
|
7366
|
-
"./productGroup.graphql":
|
|
7367
|
-
"./profile.graphql":
|
|
7368
|
-
"./propertyValue.graphql":
|
|
7369
|
-
"./query.graphql":
|
|
7370
|
-
"./quote.graphql":
|
|
7371
|
-
"./recommendation.graphql":
|
|
7372
|
-
"./review.graphql":
|
|
7373
|
-
"./seo.graphql":
|
|
7374
|
-
"./session.graphql":
|
|
7375
|
-
"./shipping.graphql":
|
|
7376
|
-
"./skuVariants.graphql":
|
|
7377
|
-
"./status.graphql":
|
|
7378
|
-
"./userOrder.graphql":
|
|
7379
|
-
}),
|
|
7380
|
-
Object.values(
|
|
7338
|
+
`, ma = /* @__PURE__ */ Object.assign({
|
|
7339
|
+
"./address.graphql": Ti,
|
|
7340
|
+
"./advertisement.graphql": _i,
|
|
7341
|
+
"./aggregateOffer.graphql": Ei,
|
|
7342
|
+
"./aggregateRating.graphql": Ri,
|
|
7343
|
+
"./author.graphql": Fi,
|
|
7344
|
+
"./brand.graphql": Ni,
|
|
7345
|
+
"./breadcrumb.graphql": Li,
|
|
7346
|
+
"./cart.graphql": Bi,
|
|
7347
|
+
"./collection.graphql": $i,
|
|
7348
|
+
"./deliveryPromisesBadge.graphql": Mi,
|
|
7349
|
+
"./facet.graphql": zi,
|
|
7350
|
+
"./image.graphql": Vi,
|
|
7351
|
+
"./mutation.graphql": xi,
|
|
7352
|
+
"./newsletter.graphql": qi,
|
|
7353
|
+
"./objectOrString.graphql": ji,
|
|
7354
|
+
"./offer.graphql": Wi,
|
|
7355
|
+
"./order.graphql": Gi,
|
|
7356
|
+
"./orderCommercialAuthorizaton.graphql": Hi,
|
|
7357
|
+
"./orderEntry.graphql": Xi,
|
|
7358
|
+
"./organization.graphql": Yi,
|
|
7359
|
+
"./pageInfo.graphql": Ji,
|
|
7360
|
+
"./password.graphql": Ki,
|
|
7361
|
+
"./person.graphql": Qi,
|
|
7362
|
+
"./pickupPoints.graphql": Zi,
|
|
7363
|
+
"./product.graphql": ea,
|
|
7364
|
+
"./productGroup.graphql": na,
|
|
7365
|
+
"./profile.graphql": ta,
|
|
7366
|
+
"./propertyValue.graphql": ra,
|
|
7367
|
+
"./query.graphql": ia,
|
|
7368
|
+
"./quote.graphql": aa,
|
|
7369
|
+
"./recommendation.graphql": oa,
|
|
7370
|
+
"./review.graphql": sa,
|
|
7371
|
+
"./seo.graphql": ca,
|
|
7372
|
+
"./session.graphql": la,
|
|
7373
|
+
"./shipping.graphql": da,
|
|
7374
|
+
"./skuVariants.graphql": ua,
|
|
7375
|
+
"./status.graphql": pa,
|
|
7376
|
+
"./userOrder.graphql": ga
|
|
7377
|
+
}), ha = En(
|
|
7378
|
+
Object.values(ma).map((e) => Rn(e)).reduce(
|
|
7381
7379
|
(e, n) => en([e, n], { sort: !0 })
|
|
7382
7380
|
)
|
|
7383
|
-
),
|
|
7381
|
+
), fa = ha, Fa = async (e) => L.context.with(
|
|
7384
7382
|
L.propagation.extract(L.context.active(), e.OTEL),
|
|
7385
7383
|
() => (n) => (n.storage = {
|
|
7386
7384
|
channel: oe.parse(e.channel),
|
|
7387
7385
|
flags: e.flags ?? {},
|
|
7388
7386
|
locale: e.locale,
|
|
7389
7387
|
cookies: /* @__PURE__ */ new Map()
|
|
7390
|
-
}, n.account = e.account, n.OTEL = e.OTEL, n.discoveryConfig = e.discoveryConfig, n.clients =
|
|
7388
|
+
}, n.account = e.account, n.OTEL = e.OTEL, n.discoveryConfig = e.discoveryConfig, n.clients = zt(e, n), n.loaders = Jt(e, n), n)
|
|
7391
7389
|
);
|
|
7392
|
-
function
|
|
7393
|
-
const e =
|
|
7390
|
+
function Sa() {
|
|
7391
|
+
const e = Ui(), n = {};
|
|
7394
7392
|
for (const [t, r] of Object.entries(e))
|
|
7395
7393
|
n[t] = Object.fromEntries(
|
|
7396
7394
|
Object.entries(r).map(([i, a]) => typeof a != "function" ? [i, a] : [i, Qn(a, `${t}(${i})`)])
|
|
7397
7395
|
);
|
|
7398
7396
|
return n;
|
|
7399
7397
|
}
|
|
7400
|
-
function
|
|
7398
|
+
function Na(e) {
|
|
7401
7399
|
const t = Kn([
|
|
7402
7400
|
Jn,
|
|
7403
7401
|
Hn
|
|
7404
|
-
])(
|
|
7402
|
+
])(Sa(), fa);
|
|
7405
7403
|
return e && Fn(e) ? Tn({
|
|
7406
7404
|
schemas: [t, e]
|
|
7407
7405
|
}) : t;
|
|
@@ -7413,8 +7411,8 @@ export {
|
|
|
7413
7411
|
$n as CommercialAuthorizationStatus,
|
|
7414
7412
|
ee as FastStoreError,
|
|
7415
7413
|
J as ForbiddenError,
|
|
7416
|
-
|
|
7417
|
-
|
|
7414
|
+
Fa as GraphqlVtexContextFactory,
|
|
7415
|
+
Na as GraphqlVtexSchema,
|
|
7418
7416
|
$ as NotFoundError,
|
|
7419
7417
|
Mn as StoreCollectionType,
|
|
7420
7418
|
zn as StoreFacetType,
|
|
@@ -7422,12 +7420,12 @@ export {
|
|
|
7422
7420
|
xn as StoreStatus,
|
|
7423
7421
|
te as UnauthorizedError,
|
|
7424
7422
|
qn as UserOrderInvoiceType,
|
|
7425
|
-
|
|
7426
|
-
|
|
7423
|
+
Ea as isBadRequestError,
|
|
7424
|
+
_a as isFastStoreError,
|
|
7427
7425
|
Zn as isForbiddenError,
|
|
7428
7426
|
X as isNotFoundError,
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
|
|
7427
|
+
Ra as isUnauthorizedError,
|
|
7428
|
+
Ta as stringifyCacheControl,
|
|
7429
|
+
fa as typeDefs,
|
|
7432
7430
|
Kn as withDirectives
|
|
7433
7431
|
};
|