@contentstack/live-preview-utils 4.1.3 → 4.2.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.
Files changed (39) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +2 -2
  3. package/dist/legacy/{chunk-HLXJTSQ3.js → chunk-7SRLYDRL.js} +92 -92
  4. package/dist/legacy/chunk-7SRLYDRL.js.map +1 -0
  5. package/dist/legacy/light-sdk.cjs +1 -1
  6. package/dist/legacy/light-sdk.js +1 -1
  7. package/dist/legacy/livePreview/eventManager/livePreviewEventManager.cjs +91 -91
  8. package/dist/legacy/livePreview/eventManager/livePreviewEventManager.cjs.map +1 -1
  9. package/dist/legacy/livePreview/eventManager/livePreviewEventManager.js +1 -1
  10. package/dist/legacy/livePreview/eventManager/postMessageEvent.hooks.cjs +1 -1
  11. package/dist/legacy/livePreview/eventManager/postMessageEvent.hooks.js +1 -1
  12. package/dist/legacy/preview/contentstack-live-preview-HOC.cjs +1 -1
  13. package/dist/legacy/preview/contentstack-live-preview-HOC.js +1 -1
  14. package/dist/legacy/timeline/timelinePostMessage/timelinePostMessage.cjs +91 -91
  15. package/dist/legacy/timeline/timelinePostMessage/timelinePostMessage.cjs.map +1 -1
  16. package/dist/legacy/timeline/timelinePostMessage/timelinePostMessage.js +1 -1
  17. package/dist/legacy/visualBuilder/utils/visualBuilderPostMessage.cjs +91 -91
  18. package/dist/legacy/visualBuilder/utils/visualBuilderPostMessage.cjs.map +1 -1
  19. package/dist/legacy/visualBuilder/utils/visualBuilderPostMessage.js +1 -1
  20. package/dist/modern/{chunk-LNSFZGX4.js → chunk-JYE4G3PN.js} +92 -92
  21. package/dist/modern/chunk-JYE4G3PN.js.map +1 -0
  22. package/dist/modern/light-sdk.cjs +1 -1
  23. package/dist/modern/light-sdk.js +1 -1
  24. package/dist/modern/livePreview/eventManager/livePreviewEventManager.cjs +91 -91
  25. package/dist/modern/livePreview/eventManager/livePreviewEventManager.cjs.map +1 -1
  26. package/dist/modern/livePreview/eventManager/livePreviewEventManager.js +1 -1
  27. package/dist/modern/livePreview/eventManager/postMessageEvent.hooks.cjs +1 -1
  28. package/dist/modern/livePreview/eventManager/postMessageEvent.hooks.js +1 -1
  29. package/dist/modern/preview/contentstack-live-preview-HOC.cjs +1 -1
  30. package/dist/modern/preview/contentstack-live-preview-HOC.js +1 -1
  31. package/dist/modern/timeline/timelinePostMessage/timelinePostMessage.cjs +91 -91
  32. package/dist/modern/timeline/timelinePostMessage/timelinePostMessage.cjs.map +1 -1
  33. package/dist/modern/timeline/timelinePostMessage/timelinePostMessage.js +1 -1
  34. package/dist/modern/visualBuilder/utils/visualBuilderPostMessage.cjs +91 -91
  35. package/dist/modern/visualBuilder/utils/visualBuilderPostMessage.cjs.map +1 -1
  36. package/dist/modern/visualBuilder/utils/visualBuilderPostMessage.js +1 -1
  37. package/package.json +6 -6
  38. package/dist/legacy/chunk-HLXJTSQ3.js.map +0 -1
  39. package/dist/modern/chunk-LNSFZGX4.js.map +0 -1
@@ -227,7 +227,7 @@ var _ContentstackLivePreview = class _ContentstackLivePreview {
227
227
  * @returns The version of the SDK as a string.
228
228
  */
229
229
  static getSdkVersion() {
230
- return "4.1.3";
230
+ return "4.2.0";
231
231
  }
232
232
  };
233
233
  _ContentstackLivePreview.previewConstructors = {};
@@ -195,7 +195,7 @@ var _ContentstackLivePreview = class _ContentstackLivePreview {
195
195
  * @returns The version of the SDK as a string.
196
196
  */
197
197
  static getSdkVersion() {
198
- return "4.1.3";
198
+ return "4.2.0";
199
199
  }
200
200
  };
201
201
  _ContentstackLivePreview.previewConstructors = {};
