bpmn-js-properties-panel
Version:
A simple properties panel for bpmn-js
1,630 lines (1,575 loc) • 2.2 MB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.BpmnJSPropertiesPanel = {}));
})(this, (function (exports) { 'use strict';
var n,
l$1,
u$2,
i$2,
o$1,
r$1,
f$2,
e$1,
c$1 = {},
s$1 = [],
a$1 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,
h$1 = Array.isArray;
function v$1(n, l) {
for (var u in l) n[u] = l[u];
return n;
}
function p$1(n) {
var l = n.parentNode;
l && l.removeChild(n);
}
function y$1(l, u, t) {
var i,
o,
r,
f = {};
for (r in u) "key" == r ? i = u[r] : "ref" == r ? o = u[r] : f[r] = u[r];
if (arguments.length > 2 && (f.children = arguments.length > 3 ? n.call(arguments, 2) : t), "function" == typeof l && null != l.defaultProps) for (r in l.defaultProps) void 0 === f[r] && (f[r] = l.defaultProps[r]);
return d$1(l, f, i, o, null);
}
function d$1(n, t, i, o, r) {
var f = {
type: n,
props: t,
key: i,
ref: o,
__k: null,
__: null,
__b: 0,
__e: null,
__d: void 0,
__c: null,
constructor: void 0,
__v: null == r ? ++u$2 : r,
__i: -1,
__u: 0
};
return null == r && null != l$1.vnode && l$1.vnode(f), f;
}
function _$1() {
return {
current: null
};
}
function g$2(n) {
return n.children;
}
function b$1(n, l) {
this.props = n, this.context = l;
}
function m$1(n, l) {
if (null == l) return n.__ ? m$1(n.__, n.__i + 1) : null;
for (var u; l < n.__k.length; l++) if (null != (u = n.__k[l]) && null != u.__e) return u.__e;
return "function" == typeof n.type ? m$1(n) : null;
}
function k$2(n) {
var l, u;
if (null != (n = n.__) && null != n.__c) {
for (n.__e = n.__c.base = null, l = 0; l < n.__k.length; l++) if (null != (u = n.__k[l]) && null != u.__e) {
n.__e = n.__c.base = u.__e;
break;
}
return k$2(n);
}
}
function w$2(n) {
(!n.__d && (n.__d = !0) && i$2.push(n) && !x$2.__r++ || o$1 !== l$1.debounceRendering) && ((o$1 = l$1.debounceRendering) || r$1)(x$2);
}
function x$2() {
var n, u, t, o, r, e, c, s, a;
for (i$2.sort(f$2); n = i$2.shift();) n.__d && (u = i$2.length, o = void 0, e = (r = (t = n).__v).__e, s = [], a = [], (c = t.__P) && ((o = v$1({}, r)).__v = r.__v + 1, l$1.vnode && l$1.vnode(o), L$1(c, o, r, t.__n, void 0 !== c.ownerSVGElement, 32 & r.__u ? [e] : null, s, null == e ? m$1(r) : e, !!(32 & r.__u), a), o.__.__k[o.__i] = o, M$1(s, o, a), o.__e != e && k$2(o)), i$2.length > u && i$2.sort(f$2));
x$2.__r = 0;
}
function C$2(n, l, u, t, i, o, r, f, e, a, h) {
var v,
p,
y,
d,
_,
g = t && t.__k || s$1,
b = l.length;
for (u.__d = e, P$1(u, l, g), e = u.__d, v = 0; v < b; v++) null != (y = u.__k[v]) && "boolean" != typeof y && "function" != typeof y && (p = -1 === y.__i ? c$1 : g[y.__i] || c$1, y.__i = v, L$1(n, y, p, i, o, r, f, e, a, h), d = y.__e, y.ref && p.ref != y.ref && (p.ref && z$2(p.ref, null, y), h.push(y.ref, y.__c || d, y)), null == _ && null != d && (_ = d), 65536 & y.__u || p.__k === y.__k ? e = S(y, e, n) : "function" == typeof y.type && void 0 !== y.__d ? e = y.__d : d && (e = d.nextSibling), y.__d = void 0, y.__u &= -196609);
u.__d = e, u.__e = _;
}
function P$1(n, l, u) {
var t,
i,
o,
r,
f,
e = l.length,
c = u.length,
s = c,
a = 0;
for (n.__k = [], t = 0; t < e; t++) null != (i = n.__k[t] = null == (i = l[t]) || "boolean" == typeof i || "function" == typeof i ? null : "string" == typeof i || "number" == typeof i || "bigint" == typeof i || i.constructor == String ? d$1(null, i, null, null, i) : h$1(i) ? d$1(g$2, {
children: i
}, null, null, null) : void 0 === i.constructor && i.__b > 0 ? d$1(i.type, i.props, i.key, i.ref ? i.ref : null, i.__v) : i) ? (i.__ = n, i.__b = n.__b + 1, f = H$1(i, u, r = t + a, s), i.__i = f, o = null, -1 !== f && (s--, (o = u[f]) && (o.__u |= 131072)), null == o || null === o.__v ? (-1 == f && a--, "function" != typeof i.type && (i.__u |= 65536)) : f !== r && (f === r + 1 ? a++ : f > r ? s > e - r ? a += f - r : a-- : a = f < r && f == r - 1 ? f - r : 0, f !== t + a && (i.__u |= 65536))) : (o = u[t]) && null == o.key && o.__e && (o.__e == n.__d && (n.__d = m$1(o)), N$1(o, o, !1), u[t] = null, s--);
if (s) for (t = 0; t < c; t++) null != (o = u[t]) && 0 == (131072 & o.__u) && (o.__e == n.__d && (n.__d = m$1(o)), N$1(o, o));
}
function S(n, l, u) {
var t, i;
if ("function" == typeof n.type) {
for (t = n.__k, i = 0; t && i < t.length; i++) t[i] && (t[i].__ = n, l = S(t[i], l, u));
return l;
}
return n.__e != l && (u.insertBefore(n.__e, l || null), l = n.__e), l && l.nextSibling;
}
function $$1(n, l) {
return l = l || [], null == n || "boolean" == typeof n || (h$1(n) ? n.some(function (n) {
$$1(n, l);
}) : l.push(n)), l;
}
function H$1(n, l, u, t) {
var i = n.key,
o = n.type,
r = u - 1,
f = u + 1,
e = l[u];
if (null === e || e && i == e.key && o === e.type) return u;
if (t > (null != e && 0 == (131072 & e.__u) ? 1 : 0)) for (; r >= 0 || f < l.length;) {
if (r >= 0) {
if ((e = l[r]) && 0 == (131072 & e.__u) && i == e.key && o === e.type) return r;
r--;
}
if (f < l.length) {
if ((e = l[f]) && 0 == (131072 & e.__u) && i == e.key && o === e.type) return f;
f++;
}
}
return -1;
}
function I$1(n, l, u) {
"-" === l[0] ? n.setProperty(l, null == u ? "" : u) : n[l] = null == u ? "" : "number" != typeof u || a$1.test(l) ? u : u + "px";
}
function T$2(n, l, u, t, i) {
var o;
n: if ("style" === l) {
if ("string" == typeof u) n.style.cssText = u;else {
if ("string" == typeof t && (n.style.cssText = t = ""), t) for (l in t) u && l in u || I$1(n.style, l, "");
if (u) for (l in u) t && u[l] === t[l] || I$1(n.style, l, u[l]);
}
} else if ("o" === l[0] && "n" === l[1]) o = l !== (l = l.replace(/(PointerCapture)$|Capture$/, "$1")), l = l.toLowerCase() in n ? l.toLowerCase().slice(2) : l.slice(2), n.l || (n.l = {}), n.l[l + o] = u, u ? t ? u.u = t.u : (u.u = Date.now(), n.addEventListener(l, o ? D$1 : A$2, o)) : n.removeEventListener(l, o ? D$1 : A$2, o);else {
if (i) l = l.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");else if ("width" !== l && "height" !== l && "href" !== l && "list" !== l && "form" !== l && "tabIndex" !== l && "download" !== l && "rowSpan" !== l && "colSpan" !== l && "role" !== l && l in n) try {
n[l] = null == u ? "" : u;
break n;
} catch (n) {}
"function" == typeof u || (null == u || !1 === u && "-" !== l[4] ? n.removeAttribute(l) : n.setAttribute(l, u));
}
}
function A$2(n) {
var u = this.l[n.type + !1];
if (n.t) {
if (n.t <= u.u) return;
} else n.t = Date.now();
return u(l$1.event ? l$1.event(n) : n);
}
function D$1(n) {
return this.l[n.type + !0](l$1.event ? l$1.event(n) : n);
}
function L$1(n, u, t, i, o, r, f, e, c, s) {
var a,
p,
y,
d,
_,
m,
k,
w,
x,
P,
S,
$,
H,
I,
T,
A = u.type;
if (void 0 !== u.constructor) return null;
128 & t.__u && (c = !!(32 & t.__u), r = [e = u.__e = t.__e]), (a = l$1.__b) && a(u);
n: if ("function" == typeof A) try {
if (w = u.props, x = (a = A.contextType) && i[a.__c], P = a ? x ? x.props.value : a.__ : i, t.__c ? k = (p = u.__c = t.__c).__ = p.__E : ("prototype" in A && A.prototype.render ? u.__c = p = new A(w, P) : (u.__c = p = new b$1(w, P), p.constructor = A, p.render = O$1), x && x.sub(p), p.props = w, p.state || (p.state = {}), p.context = P, p.__n = i, y = p.__d = !0, p.__h = [], p._sb = []), null == p.__s && (p.__s = p.state), null != A.getDerivedStateFromProps && (p.__s == p.state && (p.__s = v$1({}, p.__s)), v$1(p.__s, A.getDerivedStateFromProps(w, p.__s))), d = p.props, _ = p.state, p.__v = u, y) null == A.getDerivedStateFromProps && null != p.componentWillMount && p.componentWillMount(), null != p.componentDidMount && p.__h.push(p.componentDidMount);else {
if (null == A.getDerivedStateFromProps && w !== d && null != p.componentWillReceiveProps && p.componentWillReceiveProps(w, P), !p.__e && (null != p.shouldComponentUpdate && !1 === p.shouldComponentUpdate(w, p.__s, P) || u.__v === t.__v)) {
for (u.__v !== t.__v && (p.props = w, p.state = p.__s, p.__d = !1), u.__e = t.__e, u.__k = t.__k, u.__k.forEach(function (n) {
n && (n.__ = u);
}), S = 0; S < p._sb.length; S++) p.__h.push(p._sb[S]);
p._sb = [], p.__h.length && f.push(p);
break n;
}
null != p.componentWillUpdate && p.componentWillUpdate(w, p.__s, P), null != p.componentDidUpdate && p.__h.push(function () {
p.componentDidUpdate(d, _, m);
});
}
if (p.context = P, p.props = w, p.__P = n, p.__e = !1, $ = l$1.__r, H = 0, "prototype" in A && A.prototype.render) {
for (p.state = p.__s, p.__d = !1, $ && $(u), a = p.render(p.props, p.state, p.context), I = 0; I < p._sb.length; I++) p.__h.push(p._sb[I]);
p._sb = [];
} else do {
p.__d = !1, $ && $(u), a = p.render(p.props, p.state, p.context), p.state = p.__s;
} while (p.__d && ++H < 25);
p.state = p.__s, null != p.getChildContext && (i = v$1(v$1({}, i), p.getChildContext())), y || null == p.getSnapshotBeforeUpdate || (m = p.getSnapshotBeforeUpdate(d, _)), C$2(n, h$1(T = null != a && a.type === g$2 && null == a.key ? a.props.children : a) ? T : [T], u, t, i, o, r, f, e, c, s), p.base = u.__e, u.__u &= -161, p.__h.length && f.push(p), k && (p.__E = p.__ = null);
} catch (n) {
u.__v = null, c || null != r ? (u.__e = e, u.__u |= c ? 160 : 32, r[r.indexOf(e)] = null) : (u.__e = t.__e, u.__k = t.__k), l$1.__e(n, u, t);
} else null == r && u.__v === t.__v ? (u.__k = t.__k, u.__e = t.__e) : u.__e = j$2(t.__e, u, t, i, o, r, f, c, s);
(a = l$1.diffed) && a(u);
}
function M$1(n, u, t) {
u.__d = void 0;
for (var i = 0; i < t.length; i++) z$2(t[i], t[++i], t[++i]);
l$1.__c && l$1.__c(u, n), n.some(function (u) {
try {
n = u.__h, u.__h = [], n.some(function (n) {
n.call(u);
});
} catch (n) {
l$1.__e(n, u.__v);
}
});
}
function j$2(l, u, t, i, o, r, f, e, s) {
var a,
v,
y,
d,
_,
g,
b,
k = t.props,
w = u.props,
x = u.type;
if ("svg" === x && (o = !0), null != r) for (a = 0; a < r.length; a++) if ((_ = r[a]) && "setAttribute" in _ == !!x && (x ? _.localName === x : 3 === _.nodeType)) {
l = _, r[a] = null;
break;
}
if (null == l) {
if (null === x) return document.createTextNode(w);
l = o ? document.createElementNS("http://www.w3.org/2000/svg", x) : document.createElement(x, w.is && w), r = null, e = !1;
}
if (null === x) k === w || e && l.data === w || (l.data = w);else {
if (r = r && n.call(l.childNodes), k = t.props || c$1, !e && null != r) for (k = {}, a = 0; a < l.attributes.length; a++) k[(_ = l.attributes[a]).name] = _.value;
for (a in k) _ = k[a], "children" == a || ("dangerouslySetInnerHTML" == a ? y = _ : "key" === a || a in w || T$2(l, a, null, _, o));
for (a in w) _ = w[a], "children" == a ? d = _ : "dangerouslySetInnerHTML" == a ? v = _ : "value" == a ? g = _ : "checked" == a ? b = _ : "key" === a || e && "function" != typeof _ || k[a] === _ || T$2(l, a, _, k[a], o);
if (v) e || y && (v.__html === y.__html || v.__html === l.innerHTML) || (l.innerHTML = v.__html), u.__k = [];else if (y && (l.innerHTML = ""), C$2(l, h$1(d) ? d : [d], u, t, i, o && "foreignObject" !== x, r, f, r ? r[0] : t.__k && m$1(t, 0), e, s), null != r) for (a = r.length; a--;) null != r[a] && p$1(r[a]);
e || (a = "value", void 0 !== g && (g !== l[a] || "progress" === x && !g || "option" === x && g !== k[a]) && T$2(l, a, g, k[a], !1), a = "checked", void 0 !== b && b !== l[a] && T$2(l, a, b, k[a], !1));
}
return l;
}
function z$2(n, u, t) {
try {
"function" == typeof n ? n(u) : n.current = u;
} catch (n) {
l$1.__e(n, t);
}
}
function N$1(n, u, t) {
var i, o;
if (l$1.unmount && l$1.unmount(n), (i = n.ref) && (i.current && i.current !== n.__e || z$2(i, null, u)), null != (i = n.__c)) {
if (i.componentWillUnmount) try {
i.componentWillUnmount();
} catch (n) {
l$1.__e(n, u);
}
i.base = i.__P = null, n.__c = void 0;
}
if (i = n.__k) for (o = 0; o < i.length; o++) i[o] && N$1(i[o], u, t || "function" != typeof n.type);
t || null == n.__e || p$1(n.__e), n.__ = n.__e = n.__d = void 0;
}
function O$1(n, l, u) {
return this.constructor(n, u);
}
function q$2(u, t, i) {
var o, r, f, e;
l$1.__ && l$1.__(u, t), r = (o = "function" == typeof i) ? null : i && i.__k || t.__k, f = [], e = [], L$1(t, u = (!o && i || t).__k = y$1(g$2, null, [u]), r || c$1, c$1, void 0 !== t.ownerSVGElement, !o && i ? [i] : r ? null : t.firstChild ? n.call(t.childNodes) : null, f, !o && i ? i : r ? r.__e : t.firstChild, o, e), M$1(f, u, e);
}
function B$2(n, l) {
q$2(n, l, B$2);
}
function E$1(l, u, t) {
var i,
o,
r,
f,
e = v$1({}, l.props);
for (r in l.type && l.type.defaultProps && (f = l.type.defaultProps), u) "key" == r ? i = u[r] : "ref" == r ? o = u[r] : e[r] = void 0 === u[r] && void 0 !== f ? f[r] : u[r];
return arguments.length > 2 && (e.children = arguments.length > 3 ? n.call(arguments, 2) : t), d$1(l.type, e, i || l.key, o || l.ref, null);
}
function F$2(n, l) {
var u = {
__c: l = "__cC" + e$1++,
__: n,
Consumer: function (n, l) {
return n.children(l);
},
Provider: function (n) {
var u, t;
return this.getChildContext || (u = [], (t = {})[l] = this, this.getChildContext = function () {
return t;
}, this.shouldComponentUpdate = function (n) {
this.props.value !== n.value && u.some(function (n) {
n.__e = !0, w$2(n);
});
}, this.sub = function (n) {
u.push(n);
var l = n.componentWillUnmount;
n.componentWillUnmount = function () {
u.splice(u.indexOf(n), 1), l && l.call(n);
};
}), n.children;
}
};
return u.Provider.__ = u.Consumer.contextType = u;
}
n = s$1.slice, l$1 = {
__e: function (n, l, u, t) {
for (var i, o, r; l = l.__;) if ((i = l.__c) && !i.__) try {
if ((o = i.constructor) && null != o.getDerivedStateFromError && (i.setState(o.getDerivedStateFromError(n)), r = i.__d), null != i.componentDidCatch && (i.componentDidCatch(n, t || {}), r = i.__d), r) return i.__E = i;
} catch (l) {
n = l;
}
throw n;
}
}, u$2 = 0, b$1.prototype.setState = function (n, l) {
var u;
u = null != this.__s && this.__s !== this.state ? this.__s : this.__s = v$1({}, this.state), "function" == typeof n && (n = n(v$1({}, u), this.props)), n && v$1(u, n), null != n && this.__v && (l && this._sb.push(l), w$2(this));
}, b$1.prototype.forceUpdate = function (n) {
this.__v && (this.__e = !0, n && this.__h.push(n), w$2(this));
}, b$1.prototype.render = g$2, i$2 = [], r$1 = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, f$2 = function (n, l) {
return n.__v.__b - l.__v.__b;
}, x$2.__r = 0, e$1 = 0;
var t$1,
r,
u$1,
i$1,
o = 0,
f$1 = [],
c = [],
e = l$1.__b,
a = l$1.__r,
v = l$1.diffed,
l = l$1.__c,
m = l$1.unmount;
function d(t, u) {
l$1.__h && l$1.__h(r, t, o || u), o = 0;
var i = r.__H || (r.__H = {
__: [],
__h: []
});
return t >= i.__.length && i.__.push({
__V: c
}), i.__[t];
}
function h(n) {
return o = 1, s(B$1, n);
}
function s(n, u, i) {
var o = d(t$1++, 2);
if (o.t = n, !o.__c && (o.__ = [i ? i(u) : B$1(void 0, u), function (n) {
var t = o.__N ? o.__N[0] : o.__[0],
r = o.t(t, n);
t !== r && (o.__N = [r, o.__[1]], o.__c.setState({}));
}], o.__c = r, !r.u)) {
var f = function (n, t, r) {
if (!o.__c.__H) return !0;
var u = o.__c.__H.__.filter(function (n) {
return n.__c;
});
if (u.every(function (n) {
return !n.__N;
})) return !c || c.call(this, n, t, r);
var i = !1;
return u.forEach(function (n) {
if (n.__N) {
var t = n.__[0];
n.__ = n.__N, n.__N = void 0, t !== n.__[0] && (i = !0);
}
}), !(!i && o.__c.props === n) && (!c || c.call(this, n, t, r));
};
r.u = !0;
var c = r.shouldComponentUpdate,
e = r.componentWillUpdate;
r.componentWillUpdate = function (n, t, r) {
if (this.__e) {
var u = c;
c = void 0, f(n, t, r), c = u;
}
e && e.call(this, n, t, r);
}, r.shouldComponentUpdate = f;
}
return o.__N || o.__;
}
function p(u, i) {
var o = d(t$1++, 3);
!l$1.__s && z$1(o.__H, i) && (o.__ = u, o.i = i, r.__H.__h.push(o));
}
function y(u, i) {
var o = d(t$1++, 4);
!l$1.__s && z$1(o.__H, i) && (o.__ = u, o.i = i, r.__h.push(o));
}
function _(n) {
return o = 5, F$1(function () {
return {
current: n
};
}, []);
}
function A$1(n, t, r) {
o = 6, y(function () {
return "function" == typeof n ? (n(t()), function () {
return n(null);
}) : n ? (n.current = t(), function () {
return n.current = null;
}) : void 0;
}, null == r ? r : r.concat(n));
}
function F$1(n, r) {
var u = d(t$1++, 7);
return z$1(u.__H, r) ? (u.__V = n(), u.i = r, u.__h = n, u.__V) : u.__;
}
function T$1(n, t) {
return o = 8, F$1(function () {
return n;
}, t);
}
function q$1(n) {
var u = r.context[n.__c],
i = d(t$1++, 9);
return i.c = n, u ? (null == i.__ && (i.__ = !0, u.sub(r)), u.props.value) : n.__;
}
function x$1(t, r) {
l$1.useDebugValue && l$1.useDebugValue(r ? r(t) : t);
}
function V$1() {
var n = d(t$1++, 11);
if (!n.__) {
for (var u = r.__v; null !== u && !u.__m && null !== u.__;) u = u.__;
var i = u.__m || (u.__m = [0, 0]);
n.__ = "P" + i[0] + "-" + i[1]++;
}
return n.__;
}
function b() {
for (var t; t = f$1.shift();) if (t.__P && t.__H) try {
t.__H.__h.forEach(k$1), t.__H.__h.forEach(w$1), t.__H.__h = [];
} catch (r) {
t.__H.__h = [], l$1.__e(r, t.__v);
}
}
l$1.__b = function (n) {
r = null, e && e(n);
}, l$1.__r = function (n) {
a && a(n), t$1 = 0;
var i = (r = n.__c).__H;
i && (u$1 === r ? (i.__h = [], r.__h = [], i.__.forEach(function (n) {
n.__N && (n.__ = n.__N), n.__V = c, n.__N = n.i = void 0;
})) : (i.__h.forEach(k$1), i.__h.forEach(w$1), i.__h = [], t$1 = 0)), u$1 = r;
}, l$1.diffed = function (t) {
v && v(t);
var o = t.__c;
o && o.__H && (o.__H.__h.length && (1 !== f$1.push(o) && i$1 === l$1.requestAnimationFrame || ((i$1 = l$1.requestAnimationFrame) || j$1)(b)), o.__H.__.forEach(function (n) {
n.i && (n.__H = n.i), n.__V !== c && (n.__ = n.__V), n.i = void 0, n.__V = c;
})), u$1 = r = null;
}, l$1.__c = function (t, r) {
r.some(function (t) {
try {
t.__h.forEach(k$1), t.__h = t.__h.filter(function (n) {
return !n.__ || w$1(n);
});
} catch (u) {
r.some(function (n) {
n.__h && (n.__h = []);
}), r = [], l$1.__e(u, t.__v);
}
}), l && l(t, r);
}, l$1.unmount = function (t) {
m && m(t);
var r,
u = t.__c;
u && u.__H && (u.__H.__.forEach(function (n) {
try {
k$1(n);
} catch (n) {
r = n;
}
}), u.__H = void 0, r && l$1.__e(r, u.__v));
};
var g$1 = "function" == typeof requestAnimationFrame;
function j$1(n) {
var t,
r = function () {
clearTimeout(u), g$1 && cancelAnimationFrame(t), setTimeout(n);
},
u = setTimeout(r, 100);
g$1 && (t = requestAnimationFrame(r));
}
function k$1(n) {
var t = r,
u = n.__c;
"function" == typeof u && (n.__c = void 0, u()), r = t;
}
function w$1(n) {
var t = r;
n.__c = n.__(), r = t;
}
function z$1(n, t) {
return !n || n.length !== t.length || t.some(function (t, r) {
return t !== n[r];
});
}
function B$1(n, t) {
return "function" == typeof t ? t(n) : t;
}
/**
* Flatten array, one level deep.
*
* @template T
*
* @param {T[][] | T[] | null} [arr]
*
* @return {T[]}
*/
function flatten$1(arr) {
return Array.prototype.concat.apply([], arr);
}
const nativeToString = Object.prototype.toString;
const nativeHasOwnProperty = Object.prototype.hasOwnProperty;
function isUndefined(obj) {
return obj === undefined;
}
function isDefined(obj) {
return obj !== undefined;
}
function isNil(obj) {
return obj == null;
}
function isArray(obj) {
return nativeToString.call(obj) === '[object Array]';
}
function isNumber(obj) {
return nativeToString.call(obj) === '[object Number]';
}
/**
* @param {any} obj
*
* @return {boolean}
*/
function isFunction(obj) {
const tag = nativeToString.call(obj);
return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]';
}
function isString(obj) {
return nativeToString.call(obj) === '[object String]';
}
/**
* Ensure collection is an array.
*
* @param {Object} obj
*/
function ensureArray(obj) {
if (isArray(obj)) {
return;
}
throw new Error('must supply array');
}
/**
* Return true, if target owns a property with the given key.
*
* @param {Object} target
* @param {String} key
*
* @return {Boolean}
*/
function has(target, key) {
return nativeHasOwnProperty.call(target, key);
}
/**
* @template T
* @typedef { (
* ((e: T) => boolean) |
* ((e: T, idx: number) => boolean) |
* ((e: T, key: string) => boolean) |
* string |
* number
* ) } Matcher
*/
/**
* @template T
* @template U
*
* @typedef { (
* ((e: T) => U) | string | number
* ) } Extractor
*/
/**
* @template T
* @typedef { (val: T, key: any) => boolean } MatchFn
*/
/**
* @template T
* @typedef { T[] } ArrayCollection
*/
/**
* @template T
* @typedef { { [key: string]: T } } StringKeyValueCollection
*/
/**
* @template T
* @typedef { { [key: number]: T } } NumberKeyValueCollection
*/
/**
* @template T
* @typedef { StringKeyValueCollection<T> | NumberKeyValueCollection<T> } KeyValueCollection
*/
/**
* @template T
* @typedef { KeyValueCollection<T> | ArrayCollection<T> } Collection
*/
/**
* Find element in collection.
*
* @template T
* @param {Collection<T>} collection
* @param {Matcher<T>} matcher
*
* @return {Object}
*/
function find$1(collection, matcher) {
const matchFn = toMatcher(matcher);
let match;
forEach(collection, function (val, key) {
if (matchFn(val, key)) {
match = val;
return false;
}
});
return match;
}
/**
* Find element index in collection.
*
* @template T
* @param {Collection<T>} collection
* @param {Matcher<T>} matcher
*
* @return {number}
*/
function findIndex$1(collection, matcher) {
const matchFn = toMatcher(matcher);
let idx = isArray(collection) ? -1 : undefined;
forEach(collection, function (val, key) {
if (matchFn(val, key)) {
idx = key;
return false;
}
});
return idx;
}
/**
* Filter elements in collection.
*
* @template T
* @param {Collection<T>} collection
* @param {Matcher<T>} matcher
*
* @return {T[]} result
*/
function filter(collection, matcher) {
const matchFn = toMatcher(matcher);
let result = [];
forEach(collection, function (val, key) {
if (matchFn(val, key)) {
result.push(val);
}
});
return result;
}
/**
* Iterate over collection; returning something
* (non-undefined) will stop iteration.
*
* @template T
* @param {Collection<T>} collection
* @param { ((item: T, idx: number) => (boolean|void)) | ((item: T, key: string) => (boolean|void)) } iterator
*
* @return {T} return result that stopped the iteration
*/
function forEach(collection, iterator) {
let val, result;
if (isUndefined(collection)) {
return;
}
const convertKey = isArray(collection) ? toNum : identity;
for (let key in collection) {
if (has(collection, key)) {
val = collection[key];
result = iterator(val, convertKey(key));
if (result === false) {
return val;
}
}
}
}
/**
* Return collection without element.
*
* @template T
* @param {ArrayCollection<T>} arr
* @param {Matcher<T>} matcher
*
* @return {T[]}
*/
function without(arr, matcher) {
if (isUndefined(arr)) {
return [];
}
ensureArray(arr);
const matchFn = toMatcher(matcher);
return arr.filter(function (el, idx) {
return !matchFn(el, idx);
});
}
/**
* Reduce collection, returning a single result.
*
* @template T
* @template V
*
* @param {Collection<T>} collection
* @param {(result: V, entry: T, index: any) => V} iterator
* @param {V} result
*
* @return {V} result returned from last iterator
*/
function reduce(collection, iterator, result) {
forEach(collection, function (value, idx) {
result = iterator(result, value, idx);
});
return result;
}
/**
* Return true if some elements in the collection
* match the criteria.
*
* @param {Object|Array} collection
* @param {Function} matcher
*
* @return {Boolean}
*/
function some(collection, matcher) {
return !!find$1(collection, matcher);
}
/**
* Transform a collection into another collection
* by piping each member through the given fn.
*
* @param {Object|Array} collection
* @param {Function} fn
*
* @return {Array} transformed collection
*/
function map$1(collection, fn) {
let result = [];
forEach(collection, function (val, key) {
result.push(fn(val, key));
});
return result;
}
/**
* Get the collections keys.
*
* @param {Object|Array} collection
*
* @return {Array}
*/
function keys(collection) {
return collection && Object.keys(collection) || [];
}
/**
* Group collection members by attribute.
*
* @param {Object|Array} collection
* @param {Extractor} extractor
*
* @return {Object} map with { attrValue => [ a, b, c ] }
*/
function groupBy(collection, extractor, grouped = {}) {
extractor = toExtractor(extractor);
forEach(collection, function (val) {
let discriminator = extractor(val) || '_';
let group = grouped[discriminator];
if (!group) {
group = grouped[discriminator] = [];
}
group.push(val);
});
return grouped;
}
/**
* Sort collection by criteria.
*
* @template T
*
* @param {Collection<T>} collection
* @param {Extractor<T, number | string>} extractor
*
* @return {Array}
*/
function sortBy(collection, extractor) {
extractor = toExtractor(extractor);
let sorted = [];
forEach(collection, function (value, key) {
let disc = extractor(value, key);
let entry = {
d: disc,
v: value
};
for (var idx = 0; idx < sorted.length; idx++) {
let {
d
} = sorted[idx];
if (disc < d) {
sorted.splice(idx, 0, entry);
return;
}
}
// not inserted, append (!)
sorted.push(entry);
});
return map$1(sorted, e => e.v);
}
/**
* @param {string | ((e: any) => any) } extractor
*
* @return { (e: any) => any }
*/
function toExtractor(extractor) {
/**
* @satisfies { (e: any) => any }
*/
return isFunction(extractor) ? extractor : e => {
// @ts-ignore: just works
return e[extractor];
};
}
/**
* @template T
* @param {Matcher<T>} matcher
*
* @return {MatchFn<T>}
*/
function toMatcher(matcher) {
return isFunction(matcher) ? matcher : e => {
return e === matcher;
};
}
function identity(arg) {
return arg;
}
function toNum(arg) {
return Number(arg);
}
/* global setTimeout clearTimeout */
/**
* @typedef { {
* (...args: any[]): any;
* flush: () => void;
* cancel: () => void;
* } } DebouncedFunction
*/
/**
* Debounce fn, calling it only once if the given time
* elapsed between calls.
*
* Lodash-style the function exposes methods to `#clear`
* and `#flush` to control internal behavior.
*
* @param {Function} fn
* @param {Number} timeout
*
* @return {DebouncedFunction} debounced function
*/
function debounce(fn, timeout) {
let timer;
let lastArgs;
let lastThis;
let lastNow;
function fire(force) {
let now = Date.now();
let scheduledDiff = force ? 0 : lastNow + timeout - now;
if (scheduledDiff > 0) {
return schedule(scheduledDiff);
}
fn.apply(lastThis, lastArgs);
clear();
}
function schedule(timeout) {
timer = setTimeout(fire, timeout);
}
function clear() {
if (timer) {
clearTimeout(timer);
}
timer = lastNow = lastArgs = lastThis = undefined;
}
function flush() {
if (timer) {
fire(true);
}
clear();
}
/**
* @type { DebouncedFunction }
*/
function callback(...args) {
lastNow = Date.now();
lastArgs = args;
lastThis = this;
// ensure an execution is scheduled
if (!timer) {
schedule(timeout);
}
}
callback.flush = flush;
callback.cancel = clear;
return callback;
}
/**
* Convenience wrapper for `Object.assign`.
*
* @param {Object} target
* @param {...Object} others
*
* @return {Object} the target
*/
function assign(target, ...others) {
return Object.assign(target, ...others);
}
/**
* Sets a nested property of a given object to the specified value.
*
* This mutates the object and returns it.
*
* @template T
*
* @param {T} target The target of the set operation.
* @param {(string|number)[]} path The path to the nested value.
* @param {any} value The value to set.
*
* @return {T}
*/
function set(target, path, value) {
let currentTarget = target;
forEach(path, function (key, idx) {
if (typeof key !== 'number' && typeof key !== 'string') {
throw new Error('illegal key type: ' + typeof key + '. Key should be of type number or string.');
}
if (key === 'constructor') {
throw new Error('illegal key: constructor');
}
if (key === '__proto__') {
throw new Error('illegal key: __proto__');
}
let nextKey = path[idx + 1];
let nextTarget = currentTarget[key];
if (isDefined(nextKey) && isNil(nextTarget)) {
nextTarget = currentTarget[key] = isNaN(+nextKey) ? {} : [];
}
if (isUndefined(nextKey)) {
if (isUndefined(value)) {
delete currentTarget[key];
} else {
currentTarget[key] = value;
}
} else {
currentTarget = nextTarget;
}
});
return target;
}
/**
* Gets a nested property of a given object.
*
* @param {Object} target The target of the get operation.
* @param {(string|number)[]} path The path to the nested value.
* @param {any} [defaultValue] The value to return if no value exists.
*
* @return {any}
*/
function get$1(target, path, defaultValue) {
let currentTarget = target;
forEach(path, function (key) {
// accessing nil property yields <undefined>
if (isNil(currentTarget)) {
currentTarget = undefined;
return false;
}
currentTarget = currentTarget[key];
});
return isUndefined(currentTarget) ? defaultValue : currentTarget;
}
function g(n, t) {
for (var e in t) n[e] = t[e];
return n;
}
function C$1(n, t) {
for (var e in n) if ("__source" !== e && !(e in t)) return !0;
for (var r in t) if ("__source" !== r && n[r] !== t[r]) return !0;
return !1;
}
function E(n) {
this.props = n;
}
function w(n, e) {
function r(n) {
var t = this.props.ref,
r = t == n.ref;
return !r && t && (t.call ? t(null) : t.current = null), e ? !e(this.props, n) || !r : C$1(this.props, n);
}
function u(e) {
return this.shouldComponentUpdate = r, y$1(n, e);
}
return u.displayName = "Memo(" + (n.displayName || n.name) + ")", u.prototype.isReactComponent = !0, u.__f = !0, u;
}
(E.prototype = new b$1()).isPureReactComponent = !0, E.prototype.shouldComponentUpdate = function (n, t) {
return C$1(this.props, n) || C$1(this.state, t);
};
var x = l$1.__b;
l$1.__b = function (n) {
n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), x && x(n);
};
var R = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.forward_ref") || 3911;
function N(n) {
function t(t) {
var e = g({}, t);
return delete e.ref, n(e, t.ref || null);
}
return t.$$typeof = R, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (n.displayName || n.name) + ")", t;
}
var k = function (n, t) {
return null == n ? null : $$1($$1(n).map(t));
},
A = {
map: k,
forEach: k,
count: function (n) {
return n ? $$1(n).length : 0;
},
only: function (n) {
var t = $$1(n);
if (1 !== t.length) throw "Children.only";
return t[0];
},
toArray: $$1
},
O = l$1.__e;
l$1.__e = function (n, t, e, r) {
if (n.then) for (var u, o = t; o = o.__;) if ((u = o.__c) && u.__c) return null == t.__e && (t.__e = e.__e, t.__k = e.__k), u.__c(n, t);
O(n, t, e, r);
};
var T = l$1.unmount;
function F(n, t, e) {
return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function (n) {
"function" == typeof n.__c && n.__c();
}), n.__c.__H = null), null != (n = g({}, n)).__c && (n.__c.__P === e && (n.__c.__P = t), n.__c = null), n.__k = n.__k && n.__k.map(function (n) {
return F(n, t, e);
})), n;
}
function I(n, t, e) {
return n && e && (n.__v = null, n.__k = n.__k && n.__k.map(function (n) {
return I(n, t, e);
}), n.__c && n.__c.__P === t && (n.__e && e.appendChild(n.__e), n.__c.__e = !0, n.__c.__P = e)), n;
}
function L() {
this.__u = 0, this.t = null, this.__b = null;
}
function U(n) {
var t = n.__.__c;
return t && t.__a && t.__a(n);
}
function D(n) {
var e, r, u;
function o(o) {
if (e || (e = n()).then(function (n) {
r = n.default || n;
}, function (n) {
u = n;
}), u) throw u;
if (!r) throw e;
return y$1(r, o);
}
return o.displayName = "Lazy", o.__f = !0, o;
}
function M() {
this.u = null, this.o = null;
}
l$1.unmount = function (n) {
var t = n.__c;
t && t.__R && t.__R(), t && 32 & n.__u && (n.type = null), T && T(n);
}, (L.prototype = new b$1()).__c = function (n, t) {
var e = t.__c,
r = this;
null == r.t && (r.t = []), r.t.push(e);
var u = U(r.__v),
o = !1,
i = function () {
o || (o = !0, e.__R = null, u ? u(l) : l());
};
e.__R = i;
var l = function () {
if (! --r.__u) {
if (r.state.__a) {
var n = r.state.__a;
r.__v.__k[0] = I(n, n.__c.__P, n.__c.__O);
}
var t;
for (r.setState({
__a: r.__b = null
}); t = r.t.pop();) t.forceUpdate();
}
};
r.__u++ || 32 & t.__u || r.setState({
__a: r.__b = r.__v.__k[0]
}), n.then(i, i);
}, L.prototype.componentWillUnmount = function () {
this.t = [];
}, L.prototype.render = function (n, e) {
if (this.__b) {
if (this.__v.__k) {
var r = document.createElement("div"),
o = this.__v.__k[0].__c;
this.__v.__k[0] = F(this.__b, r, o.__O = o.__P);
}
this.__b = null;
}
var i = e.__a && y$1(g$2, null, n.fallback);
return i && (i.__u &= -33), [y$1(g$2, null, e.__a ? null : n.children), i];
};
var V = function (n, t, e) {
if (++e[1] === e[0] && n.o.delete(t), n.props.revealOrder && ("t" !== n.props.revealOrder[0] || !n.o.size)) for (e = n.u; e;) {
for (; e.length > 3;) e.pop()();
if (e[1] < e[0]) break;
n.u = e = e[2];
}
};
function W(n) {
return this.getChildContext = function () {
return n.context;
}, n.children;
}
function P(n) {
var e = this,
r = n.i;
e.componentWillUnmount = function () {
q$2(null, e.l), e.l = null, e.i = null;
}, e.i && e.i !== r && e.componentWillUnmount(), e.l || (e.i = r, e.l = {
nodeType: 1,
parentNode: r,
childNodes: [],
appendChild: function (n) {
this.childNodes.push(n), e.i.appendChild(n);
},
insertBefore: function (n, t) {
this.childNodes.push(n), e.i.appendChild(n);
},
removeChild: function (n) {
this.childNodes.splice(this.childNodes.indexOf(n) >>> 1, 1), e.i.removeChild(n);
}
}), q$2(y$1(W, {
context: e.context
}, n.__v), e.l);
}
function j(n, e) {
var r = y$1(P, {
__v: n,
i: e
});
return r.containerInfo = e, r;
}
(M.prototype = new b$1()).__a = function (n) {
var t = this,
e = U(t.__v),
r = t.o.get(n);
return r[0]++, function (u) {
var o = function () {
t.props.revealOrder ? (r.push(u), V(t, n, r)) : u();
};
e ? e(o) : o();
};
}, M.prototype.render = function (n) {
this.u = null, this.o = new Map();
var t = $$1(n.children);
n.revealOrder && "b" === n.revealOrder[0] && t.reverse();
for (var e = t.length; e--;) this.o.set(t[e], this.u = [1, 0, this.u]);
return n.children;
}, M.prototype.componentDidUpdate = M.prototype.componentDidMount = function () {
var n = this;
this.o.forEach(function (t, e) {
V(n, e, t);
});
};
var z = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103,
B = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,
H = /^on(Ani|Tra|Tou|BeforeInp|Compo)/,
Z = /[A-Z0-9]/g,
Y = "undefined" != typeof document,
$ = function (n) {
return ("undefined" != typeof Symbol && "symbol" == typeof Symbol() ? /fil|che|rad/ : /fil|che|ra/).test(n);
};
function q(n, t, e) {
return null == t.__k && (t.textContent = ""), q$2(n, t), "function" == typeof e && e(), n ? n.__c : null;
}
function G(n, t, e) {
return B$2(n, t), "function" == typeof e && e(), n ? n.__c : null;
}
b$1.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function (t) {
Object.defineProperty(b$1.prototype, t, {
configurable: !0,
get: function () {
return this["UNSAFE_" + t];
},
set: function (n) {
Object.defineProperty(this, t, {
configurable: !0,
writable: !0,
value: n
});
}
});
});
var J = l$1.event;
function K() {}
function Q() {
return this.cancelBubble;
}
function X() {
return this.defaultPrevented;
}
l$1.event = function (n) {
return J && (n = J(n)), n.persist = K, n.isPropagationStopped = Q, n.isDefaultPrevented = X, n.nativeEvent = n;
};
var nn,
tn = {
enumerable: !1,
configurable: !0,
get: function () {
return this.class;
}
},
en = l$1.vnode;
l$1.vnode = function (n) {
"string" == typeof n.type && function (n) {
var t = n.props,
e = n.type,
u = {};
for (var o in t) {
var i = t[o];
if (!("value" === o && "defaultValue" in t && null == i || Y && "children" === o && "noscript" === e || "class" === o || "className" === o)) {
var l = o.toLowerCase();
"defaultValue" === o && "value" in t && null == t.value ? o = "value" : "download" === o && !0 === i ? i = "" : "ondoubleclick" === l ? o = "ondblclick" : "onchange" !== l || "input" !== e && "textarea" !== e || $(t.type) ? "onfocus" === l ? o = "onfocusin" : "onblur" === l ? o = "onfocusout" : H.test(o) ? o = l : -1 === e.indexOf("-") && B.test(o) ? o = o.replace(Z, "-$&").toLowerCase() : null === i && (i = void 0) : l = o = "oninput", "oninput" === l && u[o = l] && (o = "oninputCapture"), u[o] = i;
}
}
"select" == e && u.multiple && Array.isArray(u.value) && (u.value = $$1(t.children).forEach(function (n) {
n.props.selected = -1 != u.value.indexOf(n.props.value);
})), "select" == e && null != u.defaultValue && (u.value = $$1(t.children).forEach(function (n) {
n.props.selected = u.multiple ? -1 != u.defaultValue.indexOf(n.props.value) : u.defaultValue == n.props.value;
})), t.class && !t.className ? (u.class = t.class, Object.defineProperty(u, "className", tn)) : (t.className && !t.class || t.class && t.className) && (u.class = u.className = t.className), n.props = u;
}(n), n.$$typeof = z, en && en(n);
};
var rn = l$1.__r;
l$1.__r = function (n) {
rn && rn(n), nn = n.__c;
};
var un = l$1.diffed;
l$1.diffed = function (n) {
un && un(n);
var t = n.props,
e = n.__e;
null != e && "textarea" === n.type && "value" in t && t.value !== e.value && (e.value = null == t.value ? "" : t.value), nn = null;
};
var on = {
ReactCurrentDispatcher: {
current: {
readContext: function (n) {
return nn.__n[n.__c].props.value;
}
}
}
};
function cn(n) {
return y$1.bind(null, n);
}
function fn(n) {
return !!n && n.$$typeof === z;
}
function an(n) {
return fn(n) && n.type === g$2;
}
function sn(n) {
return fn(n) ? E$1.apply(null, arguments) : n;
}
function hn(n) {
return !!n.__k && (q$2(null, n), !0);
}
function vn(n) {
return n && (n.base || 1 === n.nodeType && n) || null;
}
var dn = function (n, t) {
return n(t);
},
pn = function (n, t) {
return n(t);
},
mn = g$2;
function yn(n) {
n();
}
function _n(n) {
return n;
}
function bn() {
return [!1, yn];
}
var Sn = y,
gn = fn;
function Cn(n, t) {
var e = t(),
r = h({
h: {
__: e,
v: t
}
}),
u = r[0].h,
o = r[1];
return y(function () {
u.__ = e, u.v = t, En(u) && o({
h: u
});
}, [n, e, t]), p(function () {
return En(u) && o({
h: u
}), n(function () {
En(u) && o({
h: u
});
});
}, [n]), e;
}
function En(n) {
var t,
e,
r = n.v,
u = n.__;
try {
var o = r();
return !((t = u) === (e = o) && (0 !== t || 1 / t == 1 / e) || t != t && e != e);
} catch (n) {
return !0;
}
}
var wn = {
useState: h,
useId: V$1,
useReducer: s,
useEffect: p,
useLayoutEffect: y,
useInsertionEffect: Sn,
useTransition: bn,
useDeferredValue: _n,
useSyncExternalStore: Cn,
startTransition: yn,
useRef: _,
useImperativeHandle: A$1,
useMemo: F$1,
useCallback: T$1,
useContext: q$1,
useDebugValue: x$1,
version: "17.0.2",
Children: A,
render: q,
hydrate: G,
unmountComponentAtNode: hn,
createPortal: j,
createElement: y$1,
createContext: F$2,
createFactory: cn,
cloneElement: sn,
createRef: _$1,
Fragment: g$2,
isValidElement: fn,
isElement: gn,
isFragment: an,
findDOMNode: vn,
Component: b$1,
PureComponent: E,
memo: w,
forwardRef: N,
flushSync: pn,
unstable_batchedUpdates: dn,
StrictMode: mn,
Suspense: L,
SuspenseList: M,
lazy: D,
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: on
};
var f = 0;
function u(e, t, n, o, i, u) {
var a,
c,
p = {};
for (c in t) "ref" == c ? a = t[c] : p[c] = t[c];
var l = {
type: e,
props: p,
key: n,
ref: a,
__k: null,
__: null,
__b: 0,
__e: null,
__d: void 0,
__c: null,
constructor: void 0,
__v: --f,
__i: -1,
__u: 0,
__source: i,
__self: u
};
if ("function" == typeof e && (a = e.defaultProps)) for (c in a) void 0 === p[c] && (p[c] = a[c]);
return l$1.vnode && l$1.vnode(l), l;
}
function getDefaultExportFromCjs (x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
}
var classnames$1 = {exports: {}};
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
var hasRequiredClassnames;
function requireClassnames () {
if (hasRequiredClassnames) return classnames$1.exports;
hasRequiredClassnames = 1;
(function (module) {
/* global define */
(function () {
var hasOwn = {}.hasOwnProperty;
function classNames() {
var classes = [];
for (var i = 0; i < arguments.length; i++) {
var arg = arguments[i];
if (!arg) continue;
var argType = typeof arg;
if (argType === 'string' || argType === 'number') {
classes.push(arg);
} else if (Array.isArray(arg)) {
if (arg.length) {
var inner = classNames.apply(null, arg);
if (inner) {
classes.push(inner);
}
}
} else if (argType === 'object') {
if (arg.toString === Object.prototype.toString) {
for (var key in arg) {
if (hasOwn.call(arg, key) && arg[key]) {
classes.push(key);
}
}
} else {
classes.push(arg.toString());
}
}
}
return classes.join(' ');
}
if (module.exports) {
classNames.default = classNames;
module.exports = classNames;
} else {
window.classNames = classNames;
}
})();
} (classnames$1));
return classnames$1.exports;
}
var classnamesExports = requireClassnames();
var classnames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
function _mergeNamespaces$1(n, m) {
m.forEach(function (e) {
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
if (k !== 'default' && !(k in n)) {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () {
return e[k];
}
});
}
});
});
return Object.freeze(n);
}
var componentEvent = {};
var bind$1, unbind$1, prefix;
function detect() {
bind$1 = window.addEventListener ? 'addEventListener' : 'attachEvent';
unbind$1 = window.removeEventListener ? 'removeEventListener' : 'detachEvent';
prefix = bind$1 !== 'addEventListener' ? 'on' : '';
}
/**
* Bind `el` event `type` to `fn`.
*
* @param {Element} el
* @param {String} type
* @param {Function} fn
* @param {Boolean} capture
* @return {Function}
* @api public
*/
var bind_1 = componentEvent.bind = function (el, type, fn, capture) {
if (!bind$1) detect();
el[bind$1](prefix + type, fn, capture || false);
return fn;
};
/**
* Unbind `el` event `type`'s callback `fn`.
*
* @param {Element} el
* @param {String} type
* @param {Function} fn
* @param {Boolean} capture
* @return {Function}
* @api public
*/
var unbind_1 = componentEvent.unbind = function (el, type, fn, capture) {
if (!unbind$1) detect();
el[unbind$1](prefix + type, fn, capture || false);
return fn;
};
var event = /*#__PURE__*/_mergeNamespaces$1({
__proto__: null,
bind: bind_1,
unbind: unbind_1,
'default': componentEvent
}, [componentEvent]);
/**
* Expose `parse`.
*/
var domify = parse;
/**
* Tests for browser support.
*/
var innerHTMLBug = false;
var bugTestDiv;
if (typeof document !== 'undefined') {
bugTestDiv = document.createElement('div');
// Setup
bugTestDiv.innerHTML = ' <link/><table></table><a href="/a">a</a><input type="checkbox"/>';
// Make sure that link elements get serialized correctly by innerHTML
// This requires a wrapper element in IE
innerHTMLBug = !bugTestDiv.getElementsBy