@useinsider/guido 3.2.0-beta.f0d4ffd → 3.2.0-beta.f679fe4

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 (52) hide show
  1. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +51 -31
  2. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
  3. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +23 -22
  4. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
  5. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +37 -39
  6. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
  7. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +30 -41
  8. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +15 -14
  9. package/dist/composables/useActionsApi.js +4 -4
  10. package/dist/composables/useFullStoryBridge.js +14 -0
  11. package/dist/composables/useHtmlValidator.js +83 -118
  12. package/dist/composables/useRibbonOffset.js +21 -0
  13. package/dist/composables/useSave.js +1 -1
  14. package/dist/composables/useStripo.js +47 -46
  15. package/dist/config/compiler/recommendationCompilerRules.js +72 -67
  16. package/dist/config/compiler/unsubscribeCompilerRules.js +40 -37
  17. package/dist/config/compiler/utils/recommendationCompilerUtils.js +33 -30
  18. package/dist/config/migrator/recommendationMigrator.js +1 -1
  19. package/dist/enums/html-validator.js +2 -4
  20. package/dist/enums/onboarding.js +7 -2
  21. package/dist/enums/unsubscribe.js +34 -27
  22. package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +38 -38
  23. package/dist/extensions/Blocks/Items/enums/productEnums.js +19 -7
  24. package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
  25. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +21 -18
  26. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +99 -0
  27. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +6 -6
  28. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +3 -1
  29. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +27 -57
  30. package/dist/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.js +14 -0
  31. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +18 -17
  32. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +29 -25
  33. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +11 -11
  34. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +17 -14
  35. package/dist/extensions/Blocks/Unsubscribe/block.js +11 -11
  36. package/dist/guido.css +1 -1
  37. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +258 -235
  38. package/dist/package.json.js +1 -1
  39. package/dist/src/composables/useActionsApi.d.ts +1 -1
  40. package/dist/src/composables/useFullStoryBridge.d.ts +11 -0
  41. package/dist/src/composables/useRibbonOffset.d.ts +4 -0
  42. package/dist/src/enums/html-validator.d.ts +0 -2
  43. package/dist/src/enums/onboarding.d.ts +6 -0
  44. package/dist/src/enums/unsubscribe.d.ts +5 -0
  45. package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
  46. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +3 -0
  47. package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.d.ts +35 -0
  48. package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +3 -20
  49. package/dist/src/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.d.ts +29 -0
  50. package/dist/src/stores/onboarding.d.ts +4 -0
  51. package/dist/stores/onboarding.js +4 -0
  52. package/package.json +3 -3