@@ -34,23 +34,23 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
34
34
  var require_dist = __commonJS({
35
35
  "node_modules/@contentstack/advanced-post-message/dist/index.js"(exports2, module2) {
36
36
  "use strict";
37
- !function(e, t) {
37
+ !(function(e, t) {
38
38
  "object" == typeof exports2 && "object" == typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports2 ? exports2.ContentstackAdvPostMessage = t() : e.ContentstackAdvPostMessage = t();
39
- }(exports2, () => {
39
+ })(exports2, (() => {
40
40
  return e = { 706: (e2, t2, r) => {
41
41
  "use strict";
42
42
  Object.defineProperty(t2, "__esModule", { value: true }), t2.Config = void 0;
43
- var n = r(450), o = r(666), i = r(628), s = function() {
43
+ var n = r(450), o = r(666), i = r(628), s = (function() {
44
44
  function e3() {
45
45
  this.config = (0, o.getDefaultConfig)();
46
46
  }
47
47
  return e3.prototype.replace = function(e4) {
48
- !function(e5, t3) {
48
+ !(function(e5, t3) {
49
49
  var r2, o2, s2, u;
50
50
  if (t3.debug = null !== (r2 = e5.debug) && void 0 !== r2 ? r2 : t3.debug, "" === e5.channelId) throw new Error((0, i.getErrorMessage)(n.ERROR_MESSAGES.common.channelIdRequired));
51
51
  t3.channelId = null !== (o2 = e5.channelId) && void 0 !== o2 ? o2 : t3.channelId, t3.suppressErrors = null !== (s2 = e5.suppressErrors) && void 0 !== s2 ? s2 : t3.suppressErrors, t3.targetOrigin = null !== (u = e5.targetOrigin) && void 0 !== u ? u : t3.targetOrigin, e5.target ? t3.targetWindow = e5.target : window ? t3.targetWindow = window : t3.targetWindow = { postMessage: function() {
52
52
  } };
53
- }(e4, this.config);
53
+ })(e4, this.config);
54
54
  }, e3.prototype.set = function(e4, t3) {
55
55
  this.config[e4] = t3;
56
56
  }, e3.prototype.get = function(e4) {
@@ -60,7 +60,7 @@ var require_dist = __commonJS({
60
60
  }, e3.prototype.reset = function() {
61
61
  this.config = (0, o.getDefaultConfig)();
62
62
  }, e3;
63
- }();
63
+ })();
64
64
  t2.Config = s;
65
65
  }, 851: (e2, t2) => {
66
66
  "use strict";
@@ -117,7 +117,7 @@ var require_dist = __commonJS({
117
117
  }), i = this && this.__exportStar || function(e3, t3) {
118
118
  for (var r2 in e3) "default" === r2 || Object.prototype.hasOwnProperty.call(t3, r2) || o(t3, e3, r2);
119
119
  }, s = this && this.__awaiter || function(e3, t3, r2, n2) {
120
- return new (r2 || (r2 = Promise))(function(o2, i2) {
120
+ return new (r2 || (r2 = Promise))((function(o2, i2) {
121
121
  function s2(e4) {
122
122
  try {
123
123
  a2(n2.next(e4));
@@ -134,12 +134,12 @@ var require_dist = __commonJS({
134
134
  }
135
135
  function a2(e4) {
136
136
  var t4;
137
- e4.done ? o2(e4.value) : (t4 = e4.value, t4 instanceof r2 ? t4 : new r2(function(e5) {
137
+ e4.done ? o2(e4.value) : (t4 = e4.value, t4 instanceof r2 ? t4 : new r2((function(e5) {
138
138
  e5(t4);
139
- })).then(s2, u2);
139
+ }))).then(s2, u2);
140
140
  }
141
141
  a2((n2 = n2.apply(e3, t3 || [])).next());
142
- });
142
+ }));
143
143
  }, u = this && this.__generator || function(e3, t3) {
144
144
  var r2, n2, o2, i2, s2 = { label: 0, sent: function() {
145
145
  if (1 & o2[0]) throw o2[1];
@@ -150,7 +150,7 @@ var require_dist = __commonJS({
150
150
  }), i2;
151
151
  function u2(u3) {
152
152
  return function(a2) {
153
- return function(u4) {
153
+ return (function(u4) {
154
154
  if (r2) throw new TypeError("Generator is already executing.");
155
155
  for (; i2 && (i2 = 0, u4[0] && (s2 = 0)), s2; ) try {
156
156
  if (r2 = 1, n2 && (o2 = 2 & u4[0] ? n2.return : u4[0] ? n2.throw || ((o2 = n2.return) && o2.call(n2), 0) : n2.next) && !(o2 = o2.call(n2, u4[1])).done) return o2;
@@ -195,30 +195,30 @@ var require_dist = __commonJS({
195
195
  }
196
196
  if (5 & u4[0]) throw u4[1];
197
197
  return { value: u4[0] ? u4[1] : void 0, done: true };
198
- }([u3, a2]);
198
+ })([u3, a2]);
199
199
  };
200
200
  }
201
201
  };
202
202
  Object.defineProperty(t2, "__esModule", { value: true }), t2.EventManager = void 0;
203
- var a = r(834), c = r(706), d = r(450), l = r(897), f = r(628), h = r(768), g = r(610), p = r(574), v = function() {
203
+ var a = r(834), c = r(706), d = r(450), l = r(897), f = r(628), h = r(768), g = r(610), p = r(574), v = (function() {
204
204
  function e3(e4, t3) {
205
205
  if (void 0 === t3 && (t3 = {}), this.requestMessageHandlers = /* @__PURE__ */ new Map(), this.responseMessageHandlers = /* @__PURE__ */ new Map(), !e4) throw new Error((0, f.getErrorMessage)(d.ERROR_MESSAGES.common.channelIdRequired));
206
206
  this.config = new c.Config(), this.config.replace(n(n({}, t3), { channelId: e4 })), this.logger = new f.Logger(this.config), this.postMessage = new l.PostMessage(this.logger, this.config), this.handleIncomingMessage = this.handleIncomingMessage.bind(this), this.send = this.send.bind(this), this.on = this.on.bind(this), this.unregisterEvent = this.unregisterEvent.bind(this), window ? window.addEventListener("message", this.handleIncomingMessage) : this.logger.debug((0, f.getErrorMessage)(d.ERROR_MESSAGES.common.windowNotFound));
207
207
  }
208
208
  return e3.prototype.handleIncomingMessage = function(e4) {
209
- return s(this, void 0, void 0, function() {
209
+ return s(this, void 0, void 0, (function() {
210
210
  var t3, r2, n2, o2, i2, s2, c2, l2, h2, g2, v2, E, y = this;
211
- return u(this, function(u2) {
211
+ return u(this, (function(u2) {
212
212
  if (t3 = e4.data, r2 = t3.type, n2 = t3.channel, o2 = t3.payload, i2 = t3.eventManager, s2 = t3.metadata, c2 = t3.error, i2 !== d.EVENT_MANAGER_NAME || n2 !== this.config.get("channelId")) return [2];
213
213
  switch (l2 = s2.hash, h2 = s2.nature) {
214
214
  case p.EditorPostMessageNature.REQUEST:
215
- return this.logger.debug("REQUEST received", e4.data), this.config.get("targetWindow").closed && this.logger.error((0, f.getErrorMessage)(d.ERROR_MESSAGES.common.windowClosed)), this.postMessage.sendAck({ type: r2, hash: l2 }), this.requestMessageHandlers.has(r2) ? (g2 = this.requestMessageHandlers.get(r2).handler, v2 = { data: o2 }, [2, a.ZalgoPromise.all([a.ZalgoPromise.try(function() {
215
+ return this.logger.debug("REQUEST received", e4.data), this.config.get("targetWindow").closed && this.logger.error((0, f.getErrorMessage)(d.ERROR_MESSAGES.common.windowClosed)), this.postMessage.sendAck({ type: r2, hash: l2 }), this.requestMessageHandlers.has(r2) ? (g2 = this.requestMessageHandlers.get(r2).handler, v2 = { data: o2 }, [2, a.ZalgoPromise.all([a.ZalgoPromise.try((function() {
216
216
  return g2(v2);
217
- }).then(function(e5) {
217
+ })).then((function(e5) {
218
218
  y.postMessage.sendResponse({ type: r2, hash: l2, payload: e5, error: void 0 });
219
- }).catch(function(e5) {
219
+ })).catch((function(e5) {
220
220
  y.logger.error((0, f.getErrorMessage)(d.ERROR_MESSAGES.receiveEvent.codeReturnedError), e5);
221
- })])]) : (this.logger.debug((0, f.getErrorMessage)(d.ERROR_MESSAGES.receiveEvent.noRequestListenerFound(r2))), this.postMessage.sendResponse({ type: r2, hash: l2, payload: void 0, error: { code: d.ERROR_CODES.receiveEvent.noRequestListenerFound, message: (0, f.getErrorMessage)(d.ERROR_MESSAGES.receiveEvent.noRequestListenerFound(r2)) } }), [2]);
221
+ }))])]) : (this.logger.debug((0, f.getErrorMessage)(d.ERROR_MESSAGES.receiveEvent.noRequestListenerFound(r2))), this.postMessage.sendResponse({ type: r2, hash: l2, payload: void 0, error: { code: d.ERROR_CODES.receiveEvent.noRequestListenerFound, message: (0, f.getErrorMessage)(d.ERROR_MESSAGES.receiveEvent.noRequestListenerFound(r2)) } }), [2]);
222
222
  case p.EditorPostMessageNature.RESPONSE:
223
223
  if (this.logger.debug("RESPONSE received", e4.data), !this.responseMessageHandlers.has(l2)) return this.logger.error((0, f.getErrorMessage)(d.ERROR_MESSAGES.receiveEvent.noResponseListenerFound(l2))), [2];
224
224
  E = this.responseMessageHandlers.get(l2), c2 ? E.promise.reject(c2) : E.promise.resolve(o2);
@@ -231,21 +231,21 @@ var require_dist = __commonJS({
231
231
  this.logger.error((0, f.getErrorMessage)(d.ERROR_MESSAGES.receiveEvent.unknownNature(h2)), e4.data);
232
232
  }
233
233
  return [2];
234
- });
235
- });
234
+ }));
235
+ }));
236
236
  }, e3.prototype.send = function(e4, t3) {
237
- return s(this, void 0, void 0, function() {
237
+ return s(this, void 0, void 0, (function() {
238
238
  var r2, n2, o2, i2, s2, c2 = this;
239
- return u(this, function(u2) {
240
- return r2 = new a.ZalgoPromise(), n2 = (0, g.uniqueId)(e4), o2 = { type: e4, promise: r2, hasCancelled: false, hasReceivedAck: false }, this.responseMessageHandlers.set(n2, o2), i2 = 1e3, s2 = (0, h.safeInterval)(function() {
239
+ return u(this, (function(u2) {
240
+ return r2 = new a.ZalgoPromise(), n2 = (0, g.uniqueId)(e4), o2 = { type: e4, promise: r2, hasCancelled: false, hasReceivedAck: false }, this.responseMessageHandlers.set(n2, o2), i2 = 1e3, s2 = (0, h.safeInterval)((function() {
241
241
  return c2.config.get("targetWindow").closed ? r2.reject(new Error((0, f.getErrorMessage)(d.ERROR_MESSAGES.common.windowClosed))) : (i2 = Math.max(i2 - d.RESPONSE_CYCLE, 0), !o2.hasReceivedAck && i2 <= 0 ? r2.reject((0, f.getErrorMessage)(d.ERROR_MESSAGES.sendEvent.noAckReceived)) : void 0);
242
- }, d.RESPONSE_CYCLE), r2.finally(function() {
242
+ }), d.RESPONSE_CYCLE), r2.finally((function() {
243
243
  c2.responseMessageHandlers.delete(n2), s2.cancel();
244
- }).catch(function(e5) {
244
+ })).catch((function(e5) {
245
245
  c2.logger.debug((0, f.getErrorMessage)(d.ERROR_MESSAGES.sendEvent.receiverReturnedError), e5);
246
- }), this.postMessage.sendRequest({ type: e4, hash: n2, error: void 0, payload: t3 }), [2, r2];
247
- });
248
- });
246
+ })), this.postMessage.sendRequest({ type: e4, hash: n2, error: void 0, payload: t3 }), [2, r2];
247
+ }));
248
+ }));
249
249
  }, e3.prototype.on = function(e4, t3) {
250
250
  var r2 = this;
251
251
  this.requestMessageHandlers.has(e4) && this.logger.error((0, f.getErrorMessage)(d.ERROR_MESSAGES.registerEvent.eventAlreadyRegistered(e4)));
@@ -260,7 +260,7 @@ var require_dist = __commonJS({
260
260
  }, e3.prototype.destroy = function(e4) {
261
261
  this.requestMessageHandlers.clear(), this.responseMessageHandlers.clear(), (null == e4 ? void 0 : e4.soft) || window.removeEventListener("message", this.handleIncomingMessage);
262
262
  }, e3;
263
- }();
263
+ })();
264
264
  t2.EventManager = v, i(r(574), t2);
265
265
  }, 897: function(e2, t2, r) {
266
266
  "use strict";
@@ -271,7 +271,7 @@ var require_dist = __commonJS({
271
271
  }, n.apply(this, arguments);
272
272
  };
273
273
  Object.defineProperty(t2, "__esModule", { value: true }), t2.PostMessage = void 0;
274
- var o = r(574), i = function() {
274
+ var o = r(574), i = (function() {
275
275
  function e3(e4, t3) {
276
276
  this.logger = e4, this.sendResponse = this.sendResponse.bind(this), this.sendRequest = this.sendRequest.bind(this), this.sendAck = this.sendAck.bind(this), this.getMessage = this.getMessage.bind(this), this.config = t3.getAll();
277
277
  }
@@ -294,7 +294,7 @@ var require_dist = __commonJS({
294
294
  var t3 = e4.nature, r2 = e4.hash, n2 = e4.payload, o2 = e4.type, i2 = e4.error;
295
295
  return { eventManager: "contentstack-adv-post-message", metadata: { hash: r2, nature: t3 }, channel: this.config.channelId, error: i2, payload: n2, type: o2 };
296
296
  }, e3;
297
- }();
297
+ })();
298
298
  t2.PostMessage = i;
299
299
  }, 255: (e2, t2) => {
300
300
  "use strict";
@@ -319,9 +319,9 @@ var require_dist = __commonJS({
319
319
  }, 145: (e2, t2) => {
320
320
  "use strict";
321
321
  var r;
322
- Object.defineProperty(t2, "__esModule", { value: true }), t2.EditorPostMessageNature = void 0, function(e3) {
322
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.EditorPostMessageNature = void 0, (function(e3) {
323
323
  e3.ACK = "ACK", e3.RESPONSE = "RESPONSE", e3.REQUEST = "REQUEST";
324
- }(r || (t2.EditorPostMessageNature = r = {}));
324
+ })(r || (t2.EditorPostMessageNature = r = {}));
325
325
  }, 628: function(e2, t2, r) {
326
326
  "use strict";
327
327
  var n = this && this.__spreadArray || function(e3, t3, r2) {
@@ -329,7 +329,7 @@ var require_dist = __commonJS({
329
329
  return e3.concat(n2 || Array.prototype.slice.call(t3));
330
330
  };
331
331
  Object.defineProperty(t2, "__esModule", { value: true }), t2.getErrorMessage = t2.Logger = void 0;
332
- var o = r(450), i = function() {
332
+ var o = r(450), i = (function() {
333
333
  function e3(e4) {
334
334
  this.config = e4, this.prefix = o.EVENT_MANAGER_NAME, this.log = this.log.bind(this), this.info = this.info.bind(this), this.debug = this.debug.bind(this), this.error = this.error.bind(this);
335
335
  }
@@ -348,7 +348,7 @@ var require_dist = __commonJS({
348
348
  }, e3.prototype.getDebugOptions = function() {
349
349
  return { targetOrigin: this.config.get("targetOrigin"), targetWindow: this.config.get("targetWindow") };
350
350
  }, e3;
351
- }();
351
+ })();
352
352
  t2.Logger = i, t2.getErrorMessage = function(e3) {
353
353
  return o.EVENT_MANAGER_NAME + ": " + e3;
354
354
  };
@@ -356,11 +356,11 @@ var require_dist = __commonJS({
356
356
  "use strict";
357
357
  Object.defineProperty(t2, "__esModule", { value: true }), t2.safeInterval = void 0, t2.safeInterval = function(e3, t3) {
358
358
  var r;
359
- return function n() {
360
- r = setTimeout(function() {
359
+ return (function n() {
360
+ r = setTimeout((function() {
361
361
  e3(), n();
362
- }, t3);
363
- }(), { cancel: function() {
362
+ }), t3);
363
+ })(), { cancel: function() {
364
364
  clearTimeout(r);
365
365
  } };
366
366
  };
@@ -429,14 +429,14 @@ var require_dist = __commonJS({
429
429
  e3 = new Uint8Array(t3.length);
430
430
  for (let r2 = 0; r2 < t3.length; ++r2) e3[r2] = t3.charCodeAt(r2);
431
431
  }
432
- return function(e4) {
432
+ return (function(e4) {
433
433
  const t3 = [], r2 = 32 * e4.length, n2 = "0123456789abcdef";
434
434
  for (let o2 = 0; o2 < r2; o2 += 8) {
435
435
  const r3 = e4[o2 >> 5] >>> o2 % 32 & 255, i2 = parseInt(n2.charAt(r3 >>> 4 & 15) + n2.charAt(15 & r3), 16);
436
436
  t3.push(i2);
437
437
  }
438
438
  return t3;
439
- }(function(e4, t3) {
439
+ })((function(e4, t3) {
440
440
  e4[t3 >> 5] |= 128 << t3 % 32, e4[r(t3) - 1] = t3;
441
441
  let o2 = 1732584193, c = -271733879, d = -1732584194, l = 271733878;
442
442
  for (let t4 = 0; t4 < e4.length; t4 += 16) {
@@ -444,12 +444,12 @@ var require_dist = __commonJS({
444
444
  o2 = i(o2, c, d, l, e4[t4], 7, -680876936), l = i(l, o2, c, d, e4[t4 + 1], 12, -389564586), d = i(d, l, o2, c, e4[t4 + 2], 17, 606105819), c = i(c, d, l, o2, e4[t4 + 3], 22, -1044525330), o2 = i(o2, c, d, l, e4[t4 + 4], 7, -176418897), l = i(l, o2, c, d, e4[t4 + 5], 12, 1200080426), d = i(d, l, o2, c, e4[t4 + 6], 17, -1473231341), c = i(c, d, l, o2, e4[t4 + 7], 22, -45705983), o2 = i(o2, c, d, l, e4[t4 + 8], 7, 1770035416), l = i(l, o2, c, d, e4[t4 + 9], 12, -1958414417), d = i(d, l, o2, c, e4[t4 + 10], 17, -42063), c = i(c, d, l, o2, e4[t4 + 11], 22, -1990404162), o2 = i(o2, c, d, l, e4[t4 + 12], 7, 1804603682), l = i(l, o2, c, d, e4[t4 + 13], 12, -40341101), d = i(d, l, o2, c, e4[t4 + 14], 17, -1502002290), c = i(c, d, l, o2, e4[t4 + 15], 22, 1236535329), o2 = s(o2, c, d, l, e4[t4 + 1], 5, -165796510), l = s(l, o2, c, d, e4[t4 + 6], 9, -1069501632), d = s(d, l, o2, c, e4[t4 + 11], 14, 643717713), c = s(c, d, l, o2, e4[t4], 20, -373897302), o2 = s(o2, c, d, l, e4[t4 + 5], 5, -701558691), l = s(l, o2, c, d, e4[t4 + 10], 9, 38016083), d = s(d, l, o2, c, e4[t4 + 15], 14, -660478335), c = s(c, d, l, o2, e4[t4 + 4], 20, -405537848), o2 = s(o2, c, d, l, e4[t4 + 9], 5, 568446438), l = s(l, o2, c, d, e4[t4 + 14], 9, -1019803690), d = s(d, l, o2, c, e4[t4 + 3], 14, -187363961), c = s(c, d, l, o2, e4[t4 + 8], 20, 1163531501), o2 = s(o2, c, d, l, e4[t4 + 13], 5, -1444681467), l = s(l, o2, c, d, e4[t4 + 2], 9, -51403784), d = s(d, l, o2, c, e4[t4 + 7], 14, 1735328473), c = s(c, d, l, o2, e4[t4 + 12], 20, -1926607734), o2 = u(o2, c, d, l, e4[t4 + 5], 4, -378558), l = u(l, o2, c, d, e4[t4 + 8], 11, -2022574463), d = u(d, l, o2, c, e4[t4 + 11], 16, 1839030562), c = u(c, d, l, o2, e4[t4 + 14], 23, -35309556), o2 = u(o2, c, d, l, e4[t4 + 1], 4, -1530992060), l = u(l, o2, c, d, e4[t4 + 4], 11, 1272893353), d = u(d, l, o2, c, e4[t4 + 7], 16, -155497632), c = u(c, d, l, o2, e4[t4 + 10], 23, -1094730640), o2 = u(o2, c, d, l, e4[t4 + 13], 4, 681279174), l = u(l, o2, c, d, e4[t4], 11, -358537222), d = u(d, l, o2, c, e4[t4 + 3], 16, -722521979), c = u(c, d, l, o2, e4[t4 + 6], 23, 76029189), o2 = u(o2, c, d, l, e4[t4 + 9], 4, -640364487), l = u(l, o2, c, d, e4[t4 + 12], 11, -421815835), d = u(d, l, o2, c, e4[t4 + 15], 16, 530742520), c = u(c, d, l, o2, e4[t4 + 2], 23, -995338651), o2 = a(o2, c, d, l, e4[t4], 6, -198630844), l = a(l, o2, c, d, e4[t4 + 7], 10, 1126891415), d = a(d, l, o2, c, e4[t4 + 14], 15, -1416354905), c = a(c, d, l, o2, e4[t4 + 5], 21, -57434055), o2 = a(o2, c, d, l, e4[t4 + 12], 6, 1700485571), l = a(l, o2, c, d, e4[t4 + 3], 10, -1894986606), d = a(d, l, o2, c, e4[t4 + 10], 15, -1051523), c = a(c, d, l, o2, e4[t4 + 1], 21, -2054922799), o2 = a(o2, c, d, l, e4[t4 + 8], 6, 1873313359), l = a(l, o2, c, d, e4[t4 + 15], 10, -30611744), d = a(d, l, o2, c, e4[t4 + 6], 15, -1560198380), c = a(c, d, l, o2, e4[t4 + 13], 21, 1309151649), o2 = a(o2, c, d, l, e4[t4 + 4], 6, -145523070), l = a(l, o2, c, d, e4[t4 + 11], 10, -1120210379), d = a(d, l, o2, c, e4[t4 + 2], 15, 718787259), c = a(c, d, l, o2, e4[t4 + 9], 21, -343485551), o2 = n(o2, r2), c = n(c, f), d = n(d, h), l = n(l, g);
445
445
  }
446
446
  return [o2, c, d, l];
447
- }(function(e4) {
447
+ })((function(e4) {
448
448
  if (0 === e4.length) return [];
449
449
  const t3 = 8 * e4.length, n2 = new Uint32Array(r(t3));
450
450
  for (let r2 = 0; r2 < t3; r2 += 8) n2[r2 >> 5] |= (255 & e4[r2 / 8]) << r2 % 32;
451
451
  return n2;
452
- }(e3), 8 * e3.length));
452
+ })(e3), 8 * e3.length));
453
453
  };
454
454
  }, 140: (e2, t2) => {
455
455
  "use strict";
@@ -577,12 +577,12 @@ var require_dist = __commonJS({
577
577
  Object.defineProperty(t2, "__esModule", { value: true }), t2.URL = t2.DNS = void 0, t2.default = function(e3, t3, r2) {
578
578
  function n2(e4, n3, s2, u2) {
579
579
  var a;
580
- if ("string" == typeof e4 && (e4 = function(e5) {
580
+ if ("string" == typeof e4 && (e4 = (function(e5) {
581
581
  e5 = unescape(encodeURIComponent(e5));
582
582
  const t4 = [];
583
583
  for (let r3 = 0; r3 < e5.length; ++r3) t4.push(e5.charCodeAt(r3));
584
584
  return t4;
585
- }(e4)), "string" == typeof n3 && (n3 = (0, i.default)(n3)), 16 !== (null === (a = n3) || void 0 === a ? void 0 : a.length)) throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
585
+ })(e4)), "string" == typeof n3 && (n3 = (0, i.default)(n3)), 16 !== (null === (a = n3) || void 0 === a ? void 0 : a.length)) throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
586
586
  let c = new Uint8Array(16 + e4.length);
587
587
  if (c.set(n3), c.set(e4, n3.length), c = r2(c), c[6] = 15 & c[6] | t3, c[8] = 63 & c[8] | 128, s2) {
588
588
  u2 = u2 || 0;
@@ -644,7 +644,7 @@ var require_dist = __commonJS({
644
644
  return parseInt(e3.slice(14, 15), 16);
645
645
  };
646
646
  }, 994: function(e2) {
647
- "undefined" != typeof self && self, e2.exports = function(e3) {
647
+ "undefined" != typeof self && self, e2.exports = (function(e3) {
648
648
  var t2 = {};
649
649
  function r(n) {
650
650
  if (t2[n]) return t2[n].exports;
@@ -673,7 +673,7 @@ var require_dist = __commonJS({
673
673
  }, r.o = function(e4, t3) {
674
674
  return {}.hasOwnProperty.call(e4, t3);
675
675
  }, r.p = "", r(r.s = 0);
676
- }([function(e3, t2, r) {
676
+ })([function(e3, t2, r) {
677
677
  "use strict";
678
678
  function n(e4) {
679
679
  try {
@@ -692,9 +692,9 @@ var require_dist = __commonJS({
692
692
  }
693
693
  return false;
694
694
  }
695
- r.r(t2), r.d(t2, "ZalgoPromise", function() {
695
+ r.r(t2), r.d(t2, "ZalgoPromise", (function() {
696
696
  return l;
697
- });
697
+ }));
698
698
  var o, i = [], s = [], u = 0;
699
699
  function a() {
700
700
  if (!u && o) {
@@ -708,18 +708,18 @@ var require_dist = __commonJS({
708
708
  function d() {
709
709
  u -= 1, a();
710
710
  }
711
- var l = function() {
711
+ var l = (function() {
712
712
  function e4(e5) {
713
713
  var t4 = this;
714
714
  if (this.resolved = void 0, this.rejected = void 0, this.errorHandled = void 0, this.value = void 0, this.error = void 0, this.handlers = void 0, this.dispatching = void 0, this.stack = void 0, this.resolved = false, this.rejected = false, this.errorHandled = false, this.handlers = [], e5) {
715
715
  var r2, n2, o2 = false, i2 = false, s2 = false;
716
716
  c();
717
717
  try {
718
- e5(function(e6) {
718
+ e5((function(e6) {
719
719
  s2 ? t4.resolve(e6) : (o2 = true, r2 = e6);
720
- }, function(e6) {
720
+ }), (function(e6) {
721
721
  s2 ? t4.reject(e6) : (i2 = true, n2 = e6);
722
- });
722
+ }));
723
723
  } catch (e6) {
724
724
  return d(), void this.reject(e6);
725
725
  }
@@ -739,16 +739,16 @@ var require_dist = __commonJS({
739
739
  var r2 = e5 && "function" == typeof e5.toString ? e5.toString() : {}.toString.call(e5);
740
740
  e5 = new Error("Expected reject to be called with Error, got " + r2);
741
741
  }
742
- return this.rejected = true, this.error = e5, this.errorHandled || setTimeout(function() {
743
- t4.errorHandled || function(e6, t5) {
742
+ return this.rejected = true, this.error = e5, this.errorHandled || setTimeout((function() {
743
+ t4.errorHandled || (function(e6, t5) {
744
744
  if (-1 === i.indexOf(e6)) {
745
- i.push(e6), setTimeout(function() {
745
+ i.push(e6), setTimeout((function() {
746
746
  throw e6;
747
- }, 1);
747
+ }), 1);
748
748
  for (var r3 = 0; r3 < s.length; r3++) s[r3](e6, t5);
749
749
  }
750
- }(e5, t4);
751
- }, 1), this.dispatch(), this;
750
+ })(e5, t4);
751
+ }), 1), this.dispatch(), this;
752
752
  }, t3.asyncReject = function(e5) {
753
753
  return this.errorHandled = true, this.reject(e5), this;
754
754
  }, t3.dispatch = function() {
@@ -756,11 +756,11 @@ var require_dist = __commonJS({
756
756
  if (!this.dispatching && (t4 || r2)) {
757
757
  this.dispatching = true, c();
758
758
  for (var i2 = function(e5, t5) {
759
- return e5.then(function(e6) {
759
+ return e5.then((function(e6) {
760
760
  t5.resolve(e6);
761
- }, function(e6) {
761
+ }), (function(e6) {
762
762
  t5.reject(e6);
763
- });
763
+ }));
764
764
  }, s2 = 0; s2 < o2.length; s2++) {
765
765
  var u2 = o2[s2], a2 = u2.onSuccess, l2 = u2.onError, f = u2.promise, h = void 0;
766
766
  if (t4) try {
@@ -797,33 +797,33 @@ var require_dist = __commonJS({
797
797
  return this.then(void 0, e5);
798
798
  }, t3.finally = function(t4) {
799
799
  if (t4 && "function" != typeof t4 && !t4.call) throw new Error("Promise.finally expected a function");
800
- return this.then(function(r2) {
801
- return e4.try(t4).then(function() {
800
+ return this.then((function(r2) {
801
+ return e4.try(t4).then((function() {
802
802
  return r2;
803
- });
804
- }, function(r2) {
805
- return e4.try(t4).then(function() {
803
+ }));
804
+ }), (function(r2) {
805
+ return e4.try(t4).then((function() {
806
806
  throw r2;
807
- });
808
- });
807
+ }));
808
+ }));
809
809
  }, t3.timeout = function(e5, t4) {
810
810
  var r2 = this;
811
811
  if (this.resolved || this.rejected) return this;
812
- var n2 = setTimeout(function() {
812
+ var n2 = setTimeout((function() {
813
813
  r2.resolved || r2.rejected || r2.reject(t4 || new Error("Promise timed out after " + e5 + "ms"));
814
- }, e5);
815
- return this.then(function(e6) {
814
+ }), e5);
815
+ return this.then((function(e6) {
816
816
  return clearTimeout(n2), e6;
817
- });
817
+ }));
818
818
  }, t3.toPromise = function() {
819
819
  if ("undefined" == typeof Promise) throw new TypeError("Could not find Promise");
820
820
  return Promise.resolve(this);
821
821
  }, t3.lazy = function() {
822
822
  return this.errorHandled = true, this;
823
823
  }, e4.resolve = function(t4) {
824
- return t4 instanceof e4 ? t4 : n(t4) ? new e4(function(e5, r2) {
824
+ return t4 instanceof e4 ? t4 : n(t4) ? new e4((function(e5, r2) {
825
825
  return t4.then(e5, r2);
826
- }) : new e4().resolve(t4);
826
+ })) : new e4().resolve(t4);
827
827
  }, e4.reject = function(t4) {
828
828
  return new e4().reject(t4);
829
829
  }, e4.asyncReject = function(t4) {
@@ -832,11 +832,11 @@ var require_dist = __commonJS({
832
832
  var r2 = new e4(), o2 = t4.length, i2 = [].slice();
833
833
  if (!o2) return r2.resolve(i2), r2;
834
834
  for (var s2 = function(e5, t5, n2) {
835
- return t5.then(function(t6) {
835
+ return t5.then((function(t6) {
836
836
  i2[e5] = t6, 0 == (o2 -= 1) && r2.resolve(i2);
837
- }, function(e6) {
837
+ }), (function(e6) {
838
838
  n2.reject(e6);
839
- });
839
+ }));
840
840
  }, u2 = 0; u2 < t4.length; u2++) {
841
841
  var a2 = t4[u2];
842
842
  if (a2 instanceof e4) {
@@ -855,23 +855,23 @@ var require_dist = __commonJS({
855
855
  var r2 = {}, o2 = [], i2 = function(e5) {
856
856
  if (t4.hasOwnProperty(e5)) {
857
857
  var i3 = t4[e5];
858
- n(i3) ? o2.push(i3.then(function(t5) {
858
+ n(i3) ? o2.push(i3.then((function(t5) {
859
859
  r2[e5] = t5;
860
- })) : r2[e5] = i3;
860
+ }))) : r2[e5] = i3;
861
861
  }
862
862
  };
863
863
  for (var s2 in t4) i2(s2);
864
- return e4.all(o2).then(function() {
864
+ return e4.all(o2).then((function() {
865
865
  return r2;
866
- });
866
+ }));
867
867
  }, e4.map = function(t4, r2) {
868
868
  return e4.all(t4.map(r2));
869
869
  }, e4.onPossiblyUnhandledException = function(e5) {
870
- return function(e6) {
870
+ return (function(e6) {
871
871
  return s.push(e6), { cancel: function() {
872
872
  s.splice(s.indexOf(e6), 1);
873
873
  } };
874
- }(e5);
874
+ })(e5);
875
875
  }, e4.try = function(t4, r2, n2) {
876
876
  if (t4 && "function" != typeof t4 && !t4.call) throw new Error("Promise.try expected a function");
877
877
  var o2;
@@ -883,27 +883,27 @@ var require_dist = __commonJS({
883
883
  }
884
884
  return d(), e4.resolve(o2);
885
885
  }, e4.delay = function(t4) {
886
- return new e4(function(e5) {
886
+ return new e4((function(e5) {
887
887
  setTimeout(e5, t4);
888
- });
888
+ }));
889
889
  }, e4.isPromise = function(t4) {
890
890
  return !!(t4 && t4 instanceof e4) || n(t4);
891
891
  }, e4.flush = function() {
892
892
  return t4 = o = o || new e4(), a(), t4;
893
893
  var t4;
894
894
  }, e4;
895
- }();
895
+ })();
896
896
  }]);
897
897
  }, 834: (e2, t2, r) => {
898
898
  e2.exports = r(994);
899
- } }, t = {}, function r(n) {
899
+ } }, t = {}, (function r(n) {
900
900
  var o = t[n];
901
901
  if (void 0 !== o) return o.exports;
902
902
  var i = t[n] = { exports: {} };
903
903
  return e[n].call(i.exports, i, i.exports, r), i.exports;
904
- }(156);
904
+ })(156);
905
905
  var e, t;
906
- });
906
+ }));
907
907
  }
908
908
  });
909
909