@useinsider/guido 3.11.0-beta.88cf651 → 3.11.0-beta.ad6af17

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,5 +1,5 @@
1
- import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
2
- import { object as a, number as n, optional as e, string as t, picklist as l, pipe as p, minLength as b, custom as f, boolean as o, array as c, record as k, fallback as C, literal as i, looseObject as g, variant as R, union as h, unknown as s, lazy as T } from "../../node_modules/valibot/dist/index.js";
1
+ import { ModuleFolderDefaults as S } from "../../enums/defaults.js";
2
+ import { object as a, number as s, optional as e, string as t, picklist as l, pipe as p, minLength as b, custom as h, boolean as o, array as c, record as k, literal as i, looseObject as y, variant as g, union as f, unknown as n } from "../../node_modules/valibot/dist/index.js";
3
3
  const d = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -12,7 +12,7 @@ const d = {
12
12
  ARCHITECT: 49,
13
13
  /** Unsubscribe page builder */
14
14
  UNSUBSCRIBE_PAGES: 97
15
- }, A = a({
15
+ }, R = a({
16
16
  /** Unique identifier for the template being edited */
17
17
  templateId: p(
18
18
  t(),
@@ -25,12 +25,12 @@ const d = {
25
25
  ),
26
26
  /** Optional variation ID for A/B testing */
27
27
  variationId: e(t())
28
- }), I = a({
28
+ }), T = a({
29
29
  /** Fallback font name (e.g., "Georgia") */
30
30
  name: t(),
31
31
  /** Fallback font family (e.g., "serif" or "sans-serif") */
32
32
  family: t()
33
- }), L = a({
33
+ }), C = a({
34
34
  /** Partner/organization name (required) */
35
35
  name: p(
36
36
  t(),
@@ -53,8 +53,8 @@ const d = {
53
53
  /** Display name for the current user */
54
54
  username: e(t(), "Guido User"),
55
55
  /** Fallback font settings from partner settings — used to match backend size calculation */
56
- fallbackFont: e(I)
57
- }), v = a({
56
+ fallbackFont: e(T)
57
+ }), A = a({
58
58
  /** Display text for the dynamic content */
59
59
  text: t(),
60
60
  /** Template variable value (e.g., {{username}}) */
@@ -68,46 +68,35 @@ const d = {
68
68
  value: t()
69
69
  })
70
70
  )
71
- }), S = T(() => g({
72
- text: e(t()),
73
- // eslint-disable-next-line camelcase -- backend field name
74
- tag_text: e(t()),
75
- value: e(t()),
76
- children: e(c(S)),
77
- // eslint-disable-next-line camelcase -- backend field name
78
- select_items: e(c(S))
79
- })), P = k(
80
- t(),
81
- C(c(S), [])
82
- ), D = g({
71
+ }), I = y({
83
72
  /** Block ID (matches the dictionary key and the legacy HTML element id) */
84
- id: e(n()),
73
+ id: e(s()),
85
74
  /** Decimal places for price display (legacy data may use string or number) */
86
- decimalCount: e(h([t(), n()])),
75
+ decimalCount: e(f([t(), s()])),
87
76
  /** Pinned product IDs (empty array when filter-driven) */
88
- productIds: e(c(s())),
77
+ productIds: e(c(n())),
89
78
  /** Whether the block requested live products at send time */
90
79
  sendProductRequestFlag: e(o()),
91
80
  /** Whether to randomize product order */
92
81
  shuffleProducts: e(o()),
93
82
  /** Filter rules driving product selection */
94
- filters: e(c(s())),
83
+ filters: e(c(n())),
95
84
  /** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
96
85
  currency: e(t()),
97
86
  /** Currency display settings (separators, alignment, decimals) */
98
- currencySettings: e(s()),
87
+ currencySettings: e(n()),
99
88
  /** Locale (e.g. 'nl_NL') */
100
89
  language: e(t()),
101
90
  /** Recommendation strategy key (e.g. 'newArrivals') */
102
91
  strategy: e(t()),
103
92
  /** Snapshot of products as rendered by the legacy block */
104
- recommendedProducts: e(c(s())),
93
+ recommendedProducts: e(c(n())),
105
94
  /** Number of product cards per row */
106
- cardsInRow: e(n()),
95
+ cardsInRow: e(s()),
107
96
  /** Mobile-only padding (right) */
108
- mobileRightPadding: e(n()),
97
+ mobileRightPadding: e(s()),
109
98
  /** Mobile-only padding (left) */
110
- mobileLeftPadding: e(n()),
99
+ mobileLeftPadding: e(s()),
111
100
  /** Disable responsive scaling */
112
101
  unresponsive: e(o()),
113
102
  /** Layout orientation ('vertical' | 'horizontal') */
@@ -117,14 +106,14 @@ const d = {
117
106
  /** Block type marker used by some legacy variants */
118
107
  blockType: e(t()),
119
108
  /** Size variant marker (legacy data may use string or number) */
120
- size: e(h([t(), n()])),
109
+ size: e(f([t(), s()])),
121
110
  /** Vertical responsiveness flag (legacy size=1 variants) */
122
111
  verticalResponsiveness: e(o()),
123
112
  /** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
124
113
  isPriceMovedToNextLine: e(o()),
125
114
  /** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
126
115
  isPriceDeletedForZeroSale: e(o())
127
- }), E = a({
116
+ }), L = a({
128
117
  /**
129
118
  * Legacy recommendation block configs keyed by block ID.
130
119
  * Pass this when loading a template authored with the v1
@@ -132,58 +121,51 @@ const d = {
132
121
  * strategy, currency, locale, and layout data.
133
122
  */
134
123
  recommendationConfigs: e(
135
- k(t(), D),
124
+ k(t(), I),
136
125
  {}
137
126
  )
138
- }), M = a({
127
+ }), P = a({
139
128
  /** Initial HTML content */
140
129
  html: e(t(), ""),
141
130
  /** Initial CSS content */
142
131
  css: e(t(), ""),
143
132
  /** Preselected dynamic content items */
144
133
  preselectedDynamicContent: e(
145
- c(v),
134
+ c(A),
146
135
  []
147
136
  ),
148
- /**
149
- * Partner-keyed set of dynamic-content items the account offers, e.g.
150
- * `{ [partnerName]: [{ text, value, children }] }`. Guido flattens the active
151
- * (first) partner's leaf attributes into the label→token map that repairs
152
- * label-form placeholders (`{{ Phone Number }}`) in dropped saved modules.
153
- */
154
- dynamicContentList: e(P, {}),
155
137
  /** Valid custom field attribute names from the partner's categorized fields */
156
138
  customFieldAttributes: e(c(t()), []),
157
139
  /** Selected unsubscribe page IDs */
158
- selectedUnsubscribePages: e(c(n()), []),
140
+ selectedUnsubscribePages: e(c(s()), []),
159
141
  /** Force recreate template in Stripo storage (use true when updating externally modified templates) */
160
142
  forceRecreate: e(o(), !1),
161
143
  /** Migration-only inputs (legacy block configs) */
162
- migration: e(E, {})
163
- }), N = a({
144
+ migration: e(L, {})
145
+ }), v = a({
164
146
  /** Sender display name */
165
147
  senderName: e(t(), ""),
166
148
  /** Email subject line */
167
149
  subject: e(t(), "")
168
- }), O = a({
150
+ }), E = a({
169
151
  /** Locale for the editor UI */
170
152
  locale: e(t(), "en"),
171
153
  /** Path to translations object */
172
154
  translationsPath: e(t(), "window.trans[Object.keys(window.trans)[0]]"),
173
155
  /** Migration date for template compatibility */
174
- migrationDate: e(n(), 1759696858),
156
+ migrationDate: e(s(), 1759696858),
175
157
  /** Email header settings */
176
- emailHeader: e(N, { senderName: "", subject: "" }),
158
+ emailHeader: e(v, { senderName: "", subject: "" }),
177
159
  /** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
178
- savedModulesFolderName: e(t(), y.SAVED_MODULES),
160
+ savedModulesFolderName: e(t(), S.SAVED_MODULES),
179
161
  /** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
180
- defaultModulesFolderName: e(t(), y.DEFAULT_MODULES)
181
- }), x = a({
162
+ defaultModulesFolderName: e(t(), S.DEFAULT_MODULES)
163
+ }), M = a({
182
164
  /** Whether to show the header bar */
183
165
  showHeader: e(o(), !0),
184
166
  /** Custom label for back button (if shown) */
185
167
  backButtonLabel: e(t())
186
- }), F = a({
168
+ }), O = a({
187
169
  /** Enable dynamic content insertion */
188
170
  dynamicContent: e(o(), !0),
189
171
  /** Enable save as template functionality */
@@ -202,7 +184,7 @@ const d = {
202
184
  liquidSyntax: e(o(), !1),
203
185
  /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
204
186
  autosave: e(o(), !1)
205
- }), U = l([
187
+ }), N = l([
206
188
  "amp-accordion",
207
189
  "amp-carousel",
208
190
  "amp-form-controls",
@@ -216,7 +198,7 @@ const d = {
216
198
  "text-block",
217
199
  "timer-block",
218
200
  "video-block"
219
- ]), B = l([
201
+ ]), D = l([
220
202
  "dynamic-content",
221
203
  "checkbox-block",
222
204
  "radio-button-block",
@@ -224,15 +206,15 @@ const d = {
224
206
  "unsubscribe-block",
225
207
  "coupon-block",
226
208
  "items-block"
227
- ]), w = a({
209
+ ]), x = a({
228
210
  /** Default blocks to exclude from the editor */
229
211
  excludeDefaults: e(
230
- c(U),
212
+ c(N),
231
213
  []
232
214
  ),
233
215
  /** Custom blocks to include in the editor */
234
216
  includeCustoms: e(
235
- c(B),
217
+ c(D),
236
218
  []
237
219
  )
238
220
  }), m = a({
@@ -241,8 +223,8 @@ const d = {
241
223
  /** Human-readable description */
242
224
  description: e(t()),
243
225
  /** Priority for rule ordering (lower = earlier) */
244
- priority: n()
245
- }), H = a({
226
+ priority: s()
227
+ }), F = a({
246
228
  ...m.entries,
247
229
  type: i("replace"),
248
230
  /** String to search for */
@@ -251,7 +233,7 @@ const d = {
251
233
  replacement: t(),
252
234
  /** Replace all occurrences (default: false) */
253
235
  replaceAll: e(o())
254
- }), _ = a({
236
+ }), U = a({
255
237
  ...m.entries,
256
238
  type: i("regex"),
257
239
  /** Regex pattern string */
@@ -260,87 +242,85 @@ const d = {
260
242
  replacement: t(),
261
243
  /** Regex flags (e.g., 'gi') */
262
244
  flags: e(t())
263
- }), j = a({
245
+ }), B = a({
264
246
  ...m.entries,
265
247
  type: i("remove"),
266
248
  /** Strings or patterns to remove */
267
249
  targets: c(t())
268
- }), q = a({
250
+ }), w = a({
269
251
  ...m.entries,
270
252
  type: i("custom"),
271
253
  /** Custom processor function */
272
- processor: f(
254
+ processor: h(
273
255
  (u) => typeof u == "function",
274
256
  "processor must be a function"
275
257
  )
276
- }), G = R("type", [
277
- H,
278
- _,
279
- j,
280
- q
281
- ]), V = a({
258
+ }), H = g("type", [
259
+ F,
260
+ U,
261
+ B,
262
+ w
263
+ ]), j = a({
282
264
  /** Custom compiler rules to apply */
283
- customRules: e(c(G), []),
265
+ customRules: e(c(H), []),
284
266
  /** Skip default compiler rules */
285
267
  ignoreDefaultRules: e(o(), !1)
286
- }), z = a({
268
+ }), q = a({
287
269
  /**
288
270
  * External validation handler called before save completes.
289
271
  * Return false to cancel the save operation.
290
272
  */
291
273
  externalValidation: e(
292
- f(
274
+ h(
293
275
  (u) => typeof u == "function",
294
276
  "externalValidation must be a function"
295
277
  )
296
278
  )
297
- }), K = a({
279
+ }), V = a({
298
280
  // Required sections
299
281
  /** Identity configuration (required) */
300
- identity: A,
282
+ identity: R,
301
283
  /** Partner configuration (required) */
302
- partner: L,
284
+ partner: C,
303
285
  // Optional sections (with defaults)
304
286
  /** Template content and presets */
305
- template: e(M, {}),
287
+ template: e(P, {}),
306
288
  /** Editor settings */
307
- editor: e(O, {}),
289
+ editor: e(E, {}),
308
290
  /** UI configuration */
309
- ui: e(x, {}),
291
+ ui: e(M, {}),
310
292
  /** Feature toggles */
311
- features: e(F, {}),
293
+ features: e(O, {}),
312
294
  /** Block configuration */
313
- blocks: e(w, {}),
295
+ blocks: e(x, {}),
314
296
  /** Compiler configuration */
315
- compiler: e(V, {}),
297
+ compiler: e(j, {}),
316
298
  /** Callbacks and event handlers */
317
- callbacks: e(z, {})
299
+ callbacks: e(q, {})
318
300
  });
319
301
  export {
320
- w as BlocksSchema,
321
- z as CallbacksSchema,
322
- G as CompilerRuleSchema,
323
- V as CompilerSchema,
324
- B as CustomBlockTypeSchema,
325
- q as CustomRuleSchema,
326
- U as DefaultBlockTypeSchema,
327
- P as DynamicContentListSchema,
328
- S as DynamicContentNodeSchema,
329
- v as DynamicContentSchema,
330
- O as EditorSchema,
331
- N as EmailHeaderSchema,
332
- I as FallbackFontSchema,
333
- F as FeaturesSchema,
334
- K as GuidoConfigSchema,
335
- A as IdentitySchema,
336
- D as LegacyRecommendationConfigSchema,
302
+ x as BlocksSchema,
303
+ q as CallbacksSchema,
304
+ H as CompilerRuleSchema,
305
+ j as CompilerSchema,
306
+ D as CustomBlockTypeSchema,
307
+ w as CustomRuleSchema,
308
+ N as DefaultBlockTypeSchema,
309
+ A as DynamicContentSchema,
310
+ E as EditorSchema,
311
+ v as EmailHeaderSchema,
312
+ T as FallbackFontSchema,
313
+ O as FeaturesSchema,
314
+ V as GuidoConfigSchema,
315
+ R as IdentitySchema,
316
+ I as LegacyRecommendationConfigSchema,
337
317
  d as MessageType,
338
- L as PartnerSchema,
318
+ C as PartnerSchema,
339
319
  r as ProductType,
340
- _ as RegexRuleSchema,
341
- j as RemoveRuleSchema,
342
- H as ReplaceRuleSchema,
343
- E as TemplateMigrationSchema,
344
- M as TemplateSchema,
345
- x as UISchema
320
+ U as RegexRuleSchema,
321
+ B as RemoveRuleSchema,
322
+ F as ReplaceRuleSchema,
323
+ L as TemplateMigrationSchema,
324
+ P as TemplateSchema,
325
+ M as UISchema
346
326
  };
@@ -1,45 +1,44 @@
1
- import { useActionsApi as x } from "./useActionsApi.js";
2
- import { useBlocksConfig as O } from "./useBlocksConfig.js";
3
- import { useConfig as q } from "./useConfig.js";
4
- import { useCustomInterfaceAppearance as H } from "./useCustomInterfaceAppearance.js";
5
- import { useFullStoryBridge as L } from "./useFullStoryBridge.js";
6
- import { useModuleDynamicContentRepair as N } from "./useModuleDynamicContentRepair.js";
7
- import { useStripoEventHandler as z } from "./useStripoEventHandler.js";
8
- import { useStripoNotifications as $ } from "./useStripoNotifications.js";
9
- import { useToaster as G } from "./useToaster.js";
10
- import { localePatch as J } from "../config/i18n/index.js";
11
- import { en as E } from "../config/i18n/en/index.js";
12
- import { ToasterTypeOptions as X } from "../enums/toaster.js";
13
- import { useStripoApi as j } from "../services/stripoApi.js";
14
- import K from "../static/styles/customEditorStyle.css.js";
15
- import { useEditorStore as w } from "../stores/editor.js";
16
- import { buildMergeTagEntries as Q, flattenDynamicContentList as W } from "../utils/genericUtil.js";
17
- import Y from "../package.json.js";
18
- const he = (b, l) => {
19
- const { features: c, template: u, isFeatureEnabled: m } = q(), { handleError: p, showToaster: k } = G(), { getToken: T, getCustomFonts: v, getSyncModulesStatus: B } = j(), { handleEvent: F } = z(), { handleModuleAdd: M } = N(), { getStripoBlocksConfig: A } = O(), { getStripoNotifications: V } = $(), _ = async (n, i = [], r = !1) => {
20
- var S, y, h, C;
21
- const e = w(), { html: f, css: a } = n, { baseBlocks: o, extensions: d } = await A(), g = ((S = c.value) == null ? void 0 : S.displayConditions) ?? !0, P = ((y = c.value) == null ? void 0 : y.modulesDisabled) ?? !1, I = ((h = u.value) == null ? void 0 : h.forceRecreate) ?? !1;
1
+ import { useActionsApi as U } from "./useActionsApi.js";
2
+ import { useBlocksConfig as R } from "./useBlocksConfig.js";
3
+ import { useConfig as x } from "./useConfig.js";
4
+ import { useCustomInterfaceAppearance as O } from "./useCustomInterfaceAppearance.js";
5
+ import { useFullStoryBridge as q } from "./useFullStoryBridge.js";
6
+ import { useStripoEventHandler as H } from "./useStripoEventHandler.js";
7
+ import { useStripoNotifications as N } from "./useStripoNotifications.js";
8
+ import { useToaster as z } from "./useToaster.js";
9
+ import { localePatch as L } from "../config/i18n/index.js";
10
+ import { en as h } from "../config/i18n/en/index.js";
11
+ import { ToasterTypeOptions as $ } from "../enums/toaster.js";
12
+ import { useStripoApi as G } from "../services/stripoApi.js";
13
+ import J from "../static/styles/customEditorStyle.css.js";
14
+ import { useEditorStore as E } from "../stores/editor.js";
15
+ import { dynamicContentToMergeTags as X } from "../utils/genericUtil.js";
16
+ import j from "../package.json.js";
17
+ const fo = (C, l) => {
18
+ const { features: c, template: w, isFeatureEnabled: u } = x(), { handleError: m, showToaster: b } = z(), { getToken: T, getCustomFonts: k, getSyncModulesStatus: B } = G(), { handleEvent: F } = H(), { getStripoBlocksConfig: v } = R(), { getStripoNotifications: V } = N(), _ = async (s, i = [], r = !1) => {
19
+ var g, S, y;
20
+ const o = E(), { html: p, css: a } = s, { baseBlocks: t, extensions: d } = await v(), f = ((g = c.value) == null ? void 0 : g.displayConditions) ?? !0, M = ((S = c.value) == null ? void 0 : S.modulesDisabled) ?? !1, P = ((y = w.value) == null ? void 0 : y.forceRecreate) ?? !1;
22
21
  await window.UIEditor.initEditor(
23
22
  document.querySelector("#guido-editor"),
24
23
  {
25
- metadata: b,
26
- html: f,
24
+ metadata: C,
25
+ html: p,
27
26
  css: a,
28
- forceRecreate: I,
27
+ forceRecreate: P,
29
28
  locale: "en",
30
29
  undoButtonSelector: "#guido__undo-button",
31
30
  redoButtonSelector: "#guido__redo-button",
32
31
  mobileViewButtonSelector: ".guido__view-option-selection-mobile",
33
32
  desktopViewButtonSelector: ".guido__view-option-selection-desktop",
34
33
  codeEditorButtonSelector: "#guido__code-button",
35
- customAppearanceMergetags: !m("liquidSyntax"),
34
+ customAppearanceMergetags: !u("liquidSyntax"),
36
35
  customAppearanceMergetagsBorderColor: "#f1f3fe",
37
36
  customAppearanceMergetagsBackgroundColor: "#f1f3fe",
38
- customViewStyles: K,
39
- conditionsEnabled: g,
40
- customConditionsEnabled: g,
37
+ customViewStyles: J,
38
+ conditionsEnabled: f,
39
+ customConditionsEnabled: f,
41
40
  enableXSSSecurity: !0,
42
- modulesDisabled: P,
41
+ modulesDisabled: M,
43
42
  syncModulesEnabled: r,
44
43
  messageSettingsEnabled: !0,
45
44
  displayGmailAnnotations: !0,
@@ -49,7 +48,7 @@ const he = (b, l) => {
49
48
  selectElementAfterDrop: !0,
50
49
  sameFontSizeForOutlook: !0,
51
50
  allowedScriptSourceDomains: "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com",
52
- ...o ? { baseBlocks: o } : {},
51
+ ...t ? { baseBlocks: t } : {},
53
52
  editorFonts: {
54
53
  showDefaultStandardFonts: !0,
55
54
  showDefaultNotStandardFonts: !0,
@@ -57,45 +56,43 @@ const he = (b, l) => {
57
56
  },
58
57
  mergeTags: [
59
58
  {
60
- entries: Q(
59
+ entries: X(
61
60
  l.preselectedDynamicContentList,
62
- W((C = u.value) == null ? void 0 : C.dynamicContentList),
63
- m("liquidSyntax")
61
+ u("liquidSyntax")
64
62
  )
65
63
  }
66
64
  ],
67
- async onTokenRefreshRequest(t) {
65
+ async onTokenRefreshRequest(e) {
68
66
  try {
69
- const s = await T();
70
- t(s);
71
- } catch (s) {
72
- p(s, "Failed to refresh token");
67
+ const n = await T();
68
+ e(n);
69
+ } catch (n) {
70
+ m(n, "Failed to refresh token");
73
71
  }
74
72
  },
75
73
  onTemplateLoaded() {
76
74
  try {
77
- const { importCss: t } = H(), { activateCustomViewStyles: s, updateTimerInClonedTemplate: R } = x(), { injectFullStory: U } = L();
78
- t(), s(), U(), R(), l.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
79
- e.hasChanges = !1;
75
+ const { importCss: e } = O(), { activateCustomViewStyles: n, updateTimerInClonedTemplate: D } = U(), { injectFullStory: I } = q();
76
+ e(), n(), I(), D(), l.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
77
+ o.hasChanges = !1;
80
78
  }, 1e3);
81
- } catch (t) {
82
- p(t, "Failed to load custom interface appearance");
79
+ } catch (e) {
80
+ m(e, "Failed to load custom interface appearance");
83
81
  }
84
82
  },
85
- onCodeEditorVisibilityChanged(t) {
86
- e.isCodeEditorOpen = t;
83
+ onCodeEditorVisibilityChanged(e) {
84
+ o.isCodeEditorOpen = e;
87
85
  },
88
- onEditorVisualModeChanged(t) {
89
- e.editorVisualMode = t.toLowerCase();
86
+ onEditorVisualModeChanged(e) {
87
+ o.editorVisualMode = e.toLowerCase();
90
88
  },
91
- onVersionHistoryVisibilityChanged(t) {
92
- e.isVersionHistoryOpen = t;
89
+ onVersionHistoryVisibilityChanged(e) {
90
+ o.isVersionHistoryOpen = e;
93
91
  },
94
92
  onDataChanged() {
95
- e.hasChanges = !0;
93
+ o.hasChanges = !0;
96
94
  },
97
95
  onEvent: F,
98
- onModuleAdd: M,
99
96
  notifications: V(),
100
97
  ignoreClickOutsideSelectors: [
101
98
  "#guido-dynamic-content-modal",
@@ -103,38 +100,38 @@ const he = (b, l) => {
103
100
  ".in-drawer__container"
104
101
  ],
105
102
  extensions: d,
106
- localePatch: J
103
+ localePatch: L
107
104
  }
108
105
  );
109
- }, D = (n) => new Promise((i, r) => {
106
+ }, A = (s) => new Promise((i, r) => {
110
107
  var d;
111
108
  if (document.getElementById("UiEditorScript")) {
112
- Promise.resolve(n()).then(i, r);
109
+ Promise.resolve(s()).then(i, r);
113
110
  return;
114
111
  }
115
- const e = Y.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");
116
- o.id = "UiEditorScript", o.type = "module", o.src = a, o.onload = () => {
117
- Promise.resolve(n()).then(i, r);
118
- }, o.onerror = () => {
112
+ const o = j.guido, a = `https://email-static.useinsider.com/guido/${(d = o == null ? void 0 : o.stripo) == null ? void 0 : d.version}/UIEditor.js`, t = document.createElement("script");
113
+ t.id = "UiEditorScript", t.type = "module", t.src = a, t.onload = () => {
114
+ Promise.resolve(s()).then(i, r);
115
+ }, t.onerror = () => {
119
116
  r(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
120
- }, document.body.appendChild(o);
117
+ }, document.body.appendChild(t);
121
118
  });
122
- return { initPlugin: async (n) => {
123
- const i = w();
119
+ return { initPlugin: async (s) => {
120
+ const i = E();
124
121
  try {
125
- await D(async () => {
126
- const [r, e] = await Promise.all([
127
- v(),
122
+ await A(async () => {
123
+ const [r, o] = await Promise.all([
124
+ k(),
128
125
  B()
129
126
  ]);
130
- i.syncModulesEnabled = e, await _(n, r, e);
127
+ i.syncModulesEnabled = o, await _(s, r, o);
131
128
  });
132
129
  } catch {
133
- i.loadingStatus = !1, k({
134
- type: X.Error,
135
- message: E["An error has occurred. Please report the error code to support."],
130
+ i.loadingStatus = !1, b({
131
+ type: $.Error,
132
+ message: h["An error has occurred. Please report the error code to support."],
136
133
  actionButton: {
137
- text: E["Reload page"],
134
+ text: h["Reload page"],
138
135
  onClick: () => window.location.reload()
139
136
  }
140
137
  });
@@ -142,5 +139,5 @@ const he = (b, l) => {
142
139
  } };
143
140
  };
144
141
  export {
145
- he as useStripo
142
+ fo as useStripo
146
143
  };