@soyio/soyio-widget 2.8.2 → 2.10.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/dist/index.js CHANGED
@@ -1,15 +1,8 @@
1
- var Qt = Object.defineProperty;
2
- var vt = Object.getOwnPropertySymbols;
3
- var en = Object.prototype.hasOwnProperty, tn = Object.prototype.propertyIsEnumerable;
4
- var ze = (f, d, l) => d in f ? Qt(f, d, { enumerable: !0, configurable: !0, writable: !0, value: l }) : f[d] = l, wt = (f, d) => {
5
- for (var l in d || (d = {}))
6
- en.call(d, l) && ze(f, l, d[l]);
7
- if (vt)
8
- for (var l of vt(d))
9
- tn.call(d, l) && ze(f, l, d[l]);
10
- return f;
11
- };
12
- var H = (f, d, l) => (ze(f, typeof d != "symbol" ? d + "" : d, l), l), nn = (f, d, l) => {
1
+ var en = Object.defineProperty;
2
+ var tn = Object.getPrototypeOf;
3
+ var nn = Reflect.get;
4
+ var rn = (f, d, l) => d in f ? en(f, d, { enumerable: !0, configurable: !0, writable: !0, value: l }) : f[d] = l;
5
+ var L = (f, d, l) => (rn(f, typeof d != "symbol" ? d + "" : d, l), l), on = (f, d, l) => {
13
6
  if (!d.has(f))
14
7
  throw TypeError("Cannot " + l);
15
8
  };
@@ -18,24 +11,24 @@ var gt = (f, d, l) => {
18
11
  throw TypeError("Cannot add the same private member more than once");
19
12
  d instanceof WeakSet ? d.add(f) : d.set(f, l);
20
13
  };
21
- var yt = (f, d, l) => (nn(f, d, "access private method"), l);
22
- var J = (f, d, l) => new Promise((v, g) => {
23
- var y = (N) => {
14
+ var yt = (f, d, l) => (on(f, d, "access private method"), l), Et = (f, d, l) => nn(tn(f), l, d);
15
+ var _ = (f, d, l) => new Promise((v, g) => {
16
+ var y = (D) => {
24
17
  try {
25
- C(l.next(N));
18
+ I(l.next(D));
26
19
  } catch (M) {
27
20
  g(M);
28
21
  }
29
- }, E = (N) => {
22
+ }, E = (D) => {
30
23
  try {
31
- C(l.throw(N));
24
+ I(l.throw(D));
32
25
  } catch (M) {
33
26
  g(M);
34
27
  }
35
- }, C = (N) => N.done ? v(N.value) : Promise.resolve(N.value).then(y, E);
36
- C((l = l.apply(f, d)).next());
28
+ }, I = (D) => D.done ? v(D.value) : Promise.resolve(D.value).then(y, E);
29
+ I((l = l.apply(f, d)).next());
37
30
  });
38
- function rn(f, d) {
31
+ function an(f, d) {
39
32
  for (var l = 0; l < d.length; l++) {
40
33
  const v = d[l];
41
34
  if (typeof v != "string" && !Array.isArray(v)) {
@@ -51,11 +44,64 @@ function rn(f, d) {
51
44
  }
52
45
  return Object.freeze(Object.defineProperty(f, Symbol.toStringTag, { value: "Module" }));
53
46
  }
54
- function on(f, d, l) {
55
- return J(this, null, function* () {
47
+ class sn {
48
+ constructor() {
49
+ L(this, "tooltipElement", null);
50
+ L(this, "tooltipContent", null);
51
+ L(this, "tooltipClass", "soyio-tooltip");
52
+ L(this, "hideTimeout", null);
53
+ this.createTooltipElement(), this.setupGlobalListeners();
54
+ }
55
+ createTooltipElement() {
56
+ const d = document.querySelector(`.${this.tooltipClass}`);
57
+ d == null || d.remove(), this.tooltipElement = document.createElement("div"), this.tooltipElement.className = this.tooltipClass, this.tooltipElement.style.cssText = `
58
+ position: fixed;
59
+ z-index: 99999;
60
+ background: white;
61
+ padding: 8px 12px;
62
+ border-radius: 4px;
63
+ box-shadow: 0 2px 4px rgba(0,0,0,0.2);
64
+ font-size: 14px;
65
+ font-family: Helvetica neue, Helvetica, Arial, sans-serif;
66
+ max-width: 300px;
67
+ word-wrap: break-word;
68
+ pointer-events: none;
69
+ opacity: 0;
70
+ transition: opacity 0.2s ease-in-out;
71
+ transform: translateX(-50%) translateY(-100%);
72
+ margin-top: -8px;
73
+ `, this.tooltipContent = document.createElement("div"), this.tooltipContent.style.cssText = "text-align: center;", this.tooltipElement.appendChild(this.tooltipContent);
74
+ const l = document.createElement("div");
75
+ l.style.cssText = `
76
+ position: absolute;
77
+ bottom: -4px;
78
+ left: 50%;
79
+ transform: translateX(-50%) rotate(45deg);
80
+ width: 8px;
81
+ height: 8px;
82
+ background: white;
83
+ box-shadow: 2px 2px 2px rgba(0,0,0,0.1);
84
+ `, this.tooltipElement.appendChild(l), document.body.appendChild(this.tooltipElement);
85
+ }
86
+ setupGlobalListeners() {
87
+ window.addEventListener("scroll", () => this.hide(), !0), window.addEventListener("resize", () => this.hide()), window.addEventListener("orientationchange", () => this.hide());
88
+ }
89
+ show(d, l, v) {
90
+ !this.tooltipElement || !this.tooltipContent || (this.hideTimeout && (clearTimeout(this.hideTimeout), this.hideTimeout = null), this.tooltipContent.textContent = d, this.tooltipElement.style.left = `${l}px`, this.tooltipElement.style.top = `${v}px`, this.tooltipElement.style.opacity = "1");
91
+ }
92
+ hide() {
93
+ this.tooltipElement && (this.tooltipElement.style.opacity = "0");
94
+ }
95
+ destroy() {
96
+ var d;
97
+ (d = this.tooltipElement) == null || d.remove(), this.tooltipElement = null, this.tooltipContent = null, this.hideTimeout && (clearTimeout(this.hideTimeout), this.hideTimeout = null);
98
+ }
99
+ }
100
+ function un(f, d, l) {
101
+ return _(this, null, function* () {
56
102
  if (!f.contentWindow)
57
103
  throw new Error("Invalid iframe: contentWindow is null");
58
- const v = yield Promise.resolve().then(() => ke);
104
+ const v = yield Promise.resolve().then(() => He);
59
105
  try {
60
106
  yield v.send(f.contentWindow, "SET_APPEARANCE", { appearance: d, identifier: l });
61
107
  } catch (g) {
@@ -63,19 +109,50 @@ function on(f, d, l) {
63
109
  }
64
110
  });
65
111
  }
66
- const Wt = "https://app.soyio.id", Ct = "https://sandbox.soyio.id", an = [
67
- "DISCLOSURE_REQUEST_SUCCESSFUL",
68
- "IDENTITY_REGISTERED",
69
- "IDENTITY_SIGNATURE",
70
- "UNEXPECTED_ERROR",
71
- "DENIED_CAMERA_PERMISSION",
72
- "REJECTED_SIGNATURE"
73
- ], sn = "WIDGET_CLOSED", cn = 420, un = 720, dn = 500;
74
- function fn(f) {
112
+ const cn = "IFRAME_READY", dn = "IFRAME_HEIGHT_CHANGE", fn = "TOOLTIP_STATE_CHANGE", ln = "CONSENT_STATE_CHANGE", J = {
113
+ // BASE
114
+ onHeightChange: {},
115
+ onIframeReady: {},
116
+ onTooltipChange: {},
117
+ // CONSENT
118
+ onStateChange: {}
119
+ };
120
+ let xt, bt, St, Wt;
121
+ function hn() {
122
+ return _(this, null, function* () {
123
+ const f = yield Promise.resolve().then(() => He);
124
+ xt || bt || St || Wt || (xt = f.on(dn, (d) => _(this, null, function* () {
125
+ const l = d.data, v = J.onHeightChange[l.identifier];
126
+ v && v(l.height);
127
+ })), bt = f.on(cn, (d) => _(this, null, function* () {
128
+ const l = d.data, v = J.onIframeReady[l.identifier];
129
+ v && v();
130
+ })), St = f.on(fn, (d) => _(this, null, function* () {
131
+ const l = d.data, v = J.onTooltipChange[l.identifier];
132
+ v && v(l);
133
+ })), Wt = f.on(ln, (d) => _(this, null, function* () {
134
+ const l = d.data, v = J.onStateChange[l.identifier];
135
+ v && v(l);
136
+ })));
137
+ });
138
+ }
139
+ function It(f, d) {
140
+ const {
141
+ onHeightChange: l,
142
+ onIframeReady: v,
143
+ onTooltipChange: g,
144
+ onStateChange: y
145
+ } = d;
146
+ l && (J.onHeightChange[f] = l), v && (J.onIframeReady[f] = v), g && (J.onTooltipChange[f] = g), y && (J.onStateChange[f] = y);
147
+ }
148
+ function mn(f) {
149
+ delete J.onHeightChange[f], delete J.onIframeReady[f], delete J.onTooltipChange[f], delete J.onStateChange[f];
150
+ }
151
+ function pn(f) {
75
152
  const d = document.getElementById(f);
76
153
  d && (console.warn("ConsentBox iframe already exists. Removing existing before mounting new one."), d.remove());
77
154
  }
78
- function ln(f) {
155
+ function vn(f) {
79
156
  const d = document.querySelector(f);
80
157
  if (!d)
81
158
  throw new Error(`Iframe div container with id '${f}' not found`);
@@ -93,7 +170,7 @@ function ln(f) {
93
170
  opacity: 1 !important;
94
171
  `, l;
95
172
  }
96
- function hn(f, d) {
173
+ function wn(f, d) {
97
174
  const l = document.createElement("iframe");
98
175
  return l.id = d, l.src = f, l.style.cssText += `
99
176
  width: 100% !important;
@@ -107,64 +184,74 @@ function hn(f, d) {
107
184
  opacity 0.4s 0.1s;
108
185
  `, l;
109
186
  }
110
- function mn(f) {
111
- var E;
112
- const d = ["actionToken", "entityId", "context"], l = (E = f.isSandbox) != null ? E : !1, v = f.developmentUrl || (l ? Ct : Wt), g = new URLSearchParams();
113
- d.forEach((C) => {
114
- f[C] && g.set(C, f[C]);
115
- });
116
- const y = g.toString();
117
- return `${v}/embed/consents/${f.consentTemplateId}${y ? `?${y}` : ""}`;
187
+ function gn() {
188
+ return Math.random().toString(36).substring(2, 10);
118
189
  }
119
- const pn = "IFRAME_READY", vn = "CONSENT_STATE_CHANGE", wn = "IFRAME_HEIGHT_CHANGE", gn = "TOOLTIP_STATE_CHANGE", q = {
120
- onHeightChange: {},
121
- onIframeReady: {},
122
- onStateChange: {},
123
- onTooltipChange: {}
124
- };
125
- let Et, xt, bt, St;
126
- function yn() {
127
- return J(this, null, function* () {
128
- const f = yield Promise.resolve().then(() => ke);
129
- Et || xt || bt || St || (Et = f.on(wn, (d) => J(this, null, function* () {
130
- const l = d.data, v = q.onHeightChange[l.identifier];
131
- if (!v)
132
- throw new Error(`No height change listener found for identifier: ${l.identifier}`);
133
- v(l.height);
134
- })), xt = f.on(pn, (d) => J(this, null, function* () {
135
- const l = d.data, v = q.onIframeReady[l.identifier];
136
- if (!v)
137
- throw new Error(`No iframe ready listener found for identifier: ${l.identifier}`);
138
- v();
139
- })), bt = f.on(vn, (d) => J(this, null, function* () {
140
- const l = d.data, v = q.onStateChange[l.identifier];
141
- if (!v)
142
- throw new Error(`No state change listener found for identifier: ${l.identifier}`);
143
- v(l);
144
- })), St = f.on(gn, (d) => J(this, null, function* () {
145
- const l = d.data, v = q.onTooltipChange[l.identifier];
146
- if (!v)
147
- throw new Error(`No tooltip change listener found for identifier: ${l.identifier}`);
148
- v(l);
149
- })));
150
- });
151
- }
152
- function En(f, d) {
153
- const {
154
- onHeightChange: l,
155
- onIframeReady: v,
156
- onStateChange: g,
157
- onTooltipChange: y
158
- } = d;
159
- q.onHeightChange[f] = l, q.onIframeReady[f] = v, q.onStateChange[f] = g, q.onTooltipChange[f] = y;
160
- }
161
- function xn(f) {
162
- delete q.onHeightChange[f], delete q.onIframeReady[f], delete q.onStateChange[f], delete q.onTooltipChange[f];
190
+ class Se {
191
+ constructor(d) {
192
+ L(this, "iframe", null);
193
+ L(this, "skeleton", null);
194
+ L(this, "defaultIframePrefix", "soyio-iframe");
195
+ L(this, "options");
196
+ L(this, "appearance");
197
+ L(this, "tooltipManager");
198
+ L(this, "SkeletonKlass", null);
199
+ L(this, "defaultUniqueId");
200
+ this.options = d, this.appearance = d.appearance || null, this.tooltipManager = new sn(), this.defaultUniqueId = Se.generateUniqueId();
201
+ }
202
+ static generateUniqueId() {
203
+ return gn();
204
+ }
205
+ get uniqueIdentifier() {
206
+ return this.defaultUniqueId;
207
+ }
208
+ get iframePrefix() {
209
+ return this.defaultIframePrefix;
210
+ }
211
+ get iframeIdentifier() {
212
+ return `${this.iframePrefix}-${this.uniqueIdentifier}`;
213
+ }
214
+ handleHeightChange(d) {
215
+ if (!this.iframe || (this.iframe.style.height = `${d}px`, d > 0))
216
+ return;
217
+ const { parentElement: l } = this.iframe;
218
+ l && (l.style.display = "none");
219
+ }
220
+ handleIframeReady() {
221
+ this.iframe && (this.options.onReady && this.options.onReady(), this.appearance && un(this.iframe, this.appearance, this.uniqueIdentifier), this.skeleton && this.skeleton.hide());
222
+ }
223
+ handleTooltipChange(d) {
224
+ if (!this.iframe)
225
+ return;
226
+ const l = this.iframe.getBoundingClientRect(), { text: v, coordinates: g, isVisible: y } = d, E = g.x + l.left, I = g.y + l.top;
227
+ y ? this.tooltipManager.show(v, E, I) : this.tooltipManager.hide();
228
+ }
229
+ setupListeners() {
230
+ return _(this, null, function* () {
231
+ yield hn();
232
+ const d = {
233
+ onHeightChange: this.handleHeightChange.bind(this),
234
+ onIframeReady: this.handleIframeReady.bind(this),
235
+ onTooltipChange: this.handleTooltipChange.bind(this)
236
+ };
237
+ It(this.uniqueIdentifier, d);
238
+ });
239
+ }
240
+ mount(d) {
241
+ return _(this, null, function* () {
242
+ yield this.setupListeners(), pn(this.iframeIdentifier);
243
+ const l = vn(d), v = this.iframeUrl();
244
+ return this.iframe = wn(v, this.iframeIdentifier), this.SkeletonKlass && (this.skeleton = new this.SkeletonKlass(this.uniqueIdentifier), this.skeleton.mount(l)), l.appendChild(this.iframe), this;
245
+ });
246
+ }
247
+ unmount() {
248
+ mn(this.uniqueIdentifier), this.skeleton && (this.skeleton.hide(), this.skeleton = null), this.iframe && (this.iframe.remove(), this.iframe = null);
249
+ }
163
250
  }
164
- class bn {
251
+ class yn {
165
252
  constructor(d) {
166
- H(this, "element");
167
- H(this, "identifier");
253
+ L(this, "element");
254
+ L(this, "identifier");
168
255
  this.identifier = `skeleton-${d}`, this.element = document.createElement("div"), this.element.id = this.identifier, this.element.style.cssText = `
169
256
  position: absolute;
170
257
  left: 50%;
@@ -228,14 +315,14 @@ class bn {
228
315
  margin-left: auto;
229
316
  margin-right: 3px;
230
317
  `;
231
- const C = document.createElement("div");
232
- C.style.cssText = `
318
+ const I = document.createElement("div");
319
+ I.style.cssText = `
233
320
  display: flex;
234
321
  align-items: center;
235
322
  gap: 1rem;
236
323
  `;
237
- const N = document.createElement("div");
238
- N.style.cssText = `
324
+ const D = document.createElement("div");
325
+ D.style.cssText = `
239
326
  width: 1rem;
240
327
  height: 1rem;
241
328
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
@@ -270,15 +357,15 @@ class bn {
270
357
  animation: shimmer 1.5s infinite;
271
358
  border-radius: 0.125rem;
272
359
  `, !document.getElementById("skeleton-animation")) {
273
- const V = document.createElement("style");
274
- V.id = "skeleton-animation", V.textContent = `
360
+ const K = document.createElement("style");
361
+ K.id = "skeleton-animation", K.textContent = `
275
362
  @keyframes shimmer {
276
363
  0% { background-position: 200% 0; }
277
364
  100% { background-position: -200% 0; }
278
365
  }
279
- `, document.head.appendChild(V);
366
+ `, document.head.appendChild(K);
280
367
  }
281
- v.appendChild(g), v.appendChild(y), v.appendChild(E), M.appendChild(B), M.appendChild(oe), C.appendChild(N), C.appendChild(M), l.appendChild(v), l.appendChild(C), this.element.appendChild(l);
368
+ v.appendChild(g), v.appendChild(y), v.appendChild(E), M.appendChild(B), M.appendChild(oe), I.appendChild(D), I.appendChild(M), l.appendChild(v), l.appendChild(I), this.element.appendChild(l);
282
369
  }
283
370
  cleanupExistingSkeleton() {
284
371
  const d = document.getElementById(this.identifier);
@@ -291,150 +378,103 @@ class bn {
291
378
  this.element.style.opacity = "0", setTimeout(() => this.element.remove(), 300);
292
379
  }
293
380
  }
294
- class Sn {
295
- constructor() {
296
- H(this, "tooltipElement", null);
297
- H(this, "tooltipContent", null);
298
- H(this, "tooltipClass", "soyio-tooltip");
299
- H(this, "hideTimeout", null);
300
- this.createTooltipElement(), this.setupGlobalListeners();
301
- }
302
- createTooltipElement() {
303
- const d = document.querySelector(`.${this.tooltipClass}`);
304
- d == null || d.remove(), this.tooltipElement = document.createElement("div"), this.tooltipElement.className = this.tooltipClass, this.tooltipElement.style.cssText = `
305
- position: fixed;
306
- z-index: 99999;
307
- background: white;
308
- padding: 8px 12px;
309
- border-radius: 4px;
310
- box-shadow: 0 2px 4px rgba(0,0,0,0.2);
311
- font-size: 14px;
312
- font-family: Helvetica neue, Helvetica, Arial, sans-serif;
313
- max-width: 300px;
314
- word-wrap: break-word;
315
- pointer-events: none;
316
- opacity: 0;
317
- transition: opacity 0.2s ease-in-out;
318
- transform: translateX(-50%) translateY(-100%);
319
- margin-top: -8px;
320
- `, this.tooltipContent = document.createElement("div"), this.tooltipContent.style.cssText = "text-align: center;", this.tooltipElement.appendChild(this.tooltipContent);
321
- const l = document.createElement("div");
322
- l.style.cssText = `
323
- position: absolute;
324
- bottom: -4px;
325
- left: 50%;
326
- transform: translateX(-50%) rotate(45deg);
327
- width: 8px;
328
- height: 8px;
329
- background: white;
330
- box-shadow: 2px 2px 2px rgba(0,0,0,0.1);
331
- `, this.tooltipElement.appendChild(l), document.body.appendChild(this.tooltipElement);
332
- }
333
- setupGlobalListeners() {
334
- window.addEventListener("scroll", () => this.hide(), !0), window.addEventListener("resize", () => this.hide()), window.addEventListener("orientationchange", () => this.hide());
335
- }
336
- show(d, l, v) {
337
- !this.tooltipElement || !this.tooltipContent || (this.hideTimeout && (clearTimeout(this.hideTimeout), this.hideTimeout = null), this.tooltipContent.textContent = d, this.tooltipElement.style.left = `${l}px`, this.tooltipElement.style.top = `${v}px`, this.tooltipElement.style.opacity = "1");
338
- }
339
- hide() {
340
- this.tooltipElement && (this.tooltipElement.style.opacity = "0");
341
- }
342
- destroy() {
343
- var d;
344
- (d = this.tooltipElement) == null || d.remove(), this.tooltipElement = null, this.tooltipContent = null, this.hideTimeout && (clearTimeout(this.hideTimeout), this.hideTimeout = null);
345
- }
381
+ const Me = "https://app.soyio.id", ke = "https://sandbox.soyio.id", En = [
382
+ "DISCLOSURE_REQUEST_SUCCESSFUL",
383
+ "IDENTITY_REGISTERED",
384
+ "IDENTITY_SIGNATURE",
385
+ "UNEXPECTED_ERROR",
386
+ "DENIED_CAMERA_PERMISSION",
387
+ "REJECTED_SIGNATURE"
388
+ ], xn = "WIDGET_CLOSED", bn = 420, Sn = 720, Wn = 500;
389
+ function In(f) {
390
+ var E;
391
+ const d = [
392
+ "actionToken",
393
+ "entityId",
394
+ "context",
395
+ "optionalReconsentBehavior",
396
+ "mandatoryReconsentBehavior"
397
+ ], l = (E = f.isSandbox) != null ? E : !1, v = f.developmentUrl || (l ? ke : Me), g = new URLSearchParams();
398
+ d.forEach((I) => {
399
+ f[I] && g.set(I, f[I]);
400
+ });
401
+ const y = g.toString();
402
+ return `${v}/embed/consents/${f.consentTemplateId}${y ? `?${y}` : ""}`;
346
403
  }
347
- class Hn {
348
- constructor(d) {
349
- H(this, "appearance");
350
- H(this, "options");
351
- H(this, "tooltipManager");
352
- H(this, "skeleton");
353
- H(this, "iframe", null);
354
- H(this, "state", {
404
+ class Ct extends Se {
405
+ constructor(l) {
406
+ super(l);
407
+ L(this, "state", {
355
408
  isSelected: !1,
356
409
  actionToken: null
357
410
  });
358
- this.options = d, this.appearance = d.appearance || null, this.tooltipManager = new Sn(), this.skeleton = new bn(this.uniqueIdentifier), this.setup();
411
+ this.defaultIframePrefix = "consent-box", this.SkeletonKlass = yn;
359
412
  }
360
- handleHeightChange(d) {
361
- this.iframe && (this.iframe.style.height = `${d}px`);
413
+ get uniqueIdentifier() {
414
+ return this.options.consentTemplateId;
362
415
  }
363
- handleIframeReady() {
364
- return J(this, null, function* () {
365
- this.iframe && (this.skeleton.hide(), this.options.onReady && this.options.onReady(), this.appearance && on(this.iframe, this.appearance, this.uniqueIdentifier));
366
- });
416
+ iframeUrl() {
417
+ return In(this.options);
367
418
  }
368
- handleStateChange(d) {
369
- const { isSelected: l, actionToken: v } = d;
370
- this.state = { isSelected: l, actionToken: v }, this.options.onEvent({
419
+ handleStateChange(l) {
420
+ const { isSelected: v, actionToken: g } = l;
421
+ this.state = { isSelected: v, actionToken: g }, this.options.onEvent({
371
422
  eventName: "CONSENT_CHECKBOX_CHANGE",
372
- isSelected: l,
373
- actionToken: v
423
+ isSelected: v,
424
+ actionToken: g
374
425
  });
375
426
  }
376
- setup() {
377
- return J(this, null, function* () {
378
- yield yn(), En(this.uniqueIdentifier, {
379
- onHeightChange: this.handleHeightChange.bind(this),
380
- onIframeReady: this.handleIframeReady.bind(this),
381
- onStateChange: this.handleStateChange.bind(this),
382
- onTooltipChange: this.handleTooltipChange.bind(this)
427
+ setupListeners() {
428
+ return _(this, null, function* () {
429
+ yield Et(Ct.prototype, this, "setupListeners").call(this), It(this.uniqueIdentifier, {
430
+ onStateChange: this.handleStateChange.bind(this)
383
431
  });
384
432
  });
385
433
  }
386
- handleTooltipChange(d) {
387
- if (!this.iframe)
388
- return;
389
- const l = this.iframe.getBoundingClientRect(), { text: v, coordinates: g, isVisible: y } = d, E = g.x + l.left, C = g.y + l.top;
390
- y ? this.tooltipManager.show(v, E, C) : this.tooltipManager.hide();
391
- }
392
- mount(d) {
393
- fn(this.iframeIdentifier);
394
- const l = ln(d), v = mn(this.options);
395
- return this.iframe = hn(v, this.iframeIdentifier), this.skeleton.mount(l), l.appendChild(this.iframe), this;
396
- }
397
- unmount() {
398
- xn(this.uniqueIdentifier), this.skeleton.hide(), this.iframe && (this.iframe.remove(), this.iframe = null);
399
- }
400
434
  getState() {
401
- return wt({}, this.state);
435
+ return this.state;
402
436
  }
403
- get iframeIdentifier() {
404
- return `consent-box-${this.uniqueIdentifier}`;
437
+ }
438
+ function Cn(f) {
439
+ var v;
440
+ return f.developmentUrl ? f.developmentUrl : `${((v = f.isSandbox) != null ? v : !1) ? ke : Me}/embed/privacy-center`;
441
+ }
442
+ class qn extends Se {
443
+ constructor(d) {
444
+ super(d), this.defaultIframePrefix = "privacy-center";
405
445
  }
406
- get uniqueIdentifier() {
407
- return this.options.consentTemplateId;
446
+ iframeUrl() {
447
+ return Cn(this.options);
408
448
  }
409
449
  }
410
- const Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
450
+ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
411
451
  __proto__: null
412
452
  }, Symbol.toStringTag, { value: "Module" }));
413
- function Wn(f) {
453
+ function Pn(f) {
414
454
  let d = "widget/";
415
455
  return "disclosureRequestId" in f.configProps ? d += ["disclosures", f.configProps.disclosureRequestId].join("/") : d += f.request, d;
416
456
  }
417
- function Cn(f) {
457
+ function Tn(f) {
418
458
  var y;
419
- const d = (y = f.isSandbox) != null ? y : !1, l = f.developmentUrl || (d ? Ct : Wt), v = Object.entries(f.configProps).filter(([E, C]) => C || E === "disclosureRequestId").map(([E, C]) => `${E}=${encodeURIComponent(C)}`).join("&"), g = Wn(f);
459
+ const d = (y = f.isSandbox) != null ? y : !1, l = f.developmentUrl || (d ? ke : Me), v = Object.entries(f.configProps).filter(([E, I]) => I || E === "disclosureRequestId").map(([E, I]) => `${E}=${encodeURIComponent(I)}`).join("&"), g = Pn(f);
420
460
  return `${l}/${g}?sdk=web&${v}`;
421
461
  }
422
- const In = !!(typeof window != "undefined" && window.document && window.document.createElement);
462
+ const Rn = !!(typeof window != "undefined" && window.document && window.document.createElement);
423
463
  let Z = null, je = null;
424
- function Me(f = null) {
464
+ function Le(f = null) {
425
465
  Z && !Z.closed && Z.focus(), f == null || f.preventDefault();
426
466
  }
427
- function Le() {
428
- document.body.style.filter = "", document.body.removeEventListener("click", Me);
467
+ function Ue() {
468
+ document.body.style.filter = "", document.body.removeEventListener("click", Le);
429
469
  }
430
- function Pn() {
470
+ function On() {
431
471
  je = setInterval(() => {
432
- (!Z || Z.closed) && (je && clearInterval(je), Le());
433
- }, dn);
472
+ (!Z || Z.closed) && (je && clearInterval(je), Ue());
473
+ }, Wn);
434
474
  }
435
- function Tn(f) {
436
- const d = Cn(f), l = cn, v = un, g = window.screenLeft !== void 0 ? window.screenLeft : window.screenX, y = window.screenTop !== void 0 ? window.screenTop : window.screenY, E = window.innerWidth || document.documentElement.clientWidth || window.screen.width, C = window.innerHeight || document.documentElement.clientHeight || window.screen.height, N = E / window.screen.availWidth, M = (E - l) / 2 / N + g, B = (C - v) / 2 / N + y;
437
- document.body.style.filter = "blur(5px)", document.body.addEventListener("click", Me), Z = window.open(
475
+ function An(f) {
476
+ const d = Tn(f), l = bn, v = Sn, g = window.screenLeft !== void 0 ? window.screenLeft : window.screenX, y = window.screenTop !== void 0 ? window.screenTop : window.screenY, E = window.innerWidth || document.documentElement.clientWidth || window.screen.width, I = window.innerHeight || document.documentElement.clientHeight || window.screen.height, D = E / window.screen.availWidth, M = (E - l) / 2 / D + g, B = (I - v) / 2 / D + y;
477
+ document.body.style.filter = "blur(5px)", document.body.addEventListener("click", Le), Z = window.open(
438
478
  d,
439
479
  "Soyio",
440
480
  `scrollbars=yes,
@@ -442,49 +482,49 @@ function Tn(f) {
442
482
  height=${v},
443
483
  top=${B},
444
484
  left=${M}`
445
- ), Me(), Pn();
485
+ ), Le(), On();
446
486
  }
447
- function On() {
448
- Z && (Z.close(), Z = null), Le();
487
+ function Dn() {
488
+ Z && (Z.close(), Z = null), Ue();
449
489
  }
450
- const Rn = "WIDGET_EVENT";
490
+ const Nn = "WIDGET_EVENT";
451
491
  let me = null;
452
- function An() {
492
+ function zn() {
453
493
  me && (me.cancel(), me = null);
454
494
  }
455
- function Nn(f) {
456
- return J(this, null, function* () {
457
- const { onEvent: d } = f, l = yield Promise.resolve().then(() => ke);
458
- me && An(), me = l.on(Rn, (v) => J(this, null, function* () {
459
- d(v.data), an.includes(v.data.eventName) ? On() : v.data.eventName === sn && Le();
495
+ function jn(f) {
496
+ return _(this, null, function* () {
497
+ const { onEvent: d } = f, l = yield Promise.resolve().then(() => He);
498
+ me && zn(), me = l.on(Nn, (v) => _(this, null, function* () {
499
+ d(v.data), En.includes(v.data.eventName) ? Dn() : v.data.eventName === xn && Ue();
460
500
  }));
461
501
  });
462
502
  }
463
- function Dn(f) {
464
- Nn(f);
503
+ function Ln(f) {
504
+ jn(f);
465
505
  }
466
- var be, It;
467
- class Un {
506
+ var be, Pt;
507
+ class Gn {
468
508
  constructor(d) {
469
509
  gt(this, be);
470
- H(this, "onEvent");
471
- this.onEvent = d.onEvent, In && (Tn(d), Dn({
472
- onEvent: yt(this, be, It).bind(this)
510
+ L(this, "onEvent");
511
+ this.onEvent = d.onEvent, Rn && (An(d), Ln({
512
+ onEvent: yt(this, be, Pt).bind(this)
473
513
  }));
474
514
  }
475
515
  }
476
- be = new WeakSet(), It = function(d) {
516
+ be = new WeakSet(), Pt = function(d) {
477
517
  this.onEvent(d);
478
518
  };
479
- var zn = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {};
480
- function jn(f) {
519
+ var Mn = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {};
520
+ function kn(f) {
481
521
  return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
482
522
  }
483
- var Pt = { exports: {} }, Tt = { exports: {} };
523
+ var Tt = { exports: {} }, Rt = { exports: {} };
484
524
  (function(f, d) {
485
525
  (function(l, v) {
486
526
  f.exports = v();
487
- })(typeof self != "undefined" ? self : zn, function() {
527
+ })(typeof self != "undefined" ? self : Mn, function() {
488
528
  return function(l) {
489
529
  var v = {};
490
530
  function g(y) {
@@ -497,10 +537,10 @@ var Pt = { exports: {} }, Tt = { exports: {} };
497
537
  };
498
538
  return l[y].call(E.exports, E, E.exports, g), E.l = !0, E.exports;
499
539
  }
500
- return g.m = l, g.c = v, g.d = function(y, E, C) {
540
+ return g.m = l, g.c = v, g.d = function(y, E, I) {
501
541
  g.o(y, E) || Object.defineProperty(y, E, {
502
542
  enumerable: !0,
503
- get: C
543
+ get: I
504
544
  });
505
545
  }, g.r = function(y) {
506
546
  typeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(y, Symbol.toStringTag, {
@@ -511,16 +551,16 @@ var Pt = { exports: {} }, Tt = { exports: {} };
511
551
  }, g.t = function(y, E) {
512
552
  if (1 & E && (y = g(y)), 8 & E || 4 & E && typeof y == "object" && y && y.__esModule)
513
553
  return y;
514
- var C = /* @__PURE__ */ Object.create(null);
515
- if (g.r(C), Object.defineProperty(C, "default", {
554
+ var I = /* @__PURE__ */ Object.create(null);
555
+ if (g.r(I), Object.defineProperty(I, "default", {
516
556
  enumerable: !0,
517
557
  value: y
518
558
  }), 2 & E && typeof y != "string")
519
- for (var N in y)
520
- g.d(C, N, function(M) {
559
+ for (var D in y)
560
+ g.d(I, D, function(M) {
521
561
  return y[M];
522
- }.bind(null, N));
523
- return C;
562
+ }.bind(null, D));
563
+ return I;
524
564
  }, g.n = function(y) {
525
565
  var E = y && y.__esModule ? function() {
526
566
  return y.default;
@@ -533,33 +573,33 @@ var Pt = { exports: {} }, Tt = { exports: {} };
533
573
  }, g.p = "", g(g.s = 0);
534
574
  }([function(l, v, g) {
535
575
  g.r(v), g.d(v, "Promise", function() {
536
- return I;
576
+ return C;
537
577
  }), g.d(v, "TYPES", function() {
538
578
  return Xt;
539
579
  }), g.d(v, "ProxyWindow", function() {
540
- return G;
580
+ return q;
541
581
  }), g.d(v, "setup", function() {
542
- return pt;
582
+ return wt;
543
583
  }), g.d(v, "destroy", function() {
544
584
  return Vt;
545
585
  }), g.d(v, "serializeMessage", function() {
546
- return qt;
547
- }), g.d(v, "deserializeMessage", function() {
548
586
  return Jt;
549
- }), g.d(v, "createProxyWindow", function() {
587
+ }), g.d(v, "deserializeMessage", function() {
550
588
  return Yt;
551
- }), g.d(v, "toProxyWindow", function() {
589
+ }), g.d(v, "createProxyWindow", function() {
552
590
  return Zt;
591
+ }), g.d(v, "toProxyWindow", function() {
592
+ return Kt;
553
593
  }), g.d(v, "on", function() {
554
- return X;
594
+ return V;
555
595
  }), g.d(v, "once", function() {
556
596
  return _t;
557
597
  }), g.d(v, "send", function() {
558
- return K;
598
+ return X;
559
599
  }), g.d(v, "markWindowKnown", function() {
560
- return rt;
600
+ return it;
561
601
  }), g.d(v, "cleanUpWindow", function() {
562
- return Kt;
602
+ return Qt;
563
603
  }), g.d(v, "bridge", function() {
564
604
  });
565
605
  function y(e) {
@@ -567,19 +607,19 @@ var Pt = { exports: {} }, Tt = { exports: {} };
567
607
  }
568
608
  var E = `Call was rejected by callee.\r
569
609
  `;
570
- function C(e) {
610
+ function I(e) {
571
611
  return e === void 0 && (e = window), e.location.protocol;
572
612
  }
573
- function N(e) {
613
+ function D(e) {
574
614
  if (e === void 0 && (e = window), e.mockDomain) {
575
615
  var n = e.mockDomain.split("//")[0];
576
616
  if (n)
577
617
  return n;
578
618
  }
579
- return C(e);
619
+ return I(e);
580
620
  }
581
621
  function M(e) {
582
- return e === void 0 && (e = window), N(e) === "about:";
622
+ return e === void 0 && (e = window), D(e) === "about:";
583
623
  }
584
624
  function B(e) {
585
625
  if (e === void 0 && (e = window), e)
@@ -596,7 +636,7 @@ var Pt = { exports: {} }, Tt = { exports: {} };
596
636
  } catch (n) {
597
637
  }
598
638
  }
599
- function V(e) {
639
+ function K(e) {
600
640
  try {
601
641
  return !0;
602
642
  } catch (n) {
@@ -608,21 +648,21 @@ var Pt = { exports: {} }, Tt = { exports: {} };
608
648
  var n = e.location;
609
649
  if (!n)
610
650
  throw new Error("Can not read window location");
611
- var t = C(e);
651
+ var t = I(e);
612
652
  if (!t)
613
653
  throw new Error("Can not read window protocol");
614
654
  if (t === "file:")
615
655
  return "file://";
616
656
  if (t === "about:") {
617
657
  var r = B(e);
618
- return r && V() ? pe(r) : "about://";
658
+ return r && K() ? pe(r) : "about://";
619
659
  }
620
660
  var o = n.host;
621
661
  if (!o)
622
662
  throw new Error("Can not read window host");
623
663
  return t + "//" + o;
624
664
  }
625
- function L(e) {
665
+ function k(e) {
626
666
  e === void 0 && (e = window);
627
667
  var n = pe(e);
628
668
  return n && e.mockDomain && e.mockDomain.indexOf("mock:") === 0 ? e.mockDomain : n;
@@ -641,14 +681,14 @@ var Pt = { exports: {} }, Tt = { exports: {} };
641
681
  } catch (r) {
642
682
  }
643
683
  try {
644
- if (M(n) && V())
684
+ if (M(n) && K())
645
685
  return !0;
646
686
  } catch (r) {
647
687
  }
648
688
  try {
649
689
  if (function(r) {
650
- return r === void 0 && (r = window), N(r) === "mock:";
651
- }(n) && V())
690
+ return r === void 0 && (r = window), D(r) === "mock:";
691
+ }(n) && K())
652
692
  return !0;
653
693
  } catch (r) {
654
694
  }
@@ -661,7 +701,7 @@ var Pt = { exports: {} }, Tt = { exports: {} };
661
701
  }(e))
662
702
  return !1;
663
703
  try {
664
- if (e === window || M(e) && V() || L(window) === L(e))
704
+ if (e === window || M(e) && K() || k(window) === k(e))
665
705
  return !0;
666
706
  } catch (n) {
667
707
  }
@@ -672,7 +712,7 @@ var Pt = { exports: {} }, Tt = { exports: {} };
672
712
  throw new Error("Expected window to be same domain");
673
713
  return e;
674
714
  }
675
- function He(e, n) {
715
+ function Fe(e, n) {
676
716
  if (!e || !n)
677
717
  return !1;
678
718
  var t = B(n);
@@ -686,17 +726,17 @@ var Pt = { exports: {} }, Tt = { exports: {} };
686
726
  return o;
687
727
  }(n).indexOf(e) !== -1;
688
728
  }
689
- function Fe(e) {
729
+ function qe(e) {
690
730
  var n = [], t;
691
731
  try {
692
732
  t = e.frames;
693
- } catch (c) {
733
+ } catch (u) {
694
734
  t = e;
695
735
  }
696
736
  var r;
697
737
  try {
698
738
  r = t.length;
699
- } catch (c) {
739
+ } catch (u) {
700
740
  }
701
741
  if (r === 0)
702
742
  return n;
@@ -705,7 +745,7 @@ var Pt = { exports: {} }, Tt = { exports: {} };
705
745
  var i = void 0;
706
746
  try {
707
747
  i = t[o];
708
- } catch (c) {
748
+ } catch (u) {
709
749
  continue;
710
750
  }
711
751
  n.push(i);
@@ -713,20 +753,20 @@ var Pt = { exports: {} }, Tt = { exports: {} };
713
753
  return n;
714
754
  }
715
755
  for (var a = 0; a < 100; a++) {
716
- var u = void 0;
756
+ var c = void 0;
717
757
  try {
718
- u = t[a];
719
- } catch (c) {
758
+ c = t[a];
759
+ } catch (u) {
720
760
  return n;
721
761
  }
722
- if (!u)
762
+ if (!c)
723
763
  return n;
724
- n.push(u);
764
+ n.push(c);
725
765
  }
726
766
  return n;
727
767
  }
728
- var Rt = [], At = [];
729
- function $(e, n) {
768
+ var At = [], Dt = [];
769
+ function G(e, n) {
730
770
  n === void 0 && (n = !0);
731
771
  try {
732
772
  if (e === window)
@@ -762,12 +802,12 @@ var Pt = { exports: {} }, Tt = { exports: {} };
762
802
  try {
763
803
  if (o[a] === i)
764
804
  return a;
765
- } catch (u) {
805
+ } catch (c) {
766
806
  }
767
807
  return -1;
768
- }(Rt, e);
808
+ }(At, e);
769
809
  if (t !== -1) {
770
- var r = At[t];
810
+ var r = Dt[t];
771
811
  if (r && function(o) {
772
812
  if (!o.contentWindow || !o.parentNode)
773
813
  return !0;
@@ -784,7 +824,7 @@ var Pt = { exports: {} }, Tt = { exports: {} };
784
824
  }
785
825
  return !1;
786
826
  }
787
- function Ue(e) {
827
+ function Be(e) {
788
828
  return e === void 0 && (e = window), oe(e = e || window) || B(e) || void 0;
789
829
  }
790
830
  function re(e, n) {
@@ -899,36 +939,36 @@ var Pt = { exports: {} }, Tt = { exports: {} };
899
939
  }
900
940
  return !1;
901
941
  }
902
- var Be = [], ie = [], Se = 0, ae;
903
- function $e() {
904
- if (!Se && ae) {
942
+ var $e = [], ie = [], We = 0, ae;
943
+ function _e() {
944
+ if (!We && ae) {
905
945
  var e = ae;
906
946
  ae = null, e.resolve();
907
947
  }
908
948
  }
909
- function We() {
910
- Se += 1;
949
+ function Ie() {
950
+ We += 1;
911
951
  }
912
952
  function se() {
913
- Se -= 1, $e();
953
+ We -= 1, _e();
914
954
  }
915
- var I = function() {
955
+ var C = function() {
916
956
  function e(t) {
917
957
  var r = this;
918
958
  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 = !1, this.rejected = !1, this.errorHandled = !1, this.handlers = [], t) {
919
- var o, i, a = !1, u = !1, c = !1;
920
- We();
959
+ var o, i, a = !1, c = !1, u = !1;
960
+ Ie();
921
961
  try {
922
962
  t(function(s) {
923
- c ? r.resolve(s) : (a = !0, o = s);
963
+ u ? r.resolve(s) : (a = !0, o = s);
924
964
  }, function(s) {
925
- c ? r.reject(s) : (u = !0, i = s);
965
+ u ? r.reject(s) : (c = !0, i = s);
926
966
  });
927
967
  } catch (s) {
928
968
  se(), this.reject(s);
929
969
  return;
930
970
  }
931
- se(), c = !0, a ? this.resolve(o) : u && this.reject(i);
971
+ se(), u = !0, a ? this.resolve(o) : c && this.reject(i);
932
972
  }
933
973
  }
934
974
  var n = e.prototype;
@@ -950,12 +990,12 @@ var Pt = { exports: {} }, Tt = { exports: {} };
950
990
  }
951
991
  return this.rejected = !0, this.error = t, this.errorHandled || setTimeout(function() {
952
992
  r.errorHandled || function(i, a) {
953
- if (Be.indexOf(i) === -1) {
954
- Be.push(i), setTimeout(function() {
993
+ if ($e.indexOf(i) === -1) {
994
+ $e.push(i), setTimeout(function() {
955
995
  throw i;
956
996
  }, 1);
957
- for (var u = 0; u < ie.length; u++)
958
- ie[u](i, a);
997
+ for (var c = 0; c < ie.length; c++)
998
+ ie[c](i, a);
959
999
  }
960
1000
  }(t, r);
961
1001
  }, 1), this.dispatch(), this;
@@ -964,7 +1004,7 @@ var Pt = { exports: {} }, Tt = { exports: {} };
964
1004
  }, n.dispatch = function() {
965
1005
  var t = this.resolved, r = this.rejected, o = this.handlers;
966
1006
  if (!this.dispatching && (t || r)) {
967
- this.dispatching = !0, We();
1007
+ this.dispatching = !0, Ie();
968
1008
  for (var i = function(w, S) {
969
1009
  return w.then(function(x) {
970
1010
  S.resolve(x);
@@ -972,10 +1012,10 @@ var Pt = { exports: {} }, Tt = { exports: {} };
972
1012
  S.reject(x);
973
1013
  });
974
1014
  }, a = 0; a < o.length; a++) {
975
- var u = o[a], c = u.onSuccess, s = u.onError, p = u.promise, h = void 0;
1015
+ var c = o[a], u = c.onSuccess, s = c.onError, p = c.promise, h = void 0;
976
1016
  if (t)
977
1017
  try {
978
- h = c ? c(this.value) : this.value;
1018
+ h = u ? u(this.value) : this.value;
979
1019
  } catch (w) {
980
1020
  p.reject(w);
981
1021
  continue;
@@ -1059,27 +1099,27 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1059
1099
  }, function(m) {
1060
1100
  h.reject(m);
1061
1101
  });
1062
- }, u = 0; u < t.length; u++) {
1063
- var c = t[u];
1064
- if (c instanceof e) {
1065
- if (c.resolved) {
1066
- i[u] = c.value, o -= 1;
1102
+ }, c = 0; c < t.length; c++) {
1103
+ var u = t[c];
1104
+ if (u instanceof e) {
1105
+ if (u.resolved) {
1106
+ i[c] = u.value, o -= 1;
1067
1107
  continue;
1068
1108
  }
1069
- } else if (!ee(c)) {
1070
- i[u] = c, o -= 1;
1109
+ } else if (!ee(u)) {
1110
+ i[c] = u, o -= 1;
1071
1111
  continue;
1072
1112
  }
1073
- a(u, e.resolve(c), r);
1113
+ a(c, e.resolve(u), r);
1074
1114
  }
1075
1115
  return o === 0 && r.resolve(i), r;
1076
1116
  }, e.hash = function(t) {
1077
- var r = {}, o = [], i = function(u) {
1078
- if (t.hasOwnProperty(u)) {
1079
- var c = t[u];
1080
- ee(c) ? o.push(c.then(function(s) {
1081
- r[u] = s;
1082
- })) : r[u] = c;
1117
+ var r = {}, o = [], i = function(c) {
1118
+ if (t.hasOwnProperty(c)) {
1119
+ var u = t[c];
1120
+ ee(u) ? o.push(u.then(function(s) {
1121
+ r[c] = s;
1122
+ })) : r[c] = u;
1083
1123
  }
1084
1124
  };
1085
1125
  for (var a in t)
@@ -1101,7 +1141,7 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1101
1141
  if (t && typeof t != "function" && !t.call)
1102
1142
  throw new Error("Promise.try expected a function");
1103
1143
  var i;
1104
- We();
1144
+ Ie();
1105
1145
  try {
1106
1146
  i = t.apply(r, o || []);
1107
1147
  } catch (a) {
@@ -1117,7 +1157,7 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1117
1157
  }, e.flush = function() {
1118
1158
  return function(t) {
1119
1159
  var r = ae = ae || new t();
1120
- return $e(), r;
1160
+ return _e(), r;
1121
1161
  }(e);
1122
1162
  }, e;
1123
1163
  }();
@@ -1152,7 +1192,7 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1152
1192
  return n._cleanupClosedWindows = function() {
1153
1193
  for (var t = this.weakmap, r = this.keys, o = 0; o < r.length; o++) {
1154
1194
  var i = r[o];
1155
- if (we(i) && $(i)) {
1195
+ if (we(i) && G(i)) {
1156
1196
  if (t)
1157
1197
  try {
1158
1198
  t.delete(i);
@@ -1184,8 +1224,8 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1184
1224
  } catch (p) {
1185
1225
  }
1186
1226
  this._cleanupClosedWindows();
1187
- var u = this.keys, c = this.values, s = ge(u, t);
1188
- s === -1 ? (u.push(t), c.push(r)) : c[s] = r;
1227
+ var c = this.keys, u = this.values, s = ge(c, t);
1228
+ s === -1 ? (c.push(t), u.push(r)) : u[s] = r;
1189
1229
  }, n.get = function(t) {
1190
1230
  if (!t)
1191
1231
  throw new Error("WeakMap expected key");
@@ -1214,14 +1254,14 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1214
1254
  if (r)
1215
1255
  try {
1216
1256
  r.delete(t);
1217
- } catch (u) {
1257
+ } catch (c) {
1218
1258
  delete this.weakmap;
1219
1259
  }
1220
1260
  if (this.isSafeToReadWrite(t))
1221
1261
  try {
1222
1262
  var o = t[this.name];
1223
1263
  o && o[0] === t && (o[0] = o[1] = void 0);
1224
- } catch (u) {
1264
+ } catch (c) {
1225
1265
  }
1226
1266
  this._cleanupClosedWindows();
1227
1267
  var i = this.keys, a = ge(i, t);
@@ -1251,10 +1291,10 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1251
1291
  return this.set(t, o), o;
1252
1292
  }, e;
1253
1293
  }();
1254
- function _e(e) {
1294
+ function Je(e) {
1255
1295
  return e.name || e.__name__ || e.displayName || "anonymous";
1256
1296
  }
1257
- function qe(e, n) {
1297
+ function Ye(e, n) {
1258
1298
  try {
1259
1299
  delete e.name, e.name = n;
1260
1300
  } catch (t) {
@@ -1276,7 +1316,7 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1276
1316
  }((/* @__PURE__ */ new Date()).toISOString().slice(11, 19).replace("T", ".")).replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
1277
1317
  }
1278
1318
  var ye;
1279
- function Je(e) {
1319
+ function Ze(e) {
1280
1320
  try {
1281
1321
  return JSON.stringify([].slice.call(e), function(n, t) {
1282
1322
  return typeof t == "function" ? "memoize[" + function(r) {
@@ -1290,23 +1330,23 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1290
1330
  throw new Error("Arguments not serializable -- can not be used to memoize");
1291
1331
  }
1292
1332
  }
1293
- function Dt() {
1333
+ function zt() {
1294
1334
  return {};
1295
1335
  }
1296
- var ce = 0, Ye = 0;
1297
- function ue(e, n) {
1336
+ var ue = 0, Ke = 0;
1337
+ function ce(e, n) {
1298
1338
  n === void 0 && (n = {});
1299
- var t = n.thisNamespace, r = t !== void 0 && t, o = n.time, i, a, u = ce;
1300
- ce += 1;
1301
- var c = function() {
1339
+ var t = n.thisNamespace, r = t !== void 0 && t, o = n.time, i, a, c = ue;
1340
+ ue += 1;
1341
+ var u = function() {
1302
1342
  for (var s = arguments.length, p = new Array(s), h = 0; h < s; h++)
1303
1343
  p[h] = arguments[h];
1304
- u < Ye && (i = null, a = null, u = ce, ce += 1);
1344
+ c < Ke && (i = null, a = null, c = ue, ue += 1);
1305
1345
  var m;
1306
- m = r ? (a = a || new Ce()).getOrSet(this, Dt) : i = i || {};
1346
+ m = r ? (a = a || new Ce()).getOrSet(this, zt) : i = i || {};
1307
1347
  var w;
1308
1348
  try {
1309
- w = Je(p);
1349
+ w = Ze(p);
1310
1350
  } catch (P) {
1311
1351
  return e.apply(this, arguments);
1312
1352
  }
@@ -1319,28 +1359,28 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1319
1359
  value: b
1320
1360
  }, b;
1321
1361
  };
1322
- return c.reset = function() {
1362
+ return u.reset = function() {
1323
1363
  i = null, a = null;
1324
- }, qe(c, (n.name || _e(e)) + "::memoized");
1364
+ }, Ye(u, (n.name || Je(e)) + "::memoized");
1325
1365
  }
1326
- ue.clear = function() {
1327
- Ye = ce;
1366
+ ce.clear = function() {
1367
+ Ke = ue;
1328
1368
  };
1329
- function zt(e) {
1369
+ function jt(e) {
1330
1370
  var n = {};
1331
1371
  function t() {
1332
- for (var r = arguments, o = this, i = arguments.length, a = new Array(i), u = 0; u < i; u++)
1333
- a[u] = arguments[u];
1334
- var c = Je(a);
1335
- return n.hasOwnProperty(c) || (n[c] = I.try(function() {
1372
+ for (var r = arguments, o = this, i = arguments.length, a = new Array(i), c = 0; c < i; c++)
1373
+ a[c] = arguments[c];
1374
+ var u = Ze(a);
1375
+ return n.hasOwnProperty(u) || (n[u] = C.try(function() {
1336
1376
  return e.apply(o, r);
1337
1377
  }).finally(function() {
1338
- delete n[c];
1339
- })), n[c];
1378
+ delete n[u];
1379
+ })), n[u];
1340
1380
  }
1341
1381
  return t.reset = function() {
1342
1382
  n = {};
1343
- }, qe(t, _e(e) + "::promiseMemoized");
1383
+ }, Ye(t, Je(e) + "::promiseMemoized");
1344
1384
  }
1345
1385
  function te() {
1346
1386
  }
@@ -1367,10 +1407,10 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1367
1407
  return "Error while stringifying error: " + de(o, n + 1);
1368
1408
  }
1369
1409
  }
1370
- function Ze(e) {
1410
+ function Ve(e) {
1371
1411
  return typeof e == "string" ? e : e && e.toString && typeof e.toString == "function" ? e.toString() : {}.toString.call(e);
1372
1412
  }
1373
- ue(function(e) {
1413
+ ce(function(e) {
1374
1414
  if (Object.values)
1375
1415
  return Object.values(e);
1376
1416
  var n = [];
@@ -1378,7 +1418,7 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1378
1418
  e.hasOwnProperty(t) && n.push(e[t]);
1379
1419
  return n;
1380
1420
  });
1381
- function Ie(e) {
1421
+ function Pe(e) {
1382
1422
  return {}.toString.call(e) === "[object RegExp]";
1383
1423
  }
1384
1424
  function fe(e, n, t) {
@@ -1387,29 +1427,29 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1387
1427
  var r = t();
1388
1428
  return e[n] = r, r;
1389
1429
  }
1390
- function Ve() {
1430
+ function Xe() {
1391
1431
  var e = document.body;
1392
1432
  if (!e)
1393
1433
  throw new Error("Body element not found");
1394
1434
  return e;
1395
1435
  }
1396
- function Xe() {
1436
+ function Qe() {
1397
1437
  return !!document.body && document.readyState === "complete";
1398
1438
  }
1399
- function Ke() {
1439
+ function et() {
1400
1440
  return !!document.body && document.readyState === "interactive";
1401
1441
  }
1402
- ue(function() {
1403
- return new I(function(e) {
1404
- if (Xe() || Ke())
1442
+ ce(function() {
1443
+ return new C(function(e) {
1444
+ if (Qe() || et())
1405
1445
  return e();
1406
1446
  var n = setInterval(function() {
1407
- if (Xe() || Ke())
1447
+ if (Qe() || et())
1408
1448
  return clearInterval(n), e();
1409
1449
  }, 10);
1410
1450
  });
1411
1451
  });
1412
- var Ee = typeof document != "undefined" ? document.currentScript : null, jt = ue(function() {
1452
+ var Ee = typeof document != "undefined" ? document.currentScript : null, Lt = ce(function() {
1413
1453
  if (Ee || (Ee = function() {
1414
1454
  try {
1415
1455
  var e = function() {
@@ -1432,10 +1472,10 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1432
1472
  return Ee;
1433
1473
  throw new Error("Can not determine current script");
1434
1474
  }), Mt = Y();
1435
- ue(function() {
1475
+ ce(function() {
1436
1476
  var e;
1437
1477
  try {
1438
- e = jt();
1478
+ e = Lt();
1439
1479
  } catch (r) {
1440
1480
  return Mt;
1441
1481
  }
@@ -1463,11 +1503,11 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1463
1503
  var n = "__post_robot_10_0_46__";
1464
1504
  return e !== window ? e[n] : e[n] = e[n] || {};
1465
1505
  }
1466
- var Qe = function() {
1506
+ var tt = function() {
1467
1507
  return {};
1468
1508
  };
1469
1509
  function z(e, n) {
1470
- return e === void 0 && (e = "store"), n === void 0 && (n = Qe), fe(le(), e, function() {
1510
+ return e === void 0 && (e = "store"), n === void 0 && (n = tt), fe(le(), e, function() {
1471
1511
  var t = n();
1472
1512
  return {
1473
1513
  has: function(r) {
@@ -1494,14 +1534,14 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1494
1534
  };
1495
1535
  });
1496
1536
  }
1497
- var Lt = function() {
1537
+ var kt = function() {
1498
1538
  };
1499
1539
  function xe() {
1500
1540
  var e = le();
1501
- return e.WINDOW_WILDCARD = e.WINDOW_WILDCARD || new Lt(), e.WINDOW_WILDCARD;
1541
+ return e.WINDOW_WILDCARD = e.WINDOW_WILDCARD || new kt(), e.WINDOW_WILDCARD;
1502
1542
  }
1503
- function k(e, n) {
1504
- return e === void 0 && (e = "store"), n === void 0 && (n = Qe), z("windowStore").getOrSet(e, function() {
1543
+ function U(e, n) {
1544
+ return e === void 0 && (e = "store"), n === void 0 && (n = tt), z("windowStore").getOrSet(e, function() {
1505
1545
  var t = new Ce(), r = function(o) {
1506
1546
  return t.getOrSet(o, n);
1507
1547
  };
@@ -1525,28 +1565,28 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1525
1565
  };
1526
1566
  });
1527
1567
  }
1528
- function et() {
1568
+ function nt() {
1529
1569
  return z("instance").getOrSet("instanceID", Y);
1530
1570
  }
1531
- function tt(e, n) {
1532
- var t = n.domain, r = k("helloPromises"), o = r.get(e);
1571
+ function rt(e, n) {
1572
+ var t = n.domain, r = U("helloPromises"), o = r.get(e);
1533
1573
  o && o.resolve({
1534
1574
  domain: t
1535
1575
  });
1536
- var i = I.resolve({
1576
+ var i = C.resolve({
1537
1577
  domain: t
1538
1578
  });
1539
1579
  return r.set(e, i), i;
1540
1580
  }
1541
- function Pe(e, n) {
1581
+ function Te(e, n) {
1542
1582
  return (0, n.send)(e, "postrobot_hello", {
1543
- instanceID: et()
1583
+ instanceID: nt()
1544
1584
  }, {
1545
1585
  domain: "*",
1546
1586
  timeout: -1
1547
1587
  }).then(function(t) {
1548
1588
  var r = t.origin, o = t.data.instanceID;
1549
- return tt(e, {
1589
+ return rt(e, {
1550
1590
  domain: r
1551
1591
  }), {
1552
1592
  win: e,
@@ -1555,23 +1595,23 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1555
1595
  };
1556
1596
  });
1557
1597
  }
1558
- function nt(e, n) {
1598
+ function ot(e, n) {
1559
1599
  var t = n.send;
1560
- return k("windowInstanceIDPromises").getOrSet(e, function() {
1561
- return Pe(e, {
1600
+ return U("windowInstanceIDPromises").getOrSet(e, function() {
1601
+ return Te(e, {
1562
1602
  send: t
1563
1603
  }).then(function(r) {
1564
1604
  return r.instanceID;
1565
1605
  });
1566
1606
  });
1567
1607
  }
1568
- function rt(e) {
1569
- k("knownWindows").set(e, !0);
1608
+ function it(e) {
1609
+ U("knownWindows").set(e, !0);
1570
1610
  }
1571
- function Te(e) {
1611
+ function Re(e) {
1572
1612
  return typeof e == "object" && e !== null && typeof e.__type__ == "string";
1573
1613
  }
1574
- function ot(e) {
1614
+ function at(e) {
1575
1615
  return e === void 0 ? "undefined" : e === null ? "null" : Array.isArray(e) ? "array" : typeof e == "function" ? "function" : typeof e == "object" ? e instanceof Error ? "error" : typeof e.then == "function" ? "promise" : {}.toString.call(e) === "[object RegExp]" ? "regex" : {}.toString.call(e) === "[object Date]" ? "date" : "object" : typeof e == "string" ? "string" : typeof e == "number" ? "number" : typeof e == "boolean" ? "boolean" : void 0;
1576
1616
  }
1577
1617
  function ne(e, n) {
@@ -1580,61 +1620,61 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1580
1620
  __val__: n
1581
1621
  };
1582
1622
  }
1583
- var F, kt = ((F = {}).function = function() {
1584
- }, F.error = function(e) {
1623
+ var H, Ut = ((H = {}).function = function() {
1624
+ }, H.error = function(e) {
1585
1625
  return ne("error", {
1586
1626
  message: e.message,
1587
1627
  stack: e.stack,
1588
1628
  code: e.code,
1589
1629
  data: e.data
1590
1630
  });
1591
- }, F.promise = function() {
1592
- }, F.regex = function(e) {
1631
+ }, H.promise = function() {
1632
+ }, H.regex = function(e) {
1593
1633
  return ne("regex", e.source);
1594
- }, F.date = function(e) {
1634
+ }, H.date = function(e) {
1595
1635
  return ne("date", e.toJSON());
1596
- }, F.array = function(e) {
1636
+ }, H.array = function(e) {
1597
1637
  return e;
1598
- }, F.object = function(e) {
1638
+ }, H.object = function(e) {
1599
1639
  return e;
1600
- }, F.string = function(e) {
1640
+ }, H.string = function(e) {
1601
1641
  return e;
1602
- }, F.number = function(e) {
1642
+ }, H.number = function(e) {
1603
1643
  return e;
1604
- }, F.boolean = function(e) {
1644
+ }, H.boolean = function(e) {
1605
1645
  return e;
1606
- }, F.null = function(e) {
1646
+ }, H.null = function(e) {
1607
1647
  return e;
1608
- }, F[void 0] = function(e) {
1648
+ }, H[void 0] = function(e) {
1609
1649
  return ne("undefined", e);
1610
- }, F), Ht = {}, U, Ft = ((U = {}).function = function() {
1650
+ }, H), Ht = {}, F, Ft = ((F = {}).function = function() {
1611
1651
  throw new Error("Function serialization is not implemented; nothing to deserialize");
1612
- }, U.error = function(e) {
1652
+ }, F.error = function(e) {
1613
1653
  var n = e.stack, t = e.code, r = e.data, o = new Error(e.message);
1614
1654
  return o.code = t, r && (o.data = r), o.stack = n + `
1615
1655
 
1616
1656
  ` + o.stack, o;
1617
- }, U.promise = function() {
1657
+ }, F.promise = function() {
1618
1658
  throw new Error("Promise serialization is not implemented; nothing to deserialize");
1619
- }, U.regex = function(e) {
1659
+ }, F.regex = function(e) {
1620
1660
  return new RegExp(e);
1621
- }, U.date = function(e) {
1661
+ }, F.date = function(e) {
1622
1662
  return new Date(e);
1623
- }, U.array = function(e) {
1663
+ }, F.array = function(e) {
1624
1664
  return e;
1625
- }, U.object = function(e) {
1665
+ }, F.object = function(e) {
1626
1666
  return e;
1627
- }, U.string = function(e) {
1667
+ }, F.string = function(e) {
1628
1668
  return e;
1629
- }, U.number = function(e) {
1669
+ }, F.number = function(e) {
1630
1670
  return e;
1631
- }, U.boolean = function(e) {
1671
+ }, F.boolean = function(e) {
1632
1672
  return e;
1633
- }, U.null = function(e) {
1673
+ }, F.null = function(e) {
1634
1674
  return e;
1635
- }, U[void 0] = function() {
1636
- }, U), Ut = {};
1637
- new I(function(e) {
1675
+ }, F[void 0] = function() {
1676
+ }, F), qt = {};
1677
+ new C(function(e) {
1638
1678
  if (window.document && window.document.body)
1639
1679
  return e(window.document.body);
1640
1680
  var n = setInterval(function() {
@@ -1648,20 +1688,20 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1648
1688
  e.get(r).shouldClean() && e.del(r);
1649
1689
  }
1650
1690
  }
1651
- function it(e, n) {
1652
- var t = n.send, r = n.id, o = r === void 0 ? Y() : r, i = e.then(function(c) {
1653
- if (Q(c))
1654
- return ve(c).name;
1655
- }), a = e.then(function(c) {
1656
- if ($(c))
1691
+ function st(e, n) {
1692
+ var t = n.send, r = n.id, o = r === void 0 ? Y() : r, i = e.then(function(u) {
1693
+ if (Q(u))
1694
+ return ve(u).name;
1695
+ }), a = e.then(function(u) {
1696
+ if (G(u))
1657
1697
  throw new Error("Window is closed, can not determine type");
1658
- return oe(c) ? "popup" : "iframe";
1698
+ return oe(u) ? "popup" : "iframe";
1659
1699
  });
1660
1700
  i.catch(te), a.catch(te);
1661
- var u = function() {
1662
- return e.then(function(c) {
1663
- if (!$(c))
1664
- return Q(c) ? ve(c).name : i;
1701
+ var c = function() {
1702
+ return e.then(function(u) {
1703
+ if (!G(u))
1704
+ return Q(u) ? ve(u).name : i;
1665
1705
  });
1666
1706
  };
1667
1707
  return {
@@ -1669,9 +1709,9 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1669
1709
  getType: function() {
1670
1710
  return a;
1671
1711
  },
1672
- getInstanceID: zt(function() {
1673
- return e.then(function(c) {
1674
- return nt(c, {
1712
+ getInstanceID: jt(function() {
1713
+ return e.then(function(u) {
1714
+ return ot(u, {
1675
1715
  send: t
1676
1716
  });
1677
1717
  });
@@ -1679,38 +1719,38 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1679
1719
  close: function() {
1680
1720
  return e.then(Nt);
1681
1721
  },
1682
- getName: u,
1722
+ getName: c,
1683
1723
  focus: function() {
1684
- return e.then(function(c) {
1685
- c.focus();
1724
+ return e.then(function(u) {
1725
+ u.focus();
1686
1726
  });
1687
1727
  },
1688
1728
  isClosed: function() {
1689
- return e.then(function(c) {
1690
- return $(c);
1729
+ return e.then(function(u) {
1730
+ return G(u);
1691
1731
  });
1692
1732
  },
1693
- setLocation: function(c, s) {
1733
+ setLocation: function(u, s) {
1694
1734
  return s === void 0 && (s = {}), e.then(function(p) {
1695
1735
  var h = window.location.protocol + "//" + window.location.host, m = s.method, w = m === void 0 ? "get" : m, S = s.body;
1696
- if (c.indexOf("/") === 0)
1697
- c = "" + h + c;
1698
- else if (!c.match(/^https?:\/\//) && c.indexOf(h) !== 0)
1699
- throw new Error("Expected url to be http or https url, or absolute path, got " + JSON.stringify(c));
1736
+ if (u.indexOf("/") === 0)
1737
+ u = "" + h + u;
1738
+ else if (!u.match(/^https?:\/\//) && u.indexOf(h) !== 0)
1739
+ throw new Error("Expected url to be http or https url, or absolute path, got " + JSON.stringify(u));
1700
1740
  if (w === "post")
1701
- return u().then(function(x) {
1741
+ return c().then(function(x) {
1702
1742
  if (!x)
1703
1743
  throw new Error("Can not post to window without target name");
1704
1744
  (function(b) {
1705
- var P = b.url, D = b.target, O = b.body, T = b.method, j = T === void 0 ? "post" : T, W = document.createElement("form");
1706
- if (W.setAttribute("target", D), W.setAttribute("method", j), W.setAttribute("action", P), W.style.display = "none", O)
1707
- for (var R = 0, _ = Object.keys(O); R < _.length; R++) {
1708
- var A, he = _[R], De = document.createElement("input");
1709
- De.setAttribute("name", he), De.setAttribute("value", (A = O[he]) == null ? void 0 : A.toString()), W.appendChild(De);
1745
+ var P = b.url, N = b.target, R = b.body, T = b.method, j = T === void 0 ? "post" : T, W = document.createElement("form");
1746
+ if (W.setAttribute("target", N), W.setAttribute("method", j), W.setAttribute("action", P), W.style.display = "none", R)
1747
+ for (var O = 0, $ = Object.keys(R); O < $.length; O++) {
1748
+ var A, he = $[O], ze = document.createElement("input");
1749
+ ze.setAttribute("name", he), ze.setAttribute("value", (A = R[he]) == null ? void 0 : A.toString()), W.appendChild(ze);
1710
1750
  }
1711
- Ve().appendChild(W), W.submit(), Ve().removeChild(W);
1751
+ Xe().appendChild(W), W.submit(), Xe().removeChild(W);
1712
1752
  })({
1713
- url: c,
1753
+ url: u,
1714
1754
  target: x,
1715
1755
  method: w,
1716
1756
  body: S
@@ -1721,28 +1761,28 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1721
1761
  if (Q(p))
1722
1762
  try {
1723
1763
  if (p.location && typeof p.location.replace == "function") {
1724
- p.location.replace(c);
1764
+ p.location.replace(u);
1725
1765
  return;
1726
1766
  }
1727
1767
  } catch (x) {
1728
1768
  }
1729
- p.location = c;
1769
+ p.location = u;
1730
1770
  });
1731
1771
  },
1732
- setName: function(c) {
1772
+ setName: function(u) {
1733
1773
  return e.then(function(s) {
1734
1774
  var p = Q(s), h = Ge(s);
1735
1775
  if (!p)
1736
- throw new Error("Can not set name for cross-domain window: " + c);
1737
- ve(s).name = c, h && h.setAttribute("name", c), i = I.resolve(c);
1776
+ throw new Error("Can not set name for cross-domain window: " + u);
1777
+ ve(s).name = u, h && h.setAttribute("name", u), i = C.resolve(u);
1738
1778
  });
1739
1779
  }
1740
1780
  };
1741
1781
  }
1742
- var G = function() {
1782
+ var q = function() {
1743
1783
  function e(t) {
1744
1784
  var r = t.send, o = t.win, i = t.serializedWindow;
1745
- this.id = void 0, this.isProxyWindow = !0, this.serializedWindow = void 0, this.actualWindow = void 0, this.actualWindowPromise = void 0, this.send = void 0, this.name = void 0, this.actualWindowPromise = new I(), this.serializedWindow = i || it(this.actualWindowPromise, {
1785
+ this.id = void 0, this.isProxyWindow = !0, this.serializedWindow = void 0, this.actualWindow = void 0, this.actualWindowPromise = void 0, this.send = void 0, this.name = void 0, this.actualWindowPromise = new C(), this.serializedWindow = i || st(this.actualWindowPromise, {
1746
1786
  send: r
1747
1787
  }), z("idToProxyWindow").set(this.getID(), this), o && this.setWindow(o, {
1748
1788
  send: r
@@ -1775,14 +1815,14 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1775
1815
  return t;
1776
1816
  });
1777
1817
  }, n.focus = function() {
1778
- var t = this, r = this.isPopup(), o = this.getName(), i = I.hash({
1818
+ var t = this, r = this.isPopup(), o = this.getName(), i = C.hash({
1779
1819
  isPopup: r,
1780
1820
  name: o
1781
- }).then(function(u) {
1782
- var c = u.name;
1783
- u.isPopup && c && window.open("", c, "noopener");
1821
+ }).then(function(c) {
1822
+ var u = c.name;
1823
+ c.isPopup && u && window.open("", u, "noopener");
1784
1824
  }), a = this.serializedWindow.focus();
1785
- return I.all([i, a]).then(function() {
1825
+ return C.all([i, a]).then(function() {
1786
1826
  return t;
1787
1827
  });
1788
1828
  }, n.isClosed = function() {
@@ -1791,25 +1831,25 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1791
1831
  return this.actualWindow;
1792
1832
  }, n.setWindow = function(t, r) {
1793
1833
  var o = r.send;
1794
- this.actualWindow = t, this.actualWindowPromise.resolve(this.actualWindow), this.serializedWindow = it(this.actualWindowPromise, {
1834
+ this.actualWindow = t, this.actualWindowPromise.resolve(this.actualWindow), this.serializedWindow = st(this.actualWindowPromise, {
1795
1835
  send: o,
1796
1836
  id: this.getID()
1797
- }), k("winToProxyWindow").set(t, this);
1837
+ }), U("winToProxyWindow").set(t, this);
1798
1838
  }, n.awaitWindow = function() {
1799
1839
  return this.actualWindowPromise;
1800
1840
  }, n.matchWindow = function(t, r) {
1801
1841
  var o = this, i = r.send;
1802
- return I.try(function() {
1803
- return o.actualWindow ? t === o.actualWindow : I.hash({
1842
+ return C.try(function() {
1843
+ return o.actualWindow ? t === o.actualWindow : C.hash({
1804
1844
  proxyInstanceID: o.getInstanceID(),
1805
- knownWindowInstanceID: nt(t, {
1845
+ knownWindowInstanceID: ot(t, {
1806
1846
  send: i
1807
1847
  })
1808
1848
  }).then(function(a) {
1809
- var u = a.proxyInstanceID === a.knownWindowInstanceID;
1810
- return u && o.setWindow(t, {
1849
+ var c = a.proxyInstanceID === a.knownWindowInstanceID;
1850
+ return c && o.setWindow(t, {
1811
1851
  send: i
1812
- }), u;
1852
+ }), c;
1813
1853
  });
1814
1854
  });
1815
1855
  }, n.unwrap = function() {
@@ -1817,7 +1857,7 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1817
1857
  }, n.getInstanceID = function() {
1818
1858
  return this.serializedWindow.getInstanceID();
1819
1859
  }, n.shouldClean = function() {
1820
- return !!(this.actualWindow && $(this.actualWindow));
1860
+ return !!(this.actualWindow && G(this.actualWindow));
1821
1861
  }, n.serialize = function() {
1822
1862
  return this.serializedWindow;
1823
1863
  }, e.unwrap = function(t) {
@@ -1840,15 +1880,15 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1840
1880
  if (Oe(), e.isProxyWindow(t))
1841
1881
  return t;
1842
1882
  var i = t;
1843
- return k("winToProxyWindow").get(i) || new e({
1883
+ return U("winToProxyWindow").get(i) || new e({
1844
1884
  win: i,
1845
1885
  send: o
1846
1886
  });
1847
1887
  }, e;
1848
1888
  }();
1849
- function Re(e, n, t, r, o) {
1850
- var i = k("methodStore"), a = z("proxyWindowMethods");
1851
- G.isProxyWindow(r) ? a.set(e, {
1889
+ function Ae(e, n, t, r, o) {
1890
+ var i = U("methodStore"), a = z("proxyWindowMethods");
1891
+ q.isProxyWindow(r) ? a.set(e, {
1852
1892
  val: n,
1853
1893
  name: t,
1854
1894
  domain: o,
@@ -1862,47 +1902,47 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1862
1902
  source: r
1863
1903
  });
1864
1904
  }
1865
- function at(e, n) {
1866
- var t = k("methodStore"), r = z("proxyWindowMethods");
1905
+ function ut(e, n) {
1906
+ var t = U("methodStore"), r = z("proxyWindowMethods");
1867
1907
  return t.getOrSet(e, function() {
1868
1908
  return {};
1869
1909
  })[n] || r.get(n);
1870
1910
  }
1871
- function st(e, n, t, r, o) {
1911
+ function ct(e, n, t, r, o) {
1872
1912
  a = (i = {
1873
1913
  on: o.on,
1874
1914
  send: o.send
1875
- }).on, u = i.send, z("builtinListeners").getOrSet("functionCalls", function() {
1915
+ }).on, c = i.send, z("builtinListeners").getOrSet("functionCalls", function() {
1876
1916
  return a("postrobot_method", {
1877
1917
  domain: "*"
1878
1918
  }, function(p) {
1879
- var h = p.source, m = p.origin, w = p.data, S = w.id, x = w.name, b = at(h, S);
1919
+ var h = p.source, m = p.origin, w = p.data, S = w.id, x = w.name, b = ut(h, S);
1880
1920
  if (!b)
1881
- throw new Error("Could not find method '" + x + "' with id: " + w.id + " in " + L(window));
1882
- var P = b.source, D = b.domain, O = b.val;
1883
- return I.try(function() {
1884
- if (!re(D, m))
1885
- throw new Error("Method '" + w.name + "' domain " + JSON.stringify(Ie(b.domain) ? b.domain.source : b.domain) + " does not match origin " + m + " in " + L(window));
1886
- if (G.isProxyWindow(P))
1921
+ throw new Error("Could not find method '" + x + "' with id: " + w.id + " in " + k(window));
1922
+ var P = b.source, N = b.domain, R = b.val;
1923
+ return C.try(function() {
1924
+ if (!re(N, m))
1925
+ throw new Error("Method '" + w.name + "' domain " + JSON.stringify(Pe(b.domain) ? b.domain.source : b.domain) + " does not match origin " + m + " in " + k(window));
1926
+ if (q.isProxyWindow(P))
1887
1927
  return P.matchWindow(h, {
1888
- send: u
1928
+ send: c
1889
1929
  }).then(function(T) {
1890
1930
  if (!T)
1891
- throw new Error("Method call '" + w.name + "' failed - proxy window does not match source in " + L(window));
1931
+ throw new Error("Method call '" + w.name + "' failed - proxy window does not match source in " + k(window));
1892
1932
  });
1893
1933
  }).then(function() {
1894
- return O.apply({
1934
+ return R.apply({
1895
1935
  source: h,
1896
1936
  origin: m
1897
1937
  }, w.args);
1898
1938
  }, function(T) {
1899
- return I.try(function() {
1900
- if (O.onError)
1901
- return O.onError(T);
1939
+ return C.try(function() {
1940
+ if (R.onError)
1941
+ return R.onError(T);
1902
1942
  }).then(function() {
1903
1943
  throw T.stack && (T.stack = "Remote call to " + x + "(" + function(j) {
1904
- return j === void 0 && (j = []), (W = j, [].slice.call(W)).map(function(R) {
1905
- return typeof R == "string" ? "'" + R + "'" : R === void 0 ? "undefined" : R === null ? "null" : typeof R == "boolean" ? R.toString() : Array.isArray(R) ? "[ ... ]" : typeof R == "object" ? "{ ... }" : typeof R == "function" ? "() => { ... }" : "<" + typeof R + ">";
1944
+ return j === void 0 && (j = []), (W = j, [].slice.call(W)).map(function(O) {
1945
+ return typeof O == "string" ? "'" + O + "'" : O === void 0 ? "undefined" : O === null ? "null" : typeof O == "boolean" ? O.toString() : Array.isArray(O) ? "[ ... ]" : typeof O == "object" ? "{ ... }" : typeof O == "function" ? "() => { ... }" : "<" + typeof O + ">";
1906
1946
  }).join(", ");
1907
1947
  var W;
1908
1948
  }(w.args) + `) failed
@@ -1918,111 +1958,111 @@ var Pt = { exports: {} }, Tt = { exports: {} };
1918
1958
  });
1919
1959
  });
1920
1960
  });
1921
- var i, a, u, c = t.__id__ || Y();
1922
- e = G.unwrap(e);
1961
+ var i, a, c, u = t.__id__ || Y();
1962
+ e = q.unwrap(e);
1923
1963
  var s = t.__name__ || t.name || r;
1924
- return typeof s == "string" && typeof s.indexOf == "function" && s.indexOf("anonymous::") === 0 && (s = s.replace("anonymous::", r + "::")), G.isProxyWindow(e) ? (Re(c, t, s, e, n), e.awaitWindow().then(function(p) {
1925
- Re(c, t, s, p, n);
1926
- })) : Re(c, t, s, e, n), ne("cross_domain_function", {
1927
- id: c,
1964
+ return typeof s == "string" && typeof s.indexOf == "function" && s.indexOf("anonymous::") === 0 && (s = s.replace("anonymous::", r + "::")), q.isProxyWindow(e) ? (Ae(u, t, s, e, n), e.awaitWindow().then(function(p) {
1965
+ Ae(u, t, s, p, n);
1966
+ })) : Ae(u, t, s, e, n), ne("cross_domain_function", {
1967
+ id: u,
1928
1968
  name: s
1929
1969
  });
1930
1970
  }
1931
- function ct(e, n, t, r) {
1971
+ function dt(e, n, t, r) {
1932
1972
  var o, i = r.on, a = r.send;
1933
- return function(u, c) {
1934
- c === void 0 && (c = Ht);
1935
- var s = JSON.stringify(u, function(p) {
1973
+ return function(c, u) {
1974
+ u === void 0 && (u = Ht);
1975
+ var s = JSON.stringify(c, function(p) {
1936
1976
  var h = this[p];
1937
- if (Te(this))
1977
+ if (Re(this))
1938
1978
  return h;
1939
- var m = ot(h);
1979
+ var m = at(h);
1940
1980
  if (!m)
1941
1981
  return h;
1942
- var w = c[m] || kt[m];
1982
+ var w = u[m] || Ut[m];
1943
1983
  return w ? w(h, p) : h;
1944
1984
  });
1945
1985
  return s === void 0 ? "undefined" : s;
1946
- }(t, ((o = {}).promise = function(u, c) {
1986
+ }(t, ((o = {}).promise = function(c, u) {
1947
1987
  return function(s, p, h, m, w) {
1948
1988
  return ne("cross_domain_zalgo_promise", {
1949
- then: st(s, p, function(S, x) {
1989
+ then: ct(s, p, function(S, x) {
1950
1990
  return h.then(S, x);
1951
1991
  }, m, {
1952
1992
  on: w.on,
1953
1993
  send: w.send
1954
1994
  })
1955
1995
  });
1956
- }(e, n, u, c, {
1996
+ }(e, n, c, u, {
1957
1997
  on: i,
1958
1998
  send: a
1959
1999
  });
1960
- }, o.function = function(u, c) {
1961
- return st(e, n, u, c, {
2000
+ }, o.function = function(c, u) {
2001
+ return ct(e, n, c, u, {
1962
2002
  on: i,
1963
2003
  send: a
1964
2004
  });
1965
- }, o.object = function(u) {
1966
- return we(u) || G.isProxyWindow(u) ? ne("cross_domain_window", G.serialize(u, {
2005
+ }, o.object = function(c) {
2006
+ return we(c) || q.isProxyWindow(c) ? ne("cross_domain_window", q.serialize(c, {
1967
2007
  send: a
1968
- })) : u;
2008
+ })) : c;
1969
2009
  }, o));
1970
2010
  }
1971
- function ut(e, n, t, r) {
2011
+ function ft(e, n, t, r) {
1972
2012
  var o, i = r.send;
1973
- return function(a, u) {
1974
- if (u === void 0 && (u = Ut), a !== "undefined")
1975
- return JSON.parse(a, function(c, s) {
1976
- if (Te(this))
2013
+ return function(a, c) {
2014
+ if (c === void 0 && (c = qt), a !== "undefined")
2015
+ return JSON.parse(a, function(u, s) {
2016
+ if (Re(this))
1977
2017
  return s;
1978
2018
  var p, h;
1979
- if (Te(s) ? (p = s.__type__, h = s.__val__) : (p = ot(s), h = s), !p)
2019
+ if (Re(s) ? (p = s.__type__, h = s.__val__) : (p = at(s), h = s), !p)
1980
2020
  return h;
1981
- var m = u[p] || Ft[p];
1982
- return m ? m(h, c) : h;
2021
+ var m = c[p] || Ft[p];
2022
+ return m ? m(h, u) : h;
1983
2023
  });
1984
2024
  }(t, ((o = {}).cross_domain_zalgo_promise = function(a) {
1985
- return function(u, c, s) {
1986
- return new I(s.then);
2025
+ return function(c, u, s) {
2026
+ return new C(s.then);
1987
2027
  }(0, 0, a);
1988
2028
  }, o.cross_domain_function = function(a) {
1989
- return function(u, c, s, p) {
2029
+ return function(c, u, s, p) {
1990
2030
  var h = s.id, m = s.name, w = p.send, S = function(b) {
1991
2031
  b === void 0 && (b = {});
1992
2032
  function P() {
1993
- var D = arguments;
1994
- return G.toProxyWindow(u, {
2033
+ var N = arguments;
2034
+ return q.toProxyWindow(c, {
1995
2035
  send: w
1996
- }).awaitWindow().then(function(O) {
1997
- var T = at(O, h);
2036
+ }).awaitWindow().then(function(R) {
2037
+ var T = ut(R, h);
1998
2038
  if (T && T.val !== P)
1999
2039
  return T.val.apply({
2000
2040
  source: window,
2001
- origin: L()
2002
- }, D);
2003
- var j = [].slice.call(D);
2004
- return b.fireAndForget ? w(O, "postrobot_method", {
2041
+ origin: k()
2042
+ }, N);
2043
+ var j = [].slice.call(N);
2044
+ return b.fireAndForget ? w(R, "postrobot_method", {
2005
2045
  id: h,
2006
2046
  name: m,
2007
2047
  args: j
2008
2048
  }, {
2009
- domain: c,
2049
+ domain: u,
2010
2050
  fireAndForget: !0
2011
- }) : w(O, "postrobot_method", {
2051
+ }) : w(R, "postrobot_method", {
2012
2052
  id: h,
2013
2053
  name: m,
2014
2054
  args: j
2015
2055
  }, {
2016
- domain: c,
2056
+ domain: u,
2017
2057
  fireAndForget: !1
2018
2058
  }).then(function(W) {
2019
2059
  return W.data.result;
2020
2060
  });
2021
- }).catch(function(O) {
2022
- throw O;
2061
+ }).catch(function(R) {
2062
+ throw R;
2023
2063
  });
2024
2064
  }
2025
- return P.__name__ = m, P.__origin__ = c, P.__source__ = u, P.__id__ = h, P.origin = c, P;
2065
+ return P.__name__ = m, P.__origin__ = u, P.__source__ = c, P.__id__ = h, P.origin = u, P;
2026
2066
  }, x = S();
2027
2067
  return x.fireAndForget = S({
2028
2068
  fireAndForget: !0
@@ -2031,33 +2071,33 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2031
2071
  send: i
2032
2072
  });
2033
2073
  }, o.cross_domain_window = function(a) {
2034
- return G.deserialize(a, {
2074
+ return q.deserialize(a, {
2035
2075
  send: i
2036
2076
  });
2037
2077
  }, o));
2038
2078
  }
2039
- var Ae = {};
2040
- Ae.postrobot_post_message = function(e, n, t) {
2079
+ var De = {};
2080
+ De.postrobot_post_message = function(e, n, t) {
2041
2081
  t.indexOf("file:") === 0 && (t = "*"), e.postMessage(n, t);
2042
2082
  };
2043
2083
  function Ne(e, n, t, r) {
2044
2084
  var o = r.on, i = r.send;
2045
- return I.try(function() {
2046
- var a = k().getOrSet(e, function() {
2085
+ return C.try(function() {
2086
+ var a = U().getOrSet(e, function() {
2047
2087
  return {};
2048
2088
  });
2049
- return a.buffer = a.buffer || [], a.buffer.push(t), a.flush = a.flush || I.flush().then(function() {
2050
- if ($(e))
2089
+ return a.buffer = a.buffer || [], a.buffer.push(t), a.flush = a.flush || C.flush().then(function() {
2090
+ if (G(e))
2051
2091
  throw new Error("Window is closed");
2052
- var u = ct(e, n, ((c = {}).__post_robot_10_0_46__ = a.buffer || [], c), {
2092
+ var c = dt(e, n, ((u = {}).__post_robot_10_0_46__ = a.buffer || [], u), {
2053
2093
  on: o,
2054
2094
  send: i
2055
- }), c;
2095
+ }), u;
2056
2096
  delete a.buffer;
2057
- for (var s = Object.keys(Ae), p = [], h = 0; h < s.length; h++) {
2097
+ for (var s = Object.keys(De), p = [], h = 0; h < s.length; h++) {
2058
2098
  var m = s[h];
2059
2099
  try {
2060
- Ae[m](e, u, n);
2100
+ De[m](e, c, n);
2061
2101
  } catch (w) {
2062
2102
  p.push(w);
2063
2103
  }
@@ -2075,25 +2115,25 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2075
2115
  });
2076
2116
  }).then(te);
2077
2117
  }
2078
- function dt(e) {
2118
+ function lt(e) {
2079
2119
  return z("responseListeners").get(e);
2080
2120
  }
2081
- function ft(e) {
2121
+ function ht(e) {
2082
2122
  z("responseListeners").del(e);
2083
2123
  }
2084
- function lt(e) {
2124
+ function mt(e) {
2085
2125
  return z("erroredResponseListeners").has(e);
2086
2126
  }
2087
- function ht(e) {
2088
- var n = e.name, t = e.win, r = e.domain, o = k("requestListeners");
2127
+ function pt(e) {
2128
+ var n = e.name, t = e.win, r = e.domain, o = U("requestListeners");
2089
2129
  if (t === "*" && (t = null), r === "*" && (r = null), !n)
2090
2130
  throw new Error("Name required to get request listener");
2091
2131
  for (var i = 0, a = [t, xe()]; i < a.length; i++) {
2092
- var u = a[i];
2093
- if (u) {
2094
- var c = o.get(u);
2095
- if (c) {
2096
- var s = c[n];
2132
+ var c = a[i];
2133
+ if (c) {
2134
+ var u = o.get(c);
2135
+ if (u) {
2136
+ var s = u[n];
2097
2137
  if (s) {
2098
2138
  if (r && typeof r == "string") {
2099
2139
  if (s[r])
@@ -2112,19 +2152,19 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2112
2152
  }
2113
2153
  }
2114
2154
  }
2115
- function Gt(e, n, t, r) {
2116
- var o = r.on, i = r.send, a = ht({
2155
+ function Bt(e, n, t, r) {
2156
+ var o = r.on, i = r.send, a = pt({
2117
2157
  name: t.name,
2118
2158
  win: e,
2119
2159
  domain: n
2120
- }), u = t.name === "postrobot_method" && t.data && typeof t.data.name == "string" ? t.data.name + "()" : t.name;
2121
- function c(s, p, h) {
2122
- return I.flush().then(function() {
2123
- if (!t.fireAndForget && !$(e))
2160
+ }), c = t.name === "postrobot_method" && t.data && typeof t.data.name == "string" ? t.data.name + "()" : t.name;
2161
+ function u(s, p, h) {
2162
+ return C.flush().then(function() {
2163
+ if (!t.fireAndForget && !G(e))
2124
2164
  try {
2125
2165
  return Ne(e, n, {
2126
2166
  id: Y(),
2127
- origin: L(window),
2167
+ origin: k(window),
2128
2168
  type: "postrobot_message_response",
2129
2169
  hash: t.hash,
2130
2170
  name: t.name,
@@ -2136,18 +2176,18 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2136
2176
  send: i
2137
2177
  });
2138
2178
  } catch (m) {
2139
- throw new Error("Send response message failed for " + u + " in " + L() + `
2179
+ throw new Error("Send response message failed for " + c + " in " + k() + `
2140
2180
 
2141
2181
  ` + de(m));
2142
2182
  }
2143
2183
  });
2144
2184
  }
2145
- return I.all([I.flush().then(function() {
2146
- if (!t.fireAndForget && !$(e))
2185
+ return C.all([C.flush().then(function() {
2186
+ if (!t.fireAndForget && !G(e))
2147
2187
  try {
2148
2188
  return Ne(e, n, {
2149
2189
  id: Y(),
2150
- origin: L(window),
2190
+ origin: k(window),
2151
2191
  type: "postrobot_message_ack",
2152
2192
  hash: t.hash,
2153
2193
  name: t.name
@@ -2156,11 +2196,11 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2156
2196
  send: i
2157
2197
  });
2158
2198
  } catch (s) {
2159
- throw new Error("Send ack message failed for " + u + " in " + L() + `
2199
+ throw new Error("Send ack message failed for " + c + " in " + k() + `
2160
2200
 
2161
2201
  ` + de(s));
2162
2202
  }
2163
- }), I.try(function() {
2203
+ }), C.try(function() {
2164
2204
  if (!a)
2165
2205
  throw new Error("No handler found for post message: " + t.name + " from " + n + " in " + window.location.protocol + "//" + window.location.host + window.location.pathname);
2166
2206
  return a.handler({
@@ -2169,18 +2209,18 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2169
2209
  data: t.data
2170
2210
  });
2171
2211
  }).then(function(s) {
2172
- return c("success", s);
2212
+ return u("success", s);
2173
2213
  }, function(s) {
2174
- return c("error", null, s);
2214
+ return u("error", null, s);
2175
2215
  })]).then(te).catch(function(s) {
2176
2216
  if (a && a.handleError)
2177
2217
  return a.handleError(s);
2178
2218
  throw s;
2179
2219
  });
2180
2220
  }
2181
- function Bt(e, n, t) {
2182
- if (!lt(t.hash)) {
2183
- var r = dt(t.hash);
2221
+ function Gt(e, n, t) {
2222
+ if (!mt(t.hash)) {
2223
+ var r = lt(t.hash);
2184
2224
  if (!r)
2185
2225
  throw new Error("No handler found for post message ack for message: " + t.name + " from " + n + " in " + window.location.protocol + "//" + window.location.host + window.location.pathname);
2186
2226
  try {
@@ -2195,8 +2235,8 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2195
2235
  }
2196
2236
  }
2197
2237
  function $t(e, n, t) {
2198
- if (!lt(t.hash)) {
2199
- var r = dt(t.hash);
2238
+ if (!mt(t.hash)) {
2239
+ var r = lt(t.hash);
2200
2240
  if (!r)
2201
2241
  throw new Error("No handler found for post message response for message: " + t.name + " from " + n + " in " + window.location.protocol + "//" + window.location.host + window.location.pathname);
2202
2242
  if (!re(r.domain, n))
@@ -2204,14 +2244,14 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2204
2244
  var o;
2205
2245
  if (e !== r.win)
2206
2246
  throw new Error("Response source does not match registered window");
2207
- ft(t.hash), t.ack === "error" ? r.promise.reject(t.error) : t.ack === "success" && r.promise.resolve({
2247
+ ht(t.hash), t.ack === "error" ? r.promise.reject(t.error) : t.ack === "success" && r.promise.resolve({
2208
2248
  source: e,
2209
2249
  origin: n,
2210
2250
  data: t.data
2211
2251
  });
2212
2252
  }
2213
2253
  }
2214
- function mt(e, n) {
2254
+ function vt(e, n) {
2215
2255
  var t = n.on, r = n.send, o = z("receivedMessages");
2216
2256
  try {
2217
2257
  if (!window || window.closed || !e.source)
@@ -2219,14 +2259,14 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2219
2259
  } catch (p) {
2220
2260
  return;
2221
2261
  }
2222
- var i = e.source, a = e.origin, u = function(p, h, m, w) {
2262
+ var i = e.source, a = e.origin, c = function(p, h, m, w) {
2223
2263
  var S = w.on, x = w.send, b;
2224
2264
  try {
2225
- b = ut(h, m, p, {
2265
+ b = ft(h, m, p, {
2226
2266
  on: S,
2227
2267
  send: x
2228
2268
  });
2229
- } catch (D) {
2269
+ } catch (N) {
2230
2270
  return;
2231
2271
  }
2232
2272
  if (b && typeof b == "object" && b !== null) {
@@ -2238,18 +2278,18 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2238
2278
  on: t,
2239
2279
  send: r
2240
2280
  });
2241
- if (u) {
2242
- rt(i);
2243
- for (var c = 0; c < u.length; c++) {
2244
- var s = u[c];
2245
- if (o.has(s.id) || (o.set(s.id, !0), $(i) && !s.fireAndForget))
2281
+ if (c) {
2282
+ it(i);
2283
+ for (var u = 0; u < c.length; u++) {
2284
+ var s = c[u];
2285
+ if (o.has(s.id) || (o.set(s.id, !0), G(i) && !s.fireAndForget))
2246
2286
  return;
2247
2287
  s.origin.indexOf("file:") === 0 && (a = "file://");
2248
2288
  try {
2249
- s.type === "postrobot_message_request" ? Gt(i, a, s, {
2289
+ s.type === "postrobot_message_request" ? Bt(i, a, s, {
2250
2290
  on: t,
2251
2291
  send: r
2252
- }) : s.type === "postrobot_message_response" ? $t(i, a, s) : s.type === "postrobot_message_ack" && Bt(i, a, s);
2292
+ }) : s.type === "postrobot_message_response" ? $t(i, a, s) : s.type === "postrobot_message_ack" && Gt(i, a, s);
2253
2293
  } catch (p) {
2254
2294
  setTimeout(function() {
2255
2295
  throw p;
@@ -2258,19 +2298,19 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2258
2298
  }
2259
2299
  }
2260
2300
  }
2261
- function X(e, n, t) {
2301
+ function V(e, n, t) {
2262
2302
  if (!e)
2263
2303
  throw new Error("Expected name");
2264
2304
  if (typeof (n = n || {}) == "function" && (t = n, n = {}), !t)
2265
2305
  throw new Error("Expected handler");
2266
2306
  var r = function o(i, a) {
2267
- var u = i.name, c = i.win, s = i.domain, p = k("requestListeners");
2268
- if (!u || typeof u != "string")
2307
+ var c = i.name, u = i.win, s = i.domain, p = U("requestListeners");
2308
+ if (!c || typeof c != "string")
2269
2309
  throw new Error("Name required to add request listener");
2270
- if (c && c !== "*" && G.isProxyWindow(c)) {
2271
- var h = c.awaitWindow().then(function(A) {
2310
+ if (u && u !== "*" && q.isProxyWindow(u)) {
2311
+ var h = u.awaitWindow().then(function(A) {
2272
2312
  return o({
2273
- name: u,
2313
+ name: c,
2274
2314
  win: A,
2275
2315
  domain: s
2276
2316
  }, a);
@@ -2283,11 +2323,11 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2283
2323
  }
2284
2324
  };
2285
2325
  }
2286
- var m = c;
2326
+ var m = u;
2287
2327
  if (Array.isArray(m)) {
2288
2328
  for (var w = [], S = 0, x = m; S < x.length; S++)
2289
2329
  w.push(o({
2290
- name: u,
2330
+ name: c,
2291
2331
  domain: s,
2292
2332
  win: x[S]
2293
2333
  }, a));
@@ -2299,11 +2339,11 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2299
2339
  };
2300
2340
  }
2301
2341
  if (Array.isArray(s)) {
2302
- for (var b = [], P = 0, D = s; P < D.length; P++)
2342
+ for (var b = [], P = 0, N = s; P < N.length; P++)
2303
2343
  b.push(o({
2304
- name: u,
2344
+ name: c,
2305
2345
  win: m,
2306
- domain: D[P]
2346
+ domain: N[P]
2307
2347
  }, a));
2308
2348
  return {
2309
2349
  cancel: function() {
@@ -2312,28 +2352,28 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2312
2352
  }
2313
2353
  };
2314
2354
  }
2315
- var O = ht({
2316
- name: u,
2355
+ var R = pt({
2356
+ name: c,
2317
2357
  win: m,
2318
2358
  domain: s
2319
2359
  });
2320
2360
  m && m !== "*" || (m = xe());
2321
2361
  var T = (s = s || "*").toString();
2322
- if (O)
2323
- throw m && s ? new Error("Request listener already exists for " + u + " on domain " + s.toString() + " for " + (m === xe() ? "wildcard" : "specified") + " window") : m ? new Error("Request listener already exists for " + u + " for " + (m === xe() ? "wildcard" : "specified") + " window") : s ? new Error("Request listener already exists for " + u + " on domain " + s.toString()) : new Error("Request listener already exists for " + u);
2362
+ if (R)
2363
+ throw m && s ? new Error("Request listener already exists for " + c + " on domain " + s.toString() + " for " + (m === xe() ? "wildcard" : "specified") + " window") : m ? new Error("Request listener already exists for " + c + " for " + (m === xe() ? "wildcard" : "specified") + " window") : s ? new Error("Request listener already exists for " + c + " on domain " + s.toString()) : new Error("Request listener already exists for " + c);
2324
2364
  var j = p.getOrSet(m, function() {
2325
2365
  return {};
2326
- }), W = fe(j, u, function() {
2366
+ }), W = fe(j, c, function() {
2327
2367
  return {};
2328
- }), R, _;
2329
- return Ie(s) ? (R = fe(W, "__domain_regex__", function() {
2368
+ }), O, $;
2369
+ return Pe(s) ? (O = fe(W, "__domain_regex__", function() {
2330
2370
  return [];
2331
- })).push(_ = {
2371
+ })).push($ = {
2332
2372
  regex: s,
2333
2373
  listener: a
2334
2374
  }) : W[T] = a, {
2335
2375
  cancel: function() {
2336
- delete W[T], _ && (R.splice(R.indexOf(_, 1)), R.length || delete W.__domain_regex__), Object.keys(W).length || delete j[u], m && !Object.keys(j).length && p.del(m);
2376
+ delete W[T], $ && (O.splice(O.indexOf($, 1)), O.length || delete W.__domain_regex__), Object.keys(W).length || delete j[c], m && !Object.keys(j).length && p.del(m);
2337
2377
  }
2338
2378
  };
2339
2379
  }({
@@ -2354,29 +2394,29 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2354
2394
  }
2355
2395
  function _t(e, n, t) {
2356
2396
  typeof (n = n || {}) == "function" && (t = n, n = {});
2357
- var r = new I(), o;
2397
+ var r = new C(), o;
2358
2398
  return n.errorHandler = function(i) {
2359
2399
  o.cancel(), r.reject(i);
2360
- }, o = X(e, n, function(i) {
2400
+ }, o = V(e, n, function(i) {
2361
2401
  if (o.cancel(), r.resolve(i), t)
2362
2402
  return t(i);
2363
2403
  }), r.cancel = o.cancel, r;
2364
2404
  }
2365
- var K = function e(n, t, r, o) {
2366
- var i = (o = o || {}).domain || "*", a = o.timeout || -1, u = o.timeout || 5e3, c = o.fireAndForget || !1;
2367
- return G.toProxyWindow(n, {
2405
+ var X = function e(n, t, r, o) {
2406
+ var i = (o = o || {}).domain || "*", a = o.timeout || -1, c = o.timeout || 5e3, u = o.fireAndForget || !1;
2407
+ return q.toProxyWindow(n, {
2368
2408
  send: e
2369
2409
  }).awaitWindow().then(function(s) {
2370
- return I.try(function() {
2410
+ return C.try(function() {
2371
2411
  if (function(p, h, m) {
2372
2412
  if (!p)
2373
2413
  throw new Error("Expected name");
2374
- if (m && typeof m != "string" && !Array.isArray(m) && !Ie(m))
2414
+ if (m && typeof m != "string" && !Array.isArray(m) && !Pe(m))
2375
2415
  throw new TypeError("Can not send " + p + ". Expected domain " + JSON.stringify(m) + " to be a string, array, or regex");
2376
- if ($(h))
2416
+ if (G(h))
2377
2417
  throw new Error("Can not send " + p + ". Target window is closed");
2378
2418
  }(t, s, i), function(p, h) {
2379
- var m = Ue(h);
2419
+ var m = Be(h);
2380
2420
  if (m)
2381
2421
  return m === p;
2382
2422
  if (h === p || function(x) {
@@ -2384,41 +2424,41 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2384
2424
  try {
2385
2425
  if (x.top)
2386
2426
  return x.top;
2387
- } catch (O) {
2427
+ } catch (R) {
2388
2428
  }
2389
2429
  if (B(x) === x)
2390
2430
  return x;
2391
2431
  try {
2392
- if (He(window, x) && window.top)
2432
+ if (Fe(window, x) && window.top)
2393
2433
  return window.top;
2394
- } catch (O) {
2434
+ } catch (R) {
2395
2435
  }
2396
2436
  try {
2397
- if (He(x, window) && window.top)
2437
+ if (Fe(x, window) && window.top)
2398
2438
  return window.top;
2399
- } catch (O) {
2439
+ } catch (R) {
2400
2440
  }
2401
- for (var b = 0, P = function O(T) {
2402
- for (var j = [], W = 0, R = Fe(T); W < R.length; W++) {
2403
- var _ = R[W];
2404
- j.push(_);
2405
- for (var A = 0, he = O(_); A < he.length; A++)
2441
+ for (var b = 0, P = function R(T) {
2442
+ for (var j = [], W = 0, O = qe(T); W < O.length; W++) {
2443
+ var $ = O[W];
2444
+ j.push($);
2445
+ for (var A = 0, he = R($); A < he.length; A++)
2406
2446
  j.push(he[A]);
2407
2447
  }
2408
2448
  return j;
2409
2449
  }(x); b < P.length; b++) {
2410
- var D = P[b];
2450
+ var N = P[b];
2411
2451
  try {
2412
- if (D.top)
2413
- return D.top;
2414
- } catch (O) {
2452
+ if (N.top)
2453
+ return N.top;
2454
+ } catch (R) {
2415
2455
  }
2416
- if (B(D) === D)
2417
- return D;
2456
+ if (B(N) === N)
2457
+ return N;
2418
2458
  }
2419
2459
  }(h) === h)
2420
2460
  return !1;
2421
- for (var w = 0, S = Fe(p); w < S.length; w++)
2461
+ for (var w = 0, S = qe(p); w < S.length; w++)
2422
2462
  if (S[w] === h)
2423
2463
  return !0;
2424
2464
  return !1;
@@ -2426,25 +2466,25 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2426
2466
  return function(p, h, m) {
2427
2467
  h === void 0 && (h = 5e3), m === void 0 && (m = "Window");
2428
2468
  var w = function(S) {
2429
- return k("helloPromises").getOrSet(S, function() {
2430
- return new I();
2469
+ return U("helloPromises").getOrSet(S, function() {
2470
+ return new C();
2431
2471
  });
2432
2472
  }(p);
2433
2473
  return h !== -1 && (w = w.timeout(h, new Error(m + " did not load after " + h + "ms"))), w;
2434
- }(s, u);
2474
+ }(s, c);
2435
2475
  }).then(function(p) {
2436
2476
  return function(h, m, w, S) {
2437
2477
  var x = S.send;
2438
- return I.try(function() {
2439
- return typeof m == "string" ? m : I.try(function() {
2440
- return w || Pe(h, {
2478
+ return C.try(function() {
2479
+ return typeof m == "string" ? m : C.try(function() {
2480
+ return w || Te(h, {
2441
2481
  send: x
2442
2482
  }).then(function(b) {
2443
2483
  return b.domain;
2444
2484
  });
2445
2485
  }).then(function(b) {
2446
2486
  if (!re(m, m))
2447
- throw new Error("Domain " + Ze(m) + " does not match " + Ze(m));
2487
+ throw new Error("Domain " + Ve(m) + " does not match " + Ve(m));
2448
2488
  return b;
2449
2489
  });
2450
2490
  });
@@ -2452,42 +2492,42 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2452
2492
  send: e
2453
2493
  });
2454
2494
  }).then(function(p) {
2455
- var h = p, m = t === "postrobot_method" && r && typeof r.name == "string" ? r.name + "()" : t, w = new I(), S = t + "_" + Y();
2456
- if (!c) {
2495
+ var h = p, m = t === "postrobot_method" && r && typeof r.name == "string" ? r.name + "()" : t, w = new C(), S = t + "_" + Y();
2496
+ if (!u) {
2457
2497
  var x = {
2458
2498
  name: t,
2459
2499
  win: s,
2460
2500
  domain: h,
2461
2501
  promise: w
2462
2502
  };
2463
- (function(W, R) {
2464
- z("responseListeners").set(W, R);
2503
+ (function(W, O) {
2504
+ z("responseListeners").set(W, O);
2465
2505
  })(S, x);
2466
- var b = k("requestPromises").getOrSet(s, function() {
2506
+ var b = U("requestPromises").getOrSet(s, function() {
2467
2507
  return [];
2468
2508
  });
2469
2509
  b.push(w), w.catch(function() {
2470
2510
  (function(W) {
2471
2511
  z("erroredResponseListeners").set(W, !0);
2472
- })(S), ft(S);
2512
+ })(S), ht(S);
2473
2513
  });
2474
2514
  var P = function(W) {
2475
- return k("knownWindows").get(W, !1);
2476
- }(s) ? 1e4 : 2e3, D = a, O = P, T = D, j = function(W, R) {
2477
- var _;
2515
+ return U("knownWindows").get(W, !1);
2516
+ }(s) ? 1e4 : 2e3, N = a, R = P, T = N, j = function(W, O) {
2517
+ var $;
2478
2518
  return function A() {
2479
- _ = setTimeout(function() {
2519
+ $ = setTimeout(function() {
2480
2520
  (function() {
2481
- if ($(s))
2521
+ if (G(s))
2482
2522
  return w.reject(new Error("Window closed for " + t + " before " + (x.ack ? "response" : "ack")));
2483
2523
  if (x.cancelled)
2484
2524
  return w.reject(new Error("Response listener was cancelled for " + t));
2485
- O = Math.max(O - 500, 0), T !== -1 && (T = Math.max(T - 500, 0)), x.ack || O !== 0 ? T === 0 && w.reject(new Error("No response for postMessage " + m + " in " + L() + " in " + D + "ms")) : w.reject(new Error("No ack for postMessage " + m + " in " + L() + " in " + P + "ms"));
2525
+ R = Math.max(R - 500, 0), T !== -1 && (T = Math.max(T - 500, 0)), x.ack || R !== 0 ? T === 0 && w.reject(new Error("No response for postMessage " + m + " in " + k() + " in " + N + "ms")) : w.reject(new Error("No ack for postMessage " + m + " in " + k() + " in " + P + "ms"));
2486
2526
  })(), A();
2487
2527
  }, 500);
2488
2528
  }(), {
2489
2529
  cancel: function() {
2490
- clearTimeout(_);
2530
+ clearTimeout($);
2491
2531
  }
2492
2532
  };
2493
2533
  }();
@@ -2497,75 +2537,75 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2497
2537
  }
2498
2538
  return Ne(s, h, {
2499
2539
  id: Y(),
2500
- origin: L(window),
2540
+ origin: k(window),
2501
2541
  type: "postrobot_message_request",
2502
2542
  hash: S,
2503
2543
  name: t,
2504
2544
  data: r,
2505
- fireAndForget: c
2545
+ fireAndForget: u
2506
2546
  }, {
2507
- on: X,
2547
+ on: V,
2508
2548
  send: e
2509
2549
  }).then(function() {
2510
- return c ? w.resolve() : w;
2550
+ return u ? w.resolve() : w;
2511
2551
  }, function(W) {
2512
- throw new Error("Send request message failed for " + m + " in " + L() + `
2552
+ throw new Error("Send request message failed for " + m + " in " + k() + `
2513
2553
 
2514
2554
  ` + de(W));
2515
2555
  });
2516
2556
  });
2517
2557
  });
2518
2558
  };
2519
- function qt(e, n, t) {
2520
- return ct(e, n, t, {
2521
- on: X,
2522
- send: K
2559
+ function Jt(e, n, t) {
2560
+ return dt(e, n, t, {
2561
+ on: V,
2562
+ send: X
2523
2563
  });
2524
2564
  }
2525
- function Jt(e, n, t) {
2526
- return ut(e, n, t, {
2527
- on: X,
2528
- send: K
2565
+ function Yt(e, n, t) {
2566
+ return ft(e, n, t, {
2567
+ on: V,
2568
+ send: X
2529
2569
  });
2530
2570
  }
2531
- function Yt(e) {
2532
- return new G({
2533
- send: K,
2571
+ function Zt(e) {
2572
+ return new q({
2573
+ send: X,
2534
2574
  win: e
2535
2575
  });
2536
2576
  }
2537
- function Zt(e) {
2538
- return G.toProxyWindow(e, {
2539
- send: K
2577
+ function Kt(e) {
2578
+ return q.toProxyWindow(e, {
2579
+ send: X
2540
2580
  });
2541
2581
  }
2542
- function pt() {
2582
+ function wt() {
2543
2583
  le().initialized || (le().initialized = !0, n = (e = {
2544
- on: X,
2545
- send: K
2584
+ on: V,
2585
+ send: X
2546
2586
  }).on, t = e.send, (r = le()).receiveMessage = r.receiveMessage || function(o) {
2547
- return mt(o, {
2587
+ return vt(o, {
2548
2588
  on: n,
2549
2589
  send: t
2550
2590
  });
2551
2591
  }, function(o) {
2552
2592
  var i = o.on, a = o.send;
2553
2593
  z().getOrSet("postMessageListener", function() {
2554
- return function(u, c, s) {
2555
- return u.addEventListener("message", s), {
2594
+ return function(c, u, s) {
2595
+ return c.addEventListener("message", s), {
2556
2596
  cancel: function() {
2557
- u.removeEventListener("message", s);
2597
+ c.removeEventListener("message", s);
2558
2598
  }
2559
2599
  };
2560
- }(window, 0, function(u) {
2561
- (function(c, s) {
2600
+ }(window, 0, function(c) {
2601
+ (function(u, s) {
2562
2602
  var p = s.on, h = s.send;
2563
- I.try(function() {
2564
- var m = c.source || c.sourceElement, w = c.origin || c.originalEvent && c.originalEvent.origin, S = c.data;
2603
+ C.try(function() {
2604
+ var m = u.source || u.sourceElement, w = u.origin || u.originalEvent && u.originalEvent.origin, S = u.data;
2565
2605
  if (w === "null" && (w = "file://"), m) {
2566
2606
  if (!w)
2567
2607
  throw new Error("Post message did not have origin domain");
2568
- mt({
2608
+ vt({
2569
2609
  source: m,
2570
2610
  origin: w,
2571
2611
  data: S
@@ -2575,35 +2615,35 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2575
2615
  });
2576
2616
  }
2577
2617
  });
2578
- })(u, {
2618
+ })(c, {
2579
2619
  on: i,
2580
2620
  send: a
2581
2621
  });
2582
2622
  });
2583
2623
  });
2584
2624
  }({
2585
- on: X,
2586
- send: K
2625
+ on: V,
2626
+ send: X
2587
2627
  }), function(o) {
2588
2628
  var i = o.on, a = o.send;
2589
2629
  z("builtinListeners").getOrSet("helloListener", function() {
2590
- var u = i("postrobot_hello", {
2630
+ var c = i("postrobot_hello", {
2591
2631
  domain: "*"
2592
2632
  }, function(s) {
2593
- return tt(s.source, {
2633
+ return rt(s.source, {
2594
2634
  domain: s.origin
2595
2635
  }), {
2596
- instanceID: et()
2636
+ instanceID: nt()
2597
2637
  };
2598
- }), c = Ue();
2599
- return c && Pe(c, {
2638
+ }), u = Be();
2639
+ return u && Te(u, {
2600
2640
  send: a
2601
2641
  }).catch(function(s) {
2602
- }), u;
2642
+ }), c;
2603
2643
  });
2604
2644
  }({
2605
- on: X,
2606
- send: K
2645
+ on: V,
2646
+ send: X
2607
2647
  }));
2608
2648
  var e, n, t, r;
2609
2649
  }
@@ -2618,27 +2658,28 @@ var Pt = { exports: {} }, Tt = { exports: {} };
2618
2658
  delete window.__post_robot_10_0_46__;
2619
2659
  }
2620
2660
  var Xt = !0;
2621
- function Kt(e) {
2622
- for (var n = 0, t = k("requestPromises").get(e, []); n < t.length; n++)
2623
- t[n].reject(new Error("Window " + ($(e) ? "closed" : "cleaned up") + " before response")).catch(te);
2661
+ function Qt(e) {
2662
+ for (var n = 0, t = U("requestPromises").get(e, []); n < t.length; n++)
2663
+ t[n].reject(new Error("Window " + (G(e) ? "closed" : "cleaned up") + " before response")).catch(te);
2624
2664
  }
2625
- pt();
2665
+ wt();
2626
2666
  }]);
2627
2667
  });
2628
- })(Tt);
2629
- var Mn = Tt.exports;
2668
+ })(Rt);
2669
+ var Un = Rt.exports;
2630
2670
  (function(f) {
2631
- f.exports = Mn, f.exports.default = f.exports;
2632
- })(Pt);
2633
- var Ot = Pt.exports;
2634
- const Ln = /* @__PURE__ */ jn(Ot), ke = /* @__PURE__ */ rn({
2671
+ f.exports = Un, f.exports.default = f.exports;
2672
+ })(Tt);
2673
+ var Ot = Tt.exports;
2674
+ const Hn = /* @__PURE__ */ kn(Ot), He = /* @__PURE__ */ an({
2635
2675
  __proto__: null,
2636
- default: Ln
2676
+ default: Hn
2637
2677
  }, [Ot]);
2638
2678
  export {
2639
- Hn as ConsentBox,
2640
- Fn as SoyioTypes,
2641
- Un as SoyioWidget,
2642
- Sn as _TooltipManager,
2643
- Un as default
2679
+ Ct as ConsentBox,
2680
+ qn as PrivacyCenterBox,
2681
+ Bn as SoyioTypes,
2682
+ Gn as SoyioWidget,
2683
+ sn as _TooltipManager,
2684
+ Gn as default
2644
2685
  };