@useinsider/guido 2.1.0-beta.42f5dfa → 2.1.0-beta.53ba3d5

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.
Files changed (133) hide show
  1. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +14 -15
  2. package/dist/components/organisms/header/HeaderWrapper.vue.js +9 -9
  3. package/dist/composables/useHtmlValidator.js +84 -106
  4. package/dist/composables/useRecommendation.js +21 -54
  5. package/dist/config/compiler/recommendationCompilerRules.js +39 -45
  6. package/dist/config/migrator/itemsBlockMigrator.js +17 -17
  7. package/dist/config/migrator/recommendationMigrator.js +2 -2
  8. package/dist/enums/extensions/recommendationBlock.js +1 -1
  9. package/dist/enums/recommendation.js +15 -16
  10. package/dist/extensions/Blocks/Recommendation/block.js +9 -130
  11. package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +187 -0
  12. package/dist/extensions/Blocks/Recommendation/constants.js +13 -0
  13. package/dist/extensions/Blocks/Recommendation/control.js +336 -0
  14. package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +68 -0
  15. package/dist/extensions/Blocks/Recommendation/controls/index.js +245 -0
  16. package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +74 -0
  17. package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscount/textAfter.js → omnibusDiscountTextAfterControl.js} +14 -16
  18. package/dist/extensions/Blocks/Recommendation/controls/{omnibusDiscount/textBefore.js → omnibusDiscountTextBeforeControl.js} +14 -16
  19. package/dist/extensions/Blocks/Recommendation/controls/{omnibusPrice/textAfter.js → omnibusPriceTextAfterControl.js} +14 -16
  20. package/dist/extensions/Blocks/Recommendation/controls/{omnibusPrice/textBefore.js → omnibusPriceTextBeforeControl.js} +12 -14
  21. package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +188 -0
  22. package/dist/extensions/Blocks/Recommendation/extension.js +17 -40
  23. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +3 -19
  24. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +4 -13
  25. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +10 -21
  26. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +193 -230
  27. package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +181 -0
  28. package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +189 -0
  29. package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +209 -0
  30. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +9 -9
  31. package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +15 -26
  32. package/dist/extensions/Blocks/controlFactories.js +93 -125
  33. package/dist/guido.css +1 -1
  34. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +169 -223
  35. package/dist/services/recommendationApi.js +9 -10
  36. package/dist/services/templateLibraryApi.js +13 -16
  37. package/dist/src/components/wrappers/WpDrawer.vue.d.ts +1 -1
  38. package/dist/src/composables/useRecommendation.d.ts +0 -1
  39. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +0 -67
  40. package/dist/src/extensions/Blocks/Recommendation/{controls/cardComposition/index.d.ts → cardCompositionControl.d.ts} +3 -23
  41. package/dist/src/extensions/Blocks/Recommendation/{constants/controlIds.d.ts → constants.d.ts} +24 -0
  42. package/dist/src/extensions/Blocks/Recommendation/control.d.ts +38 -0
  43. package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +589 -21
  44. package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +16 -0
  45. package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +0 -9
  46. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +468 -131
  47. package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +16 -0
  48. package/dist/src/extensions/Blocks/Recommendation/templates/{grid/migration.d.ts → migrationTemplate.d.ts} +4 -11
  49. package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +52 -0
  50. package/dist/static/styles/customEditorStyle.css.js +2 -25
  51. package/dist/utils/pairProductVariables.js +56 -57
  52. package/dist/utils/templatePreparation.js +14 -15
  53. package/package.json +1 -1
  54. package/dist/config/compiler/utils/recommendationCompilerUtils.js +0 -116
  55. package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +0 -4
  56. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +0 -4
  57. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +0 -65
  58. package/dist/extensions/Blocks/Recommendation/constants/layout.js +0 -20
  59. package/dist/extensions/Blocks/Recommendation/constants/selectors.js +0 -19
  60. package/dist/extensions/Blocks/Recommendation/controls/button/index.js +0 -64
  61. package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +0 -80
  62. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +0 -232
  63. package/dist/extensions/Blocks/Recommendation/controls/image/index.js +0 -19
  64. package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +0 -92
  65. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +0 -102
  66. package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +0 -209
  67. package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +0 -52
  68. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +0 -217
  69. package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +0 -70
  70. package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +0 -110
  71. package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +0 -67
  72. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +0 -286
  73. package/dist/extensions/Blocks/Recommendation/controls/name/index.js +0 -46
  74. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +0 -108
  75. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +0 -44
  76. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +0 -48
  77. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +0 -48
  78. package/dist/extensions/Blocks/Recommendation/controls/price/index.js +0 -44
  79. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +0 -222
  80. package/dist/extensions/Blocks/Recommendation/services/configService.js +0 -240
  81. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +0 -233
  82. package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +0 -251
  83. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +0 -69
  84. package/dist/extensions/Blocks/Recommendation/templates/index.js +0 -12
  85. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +0 -174
  86. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +0 -73
  87. package/dist/extensions/Blocks/Recommendation/templates/utils.js +0 -122
  88. package/dist/extensions/Blocks/Recommendation/types/nodeConfig.js +0 -6
  89. package/dist/extensions/Blocks/Recommendation/utils/priceFormatter.js +0 -29
  90. package/dist/extensions/Blocks/Recommendation/utils/tagName.js +0 -46
  91. package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +0 -17
  92. package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +0 -13
  93. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +0 -49
  94. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +0 -13
  95. package/dist/src/extensions/Blocks/Recommendation/constants/layout.d.ts +0 -35
  96. package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +0 -31
  97. package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +0 -143
  98. package/dist/src/extensions/Blocks/Recommendation/controls/cardBackground/index.d.ts +0 -31
  99. package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +0 -35
  100. package/dist/src/extensions/Blocks/Recommendation/controls/layout/index.d.ts +0 -37
  101. package/dist/src/extensions/Blocks/Recommendation/controls/main/algorithm.d.ts +0 -29
  102. package/dist/src/extensions/Blocks/Recommendation/controls/main/currency.d.ts +0 -52
  103. package/dist/src/extensions/Blocks/Recommendation/controls/main/filters.d.ts +0 -22
  104. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +0 -68
  105. package/dist/src/extensions/Blocks/Recommendation/controls/main/locale.d.ts +0 -24
  106. package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +0 -42
  107. package/dist/src/extensions/Blocks/Recommendation/controls/main/shuffle.d.ts +0 -23
  108. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +0 -214
  109. package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +0 -97
  110. package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +0 -34
  111. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +0 -95
  112. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +0 -100
  113. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +0 -15
  114. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +0 -15
  115. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +0 -100
  116. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +0 -15
  117. package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +0 -15
  118. package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +0 -95
  119. package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +0 -83
  120. package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +0 -151
  121. package/dist/src/extensions/Blocks/Recommendation/services/index.d.ts +0 -6
  122. package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +0 -20
  123. package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +0 -33
  124. package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +0 -39
  125. package/dist/src/extensions/Blocks/Recommendation/templates/list/elementRenderer.d.ts +0 -8
  126. package/dist/src/extensions/Blocks/Recommendation/templates/list/migration.d.ts +0 -25
  127. package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +0 -18
  128. package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +0 -57
  129. package/dist/src/extensions/Blocks/Recommendation/types/index.d.ts +0 -7
  130. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +0 -160
  131. package/dist/src/extensions/Blocks/Recommendation/utils/priceFormatter.d.ts +0 -33
  132. package/dist/src/extensions/Blocks/Recommendation/utils/stylePreserver.d.ts +0 -113
  133. package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +0 -77
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as n, ref as a, computed as l } from "vue";
2
2
  import i from "../../../wrappers/WpDrawer.vue.js";
