@topol.io/editor-react 0.0.4 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,48 +2,48 @@
2
2
  <img src="https://storage.googleapis.com/topolio17326/plugin-assets/6320/17326/topol-with-bg.png" alt="Tailwind CSS" width="400" height="120">
3
3
  </a>
4
4
 
5
- ----
5
+ ---
6
6
 
7
7
  Easy and quick! Drag and drop HTML editor and builder for beautiful responsive email templates.
8
8
 
9
-
10
9
  # Documentation
11
10
 
12
11
  ## Installation
12
+
13
13
  Install Editor from NPM using:
14
14
 
15
15
  ```sh
16
16
  npm install @topol.io/editor-react
17
17
 
18
- //or
18
+ //or
19
19
 
20
20
  yarn add @topol.io/editor-react
21
21
  ```
22
22
 
23
23
  ## Use in Component
24
+
24
25
  In your React component import and add the simplest options.
25
26
 
26
- For more options see the docs for [TopolOptions configuration](https://topol.io/docs#plugin-configuration)
27
+ For more options see the docs for [TopolOptions configuration](https://docs.topol.io/reference/topol-options.html)
27
28
 
28
29
  ```js
29
30
  import TopolEditor from '@topol.io/editor-react';
30
31
 
31
32
  const customOptions = {
32
33
  authorize: {
33
- apiKey: "YOUR_API_TOKEN",
34
- userId: "some-user-id",
35
- },
34
+ apiKey: 'YOUR_API_TOKEN',
35
+ userId: 'some-user-id',
36
+ },
36
37
  };
37
-
38
38
  ```
39
39
 
40
40
  ```jsx
41
41
  <TopolEditor options={customOptions}></TopolEditor>
42
42
  ```
43
43
 
44
-
45
44
  ## Call Topol Plugin actions
46
- To call actions to the editor import:
45
+
46
+ To call actions to the editor import:
47
47
 
48
48
  ```js
49
49
  import { TopolPlugin } from '@topol.io/editor-react';
@@ -53,20 +53,27 @@ TopolPlugin.save();
53
53
 
54
54
  ### List of all available TopolPlugin actions:
55
55
 
56
- | Action | Description |
57
- | --- | ----------- |
58
- | `TopolPlugin.save()` | Saves the content of the editor [more info](https://topol.io/docs#plugin-configuration) |
59
- | `TopolPlugin.load(template`) | Loads the provided template [more info](https://topol.io/docs#save-and-load-options) |
60
- | `TopolPlugin.togglePreview()` | Toggles editor preview [more info](https://topol.io/docs#preview-mode-on-desktop-and-mobile)|
61
- | `TopolPlugin.togglePreviewSize()` | Toggles editor preview size |
62
- | `TopolPlugin.undo()` | Undo change in editor [more info](https://topol.io/docs#redo-and-undo)|
63
- | `TopolPlugin.redo()` | Redo change in editor [more info](https://topol.io/docs#redo-and-undo)|
64
- | `TopolPlugin.setSavedBlocks(savedblock: ISavedBlock[])` | Sets the saved blocks [more info](https://topol.io/docs#saved-blocks) |
65
- | `TopolPlugin.createNotification(notification: INotification)` | Creates editor's notification [more info](https://topol.io/docs#show-custom-notification-in-editor) |
66
- | `TopolPlugin.changeEmailToMobile()` | Change email to mobile view [more info](https://topol.io/docs#mobile-first-email-template)|
67
- | `TopolPlugin.changeEmailToDesktop()` | Change email to desktop view [more info](https://topol.io/docs#mobile-first-email-template)|
68
- | `TopolPlugin.toggleBlocksAndStructuresVisibility()` | Toggle hidden structures visibility for blocks and structures [more info](https://topol.io/docs#mobile-first-email-template)|
69
- | `TopolPlugin.destroy()` | Destroys the editor initialization [more info](https://topol.io/docs#working-with-js-frameworks) |
56
+ | Action | Description |
57
+ | --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
58
+ | `TopolPlugin.save()` | Saves the content of the editor [more info](https://docs.topol.io/guide/how-to-use-custom-topbar.html#save-and-saveandclose) |
59
+ | `TopolPlugin.load(template`) | Loads the provided template [more info](https://docs.topol.io/guide/how-to-load-and-save-template.html#loading-template) |
60
+ | `TopolPlugin.togglePreview()` | Toggles editor preview [more info](https://docs.topol.io/guide/how-to-use-custom-topbar.html#changing-preview-mode) |
61
+ | `TopolPlugin.togglePreviewSize()` | Toggles editor preview size [more info](https://docs.topol.io/guide/how-to-use-custom-topbar.html#changing-preview-mode) |
62
+ | `TopolPlugin.undo()` | Undo change in editor [more info](https://docs.topol.io/guide/how-to-use-custom-topbar.html#undo-and-redo) |
63
+ | `TopolPlugin.redo()` | Redo change in editor [more info](https://docs.topol.io/guide/how-to-use-custom-topbar.html#undo-and-redo) |
64
+ | `TopolPlugin.setSavedBlocks(savedblock: ISavedBlock[])` | Sets the saved blocks [more info](https://docs.topol.io/guide/saved-blocks.html) |
65
+ | `TopolPlugin.createNotification(notification: INotification)` | Creates editor's notification [more info](https://docs.topol.io/guide/custom-notifications.html) |
66
+ | `TopolPlugin.changeEmailToMobile()` | Change email to mobile view [more info](https://docs.topol.io/guide/mobile-first.html#mobile-first-email-template) |
67
+ | `TopolPlugin.changeEmailToDesktop()` | Change email to desktop view [more info](https://docs.topol.io/guide/mobile-first.html#mobile-first-email-template) |
68
+ | `TopolPlugin.toggleBlocksAndStructuresVisibility()` | Toggle hidden structures visibility for blocks and structures [more info](https://docs.topol.io/guide/mobile-first.html#mobile-first-email-template) |
69
+ | `TopolPlugin.destroy()` | Destroys the editor initialization |
70
+ | `TopolPlugin.chooseFile()` | Chooses the file if image block is active [more info](https://docs.topol.io/guide/custom-filemanager.html#choosefile) |
71
+ | `TopolPlugin.openPremadeTemplatesSelection()` | Opens the premade templates modal pick [more info](https://docs.topol.io/guide/premade-templates-in-editor.html) |
72
+ | `TopolPlugin.refreshComments(key: string)` | Refreshes the conversation [more info](https://docs.topol.io/guide/comments.html#refreshcomments) |
73
+ | `TopolPlugin.setActiveMembers(activeMemers: string[])` | Sets the active members |
74
+ | `TopolPlugin.setTemplateName(name: string)` | Sets the name of template [more info](https://docs.topol.io/guide/rename-template.html) |
75
+ | `TopolPlugin.updateApiAuthorizationHeader(newHeader: string \| Record<string, string>)` | Refreshes the authorization tokens [more info](https://docs.topol.io/guide/security.html#refresh-token) |
76
+ | `TopolPlugin.updateCustomBlockContent(content: string)` | Refreshes the authorization tokens [more info](https://docs.topol.io/guide/custom-block.html#inserting-custom-html-in-custom-dialog-component) |
70
77
 
71
78
  <br>
72
79
 
@@ -75,26 +82,35 @@ TopolPlugin.save();
75
82
  The callbacks from editor are received as component events.
76
83
 
77
84
  ```tsx
78
- <TopolEditor options={customOptions} onSave={handleOnSave}></TopolEditor>
85
+ <TopolEditor
86
+ options={customOptions}
87
+ onSave={handleOnSave}
88
+ ></TopolEditor>
79
89
  ```
80
90
 
81
91
  ### List of all editor events
82
92
 
83
- | Event | Description |
84
- | --- | ----------- |
85
- | `onSave` | Returns object which contains html and json of the template} [more info](https://topol.io/docs#onsave-and-onsaveandclose) |
86
- | `onSaveAndClose` | Returns object which contains html and json of the template [more info](https://topol.io/docs#onsave-and-onsaveandclose) |
87
- | `onTestSend` | Returns object which contains email, html and json of the template [more info](https://topol.io/docs#on-test-send) |
88
- | `onOpenFileManager` | When user clicks file manager open [more info](https://topol.io/docs#custom-file-manager)|
89
- | `onLoaded` | When editor is fully loaded |
90
- | `onInit` | When editor inits [more info](https://topol.io/docs#custom-file-manager) |
91
- | `onBlockSave` | When user saves block in editor, returns object of type ISavedBlock [more info](https://topol.io/docs#saved-blocks) |
92
- | `onBlockRemove` | When user removes saved block, returns id of saved block to be removed [more info](https://topol.io/docs#saved-blocks) |
93
- | `onBlockEdit` | When user edits saved block, returns id of saved block to be updated [more info](https://topol.io/docs#saved-blocks) |
94
- | `onUndoChange` | When user clicks undo button, retunrs number of steps user undone [more info](https://topol.io/docs#redo-and-undo) |
95
- | `unRedoChange` | When user clicks redo button, retunrs number of steps user redone [more info](https://topol.io/docs#redo-and-undo) |
96
- | `onPreview` | When user switches to preview |
97
- | `onAlert` | When alert appears in editor [more info](https://topol.io/docs#show-custom-notification-in-editor)|
93
+ | Event | Description |
94
+ | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
95
+ | `@onSave` | Returns object which contains html and json of the template [more info](https://docs.topol.io/guide/callbacks.html#on-save) |
96
+ | `@onSaveAndClose` | Returns object which contains html and json of the template [more info](https://docs.topol.io/guide/callbacks.html#on-save-and-close) |
97
+ | `@onTestSend` | Returns object which contains email, html and json of the template [more info](https://docs.topol.io/guide/callbacks.html#on-test-email-send) |
98
+ | `@onOpenFileManager` | When user clicks file manager open [more info](https://docs.topol.io/guide/custom-filemanager.html#onopenfilemanager) |
99
+ | `@onLoaded` | After editor template is loaded using `TopolPlugin.load()` [more info](https://docs.topol.io/guide/callbacks.html#on-loaded) |
100
+ | `@onInit` | When editor inits [more info](https://docs.topol.io/guide/callbacks.html#on-init) |
101
+ | `@onBlockSave` | When user saves block in editor, returns object of type ISavedBlock [more info](https://docs.topol.io/guide/callbacks.html#on-block-save) |
102
+ | `@onBlockRemove` | When user removes saved block, returns id of saved block to be removed [more info](https://docs.topol.io/guide/callbacks.html#on-block-remove) |
103
+ | `@onBlockEdit` | When user edits saved block, returns id of saved block to be updated [more info](https://docs.topol.io/guide/callbacks.html#on-block-edit) |
104
+ | `@onUndoChange` | When user clicks undo button, retunrs number of steps user undone [more info](https://docs.topol.io/guide/callbacks.html#on-undo-change) |
105
+ | `@onRedoChange` | When user clicks redo button, retunrs number of steps user redone [more info](https://docs.topol.io/guide/callbacks.html#on-redo-change) |
106
+ | `@onPreview` | When user switches to preview [more info](https://docs.topol.io/guide/callbacks.html#on-preview) |
107
+ | `@onAlert` | When alert appears in editor [more info](https://docs.topol.io/guide/callbacks.html#on-alert) |
108
+ | `@onClose` | When close is click inside WindowBar [more info](https://docs.topol.io/guide/top-bar.html#window-bar) |
109
+ | `@onEdittedWithoutSaveChanged` | When user is about to leave an editor with unsaved changes [more info](https://docs.topol.io/guide/disable-before-leaving-modal.html#before-exit-modal-when-user-has-unsaved-changes) |
110
+ | `@onOpenCustomBlockDialog` | When user clicks on the open dialog in custom block [more info](https://docs.topol.io/guide/custom-block.html#inserting-custom-html-in-custom-dialog-component) |
111
+ | `@onTemplateRename` | When user clicks on the pencil icon next to the template name [more info](https://docs.topol.io/guide/rename-template.html#rename-template) |
112
+ | `@updateTestingEmailAddresses` | When user edits the email list in preview [more info](https://docs.topol.io/guide/sending-a-test-email.html#managing-saving-emails-yourself) |
113
+ | `@onError` | When an error that cannot be handled happened in the editor [more info](https://docs.topol.io/guide/callbacks.html#onerror) |
98
114
 
99
115
  <br>
100
116
 
@@ -103,5 +119,9 @@ The callbacks from editor are received as component events.
103
119
  Topol Editor provides full TypeScript integration and exports all necessary types.
104
120
 
105
121
  ```tsx
106
- import { ITopolOptions, INotification, ISavedBlock } from '@topol.io/editor-react';
122
+ import {
123
+ ITopolOptions,
124
+ INotification,
125
+ ISavedBlock,
126
+ } from '@topol.io/editor-react';
107
127
  ```
@@ -12,26 +12,26 @@ var Z = { exports: {} }, F = {};
12
12
  var _e;
13
13
  function fr() {
14
14
  return _e || (_e = 1, process.env.NODE_ENV !== "production" && function() {
15
- var t = Oe, u = Symbol.for("react.element"), g = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), j = Symbol.for("react.provider"), _ = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), B = Symbol.for("react.offscreen"), Q = Symbol.iterator, ke = "@@iterator";
15
+ var n = Oe, u = Symbol.for("react.element"), g = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), j = Symbol.for("react.provider"), _ = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), B = Symbol.for("react.offscreen"), Q = Symbol.iterator, ke = "@@iterator";
16
16
  function xe(e) {
17
17
  if (e === null || typeof e != "object")
18
18
  return null;
19
19
  var r = Q && e[Q] || e[ke];
20
20
  return typeof r == "function" ? r : null;
21
21
  }
22
- var O = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
23
- function p(e) {
22
+ var O = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
23
+ function m(e) {
24
24
  {
25
- for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
26
- n[o - 1] = arguments[o];
27
- je("error", e, n);
25
+ for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
26
+ t[o - 1] = arguments[o];
27
+ je("error", e, t);
28
28
  }
29
29
  }
30
- function je(e, r, n) {
30
+ function je(e, r, t) {
31
31
  {
32
32
  var o = O.ReactDebugCurrentFrame, s = o.getStackAddendum();
33
- s !== "" && (r += "%s", n = n.concat([s]));
34
- var c = n.map(function(l) {
33
+ s !== "" && (r += "%s", t = t.concat([s]));
34
+ var c = t.map(function(l) {
35
35
  return String(l);
36
36
  });
37
37
  c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
@@ -40,18 +40,18 @@ function fr() {
40
40
  var Ae = !1, De = !1, Fe = !1, Ie = !1, Be = !1, ee;
41
41
  ee = Symbol.for("react.module.reference");
42
42
  function Me(e) {
43
- return !!(typeof e == "string" || typeof e == "function" || e === a || e === y || Be || e === f || e === C || e === E || Ie || e === B || Ae || De || Fe || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === R || e.$$typeof === j || e.$$typeof === _ || e.$$typeof === h || // This needs to include all possible module reference object
43
+ return !!(typeof e == "string" || typeof e == "function" || e === a || e === b || Be || e === f || e === C || e === E || Ie || e === B || Ae || De || Fe || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === w || e.$$typeof === j || e.$$typeof === _ || e.$$typeof === h || // This needs to include all possible module reference object
44
44
  // types supported by any Flight configuration anywhere since
45
45
  // we don't know which Flight build this will end up being used
46
46
  // with.
47
47
  e.$$typeof === ee || e.getModuleId !== void 0));
48
48
  }
49
- function Le(e, r, n) {
49
+ function We(e, r, t) {
50
50
  var o = e.displayName;
51
51
  if (o)
52
52
  return o;
53
53
  var s = r.displayName || r.name || "";
54
- return s !== "" ? n + "(" + s + ")" : n;
54
+ return s !== "" ? t + "(" + s + ")" : t;
55
55
  }
56
56
  function re(e) {
57
57
  return e.displayName || "Context";
@@ -59,7 +59,7 @@ function fr() {
59
59
  function T(e) {
60
60
  if (e == null)
61
61
  return null;
62
- if (typeof e.tag == "number" && p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
62
+ if (typeof e.tag == "number" && m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
63
63
  return e.displayName || e.name || null;
64
64
  if (typeof e == "string")
65
65
  return e;
@@ -68,7 +68,7 @@ function fr() {
68
68
  return "Fragment";
69
69
  case g:
70
70
  return "Portal";
71
- case y:
71
+ case b:
72
72
  return "Profiler";
73
73
  case f:
74
74
  return "StrictMode";
@@ -83,11 +83,11 @@ function fr() {
83
83
  var r = e;
84
84
  return re(r) + ".Consumer";
85
85
  case j:
86
- var n = e;
87
- return re(n._context) + ".Provider";
86
+ var t = e;
87
+ return re(t._context) + ".Provider";
88
88
  case h:
89
- return Le(e, e.render, "ForwardRef");
90
- case R:
89
+ return We(e, e.render, "ForwardRef");
90
+ case w:
91
91
  var o = e.displayName || null;
92
92
  return o !== null ? o : T(e.type) || "Memo";
93
93
  case P: {
@@ -101,14 +101,14 @@ function fr() {
101
101
  }
102
102
  return null;
103
103
  }
104
- var S = Object.assign, A = 0, te, ne, oe, ae, ie, le, ue;
104
+ var S = Object.assign, A = 0, ne, te, oe, ae, ie, le, ue;
105
105
  function se() {
106
106
  }
107
107
  se.__reactDisabledLog = !0;
108
- function $e() {
108
+ function Le() {
109
109
  {
110
110
  if (A === 0) {
111
- te = console.log, ne = console.info, oe = console.warn, ae = console.error, ie = console.group, le = console.groupCollapsed, ue = console.groupEnd;
111
+ ne = console.log, te = console.info, oe = console.warn, ae = console.error, ie = console.group, le = console.groupCollapsed, ue = console.groupEnd;
112
112
  var e = {
113
113
  configurable: !0,
114
114
  enumerable: !0,
@@ -128,7 +128,7 @@ function fr() {
128
128
  A++;
129
129
  }
130
130
  }
131
- function We() {
131
+ function $e() {
132
132
  {
133
133
  if (A--, A === 0) {
134
134
  var e = {
@@ -138,10 +138,10 @@ function fr() {
138
138
  };
139
139
  Object.defineProperties(console, {
140
140
  log: S({}, e, {
141
- value: te
141
+ value: ne
142
142
  }),
143
143
  info: S({}, e, {
144
- value: ne
144
+ value: te
145
145
  }),
146
146
  warn: S({}, e, {
147
147
  value: oe
@@ -160,11 +160,11 @@ function fr() {
160
160
  })
161
161
  });
162
162
  }
163
- A < 0 && p("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
163
+ A < 0 && m("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
164
164
  }
165
165
  }
166
- var N = O.ReactCurrentDispatcher, U;
167
- function M(e, r, n) {
166
+ var Y = O.ReactCurrentDispatcher, U;
167
+ function M(e, r, t) {
168
168
  {
169
169
  if (U === void 0)
170
170
  try {
@@ -177,25 +177,25 @@ function fr() {
177
177
  ` + U + e;
178
178
  }
179
179
  }
180
- var V = !1, L;
180
+ var V = !1, W;
181
181
  {
182
- var Ye = typeof WeakMap == "function" ? WeakMap : Map;
183
- L = new Ye();
182
+ var Ne = typeof WeakMap == "function" ? WeakMap : Map;
183
+ W = new Ne();
184
184
  }
185
185
  function ce(e, r) {
186
186
  if (!e || V)
187
187
  return "";
188
188
  {
189
- var n = L.get(e);
190
- if (n !== void 0)
191
- return n;
189
+ var t = W.get(e);
190
+ if (t !== void 0)
191
+ return t;
192
192
  }
193
193
  var o;
194
194
  V = !0;
195
195
  var s = Error.prepareStackTrace;
196
196
  Error.prepareStackTrace = void 0;
197
197
  var c;
198
- c = N.current, N.current = null, $e();
198
+ c = Y.current, Y.current = null, Le();
199
199
  try {
200
200
  if (r) {
201
201
  var l = function() {
@@ -208,59 +208,59 @@ function fr() {
208
208
  }), typeof Reflect == "object" && Reflect.construct) {
209
209
  try {
210
210
  Reflect.construct(l, []);
211
- } catch (w) {
212
- o = w;
211
+ } catch (R) {
212
+ o = R;
213
213
  }
214
214
  Reflect.construct(e, [], l);
215
215
  } else {
216
216
  try {
217
217
  l.call();
218
- } catch (w) {
219
- o = w;
218
+ } catch (R) {
219
+ o = R;
220
220
  }
221
221
  e.call(l.prototype);
222
222
  }
223
223
  } else {
224
224
  try {
225
225
  throw Error();
226
- } catch (w) {
227
- o = w;
226
+ } catch (R) {
227
+ o = R;
228
228
  }
229
229
  e();
230
230
  }
231
- } catch (w) {
232
- if (w && o && typeof w.stack == "string") {
233
- for (var i = w.stack.split(`
234
- `), m = o.stack.split(`
235
- `), d = i.length - 1, v = m.length - 1; d >= 1 && v >= 0 && i[d] !== m[v]; )
231
+ } catch (R) {
232
+ if (R && o && typeof R.stack == "string") {
233
+ for (var i = R.stack.split(`
234
+ `), p = o.stack.split(`
235
+ `), d = i.length - 1, v = p.length - 1; d >= 1 && v >= 0 && i[d] !== p[v]; )
236
236
  v--;
237
237
  for (; d >= 1 && v >= 0; d--, v--)
238
- if (i[d] !== m[v]) {
238
+ if (i[d] !== p[v]) {
239
239
  if (d !== 1 || v !== 1)
240
240
  do
241
- if (d--, v--, v < 0 || i[d] !== m[v]) {
242
- var b = `
241
+ if (d--, v--, v < 0 || i[d] !== p[v]) {
242
+ var y = `
243
243
  ` + i[d].replace(" at new ", " at ");
244
- return e.displayName && b.includes("<anonymous>") && (b = b.replace("<anonymous>", e.displayName)), typeof e == "function" && L.set(e, b), b;
244
+ return e.displayName && y.includes("<anonymous>") && (y = y.replace("<anonymous>", e.displayName)), typeof e == "function" && W.set(e, y), y;
245
245
  }
246
246
  while (d >= 1 && v >= 0);
247
247
  break;
248
248
  }
249
249
  }
250
250
  } finally {
251
- V = !1, N.current = c, We(), Error.prepareStackTrace = s;
251
+ V = !1, Y.current = c, $e(), Error.prepareStackTrace = s;
252
252
  }
253
- var x = e ? e.displayName || e.name : "", we = x ? M(x) : "";
254
- return typeof e == "function" && L.set(e, we), we;
253
+ var x = e ? e.displayName || e.name : "", Re = x ? M(x) : "";
254
+ return typeof e == "function" && W.set(e, Re), Re;
255
255
  }
256
- function Ne(e, r, n) {
256
+ function Ye(e, r, t) {
257
257
  return ce(e, !1);
258
258
  }
259
259
  function Ue(e) {
260
260
  var r = e.prototype;
261
261
  return !!(r && r.isReactComponent);
262
262
  }
263
- function $(e, r, n) {
263
+ function L(e, r, t) {
264
264
  if (e == null)
265
265
  return "";
266
266
  if (typeof e == "function")
@@ -276,43 +276,43 @@ function fr() {
276
276
  if (typeof e == "object")
277
277
  switch (e.$$typeof) {
278
278
  case h:
279
- return Ne(e.render);
280
- case R:
281
- return $(e.type, r, n);
279
+ return Ye(e.render);
280
+ case w:
281
+ return L(e.type, r, t);
282
282
  case P: {
283
283
  var o = e, s = o._payload, c = o._init;
284
284
  try {
285
- return $(c(s), r, n);
285
+ return L(c(s), r, t);
286
286
  } catch {
287
287
  }
288
288
  }
289
289
  }
290
290
  return "";
291
291
  }
292
- var W = Object.prototype.hasOwnProperty, fe = {}, de = O.ReactDebugCurrentFrame;
293
- function Y(e) {
292
+ var $ = Object.prototype.hasOwnProperty, fe = {}, de = O.ReactDebugCurrentFrame;
293
+ function N(e) {
294
294
  if (e) {
295
- var r = e._owner, n = $(e.type, e._source, r ? r.type : null);
296
- de.setExtraStackFrame(n);
295
+ var r = e._owner, t = L(e.type, e._source, r ? r.type : null);
296
+ de.setExtraStackFrame(t);
297
297
  } else
298
298
  de.setExtraStackFrame(null);
299
299
  }
300
- function Ve(e, r, n, o, s) {
300
+ function Ve(e, r, t, o, s) {
301
301
  {
302
- var c = Function.call.bind(W);
302
+ var c = Function.call.bind($);
303
303
  for (var l in e)
304
304
  if (c(e, l)) {
305
305
  var i = void 0;
306
306
  try {
307
307
  if (typeof e[l] != "function") {
308
- var m = Error((o || "React class") + ": " + n + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
309
- throw m.name = "Invariant Violation", m;
308
+ var p = Error((o || "React class") + ": " + t + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
309
+ throw p.name = "Invariant Violation", p;
310
310
  }
311
- i = e[l](r, l, o, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
311
+ i = e[l](r, l, o, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
312
312
  } catch (d) {
313
313
  i = d;
314
314
  }
315
- i && !(i instanceof Error) && (Y(s), p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", o || "React class", n, l, typeof i), Y(null)), i instanceof Error && !(i.message in fe) && (fe[i.message] = !0, Y(s), p("Failed %s type: %s", n, i.message), Y(null));
315
+ i && !(i instanceof Error) && (N(s), m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", o || "React class", t, l, typeof i), N(null)), i instanceof Error && !(i.message in fe) && (fe[i.message] = !0, N(s), m("Failed %s type: %s", t, i.message), N(null));
316
316
  }
317
317
  }
318
318
  }
@@ -322,11 +322,11 @@ function fr() {
322
322
  }
323
323
  function qe(e) {
324
324
  {
325
- var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
326
- return n;
325
+ var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
326
+ return t;
327
327
  }
328
328
  }
329
- function Je(e) {
329
+ function He(e) {
330
330
  try {
331
331
  return ve(e), !1;
332
332
  } catch {
@@ -337,18 +337,18 @@ function fr() {
337
337
  return "" + e;
338
338
  }
339
339
  function ge(e) {
340
- if (Je(e))
341
- return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", qe(e)), ve(e);
340
+ if (He(e))
341
+ return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", qe(e)), ve(e);
342
342
  }
343
- var D = O.ReactCurrentOwner, Ge = {
343
+ var D = O.ReactCurrentOwner, Je = {
344
344
  key: !0,
345
345
  ref: !0,
346
346
  __self: !0,
347
347
  __source: !0
348
- }, he, pe, q;
348
+ }, he, me, q;
349
349
  q = {};
350
- function He(e) {
351
- if (W.call(e, "ref")) {
350
+ function Ge(e) {
351
+ if ($.call(e, "ref")) {
352
352
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
353
353
  if (r && r.isReactWarning)
354
354
  return !1;
@@ -356,7 +356,7 @@ function fr() {
356
356
  return e.ref !== void 0;
357
357
  }
358
358
  function Ke(e) {
359
- if (W.call(e, "key")) {
359
+ if ($.call(e, "key")) {
360
360
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
361
361
  if (r && r.isReactWarning)
362
362
  return !1;
@@ -365,40 +365,40 @@ function fr() {
365
365
  }
366
366
  function Xe(e, r) {
367
367
  if (typeof e.ref == "string" && D.current && r && D.current.stateNode !== r) {
368
- var n = T(D.current.type);
369
- q[n] || (p('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', T(D.current.type), e.ref), q[n] = !0);
368
+ var t = T(D.current.type);
369
+ q[t] || (m('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', T(D.current.type), e.ref), q[t] = !0);
370
370
  }
371
371
  }
372
372
  function Ze(e, r) {
373
373
  {
374
- var n = function() {
375
- he || (he = !0, p("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
374
+ var t = function() {
375
+ he || (he = !0, m("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
376
376
  };
377
- n.isReactWarning = !0, Object.defineProperty(e, "key", {
378
- get: n,
377
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
378
+ get: t,
379
379
  configurable: !0
380
380
  });
381
381
  }
382
382
  }
383
383
  function Qe(e, r) {
384
384
  {
385
- var n = function() {
386
- pe || (pe = !0, p("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
385
+ var t = function() {
386
+ me || (me = !0, m("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
387
387
  };
388
- n.isReactWarning = !0, Object.defineProperty(e, "ref", {
389
- get: n,
388
+ t.isReactWarning = !0, Object.defineProperty(e, "ref", {
389
+ get: t,
390
390
  configurable: !0
391
391
  });
392
392
  }
393
393
  }
394
- var er = function(e, r, n, o, s, c, l) {
394
+ var er = function(e, r, t, o, s, c, l) {
395
395
  var i = {
396
396
  // This tag allows us to uniquely identify this as a React Element
397
397
  $$typeof: u,
398
398
  // Built-in properties that belong on the element
399
399
  type: e,
400
400
  key: r,
401
- ref: n,
401
+ ref: t,
402
402
  props: l,
403
403
  // Record the component responsible for creating this element.
404
404
  _owner: c
@@ -420,41 +420,41 @@ function fr() {
420
420
  value: s
421
421
  }), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
422
422
  };
423
- function rr(e, r, n, o, s) {
423
+ function rr(e, r, t, o, s) {
424
424
  {
425
- var c, l = {}, i = null, m = null;
426
- n !== void 0 && (ge(n), i = "" + n), Ke(r) && (ge(r.key), i = "" + r.key), He(r) && (m = r.ref, Xe(r, s));
425
+ var c, l = {}, i = null, p = null;
426
+ t !== void 0 && (ge(t), i = "" + t), Ke(r) && (ge(r.key), i = "" + r.key), Ge(r) && (p = r.ref, Xe(r, s));
427
427
  for (c in r)
428
- W.call(r, c) && !Ge.hasOwnProperty(c) && (l[c] = r[c]);
428
+ $.call(r, c) && !Je.hasOwnProperty(c) && (l[c] = r[c]);
429
429
  if (e && e.defaultProps) {
430
430
  var d = e.defaultProps;
431
431
  for (c in d)
432
432
  l[c] === void 0 && (l[c] = d[c]);
433
433
  }
434
- if (i || m) {
434
+ if (i || p) {
435
435
  var v = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
436
- i && Ze(l, v), m && Qe(l, v);
436
+ i && Ze(l, v), p && Qe(l, v);
437
437
  }
438
- return er(e, i, m, s, o, D.current, l);
438
+ return er(e, i, p, s, o, D.current, l);
439
439
  }
440
440
  }
441
- var J = O.ReactCurrentOwner, me = O.ReactDebugCurrentFrame;
441
+ var H = O.ReactCurrentOwner, pe = O.ReactDebugCurrentFrame;
442
442
  function k(e) {
443
443
  if (e) {
444
- var r = e._owner, n = $(e.type, e._source, r ? r.type : null);
445
- me.setExtraStackFrame(n);
444
+ var r = e._owner, t = L(e.type, e._source, r ? r.type : null);
445
+ pe.setExtraStackFrame(t);
446
446
  } else
447
- me.setExtraStackFrame(null);
447
+ pe.setExtraStackFrame(null);
448
448
  }
449
- var G;
450
- G = !1;
451
- function H(e) {
449
+ var J;
450
+ J = !1;
451
+ function G(e) {
452
452
  return typeof e == "object" && e !== null && e.$$typeof === u;
453
453
  }
454
454
  function Ee() {
455
455
  {
456
- if (J.current) {
457
- var e = T(J.current.type);
456
+ if (H.current) {
457
+ var e = T(H.current.type);
458
458
  if (e)
459
459
  return `
460
460
 
@@ -463,59 +463,59 @@ Check the render method of \`` + e + "`.";
463
463
  return "";
464
464
  }
465
465
  }
466
- function tr(e) {
466
+ function nr(e) {
467
467
  {
468
468
  if (e !== void 0) {
469
- var r = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
469
+ var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
470
470
  return `
471
471
 
472
- Check your code at ` + r + ":" + n + ".";
472
+ Check your code at ` + r + ":" + t + ".";
473
473
  }
474
474
  return "";
475
475
  }
476
476
  }
477
- var be = {};
478
- function nr(e) {
477
+ var ye = {};
478
+ function tr(e) {
479
479
  {
480
480
  var r = Ee();
481
481
  if (!r) {
482
- var n = typeof e == "string" ? e : e.displayName || e.name;
483
- n && (r = `
482
+ var t = typeof e == "string" ? e : e.displayName || e.name;
483
+ t && (r = `
484
484
 
485
- Check the top-level render call using <` + n + ">.");
485
+ Check the top-level render call using <` + t + ">.");
486
486
  }
487
487
  return r;
488
488
  }
489
489
  }
490
- function ye(e, r) {
490
+ function be(e, r) {
491
491
  {
492
492
  if (!e._store || e._store.validated || e.key != null)
493
493
  return;
494
494
  e._store.validated = !0;
495
- var n = nr(r);
496
- if (be[n])
495
+ var t = tr(r);
496
+ if (ye[t])
497
497
  return;
498
- be[n] = !0;
498
+ ye[t] = !0;
499
499
  var o = "";
500
- e && e._owner && e._owner !== J.current && (o = " It was passed a child from " + T(e._owner.type) + "."), k(e), p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, o), k(null);
500
+ e && e._owner && e._owner !== H.current && (o = " It was passed a child from " + T(e._owner.type) + "."), k(e), m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, o), k(null);
501
501
  }
502
502
  }
503
- function Re(e, r) {
503
+ function we(e, r) {
504
504
  {
505
505
  if (typeof e != "object")
506
506
  return;
507
507
  if (z(e))
508
- for (var n = 0; n < e.length; n++) {
509
- var o = e[n];
510
- H(o) && ye(o, r);
508
+ for (var t = 0; t < e.length; t++) {
509
+ var o = e[t];
510
+ G(o) && be(o, r);
511
511
  }
512
- else if (H(e))
512
+ else if (G(e))
513
513
  e._store && (e._store.validated = !0);
514
514
  else if (e) {
515
515
  var s = xe(e);
516
516
  if (typeof s == "function" && s !== e.entries)
517
517
  for (var c = s.call(e), l; !(l = c.next()).done; )
518
- H(l.value) && ye(l.value, r);
518
+ G(l.value) && be(l.value, r);
519
519
  }
520
520
  }
521
521
  }
@@ -524,73 +524,73 @@ Check the top-level render call using <` + n + ">.");
524
524
  var r = e.type;
525
525
  if (r == null || typeof r == "string")
526
526
  return;
527
- var n;
527
+ var t;
528
528
  if (typeof r == "function")
529
- n = r.propTypes;
529
+ t = r.propTypes;
530
530
  else if (typeof r == "object" && (r.$$typeof === h || // Note: Memo only checks outer props here.
531
531
  // Inner props are checked in the reconciler.
532
- r.$$typeof === R))
533
- n = r.propTypes;
532
+ r.$$typeof === w))
533
+ t = r.propTypes;
534
534
  else
535
535
  return;
536
- if (n) {
536
+ if (t) {
537
537
  var o = T(r);
538
- Ve(n, e.props, "prop", o, e);
539
- } else if (r.PropTypes !== void 0 && !G) {
540
- G = !0;
538
+ Ve(t, e.props, "prop", o, e);
539
+ } else if (r.PropTypes !== void 0 && !J) {
540
+ J = !0;
541
541
  var s = T(r);
542
- p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
542
+ m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
543
543
  }
544
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
544
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
545
545
  }
546
546
  }
547
547
  function ar(e) {
548
548
  {
549
- for (var r = Object.keys(e.props), n = 0; n < r.length; n++) {
550
- var o = r[n];
549
+ for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
550
+ var o = r[t];
551
551
  if (o !== "children" && o !== "key") {
552
- k(e), p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), k(null);
552
+ k(e), m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), k(null);
553
553
  break;
554
554
  }
555
555
  }
556
- e.ref !== null && (k(e), p("Invalid attribute `ref` supplied to `React.Fragment`."), k(null));
556
+ e.ref !== null && (k(e), m("Invalid attribute `ref` supplied to `React.Fragment`."), k(null));
557
557
  }
558
558
  }
559
- function Te(e, r, n, o, s, c) {
559
+ function Te(e, r, t, o, s, c) {
560
560
  {
561
561
  var l = Me(e);
562
562
  if (!l) {
563
563
  var i = "";
564
564
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
565
- var m = tr(s);
566
- m ? i += m : i += Ee();
565
+ var p = nr(s);
566
+ p ? i += p : i += Ee();
567
567
  var d;
568
- e === null ? d = "null" : z(e) ? d = "array" : e !== void 0 && e.$$typeof === u ? (d = "<" + (T(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : d = typeof e, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, i);
568
+ e === null ? d = "null" : z(e) ? d = "array" : e !== void 0 && e.$$typeof === u ? (d = "<" + (T(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : d = typeof e, m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, i);
569
569
  }
570
- var v = rr(e, r, n, s, c);
570
+ var v = rr(e, r, t, s, c);
571
571
  if (v == null)
572
572
  return v;
573
573
  if (l) {
574
- var b = r.children;
575
- if (b !== void 0)
574
+ var y = r.children;
575
+ if (y !== void 0)
576
576
  if (o)
577
- if (z(b)) {
578
- for (var x = 0; x < b.length; x++)
579
- Re(b[x], e);
580
- Object.freeze && Object.freeze(b);
577
+ if (z(y)) {
578
+ for (var x = 0; x < y.length; x++)
579
+ we(y[x], e);
580
+ Object.freeze && Object.freeze(y);
581
581
  } else
582
- p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
582
+ m("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
583
583
  else
584
- Re(b, e);
584
+ we(y, e);
585
585
  }
586
586
  return e === a ? ar(v) : or(v), v;
587
587
  }
588
588
  }
589
- function ir(e, r, n) {
590
- return Te(e, r, n, !0);
589
+ function ir(e, r, t) {
590
+ return Te(e, r, t, !0);
591
591
  }
592
- function lr(e, r, n) {
593
- return Te(e, r, n, !1);
592
+ function lr(e, r, t) {
593
+ return Te(e, r, t, !1);
594
594
  }
595
595
  var ur = lr, sr = ir;
596
596
  F.Fragment = a, F.jsx = ur, F.jsxs = sr;
@@ -611,70 +611,70 @@ function dr() {
611
611
  if (Pe)
612
612
  return I;
613
613
  Pe = 1;
614
- var t = Oe, u = Symbol.for("react.element"), g = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, f = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, y = { key: !0, ref: !0, __self: !0, __source: !0 };
614
+ var n = Oe, u = Symbol.for("react.element"), g = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, f = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { key: !0, ref: !0, __self: !0, __source: !0 };
615
615
  function j(_, h, C) {
616
- var E, R = {}, P = null, B = null;
616
+ var E, w = {}, P = null, B = null;
617
617
  C !== void 0 && (P = "" + C), h.key !== void 0 && (P = "" + h.key), h.ref !== void 0 && (B = h.ref);
618
618
  for (E in h)
619
- a.call(h, E) && !y.hasOwnProperty(E) && (R[E] = h[E]);
619
+ a.call(h, E) && !b.hasOwnProperty(E) && (w[E] = h[E]);
620
620
  if (_ && _.defaultProps)
621
621
  for (E in h = _.defaultProps, h)
622
- R[E] === void 0 && (R[E] = h[E]);
623
- return { $$typeof: u, type: _, key: P, ref: B, props: R, _owner: f.current };
622
+ w[E] === void 0 && (w[E] = h[E]);
623
+ return { $$typeof: u, type: _, key: P, ref: B, props: w, _owner: f.current };
624
624
  }
625
625
  return I.Fragment = g, I.jsx = j, I.jsxs = j, I;
626
626
  }
627
627
  process.env.NODE_ENV === "production" ? Z.exports = dr() : Z.exports = fr();
628
628
  var vr = Z.exports;
629
- function gr(t) {
630
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
629
+ function gr(n) {
630
+ return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
631
631
  }
632
- var hr = function(t, u, g) {
632
+ var hr = function(n, u, g) {
633
633
  var a = document.head || document.getElementsByTagName("head")[0], f = document.createElement("script");
634
634
  typeof u == "function" && (g = u, u = {}), u = u || {}, g = g || function() {
635
- }, f.type = u.type || "text/javascript", f.charset = u.charset || "utf8", f.async = "async" in u ? !!u.async : !0, f.src = t, u.attrs && pr(f, u.attrs), u.text && (f.text = "" + u.text);
636
- var y = "onload" in f ? Se : mr;
637
- y(f, g), f.onload || Se(f, g), a.appendChild(f);
635
+ }, f.type = u.type || "text/javascript", f.charset = u.charset || "utf8", f.async = "async" in u ? !!u.async : !0, f.src = n, u.attrs && mr(f, u.attrs), u.text && (f.text = "" + u.text);
636
+ var b = "onload" in f ? Se : pr;
637
+ b(f, g), f.onload || Se(f, g), a.appendChild(f);
638
638
  };
639
- function pr(t, u) {
639
+ function mr(n, u) {
640
640
  for (var g in u)
641
- t.setAttribute(g, u[g]);
641
+ n.setAttribute(g, u[g]);
642
642
  }
643
- function Se(t, u) {
644
- t.onload = function() {
645
- this.onerror = this.onload = null, u(null, t);
646
- }, t.onerror = function() {
647
- this.onerror = this.onload = null, u(new Error("Failed to load " + this.src), t);
643
+ function Se(n, u) {
644
+ n.onload = function() {
645
+ this.onerror = this.onload = null, u(null, n);
646
+ }, n.onerror = function() {
647
+ this.onerror = this.onload = null, u(new Error("Failed to load " + this.src), n);
648
648
  };
649
649
  }
650
- function mr(t, u) {
651
- t.onreadystatechange = function() {
652
- this.readyState != "complete" && this.readyState != "loaded" || (this.onreadystatechange = null, u(null, t));
650
+ function pr(n, u) {
651
+ n.onreadystatechange = function() {
652
+ this.readyState != "complete" && this.readyState != "loaded" || (this.onreadystatechange = null, u(null, n));
653
653
  };
654
654
  }
655
- const Er = /* @__PURE__ */ gr(hr), br = "https://d5aoblv5p04cg.cloudfront.net/editor-3/loader/build.js", yr = "https://d5aoblv5p04cg.cloudfront.net/develop/loader/build.js", Rr = "https://d5aoblv5p04cg.cloudfront.net/staging/loader/build.js";
656
- function Tr(t = "production") {
657
- switch (t) {
655
+ const Er = /* @__PURE__ */ gr(hr), yr = "https://d5aoblv5p04cg.cloudfront.net/editor-3/loader/build.js", br = "https://d5aoblv5p04cg.cloudfront.net/develop/loader/build.js", wr = "https://d5aoblv5p04cg.cloudfront.net/staging/loader/build.js";
656
+ function Tr(n = "production") {
657
+ switch (n) {
658
658
  case "dev":
659
- return yr;
659
+ return br;
660
660
  case "staging":
661
- return Rr;
661
+ return wr;
662
662
  default:
663
- return br;
663
+ return yr;
664
664
  }
665
665
  }
666
666
  const Ce = {
667
- init: (t, u) => new Promise((g, a) => {
667
+ init: (n, u) => new Promise((g, a) => {
668
668
  const f = Tr(u == null ? void 0 : u.stage);
669
- Er(f, (y) => {
670
- y !== null && a(y), window.TopolPlugin.init(t), g(!0);
669
+ Er(f, (b) => {
670
+ b !== null && a(b), window.TopolPlugin.init(n), g(!0);
671
671
  });
672
672
  }),
673
673
  save: () => {
674
674
  window.TopolPlugin.save();
675
675
  },
676
- load: (t) => {
677
- window.TopolPlugin.load(t);
676
+ load: (n) => {
677
+ window.TopolPlugin.load(n);
678
678
  },
679
679
  togglePreview: () => {
680
680
  window.TopolPlugin.togglePreview();
@@ -682,8 +682,8 @@ const Ce = {
682
682
  togglePreviewSize: () => {
683
683
  window.TopolPlugin.togglePreviewSize();
684
684
  },
685
- chooseFile: (t) => {
686
- window.TopolPlugin.chooseFile(t);
685
+ chooseFile: (n) => {
686
+ window.TopolPlugin.chooseFile(n);
687
687
  },
688
688
  undo: () => {
689
689
  window.TopolPlugin.undo();
@@ -691,11 +691,20 @@ const Ce = {
691
691
  redo: () => {
692
692
  window.TopolPlugin.redo();
693
693
  },
694
- setSavedBlocks: (t) => {
695
- window.TopolPlugin.setSavedBlocks(t);
694
+ destroy: () => {
695
+ window.TopolPlugin.destroy();
696
+ },
697
+ setSavedBlocks: (n) => {
698
+ window.TopolPlugin.setSavedBlocks(n);
699
+ },
700
+ setPreviewHTML: (n) => {
701
+ window.TopolPlugin.setPreviewHTML(n);
702
+ },
703
+ createNotification: (n) => {
704
+ window.TopolPlugin.createNotification(n);
696
705
  },
697
- createNotification: (t) => {
698
- window.TopolPlugin.createNotification(t);
706
+ setActiveMembers: (n) => {
707
+ window.TopolPlugin.setActiveMembers(n);
699
708
  },
700
709
  changeEmailToMobile: () => {
701
710
  window.TopolPlugin.changeEmailToMobile();
@@ -706,78 +715,93 @@ const Ce = {
706
715
  toggleBlocksAndStructuresVisibility: () => {
707
716
  window.TopolPlugin.toggleBlocksAndStructuresVisibility();
708
717
  },
709
- destroy: () => {
710
- window.TopolPlugin.destroy();
718
+ updateCustomBlockContent: (n) => {
719
+ window.TopolPlugin.updateCustomBlockContent(n);
720
+ },
721
+ refreshComments: (n) => {
722
+ window.TopolPlugin.refreshComments(n);
723
+ },
724
+ refreshSyncedRows: () => {
725
+ window.TopolPlugin.refreshSyncedRows();
711
726
  },
712
- setPreviewHTML: (t) => {
713
- window.TopolPlugin.setPreviewHTML(t);
727
+ openPremadeTemplatesSelection: () => {
728
+ window.TopolPlugin.openPremadeTemplatesSelection();
714
729
  },
715
- setActiveMembers: (t) => {
716
- window.TopolPlugin.setActiveMembers(t);
730
+ updateApiAuthorizationHeader: (n) => {
731
+ window.TopolPlugin.updateApiAuthorizationHeader(n);
717
732
  },
718
- updateCustomBlockContent: (t) => {
719
- window.TopolPlugin.updateCustomBlockContent(t);
733
+ setTemplateName: (n) => {
734
+ window.TopolPlugin.setTemplateName(n);
720
735
  }
721
- }, wr = "editor";
736
+ }, Rr = "editor";
722
737
  let K = !1, X = !1;
723
- function Pr(t) {
738
+ function Pr(n) {
724
739
  const u = () => {
725
740
  const g = {
726
741
  onSave(a, f) {
727
- t.onSave !== void 0 && t.onSave(a, f);
742
+ n.onSave !== void 0 && n.onSave(a, f);
728
743
  },
729
744
  onSaveAndClose(a, f) {
730
- t.onSaveAndClose !== void 0 && t.onSaveAndClose(a, f);
745
+ n.onSaveAndClose !== void 0 && n.onSaveAndClose(a, f);
731
746
  },
732
- onTestSend(a, f, y) {
733
- t.onTestSend !== void 0 && t.onTestSend(a, f, y);
747
+ onTestSend(a, f, b) {
748
+ n.onTestSend !== void 0 && n.onTestSend(a, f, b);
734
749
  },
735
750
  onOpenFileManager() {
736
- t.onOpenFileManager !== void 0 && t.onOpenFileManager();
751
+ n.onOpenFileManager !== void 0 && n.onOpenFileManager();
737
752
  },
738
753
  onLoaded() {
739
- t.onLoaded !== void 0 && t.onLoaded();
754
+ n.onLoaded !== void 0 && n.onLoaded();
740
755
  },
741
756
  onBlockSave(a) {
742
- t.onBlockSave !== void 0 && t.onBlockSave(a);
757
+ n.onBlockSave !== void 0 && n.onBlockSave(a);
743
758
  },
744
759
  onBlockRemove(a) {
745
- t.onBlockRemove !== void 0 && t.onBlockRemove(a);
760
+ n.onBlockRemove !== void 0 && n.onBlockRemove(a);
746
761
  },
747
762
  onBlockEdit(a) {
748
- t.onBlockEdit !== void 0 && t.onBlockEdit(a);
763
+ n.onBlockEdit !== void 0 && n.onBlockEdit(a);
749
764
  },
750
765
  onInit() {
751
- t.onInit !== void 0 && t.onInit(), K = !1, X = !0;
766
+ n.onInit !== void 0 && n.onInit(), K = !1, X = !0;
752
767
  },
753
768
  onUndoChange(a) {
754
- t.onUndoChange !== void 0 && t.onUndoChange(a);
769
+ n.onUndoChange !== void 0 && n.onUndoChange(a);
755
770
  },
756
771
  onRedoChange(a) {
757
- t.onRedoChange !== void 0 && t.onRedoChange(a);
772
+ n.onRedoChange !== void 0 && n.onRedoChange(a);
758
773
  },
759
774
  onPreview(a) {
760
- t.onPreview !== void 0 && t.onPreview(a);
775
+ n.onPreview !== void 0 && n.onPreview(a);
761
776
  },
762
777
  onAlert(a) {
763
- t.onAlert !== void 0 && t.onAlert(a);
778
+ n.onAlert !== void 0 && n.onAlert(a);
779
+ },
780
+ onClose() {
781
+ n.onClose !== void 0 && n.onClose();
782
+ },
783
+ onEdittedWithoutSaveChanged(a) {
784
+ n.onEdittedWithoutSaveChanged !== void 0 && n.onEdittedWithoutSaveChanged(a);
764
785
  },
765
786
  onOpenCustomBlockDialog(a) {
766
- t.onOpenCustomBlockDialog !== void 0 && t.onOpenCustomBlockDialog(a);
787
+ n.onOpenCustomBlockDialog !== void 0 && n.onOpenCustomBlockDialog(a);
767
788
  },
768
789
  onTemplateRename(a) {
769
- t.onTemplateRename !== void 0 && t.onTemplateRename(a);
790
+ n.onTemplateRename !== void 0 && n.onTemplateRename(a);
770
791
  },
771
792
  updateTestingEmailAddresses(a) {
772
- t.updateTestingEmailAddresses !== void 0 && t.updateTestingEmailAddresses(a);
793
+ n.updateTestingEmailAddresses !== void 0 && n.updateTestingEmailAddresses(a);
794
+ },
795
+ onError(a, f) {
796
+ n.onError !== void 0 && n.onError(a, f);
773
797
  }
774
798
  };
775
- return { id: "#" + wr, ...t.options, callbacks: { ...g } };
799
+ return { id: "#" + Rr, ...n.options, callbacks: { ...g } };
776
800
  };
777
801
  return cr(() => (K || (async () => {
778
802
  K = !0;
779
803
  const a = u();
780
- await Ce.init(a, { stage: t.stage || "production" });
804
+ await Ce.init(a, { stage: n.stage || "production" });
781
805
  })(), () => {
782
806
  X && (Ce.destroy(), X = !1);
783
807
  }), []), /* @__PURE__ */ vr.jsx(
@@ -1,4 +1,4 @@
1
- (function(w,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],P):(w=typeof globalThis<"u"?globalThis:w||self,P(w["topol-editor-react"]={},w.React))})(this,function(w,P){"use strict";var $={exports:{}},D={};/**
1
+ (function(_,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],P):(_=typeof globalThis<"u"?globalThis:_||self,P(_["topol-editor-react"]={},_.React))})(this,function(_,P){"use strict";var $={exports:{}},D={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.development.js
4
4
  *
@@ -6,17 +6,17 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var te;function je(){return te||(te=1,process.env.NODE_ENV!=="production"&&function(){var t=P,l=Symbol.for("react.element"),g=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),I=Symbol.for("react.provider"),S=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),L=Symbol.for("react.offscreen"),ae=Symbol.iterator,$e="@@iterator";function ze(e){if(e===null||typeof e!="object")return null;var r=ae&&e[ae]||e[$e];return typeof r=="function"?r:null}var j=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];Je("error",e,n)}}function Je(e,r,n){{var o=j.ReactDebugCurrentFrame,s=o.getStackAddendum();s!==""&&(r+="%s",n=n.concat([s]));var c=n.map(function(u){return String(u)});c.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,c)}}var qe=!1,Ge=!1,He=!1,Ke=!1,Xe=!1,ie;ie=Symbol.for("react.module.reference");function Ze(e){return!!(typeof e=="string"||typeof e=="function"||e===a||e===E||Xe||e===f||e===k||e===y||Ke||e===L||qe||Ge||He||typeof e=="object"&&e!==null&&(e.$$typeof===C||e.$$typeof===R||e.$$typeof===I||e.$$typeof===S||e.$$typeof===h||e.$$typeof===ie||e.getModuleId!==void 0))}function Qe(e,r,n){var o=e.displayName;if(o)return o;var s=r.displayName||r.name||"";return s!==""?n+"("+s+")":n}function ue(e){return e.displayName||"Context"}function T(e){if(e==null)return null;if(typeof e.tag=="number"&&p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case a:return"Fragment";case g:return"Portal";case E:return"Profiler";case f:return"StrictMode";case k:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case S:var r=e;return ue(r)+".Consumer";case I:var n=e;return ue(n._context)+".Provider";case h:return Qe(e,e.render,"ForwardRef");case R:var o=e.displayName||null;return o!==null?o:T(e.type)||"Memo";case C:{var s=e,c=s._payload,u=s._init;try{return T(u(c))}catch{return null}}}return null}var O=Object.assign,M=0,le,se,ce,fe,de,ve,ge;function he(){}he.__reactDisabledLog=!0;function er(){{if(M===0){le=console.log,se=console.info,ce=console.warn,fe=console.error,de=console.group,ve=console.groupCollapsed,ge=console.groupEnd;var e={configurable:!0,enumerable:!0,value:he,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}M++}}function rr(){{if(M--,M===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:O({},e,{value:le}),info:O({},e,{value:se}),warn:O({},e,{value:ce}),error:O({},e,{value:fe}),group:O({},e,{value:de}),groupCollapsed:O({},e,{value:ve}),groupEnd:O({},e,{value:ge})})}M<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=j.ReactCurrentDispatcher,H;function W(e,r,n){{if(H===void 0)try{throw Error()}catch(s){var o=s.stack.trim().match(/\n( *(at )?)/);H=o&&o[1]||""}return`
10
- `+H+e}}var K=!1,Y;{var tr=typeof WeakMap=="function"?WeakMap:Map;Y=new tr}function pe(e,r){if(!e||K)return"";{var n=Y.get(e);if(n!==void 0)return n}var o;K=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var c;c=G.current,G.current=null,er();try{if(r){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(_){o=_}Reflect.construct(e,[],u)}else{try{u.call()}catch(_){o=_}e.call(u.prototype)}}else{try{throw Error()}catch(_){o=_}e()}}catch(_){if(_&&o&&typeof _.stack=="string"){for(var i=_.stack.split(`
11
- `),m=o.stack.split(`
12
- `),d=i.length-1,v=m.length-1;d>=1&&v>=0&&i[d]!==m[v];)v--;for(;d>=1&&v>=0;d--,v--)if(i[d]!==m[v]){if(d!==1||v!==1)do if(d--,v--,v<0||i[d]!==m[v]){var b=`
13
- `+i[d].replace(" at new "," at ");return e.displayName&&b.includes("<anonymous>")&&(b=b.replace("<anonymous>",e.displayName)),typeof e=="function"&&Y.set(e,b),b}while(d>=1&&v>=0);break}}}finally{K=!1,G.current=c,rr(),Error.prepareStackTrace=s}var A=e?e.displayName||e.name:"",ke=A?W(A):"";return typeof e=="function"&&Y.set(e,ke),ke}function nr(e,r,n){return pe(e,!1)}function or(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function N(e,r,n){if(e==null)return"";if(typeof e=="function")return pe(e,or(e));if(typeof e=="string")return W(e);switch(e){case k:return W("Suspense");case y:return W("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case h:return nr(e.render);case R:return N(e.type,r,n);case C:{var o=e,s=o._payload,c=o._init;try{return N(c(s),r,n)}catch{}}}return""}var U=Object.prototype.hasOwnProperty,me={},ye=j.ReactDebugCurrentFrame;function V(e){if(e){var r=e._owner,n=N(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(n)}else ye.setExtraStackFrame(null)}function ar(e,r,n,o,s){{var c=Function.call.bind(U);for(var u in e)if(c(e,u)){var i=void 0;try{if(typeof e[u]!="function"){var m=Error((o||"React class")+": "+n+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}i=e[u](r,u,o,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(d){i=d}i&&!(i instanceof Error)&&(V(s),p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",o||"React class",n,u,typeof i),V(null)),i instanceof Error&&!(i.message in me)&&(me[i.message]=!0,V(s),p("Failed %s type: %s",n,i.message),V(null))}}}var ir=Array.isArray;function X(e){return ir(e)}function ur(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function lr(e){try{return be(e),!1}catch{return!0}}function be(e){return""+e}function Ee(e){if(lr(e))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ur(e)),be(e)}var B=j.ReactCurrentOwner,sr={key:!0,ref:!0,__self:!0,__source:!0},Re,Te,Z;Z={};function cr(e){if(U.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function fr(e){if(U.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function dr(e,r){if(typeof e.ref=="string"&&B.current&&r&&B.current.stateNode!==r){var n=T(B.current.type);Z[n]||(p('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',T(B.current.type),e.ref),Z[n]=!0)}}function vr(e,r){{var n=function(){Re||(Re=!0,p("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function gr(e,r){{var n=function(){Te||(Te=!0,p("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var hr=function(e,r,n,o,s,c,u){var i={$$typeof:l,type:e,key:r,ref:n,props:u,_owner:c};return i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(i,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(i,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i};function pr(e,r,n,o,s){{var c,u={},i=null,m=null;n!==void 0&&(Ee(n),i=""+n),fr(r)&&(Ee(r.key),i=""+r.key),cr(r)&&(m=r.ref,dr(r,s));for(c in r)U.call(r,c)&&!sr.hasOwnProperty(c)&&(u[c]=r[c]);if(e&&e.defaultProps){var d=e.defaultProps;for(c in d)u[c]===void 0&&(u[c]=d[c])}if(i||m){var v=typeof e=="function"?e.displayName||e.name||"Unknown":e;i&&vr(u,v),m&&gr(u,v)}return hr(e,i,m,s,o,B.current,u)}}var Q=j.ReactCurrentOwner,_e=j.ReactDebugCurrentFrame;function x(e){if(e){var r=e._owner,n=N(e.type,e._source,r?r.type:null);_e.setExtraStackFrame(n)}else _e.setExtraStackFrame(null)}var ee;ee=!1;function re(e){return typeof e=="object"&&e!==null&&e.$$typeof===l}function we(){{if(Q.current){var e=T(Q.current.type);if(e)return`
9
+ */var ne;function je(){return ne||(ne=1,process.env.NODE_ENV!=="production"&&function(){var n=P,u=Symbol.for("react.element"),g=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),I=Symbol.for("react.provider"),S=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),W=Symbol.for("react.offscreen"),ae=Symbol.iterator,$e="@@iterator";function ze(e){if(e===null||typeof e!="object")return null;var r=ae&&e[ae]||e[$e];return typeof r=="function"?r:null}var j=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function m(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),o=1;o<r;o++)t[o-1]=arguments[o];He("error",e,t)}}function He(e,r,t){{var o=j.ReactDebugCurrentFrame,s=o.getStackAddendum();s!==""&&(r+="%s",t=t.concat([s]));var c=t.map(function(l){return String(l)});c.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,c)}}var Je=!1,qe=!1,Ge=!1,Ke=!1,Xe=!1,ie;ie=Symbol.for("react.module.reference");function Ze(e){return!!(typeof e=="string"||typeof e=="function"||e===a||e===b||Xe||e===f||e===k||e===E||Ke||e===W||Je||qe||Ge||typeof e=="object"&&e!==null&&(e.$$typeof===C||e.$$typeof===T||e.$$typeof===I||e.$$typeof===S||e.$$typeof===h||e.$$typeof===ie||e.getModuleId!==void 0))}function Qe(e,r,t){var o=e.displayName;if(o)return o;var s=r.displayName||r.name||"";return s!==""?t+"("+s+")":t}function le(e){return e.displayName||"Context"}function w(e){if(e==null)return null;if(typeof e.tag=="number"&&m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case a:return"Fragment";case g:return"Portal";case b:return"Profiler";case f:return"StrictMode";case k:return"Suspense";case E:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case S:var r=e;return le(r)+".Consumer";case I:var t=e;return le(t._context)+".Provider";case h:return Qe(e,e.render,"ForwardRef");case T:var o=e.displayName||null;return o!==null?o:w(e.type)||"Memo";case C:{var s=e,c=s._payload,l=s._init;try{return w(l(c))}catch{return null}}}return null}var O=Object.assign,M=0,ue,se,ce,fe,de,ve,ge;function he(){}he.__reactDisabledLog=!0;function er(){{if(M===0){ue=console.log,se=console.info,ce=console.warn,fe=console.error,de=console.group,ve=console.groupCollapsed,ge=console.groupEnd;var e={configurable:!0,enumerable:!0,value:he,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}M++}}function rr(){{if(M--,M===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:O({},e,{value:ue}),info:O({},e,{value:se}),warn:O({},e,{value:ce}),error:O({},e,{value:fe}),group:O({},e,{value:de}),groupCollapsed:O({},e,{value:ve}),groupEnd:O({},e,{value:ge})})}M<0&&m("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=j.ReactCurrentDispatcher,G;function L(e,r,t){{if(G===void 0)try{throw Error()}catch(s){var o=s.stack.trim().match(/\n( *(at )?)/);G=o&&o[1]||""}return`
10
+ `+G+e}}var K=!1,N;{var nr=typeof WeakMap=="function"?WeakMap:Map;N=new nr}function me(e,r){if(!e||K)return"";{var t=N.get(e);if(t!==void 0)return t}var o;K=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var c;c=q.current,q.current=null,er();try{if(r){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(R){o=R}Reflect.construct(e,[],l)}else{try{l.call()}catch(R){o=R}e.call(l.prototype)}}else{try{throw Error()}catch(R){o=R}e()}}catch(R){if(R&&o&&typeof R.stack=="string"){for(var i=R.stack.split(`
11
+ `),p=o.stack.split(`
12
+ `),d=i.length-1,v=p.length-1;d>=1&&v>=0&&i[d]!==p[v];)v--;for(;d>=1&&v>=0;d--,v--)if(i[d]!==p[v]){if(d!==1||v!==1)do if(d--,v--,v<0||i[d]!==p[v]){var y=`
13
+ `+i[d].replace(" at new "," at ");return e.displayName&&y.includes("<anonymous>")&&(y=y.replace("<anonymous>",e.displayName)),typeof e=="function"&&N.set(e,y),y}while(d>=1&&v>=0);break}}}finally{K=!1,q.current=c,rr(),Error.prepareStackTrace=s}var A=e?e.displayName||e.name:"",ke=A?L(A):"";return typeof e=="function"&&N.set(e,ke),ke}function tr(e,r,t){return me(e,!1)}function or(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function Y(e,r,t){if(e==null)return"";if(typeof e=="function")return me(e,or(e));if(typeof e=="string")return L(e);switch(e){case k:return L("Suspense");case E:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case h:return tr(e.render);case T:return Y(e.type,r,t);case C:{var o=e,s=o._payload,c=o._init;try{return Y(c(s),r,t)}catch{}}}return""}var U=Object.prototype.hasOwnProperty,pe={},Ee=j.ReactDebugCurrentFrame;function V(e){if(e){var r=e._owner,t=Y(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}function ar(e,r,t,o,s){{var c=Function.call.bind(U);for(var l in e)if(c(e,l)){var i=void 0;try{if(typeof e[l]!="function"){var p=Error((o||"React class")+": "+t+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}i=e[l](r,l,o,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(d){i=d}i&&!(i instanceof Error)&&(V(s),m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",o||"React class",t,l,typeof i),V(null)),i instanceof Error&&!(i.message in pe)&&(pe[i.message]=!0,V(s),m("Failed %s type: %s",t,i.message),V(null))}}}var ir=Array.isArray;function X(e){return ir(e)}function lr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function ur(e){try{return ye(e),!1}catch{return!0}}function ye(e){return""+e}function be(e){if(ur(e))return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",lr(e)),ye(e)}var B=j.ReactCurrentOwner,sr={key:!0,ref:!0,__self:!0,__source:!0},Te,we,Z;Z={};function cr(e){if(U.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function fr(e){if(U.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function dr(e,r){if(typeof e.ref=="string"&&B.current&&r&&B.current.stateNode!==r){var t=w(B.current.type);Z[t]||(m('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',w(B.current.type),e.ref),Z[t]=!0)}}function vr(e,r){{var t=function(){Te||(Te=!0,m("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function gr(e,r){{var t=function(){we||(we=!0,m("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var hr=function(e,r,t,o,s,c,l){var i={$$typeof:u,type:e,key:r,ref:t,props:l,_owner:c};return i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(i,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(i,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i};function mr(e,r,t,o,s){{var c,l={},i=null,p=null;t!==void 0&&(be(t),i=""+t),fr(r)&&(be(r.key),i=""+r.key),cr(r)&&(p=r.ref,dr(r,s));for(c in r)U.call(r,c)&&!sr.hasOwnProperty(c)&&(l[c]=r[c]);if(e&&e.defaultProps){var d=e.defaultProps;for(c in d)l[c]===void 0&&(l[c]=d[c])}if(i||p){var v=typeof e=="function"?e.displayName||e.name||"Unknown":e;i&&vr(l,v),p&&gr(l,v)}return hr(e,i,p,s,o,B.current,l)}}var Q=j.ReactCurrentOwner,Re=j.ReactDebugCurrentFrame;function x(e){if(e){var r=e._owner,t=Y(e.type,e._source,r?r.type:null);Re.setExtraStackFrame(t)}else Re.setExtraStackFrame(null)}var ee;ee=!1;function re(e){return typeof e=="object"&&e!==null&&e.$$typeof===u}function _e(){{if(Q.current){var e=w(Q.current.type);if(e)return`
14
14
 
15
- Check the render method of \``+e+"`."}return""}}function mr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return`
15
+ Check the render method of \``+e+"`."}return""}}function pr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
16
16
 
17
- Check your code at `+r+":"+n+"."}return""}}var Pe={};function yr(e){{var r=we();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=`
17
+ Check your code at `+r+":"+t+"."}return""}}var Pe={};function Er(e){{var r=_e();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
18
18
 
19
- Check the top-level render call using <`+n+">.")}return r}}function Se(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=yr(r);if(Pe[n])return;Pe[n]=!0;var o="";e&&e._owner&&e._owner!==Q.current&&(o=" It was passed a child from "+T(e._owner.type)+"."),x(e),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,o),x(null)}}function Ce(e,r){{if(typeof e!="object")return;if(X(e))for(var n=0;n<e.length;n++){var o=e[n];re(o)&&Se(o,r)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var s=ze(e);if(typeof s=="function"&&s!==e.entries)for(var c=s.call(e),u;!(u=c.next()).done;)re(u.value)&&Se(u.value,r)}}}function br(e){{var r=e.type;if(r==null||typeof r=="string")return;var n;if(typeof r=="function")n=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===h||r.$$typeof===R))n=r.propTypes;else return;if(n){var o=T(r);ar(n,e.props,"prop",o,e)}else if(r.PropTypes!==void 0&&!ee){ee=!0;var s=T(r);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Er(e){{for(var r=Object.keys(e.props),n=0;n<r.length;n++){var o=r[n];if(o!=="children"&&o!=="key"){x(e),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),x(null);break}}e.ref!==null&&(x(e),p("Invalid attribute `ref` supplied to `React.Fragment`."),x(null))}}function Oe(e,r,n,o,s,c){{var u=Ze(e);if(!u){var i="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(i+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var m=mr(s);m?i+=m:i+=we();var d;e===null?d="null":X(e)?d="array":e!==void 0&&e.$$typeof===l?(d="<"+(T(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):d=typeof e,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",d,i)}var v=pr(e,r,n,s,c);if(v==null)return v;if(u){var b=r.children;if(b!==void 0)if(o)if(X(b)){for(var A=0;A<b.length;A++)Ce(b[A],e);Object.freeze&&Object.freeze(b)}else p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ce(b,e)}return e===a?Er(v):br(v),v}}function Rr(e,r,n){return Oe(e,r,n,!0)}function Tr(e,r,n){return Oe(e,r,n,!1)}var _r=Tr,wr=Rr;D.Fragment=a,D.jsx=_r,D.jsxs=wr}()),D}var F={};/**
19
+ Check the top-level render call using <`+t+">.")}return r}}function Se(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=Er(r);if(Pe[t])return;Pe[t]=!0;var o="";e&&e._owner&&e._owner!==Q.current&&(o=" It was passed a child from "+w(e._owner.type)+"."),x(e),m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,o),x(null)}}function Ce(e,r){{if(typeof e!="object")return;if(X(e))for(var t=0;t<e.length;t++){var o=e[t];re(o)&&Se(o,r)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var s=ze(e);if(typeof s=="function"&&s!==e.entries)for(var c=s.call(e),l;!(l=c.next()).done;)re(l.value)&&Se(l.value,r)}}}function yr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===h||r.$$typeof===T))t=r.propTypes;else return;if(t){var o=w(r);ar(t,e.props,"prop",o,e)}else if(r.PropTypes!==void 0&&!ee){ee=!0;var s=w(r);m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function br(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var o=r[t];if(o!=="children"&&o!=="key"){x(e),m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",o),x(null);break}}e.ref!==null&&(x(e),m("Invalid attribute `ref` supplied to `React.Fragment`."),x(null))}}function Oe(e,r,t,o,s,c){{var l=Ze(e);if(!l){var i="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(i+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var p=pr(s);p?i+=p:i+=_e();var d;e===null?d="null":X(e)?d="array":e!==void 0&&e.$$typeof===u?(d="<"+(w(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):d=typeof e,m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",d,i)}var v=mr(e,r,t,s,c);if(v==null)return v;if(l){var y=r.children;if(y!==void 0)if(o)if(X(y)){for(var A=0;A<y.length;A++)Ce(y[A],e);Object.freeze&&Object.freeze(y)}else m("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ce(y,e)}return e===a?br(v):yr(v),v}}function Tr(e,r,t){return Oe(e,r,t,!0)}function wr(e,r,t){return Oe(e,r,t,!1)}var Rr=wr,_r=Tr;D.Fragment=a,D.jsx=Rr,D.jsxs=_r}()),D}var F={};/**
20
20
  * @license React
21
21
  * react-jsx-runtime.production.min.js
22
22
  *
@@ -24,4 +24,4 @@ Check the top-level render call using <`+n+">.")}return r}}function Se(e,r){{if(
24
24
  *
25
25
  * This source code is licensed under the MIT license found in the
26
26
  * LICENSE file in the root directory of this source tree.
27
- */var ne;function xe(){if(ne)return F;ne=1;var t=P,l=Symbol.for("react.element"),g=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,f=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,E={key:!0,ref:!0,__self:!0,__source:!0};function I(S,h,k){var y,R={},C=null,L=null;k!==void 0&&(C=""+k),h.key!==void 0&&(C=""+h.key),h.ref!==void 0&&(L=h.ref);for(y in h)a.call(h,y)&&!E.hasOwnProperty(y)&&(R[y]=h[y]);if(S&&S.defaultProps)for(y in h=S.defaultProps,h)R[y]===void 0&&(R[y]=h[y]);return{$$typeof:l,type:S,key:C,ref:L,props:R,_owner:f.current}}return F.Fragment=g,F.jsx=I,F.jsxs=I,F}process.env.NODE_ENV==="production"?$.exports=xe():$.exports=je();var Ae=$.exports;function De(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fe=function(t,l,g){var a=document.head||document.getElementsByTagName("head")[0],f=document.createElement("script");typeof l=="function"&&(g=l,l={}),l=l||{},g=g||function(){},f.type=l.type||"text/javascript",f.charset=l.charset||"utf8",f.async="async"in l?!!l.async:!0,f.src=t,l.attrs&&Ie(f,l.attrs),l.text&&(f.text=""+l.text);var E="onload"in f?oe:Me;E(f,g),f.onload||oe(f,g),a.appendChild(f)};function Ie(t,l){for(var g in l)t.setAttribute(g,l[g])}function oe(t,l){t.onload=function(){this.onerror=this.onload=null,l(null,t)},t.onerror=function(){this.onerror=this.onload=null,l(new Error("Failed to load "+this.src),t)}}function Me(t,l){t.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,l(null,t))}}const Be=De(Fe),Le="https://d5aoblv5p04cg.cloudfront.net/editor-3/loader/build.js",We="https://d5aoblv5p04cg.cloudfront.net/develop/loader/build.js",Ye="https://d5aoblv5p04cg.cloudfront.net/staging/loader/build.js";function Ne(t="production"){switch(t){case"dev":return We;case"staging":return Ye;default:return Le}}const z={init:(t,l)=>new Promise((g,a)=>{const f=Ne(l==null?void 0:l.stage);Be(f,E=>{E!==null&&a(E),window.TopolPlugin.init(t),g(!0)})}),save:()=>{window.TopolPlugin.save()},load:t=>{window.TopolPlugin.load(t)},togglePreview:()=>{window.TopolPlugin.togglePreview()},togglePreviewSize:()=>{window.TopolPlugin.togglePreviewSize()},chooseFile:t=>{window.TopolPlugin.chooseFile(t)},undo:()=>{window.TopolPlugin.undo()},redo:()=>{window.TopolPlugin.redo()},setSavedBlocks:t=>{window.TopolPlugin.setSavedBlocks(t)},createNotification:t=>{window.TopolPlugin.createNotification(t)},changeEmailToMobile:()=>{window.TopolPlugin.changeEmailToMobile()},changeEmailToDesktop:()=>{window.TopolPlugin.changeEmailToDesktop()},toggleBlocksAndStructuresVisibility:()=>{window.TopolPlugin.toggleBlocksAndStructuresVisibility()},destroy:()=>{window.TopolPlugin.destroy()},setPreviewHTML:t=>{window.TopolPlugin.setPreviewHTML(t)},setActiveMembers:t=>{window.TopolPlugin.setActiveMembers(t)},updateCustomBlockContent:t=>{window.TopolPlugin.updateCustomBlockContent(t)}},Ue="editor";let J=!1,q=!1;function Ve(t){const l=()=>{const g={onSave(a,f){t.onSave!==void 0&&t.onSave(a,f)},onSaveAndClose(a,f){t.onSaveAndClose!==void 0&&t.onSaveAndClose(a,f)},onTestSend(a,f,E){t.onTestSend!==void 0&&t.onTestSend(a,f,E)},onOpenFileManager(){t.onOpenFileManager!==void 0&&t.onOpenFileManager()},onLoaded(){t.onLoaded!==void 0&&t.onLoaded()},onBlockSave(a){t.onBlockSave!==void 0&&t.onBlockSave(a)},onBlockRemove(a){t.onBlockRemove!==void 0&&t.onBlockRemove(a)},onBlockEdit(a){t.onBlockEdit!==void 0&&t.onBlockEdit(a)},onInit(){t.onInit!==void 0&&t.onInit(),J=!1,q=!0},onUndoChange(a){t.onUndoChange!==void 0&&t.onUndoChange(a)},onRedoChange(a){t.onRedoChange!==void 0&&t.onRedoChange(a)},onPreview(a){t.onPreview!==void 0&&t.onPreview(a)},onAlert(a){t.onAlert!==void 0&&t.onAlert(a)},onOpenCustomBlockDialog(a){t.onOpenCustomBlockDialog!==void 0&&t.onOpenCustomBlockDialog(a)},onTemplateRename(a){t.onTemplateRename!==void 0&&t.onTemplateRename(a)},updateTestingEmailAddresses(a){t.updateTestingEmailAddresses!==void 0&&t.updateTestingEmailAddresses(a)}};return{id:"#"+Ue,...t.options,callbacks:{...g}}};return P.useEffect(()=>(J||(async()=>{J=!0;const a=l();await z.init(a,{stage:t.stage||"production"})})(),()=>{q&&(z.destroy(),q=!1)}),[]),Ae.jsx("div",{id:"editor",style:{position:"absolute",height:"100vh",width:"100%"}})}w.TopolPlugin=z,w.default=Ve,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
27
+ */var te;function xe(){if(te)return F;te=1;var n=P,u=Symbol.for("react.element"),g=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,f=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,b={key:!0,ref:!0,__self:!0,__source:!0};function I(S,h,k){var E,T={},C=null,W=null;k!==void 0&&(C=""+k),h.key!==void 0&&(C=""+h.key),h.ref!==void 0&&(W=h.ref);for(E in h)a.call(h,E)&&!b.hasOwnProperty(E)&&(T[E]=h[E]);if(S&&S.defaultProps)for(E in h=S.defaultProps,h)T[E]===void 0&&(T[E]=h[E]);return{$$typeof:u,type:S,key:C,ref:W,props:T,_owner:f.current}}return F.Fragment=g,F.jsx=I,F.jsxs=I,F}process.env.NODE_ENV==="production"?$.exports=xe():$.exports=je();var Ae=$.exports;function De(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Fe=function(n,u,g){var a=document.head||document.getElementsByTagName("head")[0],f=document.createElement("script");typeof u=="function"&&(g=u,u={}),u=u||{},g=g||function(){},f.type=u.type||"text/javascript",f.charset=u.charset||"utf8",f.async="async"in u?!!u.async:!0,f.src=n,u.attrs&&Ie(f,u.attrs),u.text&&(f.text=""+u.text);var b="onload"in f?oe:Me;b(f,g),f.onload||oe(f,g),a.appendChild(f)};function Ie(n,u){for(var g in u)n.setAttribute(g,u[g])}function oe(n,u){n.onload=function(){this.onerror=this.onload=null,u(null,n)},n.onerror=function(){this.onerror=this.onload=null,u(new Error("Failed to load "+this.src),n)}}function Me(n,u){n.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,u(null,n))}}const Be=De(Fe),We="https://d5aoblv5p04cg.cloudfront.net/editor-3/loader/build.js",Le="https://d5aoblv5p04cg.cloudfront.net/develop/loader/build.js",Ne="https://d5aoblv5p04cg.cloudfront.net/staging/loader/build.js";function Ye(n="production"){switch(n){case"dev":return Le;case"staging":return Ne;default:return We}}const z={init:(n,u)=>new Promise((g,a)=>{const f=Ye(u==null?void 0:u.stage);Be(f,b=>{b!==null&&a(b),window.TopolPlugin.init(n),g(!0)})}),save:()=>{window.TopolPlugin.save()},load:n=>{window.TopolPlugin.load(n)},togglePreview:()=>{window.TopolPlugin.togglePreview()},togglePreviewSize:()=>{window.TopolPlugin.togglePreviewSize()},chooseFile:n=>{window.TopolPlugin.chooseFile(n)},undo:()=>{window.TopolPlugin.undo()},redo:()=>{window.TopolPlugin.redo()},destroy:()=>{window.TopolPlugin.destroy()},setSavedBlocks:n=>{window.TopolPlugin.setSavedBlocks(n)},setPreviewHTML:n=>{window.TopolPlugin.setPreviewHTML(n)},createNotification:n=>{window.TopolPlugin.createNotification(n)},setActiveMembers:n=>{window.TopolPlugin.setActiveMembers(n)},changeEmailToMobile:()=>{window.TopolPlugin.changeEmailToMobile()},changeEmailToDesktop:()=>{window.TopolPlugin.changeEmailToDesktop()},toggleBlocksAndStructuresVisibility:()=>{window.TopolPlugin.toggleBlocksAndStructuresVisibility()},updateCustomBlockContent:n=>{window.TopolPlugin.updateCustomBlockContent(n)},refreshComments:n=>{window.TopolPlugin.refreshComments(n)},refreshSyncedRows:()=>{window.TopolPlugin.refreshSyncedRows()},openPremadeTemplatesSelection:()=>{window.TopolPlugin.openPremadeTemplatesSelection()},updateApiAuthorizationHeader:n=>{window.TopolPlugin.updateApiAuthorizationHeader(n)},setTemplateName:n=>{window.TopolPlugin.setTemplateName(n)}},Ue="editor";let H=!1,J=!1;function Ve(n){const u=()=>{const g={onSave(a,f){n.onSave!==void 0&&n.onSave(a,f)},onSaveAndClose(a,f){n.onSaveAndClose!==void 0&&n.onSaveAndClose(a,f)},onTestSend(a,f,b){n.onTestSend!==void 0&&n.onTestSend(a,f,b)},onOpenFileManager(){n.onOpenFileManager!==void 0&&n.onOpenFileManager()},onLoaded(){n.onLoaded!==void 0&&n.onLoaded()},onBlockSave(a){n.onBlockSave!==void 0&&n.onBlockSave(a)},onBlockRemove(a){n.onBlockRemove!==void 0&&n.onBlockRemove(a)},onBlockEdit(a){n.onBlockEdit!==void 0&&n.onBlockEdit(a)},onInit(){n.onInit!==void 0&&n.onInit(),H=!1,J=!0},onUndoChange(a){n.onUndoChange!==void 0&&n.onUndoChange(a)},onRedoChange(a){n.onRedoChange!==void 0&&n.onRedoChange(a)},onPreview(a){n.onPreview!==void 0&&n.onPreview(a)},onAlert(a){n.onAlert!==void 0&&n.onAlert(a)},onClose(){n.onClose!==void 0&&n.onClose()},onEdittedWithoutSaveChanged(a){n.onEdittedWithoutSaveChanged!==void 0&&n.onEdittedWithoutSaveChanged(a)},onOpenCustomBlockDialog(a){n.onOpenCustomBlockDialog!==void 0&&n.onOpenCustomBlockDialog(a)},onTemplateRename(a){n.onTemplateRename!==void 0&&n.onTemplateRename(a)},updateTestingEmailAddresses(a){n.updateTestingEmailAddresses!==void 0&&n.updateTestingEmailAddresses(a)},onError(a,f){n.onError!==void 0&&n.onError(a,f)}};return{id:"#"+Ue,...n.options,callbacks:{...g}}};return P.useEffect(()=>(H||(async()=>{H=!0;const a=u();await z.init(a,{stage:n.stage||"production"})})(),()=>{J&&(z.destroy(),J=!1)}),[]),Ae.jsx("div",{id:"editor",style:{position:"absolute",height:"100vh",width:"100%"}})}_.TopolPlugin=z,_.default=Ve,Object.defineProperties(_,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -16,9 +16,12 @@ type TopolEditorProps = {
16
16
  onRedoChange?(count: number): void;
17
17
  onPreview?(html: unknown): void;
18
18
  onAlert?(notification: INotification): void;
19
+ onClose?(): void;
20
+ onEdittedWithoutSaveChanged?(hasUnsavedChanges: boolean): void;
19
21
  onOpenCustomBlockDialog?(blockContent: unknown): void;
20
22
  onTemplateRename?(title: string): void;
21
23
  updateTestingEmailAddresses?(emails: string[]): void;
24
+ onError?(type: string, message: string): void;
22
25
  };
23
26
  export default function TopolEditor(props: TopolEditorProps): import("react/jsx-runtime").JSX.Element;
24
27
  export type { IReactTopolOptions, INotification, ISavedBlock };
@@ -1,2 +1,2 @@
1
1
  import { ITopolOptions } from '@topol.io/editor';
2
- export type IReactTopolOptions = Omit<ITopolOptions, 'id'>;
2
+ export type IReactTopolOptions = Omit<ITopolOptions, 'id' | 'callbacks'>;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "email-react",
12
12
  "email templates"
13
13
  ],
14
- "version": "0.0.4",
14
+ "version": "0.1.0",
15
15
  "author": "Topol.io",
16
16
  "homepage": "https://topol.io",
17
17
  "license": "Apache-2.0",
@@ -30,7 +30,7 @@
30
30
  }
31
31
  },
32
32
  "dependencies": {
33
- "@topol.io/editor": "0.0.4"
33
+ "@topol.io/editor": "0.1.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^20.7.0",