@@ -1,161 +1,126 @@
1
- import { useConfig as L } from "./useConfig.js";
2
- import { TemplateTypes as V } from "../enums/defaults.js";
3
- import { DISPLAY_CONDITIONS_REGEX as _, DISPLAY_CONDITIONS_EXCEPTIONS_REGEX as H, CampaignCouldNotBeSavedKey as P, CanNotMakeAnyChangesForRunningKey as G } from "../enums/html-validator.js";
4
- import { ToasterTypeOptions as c } from "../enums/toaster.js";
5
- import { itemsBlockDynamicVariables as M } from "../extensions/Blocks/Items/enums/productEnums.js";
6
- import { useRecommendationStore as $ } from "../stores/recommendation.js";
7
- import { base64EncodeWithSpecialChars as X } from "../utils/base64.js";
8
- import { useHttp as j } from "./useHttp.js";
9
- import { useToaster as q } from "./useToaster.js";
10
- import { useTranslations as z } from "./useTranslations.js";
11
- const K = /recommendation-id="(\d+)"/g;
12
- function U(a) {
13
- return [...a.matchAll(K)].map((u) => u[1]);
1
+ import { useConfig as I } from "./useConfig.js";
2
+ import { TemplateTypes as B } from "../enums/defaults.js";
3
+ import { CampaignCouldNotBeSavedKey as R, CanNotMakeAnyChangesForRunningKey as V } from "../enums/html-validator.js";
4
+ import { ToasterTypeOptions as l } from "../enums/toaster.js";
5
+ import { itemsBlockDynamicVariables as H } from "../extensions/Blocks/Items/enums/productEnums.js";
6
+ import { useRecommendationStore as W } from "../stores/recommendation.js";
7
+ import { base64EncodeWithSpecialChars as L } from "../utils/base64.js";
8
+ import { useHttp as N } from "./useHttp.js";
9
+ import { useToaster as O } from "./useToaster.js";
10
+ import { useTranslations as D } from "./useTranslations.js";
11
+ const M = /recommendation-id="(\d+)"/g;
12
+ function _(o) {
13
+ return [...o.matchAll(M)].map((u) => u[1]);
14
14
  }
15
- function Y(a, u) {
16
- return u.some((d) => a.startsWith(`${d}_`));
15
+ function $(o, u) {
16
+ return u.some((d) => o.startsWith(`${d}_`));
17
17
  }
18
- const ce = () => {
19
- var y, h;
20
- const { showToaster: a } = q(), { post: u } = j(), { config: d } = L(), r = z(), g = $(), p = ((h = (y = d.value) == null ? void 0 : y.partner) == null ? void 0 : h.messageType) === V.transactional, b = async (e) => {
21
- const t = await u(
18
+ const ee = () => {
19
+ var g, v;
20
+ const { showToaster: o } = O(), { post: u } = N(), { config: d } = I(), r = D(), f = W(), p = ((v = (g = d.value) == null ? void 0 : g.partner) == null ? void 0 : v.messageType) === B.transactional, y = async (e) => {
21
+ const s = await u(
22
22
  "/newsletter/template-library/check-template-html-body",
23
- { html: X(e) }
24
- ), { status: n, message: l } = t.data;
25
- return n || a({
26
- type: c.Alert,
27
- message: n === void 0 ? l : r("newsletter.invalid-url-link-for-toaster")
28
- }), r(P), l === r(G) && a({
29
- type: c.Alert,
23
+ { html: L(e) }
24
+ ), { status: n, message: c } = s.data;
25
+ return n || o({
26
+ type: l.Alert,
27
+ message: n === void 0 ? c : r("newsletter.invalid-url-link-for-toaster")
28
+ }), r(R), c === r(V) && o({
29
+ type: l.Alert,
30
30
  message: r("newsletter.already-in-progress")
31
31
  }), n;
32
- }, w = (e) => !["if", "endif", "else", "elif", "now"].includes(e.toLowerCase()), S = (e) => ["if", "endif"].includes(e.toLowerCase()), E = (e, s) => {
33
- const t = e.match(/({%(.*?)%})/g);
32
+ }, b = (e) => !["if", "endif", "else", "elif", "now"].includes(e.toLowerCase()), h = (e, t) => {
33
+ const s = e.match(/({%(.*?)%})/g);
34
34
  let n = !0;
35
- return t !== null && !p && t.forEach((l) => {
36
- const o = l.slice(2, -2).trim().match(/(".*?"|[^"\s]+)(?=\s*|\s*$)/g);
37
- if (o && o.length > 0) {
38
- const [i] = o;
39
- w(i) && !s.includes(i) && (a({
40
- type: c.Warning,
35
+ return s !== null && !p && s.forEach((c) => {
36
+ const a = c.slice(2, -2).trim().match(/(".*?"|[^"\s]+)(?=\s*|\s*$)/g);
37
+ if (a && a.length > 0) {
38
+ const [i] = a;
39
+ b(i) && !t.includes(i) && (o({
40
+ type: l.Warning,
41
41
  message: r("custom-fields.invalid-custom-fields")
42
42
  }), n = !1);
43
43
  }
44
44
  }), n;
45
- }, A = async (e, s, t) => {
46
- const n = t ? await b(e) : !0;
47
- return E(e, s) && n;
48
- }, I = (e) => e.length > 0 ? !0 : (a({
49
- type: c.Warning,
45
+ }, C = async (e, t, s) => {
46
+ const n = s ? await y(e) : !0;
47
+ return h(e, t) && n;
48
+ }, w = (e) => e.length > 0 ? !0 : (o({
49
+ type: l.Warning,
50
50
  message: r("newsletter.html-content-is-empty")
51
51
  }), !1), k = (e) => {
52
- const s = (e.match(/{/gm) || []).length, t = (e.match(/}/gm) || []).length;
53
- return s > t && a({
54
- type: c.Warning,
52
+ const t = (e.match(/{/gm) || []).length, s = (e.match(/}/gm) || []).length;
53
+ return t > s && o({
54
+ type: l.Warning,
55
55
  message: r("custom-fields.missing-closing-braces")
56
- }), s < t && a({
57
- type: c.Warning,
56
+ }), t < s && o({
57
+ type: l.Warning,
58
58
  message: r("custom-fields.missing-opening-braces")
59
- }), s === t;
60
- }, x = (e) => {
61
- const s = e.match(/{{\s*(\w+\s+((\w+\|\w+)|(\w+)))\s*}}/gm) === null;
62
- return s || a({
63
- type: c.Warning,
59
+ }), t === s;
60
+ }, A = (e) => {
61
+ const t = e.match(/{{\s*(\w+\s+((\w+\|\w+)|(\w+)))\s*}}/gm) === null;
62
+ return t || o({
63
+ type: l.Warning,
64
64
  message: r("custom-fields.invalid-custom-fields")
65
- }), s;
66
- }, T = (e, s) => {
67
- const t = e.match(/{{([a-zA-Z0-9_\s]*)}}/gm);
68
- if (t && !p) {
69
- const n = new Set(s.map((i) => i.toLowerCase())), l = U(e), o = [];
70
- if (t.forEach((i) => {
65
+ }), t;
66
+ }, E = (e, t) => {
67
+ const s = e.match(/{{([a-zA-Z0-9_\s]*)}}/gm);
68
+ if (s && !p) {
69
+ const n = new Set(t.map((i) => i.toLowerCase())), c = _(e), a = [];
70
+ if (s.forEach((i) => {
71
71
  const m = i.slice(2, -2).trim().toLowerCase();
72
- (!n.has(m) || m === "") && !Y(m, l) && o.push(m);
73
- }), o.length > 0) {
72
+ (!n.has(m) || m === "") && !$(m, c) && a.push(m);
73
+ }), a.length > 0) {
74
74
  const i = `
75
75
  <ul>
76
- ${o.map((m) => `<li>${m}</li>`).join("")}
76
+ ${a.map((m) => `<li>${m}</li>`).join("")}
77
77
  </ul>
78
78
  `;
79
- return a({
80
- type: c.Alert,
79
+ return o({
80
+ type: l.Alert,
81
81
  message: r("custom-fields.invalid-custom-fields") + i
82
82
  }), !1;
83
83
  }
84
84
  }
85
85
  return !0;
86
- }, F = (e) => {
87
- const s = e.match(/{%(.*?)%}/g), t = [];
88
- let n = !0;
89
- if (s && s.forEach((l) => {
90
- const o = l.match(_), i = l.match(H), m = (o == null ? void 0 : o.join("")) || "";
91
- (!o || l !== m) && !i && (a({
92
- type: c.Alert,
93
- message: r("newsletter.display-conditions-invalid-syntax")
94
- }), n = !1), o && o.forEach((f) => {
95
- f.trim() === "=" && (a({
96
- type: c.Alert,
97
- message: r("custom-conditions.wrong-equality-operators")
98
- }), n = !1);
99
- const v = f.match(/^[a-zA-Z]*$/g);
100
- v && v.forEach((C) => {
101
- S(C) && t.push(C);
102
- });
103
- });
104
- }), t.length) {
105
- const l = t.filter((i) => i === "if"), o = t.filter((i) => i === "endif");
106
- l.length !== o.length && (a({
107
- type: c.Alert,
108
- message: r("custom-conditions.missing-if-endif-tag")
109
- }), n = !1);
110
- }
111
- return n;
112
- }, W = (e) => {
113
- const s = (e.match(/{% /gm) || []).length, t = (e.match(/ %}/gm) || []).length, n = s === t;
114
- return n || a({
115
- type: c.Warning,
116
- message: r("custom-conditions.no-space-after-braces")
117
- }), n;
118
- }, N = (e) => (e.match(/({%(.*?)%})/g) || []).filter((t) => t.includes("if")).map((t) => (t.match(/{{.*}}/gm) || []).length).reduce((t, n) => t + n, 0) > 0 ? (a({
119
- type: c.Warning,
120
- message: r("custom-conditions.no-braces-inside-if-tag")
121
- }), !1) : !0, O = () => g.recommendationConfigs && Object.values(g.recommendationConfigs).find((s) => s.filters.find((t) => t.value === "")) !== void 0 ? (a({
122
- type: c.Alert,
86
+ }, F = () => f.recommendationConfigs && Object.values(f.recommendationConfigs).find((t) => t.filters.find((s) => s.value === "")) !== void 0 ? (o({
87
+ type: l.Alert,
123
88
  message: r("newsletter.fill-all-necessary-fields")
124
- }), !1) : !0, B = (e) => {
125
- const s = /src="[^"]*\.(svg|pst)"/gm;
126
- return e.match(s) === null ? !0 : (a({
127
- type: c.Alert,
89
+ }), !1) : !0, x = (e) => {
90
+ const t = /src="[^"]*\.(svg|pst)"/gm;
91
+ return e.match(t) === null ? !0 : (o({
92
+ type: l.Alert,
128
93
  message: r("newsletter.invalid-image-type")
129
94
  }), !1);
130
- }, R = (e) => {
95
+ }, T = (e) => {
131
96
  const n = new DOMParser().parseFromString(e, "text/html").querySelectorAll(".checkbox-block-v2");
132
- return Array.from(n).find((o) => {
97
+ return Array.from(n).find((a) => {
133
98
  var i;
134
- return !((i = o.id) != null && i.trim());
135
- }) ? (a({
136
- type: c.Alert,
99
+ return !((i = a.id) != null && i.trim());
100
+ }) ? (o({
101
+ type: l.Alert,
137
102
  message: r("unsubscribe-templates.select-checkbox-groups")
138
103
  }), !1) : !0;
139
- }, D = (e) => {
104
+ }, S = (e) => {
140
105
  const n = new DOMParser().parseFromString(e, "text/html").querySelectorAll(".radio-button-v2");
141
- return Array.from(n).find((o) => {
106
+ return Array.from(n).find((a) => {
142
107
  var i;
143
- return !((i = o.id) != null && i.trim());
144
- }) ? (a({
145
- type: c.Alert,
108
+ return !((i = a.id) != null && i.trim());
109
+ }) ? (o({
110
+ type: l.Alert,
146
111
  message: r("unsubscribe-templates.select-radio-button-groups")
147
112
  }), !1) : !0;
148
113
  };
149
- return { validateHtml: async (e, s, t = !1) => {
150
- var o, i;
114
+ return { validateHtml: async (e, t, s = !1) => {
115
+ var a, i;
151
116
  const n = [
152
- ...s.map((m) => m.value),
153
- ...M,
154
- ...((i = (o = d.value) == null ? void 0 : o.template) == null ? void 0 : i.customFieldAttributes) ?? []
117
+ ...t.map((m) => m.value),
118
+ ...H,
119
+ ...((i = (a = d.value) == null ? void 0 : a.template) == null ? void 0 : i.customFieldAttributes) ?? []
155
120
  ];
156
- return await A(e, n, t) && I(e) && k(e) && x(e) && T(e, n) && F(e) && W(e) && N(e) && O() && B(e) && R(e) && D(e);
121
+ return await C(e, n, s) && w(e) && k(e) && A(e) && E(e, n) && F() && x(e) && T(e) && S(e);
157
122
  } };
158
123
  };
159
124
  export {
160
- ce as useHtmlValidator
125
+ ee as useHtmlValidator
161
126
  };
@@ -0,0 +1,21 @@
1
+ import { RIBBON_SELECTOR as r } from "../enums/onboarding.js";
2
+ import { ref as f, onMounted as c, onBeforeUnmount as i } from "vue";
3
+ const m = () => {
4
+ const o = f(0);
5
+ let e = null;
6
+ const n = () => {
7
+ const t = document.querySelector(r), s = (t == null ? void 0 : t.offsetHeight) ?? 0;
8
+ o.value !== s && (o.value = s);
9
+ }, u = (t) => `${t + o.value}px`;
10
+ return c(() => {
11
+ n(), e = new MutationObserver(n), e.observe(document.body, {
12
+ childList: !0,
13
+ subtree: !0
14
+ });
15
+ }), i(() => {
16
+ e == null || e.disconnect();
17
+ }), { ribbonOffset: o, getTopPosition: u };
18
+ };
19
+ export {
20
+ m as useRibbonOffset
21
+ };
@@ -19,7 +19,7 @@ const F = () => {
19
19
  return;
20
20
  if ((i = a.value) != null && i.externalValidation && !await a.value.externalValidation(t))
21
21
  return;
22
- c();
22
+ await c();
23
23
  const { unsubscribePayload: f, stripoModules: v } = d(t.rawHtml);
24
24
  return await u(f), t.modules = v, m || s(t), t;
25
25
  } };
@@ -1,27 +1,28 @@
1
- import { useActionsApi as F } from "./useActionsApi.js";
2
- import { useBlocksConfig as D } from "./useBlocksConfig.js";
3
- import { useConfig as I } from "./useConfig.js";
4
- import { useCustomInterfaceAppearance as P } from "./useCustomInterfaceAppearance.js";
5
- import { useStripoEventHandler as U } from "./useStripoEventHandler.js";
6
- import { useToaster as R } from "./useToaster.js";
7
- import { localePatch as q } from "../config/i18n/index.js";
8
- import { displayConditions as x } from "../enums/displayConditions.js";
9
- import { useStripoApi as H } from "../services/stripoApi.js";
10
- import O from "../static/styles/customEditorStyle.css.js";
11
- import { useEditorStore as C } from "../stores/editor.js";
12
- import { dynamicContentToMergeTags as L } from "../utils/genericUtil.js";
13
- import $ from "../package.json.js";
14
- const ie = (E, c) => {
15
- const { features: l, template: h, isFeatureEnabled: u } = I(), { handleError: m } = R(), { getToken: b, getCustomFonts: w, getSyncModulesStatus: k } = H(), { handleEvent: T } = U(), { getStripoBlocksConfig: V } = D(), _ = async (i, n = [], r = !1) => {
16
- var g, y, S;
17
- const e = C(), { html: p, css: a } = i, { baseBlocks: o, extensions: d } = await V(), f = ((g = l.value) == null ? void 0 : g.displayConditions) ?? !0, v = ((y = l.value) == null ? void 0 : y.modulesDisabled) ?? !1, M = ((S = h.value) == null ? void 0 : S.forceRecreate) ?? !1;
1
+ import { useActionsApi as D } from "./useActionsApi.js";
2
+ import { useBlocksConfig as I } from "./useBlocksConfig.js";
3
+ import { useConfig as P } from "./useConfig.js";
4
+ import { useCustomInterfaceAppearance as U } from "./useCustomInterfaceAppearance.js";
5
+ import { useFullStoryBridge as R } from "./useFullStoryBridge.js";
6
+ import { useStripoEventHandler as q } from "./useStripoEventHandler.js";
7
+ import { useToaster as x } from "./useToaster.js";
8
+ import { localePatch as H } from "../config/i18n/index.js";
9
+ import { displayConditions as O } from "../enums/displayConditions.js";
10
+ import { useStripoApi as j } from "../services/stripoApi.js";
11
+ import L from "../static/styles/customEditorStyle.css.js";
12
+ import { useEditorStore as y } from "../stores/editor.js";
13
+ import { dynamicContentToMergeTags as $ } from "../utils/genericUtil.js";
14
+ import z from "../package.json.js";
15
+ const ae = (C, l) => {
16
+ const { features: c, template: E, isFeatureEnabled: u } = P(), { handleError: m } = x(), { getToken: h, getCustomFonts: w, getSyncModulesStatus: b } = j(), { handleEvent: k } = q(), { getStripoBlocksConfig: B } = I(), T = async (i, r = [], s = !1) => {
17
+ var f, g, S;
18
+ const e = y(), { html: p, css: a } = i, { baseBlocks: o, extensions: d } = await B(), _ = ((f = c.value) == null ? void 0 : f.displayConditions) ?? !0, F = ((g = c.value) == null ? void 0 : g.modulesDisabled) ?? !1, v = ((S = E.value) == null ? void 0 : S.forceRecreate) ?? !1;
18
19
  window.UIEditor.initEditor(
19
20
  document.querySelector("#guido-editor"),
20
21
  {
21
- metadata: E,
22
+ metadata: C,
22
23
  html: p,
23
24
  css: a,
24
- forceRecreate: M,
25
+ forceRecreate: v,
25
26
  locale: "en",
26
27
  undoButtonSelector: "#guido__undo-button",
27
28
  redoButtonSelector: "#guido__redo-button",
@@ -31,45 +32,45 @@ const ie = (E, c) => {
31
32
  customAppearanceMergetags: !u("liquidSyntax"),
32
33
  customAppearanceMergetagsBorderColor: "#f1f3fe",
33
34
  customAppearanceMergetagsBackgroundColor: "#f1f3fe",
34
- customViewStyles: O,
35
- conditionsEnabled: f,
36
- customConditionsEnabled: f,
37
- conditionCategories: x,
35
+ customViewStyles: L,
36
+ conditionsEnabled: _,
37
+ conditionCategories: O,
38
38
  enableXSSSecurity: !0,
39
- modulesDisabled: v,
40
- syncModulesEnabled: r,
39
+ modulesDisabled: F,
40
+ syncModulesEnabled: s,
41
41
  messageSettingsEnabled: !0,
42
42
  displayGmailAnnotations: !0,
43
43
  displayHiddenPreheader: !1,
44
44
  displayTitle: !1,
45
45
  displayUTM: !1,
46
46
  selectElementAfterDrop: !0,
47
+ allowedScriptSourceDomains: "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com",
47
48
  ...o ? { baseBlocks: o } : {},
48
49
  editorFonts: {
49
50
  showDefaultStandardFonts: !0,
50
51
  showDefaultNotStandardFonts: !0,
51
- customFonts: n
52
+ customFonts: r
52
53
  },
53
54
  mergeTags: [
54
55
  {
55
- entries: L(
56
- c.preselectedDynamicContentList,
56
+ entries: $(
57
+ l.preselectedDynamicContentList,
57
58
  u("liquidSyntax")
58
59
  )
59
60
  }
60
61
  ],
61
62
  async onTokenRefreshRequest(t) {
62
63
  try {
63
- const s = await b();
64
- t(s);
65
- } catch (s) {
66
- m(s, "Failed to refresh token");
64
+ const n = await h();
65
+ t(n);
66
+ } catch (n) {
67
+ m(n, "Failed to refresh token");
67
68
  }
68
69
  },
69
70
  onTemplateLoaded() {
70
71
  try {
71
- const { importCss: t } = P(), { activateCustomViewStyles: s, updateTimerInClonedTemplate: A } = F();
72
- t(), s(), A(), c.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
72
+ const { importCss: t } = U(), { activateCustomViewStyles: n, updateTimerInClonedTemplate: M } = D(), { injectFullStory: A } = R();
73
+ t(), n(), A(), M(), l.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
73
74
  e.hasChanges = !1;
74
75
  }, 1e3);
75
76
  } catch (t) {
@@ -88,39 +89,39 @@ const ie = (E, c) => {
88
89
  onDataChanged() {
89
90
  e.hasChanges = !0;
90
91
  },
91
- onEvent: T,
92
+ onEvent: k,
92
93
  ignoreClickOutsideSelectors: [
93
94
  "#guido-dynamic-content-modal",
94
95
  ".in-on-board-wrapper",
95
96
  ".in-drawer__container"
96
97
  ],
97
98
  extensions: d,
98
- localePatch: q
99
+ localePatch: H
99
100
  }
100
101
  );
101
- }, B = (i) => new Promise((n, r) => {
102
+ }, V = (i) => new Promise((r, s) => {
102
103
  var d;
103
104
  if (document.getElementById("UiEditorScript")) {
104
- i(), n();
105
+ i(), r();
105
106
  return;
106
107
  }
107
- const e = $.guido, a = `https://email-static.useinsider.com/guido/${(d = e == null ? void 0 : e.stripo) == null ? void 0 : d.version}/UIEditor.js`, o = document.createElement("script");
108
+ const e = z.guido, a = `https://email-static.useinsider.com/guido/${(d = e == null ? void 0 : e.stripo) == null ? void 0 : d.version}/UIEditor.js`, o = document.createElement("script");
108
109
  o.id = "UiEditorScript", o.type = "module", o.src = a, o.onload = () => {
109
- i(), n();
110
+ i(), r();
110
111
  }, o.onerror = () => {
111
- r(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
112
+ s(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
112
113
  }, document.body.appendChild(o);
113
114
  });
114
115
  return { initPlugin: async (i) => {
115
- await B(async () => {
116
- const n = C(), [r, e] = await Promise.all([
116
+ await V(async () => {
117
+ const r = y(), [s, e] = await Promise.all([
117
118
  w(),
118
- k()
119
+ b()
119
120
  ]);
120
- n.syncModulesEnabled = e, await _(i, r, e);
121
+ r.syncModulesEnabled = e, await T(i, s, e);
121
122
  });
122
123
  } };
123
124
  };
124
125
  export {
125
- ie as useStripo
126
+ ae as useStripo
126
127
  };