@iframe-resizer/core 6.0.0-beta.2 → 6.0.0-beta.3

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