@azzas/azzas-tracker-web 2.0.0-preview.7 → 2.0.0-preview.8

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/mod.cjs CHANGED
@@ -1419,24 +1419,7 @@ var metaAdapters = {
1419
1419
  }
1420
1420
  };
1421
1421
 
1422
- // src/params/adapters/deco/utils.ts
1423
- var getItemCategory3 = (item) => {
1424
- var _a;
1425
- const value = item == null ? void 0 : item.category;
1426
- if (!value) return "Cole\xE7\xE3o";
1427
- const text = Array.isArray(value) ? value.join(" ") : String(value);
1428
- const match = (_a = text.match(/outlet|bazar|sale/i)) == null ? void 0 : _a[0].toLowerCase();
1429
- return match != null ? match : "Cole\xE7\xE3o";
1430
- };
1431
- var getItemCategory22 = (item) => {
1432
- var _a, _b, _c, _d;
1433
- const AVOID_CATEGORIES = /^(outlet|bazar|sale)$/i;
1434
- const categories = (_b = (_a = item.category) == null ? void 0 : _a.split(">")) != null ? _b : [];
1435
- const last = (_c = categories[categories.length - 1]) != null ? _c : "";
1436
- const validHierarchy = last.split("/").filter((c) => c && !AVOID_CATEGORIES.test(c));
1437
- const deepest = (_d = validHierarchy[validHierarchy.length - 1]) != null ? _d : "";
1438
- return capitalize(deepest);
1439
- };
1422
+ // src/core/farm.ts
1440
1423
  var BRAND_CODES2 = {
1441
1424
  farm: "farmrio",
1442
1425
  "farm etc": "farmetc",
@@ -1469,6 +1452,25 @@ function normalizeBrand2(input) {
1469
1452
  return uniqueSortedCodes.length > 0 ? uniqueSortedCodes.join("_") : null;
1470
1453
  }
1471
1454
 
1455
+ // src/params/adapters/deco/utils.ts
1456
+ var getItemCategory3 = (item) => {
1457
+ var _a;
1458
+ const value = item == null ? void 0 : item.category;
1459
+ if (!value) return "Cole\xE7\xE3o";
1460
+ const text = Array.isArray(value) ? value.join(" ") : String(value);
1461
+ const match = (_a = text.match(/outlet|bazar|sale/i)) == null ? void 0 : _a[0].toLowerCase();
1462
+ return match != null ? match : "Cole\xE7\xE3o";
1463
+ };
1464
+ var getItemCategory22 = (item) => {
1465
+ var _a, _b, _c, _d;
1466
+ const AVOID_CATEGORIES = /^(outlet|bazar|sale)$/i;
1467
+ const categories = (_b = (_a = item.category) == null ? void 0 : _a.split(">")) != null ? _b : [];
1468
+ const last = (_c = categories[categories.length - 1]) != null ? _c : "";
1469
+ const validHierarchy = last.split("/").filter((c) => c && !AVOID_CATEGORIES.test(c));
1470
+ const deepest = (_d = validHierarchy[validHierarchy.length - 1]) != null ? _d : "";
1471
+ return capitalize(deepest);
1472
+ };
1473
+
1472
1474
  // src/params/adapters/deco/index.ts
1473
1475
  var IN_STOCK_SCHEMA = "https://schema.org/InStock";
1474
1476
  var LIST_PRICE_SCHEMA = "https://schema.org/ListPrice";
@@ -1795,9 +1797,14 @@ var pickupAdapter = {
1795
1797
  }
1796
1798
  return null;
1797
1799
  },
1800
+ brand: (context, config2) => {
1801
+ if (config2 == null ? void 0 : config2.brand) return config2.brand;
1802
+ if (context == null ? void 0 : context.brand) return context.brand;
1803
+ return null;
1804
+ },
1798
1805
  zipcode: (context) => {
1799
1806
  var _a;
1800
- return (_a = context.zipcode) != null ? _a : null;
1807
+ return (_a = context.meta.zipcode) != null ? _a : null;
1801
1808
  }
1802
1809
  };
1803
1810
 
@@ -1915,7 +1922,7 @@ var orderFormAdapter = {
1915
1922
  },
1916
1923
  zipcode: (context) => {
1917
1924
  var _a;
1918
- return (_a = context.zipcode) != null ? _a : null;
1925
+ return (_a = context.meta.zipcode) != null ? _a : null;
1919
1926
  },
1920
1927
  flag_pickup: (context) => {
1921
1928
  var _a;