3
- import { useTranslations as c } from "../../../../composables/useTranslations.js";
4
- import { useRecommendationExtensionStore as p } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
3
+ import { useTranslations as p } from "../../../../composables/useTranslations.js";
4
+ import { useRecommendationExtensionStore as c } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
5
5
  import u from "./Filters.vue.js";
6
- const v = /* @__PURE__ */ n({
6
+ const b = /* @__PURE__ */ n({
7
7
  __name: "FilterSelectionDrawer",
8
- setup(f) {
9
- const r = c(), t = p(), e = a(!1), s = l(() => ({
8
+ setup(m) {
9
+ const t = p(), o = c(), e = a(!1), s = l(() => ({
10
10
  primaryButton: {
11
11
  styling: "solid",
12
12
  type: "primary",
13
- labelText: r(
13
+ labelText: t(
14
14
  e.value ? "unsubscription-preference.selecting-type" : "products.select-and-continue"
15
15
  ),
16
16
  loadingStatus: e.value,
@@ -19,20 +19,19 @@ const v = /* @__PURE__ */ n({
19
19
  cancelOrBackButton: {
20
20
  styling: "ghost",
21
21
  type: "secondary",
22
- labelText: r("products.cancel"),
22
+ labelText: t("products.cancel"),
23
23
  disabledStatus: e.value
24
24
  }
25
- })), o = () => {
26
- t.closeFilterDrawer();
25
+ })), r = () => {
26
+ o.filterSelectionDrawerStatus = !1;
27
27
  };
28
- return { __sfc: !0, trans: r, store: t, isApplying: e, footerButtonGroupOptions: s, closeModal: o, applyFilter: () => {
29
- e.value = !0, t.patchCurrentBlockConfig(
30
- { filters: t.recommendationConfigs.filters },
31
- { triggerRefetch: !0 }
32
- ), o(), e.value = !1;
28
+ return { __sfc: !0, trans: t, store: o, isApplying: e, footerButtonGroupOptions: s, closeModal: r, applyFilter: () => {
29
+ e.value = !0, setTimeout(() => {
30
+ console.debug("Filter applied!"), r(), o.generateFilterQuery();
31
+ }, 2e3);
33
32
  }, WpDrawer: i, Filters: u };
34
33
  }
35
34
  });
36
35
  export {
37
- v as default
36
+ b as default
38
37
  };
@@ -1,18 +1,18 @@
1
1
  import o from "./HeaderWrapper.vue2.js";
2
2
  /* empty css */
3
- import s from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var a = function() {
3
+ import a from "../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var s = function() {
5
5
  var t = this, r = t._self._c, e = t._self._setupProxy;
6
- return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "header-wrapper w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot, { ref: "rightSlotRef" })], 1)]);
7
- }, n = [], _ = /* @__PURE__ */ s(
6
+ return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0", "data-testid": "guido-header" } }, [r("div", { staticClass: "header-wrapper w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot, { ref: "rightSlotRef" })], 1)]);
7
+ }, d = [], i = /* @__PURE__ */ a(
8
8
  o,
9
- a,
10
- n,
9
+ s,
10
+ d,
11
11
  !1,
12
12
  null,
13
- "5df46e7a"
13
+ "5c02dcc7"
14
14
  );
15
- const c = _.exports;
15
+ const p = i.exports;
16
16
  export {
17
- c as default
17
+ p as default
18
18
  };
@@ -1,171 +1,149 @@
1
1
  import { useConfig as D } from "./useConfig.js";
2
- import { TemplateTypes as L } from "../enums/defaults.js";
3
- import { DISPLAY_CONDITIONS_REGEX as V, DISPLAY_CONDITIONS_EXCEPTIONS_REGEX as H, CampaignCouldNotBeSavedKey as M, CanNotMakeAnyChangesForRunningKey as $ } from "../enums/html-validator.js";
2
+ import { TemplateTypes as H } from "../enums/defaults.js";
3
+ import { DISPLAY_CONDITIONS_REGEX as P, DISPLAY_CONDITIONS_EXCEPTIONS_REGEX as R, CampaignCouldNotBeSavedKey as _, CanNotMakeAnyChangesForRunningKey as G } from "../enums/html-validator.js";
4
4
  import { ToasterTypeOptions as l } from "../enums/toaster.js";
5
- import { itemsBlockDynamicVariables as P } from "../extensions/Blocks/Items/enums/productEnums.js";
6
- import { useRecommendationExtensionStore as j } from "../extensions/Blocks/Recommendation/store/recommendation.js";
7
- import { useRecommendationStore as G } from "../stores/recommendation.js";
5
+ import { itemsBlockDynamicVariables as $ } from "../extensions/Blocks/Items/enums/productEnums.js";
6
+ import { useRecommendationStore as j } from "../stores/recommendation.js";
8
7
  import { base64EncodeWithSpecialChars as q } from "../utils/base64.js";
9
- import { useHttp as z } from "./useHttp.js";
10
- import { useToaster as U } from "./useToaster.js";
11
- import { useTranslations as X } from "./useTranslations.js";
12
- const K = [
13
- "img",
14
- "url",
15
- "name",
16
- "price",
17
- "currency",
18
- "original_price",
19
- "omnibus_price",
20
- "omnibus_discount"
21
- ];
22
- function Y() {
23
- const a = j();
24
- return Object.keys(a.blockStates).flatMap((d) => {
25
- const f = a.blockStates[Number(d)], i = parseInt(f.recommendationConfigs.size) || 10;
26
- return Array.from({ length: i }, (m, u) => u).flatMap((m) => K.map((u) => `${d}_${m}_${u}`));
27
- });
28
- }
29
- const le = () => {
30
- var p, y;
31
- const { showToaster: a } = U(), { post: d } = z(), { config: f } = D(), i = X(), g = G(), m = ((y = (p = f.value) == null ? void 0 : p.partner) == null ? void 0 : y.messageType) === L.transactional, u = async (e) => {
32
- const t = await d(
8
+ import { useHttp as M } from "./useHttp.js";
9
+ import { useToaster as X } from "./useToaster.js";
10
+ import { useTranslations as z } from "./useTranslations.js";
11
+ const oe = () => {
12
+ var d, f;
13
+ const { showToaster: c } = X(), { post: h } = M(), { config: v } = D(), a = z(), m = j(), u = ((f = (d = v.value) == null ? void 0 : d.partner) == null ? void 0 : f.messageType) === H.transactional, C = async (e) => {
14
+ const t = await h(
33
15
  "/newsletter/template-library/check-template-html-body",
34
16
  { html: q(e) }
35
- ), { status: n, message: c } = t.data;
36
- return n || a({
17
+ ), { status: n, message: r } = t.data;
18
+ return n || c({
37
19
  type: l.Alert,
38
- message: n === void 0 ? c : i("newsletter.invalid-url-link-for-toaster")
39
- }), i(M), c === i($) && a({
20
+ message: n === void 0 ? r : a("newsletter.invalid-url-link-for-toaster")
21
+ }), a(_), r === a(G) && c({
40
22
  type: l.Alert,
41
- message: i("newsletter.already-in-progress")
23
+ message: a("newsletter.already-in-progress")
42
24
  }), n;
43
- }, b = (e) => !["if", "endif", "else", "elif", "now"].includes(e.toLowerCase()), S = (e) => ["if", "endif"].includes(e.toLowerCase()), w = (e, s) => {
25
+ }, w = (e) => !["if", "endif", "else", "elif", "now"].includes(e.toLowerCase()), S = (e) => ["if", "endif"].includes(e.toLowerCase()), b = (e, s) => {
44
26
  const t = e.match(/({%(.*?)%})/g);
45
27
  let n = !0;
46
- return t !== null && !m && t.forEach((c) => {
47
- const o = c.slice(2, -2).trim().match(/(".*?"|[^"\s]+)(?=\s*|\s*$)/g);
48
- if (o && o.length > 0) {
49
- const [r] = o;
50
- b(r) && !s.includes(r) && (a({
28
+ return t !== null && !u && t.forEach((r) => {
29
+ const i = r.slice(2, -2).trim().match(/(".*?"|[^"\s]+)(?=\s*|\s*$)/g);
30
+ if (i && i.length > 0) {
31
+ const [o] = i;
32
+ w(o) && !s.includes(o) && (c({
51
33
  type: l.Warning,
52
- message: i("custom-fields.invalid-custom-fields")
34
+ message: a("custom-fields.invalid-custom-fields")
53
35
  }), n = !1);
54
36
  }
55
37
  }), n;
56
38
  }, E = async (e, s, t) => {
57
- const n = t ? await u(e) : !0;
58
- return w(e, s) && n;
59
- }, A = (e) => e.length > 0 ? !0 : (a({
39
+ const n = t ? await C(e) : !0;
40
+ return b(e, s) && n;
41
+ }, A = (e) => e.length > 0 ? !0 : (c({
60
42
  type: l.Warning,
61
- message: i("newsletter.html-content-is-empty")
62
- }), !1), k = (e) => {
43
+ message: a("newsletter.html-content-is-empty")
44
+ }), !1), x = (e) => {
63
45
  const s = (e.match(/{/gm) || []).length, t = (e.match(/}/gm) || []).length;
64
- return s > t && a({
46
+ return s > t && c({
65
47
  type: l.Warning,
66
- message: i("custom-fields.missing-closing-braces")
67
- }), s < t && a({
48
+ message: a("custom-fields.missing-closing-braces")
49
+ }), s < t && c({
68
50
  type: l.Warning,
69
- message: i("custom-fields.missing-opening-braces")
51
+ message: a("custom-fields.missing-opening-braces")
70
52
  }), s === t;
71
- }, x = (e) => {
53
+ }, k = (e) => {
72
54
  const s = e.match(/{{\s*(\w+\s+((\w+\|\w+)|(\w+)))\s*}}/gm) === null;
73
- return s || a({
55
+ return s || c({
74
56
  type: l.Warning,
75
- message: i("custom-fields.invalid-custom-fields")
57
+ message: a("custom-fields.invalid-custom-fields")
76
58
  }), s;
77
59
  }, T = (e, s) => {
78
60
  const t = e.match(/{{([a-zA-Z0-9_\s]*)}}/gm);
79
- if (t && !m) {
80
- const n = new Set(s.map((o) => o.toLowerCase())), c = [];
81
- if (t.forEach((o) => {
82
- const r = o.slice(2, -2).trim().toLowerCase();
83
- (!n.has(r) || r === "") && c.push(r);
84
- }), c.length > 0) {
85
- const o = `
61
+ if (t && !u) {
62
+ const n = new Set(s.map((i) => i.toLowerCase())), r = [];
63
+ if (t.forEach((i) => {
64
+ const o = i.slice(2, -2).trim().toLowerCase();
65
+ (!n.has(o) || o === "") && r.push(o);
66
+ }), r.length > 0) {
67
+ const i = `
86
68
  <ul>
87
- ${c.map((r) => `<li>${r}</li>`).join("")}
69
+ ${r.map((o) => `<li>${o}</li>`).join("")}
88
70
  </ul>
89
71
  `;
90
- return a({
72
+ return c({
91
73
  type: l.Alert,
92
- message: i("custom-fields.invalid-custom-fields") + o
74
+ message: a("custom-fields.invalid-custom-fields") + i
93
75
  }), !1;
94
76
  }
95
77
  }
96
78
  return !0;
97
- }, I = (e) => {
79
+ }, F = (e) => {
98
80
  const s = e.match(/{%(.*?)%}/g), t = [];
99
81
  let n = !0;
100
- if (s && s.forEach((c) => {
101
- const o = c.match(V), r = c.match(H), B = (o == null ? void 0 : o.join("")) || "";
102
- (!o || c !== B) && !r && (a({
82
+ if (s && s.forEach((r) => {
83
+ const i = r.match(P), o = r.match(R), V = (i == null ? void 0 : i.join("")) || "";
84
+ (!i || r !== V) && !o && (c({
103
85
  type: l.Alert,
104
- message: i("newsletter.display-conditions-invalid-syntax")
105
- }), n = !1), o && o.forEach((h) => {
106
- h.trim() === "=" && (a({
86
+ message: a("newsletter.display-conditions-invalid-syntax")
87
+ }), n = !1), i && i.forEach((g) => {
88
+ g.trim() === "=" && (c({
107
89
  type: l.Alert,
108
- message: i("custom-conditions.wrong-equality-operators")
90
+ message: a("custom-conditions.wrong-equality-operators")
109
91
  }), n = !1);
110
- const C = h.match(/^[a-zA-Z]*$/g);
111
- C && C.forEach((v) => {
112
- S(v) && t.push(v);
92
+ const p = g.match(/^[a-zA-Z]*$/g);
93
+ p && p.forEach((y) => {
94
+ S(y) && t.push(y);
113
95
  });
114
96
  });
115
97
  }), t.length) {
116
- const c = t.filter((r) => r === "if"), o = t.filter((r) => r === "endif");
117
- c.length !== o.length && (a({
98
+ const r = t.filter((o) => o === "if"), i = t.filter((o) => o === "endif");
99
+ r.length !== i.length && (c({
118
100
  type: l.Alert,
119
- message: i("custom-conditions.missing-if-endif-tag")
101
+ message: a("custom-conditions.missing-if-endif-tag")
120
102
  }), n = !1);
121
103
  }
122
104
  return n;
123
- }, F = (e) => {
105
+ }, I = (e) => {
124
106
  const s = (e.match(/{% /gm) || []).length, t = (e.match(/ %}/gm) || []).length, n = s === t;
125
- return n || a({
107
+ return n || c({
126
108
  type: l.Warning,
127
- message: i("custom-conditions.no-space-after-braces")
109
+ message: a("custom-conditions.no-space-after-braces")
128
110
  }), n;
129
- }, _ = (e) => (e.match(/({%(.*?)%})/g) || []).filter((t) => t.includes("if")).map((t) => (t.match(/{{.*}}/gm) || []).length).reduce((t, n) => t + n, 0) > 0 ? (a({
111
+ }, W = (e) => (e.match(/({%(.*?)%})/g) || []).filter((t) => t.includes("if")).map((t) => (t.match(/{{.*}}/gm) || []).length).reduce((t, n) => t + n, 0) > 0 ? (c({
130
112
  type: l.Warning,
131
- message: i("custom-conditions.no-braces-inside-if-tag")
132
- }), !1) : !0, N = () => g.recommendationConfigs && Object.values(g.recommendationConfigs).find((s) => s.filters.find((t) => t.value === "")) !== void 0 ? (a({
113
+ message: a("custom-conditions.no-braces-inside-if-tag")
114
+ }), !1) : !0, L = () => m.recommendationConfigs && Object.values(m.recommendationConfigs).find((s) => s.filters.find((t) => t.value === "")) !== void 0 ? (c({
133
115
  type: l.Alert,
134
- message: i("newsletter.fill-all-necessary-fields")
135
- }), !1) : !0, O = (e) => {
116
+ message: a("newsletter.fill-all-necessary-fields")
117
+ }), !1) : !0, N = (e) => {
136
118
  const s = /src="[^"]*\.(svg|pst)"/gm;
137
- return e.match(s) === null ? !0 : (a({
119
+ return e.match(s) === null ? !0 : (c({
138
120
  type: l.Alert,
139
- message: i("newsletter.invalid-image-type")
121
+ message: a("newsletter.invalid-image-type")
140
122
  }), !1);
141
- }, W = (e) => {
123
+ }, O = (e) => {
142
124
  const n = new DOMParser().parseFromString(e, "text/html").querySelectorAll(".checkbox-block-v2");
143
- return Array.from(n).find((o) => {
144
- var r;
145
- return !((r = o.id) != null && r.trim());
146
- }) ? (a({
125
+ return Array.from(n).find((i) => {
126
+ var o;
127
+ return !((o = i.id) != null && o.trim());
128
+ }) ? (c({
147
129
  type: l.Alert,
148
- message: i("unsubscribe-templates.select-checkbox-groups")
130
+ message: a("unsubscribe-templates.select-checkbox-groups")
149
131
  }), !1) : !0;
150
- }, R = (e) => {
132
+ }, B = (e) => {
151
133
  const n = new DOMParser().parseFromString(e, "text/html").querySelectorAll(".radio-button-v2");
152
- return Array.from(n).find((o) => {
153
- var r;
154
- return !((r = o.id) != null && r.trim());
155
- }) ? (a({
134
+ return Array.from(n).find((i) => {
135
+ var o;
136
+ return !((o = i.id) != null && o.trim());
137
+ }) ? (c({
156
138
  type: l.Alert,
157
- message: i("unsubscribe-templates.select-radio-button-groups")
139
+ message: a("unsubscribe-templates.select-radio-button-groups")
158
140
  }), !1) : !0;
159
141
  };
160
142
  return { validateHtml: async (e, s, t = !1) => {
161
- const n = [
162
- ...s.map((o) => o.value),
163
- ...P,
164
- ...Y()
165
- ];
166
- return await E(e, n, t) && A(e) && k(e) && x(e) && T(e, n) && I(e) && F(e) && _(e) && N() && O(e) && W(e) && R(e);
143
+ const n = [...s.map((i) => i.value), ...$];
144
+ return await E(e, n, t) && A(e) && x(e) && k(e) && T(e, n) && F(e) && I(e) && W(e) && L() && N(e) && O(e) && B(e);
167
145
  } };
168
146
  };
169
147
  export {
170
- le as useHtmlValidator
148
+ oe as useHtmlValidator
171
149
  };
@@ -1,60 +1,27 @@
1
- import { RecommendationFeedSourceMaps as g, URLS as p } from "../enums/extensions/recommendationBlock.js";
2
- import { MinDeviceViewport as R, DefaultPadding as b } from "../enums/recommendation.js";
3
- import { useRecommendationExtensionStore as l } from "../extensions/Blocks/Recommendation/store/recommendation.js";
4
- import { generateCompleteFilterQuery as x } from "../extensions/Blocks/Recommendation/utils/filterUtil.js";
5
- import { useConfigStore as C } from "../stores/config.js";
6
- const N = () => ({
1
+ import { MinDeviceViewport as r, DefaultPadding as c } from "../enums/recommendation.js";
2
+ const m = () => ({
7
3
  calculateCardWidth: ({
8
- mobileLeftPadding: i,
9
- mobileRightPadding: n,
10
- cardsInRow: o,
11
- unresponsive: a
4
+ mobileLeftPadding: e,
5
+ mobileRightPadding: a,
6
+ cardsInRow: n,
7
+ unresponsive: i
12
8
  }) => {
13
- const r = a ? o : 1, e = i + n + (r - 1) * b;
14
- return (R - e) / r;
9
+ const t = i ? n : 1, o = e + a + (t - 1) * c;
10
+ return (r - o) / t;
15
11
  },
16
- getRecommendationCampaignData: (i) => {
17
- const n = l(), o = Number(i), a = n.blockStates[o];
18
- if (!a)
19
- return {
20
- textTrimming: !1,
21
- orientation: "vertical",
22
- mobileLeftPadding: 0,
23
- mobileRightPadding: 0,
24
- cardsInRow: 2,
25
- unresponsive: !1,
26
- priceBeforeTextValue: "",
27
- priceAfterTextValue: "",
28
- discountBeforeTextValue: "",
29
- discountAfterTextValue: ""
30
- };
31
- const { recommendationConfigs: r } = a, e = r.orientation === "grid" ? "vertical" : "horizontal";
32
- return {
33
- textTrimming: r.textTrimming,
34
- orientation: e,
35
- mobileLeftPadding: 0,
36
- mobileRightPadding: 0,
37
- cardsInRow: r.cardsInRow,
38
- unresponsive: r.unresponsive,
39
- priceBeforeTextValue: "",
40
- priceAfterTextValue: "",
41
- discountBeforeTextValue: "",
42
- discountAfterTextValue: ""
43
- };
44
- },
45
- buildCampaignUrl: (i) => {
46
- var d;
47
- const n = l(), o = C(), a = Number(i), r = n.blockStates[a];
48
- if (!r)
49
- return "";
50
- const { recommendationConfigs: e } = r, u = ((d = g.find((s) => s.key === e.strategy)) == null ? void 0 : d.path) || "", t = new URLSearchParams();
51
- t.set("locale", e.language), t.set("currency", e.currencySettings.value), t.set("partnerName", o.partnerName), t.set("size", e.size), t.set("details", "true"), t.set("campaignId", o.variationId), e.strategy === "manualMerchandising" ? t.set("productId", e.productIds.join(",")) : e.strategy === "similarViewed" && t.set("productId", "{itemId}");
52
- const f = e.filters.filter((s) => s.isValid), c = x(f);
53
- c && t.set("filter", c), e.shuffleProducts && t.set("shuffle", "true");
54
- const m = `${p.RECOMMENDATION_API_URL}/v2/${u}?${t.toString()}`;
55
- return n.recommendationCampaignUrls[i] = m, m;
56
- }
12
+ getRecommendationCampaignData: (e) => (console.debug(e), {
13
+ textTrimming: !1,
14
+ orientation: "vertical",
15
+ mobileLeftPadding: 0,
16
+ mobileRightPadding: 0,
17
+ cardsInRow: 2,
18
+ unresponsive: !1,
19
+ priceBeforeTextValue: "",
20
+ priceAfterTextValue: "",
21
+ discountBeforeTextValue: "",
22
+ discountAfterTextValue: ""
23
+ })
57
24
  });
58
25
  export {
59
- N as useRecommendation
26
+ m as useRecommendation
60
27
  };
@@ -1,16 +1,15 @@
1
- import { useRecommendation as f } from "../../composables/useRecommendation.js";
2
- import { DUMMY_IMAGE_MAPPINGS as P, REGEX as m, VerticalOrientation as g, CSS as e, ATTRIBUTES as a, CONDITIONS as A, HTML as h } from "../../enums/recommendation.js";
3
- import { prepareRecommendationBlocks as D } from "./utils/recommendationCompilerUtils.js";
4
- const G = [
1
+ import { useRecommendation as u } from "../../composables/useRecommendation.js";
2
+ import { DUMMY_IMAGE_MAPPINGS as P, REGEX as i, CSS as e, CONDITIONS as E, ATTRIBUTES as r, HTML as h } from "../../enums/recommendation.js";
3
+ const H = [
5
4
  {
6
5
  id: "replace-images-with-variable-names",
7
6
  description: "Replacing dummy images with variable names in recommendation module",
8
7
  type: "custom",
9
- processor: (s) => {
10
- let t = s;
11
- return Object.entries(P).forEach(([, l]) => {
12
- Object.entries(l).forEach(([n, o]) => {
13
- t = t.replaceAll(o, `{{${n}}}`);
8
+ processor: (a) => {
9
+ let t = a;
10
+ return Object.entries(P).forEach(([, n]) => {
11
+ Object.entries(n).forEach(([s, o]) => {
12
+ t = t.replaceAll(o, `{{${s}}}`);
14
13
  });
15
14
  }), t;
16
15
  },
@@ -29,17 +28,17 @@ const G = [
29
28
  id: "add-recommendation-unresponsive-css",
30
29
  description: "Adding recommendation unresponsive css",
31
30
  type: "custom",
32
- processor: (s) => {
33
- const { calculateCardWidth: t, getRecommendationCampaignData: l } = f();
34
- let n = s;
35
- const o = n.match(m.ID);
36
- if (o) {
37
- const d = [];
38
- if (o.forEach((c) => {
39
- const E = /recommendation-id="(.*?)"/i.exec(c), I = E ? E[1].trim() : "", p = l(I);
40
- p.textTrimming && p.orientation === g && d.push(t(p));
41
- }), d.length) {
42
- const c = `width:${Math.min(...d)}px!important;`;
31
+ processor: (a) => {
32
+ const { getRecommendationCampaignData: t } = u();
33
+ let n = a;
34
+ const s = n.match(i.ID);
35
+ if (s) {
36
+ const o = [];
37
+ if (s.forEach((c) => {
38
+ const m = c.slice(35, c.length - 1).trim();
39
+ t(m);
40
+ }), o.length) {
41
+ const c = `width:${Math.min(...o)}px!important;`;
43
42
  n = n.replace(e.REGULAR_NAME_HEIGHT, `${e.TRIMMED_NAME_HEIGHT} ${c} ${e.ELLIPSIS}`).replace(e.REGULAR_NAME_CONTAINER_HEIGHT, e.TRIMMED_NAME_CONTAINER_CSS).replace(e.RESPONSIVE_NAME_SIZE, `${e.RESPONSIVE_NAME_HEIGHT} ${c} ${e.ELLIPSIS}`).replace(e.RESPONSIVE_NAME_CONTAINER_HEIGHT, e.TRIMMED_RESPONSIVE_NAME_CONTAINER_CSS);
44
43
  }
45
44
  }
@@ -47,37 +46,32 @@ const G = [
47
46
  },
48
47
  priority: 52
49
48
  },
50
- {
51
- id: "prepare-recommendations",
52
- description: "Replacing product data with template variables in recommendation blocks",
53
- type: "custom",
54
- processor: (s) => D(s),
55
- priority: 48
56
- },
49
+ // TODO: prepareRecommendations
50
+ // TODO: addRecommendationCustomFields
57
51
  {
58
52
  id: "add-discount-conditions",
59
53
  description: "Adding discount conditions to the recommendation block",
60
54
  type: "custom",
61
- processor: (s) => {
62
- let t = s;
63
- const l = t.match(m.ATTRIBUTE_PARAGRAPH), { getRecommendationCampaignData: n } = f();
64
- return l !== null && l.forEach((o) => {
65
- const d = o.match(m.CUSTOM_FIELD);
66
- if (!d)
55
+ processor: (a) => {
56
+ let t = a;
57
+ const n = t.match(i.ATTRIBUTE_PARAGRAPH), { getRecommendationCampaignData: s } = u();
58
+ return n !== null && n.forEach((o) => {
59
+ const c = o.match(i.CUSTOM_FIELD);
60
+ if (!c)
67
61
  return;
68
- const [c] = d, E = c.match(m.CUSTOM_FIELD_INDEXES_PART), I = c.match(m.CUSTOM_FIELD_NAME_PART), p = o.match(m.ATTRIBUTE_PARAGRAPH_START_TAG);
69
- if (!E || !I || !p)
62
+ const [m] = c, p = m.match(i.CUSTOM_FIELD_INDEXES_PART), A = m.match(i.CUSTOM_FIELD_NAME_PART), _ = o.match(i.ATTRIBUTE_PARAGRAPH_START_TAG);
63
+ if (!p || !A || !_)
70
64
  return;
71
- const [u] = E, [R] = I, [_] = p, T = R.substring(1, R.length - 2), S = _.match(m.COMPOSITION) !== null;
72
- let i = c;
73
- if (S) {
74
- const $ = u.substring(2, u.length - 3), r = n($);
75
- T === a.OMNIBUS_PRICE && (r.priceBeforeTextValue && (i = `${r.priceBeforeTextValue}${i}`), r.priceAfterTextValue && (i = `${i}${r.priceAfterTextValue}`)), T === a.OMNIBUS_DISCOUNT && (r.discountBeforeTextValue && (i = `${r.discountBeforeTextValue}${i}`), r.discountAfterTextValue && (i = `${i}${r.discountAfterTextValue}`));
65
+ const [l] = p, [T] = A, [d] = _, N = T.substring(1, T.length - 2), R = d.match(i.COMPOSITION) !== null;
66
+ let O = m;
67
+ if (R) {
68
+ const M = l.substring(2, l.length - 3);
69
+ s(M);
76
70
  }
77
- const N = u.substring(2);
78
- let M = "";
79
- T in A.IF && (M = A.IF[T].replaceAll(`{${a.DISCOUNT}}`, `${N}${a.DISCOUNT}`).replaceAll(`{${a.OMNIBUS_DISCOUNT}}`, `${N}${a.OMNIBUS_DISCOUNT}`).replaceAll(`{${a.OMNIBUS_PRICE}}`, `${N}${a.OMNIBUS_PRICE}`));
80
- const O = `${_}${i}${h.PARAGRAPH_END_TAG}`, C = `${M}${S ? O : o}${A.ELSE}${_}${h.PARAGRAPH_END_TAG}${A.END_IF}`;
71
+ const I = l.substring(2);
72
+ let S = "";
73
+ N in E.IF && (S = E.IF[N].replaceAll(`{${r.DISCOUNT}}`, `${I}${r.DISCOUNT}`).replaceAll(`{${r.OMNIBUS_DISCOUNT}}`, `${I}${r.OMNIBUS_DISCOUNT}`).replaceAll(`{${r.OMNIBUS_PRICE}}`, `${I}${r.OMNIBUS_PRICE}`));
74
+ const $ = `${d}${O}${h.PARAGRAPH_END_TAG}`, C = `${S}${R ? $ : o}${E.ELSE}${d}${h.PARAGRAPH_END_TAG}${E.END_IF}`;
81
75
  t = t.replace(o, C);
82
76
  }), t;
83
77
  },
@@ -85,5 +79,5 @@ const G = [
85
79
  }
86
80
  ];
87
81
  export {
88
- G as recommendationCompilerRules
82
+ H as recommendationCompilerRules
89
83
  };
@@ -74,7 +74,7 @@ const w = {
74
74
  function F() {
75
75
  return String(Date.now() + Math.floor(Math.random() * 1e3));
76
76
  }
77
- function q(r) {
77
+ function $(r) {
78
78
  return r ? {
79
79
  CartItems: d.ITEMS_TYPE.CART_ITEMS,
80
80
  BrowsedItems: d.ITEMS_TYPE.BROWSED_ITEMS,
@@ -85,7 +85,7 @@ function q(r) {
85
85
  }[r] || d.ITEMS_TYPE.CART_ITEMS : d.ITEMS_TYPE.CART_ITEMS;
86
86
  }
87
87
  function R(r) {
88
- const t = (a, o) => a == null ? o : a === "1" || a === "true", e = (a, o) => a || o, i = r["data-type"] || r["data-source"], l = q(i);
88
+ const t = (a, o) => a == null ? o : a === "1" || a === "true", e = (a, o) => a || o, i = r["data-type"] || r["data-source"], l = $(i);
89
89
  let n = r["data-cart_items_select_control_value"] || g.cartItemsSelectControlValue;
90
90
  if (n && !n.includes("{{") && /^\d+$/.test(n)) {
91
91
  const a = parseInt(n) - 1, o = E[l];
@@ -124,7 +124,7 @@ function R(r) {
124
124
  buttonVisible: t(r["data-product_button_control_enabled"], !0)
125
125
  };
126
126
  }
127
- const $ = {
127
+ const q = {
128
128
  ins_apr: "CART_ITEMS",
129
129
  browsed_item: "BROWSED_ITEMS",
130
130
  purchased_item: "PURCHASED_ITEMS"
@@ -196,12 +196,12 @@ class V {
196
196
  */
197
197
  extractConfiguration(t) {
198
198
  var C, D, P;
199
- const e = ((C = t.querySelector("[data-type]")) == null ? void 0 : C.getAttribute("data-type")) || "CART_ITEMS", i = ((D = t.querySelector("[data-number]")) == null ? void 0 : D.getAttribute("data-number")) || "1", l = parseInt(i) - 1, n = E[e], a = ((P = n == null ? void 0 : n[l]) == null ? void 0 : P.value) || n[0].value, o = t.querySelector('[product-attr="price"]'), _ = (o == null ? void 0 : o.getAttribute("data-currency_symbol")) || "USD", f = ((o == null ? void 0 : o.getAttribute("data-curency")) || "before") === "after" ? "1" : "0", u = (o == null ? void 0 : o.getAttribute("data-formated")) !== "false", s = this.extractConfigBlockAttributes(t, e, i), b = s["data-card_orientation_control_value"];
200
- let S;
201
- b ? S = b === "horizontal" ? "horizontal" : "vertical" : S = t.querySelector('[colspan="2"]') !== null ? "vertical" : "horizontal";
199
+ const e = ((C = t.querySelector("[data-type]")) == null ? void 0 : C.getAttribute("data-type")) || "CART_ITEMS", i = ((D = t.querySelector("[data-number]")) == null ? void 0 : D.getAttribute("data-number")) || "1", l = parseInt(i) - 1, n = E[e], a = ((P = n == null ? void 0 : n[l]) == null ? void 0 : P.value) || n[0].value, o = t.querySelector('[product-attr="price"]'), _ = (o == null ? void 0 : o.getAttribute("data-currency_symbol")) || "USD", f = ((o == null ? void 0 : o.getAttribute("data-curency")) || "before") === "after" ? "1" : "0", u = (o == null ? void 0 : o.getAttribute("data-formated")) !== "false", s = this.extractConfigBlockAttributes(t, e, i), S = s["data-card_orientation_control_value"];
200
+ let b;
201
+ S ? b = S === "horizontal" ? "horizontal" : "vertical" : b = t.querySelector('[colspan="2"]') !== null ? "vertical" : "horizontal";
202
202
  const p = t.querySelector('a[product-attr="name"]'), T = (p == null ? void 0 : p.getAttribute("style")) || void 0, y = t.querySelector('a[product-attr="button"]'), m = (y == null ? void 0 : y.getAttribute("style")) || void 0, k = (o == null ? void 0 : o.getAttribute("style")) || void 0, I = t.querySelector("p.original-price"), h = (I == null ? void 0 : I.getAttribute("style")) || void 0, A = t.querySelector('[product-attr="quantity"]'), L = (A == null ? void 0 : A.getAttribute("style")) || void 0;
203
203
  return {
204
- orientation: S,
204
+ orientation: b,
205
205
  itemsType: e,
206
206
  itemId: a,
207
207
  currencySymbol: _,
@@ -299,14 +299,14 @@ class V {
299
299
  * - Purchased Items: purchased_item_total_product_kind, purchased_item_price_N, purchased_item_originalprice_N
300
300
  */
301
301
  removeJinjaConditionals(t) {
302
- let e = t.replace(
303
- /\{%\s*if\s+(ins_apr|browsed_item|purchased_item)_total_product_kind\s*(&gt;|>)\s*\d+\s*%\}/g,
304
- ""
305
- );
302
+ let e = t;
306
303
  return e = e.replace(
307
- /\{%\s*if\s+(ins_apr|browsed_item|purchased_item)_price_\d+\s*(!&#61;|!=)\s*\1_originalprice_\d+\s*%\}/g,
308
- ""
309
- ), e = e.replace(/\{%\s*endif\s*%\}/g, ""), e = e.replace(/\n\s*\n\s*\n/g, `
304
+ /\{%\s*if\s+(ins_apr|browsed_item|purchased_item)_price_(\d+)\s*(!&#61;|!=)\s*\1_originalprice_\2\s*%\}([\s\S]*?)\{%\s*endif\s*%\}/g,
305
+ "$4"
306
+ ), e = e.replace(
307
+ /\{%\s*if\s+(ins_apr|browsed_item|purchased_item)_total_product_kind\s*(&gt;|>)\s*\d+\s*%\}([\s\S]*?)\{%\s*endif\s*%\}/g,
308
+ "$3"
309
+ ), e = e.replace(/\n\s*\n\s*\n/g, `
310
310
 
311
311
  `), e;
312
312
  }
@@ -325,16 +325,16 @@ class V {
325
325
  const n = l.match(/^(ins_apr|browsed_item|purchased_item)_([a-z_]+)_(\d+)$/);
326
326
  if (!n)
327
327
  return i;
328
- const [, a, o, _] = n, c = $[a];
328
+ const [, a, o, _] = n, c = q[a];
329
329
  if (!c)
330
330
  return console.warn(`Unknown variable prefix: ${a}`), i;
331
331
  const f = w[o];
332
332
  if (!f)
333
333
  return console.warn(`Unknown variable suffix mapping for: ${o}`), i;
334
- const { pairsKey: u, defaultKey: s, isArray: b } = f, p = e[u][c];
334
+ const { pairsKey: u, defaultKey: s, isArray: S } = f, p = e[u][c];
335
335
  if (!p)
336
336
  return console.warn(`No data found for: ${u}.${c}`), i;
337
- if (b) {
337
+ if (S) {
338
338
  const y = parseInt(_) - 1, m = p[s];
339
339
  return Array.isArray(m) && m[y] ? m[y] : (console.warn(`Array value not found: ${u}.${c}.${s}[${y}]`), i);
340
340
  }