@simpleapps-com/augur-utils 2.4.0 → 2026.11.1
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/EXPORTS.md +24 -31
- package/README.md +19 -180
- package/dist/address-comparison.d.ts +18 -0
- package/dist/address-comparison.d.ts.map +1 -0
- package/dist/address-schemas.d.ts +45 -0
- package/dist/address-schemas.d.ts.map +1 -0
- package/dist/analytics.d.ts +66 -0
- package/dist/analytics.d.ts.map +1 -0
- package/dist/build-checkout-payload.d.ts +37 -0
- package/dist/build-checkout-payload.d.ts.map +1 -0
- package/dist/cache-config.d.ts +42 -0
- package/dist/cache-config.d.ts.map +1 -0
- package/dist/chunk-5UMFBGVA.cjs.map +1 -1
- package/dist/date-helpers.d.ts +16 -0
- package/dist/date-helpers.d.ts.map +1 -0
- package/dist/derive-price.d.ts +49 -0
- package/dist/derive-price.d.ts.map +1 -0
- package/dist/format-price.d.ts +6 -0
- package/dist/format-price.d.ts.map +1 -0
- package/dist/get-payment-status.d.ts +10 -0
- package/dist/get-payment-status.d.ts.map +1 -0
- package/dist/image-rules.d.ts +70 -0
- package/dist/image-rules.d.ts.map +1 -0
- package/dist/image.d.ts +80 -0
- package/dist/image.d.ts.map +1 -0
- package/dist/index.cjs +371 -167
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +63 -1448
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +370 -166
- package/dist/index.js.map +1 -1
- package/dist/json-ld-rules.d.ts +50 -0
- package/dist/json-ld-rules.d.ts.map +1 -0
- package/dist/json-ld.d.ts +34 -0
- package/dist/json-ld.d.ts.map +1 -0
- package/dist/money.d.ts +37 -0
- package/dist/money.d.ts.map +1 -0
- package/dist/price-breaks.d.ts +16 -0
- package/dist/price-breaks.d.ts.map +1 -0
- package/dist/price-outcome.d.ts +19 -0
- package/dist/price-outcome.d.ts.map +1 -0
- package/dist/resolve-stock.d.ts +22 -0
- package/dist/resolve-stock.d.ts.map +1 -0
- package/dist/result.d.ts +33 -0
- package/dist/result.d.ts.map +1 -0
- package/dist/rules.d.ts +45 -0
- package/dist/rules.d.ts.map +1 -0
- package/dist/schema-availability.d.ts +11 -0
- package/dist/schema-availability.d.ts.map +1 -0
- package/dist/transform-ship-to-address.d.ts +15 -0
- package/dist/transform-ship-to-address.d.ts.map +1 -0
- package/dist/transforms.d.ts +70 -0
- package/dist/transforms.d.ts.map +1 -0
- package/dist/types/api.d.ts +8 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/attribute.d.ts +12 -0
- package/dist/types/attribute.d.ts.map +1 -0
- package/dist/types/cart.d.ts +25 -0
- package/dist/types/cart.d.ts.map +1 -0
- package/dist/types/category-items.d.ts +4 -0
- package/dist/types/category-items.d.ts.map +1 -0
- package/dist/types/category.d.ts +19 -0
- package/dist/types/category.d.ts.map +1 -0
- package/dist/types/checkout.d.ts +4 -0
- package/dist/types/checkout.d.ts.map +1 -0
- package/dist/types/customer.d.ts +4 -0
- package/dist/types/customer.d.ts.map +1 -0
- package/dist/types/filter.d.ts +9 -0
- package/dist/types/filter.d.ts.map +1 -0
- package/dist/types/inventory.d.ts +10 -0
- package/dist/types/inventory.d.ts.map +1 -0
- package/dist/types/joomla.d.ts +11 -0
- package/dist/types/joomla.d.ts.map +1 -0
- package/dist/types/ltl-shipping.d.ts +45 -0
- package/dist/types/ltl-shipping.d.ts.map +1 -0
- package/dist/types/menu.d.ts +14 -0
- package/dist/types/menu.d.ts.map +1 -0
- package/dist/types/meta.d.ts +11 -0
- package/dist/types/meta.d.ts.map +1 -0
- package/dist/types/order.d.ts +72 -0
- package/dist/types/order.d.ts.map +1 -0
- package/dist/types/password.d.ts +7 -0
- package/dist/types/password.d.ts.map +1 -0
- package/dist/types/payment.d.ts +69 -0
- package/dist/types/payment.d.ts.map +1 -0
- package/dist/types/pricing.d.ts +25 -0
- package/dist/types/pricing.d.ts.map +1 -0
- package/dist/types/product.d.ts +58 -0
- package/dist/types/product.d.ts.map +1 -0
- package/dist/types/search.d.ts +16 -0
- package/dist/types/search.d.ts.map +1 -0
- package/dist/types/shipping.d.ts +4 -0
- package/dist/types/shipping.d.ts.map +1 -0
- package/dist/types/smarty-streets.d.ts +4 -0
- package/dist/types/smarty-streets.d.ts.map +1 -0
- package/dist/types/supplier.d.ts +4 -0
- package/dist/types/supplier.d.ts.map +1 -0
- package/dist/types/tax.d.ts +6 -0
- package/dist/types/tax.d.ts.map +1 -0
- package/dist/types/uom.d.ts +4 -0
- package/dist/types/uom.d.ts.map +1 -0
- package/dist/types/user-profile.d.ts +5 -0
- package/dist/types/user-profile.d.ts.map +1 -0
- package/dist/us-states.d.ts +15 -0
- package/dist/us-states.d.ts.map +1 -0
- package/dist/validation-patterns.d.ts +22 -0
- package/dist/validation-patterns.d.ts.map +1 -0
- package/dist/web.cjs.map +1 -1
- package/dist/web.d.ts +3 -5
- package/dist/web.d.ts.map +1 -0
- package/llms.txt +44 -38
- package/package.json +25 -13
- package/dist/index.d.cts +0 -1448
- package/dist/web.d.cts +0 -6
package/dist/index.js
CHANGED
|
@@ -2,6 +2,11 @@ import {
|
|
|
2
2
|
cn
|
|
3
3
|
} from "./chunk-2LOJMH6W.js";
|
|
4
4
|
|
|
5
|
+
// src/price-breaks.ts
|
|
6
|
+
function hasPriceBreaks(libraryPriceData) {
|
|
7
|
+
return libraryPriceData !== null && Array.isArray(libraryPriceData.breaks);
|
|
8
|
+
}
|
|
9
|
+
|
|
5
10
|
// src/cache-config.ts
|
|
6
11
|
var CACHE_CONFIG = {
|
|
7
12
|
STATIC: {
|
|
@@ -44,29 +49,99 @@ function formatPrice(price, locale = "en-US", currency = "USD") {
|
|
|
44
49
|
}).format(price);
|
|
45
50
|
}
|
|
46
51
|
|
|
52
|
+
// src/rules.ts
|
|
53
|
+
function paymentStatusOf(paidInFull, hasAmounts, amountPaid) {
|
|
54
|
+
if (paidInFull) return "Paid";
|
|
55
|
+
if (hasAmounts && amountPaid > 0) return "Partially Paid";
|
|
56
|
+
return "Unpaid";
|
|
57
|
+
}
|
|
58
|
+
function isLowStockOf(quantity, threshold) {
|
|
59
|
+
return quantity > 0 && threshold > 0 && quantity <= threshold;
|
|
60
|
+
}
|
|
61
|
+
function allYesFrom(flags, i) {
|
|
62
|
+
if (i >= flags.length) return true;
|
|
63
|
+
return flags[i] === "Y" && allYesFrom(flags, i + 1);
|
|
64
|
+
}
|
|
65
|
+
function isDiscontinuedOf(flags) {
|
|
66
|
+
return flags.length > 0 && allYesFrom(flags, 0);
|
|
67
|
+
}
|
|
68
|
+
function categorySortBy(prefix, sortBy) {
|
|
69
|
+
return prefix !== "" && sortBy !== "" ? prefix + sortBy : sortBy;
|
|
70
|
+
}
|
|
71
|
+
function searchSortBy(sortBy) {
|
|
72
|
+
return sortBy !== "" ? sortBy : void 0;
|
|
73
|
+
}
|
|
74
|
+
function pageOffset(page, limit) {
|
|
75
|
+
return page * limit;
|
|
76
|
+
}
|
|
77
|
+
function unwrapMessage(error) {
|
|
78
|
+
return error !== "" ? error : "Action failed";
|
|
79
|
+
}
|
|
80
|
+
function shippingLeadOf(days) {
|
|
81
|
+
if (days === "1-2") return { from: 1, to: 4 };
|
|
82
|
+
if (days === "2") return { from: 4, to: 0 };
|
|
83
|
+
if (days === "2-3") return { from: 2, to: 5 };
|
|
84
|
+
if (days === "3") return { from: 5, to: 0 };
|
|
85
|
+
if (days === "3-4") return { from: 3, to: 6 };
|
|
86
|
+
if (days === "4") return { from: 6, to: 0 };
|
|
87
|
+
if (days === "5") return { from: 7, to: 0 };
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
function isBusinessDayName(dayName) {
|
|
91
|
+
return dayName !== "Sunday" && dayName !== "Saturday";
|
|
92
|
+
}
|
|
93
|
+
function availabilityOf(isInStock, isDiscontinued) {
|
|
94
|
+
if (isInStock) return "InStock";
|
|
95
|
+
if (isDiscontinued) return "OutOfStock";
|
|
96
|
+
return "BackOrder";
|
|
97
|
+
}
|
|
98
|
+
function takerOf(taker) {
|
|
99
|
+
return taker ?? "ESTORE";
|
|
100
|
+
}
|
|
101
|
+
function addressDifferentOf(line1Same, citySame, stateSame, zipSame) {
|
|
102
|
+
return !line1Same || !citySame || !stateSame || !zipSame;
|
|
103
|
+
}
|
|
104
|
+
|
|
47
105
|
// src/address-comparison.ts
|
|
48
106
|
function isAddressDifferent(userAddress, smartyAddress) {
|
|
49
|
-
return
|
|
107
|
+
return addressDifferentOf(
|
|
108
|
+
(smartyAddress.deliveryLine1 ?? "").toLowerCase() === userAddress.address1.toLowerCase(),
|
|
109
|
+
(smartyAddress.cityName ?? "").toLowerCase() === userAddress.city.toLowerCase(),
|
|
110
|
+
smartyAddress.stateAbbreviation === userAddress.state,
|
|
111
|
+
smartyAddress.zipCode === userAddress.postalCode
|
|
112
|
+
);
|
|
50
113
|
}
|
|
51
114
|
|
|
52
115
|
// src/get-payment-status.ts
|
|
53
116
|
function getPaymentStatus(invoice) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
117
|
+
return paymentStatusOf(
|
|
118
|
+
invoice.paidInFullFlag === "Y",
|
|
119
|
+
invoice.amountPaid != null && invoice.totalAmount != null,
|
|
120
|
+
invoice.amountPaid ?? 0
|
|
121
|
+
);
|
|
58
122
|
}
|
|
59
123
|
|
|
60
124
|
// src/transform-ship-to-address.ts
|
|
61
125
|
function str(value) {
|
|
62
126
|
return String(value).trim();
|
|
63
127
|
}
|
|
64
|
-
function
|
|
128
|
+
function firstPresent(raw, keys) {
|
|
65
129
|
for (const k of keys) {
|
|
66
|
-
if (raw[k] != null) return
|
|
130
|
+
if (raw[k] != null) return raw[k];
|
|
67
131
|
}
|
|
68
132
|
return "";
|
|
69
133
|
}
|
|
134
|
+
function pick(raw, keys) {
|
|
135
|
+
return str(firstPresent(raw, keys));
|
|
136
|
+
}
|
|
137
|
+
var PHYS_MARKERS = [
|
|
138
|
+
"physAddress1",
|
|
139
|
+
"phys_address1",
|
|
140
|
+
"physCity",
|
|
141
|
+
"phys_city",
|
|
142
|
+
"physState",
|
|
143
|
+
"phys_state"
|
|
144
|
+
];
|
|
70
145
|
var PHYS_FIELDS = {
|
|
71
146
|
address1: ["physAddress1", "phys_address1"],
|
|
72
147
|
address2: ["physAddress2", "phys_address2"],
|
|
@@ -84,19 +159,19 @@ var MAIL_FIELDS = {
|
|
|
84
159
|
country: ["mailCountry", "mail_country", "country"]
|
|
85
160
|
};
|
|
86
161
|
function transformShipToAddress(raw) {
|
|
87
|
-
const isPhys =
|
|
162
|
+
const isPhys = PHYS_MARKERS.some((k) => raw[k] != null);
|
|
88
163
|
const f = isPhys ? PHYS_FIELDS : MAIL_FIELDS;
|
|
89
164
|
const address = {
|
|
90
|
-
shipToId: raw["shipToId"
|
|
91
|
-
name:
|
|
92
|
-
address1: pick(raw,
|
|
93
|
-
city: pick(raw,
|
|
94
|
-
state: pick(raw,
|
|
95
|
-
zip: pick(raw,
|
|
165
|
+
shipToId: firstPresent(raw, ["shipToId", "ship_to_id", "id"]),
|
|
166
|
+
name: pick(raw, ["shipToName", "ship_to_name", "name"]),
|
|
167
|
+
address1: pick(raw, f.address1),
|
|
168
|
+
city: pick(raw, f.city),
|
|
169
|
+
state: pick(raw, f.state),
|
|
170
|
+
zip: pick(raw, f.zip)
|
|
96
171
|
};
|
|
97
|
-
const address2 = pick(raw,
|
|
172
|
+
const address2 = pick(raw, f.address2);
|
|
98
173
|
if (address2) address.address2 = address2;
|
|
99
|
-
const country = pick(raw,
|
|
174
|
+
const country = pick(raw, f.country);
|
|
100
175
|
if (country) address.country = country;
|
|
101
176
|
return address;
|
|
102
177
|
}
|
|
@@ -109,7 +184,7 @@ function buildCheckoutPayload(input) {
|
|
|
109
184
|
sales_location_id: input.salesLocationId,
|
|
110
185
|
user_id: input.userId,
|
|
111
186
|
user_email: input.userEmail,
|
|
112
|
-
taker: input.taker
|
|
187
|
+
taker: takerOf(input.taker)
|
|
113
188
|
};
|
|
114
189
|
if (input.poNumber != null) oe_hdr.customer_po_no = input.poNumber;
|
|
115
190
|
if (input.shipToId != null) oe_hdr.ship_to_id = input.shipToId;
|
|
@@ -127,47 +202,95 @@ function buildCheckoutPayload(input) {
|
|
|
127
202
|
return { oe_hdr, oe_line };
|
|
128
203
|
}
|
|
129
204
|
|
|
130
|
-
// src/
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
205
|
+
// src/money.ts
|
|
206
|
+
var MONEY_DECIMALS = 8;
|
|
207
|
+
var MAX_SHIFTED = 2 ** 51;
|
|
208
|
+
function shiftDecimal(value, places) {
|
|
209
|
+
const [mantissa, exponent = "0"] = String(value).split("e");
|
|
210
|
+
return Number(`${mantissa}e${Number(exponent) + places}`);
|
|
211
|
+
}
|
|
212
|
+
function roundHalfAway(value, decimals) {
|
|
213
|
+
if (!Number.isInteger(decimals) || decimals < 0) {
|
|
134
214
|
throw new RangeError(
|
|
135
|
-
`
|
|
215
|
+
`roundHalfAway: decimals must be a non-negative integer, got ${String(decimals)}`
|
|
136
216
|
);
|
|
137
217
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
218
|
+
if (!Number.isFinite(value)) return value;
|
|
219
|
+
const shifted = shiftDecimal(Math.abs(value), decimals);
|
|
220
|
+
if (!(shifted < MAX_SHIFTED)) return value;
|
|
221
|
+
const rounded = Math.round(shifted);
|
|
222
|
+
if (rounded === 0) return 0;
|
|
223
|
+
return Math.sign(value) * shiftDecimal(rounded, -decimals);
|
|
224
|
+
}
|
|
225
|
+
function cleanMoney(value) {
|
|
226
|
+
return roundHalfAway(value, MONEY_DECIMALS);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// src/price-outcome.ts
|
|
230
|
+
function priceOutcome(quantityOk, hasPrice, priceFinite, unitPrice) {
|
|
231
|
+
if (!quantityOk) return "badQuantity";
|
|
232
|
+
if (!hasPrice) return "loading";
|
|
233
|
+
if (!priceFinite || unitPrice < 0) return "badPrice";
|
|
234
|
+
if (unitPrice === 0) return "callForPrice";
|
|
235
|
+
return "priced";
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// src/derive-price.ts
|
|
239
|
+
function outcomeError(outcome, quantity, unitPrice) {
|
|
240
|
+
if (outcome === "badQuantity") {
|
|
241
|
+
return new RangeError(
|
|
242
|
+
`derivePrice: quantity must be a non-negative finite number, got ${String(quantity)}`
|
|
243
|
+
);
|
|
141
244
|
}
|
|
142
|
-
if (
|
|
143
|
-
|
|
245
|
+
if (outcome === "badPrice") {
|
|
246
|
+
return new RangeError(
|
|
144
247
|
`derivePrice: unitPrice must be a non-negative finite number, got ${String(unitPrice)}`
|
|
145
248
|
);
|
|
146
249
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
return
|
|
250
|
+
return null;
|
|
251
|
+
}
|
|
252
|
+
function outcomeFor(priceData, unitPrice, quantity) {
|
|
253
|
+
const hasPrice = priceData != null && unitPrice != null;
|
|
254
|
+
return priceOutcome(
|
|
255
|
+
Number.isFinite(quantity) && quantity >= 0,
|
|
256
|
+
hasPrice,
|
|
257
|
+
Number.isFinite(unitPrice),
|
|
258
|
+
// Read only when hasPrice is true; the 0 is never compared then.
|
|
259
|
+
unitPrice ?? 0
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
function derivePrice(input) {
|
|
263
|
+
const { priceData, quantity = 1 } = input;
|
|
264
|
+
const unitPrice = priceData?.unitPrice;
|
|
265
|
+
const outcome = outcomeFor(priceData, unitPrice, quantity);
|
|
266
|
+
const error = outcomeError(outcome, quantity, unitPrice);
|
|
267
|
+
if (error) throw error;
|
|
268
|
+
if (outcome === "loading") return { state: "loading" };
|
|
269
|
+
const record = priceData;
|
|
270
|
+
const price = unitPrice;
|
|
271
|
+
const unitOfMeasure = record.item?.unitOfMeasure ?? "";
|
|
272
|
+
if (outcome === "callForPrice") return { state: "callForPrice", unitOfMeasure };
|
|
273
|
+
return { state: "priced", unitPrice: price, total: cleanMoney(price * quantity), unitOfMeasure };
|
|
152
274
|
}
|
|
153
275
|
|
|
154
276
|
// src/resolve-stock.ts
|
|
277
|
+
function summaryQuantity(companySummary, companyKey) {
|
|
278
|
+
if (companyKey && companyKey in companySummary) {
|
|
279
|
+
return companySummary[companyKey] ?? 0;
|
|
280
|
+
}
|
|
281
|
+
return Object.values(companySummary).reduce((sum, val) => sum + val, 0);
|
|
282
|
+
}
|
|
283
|
+
function allDiscontinued(stockData) {
|
|
284
|
+
return isDiscontinuedOf(stockData.map((d) => d.discontinued));
|
|
285
|
+
}
|
|
155
286
|
function resolveStock(input) {
|
|
156
287
|
const { stock, companyKey, round = false, lowStockThreshold = 0, showQuantity = false } = input;
|
|
157
288
|
if (!stock) return null;
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
if (companyKey && companyKey in companySummary) {
|
|
161
|
-
qty = companySummary[companyKey] ?? 0;
|
|
162
|
-
} else {
|
|
163
|
-
qty = Object.values(companySummary).reduce((sum, val) => sum + val, 0);
|
|
164
|
-
}
|
|
165
|
-
if (round) {
|
|
166
|
-
qty = Math.round(qty);
|
|
167
|
-
}
|
|
289
|
+
const summed = summaryQuantity(stock.companySummary, companyKey);
|
|
290
|
+
const qty = round ? Math.round(summed) : summed;
|
|
168
291
|
const isInStock = qty > 0;
|
|
169
|
-
const isLowStock =
|
|
170
|
-
const isDiscontinued = stock.stockData
|
|
292
|
+
const isLowStock = isLowStockOf(qty, lowStockThreshold);
|
|
293
|
+
const isDiscontinued = allDiscontinued(stock.stockData);
|
|
171
294
|
return {
|
|
172
295
|
quantity: qty,
|
|
173
296
|
isInStock,
|
|
@@ -179,13 +302,49 @@ function resolveStock(input) {
|
|
|
179
302
|
|
|
180
303
|
// src/schema-availability.ts
|
|
181
304
|
function getSchemaAvailability(resolved) {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
305
|
+
return SCHEMA_URLS[availabilityOf(!!resolved?.isInStock, !!resolved?.isDiscontinued)];
|
|
306
|
+
}
|
|
307
|
+
var SCHEMA_URLS = {
|
|
308
|
+
InStock: "https://schema.org/InStock",
|
|
309
|
+
OutOfStock: "https://schema.org/OutOfStock",
|
|
310
|
+
BackOrder: "https://schema.org/BackOrder"
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
// src/json-ld-rules.ts
|
|
314
|
+
function breadcrumbPosition(i) {
|
|
315
|
+
return i + 1;
|
|
316
|
+
}
|
|
317
|
+
function gtinFieldOf(upper) {
|
|
318
|
+
if (upper === "UPC") return "gtin12";
|
|
319
|
+
if (upper === "EAN") return "gtin13";
|
|
320
|
+
return "gtin";
|
|
321
|
+
}
|
|
322
|
+
function isSuppressedOf(deleteFlag, onlineCd, statusCd) {
|
|
323
|
+
return deleteFlag === "Y" || onlineCd === 0 || statusCd === 0;
|
|
324
|
+
}
|
|
325
|
+
function productNameOf(suppressed, name, unitPrice) {
|
|
326
|
+
if (suppressed) return null;
|
|
327
|
+
if (name === "" || unitPrice <= 0) return null;
|
|
328
|
+
return name;
|
|
329
|
+
}
|
|
330
|
+
function firstNonBlankOf(a, b) {
|
|
331
|
+
if (a !== "") return a;
|
|
332
|
+
if (b !== "") return b;
|
|
333
|
+
return void 0;
|
|
334
|
+
}
|
|
335
|
+
function primarySupplierFrom(flags, i) {
|
|
336
|
+
if (i >= flags.length) return -1;
|
|
337
|
+
if (flags[i] === "Y") return i;
|
|
338
|
+
return primarySupplierFrom(flags, i + 1);
|
|
339
|
+
}
|
|
340
|
+
function supplierIndexOf(flags) {
|
|
341
|
+
const primary = primarySupplierFrom(flags, 0);
|
|
342
|
+
if (primary >= 0) return primary;
|
|
343
|
+
return flags.length > 0 ? 0 : -1;
|
|
344
|
+
}
|
|
345
|
+
function offerUrlOf(siteUrl, itemPath, itemId) {
|
|
346
|
+
if (siteUrl === "") return void 0;
|
|
347
|
+
return siteUrl + itemPath + "/" + itemId;
|
|
189
348
|
}
|
|
190
349
|
|
|
191
350
|
// src/json-ld.ts
|
|
@@ -195,21 +354,17 @@ function generateBreadcrumbJsonLd(items) {
|
|
|
195
354
|
"@type": "BreadcrumbList",
|
|
196
355
|
itemListElement: items.map((item, index) => ({
|
|
197
356
|
"@type": "ListItem",
|
|
198
|
-
position: index
|
|
357
|
+
position: breadcrumbPosition(index),
|
|
199
358
|
name: item.name,
|
|
200
359
|
item: item.url
|
|
201
360
|
}))
|
|
202
361
|
};
|
|
203
362
|
}
|
|
204
363
|
function getGtinField(upcOrEan) {
|
|
205
|
-
|
|
206
|
-
if (val === "UPC") return "gtin12";
|
|
207
|
-
if (val === "EAN") return "gtin13";
|
|
208
|
-
return "gtin";
|
|
364
|
+
return gtinFieldOf(upcOrEan?.toUpperCase() ?? "");
|
|
209
365
|
}
|
|
210
366
|
function getPrimarySupplierPartNo(suppliers) {
|
|
211
|
-
const
|
|
212
|
-
const supplier = primary ?? suppliers[0];
|
|
367
|
+
const supplier = suppliers[supplierIndexOf(suppliers.map((s) => s.primarySupplierFlag ?? ""))];
|
|
213
368
|
const partNo = supplier?.supplierPartNo?.trim();
|
|
214
369
|
return partNo || void 0;
|
|
215
370
|
}
|
|
@@ -234,14 +389,12 @@ function omitEmpty(obj) {
|
|
|
234
389
|
return result;
|
|
235
390
|
}
|
|
236
391
|
function resolveBrand(doc) {
|
|
237
|
-
const name = doc.brandName?.trim()
|
|
238
|
-
if (
|
|
392
|
+
const name = firstNonBlankOf(doc.brandName?.trim() ?? "", doc.parkerProductCd?.trim() ?? "");
|
|
393
|
+
if (name === void 0) return void 0;
|
|
239
394
|
return { "@type": "Brand", name };
|
|
240
395
|
}
|
|
241
396
|
function resolveDescription(doc) {
|
|
242
|
-
|
|
243
|
-
if (doc.extendedDesc?.trim()) return doc.extendedDesc.trim();
|
|
244
|
-
return void 0;
|
|
397
|
+
return firstNonBlankOf(doc.displayDesc?.trim() ?? "", doc.extendedDesc?.trim() ?? "");
|
|
245
398
|
}
|
|
246
399
|
function resolveImages(doc, transform2) {
|
|
247
400
|
if (doc.images.length === 0) return void 0;
|
|
@@ -255,7 +408,7 @@ function buildOffers(doc, options) {
|
|
|
255
408
|
const availability = getSchemaAvailability(resolved);
|
|
256
409
|
const validUntil = /* @__PURE__ */ new Date();
|
|
257
410
|
validUntil.setDate(validUntil.getDate() + priceValidDays);
|
|
258
|
-
const url = options.siteUrl
|
|
411
|
+
const url = offerUrlOf(options.siteUrl ?? "", itemPath, doc.itemId);
|
|
259
412
|
const eligibleQuantity = doc.defaultSellingUnit?.trim() ? { "@type": "QuantitativeValue", unitCode: doc.defaultSellingUnit.trim() } : void 0;
|
|
260
413
|
const seller = options.seller ? { "@type": "Organization", name: options.seller.name, url: options.seller.url } : void 0;
|
|
261
414
|
return {
|
|
@@ -272,22 +425,25 @@ function buildOffers(doc, options) {
|
|
|
272
425
|
shippingDetails: options.shippingDetails
|
|
273
426
|
};
|
|
274
427
|
}
|
|
275
|
-
function
|
|
276
|
-
|
|
428
|
+
function productName(doc, unitPrice) {
|
|
429
|
+
const suppressed = isSuppressedOf(doc.deleteFlag, doc.onlineCd, doc.statusCd);
|
|
430
|
+
return productNameOf(suppressed, (doc.itemDesc || "").trim(), unitPrice);
|
|
431
|
+
}
|
|
432
|
+
function buildAggregateRating(rating) {
|
|
433
|
+
if (!rating) return void 0;
|
|
434
|
+
return {
|
|
435
|
+
"@type": "AggregateRating",
|
|
436
|
+
ratingValue: rating.ratingValue,
|
|
437
|
+
reviewCount: rating.reviewCount
|
|
438
|
+
};
|
|
277
439
|
}
|
|
278
440
|
function generateProductJsonLd(doc, options) {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
if (!name) return null;
|
|
282
|
-
if (options.unitPrice <= 0) return null;
|
|
441
|
+
const name = productName(doc, options.unitPrice);
|
|
442
|
+
if (name === null) return null;
|
|
283
443
|
const weightUnit = options.weightUnit ?? "LBR";
|
|
284
444
|
const dimensionUnit = options.dimensionUnit ?? "INH";
|
|
285
445
|
const gtinId = doc.upcOrEanId?.trim() || void 0;
|
|
286
|
-
const aggregateRating = options.aggregateRating
|
|
287
|
-
"@type": "AggregateRating",
|
|
288
|
-
ratingValue: options.aggregateRating.ratingValue,
|
|
289
|
-
reviewCount: options.aggregateRating.reviewCount
|
|
290
|
-
} : void 0;
|
|
446
|
+
const aggregateRating = buildAggregateRating(options.aggregateRating);
|
|
291
447
|
const product = {
|
|
292
448
|
"@context": "https://schema.org",
|
|
293
449
|
"@type": "Product",
|
|
@@ -311,23 +467,99 @@ function generateProductJsonLd(doc, options) {
|
|
|
311
467
|
|
|
312
468
|
// src/result.ts
|
|
313
469
|
function unwrap(result) {
|
|
314
|
-
if (!result.ok) throw new Error(result.error
|
|
470
|
+
if (!result.ok) throw new Error(unwrapMessage(result.error));
|
|
315
471
|
return result.data;
|
|
316
472
|
}
|
|
317
473
|
function unwrapOr(result) {
|
|
318
474
|
return result.ok ? result.data ?? null : null;
|
|
319
475
|
}
|
|
320
476
|
|
|
477
|
+
// ../utils/src/strings.ts
|
|
478
|
+
function codeAt(s, i) {
|
|
479
|
+
return i >= 0 && i < s.length ? s.charCodeAt(i) : -1;
|
|
480
|
+
}
|
|
481
|
+
function indexOfCode(s, code, from) {
|
|
482
|
+
const c = codeAt(s, from);
|
|
483
|
+
if (c === code) return from;
|
|
484
|
+
if (c === -1) return -1;
|
|
485
|
+
return indexOfCode(s, code, from + 1);
|
|
486
|
+
}
|
|
487
|
+
function startsWithAt(s, x, pos) {
|
|
488
|
+
const at = Math.min(pos, s.length);
|
|
489
|
+
return s.slice(at, Math.min(at + x.length, s.length)) === x;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
// ../utils/src/lists.ts
|
|
493
|
+
function joinFrom(xs, sep, i) {
|
|
494
|
+
if (i >= xs.length) return "";
|
|
495
|
+
if (i === xs.length - 1) return xs[i];
|
|
496
|
+
return xs[i] + sep + joinFrom(xs, sep, i + 1);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
// src/image-rules.ts
|
|
500
|
+
function transformKeyOf(field) {
|
|
501
|
+
if (field === "width") return "w";
|
|
502
|
+
if (field === "height") return "h";
|
|
503
|
+
if (field === "format") return "f";
|
|
504
|
+
if (field === "quality") return "q";
|
|
505
|
+
if (field === "fit") return "fit";
|
|
506
|
+
return "";
|
|
507
|
+
}
|
|
508
|
+
function transformValueOf(field, value) {
|
|
509
|
+
if (field === "format" && value === "jpg") return "jpeg";
|
|
510
|
+
return value;
|
|
511
|
+
}
|
|
512
|
+
function transformPartsFrom(fields, present, texts, i) {
|
|
513
|
+
if (i >= fields.length) return [];
|
|
514
|
+
const field = fields[i];
|
|
515
|
+
const key = transformKeyOf(field);
|
|
516
|
+
const rest = transformPartsFrom(fields, present, texts, i + 1);
|
|
517
|
+
if (present[i] && key !== "") {
|
|
518
|
+
return [key + "_" + transformValueOf(field, texts[i]), ...rest];
|
|
519
|
+
}
|
|
520
|
+
return rest;
|
|
521
|
+
}
|
|
522
|
+
function serializedTransforms(fields, present, texts) {
|
|
523
|
+
return joinFrom(transformPartsFrom(fields, present, texts, 0), ",", 0);
|
|
524
|
+
}
|
|
525
|
+
function isExternal(path) {
|
|
526
|
+
return startsWithAt(path, "http", 0);
|
|
527
|
+
}
|
|
528
|
+
function stripFirstPrefixFrom(path, prefixes, i) {
|
|
529
|
+
if (i >= prefixes.length) return path;
|
|
530
|
+
const prefix = prefixes[i];
|
|
531
|
+
if (startsWithAt(path, prefix, 0)) return path.slice(prefix.length);
|
|
532
|
+
return stripFirstPrefixFrom(path, prefixes, i + 1);
|
|
533
|
+
}
|
|
534
|
+
function stripLeadingSlashes(s) {
|
|
535
|
+
if (codeAt(s, 0) !== 47) return s;
|
|
536
|
+
return stripLeadingSlashes(s.slice(1));
|
|
537
|
+
}
|
|
538
|
+
function normalizedPath(raw, prefixes, defaultPath) {
|
|
539
|
+
if (isExternal(raw)) return raw;
|
|
540
|
+
const cleaned = stripLeadingSlashes(stripFirstPrefixFrom(raw, prefixes, 0));
|
|
541
|
+
if (defaultPath !== "" && indexOfCode(cleaned, 47, 0) < 0) return defaultPath + "/" + cleaned;
|
|
542
|
+
return cleaned;
|
|
543
|
+
}
|
|
544
|
+
function cdnUrlOf(clientDomain, serialized, normalized) {
|
|
545
|
+
const segment = serialized !== "" ? "/" + serialized : "";
|
|
546
|
+
return "https://agr.media/" + clientDomain + "/images" + segment + "/" + normalized;
|
|
547
|
+
}
|
|
548
|
+
function defaultImageUrlOf(clientDomain, fallback, prefixes, defaultPath) {
|
|
549
|
+
if (fallback === "") return "";
|
|
550
|
+
const normalized = normalizedPath(fallback, prefixes, defaultPath);
|
|
551
|
+
if (isExternal(normalized)) return normalized;
|
|
552
|
+
return "https://agr.media/" + clientDomain + "/images/" + normalized;
|
|
553
|
+
}
|
|
554
|
+
function imageUrlOf(clientDomain, path, serialized, fallback, prefixes, defaultPath) {
|
|
555
|
+
if (path === "") return defaultImageUrlOf(clientDomain, fallback, prefixes, defaultPath);
|
|
556
|
+
const normalized = normalizedPath(path, prefixes, defaultPath);
|
|
557
|
+
if (isExternal(normalized)) return normalized;
|
|
558
|
+
return cdnUrlOf(clientDomain, serialized, normalized);
|
|
559
|
+
}
|
|
560
|
+
|
|
321
561
|
// src/image.ts
|
|
322
562
|
var BLUR_DATA_URL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mN88P/BfwYABQoBfqVKzQAAAABJRU5ErkJggg==";
|
|
323
|
-
var CDN_BASE = "https://agr.media";
|
|
324
|
-
var TRANSFORM_KEY_MAP = {
|
|
325
|
-
width: "w",
|
|
326
|
-
height: "h",
|
|
327
|
-
format: "f",
|
|
328
|
-
quality: "q",
|
|
329
|
-
fit: "fit"
|
|
330
|
-
};
|
|
331
563
|
var DEFAULT_STRIP_PREFIXES = ["/images", "images"];
|
|
332
564
|
function createImageConfig(clientDomain, opts) {
|
|
333
565
|
return Object.freeze({
|
|
@@ -339,54 +571,43 @@ function createImageConfig(clientDomain, opts) {
|
|
|
339
571
|
});
|
|
340
572
|
}
|
|
341
573
|
function serializeTransforms(transforms) {
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
parts.push(`${prefix}_${v2}`);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
return parts.join(",");
|
|
574
|
+
const entries = Object.entries(transforms);
|
|
575
|
+
return serializedTransforms(
|
|
576
|
+
entries.map(([key]) => key),
|
|
577
|
+
entries.map(([, value]) => value !== void 0),
|
|
578
|
+
entries.map(([, value]) => String(value))
|
|
579
|
+
);
|
|
352
580
|
}
|
|
353
581
|
function normalizePath(config, raw) {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
if (cleaned.startsWith(prefix)) {
|
|
359
|
-
cleaned = cleaned.slice(prefix.length);
|
|
360
|
-
break;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
cleaned = cleaned.replace(/^\/+/, "");
|
|
364
|
-
if (config.defaultPath && !cleaned.includes("/")) {
|
|
365
|
-
cleaned = `${config.defaultPath}/${cleaned}`;
|
|
366
|
-
}
|
|
367
|
-
return cleaned;
|
|
582
|
+
return normalizedPath(raw, prefixesOf(config), config.defaultPath ?? "");
|
|
583
|
+
}
|
|
584
|
+
function prefixesOf(config) {
|
|
585
|
+
return config.stripPrefixes ?? DEFAULT_STRIP_PREFIXES;
|
|
368
586
|
}
|
|
369
587
|
function getImageUrl(config, imagePath, transforms, options) {
|
|
370
|
-
const resolvedPath = imagePath?.trim();
|
|
371
|
-
if (!resolvedPath) {
|
|
372
|
-
return getDefaultImageUrl(config, options);
|
|
373
|
-
}
|
|
374
|
-
const normalized = normalizePath(config, resolvedPath);
|
|
375
|
-
if (normalized.startsWith("http")) return normalized;
|
|
376
588
|
const merged = {
|
|
377
589
|
...config.defaultTransforms,
|
|
378
590
|
...transforms
|
|
379
591
|
};
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
592
|
+
return imageUrlOf(
|
|
593
|
+
config.clientDomain,
|
|
594
|
+
imagePath?.trim() ?? "",
|
|
595
|
+
serializeTransforms(merged),
|
|
596
|
+
fallbackOf(config, options),
|
|
597
|
+
prefixesOf(config),
|
|
598
|
+
config.defaultPath ?? ""
|
|
599
|
+
);
|
|
383
600
|
}
|
|
384
601
|
function getDefaultImageUrl(config, options) {
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
602
|
+
return defaultImageUrlOf(
|
|
603
|
+
config.clientDomain,
|
|
604
|
+
fallbackOf(config, options),
|
|
605
|
+
prefixesOf(config),
|
|
606
|
+
config.defaultPath ?? ""
|
|
607
|
+
);
|
|
608
|
+
}
|
|
609
|
+
function fallbackOf(config, options) {
|
|
610
|
+
return options?.defaultImage ?? config.defaultImage ?? "";
|
|
390
611
|
}
|
|
391
612
|
function getImageSrcSet(config, imagePath, widths, transforms) {
|
|
392
613
|
return widths.map((w) => {
|
|
@@ -448,20 +669,20 @@ var US_TERRITORIES = states.filter((s) => s.territory);
|
|
|
448
669
|
|
|
449
670
|
// src/address-schemas.ts
|
|
450
671
|
var validStateCodes = US_STATES.map((state) => state.code);
|
|
672
|
+
function personName(requiredMessage, invalidMessage) {
|
|
673
|
+
return v.pipe(
|
|
674
|
+
v.string(),
|
|
675
|
+
v.minLength(1, requiredMessage),
|
|
676
|
+
v.regex(VALIDATION_PATTERNS.nameFormat, invalidMessage),
|
|
677
|
+
v.regex(VALIDATION_PATTERNS.nameNoNumbers, invalidMessage)
|
|
678
|
+
);
|
|
679
|
+
}
|
|
680
|
+
var firstName = personName("First name is required", "Invalid first name");
|
|
681
|
+
var lastName = personName("Last name is required", "Invalid last name");
|
|
451
682
|
var ShippingAddressSchema = v.object({
|
|
452
683
|
companyName: v.optional(v.string()),
|
|
453
|
-
firstName
|
|
454
|
-
|
|
455
|
-
v.minLength(1, "First name is required"),
|
|
456
|
-
v.regex(VALIDATION_PATTERNS.nameFormat, "Invalid first name"),
|
|
457
|
-
v.regex(VALIDATION_PATTERNS.nameNoNumbers, "Invalid first name")
|
|
458
|
-
),
|
|
459
|
-
lastName: v.pipe(
|
|
460
|
-
v.string(),
|
|
461
|
-
v.minLength(1, "Last name is required"),
|
|
462
|
-
v.regex(VALIDATION_PATTERNS.nameFormat, "Invalid last name"),
|
|
463
|
-
v.regex(VALIDATION_PATTERNS.nameNoNumbers, "Invalid last name")
|
|
464
|
-
),
|
|
684
|
+
firstName,
|
|
685
|
+
lastName,
|
|
465
686
|
address1: v.pipe(
|
|
466
687
|
v.string(),
|
|
467
688
|
v.minLength(1, "Address 1 is required"),
|
|
@@ -516,18 +737,8 @@ var ShippingAddressSchema = v.object({
|
|
|
516
737
|
});
|
|
517
738
|
var BillingAddressSchema = v.object({
|
|
518
739
|
poNumber: v.optional(v.string()),
|
|
519
|
-
firstName
|
|
520
|
-
|
|
521
|
-
v.minLength(1, "First name is required"),
|
|
522
|
-
v.regex(VALIDATION_PATTERNS.nameFormat, "Invalid first name"),
|
|
523
|
-
v.regex(VALIDATION_PATTERNS.nameNoNumbers, "Invalid first name")
|
|
524
|
-
),
|
|
525
|
-
lastName: v.pipe(
|
|
526
|
-
v.string(),
|
|
527
|
-
v.minLength(1, "Last name is required"),
|
|
528
|
-
v.regex(VALIDATION_PATTERNS.nameFormat, "Invalid last name"),
|
|
529
|
-
v.regex(VALIDATION_PATTERNS.nameNoNumbers, "Invalid last name")
|
|
530
|
-
),
|
|
740
|
+
firstName,
|
|
741
|
+
lastName,
|
|
531
742
|
address1: v.pipe(
|
|
532
743
|
v.string(),
|
|
533
744
|
v.minLength(1, "Address 1 is required"),
|
|
@@ -557,24 +768,15 @@ function getBusinessDay(businessDaysFromNow) {
|
|
|
557
768
|
const date = /* @__PURE__ */ new Date();
|
|
558
769
|
date.setDate(date.getDate() + i);
|
|
559
770
|
const dayName = date.toLocaleDateString("en-US", { weekday: "long" });
|
|
560
|
-
if (dayName
|
|
771
|
+
if (isBusinessDayName(dayName)) {
|
|
561
772
|
businessDays.push(date.toLocaleDateString("en-US", DATE_FORMAT_OPTIONS));
|
|
562
773
|
}
|
|
563
774
|
i++;
|
|
564
775
|
}
|
|
565
776
|
return businessDays[businessDays.length - 1] || "";
|
|
566
777
|
}
|
|
567
|
-
var SHIPPING_LEAD_CONFIG = {
|
|
568
|
-
"1-2": { from: 1, to: 4 },
|
|
569
|
-
"2": { from: 4 },
|
|
570
|
-
"2-3": { from: 2, to: 5 },
|
|
571
|
-
"3": { from: 5 },
|
|
572
|
-
"3-4": { from: 3, to: 6 },
|
|
573
|
-
"4": { from: 6 },
|
|
574
|
-
"5": { from: 7 }
|
|
575
|
-
};
|
|
576
778
|
function getShippingLeadDate(days) {
|
|
577
|
-
const config =
|
|
779
|
+
const config = shippingLeadOf(days);
|
|
578
780
|
if (!config) return "";
|
|
579
781
|
const fromDate = getBusinessDay(config.from);
|
|
580
782
|
if (config.to) {
|
|
@@ -587,10 +789,7 @@ function getShippingLeadDate(days) {
|
|
|
587
789
|
// src/transforms.ts
|
|
588
790
|
function serializeCategoryFilters(filters, options) {
|
|
589
791
|
const { sortByPrefix, includeStock = true } = options ?? {};
|
|
590
|
-
|
|
591
|
-
if (sortByPrefix && sortBy) {
|
|
592
|
-
sortBy = `${sortByPrefix}${sortBy}`;
|
|
593
|
-
}
|
|
792
|
+
const sortBy = filters.sortBy ? categorySortBy(sortByPrefix ?? "", filters.sortBy) : filters.sortBy;
|
|
594
793
|
const params = {
|
|
595
794
|
filters: JSON.stringify(filters.filters),
|
|
596
795
|
limit: filters.limit,
|
|
@@ -610,7 +809,7 @@ function serializeSearchParams(filters, options) {
|
|
|
610
809
|
searchType: "query",
|
|
611
810
|
size: filters.limit,
|
|
612
811
|
from: filters.offset,
|
|
613
|
-
sortBy: filters.sortBy
|
|
812
|
+
sortBy: searchSortBy(filters.sortBy),
|
|
614
813
|
classId5List: categoryUid ? String(categoryUid) : void 0,
|
|
615
814
|
filters: filters.filters?.length ? JSON.stringify(filters.filters) : void 0,
|
|
616
815
|
sourceFieldsList: sourceFields
|
|
@@ -619,7 +818,7 @@ function serializeSearchParams(filters, options) {
|
|
|
619
818
|
function paginateOffset(filters, pageParam) {
|
|
620
819
|
return {
|
|
621
820
|
...filters,
|
|
622
|
-
offset: pageParam
|
|
821
|
+
offset: pageOffset(pageParam, filters.limit)
|
|
623
822
|
};
|
|
624
823
|
}
|
|
625
824
|
|
|
@@ -637,7 +836,7 @@ function trackAddToCart({
|
|
|
637
836
|
event: "add_to_cart",
|
|
638
837
|
ecommerce: {
|
|
639
838
|
currency: "USD",
|
|
640
|
-
value:
|
|
839
|
+
value: roundHalfAway(estimatedCost, 2),
|
|
641
840
|
items: [
|
|
642
841
|
{
|
|
643
842
|
item_id: itemId,
|
|
@@ -685,7 +884,7 @@ function buildTrackingData({
|
|
|
685
884
|
const items = cartLines.map((line, index) => {
|
|
686
885
|
const details = itemDetails[line.itemId];
|
|
687
886
|
const price = getUnitPrice(line.itemId);
|
|
688
|
-
total
|
|
887
|
+
total = cleanMoney(total + cleanMoney(price * line.quantity));
|
|
689
888
|
return {
|
|
690
889
|
item_id: line.itemId,
|
|
691
890
|
item_name: details?.itemDesc ?? "",
|
|
@@ -699,7 +898,8 @@ function buildTrackingData({
|
|
|
699
898
|
return {
|
|
700
899
|
event: "begin_checkout",
|
|
701
900
|
currency,
|
|
702
|
-
|
|
901
|
+
// toFixed(2) rounds ties wrong (1.005 → "1.00"); roundHalfAway gives 1.01.
|
|
902
|
+
value: roundHalfAway(total, 2),
|
|
703
903
|
items
|
|
704
904
|
};
|
|
705
905
|
}
|
|
@@ -729,6 +929,8 @@ export {
|
|
|
729
929
|
buildCheckoutPayload,
|
|
730
930
|
buildImageLoader,
|
|
731
931
|
buildTrackingData,
|
|
932
|
+
categorySortBy,
|
|
933
|
+
cleanMoney,
|
|
732
934
|
cn,
|
|
733
935
|
createImageConfig,
|
|
734
936
|
derivePrice,
|
|
@@ -742,11 +944,13 @@ export {
|
|
|
742
944
|
getPaymentStatus,
|
|
743
945
|
getSchemaAvailability,
|
|
744
946
|
getShippingLeadDate,
|
|
947
|
+
hasPriceBreaks,
|
|
745
948
|
isAddressDifferent,
|
|
746
949
|
normalizePath,
|
|
747
950
|
paginateOffset,
|
|
748
951
|
pushTrackingData,
|
|
749
952
|
resolveStock,
|
|
953
|
+
roundHalfAway,
|
|
750
954
|
sanitizeHtmlImages,
|
|
751
955
|
serializeCategoryFilters,
|
|
752
956
|
serializeSearchParams,
|