tinymce-first
Version:
一个简单的组件库
1,586 lines • 1.98 MB
JavaScript
import { watch as pP, defineComponent as mW, toRefs as gW, ref as pW, nextTick as E$, onMounted as hW, onBeforeUnmount as yW, onActivated as bW, onDeactivated as kW, h as A$, resolveComponent as wW, openBlock as _W, createBlock as CW } from "vue";
var SW = [
"onActivate",
"onAddUndo",
"onBeforeAddUndo",
"onBeforeExecCommand",
"onBeforeGetContent",
"onBeforeRenderUI",
"onBeforeSetContent",
"onBeforePaste",
"onBlur",
"onChange",
"onClearUndos",
"onClick",
"onContextMenu",
"onCopy",
"onCut",
"onDblclick",
"onDeactivate",
"onDirty",
"onDrag",
"onDragDrop",
"onDragEnd",
"onDragGesture",
"onDragOver",
"onDrop",
"onExecCommand",
"onFocus",
"onFocusIn",
"onFocusOut",
"onGetContent",
"onHide",
"onInit",
"onKeyDown",
"onKeyPress",
"onKeyUp",
"onLoadContent",
"onMouseDown",
"onMouseEnter",
"onMouseLeave",
"onMouseMove",
"onMouseOut",
"onMouseOver",
"onMouseUp",
"onNodeChange",
"onObjectResizeStart",
"onObjectResized",
"onObjectSelected",
"onPaste",
"onPostProcess",
"onPostRender",
"onPreProcess",
"onProgressState",
"onRedo",
"onRemove",
"onReset",
"onSaveContent",
"onSelectionChange",
"onSetAttrib",
"onSetContent",
"onShow",
"onSubmit",
"onUndo",
"onVisualAid"
], xW = function(kt) {
return SW.map(function(mr) {
return mr.toLowerCase();
}).indexOf(kt.toLowerCase()) !== -1;
}, zW = function(kt, mr, nr) {
Object.keys(mr).filter(xW).forEach(function(zn) {
var Qt = mr[zn];
typeof Qt == "function" && (zn === "onInit" ? Qt(kt, nr) : nr.on(zn.substring(2), function(Jr) {
return Qt(Jr, nr);
}));
});
}, TW = function(kt, mr, nr, zn) {
var Qt = kt.modelEvents ? kt.modelEvents : null, Jr = Array.isArray(Qt) ? Qt.join(" ") : Qt;
pP(zn, function(Nr, cn) {
nr && typeof Nr == "string" && Nr !== cn && Nr !== nr.getContent({ format: kt.outputFormat }) && nr.setContent(Nr);
}), nr.on(Jr || "change input undo redo", function() {
mr.emit("update:modelValue", nr.getContent({ format: kt.outputFormat }));
});
}, EW = function(kt, mr, nr, zn, Qt, Jr) {
zn.setContent(Jr()), nr.attrs["onUpdate:modelValue"] && TW(mr, nr, zn, Qt), zW(kt, nr.attrs, zn);
}, O$ = 0, B$ = function(kt) {
var mr = Date.now(), nr = Math.floor(Math.random() * 1e9);
return O$++, kt + "_" + nr + O$ + String(mr);
}, AW = function(kt) {
return kt !== null && kt.tagName.toLowerCase() === "textarea";
}, D$ = function(kt) {
return typeof kt > "u" || kt === "" ? [] : Array.isArray(kt) ? kt : kt.split(" ");
}, OW = function(kt, mr) {
return D$(kt).concat(D$(mr));
}, DW = function(kt) {
return kt == null;
}, R$ = function() {
return {
listeners: [],
scriptId: B$("tiny-script"),
scriptLoaded: !1
};
}, RW = function() {
var kt = R$(), mr = function(Qt, Jr, Nr, cn) {
var Et = Jr.createElement("script");
Et.referrerPolicy = "origin", Et.type = "application/javascript", Et.id = Qt, Et.src = Nr;
var no = function() {
Et.removeEventListener("load", no), cn();
};
Et.addEventListener("load", no), Jr.head && Jr.head.appendChild(Et);
}, nr = function(Qt, Jr, Nr) {
kt.scriptLoaded ? Nr() : (kt.listeners.push(Nr), Qt.getElementById(kt.scriptId) || mr(kt.scriptId, Qt, Jr, function() {
kt.listeners.forEach(function(cn) {
return cn();
}), kt.scriptLoaded = !0;
}));
}, zn = function() {
kt = R$();
};
return {
load: nr,
reinitialize: zn
};
}, BW = RW(), MW = function() {
return typeof window < "u" ? window : global;
}, Iw = function() {
var kt = MW();
return kt && kt.tinymce ? kt.tinymce : null;
}, FW = {
apiKey: String,
cloudChannel: String,
id: String,
init: Object,
initialValue: String,
inline: Boolean,
modelEvents: [String, Array],
plugins: [String, Array],
tagName: String,
toolbar: [String, Array],
modelValue: String,
disabled: Boolean,
tinymceScriptSrc: String,
outputFormat: {
type: String,
validator: function(kt) {
return kt === "html" || kt === "text";
}
}
}, $w = function() {
return $w = Object.assign || function(kt) {
for (var mr, nr = 1, zn = arguments.length; nr < zn; nr++) {
mr = arguments[nr];
for (var Qt in mr)
Object.prototype.hasOwnProperty.call(mr, Qt) && (kt[Qt] = mr[Qt]);
}
return kt;
}, $w.apply(this, arguments);
}, NW = function(kt, mr, nr, zn) {
return kt(zn || "div", {
id: mr,
ref: nr
});
}, PW = function(kt, mr, nr) {
return kt("textarea", {
id: mr,
visibility: "hidden",
ref: nr
});
}, IW = mW({
props: FW,
setup: function(kt, mr) {
var nr = kt.init ? $w({}, kt.init) : {}, zn = gW(kt), Qt = zn.disabled, Jr = zn.modelValue, Nr = zn.tagName, cn = pW(null), Et = null, no = kt.id || B$("tiny-vue"), zo = kt.init && kt.init.inline || kt.inline, qn = !!mr.attrs["onUpdate:modelValue"], mn = !0, _a = kt.initialValue ? kt.initialValue : "", Mt = "", nt = function(fr) {
return qn ? function() {
return Jr != null && Jr.value ? Jr.value : "";
} : function() {
return fr ? _a : Mt;
};
}, rn = function() {
var fr = nt(mn), ie = $w($w({}, nr), { readonly: kt.disabled, selector: "#" + no, plugins: OW(nr.plugins, kt.plugins), toolbar: kt.toolbar || nr.toolbar, inline: zo, setup: function(At) {
Et = At, At.on("init", function(Nn) {
return EW(Nn, kt, mr, At, Jr, fr);
}), typeof nr.setup == "function" && nr.setup(At);
} });
AW(cn.value) && (cn.value.style.visibility = ""), Iw().init(ie), mn = !1;
};
pP(Qt, function(fr) {
var ie;
Et !== null && (typeof ((ie = Et.mode) === null || ie === void 0 ? void 0 : ie.set) == "function" ? Et.mode.set(fr ? "readonly" : "design") : Et.setMode(fr ? "readonly" : "design"));
}), pP(Nr, function(fr) {
var ie;
qn || (Mt = Et.getContent()), (ie = Iw()) === null || ie === void 0 || ie.remove(Et), E$(function() {
return rn();
});
}), hW(function() {
if (Iw() !== null)
rn();
else if (cn.value && cn.value.ownerDocument) {
var fr = kt.cloudChannel ? kt.cloudChannel : "5", ie = kt.apiKey ? kt.apiKey : "no-api-key", At = DW(kt.tinymceScriptSrc) ? "https://cdn.tiny.cloud/1/" + ie + "/tinymce/" + fr + "/tinymce.min.js" : kt.tinymceScriptSrc;
BW.load(cn.value.ownerDocument, At, rn);
}
}), yW(function() {
Iw() !== null && Iw().remove(Et);
}), zo || (bW(function() {
mn || rn();
}), kW(function() {
var fr;
qn || (Mt = Et.getContent()), (fr = Iw()) === null || fr === void 0 || fr.remove(Et);
}));
var ht = function(fr) {
var ie;
Mt = Et.getContent(), (ie = Iw()) === null || ie === void 0 || ie.remove(Et), nr = $w($w({}, nr), fr), E$(function() {
return rn();
});
};
return mr.expose({
rerender: ht
}), function() {
return zo ? NW(A$, no, cn, kt.tagName) : PW(A$, no, cn);
};
}
}), R5 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function $W(kt) {
return kt && kt.__esModule && Object.prototype.hasOwnProperty.call(kt, "default") ? kt.default : kt;
}
var M$ = { exports: {} };
(function(kt) {
(function() {
var mr = function(e) {
if (e === null)
return "null";
if (e === void 0)
return "undefined";
var r = typeof e;
return r === "object" && (Array.prototype.isPrototypeOf(e) || e.constructor && e.constructor.name === "Array") ? "array" : r === "object" && (String.prototype.isPrototypeOf(e) || e.constructor && e.constructor.name === "String") ? "string" : r;
}, nr = function(e) {
return [
"undefined",
"boolean",
"number",
"string",
"function",
"xml",
"null"
].indexOf(e) !== -1;
}, zn = function(e, r) {
var a = Array.prototype.slice.call(e);
return a.sort(r);
}, Qt = function(e, r) {
return Jr(function(a, i) {
return e.eq(r(a), r(i));
});
}, Jr = function(e) {
return { eq: e };
}, Nr = Jr(function(e, r) {
return e === r;
}), cn = Nr, Et = function(e) {
return Jr(function(r, a) {
if (r.length !== a.length)
return !1;
for (var i = r.length, s = 0; s < i; s++)
if (!e.eq(r[s], a[s]))
return !1;
return !0;
});
}, no = function(e, r) {
return Qt(Et(e), function(a) {
return zn(a, r);
});
}, zo = function(e) {
return Jr(function(r, a) {
var i = Object.keys(r), s = Object.keys(a);
if (!no(cn).eq(i, s))
return !1;
for (var f = i.length, g = 0; g < f; g++) {
var y = i[g];
if (!e.eq(r[y], a[y]))
return !1;
}
return !0;
});
}, qn = Jr(function(e, r) {
if (e === r)
return !0;
var a = mr(e), i = mr(r);
return a !== i ? !1 : nr(a) ? e === r : a === "array" ? Et(qn).eq(e, r) : a === "object" ? zo(qn).eq(e, r) : !1;
}), mn = function(e) {
var r = typeof e;
return e === null ? "null" : r === "object" && (Array.prototype.isPrototypeOf(e) || e.constructor && e.constructor.name === "Array") ? "array" : r === "object" && (String.prototype.isPrototypeOf(e) || e.constructor && e.constructor.name === "String") ? "string" : r;
}, _a = function(e) {
return function(r) {
return mn(r) === e;
};
}, Mt = function(e) {
return function(r) {
return typeof r === e;
};
}, nt = function(e) {
return function(r) {
return e === r;
};
}, rn = _a("string"), ht = _a("object"), fr = _a("array"), ie = nt(null), At = Mt("boolean"), Nn = nt(void 0), Hn = function(e) {
return e == null;
}, yr = function(e) {
return !Hn(e);
}, Dt = Mt("function"), Pr = Mt("number"), $t = function() {
}, ja = function(e, r) {
return function() {
for (var a = [], i = 0; i < arguments.length; i++)
a[i] = arguments[i];
return e(r.apply(null, a));
};
}, te = function(e, r) {
return function(a) {
return e(r(a));
};
}, j = function(e) {
return function() {
return e;
};
}, ar = function(e) {
return e;
}, Cu = function(e, r) {
return e === r;
};
function dt(e) {
for (var r = [], a = 1; a < arguments.length; a++)
r[a - 1] = arguments[a];
return function() {
for (var i = [], s = 0; s < arguments.length; s++)
i[s] = arguments[s];
var f = r.concat(i);
return e.apply(null, f);
};
}
var gi = function(e) {
return function(r) {
return !e(r);
};
}, Xn = function(e) {
return function() {
throw new Error(e);
};
}, T = function(e) {
return e();
}, fa = function(e) {
e();
}, st = j(!1), Rt = j(!0), Su = function() {
return _c;
}, _c = function() {
var e = function(i) {
return i();
}, r = ar, a = {
fold: function(i, s) {
return i();
},
isSome: st,
isNone: Rt,
getOr: r,
getOrThunk: e,
getOrDie: function(i) {
throw new Error(i || "error: getOrDie called on none.");
},
getOrNull: j(null),
getOrUndefined: j(void 0),
or: r,
orThunk: e,
map: Su,
each: $t,
bind: Su,
exists: st,
forall: Rt,
filter: function() {
return Su();
},
toArray: function() {
return [];
},
toString: j("none()")
};
return a;
}(), Ar = function(e) {
var r = j(e), a = function() {
return s;
}, i = function(f) {
return f(e);
}, s = {
fold: function(f, g) {
return g(e);
},
isSome: Rt,
isNone: st,
getOr: r,
getOrThunk: r,
getOrDie: r,
getOrNull: r,
getOrUndefined: r,
or: a,
orThunk: a,
map: function(f) {
return Ar(f(e));
},
each: function(f) {
f(e);
},
bind: i,
exists: i,
forall: i,
filter: function(f) {
return f(e) ? s : _c;
},
toArray: function() {
return [e];
},
toString: function() {
return "some(" + e + ")";
}
};
return s;
}, ra = function(e) {
return e == null ? _c : Ar(e);
}, G = {
some: Ar,
none: Su,
from: ra
}, pi = Array.prototype.slice, qe = Array.prototype.indexOf, Pt = Array.prototype.push, Zc = function(e, r) {
return qe.call(e, r);
}, Ge = function(e, r) {
var a = Zc(e, r);
return a === -1 ? G.none() : G.some(a);
}, Ne = function(e, r) {
return Zc(e, r) > -1;
}, yt = function(e, r) {
for (var a = 0, i = e.length; a < i; a++) {
var s = e[a];
if (r(s, a))
return !0;
}
return !1;
}, ft = function(e, r) {
for (var a = e.length, i = new Array(a), s = 0; s < a; s++) {
var f = e[s];
i[s] = r(f, s);
}
return i;
}, Xe = function(e, r) {
for (var a = 0, i = e.length; a < i; a++) {
var s = e[a];
r(s, a);
}
}, or = function(e, r) {
for (var a = e.length - 1; a >= 0; a--) {
var i = e[a];
r(i, a);
}
}, Vn = function(e, r) {
for (var a = [], i = [], s = 0, f = e.length; s < f; s++) {
var g = e[s], y = r(g, s) ? a : i;
y.push(g);
}
return {
pass: a,
fail: i
};
}, Ft = function(e, r) {
for (var a = [], i = 0, s = e.length; i < s; i++) {
var f = e[i];
r(f, i) && a.push(f);
}
return a;
}, Tn = function(e, r, a) {
return or(e, function(i, s) {
a = r(a, i, s);
}), a;
}, Oe = function(e, r, a) {
return Xe(e, function(i, s) {
a = r(a, i, s);
}), a;
}, Se = function(e, r, a) {
for (var i = 0, s = e.length; i < s; i++) {
var f = e[i];
if (r(f, i))
return G.some(f);
if (a(f, i))
break;
}
return G.none();
}, vt = function(e, r) {
return Se(e, r, st);
}, Gt = function(e, r) {
for (var a = 0, i = e.length; a < i; a++) {
var s = e[a];
if (r(s, a))
return G.some(a);
}
return G.none();
}, Or = function(e) {
for (var r = [], a = 0, i = e.length; a < i; ++a) {
if (!fr(e[a]))
throw new Error("Arr.flatten item " + a + " was not an array, input: " + e);
Pt.apply(r, e[a]);
}
return r;
}, Vr = function(e, r) {
return Or(ft(e, r));
}, En = function(e, r) {
for (var a = 0, i = e.length; a < i; ++a) {
var s = e[a];
if (r(s, a) !== !0)
return !1;
}
return !0;
}, Ma = function(e) {
var r = pi.call(e, 0);
return r.reverse(), r;
}, hi = function(e, r) {
return Ft(e, function(a) {
return !Ne(r, a);
});
}, Ca = function(e, r) {
for (var a = {}, i = 0, s = e.length; i < s; i++) {
var f = e[i];
a[String(f)] = r(f, i);
}
return a;
}, Pn = function(e, r) {
var a = pi.call(e, 0);
return a.sort(r), a;
}, gn = function(e, r) {
return r >= 0 && r < e.length ? G.some(e[r]) : G.none();
}, Jn = function(e) {
return gn(e, 0);
}, Zr = function(e) {
return gn(e, e.length - 1);
}, $r = Dt(Array.from) ? Array.from : function(e) {
return pi.call(e);
}, $i = function(e, r) {
for (var a = 0; a < e.length; a++) {
var i = r(e[a], a);
if (i.isSome())
return i;
}
return G.none();
}, Vo = Object.keys, Uo = Object.hasOwnProperty, Ur = function(e, r) {
for (var a = Vo(e), i = 0, s = a.length; i < s; i++) {
var f = a[i], g = e[f];
r(g, f);
}
}, Li = function(e, r) {
return Cc(e, function(a, i) {
return {
k: i,
v: r(a, i)
};
});
}, Cc = function(e, r) {
var a = {};
return Ur(e, function(i, s) {
var f = r(i, s);
a[f.k] = f.v;
}), a;
}, Hi = function(e) {
return function(r, a) {
e[a] = r;
};
}, Yt = function(e, r, a, i) {
var s = {};
return Ur(e, function(f, g) {
(r(f, g) ? a : i)(f, g);
}), s;
}, pn = function(e, r) {
var a = {}, i = {};
return Yt(e, r, Hi(a), Hi(i)), {
t: a,
f: i
};
}, Sa = function(e, r) {
var a = {};
return Yt(e, r, Hi(a), $t), a;
}, xu = function(e, r) {
var a = [];
return Ur(e, function(i, s) {
a.push(r(i, s));
}), a;
}, cd = function(e) {
return xu(e, ar);
}, Sn = function(e, r) {
return Dr(e, r) ? G.from(e[r]) : G.none();
}, Dr = function(e, r) {
return Uo.call(e, r);
}, iu = function(e, r) {
return Dr(e, r) && e[r] !== void 0 && e[r] !== null;
}, sd = function(e, r, a) {
return a === void 0 && (a = qn), zo(a).eq(e, r);
}, yl = Array.isArray, zu = function(e) {
if (yl(e))
return e;
for (var r = [], a = 0, i = e.length; a < i; a++)
r[a] = e[a];
return r;
}, Jc = function(e, r, a) {
var i, s;
if (!e)
return !1;
if (a = a || e, e.length !== void 0) {
for (i = 0, s = e.length; i < s; i++)
if (r.call(a, e[i], i, e) === !1)
return !1;
} else
for (i in e)
if (Dr(e, i) && r.call(a, e[i], i, e) === !1)
return !1;
return !0;
}, Os = function(e, r) {
var a = [];
return Jc(e, function(i, s) {
a.push(r(i, s, e));
}), a;
}, Tu = function(e, r) {
var a = [];
return Jc(e, function(i, s) {
(!r || r(i, s, e)) && a.push(i);
}), a;
}, Qc = function(e, r) {
if (e) {
for (var a = 0, i = e.length; a < i; a++)
if (e[a] === r)
return a;
}
return -1;
}, bl = function(e, r, a, i) {
for (var s = Nn(a) ? e[0] : a, f = 0; f < e.length; f++)
s = r.call(i, s, e[f], f);
return s;
}, Fa = function(e, r, a) {
var i, s;
for (i = 0, s = e.length; i < s; i++)
if (r.call(a, e[i], i, e))
return i;
return -1;
}, Eu = function(e) {
return e[e.length - 1];
}, Zt = function() {
return Zt = Object.assign || function(r) {
for (var a, i = 1, s = arguments.length; i < s; i++) {
a = arguments[i];
for (var f in a)
Object.prototype.hasOwnProperty.call(a, f) && (r[f] = a[f]);
}
return r;
}, Zt.apply(this, arguments);
};
function uf(e, r) {
var a = {};
for (var i in e)
Object.prototype.hasOwnProperty.call(e, i) && r.indexOf(i) < 0 && (a[i] = e[i]);
if (e != null && typeof Object.getOwnPropertySymbols == "function")
for (var s = 0, i = Object.getOwnPropertySymbols(e); s < i.length; s++)
r.indexOf(i[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, i[s]) && (a[i[s]] = e[i[s]]);
return a;
}
function Au(e, r, a) {
if (a || arguments.length === 2)
for (var i = 0, s = r.length, f; i < s; i++)
(f || !(i in r)) && (f || (f = Array.prototype.slice.call(r, 0, i)), f[i] = r[i]);
return e.concat(f || Array.prototype.slice.call(r));
}
var Ou = function(e) {
var r = !1, a;
return function() {
for (var i = [], s = 0; s < arguments.length; s++)
i[s] = arguments[s];
return r || (r = !0, a = e.apply(null, i)), a;
};
}, jo = function(e, r, a, i) {
var s = e.isiOS() && /ipad/i.test(a) === !0, f = e.isiOS() && !s, g = e.isiOS() || e.isAndroid(), y = g || i("(pointer:coarse)"), k = s || !f && g && i("(min-device-width:768px)"), x = f || g && !k, B = r.isSafari() && e.isiOS() && /safari/i.test(a) === !1, M = !x && !k && !B;
return {
isiPad: j(s),
isiPhone: j(f),
isTablet: j(k),
isPhone: j(x),
isTouch: j(y),
isAndroid: e.isAndroid,
isiOS: e.isiOS,
isWebView: j(B),
isDesktop: j(M)
};
}, es = function(e, r) {
for (var a = 0; a < e.length; a++) {
var i = e[a];
if (i.test(r))
return i;
}
}, Rv = function(e, r) {
var a = es(e, r);
if (!a)
return {
major: 0,
minor: 0
};
var i = function(s) {
return Number(r.replace(a, "$" + s));
};
return Vi(i(1), i(2));
}, Ds = function(e, r) {
var a = String(r).toLowerCase();
return e.length === 0 ? ld() : Rv(e, a);
}, ld = function() {
return Vi(0, 0);
}, Vi = function(e, r) {
return {
major: e,
minor: r
};
}, Du = {
nu: Vi,
detect: Ds,
unknown: ld
}, it = function(e, r) {
return $i(r.brands, function(a) {
var i = a.brand.toLowerCase();
return vt(e, function(s) {
var f;
return i === ((f = s.brand) === null || f === void 0 ? void 0 : f.toLowerCase());
}).map(function(s) {
return {
current: s.name,
version: Du.nu(parseInt(a.version, 10), 0)
};
});
});
}, kl = function(e, r) {
var a = String(r).toLowerCase();
return vt(e, function(i) {
return i.search(a);
});
}, Bv = function(e, r) {
return kl(e, r).map(function(a) {
var i = Du.detect(a.versionRegexes, r);
return {
current: a.name,
version: i
};
});
}, cf = function(e, r) {
return kl(e, r).map(function(a) {
var i = Du.detect(a.versionRegexes, r);
return {
current: a.name,
version: i
};
});
}, Z = function(e, r) {
return e.substring(r);
}, ne = function(e, r, a) {
return r === "" || e.length >= r.length && e.substr(a, a + r.length) === r;
}, Me = function(e, r) {
return Ye(e, r) ? Z(e, r.length) : e;
}, Ve = function(e, r) {
return e.indexOf(r) !== -1;
}, Ye = function(e, r) {
return ne(e, r, 0);
}, wt = function(e) {
return function(r) {
return r.replace(e, "");
};
}, Bt = wt(/^\s+|\s+$/g), wr = wt(/^\s+/g), Tr = wt(/\s+$/g), Qr = function(e) {
return e.length > 0;
}, Gn = function(e) {
return !Qr(e);
}, ha = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/, Ui = function(e) {
return function(r) {
return Ve(r, e);
};
}, Ze = [
{
name: "Edge",
versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],
search: function(e) {
return Ve(e, "edge/") && Ve(e, "chrome") && Ve(e, "safari") && Ve(e, "applewebkit");
}
},
{
name: "Chrome",
brand: "Chromium",
versionRegexes: [
/.*?chrome\/([0-9]+)\.([0-9]+).*/,
ha
],
search: function(e) {
return Ve(e, "chrome") && !Ve(e, "chromeframe");
}
},
{
name: "IE",
versionRegexes: [
/.*?msie\ ?([0-9]+)\.([0-9]+).*/,
/.*?rv:([0-9]+)\.([0-9]+).*/
],
search: function(e) {
return Ve(e, "msie") || Ve(e, "trident");
}
},
{
name: "Opera",
versionRegexes: [
ha,
/.*?opera\/([0-9]+)\.([0-9]+).*/
],
search: Ui("opera")
},
{
name: "Firefox",
versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],
search: Ui("firefox")
},
{
name: "Safari",
versionRegexes: [
ha,
/.*?cpu os ([0-9]+)_([0-9]+).*/
],
search: function(e) {
return (Ve(e, "safari") || Ve(e, "mobile/")) && Ve(e, "applewebkit");
}
}
], zr = [
{
name: "Windows",
search: Ui("win"),
versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]
},
{
name: "iOS",
search: function(e) {
return Ve(e, "iphone") || Ve(e, "ipad");
},
versionRegexes: [
/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,
/.*cpu os ([0-9]+)_([0-9]+).*/,
/.*cpu iphone os ([0-9]+)_([0-9]+).*/
]
},
{
name: "Android",
search: Ui("android"),
versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/]
},
{
name: "OSX",
search: Ui("mac os x"),
versionRegexes: [/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]
},
{
name: "Linux",
search: Ui("linux"),
versionRegexes: []
},
{
name: "Solaris",
search: Ui("sunos"),
versionRegexes: []
},
{
name: "FreeBSD",
search: Ui("freebsd"),
versionRegexes: []
},
{
name: "ChromeOS",
search: Ui("cros"),
versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/]
}
], Rn = {
browsers: j(Ze),
oses: j(zr)
}, ri = "Edge", ts = "Chrome", en = "IE", hh = "Opera", Mv = "Firefox", Ru = "Safari", yh = function() {
return rs({
current: void 0,
version: Du.unknown()
});
}, rs = function(e) {
var r = e.current, a = e.version, i = function(s) {
return function() {
return r === s;
};
};
return {
current: r,
version: a,
isEdge: i(ri),
isChrome: i(ts),
isIE: i(en),
isOpera: i(hh),
isFirefox: i(Mv),
isSafari: i(Ru)
};
}, fd = {
unknown: yh,
nu: rs,
edge: j(ri),
chrome: j(ts),
ie: j(en),
opera: j(hh),
firefox: j(Mv),
safari: j(Ru)
}, Wo = "Windows", Fv = "iOS", Sg = "Android", dd = "Linux", Nv = "OSX", Rs = "Solaris", xg = "FreeBSD", Pv = "ChromeOS", Bs = function() {
return ec({
current: void 0,
version: Du.unknown()
});
}, ec = function(e) {
var r = e.current, a = e.version, i = function(s) {
return function() {
return r === s;
};
};
return {
current: r,
version: a,
isWindows: i(Wo),
isiOS: i(Fv),
isAndroid: i(Sg),
isOSX: i(Nv),
isLinux: i(dd),
isSolaris: i(Rs),
isFreeBSD: i(xg),
isChromeOS: i(Pv)
};
}, ns = {
unknown: Bs,
nu: ec,
windows: j(Wo),
ios: j(Fv),
android: j(Sg),
linux: j(dd),
osx: j(Nv),
solaris: j(Rs),
freebsd: j(xg),
chromeos: j(Pv)
}, vd = function(e, r, a) {
var i = Rn.browsers(), s = Rn.oses(), f = r.bind(function(k) {
return it(i, k);
}).orThunk(function() {
return Bv(i, e);
}).fold(fd.unknown, fd.nu), g = cf(s, e).fold(ns.unknown, ns.nu), y = jo(g, f, e, a);
return {
browser: f,
os: g,
deviceType: y
};
}, bh = { detect: vd }, kh = function(e) {
return window.matchMedia(e).matches;
}, wh = Ou(function() {
return bh.detect(navigator.userAgent, G.from(navigator.userAgentData), kh);
}), uu = function() {
return wh();
}, zg = navigator.userAgent, Iv = uu(), qo = Iv.browser, ji = Iv.os, Bu = Iv.deviceType, y1 = /WebKit/.test(zg) && !qo.isEdge(), yi = "FormData" in window && "FileReader" in window && "URL" in window && !!URL.createObjectURL, wl = zg.indexOf("Windows Phone") !== -1, rr = {
opera: qo.isOpera(),
webkit: y1,
ie: qo.isIE() || qo.isEdge() ? qo.version.major : !1,
gecko: qo.isFirefox(),
mac: ji.isOSX() || ji.isiOS(),
iOS: Bu.isiPad() || Bu.isiPhone(),
android: ji.isAndroid(),
contentEditable: !0,
transparentSrc: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
caretAfter: !0,
range: window.getSelection && "Range" in window,
documentMode: qo.isIE() ? document.documentMode || 7 : 10,
fileApi: yi,
ceFalse: !0,
cacheSuffix: null,
container: null,
experimentalShadowDom: !1,
canHaveCSP: !qo.isIE(),
desktop: Bu.isDesktop(),
windowsPhone: wl,
browser: {
current: qo.current,
version: qo.version,
isChrome: qo.isChrome,
isEdge: qo.isEdge,
isFirefox: qo.isFirefox,
isIE: qo.isIE,
isOpera: qo.isOpera,
isSafari: qo.isSafari
},
os: {
current: ji.current,
version: ji.version,
isAndroid: ji.isAndroid,
isChromeOS: ji.isChromeOS,
isFreeBSD: ji.isFreeBSD,
isiOS: ji.isiOS,
isLinux: ji.isLinux,
isOSX: ji.isOSX,
isSolaris: ji.isSolaris,
isWindows: ji.isWindows
},
deviceType: {
isDesktop: Bu.isDesktop,
isiPad: Bu.isiPad,
isiPhone: Bu.isiPhone,
isPhone: Bu.isPhone,
isTablet: Bu.isTablet,
isTouch: Bu.isTouch,
isWebView: Bu.isWebView
}
}, b1 = /^\s*|\s*$/g, _h = function(e) {
return e == null ? "" : ("" + e).replace(b1, "");
}, An = function(e, r) {
return r ? r === "array" && yl(e) ? !0 : typeof e === r : e !== void 0;
}, Tg = function(e, r, a) {
var i;
for (e = e || [], r = r || ",", typeof e == "string" && (e = e.split(r)), a = a || {}, i = e.length; i--; )
a[e[i]] = {};
return a;
}, $v = Dr, k1 = function(e, r, a) {
var i = this, s, f, g, y = 0;
e = /^((static) )?([\w.]+)(:([\w.]+))?/.exec(e);
var k = e[3].match(/(^|\.)(\w+)$/i)[2], x = i.createNS(e[3].replace(/\.\w+$/, ""), a);
if (!x[k]) {
if (e[2] === "static") {
x[k] = r, this.onCreate && this.onCreate(e[2], e[3], x[k]);
return;
}
r[k] || (r[k] = function() {
}, y = 1), x[k] = r[k], i.extend(x[k].prototype, r), e[5] && (s = i.resolve(e[5]).prototype, f = e[5].match(/\.(\w+)$/i)[1], g = x[k], y ? x[k] = function() {
return s[f].apply(this, arguments);
} : x[k] = function() {
return this.parent = s[f], g.apply(this, arguments);
}, x[k].prototype[k] = x[k], i.each(s, function(B, M) {
x[k].prototype[M] = s[M];
}), i.each(r, function(B, M) {
s[M] ? x[k].prototype[M] = function() {
return this.parent = s[M], B.apply(this, arguments);
} : M !== k && (x[k].prototype[M] = B);
})), i.each(r.static, function(B, M) {
x[k][M] = B;
});
}
}, In = function(e) {
for (var r = [], a = 1; a < arguments.length; a++)
r[a - 1] = arguments[a];
for (var i = 0; i < r.length; i++) {
var s = r[i];
for (var f in s)
if (Dr(s, f)) {
var g = s[f];
g !== void 0 && (e[f] = g);
}
}
return e;
}, as = function(e, r, a, i) {
i = i || this, e && (a && (e = e[a]), Jc(e, function(s, f) {
if (r.call(i, s, f, a) === !1)
return !1;
as(s, r, a, i);
}));
}, w1 = function(e, r) {
var a, i;
for (r = r || window, e = e.split("."), a = 0; a < e.length; a++)
i = e[a], r[i] || (r[i] = {}), r = r[i];
return r;
}, Lv = function(e, r) {
var a, i;
for (r = r || window, e = e.split("."), a = 0, i = e.length; a < i && (r = r[e[a]], !!r); a++)
;
return r;
}, Wa = function(e, r) {
return !e || An(e, "array") ? e : Os(e.split(r || ","), _h);
}, _l = function(e) {
var r = rr.cacheSuffix;
return r && (e += (e.indexOf("?") === -1 ? "?" : "&") + r), e;
}, _e = {
trim: _h,
isArray: yl,
is: An,
toArray: zu,
makeMap: Tg,
each: Jc,
map: Os,
grep: Tu,
inArray: Qc,
hasOwn: $v,
extend: In,
create: k1,
walk: as,
createNS: w1,
resolve: Lv,
explode: Wa,
_addCacheSuffix: _l
}, md = function(e, r) {
var a = r || document, i = a.createElement("div");
if (i.innerHTML = e, !i.hasChildNodes() || i.childNodes.length > 1)
throw console.error("HTML does not have a single root node", e), new Error("HTML must have a single root node");
return Cl(i.childNodes[0]);
}, Na = function(e, r) {
var a = r || document, i = a.createElement(e);
return Cl(i);
}, _1 = function(e, r) {
var a = r || document, i = a.createTextNode(e);
return Cl(i);
}, Cl = function(e) {
if (e == null)
throw new Error("Node cannot be null or undefined");
return { dom: e };
}, O = function(e, r, a) {
return G.from(e.dom.elementFromPoint(r, a)).map(Cl);
}, D = {
fromHtml: md,
fromTag: Na,
fromText: _1,
fromDom: Cl,
fromPoint: O
}, X = function(e, r) {
var a = [], i = function(f) {
return a.push(f), r(f);
}, s = r(e);
do
s = s.bind(i);
while (s.isSome());
return a;
}, me = function(e, r, a) {
return (e.compareDocumentPosition(r) & a) !== 0;
}, Ct = function(e, r) {
return me(e, r, Node.DOCUMENT_POSITION_CONTAINED_BY);
}, br = 8, sn = 9, ni = 11, Sc = 1, To = 3, fo = function(e, r) {
var a = e.dom;
if (a.nodeType !== Sc)
return !1;
var i = a;
if (i.matches !== void 0)
return i.matches(r);
if (i.msMatchesSelector !== void 0)
return i.msMatchesSelector(r);
if (i.webkitMatchesSelector !== void 0)
return i.webkitMatchesSelector(r);
if (i.mozMatchesSelector !== void 0)
return i.mozMatchesSelector(r);
throw new Error("Browser lacks native selectors");
}, sf = function(e) {
return e.nodeType !== Sc && e.nodeType !== sn && e.nodeType !== ni || e.childElementCount === 0;
}, Ch = function(e, r) {
var a = r === void 0 ? document : r.dom;
return sf(a) ? [] : ft(a.querySelectorAll(e), D.fromDom);
}, os = function(e, r) {
var a = r === void 0 ? document : r.dom;
return sf(a) ? G.none() : G.from(a.querySelector(e)).map(D.fromDom);
}, Kn = function(e, r) {
return e.dom === r.dom;
}, Sh = function(e, r) {
var a = e.dom, i = r.dom;
return a === i ? !1 : a.contains(i);
}, vo = function(e, r) {
return Ct(e.dom, r.dom);
}, ai = function(e, r) {
return uu().browser.isIE() ? vo(e, r) : Sh(e, r);
};
typeof window < "u" || Function("return this;")();
var Oa = function(e) {
var r = e.dom.nodeName;
return r.toLowerCase();
}, gd = function(e) {
return e.dom.nodeType;
}, _r = function(e) {
return function(r) {
return gd(r) === e;
};
}, tc = function(e) {
return gd(e) === br || Oa(e) === "#comment";
}, oa = _r(Sc), ya = _r(To), Lw = _r(sn), Go = _r(ni), C1 = function(e) {
return function(r) {
return oa(r) && Oa(r) === e;
};
}, Sl = function(e) {
return D.fromDom(e.dom.ownerDocument);
}, ir = function(e) {
return Lw(e) ? e : Sl(e);
}, rc = function(e) {
return D.fromDom(ir(e).dom.documentElement);
}, qa = function(e) {
return D.fromDom(ir(e).dom.defaultView);
}, xa = function(e) {
return G.from(e.dom.parentNode).map(D.fromDom);
}, mo = function(e, r) {
for (var a = Dt(r) ? r : st, i = e.dom, s = []; i.parentNode !== null && i.parentNode !== void 0; ) {
var f = i.parentNode, g = D.fromDom(f);
if (s.push(g), a(g) === !0)
break;
i = f;
}
return s;
}, Ga = function(e) {
var r = function(a) {
return Ft(a, function(i) {
return !Kn(e, i);
});
};
return xa(e).map(Mu).map(r).getOr([]);
}, pd = function(e) {
return G.from(e.dom.previousSibling).map(D.fromDom);
}, xc = function(e) {
return G.from(e.dom.nextSibling).map(D.fromDom);
}, hn = function(e) {
return Ma(X(e, pd));
}, Qn = function(e) {
return X(e, xc);
}, Mu = function(e) {
return ft(e.dom.childNodes, D.fromDom);
}, lf = function(e, r) {
var a = e.dom.childNodes;
return G.from(a[r]).map(D.fromDom);
}, Eo = function(e) {
return lf(e, 0);
}, Ms = function(e) {
return lf(e, e.dom.childNodes.length - 1);
}, Hw = function(e) {
return e.dom.childNodes.length;
}, Vw = function(e) {
var r = e.dom.head;
if (r == null)
throw new Error("Head is not available yet");
return D.fromDom(r);
}, na = function(e) {
return Go(e) && yr(e.dom.host);
}, hd = Dt(Element.prototype.attachShadow) && Dt(Node.prototype.getRootNode), Eg = j(hd), Fu = hd ? function(e) {
return D.fromDom(e.dom.getRootNode());
} : ir, Ka = function(e) {
return na(e) ? e : Vw(ir(e));
}, ff = function(e) {
var r = Fu(e);
return na(r) ? G.some(r) : G.none();
}, df = function(e) {
return D.fromDom(e.dom.host);
}, bi = function(e) {
if (Eg() && yr(e.target)) {
var r = D.fromDom(e.target);
if (oa(r) && zc(r) && e.composed && e.composedPath) {
var a = e.composedPath();
if (a)
return Jn(a);
}
}
return G.from(e.target);
}, zc = function(e) {
return yr(e.dom.shadowRoot);
}, oi = function(e, r) {
var a = xa(e);
a.each(function(i) {
i.dom.insertBefore(r.dom, e.dom);
});
}, Ag = function(e, r) {
var a = xc(e);
a.fold(function() {
var i = xa(e);
i.each(function(s) {
go(s, r);
});
}, function(i) {
oi(i, r);
});
}, is = function(e, r) {
var a = Eo(e);
a.fold(function() {
go(e, r);
}, function(i) {
e.dom.insertBefore(r.dom, i.dom);
});
}, go = function(e, r) {
e.dom.appendChild(r.dom);
}, S1 = function(e, r) {
oi(e, r), go(r, e);
}, Uw = function(e, r) {
Xe(r, function(a) {
oi(e, a);
});
}, yd = function(e, r) {
Xe(r, function(a) {
go(e, a);
});
}, bd = function(e) {
e.dom.textContent = "", Xe(Mu(e), function(r) {
Da(r);
});
}, Da = function(e) {
var r = e.dom;
r.parentNode !== null && r.parentNode.removeChild(r);
}, Og = function(e) {
var r = Mu(e);
r.length > 0 && Uw(e, r), Da(e);
}, kd = function(e) {
var r = ya(e) ? e.dom.parentNode : e.dom;
if (r == null || r.ownerDocument === null)
return !1;
var a = r.ownerDocument;
return ff(D.fromDom(r)).fold(function() {
return a.body.contains(r);
}, te(kd, df));
}, ki = function(e, r) {
var a = function(i, s) {
return ki(e + i, r + s);
};
return {
left: e,
top: r,
translate: a
};
}, vf = ki, wd = function(e) {
var r = e.getBoundingClientRect();
return vf(r.left, r.top);
}, _d = function(e, r) {
return e !== void 0 ? e : r !== void 0 ? r : 0;
}, ba = function(e) {
var r = e.dom.ownerDocument, a = r.body, i = r.defaultView, s = r.documentElement;
if (a === e.dom)
return vf(a.offsetLeft, a.offsetTop);
var f = _d(i == null ? void 0 : i.pageYOffset, s.scrollTop), g = _d(i == null ? void 0 : i.pageXOffset, s.scrollLeft), y = _d(s.clientTop, a.clientTop), k = _d(s.clientLeft, a.clientLeft);
return Nu(e).translate(g - k, f - y);
}, Nu = function(e) {
var r = e.dom, a = r.ownerDocument, i = a.body;
return i === r ? vf(i.offsetLeft, i.offsetTop) : kd(e) ? wd(r) : vf(0, 0);
}, xh = function(e) {
var r = e !== void 0 ? e.dom : document, a = r.body.scrollLeft || r.documentElement.scrollLeft, i = r.body.scrollTop || r.documentElement.scrollTop;
return vf(a, i);
}, Tc = function(e, r, a) {
var i = a !== void 0 ? a.dom : document, s = i.defaultView;
s && s.scrollTo(e, r);
}, x1 = function(e, r) {
var a = uu().browser.isSafari();
a && Dt(e.dom.scrollIntoViewIfNeeded) ? e.dom.scrollIntoViewIfNeeded(!1) : e.dom.scrollIntoView(r);
}, jw = function(e) {
var r = e === void 0 ? window : e;
return uu().browser.isFirefox() ? G.none() : G.from(r.visualViewport);
}, z1 = function(e, r, a, i) {
return {
x: e,
y: r,
width: a,
height: i,
right: e + a,
bottom: r + i
};
}, Dg = function(e) {
var r = e === void 0 ? window : e, a = r.document, i = xh(D.fromDom(a));
return jw(r).fold(function() {
var s = r.document.documentElement, f = s.clientWidth, g = s.clientHeight;
return z1(i.left, i.top, f, g);
}, function(s) {
return z1(Math.max(s.pageLeft, i.left), Math.max(s.pageTop, i.top), s.width, s.height);
});
}, Cd = function(e) {
return function(r) {
return !!r && r.nodeType === e;
};
}, mf = function(e) {
return !!e && !Object.getPrototypeOf(e);
}, dr = Cd(1), Ec = function(e) {
var r = e.map(function(a) {
return a.toLowerCase();
});
return function(a) {
if (a && a.nodeName) {
var i = a.nodeName.toLowerCase();
return Ne(r, i);
}
return !1;
};
}, cu = function(e, r) {
var a = r.toLowerCase().split(" ");
return function(i) {
if (dr(i))
for (var s = 0; s < a.length; s++) {
var f = i.ownerDocument.defaultView.getComputedStyle(i, null), g = f ? f.getPropertyValue(e) : null;
if (g === a[s])
return !0;
}
return !1;
};
}, wi = function(e) {
return function(r) {
return dr(r) && r.hasAttribute(e);
};
}, Ac = function(e, r) {
return function(a) {
return dr(a) && a.getAttribute(e) === r;
};
}, Pa = function(e) {
return dr(e) && e.hasAttribute("data-mce-bogus");
}, Ko = function(e) {
return dr(e) && e.getAttribute("data-mce-bogus") === "all";
}, Xa = function(e) {
return dr(e) && e.tagName === "TABLE";
}, gf = function(e) {
return function(r) {
return !!(dr(r) && (r.contentEditable === e || r.getAttribute("data-mce-contenteditable") === e));
};
}, ii = Ec([
"textarea",
"input"
]), St = Cd(3), Rg = Cd(8), T1 = Cd(9), Sr = Cd(11), Un = Ec(["br"]), zh = Ec(["img"]), Fs = gf("true"), ia = gf("false"), Th = Ec([
"td",
"th"
]), Oc = Ec([
"video",
"audio",
"object",
"embed"
]), Eh = function(e, r, a) {
return a === void 0 && (a = Cu), e.exists(function(i) {
return a(i, r);
});
}, Er = function(e) {
for (var r = [], a = function(s) {
r.push(s);
}, i = 0; i < e.length; i++)
e[i].each(a);
return r;
}, Wi = function(e, r, a) {
return e.isSome() && r.isSome() ? G.some(a(e.getOrDie(), r.getOrDie())) : G.none();
}, v8 = function(e, r, a, i) {
return e.isSome() && r.isSome() && a.isSome() ? G.some(i(e.getOrDie(), r.getOrDie(), a.getOrDie())) : G.none();
}, m8 = function(e, r) {
return e ? G.some(r) : G.none();
}, da = function(e) {
return e.style !== void 0 && Dt(e.style.getPropertyValue);
}, Ah = function(e, r, a) {
if (rn(a) || At(a) || Pr(a))
e.setAttribute(r, a + "");
else
throw console.error("Invalid call to Attribute.set. Key ", r, ":: Value ", a, ":: Element ", e), new Error("Attribute value was not simple");
}, Ns = function(e, r, a) {
Ah(e.dom, r, a);
}, Ps = function(e, r) {
var a = e.dom;
Ur(r, function(i, s) {
Ah(a, s, i);
});
}, Sd = function(e, r) {
var a = e.dom.getAttribute(r);
return a === null ? void 0 : a;
}, E1 = function(e, r) {
return G.from(Sd(e, r));
}, A1 = function(e, r) {
var a = e.dom;
return a && a.hasAttribute ? a.hasAttribute(r) : !1;
}, ln = function(e, r) {
e.dom.removeAttribute(r);
}, Oh = function(e) {
return Oe(e.dom.attributes, function(r, a) {
return r[a.name] = a.value, r;
}, {});
}, us = function(e, r, a) {
if (!rn(a))
throw console.error("Invalid call to CSS.set. Property ", r, ":: Value ", a, ":: Element ", e), new Error("CSS value must be a string: " + a);
da(e) && e.style.setProperty(r, a);
}, xl = function(e, r) {
var a = e.dom;
Ur(r, function(i, s) {
us(a, s, i);
});
}, _i = function(e, r) {
var a = e.dom, i = window.getComputedStyle(a), s = i.getPropertyValue(r);
return s === "" && !kd(e) ? xd(a, r) : s;
}, xd = function(e, r) {
return da(e) ? e.style.getPropertyValue(r) : "";
}, zd = function(e, r) {
var a = e.dom, i = xd(a, r);
return G.from(i).filter(function(s) {
return s.length > 0;
});
}, za = function(e) {
var r = {}, a = e.dom;
if (da(a))
for (var i = 0; i < a.style.length; i++) {
var s = a.style.item(i);
r[s] = a.style[s];
}
return r;
}, g8 = function(e) {
return e.dom.offsetWidth;
}, Ww = uu().browser, qw = function(e) {
return vt(e, oa);
}, p8 = function(e) {
return Ww.isFirefox() && Oa(e) === "table" ? qw(Mu(e)).filter(function(r) {
return Oa(r) === "caption";
}).bind(function(r) {
return qw(Qn(r)).map(function(a) {
var i = a.dom.offsetTop, s = r.dom.offsetTop, f = r.dom.offsetHeight;
return i <= s ? -f : 0;
});
}).getOr(0) : 0;
}, cs = function(e, r) {
return e.children && Ne(e.children, r);
}, Bg = function(e, r, a) {
var i = 0, s = 0, f = e.ownerDocument;
if (a = a || e, r) {
if (a === e && r.getBoundingClientRect && _i(D.fromDom(e), "position") === "static") {
var g = r.getBoundingClientRect();
return i = g.left + (f.documentElement.scrollLeft || e.scrollLeft) - f.documentElement.clientLeft, s = g.top + (f.documentElement.scrollTop || e.scrollTop) - f.documentElement.clientTop, {
x: i,
y: s
};
}
for (var y = r; y && y !== a && y.nodeType && !cs(y, a); ) {
var k = y;
i += k.offsetLeft || 0, s += k.offsetTop || 0, y = k.offsetParent;
}
for (y = r.parentNode; y && y !== a && y.nodeType && !cs(y, a); )
i -= y.scrollLeft || 0, s -= y.scrollTop || 0, y = y.parentNode;
s += p8(D.fromDom(r));
}
return {
x: i,
y: s
};
}, qi = {}, Hv = { exports: qi };
(function(e, r, a, i) {
(function(s, f) {
typeof r == "object" && typeof a < "u" ? a.exports = f() : typeof e == "function" && e.amd ? e(f) : (s = typeof globalThis < "u" ? globalThis : s || self, s.EphoxContactWrapper = f());
})(this, function() {
var s = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof R5 < "u" ? R5 : typeof self < "u" ? self : {}, f = { exports: {} };
(function(x) {
(function(B) {
var M = setTimeout;
function F() {
}
function $(Q, fe) {
return function() {
Q.apply(fe, arguments);
};
}
function H(Q) {
if (typeof this != "object")
throw new TypeError("Promises must be constructed via new");
if (typeof Q != "function")
throw new TypeError("not a function");
this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], se(Q, this);
}
function V(Q, fe) {
for (; Q._state === 3; )
Q = Q._value;
if (Q._state === 0) {
Q._deferreds.push(fe);
return;
}
Q._handled = !0, H._immediateFn(function() {
var ze = Q._state === 1 ? fe.onFulfilled : fe.onRejected;
if (ze === null) {
(Q._state === 1 ? U : J)(fe.promise, Q._value);
return;
}
var He;
try {
He = ze(Q._value);
} catch (er) {
J(fe.promise, er);
return;
}
U(fe.promise, He);
});
}
function U(Q, fe) {
try {
if (fe === Q)
throw new TypeError("A promise cannot be resolved with itself.");
if (fe && (typeof fe == "object" || typeof fe == "function")) {
var ze = fe.then;
if (fe instanceof H) {
Q._state = 3, Q._value = fe, Y(Q);
return;
} else if (typeof ze == "function") {
se($(ze, fe), Q);
return;
}
}
Q._state = 1, Q._value = fe, Y(Q);
} catch (He) {
J(Q, He);
}
}
function J(Q, fe) {
Q._state = 2, Q._value = fe, Y(Q);
}
function Y(Q) {
Q._state === 2 && Q._deferreds.length === 0 && H._immediateFn(function() {
Q._h