@iframe-resizer/child 6.0.0-beta.3 → 6.0.0-beta.5
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 +1 -1
- package/index.cjs.js +11 -13
- package/index.cjs.js.map +1 -1
- package/index.esm.js +687 -799
- package/index.esm.js.map +1 -1
- package/index.umd.js +11 -15
- package/index.umd.js.map +1 -1
- package/package.json +2 -1
package/index.esm.js
CHANGED
|
@@ -1,102 +1,42 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}, Ht = "setOffsetSize", Vt = "resizeObserver", Fe = "overflowObserver", Wt = "mutationObserver", Ut = "visibilityObserver", qn = "font-weight: bold;", He = "none", ct = "No change in content size detected", le = "[iFrameSizer]", Gt = le.length, Zn = Q, qt = 128, Zt = /* @__PURE__ */ new Set([
|
|
7
|
-
"head",
|
|
8
|
-
"body",
|
|
9
|
-
"meta",
|
|
10
|
-
"base",
|
|
11
|
-
"title",
|
|
12
|
-
"script",
|
|
13
|
-
"link",
|
|
14
|
-
"style",
|
|
15
|
-
"map",
|
|
16
|
-
"area",
|
|
17
|
-
"option",
|
|
18
|
-
"optgroup",
|
|
19
|
-
"template",
|
|
20
|
-
"track",
|
|
21
|
-
"wbr",
|
|
22
|
-
"nobr"
|
|
23
|
-
]), Yn = (e) => typeof e === ee, ze = (e, ...t) => setTimeout(() => e(...t), 0), Yt = (e) => {
|
|
24
|
-
let t = !1;
|
|
25
|
-
return function(...n) {
|
|
26
|
-
return t ? void 0 : (t = !0, e.apply(this, n));
|
|
27
|
-
};
|
|
28
|
-
}, ue = (e) => e, at = 1e3, P = (e) => Math.round(e * at) / at, Qt = (e) => e.charAt(0).toUpperCase() + e.slice(1), N = (e) => `${e}` != "" && e !== void 0, Qn = (e) => e(), Jn = (e) => e.toLowerCase();
|
|
29
|
-
function Kn(e) {
|
|
30
|
-
switch (!0) {
|
|
31
|
-
case !N(e):
|
|
32
|
-
return "";
|
|
33
|
-
case N(e.id):
|
|
34
|
-
return `${e.nodeName}#${e.id}`;
|
|
35
|
-
case N(e.name):
|
|
36
|
-
return `${e.nodeName} (${e.name}`;
|
|
37
|
-
case N(e.className):
|
|
38
|
-
return `${e.nodeName}.${e.className}`;
|
|
39
|
-
default:
|
|
40
|
-
return e.nodeName;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
const Xn = (e) => (
|
|
44
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
45
|
-
e?.__esModule ? e.default : e
|
|
46
|
-
), k = (e, t, n) => {
|
|
47
|
-
if (typeof e !== t)
|
|
48
|
-
throw new TypeError(`${n} is not a ${Qt(t)}`);
|
|
49
|
-
}, Jt = {
|
|
50
|
-
br: `
|
|
51
|
-
`,
|
|
52
|
-
rb: "\x1B[31;1m",
|
|
53
|
-
// red bold
|
|
54
|
-
bb: "\x1B[34;1m",
|
|
55
|
-
// blue bold
|
|
56
|
-
b: "\x1B[1m",
|
|
57
|
-
// bold
|
|
58
|
-
i: "\x1B[3m",
|
|
59
|
-
// italic
|
|
60
|
-
u: "\x1B[4m",
|
|
61
|
-
// underline
|
|
62
|
-
"/": "\x1B[m"
|
|
63
|
-
// reset
|
|
64
|
-
}, eo = Object.keys(Jt), to = new RegExp(`<(${eo.join("|")})>`, "gi"), no = (e, t) => Jt[t] ?? "", oo = (e) => e.replace(to, no), so = (e) => e.replaceAll("<br>", _e).replaceAll(/<\/?[^>]+>/gi, ""), ro = (e) => (t) => e(
|
|
65
|
-
Yn(t) ? window.chrome ? oo(t) : so(t) : t
|
|
66
|
-
);
|
|
67
|
-
let Ve = !0, lt = je;
|
|
68
|
-
const io = Xn($n), J = io({
|
|
69
|
-
label: `${je}(child)`,
|
|
1
|
+
import { esModuleInterop as vn, LABEL as Ne, createFormatAdvise as En, id as se, deprecate as On, BOLD as yn, CHILD_READY_MESSAGE as Sn, MESSAGE_ID as Re, MESSAGE_ID_LENGTH as zt, SEPARATOR as fe, AUTO as ie, NONE as Le, IGNORE_ATTR as j, isDef as ne, setMode as et, getModeData as I, VERSION as Y, getModeLabel as Rn, isolateUserCode as ue, READY_STATE_CHANGE as $t, SIZE_ATTR as Ce, FALSE as Mn, once as It, checkMode as Pe, round as C, INIT as ge, MOUSE_ENTER as Tn, MOUSE_LEAVE as zn, lower as $n, PAGE_HIDE as At, invoke as In, BEFORE_UNLOAD as An, MIN_SIZE as W, HEIGHT as me, IGNORE_TAGS as kt, capitalizeFirstLetter as kn, HEIGHT_EDGE as _e, WIDTH as Nt, WIDTH_EDGE as Lt, NO_CHANGE as tt, VISIBILITY_OBSERVER as Ct, RESIZE_OBSERVER as Pt, MUTATION_OBSERVER as _t, OVERFLOW_OBSERVER as De, SET_OFFSET_SIZE as Dt, PARENT_RESIZE_REQUEST as Bt, MANUAL_RESIZE_REQUEST as xt, SIZE_CHANGE_DETECTED as nt, ENABLE as Me, IGNORE_DISABLE_RESIZE as we, HEIGHT_CALC_MODE_DEFAULT as Nn, typeAssert as T, BOOLEAN as Ln, AUTO_RESIZE as Cn, STRING as he, NUMBER as P, FUNCTION as Be, PARENT_INFO as Ft, PARENT_INFO_STOP as Pn, SCROLL_BY as _n, SCROLL_TO as Dn, SCROLL_TO_OFFSET as Ht, MESSAGE as Te, CLOSE as Bn, NEW_LINE as Vt, OVERFLOW_ATTR as Gt, getElementName as xn, TITLE as Fn, NULL as Hn, EVENT_CANCEL_TIMER as Ut, IN_PAGE_LINK as Vn, OBJECT as Gn, getKey as ot, OFFSET_SIZE as rt, PAGE_INFO as Un, UNDEFINED as Wn } from "@iframe-resizer/common";
|
|
2
|
+
import qn, { NORMAL as q, HIGHLIGHT as c, FOREGROUND as w, BOLD as st, ITALIC as Zn } from "auto-console-group";
|
|
3
|
+
let xe = !0, it = Ne;
|
|
4
|
+
const jn = vn(qn), Z = jn({
|
|
5
|
+
label: `${Ne}(child)`,
|
|
70
6
|
expand: !1
|
|
71
7
|
});
|
|
72
|
-
function
|
|
73
|
-
|
|
8
|
+
function Yn(e) {
|
|
9
|
+
it = e.id || Ne, Z.label(`${it}`), Z.expand(e.expand), xe = e.enabled;
|
|
74
10
|
}
|
|
75
|
-
const
|
|
76
|
-
function
|
|
77
|
-
console.info(`%ciframe-resizer ${e}`,
|
|
11
|
+
const Wt = (e) => (...t) => xe ? Z[e](...t) : !0, a = Wt("log"), l = a, ce = Wt("debug");
|
|
12
|
+
function Qn(e, t) {
|
|
13
|
+
console.info(`%ciframe-resizer ${e}`, xe || t < 1 ? yn : q);
|
|
78
14
|
}
|
|
79
15
|
const {
|
|
80
|
-
assert:
|
|
81
|
-
endAutoGroup:
|
|
82
|
-
error:
|
|
83
|
-
errorBoundary:
|
|
84
|
-
event:
|
|
85
|
-
label:
|
|
86
|
-
purge:
|
|
87
|
-
warn:
|
|
88
|
-
} =
|
|
16
|
+
assert: Jn,
|
|
17
|
+
endAutoGroup: _,
|
|
18
|
+
error: qt,
|
|
19
|
+
errorBoundary: Fe,
|
|
20
|
+
event: m,
|
|
21
|
+
label: Zs,
|
|
22
|
+
purge: js,
|
|
23
|
+
warn: x
|
|
24
|
+
} = Z, Zt = En(se), O = (...e) => Z.warn(...e.map(Zt)), Kn = (...e) => (
|
|
89
25
|
// eslint-disable-next-line no-console
|
|
90
|
-
console.warn(...e.map(
|
|
91
|
-
),
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
26
|
+
console.warn(...e.map(Zt))
|
|
27
|
+
), He = On((e, t) => O(t));
|
|
28
|
+
He("Method");
|
|
29
|
+
He("Method", "replaced with");
|
|
30
|
+
He("Option");
|
|
31
|
+
const Ve = [];
|
|
32
|
+
function jt(e, t) {
|
|
33
|
+
a(`${e} event listener: %c${t}`, c);
|
|
34
|
+
}
|
|
35
|
+
const Yt = (e, t, n, o) => {
|
|
36
|
+
e.removeEventListener(t, n, o), jt("Removed", t);
|
|
37
|
+
}, N = (e, t, n, o = !1) => {
|
|
38
|
+
e.addEventListener(t, n, o), Ve.push(() => Yt(e, t, n, o)), jt("Added", t);
|
|
39
|
+
}, s = {
|
|
100
40
|
applySelectors: null,
|
|
101
41
|
firstRun: !0,
|
|
102
42
|
hasTags: !1,
|
|
@@ -119,70 +59,70 @@ const nn = (e, t, n, o) => {
|
|
|
119
59
|
onPageInfo: null,
|
|
120
60
|
onParentInfo: null
|
|
121
61
|
};
|
|
122
|
-
let
|
|
123
|
-
function
|
|
62
|
+
let ct = !1;
|
|
63
|
+
function at(e) {
|
|
124
64
|
const t = window?.iframeResizer?.targetOrigin || "*", n = Array.isArray(t) ? t : [t];
|
|
125
65
|
for (const o of n)
|
|
126
|
-
e.postMessage(
|
|
66
|
+
e.postMessage(Sn, o);
|
|
127
67
|
}
|
|
128
|
-
function
|
|
129
|
-
if (document.readyState === "loading" || !
|
|
68
|
+
function dt() {
|
|
69
|
+
if (document.readyState === "loading" || !s.firstRun || ct) return;
|
|
130
70
|
const { parent: e, top: t } = window;
|
|
131
|
-
|
|
71
|
+
m("ready"), a(
|
|
132
72
|
"Sending%c ready%c to parent from",
|
|
133
|
-
|
|
134
|
-
|
|
73
|
+
c,
|
|
74
|
+
w,
|
|
135
75
|
window.location.href
|
|
136
|
-
),
|
|
76
|
+
), at(e), e !== t && at(t), ct = !0;
|
|
137
77
|
}
|
|
138
|
-
const
|
|
139
|
-
window.jQuery !== void 0 &&
|
|
140
|
-
function
|
|
78
|
+
const lt = "iframeResize", Xn = (e) => Re === `${e.data}`.slice(0, zt), eo = () => lt in window || // @ts-ignore
|
|
79
|
+
window.jQuery !== void 0 && lt in window.jQuery.prototype, to = (e) => e.data.split(fe)[2] in { true: 1, false: 1 }, no = () => [document.documentElement, document.body], oo = ["min-height", "min-width", "max-height", "max-width"], ft = /* @__PURE__ */ new Set(), ro = (e) => !!e && e !== "0px" && e !== ie && e !== Le, Qt = (e) => e.tagName ? e.tagName.toLowerCase() : "unknown", Jt = (e, t) => window.getComputedStyle(e).getPropertyValue(t), so = (e, t) => ro(Jt(e, t));
|
|
80
|
+
function io(e, t) {
|
|
141
81
|
const n = e.style.getPropertyValue(t);
|
|
142
82
|
return n ? { source: "an inline style attribute", value: n } : null;
|
|
143
83
|
}
|
|
144
|
-
function
|
|
84
|
+
function co({
|
|
145
85
|
href: e
|
|
146
86
|
}) {
|
|
147
|
-
|
|
87
|
+
ft.has(e) || (a("Unable to access stylesheet:", e), ft.add(e));
|
|
148
88
|
}
|
|
149
|
-
function
|
|
89
|
+
function ao(e, t) {
|
|
150
90
|
for (const n of document.styleSheets)
|
|
151
91
|
try {
|
|
152
92
|
for (const o of n.cssRules || []) {
|
|
153
93
|
if (!("selectorText" in o)) continue;
|
|
154
|
-
const
|
|
155
|
-
if (!e.matches(
|
|
156
|
-
const
|
|
157
|
-
if (!
|
|
158
|
-
const { ownerNode:
|
|
94
|
+
const r = o;
|
|
95
|
+
if (!e.matches(r.selectorText)) continue;
|
|
96
|
+
const f = r.style.getPropertyValue(t);
|
|
97
|
+
if (!f) continue;
|
|
98
|
+
const { ownerNode: d } = n;
|
|
159
99
|
return {
|
|
160
|
-
source:
|
|
161
|
-
value:
|
|
100
|
+
source: d instanceof Element && d.tagName === "STYLE" ? "an inline <style> block" : `stylesheet (${n.href})`,
|
|
101
|
+
value: f
|
|
162
102
|
};
|
|
163
103
|
}
|
|
164
104
|
} catch {
|
|
165
|
-
|
|
105
|
+
co(n);
|
|
166
106
|
}
|
|
167
107
|
return {
|
|
168
108
|
source: "cross-origin stylesheet",
|
|
169
|
-
value:
|
|
109
|
+
value: Jt(e, t)
|
|
170
110
|
};
|
|
171
111
|
}
|
|
172
|
-
const
|
|
173
|
-
const { source: n, value: o } =
|
|
174
|
-
|
|
175
|
-
`The <b>${t}</> CSS property is set to <b>${o}</> on the <b><${
|
|
112
|
+
const lo = (e, t) => io(e, t) || ao(e, t), fo = (e, t) => {
|
|
113
|
+
const { source: n, value: o } = lo(e, t), r = Qt(e);
|
|
114
|
+
O(
|
|
115
|
+
`The <b>${t}</> CSS property is set to <b>${o}</> on the <b><${r}></> element via ${n}. This may cause issues with the correct operation of <i>iframe-resizer</>.
|
|
176
116
|
|
|
177
117
|
If you wish to restrict the size of the iframe, then you should set this property on the iframe element itself, not the content inside it.`
|
|
178
118
|
);
|
|
179
119
|
};
|
|
180
|
-
function
|
|
181
|
-
for (const e of
|
|
182
|
-
for (const t of
|
|
183
|
-
|
|
120
|
+
function uo() {
|
|
121
|
+
for (const e of no())
|
|
122
|
+
for (const t of oo)
|
|
123
|
+
a(`Checking <${Qt(e)}> for blocking CSS: ${t}`), so(e, t) && fo(e, t);
|
|
184
124
|
}
|
|
185
|
-
const
|
|
125
|
+
const go = ({
|
|
186
126
|
calculateWidth: e,
|
|
187
127
|
calculateHeight: t
|
|
188
128
|
}) => e === t, i = {
|
|
@@ -194,7 +134,7 @@ const Ro = ({
|
|
|
194
134
|
bodyPadding: "",
|
|
195
135
|
calculateHeight: !0,
|
|
196
136
|
calculateWidth: !1,
|
|
197
|
-
heightCalcMode:
|
|
137
|
+
heightCalcMode: ie,
|
|
198
138
|
ignoreSelector: "",
|
|
199
139
|
inPageLinks: !1,
|
|
200
140
|
logging: !1,
|
|
@@ -207,397 +147,345 @@ const Ro = ({
|
|
|
207
147
|
sizeSelector: "",
|
|
208
148
|
targetOrigin: "*",
|
|
209
149
|
tolerance: 0,
|
|
210
|
-
widthCalcMode:
|
|
150
|
+
widthCalcMode: ie,
|
|
211
151
|
onBeforeResize: void 0,
|
|
212
152
|
onMessage: () => {
|
|
213
|
-
|
|
153
|
+
x("onMessage function not defined");
|
|
214
154
|
},
|
|
215
155
|
onReady: () => {
|
|
216
156
|
}
|
|
217
157
|
};
|
|
218
|
-
function
|
|
158
|
+
function mo() {
|
|
219
159
|
try {
|
|
220
|
-
|
|
160
|
+
s.sameOrigin = i.mode === 1 || "iframeParentListener" in window.parent;
|
|
221
161
|
} catch {
|
|
222
|
-
|
|
162
|
+
a("Cross domain iframe detected");
|
|
223
163
|
}
|
|
224
164
|
}
|
|
225
|
-
let
|
|
226
|
-
function
|
|
165
|
+
let ut = 0;
|
|
166
|
+
function ho(e) {
|
|
227
167
|
const t = e.length === 1 ? "" : "s";
|
|
228
|
-
|
|
229
|
-
`%c[${
|
|
168
|
+
x(
|
|
169
|
+
`%c[${j}]%c found on %c${e.length}%c element${t}`,
|
|
230
170
|
st,
|
|
231
|
-
|
|
171
|
+
q,
|
|
232
172
|
st,
|
|
233
|
-
|
|
173
|
+
q
|
|
234
174
|
);
|
|
235
175
|
}
|
|
236
|
-
function
|
|
237
|
-
const e = document.querySelectorAll(`*[${
|
|
238
|
-
return t && e.length !==
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
let t = -559038744, n = 1103547984;
|
|
243
|
-
for (let o, s = 0; s < e.length; s++)
|
|
244
|
-
o = e.codePointAt(s), t = Math.imul(t ^ o, 2246822519), n = Math.imul(n ^ o, 3266489917);
|
|
245
|
-
return t ^= Math.imul(t ^ n >>> 15, 1935289751), n ^= Math.imul(n ^ t >>> 15, 3405138345), t ^= n >>> 16, n ^= t >>> 16, (2097152 * (n >>> 0) + (t >>> 11)).toString(36);
|
|
246
|
-
}, A = (e) => e.replace(
|
|
247
|
-
/[A-Za-z]/g,
|
|
248
|
-
(t) => String.fromCodePoint(
|
|
249
|
-
(t <= "Z" ? 90 : 122) >= (t = t.codePointAt(0) + 19) ? t : t - 26
|
|
250
|
-
)
|
|
251
|
-
), To = /* @__PURE__ */ new Date(), rn = (e) => new Set(Array.from({ length: 9 }, e)), pt = " - lewpylk", F = ["spjluzl", "rlf", "clyzpvu", "rlf2", "nlaMbssFlhy"], Ao = [
|
|
252
|
-
"<yi>Puchspk Spjluzl Rlf</><iy><iy>",
|
|
253
|
-
"<yi>Tpzzpun Spjluzl Rlf</><iy><iy>",
|
|
254
|
-
"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</>",
|
|
255
|
-
"<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</>.",
|
|
256
|
-
"<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.",
|
|
257
|
-
"Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz.",
|
|
258
|
-
"<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.",
|
|
259
|
-
"<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.",
|
|
260
|
-
"<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.",
|
|
261
|
-
"<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"
|
|
262
|
-
], Io = (e) => [
|
|
263
|
-
e[0],
|
|
264
|
-
...e.slice(1).map((t) => `${t}${pt}`),
|
|
265
|
-
`${e[4]}${pt}`,
|
|
266
|
-
...e.slice(1)
|
|
267
|
-
], No = Io(["NWSc3", "zvsv", "wyv", "ibzpulzz", "VLT"]), yt = Object.fromEntries(
|
|
268
|
-
[
|
|
269
|
-
"2cgs7fdf4xb",
|
|
270
|
-
"1c9ctcccr4z",
|
|
271
|
-
"1q2pc4eebgb",
|
|
272
|
-
"ueokt0969w",
|
|
273
|
-
"w2zxchhgqz",
|
|
274
|
-
"1umuxblj2e5",
|
|
275
|
-
"1foobarqaz",
|
|
276
|
-
"2b5sdlfhbev",
|
|
277
|
-
"zo4ui3arjo",
|
|
278
|
-
"oclbb4thgl",
|
|
279
|
-
"igb1wzrjqr"
|
|
280
|
-
].map((e, t) => [e, Math.max(0, t - 1)])
|
|
281
|
-
), Lo = /* @__PURE__ */ new Set([1, 6]), cn = To[A(F[4])](), Co = rn((e, t) => fe(`${cn + t}`)), jo = rn((e, t) => fe(`${cn - ++t}`)), Po = (e) => Co.has(e) ? 9 : jo.has(e) ? 5 : -2, Ge = (e) => Lo.has(e), T = (e) => A(Ao[e]), _o = (e) => A(No[e]), vt = (e) => A(F[e]), zt = (e) => {
|
|
282
|
-
const t = e[A(F[0])] || e[A(F[1])] || e[A(F[2])] || e[A(F[3])];
|
|
283
|
-
if (!t) return -1;
|
|
284
|
-
const n = t.split("-");
|
|
285
|
-
let o = (function(s = "", d = "") {
|
|
286
|
-
let c = -2;
|
|
287
|
-
const f = fe(A(s));
|
|
288
|
-
return f in yt && (c = yt[f]), c === 9 ? Po(d) : c;
|
|
289
|
-
})(...n);
|
|
290
|
-
return o === 0 || ((s) => s[2] === fe(s[0] + s[1]))(n) || (o = -2), o;
|
|
291
|
-
};
|
|
292
|
-
function xo(e, t, n) {
|
|
293
|
-
(!N(n) || t > -1 && e > t) && (ao(`v${K} (${_o(e)})`, e), e === 0 && uo(T(3)));
|
|
176
|
+
function po() {
|
|
177
|
+
const e = document.querySelectorAll(`*[${j}]`), t = e.length > 0;
|
|
178
|
+
return t && e.length !== ut && (ho(e), ut = e.length), t;
|
|
179
|
+
}
|
|
180
|
+
function bo(e, t, n) {
|
|
181
|
+
(!ne(n) || t > -1 && e > t) && (Qn(`v${Y} (${Rn(e)})`, e), e === 0 && Kn(I(3)));
|
|
294
182
|
}
|
|
295
|
-
function
|
|
183
|
+
function wo({
|
|
296
184
|
key: e,
|
|
297
185
|
key2: t,
|
|
298
186
|
mode: n,
|
|
299
187
|
version: o
|
|
300
188
|
}) {
|
|
301
|
-
const
|
|
302
|
-
let
|
|
303
|
-
switch (n = Math.max(
|
|
189
|
+
const r = n, f = ne(e) ? et({ key: e }) : -1, d = ne(t) ? et({ key: t }) : -1;
|
|
190
|
+
let u;
|
|
191
|
+
switch (n = Math.max(f, d), n) {
|
|
304
192
|
case -2:
|
|
305
193
|
case -1:
|
|
306
|
-
|
|
194
|
+
u = `${I(Math.min(f, d) + 2)}${I(2)}`, s.firstRun = !1;
|
|
307
195
|
break;
|
|
308
196
|
case 1:
|
|
309
197
|
case 2:
|
|
310
198
|
case 3:
|
|
311
|
-
|
|
199
|
+
u = I(6);
|
|
312
200
|
break;
|
|
313
201
|
case 4:
|
|
314
|
-
|
|
202
|
+
u = I(7);
|
|
315
203
|
break;
|
|
316
204
|
case 5:
|
|
317
|
-
|
|
205
|
+
u = I(8);
|
|
318
206
|
break;
|
|
319
207
|
}
|
|
320
|
-
if (n >= 0 &&
|
|
321
|
-
throw
|
|
208
|
+
if (n >= 0 && bo(n, r, o), (!ne(o) || !s.firstRun) && (u && O(u), n < 0))
|
|
209
|
+
throw O(I(9)), u.split("<br>")[0].replace(/<\/?[a-z][^>]*>|<\/>/gi, "");
|
|
322
210
|
i.mode = n;
|
|
323
211
|
}
|
|
324
|
-
const
|
|
212
|
+
const vo = "BackCompat", Eo = `<rb>Quirks Mode Detected</>
|
|
325
213
|
|
|
326
214
|
This iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.
|
|
327
215
|
|
|
328
216
|
For more information see <u>https://iframe-resizer.com/quirks-mode</>.
|
|
329
217
|
`;
|
|
330
|
-
function
|
|
331
|
-
document.compatMode ===
|
|
218
|
+
function Oo() {
|
|
219
|
+
document.compatMode === vo && O(Eo);
|
|
332
220
|
}
|
|
333
|
-
const
|
|
334
|
-
let
|
|
335
|
-
function
|
|
336
|
-
document.readyState ===
|
|
221
|
+
const yo = "complete";
|
|
222
|
+
let gt = !1;
|
|
223
|
+
function Kt(e) {
|
|
224
|
+
document.readyState === yo ? ue(e) : gt || N(
|
|
337
225
|
document,
|
|
338
|
-
|
|
339
|
-
() =>
|
|
340
|
-
),
|
|
226
|
+
$t,
|
|
227
|
+
() => Kt(e)
|
|
228
|
+
), gt = !0;
|
|
341
229
|
}
|
|
342
|
-
const
|
|
343
|
-
|
|
230
|
+
const So = () => {
|
|
231
|
+
l(`Set targetOrigin for parent: %c${i.targetOrigin}`, c), i.autoResize !== !0 && a("Auto Resize disabled");
|
|
344
232
|
};
|
|
345
|
-
function
|
|
346
|
-
|
|
233
|
+
function Xt() {
|
|
234
|
+
s.taggedElements = document.querySelectorAll(`[${Ce}]`), s.hasTags = s.taggedElements.length > 0, a(`Tagged elements found: %c${s.hasTags}`, c);
|
|
347
235
|
}
|
|
348
|
-
const
|
|
236
|
+
const Ro = `<rb>Legacy version detected on parent page</>
|
|
349
237
|
|
|
350
238
|
Detected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.
|
|
351
239
|
|
|
352
240
|
See <u>https://iframe-resizer.com/setup/</> for more details.
|
|
353
|
-
`,
|
|
241
|
+
`, Mo = (e) => `<b>Version mismatch</>
|
|
354
242
|
|
|
355
243
|
The parent and child pages are running different versions of <i>iframe resizer</>.
|
|
356
244
|
|
|
357
|
-
Parent page: ${e} - Child page: ${
|
|
245
|
+
Parent page: ${e} - Child page: ${Y}.
|
|
358
246
|
`;
|
|
359
|
-
function
|
|
360
|
-
!e || e === "" || e ===
|
|
247
|
+
function To({ version: e }) {
|
|
248
|
+
!e || e === "" || e === Mn ? O(Ro) : e !== Y && O(Mo(e));
|
|
361
249
|
}
|
|
362
|
-
const
|
|
363
|
-
function
|
|
364
|
-
if (!
|
|
365
|
-
const t =
|
|
366
|
-
|
|
250
|
+
const zo = It(() => O(I(4)));
|
|
251
|
+
function $o(e) {
|
|
252
|
+
if (!s.timerActive) return;
|
|
253
|
+
const t = C(performance.now() - s.totalTime), n = e === ge ? `Initialised iframe in %c${t}ms` : `Size calculated in %c${t}ms`;
|
|
254
|
+
a(n, c);
|
|
367
255
|
}
|
|
368
|
-
function
|
|
369
|
-
return e === void 0 ? e = i.targetOrigin :
|
|
256
|
+
function Io(e) {
|
|
257
|
+
return e === void 0 ? e = i.targetOrigin : a(`Message targetOrigin: %c${e}`, c), e;
|
|
370
258
|
}
|
|
371
|
-
function
|
|
372
|
-
const { mode: n } = i, { sameOrigin: o, target:
|
|
259
|
+
function Ao(e, t) {
|
|
260
|
+
const { mode: n } = i, { sameOrigin: o, target: r } = s;
|
|
373
261
|
if (o)
|
|
374
262
|
try {
|
|
375
|
-
window.parent.iframeParentListener(
|
|
376
|
-
} catch (
|
|
377
|
-
if (
|
|
378
|
-
else throw new Error(
|
|
263
|
+
window.parent.iframeParentListener(Re + e);
|
|
264
|
+
} catch (f) {
|
|
265
|
+
if (Pe(n)) zo();
|
|
266
|
+
else throw new Error(f);
|
|
379
267
|
return !1;
|
|
380
268
|
}
|
|
381
269
|
else {
|
|
382
|
-
|
|
383
|
-
const
|
|
384
|
-
for (const
|
|
385
|
-
|
|
270
|
+
Jn(r, "Internal error: postMessage target is undefined");
|
|
271
|
+
const f = Io(t), d = Array.isArray(f) ? f : [f];
|
|
272
|
+
for (const u of d)
|
|
273
|
+
r.postMessage(Re + e, u);
|
|
386
274
|
}
|
|
387
275
|
return !0;
|
|
388
276
|
}
|
|
389
|
-
function
|
|
390
|
-
const { parentId:
|
|
391
|
-
i.mode < -1 || !
|
|
392
|
-
`Sending message to parent page via ${
|
|
393
|
-
|
|
394
|
-
|
|
277
|
+
function en(e, t, n, o, r) {
|
|
278
|
+
const { parentId: f } = i, { sameOrigin: d } = s, u = `${e}:${t}`, b = `${f}:${u}:${n}${o === void 0 ? "" : `:${o}`}`;
|
|
279
|
+
i.mode < -1 || !Ao(b, r) || ($o(n), l(
|
|
280
|
+
`Sending message to parent page via ${d ? "sameOrigin" : "postMessage"}: %c%c${b}`,
|
|
281
|
+
Zn,
|
|
282
|
+
c
|
|
395
283
|
));
|
|
396
284
|
}
|
|
397
|
-
const
|
|
398
|
-
(e, t, n, o,
|
|
399
|
-
|
|
285
|
+
const v = Fe(
|
|
286
|
+
(e, t, n, o, r) => {
|
|
287
|
+
m(n), en(e, t, n, o, r), _();
|
|
400
288
|
}
|
|
401
|
-
),
|
|
402
|
-
function
|
|
403
|
-
|
|
289
|
+
), ko = (e) => v(0, 0, e.type, `${e.screenY}:${e.screenX}`);
|
|
290
|
+
function mt(e, t) {
|
|
291
|
+
a(`Add event listener: %c${t}`, c), N(window.document, e, ko);
|
|
404
292
|
}
|
|
405
|
-
function
|
|
293
|
+
function No({
|
|
406
294
|
mouseEvents: e
|
|
407
295
|
}) {
|
|
408
|
-
e === !0 && (
|
|
296
|
+
e === !0 && (mt(Tn, "Mouse Enter"), mt(zn, "Mouse Leave"));
|
|
409
297
|
}
|
|
410
|
-
const
|
|
411
|
-
function
|
|
412
|
-
e ||
|
|
298
|
+
const Lo = () => v(0, 0, An);
|
|
299
|
+
function Co({ persisted: e }) {
|
|
300
|
+
e || Lo(), m(At), l("Page persisted:", e), !e && Ve.forEach(In);
|
|
413
301
|
}
|
|
414
|
-
const
|
|
415
|
-
function
|
|
416
|
-
const { calculateHeight: n, calculateWidth: o } = i, { height:
|
|
417
|
-
return n &&
|
|
302
|
+
const Po = () => N(window, $n(At), Co), ht = (e, t) => !(Math.abs(e - t) <= i.tolerance);
|
|
303
|
+
function _o(e, t) {
|
|
304
|
+
const { calculateHeight: n, calculateWidth: o } = i, { height: r, width: f } = s;
|
|
305
|
+
return n && ht(r, e) || o && ht(f, t);
|
|
418
306
|
}
|
|
419
|
-
const
|
|
307
|
+
const A = [c, w, c], oe = {
|
|
420
308
|
height: 0,
|
|
421
309
|
width: 0
|
|
422
|
-
},
|
|
310
|
+
}, B = {
|
|
423
311
|
height: 0,
|
|
424
312
|
width: 0
|
|
425
313
|
};
|
|
426
|
-
function
|
|
427
|
-
return
|
|
314
|
+
function D(e, t, n) {
|
|
315
|
+
return B[e] = t, oe[e] = n, t;
|
|
428
316
|
}
|
|
429
|
-
function
|
|
317
|
+
function Do(e) {
|
|
430
318
|
const t = e.getOffset();
|
|
431
|
-
return t !== 0 &&
|
|
319
|
+
return t !== 0 && l(`Page offsetSize: %c${t}px`, c), t;
|
|
432
320
|
}
|
|
433
|
-
const
|
|
434
|
-
function
|
|
435
|
-
const { hasOverflow: t, hasTags: n, triggerLocked: o } =
|
|
436
|
-
let
|
|
321
|
+
const Bo = (e) => e.documentElementScroll() + Math.max(0, e.getOffset());
|
|
322
|
+
function tn(e) {
|
|
323
|
+
const { hasOverflow: t, hasTags: n, triggerLocked: o } = s, r = e.label, f = r === me, d = e.boundingClientRect(), u = Math.ceil(d), b = Math.floor(d), g = Bo(e), E = `HTML: %c${d}px %cPage: %c${g}px`;
|
|
324
|
+
let h;
|
|
437
325
|
switch (!0) {
|
|
438
326
|
case !e.enabled():
|
|
439
|
-
return Math.max(
|
|
327
|
+
return Math.max(g, W);
|
|
440
328
|
case n:
|
|
441
|
-
|
|
329
|
+
l("Found element with data-iframe-size attribute"), h = e.taggedElement();
|
|
442
330
|
break;
|
|
443
|
-
case (!t &&
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
331
|
+
case (!t && s.firstRun && B[r] === 0 && oe[r] === 0):
|
|
332
|
+
l(`Initial page size values: ${E}`, ...A), h = D(
|
|
333
|
+
r,
|
|
334
|
+
d,
|
|
335
|
+
g
|
|
448
336
|
);
|
|
449
337
|
break;
|
|
450
|
-
case (o &&
|
|
451
|
-
|
|
338
|
+
case (o && d === B[r] && g === oe[r]):
|
|
339
|
+
l(`Size unchanged: ${E}`, ...A), h = Math.max(d, g);
|
|
452
340
|
break;
|
|
453
|
-
case (
|
|
454
|
-
|
|
341
|
+
case (d === 0 && g !== 0):
|
|
342
|
+
l(`Page is hidden: ${E}`, ...A), h = g;
|
|
455
343
|
break;
|
|
456
|
-
case (!t &&
|
|
457
|
-
|
|
458
|
-
`Previous <html> size: %c${
|
|
459
|
-
|
|
460
|
-
),
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
344
|
+
case (!t && d !== B[r] && g <= oe[r]):
|
|
345
|
+
l(`New <html> size: ${E} `, ...A), l(
|
|
346
|
+
`Previous <html> size: %c${B[r]}px`,
|
|
347
|
+
c
|
|
348
|
+
), h = D(
|
|
349
|
+
r,
|
|
350
|
+
d,
|
|
351
|
+
g
|
|
464
352
|
);
|
|
465
353
|
break;
|
|
466
|
-
case !
|
|
467
|
-
|
|
354
|
+
case !f:
|
|
355
|
+
h = e.taggedElement();
|
|
468
356
|
break;
|
|
469
|
-
case (!t &&
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
357
|
+
case (!t && d < B[r]):
|
|
358
|
+
l(`<html> size decreased: ${E}`, ...A), h = D(
|
|
359
|
+
r,
|
|
360
|
+
d,
|
|
361
|
+
g
|
|
474
362
|
);
|
|
475
363
|
break;
|
|
476
|
-
case (
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
364
|
+
case (g === b || g === u):
|
|
365
|
+
l(`<html> size equals page size: ${E}`, ...A), h = D(
|
|
366
|
+
r,
|
|
367
|
+
d,
|
|
368
|
+
g
|
|
481
369
|
);
|
|
482
370
|
break;
|
|
483
|
-
case
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
371
|
+
case d > g:
|
|
372
|
+
l(`Page size < <html> size: ${E}`, ...A), h = D(
|
|
373
|
+
r,
|
|
374
|
+
d,
|
|
375
|
+
g
|
|
488
376
|
);
|
|
489
377
|
break;
|
|
490
378
|
case t:
|
|
491
|
-
|
|
379
|
+
l("Found elements possibly overflowing <html> "), h = e.taggedElement();
|
|
492
380
|
break;
|
|
493
381
|
default:
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
382
|
+
l(`Using <html> size: ${E}`, ...A), h = D(
|
|
383
|
+
r,
|
|
384
|
+
d,
|
|
385
|
+
g
|
|
498
386
|
);
|
|
499
387
|
}
|
|
500
|
-
return
|
|
388
|
+
return l(`Content ${r}: %c${h}px`, c), h += Do(e), Math.max(h, W);
|
|
501
389
|
}
|
|
502
|
-
const
|
|
503
|
-
let
|
|
504
|
-
function
|
|
390
|
+
const xo = 1e3, Fo = 5 * xo, Ho = 4, Vo = 10, Go = 100, Ge = "--ifr-start", ae = "--ifr-end", nn = "--ifr-measure", p = [];
|
|
391
|
+
let re = {}, pt = 0, ze;
|
|
392
|
+
function on() {
|
|
505
393
|
try {
|
|
506
|
-
performance.clearMarks(
|
|
394
|
+
performance.clearMarks(Ge), performance.clearMarks(ae), performance.clearMeasures(nn);
|
|
507
395
|
} catch {
|
|
508
396
|
}
|
|
509
397
|
}
|
|
510
|
-
function
|
|
511
|
-
|
|
512
|
-
if (p.length <
|
|
398
|
+
function Uo() {
|
|
399
|
+
ze = setInterval(() => {
|
|
400
|
+
if (p.length < Vo || re.hasTags && re.len < 25) return;
|
|
513
401
|
p.sort();
|
|
514
402
|
const e = Math.min(
|
|
515
403
|
p.reduce((n, o) => n + o, 0) / p.length,
|
|
516
404
|
p[Math.floor(p.length / 2)]
|
|
517
|
-
), t =
|
|
518
|
-
t >
|
|
405
|
+
), t = C(e);
|
|
406
|
+
t > pt && (pt = t, m("performanceObserver"), a("Mean time:", C(p[Math.floor(p.length / 2)])), a(
|
|
519
407
|
"Median time:",
|
|
520
|
-
|
|
521
|
-
),
|
|
408
|
+
C(p.reduce((n, o) => n + o, 0) / p.length)
|
|
409
|
+
), a("Average time:", t), a("Max time:", C(Math.max(...p)))), on(), !(e <= Ho) && (clearInterval(ze), O(
|
|
522
410
|
`<rb>Performance Warning</>
|
|
523
411
|
|
|
524
|
-
Calculating the page size is taking an excessive amount of time (${
|
|
412
|
+
Calculating the page size is taking an excessive amount of time (${C(e)}ms).
|
|
525
413
|
|
|
526
|
-
To improve performance add the <b>data-iframe-size</> attribute to the ${
|
|
414
|
+
To improve performance add the <b>data-iframe-size</> attribute to the ${re.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`
|
|
527
415
|
));
|
|
528
|
-
},
|
|
416
|
+
}, Fo);
|
|
529
417
|
}
|
|
530
|
-
function
|
|
418
|
+
function Wo(e) {
|
|
531
419
|
e.getEntries().forEach((t) => {
|
|
532
|
-
if (t.name ===
|
|
420
|
+
if (t.name === ae)
|
|
533
421
|
try {
|
|
534
422
|
const { duration: n } = performance.measure(
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
423
|
+
nn,
|
|
424
|
+
Ge,
|
|
425
|
+
ae
|
|
538
426
|
);
|
|
539
|
-
|
|
427
|
+
re = t.detail, p.push(n), p.length > Go && p.shift();
|
|
540
428
|
} catch {
|
|
541
429
|
}
|
|
542
430
|
});
|
|
543
431
|
}
|
|
544
|
-
function
|
|
545
|
-
|
|
546
|
-
const e = new PerformanceObserver(
|
|
547
|
-
return e.observe({ entryTypes: ["mark"] }),
|
|
432
|
+
function qo() {
|
|
433
|
+
l("Attached%c PerformanceObserver%c to page", c, w);
|
|
434
|
+
const e = new PerformanceObserver(Wo);
|
|
435
|
+
return e.observe({ entryTypes: ["mark"] }), Uo(), {
|
|
548
436
|
disconnect: () => {
|
|
549
|
-
|
|
437
|
+
on(), clearInterval(ze), e.disconnect(), l("Detached%c PerformanceObserver", c);
|
|
550
438
|
}
|
|
551
439
|
};
|
|
552
440
|
}
|
|
553
|
-
const
|
|
554
|
-
function
|
|
555
|
-
const { hasOverflow: e, hasTags: t, overflowedNodeSet: n, taggedElements: o } =
|
|
556
|
-
return t ? o : e ? Array.from(n) :
|
|
441
|
+
const Zo = (e) => `:not(${e})`, jo = `* ${Array.from(kt).map(Zo).join("")}`, Ue = (e) => e.querySelectorAll(jo);
|
|
442
|
+
function Yo() {
|
|
443
|
+
const { hasOverflow: e, hasTags: t, overflowedNodeSet: n, taggedElements: o } = s;
|
|
444
|
+
return t ? o : e ? Array.from(n) : Ue(document.documentElement);
|
|
557
445
|
}
|
|
558
|
-
function
|
|
446
|
+
function Qo(e, t) {
|
|
559
447
|
const n = `margin-${t}`;
|
|
560
|
-
let o,
|
|
561
|
-
for (const
|
|
562
|
-
o =
|
|
563
|
-
return { maxEl:
|
|
564
|
-
}
|
|
565
|
-
function
|
|
566
|
-
performance.mark(
|
|
567
|
-
const t =
|
|
568
|
-
return
|
|
448
|
+
let o, r = document.documentElement, f = s.hasTags ? W : document.documentElement.getBoundingClientRect().bottom;
|
|
449
|
+
for (const d of e)
|
|
450
|
+
o = d.getBoundingClientRect()[t] + parseFloat(getComputedStyle(d).getPropertyValue(n)), o > f && (f = o, r = d);
|
|
451
|
+
return { maxEl: r, maxVal: f };
|
|
452
|
+
}
|
|
453
|
+
function rn(e) {
|
|
454
|
+
performance.mark(Ge);
|
|
455
|
+
const t = kn(e), { logging: n } = i, { hasTags: o } = s, r = Yo(), { maxEl: f, maxVal: d } = Qo(r, e);
|
|
456
|
+
return l(`${t} position calculated from:`, f), l(`Checked %c${r.length}%c elements`, c, w), performance.mark(ae, {
|
|
569
457
|
detail: {
|
|
570
458
|
hasTags: o,
|
|
571
|
-
len:
|
|
459
|
+
len: r.length,
|
|
572
460
|
logging: n,
|
|
573
461
|
Side: t
|
|
574
462
|
}
|
|
575
|
-
}),
|
|
463
|
+
}), d;
|
|
576
464
|
}
|
|
577
|
-
const
|
|
578
|
-
label:
|
|
465
|
+
const We = {
|
|
466
|
+
label: me,
|
|
579
467
|
enabled: () => i.calculateHeight,
|
|
580
468
|
getOffset: () => i.offsetHeight,
|
|
581
|
-
auto: () =>
|
|
469
|
+
auto: () => tn(We),
|
|
582
470
|
boundingClientRect: () => Math.max(
|
|
583
471
|
document.documentElement.getBoundingClientRect().bottom,
|
|
584
472
|
document.body.getBoundingClientRect().bottom
|
|
585
473
|
),
|
|
586
474
|
documentElementScroll: () => document.documentElement.scrollHeight,
|
|
587
|
-
taggedElement: () =>
|
|
588
|
-
},
|
|
589
|
-
label:
|
|
475
|
+
taggedElement: () => rn(_e)
|
|
476
|
+
}, qe = {
|
|
477
|
+
label: Nt,
|
|
590
478
|
enabled: () => i.calculateWidth,
|
|
591
479
|
getOffset: () => i.offsetWidth,
|
|
592
|
-
auto: () =>
|
|
480
|
+
auto: () => tn(qe),
|
|
593
481
|
boundingClientRect: () => Math.max(
|
|
594
482
|
document.documentElement.getBoundingClientRect().right,
|
|
595
483
|
document.body.getBoundingClientRect().right
|
|
596
484
|
),
|
|
597
485
|
documentElementScroll: () => document.documentElement.scrollWidth,
|
|
598
|
-
taggedElement: () =>
|
|
486
|
+
taggedElement: () => rn(Lt)
|
|
599
487
|
};
|
|
600
|
-
function
|
|
488
|
+
function Jo(e, t, n) {
|
|
601
489
|
const o = i.onBeforeResize(e, t, n);
|
|
602
490
|
if (o === void 0)
|
|
603
491
|
throw new TypeError(
|
|
@@ -607,777 +495,777 @@ function vs(e, t, n) {
|
|
|
607
495
|
throw new TypeError(
|
|
608
496
|
`Invalid value returned from onBeforeResize(): ${o}, expected Number`
|
|
609
497
|
);
|
|
610
|
-
if (o <
|
|
498
|
+
if (o < W)
|
|
611
499
|
throw new RangeError(
|
|
612
|
-
`Out of range value returned from onBeforeResize(): ${o}, must be at least ${
|
|
500
|
+
`Out of range value returned from onBeforeResize(): ${o}, must be at least ${W}`
|
|
613
501
|
);
|
|
614
502
|
return o;
|
|
615
503
|
}
|
|
616
|
-
const
|
|
617
|
-
const
|
|
618
|
-
return e.enabled() && i.onBeforeResize !== void 0 ?
|
|
619
|
-
},
|
|
620
|
-
function
|
|
621
|
-
(window.scrollY !== 0 || window.scrollX !== 0) && (
|
|
622
|
-
}
|
|
623
|
-
function
|
|
624
|
-
const { heightCalcMode:
|
|
625
|
-
|
|
626
|
-
const
|
|
627
|
-
switch (
|
|
628
|
-
case
|
|
629
|
-
case
|
|
630
|
-
case
|
|
631
|
-
case
|
|
632
|
-
case
|
|
633
|
-
|
|
504
|
+
const sn = (e, t) => (n, o) => {
|
|
505
|
+
const r = e[n]();
|
|
506
|
+
return e.enabled() && i.onBeforeResize !== void 0 ? Jo(r, o, t) : r;
|
|
507
|
+
}, Ko = sn(We, me), Xo = sn(qe, Nt);
|
|
508
|
+
function er() {
|
|
509
|
+
(window.scrollY !== 0 || window.scrollX !== 0) && (l("Reset iframe scroll position to (0, 0)"), window.scrollTo(0, 0));
|
|
510
|
+
}
|
|
511
|
+
function tr(e, t, n, o) {
|
|
512
|
+
const { heightCalcMode: r, widthCalcMode: f } = i;
|
|
513
|
+
er();
|
|
514
|
+
const d = n ?? Ko(r, e), u = o ?? Xo(f, e), b = _o(d, u) ? nt : e;
|
|
515
|
+
switch (a(`Resize event: %c${t}`, c), b) {
|
|
516
|
+
case ge:
|
|
517
|
+
case Me:
|
|
518
|
+
case nt:
|
|
519
|
+
case xt:
|
|
520
|
+
case Bt:
|
|
521
|
+
s.height = d, s.width = u;
|
|
634
522
|
// eslint-disable-next-line no-fallthrough
|
|
635
|
-
case
|
|
636
|
-
return
|
|
523
|
+
case Dt:
|
|
524
|
+
return s;
|
|
637
525
|
// the following case needs {} to prevent a compile error on Next.js
|
|
638
|
-
case
|
|
639
|
-
case
|
|
640
|
-
case
|
|
641
|
-
case
|
|
642
|
-
|
|
526
|
+
case De:
|
|
527
|
+
case _t:
|
|
528
|
+
case Pt:
|
|
529
|
+
case Ct: {
|
|
530
|
+
a(tt);
|
|
643
531
|
break;
|
|
644
532
|
}
|
|
645
533
|
default:
|
|
646
|
-
|
|
534
|
+
l(tt);
|
|
647
535
|
}
|
|
648
536
|
return null;
|
|
649
537
|
}
|
|
650
|
-
let
|
|
651
|
-
function
|
|
652
|
-
const { autoResize:
|
|
653
|
-
switch (
|
|
538
|
+
let X = !1, ve = !1, V = null;
|
|
539
|
+
function nr(e, t, n, o, r) {
|
|
540
|
+
const { autoResize: f } = i, { isHidden: d } = s;
|
|
541
|
+
switch (m(e), !0) {
|
|
654
542
|
// Allow manual and parent resize requests to bypass the hidden check
|
|
655
|
-
case (
|
|
656
|
-
if (
|
|
657
|
-
|
|
543
|
+
case (d === !0 && !(e in we)): {
|
|
544
|
+
if (ve === !0) break;
|
|
545
|
+
a("Iframe hidden - Ignored resize request"), ve = !0, X = !1, cancelAnimationFrame(V), V = null;
|
|
658
546
|
break;
|
|
659
547
|
}
|
|
660
548
|
// Ignore overflowObserver here, as more efficient than using
|
|
661
549
|
// mutationObserver to detect OVERFLOW_ATTR changes
|
|
662
550
|
// Also allow manual and parent resize requests to bypass the pending check
|
|
663
|
-
case (
|
|
664
|
-
|
|
551
|
+
case (X === !0 && e !== De && !(e in we)): {
|
|
552
|
+
a("Resize already pending - Ignored resize request");
|
|
665
553
|
break;
|
|
666
554
|
}
|
|
667
|
-
case (!
|
|
668
|
-
|
|
555
|
+
case (!f && !(e in we)): {
|
|
556
|
+
l("Resizing disabled");
|
|
669
557
|
break;
|
|
670
558
|
}
|
|
671
559
|
default: {
|
|
672
|
-
|
|
673
|
-
const
|
|
560
|
+
ve = !1, X = !0, s.totalTime = performance.now(), s.timerActive = !0;
|
|
561
|
+
const u = tr(
|
|
674
562
|
e,
|
|
675
563
|
t,
|
|
676
564
|
n,
|
|
677
565
|
o
|
|
678
566
|
);
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
})),
|
|
567
|
+
u && en(u.height, u.width, e, r), V || (V = requestAnimationFrame(() => {
|
|
568
|
+
X = !1, V = null, m("requestAnimationFrame"), ce(`Reset sendPending: %c${e}`, c);
|
|
569
|
+
})), s.timerActive = !1;
|
|
682
570
|
}
|
|
683
571
|
}
|
|
684
|
-
|
|
572
|
+
_();
|
|
685
573
|
}
|
|
686
|
-
const
|
|
687
|
-
function
|
|
574
|
+
const z = Fe(nr);
|
|
575
|
+
function bt({
|
|
688
576
|
eventType: e,
|
|
689
577
|
eventName: t
|
|
690
578
|
}) {
|
|
691
|
-
|
|
579
|
+
N(window, t, () => z(t, e), { passive: !0 });
|
|
692
580
|
}
|
|
693
|
-
function
|
|
694
|
-
|
|
581
|
+
function or() {
|
|
582
|
+
bt({
|
|
695
583
|
eventType: "After Print",
|
|
696
584
|
eventName: "afterprint"
|
|
697
|
-
}),
|
|
585
|
+
}), bt({
|
|
698
586
|
eventType: "Before Print",
|
|
699
587
|
eventName: "beforeprint"
|
|
700
588
|
});
|
|
701
589
|
}
|
|
702
|
-
function
|
|
703
|
-
if (
|
|
704
|
-
|
|
590
|
+
function rr() {
|
|
591
|
+
if (s.triggerLocked) {
|
|
592
|
+
a("TriggerLock blocked calculation");
|
|
705
593
|
return;
|
|
706
594
|
}
|
|
707
|
-
|
|
708
|
-
|
|
595
|
+
s.triggerLocked = !0, ce("Trigger event lock on"), requestAnimationFrame(() => {
|
|
596
|
+
s.triggerLocked = !1, ce("Trigger event lock off");
|
|
709
597
|
});
|
|
710
598
|
}
|
|
711
|
-
function
|
|
712
|
-
const { heightCalcMode: t, widthCalcMode: n } = i, o =
|
|
713
|
-
|
|
599
|
+
function cn(e) {
|
|
600
|
+
const { heightCalcMode: t, widthCalcMode: n } = i, o = We[t](), r = qe[n]();
|
|
601
|
+
a(`Reset trigger event: %c${e}`, c), v(o, r, e);
|
|
714
602
|
}
|
|
715
|
-
function
|
|
603
|
+
function sr(e) {
|
|
716
604
|
const t = i.heightCalcMode;
|
|
717
|
-
|
|
605
|
+
a(`Reset trigger event: %c${e}`, c), i.heightCalcMode = Nn, rr(), cn("reset"), i.heightCalcMode = t;
|
|
718
606
|
}
|
|
719
|
-
const
|
|
720
|
-
function
|
|
721
|
-
|
|
607
|
+
const ir = `Auto Resize can not be changed when <b>direction</> is set to '${Le}'.`;
|
|
608
|
+
function cr(e) {
|
|
609
|
+
T(e, Ln, "parentIframe.autoResize(enable) enable");
|
|
722
610
|
const {
|
|
723
611
|
autoResize: t,
|
|
724
612
|
calculateHeight: n,
|
|
725
613
|
calculateWidth: o
|
|
726
614
|
} = i;
|
|
727
|
-
return o === !1 && n === !1 ? (
|
|
615
|
+
return o === !1 && n === !1 ? (m(Me), O(ir), !1) : (e === !0 && t === !1 ? (i.autoResize = !0, queueMicrotask(() => z(Me, "Auto Resize enabled"))) : e === !1 && t === !0 && (i.autoResize = !1), v(0, 0, Cn, JSON.stringify(i.autoResize)), i.autoResize);
|
|
728
616
|
}
|
|
729
|
-
function
|
|
730
|
-
|
|
617
|
+
function ar(e) {
|
|
618
|
+
T(e, he, "parentIframe.moveToAnchor(anchor) anchor"), s.inPageLinks.findTarget(e);
|
|
731
619
|
}
|
|
732
|
-
function
|
|
733
|
-
|
|
620
|
+
function dr(e) {
|
|
621
|
+
T(e, P, "parentIframe.setOffsetSize(offset) offset"), i.offsetHeight = e, i.offsetWidth = e, z(Dt, `parentIframe.setOffsetSize(${e})`);
|
|
734
622
|
}
|
|
735
|
-
const
|
|
736
|
-
function
|
|
737
|
-
|
|
623
|
+
const lr = () => s.origin;
|
|
624
|
+
function fr(e) {
|
|
625
|
+
T(
|
|
738
626
|
e,
|
|
739
|
-
|
|
627
|
+
he,
|
|
740
628
|
"parentIframe.setTargetOrigin(targetOrigin) targetOrigin"
|
|
741
|
-
),
|
|
629
|
+
), a(`Set targetOrigin: %c${e}`, c), i.targetOrigin = e;
|
|
742
630
|
}
|
|
743
|
-
function
|
|
744
|
-
return
|
|
631
|
+
function ur(e) {
|
|
632
|
+
return T(
|
|
745
633
|
e,
|
|
746
|
-
|
|
634
|
+
Be,
|
|
747
635
|
"parentIframe.getParentProps(callback) callback"
|
|
748
|
-
),
|
|
749
|
-
|
|
636
|
+
), s.onParentInfo = e, v(0, 0, Ft), () => {
|
|
637
|
+
s.onParentInfo = null, v(0, 0, Pn);
|
|
750
638
|
};
|
|
751
639
|
}
|
|
752
|
-
function
|
|
753
|
-
e !== void 0 &&
|
|
640
|
+
function gr(e, t) {
|
|
641
|
+
e !== void 0 && T(
|
|
754
642
|
e,
|
|
755
|
-
|
|
643
|
+
P,
|
|
756
644
|
"parentIframe.resize(customHeight, customWidth) customHeight"
|
|
757
|
-
), t !== void 0 &&
|
|
645
|
+
), t !== void 0 && T(
|
|
758
646
|
t,
|
|
759
|
-
|
|
647
|
+
P,
|
|
760
648
|
"parentIframe.resize(customHeight, customWidth) customWidth"
|
|
761
649
|
);
|
|
762
|
-
const n = e === void 0 ? "" : e, o = t === void 0 ? "" : `,${t}`,
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
`parentIframe.resize(${
|
|
650
|
+
const n = e === void 0 ? "" : e, o = t === void 0 ? "" : `,${t}`, r = `${n}${o}`;
|
|
651
|
+
z(
|
|
652
|
+
xt,
|
|
653
|
+
`parentIframe.resize(${r})`,
|
|
766
654
|
e,
|
|
767
655
|
t
|
|
768
656
|
);
|
|
769
657
|
}
|
|
770
|
-
const
|
|
771
|
-
|
|
772
|
-
},
|
|
773
|
-
function
|
|
774
|
-
t &&
|
|
658
|
+
const Ze = (e) => (t, n) => {
|
|
659
|
+
T(t, P, `parentIframe.${e}(x, y) x`), T(n, P, `parentIframe.${e}(x, y) y`), v(n, t, e);
|
|
660
|
+
}, mr = Ze(_n), hr = Ze(Dn), pr = Ze(Ht);
|
|
661
|
+
function br(e, t) {
|
|
662
|
+
t && T(
|
|
775
663
|
t,
|
|
776
|
-
|
|
664
|
+
he,
|
|
777
665
|
"parentIframe.sendMessage(msg, targetOrigin) targetOrigin"
|
|
778
|
-
),
|
|
666
|
+
), v(0, 0, Te, JSON.stringify(e), t);
|
|
779
667
|
}
|
|
780
|
-
const
|
|
781
|
-
function
|
|
782
|
-
const { win: e } =
|
|
668
|
+
const wr = () => v(0, 0, Bn), vr = () => i.parentId, Er = () => sr("parentIframe.reset");
|
|
669
|
+
function Or() {
|
|
670
|
+
const { win: e } = s;
|
|
783
671
|
i.mode !== 1 && (e.parentIframe = Object.freeze({
|
|
784
|
-
autoResize:
|
|
785
|
-
close:
|
|
786
|
-
getId:
|
|
787
|
-
getParentOrigin:
|
|
788
|
-
getParentProps:
|
|
789
|
-
moveToAnchor:
|
|
790
|
-
reset:
|
|
791
|
-
setOffsetSize:
|
|
792
|
-
scrollBy:
|
|
793
|
-
scrollTo:
|
|
794
|
-
scrollToOffset:
|
|
795
|
-
sendMessage:
|
|
796
|
-
setTargetOrigin:
|
|
797
|
-
resize:
|
|
672
|
+
autoResize: cr,
|
|
673
|
+
close: wr,
|
|
674
|
+
getId: vr,
|
|
675
|
+
getParentOrigin: lr,
|
|
676
|
+
getParentProps: ur,
|
|
677
|
+
moveToAnchor: ar,
|
|
678
|
+
reset: Er,
|
|
679
|
+
setOffsetSize: dr,
|
|
680
|
+
scrollBy: mr,
|
|
681
|
+
scrollTo: hr,
|
|
682
|
+
scrollToOffset: pr,
|
|
683
|
+
sendMessage: br,
|
|
684
|
+
setTargetOrigin: fr,
|
|
685
|
+
resize: gr
|
|
798
686
|
}));
|
|
799
687
|
}
|
|
800
|
-
const
|
|
801
|
-
n.size > 0 &&
|
|
688
|
+
const Q = (e = "") => (t) => (n) => {
|
|
689
|
+
n.size > 0 && ce(
|
|
802
690
|
`${t}Observer ${e}:`,
|
|
803
|
-
...Array.from(n).flatMap((o) => [
|
|
691
|
+
...Array.from(n).flatMap((o) => [Vt, o])
|
|
804
692
|
);
|
|
805
|
-
},
|
|
806
|
-
n.size > 0 &&
|
|
693
|
+
}, yr = (e = "") => (t) => (n) => {
|
|
694
|
+
n.size > 0 && qt(
|
|
807
695
|
`${t}Observer ${e}:`,
|
|
808
|
-
...Array.from(n).flatMap((o) => [
|
|
696
|
+
...Array.from(n).flatMap((o) => [Vt, o])
|
|
809
697
|
);
|
|
810
|
-
},
|
|
811
|
-
n > 0 &&
|
|
698
|
+
}, an = Q("attached to"), dn = yr("already attached"), Sr = Q("detached from"), pe = (e, t = !0) => (n) => {
|
|
699
|
+
n > 0 && l(
|
|
812
700
|
`${t ? "At" : "De"}tached %c${e}Observer%c ${t ? "to" : "from"} %c${n}%c element${n === 1 ? "" : "s"}`,
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
701
|
+
c,
|
|
702
|
+
q,
|
|
703
|
+
c,
|
|
704
|
+
q
|
|
817
705
|
);
|
|
818
|
-
},
|
|
819
|
-
const
|
|
820
|
-
return (
|
|
821
|
-
const
|
|
822
|
-
let
|
|
823
|
-
for (const
|
|
824
|
-
n.has(
|
|
825
|
-
|
|
706
|
+
}, ln = (e, t, n, o) => {
|
|
707
|
+
const r = Sr(e);
|
|
708
|
+
return (f) => {
|
|
709
|
+
const d = /* @__PURE__ */ new Set();
|
|
710
|
+
let u = 0;
|
|
711
|
+
for (const b of f)
|
|
712
|
+
n.has(b) && (t.unobserve(b), n.delete(b), d.add(b), u += 1);
|
|
713
|
+
r(d), o(u), d.clear();
|
|
826
714
|
};
|
|
827
|
-
},
|
|
715
|
+
}, wt = 16, vt = 2, Rr = 200, je = "Mutation", R = /* @__PURE__ */ new Set(), k = /* @__PURE__ */ new Set(), $e = /* @__PURE__ */ new Set(), de = [], Mr = {
|
|
828
716
|
attributes: !0,
|
|
829
|
-
attributeFilter: [
|
|
717
|
+
attributeFilter: [j, Ce],
|
|
830
718
|
attributeOldValue: !1,
|
|
831
719
|
characterData: !1,
|
|
832
720
|
characterDataOldValue: !1,
|
|
833
721
|
childList: !0,
|
|
834
722
|
subtree: !0
|
|
835
723
|
};
|
|
836
|
-
let
|
|
837
|
-
const
|
|
838
|
-
function
|
|
724
|
+
let Ee = 1, Ye, Ie = !1, Ae = 0;
|
|
725
|
+
const Tr = Q("added")(je), zr = Q("removed (page)")(je), $r = Q("removed (added)")(je), fn = (e) => e.nodeType !== Node.ELEMENT_NODE || kt.has(e.tagName.toLowerCase());
|
|
726
|
+
function Ir(e) {
|
|
839
727
|
const t = e.addedNodes;
|
|
840
728
|
for (const n of t)
|
|
841
|
-
|
|
729
|
+
fn(n) || R.add(n);
|
|
842
730
|
}
|
|
843
|
-
function
|
|
731
|
+
function Ar(e) {
|
|
844
732
|
const t = e.removedNodes;
|
|
845
733
|
for (const n of t)
|
|
846
|
-
|
|
734
|
+
fn(n) || (R.has(n) ? (R.delete(n), $e.add(n)) : k.add(n));
|
|
847
735
|
}
|
|
848
|
-
const
|
|
849
|
-
|
|
736
|
+
const kr = (e) => {
|
|
737
|
+
l("Mutations:", e);
|
|
850
738
|
for (const t of e)
|
|
851
|
-
|
|
852
|
-
|
|
739
|
+
Ir(t), Ar(t);
|
|
740
|
+
Tr(R), zr(k), $r($e), $e.clear();
|
|
853
741
|
};
|
|
854
|
-
function
|
|
855
|
-
|
|
856
|
-
`Detected %c${
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
),
|
|
860
|
-
`Found %c${
|
|
861
|
-
|
|
862
|
-
|
|
742
|
+
function Nr() {
|
|
743
|
+
k.size > 0 && a(
|
|
744
|
+
`Detected %c${k.size} %cremoved element${k.size > 1 ? "s" : ""}`,
|
|
745
|
+
c,
|
|
746
|
+
w
|
|
747
|
+
), R.size > 0 && a(
|
|
748
|
+
`Found %c${R.size} %cnew element${R.size > 1 ? "s" : ""}`,
|
|
749
|
+
c,
|
|
750
|
+
w
|
|
863
751
|
);
|
|
864
752
|
}
|
|
865
|
-
const
|
|
866
|
-
const t = performance.now(), n = t -
|
|
867
|
-
if (n > o && n <
|
|
868
|
-
|
|
869
|
-
`EventLoop busy time: %c${
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
), setTimeout(
|
|
753
|
+
const Lr = (e) => () => {
|
|
754
|
+
const t = performance.now(), n = t - Ae, o = wt * Ee++ + vt;
|
|
755
|
+
if (n > o && n < Rr) {
|
|
756
|
+
m("mutationThrottled"), l("Update delayed due to heavy workload on the callStack"), l(
|
|
757
|
+
`EventLoop busy time: %c${C(n)}ms %c> Max wait: %c${o - vt}ms`,
|
|
758
|
+
c,
|
|
759
|
+
w,
|
|
760
|
+
c
|
|
761
|
+
), setTimeout(Ye, wt * Ee), Ae = t;
|
|
874
762
|
return;
|
|
875
763
|
}
|
|
876
|
-
|
|
764
|
+
Ee = 1, de.forEach(kr), de.length = 0, Ie = !1, Nr(), e({ addedNodes: R, removedNodes: k }), R.clear(), k.clear();
|
|
877
765
|
};
|
|
878
|
-
function
|
|
879
|
-
|
|
766
|
+
function Cr(e) {
|
|
767
|
+
de.push(e), !Ie && (Ae = performance.now(), Ie = !0, requestAnimationFrame(Ye));
|
|
880
768
|
}
|
|
881
|
-
function
|
|
882
|
-
const t = new window.MutationObserver(
|
|
883
|
-
return
|
|
769
|
+
function Pr(e) {
|
|
770
|
+
const t = new window.MutationObserver(Cr), n = document.body || document.documentElement;
|
|
771
|
+
return Ye = Lr(e), t.observe(n, Mr), l("Attached%c MutationObserver%c to body", c, w), {
|
|
884
772
|
disconnect: () => {
|
|
885
|
-
|
|
773
|
+
R.clear(), k.clear(), de.length = 0, t.disconnect(), l("Detached%c MutationObserver", c);
|
|
886
774
|
}
|
|
887
775
|
};
|
|
888
776
|
}
|
|
889
|
-
const
|
|
777
|
+
const _r = {
|
|
890
778
|
characterData: !0,
|
|
891
779
|
childList: !0,
|
|
892
780
|
subtree: !0
|
|
893
781
|
};
|
|
894
|
-
function
|
|
782
|
+
function Dr(e) {
|
|
895
783
|
const t = document.querySelector("title") ?? document.head ?? document.documentElement, n = new MutationObserver(e);
|
|
896
|
-
return n.observe(t,
|
|
784
|
+
return n.observe(t, _r), l("Attached%c TitleObserver%c to head", c, w), setTimeout(e), {
|
|
897
785
|
disconnect: () => {
|
|
898
|
-
n.disconnect(),
|
|
786
|
+
n.disconnect(), l("Detached%c TitleObserver", c);
|
|
899
787
|
}
|
|
900
788
|
};
|
|
901
789
|
}
|
|
902
|
-
function
|
|
790
|
+
function Br(e) {
|
|
903
791
|
const t = new IntersectionObserver(
|
|
904
792
|
(o) => e(o.at(-1)?.isIntersecting ?? !1),
|
|
905
793
|
{
|
|
906
794
|
threshold: 0
|
|
907
795
|
}
|
|
908
796
|
), n = document.documentElement;
|
|
909
|
-
return t.observe(n),
|
|
797
|
+
return t.observe(n), l("Attached%c VisibilityObserver%c to page", c, w), {
|
|
910
798
|
disconnect: () => {
|
|
911
|
-
t.disconnect(),
|
|
799
|
+
t.disconnect(), l("Detached%c VisibilityObserver", c);
|
|
912
800
|
}
|
|
913
801
|
};
|
|
914
802
|
}
|
|
915
|
-
let
|
|
916
|
-
function
|
|
803
|
+
let Et = /* @__PURE__ */ new Set();
|
|
804
|
+
function xr(e) {
|
|
917
805
|
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
918
806
|
for (const o of e)
|
|
919
|
-
o.closest(`[${
|
|
807
|
+
o.closest(`[${j}]`) ? n.add(o) : t.add(o);
|
|
920
808
|
return n.size > 0 && queueMicrotask(() => {
|
|
921
|
-
|
|
922
|
-
`, n),
|
|
809
|
+
m("overflowIgnored"), l(`Ignoring elements with [data-iframe-ignore] > *:
|
|
810
|
+
`, n), _();
|
|
923
811
|
}), t;
|
|
924
812
|
}
|
|
925
|
-
function
|
|
926
|
-
const e = document.querySelectorAll(`[${
|
|
813
|
+
function un() {
|
|
814
|
+
const e = document.querySelectorAll(`[${Gt}]`), t = xr(e);
|
|
927
815
|
let n = !0;
|
|
928
|
-
return typeof Set.prototype.symmetricDifference ===
|
|
816
|
+
return typeof Set.prototype.symmetricDifference === Be && (n = t.symmetricDifference(Et).size > 0), Et = t, s.overflowedNodeSet = t, s.hasOverflow = t.size > 0, { hasOverflowUpdated: n, overflowedNodeSet: t };
|
|
929
817
|
}
|
|
930
|
-
const
|
|
818
|
+
const M = {}, gn = (e) => {
|
|
931
819
|
const t = /* @__PURE__ */ new Set();
|
|
932
820
|
for (const n of e)
|
|
933
821
|
if (n instanceof Element) {
|
|
934
822
|
t.add(n);
|
|
935
|
-
for (const o of
|
|
823
|
+
for (const o of Ue(n)) t.add(o);
|
|
936
824
|
}
|
|
937
|
-
return
|
|
825
|
+
return l(`Inspecting:
|
|
938
826
|
`, t), t;
|
|
939
|
-
},
|
|
827
|
+
}, Fr = (e) => {
|
|
940
828
|
if (e.size === 0) return;
|
|
941
|
-
|
|
942
|
-
const t =
|
|
943
|
-
|
|
944
|
-
},
|
|
829
|
+
m("addObservers");
|
|
830
|
+
const t = gn(e);
|
|
831
|
+
M.overflow.attachObservers(t), M.resize.attachObserverToNonStaticElements(t), _();
|
|
832
|
+
}, Hr = (e) => {
|
|
945
833
|
if (e.size === 0) return;
|
|
946
|
-
|
|
947
|
-
const t =
|
|
948
|
-
|
|
834
|
+
m("removeObservers");
|
|
835
|
+
const t = gn(e);
|
|
836
|
+
M.overflow.detachObservers(t), M.resize.detachObservers(t), _();
|
|
949
837
|
};
|
|
950
|
-
function
|
|
838
|
+
function Vr({
|
|
951
839
|
addedNodes: e,
|
|
952
840
|
removedNodes: t
|
|
953
841
|
}) {
|
|
954
|
-
|
|
842
|
+
m("contentMutated"), s.applySelectors(), Xt(), un(), _(), Hr(t), Fr(e);
|
|
955
843
|
}
|
|
956
|
-
function
|
|
957
|
-
|
|
844
|
+
function Gr(e) {
|
|
845
|
+
Vr(e), z(_t, "Mutation Observed");
|
|
958
846
|
}
|
|
959
|
-
const
|
|
960
|
-
const n = t.side, o = {
|
|
847
|
+
const J = "Overflow", Ur = pe(J), Wr = pe(J, !1), qr = an(J), Zr = dn(J), jr = (e) => e instanceof HTMLElement && (!!e.hidden || e.offsetParent === null || e.style.display === Le), Yr = (e, t) => {
|
|
848
|
+
const n = t.side || _e, o = {
|
|
961
849
|
root: t.root,
|
|
962
850
|
rootMargin: "0px",
|
|
963
851
|
threshold: 1
|
|
964
|
-
},
|
|
965
|
-
|
|
852
|
+
}, r = window?.requestAnimationFrame || se, f = (y = !1) => e(y), d = (y, $) => y === 0 || y > $[n], u = (y, $) => {
|
|
853
|
+
y.toggleAttribute(Gt, $);
|
|
966
854
|
};
|
|
967
|
-
function y
|
|
968
|
-
for (const $ of
|
|
969
|
-
const { boundingClientRect:
|
|
970
|
-
if (!
|
|
971
|
-
const
|
|
972
|
-
|
|
855
|
+
function b(y) {
|
|
856
|
+
for (const $ of y) {
|
|
857
|
+
const { boundingClientRect: F, rootBounds: H, target: S } = $;
|
|
858
|
+
if (!H) continue;
|
|
859
|
+
const bn = F[n], wn = d(bn, H) && !(S instanceof HTMLElement && jr(S));
|
|
860
|
+
u(S, wn);
|
|
973
861
|
}
|
|
974
|
-
|
|
862
|
+
r(f);
|
|
975
863
|
}
|
|
976
|
-
const
|
|
977
|
-
function
|
|
978
|
-
const $ = /* @__PURE__ */ new Set(),
|
|
979
|
-
let
|
|
980
|
-
for (const
|
|
981
|
-
if (
|
|
982
|
-
if (
|
|
983
|
-
$.add(
|
|
864
|
+
const g = new IntersectionObserver(b, o), E = /* @__PURE__ */ new WeakSet();
|
|
865
|
+
function h(y) {
|
|
866
|
+
const $ = /* @__PURE__ */ new Set(), F = /* @__PURE__ */ new Set();
|
|
867
|
+
let H = 0;
|
|
868
|
+
for (const S of y)
|
|
869
|
+
if (S instanceof Element) {
|
|
870
|
+
if (E.has(S)) {
|
|
871
|
+
$.add(S);
|
|
984
872
|
continue;
|
|
985
873
|
}
|
|
986
|
-
|
|
874
|
+
g.observe(S), E.add(S), F.add(S), H += 1;
|
|
987
875
|
}
|
|
988
|
-
|
|
876
|
+
Zr($), qr(F), Ur(H), F.clear(), $.clear();
|
|
989
877
|
}
|
|
990
878
|
return {
|
|
991
|
-
attachObservers:
|
|
992
|
-
detachObservers:
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
879
|
+
attachObservers: h,
|
|
880
|
+
detachObservers: ln(
|
|
881
|
+
J,
|
|
882
|
+
g,
|
|
883
|
+
E,
|
|
884
|
+
Wr
|
|
997
885
|
),
|
|
998
886
|
disconnect: () => {
|
|
999
|
-
|
|
887
|
+
g.disconnect(), l("Detached%c OverflowObserver", c);
|
|
1000
888
|
}
|
|
1001
889
|
};
|
|
1002
890
|
};
|
|
1003
|
-
function
|
|
1004
|
-
const { hasOverflow: e } =
|
|
891
|
+
function Qr() {
|
|
892
|
+
const { hasOverflow: e } = s, { hasOverflowUpdated: t, overflowedNodeSet: n } = un();
|
|
1005
893
|
switch (!0) {
|
|
1006
894
|
case !t:
|
|
1007
895
|
return;
|
|
1008
896
|
case n.size > 1:
|
|
1009
|
-
|
|
897
|
+
l("Overflowed Elements:", n);
|
|
1010
898
|
break;
|
|
1011
899
|
case e:
|
|
1012
900
|
break;
|
|
1013
901
|
default:
|
|
1014
|
-
|
|
902
|
+
l("No overflow detected");
|
|
1015
903
|
}
|
|
1016
|
-
|
|
904
|
+
z(De, "Overflow updated");
|
|
1017
905
|
}
|
|
1018
|
-
function
|
|
906
|
+
function Jr(e) {
|
|
1019
907
|
const t = {
|
|
1020
908
|
root: document.documentElement,
|
|
1021
|
-
side: i.calculateHeight ?
|
|
909
|
+
side: i.calculateHeight ? _e : Lt
|
|
1022
910
|
};
|
|
1023
|
-
return
|
|
911
|
+
return M.overflow = Yr(Qr, t), M.overflow.attachObservers(e), M.overflow;
|
|
1024
912
|
}
|
|
1025
|
-
const
|
|
1026
|
-
let
|
|
1027
|
-
function
|
|
913
|
+
const K = "Resize", Kr = pe(K), Xr = pe(K, !1), es = an(K), ts = dn(K), le = /* @__PURE__ */ new WeakSet(), Oe = /* @__PURE__ */ new Set(), ye = /* @__PURE__ */ new Set();
|
|
914
|
+
let U;
|
|
915
|
+
function ns(e) {
|
|
1028
916
|
let t = 0;
|
|
1029
917
|
for (const n of e) {
|
|
1030
918
|
if (!(n instanceof Element)) continue;
|
|
1031
919
|
const o = getComputedStyle(n)?.position;
|
|
1032
920
|
if (!(o === "" || o === "static")) {
|
|
1033
|
-
if (
|
|
1034
|
-
|
|
921
|
+
if (le.has(n)) {
|
|
922
|
+
Oe.add(n);
|
|
1035
923
|
continue;
|
|
1036
924
|
}
|
|
1037
|
-
|
|
925
|
+
U.observe(n), le.add(n), ye.add(n), t += 1;
|
|
1038
926
|
}
|
|
1039
927
|
}
|
|
1040
|
-
|
|
1041
|
-
}
|
|
1042
|
-
const
|
|
1043
|
-
attachObserverToNonStaticElements:
|
|
1044
|
-
detachObservers:
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
928
|
+
ts(Oe), es(ye), Kr(t), ye.clear(), Oe.clear();
|
|
929
|
+
}
|
|
930
|
+
const os = (e) => (U = new ResizeObserver(e), U.observe(document.body), le.add(document.body), l("Attached%c ResizeObserver%c to body", c, w), {
|
|
931
|
+
attachObserverToNonStaticElements: ns,
|
|
932
|
+
detachObservers: ln(
|
|
933
|
+
K,
|
|
934
|
+
U,
|
|
935
|
+
le,
|
|
936
|
+
Xr
|
|
1049
937
|
),
|
|
1050
938
|
disconnect: () => {
|
|
1051
|
-
|
|
939
|
+
U.disconnect(), l("Detached%c ResizeObserver", c);
|
|
1052
940
|
}
|
|
1053
941
|
});
|
|
1054
|
-
function
|
|
942
|
+
function rs(e) {
|
|
1055
943
|
if (!Array.isArray(e) || e.length === 0) return;
|
|
1056
944
|
const t = e[0].target;
|
|
1057
|
-
|
|
945
|
+
z(Pt, `Element resized <${xn(t)}>`);
|
|
1058
946
|
}
|
|
1059
|
-
function
|
|
1060
|
-
return
|
|
947
|
+
function ss(e) {
|
|
948
|
+
return M.resize = os(rs), M.resize.attachObserverToNonStaticElements(e), M.resize;
|
|
1061
949
|
}
|
|
1062
|
-
let
|
|
1063
|
-
function
|
|
950
|
+
let Ot;
|
|
951
|
+
function is() {
|
|
1064
952
|
const e = document.title;
|
|
1065
|
-
e !==
|
|
1066
|
-
}
|
|
1067
|
-
function
|
|
1068
|
-
|
|
1069
|
-
}
|
|
1070
|
-
function
|
|
1071
|
-
|
|
1072
|
-
}
|
|
1073
|
-
function
|
|
1074
|
-
|
|
1075
|
-
const e =
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
953
|
+
e !== Ot && (Ot = e, a(`Title: %c${e}`, c), e && v(0, 0, Fn, e));
|
|
954
|
+
}
|
|
955
|
+
function cs(e) {
|
|
956
|
+
a(`Visible: %c${e}`, c), s.isHidden = !e, z(Ct, "Visibility changed");
|
|
957
|
+
}
|
|
958
|
+
function as(e) {
|
|
959
|
+
Ve.push(...e.map((t) => t.disconnect));
|
|
960
|
+
}
|
|
961
|
+
function ds() {
|
|
962
|
+
m("attachObservers");
|
|
963
|
+
const e = Ue(document.documentElement), t = [
|
|
964
|
+
Pr(Gr),
|
|
965
|
+
Jr(e),
|
|
966
|
+
qo(),
|
|
967
|
+
ss(e),
|
|
968
|
+
Dr(is),
|
|
969
|
+
Br(cs)
|
|
1082
970
|
];
|
|
1083
|
-
|
|
971
|
+
as(t);
|
|
1084
972
|
}
|
|
1085
|
-
const
|
|
973
|
+
const yt = (e, t, n) => {
|
|
1086
974
|
if (n !== "") {
|
|
1087
|
-
|
|
975
|
+
a(`${e}: %c${n}`, c);
|
|
1088
976
|
for (const o of document.querySelectorAll(n))
|
|
1089
|
-
|
|
977
|
+
a(`Applying ${t} to:`, o), o.toggleAttribute(t, !0);
|
|
1090
978
|
}
|
|
1091
979
|
};
|
|
1092
|
-
function
|
|
980
|
+
function ls({
|
|
1093
981
|
sizeSelector: e,
|
|
1094
982
|
ignoreSelector: t
|
|
1095
983
|
}) {
|
|
1096
984
|
return () => {
|
|
1097
|
-
|
|
985
|
+
yt("sizeSelector", Ce, e), yt("ignoreSelector", j, t);
|
|
1098
986
|
};
|
|
1099
987
|
}
|
|
1100
|
-
function
|
|
988
|
+
function fs() {
|
|
1101
989
|
const e = document.createElement("div");
|
|
1102
990
|
e.style.clear = "both", e.style.display = "block", e.style.height = "0", document.body.append(e);
|
|
1103
991
|
}
|
|
1104
|
-
function
|
|
1105
|
-
return t.includes("-") && (
|
|
992
|
+
function us(e, t) {
|
|
993
|
+
return t.includes("-") && (x(`Negative CSS value ignored for ${e}`), t = ""), t;
|
|
1106
994
|
}
|
|
1107
|
-
function
|
|
1108
|
-
t === void 0 || t === "" || t ===
|
|
995
|
+
function ke(e, t) {
|
|
996
|
+
t === void 0 || t === "" || t === Hn || (document.body.style.setProperty(e, t), l(`Set body ${e}: %c${t}`, c));
|
|
1109
997
|
}
|
|
1110
|
-
function
|
|
998
|
+
function gs({
|
|
1111
999
|
bodyMarginStr: e,
|
|
1112
1000
|
bodyMargin: t
|
|
1113
1001
|
}) {
|
|
1114
|
-
e === void 0 && (e = `${t}px`),
|
|
1002
|
+
e === void 0 && (e = `${t}px`), ke("margin", us("margin", e));
|
|
1115
1003
|
}
|
|
1116
|
-
const
|
|
1004
|
+
const ms = () => ({
|
|
1117
1005
|
x: document.documentElement.scrollLeft,
|
|
1118
1006
|
y: document.documentElement.scrollTop
|
|
1119
1007
|
});
|
|
1120
|
-
function
|
|
1121
|
-
const t = e.getBoundingClientRect(), n =
|
|
1008
|
+
function hs(e) {
|
|
1009
|
+
const t = e.getBoundingClientRect(), n = ms();
|
|
1122
1010
|
return {
|
|
1123
1011
|
x: Math.round(t.left + n.x),
|
|
1124
1012
|
y: Math.round(t.top + n.y)
|
|
1125
1013
|
};
|
|
1126
1014
|
}
|
|
1127
|
-
function
|
|
1128
|
-
const n =
|
|
1129
|
-
|
|
1015
|
+
function ps(e, t) {
|
|
1016
|
+
const n = hs(t);
|
|
1017
|
+
a(
|
|
1130
1018
|
`Moving to in page link (%c#${e}%c) at x: %c${n.x}%c y: %c${n.y}`,
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
),
|
|
1137
|
-
}
|
|
1138
|
-
function
|
|
1019
|
+
c,
|
|
1020
|
+
w,
|
|
1021
|
+
c,
|
|
1022
|
+
w,
|
|
1023
|
+
c
|
|
1024
|
+
), v(n.y, n.x, Ht);
|
|
1025
|
+
}
|
|
1026
|
+
function Qe(e) {
|
|
1139
1027
|
const t = e.split("#")[1] || e, n = decodeURIComponent(t), o = document.getElementById(n) || document.getElementsByName(n)[0];
|
|
1140
1028
|
if (o !== void 0) {
|
|
1141
|
-
|
|
1029
|
+
ps(t, o);
|
|
1142
1030
|
return;
|
|
1143
1031
|
}
|
|
1144
|
-
|
|
1032
|
+
a(`In page link (#${t}) not found in iframe, so sending to parent`), v(0, 0, Vn, `#${t}`);
|
|
1145
1033
|
}
|
|
1146
|
-
function
|
|
1034
|
+
function mn() {
|
|
1147
1035
|
const { hash: e, href: t } = window.location;
|
|
1148
|
-
e !== "" && e !== "#" &&
|
|
1036
|
+
e !== "" && e !== "#" && Qe(t);
|
|
1149
1037
|
}
|
|
1150
|
-
function
|
|
1038
|
+
function bs() {
|
|
1151
1039
|
for (const e of document.querySelectorAll('a[href^="#"]'))
|
|
1152
|
-
e.getAttribute("href") !== "#" &&
|
|
1153
|
-
t.preventDefault(),
|
|
1040
|
+
e.getAttribute("href") !== "#" && N(e, "click", (t) => {
|
|
1041
|
+
t.preventDefault(), Qe(e.getAttribute("href"));
|
|
1154
1042
|
});
|
|
1155
1043
|
}
|
|
1156
|
-
function
|
|
1157
|
-
|
|
1044
|
+
function ws() {
|
|
1045
|
+
N(window, "hashchange", mn);
|
|
1158
1046
|
}
|
|
1159
|
-
function
|
|
1160
|
-
setTimeout(
|
|
1047
|
+
function vs() {
|
|
1048
|
+
setTimeout(mn, Ut);
|
|
1161
1049
|
}
|
|
1162
|
-
function
|
|
1163
|
-
|
|
1164
|
-
findTarget:
|
|
1050
|
+
function Es() {
|
|
1051
|
+
a("Setting up location.hash handlers"), bs(), ws(), vs(), s.inPageLinks = {
|
|
1052
|
+
findTarget: Qe
|
|
1165
1053
|
};
|
|
1166
1054
|
}
|
|
1167
|
-
function
|
|
1055
|
+
function Os(e) {
|
|
1168
1056
|
const { mode: t } = i;
|
|
1169
|
-
e ?
|
|
1057
|
+
e ? Pe(t) ? O(I(5)) : Es() : a("In page linking not enabled");
|
|
1170
1058
|
}
|
|
1171
|
-
const
|
|
1172
|
-
function
|
|
1173
|
-
const e = (t) => t.style.setProperty(
|
|
1174
|
-
e(document.documentElement), e(document.body),
|
|
1059
|
+
const ys = "important";
|
|
1060
|
+
function Ss() {
|
|
1061
|
+
const e = (t) => t.style.setProperty(me, ie, ys);
|
|
1062
|
+
e(document.documentElement), e(document.body), a("Set HTML & body height: %cauto !important", c);
|
|
1175
1063
|
}
|
|
1176
|
-
const
|
|
1064
|
+
const Je = (e) => (t, n) => {
|
|
1177
1065
|
if (n in t) {
|
|
1178
1066
|
if (typeof t[n] === e) return t[n];
|
|
1179
1067
|
throw new TypeError(`${n} is not a ${e}.`);
|
|
1180
1068
|
}
|
|
1181
|
-
},
|
|
1182
|
-
function
|
|
1069
|
+
}, Se = Je(Be), St = Je(P), ee = Je(he), Rs = (e) => e !== null && typeof e === Gn && !Array.isArray(e);
|
|
1070
|
+
function Ms(e) {
|
|
1183
1071
|
const { calculateHeight: t, calculateWidth: n } = i;
|
|
1184
|
-
let o,
|
|
1185
|
-
return typeof e?.offsetSize ===
|
|
1072
|
+
let o, r;
|
|
1073
|
+
return typeof e?.offsetSize === P && (t && (o = St(e, rt)), n && (r = St(e, rt))), { offsetHeight: o, offsetWidth: r };
|
|
1186
1074
|
}
|
|
1187
|
-
function
|
|
1188
|
-
|
|
1189
|
-
const { offsetHeight: t, offsetWidth: n } =
|
|
1075
|
+
function Ts(e) {
|
|
1076
|
+
a("Reading data from page:", Object.keys(e));
|
|
1077
|
+
const { offsetHeight: t, offsetWidth: n } = Ms(e);
|
|
1190
1078
|
return {
|
|
1191
1079
|
offsetHeight: t,
|
|
1192
1080
|
offsetWidth: n,
|
|
1193
|
-
ignoreSelector:
|
|
1194
|
-
[
|
|
1195
|
-
sizeSelector:
|
|
1196
|
-
targetOrigin:
|
|
1197
|
-
onBeforeResize:
|
|
1198
|
-
onMessage:
|
|
1199
|
-
onReady:
|
|
1081
|
+
ignoreSelector: ee(e, "ignoreSelector"),
|
|
1082
|
+
[ot(3)]: ee(e, ot(0)),
|
|
1083
|
+
sizeSelector: ee(e, "sizeSelector"),
|
|
1084
|
+
targetOrigin: ee(e, "targetOrigin"),
|
|
1085
|
+
onBeforeResize: Se(e, "onBeforeResize"),
|
|
1086
|
+
onMessage: Se(e, "onMessage"),
|
|
1087
|
+
onReady: Se(e, "onReady")
|
|
1200
1088
|
};
|
|
1201
1089
|
}
|
|
1202
|
-
function
|
|
1090
|
+
function zs() {
|
|
1203
1091
|
const { mode: e } = i;
|
|
1204
|
-
if (
|
|
1092
|
+
if (Pe(e)) return {};
|
|
1205
1093
|
const t = window.iframeResizer || window.iFrameResizer;
|
|
1206
|
-
return
|
|
1094
|
+
return Rs(t) ? Ts(t) : {};
|
|
1207
1095
|
}
|
|
1208
|
-
const
|
|
1096
|
+
const $s = (e) => e === "true", hn = (e) => (t) => t === void 0 ? void 0 : e(t), L = hn($s), G = hn(Number), Is = (e) => ({
|
|
1209
1097
|
parentId: e[0],
|
|
1210
1098
|
bodyMargin: G(e[1]),
|
|
1211
|
-
calculateWidth:
|
|
1212
|
-
logging:
|
|
1099
|
+
calculateWidth: L(e[2]),
|
|
1100
|
+
logging: L(e[3]),
|
|
1213
1101
|
// data[4] no longer used (was intervalTimer)
|
|
1214
|
-
autoResize:
|
|
1102
|
+
autoResize: L(e[6]),
|
|
1215
1103
|
bodyMarginStr: e[7],
|
|
1216
1104
|
// data[8] no longer used (was heightCalcMode)
|
|
1217
1105
|
bodyBackground: e[9],
|
|
1218
1106
|
bodyPadding: e[10],
|
|
1219
1107
|
tolerance: G(e[11]),
|
|
1220
|
-
inPageLinks:
|
|
1108
|
+
inPageLinks: L(e[12]),
|
|
1221
1109
|
// data[13] no longer used (was resizeFrom)
|
|
1222
1110
|
// data[14] no longer used (was widthCalcMode)
|
|
1223
|
-
mouseEvents:
|
|
1111
|
+
mouseEvents: L(e[15]),
|
|
1224
1112
|
offsetHeight: G(e[16]),
|
|
1225
1113
|
offsetWidth: G(e[17]),
|
|
1226
|
-
calculateHeight:
|
|
1114
|
+
calculateHeight: L(e[18]),
|
|
1227
1115
|
key: e[19],
|
|
1228
1116
|
version: e[20],
|
|
1229
1117
|
mode: G(e[21]),
|
|
1230
1118
|
// sizeSelector: data[22] // Now only available via page settings
|
|
1231
|
-
logExpand:
|
|
1119
|
+
logExpand: L(e[23])
|
|
1232
1120
|
});
|
|
1233
|
-
function
|
|
1121
|
+
function As(e) {
|
|
1234
1122
|
const { mode: t } = i;
|
|
1235
1123
|
e.forEach((n) => {
|
|
1236
1124
|
try {
|
|
1237
1125
|
n();
|
|
1238
1126
|
} catch (o) {
|
|
1239
1127
|
if (t < 0) throw o;
|
|
1240
|
-
|
|
1128
|
+
O(
|
|
1241
1129
|
`<rb>Error in setup function</>
|
|
1242
1130
|
<i>iframe-resizer</> detected an error during setup.
|
|
1243
1131
|
|
|
1244
1132
|
Please report the following error message at <u>https://github.com/davidjbradshaw/iframe-resizer/issues</>`
|
|
1245
|
-
),
|
|
1133
|
+
), qt(o);
|
|
1246
1134
|
}
|
|
1247
1135
|
});
|
|
1248
1136
|
}
|
|
1249
|
-
function
|
|
1137
|
+
function Rt(e) {
|
|
1250
1138
|
for (const [t, n] of Object.entries(e))
|
|
1251
1139
|
n !== void 0 && (i[t] = n);
|
|
1252
1140
|
}
|
|
1253
|
-
function
|
|
1141
|
+
function ks({
|
|
1254
1142
|
logExpand: e,
|
|
1255
1143
|
logging: t,
|
|
1256
1144
|
parentId: n = ""
|
|
1257
1145
|
}) {
|
|
1258
|
-
|
|
1146
|
+
Yn({ id: n, enabled: t, expand: e }), m("initReceived"), a(`Initialising iframe v${Y} ${window.location.href}`);
|
|
1259
1147
|
}
|
|
1260
|
-
function
|
|
1261
|
-
|
|
1148
|
+
function Ns(e) {
|
|
1149
|
+
m("ready"), Kt(It(e)), a("Initialization complete", (({ key: t, key2: n, ...o }) => o)(i));
|
|
1262
1150
|
}
|
|
1263
|
-
function
|
|
1151
|
+
function Ls({
|
|
1264
1152
|
bodyBackground: e,
|
|
1265
1153
|
bodyPadding: t,
|
|
1266
1154
|
inPageLinks: n,
|
|
1267
1155
|
onReady: o
|
|
1268
1156
|
}) {
|
|
1269
|
-
const
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
() =>
|
|
1277
|
-
() =>
|
|
1278
|
-
() =>
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
() =>
|
|
1283
|
-
|
|
1284
|
-
() =>
|
|
1285
|
-
|
|
1286
|
-
() =>
|
|
1287
|
-
() =>
|
|
1288
|
-
|
|
1157
|
+
const r = go(i), f = [
|
|
1158
|
+
po,
|
|
1159
|
+
mo,
|
|
1160
|
+
Oo,
|
|
1161
|
+
Xt,
|
|
1162
|
+
So,
|
|
1163
|
+
r ? se : uo,
|
|
1164
|
+
() => gs(i),
|
|
1165
|
+
() => ke("background", e),
|
|
1166
|
+
() => ke("padding", t),
|
|
1167
|
+
r ? se : Ss,
|
|
1168
|
+
fs,
|
|
1169
|
+
s.applySelectors,
|
|
1170
|
+
() => Os(n),
|
|
1171
|
+
or,
|
|
1172
|
+
() => No(i),
|
|
1173
|
+
Po,
|
|
1174
|
+
() => Or(),
|
|
1175
|
+
() => z(
|
|
1176
|
+
ge,
|
|
1289
1177
|
"Init message from host page",
|
|
1290
1178
|
void 0,
|
|
1291
1179
|
void 0,
|
|
1292
|
-
`${
|
|
1180
|
+
`${Y}:${i.mode}`
|
|
1293
1181
|
),
|
|
1294
|
-
|
|
1295
|
-
|
|
1182
|
+
ds,
|
|
1183
|
+
_
|
|
1296
1184
|
];
|
|
1297
|
-
|
|
1185
|
+
To(i), wo(i), As(f), Ns(o);
|
|
1298
1186
|
}
|
|
1299
|
-
function
|
|
1300
|
-
|
|
1187
|
+
function Cs(e) {
|
|
1188
|
+
s.firstRun && (Rt(Is(e)), ks(i), Rt(zs()), s.applySelectors = ls(i), Ls(i));
|
|
1301
1189
|
}
|
|
1302
|
-
function
|
|
1190
|
+
function Ps(e) {
|
|
1303
1191
|
if (document.readyState === "loading") {
|
|
1304
|
-
|
|
1192
|
+
a("Page not ready, ignoring init message");
|
|
1305
1193
|
return;
|
|
1306
1194
|
}
|
|
1307
|
-
const t = e.data.slice(
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
},
|
|
1311
|
-
}
|
|
1312
|
-
const { freeze:
|
|
1313
|
-
function
|
|
1314
|
-
const t =
|
|
1315
|
-
|
|
1316
|
-
}
|
|
1317
|
-
function
|
|
1318
|
-
const { onPageInfo: t } =
|
|
1319
|
-
|
|
1320
|
-
}
|
|
1321
|
-
function
|
|
1322
|
-
const { onParentInfo: t } =
|
|
1323
|
-
|
|
1324
|
-
}
|
|
1325
|
-
function
|
|
1326
|
-
if (
|
|
1327
|
-
|
|
1195
|
+
const t = e.data.slice(zt).split(fe);
|
|
1196
|
+
s.target = e.source, s.origin = e.origin, Cs(t), s.firstRun = !1, setTimeout(() => {
|
|
1197
|
+
s.initLock = !1;
|
|
1198
|
+
}, Ut);
|
|
1199
|
+
}
|
|
1200
|
+
const { freeze: _s } = Object, { parse: Ke } = JSON, Xe = (e) => _s(Ke(e)), pn = (e) => v(0, 0, `${e}Stop`), be = (e) => e.data.slice(e.data.indexOf(fe) + 1), Ds = (e) => to(e) ? ge : e.data.split("]")[1].split(fe)[0];
|
|
1201
|
+
function Bs(e) {
|
|
1202
|
+
const t = be(e);
|
|
1203
|
+
a("onMessage called from parent:%c", c, Xe(t)), ue(i.onMessage, Ke(t));
|
|
1204
|
+
}
|
|
1205
|
+
function xs(e) {
|
|
1206
|
+
const { onPageInfo: t } = s, n = be(e);
|
|
1207
|
+
a("PageInfo received from parent:", Xe(n)), t ? ue(t, Ke(n)) : pn(Un);
|
|
1208
|
+
}
|
|
1209
|
+
function Fs(e) {
|
|
1210
|
+
const { onParentInfo: t } = s, n = Xe(be(e));
|
|
1211
|
+
a("ParentInfo received from parent:", n), t ? ue(t, n) : pn(Ft);
|
|
1212
|
+
}
|
|
1213
|
+
function Hs() {
|
|
1214
|
+
if (s.initLock) {
|
|
1215
|
+
a("Page reset ignored by init");
|
|
1328
1216
|
return;
|
|
1329
1217
|
}
|
|
1330
|
-
|
|
1218
|
+
a("Page size reset by host page"), cn("resetPage");
|
|
1331
1219
|
}
|
|
1332
|
-
function
|
|
1333
|
-
|
|
1220
|
+
function Vs() {
|
|
1221
|
+
a("Resize requested by host page"), z(Bt, "Parent window requested size check");
|
|
1334
1222
|
}
|
|
1335
|
-
const
|
|
1336
|
-
init:
|
|
1337
|
-
reset:
|
|
1338
|
-
resize:
|
|
1339
|
-
moveToAnchor:
|
|
1340
|
-
inPageLink:
|
|
1223
|
+
const Mt = (e) => s.inPageLinks.findTarget(be(e)), Tt = {
|
|
1224
|
+
init: Ps,
|
|
1225
|
+
reset: Hs,
|
|
1226
|
+
resize: Vs,
|
|
1227
|
+
moveToAnchor: Mt,
|
|
1228
|
+
inPageLink: Mt,
|
|
1341
1229
|
// Backward compatibility
|
|
1342
|
-
pageInfo:
|
|
1343
|
-
parentInfo:
|
|
1344
|
-
message:
|
|
1230
|
+
pageInfo: xs,
|
|
1231
|
+
parentInfo: Fs,
|
|
1232
|
+
message: Bs
|
|
1345
1233
|
};
|
|
1346
|
-
function
|
|
1347
|
-
const { firstRun: t } =
|
|
1348
|
-
switch (
|
|
1349
|
-
case n in
|
|
1350
|
-
|
|
1234
|
+
function Gs(e) {
|
|
1235
|
+
const { firstRun: t } = s, n = Ds(e);
|
|
1236
|
+
switch (m(n), !0) {
|
|
1237
|
+
case n in Tt:
|
|
1238
|
+
Tt[n](e);
|
|
1351
1239
|
break;
|
|
1352
|
-
case (t &&
|
|
1353
|
-
|
|
1240
|
+
case (t && eo()):
|
|
1241
|
+
x(
|
|
1354
1242
|
`Ignored message of type "${n}". Received before initialization.`
|
|
1355
1243
|
);
|
|
1356
1244
|
break;
|
|
1357
1245
|
default:
|
|
1358
|
-
|
|
1246
|
+
x(
|
|
1359
1247
|
`Unexpected message (${e.data}), this is likely due to a newer version of iframe-resizer running on the parent page.`
|
|
1360
1248
|
);
|
|
1361
1249
|
}
|
|
1362
1250
|
}
|
|
1363
|
-
const
|
|
1364
|
-
|
|
1251
|
+
const te = Fe((e) => {
|
|
1252
|
+
Xn(e) && Gs(e);
|
|
1365
1253
|
});
|
|
1366
|
-
function
|
|
1254
|
+
function Us() {
|
|
1367
1255
|
if ("iframeChildListener" in window) {
|
|
1368
|
-
|
|
1256
|
+
x("Already setup");
|
|
1369
1257
|
return;
|
|
1370
1258
|
}
|
|
1371
1259
|
window.iframeChildListener = ((t) => {
|
|
1372
|
-
setTimeout(() =>
|
|
1373
|
-
}),
|
|
1260
|
+
setTimeout(() => te({ data: t, sameOrigin: !0 }));
|
|
1261
|
+
}), m("listen"), N(window, Te, te), N(document, $t, dt), dt();
|
|
1374
1262
|
function e(t) {
|
|
1375
|
-
return
|
|
1263
|
+
return te(t), s.win;
|
|
1376
1264
|
}
|
|
1377
1265
|
try {
|
|
1378
|
-
top?.document?.getElementById("banner") && (
|
|
1266
|
+
top?.document?.getElementById("banner") && (s.win = {}, window.mockMsgListener = e, Yt(window, Te, te), typeof window.define == "function" && window.define([], () => e));
|
|
1379
1267
|
} catch {
|
|
1380
1268
|
}
|
|
1381
1269
|
}
|
|
1382
|
-
typeof window !== Wn &&
|
|
1270
|
+
typeof window !== Wn && Us();
|
|
1383
1271
|
//# sourceMappingURL=index.esm.js.map
|