@useinsider/guido 3.17.0-beta.a6988b3 → 3.17.0-beta.ab974c6

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.
@@ -1,20 +1,30 @@
1
- import { BlockId as g } from "../../../enums/block.js";
2
- import { useOnboardingStore as y } from "../../../stores/onboarding.js";
3
- import { getMigrationBannerHtml as I } from "../../../utils/migrationBannerHtml.js";
4
- import { Block as C, BlockCompositionType as b, ModificationDescription as c } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
- import { SETTINGS_ENUMS as l, DefaultConfigValues as d } from "./enums/settingsEnums.js";
6
- import { getDefaultTemplate as h } from "./template.js";
7
- import { getItemsBlockContainer as u, getItemsBlockConfig as f, deriveItemNumber as D, getDefaultItemsBlockConfig as N } from "./utils/nodeConfigUtils.js";
8
- const p = g.Items;
9
- class E extends C {
1
+ var D = Object.defineProperty;
2
+ var S = (m, u, e) => u in m ? D(m, u, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[u] = e;
3
+ var I = (m, u, e) => S(m, typeof u != "symbol" ? u + "" : u, e);
4
+ import { BlockId as _ } from "../../../enums/block.js";
5
+ import { useOnboardingStore as N } from "../../../stores/onboarding.js";
6
+ import { getMigrationBannerHtml as T } from "../../../utils/migrationBannerHtml.js";
7
+ import { Block as A, BlockCompositionType as M, ModificationDescription as f } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
8
+ import { isCustomCurrencySymbol as R, ITEMS_CURRENCY_ATTR as y, currencyPositionFromLocation as H } from "./constants/currency.js";
9
+ import { ItemsBlockId as O } from "./enums/controlEnums.js";
10
+ import { SETTINGS_ENUMS as h, DefaultConfigValues as C } from "./enums/settingsEnums.js";
11
+ import { getDefaultTemplate as E } from "./template.js";
12
+ import { getItemsBlockContainer as b, getItemsBlockConfig as g, deriveItemNumber as B, getDefaultItemsBlockConfig as P } from "./utils/nodeConfigUtils.js";
13
+ const k = _.Items, w = "Reconcile Items currency DOM attributes";
14
+ class K extends A {
15
+ constructor() {
16
+ super(...arguments);
17
+ /** Block instances whose currency attrs were already self-healed this session (SD-147588 — undo-safe). */
18
+ I(this, "_currencyHealed", /* @__PURE__ */ new Set());
19
+ }
10
20
  getId() {
11
- return p;
21
+ return k;
12
22
  }
13
23
  getIcon() {
14
24
  return "items-icon";
15
25
  }
16
26
  getBlockCompositionType() {
17
- return b.CONTAINER;
27
+ return M.CONTAINER;
18
28
  }
19
29
  getName() {
20
30
  return this.api.translate("Items");
@@ -23,20 +33,20 @@ class E extends C {
23
33
  return this.api.translate("Items lets you display personalized products based on user behavior.");
24
34
  }
25
35
  getSettingsPanelTitleHtml() {
26
- return I(
27
- p,
36
+ return T(
37
+ k,
28
38
  this.api.translate("Items"),
29
39
  this.api.translate("This block is switched from the Old Version to the New Version. We recommend you check the Items block and test your message to ensure it works properly.")
30
40
  );
31
41
  }
32
42
  getTemplate() {
33
- return h({
34
- orientation: l.ORIENTATION.VERTICAL,
35
- itemsType: l.ITEMS_TYPE.CART_ITEMS,
43
+ return E({
44
+ orientation: h.ORIENTATION.VERTICAL,
45
+ itemsType: h.ITEMS_TYPE.CART_ITEMS,
36
46
  itemId: "{{Abandoned Cart Item (1) Url}}",
37
- currencySymbol: d.productPriceCurrencySymbolControlValue,
38
- currencyLocation: d.productPriceCurrencyLocationControlValue,
39
- formattedPrice: d.productPriceFormattedControlValue === "1"
47
+ currencySymbol: C.productPriceCurrencySymbolControlValue,
48
+ currencyLocation: C.productPriceCurrencyLocationControlValue,
49
+ formattedPrice: C.productPriceFormattedControlValue === "1"
40
50
  });
41
51
  }
42
52
  allowInnerBlocksDND() {
@@ -45,24 +55,27 @@ class E extends C {
45
55
  canBeSavedAsModule() {
46
56
  return !0;
47
57
  }
48
- onCreated(n) {
49
- const t = this.api.getDocumentModifier(), a = this.api.getDocumentRootCssNode();
50
- a.querySelector('[product-attr="imageSrc"] img') || t.modifyCss(a).appendRule('[product-attr="imageSrc"] img {object-fit: contain;}');
51
- const e = u(n);
52
- if (!e)
58
+ onCreated(e) {
59
+ const r = this.api.getDocumentModifier(), s = this.api.getDocumentRootCssNode();
60
+ s.querySelector('[product-attr="imageSrc"] img') || r.modifyCss(s).appendRule('[product-attr="imageSrc"] img {object-fit: contain;}');
61
+ const o = b(e);
62
+ if (!o)
53
63
  return;
54
- const o = e.getNodeConfig(), r = o && Object.keys(o).length > 0, i = f(n);
55
- if (i != null && i.initialized)
56
- if (r)
57
- i.blockInstanceId || this.api.getDocumentModifier().modifyHtml(e).setNodeConfig({ ...i, blockInstanceId: String(Date.now()) }).apply(new c("Assign block instance ID to block"));
58
- else {
59
- const s = this.api.getDocumentModifier();
60
- s.modifyHtml(e).setNodeConfig(i), this._stampProductTdDomAttributes(e, i, s), s.apply(new c("Migrate legacy config to nodeConfig"));
64
+ const i = o.getNodeConfig(), n = i && Object.keys(i).length > 0, t = g(e);
65
+ if (t != null && t.initialized) {
66
+ if (!n) {
67
+ const c = this.api.getDocumentModifier();
68
+ c.modifyHtml(o).setNodeConfig(t), this._stampProductTdDomAttributes(o, t, c), this._shouldReconcileCurrency(t) && this._reconcileCurrencyDomAttributes(o, t, c), c.apply(new f("Migrate legacy config to nodeConfig")), this._markCurrencyHealed(t.blockInstanceId);
69
+ return;
61
70
  }
62
- else {
63
- const s = N(), m = this.api.getDocumentModifier();
64
- m.modifyHtml(e).setNodeConfig(s), this._stampProductTdDomAttributes(e, s, m, !0), m.apply(new c("Initialize Items block with default configuration")), y().startOnboarding("itemsOnboarding");
71
+ } else {
72
+ const c = P(), p = this.api.getDocumentModifier();
73
+ p.modifyHtml(o).setNodeConfig(c), this._stampProductTdDomAttributes(o, c, p, !0), p.apply(new f("Initialize Items block with default configuration")), N().startOnboarding("itemsOnboarding");
74
+ return;
65
75
  }
76
+ const a = t.blockInstanceId || String(Date.now()), d = this.api.getDocumentModifier();
77
+ let l = !1;
78
+ t.blockInstanceId || (d.modifyHtml(o).setNodeConfig({ ...t, blockInstanceId: a }), l = !0), this._shouldReconcileCurrency(t) && this._reconcileCurrencyDomAttributes(o, t, d) && (l = !0), l && d.apply(new f("Assign Items block instance ID and reconcile currency")), this._markCurrencyHealed(a);
66
79
  }
67
80
  /**
68
81
  * Re-seeds nodeConfig from the persisted esd-ext-config when a saved module
@@ -70,18 +83,24 @@ class E extends C {
70
83
  * into nodeConfig, so without this a reused module would reset to defaults.
71
84
  * Guarded to the nodeConfig-empty case so it runs once and never loops.
72
85
  */
73
- onDocumentChanged(n) {
74
- const t = u(n);
75
- if (!t)
86
+ onDocumentChanged(e) {
87
+ const r = b(e);
88
+ if (!r)
76
89
  return;
77
- const a = t.getNodeConfig();
78
- if (a && Object.keys(a).length > 0)
90
+ const s = r.getNodeConfig();
91
+ if (s && Object.keys(s).length > 0) {
92
+ const t = g(e);
93
+ if (t != null && t.initialized && this._shouldReconcileCurrency(t)) {
94
+ const a = this.api.getDocumentModifier();
95
+ this._reconcileCurrencyDomAttributes(r, t, a) && a.apply(new f(w)), this._markCurrencyHealed(t.blockInstanceId);
96
+ }
79
97
  return;
80
- const o = f(n);
81
- if (!(o != null && o.initialized))
98
+ }
99
+ const i = g(e);
100
+ if (!(i != null && i.initialized))
82
101
  return;
83
- const r = this.api.getDocumentModifier();
84
- r.modifyHtml(t).setNodeConfig(o), this._stampProductTdDomAttributes(t, o, r), r.apply(new c("Recover Items block config from saved module"));
102
+ const n = this.api.getDocumentModifier();
103
+ n.modifyHtml(r).setNodeConfig(i), this._stampProductTdDomAttributes(r, i, n), this._shouldReconcileCurrency(i) && this._reconcileCurrencyDomAttributes(r, i, n), n.apply(new f("Recover Items block config from saved module")), this._markCurrencyHealed(i.blockInstanceId);
85
104
  }
86
105
  /**
87
106
  * Bakes the compiler-read DOM attributes (`data-type`, `data-number`, `data-nodup`) onto the
@@ -91,14 +110,51 @@ class E extends C {
91
110
  * restored before export. The name `<a>` carries no data-type/data-number of its own and
92
111
  * relies on this td-level fallback in pairProductVariables.
93
112
  */
94
- _stampProductTdDomAttributes(n, t, a, e = !1) {
95
- const o = D(t.itemsSelectValue, t.type), r = (i, s) => {
96
- e && n.getAttribute(i) || a.modifyHtml(n).setAttribute(i, s);
113
+ _stampProductTdDomAttributes(e, r, s, o = !1) {
114
+ const i = B(r.itemsSelectValue, r.type), n = (t, a) => {
115
+ o && e.getAttribute(t) || s.modifyHtml(e).setAttribute(t, a);
97
116
  };
98
- r("data-type", t.type), r("data-number", o), r("data-nodup", String(t.priceHideDiscount));
117
+ n("data-type", r.type), n("data-number", i), n("data-nodup", String(r.priceHideDiscount));
118
+ }
119
+ /**
120
+ * Whether a currency self-heal pass should run for this block (SD-147588). The only gate here is
121
+ * once-per-session: heal each instance at most once, so the auto-fix can't fight undo (undo
122
+ * re-drifts the attr, which would otherwise re-trigger the heal forever). The position-vs-symbol
123
+ * authority split lives in `_reconcileCurrencyDomAttributes` — position is always authoritative,
124
+ * the symbol write alone is skipped for the 'USD' sentinel — so we must NOT gate the whole pass
125
+ * on symbol customization here, or a default-symbol block with a toggled location never heals.
126
+ */
127
+ _shouldReconcileCurrency(e) {
128
+ return !e.blockInstanceId || !this._currencyHealed.has(e.blockInstanceId);
129
+ }
130
+ /** Marks a block instance's currency as reconciled so it is not healed again (undo-safe). */
131
+ _markCurrencyHealed(e) {
132
+ e && this._currencyHealed.add(e);
133
+ }
134
+ /**
135
+ * Stamps the export-read currency attrs onto every price `<p>` from config, so a template whose
136
+ * attrs drifted (e.g. a location toggle before the sync fix) self-heals to match the editor.
137
+ * Config is the source of truth — never derive from visible text.
138
+ *
139
+ * Position and symbol differ in authority (SD-147588):
140
+ * - `data-curency` (position) comes from `priceCurrencyLocation`, captured independently of the
141
+ * symbol, so it is ALWAYS authoritative and healed whenever it drifts — even with a default
142
+ * symbol (otherwise the default-symbol + toggled-location case stays broken on export).
143
+ * - `data-currency_symbol` is stamped only for a customized symbol; the 'USD' sentinel may be a
144
+ * migrator default, so we trust the DOM's real value over it and never overwrite.
145
+ *
146
+ * Returns true only when an attr actually changed, so the caller can skip an empty apply that
147
+ * would otherwise re-trigger onDocumentChanged and loop.
148
+ */
149
+ _reconcileCurrencyDomAttributes(e, r, s) {
150
+ const o = r.priceCurrencyLocation, i = o != null && String(o).trim() !== "", n = H(o), t = (r.priceCurrencySymbol ?? "").trim(), a = R(t), d = e.querySelectorAll(`.${O.PRICE} p`);
151
+ let l = !1;
152
+ return d.forEach((c) => {
153
+ i && c.getAttribute(y.POSITION) !== n && (s.modifyHtml(c).setAttribute(y.POSITION, n), l = !0), a && c.getAttribute(y.SYMBOL) !== t && (s.modifyHtml(c).setAttribute(y.SYMBOL, t), l = !0);
154
+ }), l;
99
155
  }
100
156
  }
101
157
  export {
102
- p as BLOCK_ID,
103
- E as ItemsBlock
158
+ k as BLOCK_ID,
159
+ K as ItemsBlock
104
160
  };
@@ -0,0 +1,17 @@
1
+ import { DefaultConfigValues as t } from "../enums/settingsEnums.js";
2
+ const e = {
3
+ POSITION: "data-curency",
4
+ SYMBOL: "data-currency_symbol"
5
+ };
6
+ function c(r) {
7
+ return r === "1" ? "after" : "before";
8
+ }
9
+ function u(r) {
10
+ const o = (r ?? "").trim();
11
+ return o !== "" && o !== t.productPriceCurrencySymbolControlValue;
12
+ }
13
+ export {
14
+ e as ITEMS_CURRENCY_ATTR,
15
+ c as currencyPositionFromLocation,
16
+ u as isCustomCurrencySymbol
17
+ };
@@ -1,14 +1,15 @@
1
- import { currencyLocationMaps as u } from "../../../../../enums/extensions/recommendationBlock.js";
2
- import { UEAttr as R, ModificationDescription as L } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
- import { CommonControl as N } from "../../../common-control.js";
1
+ import { currencyLocationMaps as p } from "../../../../../enums/extensions/recommendationBlock.js";
2
+ import { UEAttr as N, ModificationDescription as I } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
+ import { CommonControl as L } from "../../../common-control.js";
4
+ import { ITEMS_CURRENCY_ATTR as T, currencyPositionFromLocation as E } from "../../constants/currency.js";
4
5
  import { ItemsBlockControlId as m } from "../../enums/controlEnums.js";
5
- import { getItemsBlockConfig as C, setItemsBlockConfig as I, escapeReplacement as T } from "../../utils/nodeConfigUtils.js";
6
- const E = m.PRICE_CURRENCY_LOCATION, c = {
6
+ import { getItemsBlockConfig as l, setItemsBlockConfig as O, escapeReplacement as f } from "../../utils/nodeConfigUtils.js";
7
+ const b = m.PRICE_CURRENCY_LOCATION, c = {
7
8
  CURRENCY_LOCATION: "currencyLocation"
8
9
  };
9
- class A extends N {
10
+ class Y extends L {
10
11
  getId() {
11
- return E;
12
+ return b;
12
13
  }
13
14
  getTemplate() {
14
15
  return `
@@ -18,32 +19,32 @@ class A extends N {
18
19
  `;
19
20
  }
20
21
  onRender() {
21
- const e = C(this.currentNode);
22
- this.api.setUIEAttribute(c.CURRENCY_LOCATION, R.SELECTPICKER.items, u), this.api.updateValues({ [c.CURRENCY_LOCATION]: (e == null ? void 0 : e.priceCurrencyLocation) ?? "0" }), this.api.onValueChanged(c.CURRENCY_LOCATION, (t) => {
22
+ const e = l(this.currentNode);
23
+ this.api.setUIEAttribute(c.CURRENCY_LOCATION, N.SELECTPICKER.items, p), this.api.updateValues({ [c.CURRENCY_LOCATION]: (e == null ? void 0 : e.priceCurrencyLocation) ?? "0" }), this.api.onValueChanged(c.CURRENCY_LOCATION, (t) => {
23
24
  this._onCurrencyLocationChange(t);
24
25
  });
25
26
  }
26
27
  onTemplateNodeUpdated(e) {
27
28
  super.onTemplateNodeUpdated(e), this.handleBlockInstanceChange(() => {
28
- const t = C(this.currentNode);
29
+ const t = l(this.currentNode);
29
30
  this.api.updateValues({ [c.CURRENCY_LOCATION]: (t == null ? void 0 : t.priceCurrencyLocation) ?? "0" });
30
31
  });
31
32
  }
32
33
  _onCurrencyLocationChange(e) {
33
- if (console.debug("Currency location changed to: ", e), I(this.currentNode, this.api, { priceCurrencyLocation: e }), !this.currentNode)
34
+ if (console.debug("Currency location changed to: ", e), O(this.currentNode, this.api, { priceCurrencyLocation: e }), !this.currentNode)
34
35
  return;
35
36
  const t = this._getPriceBlocks();
36
37
  if (!t || t.length === 0)
37
38
  return;
38
- const r = C(this.currentNode), n = e || "0", o = (r == null ? void 0 : r.priceCurrencySymbol) ?? "", i = this.api.getDocumentModifier();
39
- t.forEach((a) => {
40
- const s = this._getParagraph(a);
41
- if (!s)
39
+ const r = l(this.currentNode), n = e || "0", o = (r == null ? void 0 : r.priceCurrencySymbol) ?? "", i = E(n), s = this.api.getDocumentModifier();
40
+ t.forEach((h) => {
41
+ const a = this._getParagraph(h);
42
+ if (!a)
42
43
  return;
43
- const h = s.getInnerHTML().trim() || "", l = s.getInnerText().trim() || "", p = (o == null ? void 0 : o.trim()) || "", d = this._removeCurrencySymbol(l, p), g = this._detectSymbolInText(l) || p, _ = this._buildPriceContent(d, g, n), y = h.replace(l, T(_));
44
- i.modifyHtml(s).setInnerHtml(y);
45
- }), i.apply(new L(
46
- `Updated currency location to ${n === "1" ? "after" : "before"}`
44
+ const d = a.getInnerHTML().trim() || "", C = a.getInnerText().trim() || "", u = (o == null ? void 0 : o.trim()) || "", _ = this._removeCurrencySymbol(C, u), g = this._detectSymbolInText(C) || u, R = this._buildPriceContent(_, g, n), y = d.replace(C, f(R));
45
+ s.modifyHtml(a).setInnerHtml(y).setAttribute(T.POSITION, i);
46
+ }), s.apply(new I(
47
+ `Updated currency location to ${i}`
47
48
  ));
48
49
  }
49
50
  _getPriceBlocks() {
@@ -65,8 +66,8 @@ class A extends N {
65
66
  } else {
66
67
  const o = r.match(/([^0-9.,\s]+)/);
67
68
  if (o && o[1]) {
68
- const i = o[1].trim(), a = new RegExp(`\\s*${this._escapeRegex(i)}\\s*`);
69
- n = r.replace(a, "").trim();
69
+ const i = o[1].trim(), s = new RegExp(`\\s*${this._escapeRegex(i)}\\s*`);
70
+ n = r.replace(s, "").trim();
70
71
  }
71
72
  }
72
73
  return n;
@@ -85,13 +86,13 @@ class A extends N {
85
86
  this._GuSelect({
86
87
  name: c.CURRENCY_LOCATION,
87
88
  placeholder: "",
88
- options: u
89
+ options: p
89
90
  })
90
91
  ])}
91
92
  `;
92
93
  }
93
94
  }
94
95
  export {
95
- E as CONTROL_BLOCK_ID,
96
- A as PriceCurrencyLocationControl
96
+ b as CONTROL_BLOCK_ID,
97
+ Y as PriceCurrencyLocationControl
97
98
  };
@@ -1,20 +1,21 @@
1
1
  var R = Object.defineProperty;
2
2
  var N = (s, c, e) => c in s ? R(s, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[c] = e;
3
3
  var h = (s, c, e) => N(s, typeof c != "symbol" ? c + "" : c, e);
4
- import { ModificationDescription as B } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
- import { CommonControl as E } from "../../../common-control.js";
4
+ import { ModificationDescription as E } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
+ import { CommonControl as B } from "../../../common-control.js";
6
+ import { ITEMS_CURRENCY_ATTR as T } from "../../constants/currency.js";
6
7
  import { ItemsBlockControlId as y } from "../../enums/controlEnums.js";
7
- import { getItemsBlockConfig as p, setItemsBlockConfig as x, escapeReplacement as f } from "../../utils/nodeConfigUtils.js";
8
- const I = y.PRICE_CURRENCY_SYMBOL, u = {
8
+ import { getItemsBlockConfig as p, setItemsBlockConfig as Y, escapeReplacement as f } from "../../utils/nodeConfigUtils.js";
9
+ const x = y.PRICE_CURRENCY_SYMBOL, u = {
9
10
  CURRENCY_SYMBOL: "currencySymbol"
10
11
  };
11
- class P extends E {
12
+ class $ extends B {
12
13
  constructor() {
13
14
  super(...arguments);
14
15
  h(this, "originalPriceContents", /* @__PURE__ */ new Map());
15
16
  }
16
17
  getId() {
17
- return I;
18
+ return x;
18
19
  }
19
20
  getTemplate() {
20
21
  return `
@@ -42,7 +43,7 @@ class P extends E {
42
43
  var a;
43
44
  console.debug("Currency symbol changed to: ", e);
44
45
  const t = p(this.currentNode), o = ((a = t == null ? void 0 : t.priceCurrencySymbol) == null ? void 0 : a.trim()) || "";
45
- if (x(this.currentNode, this.api, { priceCurrencySymbol: e }), !this.currentNode)
46
+ if (Y(this.currentNode, this.api, { priceCurrencySymbol: e }), !this.currentNode)
46
47
  return;
47
48
  const r = this._getPriceBlocks();
48
49
  if (!r || r.length === 0)
@@ -53,8 +54,8 @@ class P extends E {
53
54
  if (!m)
54
55
  return;
55
56
  const g = m.getInnerHTML().trim() || "", C = m.getInnerText().trim() || "", _ = this._removeCurrencySymbol(C, o), S = this._buildPriceContent(_, n, l), b = g.replace(C, f(S));
56
- i.modifyHtml(m).setInnerHtml(b).setAttribute("data-currency_symbol", n);
57
- }), i.apply(new B(
57
+ i.modifyHtml(m).setInnerHtml(b).setAttribute(T.SYMBOL, n);
58
+ }), i.apply(new E(
58
59
  `Updated currency symbol to ${n || "removed"}`
59
60
  ));
60
61
  }
@@ -115,6 +116,6 @@ class P extends E {
115
116
  }
116
117
  }
117
118
  export {
118
- I as CONTROL_BLOCK_ID,
119
- P as PriceCurrencySymbolControl
119
+ x as CONTROL_BLOCK_ID,
120
+ $ as PriceCurrencySymbolControl
120
121
  };
@@ -1,24 +1,25 @@
1
1
  import { escapeHtml as m } from "../../../utils/htmlEscape.js";
2
- import { BlockType as R, BlockAttr as S } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
- import { ItemsBlockId as O } from "./enums/controlEnums.js";
4
- import { productPairs as h, templateFirstLine as q } from "./enums/productEnums.js";
5
- import { ItemInCartOptions as j, SETTINGS_ENUMS as N, DefaultConfigValues as M } from "./enums/settingsEnums.js";
6
- import C from "./layouts/horizontal.html.js";
7
- import J from "./layouts/vertical.html.js";
8
- import { deriveItemNumber as Z, escapeReplacement as g } from "./utils/nodeConfigUtils.js";
9
- let [v] = h.PAIRS_FOR_EXTENSION.imageSrc.CART_ITEMS.DEFAULT, [F] = h.PAIRS_FOR_EXTENSION.name.CART_ITEMS.DEFAULT, [x] = h.PAIRS_FOR_EXTENSION.price.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [L] = h.PAIRS_FOR_EXTENSION.originalPrice.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [X] = h.PAIRS_FOR_EXTENSION.quantity.CART_ITEMS.DEFAULT;
10
- const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCase().startsWith(e.toLowerCase())).join("; ").replace(/;\s*$/, ""), k = (s) => U(s, "text-align"), y = (s, e) => {
11
- const r = new RegExp(`${e}\\s*:\\s*([^;]+)`, "i"), a = s.match(r);
12
- return a ? a[1].trim() : null;
13
- }, w = (s) => `<tr>${s}</tr>`, f = (s, e, r, a) => {
14
- const i = r || M.productImageHeight, d = (a == null ? void 0 : a.imageVisible) === !1 ? "display: none; " : "";
15
- return w(`
2
+ import { BlockType as R, BlockAttr as w } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
+ import { ITEMS_CURRENCY_ATTR as U, currencyPositionFromLocation as z } from "./constants/currency.js";
4
+ import { ItemsBlockId as _ } from "./enums/controlEnums.js";
5
+ import { productPairs as h, templateFirstLine as j } from "./enums/productEnums.js";
6
+ import { ItemInCartOptions as J, SETTINGS_ENUMS as y, DefaultConfigValues as k } from "./enums/settingsEnums.js";
7
+ import Z from "./layouts/horizontal.html.js";
8
+ import f from "./layouts/vertical.html.js";
9
+ import { deriveItemNumber as tt, escapeReplacement as g } from "./utils/nodeConfigUtils.js";
10
+ let [G] = h.PAIRS_FOR_EXTENSION.imageSrc.CART_ITEMS.DEFAULT, [F] = h.PAIRS_FOR_EXTENSION.name.CART_ITEMS.DEFAULT, [L] = h.PAIRS_FOR_EXTENSION.price.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [x] = h.PAIRS_FOR_EXTENSION.originalPrice.CART_ITEMS.DEFAULT_PRICE_FORMATTED, [v] = h.PAIRS_FOR_EXTENSION.quantity.CART_ITEMS.DEFAULT;
11
+ const M = (a, e) => a.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCase().startsWith(e.toLowerCase())).join("; ").replace(/;\s*$/, ""), V = (a) => M(a, "text-align"), S = (a, e) => {
12
+ const r = new RegExp(`${e}\\s*:\\s*([^;]+)`, "i"), s = a.match(r);
13
+ return s ? s[1].trim() : null;
14
+ }, N = (a) => `<tr>${a}</tr>`, et = (a, e, r, s) => {
15
+ const i = r || k.productImageHeight, d = (s == null ? void 0 : s.imageVisible) === !1 ? "display: none; " : "";
16
+ return N(`
16
17
  <td class="esd-block-image document-node-component default-block-component selectable ng-star-inserted"
17
18
  align="center"
18
- esd-extension-block-id="${O.IMAGE}"
19
+ esd-extension-block-id="${_.IMAGE}"
19
20
  data-slot-1=""
20
21
  product-attr="imageSrc"
21
- data-type="${s}"
22
+ data-type="${a}"
22
23
  data-number="${e}"
23
24
  style="${d}font-size: 0px;">
24
25
  <a class="document-node-component ng-star-inserted"
@@ -26,27 +27,27 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
26
27
  href="#!">
27
28
  <img class="adapt-img document-node-component ng-star-inserted"
28
29
  style="object-fit: contain;"
29
- src="${v}"
30
+ src="${G}"
30
31
  alt="${F}"
31
32
  width="${i}"
32
33
  height="${i}">
33
34
  </a>
34
35
  </td>
35
36
  `);
36
- }, tt = (s, e) => `
37
+ }, at = (a, e) => `
37
38
  <${R.BLOCK_IMAGE}
38
- ${S.BLOCK_IMAGE.src}="${v}"
39
- ${S.BLOCK_IMAGE.alt}="${F}"
40
- ${S.BLOCK_IMAGE.href}="#!"
41
- ${S.BLOCK_IMAGE.width}="${M.productImageWidth}"
42
- ${S.BLOCK_IMAGE.height}="${M.productImageWidth}"
43
- esd-extension-block-id="${O.IMAGE}"
39
+ ${w.BLOCK_IMAGE.src}="${G}"
40
+ ${w.BLOCK_IMAGE.alt}="${F}"
41
+ ${w.BLOCK_IMAGE.href}="#!"
42
+ ${w.BLOCK_IMAGE.width}="${k.productImageWidth}"
43
+ ${w.BLOCK_IMAGE.height}="${k.productImageWidth}"
44
+ esd-extension-block-id="${_.IMAGE}"
44
45
  data-slot-1
45
46
  product-attr="imageSrc"
46
- data-type="${s}"
47
+ data-type="${a}"
47
48
  data-number="${e}"
48
49
  />
49
- `, et = (s, e, r, a) => {
50
+ `, st = (a, e, r, s) => {
50
51
  const i = `
51
52
  word-wrap: break-word;
52
53
  white-space: nowrap;
@@ -56,27 +57,27 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
56
57
  max-width: 100%;
57
58
  `;
58
59
  if (e) {
59
- const d = y(r || "", "text-align") || "center", n = k(r || i), c = y(n, "font-weight"), l = y(n, "font-style"), o = c === "bold" || c === "700", t = l === "italic", p = U(
60
- U(
61
- U(n, "font-weight"),
60
+ const d = S(r || "", "text-align") || "center", n = V(r || i), c = S(n, "font-weight"), l = S(n, "font-style"), o = c === "bold" || c === "700", t = l === "italic", p = M(
61
+ M(
62
+ M(n, "font-weight"),
62
63
  "font-style"
63
64
  ),
64
65
  "text-decoration"
65
- ), T = (a == null ? void 0 : a.nameVisible) === !1 ? "display: none;" : "display: table-cell;", _ = p ? ` style="${m(p)}"` : "";
66
- let E = F;
67
- return o && (E = `<strong>${E}</strong>`), t && (E = `<em>${E}</em>`), w(`
66
+ ), T = (s == null ? void 0 : s.nameVisible) === !1 ? "display: none;" : "display: table-cell;", u = p ? ` style="${m(p)}"` : "";
67
+ let $ = F;
68
+ return o && ($ = `<strong>${$}</strong>`), t && ($ = `<em>${$}</em>`), N(`
68
69
  <td class="esd-block-text es-p10"
69
70
  align="${d}"
70
71
  width="100%"
71
72
  colspan="2"
72
- data-type="${s}"
73
- esd-extension-block-id="${O.NAME}"
73
+ data-type="${a}"
74
+ esd-extension-block-id="${_.NAME}"
74
75
  style="${T}">
75
76
  <p contenteditable="false"
76
77
  path="1"
77
78
  product-attr="name"
78
- data-slot-2${_}>
79
- ${E}
79
+ data-slot-2${u}>
80
+ ${$}
80
81
  </p>
81
82
  </td>
82
83
  `);
@@ -86,8 +87,8 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
86
87
  align="center"
87
88
  colspan="2"
88
89
  class="es-p10"
89
- data-type="${s}"
90
- esd-extension-block-id="${O.NAME}"
90
+ data-type="${a}"
91
+ esd-extension-block-id="${_.NAME}"
91
92
  >
92
93
  <p contenteditable="false"
93
94
  product-attr="name"
@@ -97,31 +98,31 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
97
98
  </p>
98
99
  </${R.BLOCK_TEXT}>
99
100
  `;
100
- }, at = (s, e, r, a, i, d, n, c, l, o) => {
101
- let t = x;
102
- if (a && a.trim()) {
103
- const $ = `${a.trim()}`;
104
- t = (i || "0") === "1" ? `${x}&nbsp;${$}` : `${$}&nbsp;${x}`;
101
+ }, lt = (a, e, r, s, i, d, n, c, l, o) => {
102
+ let t = L;
103
+ if (s && s.trim()) {
104
+ const E = `${s.trim()}`;
105
+ t = (i || "0") === "1" ? `${L}&nbsp;${E}` : `${E}&nbsp;${L}`;
105
106
  }
106
- const p = i === "1" ? "after" : "before", T = `data-formated="${r ? "true" : "false"}"`, _ = `data-curency="${p}"`, E = a ? `data-currency_symbol="${a}"` : "", u = `data-single_price="${c ? "true" : "false"}"`, I = l === N.ORIENTATION.VERTICAL ? " es-p10b es-p10t" : "";
107
+ const p = z(i), T = `data-formated="${r ? "true" : "false"}"`, u = `${U.POSITION}="${p}"`, $ = s ? `${U.SYMBOL}="${s}"` : "", O = `data-single_price="${c ? "true" : "false"}"`, b = l === y.ORIENTATION.VERTICAL ? " es-p10b es-p10t" : "";
107
108
  if (d) {
108
- const b = k(n || "color: #060606; white-space: nowrap; font-size: 20px;"), A = o ? "" : ' style="display: none;"';
109
- return w(`
110
- <td class="esd-block-text items-block-price${I}"
109
+ const I = V(n || "color: #060606; white-space: nowrap; font-size: 20px;"), P = o ? "" : ' style="display: none;"';
110
+ return N(`
111
+ <td class="esd-block-text items-block-price${b}"
111
112
  align="center"
112
- esd-extension-block-id="${O.PRICE}"
113
+ esd-extension-block-id="${_.PRICE}"
113
114
  width="100%"
114
- ${A}>
115
+ ${P}>
115
116
  <p product-attr="price"
116
117
  contenteditable="false"
117
118
  data-slot-4
118
- data-type="${s}"
119
+ data-type="${a}"
119
120
  data-number="${e}"
120
121
  ${T}
121
- ${_}
122
- ${E}
123
122
  ${u}
124
- style="${m(b)}">
123
+ ${$}
124
+ ${O}
125
+ style="${m(I)}">
125
126
  ${t}
126
127
  </p>
127
128
  </td>
@@ -129,8 +130,8 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
129
130
  }
130
131
  return `
131
132
  <${R.BLOCK_TEXT}
132
- esd-extension-block-id="${O.PRICE}"
133
- class="items-block-price ${I}"
133
+ esd-extension-block-id="${_.PRICE}"
134
+ class="items-block-price ${b}"
134
135
  width="100%"
135
136
  align="center"
136
137
  >
@@ -138,42 +139,42 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
138
139
  product-attr="price"
139
140
  contenteditable="false"
140
141
  data-slot-4
141
- data-type="${s}"
142
+ data-type="${a}"
142
143
  data-number="${e}"
143
144
  ${T}
144
- ${_}
145
- ${a ? `data-currency_symbol="${a}"` : ""}
146
145
  ${u}
146
+ ${$}
147
+ ${O}
147
148
  >
148
149
  ${t}
149
150
  </p>
150
151
  </${R.BLOCK_TEXT}>
151
152
  `;
152
- }, st = (s, e, r, a, i, d, n = !0, c, l, o) => {
153
- let t = L;
154
- if (a && a.trim()) {
155
- const $ = `${a.trim()}`;
156
- t = (i || "0") === "1" ? `${L}&nbsp;${$}` : `${$}&nbsp;${L}`;
153
+ }, rt = (a, e, r, s, i, d, n = !0, c, l, o) => {
154
+ let t = x;
155
+ if (s && s.trim()) {
156
+ const I = `${s.trim()}`;
157
+ t = (i || "0") === "1" ? `${x}&nbsp;${I}` : `${I}&nbsp;${x}`;
157
158
  }
158
- const p = i === "1" ? "after" : "before", T = `data-formated="${r ? "true" : "false"}"`, _ = `data-curency="${p}"`, E = n ? "" : ' style="display: none;"', u = `data-single_price="${l ? "true" : "false"}"`, I = o === N.ORIENTATION.VERTICAL ? " es-p10b es-p10t" : "";
159
+ const p = z(i), T = `data-formated="${r ? "true" : "false"}"`, u = `${U.POSITION}="${p}"`, $ = s ? `${U.SYMBOL}="${s}"` : "", O = n ? "" : ' style="display: none;"', A = `data-single_price="${l ? "true" : "false"}"`, E = o === y.ORIENTATION.VERTICAL ? " es-p10b es-p10t" : "";
159
160
  if (d) {
160
- const b = k(c || "color: #cc0000; white-space: nowrap; font-size: 19px;");
161
- return w(`
162
- <td class="esd-block-text items-block-price${I}"
163
- esd-extension-block-id="${O.ORIGINAL_PRICE}"
161
+ const P = V(c || "color: #cc0000; white-space: nowrap; font-size: 19px;");
162
+ return N(`
163
+ <td class="esd-block-text items-block-price${E}"
164
+ esd-extension-block-id="${_.ORIGINAL_PRICE}"
164
165
  width="100%"
165
- align="center"${E}>
166
+ align="center"${O}>
166
167
  <p
167
168
  product-attr="originalPrice"
168
169
  contenteditable="false"
169
170
  data-slot-5
170
- data-type="${s}"
171
+ data-type="${a}"
171
172
  data-number="${e}"
172
173
  ${T}
173
- ${_}
174
- ${a ? `data-currency_symbol="${a}"` : ""}
175
174
  ${u}
176
- style="${m(b)}">
175
+ ${$}
176
+ ${A}
177
+ style="${m(P)}">
177
178
  <s>${t}</s>
178
179
  </p>
179
180
  </td>
@@ -181,8 +182,8 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
181
182
  }
182
183
  return `
183
184
  <${R.BLOCK_TEXT}
184
- class="items-block-price ${I}"
185
- esd-extension-block-id="${O.ORIGINAL_PRICE}"
185
+ class="items-block-price ${E}"
186
+ esd-extension-block-id="${_.ORIGINAL_PRICE}"
186
187
  width="100%"
187
188
  align="center"
188
189
  ${n ? "" : 'style="display: none;"'}
@@ -192,33 +193,33 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
192
193
  contenteditable="false"
193
194
  data-slot-5
194
195
  style="color: #cc0000"
195
- data-type="${s}"
196
+ data-type="${a}"
196
197
  data-number="${e}"
197
198
  ${T}
198
- ${_}
199
- ${a ? `data-currency_symbol="${a}"` : ""}
200
199
  ${u}
200
+ ${$}
201
+ ${A}
201
202
  >
202
203
  <s>${t}</s>
203
204
  </p>
204
205
  </${R.BLOCK_TEXT}>
205
206
  `;
206
- }, lt = (s = !0, e, r) => {
207
- const a = s ? "" : 'style="display: none;"';
207
+ }, ct = (a = !0, e, r) => {
208
+ const s = a ? "" : 'style="display: none;"';
208
209
  if (e) {
209
- const i = "font-size: 14px;", d = y(r || "", "text-align") || "center", n = k(r || i);
210
- return w(`
210
+ const i = "font-size: 14px;", d = S(r || "", "text-align") || "center", n = V(r || i);
211
+ return N(`
211
212
  <td class="esd-block-text es-p10 document-node-component default-block-component selectable"
212
213
  width="100%" align="${d}"
213
- esd-extension-block-id="${O.QUANTITY}"
214
- ${a}>
214
+ esd-extension-block-id="${_.QUANTITY}"
215
+ ${s}>
215
216
  <p product-attr="quantity"
216
217
  data-slot-3=""
217
218
  contenteditable="false"
218
219
  width="100%"
219
220
  path="1"
220
221
  style="${m(n)}">
221
- ${X}
222
+ ${v}
222
223
  </p>
223
224
  </td>
224
225
  `);
@@ -228,26 +229,26 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
228
229
  width="100%"
229
230
  align="center"
230
231
  class="es-p10"
231
- esd-extension-block-id="${O.QUANTITY}"
232
- ${s ? "" : 'style="display: none;"'}
232
+ esd-extension-block-id="${_.QUANTITY}"
233
+ ${a ? "" : 'style="display: none;"'}
233
234
  >
234
235
  <p
235
236
  product-attr="quantity"
236
237
  data-slot-3
237
238
  contenteditable="false"
238
239
  width="100%">
239
- ${X}
240
+ ${v}
240
241
  </p>
241
242
  </${R.BLOCK_TEXT}>
242
243
  `;
243
- }, rt = (s, e, r = "Buy", a, i, d = !0, n = !0) => {
244
- if (a) {
245
- const c = y(i || "", "background") || y(i || "", "background-color"), l = c ? `border-width: 0px; background: ${c};` : "border-width: 0px;", o = d ? "es-fw" : "es-il", t = (i || "").replace("border-width: 0;", "");
246
- return w(`
244
+ }, it = (a, e, r = "Buy", s, i, d = !0, n = !0) => {
245
+ if (s) {
246
+ const c = S(i || "", "background") || S(i || "", "background-color"), l = c ? `border-width: 0px; background: ${c};` : "border-width: 0px;", o = d ? "es-fw" : "es-il", t = (i || "").replace("border-width: 0;", "");
247
+ return N(`
247
248
  <td class="esd-block-button ins-button default-block-component selectable"
248
249
  align="center" width="100%" name="buy-button" caption="${r}"
249
- esd-extension-block-id="${O.BUTTON}"
250
- product-attr="button" data-slot-6="" data-type="${s}" data-number="${e}"
250
+ esd-extension-block-id="${_.BUTTON}"
251
+ product-attr="button" data-slot-6="" data-type="${a}" data-number="${e}"
251
252
  ${n ? "" : ' style="display: none;"'}>
252
253
  <span class="es-button-border ${o}" style="${m(l)}">
253
254
  <a
@@ -268,19 +269,19 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
268
269
  name="buy-button"
269
270
  caption="${r}"
270
271
  align="center"
271
- esd-extension-block-id="${O.BUTTON}"
272
+ esd-extension-block-id="${_.BUTTON}"
272
273
  product-attr="button"
273
274
  data-slot-6
274
- data-type="${s}"
275
+ data-type="${a}"
275
276
  data-number="${e}"
276
277
  >${r}
277
278
  </${R.BLOCK_BUTTON}>
278
279
  `;
279
- }, ct = (s, e, r, a = !0, i = !0) => {
280
- const d = e === N.ORIENTATION.VERTICAL, n = r === "horizontal";
280
+ }, nt = (a, e, r, s = !0, i = !0) => {
281
+ const d = e === y.ORIENTATION.VERTICAL, n = r === "horizontal";
281
282
  if (d) {
282
- const c = !n, l = c || !i ? "100%" : "50%", o = c || !a ? "100%" : "50%";
283
- let t = s.replace(
283
+ const c = !n, l = c || !i ? "100%" : "50%", o = c || !s ? "100%" : "50%";
284
+ let t = a.replace(
284
285
  /<td\s+[^>]*class="([^"]*product-price-class[^"]*)"[^>]*>/gi,
285
286
  (p) => p.replace(/width="[^"]*"/gi, `width="${l}"`).replace(/width:\s*[^;]+;/gi, `width: ${l};`)
286
287
  );
@@ -289,64 +290,64 @@ const U = (s, e) => s.split(";").map((r) => r.trim()).filter((r) => !r.toLowerCa
289
290
  (p) => p.replace(/width="[^"]*"/gi, `width="${o}"`).replace(/width:\s*[^;]+;/gi, `width: ${o};`)
290
291
  ), t;
291
292
  }
292
- return n ? s : s.replace(
293
+ return n ? a : a.replace(
293
294
  /<td\s+[^>]*class="[^"]*horizontal-price[^"]*"[^>]*>/gi,
294
295
  (c) => /style\s*=\s*"/i.test(c) ? c.replace(/style\s*=\s*"([^"]*)"/i, 'style="display: none; $1"') : c.replace(/>$/, ' style="display: none;">')
295
296
  ).replace(
296
297
  /<td\s+[^>]*class="[^"]*vertical-price[^"]*"[^>]*>/gi,
297
298
  (c) => c.replace(/display:\s*none;?/gi, "display: table-cell;")
298
299
  );
299
- }, it = (s) => s ? `<td align="center"
300
+ }, dt = (a) => a ? `<td align="center"
300
301
  esd-extension-block-id="items-block"
301
- class="ins-product-td items-block items-block-v2 esd-items-block esd-extension-block esd-container-frame">` : q, B = (s, e, r, a, i, d, n, c, l, o, t, p, T, _ = "horizontal", E, u, P, I) => {
302
- const $ = o !== void 0 ? ` data-nodup="${o}"` : "", A = `${`data-type="${e}" data-number="${r}"`} data-orientation="${a}"${$}`, D = l == null ? void 0 : l["data-product_image_control_image-height"], V = d ? f(e, r, D, t) : tt(e, r), W = (t == null ? void 0 : t.buttonLabel) || "Buy", z = (t == null ? void 0 : t.buttonFullWidth) !== void 0 ? t.buttonFullWidth : !0, H = e === N.ITEMS_TYPE.BROWSED_ITEMS ? !1 : t == null ? void 0 : t.quantityControlEnabled, Q = (t == null ? void 0 : t.buttonVisible) !== void 0 ? t.buttonVisible : (l == null ? void 0 : l["data-product_button_control_enabled"]) !== "false", G = (t == null ? void 0 : t.priceVisible) !== void 0 ? t.priceVisible : (l == null ? void 0 : l["data-product_price_control_enabled"]) !== "false", K = (t == null ? void 0 : t.originalPriceVisible) !== void 0 ? t.originalPriceVisible : (l == null ? void 0 : l["data-product_original_price_control_enabled"]) !== "false", Y = s.replace("{-{-TEMPLATE_FIRST_LINE-}-}", it(d)).replace("{-{-PRODUCT_IMAGE-}-}", V).replace("{-{-PRODUCT_NAME-}-}", et(e, d, p, t)).replaceAll(
302
+ class="ins-product-td items-block items-block-v2 esd-items-block esd-extension-block esd-container-frame">` : j, W = (a, e, r, s, i, d, n, c, l, o, t, p, T, u = "horizontal", $, O, A, b) => {
303
+ const E = o !== void 0 ? ` data-nodup="${o}"` : "", P = `${`data-type="${e}" data-number="${r}"`} data-orientation="${s}"${E}`, D = l == null ? void 0 : l["data-product_image_control_image-height"], X = d ? et(e, r, D, t) : at(e, r), H = (t == null ? void 0 : t.buttonLabel) || "Buy", Q = (t == null ? void 0 : t.buttonFullWidth) !== void 0 ? t.buttonFullWidth : !0, Y = e === y.ITEMS_TYPE.BROWSED_ITEMS ? !1 : t == null ? void 0 : t.quantityControlEnabled, q = (t == null ? void 0 : t.buttonVisible) !== void 0 ? t.buttonVisible : (l == null ? void 0 : l["data-product_button_control_enabled"]) !== "false", K = (t == null ? void 0 : t.priceVisible) !== void 0 ? t.priceVisible : (l == null ? void 0 : l["data-product_price_control_enabled"]) !== "false", B = (t == null ? void 0 : t.originalPriceVisible) !== void 0 ? t.originalPriceVisible : (l == null ? void 0 : l["data-product_original_price_control_enabled"]) !== "false", C = a.replace("{-{-TEMPLATE_FIRST_LINE-}-}", dt(d)).replace("{-{-PRODUCT_IMAGE-}-}", X).replace("{-{-PRODUCT_NAME-}-}", st(e, d, p, t)).replaceAll(
303
304
  "{-{-PRODUCT_PRICE-}-}",
304
- g(at(
305
+ g(lt(
305
306
  e,
306
307
  r,
307
308
  i,
308
309
  n,
309
310
  c,
310
311
  d,
311
- E,
312
- I,
313
- a,
314
- G
312
+ $,
313
+ b,
314
+ s,
315
+ K
315
316
  ))
316
317
  ).replaceAll(
317
318
  "{-{-PRODUCT_ORIGINAL_PRICE-}-}",
318
- g(st(
319
+ g(rt(
319
320
  e,
320
321
  r,
321
322
  i,
322
323
  n,
323
324
  c,
324
325
  d,
325
- K,
326
- u,
327
- I,
328
- a
326
+ B,
327
+ O,
328
+ b,
329
+ s
329
330
  ))
330
- ).replace("{-{-PRODUCT_QUANTITY-}-}", lt(H, d, P)).replace(
331
+ ).replace("{-{-PRODUCT_QUANTITY-}-}", ct(Y, d, A)).replace(
331
332
  "{-{-PRODUCT_BUTTON-}-}",
332
- rt(e, r, W, d, T, z, Q)
333
+ it(e, r, H, d, T, Q, q)
333
334
  ).replace(
334
335
  /<td([^>]*class="[^"]*ins-product-td[^"]*"[^>]*)>/,
335
- `<td$1 ${A}>`
336
+ `<td$1 ${P}>`
336
337
  );
337
- return ct(
338
- Y,
339
- a,
340
- _,
341
- G,
342
- K
338
+ return nt(
339
+ C,
340
+ s,
341
+ u,
342
+ K,
343
+ B
343
344
  );
344
345
  };
345
- function It({
346
- orientation: s,
347
- itemsType: e = N.ITEMS_TYPE.CART_ITEMS,
346
+ function bt({
347
+ orientation: a,
348
+ itemsType: e = y.ITEMS_TYPE.CART_ITEMS,
348
349
  itemId: r,
349
- currencySymbol: a,
350
+ currencySymbol: s,
350
351
  currencyLocation: i,
351
352
  migrate: d = !1,
352
353
  formattedPrice: n = !0,
@@ -356,22 +357,22 @@ function It({
356
357
  buttonStyles: t,
357
358
  priceStyles: p,
358
359
  originalPriceStyles: T,
359
- quantityStyles: _,
360
- priceOrientation: E
360
+ quantityStyles: u,
361
+ priceOrientation: $
361
362
  }) {
362
- const u = j[e].findIndex((V) => V.value === r), P = Z(r, e), I = (l == null ? void 0 : l.priceSinglePrice) ?? (c == null ? void 0 : c["data-product_price_control_single_price"]) === "1" ?? !1;
363
- v = h.PAIRS_FOR_EXTENSION.imageSrc[e].DEFAULT[u >= 0 ? u : 0], F = h.PAIRS_FOR_EXTENSION.name[e].DEFAULT[u >= 0 ? u : 0];
364
- const $ = h.PAIRS_FOR_EXTENSION.price[e], b = h.PAIRS_FOR_EXTENSION.originalPrice[e];
365
- I ? (x = n ? $.DEFAULT_SINGLE_PRICE_FORMATTED : $.DEFAULT_SINGLE_PRICE, L = n ? b.DEFAULT_SINGLE_PRICE_FORMATTED : b.DEFAULT_SINGLE_PRICE) : (x = n ? $.DEFAULT_PRICE_FORMATTED : $.DEFAULT_PRICE, L = n ? b.DEFAULT_PRICE_FORMATTED : b.DEFAULT_PRICE), X = h.PAIRS_FOR_EXTENSION.quantity[e].DEFAULT;
366
- const A = E || (l == null ? void 0 : l.priceOrientation) || "horizontal", D = (l == null ? void 0 : l.priceHideDiscount) ?? M.productPriceHideDiscountControlValue === "1";
367
- return s === N.ORIENTATION.VERTICAL ? B(
368
- J,
363
+ const O = J[e].findIndex((X) => X.value === r), A = tt(r, e), b = (l == null ? void 0 : l.priceSinglePrice) ?? (c == null ? void 0 : c["data-product_price_control_single_price"]) === "1" ?? !1;
364
+ G = h.PAIRS_FOR_EXTENSION.imageSrc[e].DEFAULT[O >= 0 ? O : 0], F = h.PAIRS_FOR_EXTENSION.name[e].DEFAULT[O >= 0 ? O : 0];
365
+ const E = h.PAIRS_FOR_EXTENSION.price[e], I = h.PAIRS_FOR_EXTENSION.originalPrice[e];
366
+ b ? (L = n ? E.DEFAULT_SINGLE_PRICE_FORMATTED : E.DEFAULT_SINGLE_PRICE, x = n ? I.DEFAULT_SINGLE_PRICE_FORMATTED : I.DEFAULT_SINGLE_PRICE) : (L = n ? E.DEFAULT_PRICE_FORMATTED : E.DEFAULT_PRICE, x = n ? I.DEFAULT_PRICE_FORMATTED : I.DEFAULT_PRICE), v = h.PAIRS_FOR_EXTENSION.quantity[e].DEFAULT;
367
+ const P = $ || (l == null ? void 0 : l.priceOrientation) || "horizontal", D = (l == null ? void 0 : l.priceHideDiscount) ?? k.productPriceHideDiscountControlValue === "1";
368
+ return a === y.ORIENTATION.VERTICAL ? W(
369
+ f,
369
370
  e,
370
- P,
371
- s,
371
+ A,
372
+ a,
372
373
  n,
373
374
  d,
374
- a,
375
+ s,
375
376
  i,
376
377
  c,
377
378
  String(D),
@@ -379,19 +380,19 @@ function It({
379
380
  l,
380
381
  o,
381
382
  t,
382
- A,
383
+ P,
383
384
  p,
384
385
  T,
385
- _,
386
- I
387
- ) : B(
388
- C,
386
+ u,
387
+ b
388
+ ) : W(
389
+ Z,
389
390
  e,
390
- P,
391
- s,
391
+ A,
392
+ a,
392
393
  n,
393
394
  d,
394
- a,
395
+ s,
395
396
  i,
396
397
  c,
397
398
  String(D),
@@ -399,14 +400,14 @@ function It({
399
400
  l,
400
401
  o,
401
402
  t,
402
- A,
403
+ P,
403
404
  p,
404
405
  T,
405
- _,
406
- I
406
+ u,
407
+ b
407
408
  );
408
409
  }
409
410
  export {
410
- It as getDefaultTemplate,
411
- w as wrapInTableRow
411
+ bt as getDefaultTemplate,
412
+ N as wrapInTableRow
412
413
  };
@@ -1,4 +1,4 @@
1
- const o = { stripo: { version: "2.73.0" } }, s = {
1
+ const o = { stripo: { version: "2.72.1" } }, s = {
2
2
  guido: o
3
3
  };
4
4
  export {
@@ -16,6 +16,8 @@ export declare const BLOCK_ID: BlockId;
16
16
  * - Onboarding support
17
17
  */
18
18
  export declare class ItemsBlock extends Block {
19
+ /** Block instances whose currency attrs were already self-healed this session (SD-147588 — undo-safe). */
20
+ private _currencyHealed;
19
21
  getId(): string;
20
22
  getIcon(): string;
21
23
  getBlockCompositionType(): BlockCompositionType;
@@ -42,4 +44,31 @@ export declare class ItemsBlock extends Block {
42
44
  * relies on this td-level fallback in pairProductVariables.
43
45
  */
44
46
  private _stampProductTdDomAttributes;
47
+ /**
48
+ * Whether a currency self-heal pass should run for this block (SD-147588). The only gate here is
49
+ * once-per-session: heal each instance at most once, so the auto-fix can't fight undo (undo
50
+ * re-drifts the attr, which would otherwise re-trigger the heal forever). The position-vs-symbol
51
+ * authority split lives in `_reconcileCurrencyDomAttributes` — position is always authoritative,
52
+ * the symbol write alone is skipped for the 'USD' sentinel — so we must NOT gate the whole pass
53
+ * on symbol customization here, or a default-symbol block with a toggled location never heals.
54
+ */
55
+ private _shouldReconcileCurrency;
56
+ /** Marks a block instance's currency as reconciled so it is not healed again (undo-safe). */
57
+ private _markCurrencyHealed;
58
+ /**
59
+ * Stamps the export-read currency attrs onto every price `<p>` from config, so a template whose
60
+ * attrs drifted (e.g. a location toggle before the sync fix) self-heals to match the editor.
61
+ * Config is the source of truth — never derive from visible text.
62
+ *
63
+ * Position and symbol differ in authority (SD-147588):
64
+ * - `data-curency` (position) comes from `priceCurrencyLocation`, captured independently of the
65
+ * symbol, so it is ALWAYS authoritative and healed whenever it drifts — even with a default
66
+ * symbol (otherwise the default-symbol + toggled-location case stays broken on export).
67
+ * - `data-currency_symbol` is stamped only for a customized symbol; the 'USD' sentinel may be a
68
+ * migrator default, so we trust the DOM's real value over it and never overwrite.
69
+ *
70
+ * Returns true only when an attr actually changed, so the caller can skip an empty apply that
71
+ * would otherwise re-trigger onDocumentChanged and loop.
72
+ */
73
+ private _reconcileCurrencyDomAttributes;
45
74
  }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Single owner for the Items price currency export contract (SD-147588).
3
+ *
4
+ * `data-curency` is deliberately misspelled (one `r`) — it is the attribute the
5
+ * server-side export transform (pairProductVariables) actually reads, so every
6
+ * layer that writes it and the live reader (template, controls, block self-heal,
7
+ * pairProductVariables) MUST go through these constants. A typo fix or mapping change
8
+ * in one of them would otherwise silently break sync with the others and ship the wrong
9
+ * currency position/token to the inbox. Mirrors the Recommendation block's `CURRENCY_ATTR`.
10
+ *
11
+ * Exception: the legacy migrator reads the raw misspelled string on purpose — it parses
12
+ * old templates frozen with that exact attr name, so it must NOT follow a future rename here.
13
+ */
14
+ export declare const ITEMS_CURRENCY_ATTR: {
15
+ readonly POSITION: "data-curency";
16
+ readonly SYMBOL: "data-currency_symbol";
17
+ };
18
+ /** Currency location select value `'1'` = after (price then symbol), anything else = before. */
19
+ export declare function currencyPositionFromLocation(location: string | undefined): 'after' | 'before';
20
+ /**
21
+ * Whether a currency symbol is a partner customization vs the 'USD' default sentinel (SD-144644).
22
+ * The default value means "use the catalog currency", so it is treated as NOT customized — the one
23
+ * rule shared by the export transform (pairProductVariables) and the block self-heal, kept here so
24
+ * the two layers can never drift. Trims first so a whitespace-only value is not read as custom.
25
+ */
26
+ export declare function isCustomCurrencySymbol(symbol: string | null | undefined): boolean;
@@ -1,82 +1,82 @@
1
+ import { ITEMS_CURRENCY_ATTR as D, isCustomCurrencySymbol as G } from "../extensions/Blocks/Items/constants/currency.js";
1
2
  import { productPairs as L } from "../extensions/Blocks/Items/enums/productEnums.js";
2
- import { DefaultConfigValues as V } from "../extensions/Blocks/Items/enums/settingsEnums.js";
3
- import { escapeReplacement as G } from "../extensions/Blocks/Items/utils/nodeConfigUtils.js";
3
+ import { escapeReplacement as X } from "../extensions/Blocks/Items/utils/nodeConfigUtils.js";
4
4
  import { preserveTextStyles as F } from "./preserveTextStyles.js";
5
- import { unwrapProductNameLinks as X } from "./unwrapProductNameLink.js";
5
+ import { unwrapProductNameLinks as Y } from "./unwrapProductNameLink.js";
6
6
  const x = {
7
7
  CART_ITEMS: "ins_apr",
8
8
  BROWSED_ITEMS: "browsed_item",
9
9
  PURCHASED_ITEMS: "purchased_item"
10
- }, N = (S) => S.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->");
11
- function v(S, H, g) {
12
- let $ = H;
13
- for (; $ > 0 && /\s/.test(S[$ - 1]); )
14
- $ -= 1;
15
- return g.some((I) => S.endsWith(I, $));
10
+ }, O = (S) => S.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->");
11
+ function v(S, y, b) {
12
+ let h = y;
13
+ for (; h > 0 && /\s/.test(S[h - 1]); )
14
+ h -= 1;
15
+ return b.some((I) => S.endsWith(I, h));
16
16
  }
17
- function J(S) {
18
- const H = N(S), g = new DOMParser().parseFromString(H, "text/html");
19
- X(g);
20
- const $ = L.PAIRS_FOR_EXTENSION;
21
- Object.entries($).forEach(([n, d]) => {
22
- g.querySelectorAll(".ins-product-td").forEach((r) => {
17
+ function K(S) {
18
+ const y = O(S), b = new DOMParser().parseFromString(y, "text/html");
19
+ Y(b);
20
+ const h = L.PAIRS_FOR_EXTENSION;
21
+ Object.entries(h).forEach(([n, d]) => {
22
+ b.querySelectorAll(".ins-product-td").forEach((r) => {
23
23
  const E = r.getAttribute("data-number") || "1", m = r.getAttribute("data-type") || "CART_ITEMS";
24
24
  r.querySelectorAll(`[product-attr="${n}"]`).forEach((t) => {
25
- var T, P, D;
26
- const R = t.getAttribute("data-type") || m, o = t.getAttribute("data-number") || E, f = d[R];
27
- if (f)
25
+ var $, H, N;
26
+ const g = t.getAttribute("data-type") || m, o = t.getAttribute("data-number") || E, u = d[g];
27
+ if (u)
28
28
  switch (n) {
29
29
  case "imageSrc": {
30
30
  let e = null, s = null;
31
31
  if (t.tagName === "IMG" ? (e = t, s = e.closest("a")) : (e = t.querySelector("img"), s = t.querySelector("a") || t.closest("a")), !e)
32
32
  break;
33
- const a = f.DEFAULT, l = f.ATTR;
33
+ const a = u.DEFAULT, l = u.ATTR;
34
34
  if (a && e.src) {
35
35
  const i = e.src;
36
- a.some((b) => {
37
- const u = b.split("/").pop() || "", y = i.split("/").pop() || "";
38
- return i.includes(b) || i.includes(u) || y === u;
36
+ a.some((_) => {
37
+ const f = _.split("/").pop() || "", P = i.split("/").pop() || "";
38
+ return i.includes(_) || i.includes(f) || P === f;
39
39
  }) && (e.src = `{{${l}_${o}}}`);
40
40
  }
41
- const c = (P = (T = $.name) == null ? void 0 : T[R]) == null ? void 0 : P.ATTR;
41
+ const c = (H = ($ = h.name) == null ? void 0 : $[g]) == null ? void 0 : H.ATTR;
42
42
  if (c && e.setAttribute("alt", `{{${c}_${o}}}`), s) {
43
- const i = (D = $.itemLink) == null ? void 0 : D[R];
43
+ const i = (N = h.itemLink) == null ? void 0 : N[g];
44
44
  if (i) {
45
- const _ = i.HREF, b = i.DEFAULT_HREF || "#!", u = s.href;
46
- (u === "#" || u === "" || u.endsWith("#!") || u.endsWith(b) || u === `${window.location.href}${b}` || !u || u === window.location.href) && (s.href = `{{${_}_${o}}}`);
45
+ const R = i.HREF, _ = i.DEFAULT_HREF || "#!", f = s.href;
46
+ (f === "#" || f === "" || f.endsWith("#!") || f.endsWith(_) || f === `${window.location.href}${_}` || !f || f === window.location.href) && (s.href = `{{${R}_${o}}}`);
47
47
  }
48
48
  }
49
49
  break;
50
50
  }
51
51
  case "name": {
52
- const e = f, s = e.ATTR, a = e.DEFAULT_HREF || "#!", l = e.HREF;
52
+ const e = u, s = e.ATTR, a = e.DEFAULT_HREF || "#!", l = e.HREF;
53
53
  t.textContent && (t.innerHTML = F(t, `{{${s}_${o}}}`));
54
54
  const c = t.closest("a") || (t.tagName === "A" ? t : null);
55
55
  if (c && l) {
56
- const i = c.href, _ = `${window.location.href}${a}`;
57
- (i === _ || i.endsWith(a)) && (c.href = `{{${l}_${o}}}`);
56
+ const i = c.href, R = `${window.location.href}${a}`;
57
+ (i === R || i.endsWith(a)) && (c.href = `{{${l}_${o}}}`);
58
58
  }
59
59
  break;
60
60
  }
61
61
  case "price":
62
62
  case "originalPrice": {
63
- const e = f, s = t.getAttribute("data-formated"), a = t.getAttribute("data-single_price"), l = s === "true", c = a === "true", i = t.getAttribute("data-curency") || "before";
64
- let _;
65
- c ? _ = l ? e.SINGLE_PRICE_FORMATTED : e.SINGLE_PRICE : _ = l ? e.PRICE_FORMATTED : e.PRICE;
66
- const b = e.CURRENCY;
67
- let u = `{{${_}_${o}}}`;
68
- const y = (t.getAttribute("data-currency_symbol") || "").trim(), W = y !== "" && y !== V.productPriceCurrencySymbolControlValue;
63
+ const e = u, s = t.getAttribute("data-formated"), a = t.getAttribute("data-single_price"), l = s === "true", c = a === "true", i = t.getAttribute(D.POSITION) || "before";
64
+ let R;
65
+ c ? R = l ? e.SINGLE_PRICE_FORMATTED : e.SINGLE_PRICE : R = l ? e.PRICE_FORMATTED : e.PRICE;
66
+ const _ = e.CURRENCY;
67
+ let f = `{{${R}_${o}}}`;
68
+ const P = (t.getAttribute(D.SYMBOL) || "").trim(), V = G(P);
69
69
  let C = "";
70
- W ? C = y : b && (C = `{{${b}_${o}}}`), C && (u = i === "after" ? `${u} ${C}` : `${C} ${u}`), t.innerHTML = F(t, u);
70
+ V ? C = P : _ && (C = `{{${_}_${o}}}`), C && (f = i === "after" ? `${f} ${C}` : `${C} ${f}`), t.innerHTML = F(t, f);
71
71
  break;
72
72
  }
73
73
  case "quantity": {
74
- const e = f, s = e.ATTR, a = e.DEFAULT;
74
+ const e = u, s = e.ATTR, a = e.DEFAULT;
75
75
  t.textContent && t.textContent.trim() === a && (t.innerHTML = F(t, `{{${s}_${o}}}`));
76
76
  break;
77
77
  }
78
78
  case "button": {
79
- const e = f, s = e.HREF, a = e.DEFAULT_HREF || "#!", l = t.tagName === "A" ? t : t.querySelector("a");
79
+ const e = u, s = e.HREF, a = e.DEFAULT_HREF || "#!", l = t.tagName === "A" ? t : t.querySelector("a");
80
80
  if (l) {
81
81
  const c = l.href || "", i = `${window.location.href}${a}`;
82
82
  (c === "" || c === "#" || c === i || c.endsWith(a) || c.endsWith("#!") || c === window.location.href) && (l.href = `{{${s}_${o}}}`);
@@ -84,7 +84,7 @@ function J(S) {
84
84
  break;
85
85
  }
86
86
  case "itemLink": {
87
- const e = f, s = e.HREF, a = e.DEFAULT_HREF || "#!", l = t;
87
+ const e = u, s = e.HREF, a = e.DEFAULT_HREF || "#!", l = t;
88
88
  if (l.href) {
89
89
  const c = l.href, i = `${window.location.href}${a}`;
90
90
  (c === i || c.endsWith(a)) && (l.href = `{{${s}_${o}}}`);
@@ -92,8 +92,8 @@ function J(S) {
92
92
  break;
93
93
  }
94
94
  default: {
95
- if ("ATTR" in f) {
96
- const e = f.ATTR;
95
+ if ("ATTR" in u) {
96
+ const e = u.ATTR;
97
97
  t.textContent && (t.innerHTML = F(t, `{{${e}_${o}}}`));
98
98
  }
99
99
  break;
@@ -102,9 +102,9 @@ function J(S) {
102
102
  });
103
103
  });
104
104
  });
105
- const I = H.match(/<!DOCTYPE[^>]*>/i), O = I ? `${I[0]}
106
- ` : "", q = g.querySelectorAll(".ins-product-td"), M = [];
107
- q.forEach((n) => {
105
+ const I = y.match(/<!DOCTYPE[^>]*>/i), q = I ? `${I[0]}
106
+ ` : "", U = b.querySelectorAll(".ins-product-td"), M = [];
107
+ U.forEach((n) => {
108
108
  const d = n.getAttribute("data-type") || "CART_ITEMS", p = n.getAttribute("data-number") || "1", r = n.outerHTML;
109
109
  M.push({
110
110
  element: n,
@@ -113,16 +113,16 @@ function J(S) {
113
113
  number: p
114
114
  });
115
115
  });
116
- let A = O + g.documentElement.outerHTML;
116
+ let A = q + b.documentElement.outerHTML;
117
117
  M.reverse().forEach(({ outerHtml: n, type: d, number: p }) => {
118
118
  const r = x[d], E = r ? `${r}_total_product_kind` : "";
119
119
  if (E) {
120
- const h = parseInt(p) - 1, o = `${`{% if ${E} > ${h} %}`}${n}{% endif %}`;
121
- A = A.replace(n, G(o));
120
+ const T = parseInt(p) - 1, o = `${`{% if ${E} > ${T} %}`}${n}{% endif %}`;
121
+ A = A.replace(n, X(o));
122
122
  }
123
123
  });
124
- const U = g.querySelectorAll('[product-attr="originalPrice"][data-type]'), w = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Set();
125
- return U.forEach((n) => {
124
+ const W = b.querySelectorAll('[product-attr="originalPrice"][data-type]'), w = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Set();
125
+ return W.forEach((n) => {
126
126
  var t;
127
127
  const d = n.getAttribute("data-number"), p = n.getAttribute("data-type");
128
128
  if (!d || !x[p])
@@ -131,20 +131,20 @@ function J(S) {
131
131
  if (!r || k.has(r))
132
132
  return;
133
133
  k.add(r);
134
- const E = r.outerHTML, m = (t = n.closest(".ins-product-td")) == null ? void 0 : t.getAttribute("data-nodup"), h = w.get(E) ?? { number: d, type: p, wrap: [] };
135
- h.wrap.push(m !== "false"), w.set(E, h);
134
+ const E = r.outerHTML, m = (t = n.closest(".ins-product-td")) == null ? void 0 : t.getAttribute("data-nodup"), T = w.get(E) ?? { number: d, type: p, wrap: [] };
135
+ T.wrap.push(m !== "false"), w.set(E, T);
136
136
  }), w.forEach(({ number: n, type: d, wrap: p }, r) => {
137
137
  if (r.includes("{% if") || !p.some(Boolean))
138
138
  return;
139
- const E = L.PAIRS_FOR_EXTENSION.price[d].PRICE, m = L.PAIRS_FOR_EXTENSION.originalPrice[d].PRICE, h = `{% if ${E}_${n} != ${m}_${n} %}`, t = [h, N(h)];
140
- let R = "", o = 0, f = 0, T = A.indexOf(r);
141
- for (; T !== -1; ) {
142
- const P = p[f] === !0 && !v(A, T, t);
143
- R += A.slice(o, T) + (P ? `${h}${r}{% endif %}` : r), o = T + r.length, f += 1, T = A.indexOf(r, o);
139
+ const E = L.PAIRS_FOR_EXTENSION.price[d].PRICE, m = L.PAIRS_FOR_EXTENSION.originalPrice[d].PRICE, T = `{% if ${E}_${n} != ${m}_${n} %}`, t = [T, O(T)];
140
+ let g = "", o = 0, u = 0, $ = A.indexOf(r);
141
+ for (; $ !== -1; ) {
142
+ const H = p[u] === !0 && !v(A, $, t);
143
+ g += A.slice(o, $) + (H ? `${T}${r}{% endif %}` : r), o = $ + r.length, u += 1, $ = A.indexOf(r, o);
144
144
  }
145
- A = R + A.slice(o);
145
+ A = g + A.slice(o);
146
146
  }), A.replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}");
147
147
  }
148
148
  export {
149
- J as pairProductVariables
149
+ K as pairProductVariables
150
150
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.17.0-beta.a6988b3",
3
+ "version": "3.17.0-beta.ab974c6",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",
@@ -118,7 +118,7 @@
118
118
  },
119
119
  "guido": {
120
120
  "stripo": {
121
- "version": "2.73.0"
121
+ "version": "2.72.1"
122
122
  }
123
123
  }
124
124
  }