Created
March 1, 2025 11:53
-
-
Save MikeRatcliffe/3d744f14651565e7a6c5f8066f0b0088 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Zo = Object.defineProperty; | |
var No = (s, o, _) => | |
o in s | |
? Zo(s, o, { enumerable: !0, configurable: !0, writable: !0, value: _ }) | |
: (s[o] = _); | |
var Fo = (s, o) => () => (o || s((o = { exports: {} }).exports, o), o.exports); | |
var bo = (s, o, _) => (No(s, typeof o != "symbol" ? o + "" : o, _), _), | |
Yo = (s, o, _) => { | |
if (!o.has(s)) throw TypeError("Cannot " + _); | |
}; | |
var Dn = (s, o, _) => ( | |
Yo(s, o, "read from private field"), _ ? _.call(s) : o.get(s) | |
), | |
Ao = (s, o, _) => { | |
if (o.has(s)) | |
throw TypeError("Cannot add the same private member more than once"); | |
o instanceof WeakSet ? o.add(s) : o.set(s, _); | |
}; | |
var zo = Fo((exports, module) => { | |
(function () { | |
const o = document.createElement("link").relList; | |
if (o && o.supports && o.supports("modulepreload")) return; | |
for (const et of document.querySelectorAll('link[rel="modulepreload"]')) | |
_e(et); | |
new MutationObserver((et) => { | |
for (const tt of et) | |
if (tt.type === "childList") | |
for (const rt of tt.addedNodes) | |
rt.tagName === "LINK" && rt.rel === "modulepreload" && _e(rt); | |
}).observe(document, { childList: !0, subtree: !0 }); | |
function _(et) { | |
const tt = {}; | |
return ( | |
et.integrity && (tt.integrity = et.integrity), | |
et.referrerPolicy && (tt.referrerPolicy = et.referrerPolicy), | |
et.crossOrigin === "use-credentials" | |
? (tt.credentials = "include") | |
: et.crossOrigin === "anonymous" | |
? (tt.credentials = "omit") | |
: (tt.credentials = "same-origin"), | |
tt | |
); | |
} | |
function _e(et) { | |
if (et.ep) return; | |
et.ep = !0; | |
const tt = _(et); | |
fetch(et.href, tt); | |
} | |
})(); | |
var commonjsGlobal$3 = | |
typeof globalThis < "u" | |
? globalThis | |
: typeof window < "u" | |
? window | |
: typeof global < "u" | |
? global | |
: typeof self < "u" | |
? self | |
: {}; | |
function getDefaultExportFromCjs$1(s) { | |
return s && | |
s.__esModule && | |
Object.prototype.hasOwnProperty.call(s, "default") | |
? s.default | |
: s; | |
} | |
function getAugmentedNamespace(s) { | |
if (s.__esModule) return s; | |
var o = s.default; | |
if (typeof o == "function") { | |
var _ = function _e() { | |
return this instanceof _e | |
? Reflect.construct(o, arguments, this.constructor) | |
: o.apply(this, arguments); | |
}; | |
_.prototype = o.prototype; | |
} else _ = {}; | |
return ( | |
Object.defineProperty(_, "__esModule", { value: !0 }), | |
Object.keys(s).forEach(function (_e) { | |
var et = Object.getOwnPropertyDescriptor(s, _e); | |
Object.defineProperty( | |
_, | |
_e, | |
et.get | |
? et | |
: { | |
enumerable: !0, | |
get: function () { | |
return s[_e]; | |
}, | |
}, | |
); | |
}), | |
_ | |
); | |
} | |
var jsxRuntime = { exports: {} }, | |
reactJsxRuntime_production_min = {}, | |
react = { exports: {} }, | |
react_production_min = {}; | |
/* | |
object-assign | |
(c) Sindre Sorhus | |
@license MIT | |
*/ var getOwnPropertySymbols$1 = Object.getOwnPropertySymbols, | |
hasOwnProperty$6 = Object.prototype.hasOwnProperty, | |
propIsEnumerable = Object.prototype.propertyIsEnumerable; | |
function toObject$1(s) { | |
if (s == null) | |
throw new TypeError( | |
"Object.assign cannot be called with null or undefined", | |
); | |
return Object(s); | |
} | |
function shouldUseNative() { | |
try { | |
if (!Object.assign) return !1; | |
var s = new String("abc"); | |
if (((s[5] = "de"), Object.getOwnPropertyNames(s)[0] === "5")) return !1; | |
for (var o = {}, _ = 0; _ < 10; _++) o["_" + String.fromCharCode(_)] = _; | |
var _e = Object.getOwnPropertyNames(o).map(function (tt) { | |
return o[tt]; | |
}); | |
if (_e.join("") !== "0123456789") return !1; | |
var et = {}; | |
return ( | |
"abcdefghijklmnopqrst".split("").forEach(function (tt) { | |
et[tt] = tt; | |
}), | |
Object.keys(Object.assign({}, et)).join("") === "abcdefghijklmnopqrst" | |
); | |
} catch { | |
return !1; | |
} | |
} | |
var objectAssign = shouldUseNative() | |
? Object.assign | |
: function (s, o) { | |
for ( | |
var _, _e = toObject$1(s), et, tt = 1; | |
tt < arguments.length; | |
tt++ | |
) { | |
_ = Object(arguments[tt]); | |
for (var rt in _) hasOwnProperty$6.call(_, rt) && (_e[rt] = _[rt]); | |
if (getOwnPropertySymbols$1) { | |
et = getOwnPropertySymbols$1(_); | |
for (var it = 0; it < et.length; it++) | |
propIsEnumerable.call(_, et[it]) && (_e[et[it]] = _[et[it]]); | |
} | |
} | |
return _e; | |
}; | |
const objectAssign$1 = getDefaultExportFromCjs$1(objectAssign); | |
/** @license React v16.14.0 | |
* react.production.min.js | |
* | |
* Copyright (c) Facebook, Inc. and its affiliates. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/ var l$2 = objectAssign, | |
n$4 = typeof Symbol == "function" && Symbol.for, | |
p$4 = n$4 ? Symbol.for("react.element") : 60103, | |
q$4 = n$4 ? Symbol.for("react.portal") : 60106, | |
r$3 = n$4 ? Symbol.for("react.fragment") : 60107, | |
t$2 = n$4 ? Symbol.for("react.strict_mode") : 60108, | |
u$f = n$4 ? Symbol.for("react.profiler") : 60114, | |
v$3 = n$4 ? Symbol.for("react.provider") : 60109, | |
w$4 = n$4 ? Symbol.for("react.context") : 60110, | |
x$3 = n$4 ? Symbol.for("react.forward_ref") : 60112, | |
y$2 = n$4 ? Symbol.for("react.suspense") : 60113, | |
z$3 = n$4 ? Symbol.for("react.memo") : 60115, | |
A$3 = n$4 ? Symbol.for("react.lazy") : 60116, | |
B$1 = typeof Symbol == "function" && Symbol.iterator; | |
function C$3(s) { | |
for ( | |
var o = "https://reactjs.org/docs/error-decoder.html?invariant=" + s, | |
_ = 1; | |
_ < arguments.length; | |
_++ | |
) | |
o += "&args[]=" + encodeURIComponent(arguments[_]); | |
return ( | |
"Minified React error #" + | |
s + | |
"; visit " + | |
o + | |
" for the full message or use the non-minified dev environment for full errors and additional helpful warnings." | |
); | |
} | |
var D$1 = { | |
isMounted: function () { | |
return !1; | |
}, | |
enqueueForceUpdate: function () {}, | |
enqueueReplaceState: function () {}, | |
enqueueSetState: function () {}, | |
}, | |
E$2 = {}; | |
function F$2(s, o, _) { | |
(this.props = s), | |
(this.context = o), | |
(this.refs = E$2), | |
(this.updater = _ || D$1); | |
} | |
F$2.prototype.isReactComponent = {}; | |
F$2.prototype.setState = function (s, o) { | |
if (typeof s != "object" && typeof s != "function" && s != null) | |
throw Error(C$3(85)); | |
this.updater.enqueueSetState(this, s, o, "setState"); | |
}; | |
F$2.prototype.forceUpdate = function (s) { | |
this.updater.enqueueForceUpdate(this, s, "forceUpdate"); | |
}; | |
function G$2() {} | |
G$2.prototype = F$2.prototype; | |
function H$3(s, o, _) { | |
(this.props = s), | |
(this.context = o), | |
(this.refs = E$2), | |
(this.updater = _ || D$1); | |
} | |
var I$3 = (H$3.prototype = new G$2()); | |
I$3.constructor = H$3; | |
l$2(I$3, F$2.prototype); | |
I$3.isPureReactComponent = !0; | |
var J$2 = { current: null }, | |
K$2 = Object.prototype.hasOwnProperty, | |
L$3 = { key: !0, ref: !0, __self: !0, __source: !0 }; | |
function M$1(s, o, _) { | |
var _e, | |
et = {}, | |
tt = null, | |
rt = null; | |
if (o != null) | |
for (_e in (o.ref !== void 0 && (rt = o.ref), | |
o.key !== void 0 && (tt = "" + o.key), | |
o)) | |
K$2.call(o, _e) && !L$3.hasOwnProperty(_e) && (et[_e] = o[_e]); | |
var it = arguments.length - 2; | |
if (it === 1) et.children = _; | |
else if (1 < it) { | |
for (var ot = Array(it), ct = 0; ct < it; ct++) | |
ot[ct] = arguments[ct + 2]; | |
et.children = ot; | |
} | |
if (s && s.defaultProps) | |
for (_e in ((it = s.defaultProps), it)) | |
et[_e] === void 0 && (et[_e] = it[_e]); | |
return { | |
$$typeof: p$4, | |
type: s, | |
key: tt, | |
ref: rt, | |
props: et, | |
_owner: J$2.current, | |
}; | |
} | |
function N$1(s, o) { | |
return { | |
$$typeof: p$4, | |
type: s.type, | |
key: o, | |
ref: s.ref, | |
props: s.props, | |
_owner: s._owner, | |
}; | |
} | |
function O$1(s) { | |
return typeof s == "object" && s !== null && s.$$typeof === p$4; | |
} | |
function escape$1(s) { | |
var o = { "=": "=0", ":": "=2" }; | |
return ( | |
"$" + | |
("" + s).replace(/[=:]/g, function (_) { | |
return o[_]; | |
}) | |
); | |
} | |
var P$1 = /\/+/g, | |
Q$2 = []; | |
function R$3(s, o, _, _e) { | |
if (Q$2.length) { | |
var et = Q$2.pop(); | |
return ( | |
(et.result = s), | |
(et.keyPrefix = o), | |
(et.func = _), | |
(et.context = _e), | |
(et.count = 0), | |
et | |
); | |
} | |
return { result: s, keyPrefix: o, func: _, context: _e, count: 0 }; | |
} | |
function S$2(s) { | |
(s.result = null), | |
(s.keyPrefix = null), | |
(s.func = null), | |
(s.context = null), | |
(s.count = 0), | |
10 > Q$2.length && Q$2.push(s); | |
} | |
function T$1(s, o, _, _e) { | |
var et = typeof s; | |
(et === "undefined" || et === "boolean") && (s = null); | |
var tt = !1; | |
if (s === null) tt = !0; | |
else | |
switch (et) { | |
case "string": | |
case "number": | |
tt = !0; | |
break; | |
case "object": | |
switch (s.$$typeof) { | |
case p$4: | |
case q$4: | |
tt = !0; | |
} | |
} | |
if (tt) return _(_e, s, o === "" ? "." + U$3(s, 0) : o), 1; | |
if (((tt = 0), (o = o === "" ? "." : o + ":"), Array.isArray(s))) | |
for (var rt = 0; rt < s.length; rt++) { | |
et = s[rt]; | |
var it = o + U$3(et, rt); | |
tt += T$1(et, it, _, _e); | |
} | |
else if ( | |
(s === null || typeof s != "object" | |
? (it = null) | |
: ((it = (B$1 && s[B$1]) || s["@@iterator"]), | |
(it = typeof it == "function" ? it : null)), | |
typeof it == "function") | |
) | |
for (s = it.call(s), rt = 0; !(et = s.next()).done; ) | |
(et = et.value), (it = o + U$3(et, rt++)), (tt += T$1(et, it, _, _e)); | |
else if (et === "object") | |
throw ( | |
((_ = "" + s), | |
Error( | |
C$3( | |
31, | |
_ === "[object Object]" | |
? "object with keys {" + Object.keys(s).join(", ") + "}" | |
: _, | |
"", | |
), | |
)) | |
); | |
return tt; | |
} | |
function V$2(s, o, _) { | |
return s == null ? 0 : T$1(s, "", o, _); | |
} | |
function U$3(s, o) { | |
return typeof s == "object" && s !== null && s.key != null | |
? escape$1(s.key) | |
: o.toString(36); | |
} | |
function W$2(s, o) { | |
s.func.call(s.context, o, s.count++); | |
} | |
function aa$1(s, o, _) { | |
var _e = s.result, | |
et = s.keyPrefix; | |
(s = s.func.call(s.context, o, s.count++)), | |
Array.isArray(s) | |
? X$1(s, _e, _, function (tt) { | |
return tt; | |
}) | |
: s != null && | |
(O$1(s) && | |
(s = N$1( | |
s, | |
et + | |
(!s.key || (o && o.key === s.key) | |
? "" | |
: ("" + s.key).replace(P$1, "$&/") + "/") + | |
_, | |
)), | |
_e.push(s)); | |
} | |
function X$1(s, o, _, _e, et) { | |
var tt = ""; | |
_ != null && (tt = ("" + _).replace(P$1, "$&/") + "/"), | |
(o = R$3(o, tt, _e, et)), | |
V$2(s, aa$1, o), | |
S$2(o); | |
} | |
var Y$1 = { current: null }; | |
function Z$2() { | |
var s = Y$1.current; | |
if (s === null) throw Error(C$3(321)); | |
return s; | |
} | |
var ba$1 = { | |
ReactCurrentDispatcher: Y$1, | |
ReactCurrentBatchConfig: { suspense: null }, | |
ReactCurrentOwner: J$2, | |
IsSomeRendererActing: { current: !1 }, | |
assign: l$2, | |
}; | |
react_production_min.Children = { | |
map: function (s, o, _) { | |
if (s == null) return s; | |
var _e = []; | |
return X$1(s, _e, null, o, _), _e; | |
}, | |
forEach: function (s, o, _) { | |
if (s == null) return s; | |
(o = R$3(null, null, o, _)), V$2(s, W$2, o), S$2(o); | |
}, | |
count: function (s) { | |
return V$2( | |
s, | |
function () { | |
return null; | |
}, | |
null, | |
); | |
}, | |
toArray: function (s) { | |
var o = []; | |
return ( | |
X$1(s, o, null, function (_) { | |
return _; | |
}), | |
o | |
); | |
}, | |
only: function (s) { | |
if (!O$1(s)) throw Error(C$3(143)); | |
return s; | |
}, | |
}; | |
react_production_min.Component = F$2; | |
react_production_min.Fragment = r$3; | |
react_production_min.Profiler = u$f; | |
react_production_min.PureComponent = H$3; | |
react_production_min.StrictMode = t$2; | |
react_production_min.Suspense = y$2; | |
react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = | |
ba$1; | |
react_production_min.cloneElement = function (s, o, _) { | |
if (s == null) throw Error(C$3(267, s)); | |
var _e = l$2({}, s.props), | |
et = s.key, | |
tt = s.ref, | |
rt = s._owner; | |
if (o != null) { | |
if ( | |
(o.ref !== void 0 && ((tt = o.ref), (rt = J$2.current)), | |
o.key !== void 0 && (et = "" + o.key), | |
s.type && s.type.defaultProps) | |
) | |
var it = s.type.defaultProps; | |
for (ot in o) | |
K$2.call(o, ot) && | |
!L$3.hasOwnProperty(ot) && | |
(_e[ot] = o[ot] === void 0 && it !== void 0 ? it[ot] : o[ot]); | |
} | |
var ot = arguments.length - 2; | |
if (ot === 1) _e.children = _; | |
else if (1 < ot) { | |
it = Array(ot); | |
for (var ct = 0; ct < ot; ct++) it[ct] = arguments[ct + 2]; | |
_e.children = it; | |
} | |
return { | |
$$typeof: p$4, | |
type: s.type, | |
key: et, | |
ref: tt, | |
props: _e, | |
_owner: rt, | |
}; | |
}; | |
react_production_min.createContext = function (s, o) { | |
return ( | |
o === void 0 && (o = null), | |
(s = { | |
$$typeof: w$4, | |
_calculateChangedBits: o, | |
_currentValue: s, | |
_currentValue2: s, | |
_threadCount: 0, | |
Provider: null, | |
Consumer: null, | |
}), | |
(s.Provider = { $$typeof: v$3, _context: s }), | |
(s.Consumer = s) | |
); | |
}; | |
react_production_min.createElement = M$1; | |
react_production_min.createFactory = function (s) { | |
var o = M$1.bind(null, s); | |
return (o.type = s), o; | |
}; | |
react_production_min.createRef = function () { | |
return { current: null }; | |
}; | |
react_production_min.forwardRef = function (s) { | |
return { $$typeof: x$3, render: s }; | |
}; | |
react_production_min.isValidElement = O$1; | |
react_production_min.lazy = function (s) { | |
return { $$typeof: A$3, _ctor: s, _status: -1, _result: null }; | |
}; | |
react_production_min.memo = function (s, o) { | |
return { $$typeof: z$3, type: s, compare: o === void 0 ? null : o }; | |
}; | |
react_production_min.useCallback = function (s, o) { | |
return Z$2().useCallback(s, o); | |
}; | |
react_production_min.useContext = function (s, o) { | |
return Z$2().useContext(s, o); | |
}; | |
react_production_min.useDebugValue = function () {}; | |
react_production_min.useEffect = function (s, o) { | |
return Z$2().useEffect(s, o); | |
}; | |
react_production_min.useImperativeHandle = function (s, o, _) { | |
return Z$2().useImperativeHandle(s, o, _); | |
}; | |
react_production_min.useLayoutEffect = function (s, o) { | |
return Z$2().useLayoutEffect(s, o); | |
}; | |
react_production_min.useMemo = function (s, o) { | |
return Z$2().useMemo(s, o); | |
}; | |
react_production_min.useReducer = function (s, o, _) { | |
return Z$2().useReducer(s, o, _); | |
}; | |
react_production_min.useRef = function (s) { | |
return Z$2().useRef(s); | |
}; | |
react_production_min.useState = function (s) { | |
return Z$2().useState(s); | |
}; | |
react_production_min.version = "16.14.0"; | |
react.exports = react_production_min; | |
var reactExports = react.exports; | |
const React$3 = getDefaultExportFromCjs$1(reactExports); | |
/** @license React v16.14.0 | |
* react-jsx-runtime.production.min.js | |
* | |
* Copyright (c) Facebook, Inc. and its affiliates. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/ var f$2 = reactExports, | |
g$4 = 60103; | |
reactJsxRuntime_production_min.Fragment = 60107; | |
if (typeof Symbol == "function" && Symbol.for) { | |
var h$3 = Symbol.for; | |
(g$4 = h$3("react.element")), | |
(reactJsxRuntime_production_min.Fragment = h$3("react.fragment")); | |
} | |
var m$3 = | |
f$2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, | |
n$3 = Object.prototype.hasOwnProperty, | |
p$3 = { key: !0, ref: !0, __self: !0, __source: !0 }; | |
function q$3(s, o, _) { | |
var _e, | |
et = {}, | |
tt = null, | |
rt = null; | |
_ !== void 0 && (tt = "" + _), | |
o.key !== void 0 && (tt = "" + o.key), | |
o.ref !== void 0 && (rt = o.ref); | |
for (_e in o) | |
n$3.call(o, _e) && !p$3.hasOwnProperty(_e) && (et[_e] = o[_e]); | |
if (s && s.defaultProps) | |
for (_e in ((o = s.defaultProps), o)) | |
et[_e] === void 0 && (et[_e] = o[_e]); | |
return { | |
$$typeof: g$4, | |
type: s, | |
key: tt, | |
ref: rt, | |
props: et, | |
_owner: m$3.current, | |
}; | |
} | |
reactJsxRuntime_production_min.jsx = q$3; | |
reactJsxRuntime_production_min.jsxs = q$3; | |
jsxRuntime.exports = reactJsxRuntime_production_min; | |
var jsxRuntimeExports = jsxRuntime.exports, | |
reactDom = { exports: {} }, | |
reactDom_production_min = {}, | |
scheduler = { exports: {} }, | |
scheduler_production_min = {}; | |
/** @license React v0.19.1 | |
* scheduler.production.min.js | |
* | |
* Copyright (c) Facebook, Inc. and its affiliates. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/ (function (s) { | |
var o, _, _e, et, tt; | |
if (typeof window > "u" || typeof MessageChannel != "function") { | |
var rt = null, | |
it = null, | |
ot = function () { | |
if (rt !== null) | |
try { | |
var Dt = s.unstable_now(); | |
rt(!0, Dt), (rt = null); | |
} catch (Zt) { | |
throw (setTimeout(ot, 0), Zt); | |
} | |
}, | |
ct = Date.now(); | |
(s.unstable_now = function () { | |
return Date.now() - ct; | |
}), | |
(o = function (Dt) { | |
rt !== null ? setTimeout(o, 0, Dt) : ((rt = Dt), setTimeout(ot, 0)); | |
}), | |
(_ = function (Dt, Zt) { | |
it = setTimeout(Dt, Zt); | |
}), | |
(_e = function () { | |
clearTimeout(it); | |
}), | |
(et = function () { | |
return !1; | |
}), | |
(tt = s.unstable_forceFrameRate = function () {}); | |
} else { | |
var at = window.performance, | |
ht = window.Date, | |
mt = window.setTimeout, | |
vt = window.clearTimeout; | |
if (typeof console < "u") { | |
var xt = window.cancelAnimationFrame; | |
typeof window.requestAnimationFrame != "function" && | |
console.error( | |
"This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills", | |
), | |
typeof xt != "function" && | |
console.error( | |
"This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills", | |
); | |
} | |
if (typeof at == "object" && typeof at.now == "function") | |
s.unstable_now = function () { | |
return at.now(); | |
}; | |
else { | |
var St = ht.now(); | |
s.unstable_now = function () { | |
return ht.now() - St; | |
}; | |
} | |
var $t = !1, | |
Et = null, | |
_t = -1, | |
Rt = 5, | |
Mt = 0; | |
(et = function () { | |
return s.unstable_now() >= Mt; | |
}), | |
(tt = function () {}), | |
(s.unstable_forceFrameRate = function (Dt) { | |
0 > Dt || 125 < Dt | |
? console.error( | |
"forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported", | |
) | |
: (Rt = 0 < Dt ? Math.floor(1e3 / Dt) : 5); | |
}); | |
var It = new MessageChannel(), | |
Xt = It.port2; | |
(It.port1.onmessage = function () { | |
if (Et !== null) { | |
var Dt = s.unstable_now(); | |
Mt = Dt + Rt; | |
try { | |
Et(!0, Dt) ? Xt.postMessage(null) : (($t = !1), (Et = null)); | |
} catch (Zt) { | |
throw (Xt.postMessage(null), Zt); | |
} | |
} else $t = !1; | |
}), | |
(o = function (Dt) { | |
(Et = Dt), $t || (($t = !0), Xt.postMessage(null)); | |
}), | |
(_ = function (Dt, Zt) { | |
_t = mt(function () { | |
Dt(s.unstable_now()); | |
}, Zt); | |
}), | |
(_e = function () { | |
vt(_t), (_t = -1); | |
}); | |
} | |
function Jt(Dt, Zt) { | |
var Vt = Dt.length; | |
Dt.push(Zt); | |
e: for (;;) { | |
var Ct = (Vt - 1) >>> 1, | |
jt = Dt[Ct]; | |
if (jt !== void 0 && 0 < nr(jt, Zt)) | |
(Dt[Ct] = Zt), (Dt[Vt] = jt), (Vt = Ct); | |
else break e; | |
} | |
} | |
function Ht(Dt) { | |
return (Dt = Dt[0]), Dt === void 0 ? null : Dt; | |
} | |
function qt(Dt) { | |
var Zt = Dt[0]; | |
if (Zt !== void 0) { | |
var Vt = Dt.pop(); | |
if (Vt !== Zt) { | |
Dt[0] = Vt; | |
e: for (var Ct = 0, jt = Dt.length; Ct < jt; ) { | |
var Wt = 2 * (Ct + 1) - 1, | |
er = Dt[Wt], | |
Gt = Wt + 1, | |
Ft = Dt[Gt]; | |
if (er !== void 0 && 0 > nr(er, Vt)) | |
Ft !== void 0 && 0 > nr(Ft, er) | |
? ((Dt[Ct] = Ft), (Dt[Gt] = Vt), (Ct = Gt)) | |
: ((Dt[Ct] = er), (Dt[Wt] = Vt), (Ct = Wt)); | |
else if (Ft !== void 0 && 0 > nr(Ft, Vt)) | |
(Dt[Ct] = Ft), (Dt[Gt] = Vt), (Ct = Gt); | |
else break e; | |
} | |
} | |
return Zt; | |
} | |
return null; | |
} | |
function nr(Dt, Zt) { | |
var Vt = Dt.sortIndex - Zt.sortIndex; | |
return Vt !== 0 ? Vt : Dt.id - Zt.id; | |
} | |
var wt = [], | |
nt = [], | |
ut = 1, | |
ft = null, | |
dt = 3, | |
Ot = !1, | |
yt = !1, | |
bt = !1; | |
function gt(Dt) { | |
for (var Zt = Ht(nt); Zt !== null; ) { | |
if (Zt.callback === null) qt(nt); | |
else if (Zt.startTime <= Dt) | |
qt(nt), (Zt.sortIndex = Zt.expirationTime), Jt(wt, Zt); | |
else break; | |
Zt = Ht(nt); | |
} | |
} | |
function st(Dt) { | |
if (((bt = !1), gt(Dt), !yt)) | |
if (Ht(wt) !== null) (yt = !0), o(pt); | |
else { | |
var Zt = Ht(nt); | |
Zt !== null && _(st, Zt.startTime - Dt); | |
} | |
} | |
function pt(Dt, Zt) { | |
(yt = !1), bt && ((bt = !1), _e()), (Ot = !0); | |
var Vt = dt; | |
try { | |
for ( | |
gt(Zt), ft = Ht(wt); | |
ft !== null && (!(ft.expirationTime > Zt) || (Dt && !et())); | |
) { | |
var Ct = ft.callback; | |
if (Ct !== null) { | |
(ft.callback = null), (dt = ft.priorityLevel); | |
var jt = Ct(ft.expirationTime <= Zt); | |
(Zt = s.unstable_now()), | |
typeof jt == "function" | |
? (ft.callback = jt) | |
: ft === Ht(wt) && qt(wt), | |
gt(Zt); | |
} else qt(wt); | |
ft = Ht(wt); | |
} | |
if (ft !== null) var Wt = !0; | |
else { | |
var er = Ht(nt); | |
er !== null && _(st, er.startTime - Zt), (Wt = !1); | |
} | |
return Wt; | |
} finally { | |
(ft = null), (dt = Vt), (Ot = !1); | |
} | |
} | |
function kt(Dt) { | |
switch (Dt) { | |
case 1: | |
return -1; | |
case 2: | |
return 250; | |
case 5: | |
return 1073741823; | |
case 4: | |
return 1e4; | |
default: | |
return 5e3; | |
} | |
} | |
var Qt = tt; | |
(s.unstable_IdlePriority = 5), | |
(s.unstable_ImmediatePriority = 1), | |
(s.unstable_LowPriority = 4), | |
(s.unstable_NormalPriority = 3), | |
(s.unstable_Profiling = null), | |
(s.unstable_UserBlockingPriority = 2), | |
(s.unstable_cancelCallback = function (Dt) { | |
Dt.callback = null; | |
}), | |
(s.unstable_continueExecution = function () { | |
yt || Ot || ((yt = !0), o(pt)); | |
}), | |
(s.unstable_getCurrentPriorityLevel = function () { | |
return dt; | |
}), | |
(s.unstable_getFirstCallbackNode = function () { | |
return Ht(wt); | |
}), | |
(s.unstable_next = function (Dt) { | |
switch (dt) { | |
case 1: | |
case 2: | |
case 3: | |
var Zt = 3; | |
break; | |
default: | |
Zt = dt; | |
} | |
var Vt = dt; | |
dt = Zt; | |
try { | |
return Dt(); | |
} finally { | |
dt = Vt; | |
} | |
}), | |
(s.unstable_pauseExecution = function () {}), | |
(s.unstable_requestPaint = Qt), | |
(s.unstable_runWithPriority = function (Dt, Zt) { | |
switch (Dt) { | |
case 1: | |
case 2: | |
case 3: | |
case 4: | |
case 5: | |
break; | |
default: | |
Dt = 3; | |
} | |
var Vt = dt; | |
dt = Dt; | |
try { | |
return Zt(); | |
} finally { | |
dt = Vt; | |
} | |
}), | |
(s.unstable_scheduleCallback = function (Dt, Zt, Vt) { | |
var Ct = s.unstable_now(); | |
if (typeof Vt == "object" && Vt !== null) { | |
var jt = Vt.delay; | |
(jt = typeof jt == "number" && 0 < jt ? Ct + jt : Ct), | |
(Vt = typeof Vt.timeout == "number" ? Vt.timeout : kt(Dt)); | |
} else (Vt = kt(Dt)), (jt = Ct); | |
return ( | |
(Vt = jt + Vt), | |
(Dt = { | |
id: ut++, | |
callback: Zt, | |
priorityLevel: Dt, | |
startTime: jt, | |
expirationTime: Vt, | |
sortIndex: -1, | |
}), | |
jt > Ct | |
? ((Dt.sortIndex = jt), | |
Jt(nt, Dt), | |
Ht(wt) === null && | |
Dt === Ht(nt) && | |
(bt ? _e() : (bt = !0), _(st, jt - Ct))) | |
: ((Dt.sortIndex = Vt), Jt(wt, Dt), yt || Ot || ((yt = !0), o(pt))), | |
Dt | |
); | |
}), | |
(s.unstable_shouldYield = function () { | |
var Dt = s.unstable_now(); | |
gt(Dt); | |
var Zt = Ht(wt); | |
return ( | |
(Zt !== ft && | |
ft !== null && | |
Zt !== null && | |
Zt.callback !== null && | |
Zt.startTime <= Dt && | |
Zt.expirationTime < ft.expirationTime) || | |
et() | |
); | |
}), | |
(s.unstable_wrapCallback = function (Dt) { | |
var Zt = dt; | |
return function () { | |
var Vt = dt; | |
dt = Zt; | |
try { | |
return Dt.apply(this, arguments); | |
} finally { | |
dt = Vt; | |
} | |
}; | |
}); | |
})(scheduler_production_min); | |
scheduler.exports = scheduler_production_min; | |
var schedulerExports = scheduler.exports; | |
/** @license React v16.14.0 | |
* react-dom.production.min.js | |
* | |
* Copyright (c) Facebook, Inc. and its affiliates. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/ var aa = reactExports, | |
n$2 = objectAssign, | |
r$2 = schedulerExports; | |
function u$e(s) { | |
for ( | |
var o = "https://reactjs.org/docs/error-decoder.html?invariant=" + s, | |
_ = 1; | |
_ < arguments.length; | |
_++ | |
) | |
o += "&args[]=" + encodeURIComponent(arguments[_]); | |
return ( | |
"Minified React error #" + | |
s + | |
"; visit " + | |
o + | |
" for the full message or use the non-minified dev environment for full errors and additional helpful warnings." | |
); | |
} | |
if (!aa) throw Error(u$e(227)); | |
function ba(s, o, _, _e, et, tt, rt, it, ot) { | |
var ct = Array.prototype.slice.call(arguments, 3); | |
try { | |
o.apply(_, ct); | |
} catch (at) { | |
this.onError(at); | |
} | |
} | |
var da = !1, | |
ea = null, | |
fa = !1, | |
ha = null, | |
ia = { | |
onError: function (s) { | |
(da = !0), (ea = s); | |
}, | |
}; | |
function ja(s, o, _, _e, et, tt, rt, it, ot) { | |
(da = !1), (ea = null), ba.apply(ia, arguments); | |
} | |
function ka(s, o, _, _e, et, tt, rt, it, ot) { | |
if ((ja.apply(this, arguments), da)) { | |
if (da) { | |
var ct = ea; | |
(da = !1), (ea = null); | |
} else throw Error(u$e(198)); | |
fa || ((fa = !0), (ha = ct)); | |
} | |
} | |
var la = null, | |
ma = null, | |
na = null; | |
function oa(s, o, _) { | |
var _e = s.type || "unknown-event"; | |
(s.currentTarget = na(_)), ka(_e, o, void 0, s), (s.currentTarget = null); | |
} | |
var pa = null, | |
qa = {}; | |
function ra() { | |
if (pa) | |
for (var s in qa) { | |
var o = qa[s], | |
_ = pa.indexOf(s); | |
if (!(-1 < _)) throw Error(u$e(96, s)); | |
if (!sa[_]) { | |
if (!o.extractEvents) throw Error(u$e(97, s)); | |
(sa[_] = o), (_ = o.eventTypes); | |
for (var _e in _) { | |
var et = void 0, | |
tt = _[_e], | |
rt = o, | |
it = _e; | |
if (ta.hasOwnProperty(it)) throw Error(u$e(99, it)); | |
ta[it] = tt; | |
var ot = tt.phasedRegistrationNames; | |
if (ot) { | |
for (et in ot) ot.hasOwnProperty(et) && ua(ot[et], rt, it); | |
et = !0; | |
} else | |
tt.registrationName | |
? (ua(tt.registrationName, rt, it), (et = !0)) | |
: (et = !1); | |
if (!et) throw Error(u$e(98, _e, s)); | |
} | |
} | |
} | |
} | |
function ua(s, o, _) { | |
if (va[s]) throw Error(u$e(100, s)); | |
(va[s] = o), (wa[s] = o.eventTypes[_].dependencies); | |
} | |
var sa = [], | |
ta = {}, | |
va = {}, | |
wa = {}; | |
function xa(s) { | |
var o = !1, | |
_; | |
for (_ in s) | |
if (s.hasOwnProperty(_)) { | |
var _e = s[_]; | |
if (!qa.hasOwnProperty(_) || qa[_] !== _e) { | |
if (qa[_]) throw Error(u$e(102, _)); | |
(qa[_] = _e), (o = !0); | |
} | |
} | |
o && ra(); | |
} | |
var ya = !( | |
typeof window > "u" || | |
typeof window.document > "u" || | |
typeof window.document.createElement > "u" | |
), | |
za = null, | |
Aa = null, | |
Ba = null; | |
function Ca(s) { | |
if ((s = ma(s))) { | |
if (typeof za != "function") throw Error(u$e(280)); | |
var o = s.stateNode; | |
o && ((o = la(o)), za(s.stateNode, s.type, o)); | |
} | |
} | |
function Da(s) { | |
Aa ? (Ba ? Ba.push(s) : (Ba = [s])) : (Aa = s); | |
} | |
function Ea() { | |
if (Aa) { | |
var s = Aa, | |
o = Ba; | |
if (((Ba = Aa = null), Ca(s), o)) for (s = 0; s < o.length; s++) Ca(o[s]); | |
} | |
} | |
function Fa(s, o) { | |
return s(o); | |
} | |
function Ga(s, o, _, _e, et) { | |
return s(o, _, _e, et); | |
} | |
function Ha() {} | |
var Ia = Fa, | |
Ja = !1, | |
Ka = !1; | |
function La() { | |
(Aa !== null || Ba !== null) && (Ha(), Ea()); | |
} | |
function Ma(s, o, _) { | |
if (Ka) return s(o, _); | |
Ka = !0; | |
try { | |
return Ia(s, o, _); | |
} finally { | |
(Ka = !1), La(); | |
} | |
} | |
var Na = | |
/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, | |
Oa = Object.prototype.hasOwnProperty, | |
Pa = {}, | |
Qa = {}; | |
function Ra(s) { | |
return Oa.call(Qa, s) | |
? !0 | |
: Oa.call(Pa, s) | |
? !1 | |
: Na.test(s) | |
? (Qa[s] = !0) | |
: ((Pa[s] = !0), !1); | |
} | |
function Sa(s, o, _, _e) { | |
if (_ !== null && _.type === 0) return !1; | |
switch (typeof o) { | |
case "function": | |
case "symbol": | |
return !0; | |
case "boolean": | |
return _e | |
? !1 | |
: _ !== null | |
? !_.acceptsBooleans | |
: ((s = s.toLowerCase().slice(0, 5)), | |
s !== "data-" && s !== "aria-"); | |
default: | |
return !1; | |
} | |
} | |
function Ta(s, o, _, _e) { | |
if (o === null || typeof o > "u" || Sa(s, o, _, _e)) return !0; | |
if (_e) return !1; | |
if (_ !== null) | |
switch (_.type) { | |
case 3: | |
return !o; | |
case 4: | |
return o === !1; | |
case 5: | |
return isNaN(o); | |
case 6: | |
return isNaN(o) || 1 > o; | |
} | |
return !1; | |
} | |
function v$2(s, o, _, _e, et, tt) { | |
(this.acceptsBooleans = o === 2 || o === 3 || o === 4), | |
(this.attributeName = _e), | |
(this.attributeNamespace = et), | |
(this.mustUseProperty = _), | |
(this.propertyName = s), | |
(this.type = o), | |
(this.sanitizeURL = tt); | |
} | |
var C$2 = {}; | |
"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style" | |
.split(" ") | |
.forEach(function (s) { | |
C$2[s] = new v$2(s, 0, !1, s, null, !1); | |
}); | |
[ | |
["acceptCharset", "accept-charset"], | |
["className", "class"], | |
["htmlFor", "for"], | |
["httpEquiv", "http-equiv"], | |
].forEach(function (s) { | |
var o = s[0]; | |
C$2[o] = new v$2(o, 1, !1, s[1], null, !1); | |
}); | |
["contentEditable", "draggable", "spellCheck", "value"].forEach(function (s) { | |
C$2[s] = new v$2(s, 2, !1, s.toLowerCase(), null, !1); | |
}); | |
[ | |
"autoReverse", | |
"externalResourcesRequired", | |
"focusable", | |
"preserveAlpha", | |
].forEach(function (s) { | |
C$2[s] = new v$2(s, 2, !1, s, null, !1); | |
}); | |
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope" | |
.split(" ") | |
.forEach(function (s) { | |
C$2[s] = new v$2(s, 3, !1, s.toLowerCase(), null, !1); | |
}); | |
["checked", "multiple", "muted", "selected"].forEach(function (s) { | |
C$2[s] = new v$2(s, 3, !0, s, null, !1); | |
}); | |
["capture", "download"].forEach(function (s) { | |
C$2[s] = new v$2(s, 4, !1, s, null, !1); | |
}); | |
["cols", "rows", "size", "span"].forEach(function (s) { | |
C$2[s] = new v$2(s, 6, !1, s, null, !1); | |
}); | |
["rowSpan", "start"].forEach(function (s) { | |
C$2[s] = new v$2(s, 5, !1, s.toLowerCase(), null, !1); | |
}); | |
var Ua = /[\-:]([a-z])/g; | |
function Va(s) { | |
return s[1].toUpperCase(); | |
} | |
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height" | |
.split(" ") | |
.forEach(function (s) { | |
var o = s.replace(Ua, Va); | |
C$2[o] = new v$2(o, 1, !1, s, null, !1); | |
}); | |
"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type" | |
.split(" ") | |
.forEach(function (s) { | |
var o = s.replace(Ua, Va); | |
C$2[o] = new v$2(o, 1, !1, s, "http://www.w3.org/1999/xlink", !1); | |
}); | |
["xml:base", "xml:lang", "xml:space"].forEach(function (s) { | |
var o = s.replace(Ua, Va); | |
C$2[o] = new v$2(o, 1, !1, s, "http://www.w3.org/XML/1998/namespace", !1); | |
}); | |
["tabIndex", "crossOrigin"].forEach(function (s) { | |
C$2[s] = new v$2(s, 1, !1, s.toLowerCase(), null, !1); | |
}); | |
C$2.xlinkHref = new v$2( | |
"xlinkHref", | |
1, | |
!1, | |
"xlink:href", | |
"http://www.w3.org/1999/xlink", | |
!0, | |
); | |
["src", "href", "action", "formAction"].forEach(function (s) { | |
C$2[s] = new v$2(s, 1, !1, s.toLowerCase(), null, !0); | |
}); | |
var Wa = aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | |
Wa.hasOwnProperty("ReactCurrentDispatcher") || | |
(Wa.ReactCurrentDispatcher = { current: null }); | |
Wa.hasOwnProperty("ReactCurrentBatchConfig") || | |
(Wa.ReactCurrentBatchConfig = { suspense: null }); | |
function Xa(s, o, _, _e) { | |
var et = C$2.hasOwnProperty(o) ? C$2[o] : null, | |
tt = | |
et !== null | |
? et.type === 0 | |
: _e | |
? !1 | |
: !( | |
!(2 < o.length) || | |
(o[0] !== "o" && o[0] !== "O") || | |
(o[1] !== "n" && o[1] !== "N") | |
); | |
tt || | |
(Ta(o, _, et, _e) && (_ = null), | |
_e || et === null | |
? Ra(o) && | |
(_ === null ? s.removeAttribute(o) : s.setAttribute(o, "" + _)) | |
: et.mustUseProperty | |
? (s[et.propertyName] = _ === null ? (et.type === 3 ? !1 : "") : _) | |
: ((o = et.attributeName), | |
(_e = et.attributeNamespace), | |
_ === null | |
? s.removeAttribute(o) | |
: ((et = et.type), | |
(_ = et === 3 || (et === 4 && _ === !0) ? "" : "" + _), | |
_e ? s.setAttributeNS(_e, o, _) : s.setAttribute(o, _)))); | |
} | |
var Ya = /^(.*)[\\\/]/, | |
E$1 = typeof Symbol == "function" && Symbol.for, | |
Za = E$1 ? Symbol.for("react.element") : 60103, | |
$a = E$1 ? Symbol.for("react.portal") : 60106, | |
ab = E$1 ? Symbol.for("react.fragment") : 60107, | |
bb = E$1 ? Symbol.for("react.strict_mode") : 60108, | |
cb = E$1 ? Symbol.for("react.profiler") : 60114, | |
db = E$1 ? Symbol.for("react.provider") : 60109, | |
eb = E$1 ? Symbol.for("react.context") : 60110, | |
fb = E$1 ? Symbol.for("react.concurrent_mode") : 60111, | |
gb = E$1 ? Symbol.for("react.forward_ref") : 60112, | |
hb = E$1 ? Symbol.for("react.suspense") : 60113, | |
ib = E$1 ? Symbol.for("react.suspense_list") : 60120, | |
jb = E$1 ? Symbol.for("react.memo") : 60115, | |
kb = E$1 ? Symbol.for("react.lazy") : 60116, | |
lb = E$1 ? Symbol.for("react.block") : 60121, | |
mb = typeof Symbol == "function" && Symbol.iterator; | |
function nb(s) { | |
return s === null || typeof s != "object" | |
? null | |
: ((s = (mb && s[mb]) || s["@@iterator"]), | |
typeof s == "function" ? s : null); | |
} | |
function ob(s) { | |
if (s._status === -1) { | |
s._status = 0; | |
var o = s._ctor; | |
(o = o()), | |
(s._result = o), | |
o.then( | |
function (_) { | |
s._status === 0 && | |
((_ = _.default), (s._status = 1), (s._result = _)); | |
}, | |
function (_) { | |
s._status === 0 && ((s._status = 2), (s._result = _)); | |
}, | |
); | |
} | |
} | |
function pb(s) { | |
if (s == null) return null; | |
if (typeof s == "function") return s.displayName || s.name || null; | |
if (typeof s == "string") return s; | |
switch (s) { | |
case ab: | |
return "Fragment"; | |
case $a: | |
return "Portal"; | |
case cb: | |
return "Profiler"; | |
case bb: | |
return "StrictMode"; | |
case hb: | |
return "Suspense"; | |
case ib: | |
return "SuspenseList"; | |
} | |
if (typeof s == "object") | |
switch (s.$$typeof) { | |
case eb: | |
return "Context.Consumer"; | |
case db: | |
return "Context.Provider"; | |
case gb: | |
var o = s.render; | |
return ( | |
(o = o.displayName || o.name || ""), | |
s.displayName || (o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef") | |
); | |
case jb: | |
return pb(s.type); | |
case lb: | |
return pb(s.render); | |
case kb: | |
if ((s = s._status === 1 ? s._result : null)) return pb(s); | |
} | |
return null; | |
} | |
function qb(s) { | |
var o = ""; | |
do { | |
e: switch (s.tag) { | |
case 3: | |
case 4: | |
case 6: | |
case 7: | |
case 10: | |
case 9: | |
var _ = ""; | |
break e; | |
default: | |
var _e = s._debugOwner, | |
et = s._debugSource, | |
tt = pb(s.type); | |
(_ = null), | |
_e && (_ = pb(_e.type)), | |
(_e = tt), | |
(tt = ""), | |
et | |
? (tt = | |
" (at " + | |
et.fileName.replace(Ya, "") + | |
":" + | |
et.lineNumber + | |
")") | |
: _ && (tt = " (created by " + _ + ")"), | |
(_ = | |
` | |
in ` + | |
(_e || "Unknown") + | |
tt); | |
} | |
(o += _), (s = s.return); | |
} while (s); | |
return o; | |
} | |
function rb(s) { | |
switch (typeof s) { | |
case "boolean": | |
case "number": | |
case "object": | |
case "string": | |
case "undefined": | |
return s; | |
default: | |
return ""; | |
} | |
} | |
function sb(s) { | |
var o = s.type; | |
return ( | |
(s = s.nodeName) && | |
s.toLowerCase() === "input" && | |
(o === "checkbox" || o === "radio") | |
); | |
} | |
function tb(s) { | |
var o = sb(s) ? "checked" : "value", | |
_ = Object.getOwnPropertyDescriptor(s.constructor.prototype, o), | |
_e = "" + s[o]; | |
if ( | |
!s.hasOwnProperty(o) && | |
typeof _ < "u" && | |
typeof _.get == "function" && | |
typeof _.set == "function" | |
) { | |
var et = _.get, | |
tt = _.set; | |
return ( | |
Object.defineProperty(s, o, { | |
configurable: !0, | |
get: function () { | |
return et.call(this); | |
}, | |
set: function (rt) { | |
(_e = "" + rt), tt.call(this, rt); | |
}, | |
}), | |
Object.defineProperty(s, o, { enumerable: _.enumerable }), | |
{ | |
getValue: function () { | |
return _e; | |
}, | |
setValue: function (rt) { | |
_e = "" + rt; | |
}, | |
stopTracking: function () { | |
(s._valueTracker = null), delete s[o]; | |
}, | |
} | |
); | |
} | |
} | |
function xb(s) { | |
s._valueTracker || (s._valueTracker = tb(s)); | |
} | |
function yb(s) { | |
if (!s) return !1; | |
var o = s._valueTracker; | |
if (!o) return !0; | |
var _ = o.getValue(), | |
_e = ""; | |
return ( | |
s && (_e = sb(s) ? (s.checked ? "true" : "false") : s.value), | |
(s = _e), | |
s !== _ ? (o.setValue(s), !0) : !1 | |
); | |
} | |
function zb(s, o) { | |
var _ = o.checked; | |
return n$2({}, o, { | |
defaultChecked: void 0, | |
defaultValue: void 0, | |
value: void 0, | |
checked: _ ?? s._wrapperState.initialChecked, | |
}); | |
} | |
function Ab(s, o) { | |
var _ = o.defaultValue == null ? "" : o.defaultValue, | |
_e = o.checked != null ? o.checked : o.defaultChecked; | |
(_ = rb(o.value != null ? o.value : _)), | |
(s._wrapperState = { | |
initialChecked: _e, | |
initialValue: _, | |
controlled: | |
o.type === "checkbox" || o.type === "radio" | |
? o.checked != null | |
: o.value != null, | |
}); | |
} | |
function Bb(s, o) { | |
(o = o.checked), o != null && Xa(s, "checked", o, !1); | |
} | |
function Cb(s, o) { | |
Bb(s, o); | |
var _ = rb(o.value), | |
_e = o.type; | |
if (_ != null) | |
_e === "number" | |
? ((_ === 0 && s.value === "") || s.value != _) && (s.value = "" + _) | |
: s.value !== "" + _ && (s.value = "" + _); | |
else if (_e === "submit" || _e === "reset") { | |
s.removeAttribute("value"); | |
return; | |
} | |
o.hasOwnProperty("value") | |
? Db(s, o.type, _) | |
: o.hasOwnProperty("defaultValue") && Db(s, o.type, rb(o.defaultValue)), | |
o.checked == null && | |
o.defaultChecked != null && | |
(s.defaultChecked = !!o.defaultChecked); | |
} | |
function Eb(s, o, _) { | |
if (o.hasOwnProperty("value") || o.hasOwnProperty("defaultValue")) { | |
var _e = o.type; | |
if ( | |
!( | |
(_e !== "submit" && _e !== "reset") || | |
(o.value !== void 0 && o.value !== null) | |
) | |
) | |
return; | |
(o = "" + s._wrapperState.initialValue), | |
_ || o === s.value || (s.value = o), | |
(s.defaultValue = o); | |
} | |
(_ = s.name), | |
_ !== "" && (s.name = ""), | |
(s.defaultChecked = !!s._wrapperState.initialChecked), | |
_ !== "" && (s.name = _); | |
} | |
function Db(s, o, _) { | |
(o !== "number" || s.ownerDocument.activeElement !== s) && | |
(_ == null | |
? (s.defaultValue = "" + s._wrapperState.initialValue) | |
: s.defaultValue !== "" + _ && (s.defaultValue = "" + _)); | |
} | |
function Fb(s) { | |
var o = ""; | |
return ( | |
aa.Children.forEach(s, function (_) { | |
_ != null && (o += _); | |
}), | |
o | |
); | |
} | |
function Gb(s, o) { | |
return ( | |
(s = n$2({ children: void 0 }, o)), | |
(o = Fb(o.children)) && (s.children = o), | |
s | |
); | |
} | |
function Hb(s, o, _, _e) { | |
if (((s = s.options), o)) { | |
o = {}; | |
for (var et = 0; et < _.length; et++) o["$" + _[et]] = !0; | |
for (_ = 0; _ < s.length; _++) | |
(et = o.hasOwnProperty("$" + s[_].value)), | |
s[_].selected !== et && (s[_].selected = et), | |
et && _e && (s[_].defaultSelected = !0); | |
} else { | |
for (_ = "" + rb(_), o = null, et = 0; et < s.length; et++) { | |
if (s[et].value === _) { | |
(s[et].selected = !0), _e && (s[et].defaultSelected = !0); | |
return; | |
} | |
o !== null || s[et].disabled || (o = s[et]); | |
} | |
o !== null && (o.selected = !0); | |
} | |
} | |
function Ib(s, o) { | |
if (o.dangerouslySetInnerHTML != null) throw Error(u$e(91)); | |
return n$2({}, o, { | |
value: void 0, | |
defaultValue: void 0, | |
children: "" + s._wrapperState.initialValue, | |
}); | |
} | |
function Jb(s, o) { | |
var _ = o.value; | |
if (_ == null) { | |
if (((_ = o.children), (o = o.defaultValue), _ != null)) { | |
if (o != null) throw Error(u$e(92)); | |
if (Array.isArray(_)) { | |
if (!(1 >= _.length)) throw Error(u$e(93)); | |
_ = _[0]; | |
} | |
o = _; | |
} | |
o == null && (o = ""), (_ = o); | |
} | |
s._wrapperState = { initialValue: rb(_) }; | |
} | |
function Kb(s, o) { | |
var _ = rb(o.value), | |
_e = rb(o.defaultValue); | |
_ != null && | |
((_ = "" + _), | |
_ !== s.value && (s.value = _), | |
o.defaultValue == null && s.defaultValue !== _ && (s.defaultValue = _)), | |
_e != null && (s.defaultValue = "" + _e); | |
} | |
function Lb(s) { | |
var o = s.textContent; | |
o === s._wrapperState.initialValue && | |
o !== "" && | |
o !== null && | |
(s.value = o); | |
} | |
var Mb = { | |
html: "http://www.w3.org/1999/xhtml", | |
mathml: "http://www.w3.org/1998/Math/MathML", | |
svg: "http://www.w3.org/2000/svg", | |
}; | |
function Nb(s) { | |
switch (s) { | |
case "svg": | |
return "http://www.w3.org/2000/svg"; | |
case "math": | |
return "http://www.w3.org/1998/Math/MathML"; | |
default: | |
return "http://www.w3.org/1999/xhtml"; | |
} | |
} | |
function Ob(s, o) { | |
return s == null || s === "http://www.w3.org/1999/xhtml" | |
? Nb(o) | |
: s === "http://www.w3.org/2000/svg" && o === "foreignObject" | |
? "http://www.w3.org/1999/xhtml" | |
: s; | |
} | |
var Pb, | |
Qb = (function (s) { | |
return typeof MSApp < "u" && MSApp.execUnsafeLocalFunction | |
? function (o, _, _e, et) { | |
MSApp.execUnsafeLocalFunction(function () { | |
return s(o, _, _e, et); | |
}); | |
} | |
: s; | |
})(function (s, o) { | |
if (s.namespaceURI !== Mb.svg || "innerHTML" in s) s.innerHTML = o; | |
else { | |
for ( | |
Pb = Pb || document.createElement("div"), | |
Pb.innerHTML = "<svg>" + o.valueOf().toString() + "</svg>", | |
o = Pb.firstChild; | |
s.firstChild; | |
) | |
s.removeChild(s.firstChild); | |
for (; o.firstChild; ) s.appendChild(o.firstChild); | |
} | |
}); | |
function Rb(s, o) { | |
if (o) { | |
var _ = s.firstChild; | |
if (_ && _ === s.lastChild && _.nodeType === 3) { | |
_.nodeValue = o; | |
return; | |
} | |
} | |
s.textContent = o; | |
} | |
function Sb(s, o) { | |
var _ = {}; | |
return ( | |
(_[s.toLowerCase()] = o.toLowerCase()), | |
(_["Webkit" + s] = "webkit" + o), | |
(_["Moz" + s] = "moz" + o), | |
_ | |
); | |
} | |
var Tb = { | |
animationend: Sb("Animation", "AnimationEnd"), | |
animationiteration: Sb("Animation", "AnimationIteration"), | |
animationstart: Sb("Animation", "AnimationStart"), | |
transitionend: Sb("Transition", "TransitionEnd"), | |
}, | |
Ub = {}, | |
Vb = {}; | |
ya && | |
((Vb = document.createElement("div").style), | |
"AnimationEvent" in window || | |
(delete Tb.animationend.animation, | |
delete Tb.animationiteration.animation, | |
delete Tb.animationstart.animation), | |
"TransitionEvent" in window || delete Tb.transitionend.transition); | |
function Wb(s) { | |
if (Ub[s]) return Ub[s]; | |
if (!Tb[s]) return s; | |
var o = Tb[s], | |
_; | |
for (_ in o) if (o.hasOwnProperty(_) && _ in Vb) return (Ub[s] = o[_]); | |
return s; | |
} | |
var Xb = Wb("animationend"), | |
Yb = Wb("animationiteration"), | |
Zb = Wb("animationstart"), | |
$b = Wb("transitionend"), | |
ac = | |
"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split( | |
" ", | |
), | |
bc = new (typeof WeakMap == "function" ? WeakMap : Map)(); | |
function cc(s) { | |
var o = bc.get(s); | |
return o === void 0 && ((o = new Map()), bc.set(s, o)), o; | |
} | |
function dc(s) { | |
var o = s, | |
_ = s; | |
if (s.alternate) for (; o.return; ) o = o.return; | |
else { | |
s = o; | |
do (o = s), o.effectTag & 1026 && (_ = o.return), (s = o.return); | |
while (s); | |
} | |
return o.tag === 3 ? _ : null; | |
} | |
function ec$1(s) { | |
if (s.tag === 13) { | |
var o = s.memoizedState; | |
if ( | |
(o === null && ((s = s.alternate), s !== null && (o = s.memoizedState)), | |
o !== null) | |
) | |
return o.dehydrated; | |
} | |
return null; | |
} | |
function fc(s) { | |
if (dc(s) !== s) throw Error(u$e(188)); | |
} | |
function gc(s) { | |
var o = s.alternate; | |
if (!o) { | |
if (((o = dc(s)), o === null)) throw Error(u$e(188)); | |
return o !== s ? null : s; | |
} | |
for (var _ = s, _e = o; ; ) { | |
var et = _.return; | |
if (et === null) break; | |
var tt = et.alternate; | |
if (tt === null) { | |
if (((_e = et.return), _e !== null)) { | |
_ = _e; | |
continue; | |
} | |
break; | |
} | |
if (et.child === tt.child) { | |
for (tt = et.child; tt; ) { | |
if (tt === _) return fc(et), s; | |
if (tt === _e) return fc(et), o; | |
tt = tt.sibling; | |
} | |
throw Error(u$e(188)); | |
} | |
if (_.return !== _e.return) (_ = et), (_e = tt); | |
else { | |
for (var rt = !1, it = et.child; it; ) { | |
if (it === _) { | |
(rt = !0), (_ = et), (_e = tt); | |
break; | |
} | |
if (it === _e) { | |
(rt = !0), (_e = et), (_ = tt); | |
break; | |
} | |
it = it.sibling; | |
} | |
if (!rt) { | |
for (it = tt.child; it; ) { | |
if (it === _) { | |
(rt = !0), (_ = tt), (_e = et); | |
break; | |
} | |
if (it === _e) { | |
(rt = !0), (_e = tt), (_ = et); | |
break; | |
} | |
it = it.sibling; | |
} | |
if (!rt) throw Error(u$e(189)); | |
} | |
} | |
if (_.alternate !== _e) throw Error(u$e(190)); | |
} | |
if (_.tag !== 3) throw Error(u$e(188)); | |
return _.stateNode.current === _ ? s : o; | |
} | |
function hc(s) { | |
if (((s = gc(s)), !s)) return null; | |
for (var o = s; ; ) { | |
if (o.tag === 5 || o.tag === 6) return o; | |
if (o.child) (o.child.return = o), (o = o.child); | |
else { | |
if (o === s) break; | |
for (; !o.sibling; ) { | |
if (!o.return || o.return === s) return null; | |
o = o.return; | |
} | |
(o.sibling.return = o.return), (o = o.sibling); | |
} | |
} | |
return null; | |
} | |
function ic(s, o) { | |
if (o == null) throw Error(u$e(30)); | |
return s == null | |
? o | |
: Array.isArray(s) | |
? Array.isArray(o) | |
? (s.push.apply(s, o), s) | |
: (s.push(o), s) | |
: Array.isArray(o) | |
? [s].concat(o) | |
: [s, o]; | |
} | |
function jc(s, o, _) { | |
Array.isArray(s) ? s.forEach(o, _) : s && o.call(_, s); | |
} | |
var kc = null; | |
function lc(s) { | |
if (s) { | |
var o = s._dispatchListeners, | |
_ = s._dispatchInstances; | |
if (Array.isArray(o)) | |
for (var _e = 0; _e < o.length && !s.isPropagationStopped(); _e++) | |
oa(s, o[_e], _[_e]); | |
else o && oa(s, o, _); | |
(s._dispatchListeners = null), | |
(s._dispatchInstances = null), | |
s.isPersistent() || s.constructor.release(s); | |
} | |
} | |
function mc(s) { | |
if ((s !== null && (kc = ic(kc, s)), (s = kc), (kc = null), s)) { | |
if ((jc(s, lc), kc)) throw Error(u$e(95)); | |
if (fa) throw ((s = ha), (fa = !1), (ha = null), s); | |
} | |
} | |
function nc(s) { | |
return ( | |
(s = s.target || s.srcElement || window), | |
s.correspondingUseElement && (s = s.correspondingUseElement), | |
s.nodeType === 3 ? s.parentNode : s | |
); | |
} | |
function oc(s) { | |
if (!ya) return !1; | |
s = "on" + s; | |
var o = s in document; | |
return ( | |
o || | |
((o = document.createElement("div")), | |
o.setAttribute(s, "return;"), | |
(o = typeof o[s] == "function")), | |
o | |
); | |
} | |
var pc = []; | |
function qc(s) { | |
(s.topLevelType = null), | |
(s.nativeEvent = null), | |
(s.targetInst = null), | |
(s.ancestors.length = 0), | |
10 > pc.length && pc.push(s); | |
} | |
function rc(s, o, _, _e) { | |
if (pc.length) { | |
var et = pc.pop(); | |
return ( | |
(et.topLevelType = s), | |
(et.eventSystemFlags = _e), | |
(et.nativeEvent = o), | |
(et.targetInst = _), | |
et | |
); | |
} | |
return { | |
topLevelType: s, | |
eventSystemFlags: _e, | |
nativeEvent: o, | |
targetInst: _, | |
ancestors: [], | |
}; | |
} | |
function sc(s) { | |
var o = s.targetInst, | |
_ = o; | |
do { | |
if (!_) { | |
s.ancestors.push(_); | |
break; | |
} | |
var _e = _; | |
if (_e.tag === 3) _e = _e.stateNode.containerInfo; | |
else { | |
for (; _e.return; ) _e = _e.return; | |
_e = _e.tag !== 3 ? null : _e.stateNode.containerInfo; | |
} | |
if (!_e) break; | |
(o = _.tag), (o !== 5 && o !== 6) || s.ancestors.push(_), (_ = tc(_e)); | |
} while (_); | |
for (_ = 0; _ < s.ancestors.length; _++) { | |
o = s.ancestors[_]; | |
var et = nc(s.nativeEvent); | |
_e = s.topLevelType; | |
var tt = s.nativeEvent, | |
rt = s.eventSystemFlags; | |
_ === 0 && (rt |= 64); | |
for (var it = null, ot = 0; ot < sa.length; ot++) { | |
var ct = sa[ot]; | |
ct && (ct = ct.extractEvents(_e, o, tt, et, rt)) && (it = ic(it, ct)); | |
} | |
mc(it); | |
} | |
} | |
function uc(s, o, _) { | |
if (!_.has(s)) { | |
switch (s) { | |
case "scroll": | |
vc(o, "scroll", !0); | |
break; | |
case "focus": | |
case "blur": | |
vc(o, "focus", !0), | |
vc(o, "blur", !0), | |
_.set("blur", null), | |
_.set("focus", null); | |
break; | |
case "cancel": | |
case "close": | |
oc(s) && vc(o, s, !0); | |
break; | |
case "invalid": | |
case "submit": | |
case "reset": | |
break; | |
default: | |
ac.indexOf(s) === -1 && F$1(s, o); | |
} | |
_.set(s, null); | |
} | |
} | |
var wc, | |
xc, | |
yc, | |
zc = !1, | |
Ac = [], | |
Bc = null, | |
Cc = null, | |
Dc = null, | |
Ec = new Map(), | |
Fc = new Map(), | |
Gc = [], | |
Hc = | |
"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split( | |
" ", | |
), | |
Ic = | |
"focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split( | |
" ", | |
); | |
function Jc(s, o) { | |
var _ = cc(o); | |
Hc.forEach(function (_e) { | |
uc(_e, o, _); | |
}), | |
Ic.forEach(function (_e) { | |
uc(_e, o, _); | |
}); | |
} | |
function Kc(s, o, _, _e, et) { | |
return { | |
blockedOn: s, | |
topLevelType: o, | |
eventSystemFlags: _ | 32, | |
nativeEvent: et, | |
container: _e, | |
}; | |
} | |
function Lc(s, o) { | |
switch (s) { | |
case "focus": | |
case "blur": | |
Bc = null; | |
break; | |
case "dragenter": | |
case "dragleave": | |
Cc = null; | |
break; | |
case "mouseover": | |
case "mouseout": | |
Dc = null; | |
break; | |
case "pointerover": | |
case "pointerout": | |
Ec.delete(o.pointerId); | |
break; | |
case "gotpointercapture": | |
case "lostpointercapture": | |
Fc.delete(o.pointerId); | |
} | |
} | |
function Mc(s, o, _, _e, et, tt) { | |
return s === null || s.nativeEvent !== tt | |
? ((s = Kc(o, _, _e, et, tt)), | |
o !== null && ((o = Nc(o)), o !== null && xc(o)), | |
s) | |
: ((s.eventSystemFlags |= _e), s); | |
} | |
function Oc(s, o, _, _e, et) { | |
switch (o) { | |
case "focus": | |
return (Bc = Mc(Bc, s, o, _, _e, et)), !0; | |
case "dragenter": | |
return (Cc = Mc(Cc, s, o, _, _e, et)), !0; | |
case "mouseover": | |
return (Dc = Mc(Dc, s, o, _, _e, et)), !0; | |
case "pointerover": | |
var tt = et.pointerId; | |
return Ec.set(tt, Mc(Ec.get(tt) || null, s, o, _, _e, et)), !0; | |
case "gotpointercapture": | |
return ( | |
(tt = et.pointerId), | |
Fc.set(tt, Mc(Fc.get(tt) || null, s, o, _, _e, et)), | |
!0 | |
); | |
} | |
return !1; | |
} | |
function Pc(s) { | |
var o = tc(s.target); | |
if (o !== null) { | |
var _ = dc(o); | |
if (_ !== null) { | |
if (((o = _.tag), o === 13)) { | |
if (((o = ec$1(_)), o !== null)) { | |
(s.blockedOn = o), | |
r$2.unstable_runWithPriority(s.priority, function () { | |
yc(_); | |
}); | |
return; | |
} | |
} else if (o === 3 && _.stateNode.hydrate) { | |
s.blockedOn = _.tag === 3 ? _.stateNode.containerInfo : null; | |
return; | |
} | |
} | |
} | |
s.blockedOn = null; | |
} | |
function Qc(s) { | |
if (s.blockedOn !== null) return !1; | |
var o = Rc(s.topLevelType, s.eventSystemFlags, s.container, s.nativeEvent); | |
if (o !== null) { | |
var _ = Nc(o); | |
return _ !== null && xc(_), (s.blockedOn = o), !1; | |
} | |
return !0; | |
} | |
function Sc(s, o, _) { | |
Qc(s) && _.delete(o); | |
} | |
function Tc() { | |
for (zc = !1; 0 < Ac.length; ) { | |
var s = Ac[0]; | |
if (s.blockedOn !== null) { | |
(s = Nc(s.blockedOn)), s !== null && wc(s); | |
break; | |
} | |
var o = Rc( | |
s.topLevelType, | |
s.eventSystemFlags, | |
s.container, | |
s.nativeEvent, | |
); | |
o !== null ? (s.blockedOn = o) : Ac.shift(); | |
} | |
Bc !== null && Qc(Bc) && (Bc = null), | |
Cc !== null && Qc(Cc) && (Cc = null), | |
Dc !== null && Qc(Dc) && (Dc = null), | |
Ec.forEach(Sc), | |
Fc.forEach(Sc); | |
} | |
function Uc(s, o) { | |
s.blockedOn === o && | |
((s.blockedOn = null), | |
zc || | |
((zc = !0), | |
r$2.unstable_scheduleCallback(r$2.unstable_NormalPriority, Tc))); | |
} | |
function Vc(s) { | |
function o(et) { | |
return Uc(et, s); | |
} | |
if (0 < Ac.length) { | |
Uc(Ac[0], s); | |
for (var _ = 1; _ < Ac.length; _++) { | |
var _e = Ac[_]; | |
_e.blockedOn === s && (_e.blockedOn = null); | |
} | |
} | |
for ( | |
Bc !== null && Uc(Bc, s), | |
Cc !== null && Uc(Cc, s), | |
Dc !== null && Uc(Dc, s), | |
Ec.forEach(o), | |
Fc.forEach(o), | |
_ = 0; | |
_ < Gc.length; | |
_++ | |
) | |
(_e = Gc[_]), _e.blockedOn === s && (_e.blockedOn = null); | |
for (; 0 < Gc.length && ((_ = Gc[0]), _.blockedOn === null); ) | |
Pc(_), _.blockedOn === null && Gc.shift(); | |
} | |
var Wc = {}, | |
Yc = new Map(), | |
Zc = new Map(), | |
$c = [ | |
"abort", | |
"abort", | |
Xb, | |
"animationEnd", | |
Yb, | |
"animationIteration", | |
Zb, | |
"animationStart", | |
"canplay", | |
"canPlay", | |
"canplaythrough", | |
"canPlayThrough", | |
"durationchange", | |
"durationChange", | |
"emptied", | |
"emptied", | |
"encrypted", | |
"encrypted", | |
"ended", | |
"ended", | |
"error", | |
"error", | |
"gotpointercapture", | |
"gotPointerCapture", | |
"load", | |
"load", | |
"loadeddata", | |
"loadedData", | |
"loadedmetadata", | |
"loadedMetadata", | |
"loadstart", | |
"loadStart", | |
"lostpointercapture", | |
"lostPointerCapture", | |
"playing", | |
"playing", | |
"progress", | |
"progress", | |
"seeking", | |
"seeking", | |
"stalled", | |
"stalled", | |
"suspend", | |
"suspend", | |
"timeupdate", | |
"timeUpdate", | |
$b, | |
"transitionEnd", | |
"waiting", | |
"waiting", | |
]; | |
function ad(s, o) { | |
for (var _ = 0; _ < s.length; _ += 2) { | |
var _e = s[_], | |
et = s[_ + 1], | |
tt = "on" + (et[0].toUpperCase() + et.slice(1)); | |
(tt = { | |
phasedRegistrationNames: { bubbled: tt, captured: tt + "Capture" }, | |
dependencies: [_e], | |
eventPriority: o, | |
}), | |
Zc.set(_e, o), | |
Yc.set(_e, tt), | |
(Wc[et] = tt); | |
} | |
} | |
ad( | |
"blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split( | |
" ", | |
), | |
0, | |
); | |
ad( | |
"drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split( | |
" ", | |
), | |
1, | |
); | |
ad($c, 2); | |
for ( | |
var bd = | |
"change selectionchange textInput compositionstart compositionend compositionupdate".split( | |
" ", | |
), | |
cd = 0; | |
cd < bd.length; | |
cd++ | |
) | |
Zc.set(bd[cd], 0); | |
var dd = r$2.unstable_UserBlockingPriority, | |
ed = r$2.unstable_runWithPriority, | |
fd = !0; | |
function F$1(s, o) { | |
vc(o, s, !1); | |
} | |
function vc(s, o, _) { | |
var _e = Zc.get(o); | |
switch (_e === void 0 ? 2 : _e) { | |
case 0: | |
_e = gd.bind(null, o, 1, s); | |
break; | |
case 1: | |
_e = hd.bind(null, o, 1, s); | |
break; | |
default: | |
_e = id$1.bind(null, o, 1, s); | |
} | |
_ ? s.addEventListener(o, _e, !0) : s.addEventListener(o, _e, !1); | |
} | |
function gd(s, o, _, _e) { | |
Ja || Ha(); | |
var et = id$1, | |
tt = Ja; | |
Ja = !0; | |
try { | |
Ga(et, s, o, _, _e); | |
} finally { | |
(Ja = tt) || La(); | |
} | |
} | |
function hd(s, o, _, _e) { | |
ed(dd, id$1.bind(null, s, o, _, _e)); | |
} | |
function id$1(s, o, _, _e) { | |
if (fd) | |
if (0 < Ac.length && -1 < Hc.indexOf(s)) | |
(s = Kc(null, s, o, _, _e)), Ac.push(s); | |
else { | |
var et = Rc(s, o, _, _e); | |
if (et === null) Lc(s, _e); | |
else if (-1 < Hc.indexOf(s)) (s = Kc(et, s, o, _, _e)), Ac.push(s); | |
else if (!Oc(et, s, o, _, _e)) { | |
Lc(s, _e), (s = rc(s, _e, null, o)); | |
try { | |
Ma(sc, s); | |
} finally { | |
qc(s); | |
} | |
} | |
} | |
} | |
function Rc(s, o, _, _e) { | |
if (((_ = nc(_e)), (_ = tc(_)), _ !== null)) { | |
var et = dc(_); | |
if (et === null) _ = null; | |
else { | |
var tt = et.tag; | |
if (tt === 13) { | |
if (((_ = ec$1(et)), _ !== null)) return _; | |
_ = null; | |
} else if (tt === 3) { | |
if (et.stateNode.hydrate) | |
return et.tag === 3 ? et.stateNode.containerInfo : null; | |
_ = null; | |
} else et !== _ && (_ = null); | |
} | |
} | |
s = rc(s, _e, _, o); | |
try { | |
Ma(sc, s); | |
} finally { | |
qc(s); | |
} | |
return null; | |
} | |
var jd = { | |
animationIterationCount: !0, | |
borderImageOutset: !0, | |
borderImageSlice: !0, | |
borderImageWidth: !0, | |
boxFlex: !0, | |
boxFlexGroup: !0, | |
boxOrdinalGroup: !0, | |
columnCount: !0, | |
columns: !0, | |
flex: !0, | |
flexGrow: !0, | |
flexPositive: !0, | |
flexShrink: !0, | |
flexNegative: !0, | |
flexOrder: !0, | |
gridArea: !0, | |
gridRow: !0, | |
gridRowEnd: !0, | |
gridRowSpan: !0, | |
gridRowStart: !0, | |
gridColumn: !0, | |
gridColumnEnd: !0, | |
gridColumnSpan: !0, | |
gridColumnStart: !0, | |
fontWeight: !0, | |
lineClamp: !0, | |
lineHeight: !0, | |
opacity: !0, | |
order: !0, | |
orphans: !0, | |
tabSize: !0, | |
widows: !0, | |
zIndex: !0, | |
zoom: !0, | |
fillOpacity: !0, | |
floodOpacity: !0, | |
stopOpacity: !0, | |
strokeDasharray: !0, | |
strokeDashoffset: !0, | |
strokeMiterlimit: !0, | |
strokeOpacity: !0, | |
strokeWidth: !0, | |
}, | |
kd = ["Webkit", "ms", "Moz", "O"]; | |
Object.keys(jd).forEach(function (s) { | |
kd.forEach(function (o) { | |
(o = o + s.charAt(0).toUpperCase() + s.substring(1)), (jd[o] = jd[s]); | |
}); | |
}); | |
function ld(s, o, _) { | |
return o == null || typeof o == "boolean" || o === "" | |
? "" | |
: _ || typeof o != "number" || o === 0 || (jd.hasOwnProperty(s) && jd[s]) | |
? ("" + o).trim() | |
: o + "px"; | |
} | |
function md(s, o) { | |
s = s.style; | |
for (var _ in o) | |
if (o.hasOwnProperty(_)) { | |
var _e = _.indexOf("--") === 0, | |
et = ld(_, o[_], _e); | |
_ === "float" && (_ = "cssFloat"), | |
_e ? s.setProperty(_, et) : (s[_] = et); | |
} | |
} | |
var nd = n$2( | |
{ menuitem: !0 }, | |
{ | |
area: !0, | |
base: !0, | |
br: !0, | |
col: !0, | |
embed: !0, | |
hr: !0, | |
img: !0, | |
input: !0, | |
keygen: !0, | |
link: !0, | |
meta: !0, | |
param: !0, | |
source: !0, | |
track: !0, | |
wbr: !0, | |
}, | |
); | |
function od(s, o) { | |
if (o) { | |
if (nd[s] && (o.children != null || o.dangerouslySetInnerHTML != null)) | |
throw Error(u$e(137, s, "")); | |
if (o.dangerouslySetInnerHTML != null) { | |
if (o.children != null) throw Error(u$e(60)); | |
if ( | |
!( | |
typeof o.dangerouslySetInnerHTML == "object" && | |
"__html" in o.dangerouslySetInnerHTML | |
) | |
) | |
throw Error(u$e(61)); | |
} | |
if (o.style != null && typeof o.style != "object") | |
throw Error(u$e(62, "")); | |
} | |
} | |
function pd(s, o) { | |
if (s.indexOf("-") === -1) return typeof o.is == "string"; | |
switch (s) { | |
case "annotation-xml": | |
case "color-profile": | |
case "font-face": | |
case "font-face-src": | |
case "font-face-uri": | |
case "font-face-format": | |
case "font-face-name": | |
case "missing-glyph": | |
return !1; | |
default: | |
return !0; | |
} | |
} | |
var qd = Mb.html; | |
function rd(s, o) { | |
s = s.nodeType === 9 || s.nodeType === 11 ? s : s.ownerDocument; | |
var _ = cc(s); | |
o = wa[o]; | |
for (var _e = 0; _e < o.length; _e++) uc(o[_e], s, _); | |
} | |
function sd() {} | |
function td(s) { | |
if ( | |
((s = s || (typeof document < "u" ? document : void 0)), typeof s > "u") | |
) | |
return null; | |
try { | |
return s.activeElement || s.body; | |
} catch { | |
return s.body; | |
} | |
} | |
function ud(s) { | |
for (; s && s.firstChild; ) s = s.firstChild; | |
return s; | |
} | |
function vd(s, o) { | |
var _ = ud(s); | |
s = 0; | |
for (var _e; _; ) { | |
if (_.nodeType === 3) { | |
if (((_e = s + _.textContent.length), s <= o && _e >= o)) | |
return { node: _, offset: o - s }; | |
s = _e; | |
} | |
e: { | |
for (; _; ) { | |
if (_.nextSibling) { | |
_ = _.nextSibling; | |
break e; | |
} | |
_ = _.parentNode; | |
} | |
_ = void 0; | |
} | |
_ = ud(_); | |
} | |
} | |
function wd(s, o) { | |
return s && o | |
? s === o | |
? !0 | |
: s && s.nodeType === 3 | |
? !1 | |
: o && o.nodeType === 3 | |
? wd(s, o.parentNode) | |
: "contains" in s | |
? s.contains(o) | |
: s.compareDocumentPosition | |
? !!(s.compareDocumentPosition(o) & 16) | |
: !1 | |
: !1; | |
} | |
function xd() { | |
for (var s = window, o = td(); o instanceof s.HTMLIFrameElement; ) { | |
try { | |
var _ = typeof o.contentWindow.location.href == "string"; | |
} catch { | |
_ = !1; | |
} | |
if (_) s = o.contentWindow; | |
else break; | |
o = td(s.document); | |
} | |
return o; | |
} | |
function yd(s) { | |
var o = s && s.nodeName && s.nodeName.toLowerCase(); | |
return ( | |
o && | |
((o === "input" && | |
(s.type === "text" || | |
s.type === "search" || | |
s.type === "tel" || | |
s.type === "url" || | |
s.type === "password")) || | |
o === "textarea" || | |
s.contentEditable === "true") | |
); | |
} | |
var zd = "$", | |
Ad = "/$", | |
Bd = "$?", | |
Cd = "$!", | |
Dd = null, | |
Ed = null; | |
function Fd(s, o) { | |
switch (s) { | |
case "button": | |
case "input": | |
case "select": | |
case "textarea": | |
return !!o.autoFocus; | |
} | |
return !1; | |
} | |
function Gd(s, o) { | |
return ( | |
s === "textarea" || | |
s === "option" || | |
s === "noscript" || | |
typeof o.children == "string" || | |
typeof o.children == "number" || | |
(typeof o.dangerouslySetInnerHTML == "object" && | |
o.dangerouslySetInnerHTML !== null && | |
o.dangerouslySetInnerHTML.__html != null) | |
); | |
} | |
var Hd = typeof setTimeout == "function" ? setTimeout : void 0, | |
Id = typeof clearTimeout == "function" ? clearTimeout : void 0; | |
function Jd(s) { | |
for (; s != null; s = s.nextSibling) { | |
var o = s.nodeType; | |
if (o === 1 || o === 3) break; | |
} | |
return s; | |
} | |
function Kd(s) { | |
s = s.previousSibling; | |
for (var o = 0; s; ) { | |
if (s.nodeType === 8) { | |
var _ = s.data; | |
if (_ === zd || _ === Cd || _ === Bd) { | |
if (o === 0) return s; | |
o--; | |
} else _ === Ad && o++; | |
} | |
s = s.previousSibling; | |
} | |
return null; | |
} | |
var Ld = Math.random().toString(36).slice(2), | |
Md = "__reactInternalInstance$" + Ld, | |
Nd = "__reactEventHandlers$" + Ld, | |
Od = "__reactContainere$" + Ld; | |
function tc(s) { | |
var o = s[Md]; | |
if (o) return o; | |
for (var _ = s.parentNode; _; ) { | |
if ((o = _[Od] || _[Md])) { | |
if ( | |
((_ = o.alternate), | |
o.child !== null || (_ !== null && _.child !== null)) | |
) | |
for (s = Kd(s); s !== null; ) { | |
if ((_ = s[Md])) return _; | |
s = Kd(s); | |
} | |
return o; | |
} | |
(s = _), (_ = s.parentNode); | |
} | |
return null; | |
} | |
function Nc(s) { | |
return ( | |
(s = s[Md] || s[Od]), | |
!s || (s.tag !== 5 && s.tag !== 6 && s.tag !== 13 && s.tag !== 3) | |
? null | |
: s | |
); | |
} | |
function Pd(s) { | |
if (s.tag === 5 || s.tag === 6) return s.stateNode; | |
throw Error(u$e(33)); | |
} | |
function Qd(s) { | |
return s[Nd] || null; | |
} | |
function Rd(s) { | |
do s = s.return; | |
while (s && s.tag !== 5); | |
return s || null; | |
} | |
function Sd(s, o) { | |
var _ = s.stateNode; | |
if (!_) return null; | |
var _e = la(_); | |
if (!_e) return null; | |
_ = _e[o]; | |
e: switch (o) { | |
case "onClick": | |
case "onClickCapture": | |
case "onDoubleClick": | |
case "onDoubleClickCapture": | |
case "onMouseDown": | |
case "onMouseDownCapture": | |
case "onMouseMove": | |
case "onMouseMoveCapture": | |
case "onMouseUp": | |
case "onMouseUpCapture": | |
case "onMouseEnter": | |
(_e = !_e.disabled) || | |
((s = s.type), | |
(_e = !( | |
s === "button" || | |
s === "input" || | |
s === "select" || | |
s === "textarea" | |
))), | |
(s = !_e); | |
break e; | |
default: | |
s = !1; | |
} | |
if (s) return null; | |
if (_ && typeof _ != "function") throw Error(u$e(231, o, typeof _)); | |
return _; | |
} | |
function Td(s, o, _) { | |
(o = Sd(s, _.dispatchConfig.phasedRegistrationNames[o])) && | |
((_._dispatchListeners = ic(_._dispatchListeners, o)), | |
(_._dispatchInstances = ic(_._dispatchInstances, s))); | |
} | |
function Ud(s) { | |
if (s && s.dispatchConfig.phasedRegistrationNames) { | |
for (var o = s._targetInst, _ = []; o; ) _.push(o), (o = Rd(o)); | |
for (o = _.length; 0 < o--; ) Td(_[o], "captured", s); | |
for (o = 0; o < _.length; o++) Td(_[o], "bubbled", s); | |
} | |
} | |
function Vd(s, o, _) { | |
s && | |
_ && | |
_.dispatchConfig.registrationName && | |
(o = Sd(s, _.dispatchConfig.registrationName)) && | |
((_._dispatchListeners = ic(_._dispatchListeners, o)), | |
(_._dispatchInstances = ic(_._dispatchInstances, s))); | |
} | |
function Wd(s) { | |
s && s.dispatchConfig.registrationName && Vd(s._targetInst, null, s); | |
} | |
function Xd(s) { | |
jc(s, Ud); | |
} | |
var Yd = null, | |
Zd = null, | |
$d = null; | |
function ae() { | |
if ($d) return $d; | |
var s, | |
o = Zd, | |
_ = o.length, | |
_e, | |
et = "value" in Yd ? Yd.value : Yd.textContent, | |
tt = et.length; | |
for (s = 0; s < _ && o[s] === et[s]; s++); | |
var rt = _ - s; | |
for (_e = 1; _e <= rt && o[_ - _e] === et[tt - _e]; _e++); | |
return ($d = et.slice(s, 1 < _e ? 1 - _e : void 0)); | |
} | |
function be() { | |
return !0; | |
} | |
function ce() { | |
return !1; | |
} | |
function G$1(s, o, _, _e) { | |
(this.dispatchConfig = s), | |
(this._targetInst = o), | |
(this.nativeEvent = _), | |
(s = this.constructor.Interface); | |
for (var et in s) | |
s.hasOwnProperty(et) && | |
((o = s[et]) | |
? (this[et] = o(_)) | |
: et === "target" | |
? (this.target = _e) | |
: (this[et] = _[et])); | |
return ( | |
(this.isDefaultPrevented = ( | |
_.defaultPrevented != null ? _.defaultPrevented : _.returnValue === !1 | |
) | |
? be | |
: ce), | |
(this.isPropagationStopped = ce), | |
this | |
); | |
} | |
n$2(G$1.prototype, { | |
preventDefault: function () { | |
this.defaultPrevented = !0; | |
var s = this.nativeEvent; | |
s && | |
(s.preventDefault | |
? s.preventDefault() | |
: typeof s.returnValue != "unknown" && (s.returnValue = !1), | |
(this.isDefaultPrevented = be)); | |
}, | |
stopPropagation: function () { | |
var s = this.nativeEvent; | |
s && | |
(s.stopPropagation | |
? s.stopPropagation() | |
: typeof s.cancelBubble != "unknown" && (s.cancelBubble = !0), | |
(this.isPropagationStopped = be)); | |
}, | |
persist: function () { | |
this.isPersistent = be; | |
}, | |
isPersistent: ce, | |
destructor: function () { | |
var s = this.constructor.Interface, | |
o; | |
for (o in s) this[o] = null; | |
(this.nativeEvent = this._targetInst = this.dispatchConfig = null), | |
(this.isPropagationStopped = this.isDefaultPrevented = ce), | |
(this._dispatchInstances = this._dispatchListeners = null); | |
}, | |
}); | |
G$1.Interface = { | |
type: null, | |
target: null, | |
currentTarget: function () { | |
return null; | |
}, | |
eventPhase: null, | |
bubbles: null, | |
cancelable: null, | |
timeStamp: function (s) { | |
return s.timeStamp || Date.now(); | |
}, | |
defaultPrevented: null, | |
isTrusted: null, | |
}; | |
G$1.extend = function (s) { | |
function o() {} | |
function _() { | |
return _e.apply(this, arguments); | |
} | |
var _e = this; | |
o.prototype = _e.prototype; | |
var et = new o(); | |
return ( | |
n$2(et, _.prototype), | |
(_.prototype = et), | |
(_.prototype.constructor = _), | |
(_.Interface = n$2({}, _e.Interface, s)), | |
(_.extend = _e.extend), | |
de(_), | |
_ | |
); | |
}; | |
de(G$1); | |
function ee$1(s, o, _, _e) { | |
if (this.eventPool.length) { | |
var et = this.eventPool.pop(); | |
return this.call(et, s, o, _, _e), et; | |
} | |
return new this(s, o, _, _e); | |
} | |
function fe(s) { | |
if (!(s instanceof this)) throw Error(u$e(279)); | |
s.destructor(), 10 > this.eventPool.length && this.eventPool.push(s); | |
} | |
function de(s) { | |
(s.eventPool = []), (s.getPooled = ee$1), (s.release = fe); | |
} | |
var ge = G$1.extend({ data: null }), | |
he = G$1.extend({ data: null }), | |
ie$2 = [9, 13, 27, 32], | |
je = ya && "CompositionEvent" in window, | |
ke = null; | |
ya && "documentMode" in document && (ke = document.documentMode); | |
var le = ya && "TextEvent" in window && !ke, | |
me = ya && (!je || (ke && 8 < ke && 11 >= ke)), | |
ne = " ", | |
oe = { | |
beforeInput: { | |
phasedRegistrationNames: { | |
bubbled: "onBeforeInput", | |
captured: "onBeforeInputCapture", | |
}, | |
dependencies: ["compositionend", "keypress", "textInput", "paste"], | |
}, | |
compositionEnd: { | |
phasedRegistrationNames: { | |
bubbled: "onCompositionEnd", | |
captured: "onCompositionEndCapture", | |
}, | |
dependencies: | |
"blur compositionend keydown keypress keyup mousedown".split(" "), | |
}, | |
compositionStart: { | |
phasedRegistrationNames: { | |
bubbled: "onCompositionStart", | |
captured: "onCompositionStartCapture", | |
}, | |
dependencies: | |
"blur compositionstart keydown keypress keyup mousedown".split(" "), | |
}, | |
compositionUpdate: { | |
phasedRegistrationNames: { | |
bubbled: "onCompositionUpdate", | |
captured: "onCompositionUpdateCapture", | |
}, | |
dependencies: | |
"blur compositionupdate keydown keypress keyup mousedown".split(" "), | |
}, | |
}, | |
pe = !1; | |
function qe(s, o) { | |
switch (s) { | |
case "keyup": | |
return ie$2.indexOf(o.keyCode) !== -1; | |
case "keydown": | |
return o.keyCode !== 229; | |
case "keypress": | |
case "mousedown": | |
case "blur": | |
return !0; | |
default: | |
return !1; | |
} | |
} | |
function re(s) { | |
return (s = s.detail), typeof s == "object" && "data" in s ? s.data : null; | |
} | |
var se = !1; | |
function te$1(s, o) { | |
switch (s) { | |
case "compositionend": | |
return re(o); | |
case "keypress": | |
return o.which !== 32 ? null : ((pe = !0), ne); | |
case "textInput": | |
return (s = o.data), s === ne && pe ? null : s; | |
default: | |
return null; | |
} | |
} | |
function ue(s, o) { | |
if (se) | |
return s === "compositionend" || (!je && qe(s, o)) | |
? ((s = ae()), ($d = Zd = Yd = null), (se = !1), s) | |
: null; | |
switch (s) { | |
case "paste": | |
return null; | |
case "keypress": | |
if (!(o.ctrlKey || o.altKey || o.metaKey) || (o.ctrlKey && o.altKey)) { | |
if (o.char && 1 < o.char.length) return o.char; | |
if (o.which) return String.fromCharCode(o.which); | |
} | |
return null; | |
case "compositionend": | |
return me && o.locale !== "ko" ? null : o.data; | |
default: | |
return null; | |
} | |
} | |
var ve = { | |
eventTypes: oe, | |
extractEvents: function (s, o, _, _e) { | |
var et; | |
if (je) | |
e: { | |
switch (s) { | |
case "compositionstart": | |
var tt = oe.compositionStart; | |
break e; | |
case "compositionend": | |
tt = oe.compositionEnd; | |
break e; | |
case "compositionupdate": | |
tt = oe.compositionUpdate; | |
break e; | |
} | |
tt = void 0; | |
} | |
else | |
se | |
? qe(s, _) && (tt = oe.compositionEnd) | |
: s === "keydown" && | |
_.keyCode === 229 && | |
(tt = oe.compositionStart); | |
return ( | |
tt | |
? (me && | |
_.locale !== "ko" && | |
(se || tt !== oe.compositionStart | |
? tt === oe.compositionEnd && se && (et = ae()) | |
: ((Yd = _e), | |
(Zd = "value" in Yd ? Yd.value : Yd.textContent), | |
(se = !0))), | |
(tt = ge.getPooled(tt, o, _, _e)), | |
et | |
? (tt.data = et) | |
: ((et = re(_)), et !== null && (tt.data = et)), | |
Xd(tt), | |
(et = tt)) | |
: (et = null), | |
(s = le ? te$1(s, _) : ue(s, _)) | |
? ((o = he.getPooled(oe.beforeInput, o, _, _e)), | |
(o.data = s), | |
Xd(o)) | |
: (o = null), | |
et === null ? o : o === null ? et : [et, o] | |
); | |
}, | |
}, | |
we = { | |
color: !0, | |
date: !0, | |
datetime: !0, | |
"datetime-local": !0, | |
email: !0, | |
month: !0, | |
number: !0, | |
password: !0, | |
range: !0, | |
search: !0, | |
tel: !0, | |
text: !0, | |
time: !0, | |
url: !0, | |
week: !0, | |
}; | |
function xe(s) { | |
var o = s && s.nodeName && s.nodeName.toLowerCase(); | |
return o === "input" ? !!we[s.type] : o === "textarea"; | |
} | |
var ye = { | |
change: { | |
phasedRegistrationNames: { | |
bubbled: "onChange", | |
captured: "onChangeCapture", | |
}, | |
dependencies: | |
"blur change click focus input keydown keyup selectionchange".split( | |
" ", | |
), | |
}, | |
}; | |
function ze(s, o, _) { | |
return ( | |
(s = G$1.getPooled(ye.change, s, o, _)), | |
(s.type = "change"), | |
Da(_), | |
Xd(s), | |
s | |
); | |
} | |
var Ae = null, | |
Be = null; | |
function Ce(s) { | |
mc(s); | |
} | |
function De(s) { | |
var o = Pd(s); | |
if (yb(o)) return s; | |
} | |
function Ee(s, o) { | |
if (s === "change") return o; | |
} | |
var Fe = !1; | |
ya && | |
(Fe = oc("input") && (!document.documentMode || 9 < document.documentMode)); | |
function Ge() { | |
Ae && (Ae.detachEvent("onpropertychange", He), (Be = Ae = null)); | |
} | |
function He(s) { | |
if (s.propertyName === "value" && De(Be)) | |
if (((s = ze(Be, s, nc(s))), Ja)) mc(s); | |
else { | |
Ja = !0; | |
try { | |
Fa(Ce, s); | |
} finally { | |
(Ja = !1), La(); | |
} | |
} | |
} | |
function Ie(s, o, _) { | |
s === "focus" | |
? (Ge(), (Ae = o), (Be = _), Ae.attachEvent("onpropertychange", He)) | |
: s === "blur" && Ge(); | |
} | |
function Je(s) { | |
if (s === "selectionchange" || s === "keyup" || s === "keydown") | |
return De(Be); | |
} | |
function Ke(s, o) { | |
if (s === "click") return De(o); | |
} | |
function Le(s, o) { | |
if (s === "input" || s === "change") return De(o); | |
} | |
var Me = { | |
eventTypes: ye, | |
_isInputEventSupported: Fe, | |
extractEvents: function (s, o, _, _e) { | |
var et = o ? Pd(o) : window, | |
tt = et.nodeName && et.nodeName.toLowerCase(); | |
if (tt === "select" || (tt === "input" && et.type === "file")) | |
var rt = Ee; | |
else if (xe(et)) | |
if (Fe) rt = Le; | |
else { | |
rt = Je; | |
var it = Ie; | |
} | |
else | |
(tt = et.nodeName) && | |
tt.toLowerCase() === "input" && | |
(et.type === "checkbox" || et.type === "radio") && | |
(rt = Ke); | |
if (rt && (rt = rt(s, o))) return ze(rt, _, _e); | |
it && it(s, et, o), | |
s === "blur" && | |
(s = et._wrapperState) && | |
s.controlled && | |
et.type === "number" && | |
Db(et, "number", et.value); | |
}, | |
}, | |
Ne = G$1.extend({ view: null, detail: null }), | |
Oe = { | |
Alt: "altKey", | |
Control: "ctrlKey", | |
Meta: "metaKey", | |
Shift: "shiftKey", | |
}; | |
function Pe(s) { | |
var o = this.nativeEvent; | |
return o.getModifierState | |
? o.getModifierState(s) | |
: (s = Oe[s]) | |
? !!o[s] | |
: !1; | |
} | |
function Qe() { | |
return Pe; | |
} | |
var Re = 0, | |
Se = 0, | |
Te = !1, | |
Ue = !1, | |
Ve = Ne.extend({ | |
screenX: null, | |
screenY: null, | |
clientX: null, | |
clientY: null, | |
pageX: null, | |
pageY: null, | |
ctrlKey: null, | |
shiftKey: null, | |
altKey: null, | |
metaKey: null, | |
getModifierState: Qe, | |
button: null, | |
buttons: null, | |
relatedTarget: function (s) { | |
return ( | |
s.relatedTarget || | |
(s.fromElement === s.srcElement ? s.toElement : s.fromElement) | |
); | |
}, | |
movementX: function (s) { | |
if ("movementX" in s) return s.movementX; | |
var o = Re; | |
return ( | |
(Re = s.screenX), | |
Te ? (s.type === "mousemove" ? s.screenX - o : 0) : ((Te = !0), 0) | |
); | |
}, | |
movementY: function (s) { | |
if ("movementY" in s) return s.movementY; | |
var o = Se; | |
return ( | |
(Se = s.screenY), | |
Ue ? (s.type === "mousemove" ? s.screenY - o : 0) : ((Ue = !0), 0) | |
); | |
}, | |
}), | |
We = Ve.extend({ | |
pointerId: null, | |
width: null, | |
height: null, | |
pressure: null, | |
tangentialPressure: null, | |
tiltX: null, | |
tiltY: null, | |
twist: null, | |
pointerType: null, | |
isPrimary: null, | |
}), | |
Xe = { | |
mouseEnter: { | |
registrationName: "onMouseEnter", | |
dependencies: ["mouseout", "mouseover"], | |
}, | |
mouseLeave: { | |
registrationName: "onMouseLeave", | |
dependencies: ["mouseout", "mouseover"], | |
}, | |
pointerEnter: { | |
registrationName: "onPointerEnter", | |
dependencies: ["pointerout", "pointerover"], | |
}, | |
pointerLeave: { | |
registrationName: "onPointerLeave", | |
dependencies: ["pointerout", "pointerover"], | |
}, | |
}, | |
Ye = { | |
eventTypes: Xe, | |
extractEvents: function (s, o, _, _e, et) { | |
var tt = s === "mouseover" || s === "pointerover", | |
rt = s === "mouseout" || s === "pointerout"; | |
if ( | |
(tt && !(et & 32) && (_.relatedTarget || _.fromElement)) || | |
(!rt && !tt) | |
) | |
return null; | |
if ( | |
((tt = | |
_e.window === _e | |
? _e | |
: (tt = _e.ownerDocument) | |
? tt.defaultView || tt.parentWindow | |
: window), | |
rt) | |
) { | |
if ( | |
((rt = o), | |
(o = (o = _.relatedTarget || _.toElement) ? tc(o) : null), | |
o !== null) | |
) { | |
var it = dc(o); | |
(o !== it || (o.tag !== 5 && o.tag !== 6)) && (o = null); | |
} | |
} else rt = null; | |
if (rt === o) return null; | |
if (s === "mouseout" || s === "mouseover") | |
var ot = Ve, | |
ct = Xe.mouseLeave, | |
at = Xe.mouseEnter, | |
ht = "mouse"; | |
else | |
(s === "pointerout" || s === "pointerover") && | |
((ot = We), | |
(ct = Xe.pointerLeave), | |
(at = Xe.pointerEnter), | |
(ht = "pointer")); | |
if ( | |
((s = rt == null ? tt : Pd(rt)), | |
(tt = o == null ? tt : Pd(o)), | |
(ct = ot.getPooled(ct, rt, _, _e)), | |
(ct.type = ht + "leave"), | |
(ct.target = s), | |
(ct.relatedTarget = tt), | |
(_ = ot.getPooled(at, o, _, _e)), | |
(_.type = ht + "enter"), | |
(_.target = tt), | |
(_.relatedTarget = s), | |
(_e = rt), | |
(ht = o), | |
_e && ht) | |
) | |
e: { | |
for (ot = _e, at = ht, rt = 0, s = ot; s; s = Rd(s)) rt++; | |
for (s = 0, o = at; o; o = Rd(o)) s++; | |
for (; 0 < rt - s; ) (ot = Rd(ot)), rt--; | |
for (; 0 < s - rt; ) (at = Rd(at)), s--; | |
for (; rt--; ) { | |
if (ot === at || ot === at.alternate) break e; | |
(ot = Rd(ot)), (at = Rd(at)); | |
} | |
ot = null; | |
} | |
else ot = null; | |
for ( | |
at = ot, ot = []; | |
_e && _e !== at && ((rt = _e.alternate), !(rt !== null && rt === at)); | |
) | |
ot.push(_e), (_e = Rd(_e)); | |
for ( | |
_e = []; | |
ht && ht !== at && ((rt = ht.alternate), !(rt !== null && rt === at)); | |
) | |
_e.push(ht), (ht = Rd(ht)); | |
for (ht = 0; ht < ot.length; ht++) Vd(ot[ht], "bubbled", ct); | |
for (ht = _e.length; 0 < ht--; ) Vd(_e[ht], "captured", _); | |
return et & 64 ? [ct, _] : [ct]; | |
}, | |
}; | |
function Ze(s, o) { | |
return (s === o && (s !== 0 || 1 / s === 1 / o)) || (s !== s && o !== o); | |
} | |
var $e = typeof Object.is == "function" ? Object.is : Ze, | |
af = Object.prototype.hasOwnProperty; | |
function bf(s, o) { | |
if ($e(s, o)) return !0; | |
if ( | |
typeof s != "object" || | |
s === null || | |
typeof o != "object" || | |
o === null | |
) | |
return !1; | |
var _ = Object.keys(s), | |
_e = Object.keys(o); | |
if (_.length !== _e.length) return !1; | |
for (_e = 0; _e < _.length; _e++) | |
if (!af.call(o, _[_e]) || !$e(s[_[_e]], o[_[_e]])) return !1; | |
return !0; | |
} | |
var cf = ya && "documentMode" in document && 11 >= document.documentMode, | |
df = { | |
select: { | |
phasedRegistrationNames: { | |
bubbled: "onSelect", | |
captured: "onSelectCapture", | |
}, | |
dependencies: | |
"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split( | |
" ", | |
), | |
}, | |
}, | |
ef = null, | |
ff = null, | |
gf = null, | |
hf = !1; | |
function jf(s, o) { | |
var _ = | |
o.window === o ? o.document : o.nodeType === 9 ? o : o.ownerDocument; | |
return hf || ef == null || ef !== td(_) | |
? null | |
: ((_ = ef), | |
"selectionStart" in _ && yd(_) | |
? (_ = { start: _.selectionStart, end: _.selectionEnd }) | |
: ((_ = ( | |
(_.ownerDocument && _.ownerDocument.defaultView) || | |
window | |
).getSelection()), | |
(_ = { | |
anchorNode: _.anchorNode, | |
anchorOffset: _.anchorOffset, | |
focusNode: _.focusNode, | |
focusOffset: _.focusOffset, | |
})), | |
gf && bf(gf, _) | |
? null | |
: ((gf = _), | |
(s = G$1.getPooled(df.select, ff, s, o)), | |
(s.type = "select"), | |
(s.target = ef), | |
Xd(s), | |
s)); | |
} | |
var kf = { | |
eventTypes: df, | |
extractEvents: function (s, o, _, _e, et, tt) { | |
if ( | |
((et = | |
tt || | |
(_e.window === _e | |
? _e.document | |
: _e.nodeType === 9 | |
? _e | |
: _e.ownerDocument)), | |
!(tt = !et)) | |
) { | |
e: { | |
(et = cc(et)), (tt = wa.onSelect); | |
for (var rt = 0; rt < tt.length; rt++) | |
if (!et.has(tt[rt])) { | |
et = !1; | |
break e; | |
} | |
et = !0; | |
} | |
tt = !et; | |
} | |
if (tt) return null; | |
switch (((et = o ? Pd(o) : window), s)) { | |
case "focus": | |
(xe(et) || et.contentEditable === "true") && | |
((ef = et), (ff = o), (gf = null)); | |
break; | |
case "blur": | |
gf = ff = ef = null; | |
break; | |
case "mousedown": | |
hf = !0; | |
break; | |
case "contextmenu": | |
case "mouseup": | |
case "dragend": | |
return (hf = !1), jf(_, _e); | |
case "selectionchange": | |
if (cf) break; | |
case "keydown": | |
case "keyup": | |
return jf(_, _e); | |
} | |
return null; | |
}, | |
}, | |
lf = G$1.extend({ | |
animationName: null, | |
elapsedTime: null, | |
pseudoElement: null, | |
}), | |
mf = G$1.extend({ | |
clipboardData: function (s) { | |
return "clipboardData" in s ? s.clipboardData : window.clipboardData; | |
}, | |
}), | |
nf = Ne.extend({ relatedTarget: null }); | |
function of(s) { | |
var o = s.keyCode; | |
return ( | |
"charCode" in s | |
? ((s = s.charCode), s === 0 && o === 13 && (s = 13)) | |
: (s = o), | |
s === 10 && (s = 13), | |
32 <= s || s === 13 ? s : 0 | |
); | |
} | |
var pf = { | |
Esc: "Escape", | |
Spacebar: " ", | |
Left: "ArrowLeft", | |
Up: "ArrowUp", | |
Right: "ArrowRight", | |
Down: "ArrowDown", | |
Del: "Delete", | |
Win: "OS", | |
Menu: "ContextMenu", | |
Apps: "ContextMenu", | |
Scroll: "ScrollLock", | |
MozPrintableKey: "Unidentified", | |
}, | |
qf = { | |
8: "Backspace", | |
9: "Tab", | |
12: "Clear", | |
13: "Enter", | |
16: "Shift", | |
17: "Control", | |
18: "Alt", | |
19: "Pause", | |
20: "CapsLock", | |
27: "Escape", | |
32: " ", | |
33: "PageUp", | |
34: "PageDown", | |
35: "End", | |
36: "Home", | |
37: "ArrowLeft", | |
38: "ArrowUp", | |
39: "ArrowRight", | |
40: "ArrowDown", | |
45: "Insert", | |
46: "Delete", | |
112: "F1", | |
113: "F2", | |
114: "F3", | |
115: "F4", | |
116: "F5", | |
117: "F6", | |
118: "F7", | |
119: "F8", | |
120: "F9", | |
121: "F10", | |
122: "F11", | |
123: "F12", | |
144: "NumLock", | |
145: "ScrollLock", | |
224: "Meta", | |
}, | |
rf = Ne.extend({ | |
key: function (s) { | |
if (s.key) { | |
var o = pf[s.key] || s.key; | |
if (o !== "Unidentified") return o; | |
} | |
return s.type === "keypress" | |
? ((s = of(s)), s === 13 ? "Enter" : String.fromCharCode(s)) | |
: s.type === "keydown" || s.type === "keyup" | |
? qf[s.keyCode] || "Unidentified" | |
: ""; | |
}, | |
location: null, | |
ctrlKey: null, | |
shiftKey: null, | |
altKey: null, | |
metaKey: null, | |
repeat: null, | |
locale: null, | |
getModifierState: Qe, | |
charCode: function (s) { | |
return s.type === "keypress" ? of(s) : 0; | |
}, | |
keyCode: function (s) { | |
return s.type === "keydown" || s.type === "keyup" ? s.keyCode : 0; | |
}, | |
which: function (s) { | |
return s.type === "keypress" | |
? of(s) | |
: s.type === "keydown" || s.type === "keyup" | |
? s.keyCode | |
: 0; | |
}, | |
}), | |
sf = Ve.extend({ dataTransfer: null }), | |
tf = Ne.extend({ | |
touches: null, | |
targetTouches: null, | |
changedTouches: null, | |
altKey: null, | |
metaKey: null, | |
ctrlKey: null, | |
shiftKey: null, | |
getModifierState: Qe, | |
}), | |
uf = G$1.extend({ | |
propertyName: null, | |
elapsedTime: null, | |
pseudoElement: null, | |
}), | |
vf = Ve.extend({ | |
deltaX: function (s) { | |
return "deltaX" in s | |
? s.deltaX | |
: "wheelDeltaX" in s | |
? -s.wheelDeltaX | |
: 0; | |
}, | |
deltaY: function (s) { | |
return "deltaY" in s | |
? s.deltaY | |
: "wheelDeltaY" in s | |
? -s.wheelDeltaY | |
: "wheelDelta" in s | |
? -s.wheelDelta | |
: 0; | |
}, | |
deltaZ: null, | |
deltaMode: null, | |
}), | |
wf = { | |
eventTypes: Wc, | |
extractEvents: function (s, o, _, _e) { | |
var et = Yc.get(s); | |
if (!et) return null; | |
switch (s) { | |
case "keypress": | |
if (of(_) === 0) return null; | |
case "keydown": | |
case "keyup": | |
s = rf; | |
break; | |
case "blur": | |
case "focus": | |
s = nf; | |
break; | |
case "click": | |
if (_.button === 2) return null; | |
case "auxclick": | |
case "dblclick": | |
case "mousedown": | |
case "mousemove": | |
case "mouseup": | |
case "mouseout": | |
case "mouseover": | |
case "contextmenu": | |
s = Ve; | |
break; | |
case "drag": | |
case "dragend": | |
case "dragenter": | |
case "dragexit": | |
case "dragleave": | |
case "dragover": | |
case "dragstart": | |
case "drop": | |
s = sf; | |
break; | |
case "touchcancel": | |
case "touchend": | |
case "touchmove": | |
case "touchstart": | |
s = tf; | |
break; | |
case Xb: | |
case Yb: | |
case Zb: | |
s = lf; | |
break; | |
case $b: | |
s = uf; | |
break; | |
case "scroll": | |
s = Ne; | |
break; | |
case "wheel": | |
s = vf; | |
break; | |
case "copy": | |
case "cut": | |
case "paste": | |
s = mf; | |
break; | |
case "gotpointercapture": | |
case "lostpointercapture": | |
case "pointercancel": | |
case "pointerdown": | |
case "pointermove": | |
case "pointerout": | |
case "pointerover": | |
case "pointerup": | |
s = We; | |
break; | |
default: | |
s = G$1; | |
} | |
return (o = s.getPooled(et, o, _, _e)), Xd(o), o; | |
}, | |
}; | |
if (pa) throw Error(u$e(101)); | |
pa = Array.prototype.slice.call( | |
"ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split( | |
" ", | |
), | |
); | |
ra(); | |
var xf = Nc; | |
la = Qd; | |
ma = xf; | |
na = Pd; | |
xa({ | |
SimpleEventPlugin: wf, | |
EnterLeaveEventPlugin: Ye, | |
ChangeEventPlugin: Me, | |
SelectEventPlugin: kf, | |
BeforeInputEventPlugin: ve, | |
}); | |
var yf = [], | |
zf = -1; | |
function H$2(s) { | |
0 > zf || ((s.current = yf[zf]), (yf[zf] = null), zf--); | |
} | |
function I$2(s, o) { | |
zf++, (yf[zf] = s.current), (s.current = o); | |
} | |
var Af = {}, | |
J$1 = { current: Af }, | |
K$1 = { current: !1 }, | |
Bf = Af; | |
function Cf(s, o) { | |
var _ = s.type.contextTypes; | |
if (!_) return Af; | |
var _e = s.stateNode; | |
if (_e && _e.__reactInternalMemoizedUnmaskedChildContext === o) | |
return _e.__reactInternalMemoizedMaskedChildContext; | |
var et = {}, | |
tt; | |
for (tt in _) et[tt] = o[tt]; | |
return ( | |
_e && | |
((s = s.stateNode), | |
(s.__reactInternalMemoizedUnmaskedChildContext = o), | |
(s.__reactInternalMemoizedMaskedChildContext = et)), | |
et | |
); | |
} | |
function L$2(s) { | |
return (s = s.childContextTypes), s != null; | |
} | |
function Df() { | |
H$2(K$1), H$2(J$1); | |
} | |
function Ef(s, o, _) { | |
if (J$1.current !== Af) throw Error(u$e(168)); | |
I$2(J$1, o), I$2(K$1, _); | |
} | |
function Ff(s, o, _) { | |
var _e = s.stateNode; | |
if (((s = o.childContextTypes), typeof _e.getChildContext != "function")) | |
return _; | |
_e = _e.getChildContext(); | |
for (var et in _e) | |
if (!(et in s)) throw Error(u$e(108, pb(o) || "Unknown", et)); | |
return n$2({}, _, {}, _e); | |
} | |
function Gf(s) { | |
return ( | |
(s = | |
((s = s.stateNode) && s.__reactInternalMemoizedMergedChildContext) || | |
Af), | |
(Bf = J$1.current), | |
I$2(J$1, s), | |
I$2(K$1, K$1.current), | |
!0 | |
); | |
} | |
function Hf(s, o, _) { | |
var _e = s.stateNode; | |
if (!_e) throw Error(u$e(169)); | |
_ | |
? ((s = Ff(s, o, Bf)), | |
(_e.__reactInternalMemoizedMergedChildContext = s), | |
H$2(K$1), | |
H$2(J$1), | |
I$2(J$1, s)) | |
: H$2(K$1), | |
I$2(K$1, _); | |
} | |
var If = r$2.unstable_runWithPriority, | |
Jf = r$2.unstable_scheduleCallback, | |
Kf = r$2.unstable_cancelCallback, | |
Lf = r$2.unstable_requestPaint, | |
Mf = r$2.unstable_now, | |
Nf = r$2.unstable_getCurrentPriorityLevel, | |
Of = r$2.unstable_ImmediatePriority, | |
Pf = r$2.unstable_UserBlockingPriority, | |
Qf = r$2.unstable_NormalPriority, | |
Rf = r$2.unstable_LowPriority, | |
Sf = r$2.unstable_IdlePriority, | |
Tf = {}, | |
Uf = r$2.unstable_shouldYield, | |
Vf = Lf !== void 0 ? Lf : function () {}, | |
Wf = null, | |
Xf = null, | |
Yf = !1, | |
Zf = Mf(), | |
$f = | |
1e4 > Zf | |
? Mf | |
: function () { | |
return Mf() - Zf; | |
}; | |
function ag() { | |
switch (Nf()) { | |
case Of: | |
return 99; | |
case Pf: | |
return 98; | |
case Qf: | |
return 97; | |
case Rf: | |
return 96; | |
case Sf: | |
return 95; | |
default: | |
throw Error(u$e(332)); | |
} | |
} | |
function bg(s) { | |
switch (s) { | |
case 99: | |
return Of; | |
case 98: | |
return Pf; | |
case 97: | |
return Qf; | |
case 96: | |
return Rf; | |
case 95: | |
return Sf; | |
default: | |
throw Error(u$e(332)); | |
} | |
} | |
function cg(s, o) { | |
return (s = bg(s)), If(s, o); | |
} | |
function dg(s, o, _) { | |
return (s = bg(s)), Jf(s, o, _); | |
} | |
function eg(s) { | |
return Wf === null ? ((Wf = [s]), (Xf = Jf(Of, fg))) : Wf.push(s), Tf; | |
} | |
function gg() { | |
if (Xf !== null) { | |
var s = Xf; | |
(Xf = null), Kf(s); | |
} | |
fg(); | |
} | |
function fg() { | |
if (!Yf && Wf !== null) { | |
Yf = !0; | |
var s = 0; | |
try { | |
var o = Wf; | |
cg(99, function () { | |
for (; s < o.length; s++) { | |
var _ = o[s]; | |
do _ = _(!0); | |
while (_ !== null); | |
} | |
}), | |
(Wf = null); | |
} catch (_) { | |
throw (Wf !== null && (Wf = Wf.slice(s + 1)), Jf(Of, gg), _); | |
} finally { | |
Yf = !1; | |
} | |
} | |
} | |
function hg(s, o, _) { | |
return ( | |
(_ /= 10), 1073741821 - ((((1073741821 - s + o / 10) / _) | 0) + 1) * _ | |
); | |
} | |
function ig(s, o) { | |
if (s && s.defaultProps) { | |
(o = n$2({}, o)), (s = s.defaultProps); | |
for (var _ in s) o[_] === void 0 && (o[_] = s[_]); | |
} | |
return o; | |
} | |
var jg = { current: null }, | |
kg = null, | |
lg = null, | |
mg = null; | |
function ng() { | |
mg = lg = kg = null; | |
} | |
function og(s) { | |
var o = jg.current; | |
H$2(jg), (s.type._context._currentValue = o); | |
} | |
function pg(s, o) { | |
for (; s !== null; ) { | |
var _ = s.alternate; | |
if (s.childExpirationTime < o) | |
(s.childExpirationTime = o), | |
_ !== null && | |
_.childExpirationTime < o && | |
(_.childExpirationTime = o); | |
else if (_ !== null && _.childExpirationTime < o) | |
_.childExpirationTime = o; | |
else break; | |
s = s.return; | |
} | |
} | |
function qg(s, o) { | |
(kg = s), | |
(mg = lg = null), | |
(s = s.dependencies), | |
s !== null && | |
s.firstContext !== null && | |
(s.expirationTime >= o && (rg = !0), (s.firstContext = null)); | |
} | |
function sg(s, o) { | |
if (mg !== s && o !== !1 && o !== 0) | |
if ( | |
((typeof o != "number" || o === 1073741823) && | |
((mg = s), (o = 1073741823)), | |
(o = { context: s, observedBits: o, next: null }), | |
lg === null) | |
) { | |
if (kg === null) throw Error(u$e(308)); | |
(lg = o), | |
(kg.dependencies = { | |
expirationTime: 0, | |
firstContext: o, | |
responders: null, | |
}); | |
} else lg = lg.next = o; | |
return s._currentValue; | |
} | |
var tg = !1; | |
function ug(s) { | |
s.updateQueue = { | |
baseState: s.memoizedState, | |
baseQueue: null, | |
shared: { pending: null }, | |
effects: null, | |
}; | |
} | |
function vg(s, o) { | |
(s = s.updateQueue), | |
o.updateQueue === s && | |
(o.updateQueue = { | |
baseState: s.baseState, | |
baseQueue: s.baseQueue, | |
shared: s.shared, | |
effects: s.effects, | |
}); | |
} | |
function wg(s, o) { | |
return ( | |
(s = { | |
expirationTime: s, | |
suspenseConfig: o, | |
tag: 0, | |
payload: null, | |
callback: null, | |
next: null, | |
}), | |
(s.next = s) | |
); | |
} | |
function xg(s, o) { | |
if (((s = s.updateQueue), s !== null)) { | |
s = s.shared; | |
var _ = s.pending; | |
_ === null ? (o.next = o) : ((o.next = _.next), (_.next = o)), | |
(s.pending = o); | |
} | |
} | |
function yg(s, o) { | |
var _ = s.alternate; | |
_ !== null && vg(_, s), | |
(s = s.updateQueue), | |
(_ = s.baseQueue), | |
_ === null | |
? ((s.baseQueue = o.next = o), (o.next = o)) | |
: ((o.next = _.next), (_.next = o)); | |
} | |
function zg(s, o, _, _e) { | |
var et = s.updateQueue; | |
tg = !1; | |
var tt = et.baseQueue, | |
rt = et.shared.pending; | |
if (rt !== null) { | |
if (tt !== null) { | |
var it = tt.next; | |
(tt.next = rt.next), (rt.next = it); | |
} | |
(tt = rt), | |
(et.shared.pending = null), | |
(it = s.alternate), | |
it !== null && | |
((it = it.updateQueue), it !== null && (it.baseQueue = rt)); | |
} | |
if (tt !== null) { | |
it = tt.next; | |
var ot = et.baseState, | |
ct = 0, | |
at = null, | |
ht = null, | |
mt = null; | |
if (it !== null) { | |
var vt = it; | |
do { | |
if (((rt = vt.expirationTime), rt < _e)) { | |
var xt = { | |
expirationTime: vt.expirationTime, | |
suspenseConfig: vt.suspenseConfig, | |
tag: vt.tag, | |
payload: vt.payload, | |
callback: vt.callback, | |
next: null, | |
}; | |
mt === null ? ((ht = mt = xt), (at = ot)) : (mt = mt.next = xt), | |
rt > ct && (ct = rt); | |
} else { | |
mt !== null && | |
(mt = mt.next = | |
{ | |
expirationTime: 1073741823, | |
suspenseConfig: vt.suspenseConfig, | |
tag: vt.tag, | |
payload: vt.payload, | |
callback: vt.callback, | |
next: null, | |
}), | |
Ag(rt, vt.suspenseConfig); | |
e: { | |
var St = s, | |
$t = vt; | |
switch (((rt = o), (xt = _), $t.tag)) { | |
case 1: | |
if (((St = $t.payload), typeof St == "function")) { | |
ot = St.call(xt, ot, rt); | |
break e; | |
} | |
ot = St; | |
break e; | |
case 3: | |
St.effectTag = (St.effectTag & -4097) | 64; | |
case 0: | |
if ( | |
((St = $t.payload), | |
(rt = typeof St == "function" ? St.call(xt, ot, rt) : St), | |
rt == null) | |
) | |
break e; | |
ot = n$2({}, ot, rt); | |
break e; | |
case 2: | |
tg = !0; | |
} | |
} | |
vt.callback !== null && | |
((s.effectTag |= 32), | |
(rt = et.effects), | |
rt === null ? (et.effects = [vt]) : rt.push(vt)); | |
} | |
if (((vt = vt.next), vt === null || vt === it)) { | |
if (((rt = et.shared.pending), rt === null)) break; | |
(vt = tt.next = rt.next), | |
(rt.next = it), | |
(et.baseQueue = tt = rt), | |
(et.shared.pending = null); | |
} | |
} while (!0); | |
} | |
mt === null ? (at = ot) : (mt.next = ht), | |
(et.baseState = at), | |
(et.baseQueue = mt), | |
Bg(ct), | |
(s.expirationTime = ct), | |
(s.memoizedState = ot); | |
} | |
} | |
function Cg(s, o, _) { | |
if (((s = o.effects), (o.effects = null), s !== null)) | |
for (o = 0; o < s.length; o++) { | |
var _e = s[o], | |
et = _e.callback; | |
if (et !== null) { | |
if ( | |
((_e.callback = null), (_e = et), (et = _), typeof _e != "function") | |
) | |
throw Error(u$e(191, _e)); | |
_e.call(et); | |
} | |
} | |
} | |
var Dg = Wa.ReactCurrentBatchConfig, | |
Eg = new aa.Component().refs; | |
function Fg(s, o, _, _e) { | |
(o = s.memoizedState), | |
(_ = _(_e, o)), | |
(_ = _ == null ? o : n$2({}, o, _)), | |
(s.memoizedState = _), | |
s.expirationTime === 0 && (s.updateQueue.baseState = _); | |
} | |
var Jg = { | |
isMounted: function (s) { | |
return (s = s._reactInternalFiber) ? dc(s) === s : !1; | |
}, | |
enqueueSetState: function (s, o, _) { | |
s = s._reactInternalFiber; | |
var _e = Gg(), | |
et = Dg.suspense; | |
(_e = Hg(_e, s, et)), | |
(et = wg(_e, et)), | |
(et.payload = o), | |
_ != null && (et.callback = _), | |
xg(s, et), | |
Ig(s, _e); | |
}, | |
enqueueReplaceState: function (s, o, _) { | |
s = s._reactInternalFiber; | |
var _e = Gg(), | |
et = Dg.suspense; | |
(_e = Hg(_e, s, et)), | |
(et = wg(_e, et)), | |
(et.tag = 1), | |
(et.payload = o), | |
_ != null && (et.callback = _), | |
xg(s, et), | |
Ig(s, _e); | |
}, | |
enqueueForceUpdate: function (s, o) { | |
s = s._reactInternalFiber; | |
var _ = Gg(), | |
_e = Dg.suspense; | |
(_ = Hg(_, s, _e)), | |
(_e = wg(_, _e)), | |
(_e.tag = 2), | |
o != null && (_e.callback = o), | |
xg(s, _e), | |
Ig(s, _); | |
}, | |
}; | |
function Kg(s, o, _, _e, et, tt, rt) { | |
return ( | |
(s = s.stateNode), | |
typeof s.shouldComponentUpdate == "function" | |
? s.shouldComponentUpdate(_e, tt, rt) | |
: o.prototype && o.prototype.isPureReactComponent | |
? !bf(_, _e) || !bf(et, tt) | |
: !0 | |
); | |
} | |
function Lg(s, o, _) { | |
var _e = !1, | |
et = Af, | |
tt = o.contextType; | |
return ( | |
typeof tt == "object" && tt !== null | |
? (tt = sg(tt)) | |
: ((et = L$2(o) ? Bf : J$1.current), | |
(_e = o.contextTypes), | |
(tt = (_e = _e != null) ? Cf(s, et) : Af)), | |
(o = new o(_, tt)), | |
(s.memoizedState = | |
o.state !== null && o.state !== void 0 ? o.state : null), | |
(o.updater = Jg), | |
(s.stateNode = o), | |
(o._reactInternalFiber = s), | |
_e && | |
((s = s.stateNode), | |
(s.__reactInternalMemoizedUnmaskedChildContext = et), | |
(s.__reactInternalMemoizedMaskedChildContext = tt)), | |
o | |
); | |
} | |
function Mg(s, o, _, _e) { | |
(s = o.state), | |
typeof o.componentWillReceiveProps == "function" && | |
o.componentWillReceiveProps(_, _e), | |
typeof o.UNSAFE_componentWillReceiveProps == "function" && | |
o.UNSAFE_componentWillReceiveProps(_, _e), | |
o.state !== s && Jg.enqueueReplaceState(o, o.state, null); | |
} | |
function Ng(s, o, _, _e) { | |
var et = s.stateNode; | |
(et.props = _), (et.state = s.memoizedState), (et.refs = Eg), ug(s); | |
var tt = o.contextType; | |
typeof tt == "object" && tt !== null | |
? (et.context = sg(tt)) | |
: ((tt = L$2(o) ? Bf : J$1.current), (et.context = Cf(s, tt))), | |
zg(s, _, et, _e), | |
(et.state = s.memoizedState), | |
(tt = o.getDerivedStateFromProps), | |
typeof tt == "function" && | |
(Fg(s, o, tt, _), (et.state = s.memoizedState)), | |
typeof o.getDerivedStateFromProps == "function" || | |
typeof et.getSnapshotBeforeUpdate == "function" || | |
(typeof et.UNSAFE_componentWillMount != "function" && | |
typeof et.componentWillMount != "function") || | |
((o = et.state), | |
typeof et.componentWillMount == "function" && et.componentWillMount(), | |
typeof et.UNSAFE_componentWillMount == "function" && | |
et.UNSAFE_componentWillMount(), | |
o !== et.state && Jg.enqueueReplaceState(et, et.state, null), | |
zg(s, _, et, _e), | |
(et.state = s.memoizedState)), | |
typeof et.componentDidMount == "function" && (s.effectTag |= 4); | |
} | |
var Og = Array.isArray; | |
function Pg(s, o, _) { | |
if ( | |
((s = _.ref), | |
s !== null && typeof s != "function" && typeof s != "object") | |
) { | |
if (_._owner) { | |
if (((_ = _._owner), _)) { | |
if (_.tag !== 1) throw Error(u$e(309)); | |
var _e = _.stateNode; | |
} | |
if (!_e) throw Error(u$e(147, s)); | |
var et = "" + s; | |
return o !== null && | |
o.ref !== null && | |
typeof o.ref == "function" && | |
o.ref._stringRef === et | |
? o.ref | |
: ((o = function (tt) { | |
var rt = _e.refs; | |
rt === Eg && (rt = _e.refs = {}), | |
tt === null ? delete rt[et] : (rt[et] = tt); | |
}), | |
(o._stringRef = et), | |
o); | |
} | |
if (typeof s != "string") throw Error(u$e(284)); | |
if (!_._owner) throw Error(u$e(290, s)); | |
} | |
return s; | |
} | |
function Qg(s, o) { | |
if (s.type !== "textarea") | |
throw Error( | |
u$e( | |
31, | |
Object.prototype.toString.call(o) === "[object Object]" | |
? "object with keys {" + Object.keys(o).join(", ") + "}" | |
: o, | |
"", | |
), | |
); | |
} | |
function Rg(s) { | |
function o($t, Et) { | |
if (s) { | |
var _t = $t.lastEffect; | |
_t !== null | |
? ((_t.nextEffect = Et), ($t.lastEffect = Et)) | |
: ($t.firstEffect = $t.lastEffect = Et), | |
(Et.nextEffect = null), | |
(Et.effectTag = 8); | |
} | |
} | |
function _($t, Et) { | |
if (!s) return null; | |
for (; Et !== null; ) o($t, Et), (Et = Et.sibling); | |
return null; | |
} | |
function _e($t, Et) { | |
for ($t = new Map(); Et !== null; ) | |
Et.key !== null ? $t.set(Et.key, Et) : $t.set(Et.index, Et), | |
(Et = Et.sibling); | |
return $t; | |
} | |
function et($t, Et) { | |
return ($t = Sg($t, Et)), ($t.index = 0), ($t.sibling = null), $t; | |
} | |
function tt($t, Et, _t) { | |
return ( | |
($t.index = _t), | |
s | |
? ((_t = $t.alternate), | |
_t !== null | |
? ((_t = _t.index), _t < Et ? (($t.effectTag = 2), Et) : _t) | |
: (($t.effectTag = 2), Et)) | |
: Et | |
); | |
} | |
function rt($t) { | |
return s && $t.alternate === null && ($t.effectTag = 2), $t; | |
} | |
function it($t, Et, _t, Rt) { | |
return Et === null || Et.tag !== 6 | |
? ((Et = Tg(_t, $t.mode, Rt)), (Et.return = $t), Et) | |
: ((Et = et(Et, _t)), (Et.return = $t), Et); | |
} | |
function ot($t, Et, _t, Rt) { | |
return Et !== null && Et.elementType === _t.type | |
? ((Rt = et(Et, _t.props)), | |
(Rt.ref = Pg($t, Et, _t)), | |
(Rt.return = $t), | |
Rt) | |
: ((Rt = Ug(_t.type, _t.key, _t.props, null, $t.mode, Rt)), | |
(Rt.ref = Pg($t, Et, _t)), | |
(Rt.return = $t), | |
Rt); | |
} | |
function ct($t, Et, _t, Rt) { | |
return Et === null || | |
Et.tag !== 4 || | |
Et.stateNode.containerInfo !== _t.containerInfo || | |
Et.stateNode.implementation !== _t.implementation | |
? ((Et = Vg(_t, $t.mode, Rt)), (Et.return = $t), Et) | |
: ((Et = et(Et, _t.children || [])), (Et.return = $t), Et); | |
} | |
function at($t, Et, _t, Rt, Mt) { | |
return Et === null || Et.tag !== 7 | |
? ((Et = Wg(_t, $t.mode, Rt, Mt)), (Et.return = $t), Et) | |
: ((Et = et(Et, _t)), (Et.return = $t), Et); | |
} | |
function ht($t, Et, _t) { | |
if (typeof Et == "string" || typeof Et == "number") | |
return (Et = Tg("" + Et, $t.mode, _t)), (Et.return = $t), Et; | |
if (typeof Et == "object" && Et !== null) { | |
switch (Et.$$typeof) { | |
case Za: | |
return ( | |
(_t = Ug(Et.type, Et.key, Et.props, null, $t.mode, _t)), | |
(_t.ref = Pg($t, null, Et)), | |
(_t.return = $t), | |
_t | |
); | |
case $a: | |
return (Et = Vg(Et, $t.mode, _t)), (Et.return = $t), Et; | |
} | |
if (Og(Et) || nb(Et)) | |
return (Et = Wg(Et, $t.mode, _t, null)), (Et.return = $t), Et; | |
Qg($t, Et); | |
} | |
return null; | |
} | |
function mt($t, Et, _t, Rt) { | |
var Mt = Et !== null ? Et.key : null; | |
if (typeof _t == "string" || typeof _t == "number") | |
return Mt !== null ? null : it($t, Et, "" + _t, Rt); | |
if (typeof _t == "object" && _t !== null) { | |
switch (_t.$$typeof) { | |
case Za: | |
return _t.key === Mt | |
? _t.type === ab | |
? at($t, Et, _t.props.children, Rt, Mt) | |
: ot($t, Et, _t, Rt) | |
: null; | |
case $a: | |
return _t.key === Mt ? ct($t, Et, _t, Rt) : null; | |
} | |
if (Og(_t) || nb(_t)) | |
return Mt !== null ? null : at($t, Et, _t, Rt, null); | |
Qg($t, _t); | |
} | |
return null; | |
} | |
function vt($t, Et, _t, Rt, Mt) { | |
if (typeof Rt == "string" || typeof Rt == "number") | |
return ($t = $t.get(_t) || null), it(Et, $t, "" + Rt, Mt); | |
if (typeof Rt == "object" && Rt !== null) { | |
switch (Rt.$$typeof) { | |
case Za: | |
return ( | |
($t = $t.get(Rt.key === null ? _t : Rt.key) || null), | |
Rt.type === ab | |
? at(Et, $t, Rt.props.children, Mt, Rt.key) | |
: ot(Et, $t, Rt, Mt) | |
); | |
case $a: | |
return ( | |
($t = $t.get(Rt.key === null ? _t : Rt.key) || null), | |
ct(Et, $t, Rt, Mt) | |
); | |
} | |
if (Og(Rt) || nb(Rt)) | |
return ($t = $t.get(_t) || null), at(Et, $t, Rt, Mt, null); | |
Qg(Et, Rt); | |
} | |
return null; | |
} | |
function xt($t, Et, _t, Rt) { | |
for ( | |
var Mt = null, It = null, Xt = Et, Jt = (Et = 0), Ht = null; | |
Xt !== null && Jt < _t.length; | |
Jt++ | |
) { | |
Xt.index > Jt ? ((Ht = Xt), (Xt = null)) : (Ht = Xt.sibling); | |
var qt = mt($t, Xt, _t[Jt], Rt); | |
if (qt === null) { | |
Xt === null && (Xt = Ht); | |
break; | |
} | |
s && Xt && qt.alternate === null && o($t, Xt), | |
(Et = tt(qt, Et, Jt)), | |
It === null ? (Mt = qt) : (It.sibling = qt), | |
(It = qt), | |
(Xt = Ht); | |
} | |
if (Jt === _t.length) return _($t, Xt), Mt; | |
if (Xt === null) { | |
for (; Jt < _t.length; Jt++) | |
(Xt = ht($t, _t[Jt], Rt)), | |
Xt !== null && | |
((Et = tt(Xt, Et, Jt)), | |
It === null ? (Mt = Xt) : (It.sibling = Xt), | |
(It = Xt)); | |
return Mt; | |
} | |
for (Xt = _e($t, Xt); Jt < _t.length; Jt++) | |
(Ht = vt(Xt, $t, Jt, _t[Jt], Rt)), | |
Ht !== null && | |
(s && | |
Ht.alternate !== null && | |
Xt.delete(Ht.key === null ? Jt : Ht.key), | |
(Et = tt(Ht, Et, Jt)), | |
It === null ? (Mt = Ht) : (It.sibling = Ht), | |
(It = Ht)); | |
return ( | |
s && | |
Xt.forEach(function (nr) { | |
return o($t, nr); | |
}), | |
Mt | |
); | |
} | |
function St($t, Et, _t, Rt) { | |
var Mt = nb(_t); | |
if (typeof Mt != "function") throw Error(u$e(150)); | |
if (((_t = Mt.call(_t)), _t == null)) throw Error(u$e(151)); | |
for ( | |
var It = (Mt = null), Xt = Et, Jt = (Et = 0), Ht = null, qt = _t.next(); | |
Xt !== null && !qt.done; | |
Jt++, qt = _t.next() | |
) { | |
Xt.index > Jt ? ((Ht = Xt), (Xt = null)) : (Ht = Xt.sibling); | |
var nr = mt($t, Xt, qt.value, Rt); | |
if (nr === null) { | |
Xt === null && (Xt = Ht); | |
break; | |
} | |
s && Xt && nr.alternate === null && o($t, Xt), | |
(Et = tt(nr, Et, Jt)), | |
It === null ? (Mt = nr) : (It.sibling = nr), | |
(It = nr), | |
(Xt = Ht); | |
} | |
if (qt.done) return _($t, Xt), Mt; | |
if (Xt === null) { | |
for (; !qt.done; Jt++, qt = _t.next()) | |
(qt = ht($t, qt.value, Rt)), | |
qt !== null && | |
((Et = tt(qt, Et, Jt)), | |
It === null ? (Mt = qt) : (It.sibling = qt), | |
(It = qt)); | |
return Mt; | |
} | |
for (Xt = _e($t, Xt); !qt.done; Jt++, qt = _t.next()) | |
(qt = vt(Xt, $t, Jt, qt.value, Rt)), | |
qt !== null && | |
(s && | |
qt.alternate !== null && | |
Xt.delete(qt.key === null ? Jt : qt.key), | |
(Et = tt(qt, Et, Jt)), | |
It === null ? (Mt = qt) : (It.sibling = qt), | |
(It = qt)); | |
return ( | |
s && | |
Xt.forEach(function (wt) { | |
return o($t, wt); | |
}), | |
Mt | |
); | |
} | |
return function ($t, Et, _t, Rt) { | |
var Mt = | |
typeof _t == "object" && | |
_t !== null && | |
_t.type === ab && | |
_t.key === null; | |
Mt && (_t = _t.props.children); | |
var It = typeof _t == "object" && _t !== null; | |
if (It) | |
switch (_t.$$typeof) { | |
case Za: | |
e: { | |
for (It = _t.key, Mt = Et; Mt !== null; ) { | |
if (Mt.key === It) { | |
switch (Mt.tag) { | |
case 7: | |
if (_t.type === ab) { | |
_($t, Mt.sibling), | |
(Et = et(Mt, _t.props.children)), | |
(Et.return = $t), | |
($t = Et); | |
break e; | |
} | |
break; | |
default: | |
if (Mt.elementType === _t.type) { | |
_($t, Mt.sibling), | |
(Et = et(Mt, _t.props)), | |
(Et.ref = Pg($t, Mt, _t)), | |
(Et.return = $t), | |
($t = Et); | |
break e; | |
} | |
} | |
_($t, Mt); | |
break; | |
} else o($t, Mt); | |
Mt = Mt.sibling; | |
} | |
_t.type === ab | |
? ((Et = Wg(_t.props.children, $t.mode, Rt, _t.key)), | |
(Et.return = $t), | |
($t = Et)) | |
: ((Rt = Ug(_t.type, _t.key, _t.props, null, $t.mode, Rt)), | |
(Rt.ref = Pg($t, Et, _t)), | |
(Rt.return = $t), | |
($t = Rt)); | |
} | |
return rt($t); | |
case $a: | |
e: { | |
for (Mt = _t.key; Et !== null; ) { | |
if (Et.key === Mt) | |
if ( | |
Et.tag === 4 && | |
Et.stateNode.containerInfo === _t.containerInfo && | |
Et.stateNode.implementation === _t.implementation | |
) { | |
_($t, Et.sibling), | |
(Et = et(Et, _t.children || [])), | |
(Et.return = $t), | |
($t = Et); | |
break e; | |
} else { | |
_($t, Et); | |
break; | |
} | |
else o($t, Et); | |
Et = Et.sibling; | |
} | |
(Et = Vg(_t, $t.mode, Rt)), (Et.return = $t), ($t = Et); | |
} | |
return rt($t); | |
} | |
if (typeof _t == "string" || typeof _t == "number") | |
return ( | |
(_t = "" + _t), | |
Et !== null && Et.tag === 6 | |
? (_($t, Et.sibling), | |
(Et = et(Et, _t)), | |
(Et.return = $t), | |
($t = Et)) | |
: (_($t, Et), | |
(Et = Tg(_t, $t.mode, Rt)), | |
(Et.return = $t), | |
($t = Et)), | |
rt($t) | |
); | |
if (Og(_t)) return xt($t, Et, _t, Rt); | |
if (nb(_t)) return St($t, Et, _t, Rt); | |
if ((It && Qg($t, _t), typeof _t > "u" && !Mt)) | |
switch ($t.tag) { | |
case 1: | |
case 0: | |
throw ( | |
(($t = $t.type), | |
Error(u$e(152, $t.displayName || $t.name || "Component"))) | |
); | |
} | |
return _($t, Et); | |
}; | |
} | |
var Xg = Rg(!0), | |
Yg = Rg(!1), | |
Zg = {}, | |
$g = { current: Zg }, | |
ah = { current: Zg }, | |
bh = { current: Zg }; | |
function ch(s) { | |
if (s === Zg) throw Error(u$e(174)); | |
return s; | |
} | |
function dh$1(s, o) { | |
switch ((I$2(bh, o), I$2(ah, s), I$2($g, Zg), (s = o.nodeType), s)) { | |
case 9: | |
case 11: | |
o = (o = o.documentElement) ? o.namespaceURI : Ob(null, ""); | |
break; | |
default: | |
(s = s === 8 ? o.parentNode : o), | |
(o = s.namespaceURI || null), | |
(s = s.tagName), | |
(o = Ob(o, s)); | |
} | |
H$2($g), I$2($g, o); | |
} | |
function eh() { | |
H$2($g), H$2(ah), H$2(bh); | |
} | |
function fh(s) { | |
ch(bh.current); | |
var o = ch($g.current), | |
_ = Ob(o, s.type); | |
o !== _ && (I$2(ah, s), I$2($g, _)); | |
} | |
function gh(s) { | |
ah.current === s && (H$2($g), H$2(ah)); | |
} | |
var M = { current: 0 }; | |
function hh(s) { | |
for (var o = s; o !== null; ) { | |
if (o.tag === 13) { | |
var _ = o.memoizedState; | |
if ( | |
_ !== null && | |
((_ = _.dehydrated), _ === null || _.data === Bd || _.data === Cd) | |
) | |
return o; | |
} else if (o.tag === 19 && o.memoizedProps.revealOrder !== void 0) { | |
if (o.effectTag & 64) return o; | |
} else if (o.child !== null) { | |
(o.child.return = o), (o = o.child); | |
continue; | |
} | |
if (o === s) break; | |
for (; o.sibling === null; ) { | |
if (o.return === null || o.return === s) return null; | |
o = o.return; | |
} | |
(o.sibling.return = o.return), (o = o.sibling); | |
} | |
return null; | |
} | |
function ih(s, o) { | |
return { responder: s, props: o }; | |
} | |
var jh = Wa.ReactCurrentDispatcher, | |
kh = Wa.ReactCurrentBatchConfig, | |
lh = 0, | |
N = null, | |
O = null, | |
P = null, | |
mh = !1; | |
function Q$1() { | |
throw Error(u$e(321)); | |
} | |
function nh(s, o) { | |
if (o === null) return !1; | |
for (var _ = 0; _ < o.length && _ < s.length; _++) | |
if (!$e(s[_], o[_])) return !1; | |
return !0; | |
} | |
function oh(s, o, _, _e, et, tt) { | |
if ( | |
((lh = tt), | |
(N = o), | |
(o.memoizedState = null), | |
(o.updateQueue = null), | |
(o.expirationTime = 0), | |
(jh.current = s === null || s.memoizedState === null ? ph : qh), | |
(s = _(_e, et)), | |
o.expirationTime === lh) | |
) { | |
tt = 0; | |
do { | |
if (((o.expirationTime = 0), !(25 > tt))) throw Error(u$e(301)); | |
(tt += 1), | |
(P = O = null), | |
(o.updateQueue = null), | |
(jh.current = rh), | |
(s = _(_e, et)); | |
} while (o.expirationTime === lh); | |
} | |
if ( | |
((jh.current = sh), | |
(o = O !== null && O.next !== null), | |
(lh = 0), | |
(P = O = N = null), | |
(mh = !1), | |
o) | |
) | |
throw Error(u$e(300)); | |
return s; | |
} | |
function th() { | |
var s = { | |
memoizedState: null, | |
baseState: null, | |
baseQueue: null, | |
queue: null, | |
next: null, | |
}; | |
return P === null ? (N.memoizedState = P = s) : (P = P.next = s), P; | |
} | |
function uh() { | |
if (O === null) { | |
var s = N.alternate; | |
s = s !== null ? s.memoizedState : null; | |
} else s = O.next; | |
var o = P === null ? N.memoizedState : P.next; | |
if (o !== null) (P = o), (O = s); | |
else { | |
if (s === null) throw Error(u$e(310)); | |
(O = s), | |
(s = { | |
memoizedState: O.memoizedState, | |
baseState: O.baseState, | |
baseQueue: O.baseQueue, | |
queue: O.queue, | |
next: null, | |
}), | |
P === null ? (N.memoizedState = P = s) : (P = P.next = s); | |
} | |
return P; | |
} | |
function vh(s, o) { | |
return typeof o == "function" ? o(s) : o; | |
} | |
function wh(s) { | |
var o = uh(), | |
_ = o.queue; | |
if (_ === null) throw Error(u$e(311)); | |
_.lastRenderedReducer = s; | |
var _e = O, | |
et = _e.baseQueue, | |
tt = _.pending; | |
if (tt !== null) { | |
if (et !== null) { | |
var rt = et.next; | |
(et.next = tt.next), (tt.next = rt); | |
} | |
(_e.baseQueue = et = tt), (_.pending = null); | |
} | |
if (et !== null) { | |
(et = et.next), (_e = _e.baseState); | |
var it = (rt = tt = null), | |
ot = et; | |
do { | |
var ct = ot.expirationTime; | |
if (ct < lh) { | |
var at = { | |
expirationTime: ot.expirationTime, | |
suspenseConfig: ot.suspenseConfig, | |
action: ot.action, | |
eagerReducer: ot.eagerReducer, | |
eagerState: ot.eagerState, | |
next: null, | |
}; | |
it === null ? ((rt = it = at), (tt = _e)) : (it = it.next = at), | |
ct > N.expirationTime && ((N.expirationTime = ct), Bg(ct)); | |
} else | |
it !== null && | |
(it = it.next = | |
{ | |
expirationTime: 1073741823, | |
suspenseConfig: ot.suspenseConfig, | |
action: ot.action, | |
eagerReducer: ot.eagerReducer, | |
eagerState: ot.eagerState, | |
next: null, | |
}), | |
Ag(ct, ot.suspenseConfig), | |
(_e = ot.eagerReducer === s ? ot.eagerState : s(_e, ot.action)); | |
ot = ot.next; | |
} while (ot !== null && ot !== et); | |
it === null ? (tt = _e) : (it.next = rt), | |
$e(_e, o.memoizedState) || (rg = !0), | |
(o.memoizedState = _e), | |
(o.baseState = tt), | |
(o.baseQueue = it), | |
(_.lastRenderedState = _e); | |
} | |
return [o.memoizedState, _.dispatch]; | |
} | |
function xh(s) { | |
var o = uh(), | |
_ = o.queue; | |
if (_ === null) throw Error(u$e(311)); | |
_.lastRenderedReducer = s; | |
var _e = _.dispatch, | |
et = _.pending, | |
tt = o.memoizedState; | |
if (et !== null) { | |
_.pending = null; | |
var rt = (et = et.next); | |
do (tt = s(tt, rt.action)), (rt = rt.next); | |
while (rt !== et); | |
$e(tt, o.memoizedState) || (rg = !0), | |
(o.memoizedState = tt), | |
o.baseQueue === null && (o.baseState = tt), | |
(_.lastRenderedState = tt); | |
} | |
return [tt, _e]; | |
} | |
function yh(s) { | |
var o = th(); | |
return ( | |
typeof s == "function" && (s = s()), | |
(o.memoizedState = o.baseState = s), | |
(s = o.queue = | |
{ | |
pending: null, | |
dispatch: null, | |
lastRenderedReducer: vh, | |
lastRenderedState: s, | |
}), | |
(s = s.dispatch = zh.bind(null, N, s)), | |
[o.memoizedState, s] | |
); | |
} | |
function Ah(s, o, _, _e) { | |
return ( | |
(s = { tag: s, create: o, destroy: _, deps: _e, next: null }), | |
(o = N.updateQueue), | |
o === null | |
? ((o = { lastEffect: null }), | |
(N.updateQueue = o), | |
(o.lastEffect = s.next = s)) | |
: ((_ = o.lastEffect), | |
_ === null | |
? (o.lastEffect = s.next = s) | |
: ((_e = _.next), (_.next = s), (s.next = _e), (o.lastEffect = s))), | |
s | |
); | |
} | |
function Bh() { | |
return uh().memoizedState; | |
} | |
function Ch(s, o, _, _e) { | |
var et = th(); | |
(N.effectTag |= s), | |
(et.memoizedState = Ah(1 | o, _, void 0, _e === void 0 ? null : _e)); | |
} | |
function Dh(s, o, _, _e) { | |
var et = uh(); | |
_e = _e === void 0 ? null : _e; | |
var tt = void 0; | |
if (O !== null) { | |
var rt = O.memoizedState; | |
if (((tt = rt.destroy), _e !== null && nh(_e, rt.deps))) { | |
Ah(o, _, tt, _e); | |
return; | |
} | |
} | |
(N.effectTag |= s), (et.memoizedState = Ah(1 | o, _, tt, _e)); | |
} | |
function Eh(s, o) { | |
return Ch(516, 4, s, o); | |
} | |
function Fh(s, o) { | |
return Dh(516, 4, s, o); | |
} | |
function Gh(s, o) { | |
return Dh(4, 2, s, o); | |
} | |
function Hh(s, o) { | |
if (typeof o == "function") | |
return ( | |
(s = s()), | |
o(s), | |
function () { | |
o(null); | |
} | |
); | |
if (o != null) | |
return ( | |
(s = s()), | |
(o.current = s), | |
function () { | |
o.current = null; | |
} | |
); | |
} | |
function Ih(s, o, _) { | |
return ( | |
(_ = _ != null ? _.concat([s]) : null), Dh(4, 2, Hh.bind(null, o, s), _) | |
); | |
} | |
function Jh() {} | |
function Kh(s, o) { | |
return (th().memoizedState = [s, o === void 0 ? null : o]), s; | |
} | |
function Lh(s, o) { | |
var _ = uh(); | |
o = o === void 0 ? null : o; | |
var _e = _.memoizedState; | |
return _e !== null && o !== null && nh(o, _e[1]) | |
? _e[0] | |
: ((_.memoizedState = [s, o]), s); | |
} | |
function Mh(s, o) { | |
var _ = uh(); | |
o = o === void 0 ? null : o; | |
var _e = _.memoizedState; | |
return _e !== null && o !== null && nh(o, _e[1]) | |
? _e[0] | |
: ((s = s()), (_.memoizedState = [s, o]), s); | |
} | |
function Nh(s, o, _) { | |
var _e = ag(); | |
cg(98 > _e ? 98 : _e, function () { | |
s(!0); | |
}), | |
cg(97 < _e ? 97 : _e, function () { | |
var et = kh.suspense; | |
kh.suspense = o === void 0 ? null : o; | |
try { | |
s(!1), _(); | |
} finally { | |
kh.suspense = et; | |
} | |
}); | |
} | |
function zh(s, o, _) { | |
var _e = Gg(), | |
et = Dg.suspense; | |
(_e = Hg(_e, s, et)), | |
(et = { | |
expirationTime: _e, | |
suspenseConfig: et, | |
action: _, | |
eagerReducer: null, | |
eagerState: null, | |
next: null, | |
}); | |
var tt = o.pending; | |
if ( | |
(tt === null ? (et.next = et) : ((et.next = tt.next), (tt.next = et)), | |
(o.pending = et), | |
(tt = s.alternate), | |
s === N || (tt !== null && tt === N)) | |
) | |
(mh = !0), (et.expirationTime = lh), (N.expirationTime = lh); | |
else { | |
if ( | |
s.expirationTime === 0 && | |
(tt === null || tt.expirationTime === 0) && | |
((tt = o.lastRenderedReducer), tt !== null) | |
) | |
try { | |
var rt = o.lastRenderedState, | |
it = tt(rt, _); | |
if (((et.eagerReducer = tt), (et.eagerState = it), $e(it, rt))) | |
return; | |
} catch { | |
} finally { | |
} | |
Ig(s, _e); | |
} | |
} | |
var sh = { | |
readContext: sg, | |
useCallback: Q$1, | |
useContext: Q$1, | |
useEffect: Q$1, | |
useImperativeHandle: Q$1, | |
useLayoutEffect: Q$1, | |
useMemo: Q$1, | |
useReducer: Q$1, | |
useRef: Q$1, | |
useState: Q$1, | |
useDebugValue: Q$1, | |
useResponder: Q$1, | |
useDeferredValue: Q$1, | |
useTransition: Q$1, | |
}, | |
ph = { | |
readContext: sg, | |
useCallback: Kh, | |
useContext: sg, | |
useEffect: Eh, | |
useImperativeHandle: function (s, o, _) { | |
return ( | |
(_ = _ != null ? _.concat([s]) : null), | |
Ch(4, 2, Hh.bind(null, o, s), _) | |
); | |
}, | |
useLayoutEffect: function (s, o) { | |
return Ch(4, 2, s, o); | |
}, | |
useMemo: function (s, o) { | |
var _ = th(); | |
return ( | |
(o = o === void 0 ? null : o), | |
(s = s()), | |
(_.memoizedState = [s, o]), | |
s | |
); | |
}, | |
useReducer: function (s, o, _) { | |
var _e = th(); | |
return ( | |
(o = _ !== void 0 ? _(o) : o), | |
(_e.memoizedState = _e.baseState = o), | |
(s = _e.queue = | |
{ | |
pending: null, | |
dispatch: null, | |
lastRenderedReducer: s, | |
lastRenderedState: o, | |
}), | |
(s = s.dispatch = zh.bind(null, N, s)), | |
[_e.memoizedState, s] | |
); | |
}, | |
useRef: function (s) { | |
var o = th(); | |
return (s = { current: s }), (o.memoizedState = s); | |
}, | |
useState: yh, | |
useDebugValue: Jh, | |
useResponder: ih, | |
useDeferredValue: function (s, o) { | |
var _ = yh(s), | |
_e = _[0], | |
et = _[1]; | |
return ( | |
Eh( | |
function () { | |
var tt = kh.suspense; | |
kh.suspense = o === void 0 ? null : o; | |
try { | |
et(s); | |
} finally { | |
kh.suspense = tt; | |
} | |
}, | |
[s, o], | |
), | |
_e | |
); | |
}, | |
useTransition: function (s) { | |
var o = yh(!1), | |
_ = o[0]; | |
return (o = o[1]), [Kh(Nh.bind(null, o, s), [o, s]), _]; | |
}, | |
}, | |
qh = { | |
readContext: sg, | |
useCallback: Lh, | |
useContext: sg, | |
useEffect: Fh, | |
useImperativeHandle: Ih, | |
useLayoutEffect: Gh, | |
useMemo: Mh, | |
useReducer: wh, | |
useRef: Bh, | |
useState: function () { | |
return wh(vh); | |
}, | |
useDebugValue: Jh, | |
useResponder: ih, | |
useDeferredValue: function (s, o) { | |
var _ = wh(vh), | |
_e = _[0], | |
et = _[1]; | |
return ( | |
Fh( | |
function () { | |
var tt = kh.suspense; | |
kh.suspense = o === void 0 ? null : o; | |
try { | |
et(s); | |
} finally { | |
kh.suspense = tt; | |
} | |
}, | |
[s, o], | |
), | |
_e | |
); | |
}, | |
useTransition: function (s) { | |
var o = wh(vh), | |
_ = o[0]; | |
return (o = o[1]), [Lh(Nh.bind(null, o, s), [o, s]), _]; | |
}, | |
}, | |
rh = { | |
readContext: sg, | |
useCallback: Lh, | |
useContext: sg, | |
useEffect: Fh, | |
useImperativeHandle: Ih, | |
useLayoutEffect: Gh, | |
useMemo: Mh, | |
useReducer: xh, | |
useRef: Bh, | |
useState: function () { | |
return xh(vh); | |
}, | |
useDebugValue: Jh, | |
useResponder: ih, | |
useDeferredValue: function (s, o) { | |
var _ = xh(vh), | |
_e = _[0], | |
et = _[1]; | |
return ( | |
Fh( | |
function () { | |
var tt = kh.suspense; | |
kh.suspense = o === void 0 ? null : o; | |
try { | |
et(s); | |
} finally { | |
kh.suspense = tt; | |
} | |
}, | |
[s, o], | |
), | |
_e | |
); | |
}, | |
useTransition: function (s) { | |
var o = xh(vh), | |
_ = o[0]; | |
return (o = o[1]), [Lh(Nh.bind(null, o, s), [o, s]), _]; | |
}, | |
}, | |
Oh = null, | |
Ph = null, | |
Qh = !1; | |
function Rh(s, o) { | |
var _ = Sh(5, null, null, 0); | |
(_.elementType = "DELETED"), | |
(_.type = "DELETED"), | |
(_.stateNode = o), | |
(_.return = s), | |
(_.effectTag = 8), | |
s.lastEffect !== null | |
? ((s.lastEffect.nextEffect = _), (s.lastEffect = _)) | |
: (s.firstEffect = s.lastEffect = _); | |
} | |
function Th(s, o) { | |
switch (s.tag) { | |
case 5: | |
var _ = s.type; | |
return ( | |
(o = | |
o.nodeType !== 1 || _.toLowerCase() !== o.nodeName.toLowerCase() | |
? null | |
: o), | |
o !== null ? ((s.stateNode = o), !0) : !1 | |
); | |
case 6: | |
return ( | |
(o = s.pendingProps === "" || o.nodeType !== 3 ? null : o), | |
o !== null ? ((s.stateNode = o), !0) : !1 | |
); | |
case 13: | |
return !1; | |
default: | |
return !1; | |
} | |
} | |
function Uh(s) { | |
if (Qh) { | |
var o = Ph; | |
if (o) { | |
var _ = o; | |
if (!Th(s, o)) { | |
if (((o = Jd(_.nextSibling)), !o || !Th(s, o))) { | |
(s.effectTag = (s.effectTag & -1025) | 2), (Qh = !1), (Oh = s); | |
return; | |
} | |
Rh(Oh, _); | |
} | |
(Oh = s), (Ph = Jd(o.firstChild)); | |
} else (s.effectTag = (s.effectTag & -1025) | 2), (Qh = !1), (Oh = s); | |
} | |
} | |
function Vh(s) { | |
for ( | |
s = s.return; | |
s !== null && s.tag !== 5 && s.tag !== 3 && s.tag !== 13; | |
) | |
s = s.return; | |
Oh = s; | |
} | |
function Wh(s) { | |
if (s !== Oh) return !1; | |
if (!Qh) return Vh(s), (Qh = !0), !1; | |
var o = s.type; | |
if ( | |
s.tag !== 5 || | |
(o !== "head" && o !== "body" && !Gd(o, s.memoizedProps)) | |
) | |
for (o = Ph; o; ) Rh(s, o), (o = Jd(o.nextSibling)); | |
if ((Vh(s), s.tag === 13)) { | |
if (((s = s.memoizedState), (s = s !== null ? s.dehydrated : null), !s)) | |
throw Error(u$e(317)); | |
e: { | |
for (s = s.nextSibling, o = 0; s; ) { | |
if (s.nodeType === 8) { | |
var _ = s.data; | |
if (_ === Ad) { | |
if (o === 0) { | |
Ph = Jd(s.nextSibling); | |
break e; | |
} | |
o--; | |
} else (_ !== zd && _ !== Cd && _ !== Bd) || o++; | |
} | |
s = s.nextSibling; | |
} | |
Ph = null; | |
} | |
} else Ph = Oh ? Jd(s.stateNode.nextSibling) : null; | |
return !0; | |
} | |
function Xh() { | |
(Ph = Oh = null), (Qh = !1); | |
} | |
var Yh = Wa.ReactCurrentOwner, | |
rg = !1; | |
function R$2(s, o, _, _e) { | |
o.child = s === null ? Yg(o, null, _, _e) : Xg(o, s.child, _, _e); | |
} | |
function Zh(s, o, _, _e, et) { | |
_ = _.render; | |
var tt = o.ref; | |
return ( | |
qg(o, et), | |
(_e = oh(s, o, _, _e, tt, et)), | |
s !== null && !rg | |
? ((o.updateQueue = s.updateQueue), | |
(o.effectTag &= -517), | |
s.expirationTime <= et && (s.expirationTime = 0), | |
$h(s, o, et)) | |
: ((o.effectTag |= 1), R$2(s, o, _e, et), o.child) | |
); | |
} | |
function ai(s, o, _, _e, et, tt) { | |
if (s === null) { | |
var rt = _.type; | |
return typeof rt == "function" && | |
!bi(rt) && | |
rt.defaultProps === void 0 && | |
_.compare === null && | |
_.defaultProps === void 0 | |
? ((o.tag = 15), (o.type = rt), ci(s, o, rt, _e, et, tt)) | |
: ((s = Ug(_.type, null, _e, null, o.mode, tt)), | |
(s.ref = o.ref), | |
(s.return = o), | |
(o.child = s)); | |
} | |
return ( | |
(rt = s.child), | |
et < tt && | |
((et = rt.memoizedProps), | |
(_ = _.compare), | |
(_ = _ !== null ? _ : bf), | |
_(et, _e) && s.ref === o.ref) | |
? $h(s, o, tt) | |
: ((o.effectTag |= 1), | |
(s = Sg(rt, _e)), | |
(s.ref = o.ref), | |
(s.return = o), | |
(o.child = s)) | |
); | |
} | |
function ci(s, o, _, _e, et, tt) { | |
return s !== null && | |
bf(s.memoizedProps, _e) && | |
s.ref === o.ref && | |
((rg = !1), et < tt) | |
? ((o.expirationTime = s.expirationTime), $h(s, o, tt)) | |
: di(s, o, _, _e, tt); | |
} | |
function ei(s, o) { | |
var _ = o.ref; | |
((s === null && _ !== null) || (s !== null && s.ref !== _)) && | |
(o.effectTag |= 128); | |
} | |
function di(s, o, _, _e, et) { | |
var tt = L$2(_) ? Bf : J$1.current; | |
return ( | |
(tt = Cf(o, tt)), | |
qg(o, et), | |
(_ = oh(s, o, _, _e, tt, et)), | |
s !== null && !rg | |
? ((o.updateQueue = s.updateQueue), | |
(o.effectTag &= -517), | |
s.expirationTime <= et && (s.expirationTime = 0), | |
$h(s, o, et)) | |
: ((o.effectTag |= 1), R$2(s, o, _, et), o.child) | |
); | |
} | |
function fi(s, o, _, _e, et) { | |
if (L$2(_)) { | |
var tt = !0; | |
Gf(o); | |
} else tt = !1; | |
if ((qg(o, et), o.stateNode === null)) | |
s !== null && | |
((s.alternate = null), (o.alternate = null), (o.effectTag |= 2)), | |
Lg(o, _, _e), | |
Ng(o, _, _e, et), | |
(_e = !0); | |
else if (s === null) { | |
var rt = o.stateNode, | |
it = o.memoizedProps; | |
rt.props = it; | |
var ot = rt.context, | |
ct = _.contextType; | |
typeof ct == "object" && ct !== null | |
? (ct = sg(ct)) | |
: ((ct = L$2(_) ? Bf : J$1.current), (ct = Cf(o, ct))); | |
var at = _.getDerivedStateFromProps, | |
ht = | |
typeof at == "function" || | |
typeof rt.getSnapshotBeforeUpdate == "function"; | |
ht || | |
(typeof rt.UNSAFE_componentWillReceiveProps != "function" && | |
typeof rt.componentWillReceiveProps != "function") || | |
((it !== _e || ot !== ct) && Mg(o, rt, _e, ct)), | |
(tg = !1); | |
var mt = o.memoizedState; | |
(rt.state = mt), | |
zg(o, _e, rt, et), | |
(ot = o.memoizedState), | |
it !== _e || mt !== ot || K$1.current || tg | |
? (typeof at == "function" && | |
(Fg(o, _, at, _e), (ot = o.memoizedState)), | |
(it = tg || Kg(o, _, it, _e, mt, ot, ct)) | |
? (ht || | |
(typeof rt.UNSAFE_componentWillMount != "function" && | |
typeof rt.componentWillMount != "function") || | |
(typeof rt.componentWillMount == "function" && | |
rt.componentWillMount(), | |
typeof rt.UNSAFE_componentWillMount == "function" && | |
rt.UNSAFE_componentWillMount()), | |
typeof rt.componentDidMount == "function" && (o.effectTag |= 4)) | |
: (typeof rt.componentDidMount == "function" && | |
(o.effectTag |= 4), | |
(o.memoizedProps = _e), | |
(o.memoizedState = ot)), | |
(rt.props = _e), | |
(rt.state = ot), | |
(rt.context = ct), | |
(_e = it)) | |
: (typeof rt.componentDidMount == "function" && (o.effectTag |= 4), | |
(_e = !1)); | |
} else | |
(rt = o.stateNode), | |
vg(s, o), | |
(it = o.memoizedProps), | |
(rt.props = o.type === o.elementType ? it : ig(o.type, it)), | |
(ot = rt.context), | |
(ct = _.contextType), | |
typeof ct == "object" && ct !== null | |
? (ct = sg(ct)) | |
: ((ct = L$2(_) ? Bf : J$1.current), (ct = Cf(o, ct))), | |
(at = _.getDerivedStateFromProps), | |
(ht = | |
typeof at == "function" || | |
typeof rt.getSnapshotBeforeUpdate == "function") || | |
(typeof rt.UNSAFE_componentWillReceiveProps != "function" && | |
typeof rt.componentWillReceiveProps != "function") || | |
((it !== _e || ot !== ct) && Mg(o, rt, _e, ct)), | |
(tg = !1), | |
(ot = o.memoizedState), | |
(rt.state = ot), | |
zg(o, _e, rt, et), | |
(mt = o.memoizedState), | |
it !== _e || ot !== mt || K$1.current || tg | |
? (typeof at == "function" && | |
(Fg(o, _, at, _e), (mt = o.memoizedState)), | |
(at = tg || Kg(o, _, it, _e, ot, mt, ct)) | |
? (ht || | |
(typeof rt.UNSAFE_componentWillUpdate != "function" && | |
typeof rt.componentWillUpdate != "function") || | |
(typeof rt.componentWillUpdate == "function" && | |
rt.componentWillUpdate(_e, mt, ct), | |
typeof rt.UNSAFE_componentWillUpdate == "function" && | |
rt.UNSAFE_componentWillUpdate(_e, mt, ct)), | |
typeof rt.componentDidUpdate == "function" && | |
(o.effectTag |= 4), | |
typeof rt.getSnapshotBeforeUpdate == "function" && | |
(o.effectTag |= 256)) | |
: (typeof rt.componentDidUpdate != "function" || | |
(it === s.memoizedProps && ot === s.memoizedState) || | |
(o.effectTag |= 4), | |
typeof rt.getSnapshotBeforeUpdate != "function" || | |
(it === s.memoizedProps && ot === s.memoizedState) || | |
(o.effectTag |= 256), | |
(o.memoizedProps = _e), | |
(o.memoizedState = mt)), | |
(rt.props = _e), | |
(rt.state = mt), | |
(rt.context = ct), | |
(_e = at)) | |
: (typeof rt.componentDidUpdate != "function" || | |
(it === s.memoizedProps && ot === s.memoizedState) || | |
(o.effectTag |= 4), | |
typeof rt.getSnapshotBeforeUpdate != "function" || | |
(it === s.memoizedProps && ot === s.memoizedState) || | |
(o.effectTag |= 256), | |
(_e = !1)); | |
return gi(s, o, _, _e, tt, et); | |
} | |
function gi(s, o, _, _e, et, tt) { | |
ei(s, o); | |
var rt = (o.effectTag & 64) !== 0; | |
if (!_e && !rt) return et && Hf(o, _, !1), $h(s, o, tt); | |
(_e = o.stateNode), (Yh.current = o); | |
var it = | |
rt && typeof _.getDerivedStateFromError != "function" | |
? null | |
: _e.render(); | |
return ( | |
(o.effectTag |= 1), | |
s !== null && rt | |
? ((o.child = Xg(o, s.child, null, tt)), | |
(o.child = Xg(o, null, it, tt))) | |
: R$2(s, o, it, tt), | |
(o.memoizedState = _e.state), | |
et && Hf(o, _, !0), | |
o.child | |
); | |
} | |
function hi(s) { | |
var o = s.stateNode; | |
o.pendingContext | |
? Ef(s, o.pendingContext, o.pendingContext !== o.context) | |
: o.context && Ef(s, o.context, !1), | |
dh$1(s, o.containerInfo); | |
} | |
var ii = { dehydrated: null, retryTime: 0 }; | |
function ji(s, o, _) { | |
var _e = o.mode, | |
et = o.pendingProps, | |
tt = M.current, | |
rt = !1, | |
it; | |
if ( | |
((it = (o.effectTag & 64) !== 0) || | |
(it = (tt & 2) !== 0 && (s === null || s.memoizedState !== null)), | |
it | |
? ((rt = !0), (o.effectTag &= -65)) | |
: (s !== null && s.memoizedState === null) || | |
et.fallback === void 0 || | |
et.unstable_avoidThisFallback === !0 || | |
(tt |= 1), | |
I$2(M, tt & 1), | |
s === null) | |
) { | |
if ((et.fallback !== void 0 && Uh(o), rt)) { | |
if ( | |
((rt = et.fallback), | |
(et = Wg(null, _e, 0, null)), | |
(et.return = o), | |
!(o.mode & 2)) | |
) | |
for ( | |
s = o.memoizedState !== null ? o.child.child : o.child, | |
et.child = s; | |
s !== null; | |
) | |
(s.return = et), (s = s.sibling); | |
return ( | |
(_ = Wg(rt, _e, _, null)), | |
(_.return = o), | |
(et.sibling = _), | |
(o.memoizedState = ii), | |
(o.child = et), | |
_ | |
); | |
} | |
return ( | |
(_e = et.children), | |
(o.memoizedState = null), | |
(o.child = Yg(o, null, _e, _)) | |
); | |
} | |
if (s.memoizedState !== null) { | |
if (((s = s.child), (_e = s.sibling), rt)) { | |
if ( | |
((et = et.fallback), | |
(_ = Sg(s, s.pendingProps)), | |
(_.return = o), | |
!(o.mode & 2) && | |
((rt = o.memoizedState !== null ? o.child.child : o.child), | |
rt !== s.child)) | |
) | |
for (_.child = rt; rt !== null; ) (rt.return = _), (rt = rt.sibling); | |
return ( | |
(_e = Sg(_e, et)), | |
(_e.return = o), | |
(_.sibling = _e), | |
(_.childExpirationTime = 0), | |
(o.memoizedState = ii), | |
(o.child = _), | |
_e | |
); | |
} | |
return ( | |
(_ = Xg(o, s.child, et.children, _)), | |
(o.memoizedState = null), | |
(o.child = _) | |
); | |
} | |
if (((s = s.child), rt)) { | |
if ( | |
((rt = et.fallback), | |
(et = Wg(null, _e, 0, null)), | |
(et.return = o), | |
(et.child = s), | |
s !== null && (s.return = et), | |
!(o.mode & 2)) | |
) | |
for ( | |
s = o.memoizedState !== null ? o.child.child : o.child, et.child = s; | |
s !== null; | |
) | |
(s.return = et), (s = s.sibling); | |
return ( | |
(_ = Wg(rt, _e, _, null)), | |
(_.return = o), | |
(et.sibling = _), | |
(_.effectTag |= 2), | |
(et.childExpirationTime = 0), | |
(o.memoizedState = ii), | |
(o.child = et), | |
_ | |
); | |
} | |
return (o.memoizedState = null), (o.child = Xg(o, s, et.children, _)); | |
} | |
function ki(s, o) { | |
s.expirationTime < o && (s.expirationTime = o); | |
var _ = s.alternate; | |
_ !== null && _.expirationTime < o && (_.expirationTime = o), | |
pg(s.return, o); | |
} | |
function li(s, o, _, _e, et, tt) { | |
var rt = s.memoizedState; | |
rt === null | |
? (s.memoizedState = { | |
isBackwards: o, | |
rendering: null, | |
renderingStartTime: 0, | |
last: _e, | |
tail: _, | |
tailExpiration: 0, | |
tailMode: et, | |
lastEffect: tt, | |
}) | |
: ((rt.isBackwards = o), | |
(rt.rendering = null), | |
(rt.renderingStartTime = 0), | |
(rt.last = _e), | |
(rt.tail = _), | |
(rt.tailExpiration = 0), | |
(rt.tailMode = et), | |
(rt.lastEffect = tt)); | |
} | |
function mi(s, o, _) { | |
var _e = o.pendingProps, | |
et = _e.revealOrder, | |
tt = _e.tail; | |
if ((R$2(s, o, _e.children, _), (_e = M.current), _e & 2)) | |
(_e = (_e & 1) | 2), (o.effectTag |= 64); | |
else { | |
if (s !== null && s.effectTag & 64) | |
e: for (s = o.child; s !== null; ) { | |
if (s.tag === 13) s.memoizedState !== null && ki(s, _); | |
else if (s.tag === 19) ki(s, _); | |
else if (s.child !== null) { | |
(s.child.return = s), (s = s.child); | |
continue; | |
} | |
if (s === o) break e; | |
for (; s.sibling === null; ) { | |
if (s.return === null || s.return === o) break e; | |
s = s.return; | |
} | |
(s.sibling.return = s.return), (s = s.sibling); | |
} | |
_e &= 1; | |
} | |
if ((I$2(M, _e), !(o.mode & 2))) o.memoizedState = null; | |
else | |
switch (et) { | |
case "forwards": | |
for (_ = o.child, et = null; _ !== null; ) | |
(s = _.alternate), | |
s !== null && hh(s) === null && (et = _), | |
(_ = _.sibling); | |
(_ = et), | |
_ === null | |
? ((et = o.child), (o.child = null)) | |
: ((et = _.sibling), (_.sibling = null)), | |
li(o, !1, et, _, tt, o.lastEffect); | |
break; | |
case "backwards": | |
for (_ = null, et = o.child, o.child = null; et !== null; ) { | |
if (((s = et.alternate), s !== null && hh(s) === null)) { | |
o.child = et; | |
break; | |
} | |
(s = et.sibling), (et.sibling = _), (_ = et), (et = s); | |
} | |
li(o, !0, _, null, tt, o.lastEffect); | |
break; | |
case "together": | |
li(o, !1, null, null, void 0, o.lastEffect); | |
break; | |
default: | |
o.memoizedState = null; | |
} | |
return o.child; | |
} | |
function $h(s, o, _) { | |
s !== null && (o.dependencies = s.dependencies); | |
var _e = o.expirationTime; | |
if ((_e !== 0 && Bg(_e), o.childExpirationTime < _)) return null; | |
if (s !== null && o.child !== s.child) throw Error(u$e(153)); | |
if (o.child !== null) { | |
for ( | |
s = o.child, _ = Sg(s, s.pendingProps), o.child = _, _.return = o; | |
s.sibling !== null; | |
) | |
(s = s.sibling), | |
(_ = _.sibling = Sg(s, s.pendingProps)), | |
(_.return = o); | |
_.sibling = null; | |
} | |
return o.child; | |
} | |
var ni, oi, pi, qi; | |
ni = function (s, o) { | |
for (var _ = o.child; _ !== null; ) { | |
if (_.tag === 5 || _.tag === 6) s.appendChild(_.stateNode); | |
else if (_.tag !== 4 && _.child !== null) { | |
(_.child.return = _), (_ = _.child); | |
continue; | |
} | |
if (_ === o) break; | |
for (; _.sibling === null; ) { | |
if (_.return === null || _.return === o) return; | |
_ = _.return; | |
} | |
(_.sibling.return = _.return), (_ = _.sibling); | |
} | |
}; | |
oi = function () {}; | |
pi = function (s, o, _, _e, et) { | |
var tt = s.memoizedProps; | |
if (tt !== _e) { | |
var rt = o.stateNode; | |
switch ((ch($g.current), (s = null), _)) { | |
case "input": | |
(tt = zb(rt, tt)), (_e = zb(rt, _e)), (s = []); | |
break; | |
case "option": | |
(tt = Gb(rt, tt)), (_e = Gb(rt, _e)), (s = []); | |
break; | |
case "select": | |
(tt = n$2({}, tt, { value: void 0 })), | |
(_e = n$2({}, _e, { value: void 0 })), | |
(s = []); | |
break; | |
case "textarea": | |
(tt = Ib(rt, tt)), (_e = Ib(rt, _e)), (s = []); | |
break; | |
default: | |
typeof tt.onClick != "function" && | |
typeof _e.onClick == "function" && | |
(rt.onclick = sd); | |
} | |
od(_, _e); | |
var it, ot; | |
_ = null; | |
for (it in tt) | |
if (!_e.hasOwnProperty(it) && tt.hasOwnProperty(it) && tt[it] != null) | |
if (it === "style") | |
for (ot in ((rt = tt[it]), rt)) | |
rt.hasOwnProperty(ot) && (_ || (_ = {}), (_[ot] = "")); | |
else | |
it !== "dangerouslySetInnerHTML" && | |
it !== "children" && | |
it !== "suppressContentEditableWarning" && | |
it !== "suppressHydrationWarning" && | |
it !== "autoFocus" && | |
(va.hasOwnProperty(it) | |
? s || (s = []) | |
: (s = s || []).push(it, null)); | |
for (it in _e) { | |
var ct = _e[it]; | |
if ( | |
((rt = tt != null ? tt[it] : void 0), | |
_e.hasOwnProperty(it) && ct !== rt && (ct != null || rt != null)) | |
) | |
if (it === "style") | |
if (rt) { | |
for (ot in rt) | |
!rt.hasOwnProperty(ot) || | |
(ct && ct.hasOwnProperty(ot)) || | |
(_ || (_ = {}), (_[ot] = "")); | |
for (ot in ct) | |
ct.hasOwnProperty(ot) && | |
rt[ot] !== ct[ot] && | |
(_ || (_ = {}), (_[ot] = ct[ot])); | |
} else _ || (s || (s = []), s.push(it, _)), (_ = ct); | |
else | |
it === "dangerouslySetInnerHTML" | |
? ((ct = ct ? ct.__html : void 0), | |
(rt = rt ? rt.__html : void 0), | |
ct != null && rt !== ct && (s = s || []).push(it, ct)) | |
: it === "children" | |
? rt === ct || | |
(typeof ct != "string" && typeof ct != "number") || | |
(s = s || []).push(it, "" + ct) | |
: it !== "suppressContentEditableWarning" && | |
it !== "suppressHydrationWarning" && | |
(va.hasOwnProperty(it) | |
? (ct != null && rd(et, it), s || rt === ct || (s = [])) | |
: (s = s || []).push(it, ct)); | |
} | |
_ && (s = s || []).push("style", _), | |
(et = s), | |
(o.updateQueue = et) && (o.effectTag |= 4); | |
} | |
}; | |
qi = function (s, o, _, _e) { | |
_ !== _e && (o.effectTag |= 4); | |
}; | |
function ri(s, o) { | |
switch (s.tailMode) { | |
case "hidden": | |
o = s.tail; | |
for (var _ = null; o !== null; ) | |
o.alternate !== null && (_ = o), (o = o.sibling); | |
_ === null ? (s.tail = null) : (_.sibling = null); | |
break; | |
case "collapsed": | |
_ = s.tail; | |
for (var _e = null; _ !== null; ) | |
_.alternate !== null && (_e = _), (_ = _.sibling); | |
_e === null | |
? o || s.tail === null | |
? (s.tail = null) | |
: (s.tail.sibling = null) | |
: (_e.sibling = null); | |
} | |
} | |
function si(s, o, _) { | |
var _e = o.pendingProps; | |
switch (o.tag) { | |
case 2: | |
case 16: | |
case 15: | |
case 0: | |
case 11: | |
case 7: | |
case 8: | |
case 12: | |
case 9: | |
case 14: | |
return null; | |
case 1: | |
return L$2(o.type) && Df(), null; | |
case 3: | |
return ( | |
eh(), | |
H$2(K$1), | |
H$2(J$1), | |
(_ = o.stateNode), | |
_.pendingContext && | |
((_.context = _.pendingContext), (_.pendingContext = null)), | |
(s !== null && s.child !== null) || !Wh(o) || (o.effectTag |= 4), | |
oi(o), | |
null | |
); | |
case 5: | |
gh(o), (_ = ch(bh.current)); | |
var et = o.type; | |
if (s !== null && o.stateNode != null) | |
pi(s, o, et, _e, _), s.ref !== o.ref && (o.effectTag |= 128); | |
else { | |
if (!_e) { | |
if (o.stateNode === null) throw Error(u$e(166)); | |
return null; | |
} | |
if (((s = ch($g.current)), Wh(o))) { | |
(_e = o.stateNode), (et = o.type); | |
var tt = o.memoizedProps; | |
switch (((_e[Md] = o), (_e[Nd] = tt), et)) { | |
case "iframe": | |
case "object": | |
case "embed": | |
F$1("load", _e); | |
break; | |
case "video": | |
case "audio": | |
for (s = 0; s < ac.length; s++) F$1(ac[s], _e); | |
break; | |
case "source": | |
F$1("error", _e); | |
break; | |
case "img": | |
case "image": | |
case "link": | |
F$1("error", _e), F$1("load", _e); | |
break; | |
case "form": | |
F$1("reset", _e), F$1("submit", _e); | |
break; | |
case "details": | |
F$1("toggle", _e); | |
break; | |
case "input": | |
Ab(_e, tt), F$1("invalid", _e), rd(_, "onChange"); | |
break; | |
case "select": | |
(_e._wrapperState = { wasMultiple: !!tt.multiple }), | |
F$1("invalid", _e), | |
rd(_, "onChange"); | |
break; | |
case "textarea": | |
Jb(_e, tt), F$1("invalid", _e), rd(_, "onChange"); | |
} | |
od(et, tt), (s = null); | |
for (var rt in tt) | |
if (tt.hasOwnProperty(rt)) { | |
var it = tt[rt]; | |
rt === "children" | |
? typeof it == "string" | |
? _e.textContent !== it && (s = ["children", it]) | |
: typeof it == "number" && | |
_e.textContent !== "" + it && | |
(s = ["children", "" + it]) | |
: va.hasOwnProperty(rt) && it != null && rd(_, rt); | |
} | |
switch (et) { | |
case "input": | |
xb(_e), Eb(_e, tt, !0); | |
break; | |
case "textarea": | |
xb(_e), Lb(_e); | |
break; | |
case "select": | |
case "option": | |
break; | |
default: | |
typeof tt.onClick == "function" && (_e.onclick = sd); | |
} | |
(_ = s), (o.updateQueue = _), _ !== null && (o.effectTag |= 4); | |
} else { | |
switch ( | |
((rt = _.nodeType === 9 ? _ : _.ownerDocument), | |
s === qd && (s = Nb(et)), | |
s === qd | |
? et === "script" | |
? ((s = rt.createElement("div")), | |
(s.innerHTML = "<script><\/script>"), | |
(s = s.removeChild(s.firstChild))) | |
: typeof _e.is == "string" | |
? (s = rt.createElement(et, { is: _e.is })) | |
: ((s = rt.createElement(et)), | |
et === "select" && | |
((rt = s), | |
_e.multiple | |
? (rt.multiple = !0) | |
: _e.size && (rt.size = _e.size))) | |
: (s = rt.createElementNS(s, et)), | |
(s[Md] = o), | |
(s[Nd] = _e), | |
ni(s, o, !1, !1), | |
(o.stateNode = s), | |
(rt = pd(et, _e)), | |
et) | |
) { | |
case "iframe": | |
case "object": | |
case "embed": | |
F$1("load", s), (it = _e); | |
break; | |
case "video": | |
case "audio": | |
for (it = 0; it < ac.length; it++) F$1(ac[it], s); | |
it = _e; | |
break; | |
case "source": | |
F$1("error", s), (it = _e); | |
break; | |
case "img": | |
case "image": | |
case "link": | |
F$1("error", s), F$1("load", s), (it = _e); | |
break; | |
case "form": | |
F$1("reset", s), F$1("submit", s), (it = _e); | |
break; | |
case "details": | |
F$1("toggle", s), (it = _e); | |
break; | |
case "input": | |
Ab(s, _e), | |
(it = zb(s, _e)), | |
F$1("invalid", s), | |
rd(_, "onChange"); | |
break; | |
case "option": | |
it = Gb(s, _e); | |
break; | |
case "select": | |
(s._wrapperState = { wasMultiple: !!_e.multiple }), | |
(it = n$2({}, _e, { value: void 0 })), | |
F$1("invalid", s), | |
rd(_, "onChange"); | |
break; | |
case "textarea": | |
Jb(s, _e), | |
(it = Ib(s, _e)), | |
F$1("invalid", s), | |
rd(_, "onChange"); | |
break; | |
default: | |
it = _e; | |
} | |
od(et, it); | |
var ot = it; | |
for (tt in ot) | |
if (ot.hasOwnProperty(tt)) { | |
var ct = ot[tt]; | |
tt === "style" | |
? md(s, ct) | |
: tt === "dangerouslySetInnerHTML" | |
? ((ct = ct ? ct.__html : void 0), ct != null && Qb(s, ct)) | |
: tt === "children" | |
? typeof ct == "string" | |
? (et !== "textarea" || ct !== "") && Rb(s, ct) | |
: typeof ct == "number" && Rb(s, "" + ct) | |
: tt !== "suppressContentEditableWarning" && | |
tt !== "suppressHydrationWarning" && | |
tt !== "autoFocus" && | |
(va.hasOwnProperty(tt) | |
? ct != null && rd(_, tt) | |
: ct != null && Xa(s, tt, ct, rt)); | |
} | |
switch (et) { | |
case "input": | |
xb(s), Eb(s, _e, !1); | |
break; | |
case "textarea": | |
xb(s), Lb(s); | |
break; | |
case "option": | |
_e.value != null && s.setAttribute("value", "" + rb(_e.value)); | |
break; | |
case "select": | |
(s.multiple = !!_e.multiple), | |
(_ = _e.value), | |
_ != null | |
? Hb(s, !!_e.multiple, _, !1) | |
: _e.defaultValue != null && | |
Hb(s, !!_e.multiple, _e.defaultValue, !0); | |
break; | |
default: | |
typeof it.onClick == "function" && (s.onclick = sd); | |
} | |
Fd(et, _e) && (o.effectTag |= 4); | |
} | |
o.ref !== null && (o.effectTag |= 128); | |
} | |
return null; | |
case 6: | |
if (s && o.stateNode != null) qi(s, o, s.memoizedProps, _e); | |
else { | |
if (typeof _e != "string" && o.stateNode === null) | |
throw Error(u$e(166)); | |
(_ = ch(bh.current)), | |
ch($g.current), | |
Wh(o) | |
? ((_ = o.stateNode), | |
(_e = o.memoizedProps), | |
(_[Md] = o), | |
_.nodeValue !== _e && (o.effectTag |= 4)) | |
: ((_ = (_.nodeType === 9 ? _ : _.ownerDocument).createTextNode( | |
_e, | |
)), | |
(_[Md] = o), | |
(o.stateNode = _)); | |
} | |
return null; | |
case 13: | |
return ( | |
H$2(M), | |
(_e = o.memoizedState), | |
o.effectTag & 64 | |
? ((o.expirationTime = _), o) | |
: ((_ = _e !== null), | |
(_e = !1), | |
s === null | |
? o.memoizedProps.fallback !== void 0 && Wh(o) | |
: ((et = s.memoizedState), | |
(_e = et !== null), | |
_ || | |
et === null || | |
((et = s.child.sibling), | |
et !== null && | |
((tt = o.firstEffect), | |
tt !== null | |
? ((o.firstEffect = et), (et.nextEffect = tt)) | |
: ((o.firstEffect = o.lastEffect = et), | |
(et.nextEffect = null)), | |
(et.effectTag = 8)))), | |
_ && | |
!_e && | |
o.mode & 2 && | |
((s === null && | |
o.memoizedProps.unstable_avoidThisFallback !== !0) || | |
M.current & 1 | |
? S$1 === ti && (S$1 = ui) | |
: ((S$1 === ti || S$1 === ui) && (S$1 = vi), | |
wi !== 0 && T !== null && (xi(T, U$2), yi(T, wi)))), | |
(_ || _e) && (o.effectTag |= 4), | |
null) | |
); | |
case 4: | |
return eh(), oi(o), null; | |
case 10: | |
return og(o), null; | |
case 17: | |
return L$2(o.type) && Df(), null; | |
case 19: | |
if ((H$2(M), (_e = o.memoizedState), _e === null)) return null; | |
if ( | |
((et = (o.effectTag & 64) !== 0), (tt = _e.rendering), tt === null) | |
) { | |
if (et) ri(_e, !1); | |
else if (S$1 !== ti || (s !== null && s.effectTag & 64)) | |
for (tt = o.child; tt !== null; ) { | |
if (((s = hh(tt)), s !== null)) { | |
for ( | |
o.effectTag |= 64, | |
ri(_e, !1), | |
et = s.updateQueue, | |
et !== null && ((o.updateQueue = et), (o.effectTag |= 4)), | |
_e.lastEffect === null && (o.firstEffect = null), | |
o.lastEffect = _e.lastEffect, | |
_e = o.child; | |
_e !== null; | |
) | |
(et = _e), | |
(tt = _), | |
(et.effectTag &= 2), | |
(et.nextEffect = null), | |
(et.firstEffect = null), | |
(et.lastEffect = null), | |
(s = et.alternate), | |
s === null | |
? ((et.childExpirationTime = 0), | |
(et.expirationTime = tt), | |
(et.child = null), | |
(et.memoizedProps = null), | |
(et.memoizedState = null), | |
(et.updateQueue = null), | |
(et.dependencies = null)) | |
: ((et.childExpirationTime = s.childExpirationTime), | |
(et.expirationTime = s.expirationTime), | |
(et.child = s.child), | |
(et.memoizedProps = s.memoizedProps), | |
(et.memoizedState = s.memoizedState), | |
(et.updateQueue = s.updateQueue), | |
(tt = s.dependencies), | |
(et.dependencies = | |
tt === null | |
? null | |
: { | |
expirationTime: tt.expirationTime, | |
firstContext: tt.firstContext, | |
responders: tt.responders, | |
})), | |
(_e = _e.sibling); | |
return I$2(M, (M.current & 1) | 2), o.child; | |
} | |
tt = tt.sibling; | |
} | |
} else { | |
if (!et) | |
if (((s = hh(tt)), s !== null)) { | |
if ( | |
((o.effectTag |= 64), | |
(et = !0), | |
(_ = s.updateQueue), | |
_ !== null && ((o.updateQueue = _), (o.effectTag |= 4)), | |
ri(_e, !0), | |
_e.tail === null && _e.tailMode === "hidden" && !tt.alternate) | |
) | |
return ( | |
(o = o.lastEffect = _e.lastEffect), | |
o !== null && (o.nextEffect = null), | |
null | |
); | |
} else | |
2 * $f() - _e.renderingStartTime > _e.tailExpiration && | |
1 < _ && | |
((o.effectTag |= 64), | |
(et = !0), | |
ri(_e, !1), | |
(o.expirationTime = o.childExpirationTime = _ - 1)); | |
_e.isBackwards | |
? ((tt.sibling = o.child), (o.child = tt)) | |
: ((_ = _e.last), | |
_ !== null ? (_.sibling = tt) : (o.child = tt), | |
(_e.last = tt)); | |
} | |
return _e.tail !== null | |
? (_e.tailExpiration === 0 && (_e.tailExpiration = $f() + 500), | |
(_ = _e.tail), | |
(_e.rendering = _), | |
(_e.tail = _.sibling), | |
(_e.lastEffect = o.lastEffect), | |
(_e.renderingStartTime = $f()), | |
(_.sibling = null), | |
(o = M.current), | |
I$2(M, et ? (o & 1) | 2 : o & 1), | |
_) | |
: null; | |
} | |
throw Error(u$e(156, o.tag)); | |
} | |
function zi(s) { | |
switch (s.tag) { | |
case 1: | |
L$2(s.type) && Df(); | |
var o = s.effectTag; | |
return o & 4096 ? ((s.effectTag = (o & -4097) | 64), s) : null; | |
case 3: | |
if ((eh(), H$2(K$1), H$2(J$1), (o = s.effectTag), o & 64)) | |
throw Error(u$e(285)); | |
return (s.effectTag = (o & -4097) | 64), s; | |
case 5: | |
return gh(s), null; | |
case 13: | |
return ( | |
H$2(M), | |
(o = s.effectTag), | |
o & 4096 ? ((s.effectTag = (o & -4097) | 64), s) : null | |
); | |
case 19: | |
return H$2(M), null; | |
case 4: | |
return eh(), null; | |
case 10: | |
return og(s), null; | |
default: | |
return null; | |
} | |
} | |
function Ai(s, o) { | |
return { value: s, source: o, stack: qb(o) }; | |
} | |
var Bi = typeof WeakSet == "function" ? WeakSet : Set; | |
function Ci(s, o) { | |
var _ = o.source, | |
_e = o.stack; | |
_e === null && _ !== null && (_e = qb(_)), | |
_ !== null && pb(_.type), | |
(o = o.value), | |
s !== null && s.tag === 1 && pb(s.type); | |
try { | |
console.error(o); | |
} catch (et) { | |
setTimeout(function () { | |
throw et; | |
}); | |
} | |
} | |
function Di(s, o) { | |
try { | |
(o.props = s.memoizedProps), | |
(o.state = s.memoizedState), | |
o.componentWillUnmount(); | |
} catch (_) { | |
Ei(s, _); | |
} | |
} | |
function Fi(s) { | |
var o = s.ref; | |
if (o !== null) | |
if (typeof o == "function") | |
try { | |
o(null); | |
} catch (_) { | |
Ei(s, _); | |
} | |
else o.current = null; | |
} | |
function Gi(s, o) { | |
switch (o.tag) { | |
case 0: | |
case 11: | |
case 15: | |
case 22: | |
return; | |
case 1: | |
if (o.effectTag & 256 && s !== null) { | |
var _ = s.memoizedProps, | |
_e = s.memoizedState; | |
(s = o.stateNode), | |
(o = s.getSnapshotBeforeUpdate( | |
o.elementType === o.type ? _ : ig(o.type, _), | |
_e, | |
)), | |
(s.__reactInternalSnapshotBeforeUpdate = o); | |
} | |
return; | |
case 3: | |
case 5: | |
case 6: | |
case 4: | |
case 17: | |
return; | |
} | |
throw Error(u$e(163)); | |
} | |
function Hi(s, o) { | |
if ( | |
((o = o.updateQueue), (o = o !== null ? o.lastEffect : null), o !== null) | |
) { | |
var _ = (o = o.next); | |
do { | |
if ((_.tag & s) === s) { | |
var _e = _.destroy; | |
(_.destroy = void 0), _e !== void 0 && _e(); | |
} | |
_ = _.next; | |
} while (_ !== o); | |
} | |
} | |
function Ii(s, o) { | |
if ( | |
((o = o.updateQueue), (o = o !== null ? o.lastEffect : null), o !== null) | |
) { | |
var _ = (o = o.next); | |
do { | |
if ((_.tag & s) === s) { | |
var _e = _.create; | |
_.destroy = _e(); | |
} | |
_ = _.next; | |
} while (_ !== o); | |
} | |
} | |
function Ji(s, o, _) { | |
switch (_.tag) { | |
case 0: | |
case 11: | |
case 15: | |
case 22: | |
Ii(3, _); | |
return; | |
case 1: | |
if (((s = _.stateNode), _.effectTag & 4)) | |
if (o === null) s.componentDidMount(); | |
else { | |
var _e = | |
_.elementType === _.type | |
? o.memoizedProps | |
: ig(_.type, o.memoizedProps); | |
s.componentDidUpdate( | |
_e, | |
o.memoizedState, | |
s.__reactInternalSnapshotBeforeUpdate, | |
); | |
} | |
(o = _.updateQueue), o !== null && Cg(_, o, s); | |
return; | |
case 3: | |
if (((o = _.updateQueue), o !== null)) { | |
if (((s = null), _.child !== null)) | |
switch (_.child.tag) { | |
case 5: | |
s = _.child.stateNode; | |
break; | |
case 1: | |
s = _.child.stateNode; | |
} | |
Cg(_, o, s); | |
} | |
return; | |
case 5: | |
(s = _.stateNode), | |
o === null && | |
_.effectTag & 4 && | |
Fd(_.type, _.memoizedProps) && | |
s.focus(); | |
return; | |
case 6: | |
return; | |
case 4: | |
return; | |
case 12: | |
return; | |
case 13: | |
_.memoizedState === null && | |
((_ = _.alternate), | |
_ !== null && | |
((_ = _.memoizedState), | |
_ !== null && ((_ = _.dehydrated), _ !== null && Vc(_)))); | |
return; | |
case 19: | |
case 17: | |
case 20: | |
case 21: | |
return; | |
} | |
throw Error(u$e(163)); | |
} | |
function Ki(s, o, _) { | |
switch ((typeof Li == "function" && Li(o), o.tag)) { | |
case 0: | |
case 11: | |
case 14: | |
case 15: | |
case 22: | |
if ( | |
((s = o.updateQueue), s !== null && ((s = s.lastEffect), s !== null)) | |
) { | |
var _e = s.next; | |
cg(97 < _ ? 97 : _, function () { | |
var et = _e; | |
do { | |
var tt = et.destroy; | |
if (tt !== void 0) { | |
var rt = o; | |
try { | |
tt(); | |
} catch (it) { | |
Ei(rt, it); | |
} | |
} | |
et = et.next; | |
} while (et !== _e); | |
}); | |
} | |
break; | |
case 1: | |
Fi(o), | |
(_ = o.stateNode), | |
typeof _.componentWillUnmount == "function" && Di(o, _); | |
break; | |
case 5: | |
Fi(o); | |
break; | |
case 4: | |
Mi(s, o, _); | |
} | |
} | |
function Ni(s) { | |
var o = s.alternate; | |
(s.return = null), | |
(s.child = null), | |
(s.memoizedState = null), | |
(s.updateQueue = null), | |
(s.dependencies = null), | |
(s.alternate = null), | |
(s.firstEffect = null), | |
(s.lastEffect = null), | |
(s.pendingProps = null), | |
(s.memoizedProps = null), | |
(s.stateNode = null), | |
o !== null && Ni(o); | |
} | |
function Oi(s) { | |
return s.tag === 5 || s.tag === 3 || s.tag === 4; | |
} | |
function Pi(s) { | |
e: { | |
for (var o = s.return; o !== null; ) { | |
if (Oi(o)) { | |
var _ = o; | |
break e; | |
} | |
o = o.return; | |
} | |
throw Error(u$e(160)); | |
} | |
switch (((o = _.stateNode), _.tag)) { | |
case 5: | |
var _e = !1; | |
break; | |
case 3: | |
(o = o.containerInfo), (_e = !0); | |
break; | |
case 4: | |
(o = o.containerInfo), (_e = !0); | |
break; | |
default: | |
throw Error(u$e(161)); | |
} | |
_.effectTag & 16 && (Rb(o, ""), (_.effectTag &= -17)); | |
e: t: for (_ = s; ; ) { | |
for (; _.sibling === null; ) { | |
if (_.return === null || Oi(_.return)) { | |
_ = null; | |
break e; | |
} | |
_ = _.return; | |
} | |
for ( | |
_.sibling.return = _.return, _ = _.sibling; | |
_.tag !== 5 && _.tag !== 6 && _.tag !== 18; | |
) { | |
if (_.effectTag & 2 || _.child === null || _.tag === 4) continue t; | |
(_.child.return = _), (_ = _.child); | |
} | |
if (!(_.effectTag & 2)) { | |
_ = _.stateNode; | |
break e; | |
} | |
} | |
_e ? Qi(s, _, o) : Ri(s, _, o); | |
} | |
function Qi(s, o, _) { | |
var _e = s.tag, | |
et = _e === 5 || _e === 6; | |
if (et) | |
(s = et ? s.stateNode : s.stateNode.instance), | |
o | |
? _.nodeType === 8 | |
? _.parentNode.insertBefore(s, o) | |
: _.insertBefore(s, o) | |
: (_.nodeType === 8 | |
? ((o = _.parentNode), o.insertBefore(s, _)) | |
: ((o = _), o.appendChild(s)), | |
(_ = _._reactRootContainer), | |
_ != null || o.onclick !== null || (o.onclick = sd)); | |
else if (_e !== 4 && ((s = s.child), s !== null)) | |
for (Qi(s, o, _), s = s.sibling; s !== null; ) | |
Qi(s, o, _), (s = s.sibling); | |
} | |
function Ri(s, o, _) { | |
var _e = s.tag, | |
et = _e === 5 || _e === 6; | |
if (et) | |
(s = et ? s.stateNode : s.stateNode.instance), | |
o ? _.insertBefore(s, o) : _.appendChild(s); | |
else if (_e !== 4 && ((s = s.child), s !== null)) | |
for (Ri(s, o, _), s = s.sibling; s !== null; ) | |
Ri(s, o, _), (s = s.sibling); | |
} | |
function Mi(s, o, _) { | |
for (var _e = o, et = !1, tt, rt; ; ) { | |
if (!et) { | |
et = _e.return; | |
e: for (;;) { | |
if (et === null) throw Error(u$e(160)); | |
switch (((tt = et.stateNode), et.tag)) { | |
case 5: | |
rt = !1; | |
break e; | |
case 3: | |
(tt = tt.containerInfo), (rt = !0); | |
break e; | |
case 4: | |
(tt = tt.containerInfo), (rt = !0); | |
break e; | |
} | |
et = et.return; | |
} | |
et = !0; | |
} | |
if (_e.tag === 5 || _e.tag === 6) { | |
e: for (var it = s, ot = _e, ct = _, at = ot; ; ) | |
if ((Ki(it, at, ct), at.child !== null && at.tag !== 4)) | |
(at.child.return = at), (at = at.child); | |
else { | |
if (at === ot) break e; | |
for (; at.sibling === null; ) { | |
if (at.return === null || at.return === ot) break e; | |
at = at.return; | |
} | |
(at.sibling.return = at.return), (at = at.sibling); | |
} | |
rt | |
? ((it = tt), | |
(ot = _e.stateNode), | |
it.nodeType === 8 | |
? it.parentNode.removeChild(ot) | |
: it.removeChild(ot)) | |
: tt.removeChild(_e.stateNode); | |
} else if (_e.tag === 4) { | |
if (_e.child !== null) { | |
(tt = _e.stateNode.containerInfo), | |
(rt = !0), | |
(_e.child.return = _e), | |
(_e = _e.child); | |
continue; | |
} | |
} else if ((Ki(s, _e, _), _e.child !== null)) { | |
(_e.child.return = _e), (_e = _e.child); | |
continue; | |
} | |
if (_e === o) break; | |
for (; _e.sibling === null; ) { | |
if (_e.return === null || _e.return === o) return; | |
(_e = _e.return), _e.tag === 4 && (et = !1); | |
} | |
(_e.sibling.return = _e.return), (_e = _e.sibling); | |
} | |
} | |
function Si(s, o) { | |
switch (o.tag) { | |
case 0: | |
case 11: | |
case 14: | |
case 15: | |
case 22: | |
Hi(3, o); | |
return; | |
case 1: | |
return; | |
case 5: | |
var _ = o.stateNode; | |
if (_ != null) { | |
var _e = o.memoizedProps, | |
et = s !== null ? s.memoizedProps : _e; | |
s = o.type; | |
var tt = o.updateQueue; | |
if (((o.updateQueue = null), tt !== null)) { | |
for ( | |
_[Nd] = _e, | |
s === "input" && | |
_e.type === "radio" && | |
_e.name != null && | |
Bb(_, _e), | |
pd(s, et), | |
o = pd(s, _e), | |
et = 0; | |
et < tt.length; | |
et += 2 | |
) { | |
var rt = tt[et], | |
it = tt[et + 1]; | |
rt === "style" | |
? md(_, it) | |
: rt === "dangerouslySetInnerHTML" | |
? Qb(_, it) | |
: rt === "children" | |
? Rb(_, it) | |
: Xa(_, rt, it, o); | |
} | |
switch (s) { | |
case "input": | |
Cb(_, _e); | |
break; | |
case "textarea": | |
Kb(_, _e); | |
break; | |
case "select": | |
(o = _._wrapperState.wasMultiple), | |
(_._wrapperState.wasMultiple = !!_e.multiple), | |
(s = _e.value), | |
s != null | |
? Hb(_, !!_e.multiple, s, !1) | |
: o !== !!_e.multiple && | |
(_e.defaultValue != null | |
? Hb(_, !!_e.multiple, _e.defaultValue, !0) | |
: Hb(_, !!_e.multiple, _e.multiple ? [] : "", !1)); | |
} | |
} | |
} | |
return; | |
case 6: | |
if (o.stateNode === null) throw Error(u$e(162)); | |
o.stateNode.nodeValue = o.memoizedProps; | |
return; | |
case 3: | |
(o = o.stateNode), o.hydrate && ((o.hydrate = !1), Vc(o.containerInfo)); | |
return; | |
case 12: | |
return; | |
case 13: | |
if ( | |
((_ = o), | |
o.memoizedState === null | |
? (_e = !1) | |
: ((_e = !0), (_ = o.child), (Ti = $f())), | |
_ !== null) | |
) | |
e: for (s = _; ; ) { | |
if (s.tag === 5) | |
(tt = s.stateNode), | |
_e | |
? ((tt = tt.style), | |
typeof tt.setProperty == "function" | |
? tt.setProperty("display", "none", "important") | |
: (tt.display = "none")) | |
: ((tt = s.stateNode), | |
(et = s.memoizedProps.style), | |
(et = | |
et != null && et.hasOwnProperty("display") | |
? et.display | |
: null), | |
(tt.style.display = ld("display", et))); | |
else if (s.tag === 6) | |
s.stateNode.nodeValue = _e ? "" : s.memoizedProps; | |
else if ( | |
s.tag === 13 && | |
s.memoizedState !== null && | |
s.memoizedState.dehydrated === null | |
) { | |
(tt = s.child.sibling), (tt.return = s), (s = tt); | |
continue; | |
} else if (s.child !== null) { | |
(s.child.return = s), (s = s.child); | |
continue; | |
} | |
if (s === _) break; | |
for (; s.sibling === null; ) { | |
if (s.return === null || s.return === _) break e; | |
s = s.return; | |
} | |
(s.sibling.return = s.return), (s = s.sibling); | |
} | |
Ui(o); | |
return; | |
case 19: | |
Ui(o); | |
return; | |
case 17: | |
return; | |
} | |
throw Error(u$e(163)); | |
} | |
function Ui(s) { | |
var o = s.updateQueue; | |
if (o !== null) { | |
s.updateQueue = null; | |
var _ = s.stateNode; | |
_ === null && (_ = s.stateNode = new Bi()), | |
o.forEach(function (_e) { | |
var et = Vi.bind(null, s, _e); | |
_.has(_e) || (_.add(_e), _e.then(et, et)); | |
}); | |
} | |
} | |
var Wi = typeof WeakMap == "function" ? WeakMap : Map; | |
function Xi(s, o, _) { | |
(_ = wg(_, null)), (_.tag = 3), (_.payload = { element: null }); | |
var _e = o.value; | |
return ( | |
(_.callback = function () { | |
Yi || ((Yi = !0), (Zi = _e)), Ci(s, o); | |
}), | |
_ | |
); | |
} | |
function $i(s, o, _) { | |
(_ = wg(_, null)), (_.tag = 3); | |
var _e = s.type.getDerivedStateFromError; | |
if (typeof _e == "function") { | |
var et = o.value; | |
_.payload = function () { | |
return Ci(s, o), _e(et); | |
}; | |
} | |
var tt = s.stateNode; | |
return ( | |
tt !== null && | |
typeof tt.componentDidCatch == "function" && | |
(_.callback = function () { | |
typeof _e != "function" && | |
(aj === null ? (aj = new Set([this])) : aj.add(this), Ci(s, o)); | |
var rt = o.stack; | |
this.componentDidCatch(o.value, { | |
componentStack: rt !== null ? rt : "", | |
}); | |
}), | |
_ | |
); | |
} | |
var bj = Math.ceil, | |
cj = Wa.ReactCurrentDispatcher, | |
dj = Wa.ReactCurrentOwner, | |
V$1 = 0, | |
ej = 8, | |
fj = 16, | |
gj = 32, | |
ti = 0, | |
hj = 1, | |
ij = 2, | |
ui = 3, | |
vi = 4, | |
jj = 5, | |
W$1 = V$1, | |
T = null, | |
X = null, | |
U$2 = 0, | |
S$1 = ti, | |
kj = null, | |
lj = 1073741823, | |
mj = 1073741823, | |
nj = null, | |
wi = 0, | |
oj = !1, | |
Ti = 0, | |
pj = 500, | |
Y = null, | |
Yi = !1, | |
Zi = null, | |
aj = null, | |
qj = !1, | |
rj = null, | |
sj = 90, | |
tj = null, | |
uj = 0, | |
vj = null, | |
wj = 0; | |
function Gg() { | |
return (W$1 & (fj | gj)) !== V$1 | |
? 1073741821 - (($f() / 10) | 0) | |
: wj !== 0 | |
? wj | |
: (wj = 1073741821 - (($f() / 10) | 0)); | |
} | |
function Hg(s, o, _) { | |
if (((o = o.mode), !(o & 2))) return 1073741823; | |
var _e = ag(); | |
if (!(o & 4)) return _e === 99 ? 1073741823 : 1073741822; | |
if ((W$1 & fj) !== V$1) return U$2; | |
if (_ !== null) s = hg(s, _.timeoutMs | 0 || 5e3, 250); | |
else | |
switch (_e) { | |
case 99: | |
s = 1073741823; | |
break; | |
case 98: | |
s = hg(s, 150, 100); | |
break; | |
case 97: | |
case 96: | |
s = hg(s, 5e3, 250); | |
break; | |
case 95: | |
s = 2; | |
break; | |
default: | |
throw Error(u$e(326)); | |
} | |
return T !== null && s === U$2 && --s, s; | |
} | |
function Ig(s, o) { | |
if (50 < uj) throw ((uj = 0), (vj = null), Error(u$e(185))); | |
if (((s = xj(s, o)), s !== null)) { | |
var _ = ag(); | |
o === 1073741823 | |
? (W$1 & ej) !== V$1 && (W$1 & (fj | gj)) === V$1 | |
? yj(s) | |
: (Z$1(s), W$1 === V$1 && gg()) | |
: Z$1(s), | |
(W$1 & 4) === V$1 || | |
(_ !== 98 && _ !== 99) || | |
(tj === null | |
? (tj = new Map([[s, o]])) | |
: ((_ = tj.get(s)), (_ === void 0 || _ > o) && tj.set(s, o))); | |
} | |
} | |
function xj(s, o) { | |
s.expirationTime < o && (s.expirationTime = o); | |
var _ = s.alternate; | |
_ !== null && _.expirationTime < o && (_.expirationTime = o); | |
var _e = s.return, | |
et = null; | |
if (_e === null && s.tag === 3) et = s.stateNode; | |
else | |
for (; _e !== null; ) { | |
if ( | |
((_ = _e.alternate), | |
_e.childExpirationTime < o && (_e.childExpirationTime = o), | |
_ !== null && | |
_.childExpirationTime < o && | |
(_.childExpirationTime = o), | |
_e.return === null && _e.tag === 3) | |
) { | |
et = _e.stateNode; | |
break; | |
} | |
_e = _e.return; | |
} | |
return ( | |
et !== null && | |
(T === et && (Bg(o), S$1 === vi && xi(et, U$2)), yi(et, o)), | |
et | |
); | |
} | |
function zj(s) { | |
var o = s.lastExpiredTime; | |
if (o !== 0 || ((o = s.firstPendingTime), !Aj(s, o))) return o; | |
var _ = s.lastPingedTime; | |
return ( | |
(s = s.nextKnownPendingLevel), | |
(s = _ > s ? _ : s), | |
2 >= s && o !== s ? 0 : s | |
); | |
} | |
function Z$1(s) { | |
if (s.lastExpiredTime !== 0) | |
(s.callbackExpirationTime = 1073741823), | |
(s.callbackPriority = 99), | |
(s.callbackNode = eg(yj.bind(null, s))); | |
else { | |
var o = zj(s), | |
_ = s.callbackNode; | |
if (o === 0) | |
_ !== null && | |
((s.callbackNode = null), | |
(s.callbackExpirationTime = 0), | |
(s.callbackPriority = 90)); | |
else { | |
var _e = Gg(); | |
if ( | |
(o === 1073741823 | |
? (_e = 99) | |
: o === 1 || o === 2 | |
? (_e = 95) | |
: ((_e = 10 * (1073741821 - o) - 10 * (1073741821 - _e)), | |
(_e = 0 >= _e ? 99 : 250 >= _e ? 98 : 5250 >= _e ? 97 : 95)), | |
_ !== null) | |
) { | |
var et = s.callbackPriority; | |
if (s.callbackExpirationTime === o && et >= _e) return; | |
_ !== Tf && Kf(_); | |
} | |
(s.callbackExpirationTime = o), | |
(s.callbackPriority = _e), | |
(o = | |
o === 1073741823 | |
? eg(yj.bind(null, s)) | |
: dg(_e, Bj.bind(null, s), { | |
timeout: 10 * (1073741821 - o) - $f(), | |
})), | |
(s.callbackNode = o); | |
} | |
} | |
} | |
function Bj(s, o) { | |
if (((wj = 0), o)) return (o = Gg()), Cj(s, o), Z$1(s), null; | |
var _ = zj(s); | |
if (_ !== 0) { | |
if (((o = s.callbackNode), (W$1 & (fj | gj)) !== V$1)) | |
throw Error(u$e(327)); | |
if ((Dj(), (s === T && _ === U$2) || Ej(s, _), X !== null)) { | |
var _e = W$1; | |
W$1 |= fj; | |
var et = Fj(); | |
do | |
try { | |
Gj(); | |
break; | |
} catch (it) { | |
Hj(s, it); | |
} | |
while (!0); | |
if ((ng(), (W$1 = _e), (cj.current = et), S$1 === hj)) | |
throw ((o = kj), Ej(s, _), xi(s, _), Z$1(s), o); | |
if (X === null) | |
switch ( | |
((et = s.finishedWork = s.current.alternate), | |
(s.finishedExpirationTime = _), | |
(_e = S$1), | |
(T = null), | |
_e) | |
) { | |
case ti: | |
case hj: | |
throw Error(u$e(345)); | |
case ij: | |
Cj(s, 2 < _ ? 2 : _); | |
break; | |
case ui: | |
if ( | |
(xi(s, _), | |
(_e = s.lastSuspendedTime), | |
_ === _e && (s.nextKnownPendingLevel = Ij(et)), | |
lj === 1073741823 && ((et = Ti + pj - $f()), 10 < et)) | |
) { | |
if (oj) { | |
var tt = s.lastPingedTime; | |
if (tt === 0 || tt >= _) { | |
(s.lastPingedTime = _), Ej(s, _); | |
break; | |
} | |
} | |
if (((tt = zj(s)), tt !== 0 && tt !== _)) break; | |
if (_e !== 0 && _e !== _) { | |
s.lastPingedTime = _e; | |
break; | |
} | |
s.timeoutHandle = Hd(Jj.bind(null, s), et); | |
break; | |
} | |
Jj(s); | |
break; | |
case vi: | |
if ( | |
(xi(s, _), | |
(_e = s.lastSuspendedTime), | |
_ === _e && (s.nextKnownPendingLevel = Ij(et)), | |
oj && ((et = s.lastPingedTime), et === 0 || et >= _)) | |
) { | |
(s.lastPingedTime = _), Ej(s, _); | |
break; | |
} | |
if (((et = zj(s)), et !== 0 && et !== _)) break; | |
if (_e !== 0 && _e !== _) { | |
s.lastPingedTime = _e; | |
break; | |
} | |
if ( | |
(mj !== 1073741823 | |
? (_e = 10 * (1073741821 - mj) - $f()) | |
: lj === 1073741823 | |
? (_e = 0) | |
: ((_e = 10 * (1073741821 - lj) - 5e3), | |
(et = $f()), | |
(_ = 10 * (1073741821 - _) - et), | |
(_e = et - _e), | |
0 > _e && (_e = 0), | |
(_e = | |
(120 > _e | |
? 120 | |
: 480 > _e | |
? 480 | |
: 1080 > _e | |
? 1080 | |
: 1920 > _e | |
? 1920 | |
: 3e3 > _e | |
? 3e3 | |
: 4320 > _e | |
? 4320 | |
: 1960 * bj(_e / 1960)) - _e), | |
_ < _e && (_e = _)), | |
10 < _e) | |
) { | |
s.timeoutHandle = Hd(Jj.bind(null, s), _e); | |
break; | |
} | |
Jj(s); | |
break; | |
case jj: | |
if (lj !== 1073741823 && nj !== null) { | |
tt = lj; | |
var rt = nj; | |
if ( | |
((_e = rt.busyMinDurationMs | 0), | |
0 >= _e | |
? (_e = 0) | |
: ((et = rt.busyDelayMs | 0), | |
(tt = | |
$f() - | |
(10 * (1073741821 - tt) - (rt.timeoutMs | 0 || 5e3))), | |
(_e = tt <= et ? 0 : et + _e - tt)), | |
10 < _e) | |
) { | |
xi(s, _), (s.timeoutHandle = Hd(Jj.bind(null, s), _e)); | |
break; | |
} | |
} | |
Jj(s); | |
break; | |
default: | |
throw Error(u$e(329)); | |
} | |
if ((Z$1(s), s.callbackNode === o)) return Bj.bind(null, s); | |
} | |
} | |
return null; | |
} | |
function yj(s) { | |
var o = s.lastExpiredTime; | |
if (((o = o !== 0 ? o : 1073741823), (W$1 & (fj | gj)) !== V$1)) | |
throw Error(u$e(327)); | |
if ((Dj(), (s === T && o === U$2) || Ej(s, o), X !== null)) { | |
var _ = W$1; | |
W$1 |= fj; | |
var _e = Fj(); | |
do | |
try { | |
Kj(); | |
break; | |
} catch (et) { | |
Hj(s, et); | |
} | |
while (!0); | |
if ((ng(), (W$1 = _), (cj.current = _e), S$1 === hj)) | |
throw ((_ = kj), Ej(s, o), xi(s, o), Z$1(s), _); | |
if (X !== null) throw Error(u$e(261)); | |
(s.finishedWork = s.current.alternate), | |
(s.finishedExpirationTime = o), | |
(T = null), | |
Jj(s), | |
Z$1(s); | |
} | |
return null; | |
} | |
function Lj() { | |
if (tj !== null) { | |
var s = tj; | |
(tj = null), | |
s.forEach(function (o, _) { | |
Cj(_, o), Z$1(_); | |
}), | |
gg(); | |
} | |
} | |
function Mj(s, o) { | |
var _ = W$1; | |
W$1 |= 1; | |
try { | |
return s(o); | |
} finally { | |
(W$1 = _), W$1 === V$1 && gg(); | |
} | |
} | |
function Nj(s, o) { | |
var _ = W$1; | |
(W$1 &= -2), (W$1 |= ej); | |
try { | |
return s(o); | |
} finally { | |
(W$1 = _), W$1 === V$1 && gg(); | |
} | |
} | |
function Ej(s, o) { | |
(s.finishedWork = null), (s.finishedExpirationTime = 0); | |
var _ = s.timeoutHandle; | |
if ((_ !== -1 && ((s.timeoutHandle = -1), Id(_)), X !== null)) | |
for (_ = X.return; _ !== null; ) { | |
var _e = _; | |
switch (_e.tag) { | |
case 1: | |
(_e = _e.type.childContextTypes), _e != null && Df(); | |
break; | |
case 3: | |
eh(), H$2(K$1), H$2(J$1); | |
break; | |
case 5: | |
gh(_e); | |
break; | |
case 4: | |
eh(); | |
break; | |
case 13: | |
H$2(M); | |
break; | |
case 19: | |
H$2(M); | |
break; | |
case 10: | |
og(_e); | |
} | |
_ = _.return; | |
} | |
(T = s), | |
(X = Sg(s.current, null)), | |
(U$2 = o), | |
(S$1 = ti), | |
(kj = null), | |
(mj = lj = 1073741823), | |
(nj = null), | |
(wi = 0), | |
(oj = !1); | |
} | |
function Hj(s, o) { | |
do { | |
try { | |
if ((ng(), (jh.current = sh), mh)) | |
for (var _ = N.memoizedState; _ !== null; ) { | |
var _e = _.queue; | |
_e !== null && (_e.pending = null), (_ = _.next); | |
} | |
if ( | |
((lh = 0), | |
(P = O = N = null), | |
(mh = !1), | |
X === null || X.return === null) | |
) | |
return (S$1 = hj), (kj = o), (X = null); | |
e: { | |
var et = s, | |
tt = X.return, | |
rt = X, | |
it = o; | |
if ( | |
((o = U$2), | |
(rt.effectTag |= 2048), | |
(rt.firstEffect = rt.lastEffect = null), | |
it !== null && | |
typeof it == "object" && | |
typeof it.then == "function") | |
) { | |
var ot = it; | |
if (!(rt.mode & 2)) { | |
var ct = rt.alternate; | |
ct | |
? ((rt.updateQueue = ct.updateQueue), | |
(rt.memoizedState = ct.memoizedState), | |
(rt.expirationTime = ct.expirationTime)) | |
: ((rt.updateQueue = null), (rt.memoizedState = null)); | |
} | |
var at = (M.current & 1) !== 0, | |
ht = tt; | |
do { | |
var mt; | |
if ((mt = ht.tag === 13)) { | |
var vt = ht.memoizedState; | |
if (vt !== null) mt = vt.dehydrated !== null; | |
else { | |
var xt = ht.memoizedProps; | |
mt = | |
xt.fallback === void 0 | |
? !1 | |
: xt.unstable_avoidThisFallback !== !0 | |
? !0 | |
: !at; | |
} | |
} | |
if (mt) { | |
var St = ht.updateQueue; | |
if (St === null) { | |
var $t = new Set(); | |
$t.add(ot), (ht.updateQueue = $t); | |
} else St.add(ot); | |
if (!(ht.mode & 2)) { | |
if ( | |
((ht.effectTag |= 64), | |
(rt.effectTag &= -2981), | |
rt.tag === 1) | |
) | |
if (rt.alternate === null) rt.tag = 17; | |
else { | |
var Et = wg(1073741823, null); | |
(Et.tag = 2), xg(rt, Et); | |
} | |
rt.expirationTime = 1073741823; | |
break e; | |
} | |
(it = void 0), (rt = o); | |
var _t = et.pingCache; | |
if ( | |
(_t === null | |
? ((_t = et.pingCache = new Wi()), | |
(it = new Set()), | |
_t.set(ot, it)) | |
: ((it = _t.get(ot)), | |
it === void 0 && ((it = new Set()), _t.set(ot, it))), | |
!it.has(rt)) | |
) { | |
it.add(rt); | |
var Rt = Oj.bind(null, et, ot, rt); | |
ot.then(Rt, Rt); | |
} | |
(ht.effectTag |= 4096), (ht.expirationTime = o); | |
break e; | |
} | |
ht = ht.return; | |
} while (ht !== null); | |
it = Error( | |
(pb(rt.type) || "A React component") + | |
` suspended while rendering, but no fallback UI was specified. | |
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.` + | |
qb(rt), | |
); | |
} | |
S$1 !== jj && (S$1 = ij), (it = Ai(it, rt)), (ht = tt); | |
do { | |
switch (ht.tag) { | |
case 3: | |
(ot = it), (ht.effectTag |= 4096), (ht.expirationTime = o); | |
var Mt = Xi(ht, ot, o); | |
yg(ht, Mt); | |
break e; | |
case 1: | |
ot = it; | |
var It = ht.type, | |
Xt = ht.stateNode; | |
if ( | |
!(ht.effectTag & 64) && | |
(typeof It.getDerivedStateFromError == "function" || | |
(Xt !== null && | |
typeof Xt.componentDidCatch == "function" && | |
(aj === null || !aj.has(Xt)))) | |
) { | |
(ht.effectTag |= 4096), (ht.expirationTime = o); | |
var Jt = $i(ht, ot, o); | |
yg(ht, Jt); | |
break e; | |
} | |
} | |
ht = ht.return; | |
} while (ht !== null); | |
} | |
X = Pj(X); | |
} catch (Ht) { | |
o = Ht; | |
continue; | |
} | |
break; | |
} while (!0); | |
} | |
function Fj() { | |
var s = cj.current; | |
return (cj.current = sh), s === null ? sh : s; | |
} | |
function Ag(s, o) { | |
s < lj && 2 < s && (lj = s), | |
o !== null && s < mj && 2 < s && ((mj = s), (nj = o)); | |
} | |
function Bg(s) { | |
s > wi && (wi = s); | |
} | |
function Kj() { | |
for (; X !== null; ) X = Qj(X); | |
} | |
function Gj() { | |
for (; X !== null && !Uf(); ) X = Qj(X); | |
} | |
function Qj(s) { | |
var o = Rj(s.alternate, s, U$2); | |
return ( | |
(s.memoizedProps = s.pendingProps), | |
o === null && (o = Pj(s)), | |
(dj.current = null), | |
o | |
); | |
} | |
function Pj(s) { | |
X = s; | |
do { | |
var o = X.alternate; | |
if (((s = X.return), X.effectTag & 2048)) { | |
if (((o = zi(X)), o !== null)) return (o.effectTag &= 2047), o; | |
s !== null && | |
((s.firstEffect = s.lastEffect = null), (s.effectTag |= 2048)); | |
} else { | |
if (((o = si(o, X, U$2)), U$2 === 1 || X.childExpirationTime !== 1)) { | |
for (var _ = 0, _e = X.child; _e !== null; ) { | |
var et = _e.expirationTime, | |
tt = _e.childExpirationTime; | |
et > _ && (_ = et), tt > _ && (_ = tt), (_e = _e.sibling); | |
} | |
X.childExpirationTime = _; | |
} | |
if (o !== null) return o; | |
s !== null && | |
!(s.effectTag & 2048) && | |
(s.firstEffect === null && (s.firstEffect = X.firstEffect), | |
X.lastEffect !== null && | |
(s.lastEffect !== null && (s.lastEffect.nextEffect = X.firstEffect), | |
(s.lastEffect = X.lastEffect)), | |
1 < X.effectTag && | |
(s.lastEffect !== null | |
? (s.lastEffect.nextEffect = X) | |
: (s.firstEffect = X), | |
(s.lastEffect = X))); | |
} | |
if (((o = X.sibling), o !== null)) return o; | |
X = s; | |
} while (X !== null); | |
return S$1 === ti && (S$1 = jj), null; | |
} | |
function Ij(s) { | |
var o = s.expirationTime; | |
return (s = s.childExpirationTime), o > s ? o : s; | |
} | |
function Jj(s) { | |
var o = ag(); | |
return cg(99, Sj.bind(null, s, o)), null; | |
} | |
function Sj(s, o) { | |
do Dj(); | |
while (rj !== null); | |
if ((W$1 & (fj | gj)) !== V$1) throw Error(u$e(327)); | |
var _ = s.finishedWork, | |
_e = s.finishedExpirationTime; | |
if (_ === null) return null; | |
if ( | |
((s.finishedWork = null), (s.finishedExpirationTime = 0), _ === s.current) | |
) | |
throw Error(u$e(177)); | |
(s.callbackNode = null), | |
(s.callbackExpirationTime = 0), | |
(s.callbackPriority = 90), | |
(s.nextKnownPendingLevel = 0); | |
var et = Ij(_); | |
if ( | |
((s.firstPendingTime = et), | |
_e <= s.lastSuspendedTime | |
? (s.firstSuspendedTime = | |
s.lastSuspendedTime = | |
s.nextKnownPendingLevel = | |
0) | |
: _e <= s.firstSuspendedTime && (s.firstSuspendedTime = _e - 1), | |
_e <= s.lastPingedTime && (s.lastPingedTime = 0), | |
_e <= s.lastExpiredTime && (s.lastExpiredTime = 0), | |
s === T && ((X = T = null), (U$2 = 0)), | |
1 < _.effectTag | |
? _.lastEffect !== null | |
? ((_.lastEffect.nextEffect = _), (et = _.firstEffect)) | |
: (et = _) | |
: (et = _.firstEffect), | |
et !== null) | |
) { | |
var tt = W$1; | |
(W$1 |= gj), (dj.current = null), (Dd = fd); | |
var rt = xd(); | |
if (yd(rt)) { | |
if ("selectionStart" in rt) | |
var it = { start: rt.selectionStart, end: rt.selectionEnd }; | |
else | |
e: { | |
it = ((it = rt.ownerDocument) && it.defaultView) || window; | |
var ot = it.getSelection && it.getSelection(); | |
if (ot && ot.rangeCount !== 0) { | |
it = ot.anchorNode; | |
var ct = ot.anchorOffset, | |
at = ot.focusNode; | |
ot = ot.focusOffset; | |
try { | |
it.nodeType, at.nodeType; | |
} catch { | |
it = null; | |
break e; | |
} | |
var ht = 0, | |
mt = -1, | |
vt = -1, | |
xt = 0, | |
St = 0, | |
$t = rt, | |
Et = null; | |
t: for (;;) { | |
for ( | |
var _t; | |
$t !== it || | |
(ct !== 0 && $t.nodeType !== 3) || | |
(mt = ht + ct), | |
$t !== at || | |
(ot !== 0 && $t.nodeType !== 3) || | |
(vt = ht + ot), | |
$t.nodeType === 3 && (ht += $t.nodeValue.length), | |
(_t = $t.firstChild) !== null; | |
) | |
(Et = $t), ($t = _t); | |
for (;;) { | |
if ($t === rt) break t; | |
if ( | |
(Et === it && ++xt === ct && (mt = ht), | |
Et === at && ++St === ot && (vt = ht), | |
(_t = $t.nextSibling) !== null) | |
) | |
break; | |
($t = Et), (Et = $t.parentNode); | |
} | |
$t = _t; | |
} | |
it = mt === -1 || vt === -1 ? null : { start: mt, end: vt }; | |
} else it = null; | |
} | |
it = it || { start: 0, end: 0 }; | |
} else it = null; | |
(Ed = { | |
activeElementDetached: null, | |
focusedElem: rt, | |
selectionRange: it, | |
}), | |
(fd = !1), | |
(Y = et); | |
do | |
try { | |
Tj(); | |
} catch (qt) { | |
if (Y === null) throw Error(u$e(330)); | |
Ei(Y, qt), (Y = Y.nextEffect); | |
} | |
while (Y !== null); | |
Y = et; | |
do | |
try { | |
for (rt = s, it = o; Y !== null; ) { | |
var Rt = Y.effectTag; | |
if ((Rt & 16 && Rb(Y.stateNode, ""), Rt & 128)) { | |
var Mt = Y.alternate; | |
if (Mt !== null) { | |
var It = Mt.ref; | |
It !== null && | |
(typeof It == "function" ? It(null) : (It.current = null)); | |
} | |
} | |
switch (Rt & 1038) { | |
case 2: | |
Pi(Y), (Y.effectTag &= -3); | |
break; | |
case 6: | |
Pi(Y), (Y.effectTag &= -3), Si(Y.alternate, Y); | |
break; | |
case 1024: | |
Y.effectTag &= -1025; | |
break; | |
case 1028: | |
(Y.effectTag &= -1025), Si(Y.alternate, Y); | |
break; | |
case 4: | |
Si(Y.alternate, Y); | |
break; | |
case 8: | |
(ct = Y), Mi(rt, ct, it), Ni(ct); | |
} | |
Y = Y.nextEffect; | |
} | |
} catch (qt) { | |
if (Y === null) throw Error(u$e(330)); | |
Ei(Y, qt), (Y = Y.nextEffect); | |
} | |
while (Y !== null); | |
if ( | |
((It = Ed), | |
(Mt = xd()), | |
(Rt = It.focusedElem), | |
(it = It.selectionRange), | |
Mt !== Rt && | |
Rt && | |
Rt.ownerDocument && | |
wd(Rt.ownerDocument.documentElement, Rt)) | |
) { | |
for ( | |
it !== null && | |
yd(Rt) && | |
((Mt = it.start), | |
(It = it.end), | |
It === void 0 && (It = Mt), | |
("selectionStart" in Rt) | |
? ((Rt.selectionStart = Mt), | |
(Rt.selectionEnd = Math.min(It, Rt.value.length))) | |
: ((It = | |
((Mt = Rt.ownerDocument || document) && Mt.defaultView) || | |
window), | |
It.getSelection && | |
((It = It.getSelection()), | |
(ct = Rt.textContent.length), | |
(rt = Math.min(it.start, ct)), | |
(it = it.end === void 0 ? rt : Math.min(it.end, ct)), | |
!It.extend && rt > it && ((ct = it), (it = rt), (rt = ct)), | |
(ct = vd(Rt, rt)), | |
(at = vd(Rt, it)), | |
ct && | |
at && | |
(It.rangeCount !== 1 || | |
It.anchorNode !== ct.node || | |
It.anchorOffset !== ct.offset || | |
It.focusNode !== at.node || | |
It.focusOffset !== at.offset) && | |
((Mt = Mt.createRange()), | |
Mt.setStart(ct.node, ct.offset), | |
It.removeAllRanges(), | |
rt > it | |
? (It.addRange(Mt), It.extend(at.node, at.offset)) | |
: (Mt.setEnd(at.node, at.offset), It.addRange(Mt)))))), | |
Mt = [], | |
It = Rt; | |
(It = It.parentNode); | |
) | |
It.nodeType === 1 && | |
Mt.push({ element: It, left: It.scrollLeft, top: It.scrollTop }); | |
for ( | |
typeof Rt.focus == "function" && Rt.focus(), Rt = 0; | |
Rt < Mt.length; | |
Rt++ | |
) | |
(It = Mt[Rt]), | |
(It.element.scrollLeft = It.left), | |
(It.element.scrollTop = It.top); | |
} | |
(fd = !!Dd), (Ed = Dd = null), (s.current = _), (Y = et); | |
do | |
try { | |
for (Rt = s; Y !== null; ) { | |
var Xt = Y.effectTag; | |
if ((Xt & 36 && Ji(Rt, Y.alternate, Y), Xt & 128)) { | |
Mt = void 0; | |
var Jt = Y.ref; | |
if (Jt !== null) { | |
var Ht = Y.stateNode; | |
switch (Y.tag) { | |
case 5: | |
Mt = Ht; | |
break; | |
default: | |
Mt = Ht; | |
} | |
typeof Jt == "function" ? Jt(Mt) : (Jt.current = Mt); | |
} | |
} | |
Y = Y.nextEffect; | |
} | |
} catch (qt) { | |
if (Y === null) throw Error(u$e(330)); | |
Ei(Y, qt), (Y = Y.nextEffect); | |
} | |
while (Y !== null); | |
(Y = null), Vf(), (W$1 = tt); | |
} else s.current = _; | |
if (qj) (qj = !1), (rj = s), (sj = o); | |
else | |
for (Y = et; Y !== null; ) | |
(o = Y.nextEffect), (Y.nextEffect = null), (Y = o); | |
if ( | |
((o = s.firstPendingTime), | |
o === 0 && (aj = null), | |
o === 1073741823 ? (s === vj ? uj++ : ((uj = 0), (vj = s))) : (uj = 0), | |
typeof Uj == "function" && Uj(_.stateNode, _e), | |
Z$1(s), | |
Yi) | |
) | |
throw ((Yi = !1), (s = Zi), (Zi = null), s); | |
return (W$1 & ej) !== V$1 || gg(), null; | |
} | |
function Tj() { | |
for (; Y !== null; ) { | |
var s = Y.effectTag; | |
s & 256 && Gi(Y.alternate, Y), | |
!(s & 512) || | |
qj || | |
((qj = !0), | |
dg(97, function () { | |
return Dj(), null; | |
})), | |
(Y = Y.nextEffect); | |
} | |
} | |
function Dj() { | |
if (sj !== 90) { | |
var s = 97 < sj ? 97 : sj; | |
return (sj = 90), cg(s, Vj); | |
} | |
} | |
function Vj() { | |
if (rj === null) return !1; | |
var s = rj; | |
if (((rj = null), (W$1 & (fj | gj)) !== V$1)) throw Error(u$e(331)); | |
var o = W$1; | |
for (W$1 |= gj, s = s.current.firstEffect; s !== null; ) { | |
try { | |
var _ = s; | |
if (_.effectTag & 512) | |
switch (_.tag) { | |
case 0: | |
case 11: | |
case 15: | |
case 22: | |
Hi(5, _), Ii(5, _); | |
} | |
} catch (_e) { | |
if (s === null) throw Error(u$e(330)); | |
Ei(s, _e); | |
} | |
(_ = s.nextEffect), (s.nextEffect = null), (s = _); | |
} | |
return (W$1 = o), gg(), !0; | |
} | |
function Wj(s, o, _) { | |
(o = Ai(_, o)), | |
(o = Xi(s, o, 1073741823)), | |
xg(s, o), | |
(s = xj(s, 1073741823)), | |
s !== null && Z$1(s); | |
} | |
function Ei(s, o) { | |
if (s.tag === 3) Wj(s, s, o); | |
else | |
for (var _ = s.return; _ !== null; ) { | |
if (_.tag === 3) { | |
Wj(_, s, o); | |
break; | |
} else if (_.tag === 1) { | |
var _e = _.stateNode; | |
if ( | |
typeof _.type.getDerivedStateFromError == "function" || | |
(typeof _e.componentDidCatch == "function" && | |
(aj === null || !aj.has(_e))) | |
) { | |
(s = Ai(o, s)), | |
(s = $i(_, s, 1073741823)), | |
xg(_, s), | |
(_ = xj(_, 1073741823)), | |
_ !== null && Z$1(_); | |
break; | |
} | |
} | |
_ = _.return; | |
} | |
} | |
function Oj(s, o, _) { | |
var _e = s.pingCache; | |
_e !== null && _e.delete(o), | |
T === s && U$2 === _ | |
? S$1 === vi || (S$1 === ui && lj === 1073741823 && $f() - Ti < pj) | |
? Ej(s, U$2) | |
: (oj = !0) | |
: Aj(s, _) && | |
((o = s.lastPingedTime), | |
(o !== 0 && o < _) || ((s.lastPingedTime = _), Z$1(s))); | |
} | |
function Vi(s, o) { | |
var _ = s.stateNode; | |
_ !== null && _.delete(o), | |
(o = 0), | |
o === 0 && ((o = Gg()), (o = Hg(o, s, null))), | |
(s = xj(s, o)), | |
s !== null && Z$1(s); | |
} | |
var Rj; | |
Rj = function (s, o, _) { | |
var _e = o.expirationTime; | |
if (s !== null) { | |
var et = o.pendingProps; | |
if (s.memoizedProps !== et || K$1.current) rg = !0; | |
else { | |
if (_e < _) { | |
switch (((rg = !1), o.tag)) { | |
case 3: | |
hi(o), Xh(); | |
break; | |
case 5: | |
if ((fh(o), o.mode & 4 && _ !== 1 && et.hidden)) | |
return (o.expirationTime = o.childExpirationTime = 1), null; | |
break; | |
case 1: | |
L$2(o.type) && Gf(o); | |
break; | |
case 4: | |
dh$1(o, o.stateNode.containerInfo); | |
break; | |
case 10: | |
(_e = o.memoizedProps.value), | |
(et = o.type._context), | |
I$2(jg, et._currentValue), | |
(et._currentValue = _e); | |
break; | |
case 13: | |
if (o.memoizedState !== null) | |
return ( | |
(_e = o.child.childExpirationTime), | |
_e !== 0 && _e >= _ | |
? ji(s, o, _) | |
: (I$2(M, M.current & 1), | |
(o = $h(s, o, _)), | |
o !== null ? o.sibling : null) | |
); | |
I$2(M, M.current & 1); | |
break; | |
case 19: | |
if (((_e = o.childExpirationTime >= _), s.effectTag & 64)) { | |
if (_e) return mi(s, o, _); | |
o.effectTag |= 64; | |
} | |
if ( | |
((et = o.memoizedState), | |
et !== null && ((et.rendering = null), (et.tail = null)), | |
I$2(M, M.current), | |
!_e) | |
) | |
return null; | |
} | |
return $h(s, o, _); | |
} | |
rg = !1; | |
} | |
} else rg = !1; | |
switch (((o.expirationTime = 0), o.tag)) { | |
case 2: | |
if ( | |
((_e = o.type), | |
s !== null && | |
((s.alternate = null), (o.alternate = null), (o.effectTag |= 2)), | |
(s = o.pendingProps), | |
(et = Cf(o, J$1.current)), | |
qg(o, _), | |
(et = oh(null, o, _e, s, et, _)), | |
(o.effectTag |= 1), | |
typeof et == "object" && | |
et !== null && | |
typeof et.render == "function" && | |
et.$$typeof === void 0) | |
) { | |
if ( | |
((o.tag = 1), | |
(o.memoizedState = null), | |
(o.updateQueue = null), | |
L$2(_e)) | |
) { | |
var tt = !0; | |
Gf(o); | |
} else tt = !1; | |
(o.memoizedState = | |
et.state !== null && et.state !== void 0 ? et.state : null), | |
ug(o); | |
var rt = _e.getDerivedStateFromProps; | |
typeof rt == "function" && Fg(o, _e, rt, s), | |
(et.updater = Jg), | |
(o.stateNode = et), | |
(et._reactInternalFiber = o), | |
Ng(o, _e, s, _), | |
(o = gi(null, o, _e, !0, tt, _)); | |
} else (o.tag = 0), R$2(null, o, et, _), (o = o.child); | |
return o; | |
case 16: | |
e: { | |
if ( | |
((et = o.elementType), | |
s !== null && | |
((s.alternate = null), (o.alternate = null), (o.effectTag |= 2)), | |
(s = o.pendingProps), | |
ob(et), | |
et._status !== 1) | |
) | |
throw et._result; | |
switch ( | |
((et = et._result), | |
(o.type = et), | |
(tt = o.tag = Xj(et)), | |
(s = ig(et, s)), | |
tt) | |
) { | |
case 0: | |
o = di(null, o, et, s, _); | |
break e; | |
case 1: | |
o = fi(null, o, et, s, _); | |
break e; | |
case 11: | |
o = Zh(null, o, et, s, _); | |
break e; | |
case 14: | |
o = ai(null, o, et, ig(et.type, s), _e, _); | |
break e; | |
} | |
throw Error(u$e(306, et, "")); | |
} | |
return o; | |
case 0: | |
return ( | |
(_e = o.type), | |
(et = o.pendingProps), | |
(et = o.elementType === _e ? et : ig(_e, et)), | |
di(s, o, _e, et, _) | |
); | |
case 1: | |
return ( | |
(_e = o.type), | |
(et = o.pendingProps), | |
(et = o.elementType === _e ? et : ig(_e, et)), | |
fi(s, o, _e, et, _) | |
); | |
case 3: | |
if ((hi(o), (_e = o.updateQueue), s === null || _e === null)) | |
throw Error(u$e(282)); | |
if ( | |
((_e = o.pendingProps), | |
(et = o.memoizedState), | |
(et = et !== null ? et.element : null), | |
vg(s, o), | |
zg(o, _e, null, _), | |
(_e = o.memoizedState.element), | |
_e === et) | |
) | |
Xh(), (o = $h(s, o, _)); | |
else { | |
if ( | |
((et = o.stateNode.hydrate) && | |
((Ph = Jd(o.stateNode.containerInfo.firstChild)), | |
(Oh = o), | |
(et = Qh = !0)), | |
et) | |
) | |
for (_ = Yg(o, null, _e, _), o.child = _; _; ) | |
(_.effectTag = (_.effectTag & -3) | 1024), (_ = _.sibling); | |
else R$2(s, o, _e, _), Xh(); | |
o = o.child; | |
} | |
return o; | |
case 5: | |
return ( | |
fh(o), | |
s === null && Uh(o), | |
(_e = o.type), | |
(et = o.pendingProps), | |
(tt = s !== null ? s.memoizedProps : null), | |
(rt = et.children), | |
Gd(_e, et) | |
? (rt = null) | |
: tt !== null && Gd(_e, tt) && (o.effectTag |= 16), | |
ei(s, o), | |
o.mode & 4 && _ !== 1 && et.hidden | |
? ((o.expirationTime = o.childExpirationTime = 1), (o = null)) | |
: (R$2(s, o, rt, _), (o = o.child)), | |
o | |
); | |
case 6: | |
return s === null && Uh(o), null; | |
case 13: | |
return ji(s, o, _); | |
case 4: | |
return ( | |
dh$1(o, o.stateNode.containerInfo), | |
(_e = o.pendingProps), | |
s === null ? (o.child = Xg(o, null, _e, _)) : R$2(s, o, _e, _), | |
o.child | |
); | |
case 11: | |
return ( | |
(_e = o.type), | |
(et = o.pendingProps), | |
(et = o.elementType === _e ? et : ig(_e, et)), | |
Zh(s, o, _e, et, _) | |
); | |
case 7: | |
return R$2(s, o, o.pendingProps, _), o.child; | |
case 8: | |
return R$2(s, o, o.pendingProps.children, _), o.child; | |
case 12: | |
return R$2(s, o, o.pendingProps.children, _), o.child; | |
case 10: | |
e: { | |
(_e = o.type._context), | |
(et = o.pendingProps), | |
(rt = o.memoizedProps), | |
(tt = et.value); | |
var it = o.type._context; | |
if ((I$2(jg, it._currentValue), (it._currentValue = tt), rt !== null)) | |
if ( | |
((it = rt.value), | |
(tt = $e(it, tt) | |
? 0 | |
: (typeof _e._calculateChangedBits == "function" | |
? _e._calculateChangedBits(it, tt) | |
: 1073741823) | 0), | |
tt === 0) | |
) { | |
if (rt.children === et.children && !K$1.current) { | |
o = $h(s, o, _); | |
break e; | |
} | |
} else | |
for ( | |
it = o.child, it !== null && (it.return = o); | |
it !== null; | |
) { | |
var ot = it.dependencies; | |
if (ot !== null) { | |
rt = it.child; | |
for (var ct = ot.firstContext; ct !== null; ) { | |
if (ct.context === _e && ct.observedBits & tt) { | |
it.tag === 1 && | |
((ct = wg(_, null)), (ct.tag = 2), xg(it, ct)), | |
it.expirationTime < _ && (it.expirationTime = _), | |
(ct = it.alternate), | |
ct !== null && | |
ct.expirationTime < _ && | |
(ct.expirationTime = _), | |
pg(it.return, _), | |
ot.expirationTime < _ && (ot.expirationTime = _); | |
break; | |
} | |
ct = ct.next; | |
} | |
} else | |
rt = it.tag === 10 && it.type === o.type ? null : it.child; | |
if (rt !== null) rt.return = it; | |
else | |
for (rt = it; rt !== null; ) { | |
if (rt === o) { | |
rt = null; | |
break; | |
} | |
if (((it = rt.sibling), it !== null)) { | |
(it.return = rt.return), (rt = it); | |
break; | |
} | |
rt = rt.return; | |
} | |
it = rt; | |
} | |
R$2(s, o, et.children, _), (o = o.child); | |
} | |
return o; | |
case 9: | |
return ( | |
(et = o.type), | |
(tt = o.pendingProps), | |
(_e = tt.children), | |
qg(o, _), | |
(et = sg(et, tt.unstable_observedBits)), | |
(_e = _e(et)), | |
(o.effectTag |= 1), | |
R$2(s, o, _e, _), | |
o.child | |
); | |
case 14: | |
return ( | |
(et = o.type), | |
(tt = ig(et, o.pendingProps)), | |
(tt = ig(et.type, tt)), | |
ai(s, o, et, tt, _e, _) | |
); | |
case 15: | |
return ci(s, o, o.type, o.pendingProps, _e, _); | |
case 17: | |
return ( | |
(_e = o.type), | |
(et = o.pendingProps), | |
(et = o.elementType === _e ? et : ig(_e, et)), | |
s !== null && | |
((s.alternate = null), (o.alternate = null), (o.effectTag |= 2)), | |
(o.tag = 1), | |
L$2(_e) ? ((s = !0), Gf(o)) : (s = !1), | |
qg(o, _), | |
Lg(o, _e, et), | |
Ng(o, _e, et, _), | |
gi(null, o, _e, !0, s, _) | |
); | |
case 19: | |
return mi(s, o, _); | |
} | |
throw Error(u$e(156, o.tag)); | |
}; | |
var Uj = null, | |
Li = null; | |
function Yj(s) { | |
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u") return !1; | |
var o = __REACT_DEVTOOLS_GLOBAL_HOOK__; | |
if (o.isDisabled || !o.supportsFiber) return !0; | |
try { | |
var _ = o.inject(s); | |
(Uj = function (_e) { | |
try { | |
o.onCommitFiberRoot( | |
_, | |
_e, | |
void 0, | |
(_e.current.effectTag & 64) === 64, | |
); | |
} catch {} | |
}), | |
(Li = function (_e) { | |
try { | |
o.onCommitFiberUnmount(_, _e); | |
} catch {} | |
}); | |
} catch {} | |
return !0; | |
} | |
function Zj(s, o, _, _e) { | |
(this.tag = s), | |
(this.key = _), | |
(this.sibling = | |
this.child = | |
this.return = | |
this.stateNode = | |
this.type = | |
this.elementType = | |
null), | |
(this.index = 0), | |
(this.ref = null), | |
(this.pendingProps = o), | |
(this.dependencies = | |
this.memoizedState = | |
this.updateQueue = | |
this.memoizedProps = | |
null), | |
(this.mode = _e), | |
(this.effectTag = 0), | |
(this.lastEffect = this.firstEffect = this.nextEffect = null), | |
(this.childExpirationTime = this.expirationTime = 0), | |
(this.alternate = null); | |
} | |
function Sh(s, o, _, _e) { | |
return new Zj(s, o, _, _e); | |
} | |
function bi(s) { | |
return (s = s.prototype), !(!s || !s.isReactComponent); | |
} | |
function Xj(s) { | |
if (typeof s == "function") return bi(s) ? 1 : 0; | |
if (s != null) { | |
if (((s = s.$$typeof), s === gb)) return 11; | |
if (s === jb) return 14; | |
} | |
return 2; | |
} | |
function Sg(s, o) { | |
var _ = s.alternate; | |
return ( | |
_ === null | |
? ((_ = Sh(s.tag, o, s.key, s.mode)), | |
(_.elementType = s.elementType), | |
(_.type = s.type), | |
(_.stateNode = s.stateNode), | |
(_.alternate = s), | |
(s.alternate = _)) | |
: ((_.pendingProps = o), | |
(_.effectTag = 0), | |
(_.nextEffect = null), | |
(_.firstEffect = null), | |
(_.lastEffect = null)), | |
(_.childExpirationTime = s.childExpirationTime), | |
(_.expirationTime = s.expirationTime), | |
(_.child = s.child), | |
(_.memoizedProps = s.memoizedProps), | |
(_.memoizedState = s.memoizedState), | |
(_.updateQueue = s.updateQueue), | |
(o = s.dependencies), | |
(_.dependencies = | |
o === null | |
? null | |
: { | |
expirationTime: o.expirationTime, | |
firstContext: o.firstContext, | |
responders: o.responders, | |
}), | |
(_.sibling = s.sibling), | |
(_.index = s.index), | |
(_.ref = s.ref), | |
_ | |
); | |
} | |
function Ug(s, o, _, _e, et, tt) { | |
var rt = 2; | |
if (((_e = s), typeof s == "function")) bi(s) && (rt = 1); | |
else if (typeof s == "string") rt = 5; | |
else | |
e: switch (s) { | |
case ab: | |
return Wg(_.children, et, tt, o); | |
case fb: | |
(rt = 8), (et |= 7); | |
break; | |
case bb: | |
(rt = 8), (et |= 1); | |
break; | |
case cb: | |
return ( | |
(s = Sh(12, _, o, et | 8)), | |
(s.elementType = cb), | |
(s.type = cb), | |
(s.expirationTime = tt), | |
s | |
); | |
case hb: | |
return ( | |
(s = Sh(13, _, o, et)), | |
(s.type = hb), | |
(s.elementType = hb), | |
(s.expirationTime = tt), | |
s | |
); | |
case ib: | |
return ( | |
(s = Sh(19, _, o, et)), | |
(s.elementType = ib), | |
(s.expirationTime = tt), | |
s | |
); | |
default: | |
if (typeof s == "object" && s !== null) | |
switch (s.$$typeof) { | |
case db: | |
rt = 10; | |
break e; | |
case eb: | |
rt = 9; | |
break e; | |
case gb: | |
rt = 11; | |
break e; | |
case jb: | |
rt = 14; | |
break e; | |
case kb: | |
(rt = 16), (_e = null); | |
break e; | |
case lb: | |
rt = 22; | |
break e; | |
} | |
throw Error(u$e(130, s == null ? s : typeof s, "")); | |
} | |
return ( | |
(o = Sh(rt, _, o, et)), | |
(o.elementType = s), | |
(o.type = _e), | |
(o.expirationTime = tt), | |
o | |
); | |
} | |
function Wg(s, o, _, _e) { | |
return (s = Sh(7, s, _e, o)), (s.expirationTime = _), s; | |
} | |
function Tg(s, o, _) { | |
return (s = Sh(6, s, null, o)), (s.expirationTime = _), s; | |
} | |
function Vg(s, o, _) { | |
return ( | |
(o = Sh(4, s.children !== null ? s.children : [], s.key, o)), | |
(o.expirationTime = _), | |
(o.stateNode = { | |
containerInfo: s.containerInfo, | |
pendingChildren: null, | |
implementation: s.implementation, | |
}), | |
o | |
); | |
} | |
function ak(s, o, _) { | |
(this.tag = o), | |
(this.current = null), | |
(this.containerInfo = s), | |
(this.pingCache = this.pendingChildren = null), | |
(this.finishedExpirationTime = 0), | |
(this.finishedWork = null), | |
(this.timeoutHandle = -1), | |
(this.pendingContext = this.context = null), | |
(this.hydrate = _), | |
(this.callbackNode = null), | |
(this.callbackPriority = 90), | |
(this.lastExpiredTime = | |
this.lastPingedTime = | |
this.nextKnownPendingLevel = | |
this.lastSuspendedTime = | |
this.firstSuspendedTime = | |
this.firstPendingTime = | |
0); | |
} | |
function Aj(s, o) { | |
var _ = s.firstSuspendedTime; | |
return (s = s.lastSuspendedTime), _ !== 0 && _ >= o && s <= o; | |
} | |
function xi(s, o) { | |
var _ = s.firstSuspendedTime, | |
_e = s.lastSuspendedTime; | |
_ < o && (s.firstSuspendedTime = o), | |
(_e > o || _ === 0) && (s.lastSuspendedTime = o), | |
o <= s.lastPingedTime && (s.lastPingedTime = 0), | |
o <= s.lastExpiredTime && (s.lastExpiredTime = 0); | |
} | |
function yi(s, o) { | |
o > s.firstPendingTime && (s.firstPendingTime = o); | |
var _ = s.firstSuspendedTime; | |
_ !== 0 && | |
(o >= _ | |
? (s.firstSuspendedTime = | |
s.lastSuspendedTime = | |
s.nextKnownPendingLevel = | |
0) | |
: o >= s.lastSuspendedTime && (s.lastSuspendedTime = o + 1), | |
o > s.nextKnownPendingLevel && (s.nextKnownPendingLevel = o)); | |
} | |
function Cj(s, o) { | |
var _ = s.lastExpiredTime; | |
(_ === 0 || _ > o) && (s.lastExpiredTime = o); | |
} | |
function bk(s, o, _, _e) { | |
var et = o.current, | |
tt = Gg(), | |
rt = Dg.suspense; | |
tt = Hg(tt, et, rt); | |
e: if (_) { | |
_ = _._reactInternalFiber; | |
t: { | |
if (dc(_) !== _ || _.tag !== 1) throw Error(u$e(170)); | |
var it = _; | |
do { | |
switch (it.tag) { | |
case 3: | |
it = it.stateNode.context; | |
break t; | |
case 1: | |
if (L$2(it.type)) { | |
it = it.stateNode.__reactInternalMemoizedMergedChildContext; | |
break t; | |
} | |
} | |
it = it.return; | |
} while (it !== null); | |
throw Error(u$e(171)); | |
} | |
if (_.tag === 1) { | |
var ot = _.type; | |
if (L$2(ot)) { | |
_ = Ff(_, ot, it); | |
break e; | |
} | |
} | |
_ = it; | |
} else _ = Af; | |
return ( | |
o.context === null ? (o.context = _) : (o.pendingContext = _), | |
(o = wg(tt, rt)), | |
(o.payload = { element: s }), | |
(_e = _e === void 0 ? null : _e), | |
_e !== null && (o.callback = _e), | |
xg(et, o), | |
Ig(et, tt), | |
tt | |
); | |
} | |
function ck(s) { | |
if (((s = s.current), !s.child)) return null; | |
switch (s.child.tag) { | |
case 5: | |
return s.child.stateNode; | |
default: | |
return s.child.stateNode; | |
} | |
} | |
function dk(s, o) { | |
(s = s.memoizedState), | |
s !== null && | |
s.dehydrated !== null && | |
s.retryTime < o && | |
(s.retryTime = o); | |
} | |
function ek(s, o) { | |
dk(s, o), (s = s.alternate) && dk(s, o); | |
} | |
function fk(s, o, _) { | |
_ = _ != null && _.hydrate === !0; | |
var _e = new ak(s, o, _), | |
et = Sh(3, null, null, o === 2 ? 7 : o === 1 ? 3 : 0); | |
(_e.current = et), | |
(et.stateNode = _e), | |
ug(et), | |
(s[Od] = _e.current), | |
_ && o !== 0 && Jc(s, s.nodeType === 9 ? s : s.ownerDocument), | |
(this._internalRoot = _e); | |
} | |
fk.prototype.render = function (s) { | |
bk(s, this._internalRoot, null, null); | |
}; | |
fk.prototype.unmount = function () { | |
var s = this._internalRoot, | |
o = s.containerInfo; | |
bk(null, s, null, function () { | |
o[Od] = null; | |
}); | |
}; | |
function gk(s) { | |
return !( | |
!s || | |
(s.nodeType !== 1 && | |
s.nodeType !== 9 && | |
s.nodeType !== 11 && | |
(s.nodeType !== 8 || s.nodeValue !== " react-mount-point-unstable ")) | |
); | |
} | |
function hk(s, o) { | |
if ( | |
(o || | |
((o = s ? (s.nodeType === 9 ? s.documentElement : s.firstChild) : null), | |
(o = !(!o || o.nodeType !== 1 || !o.hasAttribute("data-reactroot")))), | |
!o) | |
) | |
for (var _; (_ = s.lastChild); ) s.removeChild(_); | |
return new fk(s, 0, o ? { hydrate: !0 } : void 0); | |
} | |
function ik(s, o, _, _e, et) { | |
var tt = _._reactRootContainer; | |
if (tt) { | |
var rt = tt._internalRoot; | |
if (typeof et == "function") { | |
var it = et; | |
et = function () { | |
var ct = ck(rt); | |
it.call(ct); | |
}; | |
} | |
bk(o, rt, s, et); | |
} else { | |
if ( | |
((tt = _._reactRootContainer = hk(_, _e)), | |
(rt = tt._internalRoot), | |
typeof et == "function") | |
) { | |
var ot = et; | |
et = function () { | |
var ct = ck(rt); | |
ot.call(ct); | |
}; | |
} | |
Nj(function () { | |
bk(o, rt, s, et); | |
}); | |
} | |
return ck(rt); | |
} | |
function jk(s, o, _) { | |
var _e = | |
3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null; | |
return { | |
$$typeof: $a, | |
key: _e == null ? null : "" + _e, | |
children: s, | |
containerInfo: o, | |
implementation: _, | |
}; | |
} | |
wc = function (s) { | |
if (s.tag === 13) { | |
var o = hg(Gg(), 150, 100); | |
Ig(s, o), ek(s, o); | |
} | |
}; | |
xc = function (s) { | |
s.tag === 13 && (Ig(s, 3), ek(s, 3)); | |
}; | |
yc = function (s) { | |
if (s.tag === 13) { | |
var o = Gg(); | |
(o = Hg(o, s, null)), Ig(s, o), ek(s, o); | |
} | |
}; | |
za = function (s, o, _) { | |
switch (o) { | |
case "input": | |
if ((Cb(s, _), (o = _.name), _.type === "radio" && o != null)) { | |
for (_ = s; _.parentNode; ) _ = _.parentNode; | |
for ( | |
_ = _.querySelectorAll( | |
"input[name=" + JSON.stringify("" + o) + '][type="radio"]', | |
), | |
o = 0; | |
o < _.length; | |
o++ | |
) { | |
var _e = _[o]; | |
if (_e !== s && _e.form === s.form) { | |
var et = Qd(_e); | |
if (!et) throw Error(u$e(90)); | |
yb(_e), Cb(_e, et); | |
} | |
} | |
} | |
break; | |
case "textarea": | |
Kb(s, _); | |
break; | |
case "select": | |
(o = _.value), o != null && Hb(s, !!_.multiple, o, !1); | |
} | |
}; | |
Fa = Mj; | |
Ga = function (s, o, _, _e, et) { | |
var tt = W$1; | |
W$1 |= 4; | |
try { | |
return cg(98, s.bind(null, o, _, _e, et)); | |
} finally { | |
(W$1 = tt), W$1 === V$1 && gg(); | |
} | |
}; | |
Ha = function () { | |
(W$1 & (1 | fj | gj)) === V$1 && (Lj(), Dj()); | |
}; | |
Ia = function (s, o) { | |
var _ = W$1; | |
W$1 |= 2; | |
try { | |
return s(o); | |
} finally { | |
(W$1 = _), W$1 === V$1 && gg(); | |
} | |
}; | |
function kk(s, o) { | |
var _ = | |
2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null; | |
if (!gk(o)) throw Error(u$e(200)); | |
return jk(s, o, null, _); | |
} | |
var lk = { | |
Events: [ | |
Nc, | |
Pd, | |
Qd, | |
xa, | |
ta, | |
Xd, | |
function (s) { | |
jc(s, Wd); | |
}, | |
Da, | |
Ea, | |
id$1, | |
mc, | |
Dj, | |
{ current: !1 }, | |
], | |
}; | |
(function (s) { | |
var o = s.findFiberByHostInstance; | |
return Yj( | |
n$2({}, s, { | |
overrideHookState: null, | |
overrideProps: null, | |
setSuspenseHandler: null, | |
scheduleUpdate: null, | |
currentDispatcherRef: Wa.ReactCurrentDispatcher, | |
findHostInstanceByFiber: function (_) { | |
return (_ = hc(_)), _ === null ? null : _.stateNode; | |
}, | |
findFiberByHostInstance: function (_) { | |
return o ? o(_) : null; | |
}, | |
findHostInstancesForRefresh: null, | |
scheduleRefresh: null, | |
scheduleRoot: null, | |
setRefreshHandler: null, | |
getCurrentFiber: null, | |
}), | |
); | |
})({ | |
findFiberByHostInstance: tc, | |
bundleType: 0, | |
version: "16.14.0", | |
rendererPackageName: "react-dom", | |
}); | |
reactDom_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = | |
lk; | |
reactDom_production_min.createPortal = kk; | |
reactDom_production_min.findDOMNode = function (s) { | |
if (s == null) return null; | |
if (s.nodeType === 1) return s; | |
var o = s._reactInternalFiber; | |
if (o === void 0) | |
throw typeof s.render == "function" | |
? Error(u$e(188)) | |
: Error(u$e(268, Object.keys(s))); | |
return (s = hc(o)), (s = s === null ? null : s.stateNode), s; | |
}; | |
reactDom_production_min.flushSync = function (s, o) { | |
if ((W$1 & (fj | gj)) !== V$1) throw Error(u$e(187)); | |
var _ = W$1; | |
W$1 |= 1; | |
try { | |
return cg(99, s.bind(null, o)); | |
} finally { | |
(W$1 = _), gg(); | |
} | |
}; | |
reactDom_production_min.hydrate = function (s, o, _) { | |
if (!gk(o)) throw Error(u$e(200)); | |
return ik(null, s, o, !0, _); | |
}; | |
reactDom_production_min.render = function (s, o, _) { | |
if (!gk(o)) throw Error(u$e(200)); | |
return ik(null, s, o, !1, _); | |
}; | |
reactDom_production_min.unmountComponentAtNode = function (s) { | |
if (!gk(s)) throw Error(u$e(40)); | |
return s._reactRootContainer | |
? (Nj(function () { | |
ik(null, null, s, !1, function () { | |
(s._reactRootContainer = null), (s[Od] = null); | |
}); | |
}), | |
!0) | |
: !1; | |
}; | |
reactDom_production_min.unstable_batchedUpdates = Mj; | |
reactDom_production_min.unstable_createPortal = function (s, o) { | |
return kk( | |
s, | |
o, | |
2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null, | |
); | |
}; | |
reactDom_production_min.unstable_renderSubtreeIntoContainer = function ( | |
s, | |
o, | |
_, | |
_e, | |
) { | |
if (!gk(_)) throw Error(u$e(200)); | |
if (s == null || s._reactInternalFiber === void 0) throw Error(u$e(38)); | |
return ik(s, o, _, !1, _e); | |
}; | |
reactDom_production_min.version = "16.14.0"; | |
function checkDCE() { | |
if ( | |
!( | |
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || | |
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function" | |
) | |
) | |
try { | |
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE); | |
} catch (s) { | |
console.error(s); | |
} | |
} | |
checkDCE(), (reactDom.exports = reactDom_production_min); | |
var reactDomExports = reactDom.exports; | |
const ReactDOM = getDefaultExportFromCjs$1(reactDomExports); | |
var propTypes = { exports: {} }, | |
ReactPropTypesSecret$1 = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED", | |
ReactPropTypesSecret_1 = ReactPropTypesSecret$1, | |
ReactPropTypesSecret = ReactPropTypesSecret_1; | |
function emptyFunction() {} | |
function emptyFunctionWithReset() {} | |
emptyFunctionWithReset.resetWarningCache = emptyFunction; | |
var factoryWithThrowingShims = function () { | |
function s(_e, et, tt, rt, it, ot) { | |
if (ot !== ReactPropTypesSecret) { | |
var ct = new Error( | |
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types", | |
); | |
throw ((ct.name = "Invariant Violation"), ct); | |
} | |
} | |
s.isRequired = s; | |
function o() { | |
return s; | |
} | |
var _ = { | |
array: s, | |
bigint: s, | |
bool: s, | |
func: s, | |
number: s, | |
object: s, | |
string: s, | |
symbol: s, | |
any: s, | |
arrayOf: o, | |
element: s, | |
elementType: s, | |
instanceOf: o, | |
node: s, | |
objectOf: o, | |
oneOf: o, | |
oneOfType: o, | |
shape: o, | |
exact: o, | |
checkPropTypes: emptyFunctionWithReset, | |
resetWarningCache: emptyFunction, | |
}; | |
return (_.PropTypes = _), _; | |
}; | |
propTypes.exports = factoryWithThrowingShims(); | |
var propTypesExports = propTypes.exports; | |
const PropTypes$1 = getDefaultExportFromCjs$1(propTypesExports); | |
var reactIs$1 = { exports: {} }, | |
reactIs_production_min$1 = {}; | |
/** @license React v16.13.1 | |
* react-is.production.min.js | |
* | |
* Copyright (c) Facebook, Inc. and its affiliates. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/ var b$1 = typeof Symbol == "function" && Symbol.for, | |
c$1 = b$1 ? Symbol.for("react.element") : 60103, | |
d$1 = b$1 ? Symbol.for("react.portal") : 60106, | |
e$1 = b$1 ? Symbol.for("react.fragment") : 60107, | |
f$1 = b$1 ? Symbol.for("react.strict_mode") : 60108, | |
g$3 = b$1 ? Symbol.for("react.profiler") : 60114, | |
h$2 = b$1 ? Symbol.for("react.provider") : 60109, | |
k$2 = b$1 ? Symbol.for("react.context") : 60110, | |
l$1 = b$1 ? Symbol.for("react.async_mode") : 60111, | |
m$2 = b$1 ? Symbol.for("react.concurrent_mode") : 60111, | |
n$1 = b$1 ? Symbol.for("react.forward_ref") : 60112, | |
p$2 = b$1 ? Symbol.for("react.suspense") : 60113, | |
q$2 = b$1 ? Symbol.for("react.suspense_list") : 60120, | |
r$1 = b$1 ? Symbol.for("react.memo") : 60115, | |
t$1 = b$1 ? Symbol.for("react.lazy") : 60116, | |
v$1 = b$1 ? Symbol.for("react.block") : 60121, | |
w$3 = b$1 ? Symbol.for("react.fundamental") : 60117, | |
x$2 = b$1 ? Symbol.for("react.responder") : 60118, | |
y$1 = b$1 ? Symbol.for("react.scope") : 60119; | |
function z$2(s) { | |
if (typeof s == "object" && s !== null) { | |
var o = s.$$typeof; | |
switch (o) { | |
case c$1: | |
switch (((s = s.type), s)) { | |
case l$1: | |
case m$2: | |
case e$1: | |
case g$3: | |
case f$1: | |
case p$2: | |
return s; | |
default: | |
switch (((s = s && s.$$typeof), s)) { | |
case k$2: | |
case n$1: | |
case t$1: | |
case r$1: | |
case h$2: | |
return s; | |
default: | |
return o; | |
} | |
} | |
case d$1: | |
return o; | |
} | |
} | |
} | |
function A$2(s) { | |
return z$2(s) === m$2; | |
} | |
reactIs_production_min$1.AsyncMode = l$1; | |
reactIs_production_min$1.ConcurrentMode = m$2; | |
reactIs_production_min$1.ContextConsumer = k$2; | |
reactIs_production_min$1.ContextProvider = h$2; | |
reactIs_production_min$1.Element = c$1; | |
reactIs_production_min$1.ForwardRef = n$1; | |
reactIs_production_min$1.Fragment = e$1; | |
reactIs_production_min$1.Lazy = t$1; | |
reactIs_production_min$1.Memo = r$1; | |
reactIs_production_min$1.Portal = d$1; | |
reactIs_production_min$1.Profiler = g$3; | |
reactIs_production_min$1.StrictMode = f$1; | |
reactIs_production_min$1.Suspense = p$2; | |
reactIs_production_min$1.isAsyncMode = function (s) { | |
return A$2(s) || z$2(s) === l$1; | |
}; | |
reactIs_production_min$1.isConcurrentMode = A$2; | |
reactIs_production_min$1.isContextConsumer = function (s) { | |
return z$2(s) === k$2; | |
}; | |
reactIs_production_min$1.isContextProvider = function (s) { | |
return z$2(s) === h$2; | |
}; | |
reactIs_production_min$1.isElement = function (s) { | |
return typeof s == "object" && s !== null && s.$$typeof === c$1; | |
}; | |
reactIs_production_min$1.isForwardRef = function (s) { | |
return z$2(s) === n$1; | |
}; | |
reactIs_production_min$1.isFragment = function (s) { | |
return z$2(s) === e$1; | |
}; | |
reactIs_production_min$1.isLazy = function (s) { | |
return z$2(s) === t$1; | |
}; | |
reactIs_production_min$1.isMemo = function (s) { | |
return z$2(s) === r$1; | |
}; | |
reactIs_production_min$1.isPortal = function (s) { | |
return z$2(s) === d$1; | |
}; | |
reactIs_production_min$1.isProfiler = function (s) { | |
return z$2(s) === g$3; | |
}; | |
reactIs_production_min$1.isStrictMode = function (s) { | |
return z$2(s) === f$1; | |
}; | |
reactIs_production_min$1.isSuspense = function (s) { | |
return z$2(s) === p$2; | |
}; | |
reactIs_production_min$1.isValidElementType = function (s) { | |
return ( | |
typeof s == "string" || | |
typeof s == "function" || | |
s === e$1 || | |
s === m$2 || | |
s === g$3 || | |
s === f$1 || | |
s === p$2 || | |
s === q$2 || | |
(typeof s == "object" && | |
s !== null && | |
(s.$$typeof === t$1 || | |
s.$$typeof === r$1 || | |
s.$$typeof === h$2 || | |
s.$$typeof === k$2 || | |
s.$$typeof === n$1 || | |
s.$$typeof === w$3 || | |
s.$$typeof === x$2 || | |
s.$$typeof === y$1 || | |
s.$$typeof === v$1)) | |
); | |
}; | |
reactIs_production_min$1.typeOf = z$2; | |
reactIs$1.exports = reactIs_production_min$1; | |
var reactIsExports$1 = reactIs$1.exports, | |
ReactIs$1 = reactIsExports$1, | |
REACT_STATICS = { | |
childContextTypes: !0, | |
contextType: !0, | |
contextTypes: !0, | |
defaultProps: !0, | |
displayName: !0, | |
getDefaultProps: !0, | |
getDerivedStateFromError: !0, | |
getDerivedStateFromProps: !0, | |
mixins: !0, | |
propTypes: !0, | |
type: !0, | |
}, | |
KNOWN_STATICS = { | |
name: !0, | |
length: !0, | |
prototype: !0, | |
caller: !0, | |
callee: !0, | |
arguments: !0, | |
arity: !0, | |
}, | |
FORWARD_REF_STATICS = { | |
$$typeof: !0, | |
render: !0, | |
defaultProps: !0, | |
displayName: !0, | |
propTypes: !0, | |
}, | |
MEMO_STATICS = { | |
$$typeof: !0, | |
compare: !0, | |
defaultProps: !0, | |
displayName: !0, | |
propTypes: !0, | |
type: !0, | |
}, | |
TYPE_STATICS = {}; | |
TYPE_STATICS[ReactIs$1.ForwardRef] = FORWARD_REF_STATICS; | |
function getStatics(s) { | |
return ReactIs$1.isMemo(s) | |
? MEMO_STATICS | |
: TYPE_STATICS[s.$$typeof] || REACT_STATICS; | |
} | |
var defineProperty$1 = Object.defineProperty, | |
getOwnPropertyNames = Object.getOwnPropertyNames, | |
getOwnPropertySymbols = Object.getOwnPropertySymbols, | |
getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, | |
getPrototypeOf$1 = Object.getPrototypeOf, | |
objectPrototype = Object.prototype; | |
function hoistNonReactStatics(s, o, _) { | |
if (typeof o != "string") { | |
if (objectPrototype) { | |
var _e = getPrototypeOf$1(o); | |
_e && _e !== objectPrototype && hoistNonReactStatics(s, _e, _); | |
} | |
var et = getOwnPropertyNames(o); | |
getOwnPropertySymbols && (et = et.concat(getOwnPropertySymbols(o))); | |
for ( | |
var tt = getStatics(s), rt = getStatics(o), it = 0; | |
it < et.length; | |
++it | |
) { | |
var ot = et[it]; | |
if ( | |
!KNOWN_STATICS[ot] && | |
!(_ && _[ot]) && | |
!(rt && rt[ot]) && | |
!(tt && tt[ot]) | |
) { | |
var ct = getOwnPropertyDescriptor(o, ot); | |
try { | |
defineProperty$1(s, ot, ct); | |
} catch {} | |
} | |
} | |
return s; | |
} | |
return s; | |
} | |
var hoistNonReactStatics_cjs = hoistNonReactStatics; | |
const hoistStatics = getDefaultExportFromCjs$1(hoistNonReactStatics_cjs); | |
var isUnitlessNumber = { | |
animationIterationCount: !0, | |
borderImageOutset: !0, | |
borderImageSlice: !0, | |
borderImageWidth: !0, | |
boxFlex: !0, | |
boxFlexGroup: !0, | |
boxOrdinalGroup: !0, | |
columnCount: !0, | |
columns: !0, | |
flex: !0, | |
flexGrow: !0, | |
flexPositive: !0, | |
flexShrink: !0, | |
flexNegative: !0, | |
flexOrder: !0, | |
gridArea: !0, | |
gridRow: !0, | |
gridRowEnd: !0, | |
gridRowSpan: !0, | |
gridRowStart: !0, | |
gridColumn: !0, | |
gridColumnEnd: !0, | |
gridColumnSpan: !0, | |
gridColumnStart: !0, | |
fontWeight: !0, | |
lineClamp: !0, | |
lineHeight: !0, | |
opacity: !0, | |
order: !0, | |
orphans: !0, | |
tabSize: !0, | |
widows: !0, | |
zIndex: !0, | |
zoom: !0, | |
fillOpacity: !0, | |
floodOpacity: !0, | |
stopOpacity: !0, | |
strokeDasharray: !0, | |
strokeDashoffset: !0, | |
strokeMiterlimit: !0, | |
strokeOpacity: !0, | |
strokeWidth: !0, | |
}; | |
function appendPxIfNeeded(s, o) { | |
var _ = !isUnitlessNumber[s] && typeof o == "number" && o !== 0; | |
return _ ? o + "px" : o; | |
} | |
function mapObject(s, o) { | |
return Object.keys(s).reduce(function (_, _e) { | |
return (_[_e] = o(s[_e], _e)), _; | |
}, {}); | |
} | |
function appendImportantToEachValue(s) { | |
return mapObject(s, function (o, _) { | |
return appendPxIfNeeded(_, s[_]) + " !important"; | |
}); | |
} | |
var _camelCaseRegex = /([a-z])?([A-Z])/g, | |
_camelCaseReplacer = function (o, _, _e) { | |
return (_ || "") + "-" + _e.toLowerCase(); | |
}, | |
camelCaseToDashCase = function (o) { | |
return o.replace(_camelCaseRegex, _camelCaseReplacer); | |
}, | |
camelCasePropsToDashCase = function (o) { | |
return Object.keys(o).reduce(function (_, _e) { | |
var et = camelCaseToDashCase(_e); | |
return /^ms-/.test(et) && (et = "-".concat(et)), (_[et] = o[_e]), _; | |
}, {}); | |
}; | |
const global$1 = globalThis || void 0 || self; | |
var createPrefixer$1 = { exports: {} }, | |
prefixProperty = { exports: {} }, | |
capitalizeString = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = _); | |
function _(_e) { | |
return _e.charAt(0).toUpperCase() + _e.slice(1); | |
} | |
s.exports = o.default; | |
})(capitalizeString, capitalizeString.exports); | |
var capitalizeStringExports = capitalizeString.exports; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = tt); | |
var _ = capitalizeStringExports, | |
_e = et(_); | |
function et(rt) { | |
return rt && rt.__esModule ? rt : { default: rt }; | |
} | |
function tt(rt, it, ot) { | |
if (rt.hasOwnProperty(it)) { | |
for ( | |
var ct = {}, | |
at = rt[it], | |
ht = (0, _e.default)(it), | |
mt = Object.keys(ot), | |
vt = 0; | |
vt < mt.length; | |
vt++ | |
) { | |
var xt = mt[vt]; | |
if (xt === it) | |
for (var St = 0; St < at.length; St++) ct[at[St] + ht] = ot[it]; | |
ct[xt] = ot[xt]; | |
} | |
return ct; | |
} | |
return ot; | |
} | |
s.exports = o.default; | |
})(prefixProperty, prefixProperty.exports); | |
var prefixPropertyExports = prefixProperty.exports, | |
prefixValue = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = _); | |
function _(_e, et, tt, rt, it) { | |
for (var ot = 0, ct = _e.length; ot < ct; ++ot) { | |
var at = _e[ot](et, tt, rt, it); | |
if (at) return at; | |
} | |
} | |
s.exports = o.default; | |
})(prefixValue, prefixValue.exports); | |
var prefixValueExports = prefixValue.exports, | |
addNewValuesOnly = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = _e); | |
function _(et, tt) { | |
et.indexOf(tt) === -1 && et.push(tt); | |
} | |
function _e(et, tt) { | |
if (Array.isArray(tt)) | |
for (var rt = 0, it = tt.length; rt < it; ++rt) _(et, tt[rt]); | |
else _(et, tt); | |
} | |
s.exports = o.default; | |
})(addNewValuesOnly, addNewValuesOnly.exports); | |
var addNewValuesOnlyExports = addNewValuesOnly.exports, | |
isObject$7 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = _); | |
function _(_e) { | |
return _e instanceof Object && !Array.isArray(_e); | |
} | |
s.exports = o.default; | |
})(isObject$7, isObject$7.exports); | |
var isObjectExports = isObject$7.exports; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = ht); | |
var _ = prefixPropertyExports, | |
_e = at(_), | |
et = prefixValueExports, | |
tt = at(et), | |
rt = addNewValuesOnlyExports, | |
it = at(rt), | |
ot = isObjectExports, | |
ct = at(ot); | |
function at(mt) { | |
return mt && mt.__esModule ? mt : { default: mt }; | |
} | |
function ht(mt) { | |
var vt = mt.prefixMap, | |
xt = mt.plugins; | |
function St($t) { | |
for (var Et in $t) { | |
var _t = $t[Et]; | |
if ((0, ct.default)(_t)) $t[Et] = St(_t); | |
else if (Array.isArray(_t)) { | |
for (var Rt = [], Mt = 0, It = _t.length; Mt < It; ++Mt) { | |
var Xt = (0, tt.default)(xt, Et, _t[Mt], $t, vt); | |
(0, it.default)(Rt, Xt || _t[Mt]); | |
} | |
Rt.length > 0 && ($t[Et] = Rt); | |
} else { | |
var Jt = (0, tt.default)(xt, Et, _t, $t, vt); | |
Jt && ($t[Et] = Jt), ($t = (0, _e.default)(vt, Et, $t)); | |
} | |
} | |
return $t; | |
} | |
return St; | |
} | |
s.exports = o.default; | |
})(createPrefixer$1, createPrefixer$1.exports); | |
var createPrefixerExports$1 = createPrefixer$1.exports; | |
const createStaticPrefixer = getDefaultExportFromCjs$1( | |
createPrefixerExports$1, | |
); | |
var createPrefixer = { exports: {} }, | |
getBrowserInformation = { exports: {} }, | |
bowser = { exports: {} }; | |
/*! | |
* Bowser - a browser detector | |
* https://github.com/ded/bowser | |
* MIT License | (c) Dustin Diaz 2015 | |
*/ (function (s) { | |
(function (o, _, _e) { | |
s.exports ? (s.exports = _e()) : (o[_] = _e()); | |
})(commonjsGlobal$3, "bowser", function () { | |
var o = !0; | |
function _(ct) { | |
function at(gt) { | |
var st = ct.match(gt); | |
return (st && st.length > 1 && st[1]) || ""; | |
} | |
function ht(gt) { | |
var st = ct.match(gt); | |
return (st && st.length > 1 && st[2]) || ""; | |
} | |
var mt = at(/(ipod|iphone|ipad)/i).toLowerCase(), | |
vt = /like android/i.test(ct), | |
xt = !vt && /android/i.test(ct), | |
St = /nexus\s*[0-6]\s*/i.test(ct), | |
$t = !St && /nexus\s*[0-9]+/i.test(ct), | |
Et = /CrOS/.test(ct), | |
_t = /silk/i.test(ct), | |
Rt = /sailfish/i.test(ct), | |
Mt = /tizen/i.test(ct), | |
It = /(web|hpw)(o|0)s/i.test(ct), | |
Xt = /windows phone/i.test(ct), | |
Jt = !Xt && /windows/i.test(ct), | |
Ht = !mt && !_t && /macintosh/i.test(ct), | |
qt = !xt && !Rt && !Mt && !It && /linux/i.test(ct), | |
nr = ht(/edg([ea]|ios)\/(\d+(\.\d+)?)/i), | |
wt = at(/version\/(\d+(\.\d+)?)/i), | |
nt = /tablet/i.test(ct) && !/tablet pc/i.test(ct), | |
ut = !nt && /[^-]mobi/i.test(ct), | |
ft = /xbox/i.test(ct), | |
dt; | |
/opera/i.test(ct) | |
? (dt = { | |
name: "Opera", | |
opera: o, | |
version: wt || at(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i), | |
}) | |
: /opr\/|opios/i.test(ct) | |
? (dt = { | |
name: "Opera", | |
opera: o, | |
version: at(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i) || wt, | |
}) | |
: /SamsungBrowser/i.test(ct) | |
? (dt = { | |
name: "Samsung Internet for Android", | |
samsungBrowser: o, | |
version: wt || at(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i), | |
}) | |
: /Whale/i.test(ct) | |
? (dt = { | |
name: "NAVER Whale browser", | |
whale: o, | |
version: at(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i), | |
}) | |
: /MZBrowser/i.test(ct) | |
? (dt = { | |
name: "MZ Browser", | |
mzbrowser: o, | |
version: at(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i), | |
}) | |
: /coast/i.test(ct) | |
? (dt = { | |
name: "Opera Coast", | |
coast: o, | |
version: wt || at(/(?:coast)[\s\/](\d+(\.\d+)?)/i), | |
}) | |
: /focus/i.test(ct) | |
? (dt = { | |
name: "Focus", | |
focus: o, | |
version: at(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i), | |
}) | |
: /yabrowser/i.test(ct) | |
? (dt = { | |
name: "Yandex Browser", | |
yandexbrowser: o, | |
version: | |
wt || at(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i), | |
}) | |
: /ucbrowser/i.test(ct) | |
? (dt = { | |
name: "UC Browser", | |
ucbrowser: o, | |
version: at( | |
/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i, | |
), | |
}) | |
: /mxios/i.test(ct) | |
? (dt = { | |
name: "Maxthon", | |
maxthon: o, | |
version: at(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i), | |
}) | |
: /epiphany/i.test(ct) | |
? (dt = { | |
name: "Epiphany", | |
epiphany: o, | |
version: at( | |
/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i, | |
), | |
}) | |
: /puffin/i.test(ct) | |
? (dt = { | |
name: "Puffin", | |
puffin: o, | |
version: at( | |
/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i, | |
), | |
}) | |
: /sleipnir/i.test(ct) | |
? (dt = { | |
name: "Sleipnir", | |
sleipnir: o, | |
version: at( | |
/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i, | |
), | |
}) | |
: /k-meleon/i.test(ct) | |
? (dt = { | |
name: "K-Meleon", | |
kMeleon: o, | |
version: at( | |
/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i, | |
), | |
}) | |
: Xt | |
? ((dt = { | |
name: "Windows Phone", | |
osname: "Windows Phone", | |
windowsphone: o, | |
}), | |
nr | |
? ((dt.msedge = o), (dt.version = nr)) | |
: ((dt.msie = o), | |
(dt.version = at( | |
/iemobile\/(\d+(\.\d+)?)/i, | |
)))) | |
: /msie|trident/i.test(ct) | |
? (dt = { | |
name: "Internet Explorer", | |
msie: o, | |
version: at( | |
/(?:msie |rv:)(\d+(\.\d+)?)/i, | |
), | |
}) | |
: Et | |
? (dt = { | |
name: "Chrome", | |
osname: "Chrome OS", | |
chromeos: o, | |
chromeBook: o, | |
chrome: o, | |
version: at( | |
/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i, | |
), | |
}) | |
: /edg([ea]|ios)/i.test(ct) | |
? (dt = { | |
name: "Microsoft Edge", | |
msedge: o, | |
version: nr, | |
}) | |
: /vivaldi/i.test(ct) | |
? (dt = { | |
name: "Vivaldi", | |
vivaldi: o, | |
version: | |
at( | |
/vivaldi\/(\d+(\.\d+)?)/i, | |
) || wt, | |
}) | |
: Rt | |
? (dt = { | |
name: "Sailfish", | |
osname: "Sailfish OS", | |
sailfish: o, | |
version: at( | |
/sailfish\s?browser\/(\d+(\.\d+)?)/i, | |
), | |
}) | |
: /seamonkey\//i.test(ct) | |
? (dt = { | |
name: "SeaMonkey", | |
seamonkey: o, | |
version: at( | |
/seamonkey\/(\d+(\.\d+)?)/i, | |
), | |
}) | |
: /firefox|iceweasel|fxios/i.test( | |
ct, | |
) | |
? ((dt = { | |
name: "Firefox", | |
firefox: o, | |
version: at( | |
/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i, | |
), | |
}), | |
/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test( | |
ct, | |
) && | |
((dt.firefoxos = o), | |
(dt.osname = | |
"Firefox OS"))) | |
: _t | |
? (dt = { | |
name: "Amazon Silk", | |
silk: o, | |
version: | |
at( | |
/silk\/(\d+(\.\d+)?)/i, | |
), | |
}) | |
: /phantom/i.test(ct) | |
? (dt = { | |
name: "PhantomJS", | |
phantom: o, | |
version: at( | |
/phantomjs\/(\d+(\.\d+)?)/i, | |
), | |
}) | |
: /slimerjs/i.test(ct) | |
? (dt = { | |
name: "SlimerJS", | |
slimer: o, | |
version: at( | |
/slimerjs\/(\d+(\.\d+)?)/i, | |
), | |
}) | |
: /blackberry|\bbb\d+/i.test( | |
ct, | |
) || | |
/rim\stablet/i.test( | |
ct, | |
) | |
? (dt = { | |
name: "BlackBerry", | |
osname: | |
"BlackBerry OS", | |
blackberry: o, | |
version: | |
wt || | |
at( | |
/blackberry[\d]+\/(\d+(\.\d+)?)/i, | |
), | |
}) | |
: It | |
? ((dt = { | |
name: "WebOS", | |
osname: | |
"WebOS", | |
webos: o, | |
version: | |
wt || | |
at( | |
/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i, | |
), | |
}), | |
/touchpad\//i.test( | |
ct, | |
) && | |
(dt.touchpad = | |
o)) | |
: /bada/i.test(ct) | |
? (dt = { | |
name: "Bada", | |
osname: | |
"Bada", | |
bada: o, | |
version: at( | |
/dolfin\/(\d+(\.\d+)?)/i, | |
), | |
}) | |
: Mt | |
? (dt = { | |
name: "Tizen", | |
osname: | |
"Tizen", | |
tizen: o, | |
version: | |
at( | |
/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i, | |
) || wt, | |
}) | |
: /qupzilla/i.test( | |
ct, | |
) | |
? (dt = { | |
name: "QupZilla", | |
qupzilla: | |
o, | |
version: | |
at( | |
/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i, | |
) || | |
wt, | |
}) | |
: /chromium/i.test( | |
ct, | |
) | |
? (dt = { | |
name: "Chromium", | |
chromium: | |
o, | |
version: | |
at( | |
/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i, | |
) || | |
wt, | |
}) | |
: /chrome|crios|crmo/i.test( | |
ct, | |
) | |
? (dt = | |
{ | |
name: "Chrome", | |
chrome: | |
o, | |
version: | |
at( | |
/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i, | |
), | |
}) | |
: xt | |
? (dt = | |
{ | |
name: "Android", | |
version: | |
wt, | |
}) | |
: /safari|applewebkit/i.test( | |
ct, | |
) | |
? ((dt = | |
{ | |
name: "Safari", | |
safari: | |
o, | |
}), | |
wt && | |
(dt.version = | |
wt)) | |
: mt | |
? ((dt = | |
{ | |
name: | |
mt == | |
"iphone" | |
? "iPhone" | |
: mt == | |
"ipad" | |
? "iPad" | |
: "iPod", | |
}), | |
wt && | |
(dt.version = | |
wt)) | |
: /googlebot/i.test( | |
ct, | |
) | |
? (dt = | |
{ | |
name: "Googlebot", | |
googlebot: | |
o, | |
version: | |
at( | |
/googlebot\/(\d+(\.\d+))/i, | |
) || | |
wt, | |
}) | |
: (dt = | |
{ | |
name: at( | |
/^(.*)\/(.*) /, | |
), | |
version: | |
ht( | |
/^(.*)\/(.*) /, | |
), | |
}), | |
!dt.msedge && /(apple)?webkit/i.test(ct) | |
? (/(apple)?webkit\/537\.36/i.test(ct) | |
? ((dt.name = dt.name || "Blink"), (dt.blink = o)) | |
: ((dt.name = dt.name || "Webkit"), (dt.webkit = o)), | |
!dt.version && wt && (dt.version = wt)) | |
: !dt.opera && | |
/gecko\//i.test(ct) && | |
((dt.name = dt.name || "Gecko"), | |
(dt.gecko = o), | |
(dt.version = dt.version || at(/gecko\/(\d+(\.\d+)?)/i))), | |
!dt.windowsphone && (xt || dt.silk) | |
? ((dt.android = o), (dt.osname = "Android")) | |
: !dt.windowsphone && mt | |
? ((dt[mt] = o), (dt.ios = o), (dt.osname = "iOS")) | |
: Ht | |
? ((dt.mac = o), (dt.osname = "macOS")) | |
: ft | |
? ((dt.xbox = o), (dt.osname = "Xbox")) | |
: Jt | |
? ((dt.windows = o), (dt.osname = "Windows")) | |
: qt && ((dt.linux = o), (dt.osname = "Linux")); | |
function Ot(gt) { | |
switch (gt) { | |
case "NT": | |
return "NT"; | |
case "XP": | |
return "XP"; | |
case "NT 5.0": | |
return "2000"; | |
case "NT 5.1": | |
return "XP"; | |
case "NT 5.2": | |
return "2003"; | |
case "NT 6.0": | |
return "Vista"; | |
case "NT 6.1": | |
return "7"; | |
case "NT 6.2": | |
return "8"; | |
case "NT 6.3": | |
return "8.1"; | |
case "NT 10.0": | |
return "10"; | |
default: | |
return; | |
} | |
} | |
var yt = ""; | |
dt.windows | |
? (yt = Ot(at(/Windows ((NT|XP)( \d\d?.\d)?)/i))) | |
: dt.windowsphone | |
? (yt = at(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i)) | |
: dt.mac | |
? ((yt = at(/Mac OS X (\d+([_\.\s]\d+)*)/i)), | |
(yt = yt.replace(/[_\s]/g, "."))) | |
: mt | |
? ((yt = at(/os (\d+([_\s]\d+)*) like mac os x/i)), | |
(yt = yt.replace(/[_\s]/g, "."))) | |
: xt | |
? (yt = at(/android[ \/-](\d+(\.\d+)*)/i)) | |
: dt.webos | |
? (yt = at(/(?:web|hpw)os\/(\d+(\.\d+)*)/i)) | |
: dt.blackberry | |
? (yt = at(/rim\stablet\sos\s(\d+(\.\d+)*)/i)) | |
: dt.bada | |
? (yt = at(/bada\/(\d+(\.\d+)*)/i)) | |
: dt.tizen && (yt = at(/tizen[\/\s](\d+(\.\d+)*)/i)), | |
yt && (dt.osversion = yt); | |
var bt = !dt.windows && yt.split(".")[0]; | |
return ( | |
nt || | |
$t || | |
mt == "ipad" || | |
(xt && (bt == 3 || (bt >= 4 && !ut))) || | |
dt.silk | |
? (dt.tablet = o) | |
: (ut || | |
mt == "iphone" || | |
mt == "ipod" || | |
xt || | |
St || | |
dt.blackberry || | |
dt.webos || | |
dt.bada) && | |
(dt.mobile = o), | |
dt.msedge || | |
(dt.msie && dt.version >= 10) || | |
(dt.yandexbrowser && dt.version >= 15) || | |
(dt.vivaldi && dt.version >= 1) || | |
(dt.chrome && dt.version >= 20) || | |
(dt.samsungBrowser && dt.version >= 4) || | |
(dt.whale && rt([dt.version, "1.0"]) === 1) || | |
(dt.mzbrowser && rt([dt.version, "6.0"]) === 1) || | |
(dt.focus && rt([dt.version, "1.0"]) === 1) || | |
(dt.firefox && dt.version >= 20) || | |
(dt.safari && dt.version >= 6) || | |
(dt.opera && dt.version >= 10) || | |
(dt.ios && dt.osversion && dt.osversion.split(".")[0] >= 6) || | |
(dt.blackberry && dt.version >= 10.1) || | |
(dt.chromium && dt.version >= 20) | |
? (dt.a = o) | |
: (dt.msie && dt.version < 10) || | |
(dt.chrome && dt.version < 20) || | |
(dt.firefox && dt.version < 20) || | |
(dt.safari && dt.version < 6) || | |
(dt.opera && dt.version < 10) || | |
(dt.ios && dt.osversion && dt.osversion.split(".")[0] < 6) || | |
(dt.chromium && dt.version < 20) | |
? (dt.c = o) | |
: (dt.x = o), | |
dt | |
); | |
} | |
var _e = _((typeof navigator < "u" && navigator.userAgent) || ""); | |
_e.test = function (ct) { | |
for (var at = 0; at < ct.length; ++at) { | |
var ht = ct[at]; | |
if (typeof ht == "string" && ht in _e) return !0; | |
} | |
return !1; | |
}; | |
function et(ct) { | |
return ct.split(".").length; | |
} | |
function tt(ct, at) { | |
var ht = [], | |
mt; | |
if (Array.prototype.map) return Array.prototype.map.call(ct, at); | |
for (mt = 0; mt < ct.length; mt++) ht.push(at(ct[mt])); | |
return ht; | |
} | |
function rt(ct) { | |
for ( | |
var at = Math.max(et(ct[0]), et(ct[1])), | |
ht = tt(ct, function (mt) { | |
var vt = at - et(mt); | |
return ( | |
(mt = mt + new Array(vt + 1).join(".0")), | |
tt(mt.split("."), function (xt) { | |
return new Array(20 - xt.length).join("0") + xt; | |
}).reverse() | |
); | |
}); | |
--at >= 0; | |
) { | |
if (ht[0][at] > ht[1][at]) return 1; | |
if (ht[0][at] === ht[1][at]) { | |
if (at === 0) return 0; | |
} else return -1; | |
} | |
} | |
function it(ct, at, ht) { | |
var mt = _e; | |
typeof at == "string" && ((ht = at), (at = void 0)), | |
at === void 0 && (at = !1), | |
ht && (mt = _(ht)); | |
var vt = "" + mt.version; | |
for (var xt in ct) | |
if (ct.hasOwnProperty(xt) && mt[xt]) { | |
if (typeof ct[xt] != "string") | |
throw new Error( | |
"Browser version in the minVersion map should be a string: " + | |
xt + | |
": " + | |
String(ct), | |
); | |
return rt([vt, ct[xt]]) < 0; | |
} | |
return at; | |
} | |
function ot(ct, at, ht) { | |
return !it(ct, at, ht); | |
} | |
return ( | |
(_e.isUnsupportedBrowser = it), | |
(_e.compareVersions = rt), | |
(_e.check = ot), | |
(_e._detect = _), | |
(_e.detect = _), | |
_e | |
); | |
}); | |
})(bowser); | |
var bowserExports = bowser.exports; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = ot); | |
var _ = bowserExports, | |
_e = et(_); | |
function et(ct) { | |
return ct && ct.__esModule ? ct : { default: ct }; | |
} | |
var tt = { | |
chrome: "Webkit", | |
safari: "Webkit", | |
ios: "Webkit", | |
android: "Webkit", | |
phantom: "Webkit", | |
opera: "Webkit", | |
webos: "Webkit", | |
blackberry: "Webkit", | |
bada: "Webkit", | |
tizen: "Webkit", | |
chromium: "Webkit", | |
vivaldi: "Webkit", | |
firefox: "Moz", | |
seamoney: "Moz", | |
sailfish: "Moz", | |
msie: "ms", | |
msedge: "ms", | |
}, | |
rt = { | |
chrome: "chrome", | |
chromium: "chrome", | |
safari: "safari", | |
firfox: "firefox", | |
msedge: "edge", | |
opera: "opera", | |
vivaldi: "opera", | |
msie: "ie", | |
}; | |
function it(ct) { | |
if (ct.firefox) return "firefox"; | |
if (ct.mobile || ct.tablet) { | |
if (ct.ios) return "ios_saf"; | |
if (ct.android) return "android"; | |
if (ct.opera) return "op_mini"; | |
} | |
for (var at in rt) if (ct.hasOwnProperty(at)) return rt[at]; | |
} | |
function ot(ct) { | |
var at = _e.default._detect(ct); | |
at.yandexbrowser && | |
(at = _e.default._detect(ct.replace(/YaBrowser\/[0-9.]*/, ""))); | |
for (var ht in tt) | |
if (at.hasOwnProperty(ht)) { | |
var mt = tt[ht]; | |
(at.jsPrefix = mt), (at.cssPrefix = "-" + mt.toLowerCase() + "-"); | |
break; | |
} | |
return ( | |
(at.browserName = it(at)), | |
at.version | |
? (at.browserVersion = parseFloat(at.version)) | |
: (at.browserVersion = parseInt(parseFloat(at.osversion), 10)), | |
(at.osVersion = parseFloat(at.osversion)), | |
at.browserName === "ios_saf" && | |
at.browserVersion > at.osVersion && | |
(at.browserVersion = at.osVersion), | |
at.browserName === "android" && | |
at.chrome && | |
at.browserVersion > 37 && | |
(at.browserName = "and_chr"), | |
at.browserName === "android" && | |
at.osVersion < 5 && | |
(at.browserVersion = at.osVersion), | |
at.browserName === "android" && | |
at.samsungBrowser && | |
((at.browserName = "and_chr"), (at.browserVersion = 44)), | |
at | |
); | |
} | |
s.exports = o.default; | |
})(getBrowserInformation, getBrowserInformation.exports); | |
var getBrowserInformationExports = getBrowserInformation.exports, | |
getPrefixedKeyframes$1 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = _); | |
function _(_e, et, tt) { | |
var rt = "keyframes"; | |
return (_e === "chrome" && et < 43) || | |
((_e === "safari" || _e === "ios_saf") && et < 9) || | |
(_e === "opera" && et < 30) || | |
(_e === "android" && et <= 4.4) || | |
_e === "and_uc" | |
? tt + rt | |
: rt; | |
} | |
s.exports = o.default; | |
})(getPrefixedKeyframes$1, getPrefixedKeyframes$1.exports); | |
var getPrefixedKeyframesExports = getPrefixedKeyframes$1.exports; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }); | |
var _ = (function () { | |
function _t(Rt, Mt) { | |
for (var It = 0; It < Mt.length; It++) { | |
var Xt = Mt[It]; | |
(Xt.enumerable = Xt.enumerable || !1), | |
(Xt.configurable = !0), | |
"value" in Xt && (Xt.writable = !0), | |
Object.defineProperty(Rt, Xt.key, Xt); | |
} | |
} | |
return function (Rt, Mt, It) { | |
return Mt && _t(Rt.prototype, Mt), It && _t(Rt, It), Rt; | |
}; | |
})(); | |
o.default = Et; | |
var _e = getBrowserInformationExports, | |
et = St(_e), | |
tt = getPrefixedKeyframesExports, | |
rt = St(tt), | |
it = capitalizeStringExports, | |
ot = St(it), | |
ct = addNewValuesOnlyExports, | |
at = St(ct), | |
ht = isObjectExports, | |
mt = St(ht), | |
vt = prefixValueExports, | |
xt = St(vt); | |
function St(_t) { | |
return _t && _t.__esModule ? _t : { default: _t }; | |
} | |
function $t(_t, Rt) { | |
if (!(_t instanceof Rt)) | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
function Et(_t) { | |
var Rt = _t.prefixMap, | |
Mt = _t.plugins, | |
It = | |
arguments.length > 1 && arguments[1] !== void 0 | |
? arguments[1] | |
: function (Xt) { | |
return Xt; | |
}; | |
return (function () { | |
function Xt() { | |
var Jt = | |
arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
$t(this, Xt); | |
var Ht = typeof navigator < "u" ? navigator.userAgent : void 0; | |
if ( | |
((this._userAgent = Jt.userAgent || Ht), | |
(this._keepUnprefixed = Jt.keepUnprefixed || !1), | |
this._userAgent && | |
(this._browserInfo = (0, et.default)(this._userAgent)), | |
this._browserInfo && this._browserInfo.cssPrefix) | |
) | |
this.prefixedKeyframes = (0, rt.default)( | |
this._browserInfo.browserName, | |
this._browserInfo.browserVersion, | |
this._browserInfo.cssPrefix, | |
); | |
else return (this._useFallback = !0), !1; | |
var qt = | |
this._browserInfo.browserName && Rt[this._browserInfo.browserName]; | |
if (qt) { | |
this._requiresPrefix = {}; | |
for (var nr in qt) | |
qt[nr] >= this._browserInfo.browserVersion && | |
(this._requiresPrefix[nr] = !0); | |
this._hasPropsRequiringPrefix = | |
Object.keys(this._requiresPrefix).length > 0; | |
} else this._useFallback = !0; | |
this._metaData = { | |
browserVersion: this._browserInfo.browserVersion, | |
browserName: this._browserInfo.browserName, | |
cssPrefix: this._browserInfo.cssPrefix, | |
jsPrefix: this._browserInfo.jsPrefix, | |
keepUnprefixed: this._keepUnprefixed, | |
requiresPrefix: this._requiresPrefix, | |
}; | |
} | |
return ( | |
_( | |
Xt, | |
[ | |
{ | |
key: "prefix", | |
value: function (Ht) { | |
return this._useFallback | |
? It(Ht) | |
: this._hasPropsRequiringPrefix | |
? this._prefixStyle(Ht) | |
: Ht; | |
}, | |
}, | |
{ | |
key: "_prefixStyle", | |
value: function (Ht) { | |
for (var qt in Ht) { | |
var nr = Ht[qt]; | |
if ((0, mt.default)(nr)) Ht[qt] = this.prefix(nr); | |
else if (Array.isArray(nr)) { | |
for (var wt = [], nt = 0, ut = nr.length; nt < ut; ++nt) { | |
var ft = (0, xt.default)( | |
Mt, | |
qt, | |
nr[nt], | |
Ht, | |
this._metaData, | |
); | |
(0, at.default)(wt, ft || nr[nt]); | |
} | |
wt.length > 0 && (Ht[qt] = wt); | |
} else { | |
var dt = (0, xt.default)(Mt, qt, nr, Ht, this._metaData); | |
dt && (Ht[qt] = dt), | |
this._requiresPrefix.hasOwnProperty(qt) && | |
((Ht[ | |
this._browserInfo.jsPrefix + (0, ot.default)(qt) | |
] = nr), | |
this._keepUnprefixed || delete Ht[qt]); | |
} | |
} | |
return Ht; | |
}, | |
}, | |
], | |
[ | |
{ | |
key: "prefixAll", | |
value: function (Ht) { | |
return It(Ht); | |
}, | |
}, | |
], | |
), | |
Xt | |
); | |
})(); | |
} | |
s.exports = o.default; | |
})(createPrefixer, createPrefixer.exports); | |
var createPrefixerExports = createPrefixer.exports; | |
const createDynamicPrefixer = getDefaultExportFromCjs$1( | |
createPrefixerExports, | |
); | |
var exenv = { exports: {} }; | |
/*! | |
Copyright (c) 2015 Jed Watson. | |
Based on code that is Copyright 2013-2015, Facebook, Inc. | |
All rights reserved. | |
*/ (function (s) { | |
(function () { | |
var o = !!( | |
typeof window < "u" && | |
window.document && | |
window.document.createElement | |
), | |
_ = { | |
canUseDOM: o, | |
canUseWorkers: typeof Worker < "u", | |
canUseEventListeners: | |
o && !!(window.addEventListener || window.attachEvent), | |
canUseViewport: o && !!window.screen, | |
}; | |
s.exports ? (s.exports = _) : (window.ExecutionEnvironment = _); | |
})(); | |
})(exenv); | |
var exenvExports = exenv.exports; | |
const ExecutionEnvironment = getDefaultExportFromCjs$1(exenvExports); | |
var calc$3 = { exports: {} }, | |
isPrefixedValue = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = _e); | |
var _ = /-webkit-|-moz-|-ms-/; | |
function _e(et) { | |
return typeof et == "string" && _.test(et); | |
} | |
s.exports = o.default; | |
})(isPrefixedValue, isPrefixedValue.exports); | |
var isPrefixedValueExports = isPrefixedValue.exports; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = rt); | |
var _ = isPrefixedValueExports, | |
_e = et(_); | |
function et(it) { | |
return it && it.__esModule ? it : { default: it }; | |
} | |
var tt = ["-webkit-", "-moz-", ""]; | |
function rt(it, ot) { | |
if ( | |
typeof ot == "string" && | |
!(0, _e.default)(ot) && | |
ot.indexOf("calc(") > -1 | |
) | |
return tt.map(function (ct) { | |
return ot.replace(/calc\(/g, ct + "calc("); | |
}); | |
} | |
s.exports = o.default; | |
})(calc$3, calc$3.exports); | |
var calcExports$1 = calc$3.exports; | |
const calc$2 = getDefaultExportFromCjs$1(calcExports$1); | |
var crossFade$3 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = rt); | |
var _ = isPrefixedValueExports, | |
_e = et(_); | |
function et(it) { | |
return it && it.__esModule ? it : { default: it }; | |
} | |
var tt = ["-webkit-", ""]; | |
function rt(it, ot) { | |
if ( | |
typeof ot == "string" && | |
!(0, _e.default)(ot) && | |
ot.indexOf("cross-fade(") > -1 | |
) | |
return tt.map(function (ct) { | |
return ot.replace(/cross-fade\(/g, ct + "cross-fade("); | |
}); | |
} | |
s.exports = o.default; | |
})(crossFade$3, crossFade$3.exports); | |
var crossFadeExports$1 = crossFade$3.exports; | |
const crossFade$2 = getDefaultExportFromCjs$1(crossFadeExports$1); | |
var cursor$4 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = et); | |
var _ = ["-webkit-", "-moz-", ""], | |
_e = { "zoom-in": !0, "zoom-out": !0, grab: !0, grabbing: !0 }; | |
function et(tt, rt) { | |
if (tt === "cursor" && _e.hasOwnProperty(rt)) | |
return _.map(function (it) { | |
return it + rt; | |
}); | |
} | |
s.exports = o.default; | |
})(cursor$4, cursor$4.exports); | |
var cursorExports$1 = cursor$4.exports; | |
const cursor$3 = getDefaultExportFromCjs$1(cursorExports$1); | |
var filter$5 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = rt); | |
var _ = isPrefixedValueExports, | |
_e = et(_); | |
function et(it) { | |
return it && it.__esModule ? it : { default: it }; | |
} | |
var tt = ["-webkit-", ""]; | |
function rt(it, ot) { | |
if ( | |
typeof ot == "string" && | |
!(0, _e.default)(ot) && | |
ot.indexOf("filter(") > -1 | |
) | |
return tt.map(function (ct) { | |
return ot.replace(/filter\(/g, ct + "filter("); | |
}); | |
} | |
s.exports = o.default; | |
})(filter$5, filter$5.exports); | |
var filterExports$1 = filter$5.exports; | |
const filter$4 = getDefaultExportFromCjs$1(filterExports$1); | |
var flex$3 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = _e); | |
var _ = { | |
flex: ["-webkit-box", "-moz-box", "-ms-flexbox", "-webkit-flex", "flex"], | |
"inline-flex": [ | |
"-webkit-inline-box", | |
"-moz-inline-box", | |
"-ms-inline-flexbox", | |
"-webkit-inline-flex", | |
"inline-flex", | |
], | |
}; | |
function _e(et, tt) { | |
if (et === "display" && _.hasOwnProperty(tt)) return _[tt]; | |
} | |
s.exports = o.default; | |
})(flex$3, flex$3.exports); | |
var flexExports$1 = flex$3.exports; | |
const flex$2 = getDefaultExportFromCjs$1(flexExports$1); | |
var flexboxIE$3 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = et); | |
var _ = { | |
"space-around": "distribute", | |
"space-between": "justify", | |
"flex-start": "start", | |
"flex-end": "end", | |
}, | |
_e = { | |
alignContent: "msFlexLinePack", | |
alignSelf: "msFlexItemAlign", | |
alignItems: "msFlexAlign", | |
justifyContent: "msFlexPack", | |
order: "msFlexOrder", | |
flexGrow: "msFlexPositive", | |
flexShrink: "msFlexNegative", | |
flexBasis: "msFlexPreferredSize", | |
}; | |
function et(tt, rt, it) { | |
_e.hasOwnProperty(tt) && (it[_e[tt]] = _[rt] || rt); | |
} | |
s.exports = o.default; | |
})(flexboxIE$3, flexboxIE$3.exports); | |
var flexboxIEExports$1 = flexboxIE$3.exports; | |
const flexboxIE$2 = getDefaultExportFromCjs$1(flexboxIEExports$1); | |
var flexboxOld$3 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = et); | |
var _ = { | |
"space-around": "justify", | |
"space-between": "justify", | |
"flex-start": "start", | |
"flex-end": "end", | |
"wrap-reverse": "multiple", | |
wrap: "multiple", | |
flex: "box", | |
"inline-flex": "inline-box", | |
}, | |
_e = { | |
alignItems: "WebkitBoxAlign", | |
justifyContent: "WebkitBoxPack", | |
flexWrap: "WebkitBoxLines", | |
flexGrow: "WebkitBoxFlex", | |
}; | |
function et(tt, rt, it) { | |
tt === "flexDirection" && | |
typeof rt == "string" && | |
(rt.indexOf("column") > -1 | |
? (it.WebkitBoxOrient = "vertical") | |
: (it.WebkitBoxOrient = "horizontal"), | |
rt.indexOf("reverse") > -1 | |
? (it.WebkitBoxDirection = "reverse") | |
: (it.WebkitBoxDirection = "normal")), | |
_e.hasOwnProperty(tt) && (it[_e[tt]] = _[rt] || rt); | |
} | |
s.exports = o.default; | |
})(flexboxOld$3, flexboxOld$3.exports); | |
var flexboxOldExports$1 = flexboxOld$3.exports; | |
const flexboxOld$2 = getDefaultExportFromCjs$1(flexboxOldExports$1); | |
var gradient$3 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = it); | |
var _ = isPrefixedValueExports, | |
_e = et(_); | |
function et(ot) { | |
return ot && ot.__esModule ? ot : { default: ot }; | |
} | |
var tt = ["-webkit-", "-moz-", ""], | |
rt = | |
/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi; | |
function it(ot, ct) { | |
if (typeof ct == "string" && !(0, _e.default)(ct) && rt.test(ct)) | |
return tt.map(function (at) { | |
return ct.replace(rt, function (ht) { | |
return at + ht; | |
}); | |
}); | |
} | |
s.exports = o.default; | |
})(gradient$3, gradient$3.exports); | |
var gradientExports$1 = gradient$3.exports; | |
const gradient$2 = getDefaultExportFromCjs$1(gradientExports$1); | |
var imageSet$3 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = rt); | |
var _ = isPrefixedValueExports, | |
_e = et(_); | |
function et(it) { | |
return it && it.__esModule ? it : { default: it }; | |
} | |
var tt = ["-webkit-", ""]; | |
function rt(it, ot) { | |
if ( | |
typeof ot == "string" && | |
!(0, _e.default)(ot) && | |
ot.indexOf("image-set(") > -1 | |
) | |
return tt.map(function (ct) { | |
return ot.replace(/image-set\(/g, ct + "image-set("); | |
}); | |
} | |
s.exports = o.default; | |
})(imageSet$3, imageSet$3.exports); | |
var imageSetExports$1 = imageSet$3.exports; | |
const imageSet$2 = getDefaultExportFromCjs$1(imageSetExports$1); | |
var position$7 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = _); | |
function _(_e, et) { | |
if (_e === "position" && et === "sticky") | |
return ["-webkit-sticky", "sticky"]; | |
} | |
s.exports = o.default; | |
})(position$7, position$7.exports); | |
var positionExports$1 = position$7.exports; | |
const position$6 = getDefaultExportFromCjs$1(positionExports$1); | |
var sizing$3 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = tt); | |
var _ = ["-webkit-", "-moz-", ""], | |
_e = { | |
maxHeight: !0, | |
maxWidth: !0, | |
width: !0, | |
height: !0, | |
columnWidth: !0, | |
minWidth: !0, | |
minHeight: !0, | |
}, | |
et = { | |
"min-content": !0, | |
"max-content": !0, | |
"fill-available": !0, | |
"fit-content": !0, | |
"contain-floats": !0, | |
}; | |
function tt(rt, it) { | |
if (_e.hasOwnProperty(rt) && et.hasOwnProperty(it)) | |
return _.map(function (ot) { | |
return ot + it; | |
}); | |
} | |
s.exports = o.default; | |
})(sizing$3, sizing$3.exports); | |
var sizingExports$1 = sizing$3.exports; | |
const sizing$2 = getDefaultExportFromCjs$1(sizingExports$1); | |
var transition$3 = { exports: {} }, | |
hyphenateProperty = { exports: {} }, | |
uppercasePattern = /[A-Z]/g, | |
msPattern = /^ms-/, | |
cache$4 = {}; | |
function toHyphenLower(s) { | |
return "-" + s.toLowerCase(); | |
} | |
function hyphenateStyleName(s) { | |
if (cache$4.hasOwnProperty(s)) return cache$4[s]; | |
var o = s.replace(uppercasePattern, toHyphenLower); | |
return (cache$4[s] = msPattern.test(o) ? "-" + o : o); | |
} | |
const hyphenateStyleName$1 = Object.freeze( | |
Object.defineProperty( | |
{ __proto__: null, default: hyphenateStyleName }, | |
Symbol.toStringTag, | |
{ value: "Module" }, | |
), | |
), | |
require$$0$3 = getAugmentedNamespace(hyphenateStyleName$1); | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = tt); | |
var _ = require$$0$3, | |
_e = et(_); | |
function et(rt) { | |
return rt && rt.__esModule ? rt : { default: rt }; | |
} | |
function tt(rt) { | |
return (0, _e.default)(rt); | |
} | |
s.exports = o.default; | |
})(hyphenateProperty, hyphenateProperty.exports); | |
var hyphenatePropertyExports = hyphenateProperty.exports; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = mt); | |
var _ = hyphenatePropertyExports, | |
_e = ot(_), | |
et = isPrefixedValueExports, | |
tt = ot(et), | |
rt = capitalizeStringExports, | |
it = ot(rt); | |
function ot(vt) { | |
return vt && vt.__esModule ? vt : { default: vt }; | |
} | |
var ct = { | |
transition: !0, | |
transitionProperty: !0, | |
WebkitTransition: !0, | |
WebkitTransitionProperty: !0, | |
MozTransition: !0, | |
MozTransitionProperty: !0, | |
}, | |
at = { Webkit: "-webkit-", Moz: "-moz-", ms: "-ms-" }; | |
function ht(vt, xt) { | |
if ((0, tt.default)(vt)) return vt; | |
for ( | |
var St = vt.split(/,(?![^()]*(?:\([^()]*\))?\))/g), | |
$t = 0, | |
Et = St.length; | |
$t < Et; | |
++$t | |
) { | |
var _t = St[$t], | |
Rt = [_t]; | |
for (var Mt in xt) { | |
var It = (0, _e.default)(Mt); | |
if (_t.indexOf(It) > -1 && It !== "order") | |
for (var Xt = xt[Mt], Jt = 0, Ht = Xt.length; Jt < Ht; ++Jt) | |
Rt.unshift(_t.replace(It, at[Xt[Jt]] + It)); | |
} | |
St[$t] = Rt.join(","); | |
} | |
return St.join(","); | |
} | |
function mt(vt, xt, St, $t) { | |
if (typeof xt == "string" && ct.hasOwnProperty(vt)) { | |
var Et = ht(xt, $t), | |
_t = Et.split(/,(?![^()]*(?:\([^()]*\))?\))/g) | |
.filter(function (Mt) { | |
return !/-moz-|-ms-/.test(Mt); | |
}) | |
.join(","); | |
if (vt.indexOf("Webkit") > -1) return _t; | |
var Rt = Et.split(/,(?![^()]*(?:\([^()]*\))?\))/g) | |
.filter(function (Mt) { | |
return !/-webkit-|-ms-/.test(Mt); | |
}) | |
.join(","); | |
return vt.indexOf("Moz") > -1 | |
? Rt | |
: ((St["Webkit" + (0, it.default)(vt)] = _t), | |
(St["Moz" + (0, it.default)(vt)] = Rt), | |
Et); | |
} | |
} | |
s.exports = o.default; | |
})(transition$3, transition$3.exports); | |
var transitionExports$1 = transition$3.exports; | |
const transition$2 = getDefaultExportFromCjs$1(transitionExports$1); | |
var w$2 = ["Webkit"], | |
m$1 = ["Moz"], | |
ms$1 = ["ms"], | |
wm = ["Webkit", "Moz"], | |
wms = ["Webkit", "ms"], | |
wmms = ["Webkit", "Moz", "ms"]; | |
const staticData = { | |
plugins: [ | |
calc$2, | |
crossFade$2, | |
cursor$3, | |
filter$4, | |
flex$2, | |
flexboxIE$2, | |
flexboxOld$2, | |
gradient$2, | |
imageSet$2, | |
position$6, | |
sizing$2, | |
transition$2, | |
], | |
prefixMap: { | |
transform: wms, | |
transformOrigin: wms, | |
transformOriginX: wms, | |
transformOriginY: wms, | |
backfaceVisibility: w$2, | |
perspective: w$2, | |
perspectiveOrigin: w$2, | |
transformStyle: w$2, | |
transformOriginZ: w$2, | |
animation: w$2, | |
animationDelay: w$2, | |
animationDirection: w$2, | |
animationFillMode: w$2, | |
animationDuration: w$2, | |
animationIterationCount: w$2, | |
animationName: w$2, | |
animationPlayState: w$2, | |
animationTimingFunction: w$2, | |
appearance: wm, | |
userSelect: wmms, | |
fontKerning: w$2, | |
textEmphasisPosition: w$2, | |
textEmphasis: w$2, | |
textEmphasisStyle: w$2, | |
textEmphasisColor: w$2, | |
boxDecorationBreak: w$2, | |
clipPath: w$2, | |
maskImage: w$2, | |
maskMode: w$2, | |
maskRepeat: w$2, | |
maskPosition: w$2, | |
maskClip: w$2, | |
maskOrigin: w$2, | |
maskSize: w$2, | |
maskComposite: w$2, | |
mask: w$2, | |
maskBorderSource: w$2, | |
maskBorderMode: w$2, | |
maskBorderSlice: w$2, | |
maskBorderWidth: w$2, | |
maskBorderOutset: w$2, | |
maskBorderRepeat: w$2, | |
maskBorder: w$2, | |
maskType: w$2, | |
textDecorationStyle: wm, | |
textDecorationSkip: wm, | |
textDecorationLine: wm, | |
textDecorationColor: wm, | |
filter: w$2, | |
fontFeatureSettings: wm, | |
breakAfter: wmms, | |
breakBefore: wmms, | |
breakInside: wmms, | |
columnCount: wm, | |
columnFill: wm, | |
columnGap: wm, | |
columnRule: wm, | |
columnRuleColor: wm, | |
columnRuleStyle: wm, | |
columnRuleWidth: wm, | |
columns: wm, | |
columnSpan: wm, | |
columnWidth: wm, | |
writingMode: wms, | |
flex: wms, | |
flexBasis: w$2, | |
flexDirection: wms, | |
flexGrow: w$2, | |
flexFlow: wms, | |
flexShrink: w$2, | |
flexWrap: wms, | |
alignContent: w$2, | |
alignItems: w$2, | |
alignSelf: w$2, | |
justifyContent: w$2, | |
order: w$2, | |
transitionDelay: w$2, | |
transitionDuration: w$2, | |
transitionProperty: w$2, | |
transitionTimingFunction: w$2, | |
backdropFilter: w$2, | |
scrollSnapType: wms, | |
scrollSnapPointsX: wms, | |
scrollSnapPointsY: wms, | |
scrollSnapDestination: wms, | |
scrollSnapCoordinate: wms, | |
shapeImageThreshold: w$2, | |
shapeImageMargin: w$2, | |
shapeImageOutside: w$2, | |
hyphens: wmms, | |
flowInto: wms, | |
flowFrom: wms, | |
regionFragment: wms, | |
boxSizing: m$1, | |
textAlignLast: m$1, | |
tabSize: m$1, | |
wrapFlow: ms$1, | |
wrapThrough: ms$1, | |
wrapMargin: ms$1, | |
touchAction: ms$1, | |
gridTemplateColumns: ms$1, | |
gridTemplateRows: ms$1, | |
gridTemplateAreas: ms$1, | |
gridTemplate: ms$1, | |
gridAutoColumns: ms$1, | |
gridAutoRows: ms$1, | |
gridAutoFlow: ms$1, | |
grid: ms$1, | |
gridRowStart: ms$1, | |
gridColumnStart: ms$1, | |
gridRowEnd: ms$1, | |
gridRow: ms$1, | |
gridColumn: ms$1, | |
gridColumnEnd: ms$1, | |
gridColumnGap: ms$1, | |
gridRowGap: ms$1, | |
gridArea: ms$1, | |
gridGap: ms$1, | |
textSizeAdjust: wms, | |
borderImage: w$2, | |
borderImageOutset: w$2, | |
borderImageRepeat: w$2, | |
borderImageSlice: w$2, | |
borderImageSource: w$2, | |
borderImageWidth: w$2, | |
}, | |
}; | |
var calc$1 = { exports: {} }, | |
getPrefixedValue = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = _); | |
function _(_e, et, tt) { | |
return tt ? [_e, et] : _e; | |
} | |
s.exports = o.default; | |
})(getPrefixedValue, getPrefixedValue.exports); | |
var getPrefixedValueExports = getPrefixedValue.exports; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = tt); | |
var _ = getPrefixedValueExports, | |
_e = et(_); | |
function et(rt) { | |
return rt && rt.__esModule ? rt : { default: rt }; | |
} | |
function tt(rt, it, ot, ct) { | |
var at = ct.browserName, | |
ht = ct.browserVersion, | |
mt = ct.cssPrefix, | |
vt = ct.keepUnprefixed; | |
if ( | |
typeof it == "string" && | |
it.indexOf("calc(") > -1 && | |
((at === "firefox" && ht < 15) || | |
(at === "chrome" && ht < 25) || | |
(at === "safari" && ht < 6.1) || | |
(at === "ios_saf" && ht < 7)) | |
) | |
return (0, _e.default)(it.replace(/calc\(/g, mt + "calc("), it, vt); | |
} | |
s.exports = o.default; | |
})(calc$1, calc$1.exports); | |
var calcExports = calc$1.exports; | |
const calc = getDefaultExportFromCjs$1(calcExports); | |
var crossFade$1 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = tt); | |
var _ = getPrefixedValueExports, | |
_e = et(_); | |
function et(rt) { | |
return rt && rt.__esModule ? rt : { default: rt }; | |
} | |
function tt(rt, it, ot, ct) { | |
var at = ct.browserName, | |
ht = ct.browserVersion, | |
mt = ct.cssPrefix, | |
vt = ct.keepUnprefixed; | |
if ( | |
typeof it == "string" && | |
it.indexOf("cross-fade(") > -1 && | |
(at === "chrome" || | |
at === "opera" || | |
at === "and_chr" || | |
((at === "ios_saf" || at === "safari") && ht < 10)) | |
) | |
return (0, _e.default)( | |
it.replace(/cross-fade\(/g, mt + "cross-fade("), | |
it, | |
vt, | |
); | |
} | |
s.exports = o.default; | |
})(crossFade$1, crossFade$1.exports); | |
var crossFadeExports = crossFade$1.exports; | |
const crossFade = getDefaultExportFromCjs$1(crossFadeExports); | |
var cursor$2 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = it); | |
var _ = getPrefixedValueExports, | |
_e = et(_); | |
function et(ot) { | |
return ot && ot.__esModule ? ot : { default: ot }; | |
} | |
var tt = { grab: !0, grabbing: !0 }, | |
rt = { "zoom-in": !0, "zoom-out": !0 }; | |
function it(ot, ct, at, ht) { | |
var mt = ht.browserName, | |
vt = ht.browserVersion, | |
xt = ht.cssPrefix, | |
St = ht.keepUnprefixed; | |
if ( | |
(ot === "cursor" && | |
tt[ct] && | |
(mt === "firefox" || | |
mt === "chrome" || | |
mt === "safari" || | |
mt === "opera")) || | |
(ot === "cursor" && | |
rt[ct] && | |
((mt === "firefox" && vt < 24) || | |
(mt === "chrome" && vt < 37) || | |
(mt === "safari" && vt < 9) || | |
(mt === "opera" && vt < 24))) | |
) | |
return (0, _e.default)(xt + ct, ct, St); | |
} | |
s.exports = o.default; | |
})(cursor$2, cursor$2.exports); | |
var cursorExports = cursor$2.exports; | |
const cursor$1 = getDefaultExportFromCjs$1(cursorExports); | |
var filter$3 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = tt); | |
var _ = getPrefixedValueExports, | |
_e = et(_); | |
function et(rt) { | |
return rt && rt.__esModule ? rt : { default: rt }; | |
} | |
function tt(rt, it, ot, ct) { | |
var at = ct.browserName, | |
ht = ct.browserVersion, | |
mt = ct.cssPrefix, | |
vt = ct.keepUnprefixed; | |
if ( | |
typeof it == "string" && | |
it.indexOf("filter(") > -1 && | |
(at === "ios_saf" || (at === "safari" && ht < 9.1)) | |
) | |
return (0, _e.default)(it.replace(/filter\(/g, mt + "filter("), it, vt); | |
} | |
s.exports = o.default; | |
})(filter$3, filter$3.exports); | |
var filterExports = filter$3.exports; | |
const filter$2 = getDefaultExportFromCjs$1(filterExports); | |
var flex$1 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = rt); | |
var _ = getPrefixedValueExports, | |
_e = et(_); | |
function et(it) { | |
return it && it.__esModule ? it : { default: it }; | |
} | |
var tt = { flex: !0, "inline-flex": !0 }; | |
function rt(it, ot, ct, at) { | |
var ht = at.browserName, | |
mt = at.browserVersion, | |
vt = at.cssPrefix, | |
xt = at.keepUnprefixed; | |
if ( | |
it === "display" && | |
tt[ot] && | |
((ht === "chrome" && mt < 29 && mt > 20) || | |
((ht === "safari" || ht === "ios_saf") && mt < 9 && mt > 6) || | |
(ht === "opera" && (mt === 15 || mt === 16))) | |
) | |
return (0, _e.default)(vt + ot, ot, xt); | |
} | |
s.exports = o.default; | |
})(flex$1, flex$1.exports); | |
var flexExports = flex$1.exports; | |
const flex = getDefaultExportFromCjs$1(flexExports); | |
var flexboxIE$1 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = it); | |
var _ = getPrefixedValueExports, | |
_e = et(_); | |
function et(ot) { | |
return ot && ot.__esModule ? ot : { default: ot }; | |
} | |
var tt = { | |
"space-around": "distribute", | |
"space-between": "justify", | |
"flex-start": "start", | |
"flex-end": "end", | |
flex: "flexbox", | |
"inline-flex": "inline-flexbox", | |
}, | |
rt = { | |
alignContent: "msFlexLinePack", | |
alignSelf: "msFlexItemAlign", | |
alignItems: "msFlexAlign", | |
justifyContent: "msFlexPack", | |
order: "msFlexOrder", | |
flexGrow: "msFlexPositive", | |
flexShrink: "msFlexNegative", | |
flexBasis: "msFlexPreferredSize", | |
}; | |
function it(ot, ct, at, ht) { | |
var mt = ht.browserName, | |
vt = ht.browserVersion, | |
xt = ht.cssPrefix, | |
St = ht.keepUnprefixed, | |
$t = ht.requiresPrefix; | |
if ( | |
(rt.hasOwnProperty(ot) || | |
(ot === "display" && | |
typeof ct == "string" && | |
ct.indexOf("flex") > -1)) && | |
(mt === "ie_mob" || mt === "ie") && | |
vt === 10 | |
) { | |
if ( | |
(delete $t[ot], | |
!St && !Array.isArray(at[ot]) && delete at[ot], | |
ot === "display" && tt.hasOwnProperty(ct)) | |
) | |
return (0, _e.default)(xt + tt[ct], ct, St); | |
rt.hasOwnProperty(ot) && (at[rt[ot]] = tt[ct] || ct); | |
} | |
} | |
s.exports = o.default; | |
})(flexboxIE$1, flexboxIE$1.exports); | |
var flexboxIEExports = flexboxIE$1.exports; | |
const flexboxIE = getDefaultExportFromCjs$1(flexboxIEExports); | |
var flexboxOld$1 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = ct); | |
var _ = getPrefixedValueExports, | |
_e = et(_); | |
function et(at) { | |
return at && at.__esModule ? at : { default: at }; | |
} | |
var tt = { | |
"space-around": "justify", | |
"space-between": "justify", | |
"flex-start": "start", | |
"flex-end": "end", | |
"wrap-reverse": "multiple", | |
wrap: "multiple", | |
flex: "box", | |
"inline-flex": "inline-box", | |
}, | |
rt = { | |
alignItems: "WebkitBoxAlign", | |
justifyContent: "WebkitBoxPack", | |
flexWrap: "WebkitBoxLines", | |
flexGrow: "WebkitBoxFlex", | |
}, | |
it = [ | |
"alignContent", | |
"alignSelf", | |
"order", | |
"flexGrow", | |
"flexShrink", | |
"flexBasis", | |
"flexDirection", | |
], | |
ot = Object.keys(rt).concat(it); | |
function ct(at, ht, mt, vt) { | |
var xt = vt.browserName, | |
St = vt.browserVersion, | |
$t = vt.cssPrefix, | |
Et = vt.keepUnprefixed, | |
_t = vt.requiresPrefix; | |
if ( | |
(ot.indexOf(at) > -1 || | |
(at === "display" && | |
typeof ht == "string" && | |
ht.indexOf("flex") > -1)) && | |
((xt === "firefox" && St < 22) || | |
(xt === "chrome" && St < 21) || | |
((xt === "safari" || xt === "ios_saf") && St <= 6.1) || | |
(xt === "android" && St < 4.4) || | |
xt === "and_uc") | |
) { | |
if ( | |
(delete _t[at], | |
!Et && !Array.isArray(mt[at]) && delete mt[at], | |
at === "flexDirection" && | |
typeof ht == "string" && | |
(ht.indexOf("column") > -1 | |
? (mt.WebkitBoxOrient = "vertical") | |
: (mt.WebkitBoxOrient = "horizontal"), | |
ht.indexOf("reverse") > -1 | |
? (mt.WebkitBoxDirection = "reverse") | |
: (mt.WebkitBoxDirection = "normal")), | |
at === "display" && tt.hasOwnProperty(ht)) | |
) | |
return (0, _e.default)($t + tt[ht], ht, Et); | |
rt.hasOwnProperty(at) && (mt[rt[at]] = tt[ht] || ht); | |
} | |
} | |
s.exports = o.default; | |
})(flexboxOld$1, flexboxOld$1.exports); | |
var flexboxOldExports = flexboxOld$1.exports; | |
const flexboxOld = getDefaultExportFromCjs$1(flexboxOldExports); | |
var gradient$1 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = rt); | |
var _ = getPrefixedValueExports, | |
_e = et(_); | |
function et(it) { | |
return it && it.__esModule ? it : { default: it }; | |
} | |
var tt = | |
/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi; | |
function rt(it, ot, ct, at) { | |
var ht = at.browserName, | |
mt = at.browserVersion, | |
vt = at.cssPrefix, | |
xt = at.keepUnprefixed; | |
if ( | |
typeof ot == "string" && | |
tt.test(ot) && | |
((ht === "firefox" && mt < 16) || | |
(ht === "chrome" && mt < 26) || | |
((ht === "safari" || ht === "ios_saf") && mt < 7) || | |
((ht === "opera" || ht === "op_mini") && mt < 12.1) || | |
(ht === "android" && mt < 4.4) || | |
ht === "and_uc") | |
) | |
return (0, _e.default)( | |
ot.replace(tt, function (St) { | |
return vt + St; | |
}), | |
ot, | |
xt, | |
); | |
} | |
s.exports = o.default; | |
})(gradient$1, gradient$1.exports); | |
var gradientExports = gradient$1.exports; | |
const gradient = getDefaultExportFromCjs$1(gradientExports); | |
var imageSet$1 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = tt); | |
var _ = getPrefixedValueExports, | |
_e = et(_); | |
function et(rt) { | |
return rt && rt.__esModule ? rt : { default: rt }; | |
} | |
function tt(rt, it, ot, ct) { | |
var at = ct.browserName, | |
ht = ct.cssPrefix, | |
mt = ct.keepUnprefixed; | |
if ( | |
typeof it == "string" && | |
it.indexOf("image-set(") > -1 && | |
(at === "chrome" || | |
at === "opera" || | |
at === "and_chr" || | |
at === "and_uc" || | |
at === "ios_saf" || | |
at === "safari") | |
) | |
return (0, _e.default)( | |
it.replace(/image-set\(/g, ht + "image-set("), | |
it, | |
mt, | |
); | |
} | |
s.exports = o.default; | |
})(imageSet$1, imageSet$1.exports); | |
var imageSetExports = imageSet$1.exports; | |
const imageSet = getDefaultExportFromCjs$1(imageSetExports); | |
var position$5 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = tt); | |
var _ = getPrefixedValueExports, | |
_e = et(_); | |
function et(rt) { | |
return rt && rt.__esModule ? rt : { default: rt }; | |
} | |
function tt(rt, it, ot, ct) { | |
var at = ct.browserName, | |
ht = ct.cssPrefix, | |
mt = ct.keepUnprefixed; | |
if ( | |
rt === "position" && | |
it === "sticky" && | |
(at === "safari" || at === "ios_saf") | |
) | |
return (0, _e.default)(ht + it, it, mt); | |
} | |
s.exports = o.default; | |
})(position$5, position$5.exports); | |
var positionExports = position$5.exports; | |
const position$4 = getDefaultExportFromCjs$1(positionExports); | |
var sizing$1 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = it); | |
var _ = getPrefixedValueExports, | |
_e = et(_); | |
function et(ot) { | |
return ot && ot.__esModule ? ot : { default: ot }; | |
} | |
var tt = { | |
maxHeight: !0, | |
maxWidth: !0, | |
width: !0, | |
height: !0, | |
columnWidth: !0, | |
minWidth: !0, | |
minHeight: !0, | |
}, | |
rt = { | |
"min-content": !0, | |
"max-content": !0, | |
"fill-available": !0, | |
"fit-content": !0, | |
"contain-floats": !0, | |
}; | |
function it(ot, ct, at, ht) { | |
var mt = ht.cssPrefix, | |
vt = ht.keepUnprefixed; | |
if (tt.hasOwnProperty(ot) && rt.hasOwnProperty(ct)) | |
return (0, _e.default)(mt + ct, ct, vt); | |
} | |
s.exports = o.default; | |
})(sizing$1, sizing$1.exports); | |
var sizingExports = sizing$1.exports; | |
const sizing = getDefaultExportFromCjs$1(sizingExports); | |
var transition$1 = { exports: {} }; | |
(function (s, o) { | |
Object.defineProperty(o, "__esModule", { value: !0 }), (o.default = it); | |
var _ = hyphenatePropertyExports, | |
_e = et(_); | |
function et(ot) { | |
return ot && ot.__esModule ? ot : { default: ot }; | |
} | |
var tt = { | |
transition: !0, | |
transitionProperty: !0, | |
WebkitTransition: !0, | |
WebkitTransitionProperty: !0, | |
MozTransition: !0, | |
MozTransitionProperty: !0, | |
}, | |
rt = void 0; | |
function it(ot, ct, at, ht) { | |
var mt = ht.cssPrefix, | |
vt = ht.keepUnprefixed, | |
xt = ht.requiresPrefix; | |
if (typeof ct == "string" && tt.hasOwnProperty(ot)) { | |
rt || | |
(rt = Object.keys(xt).map(function ($t) { | |
return (0, _e.default)($t); | |
})); | |
var St = ct.split(/,(?![^()]*(?:\([^()]*\))?\))/g); | |
return ( | |
rt.forEach(function ($t) { | |
St.forEach(function (Et, _t) { | |
Et.indexOf($t) > -1 && | |
$t !== "order" && | |
(St[_t] = Et.replace($t, mt + $t) + (vt ? "," + Et : "")); | |
}); | |
}), | |
St.join(",") | |
); | |
} | |
} | |
s.exports = o.default; | |
})(transition$1, transition$1.exports); | |
var transitionExports = transition$1.exports; | |
const transition = getDefaultExportFromCjs$1(transitionExports), | |
dynamicData = { | |
plugins: [ | |
calc, | |
crossFade, | |
cursor$1, | |
filter$2, | |
flex, | |
flexboxIE, | |
flexboxOld, | |
gradient, | |
imageSet, | |
position$4, | |
sizing, | |
transition, | |
], | |
prefixMap: { | |
chrome: { | |
transform: 35, | |
transformOrigin: 35, | |
transformOriginX: 35, | |
transformOriginY: 35, | |
backfaceVisibility: 35, | |
perspective: 35, | |
perspectiveOrigin: 35, | |
transformStyle: 35, | |
transformOriginZ: 35, | |
animation: 42, | |
animationDelay: 42, | |
animationDirection: 42, | |
animationFillMode: 42, | |
animationDuration: 42, | |
animationIterationCount: 42, | |
animationName: 42, | |
animationPlayState: 42, | |
animationTimingFunction: 42, | |
appearance: 66, | |
userSelect: 53, | |
fontKerning: 32, | |
textEmphasisPosition: 66, | |
textEmphasis: 66, | |
textEmphasisStyle: 66, | |
textEmphasisColor: 66, | |
boxDecorationBreak: 66, | |
clipPath: 54, | |
maskImage: 66, | |
maskMode: 66, | |
maskRepeat: 66, | |
maskPosition: 66, | |
maskClip: 66, | |
maskOrigin: 66, | |
maskSize: 66, | |
maskComposite: 66, | |
mask: 66, | |
maskBorderSource: 66, | |
maskBorderMode: 66, | |
maskBorderSlice: 66, | |
maskBorderWidth: 66, | |
maskBorderOutset: 66, | |
maskBorderRepeat: 66, | |
maskBorder: 66, | |
maskType: 66, | |
textDecorationStyle: 56, | |
textDecorationSkip: 56, | |
textDecorationLine: 56, | |
textDecorationColor: 56, | |
filter: 52, | |
fontFeatureSettings: 47, | |
breakAfter: 49, | |
breakBefore: 49, | |
breakInside: 49, | |
columnCount: 49, | |
columnFill: 49, | |
columnGap: 49, | |
columnRule: 49, | |
columnRuleColor: 49, | |
columnRuleStyle: 49, | |
columnRuleWidth: 49, | |
columns: 49, | |
columnSpan: 49, | |
columnWidth: 49, | |
writingMode: 47, | |
}, | |
safari: { | |
flex: 8, | |
flexBasis: 8, | |
flexDirection: 8, | |
flexGrow: 8, | |
flexFlow: 8, | |
flexShrink: 8, | |
flexWrap: 8, | |
alignContent: 8, | |
alignItems: 8, | |
alignSelf: 8, | |
justifyContent: 8, | |
order: 8, | |
transition: 6, | |
transitionDelay: 6, | |
transitionDuration: 6, | |
transitionProperty: 6, | |
transitionTimingFunction: 6, | |
transform: 8, | |
transformOrigin: 8, | |
transformOriginX: 8, | |
transformOriginY: 8, | |
backfaceVisibility: 8, | |
perspective: 8, | |
perspectiveOrigin: 8, | |
transformStyle: 8, | |
transformOriginZ: 8, | |
animation: 8, | |
animationDelay: 8, | |
animationDirection: 8, | |
animationFillMode: 8, | |
animationDuration: 8, | |
animationIterationCount: 8, | |
animationName: 8, | |
animationPlayState: 8, | |
animationTimingFunction: 8, | |
appearance: 11, | |
userSelect: 11, | |
backdropFilter: 11, | |
fontKerning: 9, | |
scrollSnapType: 10.1, | |
scrollSnapPointsX: 10.1, | |
scrollSnapPointsY: 10.1, | |
scrollSnapDestination: 10.1, | |
scrollSnapCoordinate: 10.1, | |
textEmphasisPosition: 7, | |
textEmphasis: 7, | |
textEmphasisStyle: 7, | |
textEmphasisColor: 7, | |
boxDecorationBreak: 11, | |
clipPath: 11, | |
maskImage: 11, | |
maskMode: 11, | |
maskRepeat: 11, | |
maskPosition: 11, | |
maskClip: 11, | |
maskOrigin: 11, | |
maskSize: 11, | |
maskComposite: 11, | |
mask: 11, | |
maskBorderSource: 11, | |
maskBorderMode: 11, | |
maskBorderSlice: 11, | |
maskBorderWidth: 11, | |
maskBorderOutset: 11, | |
maskBorderRepeat: 11, | |
maskBorder: 11, | |
maskType: 11, | |
textDecorationStyle: 11, | |
textDecorationSkip: 11, | |
textDecorationLine: 11, | |
textDecorationColor: 11, | |
shapeImageThreshold: 10, | |
shapeImageMargin: 10, | |
shapeImageOutside: 10, | |
filter: 9, | |
hyphens: 11, | |
flowInto: 11, | |
flowFrom: 11, | |
breakBefore: 8, | |
breakAfter: 8, | |
breakInside: 8, | |
regionFragment: 11, | |
columnCount: 8, | |
columnFill: 8, | |
columnGap: 8, | |
columnRule: 8, | |
columnRuleColor: 8, | |
columnRuleStyle: 8, | |
columnRuleWidth: 8, | |
columns: 8, | |
columnSpan: 8, | |
columnWidth: 8, | |
writingMode: 10.1, | |
}, | |
firefox: { | |
appearance: 60, | |
userSelect: 60, | |
boxSizing: 28, | |
textAlignLast: 48, | |
textDecorationStyle: 35, | |
textDecorationSkip: 35, | |
textDecorationLine: 35, | |
textDecorationColor: 35, | |
tabSize: 60, | |
hyphens: 42, | |
fontFeatureSettings: 33, | |
breakAfter: 51, | |
breakBefore: 51, | |
breakInside: 51, | |
columnCount: 51, | |
columnFill: 51, | |
columnGap: 51, | |
columnRule: 51, | |
columnRuleColor: 51, | |
columnRuleStyle: 51, | |
columnRuleWidth: 51, | |
columns: 51, | |
columnSpan: 51, | |
columnWidth: 51, | |
}, | |
opera: { | |
flex: 16, | |
flexBasis: 16, | |
flexDirection: 16, | |
flexGrow: 16, | |
flexFlow: 16, | |
flexShrink: 16, | |
flexWrap: 16, | |
alignContent: 16, | |
alignItems: 16, | |
alignSelf: 16, | |
justifyContent: 16, | |
order: 16, | |
transform: 22, | |
transformOrigin: 22, | |
transformOriginX: 22, | |
transformOriginY: 22, | |
backfaceVisibility: 22, | |
perspective: 22, | |
perspectiveOrigin: 22, | |
transformStyle: 22, | |
transformOriginZ: 22, | |
animation: 29, | |
animationDelay: 29, | |
animationDirection: 29, | |
animationFillMode: 29, | |
animationDuration: 29, | |
animationIterationCount: 29, | |
animationName: 29, | |
animationPlayState: 29, | |
animationTimingFunction: 29, | |
appearance: 50, | |
userSelect: 40, | |
fontKerning: 19, | |
textEmphasisPosition: 50, | |
textEmphasis: 50, | |
textEmphasisStyle: 50, | |
textEmphasisColor: 50, | |
boxDecorationBreak: 50, | |
clipPath: 41, | |
maskImage: 50, | |
maskMode: 50, | |
maskRepeat: 50, | |
maskPosition: 50, | |
maskClip: 50, | |
maskOrigin: 50, | |
maskSize: 50, | |
maskComposite: 50, | |
mask: 50, | |
maskBorderSource: 50, | |
maskBorderMode: 50, | |
maskBorderSlice: 50, | |
maskBorderWidth: 50, | |
maskBorderOutset: 50, | |
maskBorderRepeat: 50, | |
maskBorder: 50, | |
maskType: 50, | |
textDecorationStyle: 43, | |
textDecorationSkip: 43, | |
textDecorationLine: 43, | |
textDecorationColor: 43, | |
filter: 39, | |
fontFeatureSettings: 34, | |
breakAfter: 36, | |
breakBefore: 36, | |
breakInside: 36, | |
columnCount: 36, | |
columnFill: 36, | |
columnGap: 36, | |
columnRule: 36, | |
columnRuleColor: 36, | |
columnRuleStyle: 36, | |
columnRuleWidth: 36, | |
columns: 36, | |
columnSpan: 36, | |
columnWidth: 36, | |
writingMode: 34, | |
}, | |
ie: { | |
flex: 10, | |
flexDirection: 10, | |
flexFlow: 10, | |
flexWrap: 10, | |
transform: 9, | |
transformOrigin: 9, | |
transformOriginX: 9, | |
transformOriginY: 9, | |
userSelect: 11, | |
wrapFlow: 11, | |
wrapThrough: 11, | |
wrapMargin: 11, | |
scrollSnapType: 11, | |
scrollSnapPointsX: 11, | |
scrollSnapPointsY: 11, | |
scrollSnapDestination: 11, | |
scrollSnapCoordinate: 11, | |
touchAction: 10, | |
hyphens: 11, | |
flowInto: 11, | |
flowFrom: 11, | |
breakBefore: 11, | |
breakAfter: 11, | |
breakInside: 11, | |
regionFragment: 11, | |
gridTemplateColumns: 11, | |
gridTemplateRows: 11, | |
gridTemplateAreas: 11, | |
gridTemplate: 11, | |
gridAutoColumns: 11, | |
gridAutoRows: 11, | |
gridAutoFlow: 11, | |
grid: 11, | |
gridRowStart: 11, | |
gridColumnStart: 11, | |
gridRowEnd: 11, | |
gridRow: 11, | |
gridColumn: 11, | |
gridColumnEnd: 11, | |
gridColumnGap: 11, | |
gridRowGap: 11, | |
gridArea: 11, | |
gridGap: 11, | |
textSizeAdjust: 11, | |
writingMode: 11, | |
}, | |
edge: { | |
userSelect: 17, | |
wrapFlow: 17, | |
wrapThrough: 17, | |
wrapMargin: 17, | |
scrollSnapType: 17, | |
scrollSnapPointsX: 17, | |
scrollSnapPointsY: 17, | |
scrollSnapDestination: 17, | |
scrollSnapCoordinate: 17, | |
hyphens: 17, | |
flowInto: 17, | |
flowFrom: 17, | |
breakBefore: 17, | |
breakAfter: 17, | |
breakInside: 17, | |
regionFragment: 17, | |
gridTemplateColumns: 15, | |
gridTemplateRows: 15, | |
gridTemplateAreas: 15, | |
gridTemplate: 15, | |
gridAutoColumns: 15, | |
gridAutoRows: 15, | |
gridAutoFlow: 15, | |
grid: 15, | |
gridRowStart: 15, | |
gridColumnStart: 15, | |
gridRowEnd: 15, | |
gridRow: 15, | |
gridColumn: 15, | |
gridColumnEnd: 15, | |
gridColumnGap: 15, | |
gridRowGap: 15, | |
gridArea: 15, | |
gridGap: 15, | |
}, | |
ios_saf: { | |
flex: 8.1, | |
flexBasis: 8.1, | |
flexDirection: 8.1, | |
flexGrow: 8.1, | |
flexFlow: 8.1, | |
flexShrink: 8.1, | |
flexWrap: 8.1, | |
alignContent: 8.1, | |
alignItems: 8.1, | |
alignSelf: 8.1, | |
justifyContent: 8.1, | |
order: 8.1, | |
transition: 6, | |
transitionDelay: 6, | |
transitionDuration: 6, | |
transitionProperty: 6, | |
transitionTimingFunction: 6, | |
transform: 8.1, | |
transformOrigin: 8.1, | |
transformOriginX: 8.1, | |
transformOriginY: 8.1, | |
backfaceVisibility: 8.1, | |
perspective: 8.1, | |
perspectiveOrigin: 8.1, | |
transformStyle: 8.1, | |
transformOriginZ: 8.1, | |
animation: 8.1, | |
animationDelay: 8.1, | |
animationDirection: 8.1, | |
animationFillMode: 8.1, | |
animationDuration: 8.1, | |
animationIterationCount: 8.1, | |
animationName: 8.1, | |
animationPlayState: 8.1, | |
animationTimingFunction: 8.1, | |
appearance: 11, | |
userSelect: 11, | |
backdropFilter: 11, | |
fontKerning: 11, | |
scrollSnapType: 10.3, | |
scrollSnapPointsX: 10.3, | |
scrollSnapPointsY: 10.3, | |
scrollSnapDestination: 10.3, | |
scrollSnapCoordinate: 10.3, | |
boxDecorationBreak: 11, | |
clipPath: 11, | |
maskImage: 11, | |
maskMode: 11, | |
maskRepeat: 11, | |
maskPosition: 11, | |
maskClip: 11, | |
maskOrigin: 11, | |
maskSize: 11, | |
maskComposite: 11, | |
mask: 11, | |
maskBorderSource: 11, | |
maskBorderMode: 11, | |
maskBorderSlice: 11, | |
maskBorderWidth: 11, | |
maskBorderOutset: 11, | |
maskBorderRepeat: 11, | |
maskBorder: 11, | |
maskType: 11, | |
textSizeAdjust: 11, | |
textDecorationStyle: 11, | |
textDecorationSkip: 11, | |
textDecorationLine: 11, | |
textDecorationColor: 11, | |
shapeImageThreshold: 10, | |
shapeImageMargin: 10, | |
shapeImageOutside: 10, | |
filter: 9, | |
hyphens: 11, | |
flowInto: 11, | |
flowFrom: 11, | |
breakBefore: 8.1, | |
breakAfter: 8.1, | |
breakInside: 8.1, | |
regionFragment: 11, | |
columnCount: 8.1, | |
columnFill: 8.1, | |
columnGap: 8.1, | |
columnRule: 8.1, | |
columnRuleColor: 8.1, | |
columnRuleStyle: 8.1, | |
columnRuleWidth: 8.1, | |
columns: 8.1, | |
columnSpan: 8.1, | |
columnWidth: 8.1, | |
writingMode: 10.3, | |
}, | |
android: { | |
borderImage: 4.2, | |
borderImageOutset: 4.2, | |
borderImageRepeat: 4.2, | |
borderImageSlice: 4.2, | |
borderImageSource: 4.2, | |
borderImageWidth: 4.2, | |
flex: 4.2, | |
flexBasis: 4.2, | |
flexDirection: 4.2, | |
flexGrow: 4.2, | |
flexFlow: 4.2, | |
flexShrink: 4.2, | |
flexWrap: 4.2, | |
alignContent: 4.2, | |
alignItems: 4.2, | |
alignSelf: 4.2, | |
justifyContent: 4.2, | |
order: 4.2, | |
transition: 4.2, | |
transitionDelay: 4.2, | |
transitionDuration: 4.2, | |
transitionProperty: 4.2, | |
transitionTimingFunction: 4.2, | |
transform: 4.4, | |
transformOrigin: 4.4, | |
transformOriginX: 4.4, | |
transformOriginY: 4.4, | |
backfaceVisibility: 4.4, | |
perspective: 4.4, | |
perspectiveOrigin: 4.4, | |
transformStyle: 4.4, | |
transformOriginZ: 4.4, | |
animation: 4.4, | |
animationDelay: 4.4, | |
animationDirection: 4.4, | |
animationFillMode: 4.4, | |
animationDuration: 4.4, | |
animationIterationCount: 4.4, | |
animationName: 4.4, | |
animationPlayState: 4.4, | |
animationTimingFunction: 4.4, | |
appearance: 62, | |
userSelect: 4.4, | |
fontKerning: 4.4, | |
textEmphasisPosition: 62, | |
textEmphasis: 62, | |
textEmphasisStyle: 62, | |
textEmphasisColor: 62, | |
boxDecorationBreak: 62, | |
clipPath: 4.4, | |
maskImage: 62, | |
maskMode: 62, | |
maskRepeat: 62, | |
maskPosition: 62, | |
maskClip: 62, | |
maskOrigin: 62, | |
maskSize: 62, | |
maskComposite: 62, | |
mask: 62, | |
maskBorderSource: 62, | |
maskBorderMode: 62, | |
maskBorderSlice: 62, | |
maskBorderWidth: 62, | |
maskBorderOutset: 62, | |
maskBorderRepeat: 62, | |
maskBorder: 62, | |
maskType: 62, | |
filter: 4.4, | |
fontFeatureSettings: 4.4, | |
breakAfter: 4.4, | |
breakBefore: 4.4, | |
breakInside: 4.4, | |
columnCount: 4.4, | |
columnFill: 4.4, | |
columnGap: 4.4, | |
columnRule: 4.4, | |
columnRuleColor: 4.4, | |
columnRuleStyle: 4.4, | |
columnRuleWidth: 4.4, | |
columns: 4.4, | |
columnSpan: 4.4, | |
columnWidth: 4.4, | |
writingMode: 4.4, | |
}, | |
and_chr: { | |
appearance: 62, | |
textEmphasisPosition: 62, | |
textEmphasis: 62, | |
textEmphasisStyle: 62, | |
textEmphasisColor: 62, | |
boxDecorationBreak: 62, | |
maskImage: 62, | |
maskMode: 62, | |
maskRepeat: 62, | |
maskPosition: 62, | |
maskClip: 62, | |
maskOrigin: 62, | |
maskSize: 62, | |
maskComposite: 62, | |
mask: 62, | |
maskBorderSource: 62, | |
maskBorderMode: 62, | |
maskBorderSlice: 62, | |
maskBorderWidth: 62, | |
maskBorderOutset: 62, | |
maskBorderRepeat: 62, | |
maskBorder: 62, | |
maskType: 62, | |
}, | |
and_uc: { | |
flex: 11.4, | |
flexBasis: 11.4, | |
flexDirection: 11.4, | |
flexGrow: 11.4, | |
flexFlow: 11.4, | |
flexShrink: 11.4, | |
flexWrap: 11.4, | |
alignContent: 11.4, | |
alignItems: 11.4, | |
alignSelf: 11.4, | |
justifyContent: 11.4, | |
order: 11.4, | |
transform: 11.4, | |
transformOrigin: 11.4, | |
transformOriginX: 11.4, | |
transformOriginY: 11.4, | |
backfaceVisibility: 11.4, | |
perspective: 11.4, | |
perspectiveOrigin: 11.4, | |
transformStyle: 11.4, | |
transformOriginZ: 11.4, | |
animation: 11.4, | |
animationDelay: 11.4, | |
animationDirection: 11.4, | |
animationFillMode: 11.4, | |
animationDuration: 11.4, | |
animationIterationCount: 11.4, | |
animationName: 11.4, | |
animationPlayState: 11.4, | |
animationTimingFunction: 11.4, | |
appearance: 11.4, | |
userSelect: 11.4, | |
textEmphasisPosition: 11.4, | |
textEmphasis: 11.4, | |
textEmphasisStyle: 11.4, | |
textEmphasisColor: 11.4, | |
clipPath: 11.4, | |
maskImage: 11.4, | |
maskMode: 11.4, | |
maskRepeat: 11.4, | |
maskPosition: 11.4, | |
maskClip: 11.4, | |
maskOrigin: 11.4, | |
maskSize: 11.4, | |
maskComposite: 11.4, | |
mask: 11.4, | |
maskBorderSource: 11.4, | |
maskBorderMode: 11.4, | |
maskBorderSlice: 11.4, | |
maskBorderWidth: 11.4, | |
maskBorderOutset: 11.4, | |
maskBorderRepeat: 11.4, | |
maskBorder: 11.4, | |
maskType: 11.4, | |
textSizeAdjust: 11.4, | |
filter: 11.4, | |
hyphens: 11.4, | |
fontFeatureSettings: 11.4, | |
breakAfter: 11.4, | |
breakBefore: 11.4, | |
breakInside: 11.4, | |
columnCount: 11.4, | |
columnFill: 11.4, | |
columnGap: 11.4, | |
columnRule: 11.4, | |
columnRuleColor: 11.4, | |
columnRuleStyle: 11.4, | |
columnRuleWidth: 11.4, | |
columns: 11.4, | |
columnSpan: 11.4, | |
columnWidth: 11.4, | |
writingMode: 11.4, | |
}, | |
op_mini: {}, | |
}, | |
}; | |
function _typeof$6(s) { | |
return ( | |
typeof Symbol == "function" && typeof Symbol.iterator == "symbol" | |
? (_typeof$6 = function (_) { | |
return typeof _; | |
}) | |
: (_typeof$6 = function (_) { | |
return _ && | |
typeof Symbol == "function" && | |
_.constructor === Symbol && | |
_ !== Symbol.prototype | |
? "symbol" | |
: typeof _; | |
}), | |
_typeof$6(s) | |
); | |
} | |
var prefixAll = createStaticPrefixer(staticData), | |
InlineStylePrefixer = createDynamicPrefixer(dynamicData, prefixAll); | |
function transformValues(s) { | |
return Object.keys(s).reduce(function (o, _) { | |
var _e = s[_]; | |
return ( | |
Array.isArray(_e) | |
? (_e = _e.join(";" + _ + ":")) | |
: _e && | |
_typeof$6(_e) === "object" && | |
typeof _e.toString == "function" && | |
(_e = _e.toString()), | |
(o[_] = _e), | |
o | |
); | |
}, {}); | |
} | |
function flattenStyleValues(s) { | |
return Object.keys(s).reduce(function (o, _) { | |
var _e = s[_]; | |
return ( | |
Array.isArray(_e) && | |
(ExecutionEnvironment.canUseDOM | |
? (_e = _e[_e.length - 1].toString()) | |
: (_e = _e.join(";".concat(camelCaseToDashCase(_), ":")))), | |
(o[_] = _e), | |
o | |
); | |
}, {}); | |
} | |
var _lastUserAgent, _cachedPrefixer; | |
function getPrefixer(s) { | |
var o = | |
s || (global$1 && global$1.navigator && global$1.navigator.userAgent); | |
return ( | |
(!_cachedPrefixer || o !== _lastUserAgent) && | |
(o === "all" | |
? (_cachedPrefixer = { | |
prefix: prefixAll, | |
prefixedKeyframes: "keyframes", | |
}) | |
: (_cachedPrefixer = new InlineStylePrefixer({ userAgent: o })), | |
(_lastUserAgent = o)), | |
_cachedPrefixer | |
); | |
} | |
function getPrefixedKeyframes(s) { | |
return getPrefixer(s).prefixedKeyframes || "keyframes"; | |
} | |
function getPrefixedStyle(s, o) { | |
var _ = transformValues(s), | |
_e = getPrefixer(o), | |
et = _e.prefix(_), | |
tt = flattenStyleValues(et); | |
return tt; | |
} | |
function createMarkupForStyles(s) { | |
return Object.keys(s).map(function (o) { | |
return o + ": " + s[o] + ";"; | |
}).join(` | |
`); | |
} | |
function cssRuleSetToString(s, o, _) { | |
if (!o) return ""; | |
var _e = mapObject(o, function (it, ot) { | |
return appendPxIfNeeded(ot, it); | |
}), | |
et = getPrefixedStyle(_e, _), | |
tt = camelCasePropsToDashCase(et), | |
rt = createMarkupForStyles(tt); | |
return s + "{" + rt + "}"; | |
} | |
var cleanStateKey = function (o) { | |
return o === null || typeof o > "u" ? "main" : o.toString(); | |
}, | |
getState = function (o, _, _e) { | |
var et = cleanStateKey(_); | |
return ( | |
!!o && | |
!!o._radiumStyleState && | |
!!o._radiumStyleState[et] && | |
o._radiumStyleState[et][_e] | |
); | |
}; | |
const getState$1 = getState; | |
var getStateKey = function (o) { | |
return typeof o.ref == "string" ? o.ref : o.key; | |
}, | |
getRadiumStyleState = function (o) { | |
return o._lastRadiumState || (o.state && o.state._radiumStyleState) || {}; | |
}; | |
function hash$5(s) { | |
if (!s) return ""; | |
for (var o = 5381, _ = s.length - 1; _; ) | |
(o = (o * 33) ^ s.charCodeAt(_)), (_ -= 1); | |
return (o >>> 0).toString(16); | |
} | |
function _typeof$5(s) { | |
return ( | |
typeof Symbol == "function" && typeof Symbol.iterator == "symbol" | |
? (_typeof$5 = function (_) { | |
return typeof _; | |
}) | |
: (_typeof$5 = function (_) { | |
return _ && | |
typeof Symbol == "function" && | |
_.constructor === Symbol && | |
_ !== Symbol.prototype | |
? "symbol" | |
: typeof _; | |
}), | |
_typeof$5(s) | |
); | |
} | |
function isNestedStyle(s) { | |
return ( | |
s && s.constructor === Object && s.toString === Object.prototype.toString | |
); | |
} | |
function mergeStyles(s) { | |
var o = {}; | |
return ( | |
s.forEach(function (_) { | |
!_ || | |
_typeof$5(_) !== "object" || | |
(Array.isArray(_) && (_ = mergeStyles(_)), | |
Object.keys(_).forEach(function (_e) { | |
if (!isNestedStyle(_[_e]) || !isNestedStyle(o[_e])) { | |
o[_e] = _[_e]; | |
return; | |
} | |
if (_e.indexOf("@media") === 0) { | |
for (var et = _e; ; ) | |
if (((et += " "), !o[et])) { | |
o[et] = _[_e]; | |
return; | |
} | |
} | |
o[_e] = mergeStyles([o[_e], _[_e]]); | |
})); | |
}), | |
o | |
); | |
} | |
var _checkProps = function () {}; | |
const checkPropsPlugin = _checkProps; | |
function keyframesPlugin(s) { | |
var o = s.addCSS, | |
_ = s.config, | |
_e = s.style, | |
et = function (it) { | |
var ot = it, | |
ct = ot.__process(_.userAgent), | |
at = ct.animationName, | |
ht = ct.css; | |
return o(ht), at; | |
}, | |
tt = Object.keys(_e).reduce(function (rt, it) { | |
var ot = _e[it], | |
ct = Array.isArray(ot); | |
return ( | |
it === "animationName" && | |
ot && | |
(ot.__radiumKeyframes || ct) && | |
(ct ? (ot = ot.map(et).join(", ")) : (ot = et(ot))), | |
(rt[it] = ot), | |
rt | |
); | |
}, {}); | |
return { style: tt }; | |
} | |
var mergeStyleArrayPlugin = function (o) { | |
var _ = o.style, | |
_e = o.mergeStyles, | |
et = Array.isArray(_) ? _e(_) : _; | |
return { style: et }; | |
}; | |
const mergeStyleArrayPlugin$1 = mergeStyleArrayPlugin; | |
function prefixPlugin(s) { | |
var o = s.config, | |
_ = s.style, | |
_e = getPrefixedStyle(_, o.userAgent); | |
return { style: _e }; | |
} | |
function removeNestedStyles(s) { | |
var o = s.isNestedStyle, | |
_ = s.style, | |
_e = Object.keys(_).reduce(function (et, tt) { | |
var rt = _[tt]; | |
return o(rt) || (et[tt] = rt), et; | |
}, {}); | |
return { style: _e }; | |
} | |
var _callbacks = [], | |
_mouseUpListenerIsActive = !1; | |
function _handleMouseUp() { | |
_callbacks.forEach(function (s) { | |
s(); | |
}); | |
} | |
var subscribe$2 = function (o) { | |
return ( | |
_callbacks.indexOf(o) === -1 && _callbacks.push(o), | |
_mouseUpListenerIsActive || | |
(window.addEventListener("mouseup", _handleMouseUp), | |
(_mouseUpListenerIsActive = !0)), | |
{ | |
remove: function () { | |
var _e = _callbacks.indexOf(o); | |
_callbacks.splice(_e, 1), | |
_callbacks.length === 0 && | |
_mouseUpListenerIsActive && | |
(window.removeEventListener("mouseup", _handleMouseUp), | |
(_mouseUpListenerIsActive = !1)); | |
}, | |
} | |
); | |
}; | |
const MouseUpListener = { | |
subscribe: subscribe$2, | |
__triggerForTests: _handleMouseUp, | |
}; | |
var _isInteractiveStyleField = function (o) { | |
return o === ":hover" || o === ":active" || o === ":focus"; | |
}, | |
resolveInteractionStyles = function (o) { | |
var _ = o.ExecutionEnvironment, | |
_e = o.getComponentField, | |
et = o.getState, | |
tt = o.mergeStyles, | |
rt = o.props, | |
it = o.setState, | |
ot = o.style, | |
ct = {}, | |
at = {}; | |
if (ot[":hover"]) { | |
var ht = rt.onMouseEnter; | |
at.onMouseEnter = function (Mt) { | |
ht && ht(Mt), it(":hover", !0); | |
}; | |
var mt = rt.onMouseLeave; | |
at.onMouseLeave = function (Mt) { | |
mt && mt(Mt), it(":hover", !1); | |
}; | |
} | |
if (ot[":active"]) { | |
var vt = rt.onMouseDown; | |
at.onMouseDown = function (Mt) { | |
vt && vt(Mt), | |
(ct._lastMouseDown = Date.now()), | |
it(":active", "viamousedown"); | |
}; | |
var xt = rt.onKeyDown; | |
at.onKeyDown = function (Mt) { | |
xt && xt(Mt), | |
(Mt.key === " " || Mt.key === "Enter") && | |
it(":active", "viakeydown"); | |
}; | |
var St = rt.onKeyUp; | |
at.onKeyUp = function (Mt) { | |
St && St(Mt), | |
(Mt.key === " " || Mt.key === "Enter") && it(":active", !1); | |
}; | |
} | |
if (ot[":focus"]) { | |
var $t = rt.onFocus; | |
at.onFocus = function (Mt) { | |
$t && $t(Mt), it(":focus", !0); | |
}; | |
var Et = rt.onBlur; | |
at.onBlur = function (Mt) { | |
Et && Et(Mt), it(":focus", !1); | |
}; | |
} | |
ot[":active"] && | |
!_e("_radiumMouseUpListener") && | |
_.canUseEventListeners && | |
(ct._radiumMouseUpListener = MouseUpListener.subscribe(function () { | |
Object.keys(_e("state")._radiumStyleState).forEach(function (Mt) { | |
et(":active", Mt) === "viamousedown" && it(":active", !1, Mt); | |
}); | |
})); | |
var _t = rt.disabled | |
? [ot[":disabled"]] | |
: Object.keys(ot) | |
.filter(function (Mt) { | |
return _isInteractiveStyleField(Mt) && et(Mt); | |
}) | |
.map(function (Mt) { | |
return ot[Mt]; | |
}), | |
Rt = tt([ot].concat(_t)); | |
return ( | |
(Rt = Object.keys(Rt).reduce(function (Mt, It) { | |
return ( | |
!_isInteractiveStyleField(It) && | |
It !== ":disabled" && | |
(Mt[It] = Rt[It]), | |
Mt | |
); | |
}, {})), | |
{ componentFields: ct, props: at, style: Rt } | |
); | |
}; | |
const resolveInteractionStylesPlugin = resolveInteractionStyles; | |
function _objectSpread$2(s) { | |
for (var o = 1; o < arguments.length; o++) { | |
var _ = arguments[o] != null ? arguments[o] : {}, | |
_e = Object.keys(_); | |
typeof Object.getOwnPropertySymbols == "function" && | |
(_e = _e.concat( | |
Object.getOwnPropertySymbols(_).filter(function (et) { | |
return Object.getOwnPropertyDescriptor(_, et).enumerable; | |
}), | |
)), | |
_e.forEach(function (et) { | |
_defineProperty$4(s, et, _[et]); | |
}); | |
} | |
return s; | |
} | |
function _defineProperty$4(s, o, _) { | |
return ( | |
o in s | |
? Object.defineProperty(s, o, { | |
value: _, | |
enumerable: !0, | |
configurable: !0, | |
writable: !0, | |
}) | |
: (s[o] = _), | |
s | |
); | |
} | |
var _windowMatchMedia; | |
function _getWindowMatchMedia(s) { | |
return ( | |
_windowMatchMedia === void 0 && | |
(_windowMatchMedia = | |
(!!s.canUseDOM && | |
!!window && | |
!!window.matchMedia && | |
function (o) { | |
return window.matchMedia(o); | |
}) || | |
null), | |
_windowMatchMedia | |
); | |
} | |
function _filterObject(s, o) { | |
return Object.keys(s) | |
.filter(function (_) { | |
return o(s[_], _); | |
}) | |
.reduce(function (_, _e) { | |
return (_[_e] = s[_e]), _; | |
}, {}); | |
} | |
function _removeMediaQueries(s) { | |
return Object.keys(s).reduce(function (o, _) { | |
return _.indexOf("@media") !== 0 && (o[_] = s[_]), o; | |
}, {}); | |
} | |
function _topLevelRulesToCSS(s) { | |
var o = s.addCSS, | |
_ = s.appendImportantToEachValue, | |
_e = s.cssRuleSetToString, | |
et = s.hash, | |
tt = s.isNestedStyle, | |
rt = s.style, | |
it = s.userAgent, | |
ot = ""; | |
return ( | |
Object.keys(rt) | |
.filter(function (ct) { | |
return ct.indexOf("@media") === 0; | |
}) | |
.map(function (ct) { | |
var at = _( | |
_filterObject(rt[ct], function (xt) { | |
return !tt(xt); | |
}), | |
); | |
if (Object.keys(at).length) { | |
var ht = _e("", at, it), | |
mt = "rmq-" + et(ct + ht), | |
vt = ct + "{ ." + mt + ht + "}"; | |
o(vt), (ot += (ot ? " " : "") + mt); | |
} | |
}), | |
ot | |
); | |
} | |
function _subscribeToMediaQuery(s) { | |
var o = s.listener, | |
_ = s.listenersByQuery, | |
_e = s.matchMedia, | |
et = s.mediaQueryListsByQuery, | |
tt = s.query; | |
tt = tt.replace("@media ", ""); | |
var rt = et[tt]; | |
return ( | |
!rt && _e && (et[tt] = rt = _e(tt)), | |
(!_ || !_[tt]) && | |
(rt.addListener(o), | |
(_[tt] = { | |
remove: function () { | |
rt.removeListener(o); | |
}, | |
})), | |
rt | |
); | |
} | |
function resolveMediaQueries(s) { | |
var o = s.ExecutionEnvironment, | |
_ = s.addCSS, | |
_e = s.appendImportantToEachValue, | |
et = s.config, | |
tt = s.cssRuleSetToString, | |
rt = s.getComponentField, | |
it = s.getGlobalState, | |
ot = s.hash, | |
ct = s.isNestedStyle, | |
at = s.mergeStyles, | |
ht = s.props, | |
mt = s.setState, | |
vt = s.style, | |
xt = _removeMediaQueries(vt), | |
St = _topLevelRulesToCSS({ | |
addCSS: _, | |
appendImportantToEachValue: _e, | |
cssRuleSetToString: tt, | |
hash: ot, | |
isNestedStyle: ct, | |
style: vt, | |
userAgent: et.userAgent, | |
}), | |
$t = St | |
? { className: St + (ht.className ? " " + ht.className : "") } | |
: null, | |
Et = et.matchMedia || _getWindowMatchMedia(o); | |
if (!Et) return { props: $t, style: xt }; | |
var _t = _objectSpread$2({}, rt("_radiumMediaQueryListenersByQuery")), | |
Rt = it("mediaQueryListsByQuery") || {}; | |
return ( | |
Object.keys(vt) | |
.filter(function (Mt) { | |
return Mt.indexOf("@media") === 0; | |
}) | |
.map(function (Mt) { | |
var It = _filterObject(vt[Mt], ct); | |
if (Object.keys(It).length) { | |
var Xt = _subscribeToMediaQuery({ | |
listener: function () { | |
return mt(Mt, Xt.matches, "_all"); | |
}, | |
listenersByQuery: _t, | |
matchMedia: Et, | |
mediaQueryListsByQuery: Rt, | |
query: Mt, | |
}); | |
Xt.matches && (xt = at([xt, It])); | |
} | |
}), | |
{ | |
componentFields: { _radiumMediaQueryListenersByQuery: _t }, | |
globalState: { mediaQueryListsByQuery: Rt }, | |
props: $t, | |
style: xt, | |
} | |
); | |
} | |
function visited(s) { | |
var o = s.addCSS, | |
_ = s.appendImportantToEachValue, | |
_e = s.config, | |
et = s.cssRuleSetToString, | |
tt = s.hash, | |
rt = s.props, | |
it = s.style, | |
ot = rt.className, | |
ct = Object.keys(it).reduce(function (at, ht) { | |
var mt = it[ht]; | |
if (ht === ":visited") { | |
mt = _(mt); | |
var vt = et("", mt, _e.userAgent), | |
xt = "rad-" + tt(vt), | |
St = "." + xt + ":visited" + vt; | |
o(St), (ot = (ot ? ot + " " : "") + xt); | |
} else at[ht] = mt; | |
return at; | |
}, {}); | |
return { props: ot === rt.className ? null : { className: ot }, style: ct }; | |
} | |
const Plugins = { | |
checkProps: checkPropsPlugin, | |
keyframes: keyframesPlugin, | |
mergeStyleArray: mergeStyleArrayPlugin$1, | |
prefix: prefixPlugin, | |
removeNestedStyles, | |
resolveInteractionStyles: resolveInteractionStylesPlugin, | |
resolveMediaQueries, | |
visited, | |
}; | |
function _classCallCheck$4(s, o) { | |
if (!(s instanceof o)) | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
function _defineProperties$4(s, o) { | |
for (var _ = 0; _ < o.length; _++) { | |
var _e = o[_]; | |
(_e.enumerable = _e.enumerable || !1), | |
(_e.configurable = !0), | |
"value" in _e && (_e.writable = !0), | |
Object.defineProperty(s, _e.key, _e); | |
} | |
} | |
function _createClass$4(s, o, _) { | |
return ( | |
o && _defineProperties$4(s.prototype, o), | |
_ && _defineProperties$4(s, _), | |
s | |
); | |
} | |
var StyleKeeper = (function () { | |
function s(o) { | |
_classCallCheck$4(this, s), | |
(this._userAgent = void 0), | |
(this._listeners = void 0), | |
(this._cssSet = void 0), | |
(this._userAgent = o), | |
(this._listeners = []), | |
(this._cssSet = {}); | |
} | |
return ( | |
_createClass$4(s, [ | |
{ | |
key: "subscribe", | |
value: function (_) { | |
var _e = this; | |
return ( | |
this._listeners.indexOf(_) === -1 && this._listeners.push(_), | |
{ | |
remove: function () { | |
var tt = _e._listeners.indexOf(_); | |
tt > -1 && _e._listeners.splice(tt, 1); | |
}, | |
} | |
); | |
}, | |
}, | |
{ | |
key: "addCSS", | |
value: function (_) { | |
var _e = this; | |
return ( | |
this._cssSet[_] || ((this._cssSet[_] = !0), this._emitChange()), | |
{ | |
remove: function () { | |
delete _e._cssSet[_], _e._emitChange(); | |
}, | |
} | |
); | |
}, | |
}, | |
{ | |
key: "getCSS", | |
value: function () { | |
return Object.keys(this._cssSet).join(` | |
`); | |
}, | |
}, | |
{ | |
key: "_emitChange", | |
value: function () { | |
this._listeners.forEach(function (_) { | |
return _(); | |
}); | |
}, | |
}, | |
]), | |
s | |
); | |
})(); | |
function _objectSpread$1(s) { | |
for (var o = 1; o < arguments.length; o++) { | |
var _ = arguments[o] != null ? arguments[o] : {}, | |
_e = Object.keys(_); | |
typeof Object.getOwnPropertySymbols == "function" && | |
(_e = _e.concat( | |
Object.getOwnPropertySymbols(_).filter(function (et) { | |
return Object.getOwnPropertyDescriptor(_, et).enumerable; | |
}), | |
)), | |
_e.forEach(function (et) { | |
_defineProperty$3(s, et, _[et]); | |
}); | |
} | |
return s; | |
} | |
function _defineProperty$3(s, o, _) { | |
return ( | |
o in s | |
? Object.defineProperty(s, o, { | |
value: _, | |
enumerable: !0, | |
configurable: !0, | |
writable: !0, | |
}) | |
: (s[o] = _), | |
s | |
); | |
} | |
function _typeof$4(s) { | |
return ( | |
typeof Symbol == "function" && typeof Symbol.iterator == "symbol" | |
? (_typeof$4 = function (_) { | |
return typeof _; | |
}) | |
: (_typeof$4 = function (_) { | |
return _ && | |
typeof Symbol == "function" && | |
_.constructor === Symbol && | |
_ !== Symbol.prototype | |
? "symbol" | |
: typeof _; | |
}), | |
_typeof$4(s) | |
); | |
} | |
var DEFAULT_CONFIG = { | |
plugins: [ | |
Plugins.mergeStyleArray, | |
Plugins.checkProps, | |
Plugins.resolveMediaQueries, | |
Plugins.resolveInteractionStyles, | |
Plugins.keyframes, | |
Plugins.visited, | |
Plugins.removeNestedStyles, | |
Plugins.prefix, | |
Plugins.checkProps, | |
], | |
}, | |
globalState = {}, | |
_resolveStyles5 = null, | |
_shouldResolveStyles = function (o) { | |
return o.type && !o.type._isRadiumEnhanced; | |
}, | |
_resolveChildren = function (o) { | |
var _ = o.children, | |
_e = o.component, | |
et = o.config, | |
tt = o.existingKeyMap, | |
rt = o.extraStateKeyMap; | |
if (!_) return _; | |
var it = _typeof$4(_); | |
if (it === "string" || it === "number") return _; | |
if (it === "function") | |
return function () { | |
var mt = _.apply(this, arguments); | |
if (React$3.isValidElement(mt)) { | |
var vt = getStateKey(mt); | |
delete rt[vt]; | |
var xt = _resolveStyles5(_e, mt, et, tt, !0, rt), | |
St = xt.element; | |
return St; | |
} | |
return mt; | |
}; | |
if (React$3.Children.count(_) === 1 && _.type) { | |
var ot = React$3.Children.only(_), | |
ct = getStateKey(ot); | |
delete rt[ct]; | |
var at = _resolveStyles5(_e, ot, et, tt, !0, rt), | |
ht = at.element; | |
return ht; | |
} | |
return React$3.Children.map(_, function (mt) { | |
if (React$3.isValidElement(mt)) { | |
var vt = getStateKey(mt); | |
delete rt[vt]; | |
var xt = _resolveStyles5(_e, mt, et, tt, !0, rt), | |
St = xt.element; | |
return St; | |
} | |
return mt; | |
}); | |
}, | |
_resolveProps = function (o) { | |
var _ = o.component, | |
_e = o.config, | |
et = o.existingKeyMap, | |
tt = o.props, | |
rt = o.extraStateKeyMap, | |
it = tt; | |
return ( | |
Object.keys(tt).forEach(function (ot) { | |
if (ot !== "children") { | |
var ct = tt[ot]; | |
if (React$3.isValidElement(ct)) { | |
var at = getStateKey(ct); | |
delete rt[at], (it = _objectSpread$1({}, it)); | |
var ht = _resolveStyles5(_, ct, _e, et, !0, rt), | |
mt = ht.element; | |
it[ot] = mt; | |
} | |
} | |
}), | |
it | |
); | |
}, | |
_buildGetKey = function (o) { | |
var _ = o.componentName, | |
_e = o.existingKeyMap, | |
et = o.renderedElement, | |
tt = getStateKey(et), | |
rt = cleanStateKey(tt), | |
it = !1, | |
ot = function () { | |
if (it) return rt; | |
if (((it = !0), _e[rt])) { | |
var at; | |
throw ( | |
(typeof et.type == "string" | |
? (at = et.type) | |
: et.type.constructor && | |
(at = | |
et.type.constructor.displayName || | |
et.type.constructor.name), | |
new Error( | |
"Radium requires each element with interactive styles to have a unique key, set using either the ref or key prop. " + | |
(tt | |
? 'Key "' + tt + '" is a duplicate.' | |
: "Multiple elements have no key specified.") + | |
' Component: "' + | |
_ + | |
'". ' + | |
(at ? 'Element: "' + at + '".' : ""), | |
)) | |
); | |
} | |
return (_e[rt] = !0), rt; | |
}; | |
return ot; | |
}, | |
_setStyleState = function (o, _, _e, et) { | |
if (o._radiumIsMounted) { | |
var tt = getRadiumStyleState(o), | |
rt = { _radiumStyleState: _objectSpread$1({}, tt) }; | |
(rt._radiumStyleState[_] = _objectSpread$1( | |
{}, | |
rt._radiumStyleState[_], | |
)), | |
(rt._radiumStyleState[_][_e] = et), | |
(o._lastRadiumState = rt._radiumStyleState), | |
o.setState(rt); | |
} | |
}, | |
_runPlugins = function (o) { | |
var _ = o.component, | |
_e = o.config, | |
et = o.existingKeyMap, | |
tt = o.props, | |
rt = o.renderedElement; | |
if ( | |
!React$3.isValidElement(rt) || | |
typeof rt.type != "string" || | |
!tt.style | |
) | |
return tt; | |
var it = tt, | |
ot = _e.plugins || DEFAULT_CONFIG.plugins, | |
ct = _.constructor.displayName || _.constructor.name, | |
at = _buildGetKey({ | |
renderedElement: rt, | |
existingKeyMap: et, | |
componentName: ct, | |
}), | |
ht = function (_t) { | |
return _[_t]; | |
}, | |
mt = function (_t) { | |
return globalState[_t]; | |
}, | |
vt = function (_t, Rt) { | |
return getState$1(_.state, Rt || at(), _t); | |
}, | |
xt = function (_t, Rt, Mt) { | |
return _setStyleState(_, Mt || at(), _t, Rt); | |
}, | |
St = function (_t) { | |
var Rt = _._radiumStyleKeeper; | |
if (!Rt) | |
throw new Error( | |
"To use plugins requiring `addCSS` (e.g. keyframes, media queries), please wrap your application in the StyleRoot component. Component name: `" + | |
ct + | |
"`.", | |
); | |
return Rt.addCSS(_t); | |
}, | |
$t = tt.style; | |
return ( | |
ot.forEach(function (Et) { | |
var _t = | |
Et({ | |
ExecutionEnvironment, | |
addCSS: St, | |
appendImportantToEachValue, | |
componentName: ct, | |
config: _e, | |
cssRuleSetToString, | |
getComponentField: ht, | |
getGlobalState: mt, | |
getState: vt, | |
hash: hash$5, | |
mergeStyles, | |
props: it, | |
setState: xt, | |
isNestedStyle, | |
style: $t, | |
}) || {}; | |
($t = _t.style || $t), | |
(it = | |
_t.props && Object.keys(_t.props).length | |
? _objectSpread$1({}, it, _t.props) | |
: it); | |
var Rt = _t.componentFields || {}; | |
Object.keys(Rt).forEach(function (It) { | |
_[It] = Rt[It]; | |
}); | |
var Mt = _t.globalState || {}; | |
Object.keys(Mt).forEach(function (It) { | |
globalState[It] = Mt[It]; | |
}); | |
}), | |
$t !== tt.style && (it = _objectSpread$1({}, it, { style: $t })), | |
it | |
); | |
}, | |
_cloneElement = function (o, _, _e) { | |
return ( | |
typeof o.type == "string" && | |
(_ = _objectSpread$1({}, _, { "data-radium": !0 })), | |
React$3.cloneElement(o, _, _e) | |
); | |
}; | |
_resolveStyles5 = function (o, _) { | |
var _e = | |
arguments.length > 2 && arguments[2] !== void 0 | |
? arguments[2] | |
: DEFAULT_CONFIG, | |
et = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, | |
tt = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, | |
rt = arguments.length > 5 ? arguments[5] : void 0; | |
if (!rt) { | |
var it = getRadiumStyleState(o); | |
rt = Object.keys(it).reduce(function (vt, xt) { | |
return xt !== "main" && (vt[xt] = !0), vt; | |
}, {}); | |
} | |
if (Array.isArray(_) && !_.props) { | |
var ot = _.map(function (vt) { | |
if (rt) { | |
var xt = getStateKey(vt); | |
delete rt[xt]; | |
} | |
return _resolveStyles5(o, vt, _e, et, tt, rt).element; | |
}); | |
return { extraStateKeyMap: rt, element: ot }; | |
} | |
if ( | |
!_ || | |
(_.props && _.props["data-radium"]) || | |
(tt && !_shouldResolveStyles(_)) | |
) | |
return { extraStateKeyMap: rt, element: _ }; | |
var ct = _.props.children, | |
at = _resolveChildren({ | |
children: ct, | |
component: o, | |
config: _e, | |
existingKeyMap: et, | |
extraStateKeyMap: rt, | |
}), | |
ht = _resolveProps({ | |
component: o, | |
config: _e, | |
existingKeyMap: et, | |
extraStateKeyMap: rt, | |
props: _.props, | |
}); | |
if ( | |
((ht = _runPlugins({ | |
component: o, | |
config: _e, | |
existingKeyMap: et, | |
props: ht, | |
renderedElement: _, | |
})), | |
at === ct && ht === _.props) | |
) | |
return { extraStateKeyMap: rt, element: _ }; | |
var mt = _cloneElement(_, ht !== _.props ? ht : {}, at); | |
return { extraStateKeyMap: rt, element: mt }; | |
}; | |
const resolveStyles = _resolveStyles5; | |
function _extends$2() { | |
return ( | |
(_extends$2 = | |
Object.assign || | |
function (s) { | |
for (var o = 1; o < arguments.length; o++) { | |
var _ = arguments[o]; | |
for (var _e in _) | |
Object.prototype.hasOwnProperty.call(_, _e) && (s[_e] = _[_e]); | |
} | |
return s; | |
}), | |
_extends$2.apply(this, arguments) | |
); | |
} | |
var StyleKeeperContext = React$3.createContext(void 0), | |
RadiumConfigContext = React$3.createContext(void 0); | |
function withRadiumContexts(s) { | |
var o = React$3.forwardRef(function (_, _e) { | |
var et = reactExports.useContext(RadiumConfigContext), | |
tt = reactExports.useContext(StyleKeeperContext); | |
return React$3.createElement( | |
s, | |
_extends$2({ ref: _e }, _, { | |
radiumConfigContext: et, | |
styleKeeperContext: tt, | |
}), | |
); | |
}); | |
return ( | |
(o.displayName = "withRadiumContexts(".concat( | |
s.displayName || s.name || "Component", | |
")", | |
)), | |
hoistStatics(o, s) | |
); | |
} | |
function _typeof$3(s) { | |
return ( | |
typeof Symbol == "function" && typeof Symbol.iterator == "symbol" | |
? (_typeof$3 = function (_) { | |
return typeof _; | |
}) | |
: (_typeof$3 = function (_) { | |
return _ && | |
typeof Symbol == "function" && | |
_.constructor === Symbol && | |
_ !== Symbol.prototype | |
? "symbol" | |
: typeof _; | |
}), | |
_typeof$3(s) | |
); | |
} | |
function _classCallCheck$3(s, o) { | |
if (!(s instanceof o)) | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
function _defineProperties$3(s, o) { | |
for (var _ = 0; _ < o.length; _++) { | |
var _e = o[_]; | |
(_e.enumerable = _e.enumerable || !1), | |
(_e.configurable = !0), | |
"value" in _e && (_e.writable = !0), | |
Object.defineProperty(s, _e.key, _e); | |
} | |
} | |
function _createClass$3(s, o, _) { | |
return ( | |
o && _defineProperties$3(s.prototype, o), | |
_ && _defineProperties$3(s, _), | |
s | |
); | |
} | |
function _possibleConstructorReturn$3(s, o) { | |
return o && (_typeof$3(o) === "object" || typeof o == "function") | |
? o | |
: _assertThisInitialized$3(s); | |
} | |
function _assertThisInitialized$3(s) { | |
if (s === void 0) | |
throw new ReferenceError( | |
"this hasn't been initialised - super() hasn't been called", | |
); | |
return s; | |
} | |
function _get(s, o, _) { | |
return ( | |
typeof Reflect < "u" && Reflect.get | |
? (_get = Reflect.get) | |
: (_get = function (et, tt, rt) { | |
var it = _superPropBase(et, tt); | |
if (it) { | |
var ot = Object.getOwnPropertyDescriptor(it, tt); | |
return ot.get ? ot.get.call(rt) : ot.value; | |
} | |
}), | |
_get(s, o, _ || s) | |
); | |
} | |
function _superPropBase(s, o) { | |
for ( | |
; | |
!Object.prototype.hasOwnProperty.call(s, o) && | |
((s = _getPrototypeOf$3(s)), s !== null); | |
); | |
return s; | |
} | |
function _getPrototypeOf$3(s) { | |
return ( | |
(_getPrototypeOf$3 = Object.setPrototypeOf | |
? Object.getPrototypeOf | |
: function (_) { | |
return _.__proto__ || Object.getPrototypeOf(_); | |
}), | |
_getPrototypeOf$3(s) | |
); | |
} | |
function _inherits$3(s, o) { | |
if (typeof o != "function" && o !== null) | |
throw new TypeError("Super expression must either be null or a function"); | |
(s.prototype = Object.create(o && o.prototype, { | |
constructor: { value: s, writable: !0, configurable: !0 }, | |
})), | |
o && _setPrototypeOf$4(s, o); | |
} | |
function _setPrototypeOf$4(s, o) { | |
return ( | |
(_setPrototypeOf$4 = | |
Object.setPrototypeOf || | |
function (_e, et) { | |
return (_e.__proto__ = et), _e; | |
}), | |
_setPrototypeOf$4(s, o) | |
); | |
} | |
function _slicedToArray(s, o) { | |
return ( | |
_arrayWithHoles(s) || _iterableToArrayLimit(s, o) || _nonIterableRest() | |
); | |
} | |
function _nonIterableRest() { | |
throw new TypeError("Invalid attempt to destructure non-iterable instance"); | |
} | |
function _iterableToArrayLimit(s, o) { | |
var _ = [], | |
_e = !0, | |
et = !1, | |
tt = void 0; | |
try { | |
for ( | |
var rt = s[Symbol.iterator](), it; | |
!(_e = (it = rt.next()).done) && | |
(_.push(it.value), !(o && _.length === o)); | |
_e = !0 | |
); | |
} catch (ot) { | |
(et = !0), (tt = ot); | |
} finally { | |
try { | |
!_e && rt.return != null && rt.return(); | |
} finally { | |
if (et) throw tt; | |
} | |
} | |
return _; | |
} | |
function _arrayWithHoles(s) { | |
if (Array.isArray(s)) return s; | |
} | |
function _objectSpread(s) { | |
for (var o = 1; o < arguments.length; o++) { | |
var _ = arguments[o] != null ? arguments[o] : {}, | |
_e = Object.keys(_); | |
typeof Object.getOwnPropertySymbols == "function" && | |
(_e = _e.concat( | |
Object.getOwnPropertySymbols(_).filter(function (et) { | |
return Object.getOwnPropertyDescriptor(_, et).enumerable; | |
}), | |
)), | |
_e.forEach(function (et) { | |
_defineProperty$2(s, et, _[et]); | |
}); | |
} | |
return s; | |
} | |
function _defineProperty$2(s, o, _) { | |
return ( | |
o in s | |
? Object.defineProperty(s, o, { | |
value: _, | |
enumerable: !0, | |
configurable: !0, | |
writable: !0, | |
}) | |
: (s[o] = _), | |
s | |
); | |
} | |
function _objectWithoutProperties$1(s, o) { | |
if (s == null) return {}; | |
var _ = _objectWithoutPropertiesLoose$2(s, o), | |
_e, | |
et; | |
if (Object.getOwnPropertySymbols) { | |
var tt = Object.getOwnPropertySymbols(s); | |
for (et = 0; et < tt.length; et++) | |
(_e = tt[et]), | |
!(o.indexOf(_e) >= 0) && | |
Object.prototype.propertyIsEnumerable.call(s, _e) && | |
(_[_e] = s[_e]); | |
} | |
return _; | |
} | |
function _objectWithoutPropertiesLoose$2(s, o) { | |
if (s == null) return {}; | |
var _ = {}, | |
_e = Object.keys(s), | |
et, | |
tt; | |
for (tt = 0; tt < _e.length; tt++) | |
(et = _e[tt]), !(o.indexOf(et) >= 0) && (_[et] = s[et]); | |
return _; | |
} | |
function _toPropertyKey$1(s) { | |
var o = _toPrimitive$1(s, "string"); | |
return _typeof$3(o) === "symbol" ? o : String(o); | |
} | |
function _toPrimitive$1(s, o) { | |
if (_typeof$3(s) !== "object" || s === null) return s; | |
var _ = s[Symbol.toPrimitive]; | |
if (_ !== void 0) { | |
var _e = _.call(s, o || "default"); | |
if (_typeof$3(_e) !== "object") return _e; | |
throw new TypeError("@@toPrimitive must return a primitive value."); | |
} | |
return (o === "string" ? String : Number)(s); | |
} | |
var KEYS_TO_IGNORE_WHEN_COPYING_PROPERTIES = [ | |
"arguments", | |
"callee", | |
"caller", | |
"length", | |
"name", | |
"prototype", | |
"type", | |
], | |
RADIUM_PROTO, | |
RADIUM_METHODS; | |
function copyProperties(s, o) { | |
Object.getOwnPropertyNames(s).forEach(function (_) { | |
if ( | |
KEYS_TO_IGNORE_WHEN_COPYING_PROPERTIES.indexOf(_) < 0 && | |
!o.hasOwnProperty(_) | |
) { | |
var _e = Object.getOwnPropertyDescriptor(s, _); | |
_e && Object.defineProperty(o, _, _e); | |
} | |
}); | |
} | |
function isStateless(s) { | |
var o = s.prototype || {}; | |
return !s.isReactComponent && !o.isReactComponent && !s.render && !o.render; | |
} | |
function isNativeClass(s) { | |
return typeof s == "function" && /^\s*class\s+/.test(s.toString()); | |
} | |
function copyArrowFuncs(s, o) { | |
RADIUM_METHODS.forEach(function (_) { | |
var _e = Object.getOwnPropertyDescriptor(s, _), | |
et = (_e || {}).value; | |
if (et) { | |
var tt = Object.getOwnPropertyDescriptor(RADIUM_PROTO, _), | |
rt = (tt || {}).value, | |
it = o.prototype[_]; | |
!it && | |
et !== rt && | |
(_e && Object.defineProperty(o.prototype, _, _e), delete s[_]); | |
} | |
}); | |
} | |
function trimRadiumState(s) { | |
if (s._extraRadiumStateKeys && s._extraRadiumStateKeys.length > 0) { | |
var o = s._extraRadiumStateKeys.reduce(function (_, _e) { | |
_[_e]; | |
var et = _objectWithoutProperties$1(_, [_e].map(_toPropertyKey$1)); | |
return et; | |
}, getRadiumStyleState(s)); | |
(s._lastRadiumState = o), s.setState({ _radiumStyleState: o }); | |
} | |
} | |
function cleanUpEnhancer(s) { | |
var o = s._radiumMouseUpListener, | |
_ = s._radiumMediaQueryListenersByQuery; | |
(s._radiumIsMounted = !1), | |
o && o.remove(), | |
_ && | |
Object.keys(_).forEach(function (_e) { | |
_[_e].remove(); | |
}, s); | |
} | |
function resolveConfig(s, o, _) { | |
var _e = s || o || _; | |
return _ && _e !== _ && (_e = _objectSpread({}, _, _e)), _e; | |
} | |
function renderRadiumComponent(s, o, _, _e) { | |
var et = resolveStyles(s, o, _), | |
tt = et.extraStateKeyMap, | |
rt = et.element; | |
return ( | |
(s._extraRadiumStateKeys = Object.keys(tt)), | |
_e | |
? React$3.createElement(RadiumConfigContext.Provider, { value: _e }, rt) | |
: rt | |
); | |
} | |
function createEnhancedFunctionComponent(s, o) { | |
var _ = React$3.forwardRef(function (_e, et) { | |
var tt = _e.radiumConfig, | |
rt = _objectWithoutProperties$1(_e, ["radiumConfig"]), | |
it = reactExports.useContext(RadiumConfigContext), | |
ot = reactExports.useContext(StyleKeeperContext), | |
ct = reactExports.useState({ _radiumStyleState: {} }), | |
at = _slicedToArray(ct, 2), | |
ht = at[0], | |
mt = at[1], | |
vt = reactExports.useRef({ | |
state: ht, | |
setState: mt, | |
_radiumMediaQueryListenersByQuery: void 0, | |
_radiumMouseUpListener: void 0, | |
_radiumIsMounted: !0, | |
_lastRadiumState: void 0, | |
_extraRadiumStateKeys: void 0, | |
_radiumStyleKeeper: ot, | |
}).current; | |
(vt.state = ht), | |
reactExports.useEffect( | |
function () { | |
return function () { | |
cleanUpEnhancer(vt); | |
}; | |
}, | |
[vt], | |
); | |
var xt = vt._extraRadiumStateKeys && vt._extraRadiumStateKeys.length > 0; | |
reactExports.useEffect( | |
function () { | |
trimRadiumState(vt); | |
}, | |
[xt, vt], | |
); | |
var St = s(rt, et), | |
$t = resolveConfig(tt, it, o); | |
return renderRadiumComponent(vt, St, $t, tt); | |
}); | |
return ( | |
(_._isRadiumEnhanced = !0), | |
(_.defaultProps = s.defaultProps), | |
hoistStatics(_, s) | |
); | |
} | |
function createEnhancedClassComponent(s, o, _) { | |
var _e = (function (et) { | |
_inherits$3(tt, et); | |
function tt() { | |
var rt; | |
_classCallCheck$3(this, tt), | |
(rt = _possibleConstructorReturn$3( | |
this, | |
_getPrototypeOf$3(tt).apply(this, arguments), | |
)), | |
(rt.state = rt.state || {}), | |
(rt._radiumStyleKeeper = rt.props.styleKeeperContext), | |
(rt._radiumMediaQueryListenersByQuery = | |
rt._radiumMediaQueryListenersByQuery), | |
(rt._radiumMouseUpListener = rt._radiumMouseUpListener), | |
(rt._radiumIsMounted = !0), | |
(rt._lastRadiumState = void 0), | |
(rt._extraRadiumStateKeys = void 0), | |
(rt.state._radiumStyleState = {}); | |
var it = _assertThisInitialized$3(rt); | |
return copyArrowFuncs(it, o), rt; | |
} | |
return ( | |
_createClass$3(tt, [ | |
{ | |
key: "componentDidUpdate", | |
value: function (it, ot, ct) { | |
_get( | |
_getPrototypeOf$3(tt.prototype), | |
"componentDidUpdate", | |
this, | |
) && | |
_get( | |
_getPrototypeOf$3(tt.prototype), | |
"componentDidUpdate", | |
this, | |
).call(this, it, ot, ct), | |
trimRadiumState(this); | |
}, | |
}, | |
{ | |
key: "componentWillUnmount", | |
value: function () { | |
_get( | |
_getPrototypeOf$3(tt.prototype), | |
"componentWillUnmount", | |
this, | |
) && | |
_get( | |
_getPrototypeOf$3(tt.prototype), | |
"componentWillUnmount", | |
this, | |
).call(this), | |
cleanUpEnhancer(this); | |
}, | |
}, | |
{ | |
key: "render", | |
value: function () { | |
var it = _get( | |
_getPrototypeOf$3(tt.prototype), | |
"render", | |
this, | |
).call(this), | |
ot = resolveConfig( | |
this.props.radiumConfig, | |
this.props.radiumConfigContext, | |
_, | |
); | |
return renderRadiumComponent( | |
this, | |
it, | |
ot, | |
this.props.radiumConfig, | |
); | |
}, | |
}, | |
]), | |
tt | |
); | |
})(o); | |
return ( | |
(_e._isRadiumEnhanced = !0), | |
(RADIUM_PROTO = _e.prototype), | |
(RADIUM_METHODS = Object.getOwnPropertyNames(RADIUM_PROTO).filter( | |
function (et) { | |
return et !== "constructor" && typeof RADIUM_PROTO[et] == "function"; | |
}, | |
)), | |
copyProperties(s, _e), | |
_e.propTypes && | |
_e.propTypes.style && | |
(_e.propTypes = _objectSpread({}, _e.propTypes, { | |
style: PropTypes$1.oneOfType([PropTypes$1.array, PropTypes$1.object]), | |
})), | |
(_e.displayName = s.displayName || s.name || "Component"), | |
withRadiumContexts(_e) | |
); | |
} | |
function createComposedFromNativeClass(s) { | |
return ( | |
(s = (function (o) { | |
function _() { | |
var _e = Reflect.construct(o, arguments, this.constructor); | |
return _e; | |
} | |
return ( | |
Reflect.setPrototypeOf(_.prototype, o.prototype), | |
Reflect.setPrototypeOf(_, o), | |
_ | |
); | |
})(s)), | |
s | |
); | |
} | |
var ReactForwardRefSymbol = reactExports.forwardRef(function () { | |
return null; | |
}).$$typeof; | |
function enhanceWithRadium(s) { | |
var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; | |
if (ReactForwardRefSymbol && s.$$typeof === ReactForwardRefSymbol) | |
return createEnhancedFunctionComponent(s.render, o); | |
if (typeof s != "function") return createFactoryFromConfig(o, s); | |
var _ = s; | |
if (isStateless(_)) return createEnhancedFunctionComponent(_, o); | |
var _e = _; | |
return ( | |
isNativeClass(_e) && (_e = createComposedFromNativeClass(_e)), | |
_e === _ && | |
(_e = (function (et) { | |
_inherits$3(tt, et); | |
function tt() { | |
return ( | |
_classCallCheck$3(this, tt), | |
_possibleConstructorReturn$3( | |
this, | |
_getPrototypeOf$3(tt).apply(this, arguments), | |
) | |
); | |
} | |
return tt; | |
})(_e)), | |
createEnhancedClassComponent(_, _e, o) | |
); | |
} | |
function createFactoryFromConfig(s, o) { | |
var _ = _objectSpread({}, s, o); | |
return function (_e) { | |
return enhanceWithRadium(_e, _); | |
}; | |
} | |
function _typeof$2(s) { | |
return ( | |
typeof Symbol == "function" && typeof Symbol.iterator == "symbol" | |
? (_typeof$2 = function (_) { | |
return typeof _; | |
}) | |
: (_typeof$2 = function (_) { | |
return _ && | |
typeof Symbol == "function" && | |
_.constructor === Symbol && | |
_ !== Symbol.prototype | |
? "symbol" | |
: typeof _; | |
}), | |
_typeof$2(s) | |
); | |
} | |
function _classCallCheck$2(s, o) { | |
if (!(s instanceof o)) | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
function _defineProperties$2(s, o) { | |
for (var _ = 0; _ < o.length; _++) { | |
var _e = o[_]; | |
(_e.enumerable = _e.enumerable || !1), | |
(_e.configurable = !0), | |
"value" in _e && (_e.writable = !0), | |
Object.defineProperty(s, _e.key, _e); | |
} | |
} | |
function _createClass$2(s, o, _) { | |
return ( | |
o && _defineProperties$2(s.prototype, o), | |
_ && _defineProperties$2(s, _), | |
s | |
); | |
} | |
function _possibleConstructorReturn$2(s, o) { | |
return o && (_typeof$2(o) === "object" || typeof o == "function") | |
? o | |
: _assertThisInitialized$2(s); | |
} | |
function _assertThisInitialized$2(s) { | |
if (s === void 0) | |
throw new ReferenceError( | |
"this hasn't been initialised - super() hasn't been called", | |
); | |
return s; | |
} | |
function _getPrototypeOf$2(s) { | |
return ( | |
(_getPrototypeOf$2 = Object.setPrototypeOf | |
? Object.getPrototypeOf | |
: function (_) { | |
return _.__proto__ || Object.getPrototypeOf(_); | |
}), | |
_getPrototypeOf$2(s) | |
); | |
} | |
function _inherits$2(s, o) { | |
if (typeof o != "function" && o !== null) | |
throw new TypeError("Super expression must either be null or a function"); | |
(s.prototype = Object.create(o && o.prototype, { | |
constructor: { value: s, writable: !0, configurable: !0 }, | |
})), | |
o && _setPrototypeOf$3(s, o); | |
} | |
function _setPrototypeOf$3(s, o) { | |
return ( | |
(_setPrototypeOf$3 = | |
Object.setPrototypeOf || | |
function (_e, et) { | |
return (_e.__proto__ = et), _e; | |
}), | |
_setPrototypeOf$3(s, o) | |
); | |
} | |
var Style = (function (s) { | |
_inherits$2(o, s); | |
function o() { | |
return ( | |
_classCallCheck$2(this, o), | |
_possibleConstructorReturn$2( | |
this, | |
_getPrototypeOf$2(o).apply(this, arguments), | |
) | |
); | |
} | |
return ( | |
_createClass$2(o, [ | |
{ | |
key: "_buildStyles", | |
value: function (_e) { | |
var et = this, | |
tt = | |
(this.props.radiumConfig && | |
this.props.radiumConfig.userAgent) || | |
(this.props.radiumConfigContext && | |
this.props.radiumConfigContext.userAgent), | |
rt = this.props.scopeSelector, | |
it = Object.keys(_e).reduce(function (ct, at) { | |
return _typeof$2(_e[at]) !== "object" && (ct[at] = _e[at]), ct; | |
}, {}), | |
ot = Object.keys(it).length | |
? cssRuleSetToString(rt || "", it, tt) | |
: ""; | |
return ( | |
ot + | |
Object.keys(_e).reduce(function (ct, at) { | |
var ht = _e[at]; | |
if (at === "mediaQueries") ct += et._buildMediaQueryString(ht); | |
else if (_typeof$2(_e[at]) === "object") { | |
var mt = rt | |
? at | |
.split(",") | |
.map(function (vt) { | |
return rt + " " + vt.trim(); | |
}) | |
.join(",") | |
: at; | |
ct += cssRuleSetToString(mt, ht, tt); | |
} | |
return ct; | |
}, "") | |
); | |
}, | |
}, | |
{ | |
key: "_buildMediaQueryString", | |
value: function (_e) { | |
var et = this, | |
tt = ""; | |
return ( | |
Object.keys(_e).forEach(function (rt) { | |
tt += "@media " + rt + "{" + et._buildStyles(_e[rt]) + "}"; | |
}), | |
tt | |
); | |
}, | |
}, | |
{ | |
key: "render", | |
value: function () { | |
if (!this.props.rules) return null; | |
var _e = this._buildStyles(this.props.rules); | |
return React$3.createElement("style", { | |
dangerouslySetInnerHTML: { __html: _e }, | |
}); | |
}, | |
}, | |
]), | |
o | |
); | |
})(reactExports.PureComponent); | |
Style.propTypes = { | |
radiumConfig: PropTypes$1.object, | |
rules: PropTypes$1.object, | |
scopeSelector: PropTypes$1.string, | |
}; | |
Style.defaultProps = { scopeSelector: "" }; | |
const Style$1 = withRadiumContexts(Style); | |
function _typeof$1(s) { | |
return ( | |
typeof Symbol == "function" && typeof Symbol.iterator == "symbol" | |
? (_typeof$1 = function (_) { | |
return typeof _; | |
}) | |
: (_typeof$1 = function (_) { | |
return _ && | |
typeof Symbol == "function" && | |
_.constructor === Symbol && | |
_ !== Symbol.prototype | |
? "symbol" | |
: typeof _; | |
}), | |
_typeof$1(s) | |
); | |
} | |
function _classCallCheck$1(s, o) { | |
if (!(s instanceof o)) | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
function _defineProperties$1(s, o) { | |
for (var _ = 0; _ < o.length; _++) { | |
var _e = o[_]; | |
(_e.enumerable = _e.enumerable || !1), | |
(_e.configurable = !0), | |
"value" in _e && (_e.writable = !0), | |
Object.defineProperty(s, _e.key, _e); | |
} | |
} | |
function _createClass$1(s, o, _) { | |
return ( | |
o && _defineProperties$1(s.prototype, o), | |
_ && _defineProperties$1(s, _), | |
s | |
); | |
} | |
function _possibleConstructorReturn$1(s, o) { | |
return o && (_typeof$1(o) === "object" || typeof o == "function") | |
? o | |
: _assertThisInitialized$1(s); | |
} | |
function _assertThisInitialized$1(s) { | |
if (s === void 0) | |
throw new ReferenceError( | |
"this hasn't been initialised - super() hasn't been called", | |
); | |
return s; | |
} | |
function _getPrototypeOf$1(s) { | |
return ( | |
(_getPrototypeOf$1 = Object.setPrototypeOf | |
? Object.getPrototypeOf | |
: function (_) { | |
return _.__proto__ || Object.getPrototypeOf(_); | |
}), | |
_getPrototypeOf$1(s) | |
); | |
} | |
function _inherits$1(s, o) { | |
if (typeof o != "function" && o !== null) | |
throw new TypeError("Super expression must either be null or a function"); | |
(s.prototype = Object.create(o && o.prototype, { | |
constructor: { value: s, writable: !0, configurable: !0 }, | |
})), | |
o && _setPrototypeOf$2(s, o); | |
} | |
function _setPrototypeOf$2(s, o) { | |
return ( | |
(_setPrototypeOf$2 = | |
Object.setPrototypeOf || | |
function (_e, et) { | |
return (_e.__proto__ = et), _e; | |
}), | |
_setPrototypeOf$2(s, o) | |
); | |
} | |
var StyleSheet = (function (s) { | |
_inherits$1(o, s); | |
function o() { | |
var _; | |
if ( | |
(_classCallCheck$1(this, o), | |
(_ = _possibleConstructorReturn$1( | |
this, | |
_getPrototypeOf$1(o).apply(this, arguments), | |
)), | |
(_.styleKeeper = void 0), | |
(_._subscription = void 0), | |
(_._root = void 0), | |
(_._css = void 0), | |
(_._onChange = function () { | |
var _e = _.styleKeeper.getCSS(); | |
if (_e !== _._css) { | |
if (_._root) _._root.innerHTML = _e; | |
else | |
throw new Error( | |
"No root style object found, even after StyleSheet mount.", | |
); | |
_._css = _e; | |
} | |
}), | |
!_.props.styleKeeperContext) | |
) | |
throw new Error("StyleRoot is required to use StyleSheet"); | |
return ( | |
(_.styleKeeper = _.props.styleKeeperContext), | |
(_._css = _.styleKeeper.getCSS()), | |
_ | |
); | |
} | |
return ( | |
_createClass$1(o, [ | |
{ | |
key: "componentDidMount", | |
value: function () { | |
(this._subscription = this.styleKeeper.subscribe(this._onChange)), | |
this._onChange(); | |
}, | |
}, | |
{ | |
key: "shouldComponentUpdate", | |
value: function () { | |
return !1; | |
}, | |
}, | |
{ | |
key: "componentWillUnmount", | |
value: function () { | |
this._subscription && this._subscription.remove(); | |
}, | |
}, | |
{ | |
key: "render", | |
value: function () { | |
var _e = this; | |
return React$3.createElement("style", { | |
dangerouslySetInnerHTML: { __html: this._css }, | |
ref: function (tt) { | |
_e._root = tt; | |
}, | |
}); | |
}, | |
}, | |
]), | |
o | |
); | |
})(reactExports.Component); | |
const StyleSheet$1 = withRadiumContexts(StyleSheet); | |
function _objectWithoutProperties(s, o) { | |
if (s == null) return {}; | |
var _ = _objectWithoutPropertiesLoose$1(s, o), | |
_e, | |
et; | |
if (Object.getOwnPropertySymbols) { | |
var tt = Object.getOwnPropertySymbols(s); | |
for (et = 0; et < tt.length; et++) | |
(_e = tt[et]), | |
!(o.indexOf(_e) >= 0) && | |
Object.prototype.propertyIsEnumerable.call(s, _e) && | |
(_[_e] = s[_e]); | |
} | |
return _; | |
} | |
function _objectWithoutPropertiesLoose$1(s, o) { | |
if (s == null) return {}; | |
var _ = {}, | |
_e = Object.keys(s), | |
et, | |
tt; | |
for (tt = 0; tt < _e.length; tt++) | |
(et = _e[tt]), !(o.indexOf(et) >= 0) && (_[et] = s[et]); | |
return _; | |
} | |
function getStyleKeeper(s, o) { | |
var _ = (s && s.userAgent) || (o && o.userAgent); | |
return new StyleKeeper(_); | |
} | |
var StyleRootInner = enhanceWithRadium(function (s) { | |
var o = s.children, | |
_ = _objectWithoutProperties(s, ["children"]); | |
return React$3.createElement( | |
"div", | |
_, | |
o, | |
React$3.createElement(StyleSheet$1, null), | |
); | |
}), | |
StyleRoot = function (o) { | |
var _ = o.radiumConfig, | |
_e = reactExports.useContext(RadiumConfigContext), | |
et = reactExports.useRef(getStyleKeeper(_, _e)); | |
return React$3.createElement( | |
StyleKeeperContext.Provider, | |
{ value: et.current }, | |
React$3.createElement(StyleRootInner, o), | |
); | |
}; | |
const StyleRoot$1 = StyleRoot; | |
function keyframes(s, o) { | |
return { | |
__radiumKeyframes: !0, | |
__process: function (_e) { | |
var et = getPrefixedKeyframes(_e), | |
tt = Object.keys(s).map(function (ot) { | |
return cssRuleSetToString(ot, s[ot], _e); | |
}).join(` | |
`), | |
rt = (o ? o + "-" : "") + "radium-animation-" + hash$5(tt), | |
it = | |
"@" + | |
et + | |
" " + | |
rt + | |
` { | |
` + | |
tt + | |
` | |
} | |
`; | |
return { css: it, animationName: rt }; | |
}, | |
}; | |
} | |
function Radium(s) { | |
return enhanceWithRadium(s); | |
} | |
Radium.Plugins = Plugins; | |
Radium.Style = Style$1; | |
Radium.StyleRoot = StyleRoot$1; | |
Radium.getState = getState$1; | |
Radium.keyframes = keyframes; | |
function _setPrototypeOf$1(s, o) { | |
return ( | |
(_setPrototypeOf$1 = Object.setPrototypeOf | |
? Object.setPrototypeOf.bind() | |
: function (_e, et) { | |
return (_e.__proto__ = et), _e; | |
}), | |
_setPrototypeOf$1(s, o) | |
); | |
} | |
function _inheritsLoose$2(s, o) { | |
(s.prototype = Object.create(o.prototype)), | |
(s.prototype.constructor = s), | |
_setPrototypeOf$1(s, o); | |
} | |
function _extends$1() { | |
return ( | |
(_extends$1 = Object.assign | |
? Object.assign.bind() | |
: function (s) { | |
for (var o = 1; o < arguments.length; o++) { | |
var _ = arguments[o]; | |
for (var _e in _) | |
Object.prototype.hasOwnProperty.call(_, _e) && (s[_e] = _[_e]); | |
} | |
return s; | |
}), | |
_extends$1.apply(this, arguments) | |
); | |
} | |
function isAbsolute(s) { | |
return s.charAt(0) === "/"; | |
} | |
function spliceOne$1(s, o) { | |
for (var _ = o, _e = _ + 1, et = s.length; _e < et; _ += 1, _e += 1) | |
s[_] = s[_e]; | |
s.pop(); | |
} | |
function resolvePathname(s, o) { | |
o === void 0 && (o = ""); | |
var _ = (s && s.split("/")) || [], | |
_e = (o && o.split("/")) || [], | |
et = s && isAbsolute(s), | |
tt = o && isAbsolute(o), | |
rt = et || tt; | |
if ( | |
(s && isAbsolute(s) | |
? (_e = _) | |
: _.length && (_e.pop(), (_e = _e.concat(_))), | |
!_e.length) | |
) | |
return "/"; | |
var it; | |
if (_e.length) { | |
var ot = _e[_e.length - 1]; | |
it = ot === "." || ot === ".." || ot === ""; | |
} else it = !1; | |
for (var ct = 0, at = _e.length; at >= 0; at--) { | |
var ht = _e[at]; | |
ht === "." | |
? spliceOne$1(_e, at) | |
: ht === ".." | |
? (spliceOne$1(_e, at), ct++) | |
: ct && (spliceOne$1(_e, at), ct--); | |
} | |
if (!rt) for (; ct--; ct) _e.unshift(".."); | |
rt && _e[0] !== "" && (!_e[0] || !isAbsolute(_e[0])) && _e.unshift(""); | |
var mt = _e.join("/"); | |
return it && mt.substr(-1) !== "/" && (mt += "/"), mt; | |
} | |
var prefix = "Invariant failed"; | |
function invariant(s, o) { | |
if (!s) throw new Error(prefix); | |
} | |
function addLeadingSlash$1(s) { | |
return s.charAt(0) === "/" ? s : "/" + s; | |
} | |
function stripLeadingSlash(s) { | |
return s.charAt(0) === "/" ? s.substr(1) : s; | |
} | |
function hasBasename(s, o) { | |
return ( | |
s.toLowerCase().indexOf(o.toLowerCase()) === 0 && | |
"/?#".indexOf(s.charAt(o.length)) !== -1 | |
); | |
} | |
function stripBasename$1(s, o) { | |
return hasBasename(s, o) ? s.substr(o.length) : s; | |
} | |
function stripTrailingSlash(s) { | |
return s.charAt(s.length - 1) === "/" ? s.slice(0, -1) : s; | |
} | |
function parsePath(s) { | |
var o = s || "/", | |
_ = "", | |
_e = "", | |
et = o.indexOf("#"); | |
et !== -1 && ((_e = o.substr(et)), (o = o.substr(0, et))); | |
var tt = o.indexOf("?"); | |
return ( | |
tt !== -1 && ((_ = o.substr(tt)), (o = o.substr(0, tt))), | |
{ pathname: o, search: _ === "?" ? "" : _, hash: _e === "#" ? "" : _e } | |
); | |
} | |
function createPath(s) { | |
var o = s.pathname, | |
_ = s.search, | |
_e = s.hash, | |
et = o || "/"; | |
return ( | |
_ && _ !== "?" && (et += _.charAt(0) === "?" ? _ : "?" + _), | |
_e && _e !== "#" && (et += _e.charAt(0) === "#" ? _e : "#" + _e), | |
et | |
); | |
} | |
function createLocation(s, o, _, _e) { | |
var et; | |
typeof s == "string" | |
? ((et = parsePath(s)), (et.state = o)) | |
: ((et = _extends$1({}, s)), | |
et.pathname === void 0 && (et.pathname = ""), | |
et.search | |
? et.search.charAt(0) !== "?" && (et.search = "?" + et.search) | |
: (et.search = ""), | |
et.hash | |
? et.hash.charAt(0) !== "#" && (et.hash = "#" + et.hash) | |
: (et.hash = ""), | |
o !== void 0 && et.state === void 0 && (et.state = o)); | |
try { | |
et.pathname = decodeURI(et.pathname); | |
} catch (tt) { | |
throw tt instanceof URIError | |
? new URIError( | |
'Pathname "' + | |
et.pathname + | |
'" could not be decoded. This is likely caused by an invalid percent-encoding.', | |
) | |
: tt; | |
} | |
return ( | |
_ && (et.key = _), | |
_e | |
? et.pathname | |
? et.pathname.charAt(0) !== "/" && | |
(et.pathname = resolvePathname(et.pathname, _e.pathname)) | |
: (et.pathname = _e.pathname) | |
: et.pathname || (et.pathname = "/"), | |
et | |
); | |
} | |
function createTransitionManager() { | |
var s = null; | |
function o(rt) { | |
return ( | |
(s = rt), | |
function () { | |
s === rt && (s = null); | |
} | |
); | |
} | |
function _(rt, it, ot, ct) { | |
if (s != null) { | |
var at = typeof s == "function" ? s(rt, it) : s; | |
typeof at == "string" | |
? typeof ot == "function" | |
? ot(at, ct) | |
: ct(!0) | |
: ct(at !== !1); | |
} else ct(!0); | |
} | |
var _e = []; | |
function et(rt) { | |
var it = !0; | |
function ot() { | |
it && rt.apply(void 0, arguments); | |
} | |
return ( | |
_e.push(ot), | |
function () { | |
(it = !1), | |
(_e = _e.filter(function (ct) { | |
return ct !== ot; | |
})); | |
} | |
); | |
} | |
function tt() { | |
for (var rt = arguments.length, it = new Array(rt), ot = 0; ot < rt; ot++) | |
it[ot] = arguments[ot]; | |
_e.forEach(function (ct) { | |
return ct.apply(void 0, it); | |
}); | |
} | |
return { | |
setPrompt: o, | |
confirmTransitionTo: _, | |
appendListener: et, | |
notifyListeners: tt, | |
}; | |
} | |
var canUseDOM$1 = !!( | |
typeof window < "u" && | |
window.document && | |
window.document.createElement | |
); | |
function getConfirmation(s, o) { | |
o(window.confirm(s)); | |
} | |
function supportsHistory() { | |
var s = window.navigator.userAgent; | |
return (s.indexOf("Android 2.") !== -1 || | |
s.indexOf("Android 4.0") !== -1) && | |
s.indexOf("Mobile Safari") !== -1 && | |
s.indexOf("Chrome") === -1 && | |
s.indexOf("Windows Phone") === -1 | |
? !1 | |
: window.history && "pushState" in window.history; | |
} | |
function supportsPopStateOnHashChange() { | |
return window.navigator.userAgent.indexOf("Trident") === -1; | |
} | |
function supportsGoWithoutReloadUsingHash() { | |
return window.navigator.userAgent.indexOf("Firefox") === -1; | |
} | |
function isExtraneousPopstateEvent(s) { | |
return s.state === void 0 && navigator.userAgent.indexOf("CriOS") === -1; | |
} | |
var PopStateEvent = "popstate", | |
HashChangeEvent = "hashchange"; | |
function getHistoryState() { | |
try { | |
return window.history.state || {}; | |
} catch { | |
return {}; | |
} | |
} | |
function createBrowserHistory(s) { | |
s === void 0 && (s = {}), canUseDOM$1 || invariant(!1); | |
var o = window.history, | |
_ = supportsHistory(), | |
_e = !supportsPopStateOnHashChange(), | |
et = s, | |
tt = et.forceRefresh, | |
rt = tt === void 0 ? !1 : tt, | |
it = et.getUserConfirmation, | |
ot = it === void 0 ? getConfirmation : it, | |
ct = et.keyLength, | |
at = ct === void 0 ? 6 : ct, | |
ht = s.basename ? stripTrailingSlash(addLeadingSlash$1(s.basename)) : ""; | |
function mt(gt) { | |
var st = gt || {}, | |
pt = st.key, | |
kt = st.state, | |
Qt = window.location, | |
Dt = Qt.pathname, | |
Zt = Qt.search, | |
Vt = Qt.hash, | |
Ct = Dt + Zt + Vt; | |
return ht && (Ct = stripBasename$1(Ct, ht)), createLocation(Ct, kt, pt); | |
} | |
function vt() { | |
return Math.random().toString(36).substr(2, at); | |
} | |
var xt = createTransitionManager(); | |
function St(gt) { | |
_extends$1(bt, gt), | |
(bt.length = o.length), | |
xt.notifyListeners(bt.location, bt.action); | |
} | |
function $t(gt) { | |
isExtraneousPopstateEvent(gt) || Rt(mt(gt.state)); | |
} | |
function Et() { | |
Rt(mt(getHistoryState())); | |
} | |
var _t = !1; | |
function Rt(gt) { | |
if (_t) (_t = !1), St(); | |
else { | |
var st = "POP"; | |
xt.confirmTransitionTo(gt, st, ot, function (pt) { | |
pt ? St({ action: st, location: gt }) : Mt(gt); | |
}); | |
} | |
} | |
function Mt(gt) { | |
var st = bt.location, | |
pt = Xt.indexOf(st.key); | |
pt === -1 && (pt = 0); | |
var kt = Xt.indexOf(gt.key); | |
kt === -1 && (kt = 0); | |
var Qt = pt - kt; | |
Qt && ((_t = !0), nr(Qt)); | |
} | |
var It = mt(getHistoryState()), | |
Xt = [It.key]; | |
function Jt(gt) { | |
return ht + createPath(gt); | |
} | |
function Ht(gt, st) { | |
var pt = "PUSH", | |
kt = createLocation(gt, st, vt(), bt.location); | |
xt.confirmTransitionTo(kt, pt, ot, function (Qt) { | |
if (Qt) { | |
var Dt = Jt(kt), | |
Zt = kt.key, | |
Vt = kt.state; | |
if (_) | |
if ((o.pushState({ key: Zt, state: Vt }, null, Dt), rt)) | |
window.location.href = Dt; | |
else { | |
var Ct = Xt.indexOf(bt.location.key), | |
jt = Xt.slice(0, Ct + 1); | |
jt.push(kt.key), (Xt = jt), St({ action: pt, location: kt }); | |
} | |
else window.location.href = Dt; | |
} | |
}); | |
} | |
function qt(gt, st) { | |
var pt = "REPLACE", | |
kt = createLocation(gt, st, vt(), bt.location); | |
xt.confirmTransitionTo(kt, pt, ot, function (Qt) { | |
if (Qt) { | |
var Dt = Jt(kt), | |
Zt = kt.key, | |
Vt = kt.state; | |
if (_) | |
if ((o.replaceState({ key: Zt, state: Vt }, null, Dt), rt)) | |
window.location.replace(Dt); | |
else { | |
var Ct = Xt.indexOf(bt.location.key); | |
Ct !== -1 && (Xt[Ct] = kt.key), St({ action: pt, location: kt }); | |
} | |
else window.location.replace(Dt); | |
} | |
}); | |
} | |
function nr(gt) { | |
o.go(gt); | |
} | |
function wt() { | |
nr(-1); | |
} | |
function nt() { | |
nr(1); | |
} | |
var ut = 0; | |
function ft(gt) { | |
(ut += gt), | |
ut === 1 && gt === 1 | |
? (window.addEventListener(PopStateEvent, $t), | |
_e && window.addEventListener(HashChangeEvent, Et)) | |
: ut === 0 && | |
(window.removeEventListener(PopStateEvent, $t), | |
_e && window.removeEventListener(HashChangeEvent, Et)); | |
} | |
var dt = !1; | |
function Ot(gt) { | |
gt === void 0 && (gt = !1); | |
var st = xt.setPrompt(gt); | |
return ( | |
dt || (ft(1), (dt = !0)), | |
function () { | |
return dt && ((dt = !1), ft(-1)), st(); | |
} | |
); | |
} | |
function yt(gt) { | |
var st = xt.appendListener(gt); | |
return ( | |
ft(1), | |
function () { | |
ft(-1), st(); | |
} | |
); | |
} | |
var bt = { | |
length: o.length, | |
action: "POP", | |
location: It, | |
createHref: Jt, | |
push: Ht, | |
replace: qt, | |
go: nr, | |
goBack: wt, | |
goForward: nt, | |
block: Ot, | |
listen: yt, | |
}; | |
return bt; | |
} | |
var HashChangeEvent$1 = "hashchange", | |
HashPathCoders = { | |
hashbang: { | |
encodePath: function (o) { | |
return o.charAt(0) === "!" ? o : "!/" + stripLeadingSlash(o); | |
}, | |
decodePath: function (o) { | |
return o.charAt(0) === "!" ? o.substr(1) : o; | |
}, | |
}, | |
noslash: { encodePath: stripLeadingSlash, decodePath: addLeadingSlash$1 }, | |
slash: { encodePath: addLeadingSlash$1, decodePath: addLeadingSlash$1 }, | |
}; | |
function stripHash(s) { | |
var o = s.indexOf("#"); | |
return o === -1 ? s : s.slice(0, o); | |
} | |
function getHashPath() { | |
var s = window.location.href, | |
o = s.indexOf("#"); | |
return o === -1 ? "" : s.substring(o + 1); | |
} | |
function pushHashPath(s) { | |
window.location.hash = s; | |
} | |
function replaceHashPath(s) { | |
window.location.replace(stripHash(window.location.href) + "#" + s); | |
} | |
function createHashHistory(s) { | |
s === void 0 && (s = {}), canUseDOM$1 || invariant(!1); | |
var o = window.history; | |
supportsGoWithoutReloadUsingHash(); | |
var _ = s, | |
_e = _.getUserConfirmation, | |
et = _e === void 0 ? getConfirmation : _e, | |
tt = _.hashType, | |
rt = tt === void 0 ? "slash" : tt, | |
it = s.basename ? stripTrailingSlash(addLeadingSlash$1(s.basename)) : "", | |
ot = HashPathCoders[rt], | |
ct = ot.encodePath, | |
at = ot.decodePath; | |
function ht() { | |
var st = at(getHashPath()); | |
return it && (st = stripBasename$1(st, it)), createLocation(st); | |
} | |
var mt = createTransitionManager(); | |
function vt(st) { | |
_extends$1(gt, st), | |
(gt.length = o.length), | |
mt.notifyListeners(gt.location, gt.action); | |
} | |
var xt = !1, | |
St = null; | |
function $t(st, pt) { | |
return ( | |
st.pathname === pt.pathname && | |
st.search === pt.search && | |
st.hash === pt.hash | |
); | |
} | |
function Et() { | |
var st = getHashPath(), | |
pt = ct(st); | |
if (st !== pt) replaceHashPath(pt); | |
else { | |
var kt = ht(), | |
Qt = gt.location; | |
if ((!xt && $t(Qt, kt)) || St === createPath(kt)) return; | |
(St = null), _t(kt); | |
} | |
} | |
function _t(st) { | |
if (xt) (xt = !1), vt(); | |
else { | |
var pt = "POP"; | |
mt.confirmTransitionTo(st, pt, et, function (kt) { | |
kt ? vt({ action: pt, location: st }) : Rt(st); | |
}); | |
} | |
} | |
function Rt(st) { | |
var pt = gt.location, | |
kt = Jt.lastIndexOf(createPath(pt)); | |
kt === -1 && (kt = 0); | |
var Qt = Jt.lastIndexOf(createPath(st)); | |
Qt === -1 && (Qt = 0); | |
var Dt = kt - Qt; | |
Dt && ((xt = !0), wt(Dt)); | |
} | |
var Mt = getHashPath(), | |
It = ct(Mt); | |
Mt !== It && replaceHashPath(It); | |
var Xt = ht(), | |
Jt = [createPath(Xt)]; | |
function Ht(st) { | |
var pt = document.querySelector("base"), | |
kt = ""; | |
return ( | |
pt && pt.getAttribute("href") && (kt = stripHash(window.location.href)), | |
kt + "#" + ct(it + createPath(st)) | |
); | |
} | |
function qt(st, pt) { | |
var kt = "PUSH", | |
Qt = createLocation(st, void 0, void 0, gt.location); | |
mt.confirmTransitionTo(Qt, kt, et, function (Dt) { | |
if (Dt) { | |
var Zt = createPath(Qt), | |
Vt = ct(it + Zt), | |
Ct = getHashPath() !== Vt; | |
if (Ct) { | |
(St = Zt), pushHashPath(Vt); | |
var jt = Jt.lastIndexOf(createPath(gt.location)), | |
Wt = Jt.slice(0, jt + 1); | |
Wt.push(Zt), (Jt = Wt), vt({ action: kt, location: Qt }); | |
} else vt(); | |
} | |
}); | |
} | |
function nr(st, pt) { | |
var kt = "REPLACE", | |
Qt = createLocation(st, void 0, void 0, gt.location); | |
mt.confirmTransitionTo(Qt, kt, et, function (Dt) { | |
if (Dt) { | |
var Zt = createPath(Qt), | |
Vt = ct(it + Zt), | |
Ct = getHashPath() !== Vt; | |
Ct && ((St = Zt), replaceHashPath(Vt)); | |
var jt = Jt.indexOf(createPath(gt.location)); | |
jt !== -1 && (Jt[jt] = Zt), vt({ action: kt, location: Qt }); | |
} | |
}); | |
} | |
function wt(st) { | |
o.go(st); | |
} | |
function nt() { | |
wt(-1); | |
} | |
function ut() { | |
wt(1); | |
} | |
var ft = 0; | |
function dt(st) { | |
(ft += st), | |
ft === 1 && st === 1 | |
? window.addEventListener(HashChangeEvent$1, Et) | |
: ft === 0 && window.removeEventListener(HashChangeEvent$1, Et); | |
} | |
var Ot = !1; | |
function yt(st) { | |
st === void 0 && (st = !1); | |
var pt = mt.setPrompt(st); | |
return ( | |
Ot || (dt(1), (Ot = !0)), | |
function () { | |
return Ot && ((Ot = !1), dt(-1)), pt(); | |
} | |
); | |
} | |
function bt(st) { | |
var pt = mt.appendListener(st); | |
return ( | |
dt(1), | |
function () { | |
dt(-1), pt(); | |
} | |
); | |
} | |
var gt = { | |
length: o.length, | |
action: "POP", | |
location: Xt, | |
createHref: Ht, | |
push: qt, | |
replace: nr, | |
go: wt, | |
goBack: nt, | |
goForward: ut, | |
block: yt, | |
listen: bt, | |
}; | |
return gt; | |
} | |
function clamp(s, o, _) { | |
return Math.min(Math.max(s, o), _); | |
} | |
function createMemoryHistory(s) { | |
s === void 0 && (s = {}); | |
var o = s, | |
_ = o.getUserConfirmation, | |
_e = o.initialEntries, | |
et = _e === void 0 ? ["/"] : _e, | |
tt = o.initialIndex, | |
rt = tt === void 0 ? 0 : tt, | |
it = o.keyLength, | |
ot = it === void 0 ? 6 : it, | |
ct = createTransitionManager(); | |
function at(Ht) { | |
_extends$1(Jt, Ht), | |
(Jt.length = Jt.entries.length), | |
ct.notifyListeners(Jt.location, Jt.action); | |
} | |
function ht() { | |
return Math.random().toString(36).substr(2, ot); | |
} | |
var mt = clamp(rt, 0, et.length - 1), | |
vt = et.map(function (Ht) { | |
return typeof Ht == "string" | |
? createLocation(Ht, void 0, ht()) | |
: createLocation(Ht, void 0, Ht.key || ht()); | |
}), | |
xt = createPath; | |
function St(Ht, qt) { | |
var nr = "PUSH", | |
wt = createLocation(Ht, qt, ht(), Jt.location); | |
ct.confirmTransitionTo(wt, nr, _, function (nt) { | |
if (nt) { | |
var ut = Jt.index, | |
ft = ut + 1, | |
dt = Jt.entries.slice(0); | |
dt.length > ft ? dt.splice(ft, dt.length - ft, wt) : dt.push(wt), | |
at({ action: nr, location: wt, index: ft, entries: dt }); | |
} | |
}); | |
} | |
function $t(Ht, qt) { | |
var nr = "REPLACE", | |
wt = createLocation(Ht, qt, ht(), Jt.location); | |
ct.confirmTransitionTo(wt, nr, _, function (nt) { | |
nt && ((Jt.entries[Jt.index] = wt), at({ action: nr, location: wt })); | |
}); | |
} | |
function Et(Ht) { | |
var qt = clamp(Jt.index + Ht, 0, Jt.entries.length - 1), | |
nr = "POP", | |
wt = Jt.entries[qt]; | |
ct.confirmTransitionTo(wt, nr, _, function (nt) { | |
nt ? at({ action: nr, location: wt, index: qt }) : at(); | |
}); | |
} | |
function _t() { | |
Et(-1); | |
} | |
function Rt() { | |
Et(1); | |
} | |
function Mt(Ht) { | |
var qt = Jt.index + Ht; | |
return qt >= 0 && qt < Jt.entries.length; | |
} | |
function It(Ht) { | |
return Ht === void 0 && (Ht = !1), ct.setPrompt(Ht); | |
} | |
function Xt(Ht) { | |
return ct.appendListener(Ht); | |
} | |
var Jt = { | |
length: vt.length, | |
action: "POP", | |
location: vt[mt], | |
index: mt, | |
entries: vt, | |
createHref: xt, | |
push: St, | |
replace: $t, | |
go: Et, | |
goBack: _t, | |
goForward: Rt, | |
canGo: Mt, | |
block: It, | |
listen: Xt, | |
}; | |
return Jt; | |
} | |
var pathToRegexp$2 = { exports: {} }, | |
isarray$3 = | |
Array.isArray || | |
function (s) { | |
return Object.prototype.toString.call(s) == "[object Array]"; | |
}, | |
isarray$2 = isarray$3; | |
pathToRegexp$2.exports = pathToRegexp; | |
pathToRegexp$2.exports.parse = parse$9; | |
pathToRegexp$2.exports.compile = compile; | |
pathToRegexp$2.exports.tokensToFunction = tokensToFunction; | |
pathToRegexp$2.exports.tokensToRegExp = tokensToRegExp; | |
var PATH_REGEXP = new RegExp( | |
[ | |
"(\\\\.)", | |
"([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))", | |
].join("|"), | |
"g", | |
); | |
function parse$9(s, o) { | |
for ( | |
var _ = [], _e = 0, et = 0, tt = "", rt = (o && o.delimiter) || "/", it; | |
(it = PATH_REGEXP.exec(s)) != null; | |
) { | |
var ot = it[0], | |
ct = it[1], | |
at = it.index; | |
if (((tt += s.slice(et, at)), (et = at + ot.length), ct)) { | |
tt += ct[1]; | |
continue; | |
} | |
var ht = s[et], | |
mt = it[2], | |
vt = it[3], | |
xt = it[4], | |
St = it[5], | |
$t = it[6], | |
Et = it[7]; | |
tt && (_.push(tt), (tt = "")); | |
var _t = mt != null && ht != null && ht !== mt, | |
Rt = $t === "+" || $t === "*", | |
Mt = $t === "?" || $t === "*", | |
It = it[2] || rt, | |
Xt = xt || St; | |
_.push({ | |
name: vt || _e++, | |
prefix: mt || "", | |
delimiter: It, | |
optional: Mt, | |
repeat: Rt, | |
partial: _t, | |
asterisk: !!Et, | |
pattern: Xt | |
? escapeGroup(Xt) | |
: Et | |
? ".*" | |
: "[^" + escapeString(It) + "]+?", | |
}); | |
} | |
return et < s.length && (tt += s.substr(et)), tt && _.push(tt), _; | |
} | |
function compile(s, o) { | |
return tokensToFunction(parse$9(s, o), o); | |
} | |
function encodeURIComponentPretty(s) { | |
return encodeURI(s).replace(/[\/?#]/g, function (o) { | |
return "%" + o.charCodeAt(0).toString(16).toUpperCase(); | |
}); | |
} | |
function encodeAsterisk(s) { | |
return encodeURI(s).replace(/[?#]/g, function (o) { | |
return "%" + o.charCodeAt(0).toString(16).toUpperCase(); | |
}); | |
} | |
function tokensToFunction(s, o) { | |
for (var _ = new Array(s.length), _e = 0; _e < s.length; _e++) | |
typeof s[_e] == "object" && | |
(_[_e] = new RegExp("^(?:" + s[_e].pattern + ")$", flags(o))); | |
return function (et, tt) { | |
for ( | |
var rt = "", | |
it = et || {}, | |
ot = tt || {}, | |
ct = ot.pretty ? encodeURIComponentPretty : encodeURIComponent, | |
at = 0; | |
at < s.length; | |
at++ | |
) { | |
var ht = s[at]; | |
if (typeof ht == "string") { | |
rt += ht; | |
continue; | |
} | |
var mt = it[ht.name], | |
vt; | |
if (mt == null) | |
if (ht.optional) { | |
ht.partial && (rt += ht.prefix); | |
continue; | |
} else | |
throw new TypeError('Expected "' + ht.name + '" to be defined'); | |
if (isarray$2(mt)) { | |
if (!ht.repeat) | |
throw new TypeError( | |
'Expected "' + | |
ht.name + | |
'" to not repeat, but received `' + | |
JSON.stringify(mt) + | |
"`", | |
); | |
if (mt.length === 0) { | |
if (ht.optional) continue; | |
throw new TypeError('Expected "' + ht.name + '" to not be empty'); | |
} | |
for (var xt = 0; xt < mt.length; xt++) { | |
if (((vt = ct(mt[xt])), !_[at].test(vt))) | |
throw new TypeError( | |
'Expected all "' + | |
ht.name + | |
'" to match "' + | |
ht.pattern + | |
'", but received `' + | |
JSON.stringify(vt) + | |
"`", | |
); | |
rt += (xt === 0 ? ht.prefix : ht.delimiter) + vt; | |
} | |
continue; | |
} | |
if (((vt = ht.asterisk ? encodeAsterisk(mt) : ct(mt)), !_[at].test(vt))) | |
throw new TypeError( | |
'Expected "' + | |
ht.name + | |
'" to match "' + | |
ht.pattern + | |
'", but received "' + | |
vt + | |
'"', | |
); | |
rt += ht.prefix + vt; | |
} | |
return rt; | |
}; | |
} | |
function escapeString(s) { | |
return s.replace(/([.+*?=^!:${}()[\]|\/\\])/g, "\\$1"); | |
} | |
function escapeGroup(s) { | |
return s.replace(/([=!:$\/()])/g, "\\$1"); | |
} | |
function attachKeys(s, o) { | |
return (s.keys = o), s; | |
} | |
function flags(s) { | |
return s && s.sensitive ? "" : "i"; | |
} | |
function regexpToRegexp(s, o) { | |
var _ = s.source.match(/\((?!\?)/g); | |
if (_) | |
for (var _e = 0; _e < _.length; _e++) | |
o.push({ | |
name: _e, | |
prefix: null, | |
delimiter: null, | |
optional: !1, | |
repeat: !1, | |
partial: !1, | |
asterisk: !1, | |
pattern: null, | |
}); | |
return attachKeys(s, o); | |
} | |
function arrayToRegexp(s, o, _) { | |
for (var _e = [], et = 0; et < s.length; et++) | |
_e.push(pathToRegexp(s[et], o, _).source); | |
var tt = new RegExp("(?:" + _e.join("|") + ")", flags(_)); | |
return attachKeys(tt, o); | |
} | |
function stringToRegexp(s, o, _) { | |
return tokensToRegExp(parse$9(s, _), o, _); | |
} | |
function tokensToRegExp(s, o, _) { | |
isarray$2(o) || ((_ = o || _), (o = [])), (_ = _ || {}); | |
for ( | |
var _e = _.strict, et = _.end !== !1, tt = "", rt = 0; | |
rt < s.length; | |
rt++ | |
) { | |
var it = s[rt]; | |
if (typeof it == "string") tt += escapeString(it); | |
else { | |
var ot = escapeString(it.prefix), | |
ct = "(?:" + it.pattern + ")"; | |
o.push(it), | |
it.repeat && (ct += "(?:" + ot + ct + ")*"), | |
it.optional | |
? it.partial | |
? (ct = ot + "(" + ct + ")?") | |
: (ct = "(?:" + ot + "(" + ct + "))?") | |
: (ct = ot + "(" + ct + ")"), | |
(tt += ct); | |
} | |
} | |
var at = escapeString(_.delimiter || "/"), | |
ht = tt.slice(-at.length) === at; | |
return ( | |
_e || (tt = (ht ? tt.slice(0, -at.length) : tt) + "(?:" + at + "(?=$))?"), | |
et ? (tt += "$") : (tt += _e && ht ? "" : "(?=" + at + "|$)"), | |
attachKeys(new RegExp("^" + tt, flags(_)), o) | |
); | |
} | |
function pathToRegexp(s, o, _) { | |
return ( | |
isarray$2(o) || ((_ = o || _), (o = [])), | |
(_ = _ || {}), | |
s instanceof RegExp | |
? regexpToRegexp(s, o) | |
: isarray$2(s) | |
? arrayToRegexp(s, o, _) | |
: stringToRegexp(s, o, _) | |
); | |
} | |
var pathToRegexpExports = pathToRegexp$2.exports; | |
const pathToRegexp$1 = getDefaultExportFromCjs$1(pathToRegexpExports); | |
function _objectWithoutPropertiesLoose(s, o) { | |
if (s == null) return {}; | |
var _ = {}, | |
_e = Object.keys(s), | |
et, | |
tt; | |
for (tt = 0; tt < _e.length; tt++) | |
(et = _e[tt]), !(o.indexOf(et) >= 0) && (_[et] = s[et]); | |
return _; | |
} | |
var MAX_SIGNED_31_BIT_INT = 1073741823, | |
commonjsGlobal$2 = | |
typeof globalThis < "u" | |
? globalThis | |
: typeof window < "u" | |
? window | |
: typeof global$1 < "u" | |
? global$1 | |
: {}; | |
function getUniqueId() { | |
var s = "__global_unique_id__"; | |
return (commonjsGlobal$2[s] = (commonjsGlobal$2[s] || 0) + 1); | |
} | |
function objectIs(s, o) { | |
return s === o ? s !== 0 || 1 / s === 1 / o : s !== s && o !== o; | |
} | |
function createEventEmitter(s) { | |
var o = []; | |
return { | |
on: function (_e) { | |
o.push(_e); | |
}, | |
off: function (_e) { | |
o = o.filter(function (et) { | |
return et !== _e; | |
}); | |
}, | |
get: function () { | |
return s; | |
}, | |
set: function (_e, et) { | |
(s = _e), | |
o.forEach(function (tt) { | |
return tt(s, et); | |
}); | |
}, | |
}; | |
} | |
function onlyChild(s) { | |
return Array.isArray(s) ? s[0] : s; | |
} | |
function createReactContext(s, o) { | |
var _, | |
_e, | |
et = "__create-react-context-" + getUniqueId() + "__", | |
tt = (function (it) { | |
_inheritsLoose$2(ot, it); | |
function ot() { | |
for ( | |
var at, ht = arguments.length, mt = new Array(ht), vt = 0; | |
vt < ht; | |
vt++ | |
) | |
mt[vt] = arguments[vt]; | |
return ( | |
(at = it.call.apply(it, [this].concat(mt)) || this), | |
(at.emitter = createEventEmitter(at.props.value)), | |
at | |
); | |
} | |
var ct = ot.prototype; | |
return ( | |
(ct.getChildContext = function () { | |
var ht; | |
return (ht = {}), (ht[et] = this.emitter), ht; | |
}), | |
(ct.componentWillReceiveProps = function (ht) { | |
if (this.props.value !== ht.value) { | |
var mt = this.props.value, | |
vt = ht.value, | |
xt; | |
objectIs(mt, vt) | |
? (xt = 0) | |
: ((xt = | |
typeof o == "function" ? o(mt, vt) : MAX_SIGNED_31_BIT_INT), | |
(xt |= 0), | |
xt !== 0 && this.emitter.set(ht.value, xt)); | |
} | |
}), | |
(ct.render = function () { | |
return this.props.children; | |
}), | |
ot | |
); | |
})(React$3.Component); | |
tt.childContextTypes = | |
((_ = {}), (_[et] = PropTypes$1.object.isRequired), _); | |
var rt = (function (it) { | |
_inheritsLoose$2(ot, it); | |
function ot() { | |
for ( | |
var at, ht = arguments.length, mt = new Array(ht), vt = 0; | |
vt < ht; | |
vt++ | |
) | |
mt[vt] = arguments[vt]; | |
return ( | |
(at = it.call.apply(it, [this].concat(mt)) || this), | |
(at.observedBits = void 0), | |
(at.state = { value: at.getValue() }), | |
(at.onUpdate = function (xt, St) { | |
var $t = at.observedBits | 0; | |
$t & St && at.setState({ value: at.getValue() }); | |
}), | |
at | |
); | |
} | |
var ct = ot.prototype; | |
return ( | |
(ct.componentWillReceiveProps = function (ht) { | |
var mt = ht.observedBits; | |
this.observedBits = mt ?? MAX_SIGNED_31_BIT_INT; | |
}), | |
(ct.componentDidMount = function () { | |
this.context[et] && this.context[et].on(this.onUpdate); | |
var ht = this.props.observedBits; | |
this.observedBits = ht ?? MAX_SIGNED_31_BIT_INT; | |
}), | |
(ct.componentWillUnmount = function () { | |
this.context[et] && this.context[et].off(this.onUpdate); | |
}), | |
(ct.getValue = function () { | |
return this.context[et] ? this.context[et].get() : s; | |
}), | |
(ct.render = function () { | |
return onlyChild(this.props.children)(this.state.value); | |
}), | |
ot | |
); | |
})(React$3.Component); | |
return ( | |
(rt.contextTypes = ((_e = {}), (_e[et] = PropTypes$1.object), _e)), | |
{ Provider: tt, Consumer: rt } | |
); | |
} | |
var createContext = React$3.createContext || createReactContext, | |
createNamedContext = function (o) { | |
var _ = createContext(); | |
return (_.displayName = o), _; | |
}, | |
historyContext = createNamedContext("Router-History"), | |
context = createNamedContext("Router"), | |
Router = (function (s) { | |
_inheritsLoose$2(o, s), | |
(o.computeRootMatch = function (et) { | |
return { path: "/", url: "/", params: {}, isExact: et === "/" }; | |
}); | |
function o(_e) { | |
var et; | |
return ( | |
(et = s.call(this, _e) || this), | |
(et.state = { location: _e.history.location }), | |
(et._isMounted = !1), | |
(et._pendingLocation = null), | |
_e.staticContext || | |
(et.unlisten = _e.history.listen(function (tt) { | |
et._pendingLocation = tt; | |
})), | |
et | |
); | |
} | |
var _ = o.prototype; | |
return ( | |
(_.componentDidMount = function () { | |
var et = this; | |
(this._isMounted = !0), | |
this.unlisten && this.unlisten(), | |
this.props.staticContext || | |
(this.unlisten = this.props.history.listen(function (tt) { | |
et._isMounted && et.setState({ location: tt }); | |
})), | |
this._pendingLocation && | |
this.setState({ location: this._pendingLocation }); | |
}), | |
(_.componentWillUnmount = function () { | |
this.unlisten && | |
(this.unlisten(), | |
(this._isMounted = !1), | |
(this._pendingLocation = null)); | |
}), | |
(_.render = function () { | |
return React$3.createElement( | |
context.Provider, | |
{ | |
value: { | |
history: this.props.history, | |
location: this.state.location, | |
match: o.computeRootMatch(this.state.location.pathname), | |
staticContext: this.props.staticContext, | |
}, | |
}, | |
React$3.createElement(historyContext.Provider, { | |
children: this.props.children || null, | |
value: this.props.history, | |
}), | |
); | |
}), | |
o | |
); | |
})(React$3.Component); | |
React$3.Component; | |
React$3.Component; | |
var cache$1$1 = {}, | |
cacheLimit$1 = 1e4, | |
cacheCount$1 = 0; | |
function compilePath$1(s, o) { | |
var _ = "" + o.end + o.strict + o.sensitive, | |
_e = cache$1$1[_] || (cache$1$1[_] = {}); | |
if (_e[s]) return _e[s]; | |
var et = [], | |
tt = pathToRegexp$1(s, et, o), | |
rt = { regexp: tt, keys: et }; | |
return cacheCount$1 < cacheLimit$1 && ((_e[s] = rt), cacheCount$1++), rt; | |
} | |
function matchPath(s, o) { | |
o === void 0 && (o = {}), | |
(typeof o == "string" || Array.isArray(o)) && (o = { path: o }); | |
var _ = o, | |
_e = _.path, | |
et = _.exact, | |
tt = et === void 0 ? !1 : et, | |
rt = _.strict, | |
it = rt === void 0 ? !1 : rt, | |
ot = _.sensitive, | |
ct = ot === void 0 ? !1 : ot, | |
at = [].concat(_e); | |
return at.reduce(function (ht, mt) { | |
if (!mt && mt !== "") return null; | |
if (ht) return ht; | |
var vt = compilePath$1(mt, { end: tt, strict: it, sensitive: ct }), | |
xt = vt.regexp, | |
St = vt.keys, | |
$t = xt.exec(s); | |
if (!$t) return null; | |
var Et = $t[0], | |
_t = $t.slice(1), | |
Rt = s === Et; | |
return tt && !Rt | |
? null | |
: { | |
path: mt, | |
url: mt === "/" && Et === "" ? "/" : Et, | |
isExact: Rt, | |
params: St.reduce(function (Mt, It, Xt) { | |
return (Mt[It.name] = _t[Xt]), Mt; | |
}, {}), | |
}; | |
}, null); | |
} | |
function isEmptyChildren(s) { | |
return React$3.Children.count(s) === 0; | |
} | |
var Route = (function (s) { | |
_inheritsLoose$2(o, s); | |
function o() { | |
return s.apply(this, arguments) || this; | |
} | |
var _ = o.prototype; | |
return ( | |
(_.render = function () { | |
var et = this; | |
return React$3.createElement(context.Consumer, null, function (tt) { | |
tt || invariant(!1); | |
var rt = et.props.location || tt.location, | |
it = et.props.computedMatch | |
? et.props.computedMatch | |
: et.props.path | |
? matchPath(rt.pathname, et.props) | |
: tt.match, | |
ot = _extends$1({}, tt, { location: rt, match: it }), | |
ct = et.props, | |
at = ct.children, | |
ht = ct.component, | |
mt = ct.render; | |
return ( | |
Array.isArray(at) && isEmptyChildren(at) && (at = null), | |
React$3.createElement( | |
context.Provider, | |
{ value: ot }, | |
ot.match | |
? at | |
? typeof at == "function" | |
? at(ot) | |
: at | |
: ht | |
? React$3.createElement(ht, ot) | |
: mt | |
? mt(ot) | |
: null | |
: typeof at == "function" | |
? at(ot) | |
: null, | |
) | |
); | |
}); | |
}), | |
o | |
); | |
})(React$3.Component); | |
function addLeadingSlash(s) { | |
return s.charAt(0) === "/" ? s : "/" + s; | |
} | |
function addBasename(s, o) { | |
return s | |
? _extends$1({}, o, { pathname: addLeadingSlash(s) + o.pathname }) | |
: o; | |
} | |
function stripBasename(s, o) { | |
if (!s) return o; | |
var _ = addLeadingSlash(s); | |
return o.pathname.indexOf(_) !== 0 | |
? o | |
: _extends$1({}, o, { pathname: o.pathname.substr(_.length) }); | |
} | |
function createURL(s) { | |
return typeof s == "string" ? s : createPath(s); | |
} | |
function staticHandler(s) { | |
return function () { | |
invariant(!1); | |
}; | |
} | |
function noop$6() {} | |
React$3.Component; | |
var Switch = (function (s) { | |
_inheritsLoose$2(o, s); | |
function o() { | |
return s.apply(this, arguments) || this; | |
} | |
var _ = o.prototype; | |
return ( | |
(_.render = function () { | |
var et = this; | |
return React$3.createElement(context.Consumer, null, function (tt) { | |
tt || invariant(!1); | |
var rt = et.props.location || tt.location, | |
it, | |
ot; | |
return ( | |
React$3.Children.forEach(et.props.children, function (ct) { | |
if (ot == null && React$3.isValidElement(ct)) { | |
it = ct; | |
var at = ct.props.path || ct.props.from; | |
ot = at | |
? matchPath( | |
rt.pathname, | |
_extends$1({}, ct.props, { path: at }), | |
) | |
: tt.match; | |
} | |
}), | |
ot | |
? React$3.cloneElement(it, { location: rt, computedMatch: ot }) | |
: null | |
); | |
}); | |
}), | |
o | |
); | |
})(React$3.Component), | |
useContext = React$3.useContext; | |
function useHistory() { | |
return useContext(historyContext); | |
} | |
function useLocation() { | |
return useContext(context).location; | |
} | |
function useParams() { | |
var s = useContext(context).match; | |
return s ? s.params : {}; | |
} | |
var BrowserRouter = (function (s) { | |
_inheritsLoose$2(o, s); | |
function o() { | |
for ( | |
var _e, et = arguments.length, tt = new Array(et), rt = 0; | |
rt < et; | |
rt++ | |
) | |
tt[rt] = arguments[rt]; | |
return ( | |
(_e = s.call.apply(s, [this].concat(tt)) || this), | |
(_e.history = createBrowserHistory(_e.props)), | |
_e | |
); | |
} | |
var _ = o.prototype; | |
return ( | |
(_.render = function () { | |
return React$3.createElement(Router, { | |
history: this.history, | |
children: this.props.children, | |
}); | |
}), | |
o | |
); | |
})(React$3.Component); | |
React$3.Component; | |
var resolveToLocation = function (o, _) { | |
return typeof o == "function" ? o(_) : o; | |
}, | |
normalizeToLocation = function (o, _) { | |
return typeof o == "string" ? createLocation(o, null, null, _) : o; | |
}, | |
forwardRefShim = function (o) { | |
return o; | |
}, | |
forwardRef = React$3.forwardRef; | |
typeof forwardRef > "u" && (forwardRef = forwardRefShim); | |
function isModifiedEvent(s) { | |
return !!(s.metaKey || s.altKey || s.ctrlKey || s.shiftKey); | |
} | |
var LinkAnchor = forwardRef(function (s, o) { | |
var _ = s.innerRef, | |
_e = s.navigate, | |
et = s.onClick, | |
tt = _objectWithoutPropertiesLoose(s, [ | |
"innerRef", | |
"navigate", | |
"onClick", | |
]), | |
rt = tt.target, | |
it = _extends$1({}, tt, { | |
onClick: function (ct) { | |
try { | |
et && et(ct); | |
} catch (at) { | |
throw (ct.preventDefault(), at); | |
} | |
!ct.defaultPrevented && | |
ct.button === 0 && | |
(!rt || rt === "_self") && | |
!isModifiedEvent(ct) && | |
(ct.preventDefault(), _e()); | |
}, | |
}); | |
return ( | |
forwardRefShim !== forwardRef ? (it.ref = o || _) : (it.ref = _), | |
React$3.createElement("a", it) | |
); | |
}), | |
Link = forwardRef(function (s, o) { | |
var _ = s.component, | |
_e = _ === void 0 ? LinkAnchor : _, | |
et = s.replace, | |
tt = s.to, | |
rt = s.innerRef, | |
it = _objectWithoutPropertiesLoose(s, [ | |
"component", | |
"replace", | |
"to", | |
"innerRef", | |
]); | |
return React$3.createElement(context.Consumer, null, function (ot) { | |
ot || invariant(!1); | |
var ct = ot.history, | |
at = normalizeToLocation( | |
resolveToLocation(tt, ot.location), | |
ot.location, | |
), | |
ht = at ? ct.createHref(at) : "", | |
mt = _extends$1({}, it, { | |
href: ht, | |
navigate: function () { | |
var xt = resolveToLocation(tt, ot.location), | |
St = | |
createPath(ot.location) === | |
createPath(normalizeToLocation(xt)), | |
$t = et || St ? ct.replace : ct.push; | |
$t(xt); | |
}, | |
}); | |
return ( | |
forwardRefShim !== forwardRef | |
? (mt.ref = o || rt) | |
: (mt.innerRef = rt), | |
React$3.createElement(_e, mt) | |
); | |
}); | |
}), | |
forwardRefShim$1 = function (o) { | |
return o; | |
}, | |
forwardRef$1 = React$3.forwardRef; | |
typeof forwardRef$1 > "u" && (forwardRef$1 = forwardRefShim$1); | |
function joinClassnames() { | |
for (var s = arguments.length, o = new Array(s), _ = 0; _ < s; _++) | |
o[_] = arguments[_]; | |
return o | |
.filter(function (_e) { | |
return _e; | |
}) | |
.join(" "); | |
} | |
forwardRef$1(function (s, o) { | |
var _ = s["aria-current"], | |
_e = _ === void 0 ? "page" : _, | |
et = s.activeClassName, | |
tt = et === void 0 ? "active" : et, | |
rt = s.activeStyle, | |
it = s.className, | |
ot = s.exact, | |
ct = s.isActive, | |
at = s.location, | |
ht = s.sensitive, | |
mt = s.strict, | |
vt = s.style, | |
xt = s.to, | |
St = s.innerRef, | |
$t = _objectWithoutPropertiesLoose(s, [ | |
"aria-current", | |
"activeClassName", | |
"activeStyle", | |
"className", | |
"exact", | |
"isActive", | |
"location", | |
"sensitive", | |
"strict", | |
"style", | |
"to", | |
"innerRef", | |
]); | |
return React$3.createElement(context.Consumer, null, function (Et) { | |
Et || invariant(!1); | |
var _t = at || Et.location, | |
Rt = normalizeToLocation(resolveToLocation(xt, _t), _t), | |
Mt = Rt.pathname, | |
It = Mt && Mt.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1"), | |
Xt = It | |
? matchPath(_t.pathname, { | |
path: It, | |
exact: ot, | |
sensitive: ht, | |
strict: mt, | |
}) | |
: null, | |
Jt = !!(ct ? ct(Xt, _t) : Xt), | |
Ht = typeof it == "function" ? it(Jt) : it, | |
qt = typeof vt == "function" ? vt(Jt) : vt; | |
Jt && ((Ht = joinClassnames(Ht, tt)), (qt = _extends$1({}, qt, rt))); | |
var nr = _extends$1( | |
{ | |
"aria-current": (Jt && _e) || null, | |
className: Ht, | |
style: qt, | |
to: Rt, | |
}, | |
$t, | |
); | |
return ( | |
forwardRefShim$1 !== forwardRef$1 | |
? (nr.ref = o || St) | |
: (nr.innerRef = St), | |
React$3.createElement(Link, nr) | |
); | |
}); | |
}); | |
const colors = { | |
black000: "#252620", | |
black001: "#393A34", | |
black002: "#4C4C48", | |
grey000: "#5F605A", | |
grey001: "#71726C", | |
grey002: "#83847E", | |
grey003: "#959690", | |
grey004: "#C0BAB1", | |
white000: "#D7D3CD", | |
white001: "#E4E0DA", | |
white002: "#F3EFE9", | |
white003: "#FDF9F3", | |
accent000: "#009167", | |
accent001: "#00C49A", | |
accent002: "#97E7D5", | |
white: "#FFFFFF", | |
black: "#000000", | |
grey: "#9FA09A", | |
red: "#FF5154", | |
blue: "#6DB1FE", | |
green: "#14FBDC", | |
yellow: "#FFB76B", | |
magenta: "#FF74B5", | |
}, | |
ConditionalShow = (s) => { | |
const { show: o, children: _ } = s; | |
return o ? _ : null; | |
}, | |
ConditionalTransparent = (s) => { | |
const { show: o, children: _ } = s, | |
_e = { opacity: o ? 1 : 0 }; | |
return jsxRuntimeExports.jsx("div", { style: _e, children: _ }); | |
}, | |
SwitchShow = (s) => { | |
const { condition: o, children: _ } = s; | |
return o ? _[0] : _[1]; | |
}, | |
style$1H = { | |
base: { display: "flex", alignItems: "center", textDecoration: "none" }, | |
button: { | |
display: "flex", | |
alignItems: "center", | |
fontFamily: "Ubuntu", | |
fontSize: "22px", | |
color: colors.grey003, | |
padding: "8px 16px", | |
margin: "8px", | |
}, | |
mobileButtonWrapper: { display: "flex", alignItems: "center" }, | |
mobileIconWrapper: { | |
width: "40px", | |
display: "flex", | |
justifyContent: "center", | |
marginRight: "4px", | |
}, | |
mobileIcon: { fontSize: "28px", paddingTop: "6px" }, | |
}, | |
MobileMenuButton = (s) => { | |
const { pathname: o, icon: _, children: _e, onClick: et } = s; | |
return jsxRuntimeExports.jsx(Link, { | |
style: style$1H.base, | |
to: o, | |
children: jsxRuntimeExports.jsx( | |
"div", | |
{ | |
style: style$1H.button, | |
onClick: et, | |
children: jsxRuntimeExports.jsxs("div", { | |
style: style$1H.mobileButtonWrapper, | |
children: [ | |
jsxRuntimeExports.jsx("div", { | |
style: style$1H.mobileIconWrapper, | |
children: jsxRuntimeExports.jsx("i", { | |
style: style$1H.mobileIcon, | |
className: _, | |
}), | |
}), | |
_e, | |
], | |
}), | |
}, | |
o, | |
), | |
}); | |
}, | |
MobileMenuButton$1 = Radium(MobileMenuButton), | |
SessionContext = React$3.createContext(), | |
WorkspaceContext = React$3.createContext({ | |
workspace: {}, | |
workspaceDispatch: () => null, | |
}), | |
SettingsContext = React$3.createContext({ | |
settings: {}, | |
setSettings: () => null, | |
}), | |
defaultContext = { | |
notify: () => {}, | |
info: () => {}, | |
alert: () => {}, | |
remove: () => {}, | |
}, | |
NotificationContext = reactExports.createContext(defaultContext); | |
var getRandomValues, | |
rnds8 = new Uint8Array(16); | |
function rng() { | |
if ( | |
!getRandomValues && | |
((getRandomValues = | |
(typeof crypto < "u" && | |
crypto.getRandomValues && | |
crypto.getRandomValues.bind(crypto)) || | |
(typeof msCrypto < "u" && | |
typeof msCrypto.getRandomValues == "function" && | |
msCrypto.getRandomValues.bind(msCrypto))), | |
!getRandomValues) | |
) | |
throw new Error( | |
"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported", | |
); | |
return getRandomValues(rnds8); | |
} | |
const REGEX = | |
/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; | |
function validate(s) { | |
return typeof s == "string" && REGEX.test(s); | |
} | |
var byteToHex = []; | |
for (var i$2 = 0; i$2 < 256; ++i$2) | |
byteToHex.push((i$2 + 256).toString(16).substr(1)); | |
function stringify$5(s) { | |
var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, | |
_ = ( | |
byteToHex[s[o + 0]] + | |
byteToHex[s[o + 1]] + | |
byteToHex[s[o + 2]] + | |
byteToHex[s[o + 3]] + | |
"-" + | |
byteToHex[s[o + 4]] + | |
byteToHex[s[o + 5]] + | |
"-" + | |
byteToHex[s[o + 6]] + | |
byteToHex[s[o + 7]] + | |
"-" + | |
byteToHex[s[o + 8]] + | |
byteToHex[s[o + 9]] + | |
"-" + | |
byteToHex[s[o + 10]] + | |
byteToHex[s[o + 11]] + | |
byteToHex[s[o + 12]] + | |
byteToHex[s[o + 13]] + | |
byteToHex[s[o + 14]] + | |
byteToHex[s[o + 15]] | |
).toLowerCase(); | |
if (!validate(_)) throw TypeError("Stringified UUID is invalid"); | |
return _; | |
} | |
function v4(s, o, _) { | |
s = s || {}; | |
var _e = s.random || (s.rng || rng)(); | |
if (((_e[6] = (_e[6] & 15) | 64), (_e[8] = (_e[8] & 63) | 128), o)) { | |
_ = _ || 0; | |
for (var et = 0; et < 16; ++et) o[_ + et] = _e[et]; | |
return o; | |
} | |
return stringify$5(_e); | |
} | |
const animationIn = keyframes({ | |
"0%": { opacity: 0 }, | |
"100%": { opacity: 1 }, | |
}), | |
style$1G = { | |
base: { | |
display: "flex", | |
flexDirection: "column", | |
position: "fixed", | |
top: "52px", | |
right: "0", | |
margin: "12px", | |
maxWidth: "562px", | |
zIndex: "1000", | |
}, | |
iconWrapper: { marginLeft: "16px" }, | |
icon: { padding: "0 16px", fontSize: "32px" }, | |
notification: { | |
backgroundColor: colors.white, | |
borderRadius: "8px", | |
color: colors.grey001, | |
display: "flex", | |
position: "relative", | |
justifyContent: "space-between", | |
alignItems: "center", | |
width: "100%", | |
fontFamily: "Open Sans", | |
fontSize: "15px", | |
fontWeight: "400", | |
margin: "8px 0", | |
animation: "0.5s ease-out", | |
animationName: animationIn, | |
boxShadow: "0 0 8px 0 rgba(0, 0, 0, 0.2)", | |
":hover": { boxShadow: "0 0 12px 0 rgba(0, 0, 0, 0.3)" }, | |
transition: "box-shadow 0.5s", | |
}, | |
notify: { borderLeft: `8px solid ${colors.accent001}` }, | |
notifyColor: { color: colors.accent001 }, | |
info: { borderLeft: `8px solid ${colors.blue}` }, | |
infoColor: { color: colors.blue }, | |
alert: { borderLeft: `8px solid ${colors.yellow}` }, | |
alertColor: { color: colors.yellow }, | |
dismiss: { | |
position: "absolute", | |
top: "0", | |
right: "0", | |
fontSize: "24px", | |
border: "none", | |
margin: "8px", | |
backgroundColor: colors.white, | |
color: colors.white001, | |
padding: "2px", | |
cursor: "pointer", | |
":hover": { color: colors.grey004 }, | |
}, | |
message: { lineHeight: 1.8, marginRight: "32px", whiteSpace: "pre-wrap" }, | |
content: { | |
padding: "16px", | |
display: "flex", | |
flexDirection: "column", | |
width: "100%", | |
}, | |
actionText: { | |
backgroundColor: "inherit", | |
border: "none", | |
fontFamily: "Ubuntu", | |
fontSize: "18px", | |
padding: "2px 0", | |
margin: "8px 0 0 0", | |
cursor: "pointer", | |
}, | |
}, | |
Notifications = (s) => { | |
const { | |
notifications: o, | |
removeNotification: _, | |
onMouseEnter: _e, | |
clearAllTimeoutsFromState: et, | |
} = s; | |
return jsxRuntimeExports.jsx("div", { | |
style: style$1G.base, | |
children: o.map((tt) => { | |
const rt = [style$1G.notification], | |
it = [style$1G.icon]; | |
let ot = ""; | |
return ( | |
tt.variant === "notify" | |
? (rt.push(style$1G.notify), | |
it.push(style$1G.notifyColor), | |
(ot = "fas fa-bell")) | |
: tt.variant === "info" | |
? (rt.push(style$1G.info), | |
it.push(style$1G.infoColor), | |
(ot = "fas fa-info-circle")) | |
: tt.variant === "alert" && | |
(rt.push(style$1G.alert), | |
it.push(style$1G.alertColor), | |
(ot = "fas fa-exclamation-triangle")), | |
jsxRuntimeExports.jsxs( | |
"div", | |
{ | |
role: "alert", | |
style: rt, | |
ref: _e, | |
children: [ | |
jsxRuntimeExports.jsx("div", { | |
style: style$1G.iconWrapper, | |
children: jsxRuntimeExports.jsx("i", { | |
role: "presentation", | |
className: ot, | |
style: it, | |
}), | |
}), | |
jsxRuntimeExports.jsxs("div", { | |
style: style$1G.content, | |
children: [ | |
jsxRuntimeExports.jsx("div", { | |
style: style$1G.message, | |
children: tt.message, | |
}), | |
jsxRuntimeExports.jsx(ConditionalShow, { | |
show: tt.actionText, | |
children: jsxRuntimeExports.jsx("div", { | |
children: jsxRuntimeExports.jsx("button", { | |
style: { | |
...style$1G.actionText, | |
...style$1G[tt.variant + "Color"], | |
}, | |
onClick: () => { | |
tt.actionHandler(), _(tt.id); | |
}, | |
children: tt.actionText, | |
}), | |
}), | |
}), | |
], | |
}), | |
jsxRuntimeExports.jsx( | |
"button", | |
{ | |
"aria-label": "Close", | |
type: "button", | |
tabIndex: 0, | |
style: style$1G.dismiss, | |
onClick: () => { | |
tt.closeHandler(), _(tt.id); | |
}, | |
onFocus: et, | |
children: jsxRuntimeExports.jsx("i", { | |
className: "fas fa-times", | |
}), | |
}, | |
tt.id + "-close-button", | |
), | |
], | |
}, | |
tt.id, | |
) | |
); | |
}), | |
}); | |
}, | |
Notifications$1 = Radium(Notifications), | |
DEFAULT_DISPLAY_DURATION = 5e3, | |
MAXIMUM_NUMBER_NOTIFICATIONS = 3, | |
NotificationProvider = (s) => { | |
const { children: o } = s, | |
[_, _e] = reactExports.useState([]), | |
et = reactExports.useCallback((ct) => { | |
_e((at) => at.filter((ht) => ht.id !== ct)); | |
}, []), | |
tt = reactExports.useCallback( | |
(ct) => { | |
const at = v4(), | |
{ | |
displayDuration: ht = DEFAULT_DISPLAY_DURATION, | |
message: mt, | |
variant: vt, | |
actionText: xt = "", | |
actionHandler: St = () => null, | |
closeHandler: $t = () => null, | |
} = ct, | |
Et = { | |
id: at, | |
message: mt, | |
variant: vt, | |
timeoutId: null, | |
actionText: xt, | |
actionHandler: St, | |
closeHandler: $t, | |
}; | |
if (ht) { | |
const _t = setTimeout(() => et(at), ht); | |
Et.timeoutId = _t; | |
} | |
return ( | |
_e((_t) => | |
_t.length >= MAXIMUM_NUMBER_NOTIFICATIONS ? _t : [..._t, Et], | |
), | |
at | |
); | |
}, | |
[et], | |
), | |
rt = reactExports.useCallback(() => { | |
_e((ct) => | |
ct.map( | |
(at) => ( | |
at.timeoutId && clearTimeout(at.timeoutId), | |
{ ...at, timeoutId: null } | |
), | |
), | |
); | |
}, []), | |
it = reactExports.useCallback( | |
(ct) => { | |
ct && ct.addEventListener("mouseenter", rt); | |
}, | |
[rt], | |
), | |
ot = reactExports.useMemo( | |
() => ({ | |
notify: (ct) => tt({ ...ct, variant: "notify" }), | |
info: (ct) => tt({ ...ct, variant: "info" }), | |
alert: (ct) => tt({ ...ct, variant: "alert" }), | |
remove: et, | |
}), | |
[tt, et], | |
); | |
return jsxRuntimeExports.jsxs(NotificationContext.Provider, { | |
value: ot, | |
children: [ | |
jsxRuntimeExports.jsx(Notifications$1, { | |
notifications: _, | |
removeNotification: et, | |
onMouseEnter: it, | |
clearAllTimeoutsFromState: rt, | |
}), | |
o, | |
], | |
}); | |
}, | |
MobileSessionButton = (s) => { | |
const { setShowMobileMenu: o } = s, | |
_ = reactExports.useContext(SessionContext), | |
_e = useHistory(); | |
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { | |
children: [ | |
jsxRuntimeExports.jsx(ConditionalShow, { | |
show: _.user.authenticated, | |
children: jsxRuntimeExports.jsx(MobileMenuButton$1, { | |
pathname: "/", | |
icon: "far fa-sign-out", | |
onClick: () => { | |
o(!1), _.signOut(); | |
}, | |
children: "sign out", | |
}), | |
}), | |
jsxRuntimeExports.jsx(ConditionalShow, { | |
show: !_.user.authenticated, | |
children: jsxRuntimeExports.jsx(MobileMenuButton$1, { | |
pathname: | |
_e.location.pathname === "/" | |
? "/signin" | |
: `${_e.location.pathname}/signin`, | |
icon: "far fa-sign-in", | |
children: "sign in", | |
}), | |
}), | |
], | |
}); | |
}, | |
MobileSessionButton$1 = Radium(MobileSessionButton), | |
style$1F = { | |
mobileMenu: { | |
position: "fixed", | |
zIndex: 3, | |
top: 0, | |
right: 0, | |
backgroundColor: colors.white003, | |
width: "240px", | |
paddingBottom: "32px", | |
boxShadow: "0 2px 6px 3px rgba(0, 0, 0, 0.2 )", | |
}, | |
closeWrapper: { display: "flex", justifyContent: "flex-end" }, | |
close: { color: colors.grey004, padding: "16px", fontSize: "32px" }, | |
hamburger: { padding: "4px", fontSize: "36px" }, | |
}, | |
MobileMenu = (s) => { | |
const { hamburgerColor: o } = s, | |
[_, _e] = reactExports.useState(!1), | |
et = useHistory(); | |
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { | |
children: [ | |
jsxRuntimeExports.jsx("div", { | |
style: [style$1F.hamburger, { color: o }], | |
onClick: () => _e(!0), | |
children: jsxRuntimeExports.jsx("i", { className: "fas fa-bars" }), | |
}), | |
jsxRuntimeExports.jsx(ConditionalShow, { | |
show: _, | |
children: jsxRuntimeExports.jsxs("div", { | |
style: style$1F.mobileMenu, | |
children: [ | |
jsxRuntimeExports.jsx("div", { | |
style: style$1F.closeWrapper, | |
children: jsxRuntimeExports.jsx("i", { | |
style: style$1F.close, | |
className: "fas fa-times", | |
onClick: () => _e(!1), | |
}), | |
}), | |
jsxRuntimeExports.jsx(MobileMenuButton$1, { | |
pathname: et.location.pathname.startsWith("/problems") | |
? `${et.location.pathname}/problem-index` | |
: "/problem-index", | |
icon: "far fa-list-alt", | |
onClick: () => _e(!1), | |
children: "course", | |
}), | |
jsxRuntimeExports.jsx(MobileMenuButton$1, { | |
pathname: "/purchase", | |
icon: "far fa-shopping-cart", | |
children: "purchase", | |
}), | |
jsxRuntimeExports.jsx(MobileMenuButton$1, { | |
pathname: "/profile", | |
icon: "far fa-address-card", | |
children: "profile", | |
}), | |
jsxRuntimeExports.jsx(MobileSessionButton$1, { | |
setShowMobileMenu: _e, | |
}), | |
], | |
}), | |
}), | |
], | |
}); | |
}, | |
MobileMenu$1 = Radium(MobileMenu); | |
var js_cookie = { exports: {} }; | |
/*! | |
* JavaScript Cookie v2.2.1 | |
* https://github.com/js-cookie/js-cookie | |
* | |
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack | |
* Released under the MIT license | |
*/ (function (s, o) { | |
(function (_) { | |
var _e; | |
if (((s.exports = _()), (_e = !0), !_e)) { | |
var et = window.Cookies, | |
tt = (window.Cookies = _()); | |
tt.noConflict = function () { | |
return (window.Cookies = et), tt; | |
}; | |
} | |
})(function () { | |
function _() { | |
for (var tt = 0, rt = {}; tt < arguments.length; tt++) { | |
var it = arguments[tt]; | |
for (var ot in it) rt[ot] = it[ot]; | |
} | |
return rt; | |
} | |
function _e(tt) { | |
return tt.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent); | |
} | |
function et(tt) { | |
function rt() {} | |
function it(ct, at, ht) { | |
if (!(typeof document > "u")) { | |
(ht = _({ path: "/" }, rt.defaults, ht)), | |
typeof ht.expires == "number" && | |
(ht.expires = new Date(new Date() * 1 + ht.expires * 864e5)), | |
(ht.expires = ht.expires ? ht.expires.toUTCString() : ""); | |
try { | |
var mt = JSON.stringify(at); | |
/^[\{\[]/.test(mt) && (at = mt); | |
} catch {} | |
(at = tt.write | |
? tt.write(at, ct) | |
: encodeURIComponent(String(at)).replace( | |
/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, | |
decodeURIComponent, | |
)), | |
(ct = encodeURIComponent(String(ct)) | |
.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent) | |
.replace(/[\(\)]/g, escape)); | |
var vt = ""; | |
for (var xt in ht) | |
ht[xt] && | |
((vt += "; " + xt), | |
ht[xt] !== !0 && (vt += "=" + ht[xt].split(";")[0])); | |
return (document.cookie = ct + "=" + at + vt); | |
} | |
} | |
function ot(ct, at) { | |
if (!(typeof document > "u")) { | |
for ( | |
var ht = {}, | |
mt = document.cookie ? document.cookie.split("; ") : [], | |
vt = 0; | |
vt < mt.length; | |
vt++ | |
) { | |
var xt = mt[vt].split("="), | |
St = xt.slice(1).join("="); | |
!at && St.charAt(0) === '"' && (St = St.slice(1, -1)); | |
try { | |
var $t = _e(xt[0]); | |
if (((St = (tt.read || tt)(St, $t) || _e(St)), at)) | |
try { | |
St = JSON.parse(St); | |
} catch {} | |
if (((ht[$t] = St), ct === $t)) break; | |
} catch {} | |
} | |
return ct ? ht[ct] : ht; | |
} | |
} | |
return ( | |
(rt.set = it), | |
(rt.get = function (ct) { | |
return ot(ct, !1); | |
}), | |
(rt.getJSON = function (ct) { | |
return ot(ct, !0); | |
}), | |
(rt.remove = function (ct, at) { | |
it(ct, "", _(at, { expires: -1 })); | |
}), | |
(rt.defaults = {}), | |
(rt.withConverter = et), | |
rt | |
); | |
} | |
return et(function () {}); | |
}); | |
})(js_cookie); | |
var js_cookieExports = js_cookie.exports; | |
const Cookies = getDefaultExportFromCjs$1(js_cookieExports); | |
var Ln, Io, Do, Bo; | |
const An = class An { | |
static getFileExtension(o) { | |
if (!(o in Dn(this, Ln))) throw new Error(`${o} is not a valid runtime`); | |
return Dn(this, Do)[o]; | |
} | |
static getSyntaxMode(o) { | |
if (!(o in Dn(this, Ln))) throw new Error(`${o} is not a valid runtime`); | |
return Dn(this, Bo)[o]; | |
} | |
}; | |
(Ln = new WeakMap()), | |
(Io = new WeakMap()), | |
(Do = new WeakMap()), | |
(Bo = new WeakMap()), | |
bo(An, "RUNTIME_NODE", "node"), | |
bo(An, "RUNTIME_PYTHON3", "python3"), | |
bo(An, "RUNTIME_CPP", "cpp"), | |
bo(An, "RUNTIME_JAVA", "java"), | |
Ao(An, Ln, { | |
node: An.RUNTIME_NODE, | |
python3: An.RUNTIME_PYTHON3, | |
cpp: An.RUNTIME_CPP, | |
java: An.RUNTIME_JAVA, | |
}), | |
Ao(An, Io, { | |
[Dn(An, Ln).node]: "JavaScript", | |
[Dn(An, Ln).python3]: "Python", | |
[Dn(An, Ln).cpp]: "C++", | |
[Dn(An, Ln).java]: "Java", | |
}), | |
Ao(An, Do, { | |
[Dn(An, Ln).node]: "js", | |
[Dn(An, Ln).python3]: "py", | |
[Dn(An, Ln).cpp]: "cpp", | |
[Dn(An, Ln).java]: "java", | |
}), | |
Ao(An, Bo, { | |
[Dn(An, Ln).node]: "text/javascript", | |
[Dn(An, Ln).python3]: "text/x-python", | |
[Dn(An, Ln).cpp]: "text/x-c++src", | |
[Dn(An, Ln).java]: "text/x-java", | |
}), | |
bo(An, "DEFAULT_RUNTIME", Dn(An, Ln).node), | |
bo( | |
An, | |
"RUNTIME_OPTIONS", | |
Object.values(Dn(An, Ln)).map((o) => ({ | |
value: o, | |
label: Dn(An, Io)[o], | |
})), | |
); | |
let RuntimeConfig = An; | |
const GUEST_USER = { | |
email: "guest@structy", | |
authenticated: !1, | |
premium: !1, | |
issuer: "structy", | |
}, | |
WINDOW_IDS = { prompt: "Prompt", editor: "Editor", terminal: "Terminal" }, | |
DEFAULT_RUNTIME_SETTINGS = { | |
runtime: RuntimeConfig.DEFAULT_RUNTIME, | |
isPristine: !0, | |
}, | |
DEFAULT_LAYOUT_SETTINGS = { layoutIdx: 0 }, | |
DEFAULT_VIDEO_SETTINGS = { playbackRate: 1 }, | |
DEFAULT_MODULES_SETTINGS = new Array(10).fill(!0), | |
DEFAULT_DEBUG_MODE = { value: !1 }, | |
STATUS = { | |
OK: 200, | |
CREATED: 201, | |
ACCEPTED: 202, | |
BAD_REQUEST: 400, | |
UNAUTHORIZED: 401, | |
FORBIDDEN: 403, | |
NOT_FOUND: 404, | |
PAYLOAD_TOO_LARGE: 413, | |
IM_A_TEAPOT: 418, | |
TOO_MANY_REQUESTS: 429, | |
}, | |
VIDEO_ASPECT_RATIO = 0.5625, | |
AUTH_PROVIDERS = ["github", "google", "yahoo", "microsoft"], | |
TERMINAL_COLOR = { | |
GREEN: "#!GR->", | |
RED: "#!RE->", | |
YELLOW: "#!YE->", | |
BLUE: "#!BL->", | |
MAGENTA: "#!MA->", | |
DARK: "#!DA->", | |
}, | |
BUFFER_LENGTH = 24e3, | |
MAX_CODE_LENGTH = 15e3, | |
UNIT_SIZE = 1, | |
DISCORD_INVITE = "https://discord.gg/VXwJnzKV5d", | |
EDITOR_KEYMAP = { VSCODE: "vscode", EMACS: "emacs", VIM: "vim" }; | |
var define_import_meta_env_default = { | |
VITE_APP_DOMAIN: "structy.net", | |
VITE_APP_VERSION: "5.8.0", | |
VITE_APP_SESSION_KEY: "e85f8e97-017b-4ae7-98fa-f39191afa8eb", | |
VITE_APP_MAINTENANCE_MODE: "false", | |
VITE_APP_ALLOW_PURCHASE_YEAR_WHILE_PREMIUM: "true", | |
VITE_APP_CANONICAL_BASE_URL: "https://www.structy.net", | |
VITE_APP_API_URL: "https://api.structy.net", | |
VITE_APP_AWS_REGION: "us-east-1", | |
VITE_APP_AWS_COGNITO_IDENTITY_POOL_ID: | |
"us-east-1:55ac6067-ff9d-4215-bd88-cd2bd24ef2ba", | |
VITE_APP_AWS_IOT_DATA_ENDPOINT: | |
"a2v8ujbtqpt3qp-ats.iot.us-east-1.amazonaws.com", | |
VITE_APP_STRIPE_API_PUBLIC_KEY: | |
"pk_live_51IDuNbCP12AMs046R2gzTW6UM7Y77YXx7KST0hoTDwawwqOTAJSEEvpyfSC6pyKDyjA6zdrdPygCL5J0g3e6k7IS00nlWw0I4a", | |
VITE_APP_FIREBASE_API_KEY: "AIzaSyDe901D-QS_dEiVo5mvUSAhd6FO-SNqM4I", | |
VITE_APP_FIREBASE_AUTH_DOMAIN: "hey-algorithms.firebaseapp.com", | |
VITE_APP_FIREBASE_PROJECT_ID: "hey-algorithms", | |
VITE_APP_FIREBASE_STORAGE_BUCKET: "hey-algorithms.appspot.com", | |
VITE_APP_FIREBASE_MESSAGING_SENDER_ID: "584221106654", | |
VITE_APP_FIREBASE_APP_ID: "1:584221106654:web:18671cdb9f39bba7e23d4f", | |
VITE_APP_FIREBASE_MEASUREMENT_ID: "G-ZPENMYMP9W", | |
BASE_URL: "/", | |
MODE: "production", | |
DEV: !1, | |
PROD: !0, | |
SSR: !1, | |
}; | |
const { | |
VITE_APP_VERSION, | |
VITE_APP_SESSION_KEY, | |
VITE_APP_DOMAIN, | |
VITE_APP_MAINTENANCE_MODE, | |
VITE_APP_ALLOW_PURCHASE_YEAR_WHILE_PREMIUM, | |
VITE_APP_CANONICAL_BASE_URL, | |
VITE_APP_API_URL, | |
VITE_APP_AWS_REGION, | |
VITE_APP_AWS_COGNITO_IDENTITY_POOL_ID, | |
VITE_APP_AWS_IOT_DATA_ENDPOINT, | |
VITE_APP_STRIPE_API_PUBLIC_KEY, | |
VITE_APP_FIREBASE_API_KEY, | |
VITE_APP_FIREBASE_AUTH_DOMAIN, | |
VITE_APP_FIREBASE_PROJECT_ID, | |
VITE_APP_FIREBASE_STORAGE_BUCKET, | |
VITE_APP_FIREBASE_MESSAGING_SENDER_ID, | |
VITE_APP_FIREBASE_APP_ID, | |
VITE_APP_FIREBASE_MEASUREMENT_ID, | |
} = define_import_meta_env_default, | |
API = { URL: VITE_APP_API_URL }, | |
AWS$1 = { | |
REGION: VITE_APP_AWS_REGION, | |
COGNITO: { IDENTITY_POOL_ID: VITE_APP_AWS_COGNITO_IDENTITY_POOL_ID }, | |
IOT: { DATA_ENDPOINT: VITE_APP_AWS_IOT_DATA_ENDPOINT }, | |
}, | |
STRIPE = { API_PUBLIC_KEY: VITE_APP_STRIPE_API_PUBLIC_KEY }, | |
FIREBASE = { | |
apiKey: VITE_APP_FIREBASE_API_KEY, | |
authDomain: VITE_APP_FIREBASE_AUTH_DOMAIN, | |
projectId: VITE_APP_FIREBASE_PROJECT_ID, | |
storageBucket: VITE_APP_FIREBASE_STORAGE_BUCKET, | |
messagingSenderId: VITE_APP_FIREBASE_MESSAGING_SENDER_ID, | |
appId: VITE_APP_FIREBASE_APP_ID, | |
measurementId: VITE_APP_FIREBASE_MEASUREMENT_ID, | |
}, | |
envConfig = { | |
APP_VERSION: VITE_APP_VERSION, | |
SESSION_KEY: VITE_APP_SESSION_KEY, | |
DOMAIN: VITE_APP_DOMAIN, | |
MAINTENANCE_MODE: VITE_APP_MAINTENANCE_MODE === "true", | |
ALLOW_PURCHASE_YEAR_WHILE_PREMIUM: | |
VITE_APP_ALLOW_PURCHASE_YEAR_WHILE_PREMIUM === "true", | |
CANONICAL_BASE_URL: VITE_APP_CANONICAL_BASE_URL, | |
API, | |
AWS: AWS$1, | |
STRIPE, | |
FIREBASE, | |
}, | |
apiFetch = async ({ method: s, endpoint: o, body: _ }) => { | |
const _e = await fetch(`${envConfig.API.URL}${o}`, { | |
method: s, | |
credentials: "include", | |
headers: { "Content-Type": "application/json" }, | |
body: JSON.stringify(_), | |
}); | |
return { status: _e.status, json: await _e.json() }; | |
}; | |
function getDefaultExportFromCjs(s) { | |
return s && | |
s.__esModule && | |
Object.prototype.hasOwnProperty.call(s, "default") | |
? s.default | |
: s; | |
} | |
var browser$g = { exports: {} }, | |
process = (browser$g.exports = {}), | |
cachedSetTimeout, | |
cachedClearTimeout; | |
function defaultSetTimout() { | |
throw new Error("setTimeout has not been defined"); | |
} | |
function defaultClearTimeout() { | |
throw new Error("clearTimeout has not been defined"); | |
} | |
(function () { | |
try { | |
typeof setTimeout == "function" | |
? (cachedSetTimeout = setTimeout) | |
: (cachedSetTimeout = defaultSetTimout); | |
} catch { | |
cachedSetTimeout = defaultSetTimout; | |
} | |
try { | |
typeof clearTimeout == "function" | |
? (cachedClearTimeout = clearTimeout) | |
: (cachedClearTimeout = defaultClearTimeout); | |
} catch { | |
cachedClearTimeout = defaultClearTimeout; | |
} | |
})(); | |
function runTimeout(s) { | |
if (cachedSetTimeout === setTimeout) return setTimeout(s, 0); | |
if ( | |
(cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && | |
setTimeout | |
) | |
return (cachedSetTimeout = setTimeout), setTimeout(s, 0); | |
try { | |
return cachedSetTimeout(s, 0); | |
} catch { | |
try { | |
return cachedSetTimeout.call(null, s, 0); | |
} catch { | |
return cachedSetTimeout.call(this, s, 0); | |
} | |
} | |
} | |
function runClearTimeout(s) { | |
if (cachedClearTimeout === clearTimeout) return clearTimeout(s); | |
if ( | |
(cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && | |
clearTimeout | |
) | |
return (cachedClearTimeout = clearTimeout), clearTimeout(s); | |
try { | |
return cachedClearTimeout(s); | |
} catch { | |
try { | |
return cachedClearTimeout.call(null, s); | |
} catch { | |
return cachedClearTimeout.call(this, s); | |
} | |
} | |
} | |
var queue = [], | |
draining = !1, | |
currentQueue, | |
queueIndex = -1; | |
function cleanUpNextTick() { | |
!draining || | |
!currentQueue || | |
((draining = !1), | |
currentQueue.length | |
? (queue = currentQueue.concat(queue)) | |
: (queueIndex = -1), | |
queue.length && drainQueue()); | |
} | |
function drainQueue() { | |
if (!draining) { | |
var s = runTimeout(cleanUpNextTick); | |
draining = !0; | |
for (var o = queue.length; o; ) { | |
for (currentQueue = queue, queue = []; ++queueIndex < o; ) | |
currentQueue && currentQueue[queueIndex].run(); | |
(queueIndex = -1), (o = queue.length); | |
} | |
(currentQueue = null), (draining = !1), runClearTimeout(s); | |
} | |
} | |
process.nextTick = function (s) { | |
var o = new Array(arguments.length - 1); | |
if (arguments.length > 1) | |
for (var _ = 1; _ < arguments.length; _++) o[_ - 1] = arguments[_]; | |
queue.push(new Item(s, o)), | |
queue.length === 1 && !draining && runTimeout(drainQueue); | |
}; | |
function Item(s, o) { | |
(this.fun = s), (this.array = o); | |
} | |
Item.prototype.run = function () { | |
this.fun.apply(null, this.array); | |
}; | |
process.title = "browser"; | |
process.browser = !0; | |
process.env = {}; | |
process.argv = []; | |
process.version = ""; | |
process.versions = {}; | |
function noop$5() {} | |
process.on = noop$5; | |
process.addListener = noop$5; | |
process.once = noop$5; | |
process.off = noop$5; | |
process.removeListener = noop$5; | |
process.removeAllListeners = noop$5; | |
process.emit = noop$5; | |
process.prependListener = noop$5; | |
process.prependOnceListener = noop$5; | |
process.listeners = function (s) { | |
return []; | |
}; | |
process.binding = function (s) { | |
throw new Error("process.binding is not supported"); | |
}; | |
process.cwd = function () { | |
return "/"; | |
}; | |
process.chdir = function (s) { | |
throw new Error("process.chdir is not supported"); | |
}; | |
process.umask = function () { | |
return 0; | |
}; | |
var browserExports$1 = browser$g.exports; | |
const process$1 = getDefaultExportFromCjs(browserExports$1); | |
var define_process_env_default$3 = {}; | |
/** | |
* @license | |
* Copyright 2017 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const stringToByteArray$1 = function (s) { | |
const o = []; | |
let _ = 0; | |
for (let _e = 0; _e < s.length; _e++) { | |
let et = s.charCodeAt(_e); | |
et < 128 | |
? (o[_++] = et) | |
: et < 2048 | |
? ((o[_++] = (et >> 6) | 192), (o[_++] = (et & 63) | 128)) | |
: (et & 64512) === 55296 && | |
_e + 1 < s.length && | |
(s.charCodeAt(_e + 1) & 64512) === 56320 | |
? ((et = | |
65536 + ((et & 1023) << 10) + (s.charCodeAt(++_e) & 1023)), | |
(o[_++] = (et >> 18) | 240), | |
(o[_++] = ((et >> 12) & 63) | 128), | |
(o[_++] = ((et >> 6) & 63) | 128), | |
(o[_++] = (et & 63) | 128)) | |
: ((o[_++] = (et >> 12) | 224), | |
(o[_++] = ((et >> 6) & 63) | 128), | |
(o[_++] = (et & 63) | 128)); | |
} | |
return o; | |
}, | |
byteArrayToString = function (s) { | |
const o = []; | |
let _ = 0, | |
_e = 0; | |
for (; _ < s.length; ) { | |
const et = s[_++]; | |
if (et < 128) o[_e++] = String.fromCharCode(et); | |
else if (et > 191 && et < 224) { | |
const tt = s[_++]; | |
o[_e++] = String.fromCharCode(((et & 31) << 6) | (tt & 63)); | |
} else if (et > 239 && et < 365) { | |
const tt = s[_++], | |
rt = s[_++], | |
it = s[_++], | |
ot = | |
(((et & 7) << 18) | | |
((tt & 63) << 12) | | |
((rt & 63) << 6) | | |
(it & 63)) - | |
65536; | |
(o[_e++] = String.fromCharCode(55296 + (ot >> 10))), | |
(o[_e++] = String.fromCharCode(56320 + (ot & 1023))); | |
} else { | |
const tt = s[_++], | |
rt = s[_++]; | |
o[_e++] = String.fromCharCode( | |
((et & 15) << 12) | ((tt & 63) << 6) | (rt & 63), | |
); | |
} | |
} | |
return o.join(""); | |
}, | |
base64 = { | |
byteToCharMap_: null, | |
charToByteMap_: null, | |
byteToCharMapWebSafe_: null, | |
charToByteMapWebSafe_: null, | |
ENCODED_VALS_BASE: | |
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", | |
get ENCODED_VALS() { | |
return this.ENCODED_VALS_BASE + "+/="; | |
}, | |
get ENCODED_VALS_WEBSAFE() { | |
return this.ENCODED_VALS_BASE + "-_."; | |
}, | |
HAS_NATIVE_SUPPORT: typeof atob == "function", | |
encodeByteArray(s, o) { | |
if (!Array.isArray(s)) | |
throw Error("encodeByteArray takes an array as a parameter"); | |
this.init_(); | |
const _ = o ? this.byteToCharMapWebSafe_ : this.byteToCharMap_, | |
_e = []; | |
for (let et = 0; et < s.length; et += 3) { | |
const tt = s[et], | |
rt = et + 1 < s.length, | |
it = rt ? s[et + 1] : 0, | |
ot = et + 2 < s.length, | |
ct = ot ? s[et + 2] : 0, | |
at = tt >> 2, | |
ht = ((tt & 3) << 4) | (it >> 4); | |
let mt = ((it & 15) << 2) | (ct >> 6), | |
vt = ct & 63; | |
ot || ((vt = 64), rt || (mt = 64)), | |
_e.push(_[at], _[ht], _[mt], _[vt]); | |
} | |
return _e.join(""); | |
}, | |
encodeString(s, o) { | |
return this.HAS_NATIVE_SUPPORT && !o | |
? btoa(s) | |
: this.encodeByteArray(stringToByteArray$1(s), o); | |
}, | |
decodeString(s, o) { | |
return this.HAS_NATIVE_SUPPORT && !o | |
? atob(s) | |
: byteArrayToString(this.decodeStringToByteArray(s, o)); | |
}, | |
decodeStringToByteArray(s, o) { | |
this.init_(); | |
const _ = o ? this.charToByteMapWebSafe_ : this.charToByteMap_, | |
_e = []; | |
for (let et = 0; et < s.length; ) { | |
const tt = _[s.charAt(et++)], | |
it = et < s.length ? _[s.charAt(et)] : 0; | |
++et; | |
const ct = et < s.length ? _[s.charAt(et)] : 64; | |
++et; | |
const ht = et < s.length ? _[s.charAt(et)] : 64; | |
if ((++et, tt == null || it == null || ct == null || ht == null)) | |
throw new DecodeBase64StringError(); | |
const mt = (tt << 2) | (it >> 4); | |
if ((_e.push(mt), ct !== 64)) { | |
const vt = ((it << 4) & 240) | (ct >> 2); | |
if ((_e.push(vt), ht !== 64)) { | |
const xt = ((ct << 6) & 192) | ht; | |
_e.push(xt); | |
} | |
} | |
} | |
return _e; | |
}, | |
init_() { | |
if (!this.byteToCharMap_) { | |
(this.byteToCharMap_ = {}), | |
(this.charToByteMap_ = {}), | |
(this.byteToCharMapWebSafe_ = {}), | |
(this.charToByteMapWebSafe_ = {}); | |
for (let s = 0; s < this.ENCODED_VALS.length; s++) | |
(this.byteToCharMap_[s] = this.ENCODED_VALS.charAt(s)), | |
(this.charToByteMap_[this.byteToCharMap_[s]] = s), | |
(this.byteToCharMapWebSafe_[s] = | |
this.ENCODED_VALS_WEBSAFE.charAt(s)), | |
(this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[s]] = s), | |
s >= this.ENCODED_VALS_BASE.length && | |
((this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(s)] = s), | |
(this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(s)] = s)); | |
} | |
}, | |
}; | |
class DecodeBase64StringError extends Error { | |
constructor() { | |
super(...arguments), (this.name = "DecodeBase64StringError"); | |
} | |
} | |
const base64Encode = function (s) { | |
const o = stringToByteArray$1(s); | |
return base64.encodeByteArray(o, !0); | |
}, | |
base64urlEncodeWithoutPadding = function (s) { | |
return base64Encode(s).replace(/\./g, ""); | |
}, | |
base64Decode = function (s) { | |
try { | |
return base64.decodeString(s, !0); | |
} catch (o) { | |
console.error("base64Decode failed: ", o); | |
} | |
return null; | |
}; | |
/** | |
* @license | |
* Copyright 2022 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ function getGlobal() { | |
if (typeof self < "u") return self; | |
if (typeof window < "u") return window; | |
if (typeof global$1 < "u") return global$1; | |
throw new Error("Unable to locate global object."); | |
} | |
/** | |
* @license | |
* Copyright 2022 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const getDefaultsFromGlobal = () => getGlobal().__FIREBASE_DEFAULTS__, | |
getDefaultsFromEnvVariable = () => { | |
if (typeof process$1 > "u" || typeof define_process_env_default$3 > "u") | |
return; | |
const s = define_process_env_default$3.__FIREBASE_DEFAULTS__; | |
if (s) return JSON.parse(s); | |
}, | |
getDefaultsFromCookie = () => { | |
if (typeof document > "u") return; | |
let s; | |
try { | |
s = document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/); | |
} catch { | |
return; | |
} | |
const o = s && base64Decode(s[1]); | |
return o && JSON.parse(o); | |
}, | |
getDefaults = () => { | |
try { | |
return ( | |
getDefaultsFromGlobal() || | |
getDefaultsFromEnvVariable() || | |
getDefaultsFromCookie() | |
); | |
} catch (s) { | |
console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${s}`); | |
return; | |
} | |
}, | |
getDefaultAppConfig = () => { | |
var s; | |
return (s = getDefaults()) === null || s === void 0 ? void 0 : s.config; | |
}; | |
/** | |
* @license | |
* Copyright 2017 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ class Deferred { | |
constructor() { | |
(this.reject = () => {}), | |
(this.resolve = () => {}), | |
(this.promise = new Promise((o, _) => { | |
(this.resolve = o), (this.reject = _); | |
})); | |
} | |
wrapCallback(o) { | |
return (_, _e) => { | |
_ ? this.reject(_) : this.resolve(_e), | |
typeof o == "function" && | |
(this.promise.catch(() => {}), o.length === 1 ? o(_) : o(_, _e)); | |
}; | |
} | |
} | |
function isBrowserExtension() { | |
const s = | |
typeof chrome == "object" | |
? chrome.runtime | |
: typeof browser == "object" | |
? browser.runtime | |
: void 0; | |
return typeof s == "object" && s.id !== void 0; | |
} | |
function isIndexedDBAvailable() { | |
try { | |
return typeof indexedDB == "object"; | |
} catch { | |
return !1; | |
} | |
} | |
function validateIndexedDBOpenable() { | |
return new Promise((s, o) => { | |
try { | |
let _ = !0; | |
const _e = "validate-browser-context-for-indexeddb-analytics-module", | |
et = self.indexedDB.open(_e); | |
(et.onsuccess = () => { | |
et.result.close(), _ || self.indexedDB.deleteDatabase(_e), s(!0); | |
}), | |
(et.onupgradeneeded = () => { | |
_ = !1; | |
}), | |
(et.onerror = () => { | |
var tt; | |
o( | |
((tt = et.error) === null || tt === void 0 | |
? void 0 | |
: tt.message) || "", | |
); | |
}); | |
} catch (_) { | |
o(_); | |
} | |
}); | |
} | |
function areCookiesEnabled() { | |
return !(typeof navigator > "u" || !navigator.cookieEnabled); | |
} | |
/** | |
* @license | |
* Copyright 2017 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const ERROR_NAME = "FirebaseError"; | |
class FirebaseError extends Error { | |
constructor(o, _, _e) { | |
super(_), | |
(this.code = o), | |
(this.customData = _e), | |
(this.name = ERROR_NAME), | |
Object.setPrototypeOf(this, FirebaseError.prototype), | |
Error.captureStackTrace && | |
Error.captureStackTrace(this, ErrorFactory.prototype.create); | |
} | |
} | |
class ErrorFactory { | |
constructor(o, _, _e) { | |
(this.service = o), (this.serviceName = _), (this.errors = _e); | |
} | |
create(o, ..._) { | |
const _e = _[0] || {}, | |
et = `${this.service}/${o}`, | |
tt = this.errors[o], | |
rt = tt ? replaceTemplate(tt, _e) : "Error", | |
it = `${this.serviceName}: ${rt} (${et}).`; | |
return new FirebaseError(et, it, _e); | |
} | |
} | |
function replaceTemplate(s, o) { | |
return s.replace(PATTERN, (_, _e) => { | |
const et = o[_e]; | |
return et != null ? String(et) : `<${_e}?>`; | |
}); | |
} | |
const PATTERN = /\{\$([^}]+)}/g; | |
function deepEqual(s, o) { | |
if (s === o) return !0; | |
const _ = Object.keys(s), | |
_e = Object.keys(o); | |
for (const et of _) { | |
if (!_e.includes(et)) return !1; | |
const tt = s[et], | |
rt = o[et]; | |
if (isObject$6(tt) && isObject$6(rt)) { | |
if (!deepEqual(tt, rt)) return !1; | |
} else if (tt !== rt) return !1; | |
} | |
for (const et of _e) if (!_.includes(et)) return !1; | |
return !0; | |
} | |
function isObject$6(s) { | |
return s !== null && typeof s == "object"; | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const DEFAULT_INTERVAL_MILLIS = 1e3, | |
DEFAULT_BACKOFF_FACTOR = 2, | |
MAX_VALUE_MILLIS = 4 * 60 * 60 * 1e3, | |
RANDOM_FACTOR = 0.5; | |
function calculateBackoffMillis( | |
s, | |
o = DEFAULT_INTERVAL_MILLIS, | |
_ = DEFAULT_BACKOFF_FACTOR, | |
) { | |
const _e = o * Math.pow(_, s), | |
et = Math.round(RANDOM_FACTOR * _e * (Math.random() - 0.5) * 2); | |
return Math.min(MAX_VALUE_MILLIS, _e + et); | |
} | |
/** | |
* @license | |
* Copyright 2021 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ function getModularInstance(s) { | |
return s && s._delegate ? s._delegate : s; | |
} | |
class Component { | |
constructor(o, _, _e) { | |
(this.name = o), | |
(this.instanceFactory = _), | |
(this.type = _e), | |
(this.multipleInstances = !1), | |
(this.serviceProps = {}), | |
(this.instantiationMode = "LAZY"), | |
(this.onInstanceCreated = null); | |
} | |
setInstantiationMode(o) { | |
return (this.instantiationMode = o), this; | |
} | |
setMultipleInstances(o) { | |
return (this.multipleInstances = o), this; | |
} | |
setServiceProps(o) { | |
return (this.serviceProps = o), this; | |
} | |
setInstanceCreatedCallback(o) { | |
return (this.onInstanceCreated = o), this; | |
} | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const DEFAULT_ENTRY_NAME$1 = "[DEFAULT]"; | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ class Provider { | |
constructor(o, _) { | |
(this.name = o), | |
(this.container = _), | |
(this.component = null), | |
(this.instances = new Map()), | |
(this.instancesDeferred = new Map()), | |
(this.instancesOptions = new Map()), | |
(this.onInitCallbacks = new Map()); | |
} | |
get(o) { | |
const _ = this.normalizeInstanceIdentifier(o); | |
if (!this.instancesDeferred.has(_)) { | |
const _e = new Deferred(); | |
if ( | |
(this.instancesDeferred.set(_, _e), | |
this.isInitialized(_) || this.shouldAutoInitialize()) | |
) | |
try { | |
const et = this.getOrInitializeService({ instanceIdentifier: _ }); | |
et && _e.resolve(et); | |
} catch {} | |
} | |
return this.instancesDeferred.get(_).promise; | |
} | |
getImmediate(o) { | |
var _; | |
const _e = this.normalizeInstanceIdentifier( | |
o == null ? void 0 : o.identifier, | |
), | |
et = | |
(_ = o == null ? void 0 : o.optional) !== null && _ !== void 0 | |
? _ | |
: !1; | |
if (this.isInitialized(_e) || this.shouldAutoInitialize()) | |
try { | |
return this.getOrInitializeService({ instanceIdentifier: _e }); | |
} catch (tt) { | |
if (et) return null; | |
throw tt; | |
} | |
else { | |
if (et) return null; | |
throw Error(`Service ${this.name} is not available`); | |
} | |
} | |
getComponent() { | |
return this.component; | |
} | |
setComponent(o) { | |
if (o.name !== this.name) | |
throw Error( | |
`Mismatching Component ${o.name} for Provider ${this.name}.`, | |
); | |
if (this.component) | |
throw Error(`Component for ${this.name} has already been provided`); | |
if (((this.component = o), !!this.shouldAutoInitialize())) { | |
if (isComponentEager(o)) | |
try { | |
this.getOrInitializeService({ | |
instanceIdentifier: DEFAULT_ENTRY_NAME$1, | |
}); | |
} catch {} | |
for (const [_, _e] of this.instancesDeferred.entries()) { | |
const et = this.normalizeInstanceIdentifier(_); | |
try { | |
const tt = this.getOrInitializeService({ instanceIdentifier: et }); | |
_e.resolve(tt); | |
} catch {} | |
} | |
} | |
} | |
clearInstance(o = DEFAULT_ENTRY_NAME$1) { | |
this.instancesDeferred.delete(o), | |
this.instancesOptions.delete(o), | |
this.instances.delete(o); | |
} | |
async delete() { | |
const o = Array.from(this.instances.values()); | |
await Promise.all([ | |
...o.filter((_) => "INTERNAL" in _).map((_) => _.INTERNAL.delete()), | |
...o.filter((_) => "_delete" in _).map((_) => _._delete()), | |
]); | |
} | |
isComponentSet() { | |
return this.component != null; | |
} | |
isInitialized(o = DEFAULT_ENTRY_NAME$1) { | |
return this.instances.has(o); | |
} | |
getOptions(o = DEFAULT_ENTRY_NAME$1) { | |
return this.instancesOptions.get(o) || {}; | |
} | |
initialize(o = {}) { | |
const { options: _ = {} } = o, | |
_e = this.normalizeInstanceIdentifier(o.instanceIdentifier); | |
if (this.isInitialized(_e)) | |
throw Error(`${this.name}(${_e}) has already been initialized`); | |
if (!this.isComponentSet()) | |
throw Error(`Component ${this.name} has not been registered yet`); | |
const et = this.getOrInitializeService({ | |
instanceIdentifier: _e, | |
options: _, | |
}); | |
for (const [tt, rt] of this.instancesDeferred.entries()) { | |
const it = this.normalizeInstanceIdentifier(tt); | |
_e === it && rt.resolve(et); | |
} | |
return et; | |
} | |
onInit(o, _) { | |
var _e; | |
const et = this.normalizeInstanceIdentifier(_), | |
tt = | |
(_e = this.onInitCallbacks.get(et)) !== null && _e !== void 0 | |
? _e | |
: new Set(); | |
tt.add(o), this.onInitCallbacks.set(et, tt); | |
const rt = this.instances.get(et); | |
return ( | |
rt && o(rt, et), | |
() => { | |
tt.delete(o); | |
} | |
); | |
} | |
invokeOnInitCallbacks(o, _) { | |
const _e = this.onInitCallbacks.get(_); | |
if (_e) | |
for (const et of _e) | |
try { | |
et(o, _); | |
} catch {} | |
} | |
getOrInitializeService({ instanceIdentifier: o, options: _ = {} }) { | |
let _e = this.instances.get(o); | |
if ( | |
!_e && | |
this.component && | |
((_e = this.component.instanceFactory(this.container, { | |
instanceIdentifier: normalizeIdentifierForFactory(o), | |
options: _, | |
})), | |
this.instances.set(o, _e), | |
this.instancesOptions.set(o, _), | |
this.invokeOnInitCallbacks(_e, o), | |
this.component.onInstanceCreated) | |
) | |
try { | |
this.component.onInstanceCreated(this.container, o, _e); | |
} catch {} | |
return _e || null; | |
} | |
normalizeInstanceIdentifier(o = DEFAULT_ENTRY_NAME$1) { | |
return this.component | |
? this.component.multipleInstances | |
? o | |
: DEFAULT_ENTRY_NAME$1 | |
: o; | |
} | |
shouldAutoInitialize() { | |
return ( | |
!!this.component && this.component.instantiationMode !== "EXPLICIT" | |
); | |
} | |
} | |
function normalizeIdentifierForFactory(s) { | |
return s === DEFAULT_ENTRY_NAME$1 ? void 0 : s; | |
} | |
function isComponentEager(s) { | |
return s.instantiationMode === "EAGER"; | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ class ComponentContainer { | |
constructor(o) { | |
(this.name = o), (this.providers = new Map()); | |
} | |
addComponent(o) { | |
const _ = this.getProvider(o.name); | |
if (_.isComponentSet()) | |
throw new Error( | |
`Component ${o.name} has already been registered with ${this.name}`, | |
); | |
_.setComponent(o); | |
} | |
addOrOverwriteComponent(o) { | |
this.getProvider(o.name).isComponentSet() && | |
this.providers.delete(o.name), | |
this.addComponent(o); | |
} | |
getProvider(o) { | |
if (this.providers.has(o)) return this.providers.get(o); | |
const _ = new Provider(o, this); | |
return this.providers.set(o, _), _; | |
} | |
getProviders() { | |
return Array.from(this.providers.values()); | |
} | |
} | |
/** | |
* @license | |
* Copyright 2017 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ var LogLevel; | |
(function (s) { | |
(s[(s.DEBUG = 0)] = "DEBUG"), | |
(s[(s.VERBOSE = 1)] = "VERBOSE"), | |
(s[(s.INFO = 2)] = "INFO"), | |
(s[(s.WARN = 3)] = "WARN"), | |
(s[(s.ERROR = 4)] = "ERROR"), | |
(s[(s.SILENT = 5)] = "SILENT"); | |
})(LogLevel || (LogLevel = {})); | |
const levelStringToEnum = { | |
debug: LogLevel.DEBUG, | |
verbose: LogLevel.VERBOSE, | |
info: LogLevel.INFO, | |
warn: LogLevel.WARN, | |
error: LogLevel.ERROR, | |
silent: LogLevel.SILENT, | |
}, | |
defaultLogLevel = LogLevel.INFO, | |
ConsoleMethod = { | |
[LogLevel.DEBUG]: "log", | |
[LogLevel.VERBOSE]: "log", | |
[LogLevel.INFO]: "info", | |
[LogLevel.WARN]: "warn", | |
[LogLevel.ERROR]: "error", | |
}, | |
defaultLogHandler = (s, o, ..._) => { | |
if (o < s.logLevel) return; | |
const _e = new Date().toISOString(), | |
et = ConsoleMethod[o]; | |
if (et) console[et](`[${_e}] ${s.name}:`, ..._); | |
else | |
throw new Error( | |
`Attempted to log a message with an invalid logType (value: ${o})`, | |
); | |
}; | |
class Logger { | |
constructor(o) { | |
(this.name = o), | |
(this._logLevel = defaultLogLevel), | |
(this._logHandler = defaultLogHandler), | |
(this._userLogHandler = null); | |
} | |
get logLevel() { | |
return this._logLevel; | |
} | |
set logLevel(o) { | |
if (!(o in LogLevel)) | |
throw new TypeError(`Invalid value "${o}" assigned to \`logLevel\``); | |
this._logLevel = o; | |
} | |
setLogLevel(o) { | |
this._logLevel = typeof o == "string" ? levelStringToEnum[o] : o; | |
} | |
get logHandler() { | |
return this._logHandler; | |
} | |
set logHandler(o) { | |
if (typeof o != "function") | |
throw new TypeError( | |
"Value assigned to `logHandler` must be a function", | |
); | |
this._logHandler = o; | |
} | |
get userLogHandler() { | |
return this._userLogHandler; | |
} | |
set userLogHandler(o) { | |
this._userLogHandler = o; | |
} | |
debug(...o) { | |
this._userLogHandler && this._userLogHandler(this, LogLevel.DEBUG, ...o), | |
this._logHandler(this, LogLevel.DEBUG, ...o); | |
} | |
log(...o) { | |
this._userLogHandler && | |
this._userLogHandler(this, LogLevel.VERBOSE, ...o), | |
this._logHandler(this, LogLevel.VERBOSE, ...o); | |
} | |
info(...o) { | |
this._userLogHandler && this._userLogHandler(this, LogLevel.INFO, ...o), | |
this._logHandler(this, LogLevel.INFO, ...o); | |
} | |
warn(...o) { | |
this._userLogHandler && this._userLogHandler(this, LogLevel.WARN, ...o), | |
this._logHandler(this, LogLevel.WARN, ...o); | |
} | |
error(...o) { | |
this._userLogHandler && this._userLogHandler(this, LogLevel.ERROR, ...o), | |
this._logHandler(this, LogLevel.ERROR, ...o); | |
} | |
} | |
const instanceOfAny$1 = (s, o) => o.some((_) => s instanceof _); | |
let idbProxyableTypes$1, cursorAdvanceMethods$1; | |
function getIdbProxyableTypes$1() { | |
return ( | |
idbProxyableTypes$1 || | |
(idbProxyableTypes$1 = [ | |
IDBDatabase, | |
IDBObjectStore, | |
IDBIndex, | |
IDBCursor, | |
IDBTransaction, | |
]) | |
); | |
} | |
function getCursorAdvanceMethods$1() { | |
return ( | |
cursorAdvanceMethods$1 || | |
(cursorAdvanceMethods$1 = [ | |
IDBCursor.prototype.advance, | |
IDBCursor.prototype.continue, | |
IDBCursor.prototype.continuePrimaryKey, | |
]) | |
); | |
} | |
const cursorRequestMap$1 = new WeakMap(), | |
transactionDoneMap$1 = new WeakMap(), | |
transactionStoreNamesMap$1 = new WeakMap(), | |
transformCache$1 = new WeakMap(), | |
reverseTransformCache$1 = new WeakMap(); | |
function promisifyRequest$1(s) { | |
const o = new Promise((_, _e) => { | |
const et = () => { | |
s.removeEventListener("success", tt), | |
s.removeEventListener("error", rt); | |
}, | |
tt = () => { | |
_(wrap$9(s.result)), et(); | |
}, | |
rt = () => { | |
_e(s.error), et(); | |
}; | |
s.addEventListener("success", tt), s.addEventListener("error", rt); | |
}); | |
return ( | |
o | |
.then((_) => { | |
_ instanceof IDBCursor && cursorRequestMap$1.set(_, s); | |
}) | |
.catch(() => {}), | |
reverseTransformCache$1.set(o, s), | |
o | |
); | |
} | |
function cacheDonePromiseForTransaction$1(s) { | |
if (transactionDoneMap$1.has(s)) return; | |
const o = new Promise((_, _e) => { | |
const et = () => { | |
s.removeEventListener("complete", tt), | |
s.removeEventListener("error", rt), | |
s.removeEventListener("abort", rt); | |
}, | |
tt = () => { | |
_(), et(); | |
}, | |
rt = () => { | |
_e(s.error || new DOMException("AbortError", "AbortError")), et(); | |
}; | |
s.addEventListener("complete", tt), | |
s.addEventListener("error", rt), | |
s.addEventListener("abort", rt); | |
}); | |
transactionDoneMap$1.set(s, o); | |
} | |
let idbProxyTraps$1 = { | |
get(s, o, _) { | |
if (s instanceof IDBTransaction) { | |
if (o === "done") return transactionDoneMap$1.get(s); | |
if (o === "objectStoreNames") | |
return s.objectStoreNames || transactionStoreNamesMap$1.get(s); | |
if (o === "store") | |
return _.objectStoreNames[1] | |
? void 0 | |
: _.objectStore(_.objectStoreNames[0]); | |
} | |
return wrap$9(s[o]); | |
}, | |
set(s, o, _) { | |
return (s[o] = _), !0; | |
}, | |
has(s, o) { | |
return s instanceof IDBTransaction && (o === "done" || o === "store") | |
? !0 | |
: o in s; | |
}, | |
}; | |
function replaceTraps$1(s) { | |
idbProxyTraps$1 = s(idbProxyTraps$1); | |
} | |
function wrapFunction$1(s) { | |
return s === IDBDatabase.prototype.transaction && | |
!("objectStoreNames" in IDBTransaction.prototype) | |
? function (o, ..._) { | |
const _e = s.call(unwrap$1(this), o, ..._); | |
return ( | |
transactionStoreNamesMap$1.set(_e, o.sort ? o.sort() : [o]), | |
wrap$9(_e) | |
); | |
} | |
: getCursorAdvanceMethods$1().includes(s) | |
? function (...o) { | |
return ( | |
s.apply(unwrap$1(this), o), wrap$9(cursorRequestMap$1.get(this)) | |
); | |
} | |
: function (...o) { | |
return wrap$9(s.apply(unwrap$1(this), o)); | |
}; | |
} | |
function transformCachableValue$1(s) { | |
return typeof s == "function" | |
? wrapFunction$1(s) | |
: (s instanceof IDBTransaction && cacheDonePromiseForTransaction$1(s), | |
instanceOfAny$1(s, getIdbProxyableTypes$1()) | |
? new Proxy(s, idbProxyTraps$1) | |
: s); | |
} | |
function wrap$9(s) { | |
if (s instanceof IDBRequest) return promisifyRequest$1(s); | |
if (transformCache$1.has(s)) return transformCache$1.get(s); | |
const o = transformCachableValue$1(s); | |
return ( | |
o !== s && | |
(transformCache$1.set(s, o), reverseTransformCache$1.set(o, s)), | |
o | |
); | |
} | |
const unwrap$1 = (s) => reverseTransformCache$1.get(s); | |
function openDB$1( | |
s, | |
o, | |
{ blocked: _, upgrade: _e, blocking: et, terminated: tt } = {}, | |
) { | |
const rt = indexedDB.open(s, o), | |
it = wrap$9(rt); | |
return ( | |
_e && | |
rt.addEventListener("upgradeneeded", (ot) => { | |
_e( | |
wrap$9(rt.result), | |
ot.oldVersion, | |
ot.newVersion, | |
wrap$9(rt.transaction), | |
ot, | |
); | |
}), | |
_ && | |
rt.addEventListener("blocked", (ot) => | |
_(ot.oldVersion, ot.newVersion, ot), | |
), | |
it | |
.then((ot) => { | |
tt && ot.addEventListener("close", () => tt()), | |
et && | |
ot.addEventListener("versionchange", (ct) => | |
et(ct.oldVersion, ct.newVersion, ct), | |
); | |
}) | |
.catch(() => {}), | |
it | |
); | |
} | |
const readMethods$1 = ["get", "getKey", "getAll", "getAllKeys", "count"], | |
writeMethods$1 = ["put", "add", "delete", "clear"], | |
cachedMethods$1 = new Map(); | |
function getMethod$1(s, o) { | |
if (!(s instanceof IDBDatabase && !(o in s) && typeof o == "string")) | |
return; | |
if (cachedMethods$1.get(o)) return cachedMethods$1.get(o); | |
const _ = o.replace(/FromIndex$/, ""), | |
_e = o !== _, | |
et = writeMethods$1.includes(_); | |
if ( | |
!(_ in (_e ? IDBIndex : IDBObjectStore).prototype) || | |
!(et || readMethods$1.includes(_)) | |
) | |
return; | |
const tt = async function (rt, ...it) { | |
const ot = this.transaction(rt, et ? "readwrite" : "readonly"); | |
let ct = ot.store; | |
return ( | |
_e && (ct = ct.index(it.shift())), | |
(await Promise.all([ct[_](...it), et && ot.done]))[0] | |
); | |
}; | |
return cachedMethods$1.set(o, tt), tt; | |
} | |
replaceTraps$1((s) => ({ | |
...s, | |
get: (o, _, _e) => getMethod$1(o, _) || s.get(o, _, _e), | |
has: (o, _) => !!getMethod$1(o, _) || s.has(o, _), | |
})); | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ class PlatformLoggerServiceImpl { | |
constructor(o) { | |
this.container = o; | |
} | |
getPlatformInfoString() { | |
return this.container | |
.getProviders() | |
.map((_) => { | |
if (isVersionServiceProvider(_)) { | |
const _e = _.getImmediate(); | |
return `${_e.library}/${_e.version}`; | |
} else return null; | |
}) | |
.filter((_) => _) | |
.join(" "); | |
} | |
} | |
function isVersionServiceProvider(s) { | |
const o = s.getComponent(); | |
return (o == null ? void 0 : o.type) === "VERSION"; | |
} | |
const name$o = "@firebase/app", | |
version$1$1 = "0.9.13"; | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const logger$1 = new Logger("@firebase/app"), | |
name$n = "@firebase/app-compat", | |
name$m = "@firebase/analytics-compat", | |
name$l = "@firebase/analytics", | |
name$k = "@firebase/app-check-compat", | |
name$j = "@firebase/app-check", | |
name$i = "@firebase/auth", | |
name$h = "@firebase/auth-compat", | |
name$g = "@firebase/database", | |
name$f = "@firebase/database-compat", | |
name$e = "@firebase/functions", | |
name$d = "@firebase/functions-compat", | |
name$c = "@firebase/installations", | |
name$b = "@firebase/installations-compat", | |
name$a = "@firebase/messaging", | |
name$9 = "@firebase/messaging-compat", | |
name$8 = "@firebase/performance", | |
name$7 = "@firebase/performance-compat", | |
name$6 = "@firebase/remote-config", | |
name$5$1 = "@firebase/remote-config-compat", | |
name$4$1 = "@firebase/storage", | |
name$3$1 = "@firebase/storage-compat", | |
name$2$1 = "@firebase/firestore", | |
name$1$1 = "@firebase/firestore-compat", | |
name$p = "firebase"; | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const DEFAULT_ENTRY_NAME = "[DEFAULT]", | |
PLATFORM_LOG_STRING = { | |
[name$o]: "fire-core", | |
[name$n]: "fire-core-compat", | |
[name$l]: "fire-analytics", | |
[name$m]: "fire-analytics-compat", | |
[name$j]: "fire-app-check", | |
[name$k]: "fire-app-check-compat", | |
[name$i]: "fire-auth", | |
[name$h]: "fire-auth-compat", | |
[name$g]: "fire-rtdb", | |
[name$f]: "fire-rtdb-compat", | |
[name$e]: "fire-fn", | |
[name$d]: "fire-fn-compat", | |
[name$c]: "fire-iid", | |
[name$b]: "fire-iid-compat", | |
[name$a]: "fire-fcm", | |
[name$9]: "fire-fcm-compat", | |
[name$8]: "fire-perf", | |
[name$7]: "fire-perf-compat", | |
[name$6]: "fire-rc", | |
[name$5$1]: "fire-rc-compat", | |
[name$4$1]: "fire-gcs", | |
[name$3$1]: "fire-gcs-compat", | |
[name$2$1]: "fire-fst", | |
[name$1$1]: "fire-fst-compat", | |
"fire-js": "fire-js", | |
[name$p]: "fire-js-all", | |
}; | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const _apps = new Map(), | |
_components = new Map(); | |
function _addComponent(s, o) { | |
try { | |
s.container.addComponent(o); | |
} catch (_) { | |
logger$1.debug( | |
`Component ${o.name} failed to register with FirebaseApp ${s.name}`, | |
_, | |
); | |
} | |
} | |
function _registerComponent(s) { | |
const o = s.name; | |
if (_components.has(o)) | |
return ( | |
logger$1.debug( | |
`There were multiple attempts to register component ${o}.`, | |
), | |
!1 | |
); | |
_components.set(o, s); | |
for (const _ of _apps.values()) _addComponent(_, s); | |
return !0; | |
} | |
function _getProvider(s, o) { | |
const _ = s.container | |
.getProvider("heartbeat") | |
.getImmediate({ optional: !0 }); | |
return _ && _.triggerHeartbeat(), s.container.getProvider(o); | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const ERRORS$1 = { | |
"no-app": | |
"No Firebase App '{$appName}' has been created - call initializeApp() first", | |
"bad-app-name": "Illegal App name: '{$appName}", | |
"duplicate-app": | |
"Firebase App named '{$appName}' already exists with different options or config", | |
"app-deleted": "Firebase App named '{$appName}' already deleted", | |
"no-options": | |
"Need to provide options, when not being deployed to hosting via source.", | |
"invalid-app-argument": | |
"firebase.{$appName}() takes either no argument or a Firebase App instance.", | |
"invalid-log-argument": | |
"First argument to `onLog` must be null or a function.", | |
"idb-open": | |
"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.", | |
"idb-get": | |
"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.", | |
"idb-set": | |
"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.", | |
"idb-delete": | |
"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.", | |
}, | |
ERROR_FACTORY$2 = new ErrorFactory("app", "Firebase", ERRORS$1); | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ class FirebaseAppImpl { | |
constructor(o, _, _e) { | |
(this._isDeleted = !1), | |
(this._options = Object.assign({}, o)), | |
(this._config = Object.assign({}, _)), | |
(this._name = _.name), | |
(this._automaticDataCollectionEnabled = | |
_.automaticDataCollectionEnabled), | |
(this._container = _e), | |
this.container.addComponent(new Component("app", () => this, "PUBLIC")); | |
} | |
get automaticDataCollectionEnabled() { | |
return this.checkDestroyed(), this._automaticDataCollectionEnabled; | |
} | |
set automaticDataCollectionEnabled(o) { | |
this.checkDestroyed(), (this._automaticDataCollectionEnabled = o); | |
} | |
get name() { | |
return this.checkDestroyed(), this._name; | |
} | |
get options() { | |
return this.checkDestroyed(), this._options; | |
} | |
get config() { | |
return this.checkDestroyed(), this._config; | |
} | |
get container() { | |
return this._container; | |
} | |
get isDeleted() { | |
return this._isDeleted; | |
} | |
set isDeleted(o) { | |
this._isDeleted = o; | |
} | |
checkDestroyed() { | |
if (this.isDeleted) | |
throw ERROR_FACTORY$2.create("app-deleted", { appName: this._name }); | |
} | |
} | |
function initializeApp(s, o = {}) { | |
let _ = s; | |
typeof o != "object" && (o = { name: o }); | |
const _e = Object.assign( | |
{ name: DEFAULT_ENTRY_NAME, automaticDataCollectionEnabled: !1 }, | |
o, | |
), | |
et = _e.name; | |
if (typeof et != "string" || !et) | |
throw ERROR_FACTORY$2.create("bad-app-name", { appName: String(et) }); | |
if ((_ || (_ = getDefaultAppConfig()), !_)) | |
throw ERROR_FACTORY$2.create("no-options"); | |
const tt = _apps.get(et); | |
if (tt) { | |
if (deepEqual(_, tt.options) && deepEqual(_e, tt.config)) return tt; | |
throw ERROR_FACTORY$2.create("duplicate-app", { appName: et }); | |
} | |
const rt = new ComponentContainer(et); | |
for (const ot of _components.values()) rt.addComponent(ot); | |
const it = new FirebaseAppImpl(_, _e, rt); | |
return _apps.set(et, it), it; | |
} | |
function getApp(s = DEFAULT_ENTRY_NAME) { | |
const o = _apps.get(s); | |
if (!o && s === DEFAULT_ENTRY_NAME && getDefaultAppConfig()) | |
return initializeApp(); | |
if (!o) throw ERROR_FACTORY$2.create("no-app", { appName: s }); | |
return o; | |
} | |
function registerVersion(s, o, _) { | |
var _e; | |
let et = (_e = PLATFORM_LOG_STRING[s]) !== null && _e !== void 0 ? _e : s; | |
_ && (et += `-${_}`); | |
const tt = et.match(/\s|\//), | |
rt = o.match(/\s|\//); | |
if (tt || rt) { | |
const it = [`Unable to register library "${et}" with version "${o}":`]; | |
tt && | |
it.push( | |
`library name "${et}" contains illegal characters (whitespace or "/")`, | |
), | |
tt && rt && it.push("and"), | |
rt && | |
it.push( | |
`version name "${o}" contains illegal characters (whitespace or "/")`, | |
), | |
logger$1.warn(it.join(" ")); | |
return; | |
} | |
_registerComponent( | |
new Component( | |
`${et}-version`, | |
() => ({ library: et, version: o }), | |
"VERSION", | |
), | |
); | |
} | |
/** | |
* @license | |
* Copyright 2021 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const DB_NAME = "firebase-heartbeat-database", | |
DB_VERSION = 1, | |
STORE_NAME = "firebase-heartbeat-store"; | |
let dbPromise$1 = null; | |
function getDbPromise$1() { | |
return ( | |
dbPromise$1 || | |
(dbPromise$1 = openDB$1(DB_NAME, DB_VERSION, { | |
upgrade: (s, o) => { | |
switch (o) { | |
case 0: | |
s.createObjectStore(STORE_NAME); | |
} | |
}, | |
}).catch((s) => { | |
throw ERROR_FACTORY$2.create("idb-open", { | |
originalErrorMessage: s.message, | |
}); | |
})), | |
dbPromise$1 | |
); | |
} | |
async function readHeartbeatsFromIndexedDB(s) { | |
try { | |
return await (await getDbPromise$1()) | |
.transaction(STORE_NAME) | |
.objectStore(STORE_NAME) | |
.get(computeKey(s)); | |
} catch (o) { | |
if (o instanceof FirebaseError) logger$1.warn(o.message); | |
else { | |
const _ = ERROR_FACTORY$2.create("idb-get", { | |
originalErrorMessage: o == null ? void 0 : o.message, | |
}); | |
logger$1.warn(_.message); | |
} | |
} | |
} | |
async function writeHeartbeatsToIndexedDB(s, o) { | |
try { | |
const _e = (await getDbPromise$1()).transaction(STORE_NAME, "readwrite"); | |
await _e.objectStore(STORE_NAME).put(o, computeKey(s)), await _e.done; | |
} catch (_) { | |
if (_ instanceof FirebaseError) logger$1.warn(_.message); | |
else { | |
const _e = ERROR_FACTORY$2.create("idb-set", { | |
originalErrorMessage: _ == null ? void 0 : _.message, | |
}); | |
logger$1.warn(_e.message); | |
} | |
} | |
} | |
function computeKey(s) { | |
return `${s.name}!${s.options.appId}`; | |
} | |
/** | |
* @license | |
* Copyright 2021 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const MAX_HEADER_BYTES = 1024, | |
STORED_HEARTBEAT_RETENTION_MAX_MILLIS = 30 * 24 * 60 * 60 * 1e3; | |
class HeartbeatServiceImpl { | |
constructor(o) { | |
(this.container = o), (this._heartbeatsCache = null); | |
const _ = this.container.getProvider("app").getImmediate(); | |
(this._storage = new HeartbeatStorageImpl(_)), | |
(this._heartbeatsCachePromise = this._storage | |
.read() | |
.then((_e) => ((this._heartbeatsCache = _e), _e))); | |
} | |
async triggerHeartbeat() { | |
const _ = this.container | |
.getProvider("platform-logger") | |
.getImmediate() | |
.getPlatformInfoString(), | |
_e = getUTCDateString(); | |
if ( | |
(this._heartbeatsCache === null && | |
(this._heartbeatsCache = await this._heartbeatsCachePromise), | |
!( | |
this._heartbeatsCache.lastSentHeartbeatDate === _e || | |
this._heartbeatsCache.heartbeats.some((et) => et.date === _e) | |
)) | |
) | |
return ( | |
this._heartbeatsCache.heartbeats.push({ date: _e, agent: _ }), | |
(this._heartbeatsCache.heartbeats = | |
this._heartbeatsCache.heartbeats.filter((et) => { | |
const tt = new Date(et.date).valueOf(); | |
return Date.now() - tt <= STORED_HEARTBEAT_RETENTION_MAX_MILLIS; | |
})), | |
this._storage.overwrite(this._heartbeatsCache) | |
); | |
} | |
async getHeartbeatsHeader() { | |
if ( | |
(this._heartbeatsCache === null && (await this._heartbeatsCachePromise), | |
this._heartbeatsCache === null || | |
this._heartbeatsCache.heartbeats.length === 0) | |
) | |
return ""; | |
const o = getUTCDateString(), | |
{ heartbeatsToSend: _, unsentEntries: _e } = extractHeartbeatsForHeader( | |
this._heartbeatsCache.heartbeats, | |
), | |
et = base64urlEncodeWithoutPadding( | |
JSON.stringify({ version: 2, heartbeats: _ }), | |
); | |
return ( | |
(this._heartbeatsCache.lastSentHeartbeatDate = o), | |
_e.length > 0 | |
? ((this._heartbeatsCache.heartbeats = _e), | |
await this._storage.overwrite(this._heartbeatsCache)) | |
: ((this._heartbeatsCache.heartbeats = []), | |
this._storage.overwrite(this._heartbeatsCache)), | |
et | |
); | |
} | |
} | |
function getUTCDateString() { | |
return new Date().toISOString().substring(0, 10); | |
} | |
function extractHeartbeatsForHeader(s, o = MAX_HEADER_BYTES) { | |
const _ = []; | |
let _e = s.slice(); | |
for (const et of s) { | |
const tt = _.find((rt) => rt.agent === et.agent); | |
if (tt) { | |
if ((tt.dates.push(et.date), countBytes(_) > o)) { | |
tt.dates.pop(); | |
break; | |
} | |
} else if ( | |
(_.push({ agent: et.agent, dates: [et.date] }), countBytes(_) > o) | |
) { | |
_.pop(); | |
break; | |
} | |
_e = _e.slice(1); | |
} | |
return { heartbeatsToSend: _, unsentEntries: _e }; | |
} | |
class HeartbeatStorageImpl { | |
constructor(o) { | |
(this.app = o), | |
(this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck()); | |
} | |
async runIndexedDBEnvironmentCheck() { | |
return isIndexedDBAvailable() | |
? validateIndexedDBOpenable() | |
.then(() => !0) | |
.catch(() => !1) | |
: !1; | |
} | |
async read() { | |
return (await this._canUseIndexedDBPromise) | |
? (await readHeartbeatsFromIndexedDB(this.app)) || { heartbeats: [] } | |
: { heartbeats: [] }; | |
} | |
async overwrite(o) { | |
var _; | |
if (await this._canUseIndexedDBPromise) { | |
const et = await this.read(); | |
return writeHeartbeatsToIndexedDB(this.app, { | |
lastSentHeartbeatDate: | |
(_ = o.lastSentHeartbeatDate) !== null && _ !== void 0 | |
? _ | |
: et.lastSentHeartbeatDate, | |
heartbeats: o.heartbeats, | |
}); | |
} else return; | |
} | |
async add(o) { | |
var _; | |
if (await this._canUseIndexedDBPromise) { | |
const et = await this.read(); | |
return writeHeartbeatsToIndexedDB(this.app, { | |
lastSentHeartbeatDate: | |
(_ = o.lastSentHeartbeatDate) !== null && _ !== void 0 | |
? _ | |
: et.lastSentHeartbeatDate, | |
heartbeats: [...et.heartbeats, ...o.heartbeats], | |
}); | |
} else return; | |
} | |
} | |
function countBytes(s) { | |
return base64urlEncodeWithoutPadding( | |
JSON.stringify({ version: 2, heartbeats: s }), | |
).length; | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ function registerCoreComponents(s) { | |
_registerComponent( | |
new Component( | |
"platform-logger", | |
(o) => new PlatformLoggerServiceImpl(o), | |
"PRIVATE", | |
), | |
), | |
_registerComponent( | |
new Component( | |
"heartbeat", | |
(o) => new HeartbeatServiceImpl(o), | |
"PRIVATE", | |
), | |
), | |
registerVersion(name$o, version$1$1, s), | |
registerVersion(name$o, version$1$1, "esm2017"), | |
registerVersion("fire-js", ""); | |
} | |
registerCoreComponents(""); | |
var name$5 = "firebase", | |
version$4 = "9.23.0"; | |
/** | |
* @license | |
* Copyright 2020 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ registerVersion(name$5, version$4, "app"); | |
const instanceOfAny = (s, o) => o.some((_) => s instanceof _); | |
let idbProxyableTypes, cursorAdvanceMethods; | |
function getIdbProxyableTypes() { | |
return ( | |
idbProxyableTypes || | |
(idbProxyableTypes = [ | |
IDBDatabase, | |
IDBObjectStore, | |
IDBIndex, | |
IDBCursor, | |
IDBTransaction, | |
]) | |
); | |
} | |
function getCursorAdvanceMethods() { | |
return ( | |
cursorAdvanceMethods || | |
(cursorAdvanceMethods = [ | |
IDBCursor.prototype.advance, | |
IDBCursor.prototype.continue, | |
IDBCursor.prototype.continuePrimaryKey, | |
]) | |
); | |
} | |
const cursorRequestMap = new WeakMap(), | |
transactionDoneMap = new WeakMap(), | |
transactionStoreNamesMap = new WeakMap(), | |
transformCache = new WeakMap(), | |
reverseTransformCache = new WeakMap(); | |
function promisifyRequest(s) { | |
const o = new Promise((_, _e) => { | |
const et = () => { | |
s.removeEventListener("success", tt), | |
s.removeEventListener("error", rt); | |
}, | |
tt = () => { | |
_(wrap$8(s.result)), et(); | |
}, | |
rt = () => { | |
_e(s.error), et(); | |
}; | |
s.addEventListener("success", tt), s.addEventListener("error", rt); | |
}); | |
return ( | |
o | |
.then((_) => { | |
_ instanceof IDBCursor && cursorRequestMap.set(_, s); | |
}) | |
.catch(() => {}), | |
reverseTransformCache.set(o, s), | |
o | |
); | |
} | |
function cacheDonePromiseForTransaction(s) { | |
if (transactionDoneMap.has(s)) return; | |
const o = new Promise((_, _e) => { | |
const et = () => { | |
s.removeEventListener("complete", tt), | |
s.removeEventListener("error", rt), | |
s.removeEventListener("abort", rt); | |
}, | |
tt = () => { | |
_(), et(); | |
}, | |
rt = () => { | |
_e(s.error || new DOMException("AbortError", "AbortError")), et(); | |
}; | |
s.addEventListener("complete", tt), | |
s.addEventListener("error", rt), | |
s.addEventListener("abort", rt); | |
}); | |
transactionDoneMap.set(s, o); | |
} | |
let idbProxyTraps = { | |
get(s, o, _) { | |
if (s instanceof IDBTransaction) { | |
if (o === "done") return transactionDoneMap.get(s); | |
if (o === "objectStoreNames") | |
return s.objectStoreNames || transactionStoreNamesMap.get(s); | |
if (o === "store") | |
return _.objectStoreNames[1] | |
? void 0 | |
: _.objectStore(_.objectStoreNames[0]); | |
} | |
return wrap$8(s[o]); | |
}, | |
set(s, o, _) { | |
return (s[o] = _), !0; | |
}, | |
has(s, o) { | |
return s instanceof IDBTransaction && (o === "done" || o === "store") | |
? !0 | |
: o in s; | |
}, | |
}; | |
function replaceTraps(s) { | |
idbProxyTraps = s(idbProxyTraps); | |
} | |
function wrapFunction(s) { | |
return s === IDBDatabase.prototype.transaction && | |
!("objectStoreNames" in IDBTransaction.prototype) | |
? function (o, ..._) { | |
const _e = s.call(unwrap(this), o, ..._); | |
return ( | |
transactionStoreNamesMap.set(_e, o.sort ? o.sort() : [o]), | |
wrap$8(_e) | |
); | |
} | |
: getCursorAdvanceMethods().includes(s) | |
? function (...o) { | |
return s.apply(unwrap(this), o), wrap$8(cursorRequestMap.get(this)); | |
} | |
: function (...o) { | |
return wrap$8(s.apply(unwrap(this), o)); | |
}; | |
} | |
function transformCachableValue(s) { | |
return typeof s == "function" | |
? wrapFunction(s) | |
: (s instanceof IDBTransaction && cacheDonePromiseForTransaction(s), | |
instanceOfAny(s, getIdbProxyableTypes()) | |
? new Proxy(s, idbProxyTraps) | |
: s); | |
} | |
function wrap$8(s) { | |
if (s instanceof IDBRequest) return promisifyRequest(s); | |
if (transformCache.has(s)) return transformCache.get(s); | |
const o = transformCachableValue(s); | |
return ( | |
o !== s && (transformCache.set(s, o), reverseTransformCache.set(o, s)), o | |
); | |
} | |
const unwrap = (s) => reverseTransformCache.get(s); | |
function openDB( | |
s, | |
o, | |
{ blocked: _, upgrade: _e, blocking: et, terminated: tt } = {}, | |
) { | |
const rt = indexedDB.open(s, o), | |
it = wrap$8(rt); | |
return ( | |
_e && | |
rt.addEventListener("upgradeneeded", (ot) => { | |
_e( | |
wrap$8(rt.result), | |
ot.oldVersion, | |
ot.newVersion, | |
wrap$8(rt.transaction), | |
); | |
}), | |
_ && rt.addEventListener("blocked", () => _()), | |
it | |
.then((ot) => { | |
tt && ot.addEventListener("close", () => tt()), | |
et && ot.addEventListener("versionchange", () => et()); | |
}) | |
.catch(() => {}), | |
it | |
); | |
} | |
const readMethods = ["get", "getKey", "getAll", "getAllKeys", "count"], | |
writeMethods = ["put", "add", "delete", "clear"], | |
cachedMethods = new Map(); | |
function getMethod(s, o) { | |
if (!(s instanceof IDBDatabase && !(o in s) && typeof o == "string")) | |
return; | |
if (cachedMethods.get(o)) return cachedMethods.get(o); | |
const _ = o.replace(/FromIndex$/, ""), | |
_e = o !== _, | |
et = writeMethods.includes(_); | |
if ( | |
!(_ in (_e ? IDBIndex : IDBObjectStore).prototype) || | |
!(et || readMethods.includes(_)) | |
) | |
return; | |
const tt = async function (rt, ...it) { | |
const ot = this.transaction(rt, et ? "readwrite" : "readonly"); | |
let ct = ot.store; | |
return ( | |
_e && (ct = ct.index(it.shift())), | |
(await Promise.all([ct[_](...it), et && ot.done]))[0] | |
); | |
}; | |
return cachedMethods.set(o, tt), tt; | |
} | |
replaceTraps((s) => ({ | |
...s, | |
get: (o, _, _e) => getMethod(o, _) || s.get(o, _, _e), | |
has: (o, _) => !!getMethod(o, _) || s.has(o, _), | |
})); | |
const name$4 = "@firebase/installations", | |
version$3 = "0.6.4"; | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const PENDING_TIMEOUT_MS = 1e4, | |
PACKAGE_VERSION = `w:${version$3}`, | |
INTERNAL_AUTH_VERSION = "FIS_v2", | |
INSTALLATIONS_API_URL = "https://firebaseinstallations.googleapis.com/v1", | |
TOKEN_EXPIRATION_BUFFER = 60 * 60 * 1e3, | |
SERVICE = "installations", | |
SERVICE_NAME = "Installations"; | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const ERROR_DESCRIPTION_MAP = { | |
"missing-app-config-values": | |
'Missing App configuration value: "{$valueName}"', | |
"not-registered": "Firebase Installation is not registered.", | |
"installation-not-found": "Firebase Installation not found.", | |
"request-failed": | |
'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"', | |
"app-offline": "Could not process request. Application offline.", | |
"delete-pending-registration": | |
"Can't delete installation while there is a pending registration request.", | |
}, | |
ERROR_FACTORY$1 = new ErrorFactory( | |
SERVICE, | |
SERVICE_NAME, | |
ERROR_DESCRIPTION_MAP, | |
); | |
function isServerError(s) { | |
return s instanceof FirebaseError && s.code.includes("request-failed"); | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ function getInstallationsEndpoint({ projectId: s }) { | |
return `${INSTALLATIONS_API_URL}/projects/${s}/installations`; | |
} | |
function extractAuthTokenInfoFromResponse(s) { | |
return { | |
token: s.token, | |
requestStatus: 2, | |
expiresIn: getExpiresInFromResponseExpiresIn(s.expiresIn), | |
creationTime: Date.now(), | |
}; | |
} | |
async function getErrorFromResponse(s, o) { | |
const _e = (await o.json()).error; | |
return ERROR_FACTORY$1.create("request-failed", { | |
requestName: s, | |
serverCode: _e.code, | |
serverMessage: _e.message, | |
serverStatus: _e.status, | |
}); | |
} | |
function getHeaders$1({ apiKey: s }) { | |
return new Headers({ | |
"Content-Type": "application/json", | |
Accept: "application/json", | |
"x-goog-api-key": s, | |
}); | |
} | |
function getHeadersWithAuth(s, { refreshToken: o }) { | |
const _ = getHeaders$1(s); | |
return _.append("Authorization", getAuthorizationHeader(o)), _; | |
} | |
async function retryIfServerError(s) { | |
const o = await s(); | |
return o.status >= 500 && o.status < 600 ? s() : o; | |
} | |
function getExpiresInFromResponseExpiresIn(s) { | |
return Number(s.replace("s", "000")); | |
} | |
function getAuthorizationHeader(s) { | |
return `${INTERNAL_AUTH_VERSION} ${s}`; | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ async function createInstallationRequest( | |
{ appConfig: s, heartbeatServiceProvider: o }, | |
{ fid: _ }, | |
) { | |
const _e = getInstallationsEndpoint(s), | |
et = getHeaders$1(s), | |
tt = o.getImmediate({ optional: !0 }); | |
if (tt) { | |
const ct = await tt.getHeartbeatsHeader(); | |
ct && et.append("x-firebase-client", ct); | |
} | |
const rt = { | |
fid: _, | |
authVersion: INTERNAL_AUTH_VERSION, | |
appId: s.appId, | |
sdkVersion: PACKAGE_VERSION, | |
}, | |
it = { method: "POST", headers: et, body: JSON.stringify(rt) }, | |
ot = await retryIfServerError(() => fetch(_e, it)); | |
if (ot.ok) { | |
const ct = await ot.json(); | |
return { | |
fid: ct.fid || _, | |
registrationStatus: 2, | |
refreshToken: ct.refreshToken, | |
authToken: extractAuthTokenInfoFromResponse(ct.authToken), | |
}; | |
} else throw await getErrorFromResponse("Create Installation", ot); | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ function sleep(s) { | |
return new Promise((o) => { | |
setTimeout(o, s); | |
}); | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ function bufferToBase64UrlSafe(s) { | |
return btoa(String.fromCharCode(...s)) | |
.replace(/\+/g, "-") | |
.replace(/\//g, "_"); | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const VALID_FID_PATTERN = /^[cdef][\w-]{21}$/, | |
INVALID_FID = ""; | |
function generateFid() { | |
try { | |
const s = new Uint8Array(17); | |
(self.crypto || self.msCrypto).getRandomValues(s), | |
(s[0] = 112 + (s[0] % 16)); | |
const _ = encode$3(s); | |
return VALID_FID_PATTERN.test(_) ? _ : INVALID_FID; | |
} catch { | |
return INVALID_FID; | |
} | |
} | |
function encode$3(s) { | |
return bufferToBase64UrlSafe(s).substr(0, 22); | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ function getKey(s) { | |
return `${s.appName}!${s.appId}`; | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const fidChangeCallbacks = new Map(); | |
function fidChanged(s, o) { | |
const _ = getKey(s); | |
callFidChangeCallbacks(_, o), broadcastFidChange(_, o); | |
} | |
function callFidChangeCallbacks(s, o) { | |
const _ = fidChangeCallbacks.get(s); | |
if (_) for (const _e of _) _e(o); | |
} | |
function broadcastFidChange(s, o) { | |
const _ = getBroadcastChannel(); | |
_ && _.postMessage({ key: s, fid: o }), closeBroadcastChannel(); | |
} | |
let broadcastChannel = null; | |
function getBroadcastChannel() { | |
return ( | |
!broadcastChannel && | |
"BroadcastChannel" in self && | |
((broadcastChannel = new BroadcastChannel("[Firebase] FID Change")), | |
(broadcastChannel.onmessage = (s) => { | |
callFidChangeCallbacks(s.data.key, s.data.fid); | |
})), | |
broadcastChannel | |
); | |
} | |
function closeBroadcastChannel() { | |
fidChangeCallbacks.size === 0 && | |
broadcastChannel && | |
(broadcastChannel.close(), (broadcastChannel = null)); | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const DATABASE_NAME = "firebase-installations-database", | |
DATABASE_VERSION = 1, | |
OBJECT_STORE_NAME = "firebase-installations-store"; | |
let dbPromise = null; | |
function getDbPromise() { | |
return ( | |
dbPromise || | |
(dbPromise = openDB(DATABASE_NAME, DATABASE_VERSION, { | |
upgrade: (s, o) => { | |
switch (o) { | |
case 0: | |
s.createObjectStore(OBJECT_STORE_NAME); | |
} | |
}, | |
})), | |
dbPromise | |
); | |
} | |
async function set$2(s, o) { | |
const _ = getKey(s), | |
et = (await getDbPromise()).transaction(OBJECT_STORE_NAME, "readwrite"), | |
tt = et.objectStore(OBJECT_STORE_NAME), | |
rt = await tt.get(_); | |
return ( | |
await tt.put(o, _), | |
await et.done, | |
(!rt || rt.fid !== o.fid) && fidChanged(s, o.fid), | |
o | |
); | |
} | |
async function remove$1(s) { | |
const o = getKey(s), | |
_e = (await getDbPromise()).transaction(OBJECT_STORE_NAME, "readwrite"); | |
await _e.objectStore(OBJECT_STORE_NAME).delete(o), await _e.done; | |
} | |
async function update(s, o) { | |
const _ = getKey(s), | |
et = (await getDbPromise()).transaction(OBJECT_STORE_NAME, "readwrite"), | |
tt = et.objectStore(OBJECT_STORE_NAME), | |
rt = await tt.get(_), | |
it = o(rt); | |
return ( | |
it === void 0 ? await tt.delete(_) : await tt.put(it, _), | |
await et.done, | |
it && (!rt || rt.fid !== it.fid) && fidChanged(s, it.fid), | |
it | |
); | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ async function getInstallationEntry(s) { | |
let o; | |
const _ = await update(s.appConfig, (_e) => { | |
const et = updateOrCreateInstallationEntry(_e), | |
tt = triggerRegistrationIfNecessary(s, et); | |
return (o = tt.registrationPromise), tt.installationEntry; | |
}); | |
return _.fid === INVALID_FID | |
? { installationEntry: await o } | |
: { installationEntry: _, registrationPromise: o }; | |
} | |
function updateOrCreateInstallationEntry(s) { | |
const o = s || { fid: generateFid(), registrationStatus: 0 }; | |
return clearTimedOutRequest(o); | |
} | |
function triggerRegistrationIfNecessary(s, o) { | |
if (o.registrationStatus === 0) { | |
if (!navigator.onLine) { | |
const et = Promise.reject(ERROR_FACTORY$1.create("app-offline")); | |
return { installationEntry: o, registrationPromise: et }; | |
} | |
const _ = { | |
fid: o.fid, | |
registrationStatus: 1, | |
registrationTime: Date.now(), | |
}, | |
_e = registerInstallation(s, _); | |
return { installationEntry: _, registrationPromise: _e }; | |
} else | |
return o.registrationStatus === 1 | |
? { | |
installationEntry: o, | |
registrationPromise: waitUntilFidRegistration(s), | |
} | |
: { installationEntry: o }; | |
} | |
async function registerInstallation(s, o) { | |
try { | |
const _ = await createInstallationRequest(s, o); | |
return set$2(s.appConfig, _); | |
} catch (_) { | |
throw ( | |
(isServerError(_) && _.customData.serverCode === 409 | |
? await remove$1(s.appConfig) | |
: await set$2(s.appConfig, { fid: o.fid, registrationStatus: 0 }), | |
_) | |
); | |
} | |
} | |
async function waitUntilFidRegistration(s) { | |
let o = await updateInstallationRequest(s.appConfig); | |
for (; o.registrationStatus === 1; ) | |
await sleep(100), (o = await updateInstallationRequest(s.appConfig)); | |
if (o.registrationStatus === 0) { | |
const { installationEntry: _, registrationPromise: _e } = | |
await getInstallationEntry(s); | |
return _e || _; | |
} | |
return o; | |
} | |
function updateInstallationRequest(s) { | |
return update(s, (o) => { | |
if (!o) throw ERROR_FACTORY$1.create("installation-not-found"); | |
return clearTimedOutRequest(o); | |
}); | |
} | |
function clearTimedOutRequest(s) { | |
return hasInstallationRequestTimedOut(s) | |
? { fid: s.fid, registrationStatus: 0 } | |
: s; | |
} | |
function hasInstallationRequestTimedOut(s) { | |
return ( | |
s.registrationStatus === 1 && | |
s.registrationTime + PENDING_TIMEOUT_MS < Date.now() | |
); | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ async function generateAuthTokenRequest( | |
{ appConfig: s, heartbeatServiceProvider: o }, | |
_, | |
) { | |
const _e = getGenerateAuthTokenEndpoint(s, _), | |
et = getHeadersWithAuth(s, _), | |
tt = o.getImmediate({ optional: !0 }); | |
if (tt) { | |
const ct = await tt.getHeartbeatsHeader(); | |
ct && et.append("x-firebase-client", ct); | |
} | |
const rt = { | |
installation: { sdkVersion: PACKAGE_VERSION, appId: s.appId }, | |
}, | |
it = { method: "POST", headers: et, body: JSON.stringify(rt) }, | |
ot = await retryIfServerError(() => fetch(_e, it)); | |
if (ot.ok) { | |
const ct = await ot.json(); | |
return extractAuthTokenInfoFromResponse(ct); | |
} else throw await getErrorFromResponse("Generate Auth Token", ot); | |
} | |
function getGenerateAuthTokenEndpoint(s, { fid: o }) { | |
return `${getInstallationsEndpoint(s)}/${o}/authTokens:generate`; | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ async function refreshAuthToken(s, o = !1) { | |
let _; | |
const _e = await update(s.appConfig, (tt) => { | |
if (!isEntryRegistered(tt)) | |
throw ERROR_FACTORY$1.create("not-registered"); | |
const rt = tt.authToken; | |
if (!o && isAuthTokenValid(rt)) return tt; | |
if (rt.requestStatus === 1) | |
return (_ = waitUntilAuthTokenRequest(s, o)), tt; | |
{ | |
if (!navigator.onLine) throw ERROR_FACTORY$1.create("app-offline"); | |
const it = makeAuthTokenRequestInProgressEntry(tt); | |
return (_ = fetchAuthTokenFromServer(s, it)), it; | |
} | |
}); | |
return _ ? await _ : _e.authToken; | |
} | |
async function waitUntilAuthTokenRequest(s, o) { | |
let _ = await updateAuthTokenRequest(s.appConfig); | |
for (; _.authToken.requestStatus === 1; ) | |
await sleep(100), (_ = await updateAuthTokenRequest(s.appConfig)); | |
const _e = _.authToken; | |
return _e.requestStatus === 0 ? refreshAuthToken(s, o) : _e; | |
} | |
function updateAuthTokenRequest(s) { | |
return update(s, (o) => { | |
if (!isEntryRegistered(o)) throw ERROR_FACTORY$1.create("not-registered"); | |
const _ = o.authToken; | |
return hasAuthTokenRequestTimedOut(_) | |
? Object.assign(Object.assign({}, o), { | |
authToken: { requestStatus: 0 }, | |
}) | |
: o; | |
}); | |
} | |
async function fetchAuthTokenFromServer(s, o) { | |
try { | |
const _ = await generateAuthTokenRequest(s, o), | |
_e = Object.assign(Object.assign({}, o), { authToken: _ }); | |
return await set$2(s.appConfig, _e), _; | |
} catch (_) { | |
if ( | |
isServerError(_) && | |
(_.customData.serverCode === 401 || _.customData.serverCode === 404) | |
) | |
await remove$1(s.appConfig); | |
else { | |
const _e = Object.assign(Object.assign({}, o), { | |
authToken: { requestStatus: 0 }, | |
}); | |
await set$2(s.appConfig, _e); | |
} | |
throw _; | |
} | |
} | |
function isEntryRegistered(s) { | |
return s !== void 0 && s.registrationStatus === 2; | |
} | |
function isAuthTokenValid(s) { | |
return s.requestStatus === 2 && !isAuthTokenExpired(s); | |
} | |
function isAuthTokenExpired(s) { | |
const o = Date.now(); | |
return ( | |
o < s.creationTime || | |
s.creationTime + s.expiresIn < o + TOKEN_EXPIRATION_BUFFER | |
); | |
} | |
function makeAuthTokenRequestInProgressEntry(s) { | |
const o = { requestStatus: 1, requestTime: Date.now() }; | |
return Object.assign(Object.assign({}, s), { authToken: o }); | |
} | |
function hasAuthTokenRequestTimedOut(s) { | |
return ( | |
s.requestStatus === 1 && s.requestTime + PENDING_TIMEOUT_MS < Date.now() | |
); | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ async function getId(s) { | |
const o = s, | |
{ installationEntry: _, registrationPromise: _e } = | |
await getInstallationEntry(o); | |
return ( | |
_e ? _e.catch(console.error) : refreshAuthToken(o).catch(console.error), | |
_.fid | |
); | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ async function getToken(s, o = !1) { | |
const _ = s; | |
return ( | |
await completeInstallationRegistration(_), | |
(await refreshAuthToken(_, o)).token | |
); | |
} | |
async function completeInstallationRegistration(s) { | |
const { registrationPromise: o } = await getInstallationEntry(s); | |
o && (await o); | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ function extractAppConfig(s) { | |
if (!s || !s.options) throw getMissingValueError("App Configuration"); | |
if (!s.name) throw getMissingValueError("App Name"); | |
const o = ["projectId", "apiKey", "appId"]; | |
for (const _ of o) if (!s.options[_]) throw getMissingValueError(_); | |
return { | |
appName: s.name, | |
projectId: s.options.projectId, | |
apiKey: s.options.apiKey, | |
appId: s.options.appId, | |
}; | |
} | |
function getMissingValueError(s) { | |
return ERROR_FACTORY$1.create("missing-app-config-values", { | |
valueName: s, | |
}); | |
} | |
/** | |
* @license | |
* Copyright 2020 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const INSTALLATIONS_NAME = "installations", | |
INSTALLATIONS_NAME_INTERNAL = "installations-internal", | |
publicFactory = (s) => { | |
const o = s.getProvider("app").getImmediate(), | |
_ = extractAppConfig(o), | |
_e = _getProvider(o, "heartbeat"); | |
return { | |
app: o, | |
appConfig: _, | |
heartbeatServiceProvider: _e, | |
_delete: () => Promise.resolve(), | |
}; | |
}, | |
internalFactory = (s) => { | |
const o = s.getProvider("app").getImmediate(), | |
_ = _getProvider(o, INSTALLATIONS_NAME).getImmediate(); | |
return { getId: () => getId(_), getToken: (et) => getToken(_, et) }; | |
}; | |
function registerInstallations() { | |
_registerComponent( | |
new Component(INSTALLATIONS_NAME, publicFactory, "PUBLIC"), | |
), | |
_registerComponent( | |
new Component(INSTALLATIONS_NAME_INTERNAL, internalFactory, "PRIVATE"), | |
); | |
} | |
registerInstallations(); | |
registerVersion(name$4, version$3); | |
registerVersion(name$4, version$3, "esm2017"); | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const ANALYTICS_TYPE = "analytics", | |
GA_FID_KEY = "firebase_id", | |
ORIGIN_KEY = "origin", | |
FETCH_TIMEOUT_MILLIS = 60 * 1e3, | |
DYNAMIC_CONFIG_URL = | |
"https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig", | |
GTAG_URL = "https://www.googletagmanager.com/gtag/js"; | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const logger = new Logger("@firebase/analytics"); | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const ERRORS = { | |
"already-exists": | |
"A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.", | |
"already-initialized": | |
"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-intialized instance.", | |
"already-initialized-settings": | |
"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.", | |
"interop-component-reg-failed": | |
"Firebase Analytics Interop Component failed to instantiate: {$reason}", | |
"invalid-analytics-context": | |
"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}", | |
"indexeddb-unavailable": | |
"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}", | |
"fetch-throttle": | |
"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.", | |
"config-fetch-failed": | |
"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}", | |
"no-api-key": | |
'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.', | |
"no-app-id": | |
'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.', | |
"no-client-id": 'The "client_id" field is empty.', | |
"invalid-gtag-resource": | |
"Trusted Types detected an invalid gtag resource: {$gtagURL}.", | |
}, | |
ERROR_FACTORY = new ErrorFactory("analytics", "Analytics", ERRORS); | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ function createGtagTrustedTypesScriptURL(s) { | |
if (!s.startsWith(GTAG_URL)) { | |
const o = ERROR_FACTORY.create("invalid-gtag-resource", { gtagURL: s }); | |
return logger.warn(o.message), ""; | |
} | |
return s; | |
} | |
function promiseAllSettled(s) { | |
return Promise.all(s.map((o) => o.catch((_) => _))); | |
} | |
function createTrustedTypesPolicy(s, o) { | |
let _; | |
return ( | |
window.trustedTypes && (_ = window.trustedTypes.createPolicy(s, o)), _ | |
); | |
} | |
function insertScriptTag(s, o) { | |
const _ = createTrustedTypesPolicy("firebase-js-sdk-policy", { | |
createScriptURL: createGtagTrustedTypesScriptURL, | |
}), | |
_e = document.createElement("script"), | |
et = `${GTAG_URL}?l=${s}&id=${o}`; | |
(_e.src = _ ? (_ == null ? void 0 : _.createScriptURL(et)) : et), | |
(_e.async = !0), | |
document.head.appendChild(_e); | |
} | |
function getOrCreateDataLayer(s) { | |
let o = []; | |
return Array.isArray(window[s]) ? (o = window[s]) : (window[s] = o), o; | |
} | |
async function gtagOnConfig(s, o, _, _e, et, tt) { | |
const rt = _e[et]; | |
try { | |
if (rt) await o[rt]; | |
else { | |
const ot = (await promiseAllSettled(_)).find( | |
(ct) => ct.measurementId === et, | |
); | |
ot && (await o[ot.appId]); | |
} | |
} catch (it) { | |
logger.error(it); | |
} | |
s("config", et, tt); | |
} | |
async function gtagOnEvent(s, o, _, _e, et) { | |
try { | |
let tt = []; | |
if (et && et.send_to) { | |
let rt = et.send_to; | |
Array.isArray(rt) || (rt = [rt]); | |
const it = await promiseAllSettled(_); | |
for (const ot of rt) { | |
const ct = it.find((ht) => ht.measurementId === ot), | |
at = ct && o[ct.appId]; | |
if (at) tt.push(at); | |
else { | |
tt = []; | |
break; | |
} | |
} | |
} | |
tt.length === 0 && (tt = Object.values(o)), | |
await Promise.all(tt), | |
s("event", _e, et || {}); | |
} catch (tt) { | |
logger.error(tt); | |
} | |
} | |
function wrapGtag(s, o, _, _e) { | |
async function et(tt, ...rt) { | |
try { | |
if (tt === "event") { | |
const [it, ot] = rt; | |
await gtagOnEvent(s, o, _, it, ot); | |
} else if (tt === "config") { | |
const [it, ot] = rt; | |
await gtagOnConfig(s, o, _, _e, it, ot); | |
} else if (tt === "consent") { | |
const [it] = rt; | |
s("consent", "update", it); | |
} else if (tt === "get") { | |
const [it, ot, ct] = rt; | |
s("get", it, ot, ct); | |
} else if (tt === "set") { | |
const [it] = rt; | |
s("set", it); | |
} else s(tt, ...rt); | |
} catch (it) { | |
logger.error(it); | |
} | |
} | |
return et; | |
} | |
function wrapOrCreateGtag(s, o, _, _e, et) { | |
let tt = function (...rt) { | |
window[_e].push(arguments); | |
}; | |
return ( | |
window[et] && typeof window[et] == "function" && (tt = window[et]), | |
(window[et] = wrapGtag(tt, s, o, _)), | |
{ gtagCore: tt, wrappedGtag: window[et] } | |
); | |
} | |
function findGtagScriptOnPage(s) { | |
const o = window.document.getElementsByTagName("script"); | |
for (const _ of Object.values(o)) | |
if (_.src && _.src.includes(GTAG_URL) && _.src.includes(s)) return _; | |
return null; | |
} | |
/** | |
* @license | |
* Copyright 2020 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ const LONG_RETRY_FACTOR = 30, | |
BASE_INTERVAL_MILLIS = 1e3; | |
class RetryData { | |
constructor(o = {}, _ = BASE_INTERVAL_MILLIS) { | |
(this.throttleMetadata = o), (this.intervalMillis = _); | |
} | |
getThrottleMetadata(o) { | |
return this.throttleMetadata[o]; | |
} | |
setThrottleMetadata(o, _) { | |
this.throttleMetadata[o] = _; | |
} | |
deleteThrottleMetadata(o) { | |
delete this.throttleMetadata[o]; | |
} | |
} | |
const defaultRetryData = new RetryData(); | |
function getHeaders(s) { | |
return new Headers({ Accept: "application/json", "x-goog-api-key": s }); | |
} | |
async function fetchDynamicConfig(s) { | |
var o; | |
const { appId: _, apiKey: _e } = s, | |
et = { method: "GET", headers: getHeaders(_e) }, | |
tt = DYNAMIC_CONFIG_URL.replace("{app-id}", _), | |
rt = await fetch(tt, et); | |
if (rt.status !== 200 && rt.status !== 304) { | |
let it = ""; | |
try { | |
const ot = await rt.json(); | |
!((o = ot.error) === null || o === void 0) && | |
o.message && | |
(it = ot.error.message); | |
} catch {} | |
throw ERROR_FACTORY.create("config-fetch-failed", { | |
httpStatus: rt.status, | |
responseMessage: it, | |
}); | |
} | |
return rt.json(); | |
} | |
async function fetchDynamicConfigWithRetry(s, o = defaultRetryData, _) { | |
const { appId: _e, apiKey: et, measurementId: tt } = s.options; | |
if (!_e) throw ERROR_FACTORY.create("no-app-id"); | |
if (!et) { | |
if (tt) return { measurementId: tt, appId: _e }; | |
throw ERROR_FACTORY.create("no-api-key"); | |
} | |
const rt = o.getThrottleMetadata(_e) || { | |
backoffCount: 0, | |
throttleEndTimeMillis: Date.now(), | |
}, | |
it = new AnalyticsAbortSignal(); | |
return ( | |
setTimeout( | |
async () => { | |
it.abort(); | |
}, | |
_ !== void 0 ? _ : FETCH_TIMEOUT_MILLIS, | |
), | |
attemptFetchDynamicConfigWithRetry( | |
{ appId: _e, apiKey: et, measurementId: tt }, | |
rt, | |
it, | |
o, | |
) | |
); | |
} | |
async function attemptFetchDynamicConfigWithRetry( | |
s, | |
{ throttleEndTimeMillis: o, backoffCount: _ }, | |
_e, | |
et = defaultRetryData, | |
) { | |
var tt; | |
const { appId: rt, measurementId: it } = s; | |
try { | |
await setAbortableTimeout(_e, o); | |
} catch (ot) { | |
if (it) | |
return ( | |
logger.warn( | |
`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${it} provided in the "measurementId" field in the local Firebase config. [${ot == null ? void 0 : ot.message}]`, | |
), | |
{ appId: rt, measurementId: it } | |
); | |
throw ot; | |
} | |
try { | |
const ot = await fetchDynamicConfig(s); | |
return et.deleteThrottleMetadata(rt), ot; | |
} catch (ot) { | |
const ct = ot; | |
if (!isRetriableError(ct)) { | |
if ((et.deleteThrottleMetadata(rt), it)) | |
return ( | |
logger.warn( | |
`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${it} provided in the "measurementId" field in the local Firebase config. [${ct == null ? void 0 : ct.message}]`, | |
), | |
{ appId: rt, measurementId: it } | |
); | |
throw ot; | |
} | |
const at = | |
Number( | |
(tt = ct == null ? void 0 : ct.customData) === null || tt === void 0 | |
? void 0 | |
: tt.httpStatus, | |
) === 503 | |
? calculateBackoffMillis(_, et.intervalMillis, LONG_RETRY_FACTOR) | |
: calculateBackoffMillis(_, et.intervalMillis), | |
ht = { throttleEndTimeMillis: Date.now() + at, backoffCount: _ + 1 }; | |
return ( | |
et.setThrottleMetadata(rt, ht), | |
logger.debug(`Calling attemptFetch again in ${at} millis`), | |
attemptFetchDynamicConfigWithRetry(s, ht, _e, et) | |
); | |
} | |
} | |
function setAbortableTimeout(s, o) { | |
return new Promise((_, _e) => { | |
const et = Math.max(o - Date.now(), 0), | |
tt = setTimeout(_, et); | |
s.addEventListener(() => { | |
clearTimeout(tt), | |
_e( | |
ERROR_FACTORY.create("fetch-throttle", { | |
throttleEndTimeMillis: o, | |
}), | |
); | |
}); | |
}); | |
} | |
function isRetriableError(s) { | |
if (!(s instanceof FirebaseError) || !s.customData) return !1; | |
const o = Number(s.customData.httpStatus); | |
return o === 429 || o === 500 || o === 503 || o === 504; | |
} | |
class AnalyticsAbortSignal { | |
constructor() { | |
this.listeners = []; | |
} | |
addEventListener(o) { | |
this.listeners.push(o); | |
} | |
abort() { | |
this.listeners.forEach((o) => o()); | |
} | |
} | |
async function logEvent$1(s, o, _, _e, et) { | |
if (et && et.global) { | |
s("event", _, _e); | |
return; | |
} else { | |
const tt = await o, | |
rt = Object.assign(Object.assign({}, _e), { send_to: tt }); | |
s("event", _, rt); | |
} | |
} | |
/** | |
* @license | |
* Copyright 2020 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ async function validateIndexedDB() { | |
if (isIndexedDBAvailable()) | |
try { | |
await validateIndexedDBOpenable(); | |
} catch (s) { | |
return ( | |
logger.warn( | |
ERROR_FACTORY.create("indexeddb-unavailable", { | |
errorInfo: s == null ? void 0 : s.toString(), | |
}).message, | |
), | |
!1 | |
); | |
} | |
else | |
return ( | |
logger.warn( | |
ERROR_FACTORY.create("indexeddb-unavailable", { | |
errorInfo: "IndexedDB is not available in this environment.", | |
}).message, | |
), | |
!1 | |
); | |
return !0; | |
} | |
async function _initializeAnalytics(s, o, _, _e, et, tt, rt) { | |
var it; | |
const ot = fetchDynamicConfigWithRetry(s); | |
ot | |
.then((vt) => { | |
(_[vt.measurementId] = vt.appId), | |
s.options.measurementId && | |
vt.measurementId !== s.options.measurementId && | |
logger.warn( | |
`The measurement ID in the local Firebase config (${s.options.measurementId}) does not match the measurement ID fetched from the server (${vt.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`, | |
); | |
}) | |
.catch((vt) => logger.error(vt)), | |
o.push(ot); | |
const ct = validateIndexedDB().then((vt) => { | |
if (vt) return _e.getId(); | |
}), | |
[at, ht] = await Promise.all([ot, ct]); | |
findGtagScriptOnPage(tt) || insertScriptTag(tt, at.measurementId), | |
et("js", new Date()); | |
const mt = | |
(it = rt == null ? void 0 : rt.config) !== null && it !== void 0 | |
? it | |
: {}; | |
return ( | |
(mt[ORIGIN_KEY] = "firebase"), | |
(mt.update = !0), | |
ht != null && (mt[GA_FID_KEY] = ht), | |
et("config", at.measurementId, mt), | |
at.measurementId | |
); | |
} | |
/** | |
* @license | |
* Copyright 2019 Google LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ class AnalyticsService { | |
constructor(o) { | |
this.app = o; | |
} | |
_delete() { | |
return ( | |
delete initializationPromisesMap[this.app.options.appId], | |
Promise.resolve() | |
); | |
} | |
} | |
let initializationPromisesMap = {}, | |
dynamicConfigPromisesList = []; | |
const measurementIdToAppId = {}; | |
let dataLayerName = "dataLayer", | |
gtagName = "gtag", | |
gtagCoreFunction, | |
wrappedGtagFunction, | |
globalInitDone = !1; | |
function warnOnBrowserContextMismatch() { | |
const s = []; | |
if ( | |
(isBrowserExtension() && | |
s.push("This is a browser extension environment."), | |
areCookiesEnabled() || s.push("Cookies are not available."), | |
s.length > 0) | |
) { | |
const o = s.map((_e, et) => `(${et + 1}) ${_e}`).join(" "), | |
_ = ERROR_FACTORY.create("invalid-analytics-context", { errorInfo: o }); | |
logger.warn(_.message); | |
} | |
} | |
function factory$2(s, o, _) { | |
warnOnBrowserContextMismatch(); | |
const _e = s.options.appId; | |
if (!_e) throw ERROR_FACTORY.create("no-app-id"); | |
if (!s.options.apiKey) | |
if (s.options.measurementId) | |
logger.warn( | |
`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${s.options.measurementId} provided in the "measurementId" field in the local Firebase config.`, | |
); | |
else throw ERROR_FACTORY.create("no-api-key"); | |
if (initializationPromisesMap[_e] != null) | |
throw ERROR_FACTORY.create("already-exists", { id: _e }); | |
if (!globalInitDone) { | |
getOrCreateDataLayer(dataLayerName); | |
const { wrappedGtag: tt, gtagCore: rt } = wrapOrCreateGtag( | |
initializationPromisesMap, | |
dynamicConfigPromisesList, | |
measurementIdToAppId, | |
dataLayerName, | |
gtagName, | |
); | |
(wrappedGtagFunction = tt), | |
(gtagCoreFunction = rt), | |
(globalInitDone = !0); | |
} | |
return ( | |
(initializationPromisesMap[_e] = _initializeAnalytics( | |
s, | |
dynamicConfigPromisesList, | |
measurementIdToAppId, | |
o, | |
gtagCoreFunction, | |
dataLayerName, | |
_, | |
)), | |
new AnalyticsService(s) | |
); | |
} | |
function getAnalytics(s = getApp()) { | |
s = getModularInstance(s); | |
const o = _getProvider(s, ANALYTICS_TYPE); | |
return o.isInitialized() ? o.getImmediate() : initializeAnalytics(s); | |
} | |
function initializeAnalytics(s, o = {}) { | |
const _ = _getProvider(s, ANALYTICS_TYPE); | |
if (_.isInitialized()) { | |
const et = _.getImmediate(); | |
if (deepEqual(o, _.getOptions())) return et; | |
throw ERROR_FACTORY.create("already-initialized"); | |
} | |
return _.initialize({ options: o }); | |
} | |
function logEvent(s, o, _, _e) { | |
(s = getModularInstance(s)), | |
logEvent$1( | |
wrappedGtagFunction, | |
initializationPromisesMap[s.app.options.appId], | |
o, | |
_, | |
_e, | |
).catch((et) => logger.error(et)); | |
} | |
const name$3 = "@firebase/analytics", | |
version$2 = "0.10.0"; | |
function registerAnalytics() { | |
_registerComponent( | |
new Component( | |
ANALYTICS_TYPE, | |
(o, { options: _ }) => { | |
const _e = o.getProvider("app").getImmediate(), | |
et = o.getProvider("installations-internal").getImmediate(); | |
return factory$2(_e, et, _); | |
}, | |
"PUBLIC", | |
), | |
), | |
_registerComponent(new Component("analytics-internal", s, "PRIVATE")), | |
registerVersion(name$3, version$2), | |
registerVersion(name$3, version$2, "esm2017"); | |
function s(o) { | |
try { | |
const _ = o.getProvider(ANALYTICS_TYPE).getImmediate(); | |
return { logEvent: (_e, et, tt) => logEvent(_, _e, et, tt) }; | |
} catch (_) { | |
throw ERROR_FACTORY.create("interop-component-reg-failed", { | |
reason: _, | |
}); | |
} | |
} | |
} | |
registerAnalytics(); | |
const firebaseApp = initializeApp(envConfig.FIREBASE), | |
analytics = getAnalytics(firebaseApp), | |
sessionEvent = (s) => logEvent(analytics, "session", s), | |
loginEvent = (s) => logEvent(analytics, "login", s), | |
executeCodeEvent = (s) => logEvent(analytics, "execute_code", s), | |
getSession = async ({ provider: s, redirect: o }) => { | |
loginEvent({ provider: s, redirect: o }); | |
const _ = await apiFetch({ | |
method: "POST", | |
endpoint: `/api/sessions/${s}`, | |
body: { redirect: o }, | |
}); | |
window.open(_.json.authUrl, "_self"); | |
}, | |
isSessionStale = () => | |
localStorage.getItem("session-key") !== envConfig.SESSION_KEY, | |
resetSession = () => { | |
localStorage.clear(), | |
Cookies.remove("user", { domain: envConfig.DOMAIN }), | |
localStorage.setItem("version", envConfig.APP_VERSION), | |
localStorage.setItem("session-key", envConfig.SESSION_KEY); | |
}, | |
getSessionUser = () => Cookies.getJSON("user") ?? GUEST_USER, | |
resetSessionUser = () => ( | |
Cookies.remove("user", { domain: envConfig.DOMAIN }), GUEST_USER | |
), | |
getProfile = async () => | |
apiFetch({ method: "GET", endpoint: "/api/sessions/profile" }), | |
getAssociatedAccounts = async () => | |
apiFetch({ | |
method: "GET", | |
endpoint: "/api/sessions/profile/associated-accounts", | |
}), | |
getProblemsIndex = async () => | |
apiFetch({ method: "GET", endpoint: "/api/problems" }), | |
getFreeProblem = async ({ problemSlug: s }) => | |
apiFetch({ method: "GET", endpoint: `/api/problems/${s}` }), | |
getPremiumProblem = async ({ problemSlug: s }) => | |
apiFetch({ method: "GET", endpoint: `/api/problems/premium/${s}` }), | |
problemService = Object.freeze( | |
Object.defineProperty( | |
{ | |
__proto__: null, | |
getFreeProblem, | |
getPremiumProblem, | |
getProblemsIndex, | |
}, | |
Symbol.toStringTag, | |
{ value: "Module" }, | |
), | |
); | |
var FUNC_ERROR_TEXT$3 = "Expected a function", | |
NAN$2 = NaN, | |
symbolTag$2 = "[object Symbol]", | |
reTrim$1 = /^\s+|\s+$/g, | |
reIsBadHex$2 = /^[-+]0x[0-9a-f]+$/i, | |
reIsBinary$2 = /^0b[01]+$/i, | |
reIsOctal$2 = /^0o[0-7]+$/i, | |
freeParseInt$2 = parseInt, | |
freeGlobal$3 = | |
typeof commonjsGlobal$3 == "object" && | |
commonjsGlobal$3 && | |
commonjsGlobal$3.Object === Object && | |
commonjsGlobal$3, | |
freeSelf$2 = | |
typeof self == "object" && self && self.Object === Object && self, | |
root$4 = freeGlobal$3 || freeSelf$2 || Function("return this")(), | |
objectProto$3 = Object.prototype, | |
objectToString$3 = objectProto$3.toString, | |
nativeMax$2 = Math.max, | |
nativeMin$2 = Math.min, | |
now$3 = function () { | |
return root$4.Date.now(); | |
}; | |
function debounce$3(s, o, _) { | |
var _e, | |
et, | |
tt, | |
rt, | |
it, | |
ot, | |
ct = 0, | |
at = !1, | |
ht = !1, | |
mt = !0; | |
if (typeof s != "function") throw new TypeError(FUNC_ERROR_TEXT$3); | |
(o = toNumber$3(o) || 0), | |
isObject$5(_) && | |
((at = !!_.leading), | |
(ht = "maxWait" in _), | |
(tt = ht ? nativeMax$2(toNumber$3(_.maxWait) || 0, o) : tt), | |
(mt = "trailing" in _ ? !!_.trailing : mt)); | |
function vt(Xt) { | |
var Jt = _e, | |
Ht = et; | |
return (_e = et = void 0), (ct = Xt), (rt = s.apply(Ht, Jt)), rt; | |
} | |
function xt(Xt) { | |
return (ct = Xt), (it = setTimeout(Et, o)), at ? vt(Xt) : rt; | |
} | |
function St(Xt) { | |
var Jt = Xt - ot, | |
Ht = Xt - ct, | |
qt = o - Jt; | |
return ht ? nativeMin$2(qt, tt - Ht) : qt; | |
} | |
function $t(Xt) { | |
var Jt = Xt - ot, | |
Ht = Xt - ct; | |
return ot === void 0 || Jt >= o || Jt < 0 || (ht && Ht >= tt); | |
} | |
function Et() { | |
var Xt = now$3(); | |
if ($t(Xt)) return _t(Xt); | |
it = setTimeout(Et, St(Xt)); | |
} | |
function _t(Xt) { | |
return (it = void 0), mt && _e ? vt(Xt) : ((_e = et = void 0), rt); | |
} | |
function Rt() { | |
it !== void 0 && clearTimeout(it), (ct = 0), (_e = ot = et = it = void 0); | |
} | |
function Mt() { | |
return it === void 0 ? rt : _t(now$3()); | |
} | |
function It() { | |
var Xt = now$3(), | |
Jt = $t(Xt); | |
if (((_e = arguments), (et = this), (ot = Xt), Jt)) { | |
if (it === void 0) return xt(ot); | |
if (ht) return (it = setTimeout(Et, o)), vt(ot); | |
} | |
return it === void 0 && (it = setTimeout(Et, o)), rt; | |
} | |
return (It.cancel = Rt), (It.flush = Mt), It; | |
} | |
function isObject$5(s) { | |
var o = typeof s; | |
return !!s && (o == "object" || o == "function"); | |
} | |
function isObjectLike$3(s) { | |
return !!s && typeof s == "object"; | |
} | |
function isSymbol$3(s) { | |
return ( | |
typeof s == "symbol" || | |
(isObjectLike$3(s) && objectToString$3.call(s) == symbolTag$2) | |
); | |
} | |
function toNumber$3(s) { | |
if (typeof s == "number") return s; | |
if (isSymbol$3(s)) return NAN$2; | |
if (isObject$5(s)) { | |
var o = typeof s.valueOf == "function" ? s.valueOf() : s; | |
s = isObject$5(o) ? o + "" : o; | |
} | |
if (typeof s != "string") return s === 0 ? s : +s; | |
s = s.replace(reTrim$1, ""); | |
var _ = reIsBinary$2.test(s); | |
return _ || reIsOctal$2.test(s) | |
? freeParseInt$2(s.slice(2), _ ? 2 : 8) | |
: reIsBadHex$2.test(s) | |
? NAN$2 | |
: +s; | |
} | |
var lodash_debounce = debounce$3; | |
const debounce$4 = getDefaultExportFromCjs$1(lodash_debounce), | |
LOCAL_STORAGE_KEY = "code", | |
getCode = async ({ problemSlug: s, runtime: o }) => { | |
if (s === "") return ""; | |
const _ = await apiFetch({ | |
method: "GET", | |
endpoint: `/api/code/problems/${s}/runtimes/${o}`, | |
}); | |
return _.status === STATUS.OK | |
? _.json.code | |
: (JSON.parse(localStorage.getItem(LOCAL_STORAGE_KEY)) || {})[ | |
`${s}:${o}` | |
]; | |
}, | |
saveCode = debounce$4( | |
async ({ problemSlug: s, runtime: o, code: _, whenDone: _e }) => { | |
const et = await apiFetch({ | |
method: "PUT", | |
endpoint: `/api/code/problems/${s}/runtimes/${o}`, | |
body: { code: _ }, | |
}); | |
if ((_e(et), et.status !== STATUS.OK)) { | |
const tt = JSON.parse(localStorage.getItem(LOCAL_STORAGE_KEY)) || {}; | |
(tt[`${s}:${o}`] = _), | |
localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(tt)); | |
} | |
return et; | |
}, | |
5e3, | |
), | |
deleteAllLocalCode = () => { | |
localStorage.removeItem(LOCAL_STORAGE_KEY); | |
}, | |
getSubmissions = ({ problemSlug: s }) => | |
apiFetch({ | |
method: "GET", | |
endpoint: `/api/code/problems/${s}/submissions`, | |
}), | |
getProgress = async () => | |
apiFetch({ method: "GET", endpoint: "/api/progress" }), | |
deleteProgress = async () => | |
apiFetch({ method: "DELETE", endpoint: "/api/progress" }), | |
deleteProgressForModule = async ({ moduleName: s }) => | |
apiFetch({ method: "DELETE", endpoint: `/api/progress/module/${s}` }), | |
createCompletion = async ({ problemSlug: s }) => | |
apiFetch({ method: "POST", endpoint: `/api/completions/problems/${s}` }), | |
createFavorite = ({ problemSlug: s }) => | |
apiFetch({ method: "POST", endpoint: `/api/favorites/problems/${s}` }), | |
deleteFavorite = ({ problemSlug: s }) => | |
apiFetch({ method: "DELETE", endpoint: `/api/favorites/problems/${s}` }), | |
BANNER_DISMISSED_AT_STORAGE_KEY = "banner-last-dismissed-at", | |
setDismissTime = () => { | |
localStorage.setItem(BANNER_DISMISSED_AT_STORAGE_KEY, new Date()); | |
}, | |
getDismissTime = () => { | |
const s = localStorage.getItem(BANNER_DISMISSED_AT_STORAGE_KEY); | |
return s ? new Date(s) : new Date(0); | |
}, | |
PPP_NOTIFICATION_DISMISSED_STORAGE_KEY = "ppp-notification-dismissed", | |
setNotificationDismissed = () => { | |
localStorage.setItem(PPP_NOTIFICATION_DISMISSED_STORAGE_KEY, !0); | |
}, | |
isNotificationDismissed = () => | |
!!localStorage.getItem(PPP_NOTIFICATION_DISMISSED_STORAGE_KEY), | |
createCheckout = async ({ | |
productType: s, | |
parityDiscount: o, | |
promoCode: _, | |
cancelUrl: _e, | |
}) => | |
apiFetch({ | |
method: "POST", | |
endpoint: "/api/checkout", | |
body: { | |
productType: s, | |
parityDiscount: o, | |
promoCode: _, | |
cancelUrl: _e, | |
}, | |
}), | |
createBillingPortal = async () => | |
apiFetch({ | |
method: "POST", | |
endpoint: "/api/checkout/billing-portal", | |
body: {}, | |
}), | |
getPrice = async () => | |
apiFetch({ method: "GET", endpoint: "/api/checkout/price" }), | |
getPromoCodeDiscount = async ({ promoCode: s }) => | |
apiFetch({ | |
method: "GET", | |
endpoint: `/api/checkout/promo-code-discount/${String(s).toUpperCase()}`, | |
}), | |
getSubscription = async () => | |
apiFetch({ method: "GET", endpoint: "/api/checkout/subscription" }), | |
getPriceParityDiscount = async () => | |
fetch( | |
`https://api.paritydeals.com/api/v1/deals/discount/?url=${window.location.href}`, | |
); | |
var awsIotDeviceSdk = {}, | |
device = { exports: {} }, | |
events$3 = { exports: {} }, | |
R$1 = typeof Reflect == "object" ? Reflect : null, | |
ReflectApply = | |
R$1 && typeof R$1.apply == "function" | |
? R$1.apply | |
: function (o, _, _e) { | |
return Function.prototype.apply.call(o, _, _e); | |
}, | |
ReflectOwnKeys; | |
R$1 && typeof R$1.ownKeys == "function" | |
? (ReflectOwnKeys = R$1.ownKeys) | |
: Object.getOwnPropertySymbols | |
? (ReflectOwnKeys = function (o) { | |
return Object.getOwnPropertyNames(o).concat( | |
Object.getOwnPropertySymbols(o), | |
); | |
}) | |
: (ReflectOwnKeys = function (o) { | |
return Object.getOwnPropertyNames(o); | |
}); | |
function ProcessEmitWarning(s) { | |
console && console.warn && console.warn(s); | |
} | |
var NumberIsNaN = | |
Number.isNaN || | |
function (o) { | |
return o !== o; | |
}; | |
function EventEmitter$3() { | |
EventEmitter$3.init.call(this); | |
} | |
events$3.exports = EventEmitter$3; | |
events$3.exports.once = once$5; | |
EventEmitter$3.EventEmitter = EventEmitter$3; | |
EventEmitter$3.prototype._events = void 0; | |
EventEmitter$3.prototype._eventsCount = 0; | |
EventEmitter$3.prototype._maxListeners = void 0; | |
var defaultMaxListeners = 10; | |
function checkListener(s) { | |
if (typeof s != "function") | |
throw new TypeError( | |
'The "listener" argument must be of type Function. Received type ' + | |
typeof s, | |
); | |
} | |
Object.defineProperty(EventEmitter$3, "defaultMaxListeners", { | |
enumerable: !0, | |
get: function () { | |
return defaultMaxListeners; | |
}, | |
set: function (s) { | |
if (typeof s != "number" || s < 0 || NumberIsNaN(s)) | |
throw new RangeError( | |
'The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + | |
s + | |
".", | |
); | |
defaultMaxListeners = s; | |
}, | |
}); | |
EventEmitter$3.init = function () { | |
(this._events === void 0 || | |
this._events === Object.getPrototypeOf(this)._events) && | |
((this._events = Object.create(null)), (this._eventsCount = 0)), | |
(this._maxListeners = this._maxListeners || void 0); | |
}; | |
EventEmitter$3.prototype.setMaxListeners = function (o) { | |
if (typeof o != "number" || o < 0 || NumberIsNaN(o)) | |
throw new RangeError( | |
'The value of "n" is out of range. It must be a non-negative number. Received ' + | |
o + | |
".", | |
); | |
return (this._maxListeners = o), this; | |
}; | |
function _getMaxListeners(s) { | |
return s._maxListeners === void 0 | |
? EventEmitter$3.defaultMaxListeners | |
: s._maxListeners; | |
} | |
EventEmitter$3.prototype.getMaxListeners = function () { | |
return _getMaxListeners(this); | |
}; | |
EventEmitter$3.prototype.emit = function (o) { | |
for (var _ = [], _e = 1; _e < arguments.length; _e++) _.push(arguments[_e]); | |
var et = o === "error", | |
tt = this._events; | |
if (tt !== void 0) et = et && tt.error === void 0; | |
else if (!et) return !1; | |
if (et) { | |
var rt; | |
if ((_.length > 0 && (rt = _[0]), rt instanceof Error)) throw rt; | |
var it = new Error( | |
"Unhandled error." + (rt ? " (" + rt.message + ")" : ""), | |
); | |
throw ((it.context = rt), it); | |
} | |
var ot = tt[o]; | |
if (ot === void 0) return !1; | |
if (typeof ot == "function") ReflectApply(ot, this, _); | |
else | |
for (var ct = ot.length, at = arrayClone(ot, ct), _e = 0; _e < ct; ++_e) | |
ReflectApply(at[_e], this, _); | |
return !0; | |
}; | |
function _addListener(s, o, _, _e) { | |
var et, tt, rt; | |
if ( | |
(checkListener(_), | |
(tt = s._events), | |
tt === void 0 | |
? ((tt = s._events = Object.create(null)), (s._eventsCount = 0)) | |
: (tt.newListener !== void 0 && | |
(s.emit("newListener", o, _.listener ? _.listener : _), | |
(tt = s._events)), | |
(rt = tt[o])), | |
rt === void 0) | |
) | |
(rt = tt[o] = _), ++s._eventsCount; | |
else if ( | |
(typeof rt == "function" | |
? (rt = tt[o] = _e ? [_, rt] : [rt, _]) | |
: _e | |
? rt.unshift(_) | |
: rt.push(_), | |
(et = _getMaxListeners(s)), | |
et > 0 && rt.length > et && !rt.warned) | |
) { | |
rt.warned = !0; | |
var it = new Error( | |
"Possible EventEmitter memory leak detected. " + | |
rt.length + | |
" " + | |
String(o) + | |
" listeners added. Use emitter.setMaxListeners() to increase limit", | |
); | |
(it.name = "MaxListenersExceededWarning"), | |
(it.emitter = s), | |
(it.type = o), | |
(it.count = rt.length), | |
ProcessEmitWarning(it); | |
} | |
return s; | |
} | |
EventEmitter$3.prototype.addListener = function (o, _) { | |
return _addListener(this, o, _, !1); | |
}; | |
EventEmitter$3.prototype.on = EventEmitter$3.prototype.addListener; | |
EventEmitter$3.prototype.prependListener = function (o, _) { | |
return _addListener(this, o, _, !0); | |
}; | |
function onceWrapper() { | |
if (!this.fired) | |
return ( | |
this.target.removeListener(this.type, this.wrapFn), | |
(this.fired = !0), | |
arguments.length === 0 | |
? this.listener.call(this.target) | |
: this.listener.apply(this.target, arguments) | |
); | |
} | |
function _onceWrap(s, o, _) { | |
var _e = { fired: !1, wrapFn: void 0, target: s, type: o, listener: _ }, | |
et = onceWrapper.bind(_e); | |
return (et.listener = _), (_e.wrapFn = et), et; | |
} | |
EventEmitter$3.prototype.once = function (o, _) { | |
return checkListener(_), this.on(o, _onceWrap(this, o, _)), this; | |
}; | |
EventEmitter$3.prototype.prependOnceListener = function (o, _) { | |
return ( | |
checkListener(_), this.prependListener(o, _onceWrap(this, o, _)), this | |
); | |
}; | |
EventEmitter$3.prototype.removeListener = function (o, _) { | |
var _e, et, tt, rt, it; | |
if ((checkListener(_), (et = this._events), et === void 0)) return this; | |
if (((_e = et[o]), _e === void 0)) return this; | |
if (_e === _ || _e.listener === _) | |
--this._eventsCount === 0 | |
? (this._events = Object.create(null)) | |
: (delete et[o], | |
et.removeListener && | |
this.emit("removeListener", o, _e.listener || _)); | |
else if (typeof _e != "function") { | |
for (tt = -1, rt = _e.length - 1; rt >= 0; rt--) | |
if (_e[rt] === _ || _e[rt].listener === _) { | |
(it = _e[rt].listener), (tt = rt); | |
break; | |
} | |
if (tt < 0) return this; | |
tt === 0 ? _e.shift() : spliceOne(_e, tt), | |
_e.length === 1 && (et[o] = _e[0]), | |
et.removeListener !== void 0 && this.emit("removeListener", o, it || _); | |
} | |
return this; | |
}; | |
EventEmitter$3.prototype.off = EventEmitter$3.prototype.removeListener; | |
EventEmitter$3.prototype.removeAllListeners = function (o) { | |
var _, _e, et; | |
if (((_e = this._events), _e === void 0)) return this; | |
if (_e.removeListener === void 0) | |
return ( | |
arguments.length === 0 | |
? ((this._events = Object.create(null)), (this._eventsCount = 0)) | |
: _e[o] !== void 0 && | |
(--this._eventsCount === 0 | |
? (this._events = Object.create(null)) | |
: delete _e[o]), | |
this | |
); | |
if (arguments.length === 0) { | |
var tt = Object.keys(_e), | |
rt; | |
for (et = 0; et < tt.length; ++et) | |
(rt = tt[et]), rt !== "removeListener" && this.removeAllListeners(rt); | |
return ( | |
this.removeAllListeners("removeListener"), | |
(this._events = Object.create(null)), | |
(this._eventsCount = 0), | |
this | |
); | |
} | |
if (((_ = _e[o]), typeof _ == "function")) this.removeListener(o, _); | |
else if (_ !== void 0) | |
for (et = _.length - 1; et >= 0; et--) this.removeListener(o, _[et]); | |
return this; | |
}; | |
function _listeners(s, o, _) { | |
var _e = s._events; | |
if (_e === void 0) return []; | |
var et = _e[o]; | |
return et === void 0 | |
? [] | |
: typeof et == "function" | |
? _ | |
? [et.listener || et] | |
: [et] | |
: _ | |
? unwrapListeners(et) | |
: arrayClone(et, et.length); | |
} | |
EventEmitter$3.prototype.listeners = function (o) { | |
return _listeners(this, o, !0); | |
}; | |
EventEmitter$3.prototype.rawListeners = function (o) { | |
return _listeners(this, o, !1); | |
}; | |
EventEmitter$3.listenerCount = function (s, o) { | |
return typeof s.listenerCount == "function" | |
? s.listenerCount(o) | |
: listenerCount.call(s, o); | |
}; | |
EventEmitter$3.prototype.listenerCount = listenerCount; | |
function listenerCount(s) { | |
var o = this._events; | |
if (o !== void 0) { | |
var _ = o[s]; | |
if (typeof _ == "function") return 1; | |
if (_ !== void 0) return _.length; | |
} | |
return 0; | |
} | |
EventEmitter$3.prototype.eventNames = function () { | |
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; | |
}; | |
function arrayClone(s, o) { | |
for (var _ = new Array(o), _e = 0; _e < o; ++_e) _[_e] = s[_e]; | |
return _; | |
} | |
function spliceOne(s, o) { | |
for (; o + 1 < s.length; o++) s[o] = s[o + 1]; | |
s.pop(); | |
} | |
function unwrapListeners(s) { | |
for (var o = new Array(s.length), _ = 0; _ < o.length; ++_) | |
o[_] = s[_].listener || s[_]; | |
return o; | |
} | |
function once$5(s, o) { | |
return new Promise(function (_, _e) { | |
function et(rt) { | |
s.removeListener(o, tt), _e(rt); | |
} | |
function tt() { | |
typeof s.removeListener == "function" && s.removeListener("error", et), | |
_([].slice.call(arguments)); | |
} | |
eventTargetAgnosticAddListener(s, o, tt, { once: !0 }), | |
o !== "error" && addErrorHandlerIfEventEmitter(s, et, { once: !0 }); | |
}); | |
} | |
function addErrorHandlerIfEventEmitter(s, o, _) { | |
typeof s.on == "function" && | |
eventTargetAgnosticAddListener(s, "error", o, _); | |
} | |
function eventTargetAgnosticAddListener(s, o, _, _e) { | |
if (typeof s.on == "function") _e.once ? s.once(o, _) : s.on(o, _); | |
else if (typeof s.addEventListener == "function") | |
s.addEventListener(o, function et(tt) { | |
_e.once && s.removeEventListener(o, et), _(tt); | |
}); | |
else | |
throw new TypeError( | |
'The "emitter" argument must be of type EventEmitter. Received type ' + | |
typeof s, | |
); | |
} | |
var eventsExports = events$3.exports, | |
util$3 = {}, | |
types$6 = {}, | |
shams$1 = function () { | |
if ( | |
typeof Symbol != "function" || | |
typeof Object.getOwnPropertySymbols != "function" | |
) | |
return !1; | |
if (typeof Symbol.iterator == "symbol") return !0; | |
var o = {}, | |
_ = Symbol("test"), | |
_e = Object(_); | |
if ( | |
typeof _ == "string" || | |
Object.prototype.toString.call(_) !== "[object Symbol]" || | |
Object.prototype.toString.call(_e) !== "[object Symbol]" | |
) | |
return !1; | |
var et = 42; | |
o[_] = et; | |
for (_ in o) return !1; | |
if ( | |
(typeof Object.keys == "function" && Object.keys(o).length !== 0) || | |
(typeof Object.getOwnPropertyNames == "function" && | |
Object.getOwnPropertyNames(o).length !== 0) | |
) | |
return !1; | |
var tt = Object.getOwnPropertySymbols(o); | |
if ( | |
tt.length !== 1 || | |
tt[0] !== _ || | |
!Object.prototype.propertyIsEnumerable.call(o, _) | |
) | |
return !1; | |
if (typeof Object.getOwnPropertyDescriptor == "function") { | |
var rt = Object.getOwnPropertyDescriptor(o, _); | |
if (rt.value !== et || rt.enumerable !== !0) return !1; | |
} | |
return !0; | |
}, | |
hasSymbols$2 = shams$1, | |
shams = function () { | |
return hasSymbols$2() && !!Symbol.toStringTag; | |
}, | |
esErrors = Error, | |
_eval = EvalError, | |
range = RangeError, | |
ref = ReferenceError, | |
syntax = SyntaxError, | |
type = TypeError, | |
uri = URIError, | |
origSymbol = typeof Symbol < "u" && Symbol, | |
hasSymbolSham = shams$1, | |
hasSymbols$1 = function () { | |
return typeof origSymbol != "function" || | |
typeof Symbol != "function" || | |
typeof origSymbol("foo") != "symbol" || | |
typeof Symbol("bar") != "symbol" | |
? !1 | |
: hasSymbolSham(); | |
}, | |
test = { __proto__: null, foo: {} }, | |
$Object = Object, | |
hasProto$1 = function () { | |
return { __proto__: test }.foo === test.foo && !(test instanceof $Object); | |
}, | |
ERROR_MESSAGE = "Function.prototype.bind called on incompatible ", | |
toStr$4 = Object.prototype.toString, | |
max$3 = Math.max, | |
funcType = "[object Function]", | |
concatty = function (o, _) { | |
for (var _e = [], et = 0; et < o.length; et += 1) _e[et] = o[et]; | |
for (var tt = 0; tt < _.length; tt += 1) _e[tt + o.length] = _[tt]; | |
return _e; | |
}, | |
slicy = function (o, _) { | |
for (var _e = [], et = _ || 0, tt = 0; et < o.length; et += 1, tt += 1) | |
_e[tt] = o[et]; | |
return _e; | |
}, | |
joiny = function (s, o) { | |
for (var _ = "", _e = 0; _e < s.length; _e += 1) | |
(_ += s[_e]), _e + 1 < s.length && (_ += o); | |
return _; | |
}, | |
implementation$1 = function (o) { | |
var _ = this; | |
if (typeof _ != "function" || toStr$4.apply(_) !== funcType) | |
throw new TypeError(ERROR_MESSAGE + _); | |
for ( | |
var _e = slicy(arguments, 1), | |
et, | |
tt = function () { | |
if (this instanceof et) { | |
var at = _.apply(this, concatty(_e, arguments)); | |
return Object(at) === at ? at : this; | |
} | |
return _.apply(o, concatty(_e, arguments)); | |
}, | |
rt = max$3(0, _.length - _e.length), | |
it = [], | |
ot = 0; | |
ot < rt; | |
ot++ | |
) | |
it[ot] = "$" + ot; | |
if ( | |
((et = Function( | |
"binder", | |
"return function (" + | |
joiny(it, ",") + | |
"){ return binder.apply(this,arguments); }", | |
)(tt)), | |
_.prototype) | |
) { | |
var ct = function () {}; | |
(ct.prototype = _.prototype), | |
(et.prototype = new ct()), | |
(ct.prototype = null); | |
} | |
return et; | |
}, | |
implementation = implementation$1, | |
functionBind = Function.prototype.bind || implementation, | |
call$1 = Function.prototype.call, | |
$hasOwn = Object.prototype.hasOwnProperty, | |
bind$1 = functionBind, | |
hasown = bind$1.call(call$1, $hasOwn), | |
undefined$1, | |
$Error = esErrors, | |
$EvalError = _eval, | |
$RangeError = range, | |
$ReferenceError = ref, | |
$SyntaxError$1 = syntax, | |
$TypeError$2 = type, | |
$URIError = uri, | |
$Function = Function, | |
getEvalledConstructor = function (s) { | |
try { | |
return $Function('"use strict"; return (' + s + ").constructor;")(); | |
} catch {} | |
}, | |
$gOPD$1 = Object.getOwnPropertyDescriptor; | |
if ($gOPD$1) | |
try { | |
$gOPD$1({}, ""); | |
} catch { | |
$gOPD$1 = null; | |
} | |
var throwTypeError = function () { | |
throw new $TypeError$2(); | |
}, | |
ThrowTypeError = $gOPD$1 | |
? (function () { | |
try { | |
return arguments.callee, throwTypeError; | |
} catch { | |
try { | |
return $gOPD$1(arguments, "callee").get; | |
} catch { | |
return throwTypeError; | |
} | |
} | |
})() | |
: throwTypeError, | |
hasSymbols = hasSymbols$1(), | |
hasProto = hasProto$1(), | |
getProto$1 = | |
Object.getPrototypeOf || | |
(hasProto | |
? function (s) { | |
return s.__proto__; | |
} | |
: null), | |
needsEval = {}, | |
TypedArray = | |
typeof Uint8Array > "u" || !getProto$1 | |
? undefined$1 | |
: getProto$1(Uint8Array), | |
INTRINSICS = { | |
__proto__: null, | |
"%AggregateError%": | |
typeof AggregateError > "u" ? undefined$1 : AggregateError, | |
"%Array%": Array, | |
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? undefined$1 : ArrayBuffer, | |
"%ArrayIteratorPrototype%": | |
hasSymbols && getProto$1 | |
? getProto$1([][Symbol.iterator]()) | |
: undefined$1, | |
"%AsyncFromSyncIteratorPrototype%": undefined$1, | |
"%AsyncFunction%": needsEval, | |
"%AsyncGenerator%": needsEval, | |
"%AsyncGeneratorFunction%": needsEval, | |
"%AsyncIteratorPrototype%": needsEval, | |
"%Atomics%": typeof Atomics > "u" ? undefined$1 : Atomics, | |
"%BigInt%": typeof BigInt > "u" ? undefined$1 : BigInt, | |
"%BigInt64Array%": | |
typeof BigInt64Array > "u" ? undefined$1 : BigInt64Array, | |
"%BigUint64Array%": | |
typeof BigUint64Array > "u" ? undefined$1 : BigUint64Array, | |
"%Boolean%": Boolean, | |
"%DataView%": typeof DataView > "u" ? undefined$1 : DataView, | |
"%Date%": Date, | |
"%decodeURI%": decodeURI, | |
"%decodeURIComponent%": decodeURIComponent, | |
"%encodeURI%": encodeURI, | |
"%encodeURIComponent%": encodeURIComponent, | |
"%Error%": $Error, | |
"%eval%": eval, | |
"%EvalError%": $EvalError, | |
"%Float32Array%": typeof Float32Array > "u" ? undefined$1 : Float32Array, | |
"%Float64Array%": typeof Float64Array > "u" ? undefined$1 : Float64Array, | |
"%FinalizationRegistry%": | |
typeof FinalizationRegistry > "u" ? undefined$1 : FinalizationRegistry, | |
"%Function%": $Function, | |
"%GeneratorFunction%": needsEval, | |
"%Int8Array%": typeof Int8Array > "u" ? undefined$1 : Int8Array, | |
"%Int16Array%": typeof Int16Array > "u" ? undefined$1 : Int16Array, | |
"%Int32Array%": typeof Int32Array > "u" ? undefined$1 : Int32Array, | |
"%isFinite%": isFinite, | |
"%isNaN%": isNaN, | |
"%IteratorPrototype%": | |
hasSymbols && getProto$1 | |
? getProto$1(getProto$1([][Symbol.iterator]())) | |
: undefined$1, | |
"%JSON%": typeof JSON == "object" ? JSON : undefined$1, | |
"%Map%": typeof Map > "u" ? undefined$1 : Map, | |
"%MapIteratorPrototype%": | |
typeof Map > "u" || !hasSymbols || !getProto$1 | |
? undefined$1 | |
: getProto$1(new Map()[Symbol.iterator]()), | |
"%Math%": Math, | |
"%Number%": Number, | |
"%Object%": Object, | |
"%parseFloat%": parseFloat, | |
"%parseInt%": parseInt, | |
"%Promise%": typeof Promise > "u" ? undefined$1 : Promise, | |
"%Proxy%": typeof Proxy > "u" ? undefined$1 : Proxy, | |
"%RangeError%": $RangeError, | |
"%ReferenceError%": $ReferenceError, | |
"%Reflect%": typeof Reflect > "u" ? undefined$1 : Reflect, | |
"%RegExp%": RegExp, | |
"%Set%": typeof Set > "u" ? undefined$1 : Set, | |
"%SetIteratorPrototype%": | |
typeof Set > "u" || !hasSymbols || !getProto$1 | |
? undefined$1 | |
: getProto$1(new Set()[Symbol.iterator]()), | |
"%SharedArrayBuffer%": | |
typeof SharedArrayBuffer > "u" ? undefined$1 : SharedArrayBuffer, | |
"%String%": String, | |
"%StringIteratorPrototype%": | |
hasSymbols && getProto$1 | |
? getProto$1(""[Symbol.iterator]()) | |
: undefined$1, | |
"%Symbol%": hasSymbols ? Symbol : undefined$1, | |
"%SyntaxError%": $SyntaxError$1, | |
"%ThrowTypeError%": ThrowTypeError, | |
"%TypedArray%": TypedArray, | |
"%TypeError%": $TypeError$2, | |
"%Uint8Array%": typeof Uint8Array > "u" ? undefined$1 : Uint8Array, | |
"%Uint8ClampedArray%": | |
typeof Uint8ClampedArray > "u" ? undefined$1 : Uint8ClampedArray, | |
"%Uint16Array%": typeof Uint16Array > "u" ? undefined$1 : Uint16Array, | |
"%Uint32Array%": typeof Uint32Array > "u" ? undefined$1 : Uint32Array, | |
"%URIError%": $URIError, | |
"%WeakMap%": typeof WeakMap > "u" ? undefined$1 : WeakMap, | |
"%WeakRef%": typeof WeakRef > "u" ? undefined$1 : WeakRef, | |
"%WeakSet%": typeof WeakSet > "u" ? undefined$1 : WeakSet, | |
}; | |
if (getProto$1) | |
try { | |
null.error; | |
} catch (s) { | |
var errorProto = getProto$1(getProto$1(s)); | |
INTRINSICS["%Error.prototype%"] = errorProto; | |
} | |
var doEval = function s(o) { | |
var _; | |
if (o === "%AsyncFunction%") | |
_ = getEvalledConstructor("async function () {}"); | |
else if (o === "%GeneratorFunction%") | |
_ = getEvalledConstructor("function* () {}"); | |
else if (o === "%AsyncGeneratorFunction%") | |
_ = getEvalledConstructor("async function* () {}"); | |
else if (o === "%AsyncGenerator%") { | |
var _e = s("%AsyncGeneratorFunction%"); | |
_e && (_ = _e.prototype); | |
} else if (o === "%AsyncIteratorPrototype%") { | |
var et = s("%AsyncGenerator%"); | |
et && getProto$1 && (_ = getProto$1(et.prototype)); | |
} | |
return (INTRINSICS[o] = _), _; | |
}, | |
LEGACY_ALIASES = { | |
__proto__: null, | |
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], | |
"%ArrayPrototype%": ["Array", "prototype"], | |
"%ArrayProto_entries%": ["Array", "prototype", "entries"], | |
"%ArrayProto_forEach%": ["Array", "prototype", "forEach"], | |
"%ArrayProto_keys%": ["Array", "prototype", "keys"], | |
"%ArrayProto_values%": ["Array", "prototype", "values"], | |
"%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], | |
"%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], | |
"%AsyncGeneratorPrototype%": [ | |
"AsyncGeneratorFunction", | |
"prototype", | |
"prototype", | |
], | |
"%BooleanPrototype%": ["Boolean", "prototype"], | |
"%DataViewPrototype%": ["DataView", "prototype"], | |
"%DatePrototype%": ["Date", "prototype"], | |
"%ErrorPrototype%": ["Error", "prototype"], | |
"%EvalErrorPrototype%": ["EvalError", "prototype"], | |
"%Float32ArrayPrototype%": ["Float32Array", "prototype"], | |
"%Float64ArrayPrototype%": ["Float64Array", "prototype"], | |
"%FunctionPrototype%": ["Function", "prototype"], | |
"%Generator%": ["GeneratorFunction", "prototype"], | |
"%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], | |
"%Int8ArrayPrototype%": ["Int8Array", "prototype"], | |
"%Int16ArrayPrototype%": ["Int16Array", "prototype"], | |
"%Int32ArrayPrototype%": ["Int32Array", "prototype"], | |
"%JSONParse%": ["JSON", "parse"], | |
"%JSONStringify%": ["JSON", "stringify"], | |
"%MapPrototype%": ["Map", "prototype"], | |
"%NumberPrototype%": ["Number", "prototype"], | |
"%ObjectPrototype%": ["Object", "prototype"], | |
"%ObjProto_toString%": ["Object", "prototype", "toString"], | |
"%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], | |
"%PromisePrototype%": ["Promise", "prototype"], | |
"%PromiseProto_then%": ["Promise", "prototype", "then"], | |
"%Promise_all%": ["Promise", "all"], | |
"%Promise_reject%": ["Promise", "reject"], | |
"%Promise_resolve%": ["Promise", "resolve"], | |
"%RangeErrorPrototype%": ["RangeError", "prototype"], | |
"%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], | |
"%RegExpPrototype%": ["RegExp", "prototype"], | |
"%SetPrototype%": ["Set", "prototype"], | |
"%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], | |
"%StringPrototype%": ["String", "prototype"], | |
"%SymbolPrototype%": ["Symbol", "prototype"], | |
"%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], | |
"%TypedArrayPrototype%": ["TypedArray", "prototype"], | |
"%TypeErrorPrototype%": ["TypeError", "prototype"], | |
"%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], | |
"%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], | |
"%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], | |
"%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], | |
"%URIErrorPrototype%": ["URIError", "prototype"], | |
"%WeakMapPrototype%": ["WeakMap", "prototype"], | |
"%WeakSetPrototype%": ["WeakSet", "prototype"], | |
}, | |
bind = functionBind, | |
hasOwn$2 = hasown, | |
$concat = bind.call(Function.call, Array.prototype.concat), | |
$spliceApply = bind.call(Function.apply, Array.prototype.splice), | |
$replace = bind.call(Function.call, String.prototype.replace), | |
$strSlice = bind.call(Function.call, String.prototype.slice), | |
$exec = bind.call(Function.call, RegExp.prototype.exec), | |
rePropName = | |
/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, | |
reEscapeChar = /\\(\\)?/g, | |
stringToPath = function (o) { | |
var _ = $strSlice(o, 0, 1), | |
_e = $strSlice(o, -1); | |
if (_ === "%" && _e !== "%") | |
throw new $SyntaxError$1( | |
"invalid intrinsic syntax, expected closing `%`", | |
); | |
if (_e === "%" && _ !== "%") | |
throw new $SyntaxError$1( | |
"invalid intrinsic syntax, expected opening `%`", | |
); | |
var et = []; | |
return ( | |
$replace(o, rePropName, function (tt, rt, it, ot) { | |
et[et.length] = it ? $replace(ot, reEscapeChar, "$1") : rt || tt; | |
}), | |
et | |
); | |
}, | |
getBaseIntrinsic = function (o, _) { | |
var _e = o, | |
et; | |
if ( | |
(hasOwn$2(LEGACY_ALIASES, _e) && | |
((et = LEGACY_ALIASES[_e]), (_e = "%" + et[0] + "%")), | |
hasOwn$2(INTRINSICS, _e)) | |
) { | |
var tt = INTRINSICS[_e]; | |
if ((tt === needsEval && (tt = doEval(_e)), typeof tt > "u" && !_)) | |
throw new $TypeError$2( | |
"intrinsic " + | |
o + | |
" exists, but is not available. Please file an issue!", | |
); | |
return { alias: et, name: _e, value: tt }; | |
} | |
throw new $SyntaxError$1("intrinsic " + o + " does not exist!"); | |
}, | |
getIntrinsic = function (o, _) { | |
if (typeof o != "string" || o.length === 0) | |
throw new $TypeError$2("intrinsic name must be a non-empty string"); | |
if (arguments.length > 1 && typeof _ != "boolean") | |
throw new $TypeError$2('"allowMissing" argument must be a boolean'); | |
if ($exec(/^%?[^%]*%?$/, o) === null) | |
throw new $SyntaxError$1( | |
"`%` may not be present anywhere but at the beginning and end of the intrinsic name", | |
); | |
var _e = stringToPath(o), | |
et = _e.length > 0 ? _e[0] : "", | |
tt = getBaseIntrinsic("%" + et + "%", _), | |
rt = tt.name, | |
it = tt.value, | |
ot = !1, | |
ct = tt.alias; | |
ct && ((et = ct[0]), $spliceApply(_e, $concat([0, 1], ct))); | |
for (var at = 1, ht = !0; at < _e.length; at += 1) { | |
var mt = _e[at], | |
vt = $strSlice(mt, 0, 1), | |
xt = $strSlice(mt, -1); | |
if ( | |
(vt === '"' || | |
vt === "'" || | |
vt === "`" || | |
xt === '"' || | |
xt === "'" || | |
xt === "`") && | |
vt !== xt | |
) | |
throw new $SyntaxError$1( | |
"property names with quotes must have matching quotes", | |
); | |
if ( | |
((mt === "constructor" || !ht) && (ot = !0), | |
(et += "." + mt), | |
(rt = "%" + et + "%"), | |
hasOwn$2(INTRINSICS, rt)) | |
) | |
it = INTRINSICS[rt]; | |
else if (it != null) { | |
if (!(mt in it)) { | |
if (!_) | |
throw new $TypeError$2( | |
"base intrinsic for " + | |
o + | |
" exists, but the property is not available.", | |
); | |
return; | |
} | |
if ($gOPD$1 && at + 1 >= _e.length) { | |
var St = $gOPD$1(it, mt); | |
(ht = !!St), | |
ht && "get" in St && !("originalValue" in St.get) | |
? (it = St.get) | |
: (it = it[mt]); | |
} else (ht = hasOwn$2(it, mt)), (it = it[mt]); | |
ht && !ot && (INTRINSICS[rt] = it); | |
} | |
} | |
return it; | |
}, | |
callBind$2 = { exports: {} }, | |
esDefineProperty, | |
hasRequiredEsDefineProperty; | |
function requireEsDefineProperty() { | |
if (hasRequiredEsDefineProperty) return esDefineProperty; | |
hasRequiredEsDefineProperty = 1; | |
var s = getIntrinsic, | |
o = s("%Object.defineProperty%", !0) || !1; | |
if (o) | |
try { | |
o({}, "a", { value: 1 }); | |
} catch { | |
o = !1; | |
} | |
return (esDefineProperty = o), esDefineProperty; | |
} | |
var GetIntrinsic$2 = getIntrinsic, | |
$gOPD = GetIntrinsic$2("%Object.getOwnPropertyDescriptor%", !0); | |
if ($gOPD) | |
try { | |
$gOPD([], "length"); | |
} catch { | |
$gOPD = null; | |
} | |
var gopd$1 = $gOPD, | |
$defineProperty$1 = requireEsDefineProperty(), | |
$SyntaxError = syntax, | |
$TypeError$1 = type, | |
gopd = gopd$1, | |
defineDataProperty = function (o, _, _e) { | |
if (!o || (typeof o != "object" && typeof o != "function")) | |
throw new $TypeError$1("`obj` must be an object or a function`"); | |
if (typeof _ != "string" && typeof _ != "symbol") | |
throw new $TypeError$1("`property` must be a string or a symbol`"); | |
if ( | |
arguments.length > 3 && | |
typeof arguments[3] != "boolean" && | |
arguments[3] !== null | |
) | |
throw new $TypeError$1( | |
"`nonEnumerable`, if provided, must be a boolean or null", | |
); | |
if ( | |
arguments.length > 4 && | |
typeof arguments[4] != "boolean" && | |
arguments[4] !== null | |
) | |
throw new $TypeError$1( | |
"`nonWritable`, if provided, must be a boolean or null", | |
); | |
if ( | |
arguments.length > 5 && | |
typeof arguments[5] != "boolean" && | |
arguments[5] !== null | |
) | |
throw new $TypeError$1( | |
"`nonConfigurable`, if provided, must be a boolean or null", | |
); | |
if (arguments.length > 6 && typeof arguments[6] != "boolean") | |
throw new $TypeError$1("`loose`, if provided, must be a boolean"); | |
var et = arguments.length > 3 ? arguments[3] : null, | |
tt = arguments.length > 4 ? arguments[4] : null, | |
rt = arguments.length > 5 ? arguments[5] : null, | |
it = arguments.length > 6 ? arguments[6] : !1, | |
ot = !!gopd && gopd(o, _); | |
if ($defineProperty$1) | |
$defineProperty$1(o, _, { | |
configurable: rt === null && ot ? ot.configurable : !rt, | |
enumerable: et === null && ot ? ot.enumerable : !et, | |
value: _e, | |
writable: tt === null && ot ? ot.writable : !tt, | |
}); | |
else if (it || (!et && !tt && !rt)) o[_] = _e; | |
else | |
throw new $SyntaxError( | |
"This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.", | |
); | |
}, | |
$defineProperty = requireEsDefineProperty(), | |
hasPropertyDescriptors = function () { | |
return !!$defineProperty; | |
}; | |
hasPropertyDescriptors.hasArrayLengthDefineBug = function () { | |
if (!$defineProperty) return null; | |
try { | |
return $defineProperty([], "length", { value: 1 }).length !== 1; | |
} catch { | |
return !0; | |
} | |
}; | |
var hasPropertyDescriptors_1 = hasPropertyDescriptors, | |
GetIntrinsic$1 = getIntrinsic, | |
define = defineDataProperty, | |
hasDescriptors = hasPropertyDescriptors_1(), | |
gOPD$2 = gopd$1, | |
$TypeError = type, | |
$floor = GetIntrinsic$1("%Math.floor%"), | |
setFunctionLength = function (o, _) { | |
if (typeof o != "function") | |
throw new $TypeError("`fn` is not a function"); | |
if (typeof _ != "number" || _ < 0 || _ > 4294967295 || $floor(_) !== _) | |
throw new $TypeError("`length` must be a positive 32-bit integer"); | |
var _e = arguments.length > 2 && !!arguments[2], | |
et = !0, | |
tt = !0; | |
if ("length" in o && gOPD$2) { | |
var rt = gOPD$2(o, "length"); | |
rt && !rt.configurable && (et = !1), rt && !rt.writable && (tt = !1); | |
} | |
return ( | |
(et || tt || !_e) && | |
(hasDescriptors | |
? define(o, "length", _, !0, !0) | |
: define(o, "length", _)), | |
o | |
); | |
}; | |
(function (s) { | |
var o = functionBind, | |
_ = getIntrinsic, | |
_e = setFunctionLength, | |
et = type, | |
tt = _("%Function.prototype.apply%"), | |
rt = _("%Function.prototype.call%"), | |
it = _("%Reflect.apply%", !0) || o.call(rt, tt), | |
ot = requireEsDefineProperty(), | |
ct = _("%Math.max%"); | |
s.exports = function (mt) { | |
if (typeof mt != "function") throw new et("a function is required"); | |
var vt = it(o, rt, arguments); | |
return _e(vt, 1 + ct(0, mt.length - (arguments.length - 1)), !0); | |
}; | |
var at = function () { | |
return it(o, tt, arguments); | |
}; | |
ot ? ot(s.exports, "apply", { value: at }) : (s.exports.apply = at); | |
})(callBind$2); | |
var callBindExports = callBind$2.exports, | |
GetIntrinsic = getIntrinsic, | |
callBind$1 = callBindExports, | |
$indexOf$1 = callBind$1(GetIntrinsic("String.prototype.indexOf")), | |
callBound$2 = function (o, _) { | |
var _e = GetIntrinsic(o, !!_); | |
return typeof _e == "function" && $indexOf$1(o, ".prototype.") > -1 | |
? callBind$1(_e) | |
: _e; | |
}, | |
hasToStringTag$3 = shams(), | |
callBound$1 = callBound$2, | |
$toString$1 = callBound$1("Object.prototype.toString"), | |
isStandardArguments = function (o) { | |
return hasToStringTag$3 && | |
o && | |
typeof o == "object" && | |
Symbol.toStringTag in o | |
? !1 | |
: $toString$1(o) === "[object Arguments]"; | |
}, | |
isLegacyArguments = function (o) { | |
return isStandardArguments(o) | |
? !0 | |
: o !== null && | |
typeof o == "object" && | |
typeof o.length == "number" && | |
o.length >= 0 && | |
$toString$1(o) !== "[object Array]" && | |
$toString$1(o.callee) === "[object Function]"; | |
}, | |
supportsStandardArguments = (function () { | |
return isStandardArguments(arguments); | |
})(); | |
isStandardArguments.isLegacyArguments = isLegacyArguments; | |
var isArguments = supportsStandardArguments | |
? isStandardArguments | |
: isLegacyArguments, | |
toStr$3 = Object.prototype.toString, | |
fnToStr$1 = Function.prototype.toString, | |
isFnRegex = /^\s*(?:function)?\*/, | |
hasToStringTag$2 = shams(), | |
getProto = Object.getPrototypeOf, | |
getGeneratorFunc = function () { | |
if (!hasToStringTag$2) return !1; | |
try { | |
return Function("return function*() {}")(); | |
} catch {} | |
}, | |
GeneratorFunction, | |
isGeneratorFunction = function (o) { | |
if (typeof o != "function") return !1; | |
if (isFnRegex.test(fnToStr$1.call(o))) return !0; | |
if (!hasToStringTag$2) { | |
var _ = toStr$3.call(o); | |
return _ === "[object GeneratorFunction]"; | |
} | |
if (!getProto) return !1; | |
if (typeof GeneratorFunction > "u") { | |
var _e = getGeneratorFunc(); | |
GeneratorFunction = _e ? getProto(_e) : !1; | |
} | |
return getProto(o) === GeneratorFunction; | |
}, | |
fnToStr = Function.prototype.toString, | |
reflectApply = | |
typeof Reflect == "object" && Reflect !== null && Reflect.apply, | |
badArrayLike, | |
isCallableMarker; | |
if ( | |
typeof reflectApply == "function" && | |
typeof Object.defineProperty == "function" | |
) | |
try { | |
(badArrayLike = Object.defineProperty({}, "length", { | |
get: function () { | |
throw isCallableMarker; | |
}, | |
})), | |
(isCallableMarker = {}), | |
reflectApply( | |
function () { | |
throw 42; | |
}, | |
null, | |
badArrayLike, | |
); | |
} catch (s) { | |
s !== isCallableMarker && (reflectApply = null); | |
} | |
else reflectApply = null; | |
var constructorRegex = /^\s*class\b/, | |
isES6ClassFn = function (o) { | |
try { | |
var _ = fnToStr.call(o); | |
return constructorRegex.test(_); | |
} catch { | |
return !1; | |
} | |
}, | |
tryFunctionObject = function (o) { | |
try { | |
return isES6ClassFn(o) ? !1 : (fnToStr.call(o), !0); | |
} catch { | |
return !1; | |
} | |
}, | |
toStr$2 = Object.prototype.toString, | |
objectClass = "[object Object]", | |
fnClass = "[object Function]", | |
genClass = "[object GeneratorFunction]", | |
ddaClass = "[object HTMLAllCollection]", | |
ddaClass2 = "[object HTML document.all class]", | |
ddaClass3 = "[object HTMLCollection]", | |
hasToStringTag$1 = typeof Symbol == "function" && !!Symbol.toStringTag, | |
isIE68 = !(0 in [,]), | |
isDDA = function () { | |
return !1; | |
}; | |
if (typeof document == "object") { | |
var all$e = document.all; | |
toStr$2.call(all$e) === toStr$2.call(document.all) && | |
(isDDA = function (o) { | |
if ((isIE68 || !o) && (typeof o > "u" || typeof o == "object")) | |
try { | |
var _ = toStr$2.call(o); | |
return ( | |
(_ === ddaClass || | |
_ === ddaClass2 || | |
_ === ddaClass3 || | |
_ === objectClass) && | |
o("") == null | |
); | |
} catch {} | |
return !1; | |
}); | |
} | |
var isCallable$1 = reflectApply | |
? function (o) { | |
if (isDDA(o)) return !0; | |
if (!o || (typeof o != "function" && typeof o != "object")) return !1; | |
try { | |
reflectApply(o, null, badArrayLike); | |
} catch (_) { | |
if (_ !== isCallableMarker) return !1; | |
} | |
return !isES6ClassFn(o) && tryFunctionObject(o); | |
} | |
: function (o) { | |
if (isDDA(o)) return !0; | |
if (!o || (typeof o != "function" && typeof o != "object")) return !1; | |
if (hasToStringTag$1) return tryFunctionObject(o); | |
if (isES6ClassFn(o)) return !1; | |
var _ = toStr$2.call(o); | |
return _ !== fnClass && _ !== genClass && !/^\[object HTML/.test(_) | |
? !1 | |
: tryFunctionObject(o); | |
}, | |
isCallable = isCallable$1, | |
toStr$1 = Object.prototype.toString, | |
hasOwnProperty$5 = Object.prototype.hasOwnProperty, | |
forEachArray = function (o, _, _e) { | |
for (var et = 0, tt = o.length; et < tt; et++) | |
hasOwnProperty$5.call(o, et) && | |
(_e == null ? _(o[et], et, o) : _.call(_e, o[et], et, o)); | |
}, | |
forEachString = function (o, _, _e) { | |
for (var et = 0, tt = o.length; et < tt; et++) | |
_e == null ? _(o.charAt(et), et, o) : _.call(_e, o.charAt(et), et, o); | |
}, | |
forEachObject = function (o, _, _e) { | |
for (var et in o) | |
hasOwnProperty$5.call(o, et) && | |
(_e == null ? _(o[et], et, o) : _.call(_e, o[et], et, o)); | |
}, | |
forEach$1 = function (o, _, _e) { | |
if (!isCallable(_)) throw new TypeError("iterator must be a function"); | |
var et; | |
arguments.length >= 3 && (et = _e), | |
toStr$1.call(o) === "[object Array]" | |
? forEachArray(o, _, et) | |
: typeof o == "string" | |
? forEachString(o, _, et) | |
: forEachObject(o, _, et); | |
}, | |
forEach_1 = forEach$1, | |
possibleTypedArrayNames = [ | |
"Float32Array", | |
"Float64Array", | |
"Int8Array", | |
"Int16Array", | |
"Int32Array", | |
"Uint8Array", | |
"Uint8ClampedArray", | |
"Uint16Array", | |
"Uint32Array", | |
"BigInt64Array", | |
"BigUint64Array", | |
], | |
possibleNames = possibleTypedArrayNames, | |
g$2 = typeof globalThis > "u" ? commonjsGlobal$3 : globalThis, | |
availableTypedArrays$1 = function () { | |
for (var o = [], _ = 0; _ < possibleNames.length; _++) | |
typeof g$2[possibleNames[_]] == "function" && | |
(o[o.length] = possibleNames[_]); | |
return o; | |
}, | |
forEach = forEach_1, | |
availableTypedArrays = availableTypedArrays$1, | |
callBind = callBindExports, | |
callBound = callBound$2, | |
gOPD$1 = gopd$1, | |
$toString = callBound("Object.prototype.toString"), | |
hasToStringTag = shams(), | |
g$1 = typeof globalThis > "u" ? commonjsGlobal$3 : globalThis, | |
typedArrays = availableTypedArrays(), | |
$slice = callBound("String.prototype.slice"), | |
getPrototypeOf = Object.getPrototypeOf, | |
$indexOf = | |
callBound("Array.prototype.indexOf", !0) || | |
function (o, _) { | |
for (var _e = 0; _e < o.length; _e += 1) if (o[_e] === _) return _e; | |
return -1; | |
}, | |
cache$3 = { __proto__: null }; | |
hasToStringTag && gOPD$1 && getPrototypeOf | |
? forEach(typedArrays, function (s) { | |
var o = new g$1[s](); | |
if (Symbol.toStringTag in o) { | |
var _ = getPrototypeOf(o), | |
_e = gOPD$1(_, Symbol.toStringTag); | |
if (!_e) { | |
var et = getPrototypeOf(_); | |
_e = gOPD$1(et, Symbol.toStringTag); | |
} | |
cache$3["$" + s] = callBind(_e.get); | |
} | |
}) | |
: forEach(typedArrays, function (s) { | |
var o = new g$1[s](), | |
_ = o.slice || o.set; | |
_ && (cache$3["$" + s] = callBind(_)); | |
}); | |
var tryTypedArrays = function (o) { | |
var _ = !1; | |
return ( | |
forEach(cache$3, function (_e, et) { | |
if (!_) | |
try { | |
"$" + _e(o) === et && (_ = $slice(et, 1)); | |
} catch {} | |
}), | |
_ | |
); | |
}, | |
trySlices = function (o) { | |
var _ = !1; | |
return ( | |
forEach(cache$3, function (_e, et) { | |
if (!_) | |
try { | |
_e(o), (_ = $slice(et, 1)); | |
} catch {} | |
}), | |
_ | |
); | |
}, | |
whichTypedArray$1 = function (o) { | |
if (!o || typeof o != "object") return !1; | |
if (!hasToStringTag) { | |
var _ = $slice($toString(o), 8, -1); | |
return $indexOf(typedArrays, _) > -1 | |
? _ | |
: _ !== "Object" | |
? !1 | |
: trySlices(o); | |
} | |
return gOPD$1 ? tryTypedArrays(o) : null; | |
}, | |
whichTypedArray = whichTypedArray$1, | |
isTypedArray = function (o) { | |
return !!whichTypedArray(o); | |
}; | |
(function (s) { | |
var o = isArguments, | |
_ = isGeneratorFunction, | |
_e = whichTypedArray$1, | |
et = isTypedArray; | |
function tt(lr) { | |
return lr.call.bind(lr); | |
} | |
var rt = typeof BigInt < "u", | |
it = typeof Symbol < "u", | |
ot = tt(Object.prototype.toString), | |
ct = tt(Number.prototype.valueOf), | |
at = tt(String.prototype.valueOf), | |
ht = tt(Boolean.prototype.valueOf); | |
if (rt) var mt = tt(BigInt.prototype.valueOf); | |
if (it) var vt = tt(Symbol.prototype.valueOf); | |
function xt(lr, Gr) { | |
if (typeof lr != "object") return !1; | |
try { | |
return Gr(lr), !0; | |
} catch { | |
return !1; | |
} | |
} | |
(s.isArgumentsObject = o), | |
(s.isGeneratorFunction = _), | |
(s.isTypedArray = et); | |
function St(lr) { | |
return ( | |
(typeof Promise < "u" && lr instanceof Promise) || | |
(lr !== null && | |
typeof lr == "object" && | |
typeof lr.then == "function" && | |
typeof lr.catch == "function") | |
); | |
} | |
s.isPromise = St; | |
function $t(lr) { | |
return typeof ArrayBuffer < "u" && ArrayBuffer.isView | |
? ArrayBuffer.isView(lr) | |
: et(lr) || Qt(lr); | |
} | |
s.isArrayBufferView = $t; | |
function Et(lr) { | |
return _e(lr) === "Uint8Array"; | |
} | |
s.isUint8Array = Et; | |
function _t(lr) { | |
return _e(lr) === "Uint8ClampedArray"; | |
} | |
s.isUint8ClampedArray = _t; | |
function Rt(lr) { | |
return _e(lr) === "Uint16Array"; | |
} | |
s.isUint16Array = Rt; | |
function Mt(lr) { | |
return _e(lr) === "Uint32Array"; | |
} | |
s.isUint32Array = Mt; | |
function It(lr) { | |
return _e(lr) === "Int8Array"; | |
} | |
s.isInt8Array = It; | |
function Xt(lr) { | |
return _e(lr) === "Int16Array"; | |
} | |
s.isInt16Array = Xt; | |
function Jt(lr) { | |
return _e(lr) === "Int32Array"; | |
} | |
s.isInt32Array = Jt; | |
function Ht(lr) { | |
return _e(lr) === "Float32Array"; | |
} | |
s.isFloat32Array = Ht; | |
function qt(lr) { | |
return _e(lr) === "Float64Array"; | |
} | |
s.isFloat64Array = qt; | |
function nr(lr) { | |
return _e(lr) === "BigInt64Array"; | |
} | |
s.isBigInt64Array = nr; | |
function wt(lr) { | |
return _e(lr) === "BigUint64Array"; | |
} | |
s.isBigUint64Array = wt; | |
function nt(lr) { | |
return ot(lr) === "[object Map]"; | |
} | |
nt.working = typeof Map < "u" && nt(new Map()); | |
function ut(lr) { | |
return typeof Map > "u" ? !1 : nt.working ? nt(lr) : lr instanceof Map; | |
} | |
s.isMap = ut; | |
function ft(lr) { | |
return ot(lr) === "[object Set]"; | |
} | |
ft.working = typeof Set < "u" && ft(new Set()); | |
function dt(lr) { | |
return typeof Set > "u" ? !1 : ft.working ? ft(lr) : lr instanceof Set; | |
} | |
s.isSet = dt; | |
function Ot(lr) { | |
return ot(lr) === "[object WeakMap]"; | |
} | |
Ot.working = typeof WeakMap < "u" && Ot(new WeakMap()); | |
function yt(lr) { | |
return typeof WeakMap > "u" | |
? !1 | |
: Ot.working | |
? Ot(lr) | |
: lr instanceof WeakMap; | |
} | |
s.isWeakMap = yt; | |
function bt(lr) { | |
return ot(lr) === "[object WeakSet]"; | |
} | |
bt.working = typeof WeakSet < "u" && bt(new WeakSet()); | |
function gt(lr) { | |
return bt(lr); | |
} | |
s.isWeakSet = gt; | |
function st(lr) { | |
return ot(lr) === "[object ArrayBuffer]"; | |
} | |
st.working = typeof ArrayBuffer < "u" && st(new ArrayBuffer()); | |
function pt(lr) { | |
return typeof ArrayBuffer > "u" | |
? !1 | |
: st.working | |
? st(lr) | |
: lr instanceof ArrayBuffer; | |
} | |
s.isArrayBuffer = pt; | |
function kt(lr) { | |
return ot(lr) === "[object DataView]"; | |
} | |
kt.working = | |
typeof ArrayBuffer < "u" && | |
typeof DataView < "u" && | |
kt(new DataView(new ArrayBuffer(1), 0, 1)); | |
function Qt(lr) { | |
return typeof DataView > "u" | |
? !1 | |
: kt.working | |
? kt(lr) | |
: lr instanceof DataView; | |
} | |
s.isDataView = Qt; | |
var Dt = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0; | |
function Zt(lr) { | |
return ot(lr) === "[object SharedArrayBuffer]"; | |
} | |
function Vt(lr) { | |
return typeof Dt > "u" | |
? !1 | |
: (typeof Zt.working > "u" && (Zt.working = Zt(new Dt())), | |
Zt.working ? Zt(lr) : lr instanceof Dt); | |
} | |
s.isSharedArrayBuffer = Vt; | |
function Ct(lr) { | |
return ot(lr) === "[object AsyncFunction]"; | |
} | |
s.isAsyncFunction = Ct; | |
function jt(lr) { | |
return ot(lr) === "[object Map Iterator]"; | |
} | |
s.isMapIterator = jt; | |
function Wt(lr) { | |
return ot(lr) === "[object Set Iterator]"; | |
} | |
s.isSetIterator = Wt; | |
function er(lr) { | |
return ot(lr) === "[object Generator]"; | |
} | |
s.isGeneratorObject = er; | |
function Gt(lr) { | |
return ot(lr) === "[object WebAssembly.Module]"; | |
} | |
s.isWebAssemblyCompiledModule = Gt; | |
function Ft(lr) { | |
return xt(lr, ct); | |
} | |
s.isNumberObject = Ft; | |
function rr(lr) { | |
return xt(lr, at); | |
} | |
s.isStringObject = rr; | |
function Sr(lr) { | |
return xt(lr, ht); | |
} | |
s.isBooleanObject = Sr; | |
function fr(lr) { | |
return rt && xt(lr, mt); | |
} | |
s.isBigIntObject = fr; | |
function dr(lr) { | |
return it && xt(lr, vt); | |
} | |
s.isSymbolObject = dr; | |
function Mr(lr) { | |
return Ft(lr) || rr(lr) || Sr(lr) || fr(lr) || dr(lr); | |
} | |
s.isBoxedPrimitive = Mr; | |
function yr(lr) { | |
return typeof Uint8Array < "u" && (pt(lr) || Vt(lr)); | |
} | |
(s.isAnyArrayBuffer = yr), | |
["isProxy", "isExternal", "isModuleNamespaceObject"].forEach( | |
function (lr) { | |
Object.defineProperty(s, lr, { | |
enumerable: !1, | |
value: function () { | |
throw new Error(lr + " is not supported in userland"); | |
}, | |
}); | |
}, | |
); | |
})(types$6); | |
var isBufferBrowser = function (o) { | |
return ( | |
o && | |
typeof o == "object" && | |
typeof o.copy == "function" && | |
typeof o.fill == "function" && | |
typeof o.readUInt8 == "function" | |
); | |
}, | |
inherits_browser = { exports: {} }; | |
typeof Object.create == "function" | |
? (inherits_browser.exports = function (o, _) { | |
_ && | |
((o.super_ = _), | |
(o.prototype = Object.create(_.prototype, { | |
constructor: { | |
value: o, | |
enumerable: !1, | |
writable: !0, | |
configurable: !0, | |
}, | |
}))); | |
}) | |
: (inherits_browser.exports = function (o, _) { | |
if (_) { | |
o.super_ = _; | |
var _e = function () {}; | |
(_e.prototype = _.prototype), | |
(o.prototype = new _e()), | |
(o.prototype.constructor = o); | |
} | |
}); | |
var inherits_browserExports = inherits_browser.exports; | |
(function (s) { | |
var o = {}, | |
_ = | |
Object.getOwnPropertyDescriptors || | |
function (Dt) { | |
for (var Zt = Object.keys(Dt), Vt = {}, Ct = 0; Ct < Zt.length; Ct++) | |
Vt[Zt[Ct]] = Object.getOwnPropertyDescriptor(Dt, Zt[Ct]); | |
return Vt; | |
}, | |
_e = /%[sdj%]/g; | |
(s.format = function (Qt) { | |
if (!Xt(Qt)) { | |
for (var Dt = [], Zt = 0; Zt < arguments.length; Zt++) | |
Dt.push(it(arguments[Zt])); | |
return Dt.join(" "); | |
} | |
for ( | |
var Zt = 1, | |
Vt = arguments, | |
Ct = Vt.length, | |
jt = String(Qt).replace(_e, function (er) { | |
if (er === "%%") return "%"; | |
if (Zt >= Ct) return er; | |
switch (er) { | |
case "%s": | |
return String(Vt[Zt++]); | |
case "%d": | |
return Number(Vt[Zt++]); | |
case "%j": | |
try { | |
return JSON.stringify(Vt[Zt++]); | |
} catch { | |
return "[Circular]"; | |
} | |
default: | |
return er; | |
} | |
}), | |
Wt = Vt[Zt]; | |
Zt < Ct; | |
Wt = Vt[++Zt] | |
) | |
Rt(Wt) || !nr(Wt) ? (jt += " " + Wt) : (jt += " " + it(Wt)); | |
return jt; | |
}), | |
(s.deprecate = function (Qt, Dt) { | |
if (typeof process$1 < "u" && process$1.noDeprecation === !0) return Qt; | |
if (typeof process$1 > "u") | |
return function () { | |
return s.deprecate(Qt, Dt).apply(this, arguments); | |
}; | |
var Zt = !1; | |
function Vt() { | |
if (!Zt) { | |
if (process$1.throwDeprecation) throw new Error(Dt); | |
process$1.traceDeprecation ? console.trace(Dt) : console.error(Dt), | |
(Zt = !0); | |
} | |
return Qt.apply(this, arguments); | |
} | |
return Vt; | |
}); | |
var et = {}, | |
tt = /^$/; | |
if (o.NODE_DEBUG) { | |
var rt = o.NODE_DEBUG; | |
(rt = rt | |
.replace(/[|\\{}()[\]^$+?.]/g, "\\$&") | |
.replace(/\*/g, ".*") | |
.replace(/,/g, "$|^") | |
.toUpperCase()), | |
(tt = new RegExp("^" + rt + "$", "i")); | |
} | |
s.debuglog = function (Qt) { | |
if (((Qt = Qt.toUpperCase()), !et[Qt])) | |
if (tt.test(Qt)) { | |
var Dt = process$1.pid; | |
et[Qt] = function () { | |
var Zt = s.format.apply(s, arguments); | |
console.error("%s %d: %s", Qt, Dt, Zt); | |
}; | |
} else et[Qt] = function () {}; | |
return et[Qt]; | |
}; | |
function it(Qt, Dt) { | |
var Zt = { seen: [], stylize: ct }; | |
return ( | |
arguments.length >= 3 && (Zt.depth = arguments[2]), | |
arguments.length >= 4 && (Zt.colors = arguments[3]), | |
_t(Dt) ? (Zt.showHidden = Dt) : Dt && s._extend(Zt, Dt), | |
Ht(Zt.showHidden) && (Zt.showHidden = !1), | |
Ht(Zt.depth) && (Zt.depth = 2), | |
Ht(Zt.colors) && (Zt.colors = !1), | |
Ht(Zt.customInspect) && (Zt.customInspect = !0), | |
Zt.colors && (Zt.stylize = ot), | |
ht(Zt, Qt, Zt.depth) | |
); | |
} | |
(s.inspect = it), | |
(it.colors = { | |
bold: [1, 22], | |
italic: [3, 23], | |
underline: [4, 24], | |
inverse: [7, 27], | |
white: [37, 39], | |
grey: [90, 39], | |
black: [30, 39], | |
blue: [34, 39], | |
cyan: [36, 39], | |
green: [32, 39], | |
magenta: [35, 39], | |
red: [31, 39], | |
yellow: [33, 39], | |
}), | |
(it.styles = { | |
special: "cyan", | |
number: "yellow", | |
boolean: "yellow", | |
undefined: "grey", | |
null: "bold", | |
string: "green", | |
date: "magenta", | |
regexp: "red", | |
}); | |
function ot(Qt, Dt) { | |
var Zt = it.styles[Dt]; | |
return Zt | |
? "\x1B[" + | |
it.colors[Zt][0] + | |
"m" + | |
Qt + | |
"\x1B[" + | |
it.colors[Zt][1] + | |
"m" | |
: Qt; | |
} | |
function ct(Qt, Dt) { | |
return Qt; | |
} | |
function at(Qt) { | |
var Dt = {}; | |
return ( | |
Qt.forEach(function (Zt, Vt) { | |
Dt[Zt] = !0; | |
}), | |
Dt | |
); | |
} | |
function ht(Qt, Dt, Zt) { | |
if ( | |
Qt.customInspect && | |
Dt && | |
ut(Dt.inspect) && | |
Dt.inspect !== s.inspect && | |
!(Dt.constructor && Dt.constructor.prototype === Dt) | |
) { | |
var Vt = Dt.inspect(Zt, Qt); | |
return Xt(Vt) || (Vt = ht(Qt, Vt, Zt)), Vt; | |
} | |
var Ct = mt(Qt, Dt); | |
if (Ct) return Ct; | |
var jt = Object.keys(Dt), | |
Wt = at(jt); | |
if ( | |
(Qt.showHidden && (jt = Object.getOwnPropertyNames(Dt)), | |
nt(Dt) && | |
(jt.indexOf("message") >= 0 || jt.indexOf("description") >= 0)) | |
) | |
return vt(Dt); | |
if (jt.length === 0) { | |
if (ut(Dt)) { | |
var er = Dt.name ? ": " + Dt.name : ""; | |
return Qt.stylize("[Function" + er + "]", "special"); | |
} | |
if (qt(Dt)) | |
return Qt.stylize(RegExp.prototype.toString.call(Dt), "regexp"); | |
if (wt(Dt)) return Qt.stylize(Date.prototype.toString.call(Dt), "date"); | |
if (nt(Dt)) return vt(Dt); | |
} | |
var Gt = "", | |
Ft = !1, | |
rr = ["{", "}"]; | |
if ((Et(Dt) && ((Ft = !0), (rr = ["[", "]"])), ut(Dt))) { | |
var Sr = Dt.name ? ": " + Dt.name : ""; | |
Gt = " [Function" + Sr + "]"; | |
} | |
if ( | |
(qt(Dt) && (Gt = " " + RegExp.prototype.toString.call(Dt)), | |
wt(Dt) && (Gt = " " + Date.prototype.toUTCString.call(Dt)), | |
nt(Dt) && (Gt = " " + vt(Dt)), | |
jt.length === 0 && (!Ft || Dt.length == 0)) | |
) | |
return rr[0] + Gt + rr[1]; | |
if (Zt < 0) | |
return qt(Dt) | |
? Qt.stylize(RegExp.prototype.toString.call(Dt), "regexp") | |
: Qt.stylize("[Object]", "special"); | |
Qt.seen.push(Dt); | |
var fr; | |
return ( | |
Ft | |
? (fr = xt(Qt, Dt, Zt, Wt, jt)) | |
: (fr = jt.map(function (dr) { | |
return St(Qt, Dt, Zt, Wt, dr, Ft); | |
})), | |
Qt.seen.pop(), | |
$t(fr, Gt, rr) | |
); | |
} | |
function mt(Qt, Dt) { | |
if (Ht(Dt)) return Qt.stylize("undefined", "undefined"); | |
if (Xt(Dt)) { | |
var Zt = | |
"'" + | |
JSON.stringify(Dt) | |
.replace(/^"|"$/g, "") | |
.replace(/'/g, "\\'") | |
.replace(/\\"/g, '"') + | |
"'"; | |
return Qt.stylize(Zt, "string"); | |
} | |
if (It(Dt)) return Qt.stylize("" + Dt, "number"); | |
if (_t(Dt)) return Qt.stylize("" + Dt, "boolean"); | |
if (Rt(Dt)) return Qt.stylize("null", "null"); | |
} | |
function vt(Qt) { | |
return "[" + Error.prototype.toString.call(Qt) + "]"; | |
} | |
function xt(Qt, Dt, Zt, Vt, Ct) { | |
for (var jt = [], Wt = 0, er = Dt.length; Wt < er; ++Wt) | |
gt(Dt, String(Wt)) | |
? jt.push(St(Qt, Dt, Zt, Vt, String(Wt), !0)) | |
: jt.push(""); | |
return ( | |
Ct.forEach(function (Gt) { | |
Gt.match(/^\d+$/) || jt.push(St(Qt, Dt, Zt, Vt, Gt, !0)); | |
}), | |
jt | |
); | |
} | |
function St(Qt, Dt, Zt, Vt, Ct, jt) { | |
var Wt, er, Gt; | |
if ( | |
((Gt = Object.getOwnPropertyDescriptor(Dt, Ct) || { value: Dt[Ct] }), | |
Gt.get | |
? Gt.set | |
? (er = Qt.stylize("[Getter/Setter]", "special")) | |
: (er = Qt.stylize("[Getter]", "special")) | |
: Gt.set && (er = Qt.stylize("[Setter]", "special")), | |
gt(Vt, Ct) || (Wt = "[" + Ct + "]"), | |
er || | |
(Qt.seen.indexOf(Gt.value) < 0 | |
? (Rt(Zt) | |
? (er = ht(Qt, Gt.value, null)) | |
: (er = ht(Qt, Gt.value, Zt - 1)), | |
er.indexOf(` | |
`) > -1 && | |
(jt | |
? (er = er | |
.split( | |
` | |
`, | |
) | |
.map(function (Ft) { | |
return " " + Ft; | |
}) | |
.join( | |
` | |
`, | |
) | |
.slice(2)) | |
: (er = | |
` | |
` + | |
er | |
.split( | |
` | |
`, | |
) | |
.map(function (Ft) { | |
return " " + Ft; | |
}).join(` | |
`)))) | |
: (er = Qt.stylize("[Circular]", "special"))), | |
Ht(Wt)) | |
) { | |
if (jt && Ct.match(/^\d+$/)) return er; | |
(Wt = JSON.stringify("" + Ct)), | |
Wt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) | |
? ((Wt = Wt.slice(1, -1)), (Wt = Qt.stylize(Wt, "name"))) | |
: ((Wt = Wt.replace(/'/g, "\\'") | |
.replace(/\\"/g, '"') | |
.replace(/(^"|"$)/g, "'")), | |
(Wt = Qt.stylize(Wt, "string"))); | |
} | |
return Wt + ": " + er; | |
} | |
function $t(Qt, Dt, Zt) { | |
var Vt = Qt.reduce(function (Ct, jt) { | |
return ( | |
jt.indexOf(` | |
`) >= 0, | |
Ct + jt.replace(/\u001b\[\d\d?m/g, "").length + 1 | |
); | |
}, 0); | |
return Vt > 60 | |
? Zt[0] + | |
(Dt === "" | |
? "" | |
: Dt + | |
` | |
`) + | |
" " + | |
Qt.join(`, | |
`) + | |
" " + | |
Zt[1] | |
: Zt[0] + Dt + " " + Qt.join(", ") + " " + Zt[1]; | |
} | |
s.types = types$6; | |
function Et(Qt) { | |
return Array.isArray(Qt); | |
} | |
s.isArray = Et; | |
function _t(Qt) { | |
return typeof Qt == "boolean"; | |
} | |
s.isBoolean = _t; | |
function Rt(Qt) { | |
return Qt === null; | |
} | |
s.isNull = Rt; | |
function Mt(Qt) { | |
return Qt == null; | |
} | |
s.isNullOrUndefined = Mt; | |
function It(Qt) { | |
return typeof Qt == "number"; | |
} | |
s.isNumber = It; | |
function Xt(Qt) { | |
return typeof Qt == "string"; | |
} | |
s.isString = Xt; | |
function Jt(Qt) { | |
return typeof Qt == "symbol"; | |
} | |
s.isSymbol = Jt; | |
function Ht(Qt) { | |
return Qt === void 0; | |
} | |
s.isUndefined = Ht; | |
function qt(Qt) { | |
return nr(Qt) && dt(Qt) === "[object RegExp]"; | |
} | |
(s.isRegExp = qt), (s.types.isRegExp = qt); | |
function nr(Qt) { | |
return typeof Qt == "object" && Qt !== null; | |
} | |
s.isObject = nr; | |
function wt(Qt) { | |
return nr(Qt) && dt(Qt) === "[object Date]"; | |
} | |
(s.isDate = wt), (s.types.isDate = wt); | |
function nt(Qt) { | |
return nr(Qt) && (dt(Qt) === "[object Error]" || Qt instanceof Error); | |
} | |
(s.isError = nt), (s.types.isNativeError = nt); | |
function ut(Qt) { | |
return typeof Qt == "function"; | |
} | |
s.isFunction = ut; | |
function ft(Qt) { | |
return ( | |
Qt === null || | |
typeof Qt == "boolean" || | |
typeof Qt == "number" || | |
typeof Qt == "string" || | |
typeof Qt == "symbol" || | |
typeof Qt > "u" | |
); | |
} | |
(s.isPrimitive = ft), (s.isBuffer = isBufferBrowser); | |
function dt(Qt) { | |
return Object.prototype.toString.call(Qt); | |
} | |
function Ot(Qt) { | |
return Qt < 10 ? "0" + Qt.toString(10) : Qt.toString(10); | |
} | |
var yt = [ | |
"Jan", | |
"Feb", | |
"Mar", | |
"Apr", | |
"May", | |
"Jun", | |
"Jul", | |
"Aug", | |
"Sep", | |
"Oct", | |
"Nov", | |
"Dec", | |
]; | |
function bt() { | |
var Qt = new Date(), | |
Dt = [Ot(Qt.getHours()), Ot(Qt.getMinutes()), Ot(Qt.getSeconds())].join( | |
":", | |
); | |
return [Qt.getDate(), yt[Qt.getMonth()], Dt].join(" "); | |
} | |
(s.log = function () { | |
console.log("%s - %s", bt(), s.format.apply(s, arguments)); | |
}), | |
(s.inherits = inherits_browserExports), | |
(s._extend = function (Qt, Dt) { | |
if (!Dt || !nr(Dt)) return Qt; | |
for (var Zt = Object.keys(Dt), Vt = Zt.length; Vt--; ) | |
Qt[Zt[Vt]] = Dt[Zt[Vt]]; | |
return Qt; | |
}); | |
function gt(Qt, Dt) { | |
return Object.prototype.hasOwnProperty.call(Qt, Dt); | |
} | |
var st = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0; | |
(s.promisify = function (Dt) { | |
if (typeof Dt != "function") | |
throw new TypeError('The "original" argument must be of type Function'); | |
if (st && Dt[st]) { | |
var Zt = Dt[st]; | |
if (typeof Zt != "function") | |
throw new TypeError( | |
'The "util.promisify.custom" argument must be of type Function', | |
); | |
return ( | |
Object.defineProperty(Zt, st, { | |
value: Zt, | |
enumerable: !1, | |
writable: !1, | |
configurable: !0, | |
}), | |
Zt | |
); | |
} | |
function Zt() { | |
for ( | |
var Vt, | |
Ct, | |
jt = new Promise(function (Gt, Ft) { | |
(Vt = Gt), (Ct = Ft); | |
}), | |
Wt = [], | |
er = 0; | |
er < arguments.length; | |
er++ | |
) | |
Wt.push(arguments[er]); | |
Wt.push(function (Gt, Ft) { | |
Gt ? Ct(Gt) : Vt(Ft); | |
}); | |
try { | |
Dt.apply(this, Wt); | |
} catch (Gt) { | |
Ct(Gt); | |
} | |
return jt; | |
} | |
return ( | |
Object.setPrototypeOf(Zt, Object.getPrototypeOf(Dt)), | |
st && | |
Object.defineProperty(Zt, st, { | |
value: Zt, | |
enumerable: !1, | |
writable: !1, | |
configurable: !0, | |
}), | |
Object.defineProperties(Zt, _(Dt)) | |
); | |
}), | |
(s.promisify.custom = st); | |
function pt(Qt, Dt) { | |
if (!Qt) { | |
var Zt = new Error("Promise was rejected with a falsy value"); | |
(Zt.reason = Qt), (Qt = Zt); | |
} | |
return Dt(Qt); | |
} | |
function kt(Qt) { | |
if (typeof Qt != "function") | |
throw new TypeError('The "original" argument must be of type Function'); | |
function Dt() { | |
for (var Zt = [], Vt = 0; Vt < arguments.length; Vt++) | |
Zt.push(arguments[Vt]); | |
var Ct = Zt.pop(); | |
if (typeof Ct != "function") | |
throw new TypeError("The last argument must be of type Function"); | |
var jt = this, | |
Wt = function () { | |
return Ct.apply(jt, arguments); | |
}; | |
Qt.apply(this, Zt).then( | |
function (er) { | |
process$1.nextTick(Wt.bind(null, null, er)); | |
}, | |
function (er) { | |
process$1.nextTick(pt.bind(null, er, Wt)); | |
}, | |
); | |
} | |
return ( | |
Object.setPrototypeOf(Dt, Object.getPrototypeOf(Qt)), | |
Object.defineProperties(Dt, _(Qt)), | |
Dt | |
); | |
} | |
s.callbackify = kt; | |
})(util$3); | |
var connect$2 = { exports: {} }, | |
immutable = extend$4, | |
hasOwnProperty$4 = Object.prototype.hasOwnProperty; | |
function extend$4() { | |
for (var s = {}, o = 0; o < arguments.length; o++) { | |
var _ = arguments[o]; | |
for (var _e in _) hasOwnProperty$4.call(_, _e) && (s[_e] = _[_e]); | |
} | |
return s; | |
} | |
var readableBrowser$2 = { exports: {} }, | |
streamBrowser$2 = eventsExports.EventEmitter, | |
buffer$3 = {}, | |
base64Js = {}; | |
base64Js.byteLength = byteLength$1; | |
base64Js.toByteArray = toByteArray; | |
base64Js.fromByteArray = fromByteArray; | |
var lookup = [], | |
revLookup = [], | |
Arr = typeof Uint8Array < "u" ? Uint8Array : Array, | |
code$2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; | |
for (var i$1 = 0, len = code$2.length; i$1 < len; ++i$1) | |
(lookup[i$1] = code$2[i$1]), (revLookup[code$2.charCodeAt(i$1)] = i$1); | |
revLookup[45] = 62; | |
revLookup[95] = 63; | |
function getLens(s) { | |
var o = s.length; | |
if (o % 4 > 0) | |
throw new Error("Invalid string. Length must be a multiple of 4"); | |
var _ = s.indexOf("="); | |
_ === -1 && (_ = o); | |
var _e = _ === o ? 0 : 4 - (_ % 4); | |
return [_, _e]; | |
} | |
function byteLength$1(s) { | |
var o = getLens(s), | |
_ = o[0], | |
_e = o[1]; | |
return ((_ + _e) * 3) / 4 - _e; | |
} | |
function _byteLength(s, o, _) { | |
return ((o + _) * 3) / 4 - _; | |
} | |
function toByteArray(s) { | |
var o, | |
_ = getLens(s), | |
_e = _[0], | |
et = _[1], | |
tt = new Arr(_byteLength(s, _e, et)), | |
rt = 0, | |
it = et > 0 ? _e - 4 : _e, | |
ot; | |
for (ot = 0; ot < it; ot += 4) | |
(o = | |
(revLookup[s.charCodeAt(ot)] << 18) | | |
(revLookup[s.charCodeAt(ot + 1)] << 12) | | |
(revLookup[s.charCodeAt(ot + 2)] << 6) | | |
revLookup[s.charCodeAt(ot + 3)]), | |
(tt[rt++] = (o >> 16) & 255), | |
(tt[rt++] = (o >> 8) & 255), | |
(tt[rt++] = o & 255); | |
return ( | |
et === 2 && | |
((o = | |
(revLookup[s.charCodeAt(ot)] << 2) | | |
(revLookup[s.charCodeAt(ot + 1)] >> 4)), | |
(tt[rt++] = o & 255)), | |
et === 1 && | |
((o = | |
(revLookup[s.charCodeAt(ot)] << 10) | | |
(revLookup[s.charCodeAt(ot + 1)] << 4) | | |
(revLookup[s.charCodeAt(ot + 2)] >> 2)), | |
(tt[rt++] = (o >> 8) & 255), | |
(tt[rt++] = o & 255)), | |
tt | |
); | |
} | |
function tripletToBase64(s) { | |
return ( | |
lookup[(s >> 18) & 63] + | |
lookup[(s >> 12) & 63] + | |
lookup[(s >> 6) & 63] + | |
lookup[s & 63] | |
); | |
} | |
function encodeChunk(s, o, _) { | |
for (var _e, et = [], tt = o; tt < _; tt += 3) | |
(_e = | |
((s[tt] << 16) & 16711680) + | |
((s[tt + 1] << 8) & 65280) + | |
(s[tt + 2] & 255)), | |
et.push(tripletToBase64(_e)); | |
return et.join(""); | |
} | |
function fromByteArray(s) { | |
for ( | |
var o, _ = s.length, _e = _ % 3, et = [], tt = 16383, rt = 0, it = _ - _e; | |
rt < it; | |
rt += tt | |
) | |
et.push(encodeChunk(s, rt, rt + tt > it ? it : rt + tt)); | |
return ( | |
_e === 1 | |
? ((o = s[_ - 1]), | |
et.push(lookup[o >> 2] + lookup[(o << 4) & 63] + "==")) | |
: _e === 2 && | |
((o = (s[_ - 2] << 8) + s[_ - 1]), | |
et.push( | |
lookup[o >> 10] + | |
lookup[(o >> 4) & 63] + | |
lookup[(o << 2) & 63] + | |
"=", | |
)), | |
et.join("") | |
); | |
} | |
var ieee754 = {}; | |
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ ieee754.read = | |
function (s, o, _, _e, et) { | |
var tt, | |
rt, | |
it = et * 8 - _e - 1, | |
ot = (1 << it) - 1, | |
ct = ot >> 1, | |
at = -7, | |
ht = _ ? et - 1 : 0, | |
mt = _ ? -1 : 1, | |
vt = s[o + ht]; | |
for ( | |
ht += mt, tt = vt & ((1 << -at) - 1), vt >>= -at, at += it; | |
at > 0; | |
tt = tt * 256 + s[o + ht], ht += mt, at -= 8 | |
); | |
for ( | |
rt = tt & ((1 << -at) - 1), tt >>= -at, at += _e; | |
at > 0; | |
rt = rt * 256 + s[o + ht], ht += mt, at -= 8 | |
); | |
if (tt === 0) tt = 1 - ct; | |
else { | |
if (tt === ot) return rt ? NaN : (vt ? -1 : 1) * (1 / 0); | |
(rt = rt + Math.pow(2, _e)), (tt = tt - ct); | |
} | |
return (vt ? -1 : 1) * rt * Math.pow(2, tt - _e); | |
}; | |
ieee754.write = function (s, o, _, _e, et, tt) { | |
var rt, | |
it, | |
ot, | |
ct = tt * 8 - et - 1, | |
at = (1 << ct) - 1, | |
ht = at >> 1, | |
mt = et === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, | |
vt = _e ? 0 : tt - 1, | |
xt = _e ? 1 : -1, | |
St = o < 0 || (o === 0 && 1 / o < 0) ? 1 : 0; | |
for ( | |
o = Math.abs(o), | |
isNaN(o) || o === 1 / 0 | |
? ((it = isNaN(o) ? 1 : 0), (rt = at)) | |
: ((rt = Math.floor(Math.log(o) / Math.LN2)), | |
o * (ot = Math.pow(2, -rt)) < 1 && (rt--, (ot *= 2)), | |
rt + ht >= 1 ? (o += mt / ot) : (o += mt * Math.pow(2, 1 - ht)), | |
o * ot >= 2 && (rt++, (ot /= 2)), | |
rt + ht >= at | |
? ((it = 0), (rt = at)) | |
: rt + ht >= 1 | |
? ((it = (o * ot - 1) * Math.pow(2, et)), (rt = rt + ht)) | |
: ((it = o * Math.pow(2, ht - 1) * Math.pow(2, et)), (rt = 0))); | |
et >= 8; | |
s[_ + vt] = it & 255, vt += xt, it /= 256, et -= 8 | |
); | |
for ( | |
rt = (rt << et) | it, ct += et; | |
ct > 0; | |
s[_ + vt] = rt & 255, vt += xt, rt /= 256, ct -= 8 | |
); | |
s[_ + vt - xt] |= St * 128; | |
}; | |
/*! | |
* The buffer module from node.js, for the browser. | |
* | |
* @author Feross Aboukhadijeh <https://feross.org> | |
* @license MIT | |
*/ (function (s) { | |
const o = base64Js, | |
_ = ieee754, | |
_e = | |
typeof Symbol == "function" && typeof Symbol.for == "function" | |
? Symbol.for("nodejs.util.inspect.custom") | |
: null; | |
(s.Buffer = at), (s.SlowBuffer = It), (s.INSPECT_MAX_BYTES = 50); | |
const et = 2147483647; | |
s.kMaxLength = et; | |
const { | |
Uint8Array: tt, | |
ArrayBuffer: rt, | |
SharedArrayBuffer: it, | |
} = globalThis; | |
(at.TYPED_ARRAY_SUPPORT = ot()), | |
!at.TYPED_ARRAY_SUPPORT && | |
typeof console < "u" && | |
typeof console.error == "function" && | |
console.error( | |
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.", | |
); | |
function ot() { | |
try { | |
const Kt = new tt(1), | |
Bt = { | |
foo: function () { | |
return 42; | |
}, | |
}; | |
return ( | |
Object.setPrototypeOf(Bt, tt.prototype), | |
Object.setPrototypeOf(Kt, Bt), | |
Kt.foo() === 42 | |
); | |
} catch { | |
return !1; | |
} | |
} | |
Object.defineProperty(at.prototype, "parent", { | |
enumerable: !0, | |
get: function () { | |
if (at.isBuffer(this)) return this.buffer; | |
}, | |
}), | |
Object.defineProperty(at.prototype, "offset", { | |
enumerable: !0, | |
get: function () { | |
if (at.isBuffer(this)) return this.byteOffset; | |
}, | |
}); | |
function ct(Kt) { | |
if (Kt > et) | |
throw new RangeError( | |
'The value "' + Kt + '" is invalid for option "size"', | |
); | |
const Bt = new tt(Kt); | |
return Object.setPrototypeOf(Bt, at.prototype), Bt; | |
} | |
function at(Kt, Bt, Ut) { | |
if (typeof Kt == "number") { | |
if (typeof Bt == "string") | |
throw new TypeError( | |
'The "string" argument must be of type string. Received type number', | |
); | |
return xt(Kt); | |
} | |
return ht(Kt, Bt, Ut); | |
} | |
at.poolSize = 8192; | |
function ht(Kt, Bt, Ut) { | |
if (typeof Kt == "string") return St(Kt, Bt); | |
if (rt.isView(Kt)) return Et(Kt); | |
if (Kt == null) | |
throw new TypeError( | |
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + | |
typeof Kt, | |
); | |
if ( | |
_r(Kt, rt) || | |
(Kt && _r(Kt.buffer, rt)) || | |
(typeof it < "u" && (_r(Kt, it) || (Kt && _r(Kt.buffer, it)))) | |
) | |
return _t(Kt, Bt, Ut); | |
if (typeof Kt == "number") | |
throw new TypeError( | |
'The "value" argument must not be of type number. Received type number', | |
); | |
const tr = Kt.valueOf && Kt.valueOf(); | |
if (tr != null && tr !== Kt) return at.from(tr, Bt, Ut); | |
const or = Rt(Kt); | |
if (or) return or; | |
if ( | |
typeof Symbol < "u" && | |
Symbol.toPrimitive != null && | |
typeof Kt[Symbol.toPrimitive] == "function" | |
) | |
return at.from(Kt[Symbol.toPrimitive]("string"), Bt, Ut); | |
throw new TypeError( | |
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + | |
typeof Kt, | |
); | |
} | |
(at.from = function (Kt, Bt, Ut) { | |
return ht(Kt, Bt, Ut); | |
}), | |
Object.setPrototypeOf(at.prototype, tt.prototype), | |
Object.setPrototypeOf(at, tt); | |
function mt(Kt) { | |
if (typeof Kt != "number") | |
throw new TypeError('"size" argument must be of type number'); | |
if (Kt < 0) | |
throw new RangeError( | |
'The value "' + Kt + '" is invalid for option "size"', | |
); | |
} | |
function vt(Kt, Bt, Ut) { | |
return ( | |
mt(Kt), | |
Kt <= 0 | |
? ct(Kt) | |
: Bt !== void 0 | |
? typeof Ut == "string" | |
? ct(Kt).fill(Bt, Ut) | |
: ct(Kt).fill(Bt) | |
: ct(Kt) | |
); | |
} | |
at.alloc = function (Kt, Bt, Ut) { | |
return vt(Kt, Bt, Ut); | |
}; | |
function xt(Kt) { | |
return mt(Kt), ct(Kt < 0 ? 0 : Mt(Kt) | 0); | |
} | |
(at.allocUnsafe = function (Kt) { | |
return xt(Kt); | |
}), | |
(at.allocUnsafeSlow = function (Kt) { | |
return xt(Kt); | |
}); | |
function St(Kt, Bt) { | |
if ( | |
((typeof Bt != "string" || Bt === "") && (Bt = "utf8"), | |
!at.isEncoding(Bt)) | |
) | |
throw new TypeError("Unknown encoding: " + Bt); | |
const Ut = Xt(Kt, Bt) | 0; | |
let tr = ct(Ut); | |
const or = tr.write(Kt, Bt); | |
return or !== Ut && (tr = tr.slice(0, or)), tr; | |
} | |
function $t(Kt) { | |
const Bt = Kt.length < 0 ? 0 : Mt(Kt.length) | 0, | |
Ut = ct(Bt); | |
for (let tr = 0; tr < Bt; tr += 1) Ut[tr] = Kt[tr] & 255; | |
return Ut; | |
} | |
function Et(Kt) { | |
if (_r(Kt, tt)) { | |
const Bt = new tt(Kt); | |
return _t(Bt.buffer, Bt.byteOffset, Bt.byteLength); | |
} | |
return $t(Kt); | |
} | |
function _t(Kt, Bt, Ut) { | |
if (Bt < 0 || Kt.byteLength < Bt) | |
throw new RangeError('"offset" is outside of buffer bounds'); | |
if (Kt.byteLength < Bt + (Ut || 0)) | |
throw new RangeError('"length" is outside of buffer bounds'); | |
let tr; | |
return ( | |
Bt === void 0 && Ut === void 0 | |
? (tr = new tt(Kt)) | |
: Ut === void 0 | |
? (tr = new tt(Kt, Bt)) | |
: (tr = new tt(Kt, Bt, Ut)), | |
Object.setPrototypeOf(tr, at.prototype), | |
tr | |
); | |
} | |
function Rt(Kt) { | |
if (at.isBuffer(Kt)) { | |
const Bt = Mt(Kt.length) | 0, | |
Ut = ct(Bt); | |
return Ut.length === 0 || Kt.copy(Ut, 0, 0, Bt), Ut; | |
} | |
if (Kt.length !== void 0) | |
return typeof Kt.length != "number" || tn(Kt.length) ? ct(0) : $t(Kt); | |
if (Kt.type === "Buffer" && Array.isArray(Kt.data)) return $t(Kt.data); | |
} | |
function Mt(Kt) { | |
if (Kt >= et) | |
throw new RangeError( | |
"Attempt to allocate Buffer larger than maximum size: 0x" + | |
et.toString(16) + | |
" bytes", | |
); | |
return Kt | 0; | |
} | |
function It(Kt) { | |
return +Kt != Kt && (Kt = 0), at.alloc(+Kt); | |
} | |
(at.isBuffer = function (Bt) { | |
return Bt != null && Bt._isBuffer === !0 && Bt !== at.prototype; | |
}), | |
(at.compare = function (Bt, Ut) { | |
if ( | |
(_r(Bt, tt) && (Bt = at.from(Bt, Bt.offset, Bt.byteLength)), | |
_r(Ut, tt) && (Ut = at.from(Ut, Ut.offset, Ut.byteLength)), | |
!at.isBuffer(Bt) || !at.isBuffer(Ut)) | |
) | |
throw new TypeError( | |
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array', | |
); | |
if (Bt === Ut) return 0; | |
let tr = Bt.length, | |
or = Ut.length; | |
for (let Or = 0, ur = Math.min(tr, or); Or < ur; ++Or) | |
if (Bt[Or] !== Ut[Or]) { | |
(tr = Bt[Or]), (or = Ut[Or]); | |
break; | |
} | |
return tr < or ? -1 : or < tr ? 1 : 0; | |
}), | |
(at.isEncoding = function (Bt) { | |
switch (String(Bt).toLowerCase()) { | |
case "hex": | |
case "utf8": | |
case "utf-8": | |
case "ascii": | |
case "latin1": | |
case "binary": | |
case "base64": | |
case "ucs2": | |
case "ucs-2": | |
case "utf16le": | |
case "utf-16le": | |
return !0; | |
default: | |
return !1; | |
} | |
}), | |
(at.concat = function (Bt, Ut) { | |
if (!Array.isArray(Bt)) | |
throw new TypeError('"list" argument must be an Array of Buffers'); | |
if (Bt.length === 0) return at.alloc(0); | |
let tr; | |
if (Ut === void 0) | |
for (Ut = 0, tr = 0; tr < Bt.length; ++tr) Ut += Bt[tr].length; | |
const or = at.allocUnsafe(Ut); | |
let Or = 0; | |
for (tr = 0; tr < Bt.length; ++tr) { | |
let ur = Bt[tr]; | |
if (_r(ur, tt)) | |
Or + ur.length > or.length | |
? (at.isBuffer(ur) || (ur = at.from(ur)), ur.copy(or, Or)) | |
: tt.prototype.set.call(or, ur, Or); | |
else if (at.isBuffer(ur)) ur.copy(or, Or); | |
else | |
throw new TypeError('"list" argument must be an Array of Buffers'); | |
Or += ur.length; | |
} | |
return or; | |
}); | |
function Xt(Kt, Bt) { | |
if (at.isBuffer(Kt)) return Kt.length; | |
if (rt.isView(Kt) || _r(Kt, rt)) return Kt.byteLength; | |
if (typeof Kt != "string") | |
throw new TypeError( | |
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + | |
typeof Kt, | |
); | |
const Ut = Kt.length, | |
tr = arguments.length > 2 && arguments[2] === !0; | |
if (!tr && Ut === 0) return 0; | |
let or = !1; | |
for (;;) | |
switch (Bt) { | |
case "ascii": | |
case "latin1": | |
case "binary": | |
return Ut; | |
case "utf8": | |
case "utf-8": | |
return Gr(Kt).length; | |
case "ucs2": | |
case "ucs-2": | |
case "utf16le": | |
case "utf-16le": | |
return Ut * 2; | |
case "hex": | |
return Ut >>> 1; | |
case "base64": | |
return Jr(Kt).length; | |
default: | |
if (or) return tr ? -1 : Gr(Kt).length; | |
(Bt = ("" + Bt).toLowerCase()), (or = !0); | |
} | |
} | |
at.byteLength = Xt; | |
function Jt(Kt, Bt, Ut) { | |
let tr = !1; | |
if ( | |
((Bt === void 0 || Bt < 0) && (Bt = 0), | |
Bt > this.length || | |
((Ut === void 0 || Ut > this.length) && (Ut = this.length), | |
Ut <= 0) || | |
((Ut >>>= 0), (Bt >>>= 0), Ut <= Bt)) | |
) | |
return ""; | |
for (Kt || (Kt = "utf8"); ; ) | |
switch (Kt) { | |
case "hex": | |
return kt(this, Bt, Ut); | |
case "utf8": | |
case "utf-8": | |
return yt(this, Bt, Ut); | |
case "ascii": | |
return st(this, Bt, Ut); | |
case "latin1": | |
case "binary": | |
return pt(this, Bt, Ut); | |
case "base64": | |
return Ot(this, Bt, Ut); | |
case "ucs2": | |
case "ucs-2": | |
case "utf16le": | |
case "utf-16le": | |
return Qt(this, Bt, Ut); | |
default: | |
if (tr) throw new TypeError("Unknown encoding: " + Kt); | |
(Kt = (Kt + "").toLowerCase()), (tr = !0); | |
} | |
} | |
at.prototype._isBuffer = !0; | |
function Ht(Kt, Bt, Ut) { | |
const tr = Kt[Bt]; | |
(Kt[Bt] = Kt[Ut]), (Kt[Ut] = tr); | |
} | |
(at.prototype.swap16 = function () { | |
const Bt = this.length; | |
if (Bt % 2 !== 0) | |
throw new RangeError("Buffer size must be a multiple of 16-bits"); | |
for (let Ut = 0; Ut < Bt; Ut += 2) Ht(this, Ut, Ut + 1); | |
return this; | |
}), | |
(at.prototype.swap32 = function () { | |
const Bt = this.length; | |
if (Bt % 4 !== 0) | |
throw new RangeError("Buffer size must be a multiple of 32-bits"); | |
for (let Ut = 0; Ut < Bt; Ut += 4) | |
Ht(this, Ut, Ut + 3), Ht(this, Ut + 1, Ut + 2); | |
return this; | |
}), | |
(at.prototype.swap64 = function () { | |
const Bt = this.length; | |
if (Bt % 8 !== 0) | |
throw new RangeError("Buffer size must be a multiple of 64-bits"); | |
for (let Ut = 0; Ut < Bt; Ut += 8) | |
Ht(this, Ut, Ut + 7), | |
Ht(this, Ut + 1, Ut + 6), | |
Ht(this, Ut + 2, Ut + 5), | |
Ht(this, Ut + 3, Ut + 4); | |
return this; | |
}), | |
(at.prototype.toString = function () { | |
const Bt = this.length; | |
return Bt === 0 | |
? "" | |
: arguments.length === 0 | |
? yt(this, 0, Bt) | |
: Jt.apply(this, arguments); | |
}), | |
(at.prototype.toLocaleString = at.prototype.toString), | |
(at.prototype.equals = function (Bt) { | |
if (!at.isBuffer(Bt)) throw new TypeError("Argument must be a Buffer"); | |
return this === Bt ? !0 : at.compare(this, Bt) === 0; | |
}), | |
(at.prototype.inspect = function () { | |
let Bt = ""; | |
const Ut = s.INSPECT_MAX_BYTES; | |
return ( | |
(Bt = this.toString("hex", 0, Ut) | |
.replace(/(.{2})/g, "$1 ") | |
.trim()), | |
this.length > Ut && (Bt += " ... "), | |
"<Buffer " + Bt + ">" | |
); | |
}), | |
_e && (at.prototype[_e] = at.prototype.inspect), | |
(at.prototype.compare = function (Bt, Ut, tr, or, Or) { | |
if ( | |
(_r(Bt, tt) && (Bt = at.from(Bt, Bt.offset, Bt.byteLength)), | |
!at.isBuffer(Bt)) | |
) | |
throw new TypeError( | |
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + | |
typeof Bt, | |
); | |
if ( | |
(Ut === void 0 && (Ut = 0), | |
tr === void 0 && (tr = Bt ? Bt.length : 0), | |
or === void 0 && (or = 0), | |
Or === void 0 && (Or = this.length), | |
Ut < 0 || tr > Bt.length || or < 0 || Or > this.length) | |
) | |
throw new RangeError("out of range index"); | |
if (or >= Or && Ut >= tr) return 0; | |
if (or >= Or) return -1; | |
if (Ut >= tr) return 1; | |
if (((Ut >>>= 0), (tr >>>= 0), (or >>>= 0), (Or >>>= 0), this === Bt)) | |
return 0; | |
let ur = Or - or, | |
xr = tr - Ut; | |
const Kr = Math.min(ur, xr), | |
vr = this.slice(or, Or), | |
Pr = Bt.slice(Ut, tr); | |
for (let _i = 0; _i < Kr; ++_i) | |
if (vr[_i] !== Pr[_i]) { | |
(ur = vr[_i]), (xr = Pr[_i]); | |
break; | |
} | |
return ur < xr ? -1 : xr < ur ? 1 : 0; | |
}); | |
function qt(Kt, Bt, Ut, tr, or) { | |
if (Kt.length === 0) return -1; | |
if ( | |
(typeof Ut == "string" | |
? ((tr = Ut), (Ut = 0)) | |
: Ut > 2147483647 | |
? (Ut = 2147483647) | |
: Ut < -2147483648 && (Ut = -2147483648), | |
(Ut = +Ut), | |
tn(Ut) && (Ut = or ? 0 : Kt.length - 1), | |
Ut < 0 && (Ut = Kt.length + Ut), | |
Ut >= Kt.length) | |
) { | |
if (or) return -1; | |
Ut = Kt.length - 1; | |
} else if (Ut < 0) | |
if (or) Ut = 0; | |
else return -1; | |
if ((typeof Bt == "string" && (Bt = at.from(Bt, tr)), at.isBuffer(Bt))) | |
return Bt.length === 0 ? -1 : nr(Kt, Bt, Ut, tr, or); | |
if (typeof Bt == "number") | |
return ( | |
(Bt = Bt & 255), | |
typeof tt.prototype.indexOf == "function" | |
? or | |
? tt.prototype.indexOf.call(Kt, Bt, Ut) | |
: tt.prototype.lastIndexOf.call(Kt, Bt, Ut) | |
: nr(Kt, [Bt], Ut, tr, or) | |
); | |
throw new TypeError("val must be string, number or Buffer"); | |
} | |
function nr(Kt, Bt, Ut, tr, or) { | |
let Or = 1, | |
ur = Kt.length, | |
xr = Bt.length; | |
if ( | |
tr !== void 0 && | |
((tr = String(tr).toLowerCase()), | |
tr === "ucs2" || | |
tr === "ucs-2" || | |
tr === "utf16le" || | |
tr === "utf-16le") | |
) { | |
if (Kt.length < 2 || Bt.length < 2) return -1; | |
(Or = 2), (ur /= 2), (xr /= 2), (Ut /= 2); | |
} | |
function Kr(Pr, _i) { | |
return Or === 1 ? Pr[_i] : Pr.readUInt16BE(_i * Or); | |
} | |
let vr; | |
if (or) { | |
let Pr = -1; | |
for (vr = Ut; vr < ur; vr++) | |
if (Kr(Kt, vr) === Kr(Bt, Pr === -1 ? 0 : vr - Pr)) { | |
if ((Pr === -1 && (Pr = vr), vr - Pr + 1 === xr)) return Pr * Or; | |
} else Pr !== -1 && (vr -= vr - Pr), (Pr = -1); | |
} else | |
for (Ut + xr > ur && (Ut = ur - xr), vr = Ut; vr >= 0; vr--) { | |
let Pr = !0; | |
for (let _i = 0; _i < xr; _i++) | |
if (Kr(Kt, vr + _i) !== Kr(Bt, _i)) { | |
Pr = !1; | |
break; | |
} | |
if (Pr) return vr; | |
} | |
return -1; | |
} | |
(at.prototype.includes = function (Bt, Ut, tr) { | |
return this.indexOf(Bt, Ut, tr) !== -1; | |
}), | |
(at.prototype.indexOf = function (Bt, Ut, tr) { | |
return qt(this, Bt, Ut, tr, !0); | |
}), | |
(at.prototype.lastIndexOf = function (Bt, Ut, tr) { | |
return qt(this, Bt, Ut, tr, !1); | |
}); | |
function wt(Kt, Bt, Ut, tr) { | |
Ut = Number(Ut) || 0; | |
const or = Kt.length - Ut; | |
tr ? ((tr = Number(tr)), tr > or && (tr = or)) : (tr = or); | |
const Or = Bt.length; | |
tr > Or / 2 && (tr = Or / 2); | |
let ur; | |
for (ur = 0; ur < tr; ++ur) { | |
const xr = parseInt(Bt.substr(ur * 2, 2), 16); | |
if (tn(xr)) return ur; | |
Kt[Ut + ur] = xr; | |
} | |
return ur; | |
} | |
function nt(Kt, Bt, Ut, tr) { | |
return br(Gr(Bt, Kt.length - Ut), Kt, Ut, tr); | |
} | |
function ut(Kt, Bt, Ut, tr) { | |
return br($r(Bt), Kt, Ut, tr); | |
} | |
function ft(Kt, Bt, Ut, tr) { | |
return br(Jr(Bt), Kt, Ut, tr); | |
} | |
function dt(Kt, Bt, Ut, tr) { | |
return br(Rr(Bt, Kt.length - Ut), Kt, Ut, tr); | |
} | |
(at.prototype.write = function (Bt, Ut, tr, or) { | |
if (Ut === void 0) (or = "utf8"), (tr = this.length), (Ut = 0); | |
else if (tr === void 0 && typeof Ut == "string") | |
(or = Ut), (tr = this.length), (Ut = 0); | |
else if (isFinite(Ut)) | |
(Ut = Ut >>> 0), | |
isFinite(tr) | |
? ((tr = tr >>> 0), or === void 0 && (or = "utf8")) | |
: ((or = tr), (tr = void 0)); | |
else | |
throw new Error( | |
"Buffer.write(string, encoding, offset[, length]) is no longer supported", | |
); | |
const Or = this.length - Ut; | |
if ( | |
((tr === void 0 || tr > Or) && (tr = Or), | |
(Bt.length > 0 && (tr < 0 || Ut < 0)) || Ut > this.length) | |
) | |
throw new RangeError("Attempt to write outside buffer bounds"); | |
or || (or = "utf8"); | |
let ur = !1; | |
for (;;) | |
switch (or) { | |
case "hex": | |
return wt(this, Bt, Ut, tr); | |
case "utf8": | |
case "utf-8": | |
return nt(this, Bt, Ut, tr); | |
case "ascii": | |
case "latin1": | |
case "binary": | |
return ut(this, Bt, Ut, tr); | |
case "base64": | |
return ft(this, Bt, Ut, tr); | |
case "ucs2": | |
case "ucs-2": | |
case "utf16le": | |
case "utf-16le": | |
return dt(this, Bt, Ut, tr); | |
default: | |
if (ur) throw new TypeError("Unknown encoding: " + or); | |
(or = ("" + or).toLowerCase()), (ur = !0); | |
} | |
}), | |
(at.prototype.toJSON = function () { | |
return { | |
type: "Buffer", | |
data: Array.prototype.slice.call(this._arr || this, 0), | |
}; | |
}); | |
function Ot(Kt, Bt, Ut) { | |
return Bt === 0 && Ut === Kt.length | |
? o.fromByteArray(Kt) | |
: o.fromByteArray(Kt.slice(Bt, Ut)); | |
} | |
function yt(Kt, Bt, Ut) { | |
Ut = Math.min(Kt.length, Ut); | |
const tr = []; | |
let or = Bt; | |
for (; or < Ut; ) { | |
const Or = Kt[or]; | |
let ur = null, | |
xr = Or > 239 ? 4 : Or > 223 ? 3 : Or > 191 ? 2 : 1; | |
if (or + xr <= Ut) { | |
let Kr, vr, Pr, _i; | |
switch (xr) { | |
case 1: | |
Or < 128 && (ur = Or); | |
break; | |
case 2: | |
(Kr = Kt[or + 1]), | |
(Kr & 192) === 128 && | |
((_i = ((Or & 31) << 6) | (Kr & 63)), _i > 127 && (ur = _i)); | |
break; | |
case 3: | |
(Kr = Kt[or + 1]), | |
(vr = Kt[or + 2]), | |
(Kr & 192) === 128 && | |
(vr & 192) === 128 && | |
((_i = ((Or & 15) << 12) | ((Kr & 63) << 6) | (vr & 63)), | |
_i > 2047 && (_i < 55296 || _i > 57343) && (ur = _i)); | |
break; | |
case 4: | |
(Kr = Kt[or + 1]), | |
(vr = Kt[or + 2]), | |
(Pr = Kt[or + 3]), | |
(Kr & 192) === 128 && | |
(vr & 192) === 128 && | |
(Pr & 192) === 128 && | |
((_i = | |
((Or & 15) << 18) | | |
((Kr & 63) << 12) | | |
((vr & 63) << 6) | | |
(Pr & 63)), | |
_i > 65535 && _i < 1114112 && (ur = _i)); | |
} | |
} | |
ur === null | |
? ((ur = 65533), (xr = 1)) | |
: ur > 65535 && | |
((ur -= 65536), | |
tr.push(((ur >>> 10) & 1023) | 55296), | |
(ur = 56320 | (ur & 1023))), | |
tr.push(ur), | |
(or += xr); | |
} | |
return gt(tr); | |
} | |
const bt = 4096; | |
function gt(Kt) { | |
const Bt = Kt.length; | |
if (Bt <= bt) return String.fromCharCode.apply(String, Kt); | |
let Ut = "", | |
tr = 0; | |
for (; tr < Bt; ) | |
Ut += String.fromCharCode.apply(String, Kt.slice(tr, (tr += bt))); | |
return Ut; | |
} | |
function st(Kt, Bt, Ut) { | |
let tr = ""; | |
Ut = Math.min(Kt.length, Ut); | |
for (let or = Bt; or < Ut; ++or) tr += String.fromCharCode(Kt[or] & 127); | |
return tr; | |
} | |
function pt(Kt, Bt, Ut) { | |
let tr = ""; | |
Ut = Math.min(Kt.length, Ut); | |
for (let or = Bt; or < Ut; ++or) tr += String.fromCharCode(Kt[or]); | |
return tr; | |
} | |
function kt(Kt, Bt, Ut) { | |
const tr = Kt.length; | |
(!Bt || Bt < 0) && (Bt = 0), (!Ut || Ut < 0 || Ut > tr) && (Ut = tr); | |
let or = ""; | |
for (let Or = Bt; Or < Ut; ++Or) or += Er[Kt[Or]]; | |
return or; | |
} | |
function Qt(Kt, Bt, Ut) { | |
const tr = Kt.slice(Bt, Ut); | |
let or = ""; | |
for (let Or = 0; Or < tr.length - 1; Or += 2) | |
or += String.fromCharCode(tr[Or] + tr[Or + 1] * 256); | |
return or; | |
} | |
at.prototype.slice = function (Bt, Ut) { | |
const tr = this.length; | |
(Bt = ~~Bt), | |
(Ut = Ut === void 0 ? tr : ~~Ut), | |
Bt < 0 ? ((Bt += tr), Bt < 0 && (Bt = 0)) : Bt > tr && (Bt = tr), | |
Ut < 0 ? ((Ut += tr), Ut < 0 && (Ut = 0)) : Ut > tr && (Ut = tr), | |
Ut < Bt && (Ut = Bt); | |
const or = this.subarray(Bt, Ut); | |
return Object.setPrototypeOf(or, at.prototype), or; | |
}; | |
function Dt(Kt, Bt, Ut) { | |
if (Kt % 1 !== 0 || Kt < 0) throw new RangeError("offset is not uint"); | |
if (Kt + Bt > Ut) | |
throw new RangeError("Trying to access beyond buffer length"); | |
} | |
(at.prototype.readUintLE = at.prototype.readUIntLE = | |
function (Bt, Ut, tr) { | |
(Bt = Bt >>> 0), (Ut = Ut >>> 0), tr || Dt(Bt, Ut, this.length); | |
let or = this[Bt], | |
Or = 1, | |
ur = 0; | |
for (; ++ur < Ut && (Or *= 256); ) or += this[Bt + ur] * Or; | |
return or; | |
}), | |
(at.prototype.readUintBE = at.prototype.readUIntBE = | |
function (Bt, Ut, tr) { | |
(Bt = Bt >>> 0), (Ut = Ut >>> 0), tr || Dt(Bt, Ut, this.length); | |
let or = this[Bt + --Ut], | |
Or = 1; | |
for (; Ut > 0 && (Or *= 256); ) or += this[Bt + --Ut] * Or; | |
return or; | |
}), | |
(at.prototype.readUint8 = at.prototype.readUInt8 = | |
function (Bt, Ut) { | |
return (Bt = Bt >>> 0), Ut || Dt(Bt, 1, this.length), this[Bt]; | |
}), | |
(at.prototype.readUint16LE = at.prototype.readUInt16LE = | |
function (Bt, Ut) { | |
return ( | |
(Bt = Bt >>> 0), | |
Ut || Dt(Bt, 2, this.length), | |
this[Bt] | (this[Bt + 1] << 8) | |
); | |
}), | |
(at.prototype.readUint16BE = at.prototype.readUInt16BE = | |
function (Bt, Ut) { | |
return ( | |
(Bt = Bt >>> 0), | |
Ut || Dt(Bt, 2, this.length), | |
(this[Bt] << 8) | this[Bt + 1] | |
); | |
}), | |
(at.prototype.readUint32LE = at.prototype.readUInt32LE = | |
function (Bt, Ut) { | |
return ( | |
(Bt = Bt >>> 0), | |
Ut || Dt(Bt, 4, this.length), | |
(this[Bt] | (this[Bt + 1] << 8) | (this[Bt + 2] << 16)) + | |
this[Bt + 3] * 16777216 | |
); | |
}), | |
(at.prototype.readUint32BE = at.prototype.readUInt32BE = | |
function (Bt, Ut) { | |
return ( | |
(Bt = Bt >>> 0), | |
Ut || Dt(Bt, 4, this.length), | |
this[Bt] * 16777216 + | |
((this[Bt + 1] << 16) | (this[Bt + 2] << 8) | this[Bt + 3]) | |
); | |
}), | |
(at.prototype.readBigUInt64LE = Cr(function (Bt) { | |
(Bt = Bt >>> 0), dr(Bt, "offset"); | |
const Ut = this[Bt], | |
tr = this[Bt + 7]; | |
(Ut === void 0 || tr === void 0) && Mr(Bt, this.length - 8); | |
const or = | |
Ut + | |
this[++Bt] * 2 ** 8 + | |
this[++Bt] * 2 ** 16 + | |
this[++Bt] * 2 ** 24, | |
Or = | |
this[++Bt] + | |
this[++Bt] * 2 ** 8 + | |
this[++Bt] * 2 ** 16 + | |
tr * 2 ** 24; | |
return BigInt(or) + (BigInt(Or) << BigInt(32)); | |
})), | |
(at.prototype.readBigUInt64BE = Cr(function (Bt) { | |
(Bt = Bt >>> 0), dr(Bt, "offset"); | |
const Ut = this[Bt], | |
tr = this[Bt + 7]; | |
(Ut === void 0 || tr === void 0) && Mr(Bt, this.length - 8); | |
const or = | |
Ut * 2 ** 24 + | |
this[++Bt] * 2 ** 16 + | |
this[++Bt] * 2 ** 8 + | |
this[++Bt], | |
Or = | |
this[++Bt] * 2 ** 24 + | |
this[++Bt] * 2 ** 16 + | |
this[++Bt] * 2 ** 8 + | |
tr; | |
return (BigInt(or) << BigInt(32)) + BigInt(Or); | |
})), | |
(at.prototype.readIntLE = function (Bt, Ut, tr) { | |
(Bt = Bt >>> 0), (Ut = Ut >>> 0), tr || Dt(Bt, Ut, this.length); | |
let or = this[Bt], | |
Or = 1, | |
ur = 0; | |
for (; ++ur < Ut && (Or *= 256); ) or += this[Bt + ur] * Or; | |
return (Or *= 128), or >= Or && (or -= Math.pow(2, 8 * Ut)), or; | |
}), | |
(at.prototype.readIntBE = function (Bt, Ut, tr) { | |
(Bt = Bt >>> 0), (Ut = Ut >>> 0), tr || Dt(Bt, Ut, this.length); | |
let or = Ut, | |
Or = 1, | |
ur = this[Bt + --or]; | |
for (; or > 0 && (Or *= 256); ) ur += this[Bt + --or] * Or; | |
return (Or *= 128), ur >= Or && (ur -= Math.pow(2, 8 * Ut)), ur; | |
}), | |
(at.prototype.readInt8 = function (Bt, Ut) { | |
return ( | |
(Bt = Bt >>> 0), | |
Ut || Dt(Bt, 1, this.length), | |
this[Bt] & 128 ? (255 - this[Bt] + 1) * -1 : this[Bt] | |
); | |
}), | |
(at.prototype.readInt16LE = function (Bt, Ut) { | |
(Bt = Bt >>> 0), Ut || Dt(Bt, 2, this.length); | |
const tr = this[Bt] | (this[Bt + 1] << 8); | |
return tr & 32768 ? tr | 4294901760 : tr; | |
}), | |
(at.prototype.readInt16BE = function (Bt, Ut) { | |
(Bt = Bt >>> 0), Ut || Dt(Bt, 2, this.length); | |
const tr = this[Bt + 1] | (this[Bt] << 8); | |
return tr & 32768 ? tr | 4294901760 : tr; | |
}), | |
(at.prototype.readInt32LE = function (Bt, Ut) { | |
return ( | |
(Bt = Bt >>> 0), | |
Ut || Dt(Bt, 4, this.length), | |
this[Bt] | | |
(this[Bt + 1] << 8) | | |
(this[Bt + 2] << 16) | | |
(this[Bt + 3] << 24) | |
); | |
}), | |
(at.prototype.readInt32BE = function (Bt, Ut) { | |
return ( | |
(Bt = Bt >>> 0), | |
Ut || Dt(Bt, 4, this.length), | |
(this[Bt] << 24) | | |
(this[Bt + 1] << 16) | | |
(this[Bt + 2] << 8) | | |
this[Bt + 3] | |
); | |
}), | |
(at.prototype.readBigInt64LE = Cr(function (Bt) { | |
(Bt = Bt >>> 0), dr(Bt, "offset"); | |
const Ut = this[Bt], | |
tr = this[Bt + 7]; | |
(Ut === void 0 || tr === void 0) && Mr(Bt, this.length - 8); | |
const or = | |
this[Bt + 4] + | |
this[Bt + 5] * 2 ** 8 + | |
this[Bt + 6] * 2 ** 16 + | |
(tr << 24); | |
return ( | |
(BigInt(or) << BigInt(32)) + | |
BigInt( | |
Ut + | |
this[++Bt] * 2 ** 8 + | |
this[++Bt] * 2 ** 16 + | |
this[++Bt] * 2 ** 24, | |
) | |
); | |
})), | |
(at.prototype.readBigInt64BE = Cr(function (Bt) { | |
(Bt = Bt >>> 0), dr(Bt, "offset"); | |
const Ut = this[Bt], | |
tr = this[Bt + 7]; | |
(Ut === void 0 || tr === void 0) && Mr(Bt, this.length - 8); | |
const or = | |
(Ut << 24) + this[++Bt] * 2 ** 16 + this[++Bt] * 2 ** 8 + this[++Bt]; | |
return ( | |
(BigInt(or) << BigInt(32)) + | |
BigInt( | |
this[++Bt] * 2 ** 24 + | |
this[++Bt] * 2 ** 16 + | |
this[++Bt] * 2 ** 8 + | |
tr, | |
) | |
); | |
})), | |
(at.prototype.readFloatLE = function (Bt, Ut) { | |
return ( | |
(Bt = Bt >>> 0), | |
Ut || Dt(Bt, 4, this.length), | |
_.read(this, Bt, !0, 23, 4) | |
); | |
}), | |
(at.prototype.readFloatBE = function (Bt, Ut) { | |
return ( | |
(Bt = Bt >>> 0), | |
Ut || Dt(Bt, 4, this.length), | |
_.read(this, Bt, !1, 23, 4) | |
); | |
}), | |
(at.prototype.readDoubleLE = function (Bt, Ut) { | |
return ( | |
(Bt = Bt >>> 0), | |
Ut || Dt(Bt, 8, this.length), | |
_.read(this, Bt, !0, 52, 8) | |
); | |
}), | |
(at.prototype.readDoubleBE = function (Bt, Ut) { | |
return ( | |
(Bt = Bt >>> 0), | |
Ut || Dt(Bt, 8, this.length), | |
_.read(this, Bt, !1, 52, 8) | |
); | |
}); | |
function Zt(Kt, Bt, Ut, tr, or, Or) { | |
if (!at.isBuffer(Kt)) | |
throw new TypeError('"buffer" argument must be a Buffer instance'); | |
if (Bt > or || Bt < Or) | |
throw new RangeError('"value" argument is out of bounds'); | |
if (Ut + tr > Kt.length) throw new RangeError("Index out of range"); | |
} | |
(at.prototype.writeUintLE = at.prototype.writeUIntLE = | |
function (Bt, Ut, tr, or) { | |
if (((Bt = +Bt), (Ut = Ut >>> 0), (tr = tr >>> 0), !or)) { | |
const xr = Math.pow(2, 8 * tr) - 1; | |
Zt(this, Bt, Ut, tr, xr, 0); | |
} | |
let Or = 1, | |
ur = 0; | |
for (this[Ut] = Bt & 255; ++ur < tr && (Or *= 256); ) | |
this[Ut + ur] = (Bt / Or) & 255; | |
return Ut + tr; | |
}), | |
(at.prototype.writeUintBE = at.prototype.writeUIntBE = | |
function (Bt, Ut, tr, or) { | |
if (((Bt = +Bt), (Ut = Ut >>> 0), (tr = tr >>> 0), !or)) { | |
const xr = Math.pow(2, 8 * tr) - 1; | |
Zt(this, Bt, Ut, tr, xr, 0); | |
} | |
let Or = tr - 1, | |
ur = 1; | |
for (this[Ut + Or] = Bt & 255; --Or >= 0 && (ur *= 256); ) | |
this[Ut + Or] = (Bt / ur) & 255; | |
return Ut + tr; | |
}), | |
(at.prototype.writeUint8 = at.prototype.writeUInt8 = | |
function (Bt, Ut, tr) { | |
return ( | |
(Bt = +Bt), | |
(Ut = Ut >>> 0), | |
tr || Zt(this, Bt, Ut, 1, 255, 0), | |
(this[Ut] = Bt & 255), | |
Ut + 1 | |
); | |
}), | |
(at.prototype.writeUint16LE = at.prototype.writeUInt16LE = | |
function (Bt, Ut, tr) { | |
return ( | |
(Bt = +Bt), | |
(Ut = Ut >>> 0), | |
tr || Zt(this, Bt, Ut, 2, 65535, 0), | |
(this[Ut] = Bt & 255), | |
(this[Ut + 1] = Bt >>> 8), | |
Ut + 2 | |
); | |
}), | |
(at.prototype.writeUint16BE = at.prototype.writeUInt16BE = | |
function (Bt, Ut, tr) { | |
return ( | |
(Bt = +Bt), | |
(Ut = Ut >>> 0), | |
tr || Zt(this, Bt, Ut, 2, 65535, 0), | |
(this[Ut] = Bt >>> 8), | |
(this[Ut + 1] = Bt & 255), | |
Ut + 2 | |
); | |
}), | |
(at.prototype.writeUint32LE = at.prototype.writeUInt32LE = | |
function (Bt, Ut, tr) { | |
return ( | |
(Bt = +Bt), | |
(Ut = Ut >>> 0), | |
tr || Zt(this, Bt, Ut, 4, 4294967295, 0), | |
(this[Ut + 3] = Bt >>> 24), | |
(this[Ut + 2] = Bt >>> 16), | |
(this[Ut + 1] = Bt >>> 8), | |
(this[Ut] = Bt & 255), | |
Ut + 4 | |
); | |
}), | |
(at.prototype.writeUint32BE = at.prototype.writeUInt32BE = | |
function (Bt, Ut, tr) { | |
return ( | |
(Bt = +Bt), | |
(Ut = Ut >>> 0), | |
tr || Zt(this, Bt, Ut, 4, 4294967295, 0), | |
(this[Ut] = Bt >>> 24), | |
(this[Ut + 1] = Bt >>> 16), | |
(this[Ut + 2] = Bt >>> 8), | |
(this[Ut + 3] = Bt & 255), | |
Ut + 4 | |
); | |
}); | |
function Vt(Kt, Bt, Ut, tr, or) { | |
fr(Bt, tr, or, Kt, Ut, 7); | |
let Or = Number(Bt & BigInt(4294967295)); | |
(Kt[Ut++] = Or), | |
(Or = Or >> 8), | |
(Kt[Ut++] = Or), | |
(Or = Or >> 8), | |
(Kt[Ut++] = Or), | |
(Or = Or >> 8), | |
(Kt[Ut++] = Or); | |
let ur = Number((Bt >> BigInt(32)) & BigInt(4294967295)); | |
return ( | |
(Kt[Ut++] = ur), | |
(ur = ur >> 8), | |
(Kt[Ut++] = ur), | |
(ur = ur >> 8), | |
(Kt[Ut++] = ur), | |
(ur = ur >> 8), | |
(Kt[Ut++] = ur), | |
Ut | |
); | |
} | |
function Ct(Kt, Bt, Ut, tr, or) { | |
fr(Bt, tr, or, Kt, Ut, 7); | |
let Or = Number(Bt & BigInt(4294967295)); | |
(Kt[Ut + 7] = Or), | |
(Or = Or >> 8), | |
(Kt[Ut + 6] = Or), | |
(Or = Or >> 8), | |
(Kt[Ut + 5] = Or), | |
(Or = Or >> 8), | |
(Kt[Ut + 4] = Or); | |
let ur = Number((Bt >> BigInt(32)) & BigInt(4294967295)); | |
return ( | |
(Kt[Ut + 3] = ur), | |
(ur = ur >> 8), | |
(Kt[Ut + 2] = ur), | |
(ur = ur >> 8), | |
(Kt[Ut + 1] = ur), | |
(ur = ur >> 8), | |
(Kt[Ut] = ur), | |
Ut + 8 | |
); | |
} | |
(at.prototype.writeBigUInt64LE = Cr(function (Bt, Ut = 0) { | |
return Vt(this, Bt, Ut, BigInt(0), BigInt("0xffffffffffffffff")); | |
})), | |
(at.prototype.writeBigUInt64BE = Cr(function (Bt, Ut = 0) { | |
return Ct(this, Bt, Ut, BigInt(0), BigInt("0xffffffffffffffff")); | |
})), | |
(at.prototype.writeIntLE = function (Bt, Ut, tr, or) { | |
if (((Bt = +Bt), (Ut = Ut >>> 0), !or)) { | |
const Kr = Math.pow(2, 8 * tr - 1); | |
Zt(this, Bt, Ut, tr, Kr - 1, -Kr); | |
} | |
let Or = 0, | |
ur = 1, | |
xr = 0; | |
for (this[Ut] = Bt & 255; ++Or < tr && (ur *= 256); ) | |
Bt < 0 && xr === 0 && this[Ut + Or - 1] !== 0 && (xr = 1), | |
(this[Ut + Or] = (((Bt / ur) >> 0) - xr) & 255); | |
return Ut + tr; | |
}), | |
(at.prototype.writeIntBE = function (Bt, Ut, tr, or) { | |
if (((Bt = +Bt), (Ut = Ut >>> 0), !or)) { | |
const Kr = Math.pow(2, 8 * tr - 1); | |
Zt(this, Bt, Ut, tr, Kr - 1, -Kr); | |
} | |
let Or = tr - 1, | |
ur = 1, | |
xr = 0; | |
for (this[Ut + Or] = Bt & 255; --Or >= 0 && (ur *= 256); ) | |
Bt < 0 && xr === 0 && this[Ut + Or + 1] !== 0 && (xr = 1), | |
(this[Ut + Or] = (((Bt / ur) >> 0) - xr) & 255); | |
return Ut + tr; | |
}), | |
(at.prototype.writeInt8 = function (Bt, Ut, tr) { | |
return ( | |
(Bt = +Bt), | |
(Ut = Ut >>> 0), | |
tr || Zt(this, Bt, Ut, 1, 127, -128), | |
Bt < 0 && (Bt = 255 + Bt + 1), | |
(this[Ut] = Bt & 255), | |
Ut + 1 | |
); | |
}), | |
(at.prototype.writeInt16LE = function (Bt, Ut, tr) { | |
return ( | |
(Bt = +Bt), | |
(Ut = Ut >>> 0), | |
tr || Zt(this, Bt, Ut, 2, 32767, -32768), | |
(this[Ut] = Bt & 255), | |
(this[Ut + 1] = Bt >>> 8), | |
Ut + 2 | |
); | |
}), | |
(at.prototype.writeInt16BE = function (Bt, Ut, tr) { | |
return ( | |
(Bt = +Bt), | |
(Ut = Ut >>> 0), | |
tr || Zt(this, Bt, Ut, 2, 32767, -32768), | |
(this[Ut] = Bt >>> 8), | |
(this[Ut + 1] = Bt & 255), | |
Ut + 2 | |
); | |
}), | |
(at.prototype.writeInt32LE = function (Bt, Ut, tr) { | |
return ( | |
(Bt = +Bt), | |
(Ut = Ut >>> 0), | |
tr || Zt(this, Bt, Ut, 4, 2147483647, -2147483648), | |
(this[Ut] = Bt & 255), | |
(this[Ut + 1] = Bt >>> 8), | |
(this[Ut + 2] = Bt >>> 16), | |
(this[Ut + 3] = Bt >>> 24), | |
Ut + 4 | |
); | |
}), | |
(at.prototype.writeInt32BE = function (Bt, Ut, tr) { | |
return ( | |
(Bt = +Bt), | |
(Ut = Ut >>> 0), | |
tr || Zt(this, Bt, Ut, 4, 2147483647, -2147483648), | |
Bt < 0 && (Bt = 4294967295 + Bt + 1), | |
(this[Ut] = Bt >>> 24), | |
(this[Ut + 1] = Bt >>> 16), | |
(this[Ut + 2] = Bt >>> 8), | |
(this[Ut + 3] = Bt & 255), | |
Ut + 4 | |
); | |
}), | |
(at.prototype.writeBigInt64LE = Cr(function (Bt, Ut = 0) { | |
return Vt( | |
this, | |
Bt, | |
Ut, | |
-BigInt("0x8000000000000000"), | |
BigInt("0x7fffffffffffffff"), | |
); | |
})), | |
(at.prototype.writeBigInt64BE = Cr(function (Bt, Ut = 0) { | |
return Ct( | |
this, | |
Bt, | |
Ut, | |
-BigInt("0x8000000000000000"), | |
BigInt("0x7fffffffffffffff"), | |
); | |
})); | |
function jt(Kt, Bt, Ut, tr, or, Or) { | |
if (Ut + tr > Kt.length) throw new RangeError("Index out of range"); | |
if (Ut < 0) throw new RangeError("Index out of range"); | |
} | |
function Wt(Kt, Bt, Ut, tr, or) { | |
return ( | |
(Bt = +Bt), | |
(Ut = Ut >>> 0), | |
or || jt(Kt, Bt, Ut, 4), | |
_.write(Kt, Bt, Ut, tr, 23, 4), | |
Ut + 4 | |
); | |
} | |
(at.prototype.writeFloatLE = function (Bt, Ut, tr) { | |
return Wt(this, Bt, Ut, !0, tr); | |
}), | |
(at.prototype.writeFloatBE = function (Bt, Ut, tr) { | |
return Wt(this, Bt, Ut, !1, tr); | |
}); | |
function er(Kt, Bt, Ut, tr, or) { | |
return ( | |
(Bt = +Bt), | |
(Ut = Ut >>> 0), | |
or || jt(Kt, Bt, Ut, 8), | |
_.write(Kt, Bt, Ut, tr, 52, 8), | |
Ut + 8 | |
); | |
} | |
(at.prototype.writeDoubleLE = function (Bt, Ut, tr) { | |
return er(this, Bt, Ut, !0, tr); | |
}), | |
(at.prototype.writeDoubleBE = function (Bt, Ut, tr) { | |
return er(this, Bt, Ut, !1, tr); | |
}), | |
(at.prototype.copy = function (Bt, Ut, tr, or) { | |
if (!at.isBuffer(Bt)) | |
throw new TypeError("argument should be a Buffer"); | |
if ( | |
(tr || (tr = 0), | |
!or && or !== 0 && (or = this.length), | |
Ut >= Bt.length && (Ut = Bt.length), | |
Ut || (Ut = 0), | |
or > 0 && or < tr && (or = tr), | |
or === tr || Bt.length === 0 || this.length === 0) | |
) | |
return 0; | |
if (Ut < 0) throw new RangeError("targetStart out of bounds"); | |
if (tr < 0 || tr >= this.length) | |
throw new RangeError("Index out of range"); | |
if (or < 0) throw new RangeError("sourceEnd out of bounds"); | |
or > this.length && (or = this.length), | |
Bt.length - Ut < or - tr && (or = Bt.length - Ut + tr); | |
const Or = or - tr; | |
return ( | |
this === Bt && typeof tt.prototype.copyWithin == "function" | |
? this.copyWithin(Ut, tr, or) | |
: tt.prototype.set.call(Bt, this.subarray(tr, or), Ut), | |
Or | |
); | |
}), | |
(at.prototype.fill = function (Bt, Ut, tr, or) { | |
if (typeof Bt == "string") { | |
if ( | |
(typeof Ut == "string" | |
? ((or = Ut), (Ut = 0), (tr = this.length)) | |
: typeof tr == "string" && ((or = tr), (tr = this.length)), | |
or !== void 0 && typeof or != "string") | |
) | |
throw new TypeError("encoding must be a string"); | |
if (typeof or == "string" && !at.isEncoding(or)) | |
throw new TypeError("Unknown encoding: " + or); | |
if (Bt.length === 1) { | |
const ur = Bt.charCodeAt(0); | |
((or === "utf8" && ur < 128) || or === "latin1") && (Bt = ur); | |
} | |
} else | |
typeof Bt == "number" | |
? (Bt = Bt & 255) | |
: typeof Bt == "boolean" && (Bt = Number(Bt)); | |
if (Ut < 0 || this.length < Ut || this.length < tr) | |
throw new RangeError("Out of range index"); | |
if (tr <= Ut) return this; | |
(Ut = Ut >>> 0), | |
(tr = tr === void 0 ? this.length : tr >>> 0), | |
Bt || (Bt = 0); | |
let Or; | |
if (typeof Bt == "number") for (Or = Ut; Or < tr; ++Or) this[Or] = Bt; | |
else { | |
const ur = at.isBuffer(Bt) ? Bt : at.from(Bt, or), | |
xr = ur.length; | |
if (xr === 0) | |
throw new TypeError( | |
'The value "' + Bt + '" is invalid for argument "value"', | |
); | |
for (Or = 0; Or < tr - Ut; ++Or) this[Or + Ut] = ur[Or % xr]; | |
} | |
return this; | |
}); | |
const Gt = {}; | |
function Ft(Kt, Bt, Ut) { | |
Gt[Kt] = class extends Ut { | |
constructor() { | |
super(), | |
Object.defineProperty(this, "message", { | |
value: Bt.apply(this, arguments), | |
writable: !0, | |
configurable: !0, | |
}), | |
(this.name = `${this.name} [${Kt}]`), | |
this.stack, | |
delete this.name; | |
} | |
get code() { | |
return Kt; | |
} | |
set code(or) { | |
Object.defineProperty(this, "code", { | |
configurable: !0, | |
enumerable: !0, | |
value: or, | |
writable: !0, | |
}); | |
} | |
toString() { | |
return `${this.name} [${Kt}]: ${this.message}`; | |
} | |
}; | |
} | |
Ft( | |
"ERR_BUFFER_OUT_OF_BOUNDS", | |
function (Kt) { | |
return Kt | |
? `${Kt} is outside of buffer bounds` | |
: "Attempt to access memory outside buffer bounds"; | |
}, | |
RangeError, | |
), | |
Ft( | |
"ERR_INVALID_ARG_TYPE", | |
function (Kt, Bt) { | |
return `The "${Kt}" argument must be of type number. Received type ${typeof Bt}`; | |
}, | |
TypeError, | |
), | |
Ft( | |
"ERR_OUT_OF_RANGE", | |
function (Kt, Bt, Ut) { | |
let tr = `The value of "${Kt}" is out of range.`, | |
or = Ut; | |
return ( | |
Number.isInteger(Ut) && Math.abs(Ut) > 2 ** 32 | |
? (or = rr(String(Ut))) | |
: typeof Ut == "bigint" && | |
((or = String(Ut)), | |
(Ut > BigInt(2) ** BigInt(32) || | |
Ut < -(BigInt(2) ** BigInt(32))) && | |
(or = rr(or)), | |
(or += "n")), | |
(tr += ` It must be ${Bt}. Received ${or}`), | |
tr | |
); | |
}, | |
RangeError, | |
); | |
function rr(Kt) { | |
let Bt = "", | |
Ut = Kt.length; | |
const tr = Kt[0] === "-" ? 1 : 0; | |
for (; Ut >= tr + 4; Ut -= 3) Bt = `_${Kt.slice(Ut - 3, Ut)}${Bt}`; | |
return `${Kt.slice(0, Ut)}${Bt}`; | |
} | |
function Sr(Kt, Bt, Ut) { | |
dr(Bt, "offset"), | |
(Kt[Bt] === void 0 || Kt[Bt + Ut] === void 0) && | |
Mr(Bt, Kt.length - (Ut + 1)); | |
} | |
function fr(Kt, Bt, Ut, tr, or, Or) { | |
if (Kt > Ut || Kt < Bt) { | |
const ur = typeof Bt == "bigint" ? "n" : ""; | |
let xr; | |
throw ( | |
(Or > 3 | |
? Bt === 0 || Bt === BigInt(0) | |
? (xr = `>= 0${ur} and < 2${ur} ** ${(Or + 1) * 8}${ur}`) | |
: (xr = `>= -(2${ur} ** ${(Or + 1) * 8 - 1}${ur}) and < 2 ** ${(Or + 1) * 8 - 1}${ur}`) | |
: (xr = `>= ${Bt}${ur} and <= ${Ut}${ur}`), | |
new Gt.ERR_OUT_OF_RANGE("value", xr, Kt)) | |
); | |
} | |
Sr(tr, or, Or); | |
} | |
function dr(Kt, Bt) { | |
if (typeof Kt != "number") | |
throw new Gt.ERR_INVALID_ARG_TYPE(Bt, "number", Kt); | |
} | |
function Mr(Kt, Bt, Ut) { | |
throw Math.floor(Kt) !== Kt | |
? (dr(Kt, Ut), | |
new Gt.ERR_OUT_OF_RANGE(Ut || "offset", "an integer", Kt)) | |
: Bt < 0 | |
? new Gt.ERR_BUFFER_OUT_OF_BOUNDS() | |
: new Gt.ERR_OUT_OF_RANGE( | |
Ut || "offset", | |
`>= ${Ut ? 1 : 0} and <= ${Bt}`, | |
Kt, | |
); | |
} | |
const yr = /[^+/0-9A-Za-z-_]/g; | |
function lr(Kt) { | |
if ( | |
((Kt = Kt.split("=")[0]), | |
(Kt = Kt.trim().replace(yr, "")), | |
Kt.length < 2) | |
) | |
return ""; | |
for (; Kt.length % 4 !== 0; ) Kt = Kt + "="; | |
return Kt; | |
} | |
function Gr(Kt, Bt) { | |
Bt = Bt || 1 / 0; | |
let Ut; | |
const tr = Kt.length; | |
let or = null; | |
const Or = []; | |
for (let ur = 0; ur < tr; ++ur) { | |
if (((Ut = Kt.charCodeAt(ur)), Ut > 55295 && Ut < 57344)) { | |
if (!or) { | |
if (Ut > 56319) { | |
(Bt -= 3) > -1 && Or.push(239, 191, 189); | |
continue; | |
} else if (ur + 1 === tr) { | |
(Bt -= 3) > -1 && Or.push(239, 191, 189); | |
continue; | |
} | |
or = Ut; | |
continue; | |
} | |
if (Ut < 56320) { | |
(Bt -= 3) > -1 && Or.push(239, 191, 189), (or = Ut); | |
continue; | |
} | |
Ut = (((or - 55296) << 10) | (Ut - 56320)) + 65536; | |
} else or && (Bt -= 3) > -1 && Or.push(239, 191, 189); | |
if (((or = null), Ut < 128)) { | |
if ((Bt -= 1) < 0) break; | |
Or.push(Ut); | |
} else if (Ut < 2048) { | |
if ((Bt -= 2) < 0) break; | |
Or.push((Ut >> 6) | 192, (Ut & 63) | 128); | |
} else if (Ut < 65536) { | |
if ((Bt -= 3) < 0) break; | |
Or.push((Ut >> 12) | 224, ((Ut >> 6) & 63) | 128, (Ut & 63) | 128); | |
} else if (Ut < 1114112) { | |
if ((Bt -= 4) < 0) break; | |
Or.push( | |
(Ut >> 18) | 240, | |
((Ut >> 12) & 63) | 128, | |
((Ut >> 6) & 63) | 128, | |
(Ut & 63) | 128, | |
); | |
} else throw new Error("Invalid code point"); | |
} | |
return Or; | |
} | |
function $r(Kt) { | |
const Bt = []; | |
for (let Ut = 0; Ut < Kt.length; ++Ut) Bt.push(Kt.charCodeAt(Ut) & 255); | |
return Bt; | |
} | |
function Rr(Kt, Bt) { | |
let Ut, tr, or; | |
const Or = []; | |
for (let ur = 0; ur < Kt.length && !((Bt -= 2) < 0); ++ur) | |
(Ut = Kt.charCodeAt(ur)), | |
(tr = Ut >> 8), | |
(or = Ut % 256), | |
Or.push(or), | |
Or.push(tr); | |
return Or; | |
} | |
function Jr(Kt) { | |
return o.toByteArray(lr(Kt)); | |
} | |
function br(Kt, Bt, Ut, tr) { | |
let or; | |
for (or = 0; or < tr && !(or + Ut >= Bt.length || or >= Kt.length); ++or) | |
Bt[or + Ut] = Kt[or]; | |
return or; | |
} | |
function _r(Kt, Bt) { | |
return ( | |
Kt instanceof Bt || | |
(Kt != null && | |
Kt.constructor != null && | |
Kt.constructor.name != null && | |
Kt.constructor.name === Bt.name) | |
); | |
} | |
function tn(Kt) { | |
return Kt !== Kt; | |
} | |
const Er = (function () { | |
const Kt = "0123456789abcdef", | |
Bt = new Array(256); | |
for (let Ut = 0; Ut < 16; ++Ut) { | |
const tr = Ut * 16; | |
for (let or = 0; or < 16; ++or) Bt[tr + or] = Kt[Ut] + Kt[or]; | |
} | |
return Bt; | |
})(); | |
function Cr(Kt) { | |
return typeof BigInt > "u" ? wr : Kt; | |
} | |
function wr() { | |
throw new Error("BigInt not supported"); | |
} | |
})(buffer$3); | |
const Buffer$3 = buffer$3.Buffer, | |
Blob = buffer$3.Blob, | |
BlobOptions = buffer$3.BlobOptions, | |
Buffer$1$1 = buffer$3.Buffer, | |
File = buffer$3.File, | |
FileOptions = buffer$3.FileOptions, | |
INSPECT_MAX_BYTES = buffer$3.INSPECT_MAX_BYTES, | |
SlowBuffer = buffer$3.SlowBuffer, | |
TranscodeEncoding = buffer$3.TranscodeEncoding, | |
atob$1 = buffer$3.atob, | |
btoa$1 = buffer$3.btoa, | |
constants$3 = buffer$3.constants, | |
isAscii = buffer$3.isAscii, | |
isUtf8 = buffer$3.isUtf8, | |
kMaxLength = buffer$3.kMaxLength, | |
kStringMaxLength = buffer$3.kStringMaxLength, | |
resolveObjectURL = buffer$3.resolveObjectURL, | |
transcode = buffer$3.transcode, | |
dist$2 = Object.freeze( | |
Object.defineProperty( | |
{ | |
__proto__: null, | |
Blob, | |
BlobOptions, | |
Buffer: Buffer$1$1, | |
File, | |
FileOptions, | |
INSPECT_MAX_BYTES, | |
SlowBuffer, | |
TranscodeEncoding, | |
atob: atob$1, | |
btoa: btoa$1, | |
constants: constants$3, | |
default: Buffer$3, | |
isAscii, | |
isUtf8, | |
kMaxLength, | |
kStringMaxLength, | |
resolveObjectURL, | |
transcode, | |
}, | |
Symbol.toStringTag, | |
{ value: "Module" }, | |
), | |
), | |
require$$0$2 = getAugmentedNamespace(dist$2); | |
var buffer_list, hasRequiredBuffer_list; | |
function requireBuffer_list() { | |
if (hasRequiredBuffer_list) return buffer_list; | |
hasRequiredBuffer_list = 1; | |
function s(xt, St) { | |
var $t = Object.keys(xt); | |
if (Object.getOwnPropertySymbols) { | |
var Et = Object.getOwnPropertySymbols(xt); | |
St && | |
(Et = Et.filter(function (_t) { | |
return Object.getOwnPropertyDescriptor(xt, _t).enumerable; | |
})), | |
$t.push.apply($t, Et); | |
} | |
return $t; | |
} | |
function o(xt) { | |
for (var St = 1; St < arguments.length; St++) { | |
var $t = arguments[St] != null ? arguments[St] : {}; | |
St % 2 | |
? s(Object($t), !0).forEach(function (Et) { | |
_(xt, Et, $t[Et]); | |
}) | |
: Object.getOwnPropertyDescriptors | |
? Object.defineProperties(xt, Object.getOwnPropertyDescriptors($t)) | |
: s(Object($t)).forEach(function (Et) { | |
Object.defineProperty( | |
xt, | |
Et, | |
Object.getOwnPropertyDescriptor($t, Et), | |
); | |
}); | |
} | |
return xt; | |
} | |
function _(xt, St, $t) { | |
return ( | |
(St = rt(St)), | |
St in xt | |
? Object.defineProperty(xt, St, { | |
value: $t, | |
enumerable: !0, | |
configurable: !0, | |
writable: !0, | |
}) | |
: (xt[St] = $t), | |
xt | |
); | |
} | |
function _e(xt, St) { | |
if (!(xt instanceof St)) | |
throw new TypeError("Cannot call a class as a function"); | |
} | |
function et(xt, St) { | |
for (var $t = 0; $t < St.length; $t++) { | |
var Et = St[$t]; | |
(Et.enumerable = Et.enumerable || !1), | |
(Et.configurable = !0), | |
"value" in Et && (Et.writable = !0), | |
Object.defineProperty(xt, rt(Et.key), Et); | |
} | |
} | |
function tt(xt, St, $t) { | |
return ( | |
St && et(xt.prototype, St), | |
$t && et(xt, $t), | |
Object.defineProperty(xt, "prototype", { writable: !1 }), | |
xt | |
); | |
} | |
function rt(xt) { | |
var St = it(xt, "string"); | |
return typeof St == "symbol" ? St : String(St); | |
} | |
function it(xt, St) { | |
if (typeof xt != "object" || xt === null) return xt; | |
var $t = xt[Symbol.toPrimitive]; | |
if ($t !== void 0) { | |
var Et = $t.call(xt, St || "default"); | |
if (typeof Et != "object") return Et; | |
throw new TypeError("@@toPrimitive must return a primitive value."); | |
} | |
return (St === "string" ? String : Number)(xt); | |
} | |
var ot = require$$0$2, | |
ct = ot.Buffer, | |
at = util$3, | |
ht = at.inspect, | |
mt = (ht && ht.custom) || "inspect"; | |
function vt(xt, St, $t) { | |
ct.prototype.copy.call(xt, St, $t); | |
} | |
return ( | |
(buffer_list = (function () { | |
function xt() { | |
_e(this, xt), | |
(this.head = null), | |
(this.tail = null), | |
(this.length = 0); | |
} | |
return ( | |
tt(xt, [ | |
{ | |
key: "push", | |
value: function ($t) { | |
var Et = { data: $t, next: null }; | |
this.length > 0 ? (this.tail.next = Et) : (this.head = Et), | |
(this.tail = Et), | |
++this.length; | |
}, | |
}, | |
{ | |
key: "unshift", | |
value: function ($t) { | |
var Et = { data: $t, next: this.head }; | |
this.length === 0 && (this.tail = Et), | |
(this.head = Et), | |
++this.length; | |
}, | |
}, | |
{ | |
key: "shift", | |
value: function () { | |
if (this.length !== 0) { | |
var $t = this.head.data; | |
return ( | |
this.length === 1 | |
? (this.head = this.tail = null) | |
: (this.head = this.head.next), | |
--this.length, | |
$t | |
); | |
} | |
}, | |
}, | |
{ | |
key: "clear", | |
value: function () { | |
(this.head = this.tail = null), (this.length = 0); | |
}, | |
}, | |
{ | |
key: "join", | |
value: function ($t) { | |
if (this.length === 0) return ""; | |
for (var Et = this.head, _t = "" + Et.data; (Et = Et.next); ) | |
_t += $t + Et.data; | |
return _t; | |
}, | |
}, | |
{ | |
key: "concat", | |
value: function ($t) { | |
if (this.length === 0) return ct.alloc(0); | |
for ( | |
var Et = ct.allocUnsafe($t >>> 0), _t = this.head, Rt = 0; | |
_t; | |
) | |
vt(_t.data, Et, Rt), (Rt += _t.data.length), (_t = _t.next); | |
return Et; | |
}, | |
}, | |
{ | |
key: "consume", | |
value: function ($t, Et) { | |
var _t; | |
return ( | |
$t < this.head.data.length | |
? ((_t = this.head.data.slice(0, $t)), | |
(this.head.data = this.head.data.slice($t))) | |
: $t === this.head.data.length | |
? (_t = this.shift()) | |
: (_t = Et ? this._getString($t) : this._getBuffer($t)), | |
_t | |
); | |
}, | |
}, | |
{ | |
key: "first", | |
value: function () { | |
return this.head.data; | |
}, | |
}, | |
{ | |
key: "_getString", | |
value: function ($t) { | |
var Et = this.head, | |
_t = 1, | |
Rt = Et.data; | |
for ($t -= Rt.length; (Et = Et.next); ) { | |
var Mt = Et.data, | |
It = $t > Mt.length ? Mt.length : $t; | |
if ( | |
(It === Mt.length ? (Rt += Mt) : (Rt += Mt.slice(0, $t)), | |
($t -= It), | |
$t === 0) | |
) { | |
It === Mt.length | |
? (++_t, | |
Et.next | |
? (this.head = Et.next) | |
: (this.head = this.tail = null)) | |
: ((this.head = Et), (Et.data = Mt.slice(It))); | |
break; | |
} | |
++_t; | |
} | |
return (this.length -= _t), Rt; | |
}, | |
}, | |
{ | |
key: "_getBuffer", | |
value: function ($t) { | |
var Et = ct.allocUnsafe($t), | |
_t = this.head, | |
Rt = 1; | |
for (_t.data.copy(Et), $t -= _t.data.length; (_t = _t.next); ) { | |
var Mt = _t.data, | |
It = $t > Mt.length ? Mt.length : $t; | |
if ( | |
(Mt.copy(Et, Et.length - $t, 0, It), ($t -= It), $t === 0) | |
) { | |
It === Mt.length | |
? (++Rt, | |
_t.next | |
? (this.head = _t.next) | |
: (this.head = this.tail = null)) | |
: ((this.head = _t), (_t.data = Mt.slice(It))); | |
break; | |
} | |
++Rt; | |
} | |
return (this.length -= Rt), Et; | |
}, | |
}, | |
{ | |
key: mt, | |
value: function ($t, Et) { | |
return ht( | |
this, | |
o(o({}, Et), {}, { depth: 0, customInspect: !1 }), | |
); | |
}, | |
}, | |
]), | |
xt | |
); | |
})()), | |
buffer_list | |
); | |
} | |
function destroy(s, o) { | |
var _ = this, | |
_e = this._readableState && this._readableState.destroyed, | |
et = this._writableState && this._writableState.destroyed; | |
return _e || et | |
? (o | |
? o(s) | |
: s && | |
(this._writableState | |
? this._writableState.errorEmitted || | |
((this._writableState.errorEmitted = !0), | |
process$1.nextTick(emitErrorNT, this, s)) | |
: process$1.nextTick(emitErrorNT, this, s)), | |
this) | |
: (this._readableState && (this._readableState.destroyed = !0), | |
this._writableState && (this._writableState.destroyed = !0), | |
this._destroy(s || null, function (tt) { | |
!o && tt | |
? _._writableState | |
? _._writableState.errorEmitted | |
? process$1.nextTick(emitCloseNT, _) | |
: ((_._writableState.errorEmitted = !0), | |
process$1.nextTick(emitErrorAndCloseNT, _, tt)) | |
: process$1.nextTick(emitErrorAndCloseNT, _, tt) | |
: o | |
? (process$1.nextTick(emitCloseNT, _), o(tt)) | |
: process$1.nextTick(emitCloseNT, _); | |
}), | |
this); | |
} | |
function emitErrorAndCloseNT(s, o) { | |
emitErrorNT(s, o), emitCloseNT(s); | |
} | |
function emitCloseNT(s) { | |
(s._writableState && !s._writableState.emitClose) || | |
(s._readableState && !s._readableState.emitClose) || | |
s.emit("close"); | |
} | |
function undestroy() { | |
this._readableState && | |
((this._readableState.destroyed = !1), | |
(this._readableState.reading = !1), | |
(this._readableState.ended = !1), | |
(this._readableState.endEmitted = !1)), | |
this._writableState && | |
((this._writableState.destroyed = !1), | |
(this._writableState.ended = !1), | |
(this._writableState.ending = !1), | |
(this._writableState.finalCalled = !1), | |
(this._writableState.prefinished = !1), | |
(this._writableState.finished = !1), | |
(this._writableState.errorEmitted = !1)); | |
} | |
function emitErrorNT(s, o) { | |
s.emit("error", o); | |
} | |
function errorOrDestroy(s, o) { | |
var _ = s._readableState, | |
_e = s._writableState; | |
(_ && _.autoDestroy) || (_e && _e.autoDestroy) | |
? s.destroy(o) | |
: s.emit("error", o); | |
} | |
var destroy_1$2 = { destroy, undestroy, errorOrDestroy }, | |
errorsBrowser = {}; | |
function _inheritsLoose$1(s, o) { | |
(s.prototype = Object.create(o.prototype)), | |
(s.prototype.constructor = s), | |
(s.__proto__ = o); | |
} | |
var codes = {}; | |
function createErrorType(s, o, _) { | |
_ || (_ = Error); | |
function _e(tt, rt, it) { | |
return typeof o == "string" ? o : o(tt, rt, it); | |
} | |
var et = (function (tt) { | |
_inheritsLoose$1(rt, tt); | |
function rt(it, ot, ct) { | |
return tt.call(this, _e(it, ot, ct)) || this; | |
} | |
return rt; | |
})(_); | |
(et.prototype.name = _.name), (et.prototype.code = s), (codes[s] = et); | |
} | |
function oneOf(s, o) { | |
if (Array.isArray(s)) { | |
var _ = s.length; | |
return ( | |
(s = s.map(function (_e) { | |
return String(_e); | |
})), | |
_ > 2 | |
? "one of " | |
.concat(o, " ") | |
.concat(s.slice(0, _ - 1).join(", "), ", or ") + s[_ - 1] | |
: _ === 2 | |
? "one of ".concat(o, " ").concat(s[0], " or ").concat(s[1]) | |
: "of ".concat(o, " ").concat(s[0]) | |
); | |
} else return "of ".concat(o, " ").concat(String(s)); | |
} | |
function startsWith(s, o, _) { | |
return s.substr(!_ || _ < 0 ? 0 : +_, o.length) === o; | |
} | |
function endsWith(s, o, _) { | |
return ( | |
(_ === void 0 || _ > s.length) && (_ = s.length), | |
s.substring(_ - o.length, _) === o | |
); | |
} | |
function includes(s, o, _) { | |
return ( | |
typeof _ != "number" && (_ = 0), | |
_ + o.length > s.length ? !1 : s.indexOf(o, _) !== -1 | |
); | |
} | |
createErrorType( | |
"ERR_INVALID_OPT_VALUE", | |
function (s, o) { | |
return 'The value "' + o + '" is invalid for option "' + s + '"'; | |
}, | |
TypeError, | |
); | |
createErrorType( | |
"ERR_INVALID_ARG_TYPE", | |
function (s, o, _) { | |
var _e; | |
typeof o == "string" && startsWith(o, "not ") | |
? ((_e = "must not be"), (o = o.replace(/^not /, ""))) | |
: (_e = "must be"); | |
var et; | |
if (endsWith(s, " argument")) | |
et = "The ".concat(s, " ").concat(_e, " ").concat(oneOf(o, "type")); | |
else { | |
var tt = includes(s, ".") ? "property" : "argument"; | |
et = 'The "' | |
.concat(s, '" ') | |
.concat(tt, " ") | |
.concat(_e, " ") | |
.concat(oneOf(o, "type")); | |
} | |
return (et += ". Received type ".concat(typeof _)), et; | |
}, | |
TypeError, | |
); | |
createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"); | |
createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function (s) { | |
return "The " + s + " method is not implemented"; | |
}); | |
createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close"); | |
createErrorType("ERR_STREAM_DESTROYED", function (s) { | |
return "Cannot call " + s + " after a stream was destroyed"; | |
}); | |
createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"); | |
createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"); | |
createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end"); | |
createErrorType( | |
"ERR_STREAM_NULL_VALUES", | |
"May not write null values to stream", | |
TypeError, | |
); | |
createErrorType( | |
"ERR_UNKNOWN_ENCODING", | |
function (s) { | |
return "Unknown encoding: " + s; | |
}, | |
TypeError, | |
); | |
createErrorType( | |
"ERR_STREAM_UNSHIFT_AFTER_END_EVENT", | |
"stream.unshift() after end event", | |
); | |
errorsBrowser.codes = codes; | |
var ERR_INVALID_OPT_VALUE = errorsBrowser.codes.ERR_INVALID_OPT_VALUE; | |
function highWaterMarkFrom(s, o, _) { | |
return s.highWaterMark != null ? s.highWaterMark : o ? s[_] : null; | |
} | |
function getHighWaterMark(s, o, _, _e) { | |
var et = highWaterMarkFrom(o, _e, _); | |
if (et != null) { | |
if (!(isFinite(et) && Math.floor(et) === et) || et < 0) { | |
var tt = _e ? _ : "highWaterMark"; | |
throw new ERR_INVALID_OPT_VALUE(tt, et); | |
} | |
return Math.floor(et); | |
} | |
return s.objectMode ? 16 : 16 * 1024; | |
} | |
var state = { getHighWaterMark }, | |
browser$f = deprecate$1; | |
function deprecate$1(s, o) { | |
if (config$1("noDeprecation")) return s; | |
var _ = !1; | |
function _e() { | |
if (!_) { | |
if (config$1("throwDeprecation")) throw new Error(o); | |
config$1("traceDeprecation") ? console.trace(o) : console.warn(o), | |
(_ = !0); | |
} | |
return s.apply(this, arguments); | |
} | |
return _e; | |
} | |
function config$1(s) { | |
try { | |
if (!commonjsGlobal$3.localStorage) return !1; | |
} catch { | |
return !1; | |
} | |
var o = commonjsGlobal$3.localStorage[s]; | |
return o == null ? !1 : String(o).toLowerCase() === "true"; | |
} | |
var _stream_writable$2, hasRequired_stream_writable$2; | |
function require_stream_writable$2() { | |
if (hasRequired_stream_writable$2) return _stream_writable$2; | |
(hasRequired_stream_writable$2 = 1), (_stream_writable$2 = Ht); | |
function s(Vt) { | |
var Ct = this; | |
(this.next = null), | |
(this.entry = null), | |
(this.finish = function () { | |
Zt(Ct, Vt); | |
}); | |
} | |
var o; | |
Ht.WritableState = Xt; | |
var _ = { deprecate: browser$f }, | |
_e = streamBrowser$2, | |
et = require$$0$2.Buffer, | |
tt = | |
(typeof commonjsGlobal$3 < "u" | |
? commonjsGlobal$3 | |
: typeof window < "u" | |
? window | |
: typeof self < "u" | |
? self | |
: {} | |
).Uint8Array || function () {}; | |
function rt(Vt) { | |
return et.from(Vt); | |
} | |
function it(Vt) { | |
return et.isBuffer(Vt) || Vt instanceof tt; | |
} | |
var ot = destroy_1$2, | |
ct = state, | |
at = ct.getHighWaterMark, | |
ht = errorsBrowser.codes, | |
mt = ht.ERR_INVALID_ARG_TYPE, | |
vt = ht.ERR_METHOD_NOT_IMPLEMENTED, | |
xt = ht.ERR_MULTIPLE_CALLBACK, | |
St = ht.ERR_STREAM_CANNOT_PIPE, | |
$t = ht.ERR_STREAM_DESTROYED, | |
Et = ht.ERR_STREAM_NULL_VALUES, | |
_t = ht.ERR_STREAM_WRITE_AFTER_END, | |
Rt = ht.ERR_UNKNOWN_ENCODING, | |
Mt = ot.errorOrDestroy; | |
inherits_browserExports(Ht, _e); | |
function It() {} | |
function Xt(Vt, Ct, jt) { | |
(o = o || require_stream_duplex$2()), | |
(Vt = Vt || {}), | |
typeof jt != "boolean" && (jt = Ct instanceof o), | |
(this.objectMode = !!Vt.objectMode), | |
jt && (this.objectMode = this.objectMode || !!Vt.writableObjectMode), | |
(this.highWaterMark = at(this, Vt, "writableHighWaterMark", jt)), | |
(this.finalCalled = !1), | |
(this.needDrain = !1), | |
(this.ending = !1), | |
(this.ended = !1), | |
(this.finished = !1), | |
(this.destroyed = !1); | |
var Wt = Vt.decodeStrings === !1; | |
(this.decodeStrings = !Wt), | |
(this.defaultEncoding = Vt.defaultEncoding || "utf8"), | |
(this.length = 0), | |
(this.writing = !1), | |
(this.corked = 0), | |
(this.sync = !0), | |
(this.bufferProcessing = !1), | |
(this.onwrite = function (er) { | |
Ot(Ct, er); | |
}), | |
(this.writecb = null), | |
(this.writelen = 0), | |
(this.bufferedRequest = null), | |
(this.lastBufferedRequest = null), | |
(this.pendingcb = 0), | |
(this.prefinished = !1), | |
(this.errorEmitted = !1), | |
(this.emitClose = Vt.emitClose !== !1), | |
(this.autoDestroy = !!Vt.autoDestroy), | |
(this.bufferedRequestCount = 0), | |
(this.corkedRequestsFree = new s(this)); | |
} | |
(Xt.prototype.getBuffer = function () { | |
for (var Ct = this.bufferedRequest, jt = []; Ct; ) | |
jt.push(Ct), (Ct = Ct.next); | |
return jt; | |
}), | |
(function () { | |
try { | |
Object.defineProperty(Xt.prototype, "buffer", { | |
get: _.deprecate( | |
function () { | |
return this.getBuffer(); | |
}, | |
"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", | |
"DEP0003", | |
), | |
}); | |
} catch {} | |
})(); | |
var Jt; | |
typeof Symbol == "function" && | |
Symbol.hasInstance && | |
typeof Function.prototype[Symbol.hasInstance] == "function" | |
? ((Jt = Function.prototype[Symbol.hasInstance]), | |
Object.defineProperty(Ht, Symbol.hasInstance, { | |
value: function (Ct) { | |
return Jt.call(this, Ct) | |
? !0 | |
: this !== Ht | |
? !1 | |
: Ct && Ct._writableState instanceof Xt; | |
}, | |
})) | |
: (Jt = function (Ct) { | |
return Ct instanceof this; | |
}); | |
function Ht(Vt) { | |
o = o || require_stream_duplex$2(); | |
var Ct = this instanceof o; | |
if (!Ct && !Jt.call(Ht, this)) return new Ht(Vt); | |
(this._writableState = new Xt(Vt, this, Ct)), | |
(this.writable = !0), | |
Vt && | |
(typeof Vt.write == "function" && (this._write = Vt.write), | |
typeof Vt.writev == "function" && (this._writev = Vt.writev), | |
typeof Vt.destroy == "function" && (this._destroy = Vt.destroy), | |
typeof Vt.final == "function" && (this._final = Vt.final)), | |
_e.call(this); | |
} | |
Ht.prototype.pipe = function () { | |
Mt(this, new St()); | |
}; | |
function qt(Vt, Ct) { | |
var jt = new _t(); | |
Mt(Vt, jt), process$1.nextTick(Ct, jt); | |
} | |
function nr(Vt, Ct, jt, Wt) { | |
var er; | |
return ( | |
jt === null | |
? (er = new Et()) | |
: typeof jt != "string" && | |
!Ct.objectMode && | |
(er = new mt("chunk", ["string", "Buffer"], jt)), | |
er ? (Mt(Vt, er), process$1.nextTick(Wt, er), !1) : !0 | |
); | |
} | |
(Ht.prototype.write = function (Vt, Ct, jt) { | |
var Wt = this._writableState, | |
er = !1, | |
Gt = !Wt.objectMode && it(Vt); | |
return ( | |
Gt && !et.isBuffer(Vt) && (Vt = rt(Vt)), | |
typeof Ct == "function" && ((jt = Ct), (Ct = null)), | |
Gt ? (Ct = "buffer") : Ct || (Ct = Wt.defaultEncoding), | |
typeof jt != "function" && (jt = It), | |
Wt.ending | |
? qt(this, jt) | |
: (Gt || nr(this, Wt, Vt, jt)) && | |
(Wt.pendingcb++, (er = nt(this, Wt, Gt, Vt, Ct, jt))), | |
er | |
); | |
}), | |
(Ht.prototype.cork = function () { | |
this._writableState.corked++; | |
}), | |
(Ht.prototype.uncork = function () { | |
var Vt = this._writableState; | |
Vt.corked && | |
(Vt.corked--, | |
!Vt.writing && | |
!Vt.corked && | |
!Vt.bufferProcessing && | |
Vt.bufferedRequest && | |
gt(this, Vt)); | |
}), | |
(Ht.prototype.setDefaultEncoding = function (Ct) { | |
if ( | |
(typeof Ct == "string" && (Ct = Ct.toLowerCase()), | |
!( | |
[ | |
"hex", | |
"utf8", | |
"utf-8", | |
"ascii", | |
"binary", | |
"base64", | |
"ucs2", | |
"ucs-2", | |
"utf16le", | |
"utf-16le", | |
"raw", | |
].indexOf((Ct + "").toLowerCase()) > -1 | |
)) | |
) | |
throw new Rt(Ct); | |
return (this._writableState.defaultEncoding = Ct), this; | |
}), | |
Object.defineProperty(Ht.prototype, "writableBuffer", { | |
enumerable: !1, | |
get: function () { | |
return this._writableState && this._writableState.getBuffer(); | |
}, | |
}); | |
function wt(Vt, Ct, jt) { | |
return ( | |
!Vt.objectMode && | |
Vt.decodeStrings !== !1 && | |
typeof Ct == "string" && | |
(Ct = et.from(Ct, jt)), | |
Ct | |
); | |
} | |
Object.defineProperty(Ht.prototype, "writableHighWaterMark", { | |
enumerable: !1, | |
get: function () { | |
return this._writableState.highWaterMark; | |
}, | |
}); | |
function nt(Vt, Ct, jt, Wt, er, Gt) { | |
if (!jt) { | |
var Ft = wt(Ct, Wt, er); | |
Wt !== Ft && ((jt = !0), (er = "buffer"), (Wt = Ft)); | |
} | |
var rr = Ct.objectMode ? 1 : Wt.length; | |
Ct.length += rr; | |
var Sr = Ct.length < Ct.highWaterMark; | |
if ((Sr || (Ct.needDrain = !0), Ct.writing || Ct.corked)) { | |
var fr = Ct.lastBufferedRequest; | |
(Ct.lastBufferedRequest = { | |
chunk: Wt, | |
encoding: er, | |
isBuf: jt, | |
callback: Gt, | |
next: null, | |
}), | |
fr | |
? (fr.next = Ct.lastBufferedRequest) | |
: (Ct.bufferedRequest = Ct.lastBufferedRequest), | |
(Ct.bufferedRequestCount += 1); | |
} else ut(Vt, Ct, !1, rr, Wt, er, Gt); | |
return Sr; | |
} | |
function ut(Vt, Ct, jt, Wt, er, Gt, Ft) { | |
(Ct.writelen = Wt), | |
(Ct.writecb = Ft), | |
(Ct.writing = !0), | |
(Ct.sync = !0), | |
Ct.destroyed | |
? Ct.onwrite(new $t("write")) | |
: jt | |
? Vt._writev(er, Ct.onwrite) | |
: Vt._write(er, Gt, Ct.onwrite), | |
(Ct.sync = !1); | |
} | |
function ft(Vt, Ct, jt, Wt, er) { | |
--Ct.pendingcb, | |
jt | |
? (process$1.nextTick(er, Wt), | |
process$1.nextTick(Qt, Vt, Ct), | |
(Vt._writableState.errorEmitted = !0), | |
Mt(Vt, Wt)) | |
: (er(Wt), | |
(Vt._writableState.errorEmitted = !0), | |
Mt(Vt, Wt), | |
Qt(Vt, Ct)); | |
} | |
function dt(Vt) { | |
(Vt.writing = !1), | |
(Vt.writecb = null), | |
(Vt.length -= Vt.writelen), | |
(Vt.writelen = 0); | |
} | |
function Ot(Vt, Ct) { | |
var jt = Vt._writableState, | |
Wt = jt.sync, | |
er = jt.writecb; | |
if (typeof er != "function") throw new xt(); | |
if ((dt(jt), Ct)) ft(Vt, jt, Wt, Ct, er); | |
else { | |
var Gt = st(jt) || Vt.destroyed; | |
!Gt && | |
!jt.corked && | |
!jt.bufferProcessing && | |
jt.bufferedRequest && | |
gt(Vt, jt), | |
Wt ? process$1.nextTick(yt, Vt, jt, Gt, er) : yt(Vt, jt, Gt, er); | |
} | |
} | |
function yt(Vt, Ct, jt, Wt) { | |
jt || bt(Vt, Ct), Ct.pendingcb--, Wt(), Qt(Vt, Ct); | |
} | |
function bt(Vt, Ct) { | |
Ct.length === 0 && | |
Ct.needDrain && | |
((Ct.needDrain = !1), Vt.emit("drain")); | |
} | |
function gt(Vt, Ct) { | |
Ct.bufferProcessing = !0; | |
var jt = Ct.bufferedRequest; | |
if (Vt._writev && jt && jt.next) { | |
var Wt = Ct.bufferedRequestCount, | |
er = new Array(Wt), | |
Gt = Ct.corkedRequestsFree; | |
Gt.entry = jt; | |
for (var Ft = 0, rr = !0; jt; ) | |
(er[Ft] = jt), jt.isBuf || (rr = !1), (jt = jt.next), (Ft += 1); | |
(er.allBuffers = rr), | |
ut(Vt, Ct, !0, Ct.length, er, "", Gt.finish), | |
Ct.pendingcb++, | |
(Ct.lastBufferedRequest = null), | |
Gt.next | |
? ((Ct.corkedRequestsFree = Gt.next), (Gt.next = null)) | |
: (Ct.corkedRequestsFree = new s(Ct)), | |
(Ct.bufferedRequestCount = 0); | |
} else { | |
for (; jt; ) { | |
var Sr = jt.chunk, | |
fr = jt.encoding, | |
dr = jt.callback, | |
Mr = Ct.objectMode ? 1 : Sr.length; | |
if ( | |
(ut(Vt, Ct, !1, Mr, Sr, fr, dr), | |
(jt = jt.next), | |
Ct.bufferedRequestCount--, | |
Ct.writing) | |
) | |
break; | |
} | |
jt === null && (Ct.lastBufferedRequest = null); | |
} | |
(Ct.bufferedRequest = jt), (Ct.bufferProcessing = !1); | |
} | |
(Ht.prototype._write = function (Vt, Ct, jt) { | |
jt(new vt("_write()")); | |
}), | |
(Ht.prototype._writev = null), | |
(Ht.prototype.end = function (Vt, Ct, jt) { | |
var Wt = this._writableState; | |
return ( | |
typeof Vt == "function" | |
? ((jt = Vt), (Vt = null), (Ct = null)) | |
: typeof Ct == "function" && ((jt = Ct), (Ct = null)), | |
Vt != null && this.write(Vt, Ct), | |
Wt.corked && ((Wt.corked = 1), this.uncork()), | |
Wt.ending || Dt(this, Wt, jt), | |
this | |
); | |
}), | |
Object.defineProperty(Ht.prototype, "writableLength", { | |
enumerable: !1, | |
get: function () { | |
return this._writableState.length; | |
}, | |
}); | |
function st(Vt) { | |
return ( | |
Vt.ending && | |
Vt.length === 0 && | |
Vt.bufferedRequest === null && | |
!Vt.finished && | |
!Vt.writing | |
); | |
} | |
function pt(Vt, Ct) { | |
Vt._final(function (jt) { | |
Ct.pendingcb--, | |
jt && Mt(Vt, jt), | |
(Ct.prefinished = !0), | |
Vt.emit("prefinish"), | |
Qt(Vt, Ct); | |
}); | |
} | |
function kt(Vt, Ct) { | |
!Ct.prefinished && | |
!Ct.finalCalled && | |
(typeof Vt._final == "function" && !Ct.destroyed | |
? (Ct.pendingcb++, | |
(Ct.finalCalled = !0), | |
process$1.nextTick(pt, Vt, Ct)) | |
: ((Ct.prefinished = !0), Vt.emit("prefinish"))); | |
} | |
function Qt(Vt, Ct) { | |
var jt = st(Ct); | |
if ( | |
jt && | |
(kt(Vt, Ct), | |
Ct.pendingcb === 0 && | |
((Ct.finished = !0), Vt.emit("finish"), Ct.autoDestroy)) | |
) { | |
var Wt = Vt._readableState; | |
(!Wt || (Wt.autoDestroy && Wt.endEmitted)) && Vt.destroy(); | |
} | |
return jt; | |
} | |
function Dt(Vt, Ct, jt) { | |
(Ct.ending = !0), | |
Qt(Vt, Ct), | |
jt && (Ct.finished ? process$1.nextTick(jt) : Vt.once("finish", jt)), | |
(Ct.ended = !0), | |
(Vt.writable = !1); | |
} | |
function Zt(Vt, Ct, jt) { | |
var Wt = Vt.entry; | |
for (Vt.entry = null; Wt; ) { | |
var er = Wt.callback; | |
Ct.pendingcb--, er(jt), (Wt = Wt.next); | |
} | |
Ct.corkedRequestsFree.next = Vt; | |
} | |
return ( | |
Object.defineProperty(Ht.prototype, "destroyed", { | |
enumerable: !1, | |
get: function () { | |
return this._writableState === void 0 | |
? !1 | |
: this._writableState.destroyed; | |
}, | |
set: function (Ct) { | |
this._writableState && (this._writableState.destroyed = Ct); | |
}, | |
}), | |
(Ht.prototype.destroy = ot.destroy), | |
(Ht.prototype._undestroy = ot.undestroy), | |
(Ht.prototype._destroy = function (Vt, Ct) { | |
Ct(Vt); | |
}), | |
_stream_writable$2 | |
); | |
} | |
var _stream_duplex$2, hasRequired_stream_duplex$2; | |
function require_stream_duplex$2() { | |
if (hasRequired_stream_duplex$2) return _stream_duplex$2; | |
hasRequired_stream_duplex$2 = 1; | |
var s = | |
Object.keys || | |
function (ct) { | |
var at = []; | |
for (var ht in ct) at.push(ht); | |
return at; | |
}; | |
_stream_duplex$2 = rt; | |
var o = require_stream_readable$2(), | |
_ = require_stream_writable$2(); | |
inherits_browserExports(rt, o); | |
for (var _e = s(_.prototype), et = 0; et < _e.length; et++) { | |
var tt = _e[et]; | |
rt.prototype[tt] || (rt.prototype[tt] = _.prototype[tt]); | |
} | |
function rt(ct) { | |
if (!(this instanceof rt)) return new rt(ct); | |
o.call(this, ct), | |
_.call(this, ct), | |
(this.allowHalfOpen = !0), | |
ct && | |
(ct.readable === !1 && (this.readable = !1), | |
ct.writable === !1 && (this.writable = !1), | |
ct.allowHalfOpen === !1 && | |
((this.allowHalfOpen = !1), this.once("end", it))); | |
} | |
Object.defineProperty(rt.prototype, "writableHighWaterMark", { | |
enumerable: !1, | |
get: function () { | |
return this._writableState.highWaterMark; | |
}, | |
}), | |
Object.defineProperty(rt.prototype, "writableBuffer", { | |
enumerable: !1, | |
get: function () { | |
return this._writableState && this._writableState.getBuffer(); | |
}, | |
}), | |
Object.defineProperty(rt.prototype, "writableLength", { | |
enumerable: !1, | |
get: function () { | |
return this._writableState.length; | |
}, | |
}); | |
function it() { | |
this._writableState.ended || process$1.nextTick(ot, this); | |
} | |
function ot(ct) { | |
ct.end(); | |
} | |
return ( | |
Object.defineProperty(rt.prototype, "destroyed", { | |
enumerable: !1, | |
get: function () { | |
return this._readableState === void 0 || | |
this._writableState === void 0 | |
? !1 | |
: this._readableState.destroyed && this._writableState.destroyed; | |
}, | |
set: function (at) { | |
this._readableState === void 0 || | |
this._writableState === void 0 || | |
((this._readableState.destroyed = at), | |
(this._writableState.destroyed = at)); | |
}, | |
}), | |
_stream_duplex$2 | |
); | |
} | |
var string_decoder = {}, | |
safeBuffer$2 = { exports: {} }; | |
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ var hasRequiredSafeBuffer$2; | |
function requireSafeBuffer$2() { | |
return ( | |
hasRequiredSafeBuffer$2 || | |
((hasRequiredSafeBuffer$2 = 1), | |
(function (s, o) { | |
var _ = require$$0$2, | |
_e = _.Buffer; | |
function et(rt, it) { | |
for (var ot in rt) it[ot] = rt[ot]; | |
} | |
_e.from && _e.alloc && _e.allocUnsafe && _e.allocUnsafeSlow | |
? (s.exports = _) | |
: (et(_, o), (o.Buffer = tt)); | |
function tt(rt, it, ot) { | |
return _e(rt, it, ot); | |
} | |
(tt.prototype = Object.create(_e.prototype)), | |
et(_e, tt), | |
(tt.from = function (rt, it, ot) { | |
if (typeof rt == "number") | |
throw new TypeError("Argument must not be a number"); | |
return _e(rt, it, ot); | |
}), | |
(tt.alloc = function (rt, it, ot) { | |
if (typeof rt != "number") | |
throw new TypeError("Argument must be a number"); | |
var ct = _e(rt); | |
return ( | |
it !== void 0 | |
? typeof ot == "string" | |
? ct.fill(it, ot) | |
: ct.fill(it) | |
: ct.fill(0), | |
ct | |
); | |
}), | |
(tt.allocUnsafe = function (rt) { | |
if (typeof rt != "number") | |
throw new TypeError("Argument must be a number"); | |
return _e(rt); | |
}), | |
(tt.allocUnsafeSlow = function (rt) { | |
if (typeof rt != "number") | |
throw new TypeError("Argument must be a number"); | |
return _.SlowBuffer(rt); | |
}); | |
})(safeBuffer$2, safeBuffer$2.exports)), | |
safeBuffer$2.exports | |
); | |
} | |
var hasRequiredString_decoder; | |
function requireString_decoder() { | |
if (hasRequiredString_decoder) return string_decoder; | |
hasRequiredString_decoder = 1; | |
var s = requireSafeBuffer$2().Buffer, | |
o = | |
s.isEncoding || | |
function (Et) { | |
switch (((Et = "" + Et), Et && Et.toLowerCase())) { | |
case "hex": | |
case "utf8": | |
case "utf-8": | |
case "ascii": | |
case "binary": | |
case "base64": | |
case "ucs2": | |
case "ucs-2": | |
case "utf16le": | |
case "utf-16le": | |
case "raw": | |
return !0; | |
default: | |
return !1; | |
} | |
}; | |
function _(Et) { | |
if (!Et) return "utf8"; | |
for (var _t; ; ) | |
switch (Et) { | |
case "utf8": | |
case "utf-8": | |
return "utf8"; | |
case "ucs2": | |
case "ucs-2": | |
case "utf16le": | |
case "utf-16le": | |
return "utf16le"; | |
case "latin1": | |
case "binary": | |
return "latin1"; | |
case "base64": | |
case "ascii": | |
case "hex": | |
return Et; | |
default: | |
if (_t) return; | |
(Et = ("" + Et).toLowerCase()), (_t = !0); | |
} | |
} | |
function _e(Et) { | |
var _t = _(Et); | |
if (typeof _t != "string" && (s.isEncoding === o || !o(Et))) | |
throw new Error("Unknown encoding: " + Et); | |
return _t || Et; | |
} | |
string_decoder.StringDecoder = et; | |
function et(Et) { | |
this.encoding = _e(Et); | |
var _t; | |
switch (this.encoding) { | |
case "utf16le": | |
(this.text = ht), (this.end = mt), (_t = 4); | |
break; | |
case "utf8": | |
(this.fillLast = ot), (_t = 4); | |
break; | |
case "base64": | |
(this.text = vt), (this.end = xt), (_t = 3); | |
break; | |
default: | |
(this.write = St), (this.end = $t); | |
return; | |
} | |
(this.lastNeed = 0), | |
(this.lastTotal = 0), | |
(this.lastChar = s.allocUnsafe(_t)); | |
} | |
(et.prototype.write = function (Et) { | |
if (Et.length === 0) return ""; | |
var _t, Rt; | |
if (this.lastNeed) { | |
if (((_t = this.fillLast(Et)), _t === void 0)) return ""; | |
(Rt = this.lastNeed), (this.lastNeed = 0); | |
} else Rt = 0; | |
return Rt < Et.length | |
? _t | |
? _t + this.text(Et, Rt) | |
: this.text(Et, Rt) | |
: _t || ""; | |
}), | |
(et.prototype.end = at), | |
(et.prototype.text = ct), | |
(et.prototype.fillLast = function (Et) { | |
if (this.lastNeed <= Et.length) | |
return ( | |
Et.copy( | |
this.lastChar, | |
this.lastTotal - this.lastNeed, | |
0, | |
this.lastNeed, | |
), | |
this.lastChar.toString(this.encoding, 0, this.lastTotal) | |
); | |
Et.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, Et.length), | |
(this.lastNeed -= Et.length); | |
}); | |
function tt(Et) { | |
return Et <= 127 | |
? 0 | |
: Et >> 5 === 6 | |
? 2 | |
: Et >> 4 === 14 | |
? 3 | |
: Et >> 3 === 30 | |
? 4 | |
: Et >> 6 === 2 | |
? -1 | |
: -2; | |
} | |
function rt(Et, _t, Rt) { | |
var Mt = _t.length - 1; | |
if (Mt < Rt) return 0; | |
var It = tt(_t[Mt]); | |
return It >= 0 | |
? (It > 0 && (Et.lastNeed = It - 1), It) | |
: --Mt < Rt || It === -2 | |
? 0 | |
: ((It = tt(_t[Mt])), | |
It >= 0 | |
? (It > 0 && (Et.lastNeed = It - 2), It) | |
: --Mt < Rt || It === -2 | |
? 0 | |
: ((It = tt(_t[Mt])), | |
It >= 0 | |
? (It > 0 && (It === 2 ? (It = 0) : (Et.lastNeed = It - 3)), | |
It) | |
: 0)); | |
} | |
function it(Et, _t, Rt) { | |
if ((_t[0] & 192) !== 128) return (Et.lastNeed = 0), "�"; | |
if (Et.lastNeed > 1 && _t.length > 1) { | |
if ((_t[1] & 192) !== 128) return (Et.lastNeed = 1), "�"; | |
if (Et.lastNeed > 2 && _t.length > 2 && (_t[2] & 192) !== 128) | |
return (Et.lastNeed = 2), "�"; | |
} | |
} | |
function ot(Et) { | |
var _t = this.lastTotal - this.lastNeed, | |
Rt = it(this, Et); | |
if (Rt !== void 0) return Rt; | |
if (this.lastNeed <= Et.length) | |
return ( | |
Et.copy(this.lastChar, _t, 0, this.lastNeed), | |
this.lastChar.toString(this.encoding, 0, this.lastTotal) | |
); | |
Et.copy(this.lastChar, _t, 0, Et.length), (this.lastNeed -= Et.length); | |
} | |
function ct(Et, _t) { | |
var Rt = rt(this, Et, _t); | |
if (!this.lastNeed) return Et.toString("utf8", _t); | |
this.lastTotal = Rt; | |
var Mt = Et.length - (Rt - this.lastNeed); | |
return Et.copy(this.lastChar, 0, Mt), Et.toString("utf8", _t, Mt); | |
} | |
function at(Et) { | |
var _t = Et && Et.length ? this.write(Et) : ""; | |
return this.lastNeed ? _t + "�" : _t; | |
} | |
function ht(Et, _t) { | |
if ((Et.length - _t) % 2 === 0) { | |
var Rt = Et.toString("utf16le", _t); | |
if (Rt) { | |
var Mt = Rt.charCodeAt(Rt.length - 1); | |
if (Mt >= 55296 && Mt <= 56319) | |
return ( | |
(this.lastNeed = 2), | |
(this.lastTotal = 4), | |
(this.lastChar[0] = Et[Et.length - 2]), | |
(this.lastChar[1] = Et[Et.length - 1]), | |
Rt.slice(0, -1) | |
); | |
} | |
return Rt; | |
} | |
return ( | |
(this.lastNeed = 1), | |
(this.lastTotal = 2), | |
(this.lastChar[0] = Et[Et.length - 1]), | |
Et.toString("utf16le", _t, Et.length - 1) | |
); | |
} | |
function mt(Et) { | |
var _t = Et && Et.length ? this.write(Et) : ""; | |
if (this.lastNeed) { | |
var Rt = this.lastTotal - this.lastNeed; | |
return _t + this.lastChar.toString("utf16le", 0, Rt); | |
} | |
return _t; | |
} | |
function vt(Et, _t) { | |
var Rt = (Et.length - _t) % 3; | |
return Rt === 0 | |
? Et.toString("base64", _t) | |
: ((this.lastNeed = 3 - Rt), | |
(this.lastTotal = 3), | |
Rt === 1 | |
? (this.lastChar[0] = Et[Et.length - 1]) | |
: ((this.lastChar[0] = Et[Et.length - 2]), | |
(this.lastChar[1] = Et[Et.length - 1])), | |
Et.toString("base64", _t, Et.length - Rt)); | |
} | |
function xt(Et) { | |
var _t = Et && Et.length ? this.write(Et) : ""; | |
return this.lastNeed | |
? _t + this.lastChar.toString("base64", 0, 3 - this.lastNeed) | |
: _t; | |
} | |
function St(Et) { | |
return Et.toString(this.encoding); | |
} | |
function $t(Et) { | |
return Et && Et.length ? this.write(Et) : ""; | |
} | |
return string_decoder; | |
} | |
var ERR_STREAM_PREMATURE_CLOSE = | |
errorsBrowser.codes.ERR_STREAM_PREMATURE_CLOSE; | |
function once$4(s) { | |
var o = !1; | |
return function () { | |
if (!o) { | |
o = !0; | |
for (var _ = arguments.length, _e = new Array(_), et = 0; et < _; et++) | |
_e[et] = arguments[et]; | |
s.apply(this, _e); | |
} | |
}; | |
} | |
function noop$4() {} | |
function isRequest$2(s) { | |
return s.setHeader && typeof s.abort == "function"; | |
} | |
function eos$3(s, o, _) { | |
if (typeof o == "function") return eos$3(s, null, o); | |
o || (o = {}), (_ = once$4(_ || noop$4)); | |
var _e = o.readable || (o.readable !== !1 && s.readable), | |
et = o.writable || (o.writable !== !1 && s.writable), | |
tt = function () { | |
s.writable || it(); | |
}, | |
rt = s._writableState && s._writableState.finished, | |
it = function () { | |
(et = !1), (rt = !0), _e || _.call(s); | |
}, | |
ot = s._readableState && s._readableState.endEmitted, | |
ct = function () { | |
(_e = !1), (ot = !0), et || _.call(s); | |
}, | |
at = function (xt) { | |
_.call(s, xt); | |
}, | |
ht = function () { | |
var xt; | |
if (_e && !ot) | |
return ( | |
(!s._readableState || !s._readableState.ended) && | |
(xt = new ERR_STREAM_PREMATURE_CLOSE()), | |
_.call(s, xt) | |
); | |
if (et && !rt) | |
return ( | |
(!s._writableState || !s._writableState.ended) && | |
(xt = new ERR_STREAM_PREMATURE_CLOSE()), | |
_.call(s, xt) | |
); | |
}, | |
mt = function () { | |
s.req.on("finish", it); | |
}; | |
return ( | |
isRequest$2(s) | |
? (s.on("complete", it), | |
s.on("abort", ht), | |
s.req ? mt() : s.on("request", mt)) | |
: et && !s._writableState && (s.on("end", tt), s.on("close", tt)), | |
s.on("end", ct), | |
s.on("finish", it), | |
o.error !== !1 && s.on("error", at), | |
s.on("close", ht), | |
function () { | |
s.removeListener("complete", it), | |
s.removeListener("abort", ht), | |
s.removeListener("request", mt), | |
s.req && s.req.removeListener("finish", it), | |
s.removeListener("end", tt), | |
s.removeListener("close", tt), | |
s.removeListener("finish", it), | |
s.removeListener("end", ct), | |
s.removeListener("error", at), | |
s.removeListener("close", ht); | |
} | |
); | |
} | |
var endOfStream$1 = eos$3, | |
async_iterator, | |
hasRequiredAsync_iterator; | |
function requireAsync_iterator() { | |
if (hasRequiredAsync_iterator) return async_iterator; | |
hasRequiredAsync_iterator = 1; | |
var s; | |
function o(Rt, Mt, It) { | |
return ( | |
(Mt = _(Mt)), | |
Mt in Rt | |
? Object.defineProperty(Rt, Mt, { | |
value: It, | |
enumerable: !0, | |
configurable: !0, | |
writable: !0, | |
}) | |
: (Rt[Mt] = It), | |
Rt | |
); | |
} | |
function _(Rt) { | |
var Mt = _e(Rt, "string"); | |
return typeof Mt == "symbol" ? Mt : String(Mt); | |
} | |
function _e(Rt, Mt) { | |
if (typeof Rt != "object" || Rt === null) return Rt; | |
var It = Rt[Symbol.toPrimitive]; | |
if (It !== void 0) { | |
var Xt = It.call(Rt, Mt || "default"); | |
if (typeof Xt != "object") return Xt; | |
throw new TypeError("@@toPrimitive must return a primitive value."); | |
} | |
return (Mt === "string" ? String : Number)(Rt); | |
} | |
var et = endOfStream$1, | |
tt = Symbol("lastResolve"), | |
rt = Symbol("lastReject"), | |
it = Symbol("error"), | |
ot = Symbol("ended"), | |
ct = Symbol("lastPromise"), | |
at = Symbol("handlePromise"), | |
ht = Symbol("stream"); | |
function mt(Rt, Mt) { | |
return { value: Rt, done: Mt }; | |
} | |
function vt(Rt) { | |
var Mt = Rt[tt]; | |
if (Mt !== null) { | |
var It = Rt[ht].read(); | |
It !== null && | |
((Rt[ct] = null), (Rt[tt] = null), (Rt[rt] = null), Mt(mt(It, !1))); | |
} | |
} | |
function xt(Rt) { | |
process$1.nextTick(vt, Rt); | |
} | |
function St(Rt, Mt) { | |
return function (It, Xt) { | |
Rt.then(function () { | |
if (Mt[ot]) { | |
It(mt(void 0, !0)); | |
return; | |
} | |
Mt[at](It, Xt); | |
}, Xt); | |
}; | |
} | |
var $t = Object.getPrototypeOf(function () {}), | |
Et = Object.setPrototypeOf( | |
((s = { | |
get stream() { | |
return this[ht]; | |
}, | |
next: function () { | |
var Mt = this, | |
It = this[it]; | |
if (It !== null) return Promise.reject(It); | |
if (this[ot]) return Promise.resolve(mt(void 0, !0)); | |
if (this[ht].destroyed) | |
return new Promise(function (qt, nr) { | |
process$1.nextTick(function () { | |
Mt[it] ? nr(Mt[it]) : qt(mt(void 0, !0)); | |
}); | |
}); | |
var Xt = this[ct], | |
Jt; | |
if (Xt) Jt = new Promise(St(Xt, this)); | |
else { | |
var Ht = this[ht].read(); | |
if (Ht !== null) return Promise.resolve(mt(Ht, !1)); | |
Jt = new Promise(this[at]); | |
} | |
return (this[ct] = Jt), Jt; | |
}, | |
}), | |
o(s, Symbol.asyncIterator, function () { | |
return this; | |
}), | |
o(s, "return", function () { | |
var Mt = this; | |
return new Promise(function (It, Xt) { | |
Mt[ht].destroy(null, function (Jt) { | |
if (Jt) { | |
Xt(Jt); | |
return; | |
} | |
It(mt(void 0, !0)); | |
}); | |
}); | |
}), | |
s), | |
$t, | |
), | |
_t = function (Mt) { | |
var It, | |
Xt = Object.create( | |
Et, | |
((It = {}), | |
o(It, ht, { value: Mt, writable: !0 }), | |
o(It, tt, { value: null, writable: !0 }), | |
o(It, rt, { value: null, writable: !0 }), | |
o(It, it, { value: null, writable: !0 }), | |
o(It, ot, { value: Mt._readableState.endEmitted, writable: !0 }), | |
o(It, at, { | |
value: function (Ht, qt) { | |
var nr = Xt[ht].read(); | |
nr | |
? ((Xt[ct] = null), | |
(Xt[tt] = null), | |
(Xt[rt] = null), | |
Ht(mt(nr, !1))) | |
: ((Xt[tt] = Ht), (Xt[rt] = qt)); | |
}, | |
writable: !0, | |
}), | |
It), | |
); | |
return ( | |
(Xt[ct] = null), | |
et(Mt, function (Jt) { | |
if (Jt && Jt.code !== "ERR_STREAM_PREMATURE_CLOSE") { | |
var Ht = Xt[rt]; | |
Ht !== null && | |
((Xt[ct] = null), (Xt[tt] = null), (Xt[rt] = null), Ht(Jt)), | |
(Xt[it] = Jt); | |
return; | |
} | |
var qt = Xt[tt]; | |
qt !== null && | |
((Xt[ct] = null), | |
(Xt[tt] = null), | |
(Xt[rt] = null), | |
qt(mt(void 0, !0))), | |
(Xt[ot] = !0); | |
}), | |
Mt.on("readable", xt.bind(null, Xt)), | |
Xt | |
); | |
}; | |
return (async_iterator = _t), async_iterator; | |
} | |
var fromBrowser, hasRequiredFromBrowser; | |
function requireFromBrowser() { | |
return ( | |
hasRequiredFromBrowser || | |
((hasRequiredFromBrowser = 1), | |
(fromBrowser = function () { | |
throw new Error("Readable.from is not available in the browser"); | |
})), | |
fromBrowser | |
); | |
} | |
var _stream_readable$2, hasRequired_stream_readable$2; | |
function require_stream_readable$2() { | |
if (hasRequired_stream_readable$2) return _stream_readable$2; | |
(hasRequired_stream_readable$2 = 1), (_stream_readable$2 = qt); | |
var s; | |
(qt.ReadableState = Ht), eventsExports.EventEmitter; | |
var o = function (Ft, rr) { | |
return Ft.listeners(rr).length; | |
}, | |
_ = streamBrowser$2, | |
_e = require$$0$2.Buffer, | |
et = | |
(typeof commonjsGlobal$3 < "u" | |
? commonjsGlobal$3 | |
: typeof window < "u" | |
? window | |
: typeof self < "u" | |
? self | |
: {} | |
).Uint8Array || function () {}; | |
function tt(Gt) { | |
return _e.from(Gt); | |
} | |
function rt(Gt) { | |
return _e.isBuffer(Gt) || Gt instanceof et; | |
} | |
var it = util$3, | |
ot; | |
it && it.debuglog ? (ot = it.debuglog("stream")) : (ot = function () {}); | |
var ct = requireBuffer_list(), | |
at = destroy_1$2, | |
ht = state, | |
mt = ht.getHighWaterMark, | |
vt = errorsBrowser.codes, | |
xt = vt.ERR_INVALID_ARG_TYPE, | |
St = vt.ERR_STREAM_PUSH_AFTER_EOF, | |
$t = vt.ERR_METHOD_NOT_IMPLEMENTED, | |
Et = vt.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, | |
_t, | |
Rt, | |
Mt; | |
inherits_browserExports(qt, _); | |
var It = at.errorOrDestroy, | |
Xt = ["error", "close", "destroy", "pause", "resume"]; | |
function Jt(Gt, Ft, rr) { | |
if (typeof Gt.prependListener == "function") | |
return Gt.prependListener(Ft, rr); | |
!Gt._events || !Gt._events[Ft] | |
? Gt.on(Ft, rr) | |
: Array.isArray(Gt._events[Ft]) | |
? Gt._events[Ft].unshift(rr) | |
: (Gt._events[Ft] = [rr, Gt._events[Ft]]); | |
} | |
function Ht(Gt, Ft, rr) { | |
(s = s || require_stream_duplex$2()), | |
(Gt = Gt || {}), | |
typeof rr != "boolean" && (rr = Ft instanceof s), | |
(this.objectMode = !!Gt.objectMode), | |
rr && (this.objectMode = this.objectMode || !!Gt.readableObjectMode), | |
(this.highWaterMark = mt(this, Gt, "readableHighWaterMark", rr)), | |
(this.buffer = new ct()), | |
(this.length = 0), | |
(this.pipes = null), | |
(this.pipesCount = 0), | |
(this.flowing = null), | |
(this.ended = !1), | |
(this.endEmitted = !1), | |
(this.reading = !1), | |
(this.sync = !0), | |
(this.needReadable = !1), | |
(this.emittedReadable = !1), | |
(this.readableListening = !1), | |
(this.resumeScheduled = !1), | |
(this.paused = !0), | |
(this.emitClose = Gt.emitClose !== !1), | |
(this.autoDestroy = !!Gt.autoDestroy), | |
(this.destroyed = !1), | |
(this.defaultEncoding = Gt.defaultEncoding || "utf8"), | |
(this.awaitDrain = 0), | |
(this.readingMore = !1), | |
(this.decoder = null), | |
(this.encoding = null), | |
Gt.encoding && | |
(_t || (_t = requireString_decoder().StringDecoder), | |
(this.decoder = new _t(Gt.encoding)), | |
(this.encoding = Gt.encoding)); | |
} | |
function qt(Gt) { | |
if (((s = s || require_stream_duplex$2()), !(this instanceof qt))) | |
return new qt(Gt); | |
var Ft = this instanceof s; | |
(this._readableState = new Ht(Gt, this, Ft)), | |
(this.readable = !0), | |
Gt && | |
(typeof Gt.read == "function" && (this._read = Gt.read), | |
typeof Gt.destroy == "function" && (this._destroy = Gt.destroy)), | |
_.call(this); | |
} | |
Object.defineProperty(qt.prototype, "destroyed", { | |
enumerable: !1, | |
get: function () { | |
return this._readableState === void 0 | |
? !1 | |
: this._readableState.destroyed; | |
}, | |
set: function (Ft) { | |
this._readableState && (this._readableState.destroyed = Ft); | |
}, | |
}), | |
(qt.prototype.destroy = at.destroy), | |
(qt.prototype._undestroy = at.undestroy), | |
(qt.prototype._destroy = function (Gt, Ft) { | |
Ft(Gt); | |
}), | |
(qt.prototype.push = function (Gt, Ft) { | |
var rr = this._readableState, | |
Sr; | |
return ( | |
rr.objectMode | |
? (Sr = !0) | |
: typeof Gt == "string" && | |
((Ft = Ft || rr.defaultEncoding), | |
Ft !== rr.encoding && ((Gt = _e.from(Gt, Ft)), (Ft = "")), | |
(Sr = !0)), | |
nr(this, Gt, Ft, !1, Sr) | |
); | |
}), | |
(qt.prototype.unshift = function (Gt) { | |
return nr(this, Gt, null, !0, !1); | |
}); | |
function nr(Gt, Ft, rr, Sr, fr) { | |
ot("readableAddChunk", Ft); | |
var dr = Gt._readableState; | |
if (Ft === null) (dr.reading = !1), Ot(Gt, dr); | |
else { | |
var Mr; | |
if ((fr || (Mr = nt(dr, Ft)), Mr)) It(Gt, Mr); | |
else if (dr.objectMode || (Ft && Ft.length > 0)) | |
if ( | |
(typeof Ft != "string" && | |
!dr.objectMode && | |
Object.getPrototypeOf(Ft) !== _e.prototype && | |
(Ft = tt(Ft)), | |
Sr) | |
) | |
dr.endEmitted ? It(Gt, new Et()) : wt(Gt, dr, Ft, !0); | |
else if (dr.ended) It(Gt, new St()); | |
else { | |
if (dr.destroyed) return !1; | |
(dr.reading = !1), | |
dr.decoder && !rr | |
? ((Ft = dr.decoder.write(Ft)), | |
dr.objectMode || Ft.length !== 0 | |
? wt(Gt, dr, Ft, !1) | |
: gt(Gt, dr)) | |
: wt(Gt, dr, Ft, !1); | |
} | |
else Sr || ((dr.reading = !1), gt(Gt, dr)); | |
} | |
return !dr.ended && (dr.length < dr.highWaterMark || dr.length === 0); | |
} | |
function wt(Gt, Ft, rr, Sr) { | |
Ft.flowing && Ft.length === 0 && !Ft.sync | |
? ((Ft.awaitDrain = 0), Gt.emit("data", rr)) | |
: ((Ft.length += Ft.objectMode ? 1 : rr.length), | |
Sr ? Ft.buffer.unshift(rr) : Ft.buffer.push(rr), | |
Ft.needReadable && yt(Gt)), | |
gt(Gt, Ft); | |
} | |
function nt(Gt, Ft) { | |
var rr; | |
return ( | |
!rt(Ft) && | |
typeof Ft != "string" && | |
Ft !== void 0 && | |
!Gt.objectMode && | |
(rr = new xt("chunk", ["string", "Buffer", "Uint8Array"], Ft)), | |
rr | |
); | |
} | |
(qt.prototype.isPaused = function () { | |
return this._readableState.flowing === !1; | |
}), | |
(qt.prototype.setEncoding = function (Gt) { | |
_t || (_t = requireString_decoder().StringDecoder); | |
var Ft = new _t(Gt); | |
(this._readableState.decoder = Ft), | |
(this._readableState.encoding = this._readableState.decoder.encoding); | |
for (var rr = this._readableState.buffer.head, Sr = ""; rr !== null; ) | |
(Sr += Ft.write(rr.data)), (rr = rr.next); | |
return ( | |
this._readableState.buffer.clear(), | |
Sr !== "" && this._readableState.buffer.push(Sr), | |
(this._readableState.length = Sr.length), | |
this | |
); | |
}); | |
var ut = 1073741824; | |
function ft(Gt) { | |
return ( | |
Gt >= ut | |
? (Gt = ut) | |
: (Gt--, | |
(Gt |= Gt >>> 1), | |
(Gt |= Gt >>> 2), | |
(Gt |= Gt >>> 4), | |
(Gt |= Gt >>> 8), | |
(Gt |= Gt >>> 16), | |
Gt++), | |
Gt | |
); | |
} | |
function dt(Gt, Ft) { | |
return Gt <= 0 || (Ft.length === 0 && Ft.ended) | |
? 0 | |
: Ft.objectMode | |
? 1 | |
: Gt !== Gt | |
? Ft.flowing && Ft.length | |
? Ft.buffer.head.data.length | |
: Ft.length | |
: (Gt > Ft.highWaterMark && (Ft.highWaterMark = ft(Gt)), | |
Gt <= Ft.length | |
? Gt | |
: Ft.ended | |
? Ft.length | |
: ((Ft.needReadable = !0), 0)); | |
} | |
qt.prototype.read = function (Gt) { | |
ot("read", Gt), (Gt = parseInt(Gt, 10)); | |
var Ft = this._readableState, | |
rr = Gt; | |
if ( | |
(Gt !== 0 && (Ft.emittedReadable = !1), | |
Gt === 0 && | |
Ft.needReadable && | |
((Ft.highWaterMark !== 0 | |
? Ft.length >= Ft.highWaterMark | |
: Ft.length > 0) || | |
Ft.ended)) | |
) | |
return ( | |
ot("read: emitReadable", Ft.length, Ft.ended), | |
Ft.length === 0 && Ft.ended ? jt(this) : yt(this), | |
null | |
); | |
if (((Gt = dt(Gt, Ft)), Gt === 0 && Ft.ended)) | |
return Ft.length === 0 && jt(this), null; | |
var Sr = Ft.needReadable; | |
ot("need readable", Sr), | |
(Ft.length === 0 || Ft.length - Gt < Ft.highWaterMark) && | |
((Sr = !0), ot("length less than watermark", Sr)), | |
Ft.ended || Ft.reading | |
? ((Sr = !1), ot("reading or ended", Sr)) | |
: Sr && | |
(ot("do read"), | |
(Ft.reading = !0), | |
(Ft.sync = !0), | |
Ft.length === 0 && (Ft.needReadable = !0), | |
this._read(Ft.highWaterMark), | |
(Ft.sync = !1), | |
Ft.reading || (Gt = dt(rr, Ft))); | |
var fr; | |
return ( | |
Gt > 0 ? (fr = Ct(Gt, Ft)) : (fr = null), | |
fr === null | |
? ((Ft.needReadable = Ft.length <= Ft.highWaterMark), (Gt = 0)) | |
: ((Ft.length -= Gt), (Ft.awaitDrain = 0)), | |
Ft.length === 0 && | |
(Ft.ended || (Ft.needReadable = !0), | |
rr !== Gt && Ft.ended && jt(this)), | |
fr !== null && this.emit("data", fr), | |
fr | |
); | |
}; | |
function Ot(Gt, Ft) { | |
if ((ot("onEofChunk"), !Ft.ended)) { | |
if (Ft.decoder) { | |
var rr = Ft.decoder.end(); | |
rr && | |
rr.length && | |
(Ft.buffer.push(rr), (Ft.length += Ft.objectMode ? 1 : rr.length)); | |
} | |
(Ft.ended = !0), | |
Ft.sync | |
? yt(Gt) | |
: ((Ft.needReadable = !1), | |
Ft.emittedReadable || ((Ft.emittedReadable = !0), bt(Gt))); | |
} | |
} | |
function yt(Gt) { | |
var Ft = Gt._readableState; | |
ot("emitReadable", Ft.needReadable, Ft.emittedReadable), | |
(Ft.needReadable = !1), | |
Ft.emittedReadable || | |
(ot("emitReadable", Ft.flowing), | |
(Ft.emittedReadable = !0), | |
process$1.nextTick(bt, Gt)); | |
} | |
function bt(Gt) { | |
var Ft = Gt._readableState; | |
ot("emitReadable_", Ft.destroyed, Ft.length, Ft.ended), | |
!Ft.destroyed && | |
(Ft.length || Ft.ended) && | |
(Gt.emit("readable"), (Ft.emittedReadable = !1)), | |
(Ft.needReadable = | |
!Ft.flowing && !Ft.ended && Ft.length <= Ft.highWaterMark), | |
Vt(Gt); | |
} | |
function gt(Gt, Ft) { | |
Ft.readingMore || ((Ft.readingMore = !0), process$1.nextTick(st, Gt, Ft)); | |
} | |
function st(Gt, Ft) { | |
for ( | |
; | |
!Ft.reading && | |
!Ft.ended && | |
(Ft.length < Ft.highWaterMark || (Ft.flowing && Ft.length === 0)); | |
) { | |
var rr = Ft.length; | |
if ((ot("maybeReadMore read 0"), Gt.read(0), rr === Ft.length)) break; | |
} | |
Ft.readingMore = !1; | |
} | |
(qt.prototype._read = function (Gt) { | |
It(this, new $t("_read()")); | |
}), | |
(qt.prototype.pipe = function (Gt, Ft) { | |
var rr = this, | |
Sr = this._readableState; | |
switch (Sr.pipesCount) { | |
case 0: | |
Sr.pipes = Gt; | |
break; | |
case 1: | |
Sr.pipes = [Sr.pipes, Gt]; | |
break; | |
default: | |
Sr.pipes.push(Gt); | |
break; | |
} | |
(Sr.pipesCount += 1), ot("pipe count=%d opts=%j", Sr.pipesCount, Ft); | |
var fr = | |
(!Ft || Ft.end !== !1) && | |
Gt !== process$1.stdout && | |
Gt !== process$1.stderr, | |
dr = fr ? yr : tn; | |
Sr.endEmitted ? process$1.nextTick(dr) : rr.once("end", dr), | |
Gt.on("unpipe", Mr); | |
function Mr(Er, Cr) { | |
ot("onunpipe"), | |
Er === rr && | |
Cr && | |
Cr.hasUnpiped === !1 && | |
((Cr.hasUnpiped = !0), $r()); | |
} | |
function yr() { | |
ot("onend"), Gt.end(); | |
} | |
var lr = pt(rr); | |
Gt.on("drain", lr); | |
var Gr = !1; | |
function $r() { | |
ot("cleanup"), | |
Gt.removeListener("close", br), | |
Gt.removeListener("finish", _r), | |
Gt.removeListener("drain", lr), | |
Gt.removeListener("error", Jr), | |
Gt.removeListener("unpipe", Mr), | |
rr.removeListener("end", yr), | |
rr.removeListener("end", tn), | |
rr.removeListener("data", Rr), | |
(Gr = !0), | |
Sr.awaitDrain && | |
(!Gt._writableState || Gt._writableState.needDrain) && | |
lr(); | |
} | |
rr.on("data", Rr); | |
function Rr(Er) { | |
ot("ondata"); | |
var Cr = Gt.write(Er); | |
ot("dest.write", Cr), | |
Cr === !1 && | |
(((Sr.pipesCount === 1 && Sr.pipes === Gt) || | |
(Sr.pipesCount > 1 && er(Sr.pipes, Gt) !== -1)) && | |
!Gr && | |
(ot("false write response, pause", Sr.awaitDrain), | |
Sr.awaitDrain++), | |
rr.pause()); | |
} | |
function Jr(Er) { | |
ot("onerror", Er), | |
tn(), | |
Gt.removeListener("error", Jr), | |
o(Gt, "error") === 0 && It(Gt, Er); | |
} | |
Jt(Gt, "error", Jr); | |
function br() { | |
Gt.removeListener("finish", _r), tn(); | |
} | |
Gt.once("close", br); | |
function _r() { | |
ot("onfinish"), Gt.removeListener("close", br), tn(); | |
} | |
Gt.once("finish", _r); | |
function tn() { | |
ot("unpipe"), rr.unpipe(Gt); | |
} | |
return ( | |
Gt.emit("pipe", rr), | |
Sr.flowing || (ot("pipe resume"), rr.resume()), | |
Gt | |
); | |
}); | |
function pt(Gt) { | |
return function () { | |
var rr = Gt._readableState; | |
ot("pipeOnDrain", rr.awaitDrain), | |
rr.awaitDrain && rr.awaitDrain--, | |
rr.awaitDrain === 0 && o(Gt, "data") && ((rr.flowing = !0), Vt(Gt)); | |
}; | |
} | |
(qt.prototype.unpipe = function (Gt) { | |
var Ft = this._readableState, | |
rr = { hasUnpiped: !1 }; | |
if (Ft.pipesCount === 0) return this; | |
if (Ft.pipesCount === 1) | |
return Gt && Gt !== Ft.pipes | |
? this | |
: (Gt || (Gt = Ft.pipes), | |
(Ft.pipes = null), | |
(Ft.pipesCount = 0), | |
(Ft.flowing = !1), | |
Gt && Gt.emit("unpipe", this, rr), | |
this); | |
if (!Gt) { | |
var Sr = Ft.pipes, | |
fr = Ft.pipesCount; | |
(Ft.pipes = null), (Ft.pipesCount = 0), (Ft.flowing = !1); | |
for (var dr = 0; dr < fr; dr++) | |
Sr[dr].emit("unpipe", this, { hasUnpiped: !1 }); | |
return this; | |
} | |
var Mr = er(Ft.pipes, Gt); | |
return Mr === -1 | |
? this | |
: (Ft.pipes.splice(Mr, 1), | |
(Ft.pipesCount -= 1), | |
Ft.pipesCount === 1 && (Ft.pipes = Ft.pipes[0]), | |
Gt.emit("unpipe", this, rr), | |
this); | |
}), | |
(qt.prototype.on = function (Gt, Ft) { | |
var rr = _.prototype.on.call(this, Gt, Ft), | |
Sr = this._readableState; | |
return ( | |
Gt === "data" | |
? ((Sr.readableListening = this.listenerCount("readable") > 0), | |
Sr.flowing !== !1 && this.resume()) | |
: Gt === "readable" && | |
!Sr.endEmitted && | |
!Sr.readableListening && | |
((Sr.readableListening = Sr.needReadable = !0), | |
(Sr.flowing = !1), | |
(Sr.emittedReadable = !1), | |
ot("on readable", Sr.length, Sr.reading), | |
Sr.length | |
? yt(this) | |
: Sr.reading || process$1.nextTick(Qt, this)), | |
rr | |
); | |
}), | |
(qt.prototype.addListener = qt.prototype.on), | |
(qt.prototype.removeListener = function (Gt, Ft) { | |
var rr = _.prototype.removeListener.call(this, Gt, Ft); | |
return Gt === "readable" && process$1.nextTick(kt, this), rr; | |
}), | |
(qt.prototype.removeAllListeners = function (Gt) { | |
var Ft = _.prototype.removeAllListeners.apply(this, arguments); | |
return ( | |
(Gt === "readable" || Gt === void 0) && process$1.nextTick(kt, this), | |
Ft | |
); | |
}); | |
function kt(Gt) { | |
var Ft = Gt._readableState; | |
(Ft.readableListening = Gt.listenerCount("readable") > 0), | |
Ft.resumeScheduled && !Ft.paused | |
? (Ft.flowing = !0) | |
: Gt.listenerCount("data") > 0 && Gt.resume(); | |
} | |
function Qt(Gt) { | |
ot("readable nexttick read 0"), Gt.read(0); | |
} | |
qt.prototype.resume = function () { | |
var Gt = this._readableState; | |
return ( | |
Gt.flowing || | |
(ot("resume"), (Gt.flowing = !Gt.readableListening), Dt(this, Gt)), | |
(Gt.paused = !1), | |
this | |
); | |
}; | |
function Dt(Gt, Ft) { | |
Ft.resumeScheduled || | |
((Ft.resumeScheduled = !0), process$1.nextTick(Zt, Gt, Ft)); | |
} | |
function Zt(Gt, Ft) { | |
ot("resume", Ft.reading), | |
Ft.reading || Gt.read(0), | |
(Ft.resumeScheduled = !1), | |
Gt.emit("resume"), | |
Vt(Gt), | |
Ft.flowing && !Ft.reading && Gt.read(0); | |
} | |
qt.prototype.pause = function () { | |
return ( | |
ot("call pause flowing=%j", this._readableState.flowing), | |
this._readableState.flowing !== !1 && | |
(ot("pause"), (this._readableState.flowing = !1), this.emit("pause")), | |
(this._readableState.paused = !0), | |
this | |
); | |
}; | |
function Vt(Gt) { | |
var Ft = Gt._readableState; | |
for (ot("flow", Ft.flowing); Ft.flowing && Gt.read() !== null; ); | |
} | |
(qt.prototype.wrap = function (Gt) { | |
var Ft = this, | |
rr = this._readableState, | |
Sr = !1; | |
Gt.on("end", function () { | |
if ((ot("wrapped end"), rr.decoder && !rr.ended)) { | |
var Mr = rr.decoder.end(); | |
Mr && Mr.length && Ft.push(Mr); | |
} | |
Ft.push(null); | |
}), | |
Gt.on("data", function (Mr) { | |
if ( | |
(ot("wrapped data"), | |
rr.decoder && (Mr = rr.decoder.write(Mr)), | |
!(rr.objectMode && Mr == null) && | |
!(!rr.objectMode && (!Mr || !Mr.length))) | |
) { | |
var yr = Ft.push(Mr); | |
yr || ((Sr = !0), Gt.pause()); | |
} | |
}); | |
for (var fr in Gt) | |
this[fr] === void 0 && | |
typeof Gt[fr] == "function" && | |
(this[fr] = (function (yr) { | |
return function () { | |
return Gt[yr].apply(Gt, arguments); | |
}; | |
})(fr)); | |
for (var dr = 0; dr < Xt.length; dr++) | |
Gt.on(Xt[dr], this.emit.bind(this, Xt[dr])); | |
return ( | |
(this._read = function (Mr) { | |
ot("wrapped _read", Mr), Sr && ((Sr = !1), Gt.resume()); | |
}), | |
this | |
); | |
}), | |
typeof Symbol == "function" && | |
(qt.prototype[Symbol.asyncIterator] = function () { | |
return Rt === void 0 && (Rt = requireAsync_iterator()), Rt(this); | |
}), | |
Object.defineProperty(qt.prototype, "readableHighWaterMark", { | |
enumerable: !1, | |
get: function () { | |
return this._readableState.highWaterMark; | |
}, | |
}), | |
Object.defineProperty(qt.prototype, "readableBuffer", { | |
enumerable: !1, | |
get: function () { | |
return this._readableState && this._readableState.buffer; | |
}, | |
}), | |
Object.defineProperty(qt.prototype, "readableFlowing", { | |
enumerable: !1, | |
get: function () { | |
return this._readableState.flowing; | |
}, | |
set: function (Ft) { | |
this._readableState && (this._readableState.flowing = Ft); | |
}, | |
}), | |
(qt._fromList = Ct), | |
Object.defineProperty(qt.prototype, "readableLength", { | |
enumerable: !1, | |
get: function () { | |
return this._readableState.length; | |
}, | |
}); | |
function Ct(Gt, Ft) { | |
if (Ft.length === 0) return null; | |
var rr; | |
return ( | |
Ft.objectMode | |
? (rr = Ft.buffer.shift()) | |
: !Gt || Gt >= Ft.length | |
? (Ft.decoder | |
? (rr = Ft.buffer.join("")) | |
: Ft.buffer.length === 1 | |
? (rr = Ft.buffer.first()) | |
: (rr = Ft.buffer.concat(Ft.length)), | |
Ft.buffer.clear()) | |
: (rr = Ft.buffer.consume(Gt, Ft.decoder)), | |
rr | |
); | |
} | |
function jt(Gt) { | |
var Ft = Gt._readableState; | |
ot("endReadable", Ft.endEmitted), | |
Ft.endEmitted || ((Ft.ended = !0), process$1.nextTick(Wt, Ft, Gt)); | |
} | |
function Wt(Gt, Ft) { | |
if ( | |
(ot("endReadableNT", Gt.endEmitted, Gt.length), | |
!Gt.endEmitted && | |
Gt.length === 0 && | |
((Gt.endEmitted = !0), | |
(Ft.readable = !1), | |
Ft.emit("end"), | |
Gt.autoDestroy)) | |
) { | |
var rr = Ft._writableState; | |
(!rr || (rr.autoDestroy && rr.finished)) && Ft.destroy(); | |
} | |
} | |
typeof Symbol == "function" && | |
(qt.from = function (Gt, Ft) { | |
return Mt === void 0 && (Mt = requireFromBrowser()), Mt(qt, Gt, Ft); | |
}); | |
function er(Gt, Ft) { | |
for (var rr = 0, Sr = Gt.length; rr < Sr; rr++) | |
if (Gt[rr] === Ft) return rr; | |
return -1; | |
} | |
return _stream_readable$2; | |
} | |
var _stream_transform$2 = Transform$2, | |
_require$codes$1 = errorsBrowser.codes, | |
ERR_METHOD_NOT_IMPLEMENTED = _require$codes$1.ERR_METHOD_NOT_IMPLEMENTED, | |
ERR_MULTIPLE_CALLBACK = _require$codes$1.ERR_MULTIPLE_CALLBACK, | |
ERR_TRANSFORM_ALREADY_TRANSFORMING = | |
_require$codes$1.ERR_TRANSFORM_ALREADY_TRANSFORMING, | |
ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes$1.ERR_TRANSFORM_WITH_LENGTH_0, | |
Duplex = require_stream_duplex$2(); | |
inherits_browserExports(Transform$2, Duplex); | |
function afterTransform(s, o) { | |
var _ = this._transformState; | |
_.transforming = !1; | |
var _e = _.writecb; | |
if (_e === null) return this.emit("error", new ERR_MULTIPLE_CALLBACK()); | |
(_.writechunk = null), (_.writecb = null), o != null && this.push(o), _e(s); | |
var et = this._readableState; | |
(et.reading = !1), | |
(et.needReadable || et.length < et.highWaterMark) && | |
this._read(et.highWaterMark); | |
} | |
function Transform$2(s) { | |
if (!(this instanceof Transform$2)) return new Transform$2(s); | |
Duplex.call(this, s), | |
(this._transformState = { | |
afterTransform: afterTransform.bind(this), | |
needTransform: !1, | |
transforming: !1, | |
writecb: null, | |
writechunk: null, | |
writeencoding: null, | |
}), | |
(this._readableState.needReadable = !0), | |
(this._readableState.sync = !1), | |
s && | |
(typeof s.transform == "function" && (this._transform = s.transform), | |
typeof s.flush == "function" && (this._flush = s.flush)), | |
this.on("prefinish", prefinish); | |
} | |
function prefinish() { | |
var s = this; | |
typeof this._flush == "function" && !this._readableState.destroyed | |
? this._flush(function (o, _) { | |
done(s, o, _); | |
}) | |
: done(this, null, null); | |
} | |
Transform$2.prototype.push = function (s, o) { | |
return ( | |
(this._transformState.needTransform = !1), | |
Duplex.prototype.push.call(this, s, o) | |
); | |
}; | |
Transform$2.prototype._transform = function (s, o, _) { | |
_(new ERR_METHOD_NOT_IMPLEMENTED("_transform()")); | |
}; | |
Transform$2.prototype._write = function (s, o, _) { | |
var _e = this._transformState; | |
if ( | |
((_e.writecb = _), | |
(_e.writechunk = s), | |
(_e.writeencoding = o), | |
!_e.transforming) | |
) { | |
var et = this._readableState; | |
(_e.needTransform || et.needReadable || et.length < et.highWaterMark) && | |
this._read(et.highWaterMark); | |
} | |
}; | |
Transform$2.prototype._read = function (s) { | |
var o = this._transformState; | |
o.writechunk !== null && !o.transforming | |
? ((o.transforming = !0), | |
this._transform(o.writechunk, o.writeencoding, o.afterTransform)) | |
: (o.needTransform = !0); | |
}; | |
Transform$2.prototype._destroy = function (s, o) { | |
Duplex.prototype._destroy.call(this, s, function (_) { | |
o(_); | |
}); | |
}; | |
function done(s, o, _) { | |
if (o) return s.emit("error", o); | |
if ((_ != null && s.push(_), s._writableState.length)) | |
throw new ERR_TRANSFORM_WITH_LENGTH_0(); | |
if (s._transformState.transforming) | |
throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); | |
return s.push(null); | |
} | |
var _stream_passthrough$2 = PassThrough, | |
Transform$1 = _stream_transform$2; | |
inherits_browserExports(PassThrough, Transform$1); | |
function PassThrough(s) { | |
if (!(this instanceof PassThrough)) return new PassThrough(s); | |
Transform$1.call(this, s); | |
} | |
PassThrough.prototype._transform = function (s, o, _) { | |
_(null, s); | |
}; | |
var eos$2; | |
function once$3(s) { | |
var o = !1; | |
return function () { | |
o || ((o = !0), s.apply(void 0, arguments)); | |
}; | |
} | |
var _require$codes = errorsBrowser.codes, | |
ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, | |
ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; | |
function noop$3(s) { | |
if (s) throw s; | |
} | |
function isRequest$1(s) { | |
return s.setHeader && typeof s.abort == "function"; | |
} | |
function destroyer$1(s, o, _, _e) { | |
_e = once$3(_e); | |
var et = !1; | |
s.on("close", function () { | |
et = !0; | |
}), | |
eos$2 === void 0 && (eos$2 = endOfStream$1), | |
eos$2(s, { readable: o, writable: _ }, function (rt) { | |
if (rt) return _e(rt); | |
(et = !0), _e(); | |
}); | |
var tt = !1; | |
return function (rt) { | |
if (!et && !tt) { | |
if (((tt = !0), isRequest$1(s))) return s.abort(); | |
if (typeof s.destroy == "function") return s.destroy(); | |
_e(rt || new ERR_STREAM_DESTROYED("pipe")); | |
} | |
}; | |
} | |
function call(s) { | |
s(); | |
} | |
function pipe(s, o) { | |
return s.pipe(o); | |
} | |
function popCallback(s) { | |
return !s.length || typeof s[s.length - 1] != "function" ? noop$3 : s.pop(); | |
} | |
function pipeline$1() { | |
for (var s = arguments.length, o = new Array(s), _ = 0; _ < s; _++) | |
o[_] = arguments[_]; | |
var _e = popCallback(o); | |
if ((Array.isArray(o[0]) && (o = o[0]), o.length < 2)) | |
throw new ERR_MISSING_ARGS("streams"); | |
var et, | |
tt = o.map(function (rt, it) { | |
var ot = it < o.length - 1, | |
ct = it > 0; | |
return destroyer$1(rt, ot, ct, function (at) { | |
et || (et = at), | |
at && tt.forEach(call), | |
!ot && (tt.forEach(call), _e(et)); | |
}); | |
}); | |
return o.reduce(pipe); | |
} | |
var pipeline_1 = pipeline$1; | |
(function (s, o) { | |
(o = s.exports = require_stream_readable$2()), | |
(o.Stream = o), | |
(o.Readable = o), | |
(o.Writable = require_stream_writable$2()), | |
(o.Duplex = require_stream_duplex$2()), | |
(o.Transform = _stream_transform$2), | |
(o.PassThrough = _stream_passthrough$2), | |
(o.finished = endOfStream$1), | |
(o.pipeline = pipeline_1); | |
})(readableBrowser$2, readableBrowser$2.exports); | |
var readableBrowserExports = readableBrowser$2.exports, | |
xtend$3 = immutable, | |
Readable = readableBrowserExports.Readable, | |
streamsOpts = { objectMode: !0 }, | |
defaultStoreOptions = { clean: !0 }; | |
function Store$2(s) { | |
if (!(this instanceof Store$2)) return new Store$2(s); | |
(this.options = s || {}), | |
(this.options = xtend$3(defaultStoreOptions, s)), | |
(this._inflights = new Map()); | |
} | |
Store$2.prototype.put = function (s, o) { | |
return this._inflights.set(s.messageId, s), o && o(), this; | |
}; | |
Store$2.prototype.createStream = function () { | |
var s = new Readable(streamsOpts), | |
o = !1, | |
_ = [], | |
_e = 0; | |
return ( | |
this._inflights.forEach(function (et, tt) { | |
_.push(et); | |
}), | |
(s._read = function () { | |
!o && _e < _.length ? this.push(_[_e++]) : this.push(null); | |
}), | |
(s.destroy = function () { | |
if (!o) { | |
var et = this; | |
(o = !0), | |
setTimeout(function () { | |
et.emit("close"); | |
}, 0); | |
} | |
}), | |
s | |
); | |
}; | |
Store$2.prototype.del = function (s, o) { | |
return ( | |
(s = this._inflights.get(s.messageId)), | |
s | |
? (this._inflights.delete(s.messageId), o(null, s)) | |
: o && o(new Error("missing packet")), | |
this | |
); | |
}; | |
Store$2.prototype.get = function (s, o) { | |
return ( | |
(s = this._inflights.get(s.messageId)), | |
s ? o(null, s) : o && o(new Error("missing packet")), | |
this | |
); | |
}; | |
Store$2.prototype.close = function (s) { | |
this.options.clean && (this._inflights = null), s && s(); | |
}; | |
var store = Store$2, | |
mqtt$1 = {}, | |
bl$1 = { exports: {} }; | |
const { Buffer: Buffer$2 } = require$$0$2, | |
symbol = Symbol.for("BufferList"); | |
function BufferList$3(s) { | |
if (!(this instanceof BufferList$3)) return new BufferList$3(s); | |
BufferList$3._init.call(this, s); | |
} | |
BufferList$3._init = function (o) { | |
Object.defineProperty(this, symbol, { value: !0 }), | |
(this._bufs = []), | |
(this.length = 0), | |
o && this.append(o); | |
}; | |
BufferList$3.prototype._new = function (o) { | |
return new BufferList$3(o); | |
}; | |
BufferList$3.prototype._offset = function (o) { | |
if (o === 0) return [0, 0]; | |
let _ = 0; | |
for (let _e = 0; _e < this._bufs.length; _e++) { | |
const et = _ + this._bufs[_e].length; | |
if (o < et || _e === this._bufs.length - 1) return [_e, o - _]; | |
_ = et; | |
} | |
}; | |
BufferList$3.prototype._reverseOffset = function (s) { | |
const o = s[0]; | |
let _ = s[1]; | |
for (let _e = 0; _e < o; _e++) _ += this._bufs[_e].length; | |
return _; | |
}; | |
BufferList$3.prototype.get = function (o) { | |
if (o > this.length || o < 0) return; | |
const _ = this._offset(o); | |
return this._bufs[_[0]][_[1]]; | |
}; | |
BufferList$3.prototype.slice = function (o, _) { | |
return ( | |
typeof o == "number" && o < 0 && (o += this.length), | |
typeof _ == "number" && _ < 0 && (_ += this.length), | |
this.copy(null, 0, o, _) | |
); | |
}; | |
BufferList$3.prototype.copy = function (o, _, _e, et) { | |
if ( | |
((typeof _e != "number" || _e < 0) && (_e = 0), | |
(typeof et != "number" || et > this.length) && (et = this.length), | |
_e >= this.length || et <= 0) | |
) | |
return o || Buffer$2.alloc(0); | |
const tt = !!o, | |
rt = this._offset(_e), | |
it = et - _e; | |
let ot = it, | |
ct = (tt && _) || 0, | |
at = rt[1]; | |
if (_e === 0 && et === this.length) { | |
if (!tt) | |
return this._bufs.length === 1 | |
? this._bufs[0] | |
: Buffer$2.concat(this._bufs, this.length); | |
for (let ht = 0; ht < this._bufs.length; ht++) | |
this._bufs[ht].copy(o, ct), (ct += this._bufs[ht].length); | |
return o; | |
} | |
if (ot <= this._bufs[rt[0]].length - at) | |
return tt | |
? this._bufs[rt[0]].copy(o, _, at, at + ot) | |
: this._bufs[rt[0]].slice(at, at + ot); | |
tt || (o = Buffer$2.allocUnsafe(it)); | |
for (let ht = rt[0]; ht < this._bufs.length; ht++) { | |
const mt = this._bufs[ht].length - at; | |
if (ot > mt) this._bufs[ht].copy(o, ct, at), (ct += mt); | |
else { | |
this._bufs[ht].copy(o, ct, at, at + ot), (ct += mt); | |
break; | |
} | |
(ot -= mt), at && (at = 0); | |
} | |
return o.length > ct ? o.slice(0, ct) : o; | |
}; | |
BufferList$3.prototype.shallowSlice = function (o, _) { | |
if ( | |
((o = o || 0), | |
(_ = typeof _ != "number" ? this.length : _), | |
o < 0 && (o += this.length), | |
_ < 0 && (_ += this.length), | |
o === _) | |
) | |
return this._new(); | |
const _e = this._offset(o), | |
et = this._offset(_), | |
tt = this._bufs.slice(_e[0], et[0] + 1); | |
return ( | |
et[1] === 0 | |
? tt.pop() | |
: (tt[tt.length - 1] = tt[tt.length - 1].slice(0, et[1])), | |
_e[1] !== 0 && (tt[0] = tt[0].slice(_e[1])), | |
this._new(tt) | |
); | |
}; | |
BufferList$3.prototype.toString = function (o, _, _e) { | |
return this.slice(_, _e).toString(o); | |
}; | |
BufferList$3.prototype.consume = function (o) { | |
if (((o = Math.trunc(o)), Number.isNaN(o) || o <= 0)) return this; | |
for (; this._bufs.length; ) | |
if (o >= this._bufs[0].length) | |
(o -= this._bufs[0].length), | |
(this.length -= this._bufs[0].length), | |
this._bufs.shift(); | |
else { | |
(this._bufs[0] = this._bufs[0].slice(o)), (this.length -= o); | |
break; | |
} | |
return this; | |
}; | |
BufferList$3.prototype.duplicate = function () { | |
const o = this._new(); | |
for (let _ = 0; _ < this._bufs.length; _++) o.append(this._bufs[_]); | |
return o; | |
}; | |
BufferList$3.prototype.append = function (o) { | |
if (o == null) return this; | |
if (o.buffer) | |
this._appendBuffer(Buffer$2.from(o.buffer, o.byteOffset, o.byteLength)); | |
else if (Array.isArray(o)) | |
for (let _ = 0; _ < o.length; _++) this.append(o[_]); | |
else if (this._isBufferList(o)) | |
for (let _ = 0; _ < o._bufs.length; _++) this.append(o._bufs[_]); | |
else | |
typeof o == "number" && (o = o.toString()), | |
this._appendBuffer(Buffer$2.from(o)); | |
return this; | |
}; | |
BufferList$3.prototype._appendBuffer = function (o) { | |
this._bufs.push(o), (this.length += o.length); | |
}; | |
BufferList$3.prototype.indexOf = function (s, o, _) { | |
if ( | |
(_ === void 0 && typeof o == "string" && ((_ = o), (o = void 0)), | |
typeof s == "function" || Array.isArray(s)) | |
) | |
throw new TypeError( | |
'The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.', | |
); | |
if ( | |
(typeof s == "number" | |
? (s = Buffer$2.from([s])) | |
: typeof s == "string" | |
? (s = Buffer$2.from(s, _)) | |
: this._isBufferList(s) | |
? (s = s.slice()) | |
: Array.isArray(s.buffer) | |
? (s = Buffer$2.from(s.buffer, s.byteOffset, s.byteLength)) | |
: Buffer$2.isBuffer(s) || (s = Buffer$2.from(s)), | |
(o = Number(o || 0)), | |
isNaN(o) && (o = 0), | |
o < 0 && (o = this.length + o), | |
o < 0 && (o = 0), | |
s.length === 0) | |
) | |
return o > this.length ? this.length : o; | |
const _e = this._offset(o); | |
let et = _e[0], | |
tt = _e[1]; | |
for (; et < this._bufs.length; et++) { | |
const rt = this._bufs[et]; | |
for (; tt < rt.length; ) | |
if (rt.length - tt >= s.length) { | |
const ot = rt.indexOf(s, tt); | |
if (ot !== -1) return this._reverseOffset([et, ot]); | |
tt = rt.length - s.length + 1; | |
} else { | |
const ot = this._reverseOffset([et, tt]); | |
if (this._match(ot, s)) return ot; | |
tt++; | |
} | |
tt = 0; | |
} | |
return -1; | |
}; | |
BufferList$3.prototype._match = function (s, o) { | |
if (this.length - s < o.length) return !1; | |
for (let _ = 0; _ < o.length; _++) if (this.get(s + _) !== o[_]) return !1; | |
return !0; | |
}; | |
(function () { | |
const s = { | |
readDoubleBE: 8, | |
readDoubleLE: 8, | |
readFloatBE: 4, | |
readFloatLE: 4, | |
readInt32BE: 4, | |
readInt32LE: 4, | |
readUInt32BE: 4, | |
readUInt32LE: 4, | |
readInt16BE: 2, | |
readInt16LE: 2, | |
readUInt16BE: 2, | |
readUInt16LE: 2, | |
readInt8: 1, | |
readUInt8: 1, | |
readIntBE: null, | |
readIntLE: null, | |
readUIntBE: null, | |
readUIntLE: null, | |
}; | |
for (const o in s) | |
(function (_) { | |
s[_] === null | |
? (BufferList$3.prototype[_] = function (_e, et) { | |
return this.slice(_e, _e + et)[_](0, et); | |
}) | |
: (BufferList$3.prototype[_] = function (_e = 0) { | |
return this.slice(_e, _e + s[_])[_](0); | |
}); | |
})(o); | |
})(); | |
BufferList$3.prototype._isBufferList = function (o) { | |
return o instanceof BufferList$3 || BufferList$3.isBufferList(o); | |
}; | |
BufferList$3.isBufferList = function (o) { | |
return o != null && o[symbol]; | |
}; | |
var BufferList_1 = BufferList$3; | |
const DuplexStream = readableBrowserExports.Duplex, | |
inherits$6 = inherits_browserExports, | |
BufferList$2 = BufferList_1; | |
function BufferListStream(s) { | |
if (!(this instanceof BufferListStream)) return new BufferListStream(s); | |
if (typeof s == "function") { | |
this._callback = s; | |
const o = function (_e) { | |
this._callback && (this._callback(_e), (this._callback = null)); | |
}.bind(this); | |
this.on("pipe", function (_e) { | |
_e.on("error", o); | |
}), | |
this.on("unpipe", function (_e) { | |
_e.removeListener("error", o); | |
}), | |
(s = null); | |
} | |
BufferList$2._init.call(this, s), DuplexStream.call(this); | |
} | |
inherits$6(BufferListStream, DuplexStream); | |
Object.assign(BufferListStream.prototype, BufferList$2.prototype); | |
BufferListStream.prototype._new = function (o) { | |
return new BufferListStream(o); | |
}; | |
BufferListStream.prototype._write = function (o, _, _e) { | |
this._appendBuffer(o), typeof _e == "function" && _e(); | |
}; | |
BufferListStream.prototype._read = function (o) { | |
if (!this.length) return this.push(null); | |
(o = Math.min(o, this.length)), | |
this.push(this.slice(0, o)), | |
this.consume(o); | |
}; | |
BufferListStream.prototype.end = function (o) { | |
DuplexStream.prototype.end.call(this, o), | |
this._callback && | |
(this._callback(null, this.slice()), (this._callback = null)); | |
}; | |
BufferListStream.prototype._destroy = function (o, _) { | |
(this._bufs.length = 0), (this.length = 0), _(o); | |
}; | |
BufferListStream.prototype._isBufferList = function (o) { | |
return ( | |
o instanceof BufferListStream || | |
o instanceof BufferList$2 || | |
BufferListStream.isBufferList(o) | |
); | |
}; | |
BufferListStream.isBufferList = BufferList$2.isBufferList; | |
bl$1.exports = BufferListStream; | |
bl$1.exports.BufferListStream = BufferListStream; | |
bl$1.exports.BufferList = BufferList$2; | |
var blExports = bl$1.exports; | |
let Packet$1 = class { | |
constructor() { | |
(this.cmd = null), | |
(this.retain = !1), | |
(this.qos = 0), | |
(this.dup = !1), | |
(this.length = -1), | |
(this.topic = null), | |
(this.payload = null); | |
} | |
}; | |
var packet = Packet$1, | |
constants$2 = { exports: {} }; | |
(function (s) { | |
const o = s.exports; | |
(o.types = { | |
0: "reserved", | |
1: "connect", | |
2: "connack", | |
3: "publish", | |
4: "puback", | |
5: "pubrec", | |
6: "pubrel", | |
7: "pubcomp", | |
8: "subscribe", | |
9: "suback", | |
10: "unsubscribe", | |
11: "unsuback", | |
12: "pingreq", | |
13: "pingresp", | |
14: "disconnect", | |
15: "auth", | |
}), | |
(o.codes = {}); | |
for (const _e in o.types) { | |
const et = o.types[_e]; | |
o.codes[et] = _e; | |
} | |
(o.CMD_SHIFT = 4), | |
(o.CMD_MASK = 240), | |
(o.DUP_MASK = 8), | |
(o.QOS_MASK = 3), | |
(o.QOS_SHIFT = 1), | |
(o.RETAIN_MASK = 1), | |
(o.VARBYTEINT_MASK = 127), | |
(o.VARBYTEINT_FIN_MASK = 128), | |
(o.VARBYTEINT_MAX = 268435455), | |
(o.SESSIONPRESENT_MASK = 1), | |
(o.SESSIONPRESENT_HEADER = Buffer$3.from([o.SESSIONPRESENT_MASK])), | |
(o.CONNACK_HEADER = Buffer$3.from([o.codes.connack << o.CMD_SHIFT])), | |
(o.USERNAME_MASK = 128), | |
(o.PASSWORD_MASK = 64), | |
(o.WILL_RETAIN_MASK = 32), | |
(o.WILL_QOS_MASK = 24), | |
(o.WILL_QOS_SHIFT = 3), | |
(o.WILL_FLAG_MASK = 4), | |
(o.CLEAN_SESSION_MASK = 2), | |
(o.CONNECT_HEADER = Buffer$3.from([o.codes.connect << o.CMD_SHIFT])), | |
(o.properties = { | |
sessionExpiryInterval: 17, | |
willDelayInterval: 24, | |
receiveMaximum: 33, | |
maximumPacketSize: 39, | |
topicAliasMaximum: 34, | |
requestResponseInformation: 25, | |
requestProblemInformation: 23, | |
userProperties: 38, | |
authenticationMethod: 21, | |
authenticationData: 22, | |
payloadFormatIndicator: 1, | |
messageExpiryInterval: 2, | |
contentType: 3, | |
responseTopic: 8, | |
correlationData: 9, | |
maximumQoS: 36, | |
retainAvailable: 37, | |
assignedClientIdentifier: 18, | |
reasonString: 31, | |
wildcardSubscriptionAvailable: 40, | |
subscriptionIdentifiersAvailable: 41, | |
sharedSubscriptionAvailable: 42, | |
serverKeepAlive: 19, | |
responseInformation: 26, | |
serverReference: 28, | |
topicAlias: 35, | |
subscriptionIdentifier: 11, | |
}), | |
(o.propertiesCodes = {}); | |
for (const _e in o.properties) { | |
const et = o.properties[_e]; | |
o.propertiesCodes[et] = _e; | |
} | |
o.propertiesTypes = { | |
sessionExpiryInterval: "int32", | |
willDelayInterval: "int32", | |
receiveMaximum: "int16", | |
maximumPacketSize: "int32", | |
topicAliasMaximum: "int16", | |
requestResponseInformation: "byte", | |
requestProblemInformation: "byte", | |
userProperties: "pair", | |
authenticationMethod: "string", | |
authenticationData: "binary", | |
payloadFormatIndicator: "byte", | |
messageExpiryInterval: "int32", | |
contentType: "string", | |
responseTopic: "string", | |
correlationData: "binary", | |
maximumQoS: "int8", | |
retainAvailable: "byte", | |
assignedClientIdentifier: "string", | |
reasonString: "string", | |
wildcardSubscriptionAvailable: "byte", | |
subscriptionIdentifiersAvailable: "byte", | |
sharedSubscriptionAvailable: "byte", | |
serverKeepAlive: "int16", | |
responseInformation: "string", | |
serverReference: "string", | |
topicAlias: "int16", | |
subscriptionIdentifier: "var", | |
}; | |
function _(_e) { | |
return [0, 1, 2].map((et) => | |
[0, 1].map((tt) => | |
[0, 1].map((rt) => { | |
const it = Buffer$3.alloc(1); | |
return ( | |
it.writeUInt8( | |
(o.codes[_e] << o.CMD_SHIFT) | | |
(tt ? o.DUP_MASK : 0) | | |
(et << o.QOS_SHIFT) | | |
rt, | |
0, | |
!0, | |
), | |
it | |
); | |
}), | |
), | |
); | |
} | |
(o.PUBLISH_HEADER = _("publish")), | |
(o.SUBSCRIBE_HEADER = _("subscribe")), | |
(o.SUBSCRIBE_OPTIONS_QOS_MASK = 3), | |
(o.SUBSCRIBE_OPTIONS_NL_MASK = 1), | |
(o.SUBSCRIBE_OPTIONS_NL_SHIFT = 2), | |
(o.SUBSCRIBE_OPTIONS_RAP_MASK = 1), | |
(o.SUBSCRIBE_OPTIONS_RAP_SHIFT = 3), | |
(o.SUBSCRIBE_OPTIONS_RH_MASK = 3), | |
(o.SUBSCRIBE_OPTIONS_RH_SHIFT = 4), | |
(o.SUBSCRIBE_OPTIONS_RH = [0, 16, 32]), | |
(o.SUBSCRIBE_OPTIONS_NL = 4), | |
(o.SUBSCRIBE_OPTIONS_RAP = 8), | |
(o.SUBSCRIBE_OPTIONS_QOS = [0, 1, 2]), | |
(o.UNSUBSCRIBE_HEADER = _("unsubscribe")), | |
(o.ACKS = { | |
unsuback: _("unsuback"), | |
puback: _("puback"), | |
pubcomp: _("pubcomp"), | |
pubrel: _("pubrel"), | |
pubrec: _("pubrec"), | |
}), | |
(o.SUBACK_HEADER = Buffer$3.from([o.codes.suback << o.CMD_SHIFT])), | |
(o.VERSION3 = Buffer$3.from([3])), | |
(o.VERSION4 = Buffer$3.from([4])), | |
(o.VERSION5 = Buffer$3.from([5])), | |
(o.VERSION131 = Buffer$3.from([131])), | |
(o.VERSION132 = Buffer$3.from([132])), | |
(o.QOS = [0, 1, 2].map((_e) => Buffer$3.from([_e]))), | |
(o.EMPTY = { | |
pingreq: Buffer$3.from([o.codes.pingreq << 4, 0]), | |
pingresp: Buffer$3.from([o.codes.pingresp << 4, 0]), | |
disconnect: Buffer$3.from([o.codes.disconnect << 4, 0]), | |
}); | |
})(constants$2); | |
var constantsExports = constants$2.exports, | |
browser$e = { exports: {} }, | |
ms, | |
hasRequiredMs; | |
function requireMs() { | |
if (hasRequiredMs) return ms; | |
hasRequiredMs = 1; | |
var s = 1e3, | |
o = s * 60, | |
_ = o * 60, | |
_e = _ * 24, | |
et = _e * 7, | |
tt = _e * 365.25; | |
ms = function (at, ht) { | |
ht = ht || {}; | |
var mt = typeof at; | |
if (mt === "string" && at.length > 0) return rt(at); | |
if (mt === "number" && isFinite(at)) return ht.long ? ot(at) : it(at); | |
throw new Error( | |
"val is not a non-empty string or a valid number. val=" + | |
JSON.stringify(at), | |
); | |
}; | |
function rt(at) { | |
if (((at = String(at)), !(at.length > 100))) { | |
var ht = | |
/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( | |
at, | |
); | |
if (ht) { | |
var mt = parseFloat(ht[1]), | |
vt = (ht[2] || "ms").toLowerCase(); | |
switch (vt) { | |
case "years": | |
case "year": | |
case "yrs": | |
case "yr": | |
case "y": | |
return mt * tt; | |
case "weeks": | |
case "week": | |
case "w": | |
return mt * et; | |
case "days": | |
case "day": | |
case "d": | |
return mt * _e; | |
case "hours": | |
case "hour": | |
case "hrs": | |
case "hr": | |
case "h": | |
return mt * _; | |
case "minutes": | |
case "minute": | |
case "mins": | |
case "min": | |
case "m": | |
return mt * o; | |
case "seconds": | |
case "second": | |
case "secs": | |
case "sec": | |
case "s": | |
return mt * s; | |
case "milliseconds": | |
case "millisecond": | |
case "msecs": | |
case "msec": | |
case "ms": | |
return mt; | |
default: | |
return; | |
} | |
} | |
} | |
} | |
function it(at) { | |
var ht = Math.abs(at); | |
return ht >= _e | |
? Math.round(at / _e) + "d" | |
: ht >= _ | |
? Math.round(at / _) + "h" | |
: ht >= o | |
? Math.round(at / o) + "m" | |
: ht >= s | |
? Math.round(at / s) + "s" | |
: at + "ms"; | |
} | |
function ot(at) { | |
var ht = Math.abs(at); | |
return ht >= _e | |
? ct(at, ht, _e, "day") | |
: ht >= _ | |
? ct(at, ht, _, "hour") | |
: ht >= o | |
? ct(at, ht, o, "minute") | |
: ht >= s | |
? ct(at, ht, s, "second") | |
: at + " ms"; | |
} | |
function ct(at, ht, mt, vt) { | |
var xt = ht >= mt * 1.5; | |
return Math.round(at / mt) + " " + vt + (xt ? "s" : ""); | |
} | |
return ms; | |
} | |
function setup(s) { | |
(_.debug = _), | |
(_.default = _), | |
(_.coerce = ot), | |
(_.disable = tt), | |
(_.enable = et), | |
(_.enabled = rt), | |
(_.humanize = requireMs()), | |
(_.destroy = ct), | |
Object.keys(s).forEach((at) => { | |
_[at] = s[at]; | |
}), | |
(_.names = []), | |
(_.skips = []), | |
(_.formatters = {}); | |
function o(at) { | |
let ht = 0; | |
for (let mt = 0; mt < at.length; mt++) | |
(ht = (ht << 5) - ht + at.charCodeAt(mt)), (ht |= 0); | |
return _.colors[Math.abs(ht) % _.colors.length]; | |
} | |
_.selectColor = o; | |
function _(at) { | |
let ht, | |
mt = null, | |
vt, | |
xt; | |
function St(...$t) { | |
if (!St.enabled) return; | |
const Et = St, | |
_t = Number(new Date()), | |
Rt = _t - (ht || _t); | |
(Et.diff = Rt), | |
(Et.prev = ht), | |
(Et.curr = _t), | |
(ht = _t), | |
($t[0] = _.coerce($t[0])), | |
typeof $t[0] != "string" && $t.unshift("%O"); | |
let Mt = 0; | |
($t[0] = $t[0].replace(/%([a-zA-Z%])/g, (Xt, Jt) => { | |
if (Xt === "%%") return "%"; | |
Mt++; | |
const Ht = _.formatters[Jt]; | |
if (typeof Ht == "function") { | |
const qt = $t[Mt]; | |
(Xt = Ht.call(Et, qt)), $t.splice(Mt, 1), Mt--; | |
} | |
return Xt; | |
})), | |
_.formatArgs.call(Et, $t), | |
(Et.log || _.log).apply(Et, $t); | |
} | |
return ( | |
(St.namespace = at), | |
(St.useColors = _.useColors()), | |
(St.color = _.selectColor(at)), | |
(St.extend = _e), | |
(St.destroy = _.destroy), | |
Object.defineProperty(St, "enabled", { | |
enumerable: !0, | |
configurable: !1, | |
get: () => | |
mt !== null | |
? mt | |
: (vt !== _.namespaces && | |
((vt = _.namespaces), (xt = _.enabled(at))), | |
xt), | |
set: ($t) => { | |
mt = $t; | |
}, | |
}), | |
typeof _.init == "function" && _.init(St), | |
St | |
); | |
} | |
function _e(at, ht) { | |
const mt = _(this.namespace + (typeof ht > "u" ? ":" : ht) + at); | |
return (mt.log = this.log), mt; | |
} | |
function et(at) { | |
_.save(at), (_.namespaces = at), (_.names = []), (_.skips = []); | |
let ht; | |
const mt = (typeof at == "string" ? at : "").split(/[\s,]+/), | |
vt = mt.length; | |
for (ht = 0; ht < vt; ht++) | |
mt[ht] && | |
((at = mt[ht].replace(/\*/g, ".*?")), | |
at[0] === "-" | |
? _.skips.push(new RegExp("^" + at.slice(1) + "$")) | |
: _.names.push(new RegExp("^" + at + "$"))); | |
} | |
function tt() { | |
const at = [ | |
..._.names.map(it), | |
..._.skips.map(it).map((ht) => "-" + ht), | |
].join(","); | |
return _.enable(""), at; | |
} | |
function rt(at) { | |
if (at[at.length - 1] === "*") return !0; | |
let ht, mt; | |
for (ht = 0, mt = _.skips.length; ht < mt; ht++) | |
if (_.skips[ht].test(at)) return !1; | |
for (ht = 0, mt = _.names.length; ht < mt; ht++) | |
if (_.names[ht].test(at)) return !0; | |
return !1; | |
} | |
function it(at) { | |
return at | |
.toString() | |
.substring(2, at.toString().length - 2) | |
.replace(/\.\*\?$/, "*"); | |
} | |
function ot(at) { | |
return at instanceof Error ? at.stack || at.message : at; | |
} | |
function ct() { | |
console.warn( | |
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.", | |
); | |
} | |
return _.enable(_.load()), _; | |
} | |
var common$2 = setup; | |
(function (s, o) { | |
var _ = {}; | |
(o.formatArgs = et), | |
(o.save = tt), | |
(o.load = rt), | |
(o.useColors = _e), | |
(o.storage = it()), | |
(o.destroy = (() => { | |
let ct = !1; | |
return () => { | |
ct || | |
((ct = !0), | |
console.warn( | |
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.", | |
)); | |
}; | |
})()), | |
(o.colors = [ | |
"#0000CC", | |
"#0000FF", | |
"#0033CC", | |
"#0033FF", | |
"#0066CC", | |
"#0066FF", | |
"#0099CC", | |
"#0099FF", | |
"#00CC00", | |
"#00CC33", | |
"#00CC66", | |
"#00CC99", | |
"#00CCCC", | |
"#00CCFF", | |
"#3300CC", | |
"#3300FF", | |
"#3333CC", | |
"#3333FF", | |
"#3366CC", | |
"#3366FF", | |
"#3399CC", | |
"#3399FF", | |
"#33CC00", | |
"#33CC33", | |
"#33CC66", | |
"#33CC99", | |
"#33CCCC", | |
"#33CCFF", | |
"#6600CC", | |
"#6600FF", | |
"#6633CC", | |
"#6633FF", | |
"#66CC00", | |
"#66CC33", | |
"#9900CC", | |
"#9900FF", | |
"#9933CC", | |
"#9933FF", | |
"#99CC00", | |
"#99CC33", | |
"#CC0000", | |
"#CC0033", | |
"#CC0066", | |
"#CC0099", | |
"#CC00CC", | |
"#CC00FF", | |
"#CC3300", | |
"#CC3333", | |
"#CC3366", | |
"#CC3399", | |
"#CC33CC", | |
"#CC33FF", | |
"#CC6600", | |
"#CC6633", | |
"#CC9900", | |
"#CC9933", | |
"#CCCC00", | |
"#CCCC33", | |
"#FF0000", | |
"#FF0033", | |
"#FF0066", | |
"#FF0099", | |
"#FF00CC", | |
"#FF00FF", | |
"#FF3300", | |
"#FF3333", | |
"#FF3366", | |
"#FF3399", | |
"#FF33CC", | |
"#FF33FF", | |
"#FF6600", | |
"#FF6633", | |
"#FF9900", | |
"#FF9933", | |
"#FFCC00", | |
"#FFCC33", | |
]); | |
function _e() { | |
return typeof window < "u" && | |
window.process && | |
(window.process.type === "renderer" || window.process.__nwjs) | |
? !0 | |
: typeof navigator < "u" && | |
navigator.userAgent && | |
navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/) | |
? !1 | |
: (typeof document < "u" && | |
document.documentElement && | |
document.documentElement.style && | |
document.documentElement.style.WebkitAppearance) || | |
(typeof window < "u" && | |
window.console && | |
(window.console.firebug || | |
(window.console.exception && window.console.table))) || | |
(typeof navigator < "u" && | |
navigator.userAgent && | |
navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && | |
parseInt(RegExp.$1, 10) >= 31) || | |
(typeof navigator < "u" && | |
navigator.userAgent && | |
navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); | |
} | |
function et(ct) { | |
if ( | |
((ct[0] = | |
(this.useColors ? "%c" : "") + | |
this.namespace + | |
(this.useColors ? " %c" : " ") + | |
ct[0] + | |
(this.useColors ? "%c " : " ") + | |
"+" + | |
s.exports.humanize(this.diff)), | |
!this.useColors) | |
) | |
return; | |
const at = "color: " + this.color; | |
ct.splice(1, 0, at, "color: inherit"); | |
let ht = 0, | |
mt = 0; | |
ct[0].replace(/%[a-zA-Z%]/g, (vt) => { | |
vt !== "%%" && (ht++, vt === "%c" && (mt = ht)); | |
}), | |
ct.splice(mt, 0, at); | |
} | |
o.log = console.debug || console.log || (() => {}); | |
function tt(ct) { | |
try { | |
ct ? o.storage.setItem("debug", ct) : o.storage.removeItem("debug"); | |
} catch {} | |
} | |
function rt() { | |
let ct; | |
try { | |
ct = o.storage.getItem("debug"); | |
} catch {} | |
return ( | |
!ct && typeof process$1 < "u" && "env" in process$1 && (ct = _.DEBUG), | |
ct | |
); | |
} | |
function it() { | |
try { | |
return localStorage; | |
} catch {} | |
} | |
s.exports = common$2(o); | |
const { formatters: ot } = s.exports; | |
ot.j = function (ct) { | |
try { | |
return JSON.stringify(ct); | |
} catch (at) { | |
return "[UnexpectedJSONParseError]: " + at.message; | |
} | |
}; | |
})(browser$e, browser$e.exports); | |
var browserExports = browser$e.exports; | |
const bl = blExports, | |
EventEmitter$2 = eventsExports, | |
Packet = packet, | |
constants$1 = constantsExports, | |
debug$4 = browserExports("mqtt-packet:parser"); | |
let Parser$1 = class Wo extends EventEmitter$2 { | |
constructor() { | |
super(), (this.parser = this.constructor.parser); | |
} | |
static parser(o) { | |
return this instanceof Wo | |
? ((this.settings = o || {}), | |
(this._states = [ | |
"_parseHeader", | |
"_parseLength", | |
"_parsePayload", | |
"_newPacket", | |
]), | |
this._resetState(), | |
this) | |
: new Wo().parser(o); | |
} | |
_resetState() { | |
debug$4("_resetState: resetting packet, error, _list, and _stateCounter"), | |
(this.packet = new Packet()), | |
(this.error = null), | |
(this._list = bl()), | |
(this._stateCounter = 0); | |
} | |
parse(o) { | |
for ( | |
this.error && this._resetState(), | |
this._list.append(o), | |
debug$4("parse: current state: %s", this._states[this._stateCounter]); | |
(this.packet.length !== -1 || this._list.length > 0) && | |
this[this._states[this._stateCounter]]() && | |
!this.error; | |
) | |
this._stateCounter++, | |
debug$4( | |
"parse: state complete. _stateCounter is now: %d", | |
this._stateCounter, | |
), | |
debug$4( | |
"parse: packet.length: %d, buffer list length: %d", | |
this.packet.length, | |
this._list.length, | |
), | |
this._stateCounter >= this._states.length && (this._stateCounter = 0); | |
return ( | |
debug$4( | |
"parse: exited while loop. packet: %d, buffer list length: %d", | |
this.packet.length, | |
this._list.length, | |
), | |
this._list.length | |
); | |
} | |
_parseHeader() { | |
const o = this._list.readUInt8(0); | |
return ( | |
(this.packet.cmd = constants$1.types[o >> constants$1.CMD_SHIFT]), | |
(this.packet.retain = (o & constants$1.RETAIN_MASK) !== 0), | |
(this.packet.qos = (o >> constants$1.QOS_SHIFT) & constants$1.QOS_MASK), | |
(this.packet.dup = (o & constants$1.DUP_MASK) !== 0), | |
debug$4("_parseHeader: packet: %o", this.packet), | |
this._list.consume(1), | |
!0 | |
); | |
} | |
_parseLength() { | |
const o = this._parseVarByteNum(!0); | |
return ( | |
o && ((this.packet.length = o.value), this._list.consume(o.bytes)), | |
debug$4("_parseLength %d", o.value), | |
!!o | |
); | |
} | |
_parsePayload() { | |
debug$4("_parsePayload: payload %O", this._list); | |
let o = !1; | |
if (this.packet.length === 0 || this._list.length >= this.packet.length) { | |
switch (((this._pos = 0), this.packet.cmd)) { | |
case "connect": | |
this._parseConnect(); | |
break; | |
case "connack": | |
this._parseConnack(); | |
break; | |
case "publish": | |
this._parsePublish(); | |
break; | |
case "puback": | |
case "pubrec": | |
case "pubrel": | |
case "pubcomp": | |
this._parseConfirmation(); | |
break; | |
case "subscribe": | |
this._parseSubscribe(); | |
break; | |
case "suback": | |
this._parseSuback(); | |
break; | |
case "unsubscribe": | |
this._parseUnsubscribe(); | |
break; | |
case "unsuback": | |
this._parseUnsuback(); | |
break; | |
case "pingreq": | |
case "pingresp": | |
break; | |
case "disconnect": | |
this._parseDisconnect(); | |
break; | |
case "auth": | |
this._parseAuth(); | |
break; | |
default: | |
this._emitError(new Error("Not supported")); | |
} | |
o = !0; | |
} | |
return debug$4("_parsePayload complete result: %s", o), o; | |
} | |
_parseConnect() { | |
debug$4("_parseConnect"); | |
let o, _, _e, et; | |
const tt = {}, | |
rt = this.packet, | |
it = this._parseString(); | |
if (it === null) | |
return this._emitError(new Error("Cannot parse protocolId")); | |
if (it !== "MQTT" && it !== "MQIsdp") | |
return this._emitError(new Error("Invalid protocolId")); | |
if (((rt.protocolId = it), this._pos >= this._list.length)) | |
return this._emitError(new Error("Packet too short")); | |
if ( | |
((rt.protocolVersion = this._list.readUInt8(this._pos)), | |
rt.protocolVersion >= 128 && | |
((rt.bridgeMode = !0), | |
(rt.protocolVersion = rt.protocolVersion - 128)), | |
rt.protocolVersion !== 3 && | |
rt.protocolVersion !== 4 && | |
rt.protocolVersion !== 5) | |
) | |
return this._emitError(new Error("Invalid protocol version")); | |
if ((this._pos++, this._pos >= this._list.length)) | |
return this._emitError(new Error("Packet too short")); | |
if ( | |
((tt.username = | |
this._list.readUInt8(this._pos) & constants$1.USERNAME_MASK), | |
(tt.password = | |
this._list.readUInt8(this._pos) & constants$1.PASSWORD_MASK), | |
(tt.will = | |
this._list.readUInt8(this._pos) & constants$1.WILL_FLAG_MASK), | |
tt.will && | |
((rt.will = {}), | |
(rt.will.retain = | |
(this._list.readUInt8(this._pos) & constants$1.WILL_RETAIN_MASK) !== | |
0), | |
(rt.will.qos = | |
(this._list.readUInt8(this._pos) & constants$1.WILL_QOS_MASK) >> | |
constants$1.WILL_QOS_SHIFT)), | |
(rt.clean = | |
(this._list.readUInt8(this._pos) & constants$1.CLEAN_SESSION_MASK) !== | |
0), | |
this._pos++, | |
(rt.keepalive = this._parseNum()), | |
rt.keepalive === -1) | |
) | |
return this._emitError(new Error("Packet too short")); | |
if (rt.protocolVersion === 5) { | |
const ct = this._parseProperties(); | |
Object.getOwnPropertyNames(ct).length && (rt.properties = ct); | |
} | |
const ot = this._parseString(); | |
if (ot === null) return this._emitError(new Error("Packet too short")); | |
if ( | |
((rt.clientId = ot), | |
debug$4("_parseConnect: packet.clientId: %s", rt.clientId), | |
tt.will) | |
) { | |
if (rt.protocolVersion === 5) { | |
const ct = this._parseProperties(); | |
Object.getOwnPropertyNames(ct).length && (rt.will.properties = ct); | |
} | |
if (((o = this._parseString()), o === null)) | |
return this._emitError(new Error("Cannot parse will topic")); | |
if ( | |
((rt.will.topic = o), | |
debug$4("_parseConnect: packet.will.topic: %s", rt.will.topic), | |
(_ = this._parseBuffer()), | |
_ === null) | |
) | |
return this._emitError(new Error("Cannot parse will payload")); | |
(rt.will.payload = _), | |
debug$4("_parseConnect: packet.will.paylaod: %s", rt.will.payload); | |
} | |
if (tt.username) { | |
if (((et = this._parseString()), et === null)) | |
return this._emitError(new Error("Cannot parse username")); | |
(rt.username = et), | |
debug$4("_parseConnect: packet.username: %s", rt.username); | |
} | |
if (tt.password) { | |
if (((_e = this._parseBuffer()), _e === null)) | |
return this._emitError(new Error("Cannot parse password")); | |
rt.password = _e; | |
} | |
return (this.settings = rt), debug$4("_parseConnect: complete"), rt; | |
} | |
_parseConnack() { | |
debug$4("_parseConnack"); | |
const o = this.packet; | |
if (this._list.length < 1) return null; | |
if ( | |
((o.sessionPresent = !!( | |
this._list.readUInt8(this._pos++) & constants$1.SESSIONPRESENT_MASK | |
)), | |
this.settings.protocolVersion === 5) | |
) | |
this._list.length >= 2 | |
? (o.reasonCode = this._list.readUInt8(this._pos++)) | |
: (o.reasonCode = 0); | |
else { | |
if (this._list.length < 2) return null; | |
o.returnCode = this._list.readUInt8(this._pos++); | |
} | |
if (o.returnCode === -1 || o.reasonCode === -1) | |
return this._emitError(new Error("Cannot parse return code")); | |
if (this.settings.protocolVersion === 5) { | |
const _ = this._parseProperties(); | |
Object.getOwnPropertyNames(_).length && (o.properties = _); | |
} | |
debug$4("_parseConnack: complete"); | |
} | |
_parsePublish() { | |
debug$4("_parsePublish"); | |
const o = this.packet; | |
if (((o.topic = this._parseString()), o.topic === null)) | |
return this._emitError(new Error("Cannot parse topic")); | |
if (!(o.qos > 0 && !this._parseMessageId())) { | |
if (this.settings.protocolVersion === 5) { | |
const _ = this._parseProperties(); | |
Object.getOwnPropertyNames(_).length && (o.properties = _); | |
} | |
(o.payload = this._list.slice(this._pos, o.length)), | |
debug$4("_parsePublish: payload from buffer list: %o", o.payload); | |
} | |
} | |
_parseSubscribe() { | |
debug$4("_parseSubscribe"); | |
const o = this.packet; | |
let _, _e, et, tt, rt, it, ot; | |
if (o.qos !== 1) | |
return this._emitError(new Error("Wrong subscribe header")); | |
if (((o.subscriptions = []), !!this._parseMessageId())) { | |
if (this.settings.protocolVersion === 5) { | |
const ct = this._parseProperties(); | |
Object.getOwnPropertyNames(ct).length && (o.properties = ct); | |
} | |
for (; this._pos < o.length; ) { | |
if (((_ = this._parseString()), _ === null)) | |
return this._emitError(new Error("Cannot parse topic")); | |
if (this._pos >= o.length) | |
return this._emitError(new Error("Malformed Subscribe Payload")); | |
(_e = this._parseByte()), | |
(et = _e & constants$1.SUBSCRIBE_OPTIONS_QOS_MASK), | |
(it = | |
((_e >> constants$1.SUBSCRIBE_OPTIONS_NL_SHIFT) & | |
constants$1.SUBSCRIBE_OPTIONS_NL_MASK) !== | |
0), | |
(rt = | |
((_e >> constants$1.SUBSCRIBE_OPTIONS_RAP_SHIFT) & | |
constants$1.SUBSCRIBE_OPTIONS_RAP_MASK) !== | |
0), | |
(tt = | |
(_e >> constants$1.SUBSCRIBE_OPTIONS_RH_SHIFT) & | |
constants$1.SUBSCRIBE_OPTIONS_RH_MASK), | |
(ot = { topic: _, qos: et }), | |
this.settings.protocolVersion === 5 | |
? ((ot.nl = it), (ot.rap = rt), (ot.rh = tt)) | |
: this.settings.bridgeMode && | |
((ot.rh = 0), (ot.rap = !0), (ot.nl = !0)), | |
debug$4( | |
"_parseSubscribe: push subscription `%s` to subscription", | |
ot, | |
), | |
o.subscriptions.push(ot); | |
} | |
} | |
} | |
_parseSuback() { | |
debug$4("_parseSuback"); | |
const o = this.packet; | |
if (((this.packet.granted = []), !!this._parseMessageId())) { | |
if (this.settings.protocolVersion === 5) { | |
const _ = this._parseProperties(); | |
Object.getOwnPropertyNames(_).length && (o.properties = _); | |
} | |
for (; this._pos < this.packet.length; ) | |
this.packet.granted.push(this._list.readUInt8(this._pos++)); | |
} | |
} | |
_parseUnsubscribe() { | |
debug$4("_parseUnsubscribe"); | |
const o = this.packet; | |
if (((o.unsubscriptions = []), !!this._parseMessageId())) { | |
if (this.settings.protocolVersion === 5) { | |
const _ = this._parseProperties(); | |
Object.getOwnPropertyNames(_).length && (o.properties = _); | |
} | |
for (; this._pos < o.length; ) { | |
const _ = this._parseString(); | |
if (_ === null) | |
return this._emitError(new Error("Cannot parse topic")); | |
debug$4("_parseUnsubscribe: push topic `%s` to unsubscriptions", _), | |
o.unsubscriptions.push(_); | |
} | |
} | |
} | |
_parseUnsuback() { | |
debug$4("_parseUnsuback"); | |
const o = this.packet; | |
if (!this._parseMessageId()) | |
return this._emitError(new Error("Cannot parse messageId")); | |
if (this.settings.protocolVersion === 5) { | |
const _ = this._parseProperties(); | |
for ( | |
Object.getOwnPropertyNames(_).length && (o.properties = _), | |
o.granted = []; | |
this._pos < this.packet.length; | |
) | |
this.packet.granted.push(this._list.readUInt8(this._pos++)); | |
} | |
} | |
_parseConfirmation() { | |
debug$4("_parseConfirmation: packet.cmd: `%s`", this.packet.cmd); | |
const o = this.packet; | |
if ( | |
(this._parseMessageId(), | |
this.settings.protocolVersion === 5 && | |
(o.length > 2 | |
? ((o.reasonCode = this._parseByte()), | |
debug$4( | |
"_parseConfirmation: packet.reasonCode `%d`", | |
o.reasonCode, | |
)) | |
: (o.reasonCode = 0), | |
o.length > 3)) | |
) { | |
const _ = this._parseProperties(); | |
Object.getOwnPropertyNames(_).length && (o.properties = _); | |
} | |
return !0; | |
} | |
_parseDisconnect() { | |
const o = this.packet; | |
if ((debug$4("_parseDisconnect"), this.settings.protocolVersion === 5)) { | |
this._list.length > 0 | |
? (o.reasonCode = this._parseByte()) | |
: (o.reasonCode = 0); | |
const _ = this._parseProperties(); | |
Object.getOwnPropertyNames(_).length && (o.properties = _); | |
} | |
return debug$4("_parseDisconnect result: true"), !0; | |
} | |
_parseAuth() { | |
debug$4("_parseAuth"); | |
const o = this.packet; | |
if (this.settings.protocolVersion !== 5) | |
return this._emitError( | |
new Error("Not supported auth packet for this version MQTT"), | |
); | |
o.reasonCode = this._parseByte(); | |
const _ = this._parseProperties(); | |
return ( | |
Object.getOwnPropertyNames(_).length && (o.properties = _), | |
debug$4("_parseAuth: result: true"), | |
!0 | |
); | |
} | |
_parseMessageId() { | |
const o = this.packet; | |
return ( | |
(o.messageId = this._parseNum()), | |
o.messageId === null | |
? (this._emitError(new Error("Cannot parse messageId")), !1) | |
: (debug$4("_parseMessageId: packet.messageId %d", o.messageId), !0) | |
); | |
} | |
_parseString(o) { | |
const _ = this._parseNum(), | |
_e = _ + this._pos; | |
if (_ === -1 || _e > this._list.length || _e > this.packet.length) | |
return null; | |
const et = this._list.toString("utf8", this._pos, _e); | |
return (this._pos += _), debug$4("_parseString: result: %s", et), et; | |
} | |
_parseStringPair() { | |
return ( | |
debug$4("_parseStringPair"), | |
{ name: this._parseString(), value: this._parseString() } | |
); | |
} | |
_parseBuffer() { | |
const o = this._parseNum(), | |
_ = o + this._pos; | |
if (o === -1 || _ > this._list.length || _ > this.packet.length) | |
return null; | |
const _e = this._list.slice(this._pos, _); | |
return (this._pos += o), debug$4("_parseBuffer: result: %o", _e), _e; | |
} | |
_parseNum() { | |
if (this._list.length - this._pos < 2) return -1; | |
const o = this._list.readUInt16BE(this._pos); | |
return (this._pos += 2), debug$4("_parseNum: result: %s", o), o; | |
} | |
_parse4ByteNum() { | |
if (this._list.length - this._pos < 4) return -1; | |
const o = this._list.readUInt32BE(this._pos); | |
return (this._pos += 4), debug$4("_parse4ByteNum: result: %s", o), o; | |
} | |
_parseVarByteNum(o) { | |
debug$4("_parseVarByteNum"); | |
const _ = 4; | |
let _e = 0, | |
et = 1, | |
tt = 0, | |
rt = !1, | |
it; | |
const ot = this._pos ? this._pos : 0; | |
for (; _e < _ && ot + _e < this._list.length; ) { | |
if ( | |
((it = this._list.readUInt8(ot + _e++)), | |
(tt += et * (it & constants$1.VARBYTEINT_MASK)), | |
(et *= 128), | |
!(it & constants$1.VARBYTEINT_FIN_MASK)) | |
) { | |
rt = !0; | |
break; | |
} | |
if (this._list.length <= _e) break; | |
} | |
return ( | |
!rt && | |
_e === _ && | |
this._list.length >= _e && | |
this._emitError(new Error("Invalid variable byte integer")), | |
ot && (this._pos += _e), | |
(rt = rt ? (o ? { bytes: _e, value: tt } : tt) : !1), | |
debug$4("_parseVarByteNum: result: %o", rt), | |
rt | |
); | |
} | |
_parseByte() { | |
let o; | |
return ( | |
this._pos < this._list.length && | |
((o = this._list.readUInt8(this._pos)), this._pos++), | |
debug$4("_parseByte: result: %o", o), | |
o | |
); | |
} | |
_parseByType(o) { | |
switch ((debug$4("_parseByType: type: %s", o), o)) { | |
case "byte": | |
return this._parseByte() !== 0; | |
case "int8": | |
return this._parseByte(); | |
case "int16": | |
return this._parseNum(); | |
case "int32": | |
return this._parse4ByteNum(); | |
case "var": | |
return this._parseVarByteNum(); | |
case "string": | |
return this._parseString(); | |
case "pair": | |
return this._parseStringPair(); | |
case "binary": | |
return this._parseBuffer(); | |
} | |
} | |
_parseProperties() { | |
debug$4("_parseProperties"); | |
const o = this._parseVarByteNum(), | |
_e = this._pos + o, | |
et = {}; | |
for (; this._pos < _e; ) { | |
const tt = this._parseByte(); | |
if (!tt) | |
return ( | |
this._emitError(new Error("Cannot parse property code type")), !1 | |
); | |
const rt = constants$1.propertiesCodes[tt]; | |
if (!rt) return this._emitError(new Error("Unknown property")), !1; | |
if (rt === "userProperties") { | |
et[rt] || (et[rt] = Object.create(null)); | |
const it = this._parseByType(constants$1.propertiesTypes[rt]); | |
if (et[rt][it.name]) | |
if (Array.isArray(et[rt][it.name])) et[rt][it.name].push(it.value); | |
else { | |
const ot = et[rt][it.name]; | |
(et[rt][it.name] = [ot]), et[rt][it.name].push(it.value); | |
} | |
else et[rt][it.name] = it.value; | |
continue; | |
} | |
et[rt] | |
? Array.isArray(et[rt]) | |
? et[rt].push(this._parseByType(constants$1.propertiesTypes[rt])) | |
: ((et[rt] = [et[rt]]), | |
et[rt].push(this._parseByType(constants$1.propertiesTypes[rt]))) | |
: (et[rt] = this._parseByType(constants$1.propertiesTypes[rt])); | |
} | |
return et; | |
} | |
_newPacket() { | |
return ( | |
debug$4("_newPacket"), | |
this.packet && | |
(this._list.consume(this.packet.length), | |
debug$4( | |
"_newPacket: parser emit packet: packet.cmd: %s, packet.payload: %s, packet.length: %d", | |
this.packet.cmd, | |
this.packet.payload, | |
this.packet.length, | |
), | |
this.emit("packet", this.packet)), | |
debug$4("_newPacket: new packet"), | |
(this.packet = new Packet()), | |
(this._pos = 0), | |
!0 | |
); | |
} | |
_emitError(o) { | |
debug$4("_emitError"), (this.error = o), this.emit("error", o); | |
} | |
}; | |
var parser$5 = Parser$1; | |
const max$2 = 65536, | |
cache$2 = {}, | |
SubOk = Buffer$3.isBuffer(Buffer$3.from([1, 2]).subarray(0, 1)); | |
function generateBuffer(s) { | |
const o = Buffer$3.allocUnsafe(2); | |
return o.writeUInt8(s >> 8, 0), o.writeUInt8(s & 255, 1), o; | |
} | |
function generateCache$1() { | |
for (let s = 0; s < max$2; s++) cache$2[s] = generateBuffer(s); | |
} | |
function genBufVariableByteInt$1(s) { | |
let _ = 0, | |
_e = 0; | |
const et = Buffer$3.allocUnsafe(4); | |
do | |
(_ = s % 128 | 0), | |
(s = (s / 128) | 0), | |
s > 0 && (_ = _ | 128), | |
et.writeUInt8(_, _e++); | |
while (s > 0 && _e < 4); | |
return s > 0 && (_e = 0), SubOk ? et.subarray(0, _e) : et.slice(0, _e); | |
} | |
function generate4ByteBuffer$1(s) { | |
const o = Buffer$3.allocUnsafe(4); | |
return o.writeUInt32BE(s, 0), o; | |
} | |
var numbers$1 = { | |
cache: cache$2, | |
generateCache: generateCache$1, | |
generateNumber: generateBuffer, | |
genBufVariableByteInt: genBufVariableByteInt$1, | |
generate4ByteBuffer: generate4ByteBuffer$1, | |
}, | |
processNextickArgs = { exports: {} }; | |
typeof process$1 > "u" || | |
!process$1.version || | |
process$1.version.indexOf("v0.") === 0 || | |
(process$1.version.indexOf("v1.") === 0 && | |
process$1.version.indexOf("v1.8.") !== 0) | |
? (processNextickArgs.exports = { nextTick: nextTick$2 }) | |
: (processNextickArgs.exports = process$1); | |
function nextTick$2(s, o, _, _e) { | |
if (typeof s != "function") | |
throw new TypeError('"callback" argument must be a function'); | |
var et = arguments.length, | |
tt, | |
rt; | |
switch (et) { | |
case 0: | |
case 1: | |
return process$1.nextTick(s); | |
case 2: | |
return process$1.nextTick(function () { | |
s.call(null, o); | |
}); | |
case 3: | |
return process$1.nextTick(function () { | |
s.call(null, o, _); | |
}); | |
case 4: | |
return process$1.nextTick(function () { | |
s.call(null, o, _, _e); | |
}); | |
default: | |
for (tt = new Array(et - 1), rt = 0; rt < tt.length; ) | |
tt[rt++] = arguments[rt]; | |
return process$1.nextTick(function () { | |
s.apply(null, tt); | |
}); | |
} | |
} | |
var processNextickArgsExports = processNextickArgs.exports; | |
const protocol = constantsExports, | |
empty$5 = Buffer$3.allocUnsafe(0), | |
zeroBuf = Buffer$3.from([0]), | |
numbers = numbers$1, | |
nextTick$1 = processNextickArgsExports.nextTick, | |
debug$3 = browserExports("mqtt-packet:writeToStream"), | |
numCache = numbers.cache, | |
generateNumber = numbers.generateNumber, | |
generateCache = numbers.generateCache, | |
genBufVariableByteInt = numbers.genBufVariableByteInt, | |
generate4ByteBuffer = numbers.generate4ByteBuffer; | |
let writeNumber = writeNumberCached, | |
toGenerate = !0; | |
function generate$1(s, o, _) { | |
switch ( | |
(debug$3("generate called"), | |
o.cork && (o.cork(), nextTick$1(uncork, o)), | |
toGenerate && ((toGenerate = !1), generateCache()), | |
debug$3("generate: packet.cmd: %s", s.cmd), | |
s.cmd) | |
) { | |
case "connect": | |
return connect$1(s, o); | |
case "connack": | |
return connack(s, o, _); | |
case "publish": | |
return publish(s, o, _); | |
case "puback": | |
case "pubrec": | |
case "pubrel": | |
case "pubcomp": | |
return confirmation(s, o, _); | |
case "subscribe": | |
return subscribe$1(s, o, _); | |
case "suback": | |
return suback(s, o, _); | |
case "unsubscribe": | |
return unsubscribe(s, o, _); | |
case "unsuback": | |
return unsuback(s, o, _); | |
case "pingreq": | |
case "pingresp": | |
return emptyPacket(s, o); | |
case "disconnect": | |
return disconnect(s, o, _); | |
case "auth": | |
return auth(s, o, _); | |
default: | |
return o.emit("error", new Error("Unknown command")), !1; | |
} | |
} | |
Object.defineProperty(generate$1, "cacheNumbers", { | |
get() { | |
return writeNumber === writeNumberCached; | |
}, | |
set(s) { | |
s | |
? ((!numCache || Object.keys(numCache).length === 0) && | |
(toGenerate = !0), | |
(writeNumber = writeNumberCached)) | |
: ((toGenerate = !1), (writeNumber = writeNumberGenerated)); | |
}, | |
}); | |
function uncork(s) { | |
s.uncork(); | |
} | |
function connect$1(s, o, _) { | |
const _e = s || {}, | |
et = _e.protocolId || "MQTT"; | |
let tt = _e.protocolVersion || 4; | |
const rt = _e.will; | |
let it = _e.clean; | |
const ot = _e.keepalive || 0, | |
ct = _e.clientId || "", | |
at = _e.username, | |
ht = _e.password, | |
mt = _e.properties; | |
it === void 0 && (it = !0); | |
let vt = 0; | |
if (!et || (typeof et != "string" && !Buffer$3.isBuffer(et))) | |
return o.emit("error", new Error("Invalid protocolId")), !1; | |
if (((vt += et.length + 2), tt !== 3 && tt !== 4 && tt !== 5)) | |
return o.emit("error", new Error("Invalid protocol version")), !1; | |
if ( | |
((vt += 1), | |
(typeof ct == "string" || Buffer$3.isBuffer(ct)) && | |
(ct || tt >= 4) && | |
(ct || it)) | |
) | |
vt += Buffer$3.byteLength(ct) + 2; | |
else { | |
if (tt < 4) | |
return ( | |
o.emit("error", new Error("clientId must be supplied before 3.1.1")), | |
!1 | |
); | |
if (it * 1 === 0) | |
return ( | |
o.emit( | |
"error", | |
new Error("clientId must be given if cleanSession set to 0"), | |
), | |
!1 | |
); | |
} | |
if (typeof ot != "number" || ot < 0 || ot > 65535 || ot % 1 !== 0) | |
return o.emit("error", new Error("Invalid keepalive")), !1; | |
if (((vt += 2), (vt += 1), tt === 5)) { | |
var xt = getProperties(o, mt); | |
if (!xt) return !1; | |
vt += xt.length; | |
} | |
if (rt) { | |
if (typeof rt != "object") | |
return o.emit("error", new Error("Invalid will")), !1; | |
if (!rt.topic || typeof rt.topic != "string") | |
return o.emit("error", new Error("Invalid will topic")), !1; | |
if (((vt += Buffer$3.byteLength(rt.topic) + 2), (vt += 2), rt.payload)) | |
if (rt.payload.length >= 0) | |
typeof rt.payload == "string" | |
? (vt += Buffer$3.byteLength(rt.payload)) | |
: (vt += rt.payload.length); | |
else return o.emit("error", new Error("Invalid will payload")), !1; | |
var St = {}; | |
if (tt === 5) { | |
if (((St = getProperties(o, rt.properties)), !St)) return !1; | |
vt += St.length; | |
} | |
} | |
let $t = !1; | |
if (at != null) | |
if (isStringOrBuffer(at)) ($t = !0), (vt += Buffer$3.byteLength(at) + 2); | |
else return o.emit("error", new Error("Invalid username")), !1; | |
if (ht != null) { | |
if (!$t) | |
return ( | |
o.emit("error", new Error("Username is required to use password")), !1 | |
); | |
if (isStringOrBuffer(ht)) vt += byteLength(ht) + 2; | |
else return o.emit("error", new Error("Invalid password")), !1; | |
} | |
o.write(protocol.CONNECT_HEADER), | |
writeVarByteInt(o, vt), | |
writeStringOrBuffer(o, et), | |
_e.bridgeMode && (tt += 128), | |
o.write( | |
tt === 131 | |
? protocol.VERSION131 | |
: tt === 132 | |
? protocol.VERSION132 | |
: tt === 4 | |
? protocol.VERSION4 | |
: tt === 5 | |
? protocol.VERSION5 | |
: protocol.VERSION3, | |
); | |
let Et = 0; | |
return ( | |
(Et |= at != null ? protocol.USERNAME_MASK : 0), | |
(Et |= ht != null ? protocol.PASSWORD_MASK : 0), | |
(Et |= rt && rt.retain ? protocol.WILL_RETAIN_MASK : 0), | |
(Et |= rt && rt.qos ? rt.qos << protocol.WILL_QOS_SHIFT : 0), | |
(Et |= rt ? protocol.WILL_FLAG_MASK : 0), | |
(Et |= it ? protocol.CLEAN_SESSION_MASK : 0), | |
o.write(Buffer$3.from([Et])), | |
writeNumber(o, ot), | |
tt === 5 && xt.write(), | |
writeStringOrBuffer(o, ct), | |
rt && | |
(tt === 5 && St.write(), | |
writeString(o, rt.topic), | |
writeStringOrBuffer(o, rt.payload)), | |
at != null && writeStringOrBuffer(o, at), | |
ht != null && writeStringOrBuffer(o, ht), | |
!0 | |
); | |
} | |
function connack(s, o, _) { | |
const _e = _ ? _.protocolVersion : 4, | |
et = s || {}, | |
tt = _e === 5 ? et.reasonCode : et.returnCode, | |
rt = et.properties; | |
let it = 2; | |
if (typeof tt != "number") | |
return o.emit("error", new Error("Invalid return code")), !1; | |
let ot = null; | |
if (_e === 5) { | |
if (((ot = getProperties(o, rt)), !ot)) return !1; | |
it += ot.length; | |
} | |
return ( | |
o.write(protocol.CONNACK_HEADER), | |
writeVarByteInt(o, it), | |
o.write(et.sessionPresent ? protocol.SESSIONPRESENT_HEADER : zeroBuf), | |
o.write(Buffer$3.from([tt])), | |
ot != null && ot.write(), | |
!0 | |
); | |
} | |
function publish(s, o, _) { | |
debug$3("publish: packet: %o", s); | |
const _e = _ ? _.protocolVersion : 4, | |
et = s || {}, | |
tt = et.qos || 0, | |
rt = et.retain ? protocol.RETAIN_MASK : 0, | |
it = et.topic, | |
ot = et.payload || empty$5, | |
ct = et.messageId, | |
at = et.properties; | |
let ht = 0; | |
if (typeof it == "string") ht += Buffer$3.byteLength(it) + 2; | |
else if (Buffer$3.isBuffer(it)) ht += it.length + 2; | |
else return o.emit("error", new Error("Invalid topic")), !1; | |
if ( | |
(Buffer$3.isBuffer(ot) | |
? (ht += ot.length) | |
: (ht += Buffer$3.byteLength(ot)), | |
tt && typeof ct != "number") | |
) | |
return o.emit("error", new Error("Invalid messageId")), !1; | |
tt && (ht += 2); | |
let mt = null; | |
if (_e === 5) { | |
if (((mt = getProperties(o, at)), !mt)) return !1; | |
ht += mt.length; | |
} | |
return ( | |
o.write(protocol.PUBLISH_HEADER[tt][et.dup ? 1 : 0][rt ? 1 : 0]), | |
writeVarByteInt(o, ht), | |
writeNumber(o, byteLength(it)), | |
o.write(it), | |
tt > 0 && writeNumber(o, ct), | |
mt != null && mt.write(), | |
debug$3("publish: payload: %o", ot), | |
o.write(ot) | |
); | |
} | |
function confirmation(s, o, _) { | |
const _e = _ ? _.protocolVersion : 4, | |
et = s || {}, | |
tt = et.cmd || "puback", | |
rt = et.messageId, | |
it = et.dup && tt === "pubrel" ? protocol.DUP_MASK : 0; | |
let ot = 0; | |
const ct = et.reasonCode, | |
at = et.properties; | |
let ht = _e === 5 ? 3 : 2; | |
if ((tt === "pubrel" && (ot = 1), typeof rt != "number")) | |
return o.emit("error", new Error("Invalid messageId")), !1; | |
let mt = null; | |
if (_e === 5 && typeof at == "object") { | |
if (((mt = getPropertiesByMaximumPacketSize(o, at, _, ht)), !mt)) | |
return !1; | |
ht += mt.length; | |
} | |
return ( | |
o.write(protocol.ACKS[tt][ot][it][0]), | |
writeVarByteInt(o, ht), | |
writeNumber(o, rt), | |
_e === 5 && o.write(Buffer$3.from([ct])), | |
mt !== null && mt.write(), | |
!0 | |
); | |
} | |
function subscribe$1(s, o, _) { | |
debug$3("subscribe: packet: "); | |
const _e = _ ? _.protocolVersion : 4, | |
et = s || {}, | |
tt = et.dup ? protocol.DUP_MASK : 0, | |
rt = et.messageId, | |
it = et.subscriptions, | |
ot = et.properties; | |
let ct = 0; | |
if (typeof rt != "number") | |
return o.emit("error", new Error("Invalid messageId")), !1; | |
ct += 2; | |
let at = null; | |
if (_e === 5) { | |
if (((at = getProperties(o, ot)), !at)) return !1; | |
ct += at.length; | |
} | |
if (typeof it == "object" && it.length) | |
for (let mt = 0; mt < it.length; mt += 1) { | |
const vt = it[mt].topic, | |
xt = it[mt].qos; | |
if (typeof vt != "string") | |
return ( | |
o.emit("error", new Error("Invalid subscriptions - invalid topic")), | |
!1 | |
); | |
if (typeof xt != "number") | |
return ( | |
o.emit("error", new Error("Invalid subscriptions - invalid qos")), | |
!1 | |
); | |
if (_e === 5) { | |
if (typeof (it[mt].nl || !1) != "boolean") | |
return ( | |
o.emit( | |
"error", | |
new Error("Invalid subscriptions - invalid No Local"), | |
), | |
!1 | |
); | |
if (typeof (it[mt].rap || !1) != "boolean") | |
return ( | |
o.emit( | |
"error", | |
new Error( | |
"Invalid subscriptions - invalid Retain as Published", | |
), | |
), | |
!1 | |
); | |
const Et = it[mt].rh || 0; | |
if (typeof Et != "number" || Et > 2) | |
return ( | |
o.emit( | |
"error", | |
new Error("Invalid subscriptions - invalid Retain Handling"), | |
), | |
!1 | |
); | |
} | |
ct += Buffer$3.byteLength(vt) + 2 + 1; | |
} | |
else return o.emit("error", new Error("Invalid subscriptions")), !1; | |
debug$3("subscribe: writing to stream: %o", protocol.SUBSCRIBE_HEADER), | |
o.write(protocol.SUBSCRIBE_HEADER[1][tt ? 1 : 0][0]), | |
writeVarByteInt(o, ct), | |
writeNumber(o, rt), | |
at !== null && at.write(); | |
let ht = !0; | |
for (const mt of it) { | |
const vt = mt.topic, | |
xt = mt.qos, | |
St = +mt.nl, | |
$t = +mt.rap, | |
Et = mt.rh; | |
let _t; | |
writeString(o, vt), | |
(_t = protocol.SUBSCRIBE_OPTIONS_QOS[xt]), | |
_e === 5 && | |
((_t |= St ? protocol.SUBSCRIBE_OPTIONS_NL : 0), | |
(_t |= $t ? protocol.SUBSCRIBE_OPTIONS_RAP : 0), | |
(_t |= Et ? protocol.SUBSCRIBE_OPTIONS_RH[Et] : 0)), | |
(ht = o.write(Buffer$3.from([_t]))); | |
} | |
return ht; | |
} | |
function suback(s, o, _) { | |
const _e = _ ? _.protocolVersion : 4, | |
et = s || {}, | |
tt = et.messageId, | |
rt = et.granted, | |
it = et.properties; | |
let ot = 0; | |
if (typeof tt != "number") | |
return o.emit("error", new Error("Invalid messageId")), !1; | |
if (((ot += 2), typeof rt == "object" && rt.length)) | |
for (let at = 0; at < rt.length; at += 1) { | |
if (typeof rt[at] != "number") | |
return o.emit("error", new Error("Invalid qos vector")), !1; | |
ot += 1; | |
} | |
else return o.emit("error", new Error("Invalid qos vector")), !1; | |
let ct = null; | |
if (_e === 5) { | |
if (((ct = getPropertiesByMaximumPacketSize(o, it, _, ot)), !ct)) | |
return !1; | |
ot += ct.length; | |
} | |
return ( | |
o.write(protocol.SUBACK_HEADER), | |
writeVarByteInt(o, ot), | |
writeNumber(o, tt), | |
ct !== null && ct.write(), | |
o.write(Buffer$3.from(rt)) | |
); | |
} | |
function unsubscribe(s, o, _) { | |
const _e = _ ? _.protocolVersion : 4, | |
et = s || {}, | |
tt = et.messageId, | |
rt = et.dup ? protocol.DUP_MASK : 0, | |
it = et.unsubscriptions, | |
ot = et.properties; | |
let ct = 0; | |
if (typeof tt != "number") | |
return o.emit("error", new Error("Invalid messageId")), !1; | |
if (((ct += 2), typeof it == "object" && it.length)) | |
for (let mt = 0; mt < it.length; mt += 1) { | |
if (typeof it[mt] != "string") | |
return o.emit("error", new Error("Invalid unsubscriptions")), !1; | |
ct += Buffer$3.byteLength(it[mt]) + 2; | |
} | |
else return o.emit("error", new Error("Invalid unsubscriptions")), !1; | |
let at = null; | |
if (_e === 5) { | |
if (((at = getProperties(o, ot)), !at)) return !1; | |
ct += at.length; | |
} | |
o.write(protocol.UNSUBSCRIBE_HEADER[1][rt ? 1 : 0][0]), | |
writeVarByteInt(o, ct), | |
writeNumber(o, tt), | |
at !== null && at.write(); | |
let ht = !0; | |
for (let mt = 0; mt < it.length; mt++) ht = writeString(o, it[mt]); | |
return ht; | |
} | |
function unsuback(s, o, _) { | |
const _e = _ ? _.protocolVersion : 4, | |
et = s || {}, | |
tt = et.messageId, | |
rt = et.dup ? protocol.DUP_MASK : 0, | |
it = et.granted, | |
ot = et.properties, | |
ct = et.cmd, | |
at = 0; | |
let ht = 2; | |
if (typeof tt != "number") | |
return o.emit("error", new Error("Invalid messageId")), !1; | |
if (_e === 5) | |
if (typeof it == "object" && it.length) | |
for (let vt = 0; vt < it.length; vt += 1) { | |
if (typeof it[vt] != "number") | |
return o.emit("error", new Error("Invalid qos vector")), !1; | |
ht += 1; | |
} | |
else return o.emit("error", new Error("Invalid qos vector")), !1; | |
let mt = null; | |
if (_e === 5) { | |
if (((mt = getPropertiesByMaximumPacketSize(o, ot, _, ht)), !mt)) | |
return !1; | |
ht += mt.length; | |
} | |
return ( | |
o.write(protocol.ACKS[ct][at][rt][0]), | |
writeVarByteInt(o, ht), | |
writeNumber(o, tt), | |
mt !== null && mt.write(), | |
_e === 5 && o.write(Buffer$3.from(it)), | |
!0 | |
); | |
} | |
function emptyPacket(s, o, _) { | |
return o.write(protocol.EMPTY[s.cmd]); | |
} | |
function disconnect(s, o, _) { | |
const _e = _ ? _.protocolVersion : 4, | |
et = s || {}, | |
tt = et.reasonCode, | |
rt = et.properties; | |
let it = _e === 5 ? 1 : 0, | |
ot = null; | |
if (_e === 5) { | |
if (((ot = getPropertiesByMaximumPacketSize(o, rt, _, it)), !ot)) | |
return !1; | |
it += ot.length; | |
} | |
return ( | |
o.write(Buffer$3.from([protocol.codes.disconnect << 4])), | |
writeVarByteInt(o, it), | |
_e === 5 && o.write(Buffer$3.from([tt])), | |
ot !== null && ot.write(), | |
!0 | |
); | |
} | |
function auth(s, o, _) { | |
const _e = _ ? _.protocolVersion : 4, | |
et = s || {}, | |
tt = et.reasonCode, | |
rt = et.properties; | |
let it = _e === 5 ? 1 : 0; | |
_e !== 5 && | |
o.emit("error", new Error("Invalid mqtt version for auth packet")); | |
const ot = getPropertiesByMaximumPacketSize(o, rt, _, it); | |
return ot | |
? ((it += ot.length), | |
o.write(Buffer$3.from([protocol.codes.auth << 4])), | |
writeVarByteInt(o, it), | |
o.write(Buffer$3.from([tt])), | |
ot !== null && ot.write(), | |
!0) | |
: !1; | |
} | |
const varByteIntCache = {}; | |
function writeVarByteInt(s, o) { | |
if (o > protocol.VARBYTEINT_MAX) | |
return ( | |
s.emit("error", new Error(`Invalid variable byte integer: ${o}`)), !1 | |
); | |
let _ = varByteIntCache[o]; | |
return ( | |
_ || | |
((_ = genBufVariableByteInt(o)), o < 16384 && (varByteIntCache[o] = _)), | |
debug$3("writeVarByteInt: writing to stream: %o", _), | |
s.write(_) | |
); | |
} | |
function writeString(s, o) { | |
const _ = Buffer$3.byteLength(o); | |
return writeNumber(s, _), debug$3("writeString: %s", o), s.write(o, "utf8"); | |
} | |
function writeStringPair(s, o, _) { | |
writeString(s, o), writeString(s, _); | |
} | |
function writeNumberCached(s, o) { | |
return ( | |
debug$3("writeNumberCached: number: %d", o), | |
debug$3("writeNumberCached: %o", numCache[o]), | |
s.write(numCache[o]) | |
); | |
} | |
function writeNumberGenerated(s, o) { | |
const _ = generateNumber(o); | |
return debug$3("writeNumberGenerated: %o", _), s.write(_); | |
} | |
function write4ByteNumber(s, o) { | |
const _ = generate4ByteBuffer(o); | |
return debug$3("write4ByteNumber: %o", _), s.write(_); | |
} | |
function writeStringOrBuffer(s, o) { | |
typeof o == "string" | |
? writeString(s, o) | |
: o | |
? (writeNumber(s, o.length), s.write(o)) | |
: writeNumber(s, 0); | |
} | |
function getProperties(s, o) { | |
if (typeof o != "object" || o.length != null) | |
return { | |
length: 1, | |
write() { | |
writeProperties(s, {}, 0); | |
}, | |
}; | |
let _ = 0; | |
function _e(tt, rt) { | |
const it = protocol.propertiesTypes[tt]; | |
let ot = 0; | |
switch (it) { | |
case "byte": { | |
if (typeof rt != "boolean") | |
return s.emit("error", new Error(`Invalid ${tt}: ${rt}`)), !1; | |
ot += 2; | |
break; | |
} | |
case "int8": { | |
if (typeof rt != "number" || rt < 0 || rt > 255) | |
return s.emit("error", new Error(`Invalid ${tt}: ${rt}`)), !1; | |
ot += 2; | |
break; | |
} | |
case "binary": { | |
if (rt && rt === null) | |
return s.emit("error", new Error(`Invalid ${tt}: ${rt}`)), !1; | |
ot += 1 + Buffer$3.byteLength(rt) + 2; | |
break; | |
} | |
case "int16": { | |
if (typeof rt != "number" || rt < 0 || rt > 65535) | |
return s.emit("error", new Error(`Invalid ${tt}: ${rt}`)), !1; | |
ot += 3; | |
break; | |
} | |
case "int32": { | |
if (typeof rt != "number" || rt < 0 || rt > 4294967295) | |
return s.emit("error", new Error(`Invalid ${tt}: ${rt}`)), !1; | |
ot += 5; | |
break; | |
} | |
case "var": { | |
if (typeof rt != "number" || rt < 0 || rt > 268435455) | |
return s.emit("error", new Error(`Invalid ${tt}: ${rt}`)), !1; | |
ot += 1 + Buffer$3.byteLength(genBufVariableByteInt(rt)); | |
break; | |
} | |
case "string": { | |
if (typeof rt != "string") | |
return s.emit("error", new Error(`Invalid ${tt}: ${rt}`)), !1; | |
ot += 3 + Buffer$3.byteLength(rt.toString()); | |
break; | |
} | |
case "pair": { | |
if (typeof rt != "object") | |
return s.emit("error", new Error(`Invalid ${tt}: ${rt}`)), !1; | |
ot += Object.getOwnPropertyNames(rt).reduce((ct, at) => { | |
const ht = rt[at]; | |
return ( | |
Array.isArray(ht) | |
? (ct += ht.reduce( | |
(mt, vt) => ( | |
(mt += | |
3 + | |
Buffer$3.byteLength(at.toString()) + | |
2 + | |
Buffer$3.byteLength(vt.toString())), | |
mt | |
), | |
0, | |
)) | |
: (ct += | |
3 + | |
Buffer$3.byteLength(at.toString()) + | |
2 + | |
Buffer$3.byteLength(rt[at].toString())), | |
ct | |
); | |
}, 0); | |
break; | |
} | |
default: | |
return ( | |
s.emit("error", new Error(`Invalid property ${tt}: ${rt}`)), !1 | |
); | |
} | |
return ot; | |
} | |
if (o) | |
for (const tt in o) { | |
let rt = 0, | |
it = 0; | |
const ot = o[tt]; | |
if (Array.isArray(ot)) | |
for (let ct = 0; ct < ot.length; ct++) { | |
if (((it = _e(tt, ot[ct])), !it)) return !1; | |
rt += it; | |
} | |
else { | |
if (((it = _e(tt, ot)), !it)) return !1; | |
rt = it; | |
} | |
if (!rt) return !1; | |
_ += rt; | |
} | |
return { | |
length: Buffer$3.byteLength(genBufVariableByteInt(_)) + _, | |
write() { | |
writeProperties(s, o, _); | |
}, | |
}; | |
} | |
function getPropertiesByMaximumPacketSize(s, o, _, _e) { | |
const et = ["reasonString", "userProperties"], | |
tt = | |
_ && _.properties && _.properties.maximumPacketSize | |
? _.properties.maximumPacketSize | |
: 0; | |
let rt = getProperties(s, o); | |
if (tt) | |
for (; _e + rt.length > tt; ) { | |
const it = et.shift(); | |
if (it && o[it]) delete o[it], (rt = getProperties(s, o)); | |
else return !1; | |
} | |
return rt; | |
} | |
function writeProperty(s, o, _) { | |
switch (protocol.propertiesTypes[o]) { | |
case "byte": { | |
s.write(Buffer$3.from([protocol.properties[o]])), | |
s.write(Buffer$3.from([+_])); | |
break; | |
} | |
case "int8": { | |
s.write(Buffer$3.from([protocol.properties[o]])), | |
s.write(Buffer$3.from([_])); | |
break; | |
} | |
case "binary": { | |
s.write(Buffer$3.from([protocol.properties[o]])), | |
writeStringOrBuffer(s, _); | |
break; | |
} | |
case "int16": { | |
s.write(Buffer$3.from([protocol.properties[o]])), writeNumber(s, _); | |
break; | |
} | |
case "int32": { | |
s.write(Buffer$3.from([protocol.properties[o]])), | |
write4ByteNumber(s, _); | |
break; | |
} | |
case "var": { | |
s.write(Buffer$3.from([protocol.properties[o]])), writeVarByteInt(s, _); | |
break; | |
} | |
case "string": { | |
s.write(Buffer$3.from([protocol.properties[o]])), writeString(s, _); | |
break; | |
} | |
case "pair": { | |
Object.getOwnPropertyNames(_).forEach((et) => { | |
const tt = _[et]; | |
Array.isArray(tt) | |
? tt.forEach((rt) => { | |
s.write(Buffer$3.from([protocol.properties[o]])), | |
writeStringPair(s, et.toString(), rt.toString()); | |
}) | |
: (s.write(Buffer$3.from([protocol.properties[o]])), | |
writeStringPair(s, et.toString(), tt.toString())); | |
}); | |
break; | |
} | |
default: | |
return ( | |
s.emit("error", new Error(`Invalid property ${o} value: ${_}`)), !1 | |
); | |
} | |
} | |
function writeProperties(s, o, _) { | |
writeVarByteInt(s, _); | |
for (const _e in o) | |
if (Object.prototype.hasOwnProperty.call(o, _e) && o[_e] !== null) { | |
const et = o[_e]; | |
if (Array.isArray(et)) | |
for (let tt = 0; tt < et.length; tt++) writeProperty(s, _e, et[tt]); | |
else writeProperty(s, _e, et); | |
} | |
} | |
function byteLength(s) { | |
return s ? (s instanceof Buffer$3 ? s.length : Buffer$3.byteLength(s)) : 0; | |
} | |
function isStringOrBuffer(s) { | |
return typeof s == "string" || s instanceof Buffer$3; | |
} | |
var writeToStream$1 = generate$1; | |
const writeToStream = writeToStream$1, | |
EventEmitter$1 = eventsExports; | |
function generate(s, o) { | |
const _ = new Accumulator(); | |
return writeToStream(s, _, o), _.concat(); | |
} | |
class Accumulator extends EventEmitter$1 { | |
constructor() { | |
super(), (this._array = new Array(20)), (this._i = 0); | |
} | |
write(o) { | |
return (this._array[this._i++] = o), !0; | |
} | |
concat() { | |
let o = 0; | |
const _ = new Array(this._array.length), | |
_e = this._array; | |
let et = 0, | |
tt; | |
for (tt = 0; tt < _e.length && _e[tt] !== void 0; tt++) | |
typeof _e[tt] != "string" | |
? (_[tt] = _e[tt].length) | |
: (_[tt] = Buffer$3.byteLength(_e[tt])), | |
(o += _[tt]); | |
const rt = Buffer$3.allocUnsafe(o); | |
for (tt = 0; tt < _e.length && _e[tt] !== void 0; tt++) | |
typeof _e[tt] != "string" | |
? (_e[tt].copy(rt, et), (et += _[tt])) | |
: (rt.write(_e[tt], et), (et += _[tt])); | |
return rt; | |
} | |
} | |
var generate_1 = generate; | |
mqtt$1.parser = parser$5.parser; | |
mqtt$1.generate = generate_1; | |
mqtt$1.writeToStream = writeToStream$1; | |
function ReInterval(s, o, _) { | |
var _e = this; | |
(this._callback = s), | |
(this._args = _), | |
(this._interval = setInterval(s, o, this._args)), | |
(this.reschedule = function (et) { | |
et || (et = _e._interval), | |
_e._interval && clearInterval(_e._interval), | |
(_e._interval = setInterval(_e._callback, et, _e._args)); | |
}), | |
(this.clear = function () { | |
_e._interval && (clearInterval(_e._interval), (_e._interval = void 0)); | |
}), | |
(this.destroy = function () { | |
_e._interval && clearInterval(_e._interval), | |
(_e._callback = void 0), | |
(_e._interval = void 0), | |
(_e._args = void 0); | |
}); | |
} | |
function reInterval$1() { | |
if (typeof arguments[0] != "function") throw new Error("callback needed"); | |
if (typeof arguments[1] != "number") throw new Error("interval needed"); | |
var s; | |
if (arguments.length > 0) { | |
s = new Array(arguments.length - 2); | |
for (var o = 0; o < s.length; o++) s[o] = arguments[o + 2]; | |
} | |
return new ReInterval(arguments[0], arguments[1], s); | |
} | |
var reinterval = reInterval$1; | |
function validateTopic(s) { | |
for (var o = s.split("/"), _ = 0; _ < o.length; _++) | |
if (o[_] !== "+") { | |
if (o[_] === "#") return _ === o.length - 1; | |
if (o[_].indexOf("+") !== -1 || o[_].indexOf("#") !== -1) return !1; | |
} | |
return !0; | |
} | |
function validateTopics(s) { | |
if (s.length === 0) return "empty_topic_list"; | |
for (var o = 0; o < s.length; o++) if (!validateTopic(s[o])) return s[o]; | |
return null; | |
} | |
var validations$1 = { validateTopics }, | |
EventEmitter = eventsExports.EventEmitter, | |
Store$1 = store, | |
mqttPacket = mqtt$1, | |
Writable = readableBrowserExports.Writable, | |
inherits$5 = inherits_browserExports, | |
reInterval = reinterval, | |
validations = validations$1, | |
xtend$2 = immutable, | |
debug$2 = browserExports("mqttjs:client"), | |
nextTick = process$1 | |
? process$1.nextTick | |
: function (s) { | |
setTimeout(s, 0); | |
}, | |
setImmediate$1 = | |
commonjsGlobal$3.setImmediate || | |
function (s) { | |
nextTick(s); | |
}, | |
defaultConnectOptions = { | |
keepalive: 60, | |
reschedulePings: !0, | |
protocolId: "MQTT", | |
protocolVersion: 4, | |
reconnectPeriod: 1e3, | |
connectTimeout: 30 * 1e3, | |
clean: !0, | |
resubscribe: !0, | |
}, | |
socketErrors = ["ECONNREFUSED", "EADDRINUSE", "ECONNRESET", "ENOTFOUND"], | |
errors = { | |
0: "", | |
1: "Unacceptable protocol version", | |
2: "Identifier rejected", | |
3: "Server unavailable", | |
4: "Bad username or password", | |
5: "Not authorized", | |
16: "No matching subscribers", | |
17: "No subscription existed", | |
128: "Unspecified error", | |
129: "Malformed Packet", | |
130: "Protocol Error", | |
131: "Implementation specific error", | |
132: "Unsupported Protocol Version", | |
133: "Client Identifier not valid", | |
134: "Bad User Name or Password", | |
135: "Not authorized", | |
136: "Server unavailable", | |
137: "Server busy", | |
138: "Banned", | |
139: "Server shutting down", | |
140: "Bad authentication method", | |
141: "Keep Alive timeout", | |
142: "Session taken over", | |
143: "Topic Filter invalid", | |
144: "Topic Name invalid", | |
145: "Packet identifier in use", | |
146: "Packet Identifier not found", | |
147: "Receive Maximum exceeded", | |
148: "Topic Alias invalid", | |
149: "Packet too large", | |
150: "Message rate too high", | |
151: "Quota exceeded", | |
152: "Administrative action", | |
153: "Payload format invalid", | |
154: "Retain not supported", | |
155: "QoS not supported", | |
156: "Use another server", | |
157: "Server moved", | |
158: "Shared Subscriptions not supported", | |
159: "Connection rate exceeded", | |
160: "Maximum connect time", | |
161: "Subscription Identifiers not supported", | |
162: "Wildcard Subscriptions not supported", | |
}; | |
function defaultId() { | |
return "mqttjs_" + Math.random().toString(16).substr(2, 8); | |
} | |
function sendPacket(s, o, _) { | |
debug$2("sendPacket :: packet: %O", o), | |
debug$2("sendPacket :: emitting `packetsend`"), | |
s.emit("packetsend", o), | |
debug$2("sendPacket :: writing to stream"); | |
var _e = mqttPacket.writeToStream(o, s.stream, s.options); | |
debug$2("sendPacket :: writeToStream result %s", _e), | |
!_e && _ | |
? (debug$2( | |
"sendPacket :: handle events on `drain` once through callback.", | |
), | |
s.stream.once("drain", _)) | |
: _ && (debug$2("sendPacket :: invoking cb"), _()); | |
} | |
function flush(s) { | |
s && | |
(debug$2("flush: queue exists? %b", !!s), | |
Object.keys(s).forEach(function (o) { | |
typeof s[o].cb == "function" && | |
(s[o].cb(new Error("Connection closed")), delete s[o]); | |
})); | |
} | |
function flushVolatile(s) { | |
s && | |
(debug$2( | |
"flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function", | |
), | |
Object.keys(s).forEach(function (o) { | |
s[o].volatile && | |
typeof s[o].cb == "function" && | |
(s[o].cb(new Error("Connection closed")), delete s[o]); | |
})); | |
} | |
function storeAndSend(s, o, _, _e) { | |
debug$2("storeAndSend :: store packet with cmd %s to outgoingStore", o.cmd), | |
s.outgoingStore.put(o, function (tt) { | |
if (tt) return _ && _(tt); | |
_e(), sendPacket(s, o, _); | |
}); | |
} | |
function nop(s) { | |
debug$2("nop ::", s); | |
} | |
function MqttClient$1(s, o) { | |
var _, | |
_e = this; | |
if (!(this instanceof MqttClient$1)) return new MqttClient$1(s, o); | |
this.options = o || {}; | |
for (_ in defaultConnectOptions) | |
typeof this.options[_] > "u" | |
? (this.options[_] = defaultConnectOptions[_]) | |
: (this.options[_] = o[_]); | |
debug$2("MqttClient :: options.protocol", o.protocol), | |
debug$2("MqttClient :: options.protocolVersion", o.protocolVersion), | |
debug$2("MqttClient :: options.username", o.username), | |
debug$2("MqttClient :: options.keepalive", o.keepalive), | |
debug$2("MqttClient :: options.reconnectPeriod", o.reconnectPeriod), | |
debug$2("MqttClient :: options.rejectUnauthorized", o.rejectUnauthorized), | |
(this.options.clientId = | |
typeof o.clientId == "string" ? o.clientId : defaultId()), | |
debug$2("MqttClient :: clientId", this.options.clientId), | |
(this.options.customHandleAcks = | |
o.protocolVersion === 5 && o.customHandleAcks | |
? o.customHandleAcks | |
: function () { | |
arguments[3](0); | |
}), | |
(this.streamBuilder = s), | |
(this.outgoingStore = o.outgoingStore || new Store$1()), | |
(this.incomingStore = o.incomingStore || new Store$1()), | |
(this.queueQoSZero = o.queueQoSZero === void 0 ? !0 : o.queueQoSZero), | |
(this._resubscribeTopics = {}), | |
(this.messageIdToTopic = {}), | |
(this.pingTimer = null), | |
(this.connected = !1), | |
(this.disconnecting = !1), | |
(this.queue = []), | |
(this.connackTimer = null), | |
(this.reconnectTimer = null), | |
(this._storeProcessing = !1), | |
(this._packetIdsDuringStoreProcessing = {}), | |
(this.nextId = Math.max(1, Math.floor(Math.random() * 65535))), | |
(this.outgoing = {}), | |
(this._firstConnection = !0), | |
this.on("connect", function () { | |
var et = this.queue; | |
function tt() { | |
var rt = et.shift(); | |
debug$2("deliver :: entry %o", rt); | |
var it = null; | |
rt && | |
((it = rt.packet), | |
debug$2("deliver :: call _sendPacket for %o", it), | |
_e._sendPacket(it, function (ot) { | |
rt.cb && rt.cb(ot), tt(); | |
})); | |
} | |
debug$2("connect :: sending queued packets"), tt(); | |
}), | |
this.on("close", function () { | |
debug$2("close :: connected set to `false`"), | |
(this.connected = !1), | |
debug$2("close :: clearing connackTimer"), | |
clearTimeout(this.connackTimer), | |
debug$2("close :: clearing ping timer"), | |
_e.pingTimer !== null && | |
(_e.pingTimer.clear(), (_e.pingTimer = null)), | |
debug$2("close :: calling _setupReconnect"), | |
this._setupReconnect(); | |
}), | |
EventEmitter.call(this), | |
debug$2("MqttClient :: setting up stream"), | |
this._setupStream(); | |
} | |
inherits$5(MqttClient$1, EventEmitter); | |
MqttClient$1.prototype._setupStream = function () { | |
var s, | |
o = this, | |
_ = new Writable(), | |
_e = mqttPacket.parser(this.options), | |
et = null, | |
tt = []; | |
debug$2("_setupStream :: calling method to clear reconnect"), | |
this._clearReconnect(), | |
debug$2( | |
"_setupStream :: using streamBuilder provided to client to create stream", | |
), | |
(this.stream = this.streamBuilder(this)), | |
_e.on("packet", function (at) { | |
debug$2("parser :: on packet push to packets array."), tt.push(at); | |
}); | |
function rt() { | |
if (tt.length) nextTick(it); | |
else { | |
var at = et; | |
(et = null), at(); | |
} | |
} | |
function it() { | |
debug$2("work :: getting next packet in queue"); | |
var at = tt.shift(); | |
if (at) | |
debug$2("work :: packet pulled from queue"), o._handlePacket(at, rt); | |
else { | |
debug$2("work :: no packets in queue"); | |
var ht = et; | |
(et = null), debug$2("work :: done flag is %s", !!ht), ht && ht(); | |
} | |
} | |
_._write = function (at, ht, mt) { | |
(et = mt), | |
debug$2("writable stream :: parsing buffer"), | |
_e.parse(at), | |
it(); | |
}; | |
function ot(at) { | |
debug$2("streamErrorHandler :: error", at.message), | |
socketErrors.includes(at.code) | |
? (debug$2("streamErrorHandler :: emitting error"), | |
o.emit("error", at)) | |
: nop(at); | |
} | |
if ( | |
(debug$2("_setupStream :: pipe stream to writable stream"), | |
this.stream.pipe(_), | |
this.stream.on("error", ot), | |
this.stream.on("close", function () { | |
debug$2("(%s)stream :: on close", o.options.clientId), | |
flushVolatile(o.outgoing), | |
debug$2("stream: emit close to MqttClient"), | |
o.emit("close"); | |
}), | |
debug$2("_setupStream: sending packet `connect`"), | |
(s = Object.create(this.options)), | |
(s.cmd = "connect"), | |
sendPacket(this, s), | |
_e.on("error", this.emit.bind(this, "error")), | |
this.options.properties) | |
) { | |
if ( | |
!this.options.properties.authenticationMethod && | |
this.options.properties.authenticationData | |
) | |
return ( | |
o.end(() => | |
this.emit( | |
"error", | |
new Error("Packet has no Authentication Method"), | |
), | |
), | |
this | |
); | |
if ( | |
this.options.properties.authenticationMethod && | |
this.options.authPacket && | |
typeof this.options.authPacket == "object" | |
) { | |
var ct = xtend$2( | |
{ cmd: "auth", reasonCode: 0 }, | |
this.options.authPacket, | |
); | |
sendPacket(this, ct); | |
} | |
} | |
this.stream.setMaxListeners(1e3), | |
clearTimeout(this.connackTimer), | |
(this.connackTimer = setTimeout(function () { | |
debug$2("!!connectTimeout hit!! Calling _cleanUp with force `true`"), | |
o._cleanUp(!0); | |
}, this.options.connectTimeout)); | |
}; | |
MqttClient$1.prototype._handlePacket = function (s, o) { | |
var _ = this.options; | |
if ( | |
_.protocolVersion === 5 && | |
_.properties && | |
_.properties.maximumPacketSize && | |
_.properties.maximumPacketSize < s.length | |
) | |
return ( | |
this.emit("error", new Error("exceeding packets size " + s.cmd)), | |
this.end({ | |
reasonCode: 149, | |
properties: { reasonString: "Maximum packet size was exceeded" }, | |
}), | |
this | |
); | |
switch ( | |
(debug$2("_handlePacket :: emitting packetreceive"), | |
this.emit("packetreceive", s), | |
s.cmd) | |
) { | |
case "publish": | |
this._handlePublish(s, o); | |
break; | |
case "puback": | |
case "pubrec": | |
case "pubcomp": | |
case "suback": | |
case "unsuback": | |
this._handleAck(s), o(); | |
break; | |
case "pubrel": | |
this._handlePubrel(s, o); | |
break; | |
case "connack": | |
this._handleConnack(s), o(); | |
break; | |
case "pingresp": | |
this._handlePingresp(s), o(); | |
break; | |
case "disconnect": | |
this._handleDisconnect(s), o(); | |
break; | |
} | |
}; | |
MqttClient$1.prototype._checkDisconnecting = function (s) { | |
return ( | |
this.disconnecting && | |
(s | |
? s(new Error("client disconnecting")) | |
: this.emit("error", new Error("client disconnecting"))), | |
this.disconnecting | |
); | |
}; | |
MqttClient$1.prototype.publish = function (s, o, _, _e) { | |
debug$2("publish :: message `%s` to topic `%s`", o, s); | |
var et, | |
tt = this.options; | |
typeof _ == "function" && ((_e = _), (_ = null)); | |
var rt = { qos: 0, retain: !1, dup: !1 }; | |
if (((_ = xtend$2(rt, _)), this._checkDisconnecting(_e))) return this; | |
switch ( | |
((et = { | |
cmd: "publish", | |
topic: s, | |
payload: o, | |
qos: _.qos, | |
retain: _.retain, | |
messageId: this._nextId(), | |
dup: _.dup, | |
}), | |
tt.protocolVersion === 5 && | |
((et.properties = _.properties), | |
((!tt.properties && et.properties && et.properties.topicAlias) || | |
(_.properties && | |
tt.properties && | |
((_.properties.topicAlias && | |
tt.properties.topicAliasMaximum && | |
_.properties.topicAlias > tt.properties.topicAliasMaximum) || | |
(!tt.properties.topicAliasMaximum && | |
_.properties.topicAlias)))) && | |
delete et.properties.topicAlias), | |
debug$2("publish :: qos", _.qos), | |
_.qos) | |
) { | |
case 1: | |
case 2: | |
(this.outgoing[et.messageId] = { volatile: !1, cb: _e || nop }), | |
this._storeProcessing | |
? (debug$2("_storeProcessing enabled"), | |
(this._packetIdsDuringStoreProcessing[et.messageId] = !1), | |
this._storePacket(et, void 0, _.cbStorePut)) | |
: (debug$2("MqttClient:publish: packet cmd: %s", et.cmd), | |
this._sendPacket(et, void 0, _.cbStorePut)); | |
break; | |
default: | |
this._storeProcessing | |
? (debug$2("_storeProcessing enabled"), | |
this._storePacket(et, _e, _.cbStorePut)) | |
: (debug$2("MqttClient:publish: packet cmd: %s", et.cmd), | |
this._sendPacket(et, _e, _.cbStorePut)); | |
break; | |
} | |
return this; | |
}; | |
MqttClient$1.prototype.subscribe = function () { | |
for ( | |
var s, o = new Array(arguments.length), _ = 0; | |
_ < arguments.length; | |
_++ | |
) | |
o[_] = arguments[_]; | |
var _e = [], | |
et = o.shift(), | |
tt = et.resubscribe, | |
rt = o.pop() || nop, | |
it = o.pop(), | |
ot, | |
ct = this, | |
at = this.options.protocolVersion; | |
if ( | |
(delete et.resubscribe, | |
typeof et == "string" && (et = [et]), | |
typeof rt != "function" && ((it = rt), (rt = nop)), | |
(ot = validations.validateTopics(et)), | |
ot !== null) | |
) | |
return setImmediate$1(rt, new Error("Invalid topic " + ot)), this; | |
if (this._checkDisconnecting(rt)) | |
return debug$2("subscribe: discconecting true"), this; | |
var ht = { qos: 0 }; | |
if ( | |
(at === 5 && ((ht.nl = !1), (ht.rap = !1), (ht.rh = 0)), | |
(it = xtend$2(ht, it)), | |
Array.isArray(et) | |
? et.forEach(function (vt) { | |
if ( | |
(debug$2("subscribe: array topic %s", vt), | |
!ct._resubscribeTopics.hasOwnProperty(vt) || | |
ct._resubscribeTopics[vt].qos < it.qos || | |
tt) | |
) { | |
var xt = { topic: vt, qos: it.qos }; | |
at === 5 && | |
((xt.nl = it.nl), | |
(xt.rap = it.rap), | |
(xt.rh = it.rh), | |
(xt.properties = it.properties)), | |
debug$2( | |
"subscribe: pushing topic `%s` and qos `%s` to subs list", | |
xt.topic, | |
xt.qos, | |
), | |
_e.push(xt); | |
} | |
}) | |
: Object.keys(et).forEach(function (vt) { | |
if ( | |
(debug$2("subscribe: object topic %s", vt), | |
!ct._resubscribeTopics.hasOwnProperty(vt) || | |
ct._resubscribeTopics[vt].qos < et[vt].qos || | |
tt) | |
) { | |
var xt = { topic: vt, qos: et[vt].qos }; | |
at === 5 && | |
((xt.nl = et[vt].nl), | |
(xt.rap = et[vt].rap), | |
(xt.rh = et[vt].rh), | |
(xt.properties = it.properties)), | |
debug$2("subscribe: pushing `%s` to subs list", xt), | |
_e.push(xt); | |
} | |
}), | |
(s = { | |
cmd: "subscribe", | |
subscriptions: _e, | |
qos: 1, | |
retain: !1, | |
dup: !1, | |
messageId: this._nextId(), | |
}), | |
it.properties && (s.properties = it.properties), | |
!_e.length) | |
) { | |
rt(null, []); | |
return; | |
} | |
if (this.options.resubscribe) { | |
debug$2("subscribe :: resubscribe true"); | |
var mt = []; | |
_e.forEach(function (vt) { | |
if (ct.options.reconnectPeriod > 0) { | |
var xt = { qos: vt.qos }; | |
at === 5 && | |
((xt.nl = vt.nl || !1), | |
(xt.rap = vt.rap || !1), | |
(xt.rh = vt.rh || 0), | |
(xt.properties = vt.properties)), | |
(ct._resubscribeTopics[vt.topic] = xt), | |
mt.push(vt.topic); | |
} | |
}), | |
(ct.messageIdToTopic[s.messageId] = mt); | |
} | |
return ( | |
(this.outgoing[s.messageId] = { | |
volatile: !0, | |
cb: function (vt, xt) { | |
if (!vt) | |
for (var St = xt.granted, $t = 0; $t < St.length; $t += 1) | |
_e[$t].qos = St[$t]; | |
rt(vt, _e); | |
}, | |
}), | |
debug$2("subscribe :: call _sendPacket"), | |
this._sendPacket(s), | |
this | |
); | |
}; | |
MqttClient$1.prototype.unsubscribe = function () { | |
for ( | |
var s = { cmd: "unsubscribe", qos: 1, messageId: this._nextId() }, | |
o = this, | |
_ = new Array(arguments.length), | |
_e = 0; | |
_e < arguments.length; | |
_e++ | |
) | |
_[_e] = arguments[_e]; | |
var et = _.shift(), | |
tt = _.pop() || nop, | |
rt = _.pop(); | |
return ( | |
typeof et == "string" && (et = [et]), | |
typeof tt != "function" && ((rt = tt), (tt = nop)), | |
this._checkDisconnecting(tt) | |
? this | |
: (typeof et == "string" | |
? (s.unsubscriptions = [et]) | |
: Array.isArray(et) && (s.unsubscriptions = et), | |
this.options.resubscribe && | |
s.unsubscriptions.forEach(function (it) { | |
delete o._resubscribeTopics[it]; | |
}), | |
typeof rt == "object" && | |
rt.properties && | |
(s.properties = rt.properties), | |
(this.outgoing[s.messageId] = { volatile: !0, cb: tt }), | |
debug$2("unsubscribe: call _sendPacket"), | |
this._sendPacket(s), | |
this) | |
); | |
}; | |
MqttClient$1.prototype.end = function (s, o, _) { | |
var _e = this; | |
debug$2("end :: (%s)", this.options.clientId), | |
(s == null || typeof s != "boolean") && | |
((_ = o || nop), | |
(o = s), | |
(s = !1), | |
typeof o != "object" && | |
((_ = o), (o = null), typeof _ != "function" && (_ = nop))), | |
typeof o != "object" && ((_ = o), (o = null)), | |
debug$2("end :: cb? %s", !!_), | |
(_ = _ || nop); | |
function et() { | |
debug$2("end :: closeStores: closing incoming and outgoing stores"), | |
(_e.disconnected = !0), | |
_e.incomingStore.close(function (rt) { | |
_e.outgoingStore.close(function (it) { | |
if ( | |
(debug$2("end :: closeStores: emitting end"), _e.emit("end"), _) | |
) { | |
let ot = rt || it; | |
debug$2("end :: closeStores: invoking callback with args"), _(ot); | |
} | |
}); | |
}), | |
_e._deferredReconnect && _e._deferredReconnect(); | |
} | |
function tt() { | |
debug$2( | |
"end :: (%s) :: finish :: calling _cleanUp with force %s", | |
_e.options.clientId, | |
s, | |
), | |
_e._cleanUp( | |
s, | |
() => { | |
debug$2("end :: finish :: calling process.nextTick on closeStores"), | |
nextTick(et.bind(_e)); | |
}, | |
o, | |
); | |
} | |
return this.disconnecting | |
? (_(), this) | |
: (this._clearReconnect(), | |
(this.disconnecting = !0), | |
!s && Object.keys(this.outgoing).length > 0 | |
? (debug$2( | |
"end :: (%s) :: calling finish in 10ms once outgoing is empty", | |
_e.options.clientId, | |
), | |
this.once("outgoingEmpty", setTimeout.bind(null, tt, 10))) | |
: (debug$2( | |
"end :: (%s) :: immediately calling finish", | |
_e.options.clientId, | |
), | |
tt()), | |
this); | |
}; | |
MqttClient$1.prototype.removeOutgoingMessage = function (s) { | |
var o = this.outgoing[s] ? this.outgoing[s].cb : null; | |
return ( | |
delete this.outgoing[s], | |
this.outgoingStore.del({ messageId: s }, function () { | |
o(new Error("Message removed")); | |
}), | |
this | |
); | |
}; | |
MqttClient$1.prototype.reconnect = function (s) { | |
debug$2("client reconnect"); | |
var o = this, | |
_ = function () { | |
s | |
? ((o.options.incomingStore = s.incomingStore), | |
(o.options.outgoingStore = s.outgoingStore)) | |
: ((o.options.incomingStore = null), | |
(o.options.outgoingStore = null)), | |
(o.incomingStore = o.options.incomingStore || new Store$1()), | |
(o.outgoingStore = o.options.outgoingStore || new Store$1()), | |
(o.disconnecting = !1), | |
(o.disconnected = !1), | |
(o._deferredReconnect = null), | |
o._reconnect(); | |
}; | |
return ( | |
this.disconnecting && !this.disconnected | |
? (this._deferredReconnect = _) | |
: _(), | |
this | |
); | |
}; | |
MqttClient$1.prototype._reconnect = function () { | |
debug$2("_reconnect: emitting reconnect to client"), | |
this.emit("reconnect"), | |
this.connected | |
? (this.end(() => { | |
this._setupStream(); | |
}), | |
debug$2("client already connected. disconnecting first.")) | |
: (debug$2("_reconnect: calling _setupStream"), this._setupStream()); | |
}; | |
MqttClient$1.prototype._setupReconnect = function () { | |
var s = this; | |
!s.disconnecting && !s.reconnectTimer && s.options.reconnectPeriod > 0 | |
? (this.reconnecting || | |
(debug$2("_setupReconnect :: emit `offline` state"), | |
this.emit("offline"), | |
debug$2("_setupReconnect :: set `reconnecting` to `true`"), | |
(this.reconnecting = !0)), | |
debug$2( | |
"_setupReconnect :: setting reconnectTimer for %d ms", | |
s.options.reconnectPeriod, | |
), | |
(s.reconnectTimer = setInterval(function () { | |
debug$2("reconnectTimer :: reconnect triggered!"), s._reconnect(); | |
}, s.options.reconnectPeriod))) | |
: debug$2("_setupReconnect :: doing nothing..."); | |
}; | |
MqttClient$1.prototype._clearReconnect = function () { | |
debug$2("_clearReconnect : clearing reconnect timer"), | |
this.reconnectTimer && | |
(clearInterval(this.reconnectTimer), (this.reconnectTimer = null)); | |
}; | |
MqttClient$1.prototype._cleanUp = function (s, o) { | |
var _ = arguments[2]; | |
if ( | |
(o && | |
(debug$2("_cleanUp :: done callback provided for on stream close"), | |
this.stream.on("close", o)), | |
debug$2("_cleanUp :: forced? %s", s), | |
s) | |
) | |
this.options.reconnectPeriod === 0 && | |
this.options.clean && | |
flush(this.outgoing), | |
debug$2("_cleanUp :: (%s) :: destroying stream", this.options.clientId), | |
this.stream.destroy(); | |
else { | |
var _e = xtend$2({ cmd: "disconnect" }, _); | |
debug$2( | |
"_cleanUp :: (%s) :: call _sendPacket with disconnect packet", | |
this.options.clientId, | |
), | |
this._sendPacket( | |
_e, | |
setImmediate$1.bind(null, this.stream.end.bind(this.stream)), | |
); | |
} | |
this.disconnecting || | |
(debug$2( | |
"_cleanUp :: client not disconnecting. Clearing and resetting reconnect.", | |
), | |
this._clearReconnect(), | |
this._setupReconnect()), | |
this.pingTimer !== null && | |
(debug$2("_cleanUp :: clearing pingTimer"), | |
this.pingTimer.clear(), | |
(this.pingTimer = null)), | |
o && | |
!this.connected && | |
(debug$2( | |
"_cleanUp :: (%s) :: removing stream `done` callback `close` listener", | |
this.options.clientId, | |
), | |
this.stream.removeListener("close", o), | |
o()); | |
}; | |
MqttClient$1.prototype._sendPacket = function (s, o, _) { | |
if ( | |
(debug$2("_sendPacket :: (%s) :: start", this.options.clientId), | |
(_ = _ || nop), | |
!this.connected) | |
) { | |
debug$2("_sendPacket :: client not connected. Storing packet offline."), | |
this._storePacket(s, o, _); | |
return; | |
} | |
switch ((this._shiftPingInterval(), s.cmd)) { | |
case "publish": | |
break; | |
case "pubrel": | |
storeAndSend(this, s, o, _); | |
return; | |
default: | |
sendPacket(this, s, o); | |
return; | |
} | |
switch (s.qos) { | |
case 2: | |
case 1: | |
storeAndSend(this, s, o, _); | |
break; | |
case 0: | |
default: | |
sendPacket(this, s, o); | |
break; | |
} | |
debug$2("_sendPacket :: (%s) :: end", this.options.clientId); | |
}; | |
MqttClient$1.prototype._storePacket = function (s, o, _) { | |
debug$2("_storePacket :: packet: %o", s), | |
debug$2("_storePacket :: cb? %s", !!o), | |
(_ = _ || nop), | |
((s.qos || 0) === 0 && this.queueQoSZero) || s.cmd !== "publish" | |
? this.queue.push({ packet: s, cb: o }) | |
: s.qos > 0 | |
? ((o = this.outgoing[s.messageId] | |
? this.outgoing[s.messageId].cb | |
: null), | |
this.outgoingStore.put(s, function (_e) { | |
if (_e) return o && o(_e); | |
_(); | |
})) | |
: o && o(new Error("No connection to broker")); | |
}; | |
MqttClient$1.prototype._setupPingTimer = function () { | |
debug$2( | |
"_setupPingTimer :: keepalive %d (seconds)", | |
this.options.keepalive, | |
); | |
var s = this; | |
!this.pingTimer && | |
this.options.keepalive && | |
((this.pingResp = !0), | |
(this.pingTimer = reInterval(function () { | |
s._checkPing(); | |
}, this.options.keepalive * 1e3))); | |
}; | |
MqttClient$1.prototype._shiftPingInterval = function () { | |
this.pingTimer && | |
this.options.keepalive && | |
this.options.reschedulePings && | |
this.pingTimer.reschedule(this.options.keepalive * 1e3); | |
}; | |
MqttClient$1.prototype._checkPing = function () { | |
debug$2("_checkPing :: checking ping..."), | |
this.pingResp | |
? (debug$2( | |
"_checkPing :: ping response received. Clearing flag and sending `pingreq`", | |
), | |
(this.pingResp = !1), | |
this._sendPacket({ cmd: "pingreq" })) | |
: (debug$2("_checkPing :: calling _cleanUp with force true"), | |
this._cleanUp(!0)); | |
}; | |
MqttClient$1.prototype._handlePingresp = function () { | |
this.pingResp = !0; | |
}; | |
MqttClient$1.prototype._handleConnack = function (s) { | |
debug$2("_handleConnack"); | |
var o = this.options, | |
_ = o.protocolVersion, | |
_e = _ === 5 ? s.reasonCode : s.returnCode; | |
if ( | |
(clearTimeout(this.connackTimer), | |
s.properties && | |
(s.properties.topicAliasMaximum && | |
(o.properties || (o.properties = {}), | |
(o.properties.topicAliasMaximum = s.properties.topicAliasMaximum)), | |
s.properties.serverKeepAlive && | |
o.keepalive && | |
((o.keepalive = s.properties.serverKeepAlive), | |
this._shiftPingInterval()), | |
s.properties.maximumPacketSize && | |
(o.properties || (o.properties = {}), | |
(o.properties.maximumPacketSize = s.properties.maximumPacketSize))), | |
_e === 0) | |
) | |
(this.reconnecting = !1), this._onConnect(s); | |
else if (_e > 0) { | |
var et = new Error("Connection refused: " + errors[_e]); | |
(et.code = _e), this.emit("error", et); | |
} | |
}; | |
MqttClient$1.prototype._handlePublish = function (s, o) { | |
debug$2("_handlePublish: packet %o", s), (o = typeof o < "u" ? o : nop); | |
var _ = s.topic.toString(), | |
_e = s.payload, | |
et = s.qos, | |
tt = s.messageId, | |
rt = this, | |
it = this.options, | |
ot = [0, 16, 128, 131, 135, 144, 145, 151, 153]; | |
switch ((debug$2("_handlePublish: qos %d", et), et)) { | |
case 2: { | |
it.customHandleAcks(_, _e, s, function (ct, at) { | |
if ((ct instanceof Error || ((at = ct), (ct = null)), ct)) | |
return rt.emit("error", ct); | |
if (ot.indexOf(at) === -1) | |
return rt.emit("error", new Error("Wrong reason code for pubrec")); | |
at | |
? rt._sendPacket( | |
{ cmd: "pubrec", messageId: tt, reasonCode: at }, | |
o, | |
) | |
: rt.incomingStore.put(s, function () { | |
rt._sendPacket({ cmd: "pubrec", messageId: tt }, o); | |
}); | |
}); | |
break; | |
} | |
case 1: { | |
it.customHandleAcks(_, _e, s, function (ct, at) { | |
if ((ct instanceof Error || ((at = ct), (ct = null)), ct)) | |
return rt.emit("error", ct); | |
if (ot.indexOf(at) === -1) | |
return rt.emit("error", new Error("Wrong reason code for puback")); | |
at || rt.emit("message", _, _e, s), | |
rt.handleMessage(s, function (ht) { | |
if (ht) return o && o(ht); | |
rt._sendPacket( | |
{ cmd: "puback", messageId: tt, reasonCode: at }, | |
o, | |
); | |
}); | |
}); | |
break; | |
} | |
case 0: | |
this.emit("message", _, _e, s), this.handleMessage(s, o); | |
break; | |
default: | |
debug$2("_handlePublish: unknown QoS. Doing nothing."); | |
break; | |
} | |
}; | |
MqttClient$1.prototype.handleMessage = function (s, o) { | |
o(); | |
}; | |
MqttClient$1.prototype._handleAck = function (s) { | |
var o = s.messageId, | |
_ = s.cmd, | |
_e = null, | |
et = this.outgoing[o] ? this.outgoing[o].cb : null, | |
tt = this, | |
rt; | |
if (!et) { | |
debug$2("_handleAck :: Server sent an ack in error. Ignoring."); | |
return; | |
} | |
switch ((debug$2("_handleAck :: packet type", _), _)) { | |
case "pubcomp": | |
case "puback": | |
var it = s.reasonCode; | |
it && | |
it > 0 && | |
it !== 16 && | |
((rt = new Error("Publish error: " + errors[it])), | |
(rt.code = it), | |
et(rt, s)), | |
delete this.outgoing[o], | |
this.outgoingStore.del(s, et); | |
break; | |
case "pubrec": | |
_e = { cmd: "pubrel", qos: 2, messageId: o }; | |
var ot = s.reasonCode; | |
ot && ot > 0 && ot !== 16 | |
? ((rt = new Error("Publish error: " + errors[ot])), | |
(rt.code = ot), | |
et(rt, s)) | |
: this._sendPacket(_e); | |
break; | |
case "suback": | |
delete this.outgoing[o]; | |
for (var ct = 0; ct < s.granted.length; ct++) | |
if (s.granted[ct] & 128) { | |
var at = this.messageIdToTopic[o]; | |
at && | |
at.forEach(function (ht) { | |
delete tt._resubscribeTopics[ht]; | |
}); | |
} | |
et(null, s); | |
break; | |
case "unsuback": | |
delete this.outgoing[o], et(null); | |
break; | |
default: | |
tt.emit("error", new Error("unrecognized packet type")); | |
} | |
this.disconnecting && | |
Object.keys(this.outgoing).length === 0 && | |
this.emit("outgoingEmpty"); | |
}; | |
MqttClient$1.prototype._handlePubrel = function (s, o) { | |
debug$2("handling pubrel packet"), (o = typeof o < "u" ? o : nop); | |
var _ = s.messageId, | |
_e = this, | |
et = { cmd: "pubcomp", messageId: _ }; | |
_e.incomingStore.get(s, function (tt, rt) { | |
tt | |
? _e._sendPacket(et, o) | |
: (_e.emit("message", rt.topic, rt.payload, rt), | |
_e.handleMessage(rt, function (it) { | |
if (it) return o(it); | |
_e.incomingStore.del(rt, nop), _e._sendPacket(et, o); | |
})); | |
}); | |
}; | |
MqttClient$1.prototype._handleDisconnect = function (s) { | |
this.emit("disconnect", s); | |
}; | |
MqttClient$1.prototype._nextId = function () { | |
var s = this.nextId++; | |
return this.nextId === 65536 && (this.nextId = 1), s; | |
}; | |
MqttClient$1.prototype.getLastMessageId = function () { | |
return this.nextId === 1 ? 65535 : this.nextId - 1; | |
}; | |
MqttClient$1.prototype._resubscribe = function (s) { | |
debug$2("_resubscribe"); | |
var o = Object.keys(this._resubscribeTopics); | |
if ( | |
!this._firstConnection && | |
(this.options.clean || | |
(this.options.protocolVersion === 5 && !s.sessionPresent)) && | |
o.length > 0 | |
) | |
if (this.options.resubscribe) | |
if (this.options.protocolVersion === 5) { | |
debug$2("_resubscribe: protocolVersion 5"); | |
for (var _ = 0; _ < o.length; _++) { | |
var _e = {}; | |
(_e[o[_]] = this._resubscribeTopics[o[_]]), | |
(_e.resubscribe = !0), | |
this.subscribe(_e, { properties: _e[o[_]].properties }); | |
} | |
} else | |
(this._resubscribeTopics.resubscribe = !0), | |
this.subscribe(this._resubscribeTopics); | |
else this._resubscribeTopics = {}; | |
this._firstConnection = !1; | |
}; | |
MqttClient$1.prototype._onConnect = function (s) { | |
if (this.disconnected) { | |
this.emit("connect", s); | |
return; | |
} | |
var o = this; | |
this._setupPingTimer(), this._resubscribe(s), (this.connected = !0); | |
function _() { | |
var _e = o.outgoingStore.createStream(); | |
function et() { | |
(o._storeProcessing = !1), (o._packetIdsDuringStoreProcessing = {}); | |
} | |
o.once("close", tt), | |
_e.on("error", function (it) { | |
et(), o.removeListener("close", tt), o.emit("error", it); | |
}); | |
function tt() { | |
_e.destroy(), (_e = null), et(); | |
} | |
function rt() { | |
if (_e) { | |
o._storeProcessing = !0; | |
var it = _e.read(1), | |
ot; | |
if (!it) { | |
_e.once("readable", rt); | |
return; | |
} | |
if (o._packetIdsDuringStoreProcessing[it.messageId]) { | |
rt(); | |
return; | |
} | |
!o.disconnecting && !o.reconnectTimer | |
? ((ot = o.outgoing[it.messageId] | |
? o.outgoing[it.messageId].cb | |
: null), | |
(o.outgoing[it.messageId] = { | |
volatile: !1, | |
cb: function (ct, at) { | |
ot && ot(ct, at), rt(); | |
}, | |
}), | |
(o._packetIdsDuringStoreProcessing[it.messageId] = !0), | |
o._sendPacket(it)) | |
: _e.destroy && _e.destroy(); | |
} | |
} | |
_e.on("end", function () { | |
var it = !0; | |
for (var ot in o._packetIdsDuringStoreProcessing) | |
if (!o._packetIdsDuringStoreProcessing[ot]) { | |
it = !1; | |
break; | |
} | |
it ? (et(), o.removeListener("close", tt), o.emit("connect", s)) : _(); | |
}), | |
rt(); | |
} | |
_(); | |
}; | |
var client = MqttClient$1, | |
punycode$1 = { exports: {} }; | |
/*! https://mths.be/punycode v1.4.1 by @mathias */ punycode$1.exports; | |
(function (s, o) { | |
(function (_) { | |
var _e = o && !o.nodeType && o, | |
et = s && !s.nodeType && s, | |
tt = typeof commonjsGlobal$3 == "object" && commonjsGlobal$3; | |
(tt.global === tt || tt.window === tt || tt.self === tt) && (_ = tt); | |
var rt, | |
it = 2147483647, | |
ot = 36, | |
ct = 1, | |
at = 26, | |
ht = 38, | |
mt = 700, | |
vt = 72, | |
xt = 128, | |
St = "-", | |
$t = /^xn--/, | |
Et = /[^\x20-\x7E]/, | |
_t = /[\x2E\u3002\uFF0E\uFF61]/g, | |
Rt = { | |
overflow: "Overflow: input needs wider integers to process", | |
"not-basic": "Illegal input >= 0x80 (not a basic code point)", | |
"invalid-input": "Invalid input", | |
}, | |
Mt = ot - ct, | |
It = Math.floor, | |
Xt = String.fromCharCode, | |
Jt; | |
function Ht(st) { | |
throw new RangeError(Rt[st]); | |
} | |
function qt(st, pt) { | |
for (var kt = st.length, Qt = []; kt--; ) Qt[kt] = pt(st[kt]); | |
return Qt; | |
} | |
function nr(st, pt) { | |
var kt = st.split("@"), | |
Qt = ""; | |
kt.length > 1 && ((Qt = kt[0] + "@"), (st = kt[1])), | |
(st = st.replace(_t, ".")); | |
var Dt = st.split("."), | |
Zt = qt(Dt, pt).join("."); | |
return Qt + Zt; | |
} | |
function wt(st) { | |
for (var pt = [], kt = 0, Qt = st.length, Dt, Zt; kt < Qt; ) | |
(Dt = st.charCodeAt(kt++)), | |
Dt >= 55296 && Dt <= 56319 && kt < Qt | |
? ((Zt = st.charCodeAt(kt++)), | |
(Zt & 64512) == 56320 | |
? pt.push(((Dt & 1023) << 10) + (Zt & 1023) + 65536) | |
: (pt.push(Dt), kt--)) | |
: pt.push(Dt); | |
return pt; | |
} | |
function nt(st) { | |
return qt(st, function (pt) { | |
var kt = ""; | |
return ( | |
pt > 65535 && | |
((pt -= 65536), | |
(kt += Xt(((pt >>> 10) & 1023) | 55296)), | |
(pt = 56320 | (pt & 1023))), | |
(kt += Xt(pt)), | |
kt | |
); | |
}).join(""); | |
} | |
function ut(st) { | |
return st - 48 < 10 | |
? st - 22 | |
: st - 65 < 26 | |
? st - 65 | |
: st - 97 < 26 | |
? st - 97 | |
: ot; | |
} | |
function ft(st, pt) { | |
return st + 22 + 75 * (st < 26) - ((pt != 0) << 5); | |
} | |
function dt(st, pt, kt) { | |
var Qt = 0; | |
for ( | |
st = kt ? It(st / mt) : st >> 1, st += It(st / pt); | |
st > (Mt * at) >> 1; | |
Qt += ot | |
) | |
st = It(st / Mt); | |
return It(Qt + ((Mt + 1) * st) / (st + ht)); | |
} | |
function Ot(st) { | |
var pt = [], | |
kt = st.length, | |
Qt, | |
Dt = 0, | |
Zt = xt, | |
Vt = vt, | |
Ct, | |
jt, | |
Wt, | |
er, | |
Gt, | |
Ft, | |
rr, | |
Sr, | |
fr; | |
for (Ct = st.lastIndexOf(St), Ct < 0 && (Ct = 0), jt = 0; jt < Ct; ++jt) | |
st.charCodeAt(jt) >= 128 && Ht("not-basic"), | |
pt.push(st.charCodeAt(jt)); | |
for (Wt = Ct > 0 ? Ct + 1 : 0; Wt < kt; ) { | |
for ( | |
er = Dt, Gt = 1, Ft = ot; | |
Wt >= kt && Ht("invalid-input"), | |
(rr = ut(st.charCodeAt(Wt++))), | |
(rr >= ot || rr > It((it - Dt) / Gt)) && Ht("overflow"), | |
(Dt += rr * Gt), | |
(Sr = Ft <= Vt ? ct : Ft >= Vt + at ? at : Ft - Vt), | |
!(rr < Sr); | |
Ft += ot | |
) | |
(fr = ot - Sr), Gt > It(it / fr) && Ht("overflow"), (Gt *= fr); | |
(Qt = pt.length + 1), | |
(Vt = dt(Dt - er, Qt, er == 0)), | |
It(Dt / Qt) > it - Zt && Ht("overflow"), | |
(Zt += It(Dt / Qt)), | |
(Dt %= Qt), | |
pt.splice(Dt++, 0, Zt); | |
} | |
return nt(pt); | |
} | |
function yt(st) { | |
var pt, | |
kt, | |
Qt, | |
Dt, | |
Zt, | |
Vt, | |
Ct, | |
jt, | |
Wt, | |
er, | |
Gt, | |
Ft = [], | |
rr, | |
Sr, | |
fr, | |
dr; | |
for ( | |
st = wt(st), rr = st.length, pt = xt, kt = 0, Zt = vt, Vt = 0; | |
Vt < rr; | |
++Vt | |
) | |
(Gt = st[Vt]), Gt < 128 && Ft.push(Xt(Gt)); | |
for (Qt = Dt = Ft.length, Dt && Ft.push(St); Qt < rr; ) { | |
for (Ct = it, Vt = 0; Vt < rr; ++Vt) | |
(Gt = st[Vt]), Gt >= pt && Gt < Ct && (Ct = Gt); | |
for ( | |
Sr = Qt + 1, | |
Ct - pt > It((it - kt) / Sr) && Ht("overflow"), | |
kt += (Ct - pt) * Sr, | |
pt = Ct, | |
Vt = 0; | |
Vt < rr; | |
++Vt | |
) | |
if ( | |
((Gt = st[Vt]), Gt < pt && ++kt > it && Ht("overflow"), Gt == pt) | |
) { | |
for ( | |
jt = kt, Wt = ot; | |
(er = Wt <= Zt ? ct : Wt >= Zt + at ? at : Wt - Zt), !(jt < er); | |
Wt += ot | |
) | |
(dr = jt - er), | |
(fr = ot - er), | |
Ft.push(Xt(ft(er + (dr % fr), 0))), | |
(jt = It(dr / fr)); | |
Ft.push(Xt(ft(jt, 0))), | |
(Zt = dt(kt, Sr, Qt == Dt)), | |
(kt = 0), | |
++Qt; | |
} | |
++kt, ++pt; | |
} | |
return Ft.join(""); | |
} | |
function bt(st) { | |
return nr(st, function (pt) { | |
return $t.test(pt) ? Ot(pt.slice(4).toLowerCase()) : pt; | |
}); | |
} | |
function gt(st) { | |
return nr(st, function (pt) { | |
return Et.test(pt) ? "xn--" + yt(pt) : pt; | |
}); | |
} | |
if ( | |
((rt = { | |
version: "1.4.1", | |
ucs2: { decode: wt, encode: nt }, | |
decode: Ot, | |
encode: yt, | |
toASCII: gt, | |
toUnicode: bt, | |
}), | |
_e && et) | |
) | |
if (s.exports == _e) et.exports = rt; | |
else for (Jt in rt) rt.hasOwnProperty(Jt) && (_e[Jt] = rt[Jt]); | |
else _.punycode = rt; | |
})(commonjsGlobal$3); | |
})(punycode$1, punycode$1.exports); | |
var punycodeExports = punycode$1.exports; | |
const require$$0$1 = getDefaultExportFromCjs$1(punycodeExports); | |
function hasOwnProperty$3(s, o) { | |
return Object.prototype.hasOwnProperty.call(s, o); | |
} | |
var decode$2 = function (s, o, _, _e) { | |
(o = o || "&"), (_ = _ || "="); | |
var et = {}; | |
if (typeof s != "string" || s.length === 0) return et; | |
var tt = /\+/g; | |
s = s.split(o); | |
var rt = 1e3; | |
_e && typeof _e.maxKeys == "number" && (rt = _e.maxKeys); | |
var it = s.length; | |
rt > 0 && it > rt && (it = rt); | |
for (var ot = 0; ot < it; ++ot) { | |
var ct = s[ot].replace(tt, "%20"), | |
at = ct.indexOf(_), | |
ht, | |
mt, | |
vt, | |
xt; | |
at >= 0 | |
? ((ht = ct.substr(0, at)), (mt = ct.substr(at + 1))) | |
: ((ht = ct), (mt = "")), | |
(vt = decodeURIComponent(ht)), | |
(xt = decodeURIComponent(mt)), | |
hasOwnProperty$3(et, vt) | |
? isArray$4(et[vt]) | |
? et[vt].push(xt) | |
: (et[vt] = [et[vt], xt]) | |
: (et[vt] = xt); | |
} | |
return et; | |
}, | |
isArray$4 = | |
Array.isArray || | |
function (s) { | |
return Object.prototype.toString.call(s) === "[object Array]"; | |
}, | |
stringifyPrimitive = function (s) { | |
switch (typeof s) { | |
case "string": | |
return s; | |
case "boolean": | |
return s ? "true" : "false"; | |
case "number": | |
return isFinite(s) ? s : ""; | |
default: | |
return ""; | |
} | |
}, | |
encode$2 = function (s, o, _, _e) { | |
return ( | |
(o = o || "&"), | |
(_ = _ || "="), | |
s === null && (s = void 0), | |
typeof s == "object" | |
? map$1(objectKeys(s), function (et) { | |
var tt = encodeURIComponent(stringifyPrimitive(et)) + _; | |
return isArray$3(s[et]) | |
? map$1(s[et], function (rt) { | |
return tt + encodeURIComponent(stringifyPrimitive(rt)); | |
}).join(o) | |
: tt + encodeURIComponent(stringifyPrimitive(s[et])); | |
}).join(o) | |
: _e | |
? encodeURIComponent(stringifyPrimitive(_e)) + | |
_ + | |
encodeURIComponent(stringifyPrimitive(s)) | |
: "" | |
); | |
}, | |
isArray$3 = | |
Array.isArray || | |
function (s) { | |
return Object.prototype.toString.call(s) === "[object Array]"; | |
}; | |
function map$1(s, o) { | |
if (s.map) return s.map(o); | |
for (var _ = [], _e = 0; _e < s.length; _e++) _.push(o(s[_e], _e)); | |
return _; | |
} | |
var objectKeys = | |
Object.keys || | |
function (s) { | |
var o = []; | |
for (var _ in s) | |
Object.prototype.hasOwnProperty.call(s, _) && o.push(_); | |
return o; | |
}, | |
stringify$4, | |
parse$8, | |
decode$1 = (parse$8 = decode$2), | |
encode$1 = (stringify$4 = encode$2); | |
function qsEscape(s) { | |
return encodeURIComponent(s); | |
} | |
function qsUnescape(s) { | |
return decodeURIComponent(s); | |
} | |
var api$2 = { | |
decode: decode$1, | |
encode: encode$1, | |
parse: parse$8, | |
stringify: stringify$4, | |
escape: qsEscape, | |
unescape: qsUnescape, | |
}, | |
util$1 = { | |
isString: function (s) { | |
return typeof s == "string"; | |
}, | |
isObject: function (s) { | |
return typeof s == "object" && s !== null; | |
}, | |
isNull: function (s) { | |
return s === null; | |
}, | |
isNullOrUndefined: function (s) { | |
return s == null; | |
}, | |
}, | |
punycode = require$$0$1, | |
util$2 = util$1, | |
parse$7 = urlParse, | |
resolve$1 = urlResolve, | |
resolveObject = urlResolveObject, | |
format$2 = urlFormat, | |
Url_1 = Url; | |
function Url() { | |
(this.protocol = null), | |
(this.slashes = null), | |
(this.auth = null), | |
(this.host = null), | |
(this.port = null), | |
(this.hostname = null), | |
(this.hash = null), | |
(this.search = null), | |
(this.query = null), | |
(this.pathname = null), | |
(this.path = null), | |
(this.href = null); | |
} | |
var protocolPattern = /^([a-z0-9.+-]+:)/i, | |
portPattern = /:[0-9]*$/, | |
simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, | |
delims = [ | |
"<", | |
">", | |
'"', | |
"`", | |
" ", | |
"\r", | |
` | |
`, | |
" ", | |
], | |
unwise = ["{", "}", "|", "\\", "^", "`"].concat(delims), | |
autoEscape = ["'"].concat(unwise), | |
nonHostChars = ["%", "/", "?", ";", "#"].concat(autoEscape), | |
hostEndingChars = ["/", "?", "#"], | |
hostnameMaxLen = 255, | |
hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, | |
hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, | |
unsafeProtocol = { javascript: !0, "javascript:": !0 }, | |
hostlessProtocol = { javascript: !0, "javascript:": !0 }, | |
slashedProtocol = { | |
http: !0, | |
https: !0, | |
ftp: !0, | |
gopher: !0, | |
file: !0, | |
"http:": !0, | |
"https:": !0, | |
"ftp:": !0, | |
"gopher:": !0, | |
"file:": !0, | |
}, | |
querystring = api$2; | |
function urlParse(s, o, _) { | |
if (s && util$2.isObject(s) && s instanceof Url) return s; | |
var _e = new Url(); | |
return _e.parse(s, o, _), _e; | |
} | |
Url.prototype.parse = function (s, o, _) { | |
if (!util$2.isString(s)) | |
throw new TypeError("Parameter 'url' must be a string, not " + typeof s); | |
var _e = s.indexOf("?"), | |
et = _e !== -1 && _e < s.indexOf("#") ? "?" : "#", | |
tt = s.split(et), | |
rt = /\\/g; | |
(tt[0] = tt[0].replace(rt, "/")), (s = tt.join(et)); | |
var it = s; | |
if (((it = it.trim()), !_ && s.split("#").length === 1)) { | |
var ot = simplePathPattern.exec(it); | |
if (ot) | |
return ( | |
(this.path = it), | |
(this.href = it), | |
(this.pathname = ot[1]), | |
ot[2] | |
? ((this.search = ot[2]), | |
o | |
? (this.query = querystring.parse(this.search.substr(1))) | |
: (this.query = this.search.substr(1))) | |
: o && ((this.search = ""), (this.query = {})), | |
this | |
); | |
} | |
var ct = protocolPattern.exec(it); | |
if (ct) { | |
ct = ct[0]; | |
var at = ct.toLowerCase(); | |
(this.protocol = at), (it = it.substr(ct.length)); | |
} | |
if (_ || ct || it.match(/^\/\/[^@\/]+@[^@\/]+/)) { | |
var ht = it.substr(0, 2) === "//"; | |
ht && | |
!(ct && hostlessProtocol[ct]) && | |
((it = it.substr(2)), (this.slashes = !0)); | |
} | |
if (!hostlessProtocol[ct] && (ht || (ct && !slashedProtocol[ct]))) { | |
for (var mt = -1, vt = 0; vt < hostEndingChars.length; vt++) { | |
var xt = it.indexOf(hostEndingChars[vt]); | |
xt !== -1 && (mt === -1 || xt < mt) && (mt = xt); | |
} | |
var St, $t; | |
mt === -1 ? ($t = it.lastIndexOf("@")) : ($t = it.lastIndexOf("@", mt)), | |
$t !== -1 && | |
((St = it.slice(0, $t)), | |
(it = it.slice($t + 1)), | |
(this.auth = decodeURIComponent(St))), | |
(mt = -1); | |
for (var vt = 0; vt < nonHostChars.length; vt++) { | |
var xt = it.indexOf(nonHostChars[vt]); | |
xt !== -1 && (mt === -1 || xt < mt) && (mt = xt); | |
} | |
mt === -1 && (mt = it.length), | |
(this.host = it.slice(0, mt)), | |
(it = it.slice(mt)), | |
this.parseHost(), | |
(this.hostname = this.hostname || ""); | |
var Et = | |
this.hostname[0] === "[" && | |
this.hostname[this.hostname.length - 1] === "]"; | |
if (!Et) | |
for ( | |
var _t = this.hostname.split(/\./), vt = 0, Rt = _t.length; | |
vt < Rt; | |
vt++ | |
) { | |
var Mt = _t[vt]; | |
if (Mt && !Mt.match(hostnamePartPattern)) { | |
for (var It = "", Xt = 0, Jt = Mt.length; Xt < Jt; Xt++) | |
Mt.charCodeAt(Xt) > 127 ? (It += "x") : (It += Mt[Xt]); | |
if (!It.match(hostnamePartPattern)) { | |
var Ht = _t.slice(0, vt), | |
qt = _t.slice(vt + 1), | |
nr = Mt.match(hostnamePartStart); | |
nr && (Ht.push(nr[1]), qt.unshift(nr[2])), | |
qt.length && (it = "/" + qt.join(".") + it), | |
(this.hostname = Ht.join(".")); | |
break; | |
} | |
} | |
} | |
this.hostname.length > hostnameMaxLen | |
? (this.hostname = "") | |
: (this.hostname = this.hostname.toLowerCase()), | |
Et || (this.hostname = punycode.toASCII(this.hostname)); | |
var wt = this.port ? ":" + this.port : "", | |
nt = this.hostname || ""; | |
(this.host = nt + wt), | |
(this.href += this.host), | |
Et && | |
((this.hostname = this.hostname.substr(1, this.hostname.length - 2)), | |
it[0] !== "/" && (it = "/" + it)); | |
} | |
if (!unsafeProtocol[at]) | |
for (var vt = 0, Rt = autoEscape.length; vt < Rt; vt++) { | |
var ut = autoEscape[vt]; | |
if (it.indexOf(ut) !== -1) { | |
var ft = encodeURIComponent(ut); | |
ft === ut && (ft = escape(ut)), (it = it.split(ut).join(ft)); | |
} | |
} | |
var dt = it.indexOf("#"); | |
dt !== -1 && ((this.hash = it.substr(dt)), (it = it.slice(0, dt))); | |
var Ot = it.indexOf("?"); | |
if ( | |
(Ot !== -1 | |
? ((this.search = it.substr(Ot)), | |
(this.query = it.substr(Ot + 1)), | |
o && (this.query = querystring.parse(this.query)), | |
(it = it.slice(0, Ot))) | |
: o && ((this.search = ""), (this.query = {})), | |
it && (this.pathname = it), | |
slashedProtocol[at] && | |
this.hostname && | |
!this.pathname && | |
(this.pathname = "/"), | |
this.pathname || this.search) | |
) { | |
var wt = this.pathname || "", | |
yt = this.search || ""; | |
this.path = wt + yt; | |
} | |
return (this.href = this.format()), this; | |
}; | |
function urlFormat(s) { | |
return ( | |
util$2.isString(s) && (s = urlParse(s)), | |
s instanceof Url ? s.format() : Url.prototype.format.call(s) | |
); | |
} | |
Url.prototype.format = function () { | |
var s = this.auth || ""; | |
s && | |
((s = encodeURIComponent(s)), (s = s.replace(/%3A/i, ":")), (s += "@")); | |
var o = this.protocol || "", | |
_ = this.pathname || "", | |
_e = this.hash || "", | |
et = !1, | |
tt = ""; | |
this.host | |
? (et = s + this.host) | |
: this.hostname && | |
((et = | |
s + | |
(this.hostname.indexOf(":") === -1 | |
? this.hostname | |
: "[" + this.hostname + "]")), | |
this.port && (et += ":" + this.port)), | |
this.query && | |
util$2.isObject(this.query) && | |
Object.keys(this.query).length && | |
(tt = querystring.stringify(this.query)); | |
var rt = this.search || (tt && "?" + tt) || ""; | |
return ( | |
o && o.substr(-1) !== ":" && (o += ":"), | |
this.slashes || ((!o || slashedProtocol[o]) && et !== !1) | |
? ((et = "//" + (et || "")), _ && _.charAt(0) !== "/" && (_ = "/" + _)) | |
: et || (et = ""), | |
_e && _e.charAt(0) !== "#" && (_e = "#" + _e), | |
rt && rt.charAt(0) !== "?" && (rt = "?" + rt), | |
(_ = _.replace(/[?#]/g, function (it) { | |
return encodeURIComponent(it); | |
})), | |
(rt = rt.replace("#", "%23")), | |
o + et + _ + rt + _e | |
); | |
}; | |
function urlResolve(s, o) { | |
return urlParse(s, !1, !0).resolve(o); | |
} | |
Url.prototype.resolve = function (s) { | |
return this.resolveObject(urlParse(s, !1, !0)).format(); | |
}; | |
function urlResolveObject(s, o) { | |
return s ? urlParse(s, !1, !0).resolveObject(o) : o; | |
} | |
Url.prototype.resolveObject = function (s) { | |
if (util$2.isString(s)) { | |
var o = new Url(); | |
o.parse(s, !1, !0), (s = o); | |
} | |
for ( | |
var _ = new Url(), _e = Object.keys(this), et = 0; | |
et < _e.length; | |
et++ | |
) { | |
var tt = _e[et]; | |
_[tt] = this[tt]; | |
} | |
if (((_.hash = s.hash), s.href === "")) return (_.href = _.format()), _; | |
if (s.slashes && !s.protocol) { | |
for (var rt = Object.keys(s), it = 0; it < rt.length; it++) { | |
var ot = rt[it]; | |
ot !== "protocol" && (_[ot] = s[ot]); | |
} | |
return ( | |
slashedProtocol[_.protocol] && | |
_.hostname && | |
!_.pathname && | |
(_.path = _.pathname = "/"), | |
(_.href = _.format()), | |
_ | |
); | |
} | |
if (s.protocol && s.protocol !== _.protocol) { | |
if (!slashedProtocol[s.protocol]) { | |
for (var ct = Object.keys(s), at = 0; at < ct.length; at++) { | |
var ht = ct[at]; | |
_[ht] = s[ht]; | |
} | |
return (_.href = _.format()), _; | |
} | |
if ( | |
((_.protocol = s.protocol), !s.host && !hostlessProtocol[s.protocol]) | |
) { | |
for ( | |
var Rt = (s.pathname || "").split("/"); | |
Rt.length && !(s.host = Rt.shift()); | |
); | |
s.host || (s.host = ""), | |
s.hostname || (s.hostname = ""), | |
Rt[0] !== "" && Rt.unshift(""), | |
Rt.length < 2 && Rt.unshift(""), | |
(_.pathname = Rt.join("/")); | |
} else _.pathname = s.pathname; | |
if ( | |
((_.search = s.search), | |
(_.query = s.query), | |
(_.host = s.host || ""), | |
(_.auth = s.auth), | |
(_.hostname = s.hostname || s.host), | |
(_.port = s.port), | |
_.pathname || _.search) | |
) { | |
var mt = _.pathname || "", | |
vt = _.search || ""; | |
_.path = mt + vt; | |
} | |
return (_.slashes = _.slashes || s.slashes), (_.href = _.format()), _; | |
} | |
var xt = _.pathname && _.pathname.charAt(0) === "/", | |
St = s.host || (s.pathname && s.pathname.charAt(0) === "/"), | |
$t = St || xt || (_.host && s.pathname), | |
Et = $t, | |
_t = (_.pathname && _.pathname.split("/")) || [], | |
Rt = (s.pathname && s.pathname.split("/")) || [], | |
Mt = _.protocol && !slashedProtocol[_.protocol]; | |
if ( | |
(Mt && | |
((_.hostname = ""), | |
(_.port = null), | |
_.host && (_t[0] === "" ? (_t[0] = _.host) : _t.unshift(_.host)), | |
(_.host = ""), | |
s.protocol && | |
((s.hostname = null), | |
(s.port = null), | |
s.host && (Rt[0] === "" ? (Rt[0] = s.host) : Rt.unshift(s.host)), | |
(s.host = null)), | |
($t = $t && (Rt[0] === "" || _t[0] === ""))), | |
St) | |
) | |
(_.host = s.host || s.host === "" ? s.host : _.host), | |
(_.hostname = | |
s.hostname || s.hostname === "" ? s.hostname : _.hostname), | |
(_.search = s.search), | |
(_.query = s.query), | |
(_t = Rt); | |
else if (Rt.length) | |
_t || (_t = []), | |
_t.pop(), | |
(_t = _t.concat(Rt)), | |
(_.search = s.search), | |
(_.query = s.query); | |
else if (!util$2.isNullOrUndefined(s.search)) { | |
if (Mt) { | |
_.hostname = _.host = _t.shift(); | |
var It = _.host && _.host.indexOf("@") > 0 ? _.host.split("@") : !1; | |
It && ((_.auth = It.shift()), (_.host = _.hostname = It.shift())); | |
} | |
return ( | |
(_.search = s.search), | |
(_.query = s.query), | |
(!util$2.isNull(_.pathname) || !util$2.isNull(_.search)) && | |
(_.path = | |
(_.pathname ? _.pathname : "") + (_.search ? _.search : "")), | |
(_.href = _.format()), | |
_ | |
); | |
} | |
if (!_t.length) | |
return ( | |
(_.pathname = null), | |
_.search ? (_.path = "/" + _.search) : (_.path = null), | |
(_.href = _.format()), | |
_ | |
); | |
for ( | |
var Xt = _t.slice(-1)[0], | |
Jt = | |
((_.host || s.host || _t.length > 1) && | |
(Xt === "." || Xt === "..")) || | |
Xt === "", | |
Ht = 0, | |
qt = _t.length; | |
qt >= 0; | |
qt-- | |
) | |
(Xt = _t[qt]), | |
Xt === "." | |
? _t.splice(qt, 1) | |
: Xt === ".." | |
? (_t.splice(qt, 1), Ht++) | |
: Ht && (_t.splice(qt, 1), Ht--); | |
if (!$t && !Et) for (; Ht--; Ht) _t.unshift(".."); | |
$t && _t[0] !== "" && (!_t[0] || _t[0].charAt(0) !== "/") && _t.unshift(""), | |
Jt && _t.join("/").substr(-1) !== "/" && _t.push(""); | |
var nr = _t[0] === "" || (_t[0] && _t[0].charAt(0) === "/"); | |
if (Mt) { | |
_.hostname = _.host = nr ? "" : _t.length ? _t.shift() : ""; | |
var It = _.host && _.host.indexOf("@") > 0 ? _.host.split("@") : !1; | |
It && ((_.auth = It.shift()), (_.host = _.hostname = It.shift())); | |
} | |
return ( | |
($t = $t || (_.host && _t.length)), | |
$t && !nr && _t.unshift(""), | |
_t.length | |
? (_.pathname = _t.join("/")) | |
: ((_.pathname = null), (_.path = null)), | |
(!util$2.isNull(_.pathname) || !util$2.isNull(_.search)) && | |
(_.path = (_.pathname ? _.pathname : "") + (_.search ? _.search : "")), | |
(_.auth = s.auth || _.auth), | |
(_.slashes = _.slashes || s.slashes), | |
(_.href = _.format()), | |
_ | |
); | |
}; | |
Url.prototype.parseHost = function () { | |
var s = this.host, | |
o = portPattern.exec(s); | |
o && | |
((o = o[0]), | |
o !== ":" && (this.port = o.substr(1)), | |
(s = s.substr(0, s.length - o.length))), | |
s && (this.hostname = s); | |
}; | |
function normalizeArray(s, o) { | |
for (var _ = 0, _e = s.length - 1; _e >= 0; _e--) { | |
var et = s[_e]; | |
et === "." | |
? s.splice(_e, 1) | |
: et === ".." | |
? (s.splice(_e, 1), _++) | |
: _ && (s.splice(_e, 1), _--); | |
} | |
if (o) for (; _--; _) s.unshift(".."); | |
return s; | |
} | |
function resolve() { | |
for (var s = "", o = !1, _ = arguments.length - 1; _ >= -1 && !o; _--) { | |
var _e = _ >= 0 ? arguments[_] : "/"; | |
if (typeof _e != "string") | |
throw new TypeError("Arguments to path.resolve must be strings"); | |
if (!_e) continue; | |
(s = _e + "/" + s), (o = _e.charAt(0) === "/"); | |
} | |
return ( | |
(s = normalizeArray( | |
filter$1(s.split("/"), function (et) { | |
return !!et; | |
}), | |
!o, | |
).join("/")), | |
(o ? "/" : "") + s || "." | |
); | |
} | |
function filter$1(s, o) { | |
if (s.filter) return s.filter(o); | |
for (var _ = [], _e = 0; _e < s.length; _e++) | |
o(s[_e], _e, s) && _.push(s[_e]); | |
return _; | |
} | |
var _globalThis = (function (s) { | |
function o() { | |
var _e = this || self; | |
return delete s.prototype.__magic__, _e; | |
} | |
if (typeof globalThis == "object") return globalThis; | |
if (this) return o(); | |
s.defineProperty(s.prototype, "__magic__", { configurable: !0, get: o }); | |
var _ = __magic__; | |
return _; | |
})(Object), | |
formatImport = format$2, | |
parseImport = parse$7, | |
resolveImport = resolve$1, | |
UrlImport = Url_1, | |
URL$1 = _globalThis.URL, | |
URLSearchParams$1 = _globalThis.URLSearchParams, | |
percentRegEx = /%/g, | |
backslashRegEx = /\\/g, | |
newlineRegEx = /\n/g, | |
carriageReturnRegEx = /\r/g, | |
tabRegEx = /\t/g, | |
CHAR_FORWARD_SLASH = 47; | |
function isURLInstance(s) { | |
var o = s ?? null; | |
return !!(o !== null && o != null && o.href && o != null && o.origin); | |
} | |
function getPathFromURLPosix(s) { | |
if (s.hostname !== "") | |
throw new TypeError( | |
'File URL host must be "localhost" or empty on browser', | |
); | |
for (var o = s.pathname, _ = 0; _ < o.length; _++) | |
if (o[_] === "%") { | |
var _e = o.codePointAt(_ + 2) | 32; | |
if (o[_ + 1] === "2" && _e === 102) | |
throw new TypeError( | |
"File URL path must not include encoded / characters", | |
); | |
} | |
return decodeURIComponent(o); | |
} | |
function encodePathChars(s) { | |
return ( | |
s.includes("%") && (s = s.replace(percentRegEx, "%25")), | |
s.includes("\\") && (s = s.replace(backslashRegEx, "%5C")), | |
s.includes(` | |
`) && (s = s.replace(newlineRegEx, "%0A")), | |
s.includes("\r") && (s = s.replace(carriageReturnRegEx, "%0D")), | |
s.includes(" ") && (s = s.replace(tabRegEx, "%09")), | |
s | |
); | |
} | |
var domainToASCII = function (o) { | |
if (typeof o > "u") | |
throw new TypeError('The "domain" argument must be specified'); | |
return new URL$1("http://" + o).hostname; | |
}, | |
domainToUnicode = function (o) { | |
if (typeof o > "u") | |
throw new TypeError('The "domain" argument must be specified'); | |
return new URL$1("http://" + o).hostname; | |
}, | |
pathToFileURL = function (o) { | |
var _ = new URL$1("file://"), | |
_e = resolve(o), | |
et = o.charCodeAt(o.length - 1); | |
return ( | |
et === CHAR_FORWARD_SLASH && _e[_e.length - 1] !== "/" && (_e += "/"), | |
(_.pathname = encodePathChars(_e)), | |
_ | |
); | |
}, | |
fileURLToPath = function (o) { | |
if (!isURLInstance(o) && typeof o != "string") | |
throw new TypeError( | |
'The "path" argument must be of type string or an instance of URL. Received type ' + | |
typeof o + | |
" (" + | |
o + | |
")", | |
); | |
var _ = new URL$1(o); | |
if (_.protocol !== "file:") | |
throw new TypeError("The URL must be of scheme file"); | |
return getPathFromURLPosix(_); | |
}, | |
formatImportWithOverloads = function (o, _) { | |
var _e, et, tt; | |
if ((_ === void 0 && (_ = {}), !(o instanceof URL$1))) | |
return formatImport(o); | |
if (typeof _ != "object" || _ === null) | |
throw new TypeError('The "options" argument must be of type object.'); | |
var rt = (_e = _.auth) != null ? _e : !0, | |
it = (et = _.fragment) != null ? et : !0, | |
ot = (tt = _.search) != null ? tt : !0, | |
ct = new URL$1(o.toString()); | |
return ( | |
rt || ((ct.username = ""), (ct.password = "")), | |
it || (ct.hash = ""), | |
ot || (ct.search = ""), | |
ct.toString() | |
); | |
}, | |
api$1 = { | |
format: formatImportWithOverloads, | |
parse: parseImport, | |
resolve: resolveImport, | |
resolveObject, | |
Url: UrlImport, | |
URL: URL$1, | |
URLSearchParams: URLSearchParams$1, | |
domainToASCII, | |
domainToUnicode, | |
pathToFileURL, | |
fileURLToPath, | |
}; | |
const url$1 = Object.freeze( | |
Object.defineProperty( | |
{ | |
__proto__: null, | |
URL: URL$1, | |
URLSearchParams: URLSearchParams$1, | |
Url: UrlImport, | |
default: api$1, | |
domainToASCII, | |
domainToUnicode, | |
fileURLToPath, | |
format: formatImportWithOverloads, | |
parse: parseImport, | |
pathToFileURL, | |
resolve: resolveImport, | |
resolveObject, | |
}, | |
Symbol.toStringTag, | |
{ value: "Module" }, | |
), | |
), | |
require$$2$1 = getAugmentedNamespace(url$1); | |
var empty$3 = null; | |
const empty$4 = Object.freeze( | |
Object.defineProperty( | |
{ __proto__: null, default: empty$3 }, | |
Symbol.toStringTag, | |
{ value: "Module" }, | |
), | |
), | |
require$$9 = getAugmentedNamespace(empty$4); | |
var tcp, hasRequiredTcp; | |
function requireTcp() { | |
if (hasRequiredTcp) return tcp; | |
hasRequiredTcp = 1; | |
var s = require$$9, | |
o = browserExports("mqttjs:tcp"); | |
function _(_e, et) { | |
var tt, rt; | |
return ( | |
(et.port = et.port || 1883), | |
(et.hostname = et.hostname || et.host || "localhost"), | |
(tt = et.port), | |
(rt = et.hostname), | |
o("port %d and host %s", tt, rt), | |
s.createConnection(tt, rt) | |
); | |
} | |
return (tcp = _), tcp; | |
} | |
var tls_1$1, hasRequiredTls$1; | |
function requireTls$1() { | |
if (hasRequiredTls$1) return tls_1$1; | |
hasRequiredTls$1 = 1; | |
var s = require$$9, | |
o = browserExports("mqttjs:tls"); | |
function _(_e, et) { | |
var tt; | |
(et.port = et.port || 8883), | |
(et.host = et.hostname || et.host || "localhost"), | |
(et.servername = et.host), | |
(et.rejectUnauthorized = et.rejectUnauthorized !== !1), | |
delete et.path, | |
o( | |
"port %d host %s rejectUnauthorized %b", | |
et.port, | |
et.host, | |
et.rejectUnauthorized, | |
), | |
(tt = s.connect(et)), | |
tt.on("secureConnect", function () { | |
et.rejectUnauthorized && !tt.authorized | |
? tt.emit("error", new Error("TLS not authorized")) | |
: tt.removeListener("error", rt); | |
}); | |
function rt(it) { | |
et.rejectUnauthorized && _e.emit("error", it), tt.end(); | |
} | |
return tt.on("error", rt), tt; | |
} | |
return (tls_1$1 = _), tls_1$1; | |
} | |
var once$2 = { exports: {} }, | |
wrappy_1 = wrappy$1; | |
function wrappy$1(s, o) { | |
if (s && o) return wrappy$1(s)(o); | |
if (typeof s != "function") throw new TypeError("need wrapper function"); | |
return ( | |
Object.keys(s).forEach(function (_e) { | |
_[_e] = s[_e]; | |
}), | |
_ | |
); | |
function _() { | |
for (var _e = new Array(arguments.length), et = 0; et < _e.length; et++) | |
_e[et] = arguments[et]; | |
var tt = s.apply(this, _e), | |
rt = _e[_e.length - 1]; | |
return ( | |
typeof tt == "function" && | |
tt !== rt && | |
Object.keys(rt).forEach(function (it) { | |
tt[it] = rt[it]; | |
}), | |
tt | |
); | |
} | |
} | |
var wrappy = wrappy_1; | |
once$2.exports = wrappy(once$1); | |
once$2.exports.strict = wrappy(onceStrict); | |
once$1.proto = once$1(function () { | |
Object.defineProperty(Function.prototype, "once", { | |
value: function () { | |
return once$1(this); | |
}, | |
configurable: !0, | |
}), | |
Object.defineProperty(Function.prototype, "onceStrict", { | |
value: function () { | |
return onceStrict(this); | |
}, | |
configurable: !0, | |
}); | |
}); | |
function once$1(s) { | |
var o = function () { | |
return o.called | |
? o.value | |
: ((o.called = !0), (o.value = s.apply(this, arguments))); | |
}; | |
return (o.called = !1), o; | |
} | |
function onceStrict(s) { | |
var o = function () { | |
if (o.called) throw new Error(o.onceError); | |
return (o.called = !0), (o.value = s.apply(this, arguments)); | |
}, | |
_ = s.name || "Function wrapped with `once`"; | |
return ( | |
(o.onceError = _ + " shouldn't be called more than once"), | |
(o.called = !1), | |
o | |
); | |
} | |
var onceExports = once$2.exports, | |
once = onceExports, | |
noop$2 = function () {}, | |
isRequest = function (s) { | |
return s.setHeader && typeof s.abort == "function"; | |
}, | |
isChildProcess = function (s) { | |
return s.stdio && Array.isArray(s.stdio) && s.stdio.length === 3; | |
}, | |
eos$1 = function (s, o, _) { | |
if (typeof o == "function") return eos$1(s, null, o); | |
o || (o = {}), (_ = once(_ || noop$2)); | |
var _e = s._writableState, | |
et = s._readableState, | |
tt = o.readable || (o.readable !== !1 && s.readable), | |
rt = o.writable || (o.writable !== !1 && s.writable), | |
it = !1, | |
ot = function () { | |
s.writable || ct(); | |
}, | |
ct = function () { | |
(rt = !1), tt || _.call(s); | |
}, | |
at = function () { | |
(tt = !1), rt || _.call(s); | |
}, | |
ht = function ($t) { | |
_.call(s, $t ? new Error("exited with error code: " + $t) : null); | |
}, | |
mt = function ($t) { | |
_.call(s, $t); | |
}, | |
vt = function () { | |
process$1.nextTick(xt); | |
}, | |
xt = function () { | |
if (!it) { | |
if (tt && !(et && et.ended && !et.destroyed)) | |
return _.call(s, new Error("premature close")); | |
if (rt && !(_e && _e.ended && !_e.destroyed)) | |
return _.call(s, new Error("premature close")); | |
} | |
}, | |
St = function () { | |
s.req.on("finish", ct); | |
}; | |
return ( | |
isRequest(s) | |
? (s.on("complete", ct), | |
s.on("abort", vt), | |
s.req ? St() : s.on("request", St)) | |
: rt && !_e && (s.on("end", ot), s.on("close", ot)), | |
isChildProcess(s) && s.on("exit", ht), | |
s.on("end", at), | |
s.on("finish", ct), | |
o.error !== !1 && s.on("error", mt), | |
s.on("close", vt), | |
function () { | |
(it = !0), | |
s.removeListener("complete", ct), | |
s.removeListener("abort", vt), | |
s.removeListener("request", St), | |
s.req && s.req.removeListener("finish", ct), | |
s.removeListener("end", ot), | |
s.removeListener("close", ot), | |
s.removeListener("finish", ct), | |
s.removeListener("exit", ht), | |
s.removeListener("end", at), | |
s.removeListener("error", mt), | |
s.removeListener("close", vt); | |
} | |
); | |
}, | |
endOfStream = eos$1, | |
streamShift = shift$2; | |
function shift$2(s) { | |
var o = s._readableState; | |
return o | |
? o.objectMode || typeof s._duplexState == "number" | |
? s.read() | |
: s.read(getStateLength(o)) | |
: null; | |
} | |
function getStateLength(s) { | |
if (s.buffer.length) { | |
var o = s.bufferIndex || 0; | |
if (s.buffer.head) return s.buffer.head.data.length; | |
if (s.buffer.length - o > 0 && s.buffer[o]) return s.buffer[o].length; | |
} | |
return s.length; | |
} | |
var stream$2 = readableBrowserExports, | |
eos = endOfStream, | |
inherits$4 = inherits_browserExports, | |
shift$1 = streamShift, | |
SIGNAL_FLUSH = | |
Buffer$3.from && Buffer$3.from !== Uint8Array.from | |
? Buffer$3.from([0]) | |
: new Buffer$3([0]), | |
onuncork = function (s, o) { | |
s._corked ? s.once("uncork", o) : o(); | |
}, | |
autoDestroy = function (s, o) { | |
s._autoDestroy && s.destroy(o); | |
}, | |
destroyer = function (s, o) { | |
return function (_) { | |
_ | |
? autoDestroy(s, _.message === "premature close" ? null : _) | |
: o && !s._ended && s.end(); | |
}; | |
}, | |
end$2 = function (s, o) { | |
if (!s || (s._writableState && s._writableState.finished)) return o(); | |
if (s._writableState) return s.end(o); | |
s.end(), o(); | |
}, | |
noop$1 = function () {}, | |
toStreams2 = function (s) { | |
return new stream$2.Readable({ objectMode: !0, highWaterMark: 16 }).wrap( | |
s, | |
); | |
}, | |
Duplexify = function (s, o, _) { | |
if (!(this instanceof Duplexify)) return new Duplexify(s, o, _); | |
stream$2.Duplex.call(this, _), | |
(this._writable = null), | |
(this._readable = null), | |
(this._readable2 = null), | |
(this._autoDestroy = !_ || _.autoDestroy !== !1), | |
(this._forwardDestroy = !_ || _.destroy !== !1), | |
(this._forwardEnd = !_ || _.end !== !1), | |
(this._corked = 1), | |
(this._ondrain = null), | |
(this._drained = !1), | |
(this._forwarding = !1), | |
(this._unwrite = null), | |
(this._unread = null), | |
(this._ended = !1), | |
(this.destroyed = !1), | |
s && this.setWritable(s), | |
o && this.setReadable(o); | |
}; | |
inherits$4(Duplexify, stream$2.Duplex); | |
Duplexify.obj = function (s, o, _) { | |
return ( | |
_ || (_ = {}), | |
(_.objectMode = !0), | |
(_.highWaterMark = 16), | |
new Duplexify(s, o, _) | |
); | |
}; | |
Duplexify.prototype.cork = function () { | |
++this._corked === 1 && this.emit("cork"); | |
}; | |
Duplexify.prototype.uncork = function () { | |
this._corked && --this._corked === 0 && this.emit("uncork"); | |
}; | |
Duplexify.prototype.setWritable = function (s) { | |
if ((this._unwrite && this._unwrite(), this.destroyed)) { | |
s && s.destroy && s.destroy(); | |
return; | |
} | |
if (s === null || s === !1) { | |
this.end(); | |
return; | |
} | |
var o = this, | |
_ = eos( | |
s, | |
{ writable: !0, readable: !1 }, | |
destroyer(this, this._forwardEnd), | |
), | |
_e = function () { | |
var tt = o._ondrain; | |
(o._ondrain = null), tt && tt(); | |
}, | |
et = function () { | |
o._writable.removeListener("drain", _e), _(); | |
}; | |
this._unwrite && process$1.nextTick(_e), | |
(this._writable = s), | |
this._writable.on("drain", _e), | |
(this._unwrite = et), | |
this.uncork(); | |
}; | |
Duplexify.prototype.setReadable = function (s) { | |
if ((this._unread && this._unread(), this.destroyed)) { | |
s && s.destroy && s.destroy(); | |
return; | |
} | |
if (s === null || s === !1) { | |
this.push(null), this.resume(); | |
return; | |
} | |
var o = this, | |
_ = eos(s, { writable: !1, readable: !0 }, destroyer(this)), | |
_e = function () { | |
o._forward(); | |
}, | |
et = function () { | |
o.push(null); | |
}, | |
tt = function () { | |
o._readable2.removeListener("readable", _e), | |
o._readable2.removeListener("end", et), | |
_(); | |
}; | |
(this._drained = !0), | |
(this._readable = s), | |
(this._readable2 = s._readableState ? s : toStreams2(s)), | |
this._readable2.on("readable", _e), | |
this._readable2.on("end", et), | |
(this._unread = tt), | |
this._forward(); | |
}; | |
Duplexify.prototype._read = function () { | |
(this._drained = !0), this._forward(); | |
}; | |
Duplexify.prototype._forward = function () { | |
if (!(this._forwarding || !this._readable2 || !this._drained)) { | |
this._forwarding = !0; | |
for (var s; this._drained && (s = shift$1(this._readable2)) !== null; ) | |
this.destroyed || (this._drained = this.push(s)); | |
this._forwarding = !1; | |
} | |
}; | |
Duplexify.prototype.destroy = function (s, o) { | |
if ((o || (o = noop$1), this.destroyed)) return o(null); | |
this.destroyed = !0; | |
var _ = this; | |
process$1.nextTick(function () { | |
_._destroy(s), o(null); | |
}); | |
}; | |
Duplexify.prototype._destroy = function (s) { | |
if (s) { | |
var o = this._ondrain; | |
(this._ondrain = null), o ? o(s) : this.emit("error", s); | |
} | |
this._forwardDestroy && | |
(this._readable && this._readable.destroy && this._readable.destroy(), | |
this._writable && this._writable.destroy && this._writable.destroy()), | |
this.emit("close"); | |
}; | |
Duplexify.prototype._write = function (s, o, _) { | |
if (!this.destroyed) { | |
if (this._corked) return onuncork(this, this._write.bind(this, s, o, _)); | |
if (s === SIGNAL_FLUSH) return this._finish(_); | |
if (!this._writable) return _(); | |
this._writable.write(s) === !1 | |
? (this._ondrain = _) | |
: this.destroyed || _(); | |
} | |
}; | |
Duplexify.prototype._finish = function (s) { | |
var o = this; | |
this.emit("preend"), | |
onuncork(this, function () { | |
end$2(o._forwardEnd && o._writable, function () { | |
o._writableState.prefinished === !1 && | |
(o._writableState.prefinished = !0), | |
o.emit("prefinish"), | |
onuncork(o, s); | |
}); | |
}); | |
}; | |
Duplexify.prototype.end = function (s, o, _) { | |
return typeof s == "function" | |
? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment