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