@iframe-resizer/core 6.0.0-beta.1 → 6.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/index.cjs.js +14 -14
- package/index.cjs.js.map +1 -1
- package/index.esm.js +367 -362
- package/index.esm.js.map +1 -1
- package/index.umd.js +14 -14
- package/index.umd.js.map +1 -1
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
const _ = "6.0.0-beta.
|
|
3
|
-
`, wt = "hidden",
|
|
1
|
+
import nt, { NORMAL as ot, HIGHLIGHT as l, FOREGROUND as z } from "auto-console-group";
|
|
2
|
+
const _ = "6.0.0-beta.2", de = "iframeResizer", L = ":", it = "[iFrameResizerChild]Ready", ge = "autoResize", st = "beforeUnload", rt = "close", at = "inPageLink", j = "init", ye = "iframeReady", ct = "lazy", G = "load", A = "message", lt = "mouseenter", ut = "mouseleave", me = "onload", be = "pageInfo", ve = "parentInfo", ft = "pageInfoStop", pt = "parentInfoStop", U = "reset", Y = "resize", ht = "scrollBy", dt = "scrollTo", gt = "scrollToOffset", yt = "title", ee = 1, mt = "height", bt = "width", vt = "offset", zt = "offsetSize", te = "scroll", N = `
|
|
3
|
+
`, wt = "hidden", Et = "child", V = "parent", X = "string", Ot = "number", ze = "object", we = "function", q = "auto", Tt = "font-weight: bold;", Ee = "none", Oe = "both", D = "vertical", Te = "horizontal", kt = "omit", It = A.length, F = "[iFrameSizer]", Z = F.length, $t = Object.freeze({
|
|
4
4
|
max: 1,
|
|
5
5
|
scroll: 1,
|
|
6
6
|
bodyScroll: 1,
|
|
@@ -8,36 +8,36 @@ const _ = "6.0.0-beta.1", pe = "iframeResizer", L = ":", ot = "[iFrameResizerChi
|
|
|
8
8
|
}), ne = Object.freeze({
|
|
9
9
|
[me]: 1,
|
|
10
10
|
[j]: 1,
|
|
11
|
-
[
|
|
12
|
-
}), M = "expanded", S = "collapsed",
|
|
11
|
+
[ye]: 1
|
|
12
|
+
}), M = "expanded", S = "collapsed", ke = 0, Ie = 1, $e = 2, Mt = Object.freeze({
|
|
13
13
|
[M]: 1,
|
|
14
14
|
[S]: 1
|
|
15
|
-
}),
|
|
16
|
-
function
|
|
17
|
-
if (!
|
|
15
|
+
}), Me = "Use of the old name will be removed in a future version of <i>iframe-resizer</>.", Se = (e) => typeof e === ze && e !== null, K = (e) => typeof e === X;
|
|
16
|
+
function St(e) {
|
|
17
|
+
if (!Se(e)) return !1;
|
|
18
18
|
try {
|
|
19
19
|
return e.tagName === "IFRAME" || e instanceof HTMLIFrameElement;
|
|
20
20
|
} catch {
|
|
21
21
|
return !1;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const jt = (e, ...t) => setTimeout(() => e(...t), 0), Rt = (e) => {
|
|
25
25
|
let t = !1;
|
|
26
26
|
return function(...n) {
|
|
27
27
|
return t ? void 0 : (t = !0, e.apply(this, n));
|
|
28
28
|
};
|
|
29
|
-
},
|
|
29
|
+
}, Lt = (e, t) => Object.prototype.hasOwnProperty.call(e, t), P = (e, t) => Object.hasOwn ? Object.hasOwn(e, t) : Lt(e, t), At = (e) => e, Pt = (e) => e.charAt(0).toUpperCase() + e.slice(1), Ct = (e) => (
|
|
30
30
|
// eslint-disable-next-line no-underscore-dangle
|
|
31
31
|
e?.__esModule ? e.default : e
|
|
32
32
|
), Nt = (e, t, n) => {
|
|
33
33
|
if (typeof e !== t)
|
|
34
|
-
throw new TypeError(`${n} is not a ${
|
|
35
|
-
},
|
|
34
|
+
throw new TypeError(`${n} is not a ${Pt(t)}`);
|
|
35
|
+
}, xt = (e) => (t, n = "renamed to") => (o, s, a = "", r = "") => e(
|
|
36
36
|
r,
|
|
37
37
|
`<rb>Deprecated ${t}(${o.replace("()", "")})</>
|
|
38
38
|
|
|
39
|
-
The <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${s}</>. ${
|
|
40
|
-
),
|
|
39
|
+
The <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${s}</>. ${a}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`
|
|
40
|
+
), je = {
|
|
41
41
|
br: `
|
|
42
42
|
`,
|
|
43
43
|
rb: "\x1B[31;1m",
|
|
@@ -52,44 +52,44 @@ The <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${s}</>. ${c}Use of the old $
|
|
|
52
52
|
// underline
|
|
53
53
|
"/": "\x1B[m"
|
|
54
54
|
// reset
|
|
55
|
-
},
|
|
56
|
-
K(t) ? window.chrome ?
|
|
57
|
-
), i = {},
|
|
55
|
+
}, _t = Object.keys(je), Ft = new RegExp(`<(${_t.join("|")})>`, "gi"), Bt = (e, t) => je[t] ?? "", Wt = (e) => e.replace(Ft, Bt), Dt = (e) => e.replaceAll("<br>", N).replaceAll(/<\/?[^>]+>/gi, ""), Re = (e) => (t) => e(
|
|
56
|
+
K(t) ? window.chrome ? Wt(t) : Dt(t) : t
|
|
57
|
+
), i = {}, Le = Ct(nt);
|
|
58
58
|
let Q = !0;
|
|
59
|
-
const
|
|
59
|
+
const Ht = Le({
|
|
60
60
|
expand: !1,
|
|
61
61
|
label: V
|
|
62
|
-
}),
|
|
63
|
-
function
|
|
62
|
+
}), Gt = (e) => window.top === window.self ? `parent(${e})` : `nested parent(${e})`, Ut = (e) => i[e] ? i[e].log : Q;
|
|
63
|
+
function Vt({
|
|
64
64
|
enabled: e,
|
|
65
65
|
expand: t,
|
|
66
66
|
iframeId: n
|
|
67
67
|
}) {
|
|
68
|
-
const o =
|
|
68
|
+
const o = Le({
|
|
69
69
|
expand: t,
|
|
70
|
-
label:
|
|
70
|
+
label: Gt(n)
|
|
71
71
|
});
|
|
72
72
|
Q = e, i[n] || (i[n] = {
|
|
73
73
|
console: o
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
const
|
|
77
|
-
function
|
|
76
|
+
const I = (e) => (t, ...n) => i[t] ? i[t].console[e](...n) : Ht[e](...n), Ae = (e) => (t, ...n) => Ut(t) === !0 ? I(e)(t, ...n) : null, u = Ae("log"), m = u, qt = Ae("debug"), w = I("warn"), Zt = I("error"), b = I("event"), Jt = I("purge"), Yt = I("endAutoGroup"), Pe = I("errorBoundary");
|
|
77
|
+
function Xt(e, t) {
|
|
78
78
|
queueMicrotask(
|
|
79
79
|
() => (
|
|
80
80
|
// eslint-disable-next-line no-console
|
|
81
81
|
console.info(
|
|
82
82
|
`%ciframe-resizer ${e}`,
|
|
83
|
-
Q || t < 1 ?
|
|
83
|
+
Q || t < 1 ? Tt : ot
|
|
84
84
|
)
|
|
85
85
|
)
|
|
86
86
|
);
|
|
87
87
|
}
|
|
88
|
-
const
|
|
89
|
-
const n =
|
|
88
|
+
const Kt = (e) => (...t) => [`${de}(${e})`, ...t].join(" "), Qt = Re(At), y = (e, ...t) => i[e] ? i[e].console.warn(...t.map(Qt)) : queueMicrotask(() => {
|
|
89
|
+
const n = Re(Kt(e));
|
|
90
90
|
console?.warn(...t.map(n));
|
|
91
|
-
}),
|
|
92
|
-
typeof i[e.id].onInit === we && (
|
|
91
|
+
}), en = xt(y), tn = en("Option"), nn = (e) => {
|
|
92
|
+
typeof i[e.id].onInit === we && (tn("init()", "onReady()", "", e.id), i[e.id].onInit(e));
|
|
93
93
|
}, B = Object.freeze({
|
|
94
94
|
autoResize: !0,
|
|
95
95
|
bodyBackground: null,
|
|
@@ -127,32 +127,32 @@ const Xt = (e) => (...t) => [`${pe}(${e})`, ...t].join(" "), Kt = je(Lt), m = (e
|
|
|
127
127
|
},
|
|
128
128
|
onMouseLeave() {
|
|
129
129
|
},
|
|
130
|
-
onReady:
|
|
130
|
+
onReady: nn,
|
|
131
131
|
onResized() {
|
|
132
132
|
},
|
|
133
133
|
onScroll: () => !0
|
|
134
134
|
});
|
|
135
135
|
let oe = 0;
|
|
136
|
-
function
|
|
136
|
+
function on(e) {
|
|
137
137
|
const t = e?.id || B.id + oe++;
|
|
138
138
|
return document.getElementById(t) === null ? t : `${t}${oe++}`;
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function sn(e, t) {
|
|
141
141
|
let { id: n } = e;
|
|
142
142
|
if (n && !K(n))
|
|
143
143
|
throw new TypeError("Invalid id for iFrame. Expected String");
|
|
144
|
-
return (!n || n === "") && (n =
|
|
144
|
+
return (!n || n === "") && (n = on(t), e.id = n, b(n, "assignId"), u(n, `Added missing iframe ID: ${n} (${e.src})`)), n;
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function rn(e) {
|
|
147
147
|
const { search: t } = window.location;
|
|
148
148
|
if (t.includes("ifrlog"))
|
|
149
149
|
switch (new URLSearchParams(t).get("ifrlog")) {
|
|
150
|
-
case String(
|
|
150
|
+
case String(ke): {
|
|
151
151
|
e.log = !1;
|
|
152
152
|
break;
|
|
153
153
|
}
|
|
154
154
|
case M:
|
|
155
|
-
case String(
|
|
155
|
+
case String($e): {
|
|
156
156
|
e.log = M;
|
|
157
157
|
break;
|
|
158
158
|
}
|
|
@@ -165,98 +165,98 @@ function sn(e) {
|
|
|
165
165
|
e.log = S;
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
const
|
|
168
|
+
const C = (e, t, n, o) => e.addEventListener(t, n, o || !1), ie = (e, t, n) => e.removeEventListener(t, n, !1), an = (e) => e.split(L).filter((t, n) => n !== 19).join(L);
|
|
169
169
|
function cn(e, t, n) {
|
|
170
170
|
function o(f) {
|
|
171
|
-
const
|
|
172
|
-
|
|
171
|
+
const p = e in ne ? an(t) : t;
|
|
172
|
+
m(n, f, l, z, l), m(n, `Message data: %c${p}`, l);
|
|
173
173
|
}
|
|
174
|
-
const { iframe: s, postMessageTarget:
|
|
174
|
+
const { iframe: s, postMessageTarget: a, sameOrigin: r, targetOrigin: c } = i[n];
|
|
175
175
|
if (r)
|
|
176
176
|
try {
|
|
177
177
|
s.contentWindow.iframeChildListener(F + t), o(`Sending message to iframe %c${n}%c via same origin%c`);
|
|
178
178
|
return;
|
|
179
179
|
} catch {
|
|
180
|
-
e in ne ? (i[n].sameOrigin = !1, u(n, "New iframe does not support same origin")) :
|
|
180
|
+
e in ne ? (i[n].sameOrigin = !1, u(n, "New iframe does not support same origin")) : w(n, "Same origin messaging failed, falling back to postMessage");
|
|
181
181
|
}
|
|
182
182
|
o(
|
|
183
|
-
`Sending message to iframe: %c${n}%c targetOrigin: %c${
|
|
183
|
+
`Sending message to iframe: %c${n}%c targetOrigin: %c${c.join(", ")}`
|
|
184
184
|
);
|
|
185
|
-
for (const f of
|
|
186
|
-
|
|
185
|
+
for (const f of c)
|
|
186
|
+
a.postMessage(F + t, f);
|
|
187
187
|
}
|
|
188
188
|
function T(e, t, n) {
|
|
189
189
|
if (b(n, e), !i[n]?.postMessageTarget) {
|
|
190
|
-
|
|
190
|
+
w(n, "Iframe not found");
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
193
|
cn(e, t, n);
|
|
194
194
|
}
|
|
195
|
-
const
|
|
196
|
-
function
|
|
197
|
-
document.hidden !== !0 &&
|
|
195
|
+
const ln = (e, t) => Object.values(i).filter(({ autoResize: n, firstRun: o }) => n && !o).forEach(({ iframe: n }) => T(e, t, n.id));
|
|
196
|
+
function un() {
|
|
197
|
+
document.hidden !== !0 && ln("tabVisible", Y);
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function fn(e) {
|
|
200
200
|
if (e.boxSizing !== "border-box") return 0;
|
|
201
201
|
const t = e.paddingTop ? parseInt(e.paddingTop, 10) : 0, n = e.paddingBottom ? parseInt(e.paddingBottom, 10) : 0;
|
|
202
202
|
return t + n;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function pn(e) {
|
|
205
205
|
if (e.boxSizing !== "border-box") return 0;
|
|
206
206
|
const t = e.borderTopWidth ? parseInt(e.borderTopWidth, 10) : 0, n = e.borderBottomWidth ? parseInt(e.borderBottomWidth, 10) : 0;
|
|
207
207
|
return t + n;
|
|
208
208
|
}
|
|
209
209
|
function hn(e) {
|
|
210
|
-
const t = e.slice(Z).split(":"), n = t[1] ? Number(t[1]) : 0, o = i[t[0]]?.iframe, s = getComputedStyle(o),
|
|
210
|
+
const t = e.slice(Z).split(":"), n = t[1] ? Number(t[1]) : 0, o = i[t[0]]?.iframe, s = o ? getComputedStyle(o) : null, a = s ? fn(s) + pn(s) : 0, r = {
|
|
211
211
|
iframe: o,
|
|
212
212
|
id: t[0],
|
|
213
|
-
height: n +
|
|
213
|
+
height: n + a,
|
|
214
214
|
width: Number(t[2]),
|
|
215
215
|
type: t[3],
|
|
216
216
|
msg: t[4],
|
|
217
217
|
message: t[4]
|
|
218
218
|
};
|
|
219
|
-
return t[5] && (
|
|
219
|
+
return t[5] && (r.mode = t[5]), r;
|
|
220
220
|
}
|
|
221
|
-
const
|
|
221
|
+
const dn = { true: 1, false: 1, undefined: 1 };
|
|
222
222
|
function gn(e) {
|
|
223
|
-
const { id: t, msg: n, iframe: o } = e, s =
|
|
224
|
-
return s || (u(t, `Received: %c${n}`, l),
|
|
223
|
+
const { id: t, msg: n, iframe: o } = e, s = St(o);
|
|
224
|
+
return s || (u(t, `Received: %c${n}`, l), w(t, "The target iframe was not found.")), s;
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function yn(e, t) {
|
|
227
227
|
const { id: n } = e, { data: o, origin: s } = t;
|
|
228
228
|
if ("sameOrigin" in t && t.sameOrigin) return !0;
|
|
229
229
|
const r = i[n]?.checkOrigin;
|
|
230
|
-
function
|
|
230
|
+
function c() {
|
|
231
231
|
function f() {
|
|
232
232
|
u(
|
|
233
233
|
n,
|
|
234
234
|
`Checking connection is from allowed list of origins: %c${r}`,
|
|
235
235
|
l
|
|
236
236
|
);
|
|
237
|
-
for (const
|
|
238
|
-
if (
|
|
237
|
+
for (const h of r)
|
|
238
|
+
if (h === s)
|
|
239
239
|
return !0;
|
|
240
240
|
return !1;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
243
|
-
const
|
|
244
|
-
return u(n, `Checking connection is from: %c${
|
|
242
|
+
function p() {
|
|
243
|
+
const h = i[n]?.remoteHost;
|
|
244
|
+
return u(n, `Checking connection is from: %c${h}`, l), s === h;
|
|
245
245
|
}
|
|
246
|
-
return r.constructor === Array ? f() :
|
|
246
|
+
return r.constructor === Array ? f() : p();
|
|
247
247
|
}
|
|
248
|
-
if (r && `${s}` != "null" && !
|
|
248
|
+
if (r && `${s}` != "null" && !c())
|
|
249
249
|
throw new Error(
|
|
250
250
|
`Unexpected message received from: ${s} for ${n}. Message was: ${o}. This error can be disabled by setting the checkOrigin: false option or by providing an array of trusted domains.`
|
|
251
251
|
);
|
|
252
252
|
return !0;
|
|
253
253
|
}
|
|
254
254
|
const mn = (e) => F === `${e}`.slice(0, Z) && e.slice(Z).split(":")[0] in i;
|
|
255
|
-
function
|
|
256
|
-
const { id: t, type: n } = e, o = n in
|
|
255
|
+
function bn(e) {
|
|
256
|
+
const { id: t, type: n } = e, o = n in dn;
|
|
257
257
|
return o && u(t, "Ignoring init message from meta parent page"), o;
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function vn(e) {
|
|
260
260
|
try {
|
|
261
261
|
i[e].sameOrigin = !!i[e]?.iframe?.contentWindow?.iframeChildListener;
|
|
262
262
|
} catch {
|
|
@@ -264,10 +264,10 @@ function bn(e) {
|
|
|
264
264
|
}
|
|
265
265
|
u(e, `sameOrigin: %c${i[e].sameOrigin}`, l);
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function zn(e, t) {
|
|
268
268
|
if (t !== _) {
|
|
269
269
|
if (t === void 0) {
|
|
270
|
-
|
|
270
|
+
y(
|
|
271
271
|
e,
|
|
272
272
|
`<rb>Legacy version detected in iframe</>
|
|
273
273
|
|
|
@@ -282,22 +282,22 @@ See <u>https://iframe-resizer.com/setup/#child-page-setup</> for more details.
|
|
|
282
282
|
e,
|
|
283
283
|
`Version mismatch (Child: %c${t}%c !== Parent: %c${_})`,
|
|
284
284
|
l,
|
|
285
|
-
|
|
285
|
+
z,
|
|
286
286
|
l
|
|
287
287
|
);
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function k(e, t, n) {
|
|
291
291
|
if (!i[e]) return null;
|
|
292
292
|
const o = i[e][t];
|
|
293
293
|
if (typeof o !== we)
|
|
294
294
|
throw new TypeError(`${t} on iframe[${e}] is not a function`);
|
|
295
295
|
if (t !== "onBeforeClose" && t !== "onScroll")
|
|
296
|
-
return
|
|
296
|
+
return jt(o, n);
|
|
297
297
|
try {
|
|
298
298
|
return o(n);
|
|
299
299
|
} catch (s) {
|
|
300
|
-
return console.error(s),
|
|
300
|
+
return console.error(s), w(e, `Error in ${t} callback`), null;
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
function wn(e, t) {
|
|
@@ -306,10 +306,10 @@ function wn(e, t) {
|
|
|
306
306
|
n,
|
|
307
307
|
`onMessage passed: {iframe: %c${n}%c, message: %c${t}%c}`,
|
|
308
308
|
l,
|
|
309
|
-
|
|
309
|
+
z,
|
|
310
310
|
l,
|
|
311
|
-
|
|
312
|
-
),
|
|
311
|
+
z
|
|
312
|
+
), k(n, "onMessage", {
|
|
313
313
|
iframe: o,
|
|
314
314
|
message: JSON.parse(t)
|
|
315
315
|
});
|
|
@@ -321,77 +321,77 @@ function x(e, t) {
|
|
|
321
321
|
);
|
|
322
322
|
}
|
|
323
323
|
function se(e, t) {
|
|
324
|
-
const { id: n, iframe: o, height: s, type:
|
|
325
|
-
let
|
|
324
|
+
const { id: n, iframe: o, height: s, type: a, width: r } = t;
|
|
325
|
+
let c = { x: 0, y: 0 };
|
|
326
326
|
if (r === 0 && s === 0) {
|
|
327
327
|
const f = x(n, 9).split(L);
|
|
328
|
-
|
|
328
|
+
c = {
|
|
329
329
|
x: f[1],
|
|
330
330
|
y: f[0]
|
|
331
331
|
};
|
|
332
332
|
} else
|
|
333
|
-
|
|
333
|
+
c = {
|
|
334
334
|
x: r,
|
|
335
335
|
y: s
|
|
336
336
|
};
|
|
337
|
-
|
|
337
|
+
k(n, e, {
|
|
338
338
|
iframe: o,
|
|
339
|
-
screenX: Number(
|
|
340
|
-
screenY: Number(
|
|
341
|
-
type:
|
|
339
|
+
screenX: Number(c.x),
|
|
340
|
+
screenY: Number(c.y),
|
|
341
|
+
type: a
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
|
-
const
|
|
344
|
+
const d = {
|
|
345
345
|
position: null,
|
|
346
346
|
version: _
|
|
347
347
|
};
|
|
348
|
-
function
|
|
349
|
-
|
|
348
|
+
function Ce() {
|
|
349
|
+
d.position = null;
|
|
350
350
|
}
|
|
351
|
-
const
|
|
352
|
-
function
|
|
353
|
-
|
|
351
|
+
const En = () => d.position;
|
|
352
|
+
function On(e) {
|
|
353
|
+
d.position = e;
|
|
354
354
|
}
|
|
355
355
|
function Ne(e) {
|
|
356
|
-
return
|
|
356
|
+
return d.position === null && (d.position = {
|
|
357
357
|
x: window.scrollX,
|
|
358
358
|
y: window.scrollY
|
|
359
359
|
}), u(
|
|
360
360
|
e,
|
|
361
|
-
`Get page position: %c${
|
|
361
|
+
`Get page position: %c${d.position.x}%c, %c${d.position.y}`,
|
|
362
362
|
l,
|
|
363
|
-
|
|
363
|
+
z,
|
|
364
364
|
l
|
|
365
|
-
),
|
|
365
|
+
), d.position;
|
|
366
366
|
}
|
|
367
|
-
function
|
|
368
|
-
|
|
367
|
+
function xe(e) {
|
|
368
|
+
d.position !== null && (window.scrollTo(d.position.x, d.position.y), m(
|
|
369
369
|
e,
|
|
370
|
-
`Set page position: %c${
|
|
370
|
+
`Set page position: %c${d.position.x}%c, %c${d.position.y}`,
|
|
371
371
|
l,
|
|
372
|
-
|
|
372
|
+
z,
|
|
373
373
|
l
|
|
374
|
-
),
|
|
374
|
+
), Ce());
|
|
375
375
|
}
|
|
376
376
|
function re(e, t) {
|
|
377
377
|
const { id: n } = t, o = `${t[e]}px`;
|
|
378
|
-
i[n].iframe.style[e] = o,
|
|
378
|
+
i[n].iframe.style[e] = o, m(n, `Set ${e}: %c${o}`, l);
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function _e(e) {
|
|
381
381
|
const { id: t } = e, { sizeHeight: n, sizeWidth: o } = i[t];
|
|
382
|
-
n && re(mt, e), o && re(
|
|
382
|
+
n && re(mt, e), o && re(bt, e);
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function ae(e) {
|
|
385
385
|
const { id: t } = e;
|
|
386
|
-
|
|
386
|
+
_e(e), xe(t), k(t, "onResized", e);
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function Fe(e) {
|
|
389
389
|
const { id: t } = e;
|
|
390
390
|
u(t, "Disconnected from iframe"), delete i[t], delete e.iframeResizer;
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function Be(e) {
|
|
393
393
|
const { id: t } = e;
|
|
394
|
-
if (
|
|
394
|
+
if (k(t, "onBeforeClose", t) === !1) {
|
|
395
395
|
u(t, "Close iframe cancelled by onBeforeClose");
|
|
396
396
|
return;
|
|
397
397
|
}
|
|
@@ -399,77 +399,85 @@ function Fe(e) {
|
|
|
399
399
|
try {
|
|
400
400
|
e.parentNode && e.remove();
|
|
401
401
|
} catch (n) {
|
|
402
|
-
|
|
402
|
+
w(t, n);
|
|
403
403
|
}
|
|
404
|
-
|
|
404
|
+
k(t, "onAfterClose", t), Fe(e);
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function We(e) {
|
|
407
407
|
const { id: t, type: n } = e;
|
|
408
408
|
u(
|
|
409
409
|
t,
|
|
410
410
|
`Size reset requested by ${n === j ? "parent page" : "child page"}`
|
|
411
|
-
), Ne(t),
|
|
411
|
+
), Ne(t), _e(e), T(U, U, t);
|
|
412
412
|
}
|
|
413
|
-
const
|
|
413
|
+
const De = (e, t) => {
|
|
414
414
|
const n = {};
|
|
415
415
|
return (o, s) => {
|
|
416
|
-
const { iframe:
|
|
417
|
-
function r(f,
|
|
418
|
-
n[
|
|
419
|
-
n[
|
|
416
|
+
const { iframe: a } = i[s];
|
|
417
|
+
function r(f, p) {
|
|
418
|
+
n[p] || (f(), n[p] = requestAnimationFrame(() => {
|
|
419
|
+
n[p] = null;
|
|
420
420
|
}));
|
|
421
421
|
}
|
|
422
|
-
function
|
|
423
|
-
T(`${o} (${e})`, `${e}:${t(
|
|
422
|
+
function c() {
|
|
423
|
+
T(`${o} (${e})`, `${e}:${t(a)}`, s);
|
|
424
424
|
}
|
|
425
|
-
r(
|
|
425
|
+
r(c, s);
|
|
426
426
|
};
|
|
427
|
-
},
|
|
427
|
+
}, He = (e) => (t) => {
|
|
428
428
|
e in i[t] && (i[t][e](), delete i[t][e]);
|
|
429
|
-
},
|
|
429
|
+
}, Ge = (
|
|
430
430
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
431
431
|
((e, t) => (n) => {
|
|
432
432
|
let o = !1;
|
|
433
|
-
const s = (
|
|
434
|
-
i[n] ? (!o || o ===
|
|
433
|
+
const s = (g) => () => {
|
|
434
|
+
i[n] ? (!o || o === g) && (e(g, n), o = g, requestAnimationFrame(() => {
|
|
435
435
|
o = !1;
|
|
436
|
-
})) :
|
|
437
|
-
},
|
|
438
|
-
function
|
|
439
|
-
u(n, `${
|
|
436
|
+
})) : h();
|
|
437
|
+
}, a = s(te), r = s("resize window"), c = new ResizeObserver(s("pageObserver")), f = new ResizeObserver(s("iframeObserver"));
|
|
438
|
+
function p(g, E) {
|
|
439
|
+
u(n, `${g}listeners for send${t}`), E(window, te, a), E(window, Y, r);
|
|
440
440
|
}
|
|
441
|
-
function
|
|
442
|
-
b(n, `stop${t}`),
|
|
441
|
+
function h() {
|
|
442
|
+
b(n, `stop${t}`), p("Remove ", ie), c.disconnect(), f.disconnect(), i[n] && ie(i[n].iframe, G, h);
|
|
443
443
|
}
|
|
444
444
|
function $() {
|
|
445
|
-
|
|
445
|
+
p("Add ", C), c.observe(document.body), f.observe(i[n].iframe);
|
|
446
446
|
}
|
|
447
|
-
i[n] && (i[n][`stop${t}`] =
|
|
447
|
+
i[n] && (i[n][`stop${t}`] = h, C(i[n].iframe, G, h), $());
|
|
448
448
|
})
|
|
449
449
|
);
|
|
450
|
-
function
|
|
451
|
-
const t = document.body.getBoundingClientRect(), n = e.getBoundingClientRect(), { scrollY: o, scrollX: s, innerHeight:
|
|
450
|
+
function Tn(e) {
|
|
451
|
+
const t = document.body.getBoundingClientRect(), n = e.getBoundingClientRect(), { scrollY: o, scrollX: s, innerHeight: a, innerWidth: r } = window, { clientHeight: c, clientWidth: f } = document.documentElement;
|
|
452
452
|
return JSON.stringify({
|
|
453
453
|
iframeHeight: n.height,
|
|
454
454
|
iframeWidth: n.width,
|
|
455
|
-
clientHeight: Math.max(
|
|
455
|
+
clientHeight: Math.max(c, a || 0),
|
|
456
456
|
clientWidth: Math.max(f, r || 0),
|
|
457
457
|
offsetTop: Math.trunc(n.top - t.top),
|
|
458
458
|
offsetLeft: Math.trunc(n.left - t.left),
|
|
459
459
|
scrollTop: o,
|
|
460
460
|
scrollLeft: s,
|
|
461
|
-
documentHeight:
|
|
461
|
+
documentHeight: c,
|
|
462
462
|
documentWidth: f,
|
|
463
|
-
windowHeight:
|
|
463
|
+
windowHeight: a,
|
|
464
464
|
windowWidth: r
|
|
465
465
|
});
|
|
466
466
|
}
|
|
467
|
-
const
|
|
468
|
-
|
|
467
|
+
const kn = De(be, Tn), In = Ge(
|
|
468
|
+
kn,
|
|
469
469
|
"PageInfo"
|
|
470
|
-
),
|
|
471
|
-
function
|
|
472
|
-
const { scrollWidth: t, scrollHeight: n } = document.documentElement,
|
|
470
|
+
), $n = He("stopPageInfo");
|
|
471
|
+
function Mn(e) {
|
|
472
|
+
const { scrollWidth: t, scrollHeight: n } = document.documentElement, o = typeof window < "u" && window.visualViewport ? window.visualViewport : {}, {
|
|
473
|
+
width: s = 0,
|
|
474
|
+
height: a = 0,
|
|
475
|
+
offsetLeft: r = 0,
|
|
476
|
+
offsetTop: c = 0,
|
|
477
|
+
pageLeft: f = 0,
|
|
478
|
+
pageTop: p = 0,
|
|
479
|
+
scale: h = 1
|
|
480
|
+
} = o;
|
|
473
481
|
return JSON.stringify({
|
|
474
482
|
iframe: e.getBoundingClientRect(),
|
|
475
483
|
document: {
|
|
@@ -477,71 +485,71 @@ function $n(e) {
|
|
|
477
485
|
scrollHeight: n
|
|
478
486
|
},
|
|
479
487
|
viewport: {
|
|
480
|
-
width:
|
|
481
|
-
height:
|
|
482
|
-
offsetLeft:
|
|
483
|
-
offsetTop:
|
|
484
|
-
pageLeft:
|
|
485
|
-
pageTop:
|
|
488
|
+
width: s,
|
|
489
|
+
height: a,
|
|
490
|
+
offsetLeft: r,
|
|
491
|
+
offsetTop: c,
|
|
492
|
+
pageLeft: f,
|
|
493
|
+
pageTop: p,
|
|
486
494
|
scale: h
|
|
487
495
|
}
|
|
488
496
|
});
|
|
489
497
|
}
|
|
490
|
-
const
|
|
491
|
-
|
|
498
|
+
const Sn = De(ve, Mn), jn = Ge(
|
|
499
|
+
Sn,
|
|
492
500
|
"ParentInfo"
|
|
493
|
-
),
|
|
494
|
-
function
|
|
501
|
+
), Rn = He("stopParentInfo");
|
|
502
|
+
function Ue(e) {
|
|
495
503
|
const t = e.getBoundingClientRect(), n = Ne(e.id);
|
|
496
504
|
return {
|
|
497
505
|
x: Number(t.left) + Number(n.x),
|
|
498
506
|
y: Number(t.top) + Number(n.y)
|
|
499
507
|
};
|
|
500
508
|
}
|
|
501
|
-
function
|
|
502
|
-
const { x: t, y: n } =
|
|
503
|
-
if (
|
|
504
|
-
|
|
509
|
+
function Ve(e) {
|
|
510
|
+
const { x: t, y: n } = En(), o = i[e]?.iframe;
|
|
511
|
+
if (k(e, "onScroll", { iframe: o, top: n, left: t, x: t, y: n }) === !1) {
|
|
512
|
+
Ce();
|
|
505
513
|
return;
|
|
506
514
|
}
|
|
507
|
-
|
|
515
|
+
xe(e);
|
|
508
516
|
}
|
|
509
|
-
function
|
|
517
|
+
function Ln(e) {
|
|
510
518
|
const { id: t, height: n, width: o } = e, s = window.parentIframe || window.parentIFrame || window;
|
|
511
|
-
|
|
519
|
+
m(
|
|
512
520
|
t,
|
|
513
521
|
`scrollBy: x: %c${o}%c y: %c${n}`,
|
|
514
522
|
l,
|
|
515
|
-
|
|
523
|
+
z,
|
|
516
524
|
l
|
|
517
525
|
), s.scrollBy(o, n);
|
|
518
526
|
}
|
|
519
|
-
const
|
|
520
|
-
const { id: n, iframe: o, height: s, width:
|
|
521
|
-
function r(
|
|
522
|
-
|
|
527
|
+
const qe = (e) => (t) => {
|
|
528
|
+
const { id: n, iframe: o, height: s, width: a } = t;
|
|
529
|
+
function r(g) {
|
|
530
|
+
On(g), Ve(n);
|
|
523
531
|
}
|
|
524
|
-
function
|
|
525
|
-
|
|
532
|
+
function c(g, E) {
|
|
533
|
+
g[`scrollTo${e ? "Offset" : ""}`](
|
|
526
534
|
E.x,
|
|
527
535
|
E.y
|
|
528
536
|
);
|
|
529
537
|
}
|
|
530
|
-
const f = (
|
|
531
|
-
x:
|
|
532
|
-
y: s +
|
|
533
|
-
}),
|
|
534
|
-
|
|
538
|
+
const f = (g) => ({
|
|
539
|
+
x: a + g.x,
|
|
540
|
+
y: s + g.y
|
|
541
|
+
}), p = e ? Ue(o) : { x: 0, y: 0 }, h = f(p), $ = window.parentIframe || window.parentIFrame;
|
|
542
|
+
m(
|
|
535
543
|
n,
|
|
536
|
-
`Reposition requested (offset x:%c${
|
|
544
|
+
`Reposition requested (offset x:%c${p.x}%c y:%c${p.y})`,
|
|
537
545
|
l,
|
|
538
|
-
|
|
546
|
+
z,
|
|
539
547
|
l
|
|
540
|
-
), $ ?
|
|
541
|
-
},
|
|
542
|
-
function
|
|
543
|
-
const { x: o, y: s } =
|
|
544
|
-
|
|
548
|
+
), $ ? c($, h) : r(h);
|
|
549
|
+
}, An = qe(!1), Pn = qe(!0);
|
|
550
|
+
function Cn(e, t, n) {
|
|
551
|
+
const { x: o, y: s } = Ue(n);
|
|
552
|
+
m(e, `Moving to in page link: %c#${t}`, l), d.position = { x: o, y: s }, Ve(e), window.location.hash = t;
|
|
545
553
|
}
|
|
546
554
|
function Nn(e, t) {
|
|
547
555
|
const n = window.parentIframe || window.parentIFrame;
|
|
@@ -551,10 +559,10 @@ function Nn(e, t) {
|
|
|
551
559
|
}
|
|
552
560
|
n.moveToAnchor(t);
|
|
553
561
|
}
|
|
554
|
-
function
|
|
562
|
+
function xn(e, t) {
|
|
555
563
|
const n = t.split("#")[1] || "", o = decodeURIComponent(n), s = document.getElementById(o) || document.getElementsByName(o)[0];
|
|
556
564
|
if (s) {
|
|
557
|
-
|
|
565
|
+
Cn(e, n, s);
|
|
558
566
|
return;
|
|
559
567
|
}
|
|
560
568
|
if (window.top === window.self) {
|
|
@@ -563,12 +571,12 @@ function Cn(e, t) {
|
|
|
563
571
|
}
|
|
564
572
|
Nn(e, n);
|
|
565
573
|
}
|
|
566
|
-
function
|
|
574
|
+
function _n(e) {
|
|
567
575
|
const t = i[e]?.iframe?.title;
|
|
568
576
|
return t === "" || t === void 0;
|
|
569
577
|
}
|
|
570
|
-
function
|
|
571
|
-
i[e]?.syncTitle && (i[e].iframe.title = t,
|
|
578
|
+
function Fn(e, t) {
|
|
579
|
+
i[e]?.syncTitle && (i[e].iframe.title = t, m(e, `Set iframe title attribute: %c${t}`, l));
|
|
572
580
|
}
|
|
573
581
|
const W = (e) => {
|
|
574
582
|
if (!e) return "";
|
|
@@ -581,25 +589,22 @@ const W = (e) => {
|
|
|
581
589
|
(t) => String.fromCodePoint(
|
|
582
590
|
(t <= "Z" ? 90 : 122) >= (t = t.codePointAt(0) + 19) ? t : t - 26
|
|
583
591
|
)
|
|
584
|
-
),
|
|
585
|
-
e[0],
|
|
586
|
-
...e.slice(1).map((t) => `${t} - lewpylk`),
|
|
587
|
-
`${e[4]} - lewpylk`,
|
|
588
|
-
...e.slice(1)
|
|
589
|
-
], R = ["spjluzl", "rlf", "clyzpvu", "rlf2", "nlaMbssFlhy"], Wn = [
|
|
592
|
+
), Bn = /* @__PURE__ */ new Date(), Ze = (e) => new Set(Array.from({ length: 9 }, e)), ce = " - lewpylk", R = ["spjluzl", "rlf", "clyzpvu", "rlf2", "nlaMbssFlhy"], Wn = [
|
|
590
593
|
"<yi>Puchspk Spjluzl Rlf</><iy><iy>",
|
|
591
594
|
"<yi>Tpzzpun Spjluzl Rlf</><iy><iy>",
|
|
592
595
|
"Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>",
|
|
593
596
|
"<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.",
|
|
594
597
|
"<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt.",
|
|
595
598
|
"Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz.",
|
|
596
|
-
"<yi>Clyzpvu 5 rlf klaljalk</><iy><iy>
|
|
597
|
-
|
|
598
|
-
"<yi>
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
599
|
+
"<yi>Clyzpvu 5 rlf klaljalk</><iy><iy>Fvb hyl jbyyluasf bzpun h spjluzl rlf mvy aol wylcpvbz clyzpvu vm <p>pmyhtl-ylzpgly</>.</><iy><iy>Av bwnyhkl av <i>Clyzpvu 6</> fvb jhu bzl aol <i>mpyza 11 johyhjalyz vm fvb spjluzl rlf</> av nla h 60% kpzjvbua ha oaawz://pmyhtl-ylzpgly.jvt/wypjpun.",
|
|
600
|
+
"<yi>Clyzpvu 5 rlf klaljalk</><iy><iy>Fvb hyl jbyyluasf bzpun h spjluzl rlf mvy aol wylcpvbz clyzpvu vm <p>pmyhtl-ylzpgly</>.<iy><iy>Av bwnyhkl av <i>Clyzpvu 6</> vm <p>pmyhtl-ylzpgly</> wslhzl kvdusvhk aol shalza rlf myvt oaawz://pmyhtl-ylzpgly.jvt/tf-vyklyz.",
|
|
601
|
+
"<yi> VLT rlf lewpylk</><iy><iy>Aol spjluzl rlf fvb hyl bzpun mvy <p>pmyhtl-ylzpgly</> pz myvt h wypvy flhy huk ohz lewpylk. Hu bwkhalk rlf pz ylslhzlk vu aol mpyza vm Uvcltily lhjo flhy.<iy><iy>Wslhzl kvdusvhk aol shalza rlf myvt oaawz://pmyhtl-ylzpgly.jvt/tf-vyklyz."
|
|
602
|
+
], Dn = (e) => [
|
|
603
|
+
e[0],
|
|
604
|
+
...e.slice(1).map((t) => `${t}${ce}`),
|
|
605
|
+
`${e[4]}${ce}`,
|
|
606
|
+
...e.slice(1)
|
|
607
|
+
], Hn = Dn(["NWSc3", "zvsv", "wyv", "ibzpulzz", "VLT"]), le = Object.fromEntries(
|
|
603
608
|
[
|
|
604
609
|
"2cgs7fdf4xb",
|
|
605
610
|
"1c9ctcccr4z",
|
|
@@ -613,114 +618,114 @@ const W = (e) => {
|
|
|
613
618
|
"oclbb4thgl",
|
|
614
619
|
"igb1wzrjqr"
|
|
615
620
|
].map((e, t) => [e, Math.max(0, t - 1)])
|
|
616
|
-
),
|
|
621
|
+
), Je = Bn[v(R[4])](), Gn = Ze((e, t) => W(`${Je + t}`)), Un = Ze((e, t) => W(`${Je - ++t}`)), Vn = (e) => Gn.has(e) ? 9 : Un.has(e) ? 5 : -2, O = (e) => v(Wn[e]), qn = (e) => v(Hn[e]), Zn = (e) => {
|
|
617
622
|
const t = e[v(R[0])] || e[v(R[1])] || e[v(R[2])] || e[v(R[3])];
|
|
618
623
|
if (!t) return -1;
|
|
619
624
|
const n = t.split("-");
|
|
620
|
-
let o = (function(s = "",
|
|
625
|
+
let o = (function(s = "", a = "") {
|
|
621
626
|
let r = -2;
|
|
622
|
-
const
|
|
623
|
-
return
|
|
627
|
+
const c = W(v(s));
|
|
628
|
+
return c in le && (r = le[c]), r === 9 ? Vn(a) : r;
|
|
624
629
|
})(...n);
|
|
625
630
|
return o === 0 || ((s) => s[2] === W(s[0] + s[1]))(n) || (o = -2), o;
|
|
626
631
|
};
|
|
627
|
-
let J = !1,
|
|
628
|
-
function
|
|
632
|
+
let J = !1, Ye = !1;
|
|
633
|
+
function Xe(e, t = -3) {
|
|
629
634
|
if (J) return;
|
|
630
635
|
const n = Math.max(i[e].mode, t);
|
|
631
636
|
if (n > i[e].mode && (i[e].mode = n), n < 0)
|
|
632
|
-
throw
|
|
633
|
-
switch (n > 5 &&
|
|
637
|
+
throw Jt(e), i[e].vAdvised || y(e || "Parent", `${O(n + 2)}${O(2)}`), i[e].vAdvised = !0, O(n + 2).replace(/<\/?[a-z][^>]*>|<\/>/gi, "");
|
|
638
|
+
switch (n > 5 && Ye || Xt(`v${_} (${qn(n)})`, n), n) {
|
|
634
639
|
case 1:
|
|
635
640
|
case 2:
|
|
636
641
|
case 3:
|
|
637
|
-
|
|
642
|
+
y("Parent", O(6));
|
|
638
643
|
break;
|
|
639
644
|
case 4:
|
|
640
|
-
|
|
645
|
+
y("Parent", O(7));
|
|
641
646
|
break;
|
|
642
647
|
case 5:
|
|
643
|
-
|
|
648
|
+
y("Parent", O(8));
|
|
644
649
|
break;
|
|
645
650
|
default:
|
|
646
|
-
n < 1 &&
|
|
651
|
+
n < 1 && y("Parent", O(3));
|
|
647
652
|
}
|
|
648
653
|
J = !0;
|
|
649
654
|
}
|
|
650
|
-
function
|
|
655
|
+
function Jn(e) {
|
|
651
656
|
if (J) return;
|
|
652
657
|
const { mode: t } = i[e];
|
|
653
|
-
t > 5 &&
|
|
658
|
+
t > 5 && Xe(e, t);
|
|
654
659
|
}
|
|
655
|
-
function
|
|
656
|
-
e?.log === -1 && (e.log = !1,
|
|
660
|
+
function Yn(e) {
|
|
661
|
+
e?.log === -1 && (e.log = !1, Ye = !0);
|
|
657
662
|
}
|
|
658
|
-
function
|
|
659
|
-
i[e] && (u(e, `First run for ${e}`),
|
|
663
|
+
function Xn(e, t) {
|
|
664
|
+
i[e] && (u(e, `First run for ${e}`), Xe(e, t === void 0 ? void 0 : Number(t)), i[e].firstRun = !1);
|
|
660
665
|
}
|
|
661
|
-
function
|
|
662
|
-
const { height: t, id: n, iframe: o, mode: s, message:
|
|
663
|
-
switch (i[n]?.firstRun &&
|
|
666
|
+
function Kn(e) {
|
|
667
|
+
const { height: t, id: n, iframe: o, mode: s, message: a, type: r, width: c } = e, { lastMessage: f } = i[n];
|
|
668
|
+
switch (i[n]?.firstRun && Xn(n, s), u(n, `Received: %c${f}`, l), r) {
|
|
664
669
|
case ge:
|
|
665
670
|
i[n].autoResize = JSON.parse(x(n, 9));
|
|
666
671
|
break;
|
|
667
|
-
case it:
|
|
668
|
-
y(n, "Ready state reset"), i[n].initialised = !1;
|
|
669
|
-
break;
|
|
670
672
|
case st:
|
|
671
|
-
|
|
673
|
+
m(n, "Ready state reset"), i[n].initialised = !1;
|
|
672
674
|
break;
|
|
673
675
|
case rt:
|
|
674
|
-
|
|
676
|
+
Be(o);
|
|
677
|
+
break;
|
|
678
|
+
case at:
|
|
679
|
+
xn(n, x(n, 9));
|
|
675
680
|
break;
|
|
676
681
|
case j:
|
|
677
|
-
|
|
682
|
+
ae(e), vn(n), zn(n, a), i[n].initialised = !0, k(n, "onReady", o);
|
|
678
683
|
break;
|
|
679
684
|
case A:
|
|
680
685
|
wn(e, x(n, 6));
|
|
681
686
|
break;
|
|
682
|
-
case
|
|
687
|
+
case lt:
|
|
683
688
|
se("onMouseEnter", e);
|
|
684
689
|
break;
|
|
685
|
-
case
|
|
690
|
+
case ut:
|
|
686
691
|
se("onMouseLeave", e);
|
|
687
692
|
break;
|
|
688
|
-
case ye:
|
|
689
|
-
In(n);
|
|
690
|
-
break;
|
|
691
693
|
case be:
|
|
692
|
-
|
|
694
|
+
In(n);
|
|
693
695
|
break;
|
|
694
|
-
case
|
|
695
|
-
|
|
696
|
+
case ve:
|
|
697
|
+
jn(n);
|
|
696
698
|
break;
|
|
697
699
|
case ft:
|
|
698
|
-
|
|
700
|
+
$n(n);
|
|
701
|
+
break;
|
|
702
|
+
case pt:
|
|
703
|
+
Rn(n);
|
|
699
704
|
break;
|
|
700
705
|
case U:
|
|
701
|
-
|
|
706
|
+
We(e);
|
|
702
707
|
break;
|
|
703
708
|
case ht:
|
|
704
|
-
Rn(e);
|
|
705
|
-
break;
|
|
706
|
-
case pt:
|
|
707
709
|
Ln(e);
|
|
708
710
|
break;
|
|
709
|
-
case
|
|
711
|
+
case dt:
|
|
710
712
|
An(e);
|
|
711
713
|
break;
|
|
712
|
-
case
|
|
713
|
-
|
|
714
|
+
case gt:
|
|
715
|
+
Pn(e);
|
|
716
|
+
break;
|
|
717
|
+
case yt:
|
|
718
|
+
Fn(n, a);
|
|
714
719
|
break;
|
|
715
720
|
default:
|
|
716
|
-
if (
|
|
717
|
-
|
|
721
|
+
if (c === 0 && t === 0) {
|
|
722
|
+
w(
|
|
718
723
|
n,
|
|
719
724
|
`Unsupported message received (${r}), this is likely due to the iframe containing a later version of iframe-resizer than the parent page`
|
|
720
725
|
);
|
|
721
726
|
return;
|
|
722
727
|
}
|
|
723
|
-
if (
|
|
728
|
+
if (c === 0 || t === 0) {
|
|
724
729
|
u(n, "Ignoring message with 0 height or width");
|
|
725
730
|
return;
|
|
726
731
|
}
|
|
@@ -728,24 +733,24 @@ function Xn(e) {
|
|
|
728
733
|
u(n, "Page hidden - ignored resize request");
|
|
729
734
|
return;
|
|
730
735
|
}
|
|
731
|
-
|
|
736
|
+
ae(e);
|
|
732
737
|
}
|
|
733
738
|
}
|
|
734
|
-
const
|
|
739
|
+
const Qn = (e) => ({
|
|
735
740
|
initChild: t,
|
|
736
741
|
postMessageTarget: n
|
|
737
742
|
}) => {
|
|
738
743
|
e === n && t();
|
|
739
|
-
},
|
|
740
|
-
function
|
|
744
|
+
}, eo = (e) => Object.values(i).forEach(Qn(e));
|
|
745
|
+
function ue(e) {
|
|
741
746
|
const t = e.data;
|
|
742
|
-
if (t ===
|
|
743
|
-
|
|
747
|
+
if (t === it) {
|
|
748
|
+
eo(e.source);
|
|
744
749
|
return;
|
|
745
750
|
}
|
|
746
751
|
if (!mn(t)) {
|
|
747
752
|
if (typeof t !== X) return;
|
|
748
|
-
b(V, "ignoredMessage"),
|
|
753
|
+
b(V, "ignoredMessage"), qt(V, t);
|
|
749
754
|
return;
|
|
750
755
|
}
|
|
751
756
|
const n = hn(t), { id: o, type: s } = n;
|
|
@@ -753,27 +758,27 @@ function le(e) {
|
|
|
753
758
|
case !i[o]:
|
|
754
759
|
throw new Error(`${s} No settings for ${o}. Message was: ${t}`);
|
|
755
760
|
case !gn(n):
|
|
756
|
-
case
|
|
757
|
-
case !
|
|
761
|
+
case bn(n):
|
|
762
|
+
case !yn(n, e):
|
|
758
763
|
return;
|
|
759
764
|
default:
|
|
760
|
-
i[o].lastMessage = e.data,
|
|
765
|
+
i[o].lastMessage = e.data, Pe(o, Kn)(n);
|
|
761
766
|
}
|
|
762
767
|
}
|
|
763
|
-
const
|
|
764
|
-
|
|
765
|
-
}),
|
|
766
|
-
function
|
|
767
|
-
if (
|
|
768
|
+
const to = Rt(() => {
|
|
769
|
+
C(window, A, ue), C(document, "visibilitychange", un), window.iframeParentListener = (e) => setTimeout(() => ue({ data: e, sameOrigin: !0 }));
|
|
770
|
+
}), fe = {};
|
|
771
|
+
function no(e) {
|
|
772
|
+
if (fe[e] === !0) return !1;
|
|
768
773
|
const t = document.querySelectorAll(`iframe#${CSS.escape(e)}`);
|
|
769
774
|
if (t.length <= 1) return !0;
|
|
770
|
-
|
|
775
|
+
fe[e] = !0;
|
|
771
776
|
const n = Array.from(t).flatMap((o) => [
|
|
772
|
-
|
|
777
|
+
N,
|
|
773
778
|
o,
|
|
774
|
-
|
|
779
|
+
N
|
|
775
780
|
]);
|
|
776
|
-
return
|
|
781
|
+
return y(
|
|
777
782
|
e,
|
|
778
783
|
`<rb>Duplicate ID attributes detected</>
|
|
779
784
|
|
|
@@ -781,27 +786,27 @@ The <b>${e}</> ID is not unique. Having multiple iframes on the same page with t
|
|
|
781
786
|
|
|
782
787
|
Found <bb>${t.length}</> iframes with the <b>${e}</> ID:`,
|
|
783
788
|
...n,
|
|
784
|
-
|
|
789
|
+
N
|
|
785
790
|
), !1;
|
|
786
791
|
}
|
|
787
|
-
const
|
|
792
|
+
const oo = `<rb>Deprecated Method Name</>
|
|
788
793
|
|
|
789
|
-
The <b>removeListeners()</> method has been renamed to <b>disconnect()</>. ${
|
|
794
|
+
The <b>removeListeners()</> method has been renamed to <b>disconnect()</>. ${Me}`, io = `<rb>Deprecated Method</>
|
|
790
795
|
|
|
791
796
|
Use of the <b>resize()</> method from the parent page is deprecated and will be removed in a future version of <i>iframe-resizer</>. As there are no longer any edge cases that require triggering a resize from the parent page, it is recommended to remove this method from your code.`;
|
|
792
|
-
function
|
|
797
|
+
function so(e) {
|
|
793
798
|
if (i[e]) {
|
|
794
799
|
const { iframe: t } = i[e], n = {
|
|
795
|
-
close:
|
|
796
|
-
disconnect:
|
|
800
|
+
close: Be.bind(null, t),
|
|
801
|
+
disconnect: Fe.bind(null, t),
|
|
797
802
|
moveToAnchor(o) {
|
|
798
803
|
Nt(o, X, "moveToAnchor(anchor) anchor"), T("Move to anchor", `moveToAnchor:${o}`, e);
|
|
799
804
|
},
|
|
800
805
|
removeListeners() {
|
|
801
|
-
|
|
806
|
+
y(e, oo), this.disconnect();
|
|
802
807
|
},
|
|
803
808
|
resize() {
|
|
804
|
-
|
|
809
|
+
y(e, io), T("Window resize", Y, e);
|
|
805
810
|
},
|
|
806
811
|
sendMessage(o) {
|
|
807
812
|
o = JSON.stringify(o), T(A, `${A}:${o}`, e);
|
|
@@ -810,60 +815,60 @@ function io(e) {
|
|
|
810
815
|
t.iframeResizer = n, t.iFrameResizer = n;
|
|
811
816
|
}
|
|
812
817
|
}
|
|
813
|
-
const
|
|
814
|
-
function
|
|
818
|
+
const ro = "8", ao = "32", co = Et, lo = !0;
|
|
819
|
+
function uo(e) {
|
|
815
820
|
const {
|
|
816
821
|
autoResize: t,
|
|
817
822
|
bodyBackground: n,
|
|
818
823
|
bodyMargin: o,
|
|
819
824
|
bodyPadding: s,
|
|
820
|
-
heightCalculationMethod:
|
|
825
|
+
heightCalculationMethod: a,
|
|
821
826
|
inPageLinks: r,
|
|
822
|
-
license:
|
|
827
|
+
license: c,
|
|
823
828
|
log: f,
|
|
824
|
-
logExpand:
|
|
825
|
-
mouseEvents:
|
|
829
|
+
logExpand: p,
|
|
830
|
+
mouseEvents: h,
|
|
826
831
|
offsetHeight: $,
|
|
827
|
-
offsetWidth:
|
|
832
|
+
offsetWidth: g,
|
|
828
833
|
mode: E,
|
|
829
|
-
sizeHeight:
|
|
834
|
+
sizeHeight: Ke,
|
|
830
835
|
// sizeSelector,
|
|
831
|
-
sizeWidth:
|
|
832
|
-
tolerance:
|
|
833
|
-
widthCalculationMethod:
|
|
836
|
+
sizeWidth: Qe,
|
|
837
|
+
tolerance: et,
|
|
838
|
+
widthCalculationMethod: tt
|
|
834
839
|
} = i[e];
|
|
835
840
|
return [
|
|
836
841
|
e,
|
|
837
|
-
so,
|
|
838
|
-
Ke,
|
|
839
|
-
f,
|
|
840
842
|
ro,
|
|
843
|
+
Qe,
|
|
844
|
+
f,
|
|
841
845
|
ao,
|
|
846
|
+
lo,
|
|
842
847
|
t,
|
|
843
848
|
o,
|
|
844
|
-
|
|
849
|
+
a,
|
|
845
850
|
n,
|
|
846
851
|
s,
|
|
847
|
-
|
|
852
|
+
et,
|
|
848
853
|
r,
|
|
849
854
|
co,
|
|
850
|
-
|
|
851
|
-
|
|
855
|
+
tt,
|
|
856
|
+
h,
|
|
852
857
|
$,
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
858
|
+
g,
|
|
859
|
+
Ke,
|
|
860
|
+
c,
|
|
861
|
+
d.version,
|
|
857
862
|
E,
|
|
858
863
|
"",
|
|
859
864
|
// sizeSelector,
|
|
860
|
-
|
|
865
|
+
p
|
|
861
866
|
].join(L);
|
|
862
867
|
}
|
|
863
|
-
const
|
|
864
|
-
function
|
|
868
|
+
const fo = "0";
|
|
869
|
+
function po(e) {
|
|
865
870
|
const { bodyMargin: t } = i[e];
|
|
866
|
-
(typeof t ===
|
|
871
|
+
(typeof t === Ot || t === fo) && (i[e].bodyMargin = `${t}px`);
|
|
867
872
|
}
|
|
868
873
|
const ho = (e) => {
|
|
869
874
|
try {
|
|
@@ -871,24 +876,24 @@ const ho = (e) => {
|
|
|
871
876
|
} catch {
|
|
872
877
|
return null;
|
|
873
878
|
}
|
|
874
|
-
},
|
|
875
|
-
function
|
|
879
|
+
}, go = (e) => typeof e === ze && e.length > 0 && !(e.contains("allow-scripts") && e.contains("allow-same-origin"));
|
|
880
|
+
function yo(e, t) {
|
|
876
881
|
const {
|
|
877
882
|
checkOrigin: n,
|
|
878
883
|
iframe: { src: o, sandbox: s },
|
|
879
|
-
initialisedFirstPage:
|
|
884
|
+
initialisedFirstPage: a,
|
|
880
885
|
waitForLoad: r
|
|
881
|
-
} = t[e],
|
|
882
|
-
b(e, "noResponse"),
|
|
886
|
+
} = t[e], c = ho(o);
|
|
887
|
+
b(e, "noResponse"), y(
|
|
883
888
|
e,
|
|
884
889
|
`<rb>No response from iframe</>
|
|
885
890
|
|
|
886
891
|
The iframe (<i>${e}</>) has not responded within ${t[e].warningTimeout / 1e3} seconds. Check <b>@iframe-resizer/child</> package has been loaded in the iframe.
|
|
887
|
-
${n &&
|
|
888
|
-
The <b>checkOrigin</> option is currently enabled. If the iframe redirects away from <i>${
|
|
889
|
-
` : ""}${r && !
|
|
892
|
+
${n && c ? `
|
|
893
|
+
The <b>checkOrigin</> option is currently enabled. If the iframe redirects away from <i>${c}</>, then the connection to the iframe may be blocked by the browser. To disable this option, set <b>checkOrigin</> to <bb>false</> or an array of allowed origins. See <u>https://iframe-resizer.com/checkorigin</> for more information.
|
|
894
|
+
` : ""}${r && !a ? `
|
|
890
895
|
The <b>waitForLoad</> option is currently set to <bb>true</>. If the iframe loads before <i>iframe-resizer</> runs, this option will prevent <i>iframe-resizer</> initialising. To disable this option, set <b>waitForLoad</> to <bb>false</>.
|
|
891
|
-
` : ""}${
|
|
896
|
+
` : ""}${go(s) ? `
|
|
892
897
|
The iframe has the <b>sandbox</> attribute, please ensure it contains both the <bb>allow-same-origin</> and <bb>allow-scripts</> values.
|
|
893
898
|
` : ""}
|
|
894
899
|
This message can be ignored if everything is working, or you can set the <b>warningTimeout</> option to a higher value or zero to suppress this warning.
|
|
@@ -898,19 +903,19 @@ This message can be ignored if everything is working, or you can set the <b>warn
|
|
|
898
903
|
function mo(e, t) {
|
|
899
904
|
function n() {
|
|
900
905
|
if (t[e] === void 0) return;
|
|
901
|
-
const { initialised:
|
|
902
|
-
if (t[e].msgTimeout = void 0,
|
|
906
|
+
const { initialised: a, loadErrorShown: r } = t[e];
|
|
907
|
+
if (t[e].msgTimeout = void 0, a) {
|
|
903
908
|
t[e].initialisedFirstPage = !0;
|
|
904
909
|
return;
|
|
905
910
|
}
|
|
906
|
-
r || (t[e].loadErrorShown = !0,
|
|
911
|
+
r || (t[e].loadErrorShown = !0, yo(e, t));
|
|
907
912
|
}
|
|
908
913
|
const { msgTimeout: o, warningTimeout: s } = t[e];
|
|
909
914
|
s && (o && clearTimeout(o), t[e].msgTimeout = setTimeout(n, s));
|
|
910
915
|
}
|
|
911
|
-
const
|
|
916
|
+
const bo = 1, vo = (e) => e.loading === ct, zo = (e) => e === j;
|
|
912
917
|
function wo(e) {
|
|
913
|
-
i[e]?.heightCalculationMethod in
|
|
918
|
+
i[e]?.heightCalculationMethod in $t && We({
|
|
914
919
|
id: e,
|
|
915
920
|
iframe: i[e].iframe,
|
|
916
921
|
height: ee,
|
|
@@ -918,61 +923,61 @@ function wo(e) {
|
|
|
918
923
|
type: j
|
|
919
924
|
});
|
|
920
925
|
}
|
|
921
|
-
function
|
|
922
|
-
|
|
926
|
+
function Eo(e, t) {
|
|
927
|
+
C(e, G, () => setTimeout(t, bo));
|
|
923
928
|
}
|
|
924
|
-
const
|
|
929
|
+
const Oo = (e) => {
|
|
925
930
|
const { src: t, srcdoc: n } = e;
|
|
926
931
|
return !n && (t == null || t === "" || t === "about:blank");
|
|
927
932
|
};
|
|
928
|
-
function
|
|
933
|
+
function To(e, t) {
|
|
929
934
|
const { iframe: n, waitForLoad: o } = i[e];
|
|
930
935
|
if (o !== !0) {
|
|
931
|
-
if (
|
|
936
|
+
if (Oo(n)) {
|
|
932
937
|
setTimeout(() => {
|
|
933
|
-
b(e, "noContent"),
|
|
938
|
+
b(e, "noContent"), m(e, "No content detected in the iframe, delaying initialisation");
|
|
934
939
|
});
|
|
935
940
|
return;
|
|
936
941
|
}
|
|
937
942
|
setTimeout(t);
|
|
938
943
|
}
|
|
939
944
|
}
|
|
940
|
-
function
|
|
945
|
+
function ko(e, t) {
|
|
941
946
|
const n = (s) => () => {
|
|
942
947
|
if (!i[e]) return;
|
|
943
|
-
const { firstRun:
|
|
944
|
-
T(s, t, e),
|
|
948
|
+
const { firstRun: a, iframe: r } = i[e];
|
|
949
|
+
T(s, t, e), zo(s) && vo(r) || mo(e, i), a || wo(e);
|
|
945
950
|
}, { iframe: o } = i[e];
|
|
946
|
-
i[e].initChild = n(
|
|
951
|
+
i[e].initChild = n(ye), Eo(o, n(me)), To(e, n(j));
|
|
947
952
|
}
|
|
948
953
|
function Io(e, t) {
|
|
949
|
-
return t ? (("sizeWidth" in t || "sizeHeight" in t || ge in t) &&
|
|
954
|
+
return t ? (("sizeWidth" in t || "sizeHeight" in t || ge in t) && y(
|
|
950
955
|
e,
|
|
951
956
|
`<rb>Deprecated Option</>
|
|
952
957
|
|
|
953
|
-
The <b>sizeWidth</>, <b>sizeHeight</> and <b>autoResize</> options have been replaced with new <b>direction</> option which expects values of <bb>${D}</>, <bb>${
|
|
958
|
+
The <b>sizeWidth</>, <b>sizeHeight</> and <b>autoResize</> options have been replaced with new <b>direction</> option which expects values of <bb>${D}</>, <bb>${Te}</>, <bb>${Oe}</> or <bb>${Ee}</>.
|
|
954
959
|
`
|
|
955
960
|
), t) : {};
|
|
956
961
|
}
|
|
957
|
-
function
|
|
958
|
-
i[e].warningTimeout ||
|
|
962
|
+
function $o(e) {
|
|
963
|
+
i[e].warningTimeout || m(e, "warningTimeout:%c disabled", l);
|
|
959
964
|
}
|
|
960
|
-
function
|
|
965
|
+
function Mo(e, { offset: t, offsetSize: n }) {
|
|
961
966
|
const o = n || t;
|
|
962
967
|
o && (i[e].direction === D ? (i[e].offsetHeight = o, u(e, `Offset height: %c${o}`, l)) : (i[e].offsetWidth = o, u(e, `Offset width: %c${o}`, l)));
|
|
963
968
|
}
|
|
964
|
-
function
|
|
969
|
+
function So(e) {
|
|
965
970
|
const { direction: t } = i[e];
|
|
966
971
|
switch (t) {
|
|
967
972
|
case D:
|
|
968
973
|
break;
|
|
969
|
-
case
|
|
974
|
+
case Te:
|
|
970
975
|
i[e].sizeHeight = !1;
|
|
971
976
|
// eslint-disable-next-line no-fallthrough
|
|
972
|
-
case
|
|
977
|
+
case Oe:
|
|
973
978
|
i[e].sizeWidth = !0;
|
|
974
979
|
break;
|
|
975
|
-
case
|
|
980
|
+
case Ee:
|
|
976
981
|
i[e].sizeWidth = !1, i[e].sizeHeight = !1, i[e].autoResize = !1;
|
|
977
982
|
break;
|
|
978
983
|
default:
|
|
@@ -980,31 +985,31 @@ function Mo(e) {
|
|
|
980
985
|
}
|
|
981
986
|
u(e, `direction: %c${t}`, l);
|
|
982
987
|
}
|
|
983
|
-
const
|
|
984
|
-
function
|
|
988
|
+
const pe = (e) => e === "" || e.match(/^(about:blank|javascript:|file:\/\/)/) !== null ? "*" : e;
|
|
989
|
+
function jo(e) {
|
|
985
990
|
const { checkOrigin: t, remoteHost: n } = i[e];
|
|
986
|
-
Array.isArray(t) && t.length === 0 &&
|
|
991
|
+
Array.isArray(t) && t.length === 0 && w(
|
|
987
992
|
e,
|
|
988
993
|
"checkOrigin is an empty array — no messages will be sent to the iframe"
|
|
989
|
-
), i[e].targetOrigin = Array.isArray(t) ? t.map(
|
|
994
|
+
), i[e].targetOrigin = Array.isArray(t) ? t.map(pe) : [t === !1 ? "*" : pe(n)];
|
|
990
995
|
}
|
|
991
|
-
function
|
|
996
|
+
function Ro(e) {
|
|
992
997
|
const { id: t } = e;
|
|
993
998
|
i[t].postMessageTarget === null && (i[t].postMessageTarget = e.contentWindow);
|
|
994
999
|
}
|
|
995
1000
|
function H(e, t, n) {
|
|
996
|
-
P(i[e], t) && (
|
|
1001
|
+
P(i[e], t) && (y(
|
|
997
1002
|
e,
|
|
998
1003
|
`<rb>Deprecated option</>
|
|
999
1004
|
|
|
1000
|
-
The <b>${t}</> option has been renamed to <b>${n}</>. ${
|
|
1005
|
+
The <b>${t}</> option has been renamed to <b>${n}</>. ${Me}`
|
|
1001
1006
|
), i[e][n] = i[e][t], delete i[e][t]);
|
|
1002
1007
|
}
|
|
1003
|
-
function
|
|
1004
|
-
H(e,
|
|
1008
|
+
function Lo(e) {
|
|
1009
|
+
H(e, vt, zt), H(e, "onClose", "onBeforeClose"), H(e, "onClosed", "onAfterClose");
|
|
1005
1010
|
}
|
|
1006
|
-
const
|
|
1007
|
-
function
|
|
1011
|
+
const Ao = (e) => P(e, "onMouseEnter") || P(e, "onMouseLeave");
|
|
1012
|
+
function Po(e, t) {
|
|
1008
1013
|
const { id: n } = e;
|
|
1009
1014
|
i[n] = {
|
|
1010
1015
|
...i[n],
|
|
@@ -1012,22 +1017,22 @@ function Ao(e, t) {
|
|
|
1012
1017
|
remoteHost: e?.src.split("/").slice(0, 3).join("/"),
|
|
1013
1018
|
...B,
|
|
1014
1019
|
...Io(n, t),
|
|
1015
|
-
mouseEvents:
|
|
1016
|
-
mode:
|
|
1017
|
-
syncTitle:
|
|
1018
|
-
},
|
|
1020
|
+
mouseEvents: Ao(t),
|
|
1021
|
+
mode: Zn(t),
|
|
1022
|
+
syncTitle: _n(n)
|
|
1023
|
+
}, Lo(n), So(n), Mo(n, t), $o(n), Ro(e), jo(n);
|
|
1019
1024
|
}
|
|
1020
|
-
const
|
|
1025
|
+
const Co = "yes", he = "no";
|
|
1021
1026
|
function No(e) {
|
|
1022
1027
|
const { id: t } = e;
|
|
1023
1028
|
switch (u(
|
|
1024
1029
|
t,
|
|
1025
1030
|
`Iframe scrolling ${i[t]?.scrolling ? "enabled" : "disabled"} for ${t}`
|
|
1026
1031
|
), e.style.overflow = i[t]?.scrolling === !1 ? wt : q, i[t]?.scrolling) {
|
|
1027
|
-
case
|
|
1032
|
+
case kt:
|
|
1028
1033
|
break;
|
|
1029
1034
|
case !0:
|
|
1030
|
-
e.scrolling =
|
|
1035
|
+
e.scrolling = Co;
|
|
1031
1036
|
break;
|
|
1032
1037
|
case !1:
|
|
1033
1038
|
e.scrolling = he;
|
|
@@ -1036,36 +1041,36 @@ function No(e) {
|
|
|
1036
1041
|
e.scrolling = i[t]?.scrolling || he;
|
|
1037
1042
|
}
|
|
1038
1043
|
}
|
|
1039
|
-
function
|
|
1040
|
-
|
|
1044
|
+
function xo(e, t, n) {
|
|
1045
|
+
Po(t, n), u(e, `src: %c${t.srcdoc || t.src}`, l), Jn(e), No(t), po(e), ko(e, uo(e)), so(e), u(e, "Setup complete");
|
|
1041
1046
|
}
|
|
1042
|
-
function
|
|
1047
|
+
function _o(e, t) {
|
|
1043
1048
|
const { id: n } = e;
|
|
1044
|
-
b(n, "setup"),
|
|
1049
|
+
b(n, "setup"), no(n) && xo(n, e, t), Yt(n);
|
|
1045
1050
|
}
|
|
1046
|
-
function
|
|
1047
|
-
t.log ===
|
|
1051
|
+
function Fo(e, t) {
|
|
1052
|
+
t.log === ke ? t.log = !1 : t.log === Ie ? t.log = S : t.log === $e && (t.log = M);
|
|
1048
1053
|
const n = P(t, "log"), o = K(t.log), s = n ? o ? !0 : t.log : B.log;
|
|
1049
|
-
P(t, "logExpand") || (t.logExpand = n && o ? t.log === M : B.logExpand),
|
|
1054
|
+
P(t, "logExpand") || (t.logExpand = n && o ? t.log === M : B.logExpand), Yn(t), Vt({
|
|
1050
1055
|
enabled: s,
|
|
1051
1056
|
expand: t.logExpand,
|
|
1052
1057
|
iframeId: e
|
|
1053
|
-
}), o && !(t.log in
|
|
1058
|
+
}), o && !(t.log in Mt) && Zt(
|
|
1054
1059
|
e,
|
|
1055
1060
|
`Invalid value for options.log: Accepted values are "${M}" and "${S}"`
|
|
1056
1061
|
), t.log = s;
|
|
1057
1062
|
}
|
|
1058
|
-
function
|
|
1059
|
-
if (!
|
|
1060
|
-
return
|
|
1061
|
-
const n =
|
|
1062
|
-
return
|
|
1063
|
+
function Wo(e) {
|
|
1064
|
+
if (!Se(e)) throw new TypeError("Options is not an object");
|
|
1065
|
+
return to(), rn(e), (t) => {
|
|
1066
|
+
const n = sn(t, e);
|
|
1067
|
+
return de in t ? (b(n, "alreadySetup"), w(n, `Ignored iframe (${n}), already setup.`)) : (Fo(n, e), Pe(n, _o)(t, e)), t?.iframeResizer;
|
|
1063
1068
|
};
|
|
1064
1069
|
}
|
|
1065
1070
|
export {
|
|
1066
1071
|
Ie as LOG_COLLAPSED,
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1072
|
+
ke as LOG_DISABLED,
|
|
1073
|
+
$e as LOG_EXPANDED,
|
|
1074
|
+
Wo as default
|
|
1070
1075
|
};
|
|
1071
1076
|
//# sourceMappingURL=index.esm.js.map
|